@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,89 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { useState, useEffect, useCallback } from 'react';
7
+ import * as fs from 'fs/promises';
8
+ import * as path from 'path';
9
+ import { isNodeError, getProjectTempDir } from '@google/gemini-cli-core';
10
+ const HISTORY_FILE = 'shell_history';
11
+ const MAX_HISTORY_LENGTH = 100;
12
+ async function getHistoryFilePath(projectRoot) {
13
+ const historyDir = getProjectTempDir(projectRoot);
14
+ return path.join(historyDir, HISTORY_FILE);
15
+ }
16
+ async function readHistoryFile(filePath) {
17
+ try {
18
+ const content = await fs.readFile(filePath, 'utf-8');
19
+ return content.split('\n').filter(Boolean);
20
+ }
21
+ catch (error) {
22
+ if (isNodeError(error) && error.code === 'ENOENT') {
23
+ return [];
24
+ }
25
+ console.error('Error reading shell history:', error);
26
+ return [];
27
+ }
28
+ }
29
+ async function writeHistoryFile(filePath, history) {
30
+ try {
31
+ await fs.mkdir(path.dirname(filePath), { recursive: true });
32
+ await fs.writeFile(filePath, history.join('\n'));
33
+ }
34
+ catch (error) {
35
+ console.error('Error writing shell history:', error);
36
+ }
37
+ }
38
+ export function useShellHistory(projectRoot) {
39
+ const [history, setHistory] = useState([]);
40
+ const [historyIndex, setHistoryIndex] = useState(-1);
41
+ const [historyFilePath, setHistoryFilePath] = useState(null);
42
+ useEffect(() => {
43
+ async function loadHistory() {
44
+ const filePath = await getHistoryFilePath(projectRoot);
45
+ setHistoryFilePath(filePath);
46
+ const loadedHistory = await readHistoryFile(filePath);
47
+ setHistory(loadedHistory.reverse()); // Newest first
48
+ }
49
+ loadHistory();
50
+ }, [projectRoot]);
51
+ const addCommandToHistory = useCallback((command) => {
52
+ if (!command.trim() || !historyFilePath) {
53
+ return;
54
+ }
55
+ const newHistory = [command, ...history.filter((c) => c !== command)]
56
+ .slice(0, MAX_HISTORY_LENGTH)
57
+ .filter(Boolean);
58
+ setHistory(newHistory);
59
+ // Write to file in reverse order (oldest first)
60
+ writeHistoryFile(historyFilePath, [...newHistory].reverse());
61
+ setHistoryIndex(-1);
62
+ }, [history, historyFilePath]);
63
+ const getPreviousCommand = useCallback(() => {
64
+ if (history.length === 0) {
65
+ return null;
66
+ }
67
+ const newIndex = Math.min(historyIndex + 1, history.length - 1);
68
+ setHistoryIndex(newIndex);
69
+ return history[newIndex] ?? null;
70
+ }, [history, historyIndex]);
71
+ const getNextCommand = useCallback(() => {
72
+ if (historyIndex < 0) {
73
+ return null;
74
+ }
75
+ const newIndex = historyIndex - 1;
76
+ setHistoryIndex(newIndex);
77
+ if (newIndex < 0) {
78
+ return '';
79
+ }
80
+ return history[newIndex] ?? null;
81
+ }, [history, historyIndex]);
82
+ return {
83
+ addCommandToHistory,
84
+ getPreviousCommand,
85
+ getNextCommand,
86
+ resetHistoryPosition: () => setHistoryIndex(-1),
87
+ };
88
+ }
89
+ //# sourceMappingURL=useShellHistory.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useShellHistory.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useShellHistory.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAEzE,MAAM,YAAY,GAAG,eAAe,CAAC;AACrC,MAAM,kBAAkB,GAAG,GAAG,CAAC;AAE/B,KAAK,UAAU,kBAAkB,CAAC,WAAmB;IACnD,MAAM,UAAU,GAAG,iBAAiB,CAAC,WAAW,CAAC,CAAC;IAClD,OAAO,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;AAC7C,CAAC;AAED,KAAK,UAAU,eAAe,CAAC,QAAgB;IAC7C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;QACrD,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;IAC7C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,WAAW,CAAC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAClD,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,CAAC,KAAK,CAAC,8BAA8B,EAAE,KAAK,CAAC,CAAC;QACrD,OAAO,EAAE,CA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IACnC,CAAC,EAAE,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC,CAAC;IAE5B,OAAO;QACL,mBAAmB;QACnB,kBAAkB;QAClB,cAAc;QACd,oBAAoB,EAAE,GAAG,EAAE,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC;KAChD,CAAC;AACJ,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Message } from '../types.js';
7
+ import { Config } from '@google/gemini-cli-core';
8
+ import { LoadedSettings } from '../../config/settings.js';
9
+ export declare function createShowMemoryAction(config: Config | null, settings: LoadedSettings, addMessage: (message: Message) => void): () => Promise<void>;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { MessageType } from '../types.js';
7
+ export function createShowMemoryAction(config, settings, addMessage) {
8
+ return async () => {
9
+ if (!config) {
10
+ addMessage({
11
+ type: MessageType.ERROR,
12
+ content: 'Configuration not available. Cannot show memory.',
13
+ timestamp: new Date(),
14
+ });
15
+ return;
16
+ }
17
+ const debugMode = config.getDebugMode();
18
+ if (debugMode) {
19
+ console.log('[DEBUG] Show Memory command invoked.');
20
+ }
21
+ const currentMemory = config.getUserMemory();
22
+ const fileCount = config.getGeminiMdFileCount();
23
+ const contextFileName = settings.merged.contextFileName;
24
+ const contextFileNames = Array.isArray(contextFileName)
25
+ ? contextFileName
26
+ : [contextFileName];
27
+ if (debugMode) {
28
+ console.log(`[DEBUG] Showing memory. Content from config.getUserMemory() (first 200 chars): ${currentMemory.substring(0, 200)}...`);
29
+ console.log(`[DEBUG] Number of context files loaded: ${fileCount}`);
30
+ }
31
+ if (fileCount > 0) {
32
+ const allNamesTheSame = new Set(contextFileNames).size < 2;
33
+ const name = allNamesTheSame ? contextFileNames[0] : 'context';
34
+ addMessage({
35
+ type: MessageType.INFO,
36
+ content: `Loaded memory from ${fileCount} ${name} file${fileCount > 1 ? 's' : ''}.`,
37
+ timestamp: new Date(),
38
+ });
39
+ }
40
+ if (currentMemory && currentMemory.trim().length > 0) {
41
+ addMessage({
42
+ type: MessageType.INFO,
43
+ content: `Current combined memory content:\n\`\`\`markdown\n${currentMemory}\n\`\`\``,
44
+ timestamp: new Date(),
45
+ });
46
+ }
47
+ else {
48
+ addMessage({
49
+ type: MessageType.INFO,
50
+ content: fileCount > 0
51
+ ? 'Hierarchical memory (GEMINI.md or other context files) is loaded but content is empty.'
52
+ : 'No hierarchical memory (GEMINI.md or other context files) is currently loaded.',
53
+ timestamp: new Date(),
54
+ });
55
+ }
56
+ };
57
+ }
58
+ //# sourceMappingURL=useShowMemoryCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useShowMemoryCommand.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useShowMemoryCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAW,WAAW,EAAE,MAAM,aAAa,CAAC;AAInD,MAAM,UAAU,sBAAsB,CACpC,MAAqB,EACrB,QAAwB,EACxB,UAAsC;IAEtC,OAAO,KAAK,IAAI,EAAE;QAChB,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,UAAU,CAAC;gBACT,IAAI,EAAE,WAAW,CAAC,KAAK;gBACvB,OAAO,EAAE,kDAAkD;gBAC3D,SAAS,EAAE,IAAI,IAAI,EAAE;aACtB,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,EAAE,CAAC;QAExC,IAAI,SAAS,EAAE,CAAC;YACd,OAAO,CAAC,GAAG,CAAC,sCAAsC,CAAC,CAAC;QACtD,CAAC;QAED,MAAM,aAAa,GAAG,MAAM,CAAC,aAAa,EAAE,CAAC;QAC7C,MAAM,SAAS,GAAG,MAAM,CAAC,oBAAoB,EAAE,CAAC;QAChD,MAAM,eAAe,GAAG,QAAQ,C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C,gFAAgF;gBACtF,SAAS,EAAE,IAAI,IAAI,EAAE;aACtB,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import React from 'react';
7
+ export declare const useStateAndRef: <T extends object | null | undefined | number | string>(initialValue: T) => readonly [React.RefObject<T>, React.Dispatch<React.SetStateAction<T>>];
@@ -0,0 +1,26 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import React from 'react';
7
+ // Hook to return state, state setter, and ref to most up-to-date value of state.
8
+ // We need this in order to setState and reference the updated state multiple
9
+ // times in the same function.
10
+ export const useStateAndRef = (initialValue) => {
11
+ const [_, setState] = React.useState(initialValue);
12
+ const ref = React.useRef(initialValue);
13
+ const setStateInternal = React.useCallback((newStateOrCallback) => {
14
+ let newValue;
15
+ if (typeof newStateOrCallback === 'function') {
16
+ newValue = newStateOrCallback(ref.current);
17
+ }
18
+ else {
19
+ newValue = newStateOrCallback;
20
+ }
21
+ setState(newValue);
22
+ ref.current = newValue;
23
+ }, []);
24
+ return [ref, setStateInternal];
25
+ };
26
+ //# sourceMappingURL=useStateAndRef.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useStateAndRef.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useStateAndRef.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,iFAAiF;AACjF,6EAA6E;AAC7E,8BAA8B;AAC9B,MAAM,CAAC,MAAM,cAAc,GAAG,CAI5B,YAAe,EACf,EAAE;IACF,MAAM,CAAC,CAAC,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAI,YAAY,CAAC,CAAC;IACtD,MAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAI,YAAY,CAAC,CAAC;IAE1C,MAAM,gBAAgB,GAAG,KAAK,CAAC,WAAW,CACxC,CAAC,kBAAkB,EAAE,EAAE;QACrB,IAAI,QAAW,CAAC;QAChB,IAAI,OAAO,kBAAkB,KAAK,UAAU,EAAE,CAAC;YAC7C,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,QAAQ,GAAG,kBAAkB,CAAC;QAChC,CAAC;QACD,QAAQ,CAAC,QAAQ,CAAC,CAAC;QACnB,GAAG,CAAC,OAAO,GAAG,QAAQ,CAAC;IACzB,CAAC,EACD,EAAE,CACH,CAAC;IAEF,OAAO,CAAC,GAAG,EAAE,gBAAgB,CAAU,CAAC;AAC1C,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ export declare function useTerminalSize(): {
7
+ columns: number;
8
+ rows: number;
9
+ };
@@ -0,0 +1,27 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { useEffect, useState } from 'react';
7
+ const TERMINAL_PADDING_X = 8;
8
+ export function useTerminalSize() {
9
+ const [size, setSize] = useState({
10
+ columns: (process.stdout.columns || 60) - TERMINAL_PADDING_X,
11
+ rows: process.stdout.rows || 20,
12
+ });
13
+ useEffect(() => {
14
+ function updateSize() {
15
+ setSize({
16
+ columns: (process.stdout.columns || 60) - TERMINAL_PADDING_X,
17
+ rows: process.stdout.rows || 20,
18
+ });
19
+ }
20
+ process.stdout.on('resize', updateSize);
21
+ return () => {
22
+ process.stdout.off('resize', updateSize);
23
+ };
24
+ }, []);
25
+ return size;
26
+ }
27
+ //# sourceMappingURL=useTerminalSize.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTerminalSize.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useTerminalSize.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE5C,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAE7B,MAAM,UAAU,eAAe;IAC7B,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC;QAC/B,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,GAAG,kBAAkB;QAC5D,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE;KAChC,CAAC,CAAC;IAEH,SAAS,CAAC,GAAG,EAAE;QACb,SAAS,UAAU;YACjB,OAAO,CAAC;gBACN,OAAO,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC,GAAG,kBAAkB;gBAC5D,IAAI,EAAE,OAAO,CAAC,MAAM,CAAC,IAAI,IAAI,EAAE;aAChC,CAAC,CAAC;QACL,CAAC;QAED,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QACxC,OAAO,GAAG,EAAE;YACV,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC3C,CAAC,CAAC;IACJ,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { LoadedSettings, SettingScope } from '../../config/settings.js';
7
+ import { type HistoryItem } from '../types.js';
8
+ interface UseThemeCommandReturn {
9
+ isThemeDialogOpen: boolean;
10
+ openThemeDialog: () => void;
11
+ handleThemeSelect: (themeName: string | undefined, scope: SettingScope) => void;
12
+ handleThemeHighlight: (themeName: string | undefined) => void;
13
+ }
14
+ export declare const useThemeCommand: (loadedSettings: LoadedSettings, setThemeError: (error: string | null) => void, addItem: (item: Omit<HistoryItem, "id">, timestamp: number) => void) => UseThemeCommandReturn;
15
+ export {};
@@ -0,0 +1,79 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { useState, useCallback, useEffect } from 'react';
7
+ import { themeManager } from '../themes/theme-manager.js';
8
+ import { MessageType } from '../types.js';
9
+ import process from 'node:process';
10
+ export const useThemeCommand = (loadedSettings, setThemeError, addItem) => {
11
+ const [isThemeDialogOpen, setIsThemeDialogOpen] = useState(false);
12
+ // Check for invalid theme configuration on startup
13
+ useEffect(() => {
14
+ const effectiveTheme = loadedSettings.merged.theme;
15
+ if (effectiveTheme && !themeManager.findThemeByName(effectiveTheme)) {
16
+ setIsThemeDialogOpen(true);
17
+ setThemeError(`Theme "${effectiveTheme}" not found.`);
18
+ }
19
+ else {
20
+ setThemeError(null);
21
+ }
22
+ }, [loadedSettings.merged.theme, setThemeError]);
23
+ const openThemeDialog = useCallback(() => {
24
+ if (process.env.NO_COLOR) {
25
+ addItem({
26
+ type: MessageType.INFO,
27
+ text: 'Theme configuration unavailable due to NO_COLOR env variable.',
28
+ }, Date.now());
29
+ return;
30
+ }
31
+ setIsThemeDialogOpen(true);
32
+ }, [addItem]);
33
+ const applyTheme = useCallback((themeName) => {
34
+ if (!themeManager.setActiveTheme(themeName)) {
35
+ // If theme is not found, open the theme selection dialog and set error message
36
+ setIsThemeDialogOpen(true);
37
+ setThemeError(`Theme "${themeName}" not found.`);
38
+ }
39
+ else {
40
+ setThemeError(null); // Clear any previous theme error on success
41
+ }
42
+ }, [setThemeError]);
43
+ const handleThemeHighlight = useCallback((themeName) => {
44
+ applyTheme(themeName);
45
+ }, [applyTheme]);
46
+ const handleThemeSelect = useCallback((themeName, scope) => {
47
+ try {
48
+ // Merge user and workspace custom themes (workspace takes precedence)
49
+ const mergedCustomThemes = {
50
+ ...(loadedSettings.user.settings.customThemes || {}),
51
+ ...(loadedSettings.workspace.settings.customThemes || {}),
52
+ };
53
+ // Only allow selecting themes available in the merged custom themes or built-in themes
54
+ const isBuiltIn = themeManager.findThemeByName(themeName);
55
+ const isCustom = themeName && mergedCustomThemes[themeName];
56
+ if (!isBuiltIn && !isCustom) {
57
+ setThemeError(`Theme "${themeName}" not found in selected scope.`);
58
+ setIsThemeDialogOpen(true);
59
+ return;
60
+ }
61
+ loadedSettings.setValue(scope, 'theme', themeName); // Update the merged settings
62
+ if (loadedSettings.merged.customThemes) {
63
+ themeManager.loadCustomThemes(loadedSettings.merged.customThemes);
64
+ }
65
+ applyTheme(loadedSettings.merged.theme); // Apply the current theme
66
+ setThemeError(null);
67
+ }
68
+ finally {
69
+ setIsThemeDialogOpen(false); // Close the dialog
70
+ }
71
+ }, [applyTheme, loadedSettings, setThemeError]);
72
+ return {
73
+ isThemeDialogOpen,
74
+ openThemeDialog,
75
+ handleThemeSelect,
76
+ handleThemeHighlight,
77
+ };
78
+ };
79
+ //# sourceMappingURL=useThemeCommand.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useThemeCommand.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useThemeCommand.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACzD,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAC;AAE1D,OAAO,EAAoB,WAAW,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,OAAO,MAAM,cAAc,CAAC;AAYnC,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,cAA8B,EAC9B,aAA6C,EAC7C,OAAmE,EAC5C,EAAE;IACzB,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElE,mDAAmD;IACnD,SAAS,CAAC,GAAG,EA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 -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ /**
7
+ * Custom hook to manage a timer that increments every second.
8
+ * @param isActive Whether the timer should be running.
9
+ * @param resetKey A key that, when changed, will reset the timer to 0 and restart the interval.
10
+ * @returns The elapsed time in seconds.
11
+ */
12
+ export declare const useTimer: (isActive: boolean, resetKey: unknown) => number;
@@ -0,0 +1,58 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { useState, useEffect, useRef } from 'react';
7
+ /**
8
+ * Custom hook to manage a timer that increments every second.
9
+ * @param isActive Whether the timer should be running.
10
+ * @param resetKey A key that, when changed, will reset the timer to 0 and restart the interval.
11
+ * @returns The elapsed time in seconds.
12
+ */
13
+ export const useTimer = (isActive, resetKey) => {
14
+ const [elapsedTime, setElapsedTime] = useState(0);
15
+ const timerRef = useRef(null);
16
+ const prevResetKeyRef = useRef(resetKey);
17
+ const prevIsActiveRef = useRef(isActive);
18
+ useEffect(() => {
19
+ let shouldResetTime = false;
20
+ if (prevResetKeyRef.current !== resetKey) {
21
+ shouldResetTime = true;
22
+ prevResetKeyRef.current = resetKey;
23
+ }
24
+ if (prevIsActiveRef.current === false && isActive) {
25
+ // Transitioned from inactive to active
26
+ shouldResetTime = true;
27
+ }
28
+ if (shouldResetTime) {
29
+ setElapsedTime(0);
30
+ }
31
+ prevIsActiveRef.current = isActive;
32
+ // Manage interval
33
+ if (isActive) {
34
+ // Clear previous interval unconditionally before starting a new one
35
+ // This handles resetKey changes while active, ensuring a fresh interval start.
36
+ if (timerRef.current) {
37
+ clearInterval(timerRef.current);
38
+ }
39
+ timerRef.current = setInterval(() => {
40
+ setElapsedTime((prev) => prev + 1);
41
+ }, 1000);
42
+ }
43
+ else {
44
+ if (timerRef.current) {
45
+ clearInterval(timerRef.current);
46
+ timerRef.current = null;
47
+ }
48
+ }
49
+ return () => {
50
+ if (timerRef.current) {
51
+ clearInterval(timerRef.current);
52
+ timerRef.current = null;
53
+ }
54
+ };
55
+ }, [isActive, resetKey]);
56
+ return elapsedTime;
57
+ };
58
+ //# sourceMappingURL=useTimer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useTimer.js","sourceRoot":"","sources":["../../../../src/ui/hooks/useTimer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAEpD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,QAAiB,EAAE,QAAiB,EAAE,EAAE;IAC/D,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;IAClD,MAAM,QAAQ,GAAG,MAAM,CAAwB,IAAI,CAAC,CAAC;IACrD,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IACzC,MAAM,eAAe,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAC;IAEzC,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,eAAe,GAAG,KAAK,CAAC;QAE5B,IAAI,eAAe,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;YACzC,eAAe,GAAG,IAAI,CAAC;YACvB,eAAe,CAAC,OAAO,GAAG,QAAQ,CAAC;QACrC,CAAC;QAED,IAAI,eAAe,CAAC,OAAO,KAAK,KAAK,IAAI,QAAQ,EAAE,CAAC;YAClD,uCAAuC;YACvC,eAAe,GAAG,IAAI,CAAC;QACzB,CAAC;QAED,IAAI,eAAe,EAAE,CAAC;YACpB,cAAc,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;QACD,eAAe,CAAC,OAAO,GAAG,QAAQ,CAAC;QAEnC,kBAAkB;QAClB,IAAI,QAAQ,EAAE,CAAC;YACb,oEAAoE;YACpE,+EAA+E;YAC/E,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACrB,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YAClC,CAAC;YACD,QAAQ,CAAC,OAAO,GAAG,WAAW,CAAC,GAAG,EAAE;gBAClC,cAAc,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC;YACrC,CAAC,EAAE,IAAI,CAAC,CAAC;QACX,CAAC;aAAM,CAAC;YACN,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACrB,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAChC,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;YAC1B,CAAC;QACH,CAAC;QAED,OAAO,GAAG,EAAE;YACV,IAAI,QAAQ,CAAC,OAAO,EAAE,CAAC;gBACrB,aAAa,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;gBAChC,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;YAC1B,CAAC;QACH,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC;IAEzB,OAAO,WAAW,CAAC;AACrB,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Config } from '@google/gemini-cli-core';
7
+ interface CloudFreePrivacyNoticeProps {
8
+ config: Config;
9
+ onExit: () => void;
10
+ }
11
+ export declare const CloudFreePrivacyNotice: ({ config, onExit, }: CloudFreePrivacyNoticeProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,40 @@
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 { Box, Newline, Text, useInput } from 'ink';
8
+ import { RadioButtonSelect } from '../components/shared/RadioButtonSelect.js';
9
+ import { usePrivacySettings } from '../hooks/usePrivacySettings.js';
10
+ import { CloudPaidPrivacyNotice } from './CloudPaidPrivacyNotice.js';
11
+ import { Colors } from '../colors.js';
12
+ export const CloudFreePrivacyNotice = ({ config, onExit, }) => {
13
+ const { privacyState, updateDataCollectionOptIn } = usePrivacySettings(config);
14
+ useInput((input, key) => {
15
+ if (privacyState.error && key.escape) {
16
+ onExit();
17
+ }
18
+ });
19
+ if (privacyState.isLoading) {
20
+ return _jsx(Text, { color: Colors.Gray, children: "Loading..." });
21
+ }
22
+ if (privacyState.error) {
23
+ return (_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsxs(Text, { color: Colors.AccentRed, children: ["Error loading Opt-in settings: ", privacyState.error] }), _jsx(Text, { color: Colors.Gray, children: "Press Esc to exit." })] }));
24
+ }
25
+ if (privacyState.isFreeTier === false) {
26
+ return _jsx(CloudPaidPrivacyNotice, { onExit: onExit });
27
+ }
28
+ const items = [
29
+ { label: 'Yes', value: true },
30
+ { label: 'No', value: false },
31
+ ];
32
+ return (_jsxs(Box, { flexDirection: "column", marginY: 1, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Gemini Code Assist for Individuals Privacy Notice" }), _jsx(Newline, {}), _jsxs(Text, { children: ["This notice and our Privacy Policy", _jsx(Text, { color: Colors.AccentBlue, children: "[1]" }), " describe how Gemini Code Assist handles your data. Please read them carefully."] }), _jsx(Newline, {}), _jsx(Text, { children: "When you use Gemini Code Assist for individuals with Gemini CLI, Google collects your prompts, related code, generated output, code edits, related feature usage information, and your feedback to provide, improve, and develop Google products and services and machine learning technologies." }), _jsx(Newline, {}), _jsx(Text, { children: "To help with quality and improve our products (such as generative machine-learning models), human reviewers may read, annotate, and process the data collected above. We take steps to protect your privacy as part of this process. This includes disconnecting the data from your Google Account before reviewers see or annotate it, and storing those disconnected copies for up to 18 months. Please don't submit confidential information or any data you wouldn't want a reviewer to see or Google to use to improve our products, services and machine-learning technologies." }), _jsx(Newline, {}), _jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { children: "Allow Google to use this data to develop and improve our products?" }), _jsx(RadioButtonSelect, { items: items, initialIndex: privacyState.dataCollectionOptIn ? 0 : 1, onSelect: (value) => {
33
+ updateDataCollectionOptIn(value);
34
+ // Only exit if there was no error.
35
+ if (!privacyState.error) {
36
+ onExit();
37
+ }
38
+ } })] }), _jsx(Newline, {}), _jsxs(Text, { children: [_jsx(Text, { color: Colors.AccentBlue, children: "[1]" }), ' ', "https://policies.google.com/privacy"] }), _jsx(Newline, {}), _jsx(Text, { color: Colors.Gray, children: "Press Enter to choose an option and exit." })] }));
39
+ };
40
+ //# sourceMappingURL=CloudFreePrivacyNotice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudFreePrivacyNotice.js","sourceRoot":"","sources":["../../../../src/ui/privacy/CloudFreePrivacyNotice.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAOtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,MAAM,EACN,MAAM,GACsB,EAAE,EAAE;IAChC,MAAM,EAAE,YAAY,EAAE,yBAAyB,EAAE,GAC/C,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAE7B,QAAQ,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACtB,IAAI,YAAY,CAAC,KAAK,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACrC,MAAM,EAAE,CAAC;QACX,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,IAA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AC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,EACtD,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;4BAClB,yBAAyB,CAAC,KAAK,CAAC,CAAC;4BACjC,mCAAmC;4BACnC,IAAI,CAAC,YAAY,CAAC,KAAK,EAAE,CAAC;gCACxB,MAAM,EAAE,CAAC;4BACX,CAAC;wBACH,CAAC,GACD,IACE,EACN,KAAC,OAAO,KAAG,EACX,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,oBAAY,EAAC,GAAG,2CAEzC,EACP,KAAC,OAAO,KAAG,EACX,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,0DAAkD,IACtE,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ interface CloudPaidPrivacyNoticeProps {
7
+ onExit: () => void;
8
+ }
9
+ export declare const CloudPaidPrivacyNotice: ({ onExit, }: CloudPaidPrivacyNoticeProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,17 @@
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 { Box, Newline, Text, useInput } from 'ink';
8
+ import { Colors } from '../colors.js';
9
+ export const CloudPaidPrivacyNotice = ({ onExit, }) => {
10
+ useInput((input, key) => {
11
+ if (key.escape) {
12
+ onExit();
13
+ }
14
+ });
15
+ return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Vertex AI Notice" }), _jsx(Newline, {}), _jsxs(Text, { children: ["Service Specific Terms", _jsx(Text, { color: Colors.AccentBlue, children: "[1]" }), " are incorporated into the agreement under which Google has agreed to provide Google Cloud Platform", _jsx(Text, { color: Colors.AccentGreen, children: "[2]" }), " to Customer (the \u201CAgreement\u201D). If the Agreement authorizes the resale or supply of Google Cloud Platform under a Google Cloud partner or reseller program, then except for in the section entitled \u201CPartner-Specific Terms\u201D, all references to Customer in the Service Specific Terms mean Partner or Reseller (as applicable), and all references to Customer Data in the Service Specific Terms mean Partner Data. Capitalized terms used but not defined in the Service Specific Terms have the meaning given to them in the Agreement."] }), _jsx(Newline, {}), _jsxs(Text, { children: [_jsx(Text, { color: Colors.AccentBlue, children: "[1]" }), ' ', "https://cloud.google.com/terms/service-terms"] }), _jsxs(Text, { children: [_jsx(Text, { color: Colors.AccentGreen, children: "[2]" }), ' ', "https://cloud.google.com/terms/services"] }), _jsx(Newline, {}), _jsx(Text, { color: Colors.Gray, children: "Press Esc to exit." })] }));
16
+ };
17
+ //# sourceMappingURL=CloudPaidPrivacyNotice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CloudPaidPrivacyNotice.js","sourceRoot":"","sources":["../../../../src/ui/privacy/CloudPaidPrivacyNotice.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAMtC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,EACrC,MAAM,GACsB,EAAE,EAAE;IAChC,QAAQ,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACtB,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACf,MAAM,EAAE,CAAC;QACX,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,aACzC,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,YAAY,iCAE9B,EACP,KAAC,OAAO,KAAG,EACX,MAAC,IAAI,yCACmB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,oBAAY,yGAE3C,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,WAAW,oBAAY,uiBAS3D,EACP,KAAC,OAAO,KAAG,EACX,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,oBAAY,EAAC,GAAG,oDAEzC,EACP,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,WAAW,oBAAY,EAAC,GAAG,+CAE1C,EACP,KAAC,OAAO,KAAG,EACX,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,mCAA2B,IAC/C,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ interface GeminiPrivacyNoticeProps {
7
+ onExit: () => void;
8
+ }
9
+ export declare const GeminiPrivacyNotice: ({ onExit }: GeminiPrivacyNoticeProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
@@ -0,0 +1,17 @@
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 { Box, Newline, Text, useInput } from 'ink';
8
+ import { Colors } from '../colors.js';
9
+ export const GeminiPrivacyNotice = ({ onExit }) => {
10
+ useInput((input, key) => {
11
+ if (key.escape) {
12
+ onExit();
13
+ }
14
+ });
15
+ return (_jsxs(Box, { flexDirection: "column", marginBottom: 1, children: [_jsx(Text, { bold: true, color: Colors.AccentPurple, children: "Gemini API Key Notice" }), _jsx(Newline, {}), _jsxs(Text, { children: ["By using the Gemini API", _jsx(Text, { color: Colors.AccentBlue, children: "[1]" }), ", Google AI Studio", _jsx(Text, { color: Colors.AccentRed, children: "[2]" }), ", and the other Google developer services that reference these terms (collectively, the \"APIs\" or \"Services\"), you are agreeing to Google APIs Terms of Service (the \"API Terms\")", _jsx(Text, { color: Colors.AccentGreen, children: "[3]" }), ", and the Gemini API Additional Terms of Service (the \"Additional Terms\")", _jsx(Text, { color: Colors.AccentPurple, children: "[4]" }), "."] }), _jsx(Newline, {}), _jsxs(Text, { children: [_jsx(Text, { color: Colors.AccentBlue, children: "[1]" }), ' ', "https://ai.google.dev/docs/gemini_api_overview"] }), _jsxs(Text, { children: [_jsx(Text, { color: Colors.AccentRed, children: "[2]" }), " https://aistudio.google.com/"] }), _jsxs(Text, { children: [_jsx(Text, { color: Colors.AccentGreen, children: "[3]" }), ' ', "https://developers.google.com/terms"] }), _jsxs(Text, { children: [_jsx(Text, { color: Colors.AccentPurple, children: "[4]" }), ' ', "https://ai.google.dev/gemini-api/terms"] }), _jsx(Newline, {}), _jsx(Text, { color: Colors.Gray, children: "Press Esc to exit." })] }));
16
+ };
17
+ //# sourceMappingURL=GeminiPrivacyNotice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"GeminiPrivacyNotice.js","sourceRoot":"","sources":["../../../../src/ui/privacy/GeminiPrivacyNotice.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAMtC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,EAAE,MAAM,EAA4B,EAAE,EAAE;IAC1E,QAAQ,CAAC,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;QACtB,IAAI,GAAG,CAAC,MAAM,EAAE,CAAC;YACf,MAAM,EAAE,CAAC;QACX,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,YAAY,EAAE,CAAC,aACzC,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,YAAY,sCAE9B,EACP,KAAC,OAAO,KAAG,EACX,MAAC,IAAI,0CACoB,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,oBAAY,wBAEjE,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,oBAAY,6LAIzC,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,WAAW,oBAAY,iFAE3C,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,oBAAY,SACvC,EACP,KAAC,OAAO,KAAG,EACX,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,UAAU,oBAAY,EAAC,GAAG,sDAEzC,EACP,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,oBAAY,qCACpC,EACP,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,WAAW,oBAAY,EAAC,GAAG,2CAE1C,EACP,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,YAAY,oBAAY,EAAC,GAAG,8CAE3C,EACP,KAAC,OAAO,KAAG,EACX,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,mCAA2B,IAC/C,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { type Config } from '@google/gemini-cli-core';
7
+ interface PrivacyNoticeProps {
8
+ onExit: () => void;
9
+ config: Config;
10
+ }
11
+ export declare const PrivacyNotice: ({ onExit, config }: PrivacyNoticeProps) => import("react/jsx-runtime").JSX.Element;
12
+ export {};
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ /**
3
+ * @license
4
+ * Copyright 2025 Google LLC
5
+ * SPDX-License-Identifier: Apache-2.0
6
+ */
7
+ import { Box } from 'ink';
8
+ import { AuthType } from '@google/gemini-cli-core';
9
+ import { GeminiPrivacyNotice } from './GeminiPrivacyNotice.js';
10
+ import { CloudPaidPrivacyNotice } from './CloudPaidPrivacyNotice.js';
11
+ import { CloudFreePrivacyNotice } from './CloudFreePrivacyNotice.js';
12
+ const PrivacyNoticeText = ({ config, onExit, }) => {
13
+ const authType = config.getContentGeneratorConfig()?.authType;
14
+ switch (authType) {
15
+ case AuthType.USE_GEMINI:
16
+ return _jsx(GeminiPrivacyNotice, { onExit: onExit });
17
+ case AuthType.USE_VERTEX_AI:
18
+ return _jsx(CloudPaidPrivacyNotice, { onExit: onExit });
19
+ case AuthType.LOGIN_WITH_GOOGLE:
20
+ default:
21
+ return _jsx(CloudFreePrivacyNotice, { config: config, onExit: onExit });
22
+ }
23
+ };
24
+ export const PrivacyNotice = ({ onExit, config }) => (_jsx(Box, { borderStyle: "round", padding: 1, flexDirection: "column", children: _jsx(PrivacyNoticeText, { config: config, onExit: onExit }) }));
25
+ //# sourceMappingURL=PrivacyNotice.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PrivacyNotice.js","sourceRoot":"","sources":["../../../../src/ui/privacy/PrivacyNotice.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;AAEH,OAAO,EAAE,GAAG,EAAE,MAAM,KAAK,CAAC;AAC1B,OAAO,EAAe,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAOrE,MAAM,iBAAiB,GAAG,CAAC,EACzB,MAAM,EACN,MAAM,GAIP,EAAE,EAAE;IACH,MAAM,QAAQ,GAAG,MAAM,CAAC,yBAAyB,EAAE,EAAE,QAAQ,CAAC;IAE9D,QAAQ,QAAQ,EAAE,CAAC;QACjB,KAAK,QAAQ,CAAC,UAAU;YACtB,OAAO,KAAC,mBAAmB,IAAC,MAAM,EAAE,MAAM,GAAI,CAAC;QACjD,KAAK,QAAQ,CAAC,aAAa;YACzB,OAAO,KAAC,sBAAsB,IAAC,MAAM,EAAE,MAAM,GAAI,CAAC;QACpD,KAAK,QAAQ,CAAC,iBAAiB,CAAC;QAChC;YACE,OAAO,KAAC,sBAAsB,IAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,CAAC;IACtE,CAAC;AACH,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,MAAM,EAAE,MAAM,EAAsB,EAAE,EAAE,CAAC,CACvE,KAAC,GAAG,IAAC,WAAW,EAAC,OAAO,EAAC,OAAO,EAAE,CAAC,EAAE,aAAa,EAAC,QAAQ,YACzD,KAAC,iBAAiB,IAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAI,GACjD,CACP,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { Theme } from './theme.js';
7
+ export declare const ANSILight: Theme;