From 6750c78b4bd0900eaa5f1a2bfd4c50cf6f315422 Mon Sep 17 00:00:00 2001 From: pomelo-nwu Date: Wed, 10 Sep 2025 15:54:38 +0800 Subject: [PATCH] fix: increase delay for summary_and_quit to show results before exit --- packages/cli/src/ui/hooks/slashCommandProcessor.ts | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts index 9c5bfc12..7bcd002e 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts @@ -432,8 +432,10 @@ export const useSlashCommandProcessor = ( // Generate summary and then quit handleSlashCommand('/chat summary') .then(() => { - // Wait for summary to complete, then quit - handleSlashCommand('/quit'); + // Wait for user to see the summary result + setTimeout(() => { + handleSlashCommand('/quit'); + }, 1200); }) .catch((error) => { // If summary fails, still quit but show error @@ -448,7 +450,10 @@ export const useSlashCommandProcessor = ( }, Date.now(), ); - handleSlashCommand('/quit'); + // Give user time to see the error message + setTimeout(() => { + handleSlashCommand('/quit'); + }, 1000); }); } else { // Just quit immediately - trigger the actual quit action @@ -483,7 +488,7 @@ export const useSlashCommandProcessor = ( setTimeout(async () => { await runExitCleanup(); process.exit(0); - }, 100); + }, 1000); return { type: 'handled' }; case 'submit_prompt':