feat(cli): add --delete flag to /exit command for session deletion (#19332)

Co-authored-by: David Pierce <davidapierce@google.com>
This commit is contained in:
Abdul Tawab
2026-04-29 22:20:57 +05:00
committed by GitHub
parent 2cf0c75a04
commit 011c0f9bc0
9 changed files with 272 additions and 2 deletions
@@ -557,6 +557,18 @@ export const useSlashCommandProcessor = (
return { type: 'handled' };
}
case 'quit':
if (result.deleteSession) {
try {
const chatRecordingService = config
?.getGeminiClient()
?.getChatRecordingService();
if (chatRecordingService) {
await chatRecordingService.deleteCurrentSessionAsync();
}
} catch {
// Don't let deletion errors prevent exit.
}
}
actions.quit(result.messages);
return { type: 'handled' };