diff options
Diffstat (limited to 'packages/cli/src/ui/commands/clearCommand.ts')
| -rw-r--r-- | packages/cli/src/ui/commands/clearCommand.ts | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/packages/cli/src/ui/commands/clearCommand.ts b/packages/cli/src/ui/commands/clearCommand.ts new file mode 100644 index 00000000..e5473b5b --- /dev/null +++ b/packages/cli/src/ui/commands/clearCommand.ts @@ -0,0 +1,17 @@ +/** + * @license + * Copyright 2025 Google LLC + * SPDX-License-Identifier: Apache-2.0 + */ + +import { SlashCommand } from './types.js'; + +export const clearCommand: SlashCommand = { + name: 'clear', + description: 'clear the screen and conversation history', + action: async (context, _args) => { + context.ui.setDebugMessage('Clearing terminal and resetting chat.'); + await context.services.config?.getGeminiClient()?.resetChat(); + context.ui.clear(); + }, +}; |
