fix: goose recipe prompt is not shown again when switch the view from settings to chat (#2870)

This commit is contained in:
Lifei Zhou
2025-06-18 09:30:59 +10:00
committed by GitHub
parent 21ea7524f6
commit 5ddb93e7b8
3 changed files with 6 additions and 16 deletions

View File

@@ -105,7 +105,6 @@ const getInitialView = (): ViewConfig => {
export default function App() {
const [fatalError, setFatalError] = useState<string | null>(null);
const [modalVisible, setModalVisible] = useState(false);
const [appInitialized, setAppInitialized] = useState(false);
const [pendingLink, setPendingLink] = useState<string | null>(null);
const [modalMessage, setModalMessage] = useState<string>('');
const [extensionConfirmLabel, setExtensionConfirmLabel] = useState<string>('');
@@ -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);
@@ -515,7 +509,6 @@ export default function App() {
)}
{view === 'chat' && !isLoadingSession && (
<ChatView
readyForAutoUserPrompt={appInitialized}
chat={chat}
setChat={setChat}
setView={setView}