Download projects/gemini-cli/packages/cli/src/ui/commands/quitCommand.ts from LevelUp2x/adaptai: direct link, hf CLI and curl.
- Browser
- Download file 847 Bytes
-
https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/commands/quitCommand.ts
- Command line
-
hf download hf://datasets/LevelUp2x/adaptai@2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/commands/quitCommand.ts
-
curl -L -o quitCommand.ts https://huggingface.co/datasets/LevelUp2x/adaptai/resolve/2147bc06c2ccf123b96f98eace2e6bf6486e7f0e/projects/gemini-cli/packages/cli/src/ui/commands/quitCommand.ts
847 Bytes
| /** | |
| * @license | |
| * Copyright 2025 Google LLC | |
| * SPDX-License-Identifier: Apache-2.0 | |
| */ | |
| import { formatDuration } from '../utils/formatters.js'; | |
| import { CommandKind, type SlashCommand } from './types.js'; | |
| export const quitCommand: SlashCommand = { | |
| name: 'quit', | |
| altNames: ['exit'], | |
| description: 'exit the cli', | |
| kind: CommandKind.BUILT_IN, | |
| action: (context) => { | |
| const now = Date.now(); | |
| const { sessionStartTime } = context.session.stats; | |
| const wallDuration = now - sessionStartTime.getTime(); | |
| return { | |
| type: 'quit', | |
| messages: [ | |
| { | |
| type: 'user', | |
| text: `/quit`, // Keep it consistent, even if /exit was used | |
| id: now - 1, | |
| }, | |
| { | |
| type: 'quit', | |
| duration: formatDuration(wallDuration), | |
| id: now, | |
| }, | |
| ], | |
| }; | |
| }, | |
| }; | |