mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-31 08:20:54 -07:00
18 lines
464 B
TypeScript
18 lines
464 B
TypeScript
|
|
/**
|
||
|
|
* @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();
|
||
|
|
},
|
||
|
|
};
|