From be71408787d0ba047742b10affced418e33a8d0a Mon Sep 17 00:00:00 2001 From: Nate Sesti Date: Mon, 11 Dec 2023 21:28:15 -0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20small=20fixes?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- extensions/vscode/src/debugPanel.ts | 2 +- gui/src/components/mainInput/ComboBox.tsx | 12 +++++++----- gui/src/hooks/useChatHandler.ts | 3 ++- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/extensions/vscode/src/debugPanel.ts b/extensions/vscode/src/debugPanel.ts index 491b02109..de1544aa5 100644 --- a/extensions/vscode/src/debugPanel.ts +++ b/extensions/vscode/src/debugPanel.ts @@ -366,7 +366,7 @@ export function getSidebarContent( ${page ? `` : ""} - ${false && ``} + ${false ? `` : null} `; } diff --git a/gui/src/components/mainInput/ComboBox.tsx b/gui/src/components/mainInput/ComboBox.tsx index 32c5209b6..f7db6e038 100644 --- a/gui/src/components/mainInput/ComboBox.tsx +++ b/gui/src/components/mainInput/ComboBox.tsx @@ -585,7 +585,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { try { let res: any = miniSearch.search(query.trim() === "" ? "/" : query, { prefix: true, - fuzzy: 3, + fuzzy: 1, }); if (res.length === 0) { res = firstResults; @@ -1193,10 +1193,12 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { ref={divRef} > { fontSize={getFontSize()} disabled={props.disabled} placeholder={ - props.isMainInput + history.length === 0 ? `Ask a question, '/' for slash commands, '@' to add context` : `Ask a follow-up` } @@ -1452,7 +1454,7 @@ const ComboBox = React.forwardRef((props: ComboBoxProps, ref) => { } }} > - ⏎ Return + ⏎ Enter )} diff --git a/gui/src/hooks/useChatHandler.ts b/gui/src/hooks/useChatHandler.ts index f509b2c8b..444755210 100644 --- a/gui/src/hooks/useChatHandler.ts +++ b/gui/src/hooks/useChatHandler.ts @@ -101,7 +101,8 @@ function useChatHandler(dispatch: Dispatch) { }; const historyItem: ChatHistoryItem = { message, - contextItems, + contextItems: + typeof index === "number" ? history[index].contextItems : contextItems, }; let newHistory: ChatHistory = [];