From d2a1370a9369f88ff99c1b586a96eb4b6ae2983e Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 18 Dec 2024 16:50:22 -0800 Subject: [PATCH 1/4] page header z index --- gui/src/components/PageHeader.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/src/components/PageHeader.tsx b/gui/src/components/PageHeader.tsx index a0de733d0..23e108c38 100644 --- a/gui/src/components/PageHeader.tsx +++ b/gui/src/components/PageHeader.tsx @@ -7,7 +7,7 @@ export interface PageHeaderProps { export default function PageHeader({ onClick, title }: PageHeaderProps) { return ( -
+
Date: Wed, 18 Dec 2024 16:53:46 -0800 Subject: [PATCH 2/4] filename link hover delay --- gui/src/components/markdown/FilenameLink.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/gui/src/components/markdown/FilenameLink.tsx b/gui/src/components/markdown/FilenameLink.tsx index 977e2c99e..0ab78e2fd 100644 --- a/gui/src/components/markdown/FilenameLink.tsx +++ b/gui/src/components/markdown/FilenameLink.tsx @@ -27,6 +27,7 @@ function FilenameLink({ rif }: FilenameLinkProps) { <> From 3c678361ed95b9d4b1b3ba3a184bad154ca7fcdd Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 18 Dec 2024 17:15:36 -0800 Subject: [PATCH 3/4] add docs buttons height, exclamation icon for failure --- gui/src/components/indexing/DocsIndexingStatus.tsx | 4 ++-- gui/src/components/indexing/DocsIndexingStatuses.tsx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gui/src/components/indexing/DocsIndexingStatus.tsx b/gui/src/components/indexing/DocsIndexingStatus.tsx index 31604874f..12627dff5 100644 --- a/gui/src/components/indexing/DocsIndexingStatus.tsx +++ b/gui/src/components/indexing/DocsIndexingStatus.tsx @@ -5,9 +5,9 @@ import { ArrowPathIcon, ArrowTopRightOnSquareIcon, CheckCircleIcon, + ExclamationTriangleIcon, PauseCircleIcon, TrashIcon, - XMarkIcon, } from "@heroicons/react/24/outline"; import { useAppDispatch, useAppSelector } from "../../redux/hooks"; import { updateIndexingStatus } from "../../redux/slices/indexingSlice"; @@ -24,7 +24,7 @@ const STATUS_TO_ICON: Record = { complete: CheckCircleIcon, aborted: null, pending: null, - failed: XMarkIcon, // Since we show an error message below + failed: ExclamationTriangleIcon, // Since we show an error message below }; function DocsIndexingStatus({ docConfig }: IndexingStatusViewerProps) { diff --git a/gui/src/components/indexing/DocsIndexingStatuses.tsx b/gui/src/components/indexing/DocsIndexingStatuses.tsx index 76feb21e0..445c4db93 100644 --- a/gui/src/components/indexing/DocsIndexingStatuses.tsx +++ b/gui/src/components/indexing/DocsIndexingStatuses.tsx @@ -16,8 +16,7 @@ function DocsIndexingStatuses() {

@docs indexes

{configDocs.length ? ( { dispatch(setShowDialog(true)); dispatch(setDialogMessage()); @@ -32,10 +31,11 @@ function DocsIndexingStatuses() { ? "Manage your documentation sources" : "No docs yet"}
-
+
{configDocs.length === 0 && ( { dispatch(setShowDialog(true)); dispatch(setDialogMessage()); From 90ec36a7695d5fdf1abd6e85c162344060152d20 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Wed, 18 Dec 2024 18:33:31 -0800 Subject: [PATCH 4/4] only clear editor on submission if main editor --- gui/src/components/mainInput/resolveInput.ts | 2 -- gui/src/pages/gui/Chat.tsx | 14 +++++++++----- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/gui/src/components/mainInput/resolveInput.ts b/gui/src/components/mainInput/resolveInput.ts index e3af02500..768cefc17 100644 --- a/gui/src/components/mainInput/resolveInput.ts +++ b/gui/src/components/mainInput/resolveInput.ts @@ -117,7 +117,6 @@ async function resolveEditorContent({ } const shouldGatherContext = modifiers.useCodebase || slashCommand; - if (shouldGatherContext) { dispatch(setIsGatheringContext(true)); } @@ -192,7 +191,6 @@ async function resolveEditorContent({ parts = [{ type: "text", text: lastPart }]; } } - if (shouldGatherContext) { dispatch(setIsGatheringContext(true)); } diff --git a/gui/src/pages/gui/Chat.tsx b/gui/src/pages/gui/Chat.tsx index 781d712db..fea1d2992 100644 --- a/gui/src/pages/gui/Chat.tsx +++ b/gui/src/pages/gui/Chat.tsx @@ -233,8 +233,8 @@ export function Chat() { ( editorState: JSONContent, modifiers: InputModifiers, - editor: Editor, index?: number, + editorToClearOnSend?: Editor, ) => { if (defaultModel?.provider === "free-trial") { const u = getLocalStorage("ftc"); @@ -268,7 +268,9 @@ export function Chat() { streamResponseThunk({ editorState, modifiers, promptPreamble, index }), ); - editor.commands.clearContent(true); + if (editorToClearOnSend) { + editorToClearOnSend.commands.clearContent(); + } // Increment localstorage counter for popup const currentCount = getLocalStorage("mainTextEntryCounter"); @@ -381,8 +383,8 @@ export function Chat() { {isInEditMode && index === 0 && } - sendInput(editorState, modifiers, editor, index) + onEnter={(editorState, modifiers) => + sendInput(editorState, modifiers, index) } isLastUserInput={isLastUserInput(index)} isMainInput={false} @@ -487,7 +489,9 @@ export function Chat() { isMainInput isEditMode={isInEditMode} isLastUserInput={false} - onEnter={sendInput} + onEnter={(editorState, modifiers, editor) => + sendInput(editorState, modifiers, undefined, editor) + } /> )}