@google/gemini-cli 0.1.0-development.2 → 0.1.1

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 (402) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +16 -38
  3. package/bundle/gemini.js +257368 -0
  4. package/{dist/src/utils → bundle}/sandbox-macos-permissive-proxied.sb +1 -1
  5. package/{dist/src/utils → bundle}/sandbox-macos-restrictive-proxied.sb +1 -1
  6. package/bundle/shell.json +18 -0
  7. package/bundle/shell.md +16 -0
  8. package/package.json +72 -67
  9. package/dist/.last_build +0 -0
  10. package/dist/index.d.ts +0 -7
  11. package/dist/index.js +0 -20
  12. package/dist/index.js.map +0 -1
  13. package/dist/package.json +0 -80
  14. package/dist/src/config/auth.d.ts +0 -6
  15. package/dist/src/config/auth.js +0 -33
  16. package/dist/src/config/auth.js.map +0 -1
  17. package/dist/src/config/config.d.ts +0 -13
  18. package/dist/src/config/config.js +0 -211
  19. package/dist/src/config/config.js.map +0 -1
  20. package/dist/src/config/extension.d.ts +0 -20
  21. package/dist/src/config/extension.js +0 -81
  22. package/dist/src/config/extension.js.map +0 -1
  23. package/dist/src/config/sandboxConfig.d.ts +0 -13
  24. package/dist/src/config/sandboxConfig.js +0 -75
  25. package/dist/src/config/sandboxConfig.js.map +0 -1
  26. package/dist/src/config/settings.d.ts +0 -72
  27. package/dist/src/config/settings.js +0 -227
  28. package/dist/src/config/settings.js.map +0 -1
  29. package/dist/src/gemini.d.ts +0 -6
  30. package/dist/src/gemini.js +0 -216
  31. package/dist/src/gemini.js.map +0 -1
  32. package/dist/src/generated/git-commit.d.ts +0 -6
  33. package/dist/src/generated/git-commit.js +0 -9
  34. package/dist/src/generated/git-commit.js.map +0 -1
  35. package/dist/src/nonInteractiveCli.d.ts +0 -7
  36. package/dist/src/nonInteractiveCli.js +0 -115
  37. package/dist/src/nonInteractiveCli.js.map +0 -1
  38. package/dist/src/services/CommandService.d.ts +0 -13
  39. package/dist/src/services/CommandService.js +0 -30
  40. package/dist/src/services/CommandService.js.map +0 -1
  41. package/dist/src/ui/App.d.ts +0 -14
  42. package/dist/src/ui/App.js +0 -391
  43. package/dist/src/ui/App.js.map +0 -1
  44. package/dist/src/ui/colors.d.ts +0 -7
  45. package/dist/src/ui/colors.js +0 -48
  46. package/dist/src/ui/colors.js.map +0 -1
  47. package/dist/src/ui/commands/clearCommand.d.ts +0 -7
  48. package/dist/src/ui/commands/clearCommand.js +0 -15
  49. package/dist/src/ui/commands/clearCommand.js.map +0 -1
  50. package/dist/src/ui/commands/helpCommand.d.ts +0 -7
  51. package/dist/src/ui/commands/helpCommand.js +0 -18
  52. package/dist/src/ui/commands/helpCommand.js.map +0 -1
  53. package/dist/src/ui/commands/memoryCommand.d.ts +0 -7
  54. package/dist/src/ui/commands/memoryCommand.js +0 -81
  55. package/dist/src/ui/commands/memoryCommand.js.map +0 -1
  56. package/dist/src/ui/commands/types.d.ts +0 -63
  57. package/dist/src/ui/commands/types.js +0 -7
  58. package/dist/src/ui/commands/types.js.map +0 -1
  59. package/dist/src/ui/components/AboutBox.d.ts +0 -16
  60. package/dist/src/ui/components/AboutBox.js +0 -6
  61. package/dist/src/ui/components/AboutBox.js.map +0 -1
  62. package/dist/src/ui/components/AsciiArt.d.ts +0 -7
  63. package/dist/src/ui/components/AsciiArt.js +0 -26
  64. package/dist/src/ui/components/AsciiArt.js.map +0 -1
  65. package/dist/src/ui/components/AuthDialog.d.ts +0 -15
  66. package/dist/src/ui/components/AuthDialog.js +0 -66
  67. package/dist/src/ui/components/AuthDialog.js.map +0 -1
  68. package/dist/src/ui/components/AuthInProgress.d.ts +0 -11
  69. package/dist/src/ui/components/AuthInProgress.js +0 -27
  70. package/dist/src/ui/components/AuthInProgress.js.map +0 -1
  71. package/dist/src/ui/components/AutoAcceptIndicator.d.ts +0 -12
  72. package/dist/src/ui/components/AutoAcceptIndicator.js +0 -26
  73. package/dist/src/ui/components/AutoAcceptIndicator.js.map +0 -1
  74. package/dist/src/ui/components/ConsolePatcher.d.ts +0 -12
  75. package/dist/src/ui/components/ConsolePatcher.js +0 -40
  76. package/dist/src/ui/components/ConsolePatcher.js.map +0 -1
  77. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +0 -11
  78. package/dist/src/ui/components/ConsoleSummaryDisplay.js +0 -11
  79. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +0 -1
  80. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +0 -15
  81. package/dist/src/ui/components/ContextSummaryDisplay.js +0 -41
  82. package/dist/src/ui/components/ContextSummaryDisplay.js.map +0 -1
  83. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +0 -14
  84. package/dist/src/ui/components/DetailedMessagesDisplay.js +0 -34
  85. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +0 -1
  86. package/dist/src/ui/components/EditorSettingsDialog.d.ts +0 -15
  87. package/dist/src/ui/components/EditorSettingsDialog.js +0 -73
  88. package/dist/src/ui/components/EditorSettingsDialog.js.map +0 -1
  89. package/dist/src/ui/components/Footer.d.ts +0 -20
  90. package/dist/src/ui/components/Footer.js +0 -13
  91. package/dist/src/ui/components/Footer.js.map +0 -1
  92. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +0 -17
  93. package/dist/src/ui/components/GeminiRespondingSpinner.js +0 -16
  94. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +0 -1
  95. package/dist/src/ui/components/Header.d.ts +0 -12
  96. package/dist/src/ui/components/Header.js +0 -20
  97. package/dist/src/ui/components/Header.js.map +0 -1
  98. package/dist/src/ui/components/Help.d.ts +0 -12
  99. package/dist/src/ui/components/Help.js +0 -10
  100. package/dist/src/ui/components/Help.js.map +0 -1
  101. package/dist/src/ui/components/HistoryItemDisplay.d.ts +0 -18
  102. package/dist/src/ui/components/HistoryItemDisplay.js +0 -17
  103. package/dist/src/ui/components/HistoryItemDisplay.js.map +0 -1
  104. package/dist/src/ui/components/InputPrompt.d.ts +0 -25
  105. package/dist/src/ui/components/InputPrompt.js +0 -280
  106. package/dist/src/ui/components/InputPrompt.js.map +0 -1
  107. package/dist/src/ui/components/LoadingIndicator.d.ts +0 -15
  108. package/dist/src/ui/components/LoadingIndicator.js +0 -19
  109. package/dist/src/ui/components/LoadingIndicator.js.map +0 -1
  110. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +0 -7
  111. package/dist/src/ui/components/MemoryUsageDisplay.js +0 -27
  112. package/dist/src/ui/components/MemoryUsageDisplay.js.map +0 -1
  113. package/dist/src/ui/components/ModelStatsDisplay.d.ts +0 -7
  114. package/dist/src/ui/components/ModelStatsDisplay.js +0 -33
  115. package/dist/src/ui/components/ModelStatsDisplay.js.map +0 -1
  116. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +0 -11
  117. package/dist/src/ui/components/SessionSummaryDisplay.js +0 -4
  118. package/dist/src/ui/components/SessionSummaryDisplay.js.map +0 -1
  119. package/dist/src/ui/components/ShellModeIndicator.d.ts +0 -7
  120. package/dist/src/ui/components/ShellModeIndicator.js +0 -5
  121. package/dist/src/ui/components/ShellModeIndicator.js.map +0 -1
  122. package/dist/src/ui/components/ShowMoreLines.d.ts +0 -10
  123. package/dist/src/ui/components/ShowMoreLines.js +0 -24
  124. package/dist/src/ui/components/ShowMoreLines.js.map +0 -1
  125. package/dist/src/ui/components/StatsDisplay.d.ts +0 -12
  126. package/dist/src/ui/components/StatsDisplay.js +0 -42
  127. package/dist/src/ui/components/StatsDisplay.js.map +0 -1
  128. package/dist/src/ui/components/SuggestionsDisplay.d.ts +0 -21
  129. package/dist/src/ui/components/SuggestionsDisplay.js +0 -32
  130. package/dist/src/ui/components/SuggestionsDisplay.js.map +0 -1
  131. package/dist/src/ui/components/ThemeDialog.d.ts +0 -19
  132. package/dist/src/ui/components/ThemeDialog.js +0 -126
  133. package/dist/src/ui/components/ThemeDialog.js.map +0 -1
  134. package/dist/src/ui/components/Tips.d.ts +0 -12
  135. package/dist/src/ui/components/Tips.js +0 -8
  136. package/dist/src/ui/components/Tips.js.map +0 -1
  137. package/dist/src/ui/components/ToolStatsDisplay.d.ts +0 -7
  138. package/dist/src/ui/components/ToolStatsDisplay.js +0 -41
  139. package/dist/src/ui/components/ToolStatsDisplay.js.map +0 -1
  140. package/dist/src/ui/components/UpdateNotification.d.ts +0 -10
  141. package/dist/src/ui/components/UpdateNotification.js +0 -10
  142. package/dist/src/ui/components/UpdateNotification.js.map +0 -1
  143. package/dist/src/ui/components/messages/CompressionMessage.d.ts +0 -11
  144. package/dist/src/ui/components/messages/CompressionMessage.js +0 -16
  145. package/dist/src/ui/components/messages/CompressionMessage.js.map +0 -1
  146. package/dist/src/ui/components/messages/DiffRenderer.d.ts +0 -15
  147. package/dist/src/ui/components/messages/DiffRenderer.js +0 -212
  148. package/dist/src/ui/components/messages/DiffRenderer.js.map +0 -1
  149. package/dist/src/ui/components/messages/ErrorMessage.d.ts +0 -11
  150. package/dist/src/ui/components/messages/ErrorMessage.js +0 -9
  151. package/dist/src/ui/components/messages/ErrorMessage.js.map +0 -1
  152. package/dist/src/ui/components/messages/GeminiMessage.d.ts +0 -14
  153. package/dist/src/ui/components/messages/GeminiMessage.js +0 -10
  154. package/dist/src/ui/components/messages/GeminiMessage.js.map +0 -1
  155. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +0 -14
  156. package/dist/src/ui/components/messages/GeminiMessageContent.js +0 -15
  157. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +0 -1
  158. package/dist/src/ui/components/messages/InfoMessage.d.ts +0 -11
  159. package/dist/src/ui/components/messages/InfoMessage.js +0 -9
  160. package/dist/src/ui/components/messages/InfoMessage.js.map +0 -1
  161. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +0 -15
  162. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +0 -111
  163. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +0 -1
  164. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +0 -18
  165. package/dist/src/ui/components/messages/ToolGroupMessage.js +0 -53
  166. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +0 -1
  167. package/dist/src/ui/components/messages/ToolMessage.d.ts +0 -15
  168. package/dist/src/ui/components/messages/ToolMessage.js +0 -61
  169. package/dist/src/ui/components/messages/ToolMessage.js.map +0 -1
  170. package/dist/src/ui/components/messages/UserMessage.d.ts +0 -11
  171. package/dist/src/ui/components/messages/UserMessage.js +0 -9
  172. package/dist/src/ui/components/messages/UserMessage.js.map +0 -1
  173. package/dist/src/ui/components/messages/UserShellMessage.d.ts +0 -11
  174. package/dist/src/ui/components/messages/UserShellMessage.js +0 -9
  175. package/dist/src/ui/components/messages/UserShellMessage.js.map +0 -1
  176. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +0 -61
  177. package/dist/src/ui/components/shared/MaxSizedBox.js +0 -384
  178. package/dist/src/ui/components/shared/MaxSizedBox.js.map +0 -1
  179. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +0 -41
  180. package/dist/src/ui/components/shared/RadioButtonSelect.js +0 -52
  181. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +0 -1
  182. package/dist/src/ui/components/shared/text-buffer.d.ts +0 -184
  183. package/dist/src/ui/components/shared/text-buffer.js +0 -1010
  184. package/dist/src/ui/components/shared/text-buffer.js.map +0 -1
  185. package/dist/src/ui/constants.d.ts +0 -8
  186. package/dist/src/ui/constants.js +0 -12
  187. package/dist/src/ui/constants.js.map +0 -1
  188. package/dist/src/ui/contexts/OverflowContext.d.ts +0 -19
  189. package/dist/src/ui/contexts/OverflowContext.js +0 -43
  190. package/dist/src/ui/contexts/OverflowContext.js.map +0 -1
  191. package/dist/src/ui/contexts/SessionContext.d.ts +0 -33
  192. package/dist/src/ui/contexts/SessionContext.js +0 -49
  193. package/dist/src/ui/contexts/SessionContext.js.map +0 -1
  194. package/dist/src/ui/contexts/StreamingContext.d.ts +0 -9
  195. package/dist/src/ui/contexts/StreamingContext.js +0 -15
  196. package/dist/src/ui/contexts/StreamingContext.js.map +0 -1
  197. package/dist/src/ui/editors/editorSettingsManager.d.ts +0 -19
  198. package/dist/src/ui/editors/editorSettingsManager.js +0 -54
  199. package/dist/src/ui/editors/editorSettingsManager.js.map +0 -1
  200. package/dist/src/ui/hooks/atCommandProcessor.d.ts +0 -31
  201. package/dist/src/ui/hooks/atCommandProcessor.js +0 -310
  202. package/dist/src/ui/hooks/atCommandProcessor.js.map +0 -1
  203. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +0 -16
  204. package/dist/src/ui/hooks/shellCommandProcessor.js +0 -261
  205. package/dist/src/ui/hooks/shellCommandProcessor.js.map +0 -1
  206. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +0 -27
  207. package/dist/src/ui/hooks/slashCommandProcessor.js +0 -1050
  208. package/dist/src/ui/hooks/slashCommandProcessor.js.map +0 -1
  209. package/dist/src/ui/hooks/useAuthCommand.d.ts +0 -14
  210. package/dist/src/ui/hooks/useAuthCommand.js +0 -54
  211. package/dist/src/ui/hooks/useAuthCommand.js.map +0 -1
  212. package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +0 -10
  213. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +0 -37
  214. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +0 -1
  215. package/dist/src/ui/hooks/useBracketedPaste.d.ts +0 -12
  216. package/dist/src/ui/hooks/useBracketedPaste.js +0 -32
  217. package/dist/src/ui/hooks/useBracketedPaste.js.map +0 -1
  218. package/dist/src/ui/hooks/useCompletion.d.ts +0 -21
  219. package/dist/src/ui/hooks/useCompletion.js +0 -372
  220. package/dist/src/ui/hooks/useCompletion.js.map +0 -1
  221. package/dist/src/ui/hooks/useConsoleMessages.d.ts +0 -12
  222. package/dist/src/ui/hooks/useConsoleMessages.js +0 -60
  223. package/dist/src/ui/hooks/useConsoleMessages.js.map +0 -1
  224. package/dist/src/ui/hooks/useEditorSettings.d.ts +0 -16
  225. package/dist/src/ui/hooks/useEditorSettings.js +0 -43
  226. package/dist/src/ui/hooks/useEditorSettings.js.map +0 -1
  227. package/dist/src/ui/hooks/useGeminiStream.d.ts +0 -23
  228. package/dist/src/ui/hooks/useGeminiStream.js +0 -518
  229. package/dist/src/ui/hooks/useGeminiStream.js.map +0 -1
  230. package/dist/src/ui/hooks/useGitBranchName.d.ts +0 -6
  231. package/dist/src/ui/hooks/useGitBranchName.js +0 -61
  232. package/dist/src/ui/hooks/useGitBranchName.js.map +0 -1
  233. package/dist/src/ui/hooks/useHistoryManager.d.ts +0 -22
  234. package/dist/src/ui/hooks/useHistoryManager.js +0 -72
  235. package/dist/src/ui/hooks/useHistoryManager.js.map +0 -1
  236. package/dist/src/ui/hooks/useInputHistory.d.ts +0 -19
  237. package/dist/src/ui/hooks/useInputHistory.js +0 -84
  238. package/dist/src/ui/hooks/useInputHistory.js.map +0 -1
  239. package/dist/src/ui/hooks/useKeypress.d.ts +0 -29
  240. package/dist/src/ui/hooks/useKeypress.js +0 -86
  241. package/dist/src/ui/hooks/useKeypress.js.map +0 -1
  242. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +0 -10
  243. package/dist/src/ui/hooks/useLoadingIndicator.js +0 -44
  244. package/dist/src/ui/hooks/useLoadingIndicator.js.map +0 -1
  245. package/dist/src/ui/hooks/useLogger.d.ts +0 -10
  246. package/dist/src/ui/hooks/useLogger.js +0 -29
  247. package/dist/src/ui/hooks/useLogger.js.map +0 -1
  248. package/dist/src/ui/hooks/usePhraseCycler.d.ts +0 -14
  249. package/dist/src/ui/hooks/usePhraseCycler.js +0 -189
  250. package/dist/src/ui/hooks/usePhraseCycler.js.map +0 -1
  251. package/dist/src/ui/hooks/usePrivacySettings.d.ts +0 -16
  252. package/dist/src/ui/hooks/usePrivacySettings.js +0 -115
  253. package/dist/src/ui/hooks/usePrivacySettings.js.map +0 -1
  254. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +0 -33
  255. package/dist/src/ui/hooks/useReactToolScheduler.js +0 -186
  256. package/dist/src/ui/hooks/useReactToolScheduler.js.map +0 -1
  257. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +0 -6
  258. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +0 -7
  259. package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +0 -1
  260. package/dist/src/ui/hooks/useShellHistory.d.ts +0 -11
  261. package/dist/src/ui/hooks/useShellHistory.js +0 -89
  262. package/dist/src/ui/hooks/useShellHistory.js.map +0 -1
  263. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +0 -9
  264. package/dist/src/ui/hooks/useShowMemoryCommand.js +0 -58
  265. package/dist/src/ui/hooks/useShowMemoryCommand.js.map +0 -1
  266. package/dist/src/ui/hooks/useStateAndRef.d.ts +0 -7
  267. package/dist/src/ui/hooks/useStateAndRef.js +0 -26
  268. package/dist/src/ui/hooks/useStateAndRef.js.map +0 -1
  269. package/dist/src/ui/hooks/useTerminalSize.d.ts +0 -9
  270. package/dist/src/ui/hooks/useTerminalSize.js +0 -27
  271. package/dist/src/ui/hooks/useTerminalSize.js.map +0 -1
  272. package/dist/src/ui/hooks/useThemeCommand.d.ts +0 -15
  273. package/dist/src/ui/hooks/useThemeCommand.js +0 -78
  274. package/dist/src/ui/hooks/useThemeCommand.js.map +0 -1
  275. package/dist/src/ui/hooks/useTimer.d.ts +0 -12
  276. package/dist/src/ui/hooks/useTimer.js +0 -58
  277. package/dist/src/ui/hooks/useTimer.js.map +0 -1
  278. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +0 -12
  279. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +0 -40
  280. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js.map +0 -1
  281. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +0 -10
  282. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +0 -17
  283. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js.map +0 -1
  284. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +0 -10
  285. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +0 -17
  286. package/dist/src/ui/privacy/GeminiPrivacyNotice.js.map +0 -1
  287. package/dist/src/ui/privacy/PrivacyNotice.d.ts +0 -12
  288. package/dist/src/ui/privacy/PrivacyNotice.js +0 -25
  289. package/dist/src/ui/privacy/PrivacyNotice.js.map +0 -1
  290. package/dist/src/ui/themes/ansi-light.d.ts +0 -7
  291. package/dist/src/ui/themes/ansi-light.js +0 -139
  292. package/dist/src/ui/themes/ansi-light.js.map +0 -1
  293. package/dist/src/ui/themes/ansi.d.ts +0 -7
  294. package/dist/src/ui/themes/ansi.js +0 -149
  295. package/dist/src/ui/themes/ansi.js.map +0 -1
  296. package/dist/src/ui/themes/atom-one-dark.d.ts +0 -7
  297. package/dist/src/ui/themes/atom-one-dark.js +0 -136
  298. package/dist/src/ui/themes/atom-one-dark.js.map +0 -1
  299. package/dist/src/ui/themes/ayu-light.d.ts +0 -7
  300. package/dist/src/ui/themes/ayu-light.js +0 -128
  301. package/dist/src/ui/themes/ayu-light.js.map +0 -1
  302. package/dist/src/ui/themes/ayu.d.ts +0 -7
  303. package/dist/src/ui/themes/ayu.js +0 -102
  304. package/dist/src/ui/themes/ayu.js.map +0 -1
  305. package/dist/src/ui/themes/default-light.d.ts +0 -7
  306. package/dist/src/ui/themes/default-light.js +0 -100
  307. package/dist/src/ui/themes/default-light.js.map +0 -1
  308. package/dist/src/ui/themes/default.d.ts +0 -7
  309. package/dist/src/ui/themes/default.js +0 -143
  310. package/dist/src/ui/themes/default.js.map +0 -1
  311. package/dist/src/ui/themes/dracula.d.ts +0 -7
  312. package/dist/src/ui/themes/dracula.js +0 -113
  313. package/dist/src/ui/themes/dracula.js.map +0 -1
  314. package/dist/src/ui/themes/github-dark.d.ts +0 -7
  315. package/dist/src/ui/themes/github-dark.js +0 -136
  316. package/dist/src/ui/themes/github-dark.js.map +0 -1
  317. package/dist/src/ui/themes/github-light.d.ts +0 -7
  318. package/dist/src/ui/themes/github-light.js +0 -138
  319. package/dist/src/ui/themes/github-light.js.map +0 -1
  320. package/dist/src/ui/themes/googlecode.d.ts +0 -7
  321. package/dist/src/ui/themes/googlecode.js +0 -135
  322. package/dist/src/ui/themes/googlecode.js.map +0 -1
  323. package/dist/src/ui/themes/no-color.d.ts +0 -7
  324. package/dist/src/ui/themes/no-color.js +0 -84
  325. package/dist/src/ui/themes/no-color.js.map +0 -1
  326. package/dist/src/ui/themes/shades-of-purple.d.ts +0 -11
  327. package/dist/src/ui/themes/shades-of-purple.js +0 -302
  328. package/dist/src/ui/themes/shades-of-purple.js.map +0 -1
  329. package/dist/src/ui/themes/theme-manager.d.ts +0 -33
  330. package/dist/src/ui/themes/theme-manager.js +0 -109
  331. package/dist/src/ui/themes/theme-manager.js.map +0 -1
  332. package/dist/src/ui/themes/theme.d.ts +0 -67
  333. package/dist/src/ui/themes/theme.js +0 -304
  334. package/dist/src/ui/themes/theme.js.map +0 -1
  335. package/dist/src/ui/themes/xcode.d.ts +0 -7
  336. package/dist/src/ui/themes/xcode.js +0 -143
  337. package/dist/src/ui/themes/xcode.js.map +0 -1
  338. package/dist/src/ui/types.d.ts +0 -172
  339. package/dist/src/ui/types.js +0 -43
  340. package/dist/src/ui/types.js.map +0 -1
  341. package/dist/src/ui/utils/CodeColorizer.d.ts +0 -14
  342. package/dist/src/ui/utils/CodeColorizer.js +0 -97
  343. package/dist/src/ui/utils/CodeColorizer.js.map +0 -1
  344. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +0 -16
  345. package/dist/src/ui/utils/InlineMarkdownRenderer.js +0 -104
  346. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +0 -1
  347. package/dist/src/ui/utils/MarkdownDisplay.d.ts +0 -14
  348. package/dist/src/ui/utils/MarkdownDisplay.js +0 -197
  349. package/dist/src/ui/utils/MarkdownDisplay.js.map +0 -1
  350. package/dist/src/ui/utils/TableRenderer.d.ts +0 -17
  351. package/dist/src/ui/utils/TableRenderer.js +0 -84
  352. package/dist/src/ui/utils/TableRenderer.js.map +0 -1
  353. package/dist/src/ui/utils/commandUtils.d.ts +0 -22
  354. package/dist/src/ui/utils/commandUtils.js +0 -25
  355. package/dist/src/ui/utils/commandUtils.js.map +0 -1
  356. package/dist/src/ui/utils/computeStats.d.ts +0 -10
  357. package/dist/src/ui/utils/computeStats.js +0 -55
  358. package/dist/src/ui/utils/computeStats.js.map +0 -1
  359. package/dist/src/ui/utils/displayUtils.d.ts +0 -17
  360. package/dist/src/ui/utils/displayUtils.js +0 -24
  361. package/dist/src/ui/utils/displayUtils.js.map +0 -1
  362. package/dist/src/ui/utils/errorParsing.d.ts +0 -15
  363. package/dist/src/ui/utils/errorParsing.js +0 -79
  364. package/dist/src/ui/utils/errorParsing.js.map +0 -1
  365. package/dist/src/ui/utils/formatters.d.ts +0 -13
  366. package/dist/src/ui/utils/formatters.js +0 -56
  367. package/dist/src/ui/utils/formatters.js.map +0 -1
  368. package/dist/src/ui/utils/markdownUtilities.d.ts +0 -6
  369. package/dist/src/ui/utils/markdownUtilities.js +0 -110
  370. package/dist/src/ui/utils/markdownUtilities.js.map +0 -1
  371. package/dist/src/ui/utils/textUtils.d.ts +0 -22
  372. package/dist/src/ui/utils/textUtils.js +0 -58
  373. package/dist/src/ui/utils/textUtils.js.map +0 -1
  374. package/dist/src/ui/utils/updateCheck.d.ts +0 -6
  375. package/dist/src/ui/utils/updateCheck.js +0 -36
  376. package/dist/src/ui/utils/updateCheck.js.map +0 -1
  377. package/dist/src/utils/cleanup.d.ts +0 -6
  378. package/dist/src/utils/cleanup.js +0 -19
  379. package/dist/src/utils/cleanup.js.map +0 -1
  380. package/dist/src/utils/package.d.ts +0 -12
  381. package/dist/src/utils/package.js +0 -24
  382. package/dist/src/utils/package.js.map +0 -1
  383. package/dist/src/utils/readStdin.d.ts +0 -6
  384. package/dist/src/utils/readStdin.js +0 -34
  385. package/dist/src/utils/readStdin.js.map +0 -1
  386. package/dist/src/utils/sandbox.d.ts +0 -7
  387. package/dist/src/utils/sandbox.js +0 -680
  388. package/dist/src/utils/sandbox.js.map +0 -1
  389. package/dist/src/utils/startupWarnings.d.ts +0 -6
  390. package/dist/src/utils/startupWarnings.js +0 -40
  391. package/dist/src/utils/startupWarnings.js.map +0 -1
  392. package/dist/src/utils/userStartupWarnings.d.ts +0 -6
  393. package/dist/src/utils/userStartupWarnings.js +0 -33
  394. package/dist/src/utils/userStartupWarnings.js.map +0 -1
  395. package/dist/src/utils/version.d.ts +0 -6
  396. package/dist/src/utils/version.js +0 -11
  397. package/dist/src/utils/version.js.map +0 -1
  398. package/dist/tsconfig.tsbuildinfo +0 -1
  399. /package/{dist/src/utils → bundle}/sandbox-macos-permissive-closed.sb +0 -0
  400. /package/{dist/src/utils → bundle}/sandbox-macos-permissive-open.sb +0 -0
  401. /package/{dist/src/utils → bundle}/sandbox-macos-restrictive-closed.sb +0 -0
  402. /package/{dist/src/utils → bundle}/sandbox-macos-restrictive-open.sb +0 -0
