@google/gemini-cli 0.1.15 → 0.1.16-nightly.250804.a8984a9b

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.
Files changed (129) hide show
  1. package/README.md +32 -0
  2. package/dist/google-gemini-cli-0.1.16.tgz +0 -0
  3. package/dist/package.json +2 -2
  4. package/dist/src/config/config.d.ts +4 -2
  5. package/dist/src/config/config.js +36 -14
  6. package/dist/src/config/config.js.map +1 -1
  7. package/dist/src/config/extension.d.ts +1 -0
  8. package/dist/src/config/extension.js +4 -0
  9. package/dist/src/config/extension.js.map +1 -1
  10. package/dist/src/config/settings.d.ts +11 -1
  11. package/dist/src/config/settings.js +84 -23
  12. package/dist/src/config/settings.js.map +1 -1
  13. package/dist/src/gemini.d.ts +2 -0
  14. package/dist/src/gemini.js +30 -3
  15. package/dist/src/gemini.js.map +1 -1
  16. package/dist/src/generated/git-commit.d.ts +1 -1
  17. package/dist/src/generated/git-commit.js +1 -1
  18. package/dist/src/nonInteractiveCli.js +15 -40
  19. package/dist/src/nonInteractiveCli.js.map +1 -1
  20. package/dist/src/services/BuiltinCommandLoader.js +8 -1
  21. package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
  22. package/dist/src/services/CommandService.d.ts +8 -4
  23. package/dist/src/services/CommandService.js +24 -8
  24. package/dist/src/services/CommandService.js.map +1 -1
  25. package/dist/src/services/FileCommandLoader.d.ts +15 -3
  26. package/dist/src/services/FileCommandLoader.js +64 -35
  27. package/dist/src/services/FileCommandLoader.js.map +1 -1
  28. package/dist/src/ui/App.js +29 -16
  29. package/dist/src/ui/App.js.map +1 -1
  30. package/dist/src/ui/commands/chatCommand.js +39 -1
  31. package/dist/src/ui/commands/chatCommand.js.map +1 -1
  32. package/dist/src/ui/commands/directoryCommand.d.ts +8 -0
  33. package/dist/src/ui/commands/directoryCommand.js +116 -0
  34. package/dist/src/ui/commands/directoryCommand.js.map +1 -0
  35. package/dist/src/ui/commands/ideCommand.js +101 -105
  36. package/dist/src/ui/commands/ideCommand.js.map +1 -1
  37. package/dist/src/ui/commands/initCommand.d.ts +7 -0
  38. package/dist/src/ui/commands/initCommand.js +76 -0
  39. package/dist/src/ui/commands/initCommand.js.map +1 -0
  40. package/dist/src/ui/commands/memoryCommand.js +2 -1
  41. package/dist/src/ui/commands/memoryCommand.js.map +1 -1
  42. package/dist/src/ui/commands/setupGithubCommand.d.ts +7 -0
  43. package/dist/src/ui/commands/setupGithubCommand.js +49 -0
  44. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -0
  45. package/dist/src/ui/commands/types.d.ts +1 -0
  46. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +2 -2
  47. package/dist/src/ui/components/ContextSummaryDisplay.js +8 -8
  48. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
  49. package/dist/src/ui/components/DebugProfiler.d.ts +6 -0
  50. package/dist/src/ui/components/DebugProfiler.js +26 -0
  51. package/dist/src/ui/components/DebugProfiler.js.map +1 -0
  52. package/dist/src/ui/components/Footer.js +3 -2
  53. package/dist/src/ui/components/Footer.js.map +1 -1
  54. package/dist/src/ui/components/Help.js +2 -2
  55. package/dist/src/ui/components/Help.js.map +1 -1
  56. package/dist/src/ui/components/IDEContextDetailDisplay.d.ts +4 -3
  57. package/dist/src/ui/components/IDEContextDetailDisplay.js +6 -13
  58. package/dist/src/ui/components/IDEContextDetailDisplay.js.map +1 -1
  59. package/dist/src/ui/components/InputPrompt.js +83 -7
  60. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  61. package/dist/src/ui/components/PrepareLabel.d.ts +15 -0
  62. package/dist/src/ui/components/PrepareLabel.js +16 -0
  63. package/dist/src/ui/components/PrepareLabel.js.map +1 -0
  64. package/dist/src/ui/components/SuggestionsDisplay.d.ts +1 -0
  65. package/dist/src/ui/components/SuggestionsDisplay.js +3 -3
  66. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
  67. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +15 -4
  68. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  69. package/dist/src/ui/components/messages/UserMessage.js +4 -1
  70. package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
  71. package/dist/src/ui/components/shared/text-buffer.js +9 -14
  72. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  73. package/dist/src/ui/editors/editorSettingsManager.js +6 -13
  74. package/dist/src/ui/editors/editorSettingsManager.js.map +1 -1
  75. package/dist/src/ui/hooks/atCommandProcessor.js +56 -48
  76. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
  77. package/dist/src/ui/hooks/slashCommandProcessor.js +12 -2
  78. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  79. package/dist/src/ui/hooks/useCompletion.d.ts +5 -5
  80. package/dist/src/ui/hooks/useCompletion.js +7 -407
  81. package/dist/src/ui/hooks/useCompletion.js.map +1 -1
  82. package/dist/src/ui/hooks/useGeminiStream.js +5 -2
  83. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  84. package/dist/src/ui/hooks/usePhraseCycler.js +1 -0
  85. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  86. package/dist/src/ui/hooks/useReactToolScheduler.js +0 -1
  87. package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
  88. package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +19 -0
  89. package/dist/src/ui/hooks/useReverseSearchCompletion.js +54 -0
  90. package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +1 -0
  91. package/dist/src/ui/hooks/useShellHistory.d.ts +1 -0
  92. package/dist/src/ui/hooks/useShellHistory.js +30 -7
  93. package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
  94. package/dist/src/ui/hooks/useSlashCompletion.d.ts +24 -0
  95. package/dist/src/ui/hooks/useSlashCompletion.js +451 -0
  96. package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -0
  97. package/dist/src/ui/utils/updateCheck.d.ts +7 -1
  98. package/dist/src/ui/utils/updateCheck.js +46 -8
  99. package/dist/src/ui/utils/updateCheck.js.map +1 -1
  100. package/dist/src/utils/gitUtils.d.ts +10 -0
  101. package/dist/src/utils/gitUtils.js +24 -0
  102. package/dist/src/utils/gitUtils.js.map +1 -0
  103. package/dist/src/utils/handleAutoUpdate.d.ts +11 -0
  104. package/dist/src/utils/handleAutoUpdate.js +101 -0
  105. package/dist/src/utils/handleAutoUpdate.js.map +1 -0
  106. package/dist/src/utils/installationInfo.d.ts +23 -0
  107. package/dist/src/utils/installationInfo.js +154 -0
  108. package/dist/src/utils/installationInfo.js.map +1 -0
  109. package/dist/src/utils/sandbox-macos-permissive-closed.sb +6 -0
  110. package/dist/src/utils/sandbox-macos-permissive-open.sb +6 -0
  111. package/dist/src/utils/sandbox-macos-permissive-proxied.sb +6 -0
  112. package/dist/src/utils/sandbox-macos-restrictive-closed.sb +6 -0
  113. package/dist/src/utils/sandbox-macos-restrictive-open.sb +6 -0
  114. package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +6 -0
  115. package/dist/src/utils/sandbox.d.ts +2 -2
  116. package/dist/src/utils/sandbox.js +35 -11
  117. package/dist/src/utils/sandbox.js.map +1 -1
  118. package/dist/src/utils/spawnWrapper.d.ts +7 -0
  119. package/dist/src/utils/spawnWrapper.js +8 -0
  120. package/dist/src/utils/spawnWrapper.js.map +1 -0
  121. package/dist/src/utils/updateEventEmitter.d.ts +11 -0
  122. package/dist/src/utils/updateEventEmitter.js +12 -0
  123. package/dist/src/utils/updateEventEmitter.js.map +1 -0
  124. package/dist/src/validateNonInterActiveAuth.d.ts +1 -1
  125. package/dist/src/validateNonInterActiveAuth.js +7 -5
  126. package/dist/src/validateNonInterActiveAuth.js.map +1 -1
  127. package/dist/tsconfig.tsbuildinfo +1 -1
  128. package/package.json +3 -3
  129. package/dist/google-gemini-cli-0.1.13.tgz +0 -0
