diff options
| author | Abhi <[email protected]> | 2025-07-07 16:45:44 -0400 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-07-07 20:45:44 +0000 |
| commit | aa10ccba713d49bef6bf474bfd72c0852e3da611 (patch) | |
| tree | 92f1de8bec31cdb10a02fe8ddac1fbde41b75e7f /packages/cli/src/ui/commands/clearCommand.ts | |
| parent | 6eccb474c77e41aa88d1d1d4ea7eada3e85e746c (diff) | |
feature(commands) - Refactor Slash Command + Vision For the Future (#3175)
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(); + }, +}; |
