@machina.ai/cell-cli 0.1.13-rc2

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 (475) hide show
  1. package/dist/.last_build +0 -0
  2. package/dist/index.d.ts +7 -0
  3. package/dist/index.js +20 -0
  4. package/dist/index.js.map +1 -0
  5. package/dist/package.json +79 -0
  6. package/dist/src/acp/acp.d.ts +208 -0
  7. package/dist/src/acp/acp.js +193 -0
  8. package/dist/src/acp/acp.js.map +1 -0
  9. package/dist/src/acp/acpPeer.d.ts +8 -0
  10. package/dist/src/acp/acpPeer.js +537 -0
  11. package/dist/src/acp/acpPeer.js.map +1 -0
  12. package/dist/src/config/auth.d.ts +6 -0
  13. package/dist/src/config/auth.js +15 -0
  14. package/dist/src/config/auth.js.map +1 -0
  15. package/dist/src/config/config.d.ts +39 -0
  16. package/dist/src/config/config.js +359 -0
  17. package/dist/src/config/config.js.map +1 -0
  18. package/dist/src/config/extension.d.ts +21 -0
  19. package/dist/src/config/extension.js +114 -0
  20. package/dist/src/config/extension.js.map +1 -0
  21. package/dist/src/config/sandboxConfig.d.ts +13 -0
  22. package/dist/src/config/sandboxConfig.js +75 -0
  23. package/dist/src/config/sandboxConfig.js.map +1 -0
  24. package/dist/src/config/settings.d.ts +91 -0
  25. package/dist/src/config/settings.js +282 -0
  26. package/dist/src/config/settings.js.map +1 -0
  27. package/dist/src/gemini.d.ts +6 -0
  28. package/dist/src/gemini.js +242 -0
  29. package/dist/src/gemini.js.map +1 -0
  30. package/dist/src/generated/git-commit.d.ts +6 -0
  31. package/dist/src/generated/git-commit.js +9 -0
  32. package/dist/src/generated/git-commit.js.map +1 -0
  33. package/dist/src/nonInteractiveCli.d.ts +7 -0
  34. package/dist/src/nonInteractiveCli.js +124 -0
  35. package/dist/src/nonInteractiveCli.js.map +1 -0
  36. package/dist/src/services/BuiltinCommandLoader.d.ts +24 -0
  37. package/dist/src/services/BuiltinCommandLoader.js +70 -0
  38. package/dist/src/services/BuiltinCommandLoader.js.map +1 -0
  39. package/dist/src/services/CommandService.d.ts +51 -0
  40. package/dist/src/services/CommandService.js +74 -0
  41. package/dist/src/services/CommandService.js.map +1 -0
  42. package/dist/src/services/FileCommandLoader.d.ts +37 -0
  43. package/dist/src/services/FileCommandLoader.js +133 -0
  44. package/dist/src/services/FileCommandLoader.js.map +1 -0
  45. package/dist/src/services/types.d.ts +22 -0
  46. package/dist/src/services/types.js +7 -0
  47. package/dist/src/services/types.js.map +1 -0
  48. package/dist/src/ui/App.d.ts +15 -0
  49. package/dist/src/ui/App.js +488 -0
  50. package/dist/src/ui/App.js.map +1 -0
  51. package/dist/src/ui/colors.d.ts +7 -0
  52. package/dist/src/ui/colors.js +48 -0
  53. package/dist/src/ui/colors.js.map +1 -0
  54. package/dist/src/ui/commands/aboutCommand.d.ts +7 -0
  55. package/dist/src/ui/commands/aboutCommand.js +39 -0
  56. package/dist/src/ui/commands/aboutCommand.js.map +1 -0
  57. package/dist/src/ui/commands/authCommand.d.ts +7 -0
  58. package/dist/src/ui/commands/authCommand.js +16 -0
  59. package/dist/src/ui/commands/authCommand.js.map +1 -0
  60. package/dist/src/ui/commands/bugCommand.d.ts +7 -0
  61. package/dist/src/ui/commands/bugCommand.js +63 -0
  62. package/dist/src/ui/commands/bugCommand.js.map +1 -0
  63. package/dist/src/ui/commands/chatCommand.d.ts +7 -0
  64. package/dist/src/ui/commands/chatCommand.js +174 -0
  65. package/dist/src/ui/commands/chatCommand.js.map +1 -0
  66. package/dist/src/ui/commands/clearCommand.d.ts +7 -0
  67. package/dist/src/ui/commands/clearCommand.js +27 -0
  68. package/dist/src/ui/commands/clearCommand.js.map +1 -0
  69. package/dist/src/ui/commands/compressCommand.d.ts +7 -0
  70. package/dist/src/ui/commands/compressCommand.js +64 -0
  71. package/dist/src/ui/commands/compressCommand.js.map +1 -0
  72. package/dist/src/ui/commands/copyCommand.d.ts +7 -0
  73. package/dist/src/ui/commands/copyCommand.js +59 -0
  74. package/dist/src/ui/commands/copyCommand.js.map +1 -0
  75. package/dist/src/ui/commands/corgiCommand.d.ts +7 -0
  76. package/dist/src/ui/commands/corgiCommand.js +15 -0
  77. package/dist/src/ui/commands/corgiCommand.js.map +1 -0
  78. package/dist/src/ui/commands/docsCommand.d.ts +7 -0
  79. package/dist/src/ui/commands/docsCommand.js +31 -0
  80. package/dist/src/ui/commands/docsCommand.js.map +1 -0
  81. package/dist/src/ui/commands/editorCommand.d.ts +7 -0
  82. package/dist/src/ui/commands/editorCommand.js +16 -0
  83. package/dist/src/ui/commands/editorCommand.js.map +1 -0
  84. package/dist/src/ui/commands/extensionsCommand.d.ts +7 -0
  85. package/dist/src/ui/commands/extensionsCommand.js +31 -0
  86. package/dist/src/ui/commands/extensionsCommand.js.map +1 -0
  87. package/dist/src/ui/commands/helpCommand.d.ts +7 -0
  88. package/dist/src/ui/commands/helpCommand.js +20 -0
  89. package/dist/src/ui/commands/helpCommand.js.map +1 -0
  90. package/dist/src/ui/commands/ideCommand.d.ts +8 -0
  91. package/dist/src/ui/commands/ideCommand.js +127 -0
  92. package/dist/src/ui/commands/ideCommand.js.map +1 -0
  93. package/dist/src/ui/commands/mcpCommand.d.ts +7 -0
  94. package/dist/src/ui/commands/mcpCommand.js +206 -0
  95. package/dist/src/ui/commands/mcpCommand.js.map +1 -0
  96. package/dist/src/ui/commands/memoryCommand.d.ts +7 -0
  97. package/dist/src/ui/commands/memoryCommand.js +86 -0
  98. package/dist/src/ui/commands/memoryCommand.js.map +1 -0
  99. package/dist/src/ui/commands/privacyCommand.d.ts +7 -0
  100. package/dist/src/ui/commands/privacyCommand.js +16 -0
  101. package/dist/src/ui/commands/privacyCommand.js.map +1 -0
  102. package/dist/src/ui/commands/quitCommand.d.ts +7 -0
  103. package/dist/src/ui/commands/quitCommand.js +34 -0
  104. package/dist/src/ui/commands/quitCommand.js.map +1 -0
  105. package/dist/src/ui/commands/restoreCommand.d.ts +8 -0
  106. package/dist/src/ui/commands/restoreCommand.js +128 -0
  107. package/dist/src/ui/commands/restoreCommand.js.map +1 -0
  108. package/dist/src/ui/commands/statsCommand.d.ts +7 -0
  109. package/dist/src/ui/commands/statsCommand.js +54 -0
  110. package/dist/src/ui/commands/statsCommand.js.map +1 -0
  111. package/dist/src/ui/commands/themeCommand.d.ts +7 -0
  112. package/dist/src/ui/commands/themeCommand.js +16 -0
  113. package/dist/src/ui/commands/themeCommand.js.map +1 -0
  114. package/dist/src/ui/commands/toolsCommand.d.ts +7 -0
  115. package/dist/src/ui/commands/toolsCommand.js +56 -0
  116. package/dist/src/ui/commands/toolsCommand.js.map +1 -0
  117. package/dist/src/ui/commands/types.d.ts +110 -0
  118. package/dist/src/ui/commands/types.js +11 -0
  119. package/dist/src/ui/commands/types.js.map +1 -0
  120. package/dist/src/ui/components/AboutBox.d.ts +16 -0
  121. package/dist/src/ui/components/AboutBox.js +6 -0
  122. package/dist/src/ui/components/AboutBox.js.map +1 -0
  123. package/dist/src/ui/components/AsciiArt.d.ts +7 -0
  124. package/dist/src/ui/components/AsciiArt.js +32 -0
  125. package/dist/src/ui/components/AsciiArt.js.map +1 -0
  126. package/dist/src/ui/components/AuthDialog.d.ts +15 -0
  127. package/dist/src/ui/components/AuthDialog.js +50 -0
  128. package/dist/src/ui/components/AuthDialog.js.map +1 -0
  129. package/dist/src/ui/components/AuthInProgress.d.ts +11 -0
  130. package/dist/src/ui/components/AuthInProgress.js +27 -0
  131. package/dist/src/ui/components/AuthInProgress.js.map +1 -0
  132. package/dist/src/ui/components/AutoAcceptIndicator.d.ts +12 -0
  133. package/dist/src/ui/components/AutoAcceptIndicator.js +26 -0
  134. package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -0
  135. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +11 -0
  136. package/dist/src/ui/components/ConsoleSummaryDisplay.js +11 -0
  137. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +1 -0
  138. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +20 -0
  139. package/dist/src/ui/components/ContextSummaryDisplay.js +68 -0
  140. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -0
  141. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +14 -0
  142. package/dist/src/ui/components/DetailedMessagesDisplay.js +34 -0
  143. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +1 -0
  144. package/dist/src/ui/components/EditorSettingsDialog.d.ts +15 -0
  145. package/dist/src/ui/components/EditorSettingsDialog.js +73 -0
  146. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -0
  147. package/dist/src/ui/components/Footer.d.ts +21 -0
  148. package/dist/src/ui/components/Footer.js +14 -0
  149. package/dist/src/ui/components/Footer.js.map +1 -0
  150. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +17 -0
  151. package/dist/src/ui/components/GeminiRespondingSpinner.js +16 -0
  152. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +1 -0
  153. package/dist/src/ui/components/Header.d.ts +14 -0
  154. package/dist/src/ui/components/Header.js +20 -0
  155. package/dist/src/ui/components/Header.js.map +1 -0
  156. package/dist/src/ui/components/Help.d.ts +12 -0
  157. package/dist/src/ui/components/Help.js +10 -0
  158. package/dist/src/ui/components/Help.js.map +1 -0
  159. package/dist/src/ui/components/HistoryItemDisplay.d.ts +18 -0
  160. package/dist/src/ui/components/HistoryItemDisplay.js +17 -0
  161. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -0
  162. package/dist/src/ui/components/InputPrompt.d.ts +25 -0
  163. package/dist/src/ui/components/InputPrompt.js +387 -0
  164. package/dist/src/ui/components/InputPrompt.js.map +1 -0
  165. package/dist/src/ui/components/LoadingIndicator.d.ts +15 -0
  166. package/dist/src/ui/components/LoadingIndicator.js +20 -0
  167. package/dist/src/ui/components/LoadingIndicator.js.map +1 -0
  168. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +7 -0
  169. package/dist/src/ui/components/MemoryUsageDisplay.js +27 -0
  170. package/dist/src/ui/components/MemoryUsageDisplay.js.map +1 -0
  171. package/dist/src/ui/components/ModelStatsDisplay.d.ts +7 -0
  172. package/dist/src/ui/components/ModelStatsDisplay.js +33 -0
  173. package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -0
  174. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +11 -0
  175. package/dist/src/ui/components/SessionSummaryDisplay.js +4 -0
  176. package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -0
  177. package/dist/src/ui/components/ShellModeIndicator.d.ts +7 -0
  178. package/dist/src/ui/components/ShellModeIndicator.js +5 -0
  179. package/dist/src/ui/components/ShellModeIndicator.js.map +1 -0
  180. package/dist/src/ui/components/ShowMoreLines.d.ts +10 -0
  181. package/dist/src/ui/components/ShowMoreLines.js +24 -0
  182. package/dist/src/ui/components/ShowMoreLines.js.map +1 -0
  183. package/dist/src/ui/components/StatsDisplay.d.ts +12 -0
  184. package/dist/src/ui/components/StatsDisplay.js +42 -0
  185. package/dist/src/ui/components/StatsDisplay.js.map +1 -0
  186. package/dist/src/ui/components/SuggestionsDisplay.d.ts +21 -0
  187. package/dist/src/ui/components/SuggestionsDisplay.js +32 -0
  188. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -0
  189. package/dist/src/ui/components/ThemeDialog.d.ts +19 -0
  190. package/dist/src/ui/components/ThemeDialog.js +148 -0
  191. package/dist/src/ui/components/ThemeDialog.js.map +1 -0
  192. package/dist/src/ui/components/Tips.d.ts +12 -0
  193. package/dist/src/ui/components/Tips.js +8 -0
  194. package/dist/src/ui/components/Tips.js.map +1 -0
  195. package/dist/src/ui/components/ToolStatsDisplay.d.ts +7 -0
  196. package/dist/src/ui/components/ToolStatsDisplay.js +41 -0
  197. package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -0
  198. package/dist/src/ui/components/UpdateNotification.d.ts +10 -0
  199. package/dist/src/ui/components/UpdateNotification.js +10 -0
  200. package/dist/src/ui/components/UpdateNotification.js.map +1 -0
  201. package/dist/src/ui/components/messages/CompressionMessage.d.ts +11 -0
  202. package/dist/src/ui/components/messages/CompressionMessage.js +16 -0
  203. package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -0
  204. package/dist/src/ui/components/messages/DiffRenderer.d.ts +16 -0
  205. package/dist/src/ui/components/messages/DiffRenderer.js +212 -0
  206. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -0
  207. package/dist/src/ui/components/messages/ErrorMessage.d.ts +11 -0
  208. package/dist/src/ui/components/messages/ErrorMessage.js +9 -0
  209. package/dist/src/ui/components/messages/ErrorMessage.js.map +1 -0
  210. package/dist/src/ui/components/messages/GeminiMessage.d.ts +14 -0
  211. package/dist/src/ui/components/messages/GeminiMessage.js +10 -0
  212. package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -0
  213. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +14 -0
  214. package/dist/src/ui/components/messages/GeminiMessageContent.js +15 -0
  215. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +1 -0
  216. package/dist/src/ui/components/messages/InfoMessage.d.ts +11 -0
  217. package/dist/src/ui/components/messages/InfoMessage.js +9 -0
  218. package/dist/src/ui/components/messages/InfoMessage.js.map +1 -0
  219. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +15 -0
  220. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +111 -0
  221. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -0
  222. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +18 -0
  223. package/dist/src/ui/components/messages/ToolGroupMessage.js +55 -0
  224. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -0
  225. package/dist/src/ui/components/messages/ToolMessage.d.ts +15 -0
  226. package/dist/src/ui/components/messages/ToolMessage.js +61 -0
  227. package/dist/src/ui/components/messages/ToolMessage.js.map +1 -0
  228. package/dist/src/ui/components/messages/UserMessage.d.ts +11 -0
  229. package/dist/src/ui/components/messages/UserMessage.js +9 -0
  230. package/dist/src/ui/components/messages/UserMessage.js.map +1 -0
  231. package/dist/src/ui/components/messages/UserShellMessage.d.ts +11 -0
  232. package/dist/src/ui/components/messages/UserShellMessage.js +9 -0
  233. package/dist/src/ui/components/messages/UserShellMessage.js.map +1 -0
  234. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +61 -0
  235. package/dist/src/ui/components/shared/MaxSizedBox.js +451 -0
  236. package/dist/src/ui/components/shared/MaxSizedBox.js.map +1 -0
  237. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +46 -0
  238. package/dist/src/ui/components/shared/RadioButtonSelect.js +119 -0
  239. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +1 -0
  240. package/dist/src/ui/components/shared/text-buffer.d.ts +184 -0
  241. package/dist/src/ui/components/shared/text-buffer.js +1010 -0
  242. package/dist/src/ui/components/shared/text-buffer.js.map +1 -0
  243. package/dist/src/ui/constants.d.ts +9 -0
  244. package/dist/src/ui/constants.js +13 -0
  245. package/dist/src/ui/constants.js.map +1 -0
  246. package/dist/src/ui/contexts/OverflowContext.d.ts +19 -0
  247. package/dist/src/ui/contexts/OverflowContext.js +43 -0
  248. package/dist/src/ui/contexts/OverflowContext.js.map +1 -0
  249. package/dist/src/ui/contexts/SessionContext.d.ts +36 -0
  250. package/dist/src/ui/contexts/SessionContext.js +59 -0
  251. package/dist/src/ui/contexts/SessionContext.js.map +1 -0
  252. package/dist/src/ui/contexts/StreamingContext.d.ts +9 -0
  253. package/dist/src/ui/contexts/StreamingContext.js +15 -0
  254. package/dist/src/ui/contexts/StreamingContext.js.map +1 -0
  255. package/dist/src/ui/editors/editorSettingsManager.d.ts +19 -0
  256. package/dist/src/ui/editors/editorSettingsManager.js +54 -0
  257. package/dist/src/ui/editors/editorSettingsManager.js.map +1 -0
  258. package/dist/src/ui/hooks/atCommandProcessor.d.ts +31 -0
  259. package/dist/src/ui/hooks/atCommandProcessor.js +347 -0
  260. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -0
  261. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +16 -0
  262. package/dist/src/ui/hooks/shellCommandProcessor.js +295 -0
  263. package/dist/src/ui/hooks/shellCommandProcessor.js.map +1 -0
  264. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +20 -0
  265. package/dist/src/ui/hooks/slashCommandProcessor.js +294 -0
  266. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -0
  267. package/dist/src/ui/hooks/useAuthCommand.d.ts +14 -0
  268. package/dist/src/ui/hooks/useAuthCommand.js +65 -0
  269. package/dist/src/ui/hooks/useAuthCommand.js.map +1 -0
  270. package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +10 -0
  271. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +37 -0
  272. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -0
  273. package/dist/src/ui/hooks/useBracketedPaste.d.ts +12 -0
  274. package/dist/src/ui/hooks/useBracketedPaste.js +32 -0
  275. package/dist/src/ui/hooks/useBracketedPaste.js.map +1 -0
  276. package/dist/src/ui/hooks/useCompletion.d.ts +22 -0
  277. package/dist/src/ui/hooks/useCompletion.js +393 -0
  278. package/dist/src/ui/hooks/useCompletion.js.map +1 -0
  279. package/dist/src/ui/hooks/useConsoleMessages.d.ts +12 -0
  280. package/dist/src/ui/hooks/useConsoleMessages.js +60 -0
  281. package/dist/src/ui/hooks/useConsoleMessages.js.map +1 -0
  282. package/dist/src/ui/hooks/useEditorSettings.d.ts +16 -0
  283. package/dist/src/ui/hooks/useEditorSettings.js +43 -0
  284. package/dist/src/ui/hooks/useEditorSettings.js.map +1 -0
  285. package/dist/src/ui/hooks/useFocus.d.ts +6 -0
  286. package/dist/src/ui/hooks/useFocus.js +41 -0
  287. package/dist/src/ui/hooks/useFocus.js.map +1 -0
  288. package/dist/src/ui/hooks/useGeminiStream.d.ts +23 -0
  289. package/dist/src/ui/hooks/useGeminiStream.js +613 -0
  290. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -0
  291. package/dist/src/ui/hooks/useGitBranchName.d.ts +6 -0
  292. package/dist/src/ui/hooks/useGitBranchName.js +61 -0
  293. package/dist/src/ui/hooks/useGitBranchName.js.map +1 -0
  294. package/dist/src/ui/hooks/useHistoryManager.d.ts +22 -0
  295. package/dist/src/ui/hooks/useHistoryManager.js +72 -0
  296. package/dist/src/ui/hooks/useHistoryManager.js.map +1 -0
  297. package/dist/src/ui/hooks/useInputHistory.d.ts +19 -0
  298. package/dist/src/ui/hooks/useInputHistory.js +84 -0
  299. package/dist/src/ui/hooks/useInputHistory.js.map +1 -0
  300. package/dist/src/ui/hooks/useKeypress.d.ts +29 -0
  301. package/dist/src/ui/hooks/useKeypress.js +156 -0
  302. package/dist/src/ui/hooks/useKeypress.js.map +1 -0
  303. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +10 -0
  304. package/dist/src/ui/hooks/useLoadingIndicator.js +44 -0
  305. package/dist/src/ui/hooks/useLoadingIndicator.js.map +1 -0
  306. package/dist/src/ui/hooks/useLogger.d.ts +10 -0
  307. package/dist/src/ui/hooks/useLogger.js +29 -0
  308. package/dist/src/ui/hooks/useLogger.js.map +1 -0
  309. package/dist/src/ui/hooks/usePhraseCycler.d.ts +14 -0
  310. package/dist/src/ui/hooks/usePhraseCycler.js +189 -0
  311. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -0
  312. package/dist/src/ui/hooks/usePrivacySettings.d.ts +16 -0
  313. package/dist/src/ui/hooks/usePrivacySettings.js +115 -0
  314. package/dist/src/ui/hooks/usePrivacySettings.js.map +1 -0
  315. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +33 -0
  316. package/dist/src/ui/hooks/useReactToolScheduler.js +186 -0
  317. package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -0
  318. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +6 -0
  319. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +7 -0
  320. package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +1 -0
  321. package/dist/src/ui/hooks/useShellHistory.d.ts +11 -0
  322. package/dist/src/ui/hooks/useShellHistory.js +89 -0
  323. package/dist/src/ui/hooks/useShellHistory.js.map +1 -0
  324. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +9 -0
  325. package/dist/src/ui/hooks/useShowMemoryCommand.js +58 -0
  326. package/dist/src/ui/hooks/useShowMemoryCommand.js.map +1 -0
  327. package/dist/src/ui/hooks/useStateAndRef.d.ts +7 -0
  328. package/dist/src/ui/hooks/useStateAndRef.js +26 -0
  329. package/dist/src/ui/hooks/useStateAndRef.js.map +1 -0
  330. package/dist/src/ui/hooks/useTerminalSize.d.ts +9 -0
  331. package/dist/src/ui/hooks/useTerminalSize.js +27 -0
  332. package/dist/src/ui/hooks/useTerminalSize.js.map +1 -0
  333. package/dist/src/ui/hooks/useThemeCommand.d.ts +15 -0
  334. package/dist/src/ui/hooks/useThemeCommand.js +79 -0
  335. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -0
  336. package/dist/src/ui/hooks/useTimer.d.ts +12 -0
  337. package/dist/src/ui/hooks/useTimer.js +58 -0
  338. package/dist/src/ui/hooks/useTimer.js.map +1 -0
  339. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +12 -0
  340. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +40 -0
  341. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +1 -0
  342. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +10 -0
  343. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +17 -0
  344. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +1 -0
  345. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +10 -0
  346. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +17 -0
  347. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +1 -0
  348. package/dist/src/ui/privacy/PrivacyNotice.d.ts +12 -0
  349. package/dist/src/ui/privacy/PrivacyNotice.js +25 -0
  350. package/dist/src/ui/privacy/PrivacyNotice.js.map +1 -0
  351. package/dist/src/ui/themes/ansi-light.d.ts +7 -0
  352. package/dist/src/ui/themes/ansi-light.js +139 -0
  353. package/dist/src/ui/themes/ansi-light.js.map +1 -0
  354. package/dist/src/ui/themes/ansi.d.ts +7 -0
  355. package/dist/src/ui/themes/ansi.js +149 -0
  356. package/dist/src/ui/themes/ansi.js.map +1 -0
  357. package/dist/src/ui/themes/atom-one-dark.d.ts +7 -0
  358. package/dist/src/ui/themes/atom-one-dark.js +136 -0
  359. package/dist/src/ui/themes/atom-one-dark.js.map +1 -0
  360. package/dist/src/ui/themes/ayu-light.d.ts +7 -0
  361. package/dist/src/ui/themes/ayu-light.js +128 -0
  362. package/dist/src/ui/themes/ayu-light.js.map +1 -0
  363. package/dist/src/ui/themes/ayu.d.ts +7 -0
  364. package/dist/src/ui/themes/ayu.js +102 -0
  365. package/dist/src/ui/themes/ayu.js.map +1 -0
  366. package/dist/src/ui/themes/color-utils.d.ts +21 -0
  367. package/dist/src/ui/themes/color-utils.js +221 -0
  368. package/dist/src/ui/themes/color-utils.js.map +1 -0
  369. package/dist/src/ui/themes/default-light.d.ts +7 -0
  370. package/dist/src/ui/themes/default-light.js +100 -0
  371. package/dist/src/ui/themes/default-light.js.map +1 -0
  372. package/dist/src/ui/themes/default.d.ts +7 -0
  373. package/dist/src/ui/themes/default.js +143 -0
  374. package/dist/src/ui/themes/default.js.map +1 -0
  375. package/dist/src/ui/themes/dracula.d.ts +7 -0
  376. package/dist/src/ui/themes/dracula.js +113 -0
  377. package/dist/src/ui/themes/dracula.js.map +1 -0
  378. package/dist/src/ui/themes/github-dark.d.ts +7 -0
  379. package/dist/src/ui/themes/github-dark.js +136 -0
  380. package/dist/src/ui/themes/github-dark.js.map +1 -0
  381. package/dist/src/ui/themes/github-light.d.ts +7 -0
  382. package/dist/src/ui/themes/github-light.js +138 -0
  383. package/dist/src/ui/themes/github-light.js.map +1 -0
  384. package/dist/src/ui/themes/googlecode.d.ts +7 -0
  385. package/dist/src/ui/themes/googlecode.js +135 -0
  386. package/dist/src/ui/themes/googlecode.js.map +1 -0
  387. package/dist/src/ui/themes/no-color.d.ts +7 -0
  388. package/dist/src/ui/themes/no-color.js +84 -0
  389. package/dist/src/ui/themes/no-color.js.map +1 -0
  390. package/dist/src/ui/themes/shades-of-purple.d.ts +11 -0
  391. package/dist/src/ui/themes/shades-of-purple.js +302 -0
  392. package/dist/src/ui/themes/shades-of-purple.js.map +1 -0
  393. package/dist/src/ui/themes/theme-manager.d.ts +58 -0
  394. package/dist/src/ui/themes/theme-manager.js +179 -0
  395. package/dist/src/ui/themes/theme-manager.js.map +1 -0
  396. package/dist/src/ui/themes/theme.d.ts +84 -0
  397. package/dist/src/ui/themes/theme.js +341 -0
  398. package/dist/src/ui/themes/theme.js.map +1 -0
  399. package/dist/src/ui/themes/xcode.d.ts +7 -0
  400. package/dist/src/ui/themes/xcode.js +143 -0
  401. package/dist/src/ui/themes/xcode.js.map +1 -0
  402. package/dist/src/ui/types.d.ts +180 -0
  403. package/dist/src/ui/types.js +43 -0
  404. package/dist/src/ui/types.js.map +1 -0
  405. package/dist/src/ui/utils/CodeColorizer.d.ts +15 -0
  406. package/dist/src/ui/utils/CodeColorizer.js +97 -0
  407. package/dist/src/ui/utils/CodeColorizer.js.map +1 -0
  408. package/dist/src/ui/utils/ConsolePatcher.d.ts +23 -0
  409. package/dist/src/ui/utils/ConsolePatcher.js +42 -0
  410. package/dist/src/ui/utils/ConsolePatcher.js.map +1 -0
  411. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +16 -0
  412. package/dist/src/ui/utils/InlineMarkdownRenderer.js +104 -0
  413. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +1 -0
  414. package/dist/src/ui/utils/MarkdownDisplay.d.ts +14 -0
  415. package/dist/src/ui/utils/MarkdownDisplay.js +205 -0
  416. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -0
  417. package/dist/src/ui/utils/TableRenderer.d.ts +17 -0
  418. package/dist/src/ui/utils/TableRenderer.js +84 -0
  419. package/dist/src/ui/utils/TableRenderer.js.map +1 -0
  420. package/dist/src/ui/utils/clipboardUtils.d.ts +22 -0
  421. package/dist/src/ui/utils/clipboardUtils.js +127 -0
  422. package/dist/src/ui/utils/clipboardUtils.js.map +1 -0
  423. package/dist/src/ui/utils/commandUtils.d.ts +23 -0
  424. package/dist/src/ui/utils/commandUtils.js +72 -0
  425. package/dist/src/ui/utils/commandUtils.js.map +1 -0
  426. package/dist/src/ui/utils/computeStats.d.ts +10 -0
  427. package/dist/src/ui/utils/computeStats.js +55 -0
  428. package/dist/src/ui/utils/computeStats.js.map +1 -0
  429. package/dist/src/ui/utils/displayUtils.d.ts +17 -0
  430. package/dist/src/ui/utils/displayUtils.js +24 -0
  431. package/dist/src/ui/utils/displayUtils.js.map +1 -0
  432. package/dist/src/ui/utils/errorParsing.d.ts +7 -0
  433. package/dist/src/ui/utils/errorParsing.js +90 -0
  434. package/dist/src/ui/utils/errorParsing.js.map +1 -0
  435. package/dist/src/ui/utils/formatters.d.ts +13 -0
  436. package/dist/src/ui/utils/formatters.js +56 -0
  437. package/dist/src/ui/utils/formatters.js.map +1 -0
  438. package/dist/src/ui/utils/markdownUtilities.d.ts +6 -0
  439. package/dist/src/ui/utils/markdownUtilities.js +110 -0
  440. package/dist/src/ui/utils/markdownUtilities.js.map +1 -0
  441. package/dist/src/ui/utils/textUtils.d.ts +22 -0
  442. package/dist/src/ui/utils/textUtils.js +58 -0
  443. package/dist/src/ui/utils/textUtils.js.map +1 -0
  444. package/dist/src/ui/utils/updateCheck.d.ts +6 -0
  445. package/dist/src/ui/utils/updateCheck.js +40 -0
  446. package/dist/src/ui/utils/updateCheck.js.map +1 -0
  447. package/dist/src/utils/cleanup.d.ts +8 -0
  448. package/dist/src/utils/cleanup.js +34 -0
  449. package/dist/src/utils/cleanup.js.map +1 -0
  450. package/dist/src/utils/package.d.ts +12 -0
  451. package/dist/src/utils/package.js +24 -0
  452. package/dist/src/utils/package.js.map +1 -0
  453. package/dist/src/utils/readStdin.d.ts +6 -0
  454. package/dist/src/utils/readStdin.js +34 -0
  455. package/dist/src/utils/readStdin.js.map +1 -0
  456. package/dist/src/utils/sandbox-macos-permissive-closed.sb +26 -0
  457. package/dist/src/utils/sandbox-macos-permissive-open.sb +19 -0
  458. package/dist/src/utils/sandbox-macos-permissive-proxied.sb +31 -0
  459. package/dist/src/utils/sandbox-macos-restrictive-closed.sb +87 -0
  460. package/dist/src/utils/sandbox-macos-restrictive-open.sb +90 -0
  461. package/dist/src/utils/sandbox-macos-restrictive-proxied.sb +92 -0
  462. package/dist/src/utils/sandbox.d.ts +7 -0
  463. package/dist/src/utils/sandbox.js +680 -0
  464. package/dist/src/utils/sandbox.js.map +1 -0
  465. package/dist/src/utils/startupWarnings.d.ts +6 -0
  466. package/dist/src/utils/startupWarnings.js +40 -0
  467. package/dist/src/utils/startupWarnings.js.map +1 -0
  468. package/dist/src/utils/userStartupWarnings.d.ts +6 -0
  469. package/dist/src/utils/userStartupWarnings.js +54 -0
  470. package/dist/src/utils/userStartupWarnings.js.map +1 -0
  471. package/dist/src/utils/version.d.ts +6 -0
  472. package/dist/src/utils/version.js +11 -0
  473. package/dist/src/utils/version.js.map +1 -0
  474. package/dist/tsconfig.tsbuildinfo +1 -0
  475. package/package.json +79 -0