@@ -3,119 +3,115 @@
3
3
  * Copyright 2025 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { fileURLToPath } from 'url';
7
- import { IDEConnectionStatus } from '@google/gemini-cli-core';
6
+ import { IDEConnectionStatus, getIdeDisplayName, getIdeInstaller, } from '@google/gemini-cli-core';
8
7
  import { CommandKind, } from './types.js';
9
- import * as child_process from 'child_process';
10
- import * as process from 'process';
11
- import { glob } from 'glob';
12
- import * as path from 'path';
13
- const VSCODE_COMMAND = process.platform === 'win32' ? 'code.cmd' : 'code';
14
- const VSCODE_COMPANION_EXTENSION_FOLDER = 'vscode-ide-companion';
15
- function isVSCodeInstalled() {
16
- try {
17
- child_process.execSync(process.platform === 'win32'
18
- ? `where.exe ${VSCODE_COMMAND}`
19
- : `command -v ${VSCODE_COMMAND}`, { stdio: 'ignore' });
20
- return true;
21
- }
22
- catch {
23
- return false;
24
- }
25
- }
8
+ import { SettingScope } from '../../config/settings.js';
26
9
  export const ideCommand = (config) => {
27
- if (!config?.getIdeMode()) {
10
+ if (!config?.getIdeModeFeature()) {
28
11
  return null;
29
12
  }
30
- return {
13
+ const currentIDE = config.getIdeClient().getCurrentIde();
14
+ if (!currentIDE) {
15
+ return null;
16
+ }
17
+ const ideSlashCommand = {
31
18
  name: 'ide',
32
19
  description: 'manage IDE integration',
33
20
  kind: CommandKind.BUILT_IN,
34
- subCommands: [
35
- {
36
- name: 'status',
37
- description: 'check status of IDE integration',
38
- kind: CommandKind.BUILT_IN,
39
- action: (_context) => {
40
- const connection = config.getIdeClient()?.getConnectionStatus();
41
- switch (connection?.status) {
42
- case IDEConnectionStatus.Connected:
43
- return {
44
- type: 'message',
45
- messageType: 'info',
46
- content: `🟢 Connected`,
47
- };
48
- case IDEConnectionStatus.Connecting:
49
- return {
50
- type: 'message',
51
- messageType: 'info',
52
- content: `🟡 Connecting...`,
53
- };
54
- default: {
55
- let content = `🔴 Disconnected`;
56
- if (connection?.details) {
57
- content += `: ${connection.details}`;
58
- }
59
- return {
60
- type: 'message',
61
- messageType: 'error',
62
- content,
63
- };
64
- }
65
- }
66
- },
67
- },
68
- {
69
- name: 'install',
70
- description: 'install required VS Code companion extension',
71
- kind: CommandKind.BUILT_IN,
72
- action: async (context) => {
73
- if (!isVSCodeInstalled()) {
74
- context.ui.addItem({
75
- type: 'error',
76
- text: `VS Code command-line tool "${VSCODE_COMMAND}" not found in your PATH.`,
77
- }, Date.now());
78
- return;
79
- }
80
- const bundleDir = path.dirname(fileURLToPath(import.meta.url));
81
- // The VSIX file is copied to the bundle directory as part of the build.
82
- let vsixFiles = glob.sync(path.join(bundleDir, '*.vsix'));
83
- if (vsixFiles.length === 0) {
84
- // If the VSIX file is not in the bundle, it might be a dev
85
- // environment running with `npm start`. Look for it in the original
86
- // package location, relative to the bundle dir.
87
- const devPath = path.join(bundleDir, '..', '..', '..', '..', '..', VSCODE_COMPANION_EXTENSION_FOLDER, '*.vsix');
88
- vsixFiles = glob.sync(devPath);
89
- }
90
- if (vsixFiles.length === 0) {
91
- context.ui.addItem({
92
- type: 'error',
93
- text: 'Could not find the required VS Code companion extension. Please file a bug via /bug.',
94
- }, Date.now());
95
- return;
96
- }
97
- const vsixPath = vsixFiles[0];
98
- const command = `${VSCODE_COMMAND} --install-extension ${vsixPath} --force`;
99
- context.ui.addItem({
100
- type: 'info',
101
- text: `Installing VS Code companion extension...`,
102
- }, Date.now());
103
- try {
104
- child_process.execSync(command, { stdio: 'pipe' });
105
- context.ui.addItem({
106
- type: 'info',
107
- text: 'VS Code companion extension installed successfully. Restart gemini-cli in a fresh terminal window.',
108
- }, Date.now());
109
- }
110
- catch (_error) {
111
- context.ui.addItem({
112
- type: 'error',
113
- text: `Failed to install VS Code companion extension.`,
114
- }, Date.now());
21
+ subCommands: [],
22
+ };
23
+ const statusCommand = {
24
+ name: 'status',
25
+ description: 'check status of IDE integration',
26
+ kind: CommandKind.BUILT_IN,
27
+ action: (_context) => {
28
+ const connection = config.getIdeClient().getConnectionStatus();
29
+ switch (connection?.status) {
30
+ case IDEConnectionStatus.Connected:
31
+ return {
32
+ type: 'message',
33
+ messageType: 'info',
34
+ content: `🟢 Connected`,
35
+ };
36
+ case IDEConnectionStatus.Connecting:
37
+ return {
38
+ type: 'message',
39
+ messageType: 'info',
40
+ content: `🟡 Connecting...`,
41
+ };
42
+ default: {
43
+ let content = `🔴 Disconnected`;
44
+ if (connection?.details) {
45
+ content += `: ${connection.details}`;
115
46
  }
116
- },
117
- },
118
- ],
47
+ return {
48
+ type: 'message',
49
+ messageType: 'error',
50
+ content,
51
+ };
52
+ }
53
+ }
54
+ },
55
+ };
56
+ const installCommand = {
57
+ name: 'install',
58
+ description: `install required IDE companion ${getIdeDisplayName(currentIDE)} extension `,
59
+ kind: CommandKind.BUILT_IN,
60
+ action: async (context) => {
61
+ const installer = getIdeInstaller(currentIDE);
62
+ if (!installer) {
63
+ context.ui.addItem({
64
+ type: 'error',
65
+ text: 'No installer available for your configured IDE.',
66
+ }, Date.now());
67
+ return;
68
+ }
69
+ context.ui.addItem({
70
+ type: 'info',
71
+ text: `Installing IDE companion extension...`,
72
+ }, Date.now());
73
+ const result = await installer.install();
74
+ context.ui.addItem({
75
+ type: result.success ? 'info' : 'error',
76
+ text: result.message,
77
+ }, Date.now());
78
+ },
79
+ };
80
+ const enableCommand = {
81
+ name: 'enable',
82
+ description: 'enable IDE integration',
83
+ kind: CommandKind.BUILT_IN,
84
+ action: async (context) => {
85
+ context.services.settings.setValue(SettingScope.User, 'ideMode', true);
86
+ config.setIdeMode(true);
87
+ config.setIdeClientConnected();
88
+ },
119
89
  };
90
+ const disableCommand = {
91
+ name: 'disable',
92
+ description: 'disable IDE integration',
93
+ kind: CommandKind.BUILT_IN,
94
+ action: async (context) => {
95
+ context.services.settings.setValue(SettingScope.User, 'ideMode', false);
96
+ config.setIdeMode(false);
97
+ config.setIdeClientDisconnected();
98
+ },
99
+ };
100
+ const ideModeEnabled = config.getIdeMode();
101
+ if (ideModeEnabled) {
102
+ ideSlashCommand.subCommands = [
103
+ disableCommand,
104
+ statusCommand,
105
+ installCommand,
106
+ ];
107
+ }
108
+ else {
109
+ ideSlashCommand.subCommands = [
110
+ enableCommand,
111
+ statusCommand,
112
+ installCommand,
113
+ ];
114
+ }
115
+ return ideSlashCommand;
120
116
  };
121
117
  //# sourceMappingURL=ideCommand.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ideCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/ideCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAU,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACtE,OAAO,EAIL,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,aAAa,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,OAAO,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,MAAM,cAAc,GAAG,OAAO,CAAC,QAAQ,KAAK,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC;AAC1E,MAAM,iCAAiC,GAAG,sBAAsB,CAAC;AAEjE,SAAS,iBAAiB;IACxB,IAAI,CAAC;QACH,aAAa,CAAC,QAAQ,CACpB,OAAO,CAAC,QAAQ,KAAK,OAAO;YAC1B,CAAC,CAAC,aAAa,cAAc,EAAE;YAC/B,CAAC,CAAC,cAAc,cAAc,EAAE,EAClC,EAAE,KAAK,EAAE,QAAQ,EAAE,CACpB,CAAC;QACF,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,MAAqB,EAAuB,EAAE;IACvE,IAAI,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC;QAC1B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,I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c,EAAE,CAAC;QACnB,eAAe,CAAC,WAAW,GAAG;YAC5B,cAAc;YACd,aAAa;YACb,cAAc;SACf,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,eAAe,CAAC,WAAW,GAAG;YAC5B,aAAa;YACb,aAAa;YACb,cAAc;SACf,CAAC;IACJ,CAAC;IAED,OAAO,eAAe,CAAC;AACzB,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { SlashCommand } from './types.js';
7
+ export declare const initCommand: SlashCommand;
@@ -0,0 +1,76 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import * as fs from 'fs';
7
+ import * as path from 'path';
8
+ import { CommandKind, } from './types.js';
9
+ export const initCommand = {
10
+ name: 'init',
11
+ description: 'Analyzes the project and creates a tailored GEMINI.md file.',
12
+ kind: CommandKind.BUILT_IN,
13
+ action: async (context, _args) => {
14
+ if (!context.services.config) {
15
+ return {
16
+ type: 'message',
17
+ messageType: 'error',
18
+ content: 'Configuration not available.',
19
+ };
20
+ }
21
+ const targetDir = context.services.config.getTargetDir();
22
+ const geminiMdPath = path.join(targetDir, 'GEMINI.md');
23
+ if (fs.existsSync(geminiMdPath)) {
24
+ return {
25
+ type: 'message',
26
+ messageType: 'info',
27
+ content: 'A GEMINI.md file already exists in this directory. No changes were made.',
28
+ };
29
+ }
30
+ // Create an empty GEMINI.md file
31
+ fs.writeFileSync(geminiMdPath, '', 'utf8');
32
+ context.ui.addItem({
33
+ type: 'info',
34
+ text: 'Empty GEMINI.md created. Now analyzing the project to populate it.',
35
+ }, Date.now());
36
+ return {
37
+ type: 'submit_prompt',
38
+ content: `
39
+ You are an AI agent that brings the power of Gemini directly into the terminal. Your task is to analyze the current directory and generate a comprehensive GEMINI.md file to be used as instructional context for future interactions.
40
+
41
+ **Analysis Process:**
42
+
43
+ 1. **Initial Exploration:**
44
+ * Start by listing the files and directories to get a high-level overview of the structure.
45
+ * Read the README file (e.g., \`README.md\`, \`README.txt\`) if it exists. This is often the best place to start.
46
+
47
+ 2. **Iterative Deep Dive (up to 10 files):**
48
+ * Based on your initial findings, select a few files that seem most important (e.g., configuration files, main source files, documentation).
49
+ * Read them. As you learn more, refine your understanding and decide which files to read next. You don't need to decide all 10 files at once. Let your discoveries guide your exploration.
50
+
51
+ 3. **Identify Project Type:**
52
+ * **Code Project:** Look for clues like \`package.json\`, \`requirements.txt\`, \`pom.xml\`, \`go.mod\`, \`Cargo.toml\`, \`build.gradle\`, or a \`src\` directory. If you find them, this is likely a software project.
53
+ * **Non-Code Project:** If you don't find code-related files, this might be a directory for documentation, research papers, notes, or something else.
54
+
55
+ **GEMINI.md Content Generation:**
56
+
57
+ **For a Code Project:**
58
+
59
+ * **Project Overview:** Write a clear and concise summary of the project's purpose, main technologies, and architecture.
60
+ * **Building and Running:** Document the key commands for building, running, and testing the project. Infer these from the files you've read (e.g., \`scripts\` in \`package.json\`, \`Makefile\`, etc.). If you can't find explicit commands, provide a placeholder with a TODO.
61
+ * **Development Conventions:** Describe any coding styles, testing practices, or contribution guidelines you can infer from the codebase.
62
+
63
+ **For a Non-Code Project:**
64
+
65
+ * **Directory Overview:** Describe the purpose and contents of the directory. What is it for? What kind of information does it hold?
66
+ * **Key Files:** List the most important files and briefly explain what they contain.
67
+ * **Usage:** Explain how the contents of this directory are intended to be used.
68
+
69
+ **Final Output:**
70
+
71
+ Write the complete content to the \`GEMINI.md\` file. The output must be well-formatted Markdown.
72
+ `,
73
+ };
74
+ },
75
+ };
76
+ //# sourceMappingURL=initCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"initCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/initCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AACzB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAIL,WAAW,GACZ,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,WAAW,GAAiB;IACvC,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,6DAA6D;IAC1E,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,MAAM,EAAE,KAAK,EACX,OAAuB,EACvB,KAAa,EACsB,EAAE;QACrC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,CAAC;YAC7B,OAAO;gBACL,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,OAAO;gBACpB,OAAO,EAAE,8BAA8B;aACxC,CAAC;QACJ,CAAC;QACD,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,EAAE,CAAC;QACzD,MAAM,YAAY,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,WAAW,CAAC,CAAC;QAEvD,IAAI,EAAE,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YAChC,OAAO;gBACL,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,MAAM;gBACnB,OAAO,EACL,0EAA0E;aAC7E,CAAC;QACJ,CAAC;QAED,iCAAiC;QACjC,EAAE,CAAC,aAAa,CAAC,YAAY,EAAE,EAAE,EAAE,MAAM,CAAC,CAAC;QAE3C,OAAO,CAAC,EAAE,CAAC,OAAO,CAChB;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,oEAAoE;SAC3E,EACD,IAAI,CAAC,GAAG,EAAE,CACX,CAAC;QAEF,OAAO;YACL,IAAI,EAAE,eAAe;YACrB,OAAO,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkCd;SACI,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -62,7 +62,8 @@ export const memoryCommand = {
62
62
  try {
63
63
  const config = await context.services.config;
64
64
  if (config) {
65
- const { memoryContent, fileCount } = await loadServerHierarchicalMemory(config.getWorkingDir(), config.getDebugMode(), config.getFileService(), config.getExtensionContextFilePaths(), config.getFileFilteringOptions(), context.services.settings.merged.memoryDiscoveryMaxDirs);
65
+ const { memoryContent, fileCount } = await loadServerHierarchicalMemory(config.getWorkingDir(), config.getDebugMode(), config.getFileService(), config.getExtensionContextFilePaths(), context.services.settings.merged.memoryImportFormat || 'tree', // Use setting or default to 'tree'
66
+ config.getFileFilteringOptions(), context.services.settings.merged.memoryDiscoveryMaxDirs);
66
67
  config.setUserMemory(memoryContent);
67
68
  config.setGeminiMdFileCount(fileCount);
68
69
  const successMessage = memoryContent.length > 0
@@ -1 +1 @@
1
- {"version":3,"file":"memoryCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/memoryCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,eAAe,EACf,4BAA4B,GAC7B,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,EACL,WAAW,GAGZ,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,aAAa,GAAiB;IACzC,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,uCAAuC;IACpD,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,WAAW,EAAE;QACX;YACE,IAAI,EAAE,MAAM;YACZ,WAAW,EAAE,mCAAmC;YAChD,IAAI,EAAE,WAAW,CAAC,QAAQ;YAC1B,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,EAAE;gBACxB,MAAM,aAAa,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;gBACrE,MAAM,SAAS,GAAG,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,oBAAoB,EAAE,IAAI,CAAC,CAAC;gBAEvE,MAAM,cAAc,GAClB,aAAa,CAAC,MAAM,GAAG,CAAC;oBACtB,CAAC,CAAC,+BAA+B,SAAS,qBAAqB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CAAC;wBACpC,MAAM,CAAC,oBAAoB,CAAC,SAAS,CAAC,CAAC;wBAEvC,MAAM,cAAc,GAClB,aAAa,CAAC,MAAM,GAAG,CAAC;4BACtB,CAAC,CAAC,yCAAyC,aAAa,CAAC,MAAM,oBAAoB,SAAS,WAAW;4BACvG,CAAC,CAAC,yDAAyD,CAAC;wBAEhE,OAAO,CAAC,EAAE,CAAC,OAAO,CAChB;4BACE,IAAI,EAAE,WAAW,CAAC,IAAI;4BACtB,IAAI,EAAE,cAAc;yBACrB,EACD,IAAI,CAAC,GAAG,EAAE,CACX,CAAC;oBACJ,CAAC;gBACH,CAAC;gBAAC,OAAO,KAAK,EAAE,CAAC;oBACf,MAAM,YAAY,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC;oBAC5C,OAAO,CAAC,EAAE,CAAC,OAAO,CAChB;wBACE,IAAI,EAAE,WAAW,CAAC,KAAK;wBACvB,IAAI,EAAE,4BAA4B,YAAY,EAAE;qBACjD,EACD,IAAI,CAAC,GAAG,EAAE,CACX,CAAC;gBACJ,CAAC;YACH,CAAC;SACF;KACF;CACF,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { SlashCommand } from './types.js';
7
+ export declare const setupGithubCommand: SlashCommand;
@@ -0,0 +1,49 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import path from 'path';
7
+ import { execSync } from 'child_process';
8
+ import { isGitHubRepository } from '../../utils/gitUtils.js';
9
+ import { CommandKind, } from './types.js';
10
+ export const setupGithubCommand = {
11
+ name: 'setup-github',
12
+ description: 'Set up GitHub Actions',
13
+ kind: CommandKind.BUILT_IN,
14
+ action: () => {
15
+ const gitRootRepo = execSync('git rev-parse --show-toplevel', {
16
+ encoding: 'utf-8',
17
+ }).trim();
18
+ if (!isGitHubRepository()) {
19
+ throw new Error('Unable to determine the Git root directory.');
20
+ }
21
+ // TODO(#5198): pin workflow versions for release controls
22
+ const version = 'main';
23
+ const workflowBaseUrl = `https://raw.githubusercontent.com/google-github-actions/run-gemini-cli/refs/heads/${version}/workflows/`;
24
+ const workflows = [
25
+ 'gemini-cli/gemini-cli.yml',
26
+ 'issue-triage/gemini-issue-automated-triage.yml',
27
+ 'issue-triage/gemini-issue-scheduled-triage.yml',
28
+ 'pr-review/gemini-pr-review.yml',
29
+ ];
30
+ const command = [
31
+ 'set -e',
32
+ `mkdir -p "${gitRootRepo}/.github/workflows"`,
33
+ ...workflows.map((workflow) => {
34
+ const fileName = path.basename(workflow);
35
+ return `curl -fsSL -o "${gitRootRepo}/.github/workflows/${fileName}" "${workflowBaseUrl}/${workflow}"`;
36
+ }),
37
+ 'echo "Workflows downloaded successfully."',
38
+ ].join(' && ');
39
+ return {
40
+ type: 'tool',
41
+ toolName: 'run_shell_command',
42
+ toolArgs: {
43
+ description: 'Setting up GitHub Actions to triage issues and review PRs with Gemini.',
44
+ command,
45
+ },
46
+ };
47
+ },
48
+ };
49
+ //# sourceMappingURL=setupGithubCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setupGithubCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/setupGithubCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAE7D,OAAO,EACL,WAAW,GAGZ,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,kBAAkB,GAAiB;IAC9C,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,uBAAuB;IACpC,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,MAAM,EAAE,GAA6B,EAAE;QACrC,MAAM,WAAW,GAAG,QAAQ,CAAC,+BAA+B,EAAE;YAC5D,QAAQ,EAAE,OAAO;SAClB,CAAC,CAAC,IAAI,EAAE,CAAC;QAEV,IAAI,CAAC,kBAAkB,EAAE,EAAE,CAAC;YAC1B,MAAM,IAAI,KAAK,CAAC,6CAA6C,CAAC,CAAC;QACjE,CAAC;QAED,0DAA0D;QAC1D,MAAM,OAAO,GAAG,MAAM,CAAC;QACvB,MAAM,eAAe,GAAG,qFAAqF,OAAO,aAAa,CAAC;QAElI,MAAM,SAAS,GAAG;YAChB,2BAA2B;YAC3B,gDAAgD;YAChD,gDAAgD;YAChD,gCAAgC;SACjC,CAAC;QAEF,MAAM,OAAO,GAAG;YACd,QAAQ;YACR,aAAa,WAAW,qBAAqB;YAC7C,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE;gBAC5B,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;gBACzC,OAAO,kBAAkB,WAAW,sBAAsB,QAAQ,MAAM,eAAe,IAAI,QAAQ,GAAG,CAAC;YACzG,CAAC,CAAC;YACF,2CAA2C;SAC5C,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;QACf,OAAO;YACL,IAAI,EAAE,MAAM;YACZ,QAAQ,EAAE,mBAAmB;YAC7B,QAAQ,EAAE;gBACR,WAAW,EACT,wEAAwE;gBAC1E,OAAO;aACR;SACF,CAAC;IACJ,CAAC;CACF,CAAC"}
@@ -129,6 +129,7 @@ export interface SlashCommand {
129
129
  altNames?: string[];
130
130
  description: string;
131
131
  kind: CommandKind;
132
+ extensionName?: string;
132
133
  action?: (context: CommandContext, args: string) => void | SlashCommandActionReturn | Promise<void | SlashCommandActionReturn>;
133
134
  completion?: (context: CommandContext, partialArg: string) => Promise<string[]>;
134
135
  subCommands?: SlashCommand[];
@@ -4,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import React from 'react';
7
- import { type OpenFiles, type MCPServerConfig } from '@google/gemini-cli-core';
7
+ import { type IdeContext, type MCPServerConfig } from '@google/gemini-cli-core';
8
8
  interface ContextSummaryDisplayProps {
9
9
  geminiMdFileCount: number;
10
10
  contextFileNames: string[];
@@ -14,7 +14,7 @@ interface ContextSummaryDisplayProps {
14
14
  extensionName: string;
15
15
  }>;
16
16
  showToolDescriptions?: boolean;
17
- openFiles?: OpenFiles;
17
+ ideContext?: IdeContext;
18
18
  }
19
19
  export declare const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps>;
20
20
  export {};
@@ -1,21 +1,21 @@
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, blockedMcpServers, showToolDescriptions, openFiles, }) => {
4
+ export const ContextSummaryDisplay = ({ geminiMdFileCount, contextFileNames, mcpServers, blockedMcpServers, showToolDescriptions, ideContext, }) => {
5
5
  const mcpServerCount = Object.keys(mcpServers || {}).length;
6
6
  const blockedMcpServerCount = blockedMcpServers?.length || 0;
7
+ const openFileCount = ideContext?.workspaceState?.openFiles?.length ?? 0;
7
8
  if (geminiMdFileCount === 0 &&
8
9
  mcpServerCount === 0 &&
9
10
  blockedMcpServerCount === 0 &&
10
- (openFiles?.recentOpenFiles?.length ?? 0) === 0) {
11
+ openFileCount === 0) {
11
12
  return _jsx(Text, { children: " " }); // Render an empty space to reserve height
12
13
  }
13
- const recentFilesText = (() => {
14
- const count = openFiles?.recentOpenFiles?.length ?? 0;
15
- if (count === 0) {
14
+ const openFilesText = (() => {
15
+ if (openFileCount === 0) {
16
16
  return '';
17
17
  }
18
- return `${count} recent file${count > 1 ? 's' : ''} (ctrl+e to view)`;
18
+ return `${openFileCount} open file${openFileCount > 1 ? 's' : ''} (ctrl+e to view)`;
19
19
  })();
20
20
  const geminiMdText = (() => {
21
21
  if (geminiMdFileCount === 0) {
@@ -44,8 +44,8 @@ export const ContextSummaryDisplay = ({ geminiMdFileCount, contextFileNames, mcp
44
44
  })();
45
45
  let summaryText = 'Using: ';
46
46
  const summaryParts = [];
47
- if (recentFilesText) {
48
- summaryParts.push(recentFilesText);
47
+ if (openFilesText) {
48
+ summaryParts.push(openFilesText);
49
49
  }
50
50
  if (geminiMdText) {
51
51
  summaryParts.push(geminiMdText);
@@ -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,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAYtC,MAAM,CAAC,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,SAAS,GACV,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC;IAC5D,MAAM,qBAAqB,GAAG,iBAAiB,EAAE,MAAM,IAAI,CAAC,CAAC;IAE7D,IACE,iBAAiB,KAAK,CAAC;QACvB,cAAc,KAAK,CAAC;QACpB,qBAAqB,KAAK,CAAC;QAC3B,CAAC,SAAS,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC,CAAC,KAAK,CAAC,EAC/C,CAAC;QACD,OAAO,KAAC,IAAI,oBAAS,CAAC,CAAC,0CAA0C;IACnE,CAAC;IAED,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE;QAC5B,MAAM,KAAK,GAAG,SAAS,EAAE,eAAe,EAAE,MAAM,IAAI,CAAC,CAAC;QACtD,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;YAChB,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,GAAG,KAAK,eAAe,KAAK,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE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C,IAAI,CAAC,CAAC;IAC1B,CAAC,CAAC,EAAE,CAAC;IAEL,IAAI,WAAW,GAAG,SAAS,CAAC;IAC5B,MAAM,YAAY,GAAG,EAAE,CAAC;IACxB,IAAI,eAAe,EAAE,CAAC;QACpB,YAAY,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IACrC,CAAC;IACD,IAAI,YAAY,EAAE,CAAC;QACjB,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC;IACD,IAAI,OAAO,EAAE,CAAC;QACZ,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAC7B,CAAC;IACD,WAAW,IAAI,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAExC,iDAAiD;IACjD,IAAI,UAAU,IAAI,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACrD,IAAI,oBAAoB,EAAE,CAAC;YACzB,WAAW,IAAI,qBAAqB,CAAC;QACvC,CAAC;aAAM,CAAC;YACN,WAAW,IAAI,mBAAmB,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,WAAW,GAAQ,CAAC;AACxD,CAAC,CAAC"}
1
+ {"version":3,"file":"ContextSummaryDisplay.js","sourceRoot":"","sources":["../../../../src/ui/components/ContextSummaryDisplay.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAYtC,MAAM,CAAC,MAAM,qBAAqB,GAAyC,CAAC,EAC1E,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,oBAAoB,EACpB,UAAU,GACX,EAAE,EAAE;IACH,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,UAAU,IAAI,EAAE,CAAC,CAAC,MAA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AmB,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,WAAW,GAAQ,CAAC;AACxD,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare const DebugProfiler: () => import("react/jsx-runtime").JSX.Element | null;
@@ -0,0 +1,26 @@
1
+ import { jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * @license
4
+ * Copyright 2025 Google LLC
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ import { Text, useInput } from 'ink';
8
+ import { useEffect, useRef, useState } from 'react';
9
+ import { Colors } from '../colors.js';
10
+ export const DebugProfiler = () => {
11
+ const numRenders = useRef(0);
12
+ const [showNumRenders, setShowNumRenders] = useState(false);
13
+ useEffect(() => {
14
+ numRenders.current++;
15
+ });
16
+ useInput((input, key) => {
17
+ if (key.ctrl && input === 'b') {
18
+ setShowNumRenders((prev) => !prev);
19
+ }
20
+ });
21
+ if (!showNumRenders) {
22
+ return null;
23
+ }
24
+ return (_jsxs(Text, { color: Colors.AccentYellow, children: ["Renders: ", numRenders.current, " "] }));
25
+ };
26
+ //# sourceMappingURL=DebugProfiler.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DebugProfiler.js","sourceRoot":"","sources":["../../../../src/ui/components/DebugProfiler.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACpD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,MAAM,CAAC,MAAM,aAAa,GAAG,GAAG,EAAE;IAChC,MAAM,UAAU,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAC7B,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAE5D,SAAS,CAAC,GAAG,EAAE;QACb,UAAU,CAAC,OAAO,EAAE,CAAC;IACvB,CAAC,CAAC,CAAC;IAEH,QAAQ,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACtB,IAAI,GAAG,CAAC,IAAI,IAAI,KAAK,KAAK,GAAG,EAAE,CAAC;YAC9B,iBAAiB,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;QACrC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,0BAAY,UAAU,CAAC,OAAO,SAAS,CACxE,CAAC;AACJ,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Text } from 'ink';
3
3
  import { Colors } from '../colors.js';
4
4
  import { shortenPath, tildeifyPath, tokenLimit } from '@google/gemini-cli-core';
@@ -6,9 +6,10 @@ import { ConsoleSummaryDisplay } from './ConsoleSummaryDisplay.js';
6
6
  import process from 'node:process';
7
7
  import Gradient from 'ink-gradient';
8
8
  import { MemoryUsageDisplay } from './MemoryUsageDisplay.js';
9
+ import { DebugProfiler } from './DebugProfiler.js';
9
10
  export const Footer = ({ model, targetDir, branchName, debugMode, debugMessage, corgiMode, errorCount, showErrorDetails, showMemoryUsage, promptTokenCount, nightly, vimMode, }) => {
10
11
  const limit = tokenLimit(model);
11
12
  const percentage = promptTokenCount / limit;
12
- return (_jsxs(Box, { justifyContent: "space-between", width: "100%", children: [_jsxs(Box, { children: [vimMode && _jsxs(Text, { color: Colors.Gray, children: ["[", vimMode, "] "] }), nightly ? (_jsx(Gradient, { colors: Colors.GradientColors, children: _jsxs(Text, { children: [shortenPath(tildeifyPath(targetDir), 70), branchName && _jsxs(Text, { children: [" (", branchName, "*)"] })] }) })) : (_jsxs(Text, { color: Colors.LightBlue, children: [shortenPath(tildeifyPath(targetDir), 70), branchName && _jsxs(Text, { color: Colors.Gray, children: [" (", branchName, "*)"] })] })), debugMode && (_jsx(Text, { color: Colors.AccentRed, children: ' ' + (debugMessage || '--debug') }))] }), _jsx(Box, { flexGrow: 1, alignItems: "center", justifyContent: "center", display: "flex", children: process.env.SANDBOX && process.env.SANDBOX !== 'sandbox-exec' ? (_jsx(Text, { color: "green", children: process.env.SANDBOX.replace(/^gemini-(?:cli-)?/, '') })) : process.env.SANDBOX === 'sandbox-exec' ? (_jsxs(Text, { color: Colors.AccentYellow, children: ["macOS Seatbelt", ' ', _jsxs(Text, { color: Colors.Gray, children: ["(", process.env.SEATBELT_PROFILE, ")"] })] })) : (_jsxs(Text, { color: Colors.AccentRed, children: ["no sandbox ", _jsx(Text, { color: Colors.Gray, children: "(see /docs)" })] })) }), _jsxs(Box, { alignItems: "center", children: [_jsxs(Text, { color: Colors.AccentBlue, children: [' ', model, ' ', _jsxs(Text, { color: Colors.Gray, children: ["(", ((1 - percentage) * 100).toFixed(0), "% context left)"] })] }), corgiMode && (_jsxs(Text, { children: [_jsx(Text, { color: Colors.Gray, children: "| " }), _jsx(Text, { color: Colors.AccentRed, children: "\u25BC" }), _jsx(Text, { color: Colors.Foreground, children: "(\u00B4" }), _jsx(Text, { color: Colors.AccentRed, children: "\u1D25" }), _jsx(Text, { color: Colors.Foreground, children: "`)" }), _jsx(Text, { color: Colors.AccentRed, children: "\u25BC " })] })), !showErrorDetails && errorCount > 0 && (_jsxs(Box, { children: [_jsx(Text, { color: Colors.Gray, children: "| " }), _jsx(ConsoleSummaryDisplay, { errorCount: errorCount })] })), showMemoryUsage && _jsx(MemoryUsageDisplay, {})] })] }));
13
+ return (_jsxs(Box, { justifyContent: "space-between", width: "100%", children: [_jsxs(Box, { children: [debugMode && _jsx(DebugProfiler, {}), vimMode && _jsxs(Text, { color: Colors.Gray, children: ["[", vimMode, "] "] }), nightly ? (_jsx(Gradient, { colors: Colors.GradientColors, children: _jsxs(Text, { children: [shortenPath(tildeifyPath(targetDir), 70), branchName && _jsxs(Text, { children: [" (", branchName, "*)"] })] }) })) : (_jsxs(Text, { color: Colors.LightBlue, children: [shortenPath(tildeifyPath(targetDir), 70), branchName && _jsxs(Text, { color: Colors.Gray, children: [" (", branchName, "*)"] })] })), debugMode && (_jsx(Text, { color: Colors.AccentRed, children: ' ' + (debugMessage || '--debug') }))] }), _jsx(Box, { flexGrow: 1, alignItems: "center", justifyContent: "center", display: "flex", children: process.env.SANDBOX && process.env.SANDBOX !== 'sandbox-exec' ? (_jsx(Text, { color: "green", children: process.env.SANDBOX.replace(/^gemini-(?:cli-)?/, '') })) : process.env.SANDBOX === 'sandbox-exec' ? (_jsxs(Text, { color: Colors.AccentYellow, children: ["macOS Seatbelt", ' ', _jsxs(Text, { color: Colors.Gray, children: ["(", process.env.SEATBELT_PROFILE, ")"] })] })) : (_jsxs(Text, { color: Colors.AccentRed, children: ["no sandbox ", _jsx(Text, { color: Colors.Gray, children: "(see /docs)" })] })) }), _jsxs(Box, { alignItems: "center", children: [_jsxs(Text, { color: Colors.AccentBlue, children: [' ', model, ' ', _jsxs(Text, { color: Colors.Gray, children: ["(", ((1 - percentage) * 100).toFixed(0), "% context left)"] })] }), corgiMode && (_jsxs(Text, { children: [_jsx(Text, { color: Colors.Gray, children: "| " }), _jsx(Text, { color: Colors.AccentRed, children: "\u25BC" }), _jsx(Text, { color: Colors.Foreground, children: "(\u00B4" }), _jsx(Text, { color: Colors.AccentRed, children: "\u1D25" }), _jsx(Text, { color: Colors.Foreground, children: "`)" }), _jsx(Text, { color: Colors.AccentRed, children: "\u25BC " })] })), !showErrorDetails && errorCount > 0 && (_jsxs(Box, { children: [_jsx(Text, { color: Colors.Gray, children: "| " }), _jsx(ConsoleSummaryDisplay, { errorCount: errorCount })] })), showMemoryUsage && _jsx(MemoryUsageDisplay, {})] })] }));
13
14
  };
14
15
  //# sourceMappingURL=Footer.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Footer.js","sourceRoot":"","sources":["../../../../src/ui/components/Footer.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChF,OAAO,EAAE,qBAAqB,EAAE,MAAM,4BAA4B,CAAC;AACnE,OAAO,OAAO,MAAM,cAAc,CAAC;AACnC,OAAO,QAAQ,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAiB7D,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC5C,KAAK,EACL,SAAS,EACT,UAAU,EACV,SAAS,EACT,YAAY,EACZ,SAAS,EACT,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,gBAAgB,EAChB,OAAO,EACP,OAAO,GACR,EAAE,EAAE;IACH,MAAM,KAAK,GAAG,UAAU,CAAC,KAAK,CAAC,CAAC;IAChC,MAAM,UAAU,GAAG,gBAAgB,GAAG,KAAK,CAAC;IAE5C,OAAO,CACL,MAAC,GAAG,IAAC,cAAc,EAAC,eAAe,EAAC,KAAK,EAAC,MAAM,aAC9C,MAAC,GAAG,eACD,OAAO,IAAI,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,kBAAI,OAAO,UAAU,EACxD,OAAO,CAAC,CAAC,CAAC,CACT,KAAC,QAAQ,IAAC,MAAM,EAAE,MAAM,CAAC,cAAc,YACrC,MAAC,IAAI,eACF,WAAW,CAAC,YAAY,CAAC,SAAS,CA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C,IAAI,mBAAW,EACnC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,uBAAU,EACvC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,wBAAW,EACzC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,uBAAU,EACvC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,mBAAW,EACzC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,wBAAW,IACnC,CACR,EACA,CAAC,gBAAgB,IAAI,UAAU,GAAG,CAAC,IAAI,CACtC,MAAC,GAAG,eACF,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,mBAAW,EACnC,KAAC,qBAAqB,IAAC,UAAU,EAAE,UAAU,GAAI,IAC7C,CACP,EACA,eAAe,IAAI,KAAC,kBAAkB,KAAG,IACtC,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -4,7 +4,7 @@ import { Colors } from '../colors.js';
4
4
  export const Help = ({ commands }) => (_jsxs(Box, { flexDirection: "column", marginBottom: 1, borderColor: Colors.Gray, borderStyle: "round", padding: 1, children: [_jsx(Text, { bold: true, color: Colors.Foreground, children: "Basics:" }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Add context" }), ": Use", ' ', _jsx(Text, { bold: true, color: Colors.AccentPurple, children: "@" }), ' ', "to specify files for context (e.g.,", ' ', _jsx(Text, { bold: true, color: Colors.AccentPurple, children: "@src/myFile.ts" }), ") to target specific files or folders."] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Shell mode" }), ": Execute shell commands via", ' ', _jsx(Text, { bold: true, color: Colors.AccentPurple, children: "!" }), ' ', "(e.g.,", ' ', _jsx(Text, { bold: true, color: Colors.AccentPurple, children: "!npm run start" }), ") or use natural language (e.g.", ' ', _jsx(Text, { bold: true, color: Colors.AccentPurple, children: "start server" }), ")."] }), _jsx(Box, { height: 1 }), _jsx(Text, { bold: true, color: Colors.Foreground, children: "Commands:" }), commands
5
5
  .filter((command) => command.description)
6
6
  .map((command) => (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { color: Colors.Foreground, children: [_jsxs(Text, { bold: true, color: Colors.AccentPurple, children: [' ', "/", command.name] }), command.description && ' - ' + command.description] }), command.subCommands &&
7
- command.subCommands.map((subCommand) => (_jsxs(Text, { color: Colors.Foreground, children: [_jsxs(Text, { bold: true, color: Colors.AccentPurple, children: [' ', subCommand.name] }), subCommand.description && ' - ' + subCommand.description] }, subCommand.name)))] }, command.name))), _jsxs(Text, { color: Colors.Foreground, children: [_jsxs(Text, { bold: true, color: Colors.AccentPurple, children: [' ', "!", ' '] }), "- shell command"] }), _jsx(Box, { height: 1 }), _jsx(Text, { bold: true, color: Colors.Foreground, children: "Keyboard Shortcuts:" }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Enter" }), ' ', "- Send message"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: process.platform === 'win32' ? 'Ctrl+Enter' : 'Ctrl+J' }), ' ', process.platform === 'linux'
7
+ command.subCommands.map((subCommand) => (_jsxs(Text, { color: Colors.Foreground, children: [_jsxs(Text, { bold: true, color: Colors.AccentPurple, children: [' ', subCommand.name] }), subCommand.description && ' - ' + subCommand.description] }, subCommand.name)))] }, command.name))), _jsxs(Text, { color: Colors.Foreground, children: [_jsxs(Text, { bold: true, color: Colors.AccentPurple, children: [' ', "!", ' '] }), "- shell command"] }), _jsx(Box, { height: 1 }), _jsx(Text, { bold: true, color: Colors.Foreground, children: "Keyboard Shortcuts:" }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Alt+Left/Right" }), ' ', "- Jump through words in the input"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Ctrl+C" }), ' ', "- Quit application"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: process.platform === 'win32' ? 'Ctrl+Enter' : 'Ctrl+J' }), ' ', process.platform === 'linux'
8
8
  ? '- New line (Alt+Enter works for certain linux distros)'
9
- : '- New line'] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Up/Down" }), ' ', "- Cycle through your prompt history"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Alt+Left/Right" }), ' ', "- Jump through words in the input"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Shift+Tab" }), ' ', "- Toggle auto-accepting edits"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Ctrl+Y" }), ' ', "- Toggle YOLO mode"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Esc" }), ' ', "- Cancel operation"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Ctrl+C" }), ' ', "- Quit application"] })] }));
9
+ : '- New line'] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Ctrl+L" }), ' ', "- Clear the screen"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: process.platform === 'darwin' ? 'Ctrl+X / Meta+Enter' : 'Ctrl+X' }), ' ', "- Open input in external editor"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Ctrl+Y" }), ' ', "- Toggle YOLO mode"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Enter" }), ' ', "- Send message"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Esc" }), ' ', "- Cancel operation"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Shift+Tab" }), ' ', "- Toggle auto-accepting edits"] }), _jsxs(Text, { color: Colors.Foreground, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Up/Down" }), ' ', "- Cycle through your prompt history"] }), _jsx(Box, { height: 1 }), _jsxs(Text, { color: Colors.Foreground, children: ["For a full list of shortcuts, see", ' ', _jsx(Text, { bold: true, color: Colors.AccentPurple, children: "docs/keyboard-shortcuts.md" })] })] }));
10
10
  //# sourceMappingURL=Help.js.map