@google/gemini-cli 0.1.12-nightly.250714.b018e2d3 → 0.1.13-nightly.250726.fb751c54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -3
- package/dist/google-gemini-cli-0.1.13.tgz +0 -0
- package/dist/package.json +6 -4
- package/dist/src/acp/acp.d.ts +208 -0
- package/dist/src/acp/acp.js +193 -0
- package/dist/src/acp/acp.js.map +1 -0
- package/dist/src/acp/acpPeer.d.ts +8 -0
- package/dist/src/acp/acpPeer.js +537 -0
- package/dist/src/acp/acpPeer.js.map +1 -0
- package/dist/src/config/config.d.ts +6 -2
- package/dist/src/config/config.js +77 -13
- package/dist/src/config/config.js.map +1 -1
- package/dist/src/config/extension.d.ts +2 -2
- package/dist/src/config/extension.js +21 -16
- package/dist/src/config/extension.js.map +1 -1
- package/dist/src/config/settings.d.ts +15 -2
- package/dist/src/config/settings.js +25 -10
- package/dist/src/config/settings.js.map +1 -1
- package/dist/src/gemini.js +10 -20
- package/dist/src/gemini.js.map +1 -1
- package/dist/src/generated/git-commit.d.ts +1 -1
- package/dist/src/generated/git-commit.js +1 -1
- package/dist/src/patches/is-in-ci.d.ts +7 -0
- package/dist/src/patches/is-in-ci.js +15 -0
- package/dist/src/patches/is-in-ci.js.map +1 -0
- package/dist/src/services/BuiltinCommandLoader.d.ts +24 -0
- package/dist/src/services/BuiltinCommandLoader.js +72 -0
- package/dist/src/services/BuiltinCommandLoader.js.map +1 -0
- package/dist/src/services/CommandService.d.ts +43 -5
- package/dist/src/services/CommandService.js +61 -19
- package/dist/src/services/CommandService.js.map +1 -1
- package/dist/src/services/FileCommandLoader.d.ts +37 -0
- package/dist/src/services/FileCommandLoader.js +156 -0
- package/dist/src/services/FileCommandLoader.js.map +1 -0
- package/dist/src/services/McpPromptLoader.d.ts +25 -0
- package/dist/src/services/McpPromptLoader.js +192 -0
- package/dist/src/services/McpPromptLoader.js.map +1 -0
- package/dist/src/services/prompt-processors/argumentProcessor.d.ts +21 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js +28 -0
- package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -0
- package/dist/src/services/prompt-processors/types.d.ts +34 -0
- package/dist/src/services/prompt-processors/types.js +10 -0
- package/dist/src/services/prompt-processors/types.js.map +1 -0
- package/dist/src/services/types.d.ts +22 -0
- package/dist/src/services/types.js +7 -0
- package/dist/src/services/types.js.map +1 -0
- package/dist/src/ui/App.js +103 -98
- package/dist/src/ui/App.js.map +1 -1
- package/dist/src/ui/colors.js +6 -0
- package/dist/src/ui/colors.js.map +1 -1
- package/dist/src/ui/commands/aboutCommand.d.ts +7 -0
- package/dist/src/ui/commands/aboutCommand.js +39 -0
- package/dist/src/ui/commands/aboutCommand.js.map +1 -0
- package/dist/src/ui/commands/authCommand.d.ts +7 -0
- package/dist/src/ui/commands/authCommand.js +16 -0
- package/dist/src/ui/commands/authCommand.js.map +1 -0
- package/dist/src/ui/commands/bugCommand.d.ts +7 -0
- package/dist/src/ui/commands/bugCommand.js +63 -0
- package/dist/src/ui/commands/bugCommand.js.map +1 -0
- package/dist/src/ui/commands/chatCommand.d.ts +7 -0
- package/dist/src/ui/commands/chatCommand.js +179 -0
- package/dist/src/ui/commands/chatCommand.js.map +1 -0
- package/dist/src/ui/commands/clearCommand.js +14 -2
- package/dist/src/ui/commands/clearCommand.js.map +1 -1
- package/dist/src/ui/commands/compressCommand.d.ts +7 -0
- package/dist/src/ui/commands/compressCommand.js +64 -0
- package/dist/src/ui/commands/compressCommand.js.map +1 -0
- package/dist/src/ui/commands/copyCommand.d.ts +7 -0
- package/dist/src/ui/commands/copyCommand.js +59 -0
- package/dist/src/ui/commands/copyCommand.js.map +1 -0
- package/dist/src/ui/commands/corgiCommand.d.ts +7 -0
- package/dist/src/ui/commands/corgiCommand.js +15 -0
- package/dist/src/ui/commands/corgiCommand.js.map +1 -0
- package/dist/src/ui/commands/docsCommand.d.ts +7 -0
- package/dist/src/ui/commands/docsCommand.js +31 -0
- package/dist/src/ui/commands/docsCommand.js.map +1 -0
- package/dist/src/ui/commands/editorCommand.d.ts +7 -0
- package/dist/src/ui/commands/editorCommand.js +16 -0
- package/dist/src/ui/commands/editorCommand.js.map +1 -0
- package/dist/src/ui/commands/extensionsCommand.d.ts +7 -0
- package/dist/src/ui/commands/extensionsCommand.js +31 -0
- package/dist/src/ui/commands/extensionsCommand.js.map +1 -0
- package/dist/src/ui/commands/helpCommand.js +3 -1
- package/dist/src/ui/commands/helpCommand.js.map +1 -1
- package/dist/src/ui/commands/ideCommand.d.ts +8 -0
- package/dist/src/ui/commands/ideCommand.js +121 -0
- package/dist/src/ui/commands/ideCommand.js.map +1 -0
- package/dist/src/ui/commands/mcpCommand.d.ts +7 -0
- package/dist/src/ui/commands/mcpCommand.js +425 -0
- package/dist/src/ui/commands/mcpCommand.js.map +1 -0
- package/dist/src/ui/commands/memoryCommand.js +11 -4
- package/dist/src/ui/commands/memoryCommand.js.map +1 -1
- package/dist/src/ui/commands/privacyCommand.d.ts +7 -0
- package/dist/src/ui/commands/privacyCommand.js +16 -0
- package/dist/src/ui/commands/privacyCommand.js.map +1 -0
- package/dist/src/ui/commands/quitCommand.d.ts +7 -0
- package/dist/src/ui/commands/quitCommand.js +34 -0
- package/dist/src/ui/commands/quitCommand.js.map +1 -0
- package/dist/src/ui/commands/restoreCommand.d.ts +8 -0
- package/dist/src/ui/commands/restoreCommand.js +128 -0
- package/dist/src/ui/commands/restoreCommand.js.map +1 -0
- package/dist/src/ui/commands/statsCommand.d.ts +7 -0
- package/dist/src/ui/commands/statsCommand.js +54 -0
- package/dist/src/ui/commands/statsCommand.js.map +1 -0
- package/dist/src/ui/commands/themeCommand.js +2 -0
- package/dist/src/ui/commands/themeCommand.js.map +1 -1
- package/dist/src/ui/commands/toolsCommand.d.ts +7 -0
- package/dist/src/ui/commands/toolsCommand.js +56 -0
- package/dist/src/ui/commands/toolsCommand.js.map +1 -0
- package/dist/src/ui/commands/types.d.ts +61 -4
- package/dist/src/ui/commands/types.js +6 -1
- package/dist/src/ui/commands/types.js.map +1 -1
- package/dist/src/ui/commands/vimCommand.d.ts +7 -0
- package/dist/src/ui/commands/vimCommand.js +23 -0
- package/dist/src/ui/commands/vimCommand.js.map +1 -0
- package/dist/src/ui/components/ContextSummaryDisplay.d.ts +6 -1
- package/dist/src/ui/components/ContextSummaryDisplay.js +46 -19
- package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
- package/dist/src/ui/components/Footer.d.ts +1 -0
- package/dist/src/ui/components/Footer.js +2 -2
- package/dist/src/ui/components/Footer.js.map +1 -1
- package/dist/src/ui/components/Help.d.ts +1 -1
- package/dist/src/ui/components/IDEContextDetailDisplay.d.ts +11 -0
- package/dist/src/ui/components/IDEContextDetailDisplay.js +19 -0
- package/dist/src/ui/components/IDEContextDetailDisplay.js.map +1 -0
- package/dist/src/ui/components/InputPrompt.d.ts +3 -1
- package/dist/src/ui/components/InputPrompt.js +85 -113
- package/dist/src/ui/components/InputPrompt.js.map +1 -1
- package/dist/src/ui/components/ThemeDialog.js +51 -25
- package/dist/src/ui/components/ThemeDialog.js.map +1 -1
- package/dist/src/ui/components/messages/DiffRenderer.d.ts +1 -0
- package/dist/src/ui/components/messages/DiffRenderer.js +12 -11
- package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js +5 -4
- package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js +3 -1
- package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
- package/dist/src/ui/components/shared/MaxSizedBox.js +69 -2
- package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +3 -1
- package/dist/src/ui/components/shared/RadioButtonSelect.js +60 -10
- package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -1
- package/dist/src/ui/components/shared/text-buffer.d.ts +273 -3
- package/dist/src/ui/components/shared/text-buffer.js +426 -80
- package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
- package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +72 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js +565 -0
- package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -0
- package/dist/src/ui/constants.d.ts +1 -0
- package/dist/src/ui/constants.js +1 -0
- package/dist/src/ui/constants.js.map +1 -1
- package/dist/src/ui/contexts/VimModeContext.d.ts +19 -0
- package/dist/src/ui/contexts/VimModeContext.js +48 -0
- package/dist/src/ui/contexts/VimModeContext.js.map +1 -0
- package/dist/src/ui/hooks/atCommandProcessor.js +54 -15
- package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.d.ts +1 -1
- package/dist/src/ui/hooks/shellCommandProcessor.js +57 -19
- package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/slashCommandProcessor.d.ts +3 -10
- package/dist/src/ui/hooks/slashCommandProcessor.js +121 -879
- package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
- package/dist/src/ui/hooks/useAuthCommand.js +2 -1
- package/dist/src/ui/hooks/useAuthCommand.js.map +1 -1
- package/dist/src/ui/hooks/useCompletion.d.ts +4 -1
- package/dist/src/ui/hooks/useCompletion.js +141 -25
- package/dist/src/ui/hooks/useCompletion.js.map +1 -1
- package/dist/src/ui/hooks/useFocus.d.ts +6 -0
- package/dist/src/ui/hooks/useFocus.js +41 -0
- package/dist/src/ui/hooks/useFocus.js.map +1 -0
- package/dist/src/ui/hooks/useGeminiStream.js +74 -11
- package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
- package/dist/src/ui/hooks/useInputHistory.d.ts +1 -1
- package/dist/src/ui/hooks/useKeypress.js +5 -2
- package/dist/src/ui/hooks/useKeypress.js.map +1 -1
- package/dist/src/ui/hooks/usePrivacySettings.js +5 -5
- package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -1
- package/dist/src/ui/hooks/useShellHistory.d.ts +3 -2
- package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
- package/dist/src/ui/hooks/useThemeCommand.js +24 -23
- package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
- package/dist/src/ui/hooks/vim.d.ts +28 -0
- package/dist/src/ui/hooks/vim.js +630 -0
- package/dist/src/ui/hooks/vim.js.map +1 -0
- package/dist/src/ui/themes/ansi-light.js +3 -1
- package/dist/src/ui/themes/ansi-light.js.map +1 -1
- package/dist/src/ui/themes/ansi.js +2 -0
- package/dist/src/ui/themes/ansi.js.map +1 -1
- package/dist/src/ui/themes/atom-one-dark.js +2 -0
- package/dist/src/ui/themes/atom-one-dark.js.map +1 -1
- package/dist/src/ui/themes/ayu-light.js +3 -1
- package/dist/src/ui/themes/ayu-light.js.map +1 -1
- package/dist/src/ui/themes/ayu.js +3 -1
- package/dist/src/ui/themes/ayu.js.map +1 -1
- package/dist/src/ui/themes/color-utils.d.ts +21 -0
- package/dist/src/ui/themes/color-utils.js +221 -0
- package/dist/src/ui/themes/color-utils.js.map +1 -0
- package/dist/src/ui/themes/dracula.js +2 -0
- package/dist/src/ui/themes/dracula.js.map +1 -1
- package/dist/src/ui/themes/github-dark.js +2 -0
- package/dist/src/ui/themes/github-dark.js.map +1 -1
- package/dist/src/ui/themes/github-light.js +2 -0
- package/dist/src/ui/themes/github-light.js.map +1 -1
- package/dist/src/ui/themes/googlecode.js +3 -1
- package/dist/src/ui/themes/googlecode.js.map +1 -1
- package/dist/src/ui/themes/no-color.js +3 -1
- package/dist/src/ui/themes/no-color.js.map +1 -1
- package/dist/src/ui/themes/shades-of-purple.d.ts +1 -1
- package/dist/src/ui/themes/shades-of-purple.js +3 -1
- package/dist/src/ui/themes/shades-of-purple.js.map +1 -1
- package/dist/src/ui/themes/theme-manager.d.ts +31 -6
- package/dist/src/ui/themes/theme-manager.js +104 -34
- package/dist/src/ui/themes/theme-manager.js.map +1 -1
- package/dist/src/ui/themes/theme.d.ts +22 -3
- package/dist/src/ui/themes/theme.js +229 -182
- package/dist/src/ui/themes/theme.js.map +1 -1
- package/dist/src/ui/themes/xcode.js +3 -1
- package/dist/src/ui/themes/xcode.js.map +1 -1
- package/dist/src/ui/types.d.ts +9 -1
- package/dist/src/ui/utils/CodeColorizer.d.ts +3 -1
- package/dist/src/ui/utils/CodeColorizer.js +23 -11
- package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
- package/dist/src/ui/utils/commandUtils.d.ts +1 -0
- package/dist/src/ui/utils/commandUtils.js +47 -0
- package/dist/src/ui/utils/commandUtils.js.map +1 -1
- package/dist/src/ui/utils/markdownUtilities.js +1 -1
- package/dist/src/ui/utils/updateCheck.js +4 -0
- package/dist/src/ui/utils/updateCheck.js.map +1 -1
- package/dist/src/utils/sandbox.js +7 -3
- package/dist/src/utils/sandbox.js.map +1 -1
- package/dist/src/utils/userStartupWarnings.js +22 -1
- package/dist/src/utils/userStartupWarnings.js.map +1 -1
- package/dist/src/validateNonInterActiveAuth.d.ts +7 -0
- package/dist/src/validateNonInterActiveAuth.js +35 -0
- package/dist/src/validateNonInterActiveAuth.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -5
- package/dist/google-gemini-cli-0.1.12.tgz +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CommandKind } from './types.js';
|
|
7
|
+
export const privacyCommand = {
|
|
8
|
+
name: 'privacy',
|
|
9
|
+
description: 'display the privacy notice',
|
|
10
|
+
kind: CommandKind.BUILT_IN,
|
|
11
|
+
action: () => ({
|
|
12
|
+
type: 'dialog',
|
|
13
|
+
dialog: 'privacy',
|
|
14
|
+
}),
|
|
15
|
+
};
|
|
16
|
+
//# sourceMappingURL=privacyCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"privacyCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/privacyCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAwC,MAAM,YAAY,CAAC;AAE/E,MAAM,CAAC,MAAM,cAAc,GAAiB;IAC1C,IAAI,EAAE,SAAS;IACf,WAAW,EAAE,4BAA4B;IACzC,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,MAAM,EAAE,GAA2B,EAAE,CAAC,CAAC;QACrC,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,SAAS;KAClB,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { formatDuration } from '../utils/formatters.js';
|
|
7
|
+
import { CommandKind } from './types.js';
|
|
8
|
+
export const quitCommand = {
|
|
9
|
+
name: 'quit',
|
|
10
|
+
altNames: ['exit'],
|
|
11
|
+
description: 'exit the cli',
|
|
12
|
+
kind: CommandKind.BUILT_IN,
|
|
13
|
+
action: (context) => {
|
|
14
|
+
const now = Date.now();
|
|
15
|
+
const { sessionStartTime } = context.session.stats;
|
|
16
|
+
const wallDuration = now - sessionStartTime.getTime();
|
|
17
|
+
return {
|
|
18
|
+
type: 'quit',
|
|
19
|
+
messages: [
|
|
20
|
+
{
|
|
21
|
+
type: 'user',
|
|
22
|
+
text: `/quit`, // Keep it consistent, even if /exit was used
|
|
23
|
+
id: now - 1,
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
type: 'quit',
|
|
27
|
+
duration: formatDuration(wallDuration),
|
|
28
|
+
id: now,
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
};
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=quitCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"quitCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/quitCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,WAAW,EAAqB,MAAM,YAAY,CAAC;AAE5D,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,CAAC,MAAM,CAAC;IAClB,WAAW,EAAE,cAAc;IAC3B,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,MAAM,EAAE,CAAC,OAAO,EAAE,EAAE;QAClB,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACvB,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;QACnD,MAAM,YAAY,GAAG,GAAG,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAEtD,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,MAAM;oBACZ,IAAI,EAAE,OAAO,EAAE,6CAA6C;oBAC5D,EAAE,EAAE,GAAG,GAAG,CAAC;iBACZ;gBACD;oBACE,IAAI,EAAE,MAAM;oBACZ,QAAQ,EAAE,cAAc,CAAC,YAAY,CAAC;oBACtC,EAAE,EAAE,GAAG;iBACR;aACF;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { type SlashCommand } from './types.js';
|
|
7
|
+
import { Config } from '@google/gemini-cli-core';
|
|
8
|
+
export declare const restoreCommand: (config: Config | null) => SlashCommand | null;
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import * as fs from 'fs/promises';
|
|
7
|
+
import path from 'path';
|
|
8
|
+
import { CommandKind, } from './types.js';
|
|
9
|
+
async function restoreAction(context, args) {
|
|
10
|
+
const { services, ui } = context;
|
|
11
|
+
const { config, git: gitService } = services;
|
|
12
|
+
const { addItem, loadHistory } = ui;
|
|
13
|
+
const checkpointDir = config?.getProjectTempDir()
|
|
14
|
+
? path.join(config.getProjectTempDir(), 'checkpoints')
|
|
15
|
+
: undefined;
|
|
16
|
+
if (!checkpointDir) {
|
|
17
|
+
return {
|
|
18
|
+
type: 'message',
|
|
19
|
+
messageType: 'error',
|
|
20
|
+
content: 'Could not determine the .gemini directory path.',
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
try {
|
|
24
|
+
// Ensure the directory exists before trying to read it.
|
|
25
|
+
await fs.mkdir(checkpointDir, { recursive: true });
|
|
26
|
+
const files = await fs.readdir(checkpointDir);
|
|
27
|
+
const jsonFiles = files.filter((file) => file.endsWith('.json'));
|
|
28
|
+
if (!args) {
|
|
29
|
+
if (jsonFiles.length === 0) {
|
|
30
|
+
return {
|
|
31
|
+
type: 'message',
|
|
32
|
+
messageType: 'info',
|
|
33
|
+
content: 'No restorable tool calls found.',
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
const truncatedFiles = jsonFiles.map((file) => {
|
|
37
|
+
const components = file.split('.');
|
|
38
|
+
if (components.length <= 1) {
|
|
39
|
+
return file;
|
|
40
|
+
}
|
|
41
|
+
components.pop();
|
|
42
|
+
return components.join('.');
|
|
43
|
+
});
|
|
44
|
+
const fileList = truncatedFiles.join('\n');
|
|
45
|
+
return {
|
|
46
|
+
type: 'message',
|
|
47
|
+
messageType: 'info',
|
|
48
|
+
content: `Available tool calls to restore:\n\n${fileList}`,
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
const selectedFile = args.endsWith('.json') ? args : `${args}.json`;
|
|
52
|
+
if (!jsonFiles.includes(selectedFile)) {
|
|
53
|
+
return {
|
|
54
|
+
type: 'message',
|
|
55
|
+
messageType: 'error',
|
|
56
|
+
content: `File not found: ${selectedFile}`,
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
const filePath = path.join(checkpointDir, selectedFile);
|
|
60
|
+
const data = await fs.readFile(filePath, 'utf-8');
|
|
61
|
+
const toolCallData = JSON.parse(data);
|
|
62
|
+
if (toolCallData.history) {
|
|
63
|
+
if (!loadHistory) {
|
|
64
|
+
// This should not happen
|
|
65
|
+
return {
|
|
66
|
+
type: 'message',
|
|
67
|
+
messageType: 'error',
|
|
68
|
+
content: 'loadHistory function is not available.',
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
loadHistory(toolCallData.history);
|
|
72
|
+
}
|
|
73
|
+
if (toolCallData.clientHistory) {
|
|
74
|
+
await config?.getGeminiClient()?.setHistory(toolCallData.clientHistory);
|
|
75
|
+
}
|
|
76
|
+
if (toolCallData.commitHash) {
|
|
77
|
+
await gitService?.restoreProjectFromSnapshot(toolCallData.commitHash);
|
|
78
|
+
addItem({
|
|
79
|
+
type: 'info',
|
|
80
|
+
text: 'Restored project to the state before the tool call.',
|
|
81
|
+
}, Date.now());
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
type: 'tool',
|
|
85
|
+
toolName: toolCallData.toolCall.name,
|
|
86
|
+
toolArgs: toolCallData.toolCall.args,
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
catch (error) {
|
|
90
|
+
return {
|
|
91
|
+
type: 'message',
|
|
92
|
+
messageType: 'error',
|
|
93
|
+
content: `Could not read restorable tool calls. This is the error: ${error}`,
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
async function completion(context, _partialArg) {
|
|
98
|
+
const { services } = context;
|
|
99
|
+
const { config } = services;
|
|
100
|
+
const checkpointDir = config?.getProjectTempDir()
|
|
101
|
+
? path.join(config.getProjectTempDir(), 'checkpoints')
|
|
102
|
+
: undefined;
|
|
103
|
+
if (!checkpointDir) {
|
|
104
|
+
return [];
|
|
105
|
+
}
|
|
106
|
+
try {
|
|
107
|
+
const files = await fs.readdir(checkpointDir);
|
|
108
|
+
return files
|
|
109
|
+
.filter((file) => file.endsWith('.json'))
|
|
110
|
+
.map((file) => file.replace('.json', ''));
|
|
111
|
+
}
|
|
112
|
+
catch (_err) {
|
|
113
|
+
return [];
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
export const restoreCommand = (config) => {
|
|
117
|
+
if (!config?.getCheckpointingEnabled()) {
|
|
118
|
+
return null;
|
|
119
|
+
}
|
|
120
|
+
return {
|
|
121
|
+
name: 'restore',
|
|
122
|
+
description: 'Restore a tool call. This will reset the conversation and file history to the state it was in when the tool call was suggested',
|
|
123
|
+
kind: CommandKind.BUILT_IN,
|
|
124
|
+
action: restoreAction,
|
|
125
|
+
completion,
|
|
126
|
+
};
|
|
127
|
+
};
|
|
128
|
+
//# sourceMappingURL=restoreCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"restoreCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/restoreCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,WAAW,GACZ,MAAM,YAAY,CAAC;AAGpB,KAAK,UAAU,aAAa,CAC1B,OAAuB,EACvB,IAAY;IAEZ,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;IACjC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;IAC7C,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG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,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,MAAqB,EAAuB,EAAE;IAC3E,IAAI,CAAC,MAAM,EAAE,uBAAuB,EAAE,EAAE,CAAC;QACvC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,IAAI,EAAE,SAAS;QACf,WAAW,EACT,gIAAgI;QAClI,IAAI,EAAE,WAAW,CAAC,QAAQ;QAC1B,MAAM,EAAE,aAAa;QACrB,UAAU;KACX,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { MessageType } from '../types.js';
|
|
7
|
+
import { formatDuration } from '../utils/formatters.js';
|
|
8
|
+
import { CommandKind, } from './types.js';
|
|
9
|
+
export const statsCommand = {
|
|
10
|
+
name: 'stats',
|
|
11
|
+
altNames: ['usage'],
|
|
12
|
+
description: 'check session stats. Usage: /stats [model|tools]',
|
|
13
|
+
kind: CommandKind.BUILT_IN,
|
|
14
|
+
action: (context) => {
|
|
15
|
+
const now = new Date();
|
|
16
|
+
const { sessionStartTime } = context.session.stats;
|
|
17
|
+
if (!sessionStartTime) {
|
|
18
|
+
context.ui.addItem({
|
|
19
|
+
type: MessageType.ERROR,
|
|
20
|
+
text: 'Session start time is unavailable, cannot calculate stats.',
|
|
21
|
+
}, Date.now());
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
const wallDuration = now.getTime() - sessionStartTime.getTime();
|
|
25
|
+
const statsItem = {
|
|
26
|
+
type: MessageType.STATS,
|
|
27
|
+
duration: formatDuration(wallDuration),
|
|
28
|
+
};
|
|
29
|
+
context.ui.addItem(statsItem, Date.now());
|
|
30
|
+
},
|
|
31
|
+
subCommands: [
|
|
32
|
+
{
|
|
33
|
+
name: 'model',
|
|
34
|
+
description: 'Show model-specific usage statistics.',
|
|
35
|
+
kind: CommandKind.BUILT_IN,
|
|
36
|
+
action: (context) => {
|
|
37
|
+
context.ui.addItem({
|
|
38
|
+
type: MessageType.MODEL_STATS,
|
|
39
|
+
}, Date.now());
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
name: 'tools',
|
|
44
|
+
description: 'Show tool-specific usage statistics.',
|
|
45
|
+
kind: CommandKind.BUILT_IN,
|
|
46
|
+
action: (context) => {
|
|
47
|
+
context.ui.addItem({
|
|
48
|
+
type: MessageType.TOOL_STATS,
|
|
49
|
+
}, Date.now());
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
],
|
|
53
|
+
};
|
|
54
|
+
//# sourceMappingURL=statsCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"statsCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/statsCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAoB,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAGL,WAAW,GACZ,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,WAAW,EAAE,kDAAkD;IAC/D,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,MAAM,EAAE,CAAC,OAAuB,EAAE,EAAE;QAClC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;QACnD,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,OAAO,CAAC,EAAE,CAAC,OAAO,CAChB;gBACE,IAAI,EAAE,WAAW,CAAC,KAAK;gBACvB,IAAI,EAAE,4DAA4D;aACnE,EACD,IAAI,CAAC,GAAG,EAAE,CACX,CAAC;YACF,OAAO;QACT,CAAC;QACD,MAAM,YAAY,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAEhE,MAAM,SAAS,GAAqB;YAClC,IAAI,EAAE,WAAW,CAAC,KAAK;YACvB,QAAQ,EAAE,cAAc,CAAC,YAAY,CAAC;SACvC,CAAC;QAEF,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5C,CAAC;IACD,WAAW,EAAE;QACX;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,uCAAuC;YACpD,IAAI,EAAE,WAAW,CAAC,QAAQ;YAC1B,MAAM,EAAE,CAAC,OAAuB,EAAE,EAAE;gBAClC,OAAO,CAAC,EAAE,CAAC,OAAO,CAChB;oBACE,IAAI,EAAE,WAAW,CAAC,WAAW;iBAC9B,EACD,IAAI,CAAC,GAAG,EAAE,CACX,CAAC;YACJ,CAAC;SACF;QACD;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,sCAAsC;YACnD,IAAI,EAAE,WAAW,CAAC,QAAQ;YAC1B,MAAM,EAAE,CAAC,OAAuB,EAAE,EAAE;gBAClC,OAAO,CAAC,EAAE,CAAC,OAAO,CAChB;oBACE,IAAI,EAAE,WAAW,CAAC,UAAU;iBAC7B,EACD,IAAI,CAAC,GAAG,EAAE,CACX,CAAC;YACJ,CAAC;SACF;KACF;CACF,CAAC"}
|
|
@@ -3,9 +3,11 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import { CommandKind } from './types.js';
|
|
6
7
|
export const themeCommand = {
|
|
7
8
|
name: 'theme',
|
|
8
9
|
description: 'change the theme',
|
|
10
|
+
kind: CommandKind.BUILT_IN,
|
|
9
11
|
action: (_context, _args) => ({
|
|
10
12
|
type: 'dialog',
|
|
11
13
|
dialog: 'theme',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"themeCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/themeCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"themeCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/themeCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAwC,MAAM,YAAY,CAAC;AAE/E,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,kBAAkB;IAC/B,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,EAA0B,EAAE,CAAC,CAAC;QACpD,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,OAAO;KAChB,CAAC;CACH,CAAC"}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CommandKind, } from './types.js';
|
|
7
|
+
import { MessageType } from '../types.js';
|
|
8
|
+
export const toolsCommand = {
|
|
9
|
+
name: 'tools',
|
|
10
|
+
description: 'list available Gemini CLI tools',
|
|
11
|
+
kind: CommandKind.BUILT_IN,
|
|
12
|
+
action: async (context, args) => {
|
|
13
|
+
const subCommand = args?.trim();
|
|
14
|
+
// Default to NOT showing descriptions. The user must opt in with an argument.
|
|
15
|
+
let useShowDescriptions = false;
|
|
16
|
+
if (subCommand === 'desc' || subCommand === 'descriptions') {
|
|
17
|
+
useShowDescriptions = true;
|
|
18
|
+
}
|
|
19
|
+
const toolRegistry = await context.services.config?.getToolRegistry();
|
|
20
|
+
if (!toolRegistry) {
|
|
21
|
+
context.ui.addItem({
|
|
22
|
+
type: MessageType.ERROR,
|
|
23
|
+
text: 'Could not retrieve tool registry.',
|
|
24
|
+
}, Date.now());
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
const tools = toolRegistry.getAllTools();
|
|
28
|
+
// Filter out MCP tools by checking for the absence of a serverName property
|
|
29
|
+
const geminiTools = tools.filter((tool) => !('serverName' in tool));
|
|
30
|
+
let message = 'Available Gemini CLI tools:\n\n';
|
|
31
|
+
if (geminiTools.length > 0) {
|
|
32
|
+
geminiTools.forEach((tool) => {
|
|
33
|
+
if (useShowDescriptions && tool.description) {
|
|
34
|
+
message += ` - \u001b[36m${tool.displayName} (${tool.name})\u001b[0m:\n`;
|
|
35
|
+
const greenColor = '\u001b[32m';
|
|
36
|
+
const resetColor = '\u001b[0m';
|
|
37
|
+
// Handle multi-line descriptions
|
|
38
|
+
const descLines = tool.description.trim().split('\n');
|
|
39
|
+
for (const descLine of descLines) {
|
|
40
|
+
message += ` ${greenColor}${descLine}${resetColor}\n`;
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
message += ` - \u001b[36m${tool.displayName}\u001b[0m\n`;
|
|
45
|
+
}
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
message += ' No tools available\n';
|
|
50
|
+
}
|
|
51
|
+
message += '\n';
|
|
52
|
+
message += '\u001b[0m';
|
|
53
|
+
context.ui.addItem({ type: MessageType.INFO, text: message }, Date.now());
|
|
54
|
+
},
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=toolsCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toolsCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/toolsCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,CAAC,MAAM,YAAY,GAAiB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;oBAE/B,iCAAiC;oBACjC,MAAM,SAAS,GAAG,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;oBACtD,KAAK,MAAM,QAAQ,IAAI,SAAS,EAAE,CAAC;wBACjC,OAAO,IAAI,SAAS,UAAU,GAAG,QAAQ,GAAG,UAAU,IAAI,CAAC;oBAC7D,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,OAAO,IAAI,iBAAiB,IAAI,CAAC,WAAW,aAAa,CAAC;gBAC5D,CAAC;YACH,CAAC,CAAC,CAAC;QACL,CAAC;aAAM,CAAC;YACN,OAAO,IAAI,wBAAwB,CAAC;QACtC,CAAC;QACD,OAAO,IAAI,IAAI,CAAC;QAEhB,OAAO,IAAI,WAAW,CAAC;QAEvB,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5E,CAAC;CACF,CAAC"}
|
|
@@ -3,11 +3,22 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
+
import { Content } from '@google/genai';
|
|
7
|
+
import { HistoryItemWithoutId } from '../types.js';
|
|
6
8
|
import { Config, GitService, Logger } from '@google/gemini-cli-core';
|
|
7
9
|
import { LoadedSettings } from '../../config/settings.js';
|
|
8
10
|
import { UseHistoryManagerReturn } from '../hooks/useHistoryManager.js';
|
|
11
|
+
import type { HistoryItem } from '../types.js';
|
|
9
12
|
import { SessionStatsState } from '../contexts/SessionContext.js';
|
|
10
13
|
export interface CommandContext {
|
|
14
|
+
invocation?: {
|
|
15
|
+
/** The raw, untrimmed input string from the user. */
|
|
16
|
+
raw: string;
|
|
17
|
+
/** The primary name of the command that was matched. */
|
|
18
|
+
name: string;
|
|
19
|
+
/** The arguments string that follows the command name. */
|
|
20
|
+
args: string;
|
|
21
|
+
};
|
|
11
22
|
services: {
|
|
12
23
|
config: Config | null;
|
|
13
24
|
settings: LoadedSettings;
|
|
@@ -23,6 +34,24 @@ export interface CommandContext {
|
|
|
23
34
|
* Sets the transient debug message displayed in the application footer in debug mode.
|
|
24
35
|
*/
|
|
25
36
|
setDebugMessage: (message: string) => void;
|
|
37
|
+
/** The currently pending history item, if any. */
|
|
38
|
+
pendingItem: HistoryItemWithoutId | null;
|
|
39
|
+
/**
|
|
40
|
+
* Sets a pending item in the history, which is useful for indicating
|
|
41
|
+
* that a long-running operation is in progress.
|
|
42
|
+
*
|
|
43
|
+
* @param item The history item to display as pending, or `null` to clear.
|
|
44
|
+
*/
|
|
45
|
+
setPendingItem: (item: HistoryItemWithoutId | null) => void;
|
|
46
|
+
/**
|
|
47
|
+
* Loads a new set of history items, replacing the current history.
|
|
48
|
+
*
|
|
49
|
+
* @param history The array of history items to load.
|
|
50
|
+
*/
|
|
51
|
+
loadHistory: UseHistoryManagerReturn['loadHistory'];
|
|
52
|
+
/** Toggles a special display mode. */
|
|
53
|
+
toggleCorgiMode: () => void;
|
|
54
|
+
toggleVimEnabled: () => Promise<boolean>;
|
|
26
55
|
};
|
|
27
56
|
session: {
|
|
28
57
|
stats: SessionStatsState;
|
|
@@ -36,6 +65,11 @@ export interface ToolActionReturn {
|
|
|
36
65
|
toolName: string;
|
|
37
66
|
toolArgs: Record<string, unknown>;
|
|
38
67
|
}
|
|
68
|
+
/** The return type for a command action that results in the app quitting. */
|
|
69
|
+
export interface QuitActionReturn {
|
|
70
|
+
type: 'quit';
|
|
71
|
+
messages: HistoryItem[];
|
|
72
|
+
}
|
|
39
73
|
/**
|
|
40
74
|
* The return type for a command action that results in a simple message
|
|
41
75
|
* being displayed to the user.
|
|
@@ -50,13 +84,36 @@ export interface MessageActionReturn {
|
|
|
50
84
|
*/
|
|
51
85
|
export interface OpenDialogActionReturn {
|
|
52
86
|
type: 'dialog';
|
|
53
|
-
dialog: 'help' | 'theme';
|
|
87
|
+
dialog: 'help' | 'auth' | 'theme' | 'editor' | 'privacy';
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* The return type for a command action that results in replacing
|
|
91
|
+
* the entire conversation history.
|
|
92
|
+
*/
|
|
93
|
+
export interface LoadHistoryActionReturn {
|
|
94
|
+
type: 'load_history';
|
|
95
|
+
history: HistoryItemWithoutId[];
|
|
96
|
+
clientHistory: Content[];
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* The return type for a command action that should immediately submit
|
|
100
|
+
* content as a prompt to the Gemini model.
|
|
101
|
+
*/
|
|
102
|
+
export interface SubmitPromptActionReturn {
|
|
103
|
+
type: 'submit_prompt';
|
|
104
|
+
content: string;
|
|
105
|
+
}
|
|
106
|
+
export type SlashCommandActionReturn = ToolActionReturn | MessageActionReturn | QuitActionReturn | OpenDialogActionReturn | LoadHistoryActionReturn | SubmitPromptActionReturn;
|
|
107
|
+
export declare enum CommandKind {
|
|
108
|
+
BUILT_IN = "built-in",
|
|
109
|
+
FILE = "file",
|
|
110
|
+
MCP_PROMPT = "mcp-prompt"
|
|
54
111
|
}
|
|
55
|
-
export type SlashCommandActionReturn = ToolActionReturn | MessageActionReturn | OpenDialogActionReturn;
|
|
56
112
|
export interface SlashCommand {
|
|
57
113
|
name: string;
|
|
58
|
-
|
|
59
|
-
description
|
|
114
|
+
altNames?: string[];
|
|
115
|
+
description: string;
|
|
116
|
+
kind: CommandKind;
|
|
60
117
|
action?: (context: CommandContext, args: string) => void | SlashCommandActionReturn | Promise<void | SlashCommandActionReturn>;
|
|
61
118
|
completion?: (context: CommandContext, partialArg: string) => Promise<string[]>;
|
|
62
119
|
subCommands?: SlashCommand[];
|
|
@@ -3,5 +3,10 @@
|
|
|
3
3
|
* Copyright 2025 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export var CommandKind;
|
|
7
|
+
(function (CommandKind) {
|
|
8
|
+
CommandKind["BUILT_IN"] = "built-in";
|
|
9
|
+
CommandKind["FILE"] = "file";
|
|
10
|
+
CommandKind["MCP_PROMPT"] = "mcp-prompt";
|
|
11
|
+
})(CommandKind || (CommandKind = {}));
|
|
7
12
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/commands/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/commands/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA4HH,MAAM,CAAN,IAAY,WAIX;AAJD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;IACb,wCAAyB,CAAA;AAC3B,CAAC,EAJW,WAAW,KAAX,WAAW,QAItB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
import { CommandKind } from './types.js';
|
|
7
|
+
export const vimCommand = {
|
|
8
|
+
name: 'vim',
|
|
9
|
+
description: 'toggle vim mode on/off',
|
|
10
|
+
kind: CommandKind.BUILT_IN,
|
|
11
|
+
action: async (context, _args) => {
|
|
12
|
+
const newVimState = await context.ui.toggleVimEnabled();
|
|
13
|
+
const message = newVimState
|
|
14
|
+
? 'Entered Vim mode. Run /vim again to exit.'
|
|
15
|
+
: 'Exited Vim mode.';
|
|
16
|
+
return {
|
|
17
|
+
type: 'message',
|
|
18
|
+
messageType: 'info',
|
|
19
|
+
content: message,
|
|
20
|
+
};
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=vimCommand.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vimCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/vimCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAgB,MAAM,YAAY,CAAC;AAEvD,MAAM,CAAC,MAAM,UAAU,GAAiB;IACtC,IAAI,EAAE,KAAK;IACX,WAAW,EAAE,wBAAwB;IACrC,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE;QAC/B,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,EAAE,CAAC,gBAAgB,EAAE,CAAC;QAExD,MAAM,OAAO,GAAG,WAAW;YACzB,CAAC,CAAC,2CAA2C;YAC7C,CAAC,CAAC,kBAAkB,CAAC;QACvB,OAAO;YACL,IAAI,EAAE,SAAS;YACf,WAAW,EAAE,MAAM;YACnB,OAAO,EAAE,OAAO;SACjB,CAAC;IACJ,CAAC;CACF,CAAC"}
|
|
@@ -4,12 +4,17 @@
|
|
|
4
4
|
* SPDX-License-Identifier: Apache-2.0
|
|
5
5
|
*/
|
|
6
6
|
import React from 'react';
|
|
7
|
-
import { type MCPServerConfig } from '@google/gemini-cli-core';
|
|
7
|
+
import { type OpenFiles, type MCPServerConfig } from '@google/gemini-cli-core';
|
|
8
8
|
interface ContextSummaryDisplayProps {
|
|
9
9
|
geminiMdFileCount: number;
|
|
10
10
|
contextFileNames: string[];
|
|
11
11
|
mcpServers?: Record<string, MCPServerConfig>;
|
|
12
|
+
blockedMcpServers?: Array<{
|
|
13
|
+
name: string;
|
|
14
|
+
extensionName: string;
|
|
15
|
+
}>;
|
|
12
16
|
showToolDescriptions?: boolean;
|
|
17
|
+
openFiles?: OpenFiles;
|
|
13
18
|
}
|
|
14
19
|
export declare const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps>;
|
|
15
20
|
export {};
|
|
@@ -1,11 +1,22 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { Text } from 'ink';
|
|
3
3
|
import { Colors } from '../colors.js';
|
|
4
|
-
export const ContextSummaryDisplay = ({ geminiMdFileCount, contextFileNames, mcpServers, showToolDescriptions, }) => {
|
|
4
|
+
export const ContextSummaryDisplay = ({ geminiMdFileCount, contextFileNames, mcpServers, blockedMcpServers, showToolDescriptions, openFiles, }) => {
|
|
5
5
|
const mcpServerCount = Object.keys(mcpServers || {}).length;
|
|
6
|
-
|
|
6
|
+
const blockedMcpServerCount = blockedMcpServers?.length || 0;
|
|
7
|
+
if (geminiMdFileCount === 0 &&
|
|
8
|
+
mcpServerCount === 0 &&
|
|
9
|
+
blockedMcpServerCount === 0 &&
|
|
10
|
+
(openFiles?.recentOpenFiles?.length ?? 0) === 0) {
|
|
7
11
|
return _jsx(Text, { children: " " }); // Render an empty space to reserve height
|
|
8
12
|
}
|
|
13
|
+
const recentFilesText = (() => {
|
|
14
|
+
const count = openFiles?.recentOpenFiles?.length ?? 0;
|
|
15
|
+
if (count === 0) {
|
|
16
|
+
return '';
|
|
17
|
+
}
|
|
18
|
+
return `${count} recent file${count > 1 ? 's' : ''} (ctrl+e to view)`;
|
|
19
|
+
})();
|
|
9
20
|
const geminiMdText = (() => {
|
|
10
21
|
if (geminiMdFileCount === 0) {
|
|
11
22
|
return '';
|
|
@@ -14,26 +25,42 @@ export const ContextSummaryDisplay = ({ geminiMdFileCount, contextFileNames, mcp
|
|
|
14
25
|
const name = allNamesTheSame ? contextFileNames[0] : 'context';
|
|
15
26
|
return `${geminiMdFileCount} ${name} file${geminiMdFileCount > 1 ? 's' : ''}`;
|
|
16
27
|
})();
|
|
17
|
-
const mcpText =
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
const mcpText = (() => {
|
|
29
|
+
if (mcpServerCount === 0 && blockedMcpServerCount === 0) {
|
|
30
|
+
return '';
|
|
31
|
+
}
|
|
32
|
+
const parts = [];
|
|
33
|
+
if (mcpServerCount > 0) {
|
|
34
|
+
parts.push(`${mcpServerCount} MCP server${mcpServerCount > 1 ? 's' : ''}`);
|
|
35
|
+
}
|
|
36
|
+
if (blockedMcpServerCount > 0) {
|
|
37
|
+
let blockedText = `${blockedMcpServerCount} Blocked`;
|
|
38
|
+
if (mcpServerCount === 0) {
|
|
39
|
+
blockedText += ` MCP server${blockedMcpServerCount > 1 ? 's' : ''}`;
|
|
40
|
+
}
|
|
41
|
+
parts.push(blockedText);
|
|
42
|
+
}
|
|
43
|
+
return parts.join(', ');
|
|
44
|
+
})();
|
|
45
|
+
let summaryText = 'Using: ';
|
|
46
|
+
const summaryParts = [];
|
|
47
|
+
if (recentFilesText) {
|
|
48
|
+
summaryParts.push(recentFilesText);
|
|
23
49
|
}
|
|
24
|
-
if (geminiMdText
|
|
25
|
-
|
|
50
|
+
if (geminiMdText) {
|
|
51
|
+
summaryParts.push(geminiMdText);
|
|
26
52
|
}
|
|
27
53
|
if (mcpText) {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
54
|
+
summaryParts.push(mcpText);
|
|
55
|
+
}
|
|
56
|
+
summaryText += summaryParts.join(' | ');
|
|
57
|
+
// Add ctrl+t hint when MCP servers are available
|
|
58
|
+
if (mcpServers && Object.keys(mcpServers).length > 0) {
|
|
59
|
+
if (showToolDescriptions) {
|
|
60
|
+
summaryText += ' (ctrl+t to toggle)';
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
summaryText += ' (ctrl+t to view)';
|
|
37
64
|
}
|
|
38
65
|
}
|
|
39
66
|
return _jsx(Text, { color: Colors.Gray, children: summaryText });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContextSummaryDisplay.js","sourceRoot":"","sources":["../../../../src/ui/components/ContextSummaryDisplay.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OA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