From da4b2ce065da51dabf3f26be8d21f250ef710580 Mon Sep 17 00:00:00 2001 From: Lifei Zhou Date: Thu, 12 Jun 2025 10:42:07 +1000 Subject: [PATCH 1/2] clean up --- ui/desktop/.gitignore | 1 + ui/desktop/src/App.tsx | 15 ++++----------- ui/desktop/src/components/ChatView.tsx | 4 ---- 3 files changed, 5 insertions(+), 15 deletions(-) diff --git a/ui/desktop/.gitignore b/ui/desktop/.gitignore index 46be848bc68a..c3482b5af576 100644 --- a/ui/desktop/.gitignore +++ b/ui/desktop/.gitignore @@ -8,3 +8,4 @@ src/bin/goose-npm/ /playwright-report/ /test-results/ /src/bin/temporal-service +src/bin/temporal.db diff --git a/ui/desktop/src/App.tsx b/ui/desktop/src/App.tsx index d312764b9c1f..6de7f9171d0a 100644 --- a/ui/desktop/src/App.tsx +++ b/ui/desktop/src/App.tsx @@ -105,7 +105,6 @@ const getInitialView = (): ViewConfig => { export default function App() { const [fatalError, setFatalError] = useState(null); const [modalVisible, setModalVisible] = useState(false); - const [appInitialized, setAppInitialized] = useState(false); const [pendingLink, setPendingLink] = useState(null); const [modalMessage, setModalMessage] = useState(''); const [extensionConfirmLabel, setExtensionConfirmLabel] = useState(''); @@ -207,15 +206,10 @@ export default function App() { toastService.configure({ silent: false }); }; - (async () => { - try { - await initializeApp(); - setAppInitialized(true); - } catch (error) { - console.error('Unhandled error in initialization:', error); - setFatalError(`${error instanceof Error ? error.message : 'Unknown error'}`); - } - })(); + initializeApp().catch((error) => { + console.error('Unhandled error in initialization:', error); + setFatalError(`${error instanceof Error ? error.message : 'Unknown error'}`); + }); }, [read, getExtensions, addExtension]); const [isGoosehintsModalOpen, setIsGoosehintsModalOpen] = useState(false); @@ -507,7 +501,6 @@ export default function App() { )} {view === 'chat' && !isLoadingSession && ( { }; export default function ChatView({ - readyForAutoUserPrompt, chat, setChat, setView, setIsGoosehintsModalOpen, }: { - readyForAutoUserPrompt: boolean; chat: ChatType; setChat: (chat: ChatType) => void; setView: (view: View, viewOptions?: ViewOptions) => void; @@ -71,7 +69,6 @@ export default function ChatView({ return ( void; setView: (view: View, viewOptions?: ViewOptions) => void; From 21b97c2f9ac03f42978312f98b11f744e13d49ca Mon Sep 17 00:00:00 2001 From: Lifei Zhou Date: Thu, 12 Jun 2025 11:19:07 +1000 Subject: [PATCH 2/2] only show the recipe prompt when there is no existing messages --- ui/desktop/src/components/ChatView.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/desktop/src/components/ChatView.tsx b/ui/desktop/src/components/ChatView.tsx index ff1ef82d030c..052f132e4c78 100644 --- a/ui/desktop/src/components/ChatView.tsx +++ b/ui/desktop/src/components/ChatView.tsx @@ -623,7 +623,7 @@ function ChatContent({ isLoading={isLoading} onStop={onStopGoose} commandHistory={commandHistory} - initialValue={_input || initialPrompt} + initialValue={_input || (hasMessages ? _input : initialPrompt)} setView={setView} hasMessages={hasMessages} numTokens={sessionTokenCount}