From 6af7a5c58934c9a09774f0d38c3b87c2c877ecc5 Mon Sep 17 00:00:00 2001 From: Abhi <43648792+abhipatel12@users.noreply.github.com> Date: Mon, 16 Jun 2025 02:33:59 -0400 Subject: feat: clear should also clear chat history (#1008) --- packages/cli/src/ui/hooks/slashCommandProcessor.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'packages/cli/src/ui/hooks/slashCommandProcessor.ts') diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts index 11e1247f..916af3e7 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts @@ -181,10 +181,11 @@ export const useSlashCommandProcessor = ( }, { name: 'clear', - description: 'clear the screen', - action: (_mainCommand, _subCommand, _args) => { - onDebugMessage('Clearing terminal.'); + description: 'clear the screen and conversation history', + action: async (_mainCommand, _subCommand, _args) => { + onDebugMessage('Clearing terminal and resetting chat.'); clearItems(); + await config?.getGeminiClient()?.resetChat(); console.clear(); refreshStatic(); }, -- cgit v1.2.3