@@ -1,56 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export const formatMemoryUsage = (bytes) => {
7
- const gb = bytes / (1024 * 1024 * 1024);
8
- if (bytes < 1024 * 1024) {
9
- return `${(bytes / 1024).toFixed(1)} KB`;
10
- }
11
- if (bytes < 1024 * 1024 * 1024) {
12
- return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
13
- }
14
- return `${gb.toFixed(2)} GB`;
15
- };
16
- /**
17
- * Formats a duration in milliseconds into a concise, human-readable string (e.g., "1h 5s").
18
- * It omits any time units that are zero.
19
- * @param milliseconds The duration in milliseconds.
20
- * @returns A formatted string representing the duration.
21
- */
22
- export const formatDuration = (milliseconds) => {
23
- if (milliseconds <= 0) {
24
- return '0s';
25
- }
26
- if (milliseconds < 1000) {
27
- return `${Math.round(milliseconds)}ms`;
28
- }
29
- const totalSeconds = milliseconds / 1000;
30
- if (totalSeconds < 60) {
31
- return `${totalSeconds.toFixed(1)}s`;
32
- }
33
- const hours = Math.floor(totalSeconds / 3600);
34
- const minutes = Math.floor((totalSeconds % 3600) / 60);
35
- const seconds = Math.floor(totalSeconds % 60);
36
- const parts = [];
37
- if (hours > 0) {
38
- parts.push(`${hours}h`);
39
- }
40
- if (minutes > 0) {
41
- parts.push(`${minutes}m`);
42
- }
43
- if (seconds > 0) {
44
- parts.push(`${seconds}s`);
45
- }
46
- // If all parts are zero (e.g., exactly 1 hour), return the largest unit.
47
- if (parts.length === 0) {
48
- if (hours > 0)
49
- return `${hours}h`;
50
- if (minutes > 0)
51
- return `${minutes}m`;
52
- return `${seconds}s`;
53
- }
54
- return parts.join(' ');
55
- };
56
- //# sourceMappingURL=formatters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"formatters.js","sourceRoot":"","sources":["../../../../src/ui/utils/formatters.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,MAAM,iBAAiB,GAAG,CAAC,KAAa,EAAU,EAAE;IACzD,MAAM,EAAE,GAAG,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC,CAAC;IACxC,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC;QACxB,OAAO,GAAG,CAAC,KAAK,GAAG,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IAC3C,CAAC;IACD,IAAI,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,EAAE,CAAC;QAC/B,OAAO,GAAG,CAAC,KAAK,GAAG,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;IACpD,CAAC;IACD,OAAO,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;AAC/B,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,YAAoB,EAAU,EAAE;IAC7D,IAAI,YAAY,IAAI,CAAC,E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KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACzB,CAAC,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export declare const findLastSafeSplitPoint: (content: string) => number;
@@ -1,110 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- /*
7
- **Background & Purpose:**
8
-
9
- The `findSafeSplitPoint` function is designed to address the challenge of displaying or processing large, potentially streaming, pieces of Markdown text. When content (e.g., from an LLM like Gemini) arrives in chunks or grows too large for a single display unit (like a message bubble), it needs to be split. A naive split (e.g., just at a character limit) can break Markdown formatting, especially critical for multi-line elements like code blocks, lists, or blockquotes, leading to incorrect rendering.
10
-
11
- This function aims to find an *intelligent* or "safe" index within the provided `content` string at which to make such a split, prioritizing the preservation of Markdown integrity.
12
-
13
- **Key Expectations & Behavior (Prioritized):**
14
-
15
- 1. **No Split if Short Enough:**
16
- * If `content.length` is less than or equal to `idealMaxLength`, the function should return `content.length` (indicating no split is necessary for length reasons).
17
-
18
- 2. **Code Block Integrity (Highest Priority for Safety):**
19
- * The function must try to avoid splitting *inside* a fenced code block (i.e., between ` ``` ` and ` ``` `).
20
- * If `idealMaxLength` falls within a code block:
21
- * The function will attempt to return an index that splits the content *before* the start of that code block.
22
- * If a code block starts at the very beginning of the `content` and `idealMaxLength` falls within it (meaning the block itself is too long for the first chunk), the function might return `0`. This effectively makes the first chunk empty, pushing the entire oversized code block to the second part of the split.
23
- * When considering splits near code blocks, the function prefers to keep the entire code block intact in one of the resulting chunks.
24
-
25
- 3. **Markdown-Aware Newline Splitting (If Not Governed by Code Block Logic):**
26
- * If `idealMaxLength` does not fall within a code block (or after code block considerations have been made), the function will look for natural break points by scanning backwards from `idealMaxLength`:
27
- * **Paragraph Breaks:** It prioritizes splitting after a double newline (`\n\n`), as this typically signifies the end of a paragraph or a block-level element.
28
- * **Single Line Breaks:** If no double newline is found in a suitable range, it will look for a single newline (`\n`).
29
- * Any newline chosen as a split point must also not be inside a code block.
30
-
31
- 4. **Fallback to `idealMaxLength`:**
32
- * If no "safer" split point (respecting code blocks or finding suitable newlines) is identified before or at `idealMaxLength`, and `idealMaxLength` itself is not determined to be an unsafe split point (e.g., inside a code block), the function may return a length larger than `idealMaxLength`, again it CANNOT break markdown formatting. This could happen with very long lines of text without Markdown block structures or newlines.
33
-
34
- **In essence, `findSafeSplitPoint` tries to be a good Markdown citizen when forced to divide content, preferring structural boundaries over arbitrary character limits, with a strong emphasis on not corrupting code blocks.**
35
- */
36
- /**
37
- * Checks if a given character index within a string is inside a fenced (```) code block.
38
- * @param content The full string content.
39
- * @param indexToTest The character index to test.
40
- * @returns True if the index is inside a code block's content, false otherwise.
41
- */
42
- const isIndexInsideCodeBlock = (content, indexToTest) => {
43
- let fenceCount = 0;
44
- let searchPos = 0;
45
- while (searchPos < content.length) {
46
- const nextFence = content.indexOf('```', searchPos);
47
- if (nextFence === -1 || nextFence >= indexToTest) {
48
- break;
49
- }
50
- fenceCount++;
51
- searchPos = nextFence + 3;
52
- }
53
- return fenceCount % 2 === 1;
54
- };
55
- /**
56
- * Finds the starting index of the code block that encloses the given index.
57
- * Returns -1 if the index is not inside a code block.
58
- * @param content The markdown content.
59
- * @param index The index to check.
60
- * @returns Start index of the enclosing code block or -1.
61
- */
62
- const findEnclosingCodeBlockStart = (content, index) => {
63
- if (!isIndexInsideCodeBlock(content, index)) {
64
- return -1;
65
- }
66
- let currentSearchPos = 0;
67
- while (currentSearchPos < index) {
68
- const blockStartIndex = content.indexOf('```', currentSearchPos);
69
- if (blockStartIndex === -1 || blockStartIndex >= index) {
70
- break;
71
- }
72
- const blockEndIndex = content.indexOf('```', blockStartIndex + 3);
73
- if (blockStartIndex < index) {
74
- if (blockEndIndex === -1 || index < blockEndIndex + 3) {
75
- return blockStartIndex;
76
- }
77
- }
78
- if (blockEndIndex === -1)
79
- break;
80
- currentSearchPos = blockEndIndex + 3;
81
- }
82
- return -1;
83
- };
84
- export const findLastSafeSplitPoint = (content) => {
85
- const enclosingBlockStart = findEnclosingCodeBlockStart(content, content.length);
86
- if (enclosingBlockStart !== -1) {
87
- // The end of the content is contained in a code block. Split right before.
88
- return enclosingBlockStart;
89
- }
90
- // Search for the last double newline (\n\n) not in a code block.
91
- let searchStartIndex = content.length;
92
- while (searchStartIndex >= 0) {
93
- const dnlIndex = content.lastIndexOf('\n\n', searchStartIndex);
94
- if (dnlIndex === -1) {
95
- // No more double newlines found.
96
- break;
97
- }
98
- const potentialSplitPoint = dnlIndex + 2;
99
- if (!isIndexInsideCodeBlock(content, potentialSplitPoint)) {
100
- return potentialSplitPoint;
101
- }
102
- // If potentialSplitPoint was inside a code block,
103
- // the next search should start *before* the \n\n we just found to ensure progress.
104
- searchStartIndex = dnlIndex - 1;
105
- }
106
- // If no safe double newline is found, return content.length
107
- // to keep the entire content as one piece.
108
- return content.length;
109
- };
110
- //# sourceMappingURL=markdownUtilities.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"markdownUtilities.js","sourceRoot":"","sources":["../../../../src/ui/utils/markdownUtilities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA6BE;AAEF;;;;;GAKG;AACH,MAAM,sBAAsB,GAAG,CAC7B,OAAe,EACf,WAAmB,EACV,EAAE;IACX,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,SAAS,GAAG,CAAC,CAAC;IAClB,OAAO,SAAS,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;QAClC,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;QACpD,IAAI,SAAS,KAAK,CAAC,CAAC,IAAI,SAAS,IAAI,WAAW,EAAE,CAAC;YACjD,MAAM;QACR,CAAC;QACD,UAAU,EAAE,CAAC;QACb,SAAS,GAAG,SAA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I,gBAAgB,GAAG,OAAO,CAAC,MAAM,CAAC;IACtC,OAAO,gBAAgB,IAAI,CAAC,EAAE,CAAC;QAC7B,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAAC;QAC/D,IAAI,QAAQ,KAAK,CAAC,CAAC,EAAE,CAAC;YACpB,iCAAiC;YACjC,MAAM;QACR,CAAC;QAED,MAAM,mBAAmB,GAAG,QAAQ,GAAG,CAAC,CAAC;QACzC,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,CAAC,EAAE,CAAC;YAC1D,OAAO,mBAAmB,CAAC;QAC7B,CAAC;QAED,kDAAkD;QAClD,mFAAmF;QACnF,gBAAgB,GAAG,QAAQ,GAAG,CAAC,CAAC;IAClC,CAAC;IAED,4DAA4D;IAC5D,2CAA2C;IAC3C,OAAO,OAAO,CAAC,MAAM,CAAC;AACxB,CAAC,CAAC"}
@@ -1,22 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- /**
7
- * Calculates the maximum width of a multi-line ASCII art string.
8
- * @param asciiArt The ASCII art string.
9
- * @returns The length of the longest line in the ASCII art.
10
- */
11
- export declare const getAsciiArtWidth: (asciiArt: string) => number;
12
- /**
13
- * Checks if a Buffer is likely binary by testing for the presence of a NULL byte.
14
- * The presence of a NULL byte is a strong indicator that the data is not plain text.
15
- * @param data The Buffer to check.
16
- * @param sampleSize The number of bytes from the start of the buffer to test.
17
- * @returns True if a NULL byte is found, false otherwise.
18
- */
19
- export declare function isBinary(data: Buffer | null | undefined, sampleSize?: number): boolean;
20
- export declare function toCodePoints(str: string): string[];
21
- export declare function cpLen(str: string): number;
22
- export declare function cpSlice(str: string, start: number, end?: number): string;
@@ -1,58 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- /**
7
- * Calculates the maximum width of a multi-line ASCII art string.
8
- * @param asciiArt The ASCII art string.
9
- * @returns The length of the longest line in the ASCII art.
10
- */
11
- export const getAsciiArtWidth = (asciiArt) => {
12
- if (!asciiArt) {
13
- return 0;
14
- }
15
- const lines = asciiArt.split('\n');
16
- return Math.max(...lines.map((line) => line.length));
17
- };
18
- /**
19
- * Checks if a Buffer is likely binary by testing for the presence of a NULL byte.
20
- * The presence of a NULL byte is a strong indicator that the data is not plain text.
21
- * @param data The Buffer to check.
22
- * @param sampleSize The number of bytes from the start of the buffer to test.
23
- * @returns True if a NULL byte is found, false otherwise.
24
- */
25
- export function isBinary(data, sampleSize = 512) {
26
- if (!data) {
27
- return false;
28
- }
29
- const sample = data.length > sampleSize ? data.subarray(0, sampleSize) : data;
30
- for (const byte of sample) {
31
- // The presence of a NULL byte (0x00) is one of the most reliable
32
- // indicators of a binary file. Text files should not contain them.
33
- if (byte === 0) {
34
- return true;
35
- }
36
- }
37
- // If no NULL bytes were found in the sample, we assume it's text.
38
- return false;
39
- }
40
- /*
41
- * -------------------------------------------------------------------------
42
- * Unicode‑aware helpers (work at the code‑point level rather than UTF‑16
43
- * code units so that surrogate‑pair emoji count as one "column".)
44
- * ---------------------------------------------------------------------- */
45
- export function toCodePoints(str) {
46
- // [...str] or Array.from both iterate by UTF‑32 code point, handling
47
- // surrogate pairs correctly.
48
- return Array.from(str);
49
- }
50
- export function cpLen(str) {
51
- return toCodePoints(str).length;
52
- }
53
- export function cpSlice(str, start, end) {
54
- // Slice by code‑point indices and re‑join.
55
- const arr = toCodePoints(str).slice(start, end);
56
- return arr.join('');
57
- }
58
- //# sourceMappingURL=textUtils.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"textUtils.js","sourceRoot":"","sources":["../../../../src/ui/utils/textUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,QAAgB,EAAU,EAAE;IAC3D,IAAI,CAAC,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C,IAAI,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export declare function checkForUpdates(): Promise<string | null>;
@@ -1,36 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import updateNotifier from 'update-notifier';
7
- import semver from 'semver';
8
- import { getPackageJson } from '../../utils/package.js';
9
- export async function checkForUpdates() {
10
- try {
11
- const packageJson = await getPackageJson();
12
- if (!packageJson || !packageJson.name || !packageJson.version) {
13
- return null;
14
- }
15
- const notifier = updateNotifier({
16
- pkg: {
17
- name: packageJson.name,
18
- version: packageJson.version,
19
- },
20
- // check every time
21
- updateCheckInterval: 0,
22
- // allow notifier to run in scripts
23
- shouldNotifyInNpmScript: true,
24
- });
25
- if (notifier.update &&
26
- semver.gt(notifier.update.latest, notifier.update.current)) {
27
- return `Gemini CLI update available! ${notifier.update.current} → ${notifier.update.latest}\nRun npm install -g ${packageJson.name} to update`;
28
- }
29
- return null;
30
- }
31
- catch (e) {
32
- console.warn('Failed to check for updates: ' + e);
33
- return null;
34
- }
35
- }
36
- //# sourceMappingURL=updateCheck.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"updateCheck.js","sourceRoot":"","sources":["../../../../src/ui/utils/updateCheck.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC;QACH,MAAM,WAAW,GAAG,MAAM,cAAc,EAAE,CAAC;QAC3C,IAAI,CAAC,WAAW,IAAI,CAAC,WAAW,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;YAC9D,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,QAAQ,GAAG,cAAc,CAAC;YAC9B,GAAG,EAAE;gBACH,IAAI,EAAE,WAAW,CAAC,IAAI;gBACtB,OAAO,EAAE,WAAW,CAAC,OAAO;aAC7B;YACD,mBAAmB;YACnB,mBAAmB,EAAE,CAAC;YACtB,mCAAmC;YACnC,uBAAuB,EAAE,IAAI;SAC9B,CAAC,CAAC;QAEH,IACE,QAAQ,CAAC,MAAM;YACf,MAAM,CAAC,EAAE,CAAC,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,OAAO,CAAC,EAC1D,CAAC;YACD,OAAO,gCAAgC,QAAQ,CAAC,MAAM,CAAC,OAAO,MAAM,QAAQ,CAAC,MAAM,CAAC,MAAM,wBAAwB,WAAW,CAAC,IAAI,YAAY,CAAC;QACjJ,CAAC;QAED,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,CAAC,EAAE,CAAC;QACX,OAAO,CAAC,IAAI,CAAC,+BAA+B,GAAG,CAAC,CAAC,CAAC;QAClD,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export declare function cleanupCheckpoints(): Promise<void>;
@@ -1,19 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { promises as fs } from 'fs';
7
- import { join } from 'path';
8
- import { getProjectTempDir } from '@google/gemini-cli-core';
9
- export async function cleanupCheckpoints() {
10
- const tempDir = getProjectTempDir(process.cwd());
11
- const checkpointsDir = join(tempDir, 'checkpoints');
12
- try {
13
- await fs.rm(checkpointsDir, { recursive: true, force: true });
14
- }
15
- catch {
16
- // Ignore errors if the directory doesn't exist or fails to delete.
17
- }
18
- }
19
- //# sourceMappingURL=cleanup.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cleanup.js","sourceRoot":"","sources":["../../../src/utils/cleanup.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,IAAI,CAAC;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AAE5D,MAAM,CAAC,KAAK,UAAU,kBAAkB;IACtC,MAAM,OAAO,GAAG,iBAAiB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;IACjD,MAAM,cAAc,GAAG,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;IACpD,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,EAAE,CAAC,cAAc,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC;IAChE,CAAC;IAAC,MAAM,CAAC;QACP,mEAAmE;IACrE,CAAC;AACH,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { type PackageJson as BasePackageJson } from 'read-package-up';
7
- export type PackageJson = BasePackageJson & {
8
- config?: {
9
- sandboxImageUri?: string;
10
- };
11
- };
12
- export declare function getPackageJson(): Promise<PackageJson | undefined>;
@@ -1,24 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { readPackageUp, } from 'read-package-up';
7
- import { fileURLToPath } from 'url';
8
- import path from 'path';
9
- const __filename = fileURLToPath(import.meta.url);
10
- const __dirname = path.dirname(__filename);
11
- let packageJson;
12
- export async function getPackageJson() {
13
- if (packageJson) {
14
- return packageJson;
15
- }
16
- const result = await readPackageUp({ cwd: __dirname });
17
- if (!result) {
18
- // TODO: Maybe bubble this up as an error.
19
- return;
20
- }
21
- packageJson = result.packageJson;
22
- return packageJson;
23
- }
24
- //# sourceMappingURL=package.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"package.js","sourceRoot":"","sources":["../../../src/utils/package.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EACL,aAAa,GAEd,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,IAAI,MAAM,MAAM,CAAC;AAQxB,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;AAE3C,IAAI,WAAoC,CAAC;AAEzC,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,IAAI,WAAW,EAAE,CAAC;QAChB,OAAO,WAAW,CAAC;IACrB,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,aAAa,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,CAAC,CAAC;IACvD,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,0CAA0C;QAC1C,OAAO;IACT,CAAC;IAED,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;IACjC,OAAO,WAAW,CAAC;AACrB,CAAC"}
@@ -1,6 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export declare function readStdin(): Promise<string>;
@@ -1,34 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- export async function readStdin() {
7
- return new Promise((resolve, reject) => {
8
- let data = '';
9
- process.stdin.setEncoding('utf8');
10
- const onReadable = () => {
11
- let chunk;
12
- while ((chunk = process.stdin.read()) !== null) {
13
- data += chunk;
14
- }
15
- };
16
- const onEnd = () => {
17
- cleanup();
18
- resolve(data);
19
- };
20
- const onError = (err) => {
21
- cleanup();
22
- reject(err);
23
- };
24
- const cleanup = () => {
25
- process.stdin.removeListener('readable', onReadable);
26
- process.stdin.removeListener('end', onEnd);
27
- process.stdin.removeListener('error', onError);
28
- };
29
- process.stdin.on('readable', onReadable);
30
- process.stdin.on('end', onEnd);
31
- process.stdin.on('error', onError);
32
- });
33
- }
34
- //# sourceMappingURL=readStdin.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"readStdin.js","sourceRoot":"","sources":["../../../src/utils/readStdin.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,CAAC,KAAK,UAAU,SAAS;IAC7B,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;QACrC,IAAI,IAAI,GAAG,EAAE,CAAC;QACd,OAAO,CAAC,KAAK,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;QAElC,MAAM,UAAU,GAAG,GAAG,EAAE;YACtB,IAAI,KAAK,CAAC;YACV,OAAO,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC;gBAC/C,IAAI,IAAI,KAAK,CAAC;YAChB,CAAC;QACH,CAAC,CAAC;QAEF,MAAM,KAAK,GAAG,GAAG,EAAE;YACjB,OAAO,EAAE,CAAC;YACV,OAAO,CAAC,IAAI,CAAC,CAAC;QAChB,CAAC,CAAC;QAEF,MAAM,OAAO,GAAG,CAAC,GAAU,EAAE,EAAE;YAC7B,OAAO,EAAE,CAAC;YACV,MAAM,CAAC,GAAG,CAAC,CAAC;QACd,CAAC,CAAC;QAEF,MAAM,OAAO,GAAG,GAAG,EAAE;YACnB,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;YACrD,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;YAC3C,OAAO,CAAC,KAAK,CAAC,cAAc,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACjD,CAAC,CAAC;QAEF,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;QACzC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;QAC/B,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACrC,CAAC,CAAC,CAAC;AACL,CAAC"}
@@ -1,7 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 Google LLC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { SandboxConfig } from '@google/gemini-cli-core';
7
- export declare function start_sandbox(config: SandboxConfig, nodeArgs?: string[]): Promise<void>;