@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,347 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import * as fs from 'fs/promises';
7
+ import * as path from 'path';
8
+ import { getErrorMessage, isNodeError, unescapePath, } from '@google/gemini-cli-core';
9
+ import { ToolCallStatus, } from '../types.js';
10
+ /**
11
+ * Parses a query string to find all '@<path>' commands and text segments.
12
+ * Handles \ escaped spaces within paths.
13
+ */
14
+ function parseAllAtCommands(query) {
15
+ const parts = [];
16
+ let currentIndex = 0;
17
+ while (currentIndex < query.length) {
18
+ let atIndex = -1;
19
+ let nextSearchIndex = currentIndex;
20
+ // Find next unescaped '@'
21
+ while (nextSearchIndex < query.length) {
22
+ if (query[nextSearchIndex] === '@' &&
23
+ (nextSearchIndex === 0 || query[nextSearchIndex - 1] !== '\\')) {
24
+ atIndex = nextSearchIndex;
25
+ break;
26
+ }
27
+ nextSearchIndex++;
28
+ }
29
+ if (atIndex === -1) {
30
+ // No more @
31
+ if (currentIndex < query.length) {
32
+ parts.push({ type: 'text', content: query.substring(currentIndex) });
33
+ }
34
+ break;
35
+ }
36
+ // Add text before @
37
+ if (atIndex > currentIndex) {
38
+ parts.push({
39
+ type: 'text',
40
+ content: query.substring(currentIndex, atIndex),
41
+ });
42
+ }
43
+ // Parse @path
44
+ let pathEndIndex = atIndex + 1;
45
+ let inEscape = false;
46
+ while (pathEndIndex < query.length) {
47
+ const char = query[pathEndIndex];
48
+ if (inEscape) {
49
+ inEscape = false;
50
+ }
51
+ else if (char === '\\') {
52
+ inEscape = true;
53
+ }
54
+ else if (/\s/.test(char)) {
55
+ // Path ends at first whitespace not escaped
56
+ break;
57
+ }
58
+ pathEndIndex++;
59
+ }
60
+ const rawAtPath = query.substring(atIndex, pathEndIndex);
61
+ // unescapePath expects the @ symbol to be present, and will handle it.
62
+ const atPath = unescapePath(rawAtPath);
63
+ parts.push({ type: 'atPath', content: atPath });
64
+ currentIndex = pathEndIndex;
65
+ }
66
+ // Filter out empty text parts that might result from consecutive @paths or leading/trailing spaces
67
+ return parts.filter((part) => !(part.type === 'text' && part.content.trim() === ''));
68
+ }
69
+ /**
70
+ * Processes user input potentially containing one or more '@<path>' commands.
71
+ * If found, it attempts to read the specified files/directories using the
72
+ * 'read_many_files' tool. The user query is modified to include resolved paths,
73
+ * and the content of the files is appended in a structured block.
74
+ *
75
+ * @returns An object indicating whether the main hook should proceed with an
76
+ * LLM call and the processed query parts (including file content).
77
+ */
78
+ export async function handleAtCommand({ query, config, addItem, onDebugMessage, messageId: userMessageTimestamp, signal, }) {
79
+ const commandParts = parseAllAtCommands(query);
80
+ const atPathCommandParts = commandParts.filter((part) => part.type === 'atPath');
81
+ if (atPathCommandParts.length === 0) {
82
+ addItem({ type: 'user', text: query }, userMessageTimestamp);
83
+ return { processedQuery: [{ text: query }], shouldProceed: true };
84
+ }
85
+ addItem({ type: 'user', text: query }, userMessageTimestamp);
86
+ // Get centralized file discovery service
87
+ const fileDiscovery = config.getFileService();
88
+ const respectFileIgnore = config.getFileFilteringOptions();
89
+ const pathSpecsToRead = [];
90
+ const atPathToResolvedSpecMap = new Map();
91
+ const contentLabelsForDisplay = [];
92
+ const ignoredByReason = {
93
+ git: [],
94
+ gemini: [],
95
+ both: [],
96
+ };
97
+ const toolRegistry = await config.getToolRegistry();
98
+ const readManyFilesTool = toolRegistry.getTool('read_many_files');
99
+ const globTool = toolRegistry.getTool('glob');
100
+ if (!readManyFilesTool) {
101
+ addItem({ type: 'error', text: 'Error: read_many_files tool not found.' }, userMessageTimestamp);
102
+ return { processedQuery: null, shouldProceed: false };
103
+ }
104
+ for (const atPathPart of atPathCommandParts) {
105
+ const originalAtPath = atPathPart.content; // e.g., "@file.txt" or "@"
106
+ if (originalAtPath === '@') {
107
+ onDebugMessage('Lone @ detected, will be treated as text in the modified query.');
108
+ continue;
109
+ }
110
+ const pathName = originalAtPath.substring(1);
111
+ if (!pathName) {
112
+ // This case should ideally not be hit if parseAllAtCommands ensures content after @
113
+ // but as a safeguard:
114
+ addItem({
115
+ type: 'error',
116
+ text: `Error: Invalid @ command '${originalAtPath}'. No path specified.`,
117
+ }, userMessageTimestamp);
118
+ // Decide if this is a fatal error for the whole command or just skip this @ part
119
+ // For now, let's be strict and fail the command if one @path is malformed.
120
+ return { processedQuery: null, shouldProceed: false };
121
+ }
122
+ // Check if path should be ignored based on filtering options
123
+ const gitIgnored = respectFileIgnore.respectGitIgnore &&
124
+ fileDiscovery.shouldIgnoreFile(pathName, {
125
+ respectGitIgnore: true,
126
+ respectGeminiIgnore: false,
127
+ });
128
+ const geminiIgnored = respectFileIgnore.respectGeminiIgnore &&
129
+ fileDiscovery.shouldIgnoreFile(pathName, {
130
+ respectGitIgnore: false,
131
+ respectGeminiIgnore: true,
132
+ });
133
+ if (gitIgnored || geminiIgnored) {
134
+ const reason = gitIgnored && geminiIgnored ? 'both' : gitIgnored ? 'git' : 'gemini';
135
+ ignoredByReason[reason].push(pathName);
136
+ const reasonText = reason === 'both'
137
+ ? 'ignored by both git and gemini'
138
+ : reason === 'git'
139
+ ? 'git-ignored'
140
+ : 'gemini-ignored';
141
+ onDebugMessage(`Path ${pathName} is ${reasonText} and will be skipped.`);
142
+ continue;
143
+ }
144
+ let currentPathSpec = pathName;
145
+ let resolvedSuccessfully = false;
146
+ try {
147
+ const absolutePath = path.resolve(config.getTargetDir(), pathName);
148
+ const stats = await fs.stat(absolutePath);
149
+ if (stats.isDirectory()) {
150
+ currentPathSpec = pathName.endsWith('/')
151
+ ? `${pathName}**`
152
+ : `${pathName}/**`;
153
+ onDebugMessage(`Path ${pathName} resolved to directory, using glob: ${currentPathSpec}`);
154
+ }
155
+ else {
156
+ onDebugMessage(`Path ${pathName} resolved to file: ${currentPathSpec}`);
157
+ }
158
+ resolvedSuccessfully = true;
159
+ }
160
+ catch (error) {
161
+ if (isNodeError(error) && error.code === 'ENOENT') {
162
+ if (config.getEnableRecursiveFileSearch() && globTool) {
163
+ onDebugMessage(`Path ${pathName} not found directly, attempting glob search.`);
164
+ try {
165
+ const globResult = await globTool.execute({ pattern: `**/*${pathName}*`, path: config.getTargetDir() }, signal);
166
+ if (globResult.llmContent &&
167
+ typeof globResult.llmContent === 'string' &&
168
+ !globResult.llmContent.startsWith('No files found') &&
169
+ !globResult.llmContent.startsWith('Error:')) {
170
+ const lines = globResult.llmContent.split('\n');
171
+ if (lines.length > 1 && lines[1]) {
172
+ const firstMatchAbsolute = lines[1].trim();
173
+ currentPathSpec = path.relative(config.getTargetDir(), firstMatchAbsolute);
174
+ onDebugMessage(`Glob search for ${pathName} found ${firstMatchAbsolute}, using relative path: ${currentPathSpec}`);
175
+ resolvedSuccessfully = true;
176
+ }
177
+ else {
178
+ onDebugMessage(`Glob search for '**/*${pathName}*' did not return a usable path. Path ${pathName} will be skipped.`);
179
+ }
180
+ }
181
+ else {
182
+ onDebugMessage(`Glob search for '**/*${pathName}*' found no files or an error. Path ${pathName} will be skipped.`);
183
+ }
184
+ }
185
+ catch (globError) {
186
+ console.error(`Error during glob search for ${pathName}: ${getErrorMessage(globError)}`);
187
+ onDebugMessage(`Error during glob search for ${pathName}. Path ${pathName} will be skipped.`);
188
+ }
189
+ }
190
+ else {
191
+ onDebugMessage(`Glob tool not found. Path ${pathName} will be skipped.`);
192
+ }
193
+ }
194
+ else {
195
+ console.error(`Error stating path ${pathName}: ${getErrorMessage(error)}`);
196
+ onDebugMessage(`Error stating path ${pathName}. Path ${pathName} will be skipped.`);
197
+ }
198
+ }
199
+ if (resolvedSuccessfully) {
200
+ pathSpecsToRead.push(currentPathSpec);
201
+ atPathToResolvedSpecMap.set(originalAtPath, currentPathSpec);
202
+ contentLabelsForDisplay.push(pathName);
203
+ }
204
+ }
205
+ // Construct the initial part of the query for the LLM
206
+ let initialQueryText = '';
207
+ for (let i = 0; i < commandParts.length; i++) {
208
+ const part = commandParts[i];
209
+ if (part.type === 'text') {
210
+ initialQueryText += part.content;
211
+ }
212
+ else {
213
+ // type === 'atPath'
214
+ const resolvedSpec = atPathToResolvedSpecMap.get(part.content);
215
+ if (i > 0 &&
216
+ initialQueryText.length > 0 &&
217
+ !initialQueryText.endsWith(' ') &&
218
+ resolvedSpec) {
219
+ // Add space if previous part was text and didn't end with space, or if previous was @path
220
+ const prevPart = commandParts[i - 1];
221
+ if (prevPart.type === 'text' ||
222
+ (prevPart.type === 'atPath' &&
223
+ atPathToResolvedSpecMap.has(prevPart.content))) {
224
+ initialQueryText += ' ';
225
+ }
226
+ }
227
+ if (resolvedSpec) {
228
+ initialQueryText += `@${resolvedSpec}`;
229
+ }
230
+ else {
231
+ // If not resolved for reading (e.g. lone @ or invalid path that was skipped),
232
+ // add the original @-string back, ensuring spacing if it's not the first element.
233
+ if (i > 0 &&
234
+ initialQueryText.length > 0 &&
235
+ !initialQueryText.endsWith(' ') &&
236
+ !part.content.startsWith(' ')) {
237
+ initialQueryText += ' ';
238
+ }
239
+ initialQueryText += part.content;
240
+ }
241
+ }
242
+ }
243
+ initialQueryText = initialQueryText.trim();
244
+ // Inform user about ignored paths
245
+ const totalIgnored = ignoredByReason.git.length +
246
+ ignoredByReason.gemini.length +
247
+ ignoredByReason.both.length;
248
+ if (totalIgnored > 0) {
249
+ const messages = [];
250
+ if (ignoredByReason.git.length) {
251
+ messages.push(`Git-ignored: ${ignoredByReason.git.join(', ')}`);
252
+ }
253
+ if (ignoredByReason.gemini.length) {
254
+ messages.push(`Gemini-ignored: ${ignoredByReason.gemini.join(', ')}`);
255
+ }
256
+ if (ignoredByReason.both.length) {
257
+ messages.push(`Ignored by both: ${ignoredByReason.both.join(', ')}`);
258
+ }
259
+ const message = `Ignored ${totalIgnored} files:\n${messages.join('\n')}`;
260
+ console.log(message);
261
+ onDebugMessage(message);
262
+ }
263
+ // Fallback for lone "@" or completely invalid @-commands resulting in empty initialQueryText
264
+ if (pathSpecsToRead.length === 0) {
265
+ onDebugMessage('No valid file paths found in @ commands to read.');
266
+ if (initialQueryText === '@' && query.trim() === '@') {
267
+ // If the only thing was a lone @, pass original query (which might have spaces)
268
+ return { processedQuery: [{ text: query }], shouldProceed: true };
269
+ }
270
+ else if (!initialQueryText && query) {
271
+ // If all @-commands were invalid and no surrounding text, pass original query
272
+ return { processedQuery: [{ text: query }], shouldProceed: true };
273
+ }
274
+ // Otherwise, proceed with the (potentially modified) query text that doesn't involve file reading
275
+ return {
276
+ processedQuery: [{ text: initialQueryText || query }],
277
+ shouldProceed: true,
278
+ };
279
+ }
280
+ const processedQueryParts = [{ text: initialQueryText }];
281
+ const toolArgs = {
282
+ paths: pathSpecsToRead,
283
+ file_filtering_options: {
284
+ respect_git_ignore: respectFileIgnore.respectGitIgnore,
285
+ respect_gemini_ignore: respectFileIgnore.respectGeminiIgnore,
286
+ },
287
+ // Use configuration setting
288
+ };
289
+ let toolCallDisplay;
290
+ try {
291
+ const result = await readManyFilesTool.execute(toolArgs, signal);
292
+ toolCallDisplay = {
293
+ callId: `client-read-${userMessageTimestamp}`,
294
+ name: readManyFilesTool.displayName,
295
+ description: readManyFilesTool.getDescription(toolArgs),
296
+ status: ToolCallStatus.Success,
297
+ resultDisplay: result.returnDisplay ||
298
+ `Successfully read: ${contentLabelsForDisplay.join(', ')}`,
299
+ confirmationDetails: undefined,
300
+ };
301
+ if (Array.isArray(result.llmContent)) {
302
+ const fileContentRegex = /^--- (.*?) ---\n\n([\s\S]*?)\n\n$/;
303
+ processedQueryParts.push({
304
+ text: '\n--- Content from referenced files ---',
305
+ });
306
+ for (const part of result.llmContent) {
307
+ if (typeof part === 'string') {
308
+ const match = fileContentRegex.exec(part);
309
+ if (match) {
310
+ const filePathSpecInContent = match[1]; // This is a resolved pathSpec
311
+ const fileActualContent = match[2].trim();
312
+ processedQueryParts.push({
313
+ text: `\nContent from @${filePathSpecInContent}:\n`,
314
+ });
315
+ processedQueryParts.push({ text: fileActualContent });
316
+ }
317
+ else {
318
+ processedQueryParts.push({ text: part });
319
+ }
320
+ }
321
+ else {
322
+ // part is a Part object.
323
+ processedQueryParts.push(part);
324
+ }
325
+ }
326
+ processedQueryParts.push({ text: '\n--- End of content ---' });
327
+ }
328
+ else {
329
+ onDebugMessage('read_many_files tool returned no content or empty content.');
330
+ }
331
+ addItem({ type: 'tool_group', tools: [toolCallDisplay] }, userMessageTimestamp);
332
+ return { processedQuery: processedQueryParts, shouldProceed: true };
333
+ }
334
+ catch (error) {
335
+ toolCallDisplay = {
336
+ callId: `client-read-${userMessageTimestamp}`,
337
+ name: readManyFilesTool.displayName,
338
+ description: readManyFilesTool.getDescription(toolArgs),
339
+ status: ToolCallStatus.Error,
340
+ resultDisplay: `Error reading files (${contentLabelsForDisplay.join(', ')}): ${getErrorMessage(error)}`,
341
+ confirmationDetails: undefined,
342
+ };
343
+ addItem({ type: 'tool_group', tools: [toolCallDisplay] }, userMessageTimestamp);
344
+ return { processedQuery: null, shouldProceed: false };
345
+ }
346
+ }
347
+ //# sourceMappingURL=atCommandProcessor.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"atCommandProcessor.js","sourceRoot":"","sources":["../../../../src/ui/hooks/atCommandProcessor.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,MAAM,aAAa,CAAC;AAClC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAE7B,OAAO,EAEL,eAAe,EACf,WAAW,EACX,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAGL,cAAc,GACf,MAAM,aAAa,CAAC;AAsBrB;;;GAGG;AACH,SAAS,kBAAkB,CAAC,KAAa;IACvC,MAAM,KAAK,GAAoB,EAAE,CAAC;IAClC,IAAI,YAAY,GAAG,CAAC,CAAC;IAErB,OAAO,YAAY,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;QACnC,IAAI,OAAO,GAAG,CAAC,CAAC,CAAC;QACjB,IAAI,eAAe,GAAG,YAAY,CAAC;QACnC,0BAA0B;QAC1B,OAAO,eAAe,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;YACtC,IACE,KAAK,CAAC,eAAe,CAAC,KAAK,GAAG;gBAC9B,CAAC,eAAe,KAAK,CAAC,IAAI,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC,KAAK,IAAI,CAAC,EAC9D,CAAC;gBACD,OAAO,GAAG,eAAe,CAAC;gBAC1B,MAAM;YACR,CAAC;YACD,eAAe,EAAE,CAAC;QACpB,CAAC;QAED,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;YACnB,YAAY;YACZ,IAAI,YAAY,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC;gBAChC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC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,EAAE,KAAK,EAAE,CAAC,eAAe,CAAC,EAG7C,EACD,oBAAoB,CACrB,CAAC;QACF,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,CAAC;IACxD,CAAC;AACH,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Google LLC
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import { HistoryItemWithoutId } from '../types.js';
7
+ import { Config, GeminiClient } from '@google/gemini-cli-core';
8
+ import { type PartListUnion } from '@google/genai';
9
+ import { UseHistoryManagerReturn } from './useHistoryManager.js';
10
+ /**
11
+ * Hook to process shell commands.
12
+ * Orchestrates command execution and updates history and agent context.
13
+ */
14
+ export declare const useShellCommandProcessor: (addItemToHistory: UseHistoryManagerReturn["addItem"], setPendingHistoryItem: React.Dispatch<React.SetStateAction<HistoryItemWithoutId | null>>, onExec: (command: Promise<void>) => void, onDebugMessage: (message: string) => void, config: Config, geminiClient: GeminiClient) => {
15
+ handleShellCommand: (rawQuery: PartListUnion, abortSignal: AbortSignal) => boolean;
16
+ };