@@ -0,0 +1,128 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import * as fs from 'fs/promises';
7
+ import path from 'path';
8
+ import { CommandKind, } from './types.js';
9
+ async function restoreAction(context, args) {
10
+ const { services, ui } = context;
11
+ const { config, git: gitService } = services;
12
+ const { addItem, loadHistory } = ui;
13
+ const checkpointDir = config?.getProjectTempDir()
14
+ ? path.join(config.getProjectTempDir(), 'checkpoints')
15
+ : undefined;
16
+ if (!checkpointDir) {
17
+ return {
18
+ type: 'message',
19
+ messageType: 'error',
20
+ content: 'Could not determine the .gemini directory path.',
21
+ };
22
+ }
23
+ try {
24
+ // Ensure the directory exists before trying to read it.
25
+ await fs.mkdir(checkpointDir, { recursive: true });
26
+ const files = await fs.readdir(checkpointDir);
27
+ const jsonFiles = files.filter((file) => file.endsWith('.json'));
28
+ if (!args) {
29
+ if (jsonFiles.length === 0) {
30
+ return {
31
+ type: 'message',
32
+ messageType: 'info',
33
+ content: 'No restorable tool calls found.',
34
+ };
35
+ }
36
+ const truncatedFiles = jsonFiles.map((file) => {
37
+ const components = file.split('.');
38
+ if (components.length <= 1) {
39
+ return file;
40
+ }
41
+ components.pop();
42
+ return components.join('.');
43
+ });
44
+ const fileList = truncatedFiles.join('\n');
45
+ return {
46
+ type: 'message',
47
+ messageType: 'info',
48
+ content: `Available tool calls to restore:\n\n${fileList}`,
49
+ };
50
+ }
51
+ const selectedFile = args.endsWith('.json') ? args : `${args}.json`;
52
+ if (!jsonFiles.includes(selectedFile)) {
53
+ return {
54
+ type: 'message',
55
+ messageType: 'error',
56
+ content: `File not found: ${selectedFile}`,
57
+ };
58
+ }
59
+ const filePath = path.join(checkpointDir, selectedFile);
60
+ const data = await fs.readFile(filePath, 'utf-8');
61
+ const toolCallData = JSON.parse(data);
62
+ if (toolCallData.history) {
63
+ if (!loadHistory) {
64
+ // This should not happen
65
+ return {
66
+ type: 'message',
67
+ messageType: 'error',
68
+ content: 'loadHistory function is not available.',
69
+ };
70
+ }
71
+ loadHistory(toolCallData.history);
72
+ }
73
+ if (toolCallData.clientHistory) {
74
+ await config?.getGeminiClient()?.setHistory(toolCallData.clientHistory);
75
+ }
76
+ if (toolCallData.commitHash) {
77
+ await gitService?.restoreProjectFromSnapshot(toolCallData.commitHash);
78
+ addItem({
79
+ type: 'info',
80
+ text: 'Restored project to the state before the tool call.',
81
+ }, Date.now());
82
+ }
83
+ return {
84
+ type: 'tool',
85
+ toolName: toolCallData.toolCall.name,
86
+ toolArgs: toolCallData.toolCall.args,
87
+ };
88
+ }
89
+ catch (error) {
90
+ return {
91
+ type: 'message',
92
+ messageType: 'error',
93
+ content: `Could not read restorable tool calls. This is the error: ${error}`,
94
+ };
95
+ }
96
+ }
97
+ async function completion(context, _partialArg) {
98
+ const { services } = context;
99
+ const { config } = services;
100
+ const checkpointDir = config?.getProjectTempDir()
101
+ ? path.join(config.getProjectTempDir(), 'checkpoints')
102
+ : undefined;
103
+ if (!checkpointDir) {
104
+ return [];
105
+ }
106
+ try {
107
+ const files = await fs.readdir(checkpointDir);
108
+ return files
109
+ .filter((file) => file.endsWith('.json'))
110
+ .map((file) => file.replace('.json', ''));
111
+ }
112
+ catch (_err) {
113
+ return [];
114
+ }
115
+ }
116
+ export const restoreCommand = (config) => {
117
+ if (!config?.getCheckpointingEnabled()) {
118
+ return null;
119
+ }
120
+ return {
121
+ name: 'restore',
122
+ description: 'Restore a tool call. This will reset the conversation and file history to the state it was in when the tool call was suggested',
123
+ kind: CommandKind.BUILT_IN,
124
+ action: restoreAction,
125
+ completion,
126
+ };
127
+ };
128
+ //# sourceMappingURL=restoreCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"restoreCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/restoreCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAIL,WAAW,GACZ,MAAM,YAAY,CAAC;AAGpB,KAAK,UAAU,aAAa,CAC1B,OAAuB,EACvB,IAAY;IAEZ,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAG,OAAO,CAAC;IACjC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,UAAU,EAAE,GAAG,QAAQ,CAAC;IAC7C,MAAM,EAAE,OAAO,EAAE,WAAW,EAAE,GAAG,EAAE,CAAC;IAEpC,MAAM,aAAa,GAAG,MAAM,EAAE,iBAAiB,EAAE;QAC/C,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,iBAAiB,EAAE,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AO,IAAI,CAAC;IACd,CAAC;IAED,OAAO;QACL,IAAI,EAAE,SAAS;QACf,WAAW,EACT,gIAAgI;QAClI,IAAI,EAAE,WAAW,CAAC,QAAQ;QAC1B,MAAM,EAAE,aAAa;QACrB,UAAU;KACX,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type SlashCommand } from './types.js';
7
+ export declare const statsCommand: SlashCommand;
@@ -0,0 +1,54 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { MessageType } from '../types.js';
7
+ import { formatDuration } from '../utils/formatters.js';
8
+ import { CommandKind, } from './types.js';
9
+ export const statsCommand = {
10
+ name: 'stats',
11
+ altNames: ['usage'],
12
+ description: 'check session stats. Usage: /stats [model|tools]',
13
+ kind: CommandKind.BUILT_IN,
14
+ action: (context) => {
15
+ const now = new Date();
16
+ const { sessionStartTime } = context.session.stats;
17
+ if (!sessionStartTime) {
18
+ context.ui.addItem({
19
+ type: MessageType.ERROR,
20
+ text: 'Session start time is unavailable, cannot calculate stats.',
21
+ }, Date.now());
22
+ return;
23
+ }
24
+ const wallDuration = now.getTime() - sessionStartTime.getTime();
25
+ const statsItem = {
26
+ type: MessageType.STATS,
27
+ duration: formatDuration(wallDuration),
28
+ };
29
+ context.ui.addItem(statsItem, Date.now());
30
+ },
31
+ subCommands: [
32
+ {
33
+ name: 'model',
34
+ description: 'Show model-specific usage statistics.',
35
+ kind: CommandKind.BUILT_IN,
36
+ action: (context) => {
37
+ context.ui.addItem({
38
+ type: MessageType.MODEL_STATS,
39
+ }, Date.now());
40
+ },
41
+ },
42
+ {
43
+ name: 'tools',
44
+ description: 'Show tool-specific usage statistics.',
45
+ kind: CommandKind.BUILT_IN,
46
+ action: (context) => {
47
+ context.ui.addItem({
48
+ type: MessageType.TOOL_STATS,
49
+ }, Date.now());
50
+ },
51
+ },
52
+ ],
53
+ };
54
+ //# sourceMappingURL=statsCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"statsCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/statsCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAoB,MAAM,aAAa,CAAC;AAC5D,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAGL,WAAW,GACZ,MAAM,YAAY,CAAC;AAEpB,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,CAAC,OAAO,CAAC;IACnB,WAAW,EAAE,kDAAkD;IAC/D,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,MAAM,EAAE,CAAC,OAAuB,EAAE,EAAE;QAClC,MAAM,GAAG,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,EAAE,gBAAgB,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC;QACnD,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACtB,OAAO,CAAC,EAAE,CAAC,OAAO,CAChB;gBACE,IAAI,EAAE,WAAW,CAAC,KAAK;gBACvB,IAAI,EAAE,4DAA4D;aACnE,EACD,IAAI,CAAC,GAAG,EAAE,CACX,CAAC;YACF,OAAO;QACT,CAAC;QACD,MAAM,YAAY,GAAG,GAAG,CAAC,OAAO,EAAE,GAAG,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAEhE,MAAM,SAAS,GAAqB;YAClC,IAAI,EAAE,WAAW,CAAC,KAAK;YACvB,QAAQ,EAAE,cAAc,CAAC,YAAY,CAAC;SACvC,CAAC;QAEF,OAAO,CAAC,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC,CAAC;IAC5C,CAAC;IACD,WAAW,EAAE;QACX;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,uCAAuC;YACpD,IAAI,EAAE,WAAW,CAAC,QAAQ;YAC1B,MAAM,EAAE,CAAC,OAAuB,EAAE,EAAE;gBAClC,OAAO,CAAC,EAAE,CAAC,OAAO,CAChB;oBACE,IAAI,EAAE,WAAW,CAAC,WAAW;iBAC9B,EACD,IAAI,CAAC,GAAG,EAAE,CACX,CAAC;YACJ,CAAC;SACF;QACD;YACE,IAAI,EAAE,OAAO;YACb,WAAW,EAAE,sCAAsC;YACnD,IAAI,EAAE,WAAW,CAAC,QAAQ;YAC1B,MAAM,EAAE,CAAC,OAAuB,EAAE,EAAE;gBAClC,OAAO,CAAC,EAAE,CAAC,OAAO,CAChB;oBACE,IAAI,EAAE,WAAW,CAAC,UAAU;iBAC7B,EACD,IAAI,CAAC,GAAG,EAAE,CACX,CAAC;YACJ,CAAC;SACF;KACF;CACF,CAAC"}
@@ -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 themeCommand: SlashCommand;
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CommandKind } from './types.js';
7
+ export const themeCommand = {
8
+ name: 'theme',
9
+ description: 'change the theme',
10
+ kind: CommandKind.BUILT_IN,
11
+ action: (_context, _args) => ({
12
+ type: 'dialog',
13
+ dialog: 'theme',
14
+ }),
15
+ };
16
+ //# sourceMappingURL=themeCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"themeCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/themeCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,WAAW,EAAwC,MAAM,YAAY,CAAC;AAE/E,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,kBAAkB;IAC/B,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,MAAM,EAAE,CAAC,QAAQ,EAAE,KAAK,EAA0B,EAAE,CAAC,CAAC;QACpD,IAAI,EAAE,QAAQ;QACd,MAAM,EAAE,OAAO;KAChB,CAAC;CACH,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type SlashCommand } from './types.js';
7
+ export declare const toolsCommand: SlashCommand;
@@ -0,0 +1,56 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { CommandKind, } from './types.js';
7
+ import { MessageType } from '../types.js';
8
+ export const toolsCommand = {
9
+ name: 'tools',
10
+ description: 'list available Gemini CLI tools',
11
+ kind: CommandKind.BUILT_IN,
12
+ action: async (context, args) => {
13
+ const subCommand = args?.trim();
14
+ // Default to NOT showing descriptions. The user must opt in with an argument.
15
+ let useShowDescriptions = false;
16
+ if (subCommand === 'desc' || subCommand === 'descriptions') {
17
+ useShowDescriptions = true;
18
+ }
19
+ const toolRegistry = await context.services.config?.getToolRegistry();
20
+ if (!toolRegistry) {
21
+ context.ui.addItem({
22
+ type: MessageType.ERROR,
23
+ text: 'Could not retrieve tool registry.',
24
+ }, Date.now());
25
+ return;
26
+ }
27
+ const tools = toolRegistry.getAllTools();
28
+ // Filter out MCP tools by checking for the absence of a serverName property
29
+ const geminiTools = tools.filter((tool) => !('serverName' in tool));
30
+ let message = 'Available Gemini CLI tools:\n\n';
31
+ if (geminiTools.length > 0) {
32
+ geminiTools.forEach((tool) => {
33
+ if (useShowDescriptions && tool.description) {
34
+ message += ` - \u001b[36m${tool.displayName} (${tool.name})\u001b[0m:\n`;
35
+ const greenColor = '\u001b[32m';
36
+ const resetColor = '\u001b[0m';
37
+ // Handle multi-line descriptions
38
+ const descLines = tool.description.trim().split('\n');
39
+ for (const descLine of descLines) {
40
+ message += ` ${greenColor}${descLine}${resetColor}\n`;
41
+ }
42
+ }
43
+ else {
44
+ message += ` - \u001b[36m${tool.displayName}\u001b[0m\n`;
45
+ }
46
+ });
47
+ }
48
+ else {
49
+ message += ' No tools available\n';
50
+ }
51
+ message += '\n';
52
+ message += '\u001b[0m';
53
+ context.ui.addItem({ type: MessageType.INFO, text: message }, Date.now());
54
+ },
55
+ };
56
+ //# sourceMappingURL=toolsCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"toolsCommand.js","sourceRoot":"","sources":["../../../../src/ui/commands/toolsCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAGL,WAAW,GACZ,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE1C,MAAM,CAAC,MAAM,YAAY,GAAiB;IACxC,IAAI,EAAE,OAAO;IACb,WAAW,EAAE,iCAAiC;IAC9C,IAAI,EAAE,WAAW,CAAC,QAAQ;IAC1B,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,GAAG,EAAE,CACX,CAAC;YACF,OAAO;QACT,CAA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C"}
@@ -0,0 +1,110 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Content } from '@google/genai';
7
+ import { HistoryItemWithoutId } from '../types.js';
8
+ import { Config, GitService, Logger } from '@google/gemini-cli-core';
9
+ import { LoadedSettings } from '../../config/settings.js';
10
+ import { UseHistoryManagerReturn } from '../hooks/useHistoryManager.js';
11
+ import type { HistoryItem } from '../types.js';
12
+ import { SessionStatsState } from '../contexts/SessionContext.js';
13
+ export interface CommandContext {
14
+ services: {
15
+ config: Config | null;
16
+ settings: LoadedSettings;
17
+ git: GitService | undefined;
18
+ logger: Logger;
19
+ };
20
+ ui: {
21
+ /** Adds a new item to the history display. */
22
+ addItem: UseHistoryManagerReturn['addItem'];
23
+ /** Clears all history items and the console screen. */
24
+ clear: () => void;
25
+ /**
26
+ * Sets the transient debug message displayed in the application footer in debug mode.
27
+ */
28
+ setDebugMessage: (message: string) => void;
29
+ /** The currently pending history item, if any. */
30
+ pendingItem: HistoryItemWithoutId | null;
31
+ /**
32
+ * Sets a pending item in the history, which is useful for indicating
33
+ * that a long-running operation is in progress.
34
+ *
35
+ * @param item The history item to display as pending, or `null` to clear.
36
+ */
37
+ setPendingItem: (item: HistoryItemWithoutId | null) => void;
38
+ /**
39
+ * Loads a new set of history items, replacing the current history.
40
+ *
41
+ * @param history The array of history items to load.
42
+ */
43
+ loadHistory: UseHistoryManagerReturn['loadHistory'];
44
+ /** Toggles a special display mode. */
45
+ toggleCorgiMode: () => void;
46
+ };
47
+ session: {
48
+ stats: SessionStatsState;
49
+ };
50
+ }
51
+ /**
52
+ * The return type for a command action that results in scheduling a tool call.
53
+ */
54
+ export interface ToolActionReturn {
55
+ type: 'tool';
56
+ toolName: string;
57
+ toolArgs: Record<string, unknown>;
58
+ }
59
+ /** The return type for a command action that results in the app quitting. */
60
+ export interface QuitActionReturn {
61
+ type: 'quit';
62
+ messages: HistoryItem[];
63
+ }
64
+ /**
65
+ * The return type for a command action that results in a simple message
66
+ * being displayed to the user.
67
+ */
68
+ export interface MessageActionReturn {
69
+ type: 'message';
70
+ messageType: 'info' | 'error';
71
+ content: string;
72
+ }
73
+ /**
74
+ * The return type for a command action that needs to open a dialog.
75
+ */
76
+ export interface OpenDialogActionReturn {
77
+ type: 'dialog';
78
+ dialog: 'help' | 'auth' | 'theme' | 'editor' | 'privacy';
79
+ }
80
+ /**
81
+ * The return type for a command action that results in replacing
82
+ * the entire conversation history.
83
+ */
84
+ export interface LoadHistoryActionReturn {
85
+ type: 'load_history';
86
+ history: HistoryItemWithoutId[];
87
+ clientHistory: Content[];
88
+ }
89
+ /**
90
+ * The return type for a command action that should immediately submit
91
+ * content as a prompt to the Gemini model.
92
+ */
93
+ export interface SubmitPromptActionReturn {
94
+ type: 'submit_prompt';
95
+ content: string;
96
+ }
97
+ export type SlashCommandActionReturn = ToolActionReturn | MessageActionReturn | QuitActionReturn | OpenDialogActionReturn | LoadHistoryActionReturn | SubmitPromptActionReturn;
98
+ export declare enum CommandKind {
99
+ BUILT_IN = "built-in",
100
+ FILE = "file"
101
+ }
102
+ export interface SlashCommand {
103
+ name: string;
104
+ altNames?: string[];
105
+ description: string;
106
+ kind: CommandKind;
107
+ action?: (context: CommandContext, args: string) => void | SlashCommandActionReturn | Promise<void | SlashCommandActionReturn>;
108
+ completion?: (context: CommandContext, partialArg: string) => Promise<string[]>;
109
+ subCommands?: SlashCommand[];
110
+ }
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export var CommandKind;
7
+ (function (CommandKind) {
8
+ CommandKind["BUILT_IN"] = "built-in";
9
+ CommandKind["FILE"] = "file";
10
+ })(CommandKind || (CommandKind = {}));
11
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../src/ui/commands/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAkHH,MAAM,CAAN,IAAY,WAGX;AAHD,WAAY,WAAW;IACrB,oCAAqB,CAAA;IACrB,4BAAa,CAAA;AACf,CAAC,EAHW,WAAW,KAAX,WAAW,QAGtB"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import React from 'react';
7
+ interface AboutBoxProps {
8
+ cliVersion: string;
9
+ osVersion: string;
10
+ sandboxEnv: string;
11
+ modelVersion: string;
12
+ selectedAuthType: string;
13
+ gcpProject: string;
14
+ }
15
+ export declare const AboutBox: React.FC<AboutBoxProps>;
16
+ export {};
@@ -0,0 +1,6 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Box, Text } from 'ink';
3
+ import { Colors } from '../colors.js';
4
+ import { GIT_COMMIT_INFO } from '../../generated/git-commit.js';
5
+ export const AboutBox = ({ cliVersion, osVersion, sandboxEnv, modelVersion, selectedAuthType, gcpProject, }) => (_jsxs(Box, { borderStyle: "round", borderColor: Colors.Gray, flexDirection: "column", padding: 1, marginY: 1, width: "100%", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { bold: true, color: Colors.AccentPurple, children: "About Gemini CLI" }) }), _jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: "35%", children: _jsx(Text, { bold: true, color: Colors.LightBlue, children: "CLI Version" }) }), _jsx(Box, { children: _jsx(Text, { children: cliVersion }) })] }), GIT_COMMIT_INFO && !['N/A'].includes(GIT_COMMIT_INFO) && (_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: "35%", children: _jsx(Text, { bold: true, color: Colors.LightBlue, children: "Git Commit" }) }), _jsx(Box, { children: _jsx(Text, { children: GIT_COMMIT_INFO }) })] })), _jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: "35%", children: _jsx(Text, { bold: true, color: Colors.LightBlue, children: "Model" }) }), _jsx(Box, { children: _jsx(Text, { children: modelVersion }) })] }), _jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: "35%", children: _jsx(Text, { bold: true, color: Colors.LightBlue, children: "Sandbox" }) }), _jsx(Box, { children: _jsx(Text, { children: sandboxEnv }) })] }), _jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: "35%", children: _jsx(Text, { bold: true, color: Colors.LightBlue, children: "OS" }) }), _jsx(Box, { children: _jsx(Text, { children: osVersion }) })] }), _jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: "35%", children: _jsx(Text, { bold: true, color: Colors.LightBlue, children: "Auth Method" }) }), _jsx(Box, { children: _jsx(Text, { children: selectedAuthType.startsWith('oauth') ? 'OAuth' : selectedAuthType }) })] }), gcpProject && (_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { width: "35%", children: _jsx(Text, { bold: true, color: Colors.LightBlue, children: "GCP Project" }) }), _jsx(Box, { children: _jsx(Text, { children: gcpProject }) })] }))] }));
6
+ //# sourceMappingURL=AboutBox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AboutBox.js","sourceRoot":"","sources":["../../../../src/ui/components/AboutBox.tsx"],"names":[],"mappings":";AAOA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAWhE,MAAM,CAAC,MAAM,QAAQ,GAA4B,CAAC,EAChD,UAAU,EACV,SAAS,EACT,UAAU,EACV,YAAY,EACZ,gBAAgB,EAChB,UAAU,GACX,EAAE,EAAE,CAAC,CACJ,MAAC,GAAG,IACF,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,MAAM,CAAC,IAAI,EACxB,aAAa,EAAC,QAAQ,EACtB,OAAO,EAAE,CAAC,EACV,OAAO,EAAE,CAAC,EACV,KAAK,EAAC,MAAM,aAEZ,KAAC,GAAG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SAAS,mBAE3B,GACH,EACN,KAAC,GAAG,cACF,KAAC,IAAI,cAAE,SAAS,GAAQ,GACpB,IACF,EACN,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,aACtB,KAAC,GAAG,IAAC,KAAK,EAAC,KAAK,YACd,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,SAAS,4BAE3B,GACH,EACN,KAAC,GAAG,cACF,KAAC,IAAI,cACF,gBAAgB,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,gBAAgB,GAC7D,GACH,IACF,EACL,UAAU,IAAI,CACb,MAAC,GAAG,IAAC,aAAa,EAAC,KAAK,aACtB,KAAC,GAAG,IAAC,KAAK,EAAC,KAAK,YACd,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,SAAS,4BAE3B,GACH,EACN,KAAC,GAAG,cACF,KAAC,IAAI,cAAE,UAAU,GAAQ,GACrB,IACF,CACP,IACG,CACP,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare const shortAsciiLogo = "\n \u2584\u2588\u2588\u2588\u2588\u2584\u2584 \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584 \u2588\u2588\u2593 \u2588\u2588\u2593 \n \u2592\u2588\u2588\u2580 \u2580\u2588\u2588 \u2592\u2588\u2588 \u2580\u2588 \u2593\u2588\u2588\u2592 \u2593\u2588\u2588\u2592 \n \u2592\u2593\u2588 \u2592\u2588\u2588\u2588\u2588\u2584 \u2592\u2588\u2588\u2591 \u2592\u2588\u2588\u2591 \n \u2592\u2593\u2593\u2584 \u2584\u2588\u2588 \u2591\u2588\u2588 \u2588\u2588 \u2592\u2588\u2588\u2591 \u2592\u2588\u2588\u2591 \n \u2592 \u2593\u2588\u2588\u2588\u2580 \u2591 \u2593\u2588\u2588\u2588\u2588\u2593\u2588\u2588\u2592\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2592\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2592\n \u2591 \u2591\u2592 \u2592 \u2591 \u2592\u2592 \u2593\u2592\u2588\u2591\u2591 \u2592\u2591\u2593 \u2591\u2591 \u2592\u2591\u2593 \u2591\n \u2591 \u2592 \u2592 \u2592\u2592 \u2591\u2591 \u2591 \u2592 \u2591\u2591 \u2591 \u2592 \u2591\n \u2591 \u2591 \u2592 \u2591 \u2591 \u2591 \u2591 \n \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591\n \u2591 \n @machina.ai/cell \n";
7
+ export declare const longAsciiLogo = "\n \u2584\u2588\u2588\u2588\u2588\u2584\u2584 \u2584\u2584\u2584\u2584\u2584\u2584\u2584\u2584 \u2588\u2588\u2593 \u2588\u2588\u2593 \n \u2592\u2588\u2588\u2580 \u2580\u2588\u2588 \u2592\u2588\u2588 \u2580\u2588 \u2593\u2588\u2588\u2592 \u2593\u2588\u2588\u2592 \n \u2592\u2593\u2588 \u2592\u2588\u2588\u2588\u2588\u2584 \u2592\u2588\u2588\u2591 \u2592\u2588\u2588\u2591 \n \u2592\u2593\u2593\u2584 \u2584\u2588\u2588 \u2591\u2588\u2588 \u2588\u2588 \u2592\u2588\u2588\u2591 \u2592\u2588\u2588\u2591 \n \u2592 \u2593\u2588\u2588\u2588\u2580 \u2591 \u2593\u2588\u2588\u2588\u2588\u2593\u2588\u2588\u2592\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2592\u2591\u2588\u2588\u2588\u2588\u2588\u2588\u2592\n \u2591 \u2591\u2592 \u2592 \u2591 \u2592\u2592 \u2593\u2592\u2588\u2591\u2591 \u2592\u2591\u2593 \u2591\u2591 \u2592\u2591\u2593 \u2591\n \u2591 \u2592 \u2592 \u2592\u2592 \u2591\u2591 \u2591 \u2592 \u2591\u2591 \u2591 \u2592 \u2591\n \u2591 \u2591 \u2592 \u2591 \u2591 \u2591 \u2591 \n \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591 \u2591\n \u2591 \n @machina.ai/cell \n";
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export const shortAsciiLogo = `
7
+ ▄████▄▄ ▄▄▄▄▄▄▄▄ ██▓ ██▓
8
+ ▒██▀ ▀██ ▒██ ▀█ ▓██▒ ▓██▒
9
+ ▒▓█ ▒████▄ ▒██░ ▒██░
10
+ ▒▓▓▄ ▄██ ░██ ██ ▒██░ ▒██░
11
+ ▒ ▓███▀ ░ ▓████▓██▒░██████▒░██████▒
12
+ ░ ░▒ ▒ ░ ▒▒ ▓▒█░░ ▒░▓ ░░ ▒░▓ ░
13
+ ░ ▒ ▒ ▒▒ ░░ ░ ▒ ░░ ░ ▒ ░
14
+ ░ ░ ▒ ░ ░ ░ ░
15
+ ░ ░ ░ ░ ░ ░ ░ ░
16
+
17
+ @machina.ai/cell
18
+ `;
19
+ export const longAsciiLogo = `
20
+ ▄████▄▄ ▄▄▄▄▄▄▄▄ ██▓ ██▓
21
+ ▒██▀ ▀██ ▒██ ▀█ ▓██▒ ▓██▒
22
+ ▒▓█ ▒████▄ ▒██░ ▒██░
23
+ ▒▓▓▄ ▄██ ░██ ██ ▒██░ ▒██░
24
+ ▒ ▓███▀ ░ ▓████▓██▒░██████▒░██████▒
25
+ ░ ░▒ ▒ ░ ▒▒ ▓▒█░░ ▒░▓ ░░ ▒░▓ ░
26
+ ░ ▒ ▒ ▒▒ ░░ ░ ▒ ░░ ░ ▒ ░
27
+ ░ ░ ▒ ░ ░ ░ ░
28
+ ░ ░ ░ ░ ░ ░ ░ ░
29
+
30
+ @machina.ai/cell
31
+ `;
32
+ //# sourceMappingURL=AsciiArt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AsciiArt.js","sourceRoot":"","sources":["../../../../src/ui/components/AsciiArt.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG;;;;;;;;;;;;CAY7B,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG;;;;;;;;;;;;CAY5B,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import React from 'react';
7
+ import { LoadedSettings, SettingScope } from '../../config/settings.js';
8
+ import { AuthType } from '@google/gemini-cli-core';
9
+ interface AuthDialogProps {
10
+ onSelect: (authMethod: AuthType | undefined, scope: SettingScope) => void;
11
+ settings: LoadedSettings;
12
+ initialErrorMessage?: string | null;
13
+ }
14
+ export declare function AuthDialog({ onSelect, settings, initialErrorMessage, }: AuthDialogProps): React.JSX.Element;
15
+ export {};
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx, 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 { useState } from 'react';
8
+ import { Box, Text, useInput } from 'ink';
9
+ import { Colors } from '../colors.js';
10
+ import { RadioButtonSelect } from './shared/RadioButtonSelect.js';
11
+ import { SettingScope } from '../../config/settings.js';
12
+ import { AuthType } from '@google/gemini-cli-core';
13
+ import { validateAuthMethod } from '../../config/auth.js';
14
+ export function AuthDialog({ onSelect, settings, initialErrorMessage, }) {
15
+ const [errorMessage, setErrorMessage] = useState(initialErrorMessage ?? null);
16
+ const items = [
17
+ {
18
+ label: 'Reboot Authentication',
19
+ value: AuthType.KEYCLOAK,
20
+ },
21
+ ];
22
+ const initialAuthIndex = 0;
23
+ const handleAuthSelect = (authMethod) => {
24
+ const error = validateAuthMethod(authMethod);
25
+ if (error) {
26
+ setErrorMessage(error);
27
+ }
28
+ else {
29
+ setErrorMessage(null);
30
+ onSelect(authMethod, SettingScope.User);
31
+ }
32
+ };
33
+ useInput((_input, key) => {
34
+ if (key.escape) {
35
+ // Prevent exit if there is an error message.
36
+ // This means they user is not authenticated yet.
37
+ if (errorMessage) {
38
+ return;
39
+ }
40
+ if (settings.merged.selectedAuthType === undefined) {
41
+ // Prevent exiting if no auth method is set
42
+ setErrorMessage('You must select an auth method to proceed. Press Ctrl+C twice to exit.');
43
+ return;
44
+ }
45
+ onSelect(undefined, SettingScope.User);
46
+ }
47
+ });
48
+ return (_jsxs(Box, { borderStyle: "round", borderColor: Colors.Gray, flexDirection: "column", padding: 1, width: "100%", children: [_jsx(Text, { bold: true, children: "Get started" }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { children: "How would you like to authenticate for this project?" }) }), _jsx(Box, { marginTop: 1, children: _jsx(RadioButtonSelect, { items: items, initialIndex: initialAuthIndex, onSelect: handleAuthSelect, isFocused: true }) }), errorMessage && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: Colors.AccentRed, children: errorMessage }) })), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: Colors.Gray, children: "(Use Enter to select)" }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { children: "Terms of Services and Privacy Notice for Gemini CLI" }) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: Colors.AccentBlue, children: 'https://github.com/google-gemini/gemini-cli/blob/main/docs/tos-privacy.md' }) })] }));
49
+ }
50
+ //# sourceMappingURL=AuthDialog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthDialog.js","sourceRoot":"","sources":["../../../../src/ui/components/AuthDialog.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxC,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAClE,OAA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,MAAC,GAAG,IACF,WAAW,EAAC,OAAO,EACnB,WAAW,EAAE,MAAM,CAAC,IAAI,EACxB,aAAa,EAAC,QAAQ,EACtB,OAAO,EAAE,CAAC,EACV,KAAK,EAAC,MAAM,aAEZ,KAAC,IAAI,IAAC,IAAI,kCAAmB,EAC7B,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,uEAA4D,GAC7D,EACN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,iBAAiB,IAChB,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,gBAAgB,EAC9B,QAAQ,EAAE,gBAAgB,EAC1B,SAAS,EAAE,IAAI,GACf,GACE,EACL,YAAY,IAAI,CACf,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YAAG,YAAY,GAAQ,GAChD,CACP,EACD,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,sCAA8B,GAClD,EACN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,sEAA2D,GAC5D,EACN,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,YAE1B,2EAA2E,GAExE,GACH,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import React from 'react';
7
+ interface AuthInProgressProps {
8
+ onTimeout: () => void;
9
+ }
10
+ export declare function AuthInProgress({ onTimeout, }: AuthInProgressProps): React.JSX.Element;
11
+ export {};
@@ -0,0 +1,27 @@
1
+ import { jsx as _jsx, 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 { useState, useEffect } from 'react';
8
+ import { Box, Text, useInput } from 'ink';
9
+ import Spinner from 'ink-spinner';
10
+ import { Colors } from '../colors.js';
11
+ export function AuthInProgress({ onTimeout, }) {
12
+ const [timedOut, setTimedOut] = useState(false);
13
+ useInput((_, key) => {
14
+ if (key.escape) {
15
+ onTimeout();
16
+ }
17
+ });
18
+ useEffect(() => {
19
+ const timer = setTimeout(() => {
20
+ setTimedOut(true);
21
+ onTimeout();
22
+ }, 180000);
23
+ return () => clearTimeout(timer);
24
+ }, [onTimeout]);
25
+ return (_jsx(Box, { borderStyle: "round", borderColor: Colors.Gray, flexDirection: "column", padding: 1, width: "100%", children: timedOut ? (_jsx(Text, { color: Colors.AccentRed, children: "Authentication timed out. Please try again." })) : (_jsx(Box, { children: _jsxs(Text, { children: [_jsx(Spinner, { type: "dots" }), " Waiting for auth... (Press ESC to cancel)"] }) })) }));
26
+ }
27
+ //# sourceMappingURL=AuthInProgress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthInProgress.js","sourceRoot":"","sources":["../../../../src/ui/components/AuthInProgress.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,OAAO,MAAM,aAAa,CAAC;AAClC,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAMtC,MAAM,UAAU,cAAc,CAAC,EAC7B,SAAS,GACW;IACpB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAEhD,QAAQ,CAAC,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;QAClB,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACf,SAAS,EAAE,CAAC;QACd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