@google/gemini-cli 0.1.13 → 0.1.15-nightly.250731.0c6f7884

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 (246) hide show
  1. package/README.md +50 -1
  2. package/dist/google-gemini-cli-0.1.15.tgz +0 -0
  3. package/dist/package.json +6 -3
  4. package/dist/src/config/config.d.ts +5 -3
  5. package/dist/src/config/config.js +29 -32
  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 +9 -2
  11. package/dist/src/config/settings.js +25 -10
  12. package/dist/src/config/settings.js.map +1 -1
  13. package/dist/src/gemini.d.ts +1 -0
  14. package/dist/src/gemini.js +41 -36
  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/patches/is-in-ci.d.ts +7 -0
  19. package/dist/src/patches/is-in-ci.js +15 -0
  20. package/dist/src/patches/is-in-ci.js.map +1 -0
  21. package/dist/src/services/BuiltinCommandLoader.d.ts +24 -0
  22. package/dist/src/services/BuiltinCommandLoader.js +74 -0
  23. package/dist/src/services/BuiltinCommandLoader.js.map +1 -0
  24. package/dist/src/services/CommandService.d.ts +47 -7
  25. package/dist/src/services/CommandService.js +77 -56
  26. package/dist/src/services/CommandService.js.map +1 -1
  27. package/dist/src/services/FileCommandLoader.d.ts +49 -0
  28. package/dist/src/services/FileCommandLoader.js +208 -0
  29. package/dist/src/services/FileCommandLoader.js.map +1 -0
  30. package/dist/src/services/McpPromptLoader.d.ts +25 -0
  31. package/dist/src/services/McpPromptLoader.js +192 -0
  32. package/dist/src/services/McpPromptLoader.js.map +1 -0
  33. package/dist/src/services/prompt-processors/argumentProcessor.d.ts +21 -0
  34. package/dist/src/services/prompt-processors/argumentProcessor.js +28 -0
  35. package/dist/src/services/prompt-processors/argumentProcessor.js.map +1 -0
  36. package/dist/src/services/prompt-processors/shellProcessor.d.ts +32 -0
  37. package/dist/src/services/prompt-processors/shellProcessor.js +77 -0
  38. package/dist/src/services/prompt-processors/shellProcessor.js.map +1 -0
  39. package/dist/src/services/prompt-processors/types.d.ts +38 -0
  40. package/dist/src/services/prompt-processors/types.js +14 -0
  41. package/dist/src/services/prompt-processors/types.js.map +1 -0
  42. package/dist/src/services/types.d.ts +22 -0
  43. package/dist/src/services/types.js +7 -0
  44. package/dist/src/services/types.js.map +1 -0
  45. package/dist/src/ui/App.js +96 -64
  46. package/dist/src/ui/App.js.map +1 -1
  47. package/dist/src/ui/colors.js +6 -0
  48. package/dist/src/ui/colors.js.map +1 -1
  49. package/dist/src/ui/commands/aboutCommand.js +2 -0
  50. package/dist/src/ui/commands/aboutCommand.js.map +1 -1
  51. package/dist/src/ui/commands/authCommand.js +2 -0
  52. package/dist/src/ui/commands/authCommand.js.map +1 -1
  53. package/dist/src/ui/commands/bugCommand.js +2 -0
  54. package/dist/src/ui/commands/bugCommand.js.map +1 -1
  55. package/dist/src/ui/commands/chatCommand.js +51 -3
  56. package/dist/src/ui/commands/chatCommand.js.map +1 -1
  57. package/dist/src/ui/commands/clearCommand.js +2 -0
  58. package/dist/src/ui/commands/clearCommand.js.map +1 -1
  59. package/dist/src/ui/commands/compressCommand.js +3 -1
  60. package/dist/src/ui/commands/compressCommand.js.map +1 -1
  61. package/dist/src/ui/commands/copyCommand.d.ts +7 -0
  62. package/dist/src/ui/commands/copyCommand.js +59 -0
  63. package/dist/src/ui/commands/copyCommand.js.map +1 -0
  64. package/dist/src/ui/commands/corgiCommand.js +2 -0
  65. package/dist/src/ui/commands/corgiCommand.js.map +1 -1
  66. package/dist/src/ui/commands/docsCommand.js +2 -0
  67. package/dist/src/ui/commands/docsCommand.js.map +1 -1
  68. package/dist/src/ui/commands/editorCommand.js +2 -0
  69. package/dist/src/ui/commands/editorCommand.js.map +1 -1
  70. package/dist/src/ui/commands/extensionsCommand.js +2 -0
  71. package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
  72. package/dist/src/ui/commands/helpCommand.js +3 -1
  73. package/dist/src/ui/commands/helpCommand.js.map +1 -1
  74. package/dist/src/ui/commands/ideCommand.js +103 -109
  75. package/dist/src/ui/commands/ideCommand.js.map +1 -1
  76. package/dist/src/ui/commands/initCommand.d.ts +7 -0
  77. package/dist/src/ui/commands/initCommand.js +76 -0
  78. package/dist/src/ui/commands/initCommand.js.map +1 -0
  79. package/dist/src/ui/commands/mcpCommand.js +229 -8
  80. package/dist/src/ui/commands/mcpCommand.js.map +1 -1
  81. package/dist/src/ui/commands/memoryCommand.js +11 -4
  82. package/dist/src/ui/commands/memoryCommand.js.map +1 -1
  83. package/dist/src/ui/commands/privacyCommand.js +2 -0
  84. package/dist/src/ui/commands/privacyCommand.js.map +1 -1
  85. package/dist/src/ui/commands/quitCommand.js +3 -1
  86. package/dist/src/ui/commands/quitCommand.js.map +1 -1
  87. package/dist/src/ui/commands/restoreCommand.js +2 -0
  88. package/dist/src/ui/commands/restoreCommand.js.map +1 -1
  89. package/dist/src/ui/commands/statsCommand.js +5 -1
  90. package/dist/src/ui/commands/statsCommand.js.map +1 -1
  91. package/dist/src/ui/commands/themeCommand.js +2 -0
  92. package/dist/src/ui/commands/themeCommand.js.map +1 -1
  93. package/dist/src/ui/commands/toolsCommand.js +2 -0
  94. package/dist/src/ui/commands/toolsCommand.js.map +1 -1
  95. package/dist/src/ui/commands/types.d.ts +42 -3
  96. package/dist/src/ui/commands/types.js +6 -1
  97. package/dist/src/ui/commands/types.js.map +1 -1
  98. package/dist/src/ui/commands/vimCommand.d.ts +7 -0
  99. package/dist/src/ui/commands/vimCommand.js +23 -0
  100. package/dist/src/ui/commands/vimCommand.js.map +1 -0
  101. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +2 -2
  102. package/dist/src/ui/components/ContextSummaryDisplay.js +12 -12
  103. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
  104. package/dist/src/ui/components/Footer.d.ts +1 -0
  105. package/dist/src/ui/components/Footer.js +2 -2
  106. package/dist/src/ui/components/Footer.js.map +1 -1
  107. package/dist/src/ui/components/Header.js +1 -1
  108. package/dist/src/ui/components/Header.js.map +1 -1
  109. package/dist/src/ui/components/Help.d.ts +1 -1
  110. package/dist/src/ui/components/Help.js +2 -2
  111. package/dist/src/ui/components/Help.js.map +1 -1
  112. package/dist/src/ui/components/IDEContextDetailDisplay.d.ts +12 -0
  113. package/dist/src/ui/components/IDEContextDetailDisplay.js +12 -0
  114. package/dist/src/ui/components/IDEContextDetailDisplay.js.map +1 -0
  115. package/dist/src/ui/components/InputPrompt.d.ts +3 -1
  116. package/dist/src/ui/components/InputPrompt.js +20 -99
  117. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  118. package/dist/src/ui/components/ShellConfirmationDialog.d.ts +15 -0
  119. package/dist/src/ui/components/ShellConfirmationDialog.js +44 -0
  120. package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -0
  121. package/dist/src/ui/components/ThemeDialog.js +42 -17
  122. package/dist/src/ui/components/ThemeDialog.js.map +1 -1
  123. package/dist/src/ui/components/Tips.js +1 -1
  124. package/dist/src/ui/components/Tips.js.map +1 -1
  125. package/dist/src/ui/components/messages/DiffRenderer.d.ts +1 -0
  126. package/dist/src/ui/components/messages/DiffRenderer.js +12 -11
  127. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
  128. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +19 -7
  129. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  130. package/dist/src/ui/components/shared/text-buffer.d.ts +273 -3
  131. package/dist/src/ui/components/shared/text-buffer.js +425 -79
  132. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  133. package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +72 -0
  134. package/dist/src/ui/components/shared/vim-buffer-actions.js +565 -0
  135. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +1 -0
  136. package/dist/src/ui/contexts/VimModeContext.d.ts +19 -0
  137. package/dist/src/ui/contexts/VimModeContext.js +48 -0
  138. package/dist/src/ui/contexts/VimModeContext.js.map +1 -0
  139. package/dist/src/ui/hooks/atCommandProcessor.js +103 -56
  140. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
  141. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +1 -0
  142. package/dist/src/ui/hooks/shellCommandProcessor.js +139 -186
  143. package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -1
  144. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +8 -4
  145. package/dist/src/ui/hooks/slashCommandProcessor.js +209 -108
  146. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  147. package/dist/src/ui/hooks/useAuthCommand.js +2 -2
  148. package/dist/src/ui/hooks/useAuthCommand.js.map +1 -1
  149. package/dist/src/ui/hooks/useCompletion.d.ts +3 -1
  150. package/dist/src/ui/hooks/useCompletion.js +173 -65
  151. package/dist/src/ui/hooks/useCompletion.js.map +1 -1
  152. package/dist/src/ui/hooks/useConsoleMessages.js +53 -37
  153. package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -1
  154. package/dist/src/ui/hooks/useGeminiStream.js +62 -13
  155. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  156. package/dist/src/ui/hooks/useInputHistory.d.ts +1 -1
  157. package/dist/src/ui/hooks/useKeypress.js +5 -2
  158. package/dist/src/ui/hooks/useKeypress.js.map +1 -1
  159. package/dist/src/ui/hooks/usePhraseCycler.js +1 -0
  160. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  161. package/dist/src/ui/hooks/useReactToolScheduler.js +0 -1
  162. package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
  163. package/dist/src/ui/hooks/useShellHistory.d.ts +3 -2
  164. package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
  165. package/dist/src/ui/hooks/useThemeCommand.js +24 -23
  166. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
  167. package/dist/src/ui/hooks/vim.d.ts +28 -0
  168. package/dist/src/ui/hooks/vim.js +630 -0
  169. package/dist/src/ui/hooks/vim.js.map +1 -0
  170. package/dist/src/ui/themes/ansi-light.js +2 -0
  171. package/dist/src/ui/themes/ansi-light.js.map +1 -1
  172. package/dist/src/ui/themes/ansi.js +2 -0
  173. package/dist/src/ui/themes/ansi.js.map +1 -1
  174. package/dist/src/ui/themes/atom-one-dark.js +2 -0
  175. package/dist/src/ui/themes/atom-one-dark.js.map +1 -1
  176. package/dist/src/ui/themes/ayu-light.js +3 -1
  177. package/dist/src/ui/themes/ayu-light.js.map +1 -1
  178. package/dist/src/ui/themes/ayu.js +3 -1
  179. package/dist/src/ui/themes/ayu.js.map +1 -1
  180. package/dist/src/ui/themes/color-utils.d.ts +21 -0
  181. package/dist/src/ui/themes/color-utils.js +221 -0
  182. package/dist/src/ui/themes/color-utils.js.map +1 -0
  183. package/dist/src/ui/themes/dracula.js +2 -0
  184. package/dist/src/ui/themes/dracula.js.map +1 -1
  185. package/dist/src/ui/themes/github-dark.js +2 -0
  186. package/dist/src/ui/themes/github-dark.js.map +1 -1
  187. package/dist/src/ui/themes/github-light.js +2 -0
  188. package/dist/src/ui/themes/github-light.js.map +1 -1
  189. package/dist/src/ui/themes/googlecode.js +2 -0
  190. package/dist/src/ui/themes/googlecode.js.map +1 -1
  191. package/dist/src/ui/themes/no-color.js +3 -1
  192. package/dist/src/ui/themes/no-color.js.map +1 -1
  193. package/dist/src/ui/themes/shades-of-purple.d.ts +1 -1
  194. package/dist/src/ui/themes/shades-of-purple.js +3 -1
  195. package/dist/src/ui/themes/shades-of-purple.js.map +1 -1
  196. package/dist/src/ui/themes/theme-manager.d.ts +31 -6
  197. package/dist/src/ui/themes/theme-manager.js +113 -34
  198. package/dist/src/ui/themes/theme-manager.js.map +1 -1
  199. package/dist/src/ui/themes/theme.d.ts +23 -3
  200. package/dist/src/ui/themes/theme.js +244 -182
  201. package/dist/src/ui/themes/theme.js.map +1 -1
  202. package/dist/src/ui/themes/xcode.js +2 -0
  203. package/dist/src/ui/themes/xcode.js.map +1 -1
  204. package/dist/src/ui/types.d.ts +9 -1
  205. package/dist/src/ui/utils/CodeColorizer.d.ts +3 -1
  206. package/dist/src/ui/utils/CodeColorizer.js +23 -11
  207. package/dist/src/ui/utils/CodeColorizer.js.map +1 -1
  208. package/dist/src/ui/utils/commandUtils.d.ts +1 -0
  209. package/dist/src/ui/utils/commandUtils.js +47 -0
  210. package/dist/src/ui/utils/commandUtils.js.map +1 -1
  211. package/dist/src/ui/utils/markdownUtilities.js +1 -1
  212. package/dist/src/ui/utils/textUtils.d.ts +0 -8
  213. package/dist/src/ui/utils/textUtils.js +0 -22
  214. package/dist/src/ui/utils/textUtils.js.map +1 -1
  215. package/dist/src/ui/utils/updateCheck.d.ts +7 -1
  216. package/dist/src/ui/utils/updateCheck.js +9 -3
  217. package/dist/src/ui/utils/updateCheck.js.map +1 -1
  218. package/dist/src/utils/events.d.ts +11 -0
  219. package/dist/src/utils/events.js +13 -0
  220. package/dist/src/utils/events.js.map +1 -0
  221. package/dist/src/utils/handleAutoUpdate.d.ts +10 -0
  222. package/dist/src/utils/handleAutoUpdate.js +97 -0
  223. package/dist/src/utils/handleAutoUpdate.js.map +1 -0
  224. package/dist/src/utils/installationInfo.d.ts +23 -0
  225. package/dist/src/utils/installationInfo.js +154 -0
  226. package/dist/src/utils/installationInfo.js.map +1 -0
  227. package/dist/src/utils/sandbox-macos-permissive-closed.sb +6 -0
  228. package/dist/src/utils/sandbox-macos-permissive-open.sb +6 -0
  229. package/dist/src/utils/sandbox-macos-permissive-proxied.sb +6 -0
  230. package/dist/src/utils/sandbox-macos-restrictive-closed.sb +6 -0
  231. package/dist/src/utils/sandbox-macos-restrictive-open.sb +6 -0
  232. package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +6 -0
  233. package/dist/src/utils/sandbox.d.ts +2 -2
  234. package/dist/src/utils/sandbox.js +36 -13
  235. package/dist/src/utils/sandbox.js.map +1 -1
  236. package/dist/src/utils/updateEventEmitter.d.ts +11 -0
  237. package/dist/src/utils/updateEventEmitter.js +12 -0
  238. package/dist/src/utils/updateEventEmitter.js.map +1 -0
  239. package/dist/src/utils/userStartupWarnings.js +22 -1
  240. package/dist/src/utils/userStartupWarnings.js.map +1 -1
  241. package/dist/src/validateNonInterActiveAuth.d.ts +7 -0
  242. package/dist/src/validateNonInterActiveAuth.js +35 -0
  243. package/dist/src/validateNonInterActiveAuth.js.map +1 -0
  244. package/dist/tsconfig.tsbuildinfo +1 -1
  245. package/package.json +7 -4
  246. package/dist/google-gemini-cli-0.1.12.tgz +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"toolsCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/toolsCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,iCAAiC;IAC9C,MAAM,EAAE,KAAK,EAAE,OAAuB,EAAE,IAAa,EAAiB,EAAE;QACtE,MAAM,UAAU,GAAG,IAAI,EAAE,IAAI,EAAE,CAAC;QAEhC,8EAA8E;QAC9E,IAAI,mBAAmB,GAAG,KAAK,CAAC;QAChC,IAAI,UAAU,KAAK,MAAM,IAAI,UAAU,KAAK,cAAc,EAAE,CAAC;YAC3D,mBAAmB,GAAG,IAAI,CAAC;QAC7B,CAAC;QAED,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,QAAQ,CAAC,MAAM,EAAE,eAAe,EAAE,CAAC;QACtE,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,OAAO,CAAC,EAAE,CAAC,OAAO,CAChB;gBACE,IAAI,EAAE,WAAW,CAAC,KAAK;gBACvB,IAAI,EAAE,mCAAmC;aAC1C,EACD,IAAI,CAAC,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E,CAAC;YAC3B,WAAW,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;gBAC3B,IAAI,mBAAmB,IAAI,IAAI,CAAC,WAAW,EAAE,CAAC;oBAC5C,OAAO,IAAI,iBAAiB,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,IAAI,eAAe,CAAC;oBAE1E,MAAM,UAAU,GAAG,YAAY,CAAC;oBAChC,MAAM,UAAU,GAAG,WAAW,CAAC;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"}
@@ -11,6 +11,14 @@ import { UseHistoryManagerReturn } from '../hooks/useHistoryManager.js';
11
11
  import type { HistoryItem } from '../types.js';
12
12
  import { SessionStatsState } from '../contexts/SessionContext.js';
13
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
+ };
14
22
  services: {
15
23
  config: Config | null;
16
24
  settings: LoadedSettings;
@@ -43,9 +51,12 @@ export interface CommandContext {
43
51
  loadHistory: UseHistoryManagerReturn['loadHistory'];
44
52
  /** Toggles a special display mode. */
45
53
  toggleCorgiMode: () => void;
54
+ toggleVimEnabled: () => Promise<boolean>;
46
55
  };
47
56
  session: {
48
57
  stats: SessionStatsState;
58
+ /** A transient list of shell commands the user has approved for this session. */
59
+ sessionShellAllowlist: Set<string>;
49
60
  };
50
61
  }
51
62
  /**
@@ -86,11 +97,39 @@ export interface LoadHistoryActionReturn {
86
97
  history: HistoryItemWithoutId[];
87
98
  clientHistory: Content[];
88
99
  }
89
- export type SlashCommandActionReturn = ToolActionReturn | MessageActionReturn | QuitActionReturn | OpenDialogActionReturn | LoadHistoryActionReturn;
100
+ /**
101
+ * The return type for a command action that should immediately submit
102
+ * content as a prompt to the Gemini model.
103
+ */
104
+ export interface SubmitPromptActionReturn {
105
+ type: 'submit_prompt';
106
+ content: string;
107
+ }
108
+ /**
109
+ * The return type for a command action that needs to pause and request
110
+ * confirmation for a set of shell commands before proceeding.
111
+ */
112
+ export interface ConfirmShellCommandsActionReturn {
113
+ type: 'confirm_shell_commands';
114
+ /** The list of shell commands that require user confirmation. */
115
+ commandsToConfirm: string[];
116
+ /** The original invocation context to be re-run after confirmation. */
117
+ originalInvocation: {
118
+ raw: string;
119
+ };
120
+ }
121
+ export type SlashCommandActionReturn = ToolActionReturn | MessageActionReturn | QuitActionReturn | OpenDialogActionReturn | LoadHistoryActionReturn | SubmitPromptActionReturn | ConfirmShellCommandsActionReturn;
122
+ export declare enum CommandKind {
123
+ BUILT_IN = "built-in",
124
+ FILE = "file",
125
+ MCP_PROMPT = "mcp-prompt"
126
+ }
90
127
  export interface SlashCommand {
91
128
  name: string;
92
- altName?: string;
93
- description?: string;
129
+ altNames?: string[];
130
+ description: string;
131
+ kind: CommandKind;
132
+ extensionName?: string;
94
133
  action?: (context: CommandContext, args: string) => void | SlashCommandActionReturn | Promise<void | SlashCommandActionReturn>;
95
134
  completion?: (context: CommandContext, partialArg: string) => Promise<string[]>;
96
135
  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;AA6IH,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,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 vimCommand: SlashCommand;
@@ -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,7 +4,7 @@
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import React from 'react';
7
- import { type ActiveFile, 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
- activeFile?: ActiveFile;
17
+ ideContext?: IdeContext;
18
18
  }
19
19
  export declare const ContextSummaryDisplay: React.FC<ContextSummaryDisplayProps>;
20
20
  export {};
@@ -1,29 +1,29 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { Text } from 'ink';
3
3
  import { Colors } from '../colors.js';
4
- import path from 'path';
5
- export const ContextSummaryDisplay = ({ geminiMdFileCount, contextFileNames, mcpServers, blockedMcpServers, showToolDescriptions, activeFile, }) => {
4
+ export const ContextSummaryDisplay = ({ geminiMdFileCount, contextFileNames, mcpServers, blockedMcpServers, showToolDescriptions, ideContext, }) => {
6
5
  const mcpServerCount = Object.keys(mcpServers || {}).length;
7
6
  const blockedMcpServerCount = blockedMcpServers?.length || 0;
7
+ const openFileCount = ideContext?.workspaceState?.openFiles?.length ?? 0;
8
8
  if (geminiMdFileCount === 0 &&
9
9
  mcpServerCount === 0 &&
10
10
  blockedMcpServerCount === 0 &&
11
- !activeFile?.filePath) {
11
+ openFileCount === 0) {
12
12
  return _jsx(Text, { children: " " }); // Render an empty space to reserve height
13
13
  }
14
- const activeFileText = (() => {
15
- if (!activeFile?.filePath) {
14
+ const openFilesText = (() => {
15
+ if (openFileCount === 0) {
16
16
  return '';
17
17
  }
18
- return `Open File (${path.basename(activeFile.filePath)})`;
18
+ return `${openFileCount} open file${openFileCount > 1 ? 's' : ''} (ctrl+e to view)`;
19
19
  })();
20
20
  const geminiMdText = (() => {
21
21
  if (geminiMdFileCount === 0) {
22
22
  return '';
23
23
  }
24
24
  const allNamesTheSame = new Set(contextFileNames).size < 2;
25
- const name = allNamesTheSame ? contextFileNames[0] : 'Context';
26
- return `${geminiMdFileCount} ${name} File${geminiMdFileCount > 1 ? 's' : ''}`;
25
+ const name = allNamesTheSame ? contextFileNames[0] : 'context';
26
+ return `${geminiMdFileCount} ${name} file${geminiMdFileCount > 1 ? 's' : ''}`;
27
27
  })();
28
28
  const mcpText = (() => {
29
29
  if (mcpServerCount === 0 && blockedMcpServerCount === 0) {
@@ -31,12 +31,12 @@ export const ContextSummaryDisplay = ({ geminiMdFileCount, contextFileNames, mcp
31
31
  }
32
32
  const parts = [];
33
33
  if (mcpServerCount > 0) {
34
- parts.push(`${mcpServerCount} MCP Server${mcpServerCount > 1 ? 's' : ''}`);
34
+ parts.push(`${mcpServerCount} MCP server${mcpServerCount > 1 ? 's' : ''}`);
35
35
  }
36
36
  if (blockedMcpServerCount > 0) {
37
37
  let blockedText = `${blockedMcpServerCount} Blocked`;
38
38
  if (mcpServerCount === 0) {
39
- blockedText += ` MCP Server${blockedMcpServerCount > 1 ? 's' : ''}`;
39
+ blockedText += ` MCP server${blockedMcpServerCount > 1 ? 's' : ''}`;
40
40
  }
41
41
  parts.push(blockedText);
42
42
  }
@@ -44,8 +44,8 @@ export const ContextSummaryDisplay = ({ geminiMdFileCount, contextFileNames, mcp
44
44
  })();
45
45
  let summaryText = 'Using: ';
46
46
  const summaryParts = [];
47
- if (activeFileText) {
48
- summaryParts.push(activeFileText);
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;AAEtC,OAAO,IAAI,MAAM,MAAM,CAAC;AAWxB,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,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,UAAU,EAAE,QAAQ,EACrB,CAAC;QACD,OAAO,KAAC,IAAI,oBAAS,CAAC,CAAC,0CAA0C;IACnE,CAAC;IA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AU,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"}
@@ -16,6 +16,7 @@ interface FooterProps {
16
16
  showMemoryUsage?: boolean;
17
17
  promptTokenCount: number;
18
18
  nightly: boolean;
19
+ vimMode?: string;
19
20
  }
20
21
  export declare const Footer: React.FC<FooterProps>;
21
22
  export {};
@@ -6,9 +6,9 @@ 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
- export const Footer = ({ model, targetDir, branchName, debugMode, debugMessage, corgiMode, errorCount, showErrorDetails, showMemoryUsage, promptTokenCount, nightly, }) => {
9
+ export const Footer = ({ model, targetDir, branchName, debugMode, debugMessage, corgiMode, errorCount, showErrorDetails, showMemoryUsage, promptTokenCount, nightly, vimMode, }) => {
10
10
  const limit = tokenLimit(model);
11
11
  const percentage = promptTokenCount / limit;
12
- return (_jsxs(Box, { marginTop: 1, justifyContent: "space-between", width: "100%", children: [_jsxs(Box, { children: [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, {})] })] }));
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
13
  };
14
14
  //# 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,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UAAU,GAAI,IAC7C,CACP,EACA,eAAe,IAAI,KAAC,kBAAkB,KAAG,IACtC,IACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -15,6 +15,6 @@ export const Header = ({ customAsciiArt, terminalWidth, version, nightly, }) =>
15
15
  terminalWidth >= widthOfLongLogo ? longAsciiLogo : shortAsciiLogo;
16
16
  }
17
17
  const artWidth = getAsciiArtWidth(displayTitle);
18
- return (_jsxs(Box, { marginBottom: 1, alignItems: "flex-start", width: artWidth, flexShrink: 0, flexDirection: "column", children: [Colors.GradientColors ? (_jsx(Gradient, { colors: Colors.GradientColors, children: _jsx(Text, { children: displayTitle }) })) : (_jsx(Text, { children: displayTitle })), nightly && (_jsx(Box, { width: "100%", flexDirection: "row", justifyContent: "flex-end", children: _jsx(Gradient, { colors: Colors.GradientColors, children: _jsxs(Text, { children: ["v", version] }) }) }))] }));
18
+ return (_jsxs(Box, { alignItems: "flex-start", width: artWidth, flexShrink: 0, flexDirection: "column", children: [Colors.GradientColors ? (_jsx(Gradient, { colors: Colors.GradientColors, children: _jsx(Text, { children: displayTitle }) })) : (_jsx(Text, { children: displayTitle })), nightly && (_jsx(Box, { width: "100%", flexDirection: "row", justifyContent: "flex-end", children: _jsx(Gradient, { colors: Colors.GradientColors, children: _jsxs(Text, { children: ["v", version] }) }) }))] }));
19
19
  };
20
20
  //# sourceMappingURL=Header.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Header.js","sourceRoot":"","sources":["../../../../src/ui/components/Header.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,QAAQ,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AASzD,MAAM,CAAC,MAAM,M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C,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AASzD,MAAM,CAAC,MAAM,MAAM,GAA0B,CAAC,EAC5C,cAAc,EACd,aAAa,EACb,OAAO,EACP,OAAO,GACR,EAAE,EAAE;IACH,IAAI,YAAY,CAAC;IACjB,MAAM,eAAe,GAAG,gBAAgB,CAAC,aAAa,CAAC,CAAC;IAExD,IAAI,cAAc,EAAE,CAAC;QACnB,YAAY,GAAG,cAAc,CAAC;IAChC,CAAC;SAAM,CAAC;QACN,YAAY;YACV,aAAa,IAAI,eAAe,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC;IACtE,CAAC;IAED,MAAM,QAAQ,GAAG,gBAAgB,CAAC,YAAY,CAAC,CAAC;IAEhD,OAAO,CACL,MAAC,GAAG,IACF,UAAU,EAAC,YAAY,EACvB,KAAK,EAAE,QAAQ,EACf,UAAU,EAAE,CAAC,EACb,aAAa,EAAC,QAAQ,aAErB,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,CACvB,KAAC,QAAQ,IAAC,MAAM,EAAE,MAAM,CAAC,cAAc,YACrC,KAAC,IAAI,cAAE,YAAY,GAAQ,GAClB,CACZ,CAAC,CAAC,CAAC,CACF,KAAC,IAAI,cAAE,YAAY,GAAQ,CAC5B,EACA,OAAO,IAAI,CACV,KAAC,GAAG,IAAC,KAAK,EAAC,MAAM,EAAC,aAAa,EAAC,KAAK,EAAC,cAAc,EAAC,UAAU,YAC7D,KAAC,QAAQ,IAAC,MAAM,EAAE,MAAM,CAAC,cAAc,YACrC,MAAC,IAAI,oBAAG,OAAO,IAAQ,GACd,GACP,CACP,IACG,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -6,7 +6,7 @@
6
6
  import React from 'react';
7
7
  import { SlashCommand } from '../commands/types.js';
8
8
  interface Help {
9
- commands: SlashCommand[];
9
+ commands: readonly SlashCommand[];
10
10
  }
11
11
  export declare const Help: React.FC<Help>;
12
12
  export {};
@@ -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
@@ -1 +1 @@
1
- {"version":3,"file":"Help.js","sourceRoot":"","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,CAAC,UAAU,aAC5B,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,YAAY,sBAE9B,EAAC,GAAG,sBAEN,EACP,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,aAC5B,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,YAAY,oBAE9B,EAAC,GAAG,0BAEN,EACP,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,aAC5B,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,YAAY,0BAE9B,EAAC,GAAG,qCAEN,EACP,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,aAC5B,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,YAAY,wBAE9B,EAAC,GAAG,2CAEN,EACP,KAAC,GAAG,IAAC,MAAM,EAAE,CAAC,GAAI,EAClB,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,kDACM,GAAG,EACrC,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,YAAY,2CAE9B,IACF,IACH,CACP,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type IdeContext } from '@google/gemini-cli-core';
7
+ interface IDEContextDetailDisplayProps {
8
+ ideContext: IdeContext | undefined;
9
+ detectedIdeDisplay: string | undefined;
10
+ }
11
+ export declare function IDEContextDetailDisplay({ ideContext, detectedIdeDisplay, }: IDEContextDetailDisplayProps): import("react/jsx-runtime").JSX.Element | null;
12
+ export {};
@@ -0,0 +1,12 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box, Text } from 'ink';
3
+ import path from 'node:path';
4
+ import { Colors } from '../colors.js';
5
+ export function IDEContextDetailDisplay({ ideContext, detectedIdeDisplay, }) {
6
+ const openFiles = ideContext?.workspaceState?.openFiles;
7
+ if (!openFiles || openFiles.length === 0) {
8
+ return null;
9
+ }
10
+ return (_jsxs(Box, { flexDirection: "column", marginTop: 1, borderStyle: "round", borderColor: Colors.AccentCyan, paddingX: 1, children: [_jsxs(Text, { color: Colors.AccentCyan, bold: true, children: [detectedIdeDisplay ? detectedIdeDisplay : 'IDE', " Context (ctrl+e to toggle)"] }), openFiles.length > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { bold: true, children: "Open files:" }), openFiles.map((file) => (_jsxs(Text, { children: ["- ", path.basename(file.path), file.isActive ? ' (active)' : ''] }, file.path)))] }))] }));
11
+ }
12
+ //# sourceMappingURL=IDEContextDetailDisplay.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IDEContextDetailDisplay.js","sourceRoot":"","sources":["../../../../src/ui/components/IDEContextDetailDisplay.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAOtC,MAAM,UAAU,uBAAuB,CAAC,EACtC,UAAU,EACV,kBAAkB,GACW;IAC7B,MAAM,SAAS,GAAG,UAAU,EAAE,cAAc,EAAE,SAAS,CAAC;IACxD,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACzC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,MAAC,GAAG,IACF,aAAa,EAAC,QAAQ,EACtB,SAAS,EAAE,CAAC,EACZ,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,MAAM,CAAC,UAAU,EAC9B,QAAQ,EAAE,CAAC,aAEX,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,EAAE,IAAI,mBACjC,kBAAkB,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,KAAK,mCAE3C,EACN,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,CACvB,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,SAAS,EAAE,CAAC,aACtC,KAAC,IAAI,IAAC,IAAI,kCAAmB,EAC5B,SAAS,CAAC,GAAG,CAAC,CAAC,IAAU,EAAE,EAAE,CAAC,CAC7B,MAAC,IAAI,qBACA,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,EAC1B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,KAFxB,IAAI,CAAC,IAAI,CAGb,CACR,CAAC,IACE,CACP,IACG,CACP,CAAC;AACJ,CAAC"}
@@ -5,6 +5,7 @@
5
5
  */
6
6
  import React from 'react';
7
7
  import { TextBuffer } from './shared/text-buffer.js';
8
+ import { Key } from '../hooks/useKeypress.js';
8
9
  import { CommandContext, SlashCommand } from '../commands/types.js';
9
10
  import { Config } from '@google/gemini-cli-core';
10
11
  export interface InputPromptProps {
@@ -13,7 +14,7 @@ export interface InputPromptProps {
13
14
  userMessages: readonly string[];
14
15
  onClearScreen: () => void;
15
16
  config: Config;
16
- slashCommands: SlashCommand[];
17
+ slashCommands: readonly SlashCommand[];
17
18
  commandContext: CommandContext;
18
19
  placeholder?: string;
19
20
  focus?: boolean;
@@ -21,5 +22,6 @@ export interface InputPromptProps {
21
22
  suggestionsWidth: number;
22
23
  shellModeActive: boolean;
23
24
  setShellModeActive: (value: boolean) => void;
25
+ vimHandleInput?: (key: Key) => boolean;
24
26
  }
25
27
  export declare const InputPrompt: React.FC<InputPromptProps>;
@@ -9,50 +9,24 @@ import { Box, Text } from 'ink';
9
9
  import { Colors } from '../colors.js';
10
10
  import { SuggestionsDisplay } from './SuggestionsDisplay.js';
11
11
  import { useInputHistory } from '../hooks/useInputHistory.js';
12
- import { cpSlice, cpLen, toCodePoints } from '../utils/textUtils.js';
12
+ import { cpSlice, cpLen } from '../utils/textUtils.js';
13
13
  import chalk from 'chalk';
14
14
  import stringWidth from 'string-width';
15
15
  import { useShellHistory } from '../hooks/useShellHistory.js';
16
16
  import { useCompletion } from '../hooks/useCompletion.js';
17
17
  import { useKeypress } from '../hooks/useKeypress.js';
18
- import { isAtCommand, isSlashCommand } from '../utils/commandUtils.js';
19
18
  import { clipboardHasImage, saveClipboardImage, cleanupOldClipboardImages, } from '../utils/clipboardUtils.js';
20
19
  import * as path from 'path';
21
- export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, config, slashCommands, commandContext, placeholder = ' Type your message or @path/to/file', focus = true, inputWidth, suggestionsWidth, shellModeActive, setShellModeActive, }) => {
20
+ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, config, slashCommands, commandContext, placeholder = ' Type your message or @path/to/file', focus = true, inputWidth, suggestionsWidth, shellModeActive, setShellModeActive, vimHandleInput, }) => {
22
21
  const [justNavigatedHistory, setJustNavigatedHistory] = useState(false);
23
- // Check if cursor is after @ or / without unescaped spaces
24
- const isCursorAfterCommandWithoutSpace = useCallback(() => {
25
- const [row, col] = buffer.cursor;
26
- const currentLine = buffer.lines[row] || '';
27
- // Convert current line to code points for Unicode-aware processing
28
- const codePoints = toCodePoints(currentLine);
29
- // Search backwards from cursor position within the current line only
30
- for (let i = col - 1; i >= 0; i--) {
31
- const char = codePoints[i];
32
- if (char === ' ') {
33
- // Check if this space is escaped by counting backslashes before it
34
- let backslashCount = 0;
35
- for (let j = i - 1; j >= 0 && codePoints[j] === '\\'; j--) {
36
- backslashCount++;
37
- }
38
- // If there's an odd number of backslashes, the space is escaped
39
- const isEscaped = backslashCount % 2 === 1;
40
- if (!isEscaped) {
41
- // Found unescaped space before @ or /, return false
42
- return false;
43
- }
44
- // If escaped, continue searching backwards
45
- }
46
- else if (char === '@' || char === '/') {
47
- // Found @ or / without unescaped space in between
48
- return true;
49
- }
22
+ const [dirs, setDirs] = useState(config.getWorkspaceContext().getDirectories());
23
+ const dirsChanged = config.getWorkspaceContext().getDirectories();
24
+ useEffect(() => {
25
+ if (dirs.length !== dirsChanged.length) {
26
+ setDirs(dirsChanged);
50
27
  }
51
- return false;
52
- }, [buffer.cursor, buffer.lines]);
53
- const shouldShowCompletion = useCallback(() => (isAtCommand(buffer.text) || isSlashCommand(buffer.text)) &&
54
- isCursorAfterCommandWithoutSpace(), [buffer.text, isCursorAfterCommandWithoutSpace]);
55
- const completion = useCompletion(buffer.text, config.getTargetDir(), shouldShowCompletion(), slashCommands, commandContext, config);
28
+ }, [dirs.length, dirsChanged]);
29
+ const completion = useCompletion(buffer, dirs, config.getTargetDir(), slashCommands, commandContext, config);
56
30
  const resetCompletionState = completion.resetCompletionState;
57
31
  const shellHistory = useShellHistory(config.getProjectRoot());
58
32
  const handleSubmitAndClear = useCallback((submittedValue) => {
@@ -89,63 +63,6 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
89
63
  resetCompletionState,
90
64
  setJustNavigatedHistory,
91
65
  ]);
92
- const completionSuggestions = completion.suggestions;
93
- const handleAutocomplete = useCallback((indexToUse) => {
94
- if (indexToUse < 0 || indexToUse >= completionSuggestions.length) {
95
- return;
96
- }
97
- const query = buffer.text;
98
- const suggestion = completionSuggestions[indexToUse].value;
99
- if (query.trimStart().startsWith('/')) {
100
- const hasTrailingSpace = query.endsWith(' ');
101
- const parts = query
102
- .trimStart()
103
- .substring(1)
104
- .split(/\s+/)
105
- .filter(Boolean);
106
- let isParentPath = false;
107
- // If there's no trailing space, we need to check if the current query
108
- // is already a complete path to a parent command.
109
- if (!hasTrailingSpace) {
110
- let currentLevel = slashCommands;
111
- for (let i = 0; i < parts.length; i++) {
112
- const part = parts[i];
113
- const found = currentLevel?.find((cmd) => cmd.name === part || cmd.altName === part);
114
- if (found) {
115
- if (i === parts.length - 1 && found.subCommands) {
116
- isParentPath = true;
117
- }
118
- currentLevel = found.subCommands;
119
- }
120
- else {
121
- // Path is invalid, so it can't be a parent path.
122
- currentLevel = undefined;
123
- break;
124
- }
125
- }
126
- }
127
- // Determine the base path of the command.
128
- // - If there's a trailing space, the whole command is the base.
129
- // - If it's a known parent path, the whole command is the base.
130
- // - Otherwise, the base is everything EXCEPT the last partial part.
131
- const basePath = hasTrailingSpace || isParentPath ? parts : parts.slice(0, -1);
132
- const newValue = `/${[...basePath, suggestion].join(' ')}`;
133
- buffer.setText(newValue);
134
- }
135
- else {
136
- const atIndex = query.lastIndexOf('@');
137
- if (atIndex === -1)
138
- return;
139
- const pathPart = query.substring(atIndex + 1);
140
- const lastSlashIndexInPath = pathPart.lastIndexOf('/');
141
- let autoCompleteStartIndex = atIndex + 1;
142
- if (lastSlashIndexInPath !== -1) {
143
- autoCompleteStartIndex += lastSlashIndexInPath + 1;
144
- }
145
- buffer.replaceRangeByOffset(autoCompleteStartIndex, buffer.text.length, suggestion);
146
- }
147
- resetCompletionState();
148
- }, [resetCompletionState, buffer, completionSuggestions, slashCommands]);
149
66
  // Handle clipboard image pasting with Ctrl+V
150
67
  const handleClipboardImage = useCallback(async () => {
151
68
  try {
@@ -188,7 +105,11 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
188
105
  }
189
106
  }, [buffer, config]);
190
107
  const handleInput = useCallback((key) => {
191
- if (!focus) {
108
+ /// We want to handle paste even when not focused to support drag and drop.
109
+ if (!focus && !key.paste) {
110
+ return;
111
+ }
112
+ if (vimHandleInput && vimHandleInput(key)) {
192
113
  return;
193
114
  }
194
115
  if (key.sequence === '!' &&
@@ -219,11 +140,11 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
219
140
  }
220
141
  if (completion.showSuggestions) {
221
142
  if (completion.suggestions.length > 1) {
222
- if (key.name === 'up') {
143
+ if (key.name === 'up' || (key.ctrl && key.name === 'p')) {
223
144
  completion.navigateUp();
224
145
  return;
225
146
  }
226
- if (key.name === 'down') {
147
+ if (key.name === 'down' || (key.ctrl && key.name === 'n')) {
227
148
  completion.navigateDown();
228
149
  return;
229
150
  }
@@ -234,7 +155,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
234
155
  ? 0 // Default to the first if none is active
235
156
  : completion.activeSuggestionIndex;
236
157
  if (targetIndex < completion.suggestions.length) {
237
- handleAutocomplete(targetIndex);
158
+ completion.handleAutocomplete(targetIndex);
238
159
  }
239
160
  }
240
161
  return;
@@ -337,7 +258,7 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
337
258
  handleClipboardImage();
338
259
  return;
339
260
  }
340
- // Fallback to the text buffer's default input handling for all other keys
261
+ // Fall back to the text buffer's default input handling for all other keys
341
262
  buffer.handleInput(key);
342
263
  }, [
343
264
  focus,
@@ -347,13 +268,13 @@ export const InputPrompt = ({ buffer, onSubmit, userMessages, onClearScreen, con
347
268
  setShellModeActive,
348
269
  onClearScreen,
349
270
  inputHistory,
350
- handleAutocomplete,
351
271
  handleSubmitAndClear,
352
272
  shellHistory,
353
273
  handleClipboardImage,
354
274
  resetCompletionState,
275
+ vimHandleInput,
355
276
  ]);
356
- useKeypress(handleInput, { isActive: focus });
277
+ useKeypress(handleInput, { isActive: true });
357
278
  const linesToRender = buffer.viewportVisualLines;
358
279
  const [cursorVisualRowAbsolute, cursorVisualColAbsolute] = buffer.visualCursor;
359
280
  const scrollVisualRow = buffer.visualScrollRow;