From e01f51160605a6840ac3efa33034b2c3564849b2 Mon Sep 17 00:00:00 2001 From: Sherman Boyd Date: Sat, 1 Feb 2025 21:45:32 -0700 Subject: [PATCH] Use Shortcuts component --- gui/src/components/History/index.tsx | 6 +++--- gui/src/components/mainInput/TutorialCard.tsx | 3 ++- gui/src/components/modelSelection/ModelSelect.tsx | 3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gui/src/components/History/index.tsx b/gui/src/components/History/index.tsx index 24ac376e3..f97170d28 100644 --- a/gui/src/components/History/index.tsx +++ b/gui/src/components/History/index.tsx @@ -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 && (
No past sessions found. To start a new session, either click the "+" - button or use the keyboard shortcut: {getMetaKeyLabel()} - {` `} - L + button or use the keyboard shortcut: meta L, meta K, meta M
+ )} diff --git a/gui/src/components/mainInput/TutorialCard.tsx b/gui/src/components/mainInput/TutorialCard.tsx index 3eb0da2ef..f4be21389 100644 --- a/gui/src/components/mainInput/TutorialCard.tsx +++ b/gui/src/components/mainInput/TutorialCard.tsx @@ -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) {
  • - Highlight code and press {getMetaKeyLabel()} + L to + Highlight code and press meta L to add it to the chat window
  • diff --git a/gui/src/components/modelSelection/ModelSelect.tsx b/gui/src/components/modelSelection/ModelSelect.tsx index 68f5ea996..a31940532 100644 --- a/gui/src/components/modelSelection/ModelSelect.tsx +++ b/gui/src/components/modelSelection/ModelSelect.tsx @@ -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() { - {getMetaKeyLabel()} + ' to toggle + meta ' to toggle model