Use Shortcuts component
This commit is contained in:
parent
0fb3c8cbd1
commit
e01f511606
3 changed files with 7 additions and 5 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import { SessionMetadata } from "core";
|
||||
import MiniSearch from "minisearch";
|
||||
import React, { Fragment, useEffect, useMemo, useRef, useState } from "react";
|
||||
import Shortcut from '../gui/Shortcut';
|
||||
|
||||
import { getFontSize, getMetaKeyLabel } from "../../util";
|
||||
import { HistoryTableRow } from "./HistoryTableRow";
|
||||
|
|
@ -99,10 +100,9 @@ export function History() {
|
|||
{filteredAndSortedSessions.length === 0 && (
|
||||
<div className="m-4 text-center">
|
||||
No past sessions found. To start a new session, either click the "+"
|
||||
button or use the keyboard shortcut: <code>{getMetaKeyLabel()}</code>
|
||||
{` `}
|
||||
<code>L</code>
|
||||
button or use the keyboard shortcut: <Shortcut>meta L, meta K, meta M</Shortcut>
|
||||
</div>
|
||||
|
||||
)}
|
||||
|
||||
<table className="w-full border-collapse border-spacing-0">
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import { defaultBorderRadius, lightGray, vscBackground } from "..";
|
|||
import { getMetaKeyLabel, isJetBrains } from "../../util";
|
||||
import { useContext } from "react";
|
||||
import { IdeMessengerContext } from "../../context/IdeMessenger";
|
||||
import Shortcut from '../gui/Shortcut';
|
||||
|
||||
interface TutorialCardProps {
|
||||
onClose: () => void;
|
||||
|
|
@ -76,7 +77,7 @@ export function TutorialCard({ onClose }: TutorialCardProps) {
|
|||
<li className="flex items-start">
|
||||
<ClipboardDocumentIcon className="h-4 w-4 pr-3 align-middle" />
|
||||
<span>
|
||||
Highlight code and press <kbd>{getMetaKeyLabel()}</kbd> + <kbd>L</kbd> to
|
||||
Highlight code and press <Shortcut>meta L</Shortcut> to
|
||||
add it to the chat window
|
||||
</span>
|
||||
</li>
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@ import {
|
|||
} from "../../util";
|
||||
import ConfirmationDialog from "../dialogs/ConfirmationDialog";
|
||||
import { Divider } from "./platform/shared";
|
||||
import Shortcut from '../gui/Shortcut';
|
||||
|
||||
interface ModelOptionProps {
|
||||
option: Option;
|
||||
|
|
@ -367,7 +368,7 @@ function ModelSelect() {
|
|||
<Divider className="!my-0" />
|
||||
|
||||
<span className="block px-3 py-3" style={{ color: lightGray }}>
|
||||
<code>{getMetaKeyLabel()} + '</code> to toggle
|
||||
<Shortcut>meta '</Shortcut> to toggle model
|
||||
</span>
|
||||
</div>
|
||||
</StyledListboxOptions>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue