@vybestack/llxprt-code 0.2.25 → 0.3.4-nightly.250912.5e46408e

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 (759) hide show
  1. package/dist/index.d.ts +5 -0
  2. package/dist/index.js +14 -0
  3. package/dist/index.js.map +1 -1
  4. package/dist/package.json +3 -5
  5. package/dist/src/auth/anthropic-oauth-provider.d.ts +5 -0
  6. package/dist/src/auth/anthropic-oauth-provider.js +3 -1
  7. package/dist/src/auth/anthropic-oauth-provider.js.map +1 -1
  8. package/dist/src/auth/gemini-oauth-provider.d.ts +5 -0
  9. package/dist/src/auth/gemini-oauth-provider.js +3 -4
  10. package/dist/src/auth/gemini-oauth-provider.js.map +1 -1
  11. package/dist/src/auth/qwen-oauth-provider.d.ts +5 -0
  12. package/dist/src/auth/qwen-oauth-provider.js +3 -2
  13. package/dist/src/auth/qwen-oauth-provider.js.map +1 -1
  14. package/dist/src/commands/extensions/disable.d.ts +14 -0
  15. package/dist/src/commands/extensions/disable.js +40 -0
  16. package/dist/src/commands/extensions/disable.js.map +1 -0
  17. package/dist/src/commands/extensions/enable.d.ts +14 -0
  18. package/dist/src/commands/extensions/enable.js +47 -0
  19. package/dist/src/commands/extensions/enable.js.map +1 -0
  20. package/dist/src/commands/extensions/install.d.ts +13 -0
  21. package/dist/src/commands/extensions/install.js +47 -0
  22. package/dist/src/commands/extensions/install.js.map +1 -0
  23. package/dist/src/commands/extensions/install.test.d.ts +6 -0
  24. package/dist/src/commands/extensions/install.test.js +19 -0
  25. package/dist/src/commands/extensions/install.test.js.map +1 -0
  26. package/dist/src/commands/extensions/list.d.ts +8 -0
  27. package/dist/src/commands/extensions/list.js +31 -0
  28. package/dist/src/commands/extensions/list.js.map +1 -0
  29. package/dist/src/commands/extensions/uninstall.d.ts +12 -0
  30. package/dist/src/commands/extensions/uninstall.js +37 -0
  31. package/dist/src/commands/extensions/uninstall.js.map +1 -0
  32. package/dist/src/commands/extensions/uninstall.test.d.ts +6 -0
  33. package/dist/src/commands/extensions/uninstall.test.js +15 -0
  34. package/dist/src/commands/extensions/uninstall.test.js.map +1 -0
  35. package/dist/src/commands/extensions/update.d.ts +12 -0
  36. package/dist/src/commands/extensions/update.js +37 -0
  37. package/dist/src/commands/extensions/update.js.map +1 -0
  38. package/dist/src/commands/extensions.d.ts +7 -0
  39. package/dist/src/commands/extensions.js +29 -0
  40. package/dist/src/commands/extensions.js.map +1 -0
  41. package/dist/src/commands/mcp/add.d.ts +1 -1
  42. package/dist/src/commands/mcp/add.js +1 -1
  43. package/dist/src/commands/mcp/list.d.ts +1 -1
  44. package/dist/src/commands/mcp/list.js +1 -1
  45. package/dist/src/commands/mcp/remove.d.ts +1 -1
  46. package/dist/src/commands/mcp/remove.js +1 -1
  47. package/dist/src/commands/mcp.d.ts +1 -1
  48. package/dist/src/commands/mcp.js +1 -1
  49. package/dist/src/config/auth.d.ts +1 -1
  50. package/dist/src/config/auth.js +1 -1
  51. package/dist/src/config/auth.test.d.ts +1 -1
  52. package/dist/src/config/auth.test.js +1 -1
  53. package/dist/src/config/config.d.ts +4 -4
  54. package/dist/src/config/config.js +39 -24
  55. package/dist/src/config/config.js.map +1 -1
  56. package/dist/src/config/extension.d.ts +33 -2
  57. package/dist/src/config/extension.js +256 -10
  58. package/dist/src/config/extension.js.map +1 -1
  59. package/dist/src/config/extensions/variableSchema.d.ts +28 -0
  60. package/dist/src/config/extensions/variableSchema.js +18 -0
  61. package/dist/src/config/extensions/variableSchema.js.map +1 -0
  62. package/dist/src/config/extensions/variables.d.ts +17 -0
  63. package/dist/src/config/extensions/variables.js +40 -0
  64. package/dist/src/config/extensions/variables.js.map +1 -0
  65. package/dist/src/config/extensions/variables.test.d.ts +6 -0
  66. package/dist/src/config/extensions/variables.test.js +17 -0
  67. package/dist/src/config/extensions/variables.test.js.map +1 -0
  68. package/dist/src/config/keyBindings.d.ts +1 -1
  69. package/dist/src/config/keyBindings.js +1 -1
  70. package/dist/src/config/keyBindings.test.d.ts +1 -1
  71. package/dist/src/config/keyBindings.test.js +1 -1
  72. package/dist/src/config/sandboxConfig.d.ts +2 -2
  73. package/dist/src/config/sandboxConfig.js +5 -7
  74. package/dist/src/config/sandboxConfig.js.map +1 -1
  75. package/dist/src/config/settings.d.ts +9 -5
  76. package/dist/src/config/settings.js +89 -21
  77. package/dist/src/config/settings.js.map +1 -1
  78. package/dist/src/config/settingsSchema.d.ts +94 -2
  79. package/dist/src/config/settingsSchema.js +94 -2
  80. package/dist/src/config/settingsSchema.js.map +1 -1
  81. package/dist/src/config/settingsSchema.test.d.ts +1 -1
  82. package/dist/src/config/settingsSchema.test.js +12 -1
  83. package/dist/src/config/settingsSchema.test.js.map +1 -1
  84. package/dist/src/config/trustedFolders.d.ts +1 -1
  85. package/dist/src/config/trustedFolders.js +1 -1
  86. package/dist/src/config/trustedFolders.test.d.ts +1 -1
  87. package/dist/src/config/trustedFolders.test.js +1 -1
  88. package/dist/src/gemini.d.ts +4 -2
  89. package/dist/src/gemini.js +84 -59
  90. package/dist/src/gemini.js.map +1 -1
  91. package/dist/src/gemini.test.d.ts +1 -1
  92. package/dist/src/gemini.test.js +75 -24
  93. package/dist/src/gemini.test.js.map +1 -1
  94. package/dist/src/generated/git-commit.d.ts +1 -1
  95. package/dist/src/generated/git-commit.js +1 -1
  96. package/dist/src/integration-tests/retry-settings.integration.test.d.ts +1 -1
  97. package/dist/src/integration-tests/retry-settings.integration.test.js +1 -1
  98. package/dist/src/nonInteractiveCli.d.ts +1 -1
  99. package/dist/src/nonInteractiveCli.js +20 -37
  100. package/dist/src/nonInteractiveCli.js.map +1 -1
  101. package/dist/src/patches/is-in-ci.d.ts +1 -1
  102. package/dist/src/patches/is-in-ci.js +1 -1
  103. package/dist/src/providers/providerConfigUtils.d.ts +1 -1
  104. package/dist/src/providers/providerConfigUtils.js +1 -1
  105. package/dist/src/providers/providerManagerInstance.js +3 -1
  106. package/dist/src/providers/providerManagerInstance.js.map +1 -1
  107. package/dist/src/services/BuiltinCommandLoader.d.ts +1 -1
  108. package/dist/src/services/BuiltinCommandLoader.js +1 -1
  109. package/dist/src/services/BuiltinCommandLoader.test.d.ts +1 -1
  110. package/dist/src/services/BuiltinCommandLoader.test.js +1 -1
  111. package/dist/src/services/CommandService.d.ts +1 -1
  112. package/dist/src/services/CommandService.js +1 -1
  113. package/dist/src/services/CommandService.test.d.ts +1 -1
  114. package/dist/src/services/CommandService.test.js +1 -1
  115. package/dist/src/services/FileCommandLoader.d.ts +1 -1
  116. package/dist/src/services/FileCommandLoader.js +5 -4
  117. package/dist/src/services/FileCommandLoader.js.map +1 -1
  118. package/dist/src/services/McpPromptLoader.d.ts +12 -2
  119. package/dist/src/services/McpPromptLoader.js +43 -17
  120. package/dist/src/services/McpPromptLoader.js.map +1 -1
  121. package/dist/src/services/McpPromptLoader.test.d.ts +6 -0
  122. package/dist/src/services/McpPromptLoader.test.js +114 -0
  123. package/dist/src/services/McpPromptLoader.test.js.map +1 -0
  124. package/dist/src/services/prompt-processors/argumentProcessor.d.ts +1 -1
  125. package/dist/src/services/prompt-processors/argumentProcessor.js +1 -1
  126. package/dist/src/services/prompt-processors/shellProcessor.d.ts +1 -1
  127. package/dist/src/services/prompt-processors/shellProcessor.js +1 -1
  128. package/dist/src/services/prompt-processors/types.d.ts +1 -1
  129. package/dist/src/services/prompt-processors/types.js +1 -1
  130. package/dist/src/services/types.d.ts +1 -1
  131. package/dist/src/services/types.js +1 -1
  132. package/dist/src/test-utils/customMatchers.d.ts +1 -1
  133. package/dist/src/test-utils/customMatchers.js +1 -1
  134. package/dist/src/test-utils/mockCommandContext.d.ts +1 -1
  135. package/dist/src/test-utils/mockCommandContext.js +1 -1
  136. package/dist/src/test-utils/mockCommandContext.test.d.ts +1 -1
  137. package/dist/src/test-utils/mockCommandContext.test.js +1 -1
  138. package/dist/src/test-utils/render.d.ts +1 -1
  139. package/dist/src/test-utils/render.js +1 -1
  140. package/dist/src/test-utils/responsive-testing.d.ts +1 -1
  141. package/dist/src/test-utils/responsive-testing.js +1 -1
  142. package/dist/src/test-utils/responsive-testing.test.d.ts +1 -1
  143. package/dist/src/test-utils/responsive-testing.test.js +1 -1
  144. package/dist/src/ui/App.d.ts +1 -1
  145. package/dist/src/ui/App.e2e.test.d.ts +2 -2
  146. package/dist/src/ui/App.e2e.test.js +2 -2
  147. package/dist/src/ui/App.js +60 -24
  148. package/dist/src/ui/App.js.map +1 -1
  149. package/dist/src/ui/IdeIntegrationNudge.d.ts +0 -1
  150. package/dist/src/ui/IdeIntegrationNudge.js +1 -2
  151. package/dist/src/ui/IdeIntegrationNudge.js.map +1 -1
  152. package/dist/src/ui/colors.d.ts +33 -1
  153. package/dist/src/ui/colors.js +65 -1
  154. package/dist/src/ui/colors.js.map +1 -1
  155. package/dist/src/ui/commands/aboutCommand.d.ts +1 -1
  156. package/dist/src/ui/commands/aboutCommand.js +1 -1
  157. package/dist/src/ui/commands/authCommand.d.ts +6 -1
  158. package/dist/src/ui/commands/authCommand.js +30 -1
  159. package/dist/src/ui/commands/authCommand.js.map +1 -1
  160. package/dist/src/ui/commands/bugCommand.d.ts +1 -1
  161. package/dist/src/ui/commands/bugCommand.js +1 -1
  162. package/dist/src/ui/commands/chatCommand.d.ts +1 -1
  163. package/dist/src/ui/commands/chatCommand.js +21 -4
  164. package/dist/src/ui/commands/chatCommand.js.map +1 -1
  165. package/dist/src/ui/commands/clearCommand.d.ts +1 -1
  166. package/dist/src/ui/commands/clearCommand.js +1 -1
  167. package/dist/src/ui/commands/compressCommand.d.ts +1 -1
  168. package/dist/src/ui/commands/compressCommand.js +3 -1
  169. package/dist/src/ui/commands/compressCommand.js.map +1 -1
  170. package/dist/src/ui/commands/copyCommand.d.ts +1 -1
  171. package/dist/src/ui/commands/copyCommand.js +2 -2
  172. package/dist/src/ui/commands/copyCommand.js.map +1 -1
  173. package/dist/src/ui/commands/directoryCommand.d.ts +1 -1
  174. package/dist/src/ui/commands/directoryCommand.js +1 -1
  175. package/dist/src/ui/commands/docsCommand.d.ts +1 -1
  176. package/dist/src/ui/commands/docsCommand.js +1 -1
  177. package/dist/src/ui/commands/editorCommand.d.ts +1 -1
  178. package/dist/src/ui/commands/editorCommand.js +1 -1
  179. package/dist/src/ui/commands/extensionsCommand.d.ts +1 -1
  180. package/dist/src/ui/commands/extensionsCommand.js +1 -1
  181. package/dist/src/ui/commands/helpCommand.d.ts +1 -1
  182. package/dist/src/ui/commands/helpCommand.js +1 -1
  183. package/dist/src/ui/commands/ideCommand.d.ts +1 -1
  184. package/dist/src/ui/commands/ideCommand.js +2 -2
  185. package/dist/src/ui/commands/ideCommand.js.map +1 -1
  186. package/dist/src/ui/commands/initCommand.d.ts +1 -1
  187. package/dist/src/ui/commands/initCommand.js +1 -1
  188. package/dist/src/ui/commands/mcpCommand.d.ts +1 -1
  189. package/dist/src/ui/commands/mcpCommand.js +1 -1
  190. package/dist/src/ui/commands/memoryCommand.d.ts +1 -1
  191. package/dist/src/ui/commands/memoryCommand.js +1 -1
  192. package/dist/src/ui/commands/privacyCommand.d.ts +1 -1
  193. package/dist/src/ui/commands/privacyCommand.js +1 -1
  194. package/dist/src/ui/commands/providerCommand.js +1 -1
  195. package/dist/src/ui/commands/providerCommand.js.map +1 -1
  196. package/dist/src/ui/commands/quitCommand.d.ts +1 -1
  197. package/dist/src/ui/commands/quitCommand.js +1 -1
  198. package/dist/src/ui/commands/restoreCommand.d.ts +1 -1
  199. package/dist/src/ui/commands/restoreCommand.js +3 -7
  200. package/dist/src/ui/commands/restoreCommand.js.map +1 -1
  201. package/dist/src/ui/commands/settingsCommand.d.ts +1 -1
  202. package/dist/src/ui/commands/settingsCommand.js +1 -1
  203. package/dist/src/ui/commands/setupGithubCommand.d.ts +1 -1
  204. package/dist/src/ui/commands/setupGithubCommand.js +1 -1
  205. package/dist/src/ui/commands/setupGithubCommand.test.d.ts +1 -1
  206. package/dist/src/ui/commands/setupGithubCommand.test.js +1 -1
  207. package/dist/src/ui/commands/statsCommand.d.ts +1 -1
  208. package/dist/src/ui/commands/statsCommand.js +1 -1
  209. package/dist/src/ui/commands/terminalSetupCommand.d.ts +1 -1
  210. package/dist/src/ui/commands/terminalSetupCommand.js +1 -1
  211. package/dist/src/ui/commands/themeCommand.d.ts +1 -1
  212. package/dist/src/ui/commands/themeCommand.js +1 -1
  213. package/dist/src/ui/commands/toolformatCommand.test.d.ts +5 -0
  214. package/dist/src/ui/commands/toolformatCommand.test.js.map +1 -1
  215. package/dist/src/ui/commands/toolsCommand.d.ts +1 -1
  216. package/dist/src/ui/commands/toolsCommand.js +13 -43
  217. package/dist/src/ui/commands/toolsCommand.js.map +1 -1
  218. package/dist/src/ui/commands/types.d.ts +1 -1
  219. package/dist/src/ui/commands/types.js +1 -1
  220. package/dist/src/ui/commands/vimCommand.d.ts +1 -1
  221. package/dist/src/ui/commands/vimCommand.js +1 -1
  222. package/dist/src/ui/components/AboutBox.d.ts +1 -1
  223. package/dist/src/ui/components/AsciiArt.d.ts +1 -1
  224. package/dist/src/ui/components/AsciiArt.js +1 -1
  225. package/dist/src/ui/components/AuthDialog.d.ts +1 -1
  226. package/dist/src/ui/components/AuthDialog.js +1 -1
  227. package/dist/src/ui/components/AuthDialog.test.d.ts +1 -1
  228. package/dist/src/ui/components/AuthDialog.test.js +41 -11
  229. package/dist/src/ui/components/AuthDialog.test.js.map +1 -1
  230. package/dist/src/ui/components/AuthInProgress.d.ts +1 -1
  231. package/dist/src/ui/components/AuthInProgress.js +1 -1
  232. package/dist/src/ui/components/AutoAcceptIndicator.d.ts +1 -1
  233. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +1 -1
  234. package/dist/src/ui/components/ContextIndicator.ui.test.d.ts +5 -0
  235. package/dist/src/ui/components/ContextIndicator.ui.test.js +5 -0
  236. package/dist/src/ui/components/ContextIndicator.ui.test.js.map +1 -1
  237. package/dist/src/ui/components/ContextUsageDisplay.d.ts +1 -1
  238. package/dist/src/ui/components/ContextUsageDisplay.js +1 -1
  239. package/dist/src/ui/components/ContextUsageDisplay.semantic.test.d.ts +1 -1
  240. package/dist/src/ui/components/ContextUsageDisplay.semantic.test.js +1 -1
  241. package/dist/src/ui/components/DebugProfiler.d.ts +1 -1
  242. package/dist/src/ui/components/DebugProfiler.js +1 -1
  243. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +1 -1
  244. package/dist/src/ui/components/EditorSettingsDialog.d.ts +1 -1
  245. package/dist/src/ui/components/EditorSettingsDialog.js +1 -1
  246. package/dist/src/ui/components/ErrorBoundary.d.ts +1 -1
  247. package/dist/src/ui/components/ErrorBoundary.js +1 -1
  248. package/dist/src/ui/components/FolderTrustDialog.d.ts +2 -1
  249. package/dist/src/ui/components/FolderTrustDialog.js +10 -4
  250. package/dist/src/ui/components/FolderTrustDialog.js.map +1 -1
  251. package/dist/src/ui/components/FolderTrustDialog.test.d.ts +1 -1
  252. package/dist/src/ui/components/FolderTrustDialog.test.js +41 -4
  253. package/dist/src/ui/components/FolderTrustDialog.test.js.map +1 -1
  254. package/dist/src/ui/components/Footer.d.ts +1 -1
  255. package/dist/src/ui/components/Footer.js +1 -1
  256. package/dist/src/ui/components/Footer.responsive.test.d.ts +1 -1
  257. package/dist/src/ui/components/Footer.responsive.test.js +1 -1
  258. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +1 -1
  259. package/dist/src/ui/components/Header.d.ts +1 -1
  260. package/dist/src/ui/components/Help.d.ts +1 -1
  261. package/dist/src/ui/components/Help.js +1 -1
  262. package/dist/src/ui/components/Help.js.map +1 -1
  263. package/dist/src/ui/components/HistoryItemDisplay.d.ts +2 -2
  264. package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +1 -1
  265. package/dist/src/ui/components/HistoryItemDisplay.test.js +3 -1
  266. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
  267. package/dist/src/ui/components/InputPrompt.d.ts +1 -1
  268. package/dist/src/ui/components/InputPrompt.js +150 -66
  269. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  270. package/dist/src/ui/components/InputPrompt.paste.test.d.ts +1 -1
  271. package/dist/src/ui/components/InputPrompt.paste.test.js +37 -12
  272. package/dist/src/ui/components/InputPrompt.paste.test.js.map +1 -1
  273. package/dist/src/ui/components/LayoutManager.d.ts +1 -1
  274. package/dist/src/ui/components/LayoutManager.js +1 -1
  275. package/dist/src/ui/components/LoadingIndicator.d.ts +1 -1
  276. package/dist/src/ui/components/LoadingIndicator.test.d.ts +1 -1
  277. package/dist/src/ui/components/LoadingIndicator.test.js +1 -1
  278. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +1 -1
  279. package/dist/src/ui/components/MemoryUsageDisplay.js +1 -1
  280. package/dist/src/ui/components/MemoryUsageDisplay.semantic.test.d.ts +1 -1
  281. package/dist/src/ui/components/MemoryUsageDisplay.semantic.test.js +1 -1
  282. package/dist/src/ui/components/ModelStatsDisplay.d.ts +1 -1
  283. package/dist/src/ui/components/OAuthCodeDialog.d.ts +5 -0
  284. package/dist/src/ui/components/OAuthCodeDialog.js +5 -0
  285. package/dist/src/ui/components/OAuthCodeDialog.js.map +1 -1
  286. package/dist/src/ui/components/OAuthCodeDialog.test.d.ts +1 -1
  287. package/dist/src/ui/components/OAuthCodeDialog.test.js +1 -1
  288. package/dist/src/ui/components/PrepareLabel.d.ts +1 -1
  289. package/dist/src/ui/components/ProviderDialog.d.ts +5 -0
  290. package/dist/src/ui/components/ProviderDialog.js +2 -2
  291. package/dist/src/ui/components/ProviderDialog.responsive.test.d.ts +1 -1
  292. package/dist/src/ui/components/ProviderDialog.responsive.test.js +1 -1
  293. package/dist/src/ui/components/ProviderModelDialog.d.ts +1 -1
  294. package/dist/src/ui/components/ProviderModelDialog.js +1 -1
  295. package/dist/src/ui/components/ProviderModelDialog.responsive.test.d.ts +1 -1
  296. package/dist/src/ui/components/ProviderModelDialog.responsive.test.js +1 -1
  297. package/dist/src/ui/components/ProviderModelDialog.test.d.ts +1 -1
  298. package/dist/src/ui/components/ProviderModelDialog.test.js +1 -1
  299. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +1 -1
  300. package/dist/src/ui/components/SettingsDialog.d.ts +1 -1
  301. package/dist/src/ui/components/SettingsDialog.js +66 -35
  302. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  303. package/dist/src/ui/components/SettingsDialog.test.d.ts +1 -1
  304. package/dist/src/ui/components/SettingsDialog.test.js +114 -48
  305. package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
  306. package/dist/src/ui/components/ShellConfirmationDialog.d.ts +1 -1
  307. package/dist/src/ui/components/ShellConfirmationDialog.js +1 -1
  308. package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +1 -1
  309. package/dist/src/ui/components/ShellConfirmationDialog.test.js +1 -1
  310. package/dist/src/ui/components/ShellModeIndicator.d.ts +1 -1
  311. package/dist/src/ui/components/ShowMoreLines.d.ts +1 -1
  312. package/dist/src/ui/components/ShowMoreLines.js +1 -1
  313. package/dist/src/ui/components/StatsDisplay.d.ts +1 -1
  314. package/dist/src/ui/components/StatsDisplay.js +10 -11
  315. package/dist/src/ui/components/StatsDisplay.js.map +1 -1
  316. package/dist/src/ui/components/SuggestionsDisplay.d.ts +1 -1
  317. package/dist/src/ui/components/SuggestionsDisplay.js +13 -5
  318. package/dist/src/ui/components/SuggestionsDisplay.js.map +1 -1
  319. package/dist/src/ui/components/ThemeDialog.d.ts +1 -1
  320. package/dist/src/ui/components/ThemeDialog.js +1 -1
  321. package/dist/src/ui/components/Tips.d.ts +1 -1
  322. package/dist/src/ui/components/TodoPanel.responsive.test.d.ts +1 -1
  323. package/dist/src/ui/components/TodoPanel.responsive.test.js +1 -1
  324. package/dist/src/ui/components/TodoPanel.semantic.test.d.ts +1 -1
  325. package/dist/src/ui/components/TodoPanel.semantic.test.js +1 -1
  326. package/dist/src/ui/components/ToolStatsDisplay.d.ts +1 -1
  327. package/dist/src/ui/components/UpdateNotification.d.ts +1 -1
  328. package/dist/src/ui/components/UpdateNotification.js +1 -1
  329. package/dist/src/ui/components/WorkspaceMigrationDialog.d.ts +11 -0
  330. package/dist/src/ui/components/WorkspaceMigrationDialog.js +43 -0
  331. package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +1 -0
  332. package/dist/src/ui/components/__tests__/LayoutManager.test.d.ts +1 -1
  333. package/dist/src/ui/components/__tests__/LayoutManager.test.js +1 -1
  334. package/dist/src/ui/components/messages/CompressionMessage.d.ts +1 -1
  335. package/dist/src/ui/components/messages/CompressionMessage.js +2 -1
  336. package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -1
  337. package/dist/src/ui/components/messages/DiffRenderer.d.ts +1 -1
  338. package/dist/src/ui/components/messages/DiffRenderer.js +1 -1
  339. package/dist/src/ui/components/messages/DiffRenderer.js.map +1 -1
  340. package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +1 -1
  341. package/dist/src/ui/components/messages/DiffRenderer.test.js +1 -1
  342. package/dist/src/ui/components/messages/ErrorMessage.d.ts +1 -1
  343. package/dist/src/ui/components/messages/GeminiMessage.d.ts +1 -1
  344. package/dist/src/ui/components/messages/GeminiMessage.js +2 -1
  345. package/dist/src/ui/components/messages/GeminiMessage.js.map +1 -1
  346. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +1 -1
  347. package/dist/src/ui/components/messages/InfoMessage.d.ts +1 -1
  348. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +2 -2
  349. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +40 -23
  350. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  351. package/dist/src/ui/components/messages/ToolConfirmationMessage.responsive.test.d.ts +1 -1
  352. package/dist/src/ui/components/messages/ToolConfirmationMessage.responsive.test.js +16 -12
  353. package/dist/src/ui/components/messages/ToolConfirmationMessage.responsive.test.js.map +1 -1
  354. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +1 -1
  355. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +88 -3
  356. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +1 -1
  357. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +2 -2
  358. package/dist/src/ui/components/messages/ToolGroupMessage.js +2 -2
  359. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +1 -1
  360. package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +6 -0
  361. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +256 -0
  362. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +1 -0
  363. package/dist/src/ui/components/messages/ToolMessage.d.ts +1 -1
  364. package/dist/src/ui/components/messages/ToolMessage.js +2 -2
  365. package/dist/src/ui/components/messages/ToolMessage.test.d.ts +1 -1
  366. package/dist/src/ui/components/messages/ToolMessage.test.js +7 -7
  367. package/dist/src/ui/components/messages/UserMessage.d.ts +1 -1
  368. package/dist/src/ui/components/messages/UserMessage.js +4 -2
  369. package/dist/src/ui/components/messages/UserMessage.js.map +1 -1
  370. package/dist/src/ui/components/messages/UserShellMessage.d.ts +1 -1
  371. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +1 -1
  372. package/dist/src/ui/components/shared/MaxSizedBox.js +1 -1
  373. package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +1 -1
  374. package/dist/src/ui/components/shared/MaxSizedBox.test.js +1 -1
  375. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +1 -1
  376. package/dist/src/ui/components/shared/RadioButtonSelect.js +1 -1
  377. package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +1 -1
  378. package/dist/src/ui/components/shared/RadioButtonSelect.test.js +1 -1
  379. package/dist/src/ui/components/shared/text-buffer.d.ts +1 -1
  380. package/dist/src/ui/components/shared/text-buffer.js +2 -46
  381. package/dist/src/ui/components/shared/text-buffer.js.map +1 -1
  382. package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +1 -1
  383. package/dist/src/ui/components/shared/vim-buffer-actions.js +1 -1
  384. package/dist/src/ui/constants.d.ts +3 -1
  385. package/dist/src/ui/constants.js +3 -1
  386. package/dist/src/ui/constants.js.map +1 -1
  387. package/dist/src/ui/containers/SessionController.d.ts +5 -0
  388. package/dist/src/ui/containers/SessionController.js +5 -0
  389. package/dist/src/ui/containers/SessionController.js.map +1 -1
  390. package/dist/src/ui/containers/SessionController.test.d.ts +1 -1
  391. package/dist/src/ui/containers/SessionController.test.js +1 -1
  392. package/dist/src/ui/containers/UIStateShell.d.ts +5 -0
  393. package/dist/src/ui/containers/UIStateShell.js.map +1 -1
  394. package/dist/src/ui/contexts/AppDispatchContext.d.ts +1 -1
  395. package/dist/src/ui/contexts/AppDispatchContext.js +1 -1
  396. package/dist/src/ui/contexts/KeypressContext.d.ts +3 -2
  397. package/dist/src/ui/contexts/KeypressContext.js +33 -41
  398. package/dist/src/ui/contexts/KeypressContext.js.map +1 -1
  399. package/dist/src/ui/contexts/KeypressContext.test.d.ts +1 -1
  400. package/dist/src/ui/contexts/KeypressContext.test.js +122 -12
  401. package/dist/src/ui/contexts/KeypressContext.test.js.map +1 -1
  402. package/dist/src/ui/contexts/OverflowContext.d.ts +1 -1
  403. package/dist/src/ui/contexts/OverflowContext.js +1 -1
  404. package/dist/src/ui/contexts/SessionContext.d.ts +1 -1
  405. package/dist/src/ui/contexts/SessionContext.js +1 -1
  406. package/dist/src/ui/contexts/SessionStateContext.d.ts +1 -1
  407. package/dist/src/ui/contexts/SessionStateContext.js +1 -1
  408. package/dist/src/ui/contexts/SettingsContext.d.ts +1 -1
  409. package/dist/src/ui/contexts/SettingsContext.js +1 -1
  410. package/dist/src/ui/contexts/StreamingContext.d.ts +1 -1
  411. package/dist/src/ui/contexts/StreamingContext.js +1 -1
  412. package/dist/src/ui/contexts/TodoProvider.d.ts +5 -0
  413. package/dist/src/ui/contexts/TodoProvider.js +5 -0
  414. package/dist/src/ui/contexts/TodoProvider.js.map +1 -1
  415. package/dist/src/ui/contexts/VimModeContext.d.ts +1 -1
  416. package/dist/src/ui/contexts/VimModeContext.js +1 -1
  417. package/dist/src/ui/editors/editorSettingsManager.d.ts +1 -1
  418. package/dist/src/ui/editors/editorSettingsManager.js +1 -1
  419. package/dist/src/ui/hooks/atCommandProcessor.d.ts +1 -1
  420. package/dist/src/ui/hooks/atCommandProcessor.js +1 -2
  421. package/dist/src/ui/hooks/atCommandProcessor.js.map +1 -1
  422. package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +1 -1
  423. package/dist/src/ui/hooks/atCommandProcessor.test.js +10 -2
  424. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
  425. package/dist/src/ui/hooks/index.d.ts +5 -0
  426. package/dist/src/ui/hooks/index.js +5 -0
  427. package/dist/src/ui/hooks/index.js.map +1 -1
  428. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +1 -1
  429. package/dist/src/ui/hooks/shellCommandProcessor.js +1 -1
  430. package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +1 -1
  431. package/dist/src/ui/hooks/shellCommandProcessor.test.js +27 -16
  432. package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +1 -1
  433. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +1 -1
  434. package/dist/src/ui/hooks/slashCommandProcessor.js +8 -5
  435. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  436. package/dist/src/ui/hooks/useAtCompletion.d.ts +1 -1
  437. package/dist/src/ui/hooks/useAtCompletion.js +2 -1
  438. package/dist/src/ui/hooks/useAtCompletion.js.map +1 -1
  439. package/dist/src/ui/hooks/useAuthCommand.d.ts +1 -1
  440. package/dist/src/ui/hooks/useAuthCommand.js +1 -1
  441. package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +4 -2
  442. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +14 -5
  443. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +1 -1
  444. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +1 -1
  445. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +123 -3
  446. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +1 -1
  447. package/dist/src/ui/hooks/useBracketedPaste.d.ts +1 -1
  448. package/dist/src/ui/hooks/useBracketedPaste.js +1 -1
  449. package/dist/src/ui/hooks/useCommandCompletion.d.ts +32 -0
  450. package/dist/src/ui/hooks/useCommandCompletion.js +196 -0
  451. package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -0
  452. package/dist/src/ui/hooks/useCompletion.d.ts +1 -1
  453. package/dist/src/ui/hooks/useCompletion.js +1 -1
  454. package/dist/src/ui/hooks/useConsoleMessages.d.ts +1 -1
  455. package/dist/src/ui/hooks/useConsoleMessages.js +1 -1
  456. package/dist/src/ui/hooks/useEditorSettings.d.ts +1 -1
  457. package/dist/src/ui/hooks/useEditorSettings.js +1 -1
  458. package/dist/src/ui/hooks/useEditorSettings.test.d.ts +1 -1
  459. package/dist/src/ui/hooks/useEditorSettings.test.js +1 -1
  460. package/dist/src/ui/hooks/useFocus.d.ts +1 -1
  461. package/dist/src/ui/hooks/useFocus.js +1 -1
  462. package/dist/src/ui/hooks/useFolderTrust.d.ts +2 -1
  463. package/dist/src/ui/hooks/useFolderTrust.js +28 -5
  464. package/dist/src/ui/hooks/useFolderTrust.js.map +1 -1
  465. package/dist/src/ui/hooks/useGeminiStream.d.ts +2 -2
  466. package/dist/src/ui/hooks/useGeminiStream.integration.test.d.ts +1 -1
  467. package/dist/src/ui/hooks/useGeminiStream.integration.test.js +2 -2
  468. package/dist/src/ui/hooks/useGeminiStream.integration.test.js.map +1 -1
  469. package/dist/src/ui/hooks/useGeminiStream.js +77 -348
  470. package/dist/src/ui/hooks/useGeminiStream.js.map +1 -1
  471. package/dist/src/ui/hooks/useGitBranchName.d.ts +1 -1
  472. package/dist/src/ui/hooks/useGitBranchName.js +1 -1
  473. package/dist/src/ui/hooks/useGitBranchName.test.d.ts +1 -1
  474. package/dist/src/ui/hooks/useGitBranchName.test.js +1 -1
  475. package/dist/src/ui/hooks/useHistoryManager.d.ts +1 -1
  476. package/dist/src/ui/hooks/useHistoryManager.js +1 -1
  477. package/dist/src/ui/hooks/useHistoryManager.test.d.ts +1 -1
  478. package/dist/src/ui/hooks/useHistoryManager.test.js +1 -1
  479. package/dist/src/ui/hooks/useInputHistory.d.ts +1 -1
  480. package/dist/src/ui/hooks/useInputHistory.js +1 -1
  481. package/dist/src/ui/hooks/useInputHistory.test.d.ts +1 -1
  482. package/dist/src/ui/hooks/useInputHistory.test.js +1 -1
  483. package/dist/src/ui/hooks/useKeypress.d.ts +1 -1
  484. package/dist/src/ui/hooks/useKeypress.js +1 -1
  485. package/dist/src/ui/hooks/useKeypress.test.d.ts +1 -1
  486. package/dist/src/ui/hooks/useKeypress.test.js +1 -1
  487. package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +1 -1
  488. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +1 -1
  489. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +1 -1
  490. package/dist/src/ui/hooks/useLoadingIndicator.js +1 -1
  491. package/dist/src/ui/hooks/useLogger.d.ts +3 -3
  492. package/dist/src/ui/hooks/useLogger.js +4 -4
  493. package/dist/src/ui/hooks/useLogger.js.map +1 -1
  494. package/dist/src/ui/hooks/usePhraseCycler.d.ts +1 -1
  495. package/dist/src/ui/hooks/usePhraseCycler.js +1 -1
  496. package/dist/src/ui/hooks/usePrivacySettings.d.ts +1 -1
  497. package/dist/src/ui/hooks/usePrivacySettings.js +1 -1
  498. package/dist/src/ui/hooks/usePrivacySettings.test.d.ts +1 -1
  499. package/dist/src/ui/hooks/usePrivacySettings.test.js +1 -1
  500. package/dist/src/ui/hooks/usePromptCompletion.d.ts +23 -0
  501. package/dist/src/ui/hooks/usePromptCompletion.js +177 -0
  502. package/dist/src/ui/hooks/usePromptCompletion.js.map +1 -0
  503. package/dist/src/ui/hooks/useProviderModelDialog.d.ts +1 -1
  504. package/dist/src/ui/hooks/useProviderModelDialog.js +1 -1
  505. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +1 -1
  506. package/dist/src/ui/hooks/useReactToolScheduler.js +3 -4
  507. package/dist/src/ui/hooks/useReactToolScheduler.js.map +1 -1
  508. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +1 -1
  509. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +1 -1
  510. package/dist/src/ui/hooks/useResponsive.d.ts +1 -1
  511. package/dist/src/ui/hooks/useResponsive.js +1 -1
  512. package/dist/src/ui/hooks/useResponsive.test.d.ts +1 -1
  513. package/dist/src/ui/hooks/useResponsive.test.js +1 -1
  514. package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +1 -1
  515. package/dist/src/ui/hooks/useReverseSearchCompletion.js +1 -1
  516. package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +1 -1
  517. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +1 -1
  518. package/dist/src/ui/hooks/useSession.d.ts +1 -1
  519. package/dist/src/ui/hooks/useSession.js +1 -1
  520. package/dist/src/ui/hooks/useSettingsCommand.d.ts +1 -1
  521. package/dist/src/ui/hooks/useSettingsCommand.js +1 -1
  522. package/dist/src/ui/hooks/useShellHistory.d.ts +3 -2
  523. package/dist/src/ui/hooks/useShellHistory.js +8 -9
  524. package/dist/src/ui/hooks/useShellHistory.js.map +1 -1
  525. package/dist/src/ui/hooks/useShellHistory.test.d.ts +1 -1
  526. package/dist/src/ui/hooks/useShellHistory.test.js +32 -2
  527. package/dist/src/ui/hooks/useShellHistory.test.js.map +1 -1
  528. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +1 -1
  529. package/dist/src/ui/hooks/useShowMemoryCommand.js +1 -1
  530. package/dist/src/ui/hooks/useSlashCompletion.d.ts +1 -1
  531. package/dist/src/ui/hooks/useSlashCompletion.js +14 -3
  532. package/dist/src/ui/hooks/useSlashCompletion.js.map +1 -1
  533. package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +1 -1
  534. package/dist/src/ui/hooks/useSlashCompletion.test.js +1 -1
  535. package/dist/src/ui/hooks/useStableCallback.d.ts +1 -1
  536. package/dist/src/ui/hooks/useStableCallback.js +1 -1
  537. package/dist/src/ui/hooks/useStableCallback.test.d.ts +1 -1
  538. package/dist/src/ui/hooks/useStableCallback.test.js +1 -1
  539. package/dist/src/ui/hooks/useStateAndRef.d.ts +1 -1
  540. package/dist/src/ui/hooks/useStateAndRef.js +1 -1
  541. package/dist/src/ui/hooks/useTerminalSize.d.ts +1 -1
  542. package/dist/src/ui/hooks/useTerminalSize.js +1 -1
  543. package/dist/src/ui/hooks/useThemeCommand.d.ts +1 -1
  544. package/dist/src/ui/hooks/useThemeCommand.js +1 -1
  545. package/dist/src/ui/hooks/useTimer.d.ts +1 -1
  546. package/dist/src/ui/hooks/useTimer.js +1 -1
  547. package/dist/src/ui/hooks/useToolScheduler.test.d.ts +1 -1
  548. package/dist/src/ui/hooks/useToolScheduler.test.js +23 -11
  549. package/dist/src/ui/hooks/useToolScheduler.test.js.map +1 -1
  550. package/dist/src/ui/hooks/useWorkspaceMigration.d.ts +13 -0
  551. package/dist/src/ui/hooks/useWorkspaceMigration.js +50 -0
  552. package/dist/src/ui/hooks/useWorkspaceMigration.js.map +1 -0
  553. package/dist/src/ui/hooks/vim.d.ts +1 -1
  554. package/dist/src/ui/hooks/vim.js +1 -1
  555. package/dist/src/ui/keyMatchers.d.ts +1 -1
  556. package/dist/src/ui/keyMatchers.js +1 -1
  557. package/dist/src/ui/keyMatchers.test.d.ts +1 -1
  558. package/dist/src/ui/keyMatchers.test.js +1 -1
  559. package/dist/src/ui/privacy/CloudFreePrivacyNotice.d.ts +1 -1
  560. package/dist/src/ui/privacy/CloudFreePrivacyNotice.js +1 -1
  561. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.d.ts +1 -1
  562. package/dist/src/ui/privacy/CloudPaidPrivacyNotice.js +1 -1
  563. package/dist/src/ui/privacy/GeminiPrivacyNotice.d.ts +1 -1
  564. package/dist/src/ui/privacy/GeminiPrivacyNotice.js +1 -1
  565. package/dist/src/ui/privacy/PrivacyNotice.d.ts +1 -1
  566. package/dist/src/ui/privacy/PrivacyNotice.js +1 -1
  567. package/dist/src/ui/reducers/appReducer.d.ts +1 -1
  568. package/dist/src/ui/reducers/appReducer.js +1 -1
  569. package/dist/src/ui/reducers/appReducer.test.d.ts +1 -1
  570. package/dist/src/ui/reducers/appReducer.test.js +1 -1
  571. package/dist/src/ui/reducers/sessionReducer.d.ts +1 -1
  572. package/dist/src/ui/reducers/sessionReducer.js +1 -1
  573. package/dist/src/ui/semantic-colors.d.ts +6 -0
  574. package/dist/src/ui/semantic-colors.js +8 -0
  575. package/dist/src/ui/semantic-colors.js.map +1 -0
  576. package/dist/src/ui/themes/ansi-light.d.ts +1 -1
  577. package/dist/src/ui/themes/ansi-light.js +1 -1
  578. package/dist/src/ui/themes/ansi.d.ts +1 -1
  579. package/dist/src/ui/themes/ansi.js +1 -1
  580. package/dist/src/ui/themes/atom-one-dark.d.ts +1 -1
  581. package/dist/src/ui/themes/atom-one-dark.js +1 -1
  582. package/dist/src/ui/themes/ayu-light.d.ts +1 -1
  583. package/dist/src/ui/themes/ayu-light.js +1 -1
  584. package/dist/src/ui/themes/ayu.d.ts +1 -1
  585. package/dist/src/ui/themes/ayu.js +1 -1
  586. package/dist/src/ui/themes/color-utils.d.ts +1 -1
  587. package/dist/src/ui/themes/color-utils.js +1 -1
  588. package/dist/src/ui/themes/color-utils.test.d.ts +1 -1
  589. package/dist/src/ui/themes/color-utils.test.js +1 -1
  590. package/dist/src/ui/themes/default-light.d.ts +1 -1
  591. package/dist/src/ui/themes/default-light.js +1 -1
  592. package/dist/src/ui/themes/default.d.ts +1 -1
  593. package/dist/src/ui/themes/default.js +1 -1
  594. package/dist/src/ui/themes/dracula.d.ts +1 -1
  595. package/dist/src/ui/themes/dracula.js +1 -1
  596. package/dist/src/ui/themes/github-dark.d.ts +1 -1
  597. package/dist/src/ui/themes/github-dark.js +1 -1
  598. package/dist/src/ui/themes/github-light.d.ts +1 -1
  599. package/dist/src/ui/themes/github-light.js +1 -1
  600. package/dist/src/ui/themes/googlecode.d.ts +1 -1
  601. package/dist/src/ui/themes/googlecode.js +2 -2
  602. package/dist/src/ui/themes/googlecode.js.map +1 -1
  603. package/dist/src/ui/themes/green-screen.d.ts +1 -1
  604. package/dist/src/ui/themes/green-screen.js +1 -1
  605. package/dist/src/ui/themes/no-color.d.ts +1 -1
  606. package/dist/src/ui/themes/no-color.js +1 -1
  607. package/dist/src/ui/themes/semantic-resolver.d.ts +1 -1
  608. package/dist/src/ui/themes/semantic-resolver.js +1 -1
  609. package/dist/src/ui/themes/semantic-resolver.test.d.ts +1 -1
  610. package/dist/src/ui/themes/semantic-resolver.test.js +1 -1
  611. package/dist/src/ui/themes/semantic-tokens.d.ts +1 -1
  612. package/dist/src/ui/themes/semantic-tokens.js +1 -1
  613. package/dist/src/ui/themes/semantic-tokens.test.d.ts +1 -1
  614. package/dist/src/ui/themes/semantic-tokens.test.js +1 -1
  615. package/dist/src/ui/themes/shades-of-purple.d.ts +1 -1
  616. package/dist/src/ui/themes/shades-of-purple.js +1 -1
  617. package/dist/src/ui/themes/theme-compat.d.ts +1 -1
  618. package/dist/src/ui/themes/theme-compat.js +1 -1
  619. package/dist/src/ui/themes/theme-manager.d.ts +3 -1
  620. package/dist/src/ui/themes/theme-manager.js +73 -6
  621. package/dist/src/ui/themes/theme-manager.js.map +1 -1
  622. package/dist/src/ui/themes/theme-manager.test.d.ts +1 -1
  623. package/dist/src/ui/themes/theme-manager.test.js +61 -2
  624. package/dist/src/ui/themes/theme-manager.test.js.map +1 -1
  625. package/dist/src/ui/themes/theme.d.ts +4 -2
  626. package/dist/src/ui/themes/theme.js +32 -2
  627. package/dist/src/ui/themes/theme.js.map +1 -1
  628. package/dist/src/ui/themes/xcode.d.ts +1 -1
  629. package/dist/src/ui/themes/xcode.js +1 -1
  630. package/dist/src/ui/types.d.ts +3 -2
  631. package/dist/src/ui/types.js +1 -1
  632. package/dist/src/ui/types.js.map +1 -1
  633. package/dist/src/ui/utils/CodeColorizer.d.ts +1 -1
  634. package/dist/src/ui/utils/CodeColorizer.js +1 -1
  635. package/dist/src/ui/utils/ConsolePatcher.d.ts +1 -1
  636. package/dist/src/ui/utils/ConsolePatcher.js +1 -1
  637. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +1 -1
  638. package/dist/src/ui/utils/InlineMarkdownRenderer.js +1 -1
  639. package/dist/src/ui/utils/MarkdownDisplay.d.ts +1 -1
  640. package/dist/src/ui/utils/MarkdownDisplay.js +9 -11
  641. package/dist/src/ui/utils/MarkdownDisplay.js.map +1 -1
  642. package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +1 -1
  643. package/dist/src/ui/utils/MarkdownDisplay.test.js +18 -17
  644. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +1 -1
  645. package/dist/src/ui/utils/TableRenderer.d.ts +1 -1
  646. package/dist/src/ui/utils/TableRenderer.js +6 -6
  647. package/dist/src/ui/utils/TableRenderer.js.map +1 -1
  648. package/dist/src/ui/utils/clipboardUtils.d.ts +1 -1
  649. package/dist/src/ui/utils/clipboardUtils.js +1 -1
  650. package/dist/src/ui/utils/clipboardUtils.test.d.ts +1 -1
  651. package/dist/src/ui/utils/clipboardUtils.test.js +1 -1
  652. package/dist/src/ui/utils/commandUtils.d.ts +2 -2
  653. package/dist/src/ui/utils/commandUtils.js +52 -14
  654. package/dist/src/ui/utils/commandUtils.js.map +1 -1
  655. package/dist/src/ui/utils/commandUtils.test.d.ts +1 -1
  656. package/dist/src/ui/utils/commandUtils.test.js +75 -20
  657. package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
  658. package/dist/src/ui/utils/computeStats.d.ts +1 -1
  659. package/dist/src/ui/utils/computeStats.js +1 -1
  660. package/dist/src/ui/utils/displayUtils.d.ts +1 -1
  661. package/dist/src/ui/utils/displayUtils.js +1 -1
  662. package/dist/src/ui/utils/displayUtils.test.d.ts +1 -1
  663. package/dist/src/ui/utils/displayUtils.test.js +1 -1
  664. package/dist/src/ui/utils/formatters.d.ts +1 -1
  665. package/dist/src/ui/utils/formatters.js +1 -1
  666. package/dist/src/ui/utils/formatters.test.d.ts +1 -1
  667. package/dist/src/ui/utils/formatters.test.js +1 -1
  668. package/dist/src/ui/utils/kittyProtocolDetector.d.ts +1 -1
  669. package/dist/src/ui/utils/kittyProtocolDetector.js +1 -1
  670. package/dist/src/ui/utils/markdownUtilities.d.ts +1 -1
  671. package/dist/src/ui/utils/markdownUtilities.js +1 -1
  672. package/dist/src/ui/utils/markdownUtilities.test.d.ts +1 -1
  673. package/dist/src/ui/utils/markdownUtilities.test.js +1 -1
  674. package/dist/src/ui/utils/platformConstants.d.ts +8 -1
  675. package/dist/src/ui/utils/platformConstants.js +8 -1
  676. package/dist/src/ui/utils/platformConstants.js.map +1 -1
  677. package/dist/src/ui/utils/renderLoopDetector.d.ts +1 -1
  678. package/dist/src/ui/utils/renderLoopDetector.js +1 -1
  679. package/dist/src/ui/utils/responsive.d.ts +1 -1
  680. package/dist/src/ui/utils/responsive.js +1 -1
  681. package/dist/src/ui/utils/responsive.test.d.ts +1 -1
  682. package/dist/src/ui/utils/responsive.test.js +1 -1
  683. package/dist/src/ui/utils/terminalSetup.d.ts +1 -1
  684. package/dist/src/ui/utils/terminalSetup.js +1 -1
  685. package/dist/src/ui/utils/textUtils.d.ts +19 -1
  686. package/dist/src/ui/utils/textUtils.js +45 -1
  687. package/dist/src/ui/utils/textUtils.js.map +1 -1
  688. package/dist/src/ui/utils/updateCheck.d.ts +1 -1
  689. package/dist/src/ui/utils/updateCheck.js +1 -1
  690. package/dist/src/ui/utils/updateCheck.test.d.ts +1 -1
  691. package/dist/src/ui/utils/updateCheck.test.js +1 -1
  692. package/dist/src/utils/ConversationContext.d.ts +2 -12
  693. package/dist/src/utils/ConversationContext.js +2 -12
  694. package/dist/src/utils/ConversationContext.js.map +1 -1
  695. package/dist/src/utils/ConversationContext.test.d.ts +1 -1
  696. package/dist/src/utils/ConversationContext.test.js +1 -1
  697. package/dist/src/utils/checks.d.ts +1 -1
  698. package/dist/src/utils/checks.js +1 -1
  699. package/dist/src/utils/cleanup.d.ts +1 -1
  700. package/dist/src/utils/cleanup.js +4 -3
  701. package/dist/src/utils/cleanup.js.map +1 -1
  702. package/dist/src/utils/dialogScopeUtils.d.ts +1 -1
  703. package/dist/src/utils/dialogScopeUtils.js +1 -1
  704. package/dist/src/utils/events.d.ts +1 -1
  705. package/dist/src/utils/events.js +1 -1
  706. package/dist/src/utils/gitUtils.d.ts +1 -1
  707. package/dist/src/utils/gitUtils.js +1 -1
  708. package/dist/src/utils/gitUtils.test.d.ts +1 -1
  709. package/dist/src/utils/gitUtils.test.js +4 -4
  710. package/dist/src/utils/gitUtils.test.js.map +1 -1
  711. package/dist/src/utils/handleAutoUpdate.d.ts +1 -1
  712. package/dist/src/utils/handleAutoUpdate.js +1 -1
  713. package/dist/src/utils/installationInfo.d.ts +1 -1
  714. package/dist/src/utils/installationInfo.js +1 -1
  715. package/dist/src/utils/installationInfo.test.d.ts +1 -1
  716. package/dist/src/utils/installationInfo.test.js +1 -1
  717. package/dist/src/utils/package.d.ts +1 -1
  718. package/dist/src/utils/package.js +1 -1
  719. package/dist/src/utils/readStdin.d.ts +1 -1
  720. package/dist/src/utils/readStdin.js +16 -1
  721. package/dist/src/utils/readStdin.js.map +1 -1
  722. package/dist/src/utils/readStdin.test.d.ts +6 -0
  723. package/dist/src/utils/readStdin.test.js +88 -0
  724. package/dist/src/utils/readStdin.test.js.map +1 -0
  725. package/dist/src/utils/resolvePath.d.ts +1 -1
  726. package/dist/src/utils/resolvePath.js +1 -1
  727. package/dist/src/utils/sandbox.d.ts +3 -3
  728. package/dist/src/utils/sandbox.js +22 -29
  729. package/dist/src/utils/sandbox.js.map +1 -1
  730. package/dist/src/utils/settingsUtils.d.ts +1 -1
  731. package/dist/src/utils/settingsUtils.js +1 -1
  732. package/dist/src/utils/settingsUtils.test.d.ts +1 -1
  733. package/dist/src/utils/settingsUtils.test.js +1 -1
  734. package/dist/src/utils/spawnWrapper.d.ts +1 -1
  735. package/dist/src/utils/spawnWrapper.js +1 -1
  736. package/dist/src/utils/startupWarnings.d.ts +1 -1
  737. package/dist/src/utils/startupWarnings.js +1 -1
  738. package/dist/src/utils/updateEventEmitter.d.ts +1 -1
  739. package/dist/src/utils/updateEventEmitter.js +1 -1
  740. package/dist/src/utils/userStartupWarnings.d.ts +1 -1
  741. package/dist/src/utils/userStartupWarnings.js +1 -1
  742. package/dist/src/utils/userStartupWarnings.test.d.ts +1 -1
  743. package/dist/src/utils/userStartupWarnings.test.js +1 -1
  744. package/dist/src/utils/version.d.ts +1 -1
  745. package/dist/src/utils/version.js +1 -1
  746. package/dist/src/validateNonInterActiveAuth.d.ts +1 -1
  747. package/dist/src/validateNonInterActiveAuth.js +1 -1
  748. package/dist/src/zed-integration/acp.d.ts +1 -1
  749. package/dist/src/zed-integration/acp.js +3 -2
  750. package/dist/src/zed-integration/acp.js.map +1 -1
  751. package/dist/src/zed-integration/fileSystemService.d.ts +1 -1
  752. package/dist/src/zed-integration/fileSystemService.js +1 -1
  753. package/dist/src/zed-integration/schema.d.ts +79 -79
  754. package/dist/src/zed-integration/schema.js +1 -1
  755. package/dist/src/zed-integration/zedIntegration.d.ts +1 -1
  756. package/dist/src/zed-integration/zedIntegration.js +5 -13
  757. package/dist/src/zed-integration/zedIntegration.js.map +1 -1
  758. package/dist/tsconfig.tsbuildinfo +1 -1
  759. package/package.json +3 -5
@@ -1,10 +1,10 @@
1
1
  /**
2
2
  * @license
3
- * Copyright 2025 Google LLC
3
+ * Copyright 2025 Vybestack LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
6
  import { useState, useRef, useCallback, useEffect, useMemo } from 'react';
7
- import { GeminiEventType as ServerGeminiEventType, getErrorMessage, isNodeError, MessageSenderType, GitService, UnauthorizedError, DEFAULT_GEMINI_FLASH_MODEL, AuthType, parseAndFormatApiError, EmojiFilter, DebugLogger, } from '@vybestack/llxprt-code-core';
7
+ import { GeminiEventType as ServerGeminiEventType, getErrorMessage, isNodeError, MessageSenderType, logUserPrompt, GitService, UnauthorizedError, UserPromptEvent, DEFAULT_GEMINI_FLASH_MODEL, parseAndFormatApiError, } from '@vybestack/llxprt-code-core';
8
8
  import { FinishReason } from '@google/genai';
9
9
  import { StreamingState, MessageType, ToolCallStatus, } from '../types.js';
10
10
  import { isAtCommand } from '../utils/commandUtils.js';
@@ -17,7 +17,6 @@ import { promises as fs } from 'fs';
17
17
  import path from 'path';
18
18
  import { useReactToolScheduler, mapToDisplay as mapTrackedToolCallsToDisplay, } from './useReactToolScheduler.js';
19
19
  import { useSessionStats } from '../contexts/SessionContext.js';
20
- import { useTodoContinuation } from './useTodoContinuation.js';
21
20
  import { useKeypress } from './useKeypress.js';
22
21
  export function mergePartListUnions(list) {
23
22
  const resultParts = [];
@@ -42,7 +41,6 @@ export function mergePartListUnions(list) {
42
41
  }
43
42
  return resultParts;
44
43
  }
45
- const debugLogger = new DebugLogger('llxprt:cli:gemini-stream');
46
44
  var StreamProcessingStatus;
47
45
  (function (StreamProcessingStatus) {
48
46
  StreamProcessingStatus[StreamProcessingStatus["Completed"] = 0] = "Completed";
@@ -53,34 +51,23 @@ var StreamProcessingStatus;
53
51
  * Manages the Gemini stream, including user input, command processing,
54
52
  * API interaction, and tool call lifecycle.
55
53
  */
56
- export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, config, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit, _onOAuthCodeNeeded) => {
54
+ export const useGeminiStream = (geminiClient, history, addItem, config, onDebugMessage, handleSlashCommand, shellModeActive, getPreferredEditor, onAuthError, performMemoryRefresh, modelSwitchedFromQuotaError, setModelSwitchedFromQuotaError, onEditorClose, onCancelSubmit) => {
57
55
  const [initError, setInitError] = useState(null);
58
56
  const abortControllerRef = useRef(null);
59
57
  const turnCancelledRef = useRef(false);
60
58
  const [isResponding, setIsResponding] = useState(false);
61
59
  const [thought, setThought] = useState(null);
62
- const queuedToolResponsesRef = useRef([]);
63
- const queuedSystemFeedbackRef = useRef([]);
64
- const handleCompletedToolsRef = useRef(null);
65
60
  const [pendingHistoryItemRef, setPendingHistoryItem] = useStateAndRef(null);
66
61
  const processedMemoryToolsRef = useRef(new Set());
67
- // FIX: Use ref to access latest history without causing re-renders
68
- // This prevents infinite loops in the useEffect that saves checkpoints
69
- const historyRef = useRef(history);
70
- // Keep historyRef updated with latest history value
71
- useEffect(() => {
72
- historyRef.current = history;
73
- }, [history]);
74
62
  const { startNewPrompt, getPromptCount } = useSessionStats();
75
- const logger = useLogger();
76
- // Todo continuation hook integration - stub implementation
77
- const { handleStreamCompleted: _handleStreamCompleted } = useTodoContinuation(geminiClient, config, isResponding, onDebugMessage);
63
+ const storage = config.storage;
64
+ const logger = useLogger(storage);
78
65
  const gitService = useMemo(() => {
79
66
  if (!config.getProjectRoot()) {
80
67
  return;
81
68
  }
82
- return new GitService(config.getProjectRoot());
83
- }, [config]);
69
+ return new GitService(config.getProjectRoot(), storage);
70
+ }, [config, storage]);
84
71
  const [toolCalls, scheduleToolCalls, markToolsAsSubmitted] = useReactToolScheduler(async (completedToolCallsFromScheduler) => {
85
72
  // This onComplete is called when ALL scheduled tools for a given batch are done.
86
73
  if (completedToolCallsFromScheduler.length > 0) {
@@ -124,33 +111,8 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
124
111
  }
125
112
  turnCancelledRef.current = true;
126
113
  abortControllerRef.current?.abort();
127
- setThought(null); // Reset thought when user cancels
128
- // Don't add incomplete/partial assistant messages to history
129
- // These can corrupt the context and cause 400 errors
130
114
  if (pendingHistoryItemRef.current) {
131
- // Only add if there's actual content worth preserving
132
- const pendingItem = pendingHistoryItemRef.current;
133
- if (pendingItem.type === 'gemini' ||
134
- pendingItem.type === 'gemini_content') {
135
- // Check if the message has meaningful content
136
- if (pendingItem.text && pendingItem.text.trim().length > 0) {
137
- // Add the partial response without cancellation marker to preserve clean content
138
- addItem({
139
- ...pendingItem,
140
- }, Date.now());
141
- }
142
- // Otherwise, don't add empty/incomplete messages that could corrupt context
143
- }
144
- else if (pendingItem.type === 'tool_group') {
145
- // Don't add incomplete tool groups - these can corrupt context
146
- // Tool groups are only valid if they have completed tool calls
147
- debugLogger.debug(() => 'Skipping incomplete tool_group on cancel');
148
- // Don't add incomplete tool groups to history
149
- }
150
- else {
151
- // For other types that are complete (info, error, etc), add as-is
152
- addItem(pendingHistoryItemRef.current, Date.now());
153
- }
115
+ addItem(pendingHistoryItemRef.current, Date.now());
154
116
  }
155
117
  addItem({
156
118
  type: MessageType.INFO,
@@ -169,9 +131,6 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
169
131
  useKeypress((key) => {
170
132
  if (key.name === 'escape') {
171
133
  cancelOngoingRequest();
172
- // Clear the queues on cancel - we don't want to process tools or feedback after user cancellation
173
- queuedToolResponsesRef.current = [];
174
- queuedSystemFeedbackRef.current = [];
175
134
  }
176
135
  }, { isActive: streamingState === StreamingState.Responding });
177
136
  const prepareQueryForGemini = useCallback(async (query, userMessageTimestamp, abortSignal, prompt_id) => {
@@ -181,40 +140,10 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
181
140
  if (typeof query === 'string' && query.trim().length === 0) {
182
141
  return { queryToSend: null, shouldProceed: false };
183
142
  }
184
- // Lazily refresh auth if needed.
185
- if (!geminiClient.isInitialized()) {
186
- onDebugMessage('[Auth] GeminiClient not initialized, checking auth...');
187
- // First check if we already have a content generator config
188
- // This would be the case if refreshAuth was already called (e.g., from /key command)
189
- let authType = config.getContentGeneratorConfig()?.authType;
190
- onDebugMessage(`[Auth] Current authType from config: ${authType}`);
191
- // If authType is not set, determine it from environment variables
192
- if (!authType) {
193
- if (process.env.GOOGLE_APPLICATION_CREDENTIALS) {
194
- authType = AuthType.USE_VERTEX_AI;
195
- }
196
- else if (process.env.GEMINI_API_KEY) {
197
- authType = AuthType.USE_GEMINI;
198
- }
199
- else {
200
- authType = AuthType.LOGIN_WITH_GOOGLE; // Default to OAuth (interactive)
201
- }
202
- onDebugMessage(`[Auth] Determined authType from environment: ${authType}`);
203
- }
204
- // Only refresh auth if we don't have a valid content generator config
205
- // or if the auth type differs from what's configured
206
- const currentAuthType = config.getContentGeneratorConfig()?.authType;
207
- if (!currentAuthType || currentAuthType !== authType) {
208
- onDebugMessage(`[Auth] Refreshing auth with type: ${authType}`);
209
- await config.refreshAuth(authType);
210
- }
211
- else {
212
- onDebugMessage(`[Auth] Auth type unchanged, skipping refresh`);
213
- }
214
- }
215
143
  let localQueryToSendToGemini = null;
216
144
  if (typeof query === 'string') {
217
145
  const trimmedQuery = query.trim();
146
+ logUserPrompt(config, new UserPromptEvent(trimmedQuery.length, prompt_id, config.getContentGeneratorConfig()?.authType, trimmedQuery));
218
147
  onDebugMessage(`User query: '${trimmedQuery}'`);
219
148
  await logger?.logMessage(MessageSenderType.USER, trimmedQuery);
220
149
  // Handle UI-only commands first
@@ -293,18 +222,14 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
293
222
  logger,
294
223
  shellModeActive,
295
224
  scheduleToolCalls,
296
- geminiClient,
297
225
  ]);
298
226
  // --- Stream Event Handlers ---
299
227
  const handleContentEvent = useCallback((eventValue, currentGeminiMessageBuffer, userMessageTimestamp) => {
300
228
  if (turnCancelledRef.current) {
301
229
  // Prevents additional output after a user initiated cancel.
302
- // Return the current buffer unchanged to preserve existing content
303
- return currentGeminiMessageBuffer;
230
+ return '';
304
231
  }
305
232
  let newGeminiMessageBuffer = currentGeminiMessageBuffer + eventValue;
306
- // Debug logging for repetition issue
307
- debugLogger.debug(() => `Content event: eventValue=${eventValue.substring(0, 100)}, currentBuffer=${currentGeminiMessageBuffer.substring(0, 100)}, newBuffer=${newGeminiMessageBuffer.substring(0, 100)}, pendingType=${pendingHistoryItemRef.current?.type}`);
308
233
  if (pendingHistoryItemRef.current?.type !== 'gemini' &&
309
234
  pendingHistoryItemRef.current?.type !== 'gemini_content') {
310
235
  if (pendingHistoryItemRef.current) {
@@ -347,20 +272,13 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
347
272
  if (turnCancelledRef.current) {
348
273
  return;
349
274
  }
350
- // Track cancelled tool IDs for synthetic response generation
351
- const cancelledToolIds = [];
352
275
  if (pendingHistoryItemRef.current) {
353
276
  if (pendingHistoryItemRef.current.type === 'tool_group') {
354
- const updatedTools = pendingHistoryItemRef.current.tools.map((tool) => {
355
- if (tool.status === ToolCallStatus.Pending ||
356
- tool.status === ToolCallStatus.Confirming ||
357
- tool.status === ToolCallStatus.Executing) {
358
- // Track the cancelled tool ID
359
- cancelledToolIds.push(tool.callId);
360
- return { ...tool, status: ToolCallStatus.Canceled };
361
- }
362
- return tool;
363
- });
277
+ const updatedTools = pendingHistoryItemRef.current.tools.map((tool) => tool.status === ToolCallStatus.Pending ||
278
+ tool.status === ToolCallStatus.Confirming ||
279
+ tool.status === ToolCallStatus.Executing
280
+ ? { ...tool, status: ToolCallStatus.Canceled }
281
+ : tool);
364
282
  const pendingItem = {
365
283
  ...pendingHistoryItemRef.current,
366
284
  tools: updatedTools,
@@ -372,14 +290,7 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
372
290
  }
373
291
  setPendingHistoryItem(null);
374
292
  }
375
- // Log cancelled tool IDs for debugging
376
- if (cancelledToolIds.length > 0) {
377
- debugLogger.debug(() => `[ESC] Cancelled tool IDs: ${JSON.stringify(cancelledToolIds)}`);
378
- }
379
- addItem({
380
- type: MessageType.INFO,
381
- text: `User cancelled the request${cancelledToolIds.length > 0 ? ` (${cancelledToolIds.length} tool${cancelledToolIds.length > 1 ? 's' : ''} cancelled)` : ''}.`,
382
- }, userMessageTimestamp);
293
+ addItem({ type: MessageType.INFO, text: 'User cancelled the request.' }, userMessageTimestamp);
383
294
  setIsResponding(false);
384
295
  setThought(null); // Reset thought when user cancels
385
296
  }, [addItem, pendingHistoryItemRef, setPendingHistoryItem, setThought]);
@@ -388,30 +299,12 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
388
299
  addItem(pendingHistoryItemRef.current, userMessageTimestamp);
389
300
  setPendingHistoryItem(null);
390
301
  }
391
- setThought(null); // Reset thought when there is an error
392
- const errorText = parseAndFormatApiError(eventValue.error, config.getContentGeneratorConfig()?.authType, undefined, config.getModel(), DEFAULT_GEMINI_FLASH_MODEL);
393
- // Check if this is an authentication error that should trigger onAuthError
394
- // Match various authentication error patterns from different providers
395
- // But DON'T trigger if we're in the middle of OAuth flow
396
- if ((errorText.includes('Failed to resolve authentication') ||
397
- errorText.includes('Authentication required')) &&
398
- !global.__oauth_needs_code) {
399
- // Call the onAuthError callback which will be handled by App.tsx
400
- onAuthError();
401
- }
402
302
  addItem({
403
303
  type: MessageType.ERROR,
404
- text: errorText,
304
+ text: parseAndFormatApiError(eventValue.error, config.getContentGeneratorConfig()?.authType, undefined, config.getModel(), DEFAULT_GEMINI_FLASH_MODEL),
405
305
  }, userMessageTimestamp);
406
306
  setThought(null); // Reset thought when there's an error
407
- }, [
408
- addItem,
409
- pendingHistoryItemRef,
410
- setPendingHistoryItem,
411
- config,
412
- setThought,
413
- onAuthError,
414
- ]);
307
+ }, [addItem, pendingHistoryItemRef, setPendingHistoryItem, config, setThought]);
415
308
  const handleFinishedEvent = useCallback((event, userMessageTimestamp) => {
416
309
  const finishReason = event.value;
417
310
  const finishReasonMessages = {
@@ -458,69 +351,15 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
458
351
  const processGeminiStreamEvents = useCallback(async (stream, userMessageTimestamp, signal) => {
459
352
  let geminiMessageBuffer = '';
460
353
  const toolCallRequests = [];
461
- // Initialize emoji filter for stream processing from settings
462
- const emojiFilterMode = config.getEphemeralSetting('emojifilter') || 'auto';
463
- /**
464
- * @requirement REQ-004.1 - Silent filtering in auto mode
465
- * Use mode from settings or default to auto
466
- */
467
- const filterConfig = { mode: emojiFilterMode };
468
- const emojiFilter = new EmojiFilter(filterConfig);
469
354
  for await (const event of stream) {
470
355
  switch (event.type) {
471
356
  case ServerGeminiEventType.Thought:
472
357
  setThought(event.value);
473
358
  break;
474
- case ServerGeminiEventType.Content: {
475
- // Filter the content chunk through emoji filter
476
- const filterResult = emojiFilter.filterStreamChunk(event.value);
477
- if (filterResult.blocked) {
478
- // In error mode: stop displaying and inject error feedback as tool response
479
- // Clear any partial content that was being built (don't display it)
480
- if (geminiMessageBuffer.trim()) {
481
- geminiMessageBuffer = '';
482
- }
483
- // Show a brief message to user
484
- addItem({
485
- type: 'info',
486
- text: 'Emojis detected - requesting retry without emojis...',
487
- }, userMessageTimestamp);
488
- // Queue the error feedback to be sent with the next tool response
489
- // This ensures the model gets the feedback on the next interaction
490
- if (!queuedSystemFeedbackRef.current) {
491
- queuedSystemFeedbackRef.current = [];
492
- }
493
- queuedSystemFeedbackRef.current.push(`<system-reminder>ERROR: Your response contained emojis which are strictly prohibited. Please regenerate your response without using any emojis.</system-reminder>`);
494
- // Cancel current stream to stop processing
495
- if (abortControllerRef.current) {
496
- abortControllerRef.current.abort();
497
- }
498
- // Stop processing this chunk
499
- break;
500
- }
501
- // Handle the filtered content
502
- const filteredText = typeof filterResult.filtered === 'string'
503
- ? filterResult.filtered
504
- : '';
505
- geminiMessageBuffer = handleContentEvent(filteredText, geminiMessageBuffer, userMessageTimestamp);
506
- // Queue system feedback to be sent to model in next tool response
507
- // This feedback is for the LLM, not for display to the user
508
- if (filterResult.systemFeedback) {
509
- // We'll append this to the next tool response or create a special system message
510
- // Store it in a ref so it persists across renders
511
- if (!queuedSystemFeedbackRef.current) {
512
- queuedSystemFeedbackRef.current = [];
513
- }
514
- queuedSystemFeedbackRef.current.push(`<system-reminder>${filterResult.systemFeedback}</system-reminder>`);
515
- }
516
- // If cancelled after processing this content event, stop further processing
517
- if (turnCancelledRef.current) {
518
- break;
519
- }
359
+ case ServerGeminiEventType.Content:
360
+ geminiMessageBuffer = handleContentEvent(event.value, geminiMessageBuffer, userMessageTimestamp);
520
361
  break;
521
- }
522
362
  case ServerGeminiEventType.ToolCallRequest:
523
- debugLogger.debug(() => `ToolCallRequest event: ${JSON.stringify(event.value, null, 2)}`);
524
363
  toolCallRequests.push(event.value);
525
364
  break;
526
365
  case ServerGeminiEventType.UserCancelled:
@@ -534,7 +373,6 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
534
373
  break;
535
374
  case ServerGeminiEventType.ToolCallConfirmation:
536
375
  case ServerGeminiEventType.ToolCallResponse:
537
- case ServerGeminiEventType.UsageMetadata:
538
376
  // do nothing
539
377
  break;
540
378
  case ServerGeminiEventType.MaxSessionTurns:
@@ -548,6 +386,9 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
548
386
  // before we add loop detected message to history
549
387
  loopDetectedRef.current = true;
550
388
  break;
389
+ case ServerGeminiEventType.UsageMetadata:
390
+ // Handle usage metadata - for now just ignore
391
+ break;
551
392
  default: {
552
393
  // enforces exhaustive switch-case
553
394
  const unreachable = event;
@@ -555,19 +396,10 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
555
396
  }
556
397
  }
557
398
  }
558
- // Flush any remaining content from emoji filter buffer
559
- const remainingContent = emojiFilter.flushBuffer();
560
- if (remainingContent.length > 0) {
561
- geminiMessageBuffer = handleContentEvent(remainingContent, geminiMessageBuffer, userMessageTimestamp);
562
- }
563
399
  if (toolCallRequests.length > 0) {
564
- debugLogger.debug(() => `Scheduling tool calls: ${JSON.stringify(toolCallRequests.map((tc) => ({ name: tc.name, callId: tc.callId })))}`);
565
400
  scheduleToolCalls(toolCallRequests, signal);
566
401
  }
567
- return {
568
- status: StreamProcessingStatus.Completed,
569
- hadToolCalls: toolCallRequests.length > 0,
570
- };
402
+ return StreamProcessingStatus.Completed;
571
403
  }, [
572
404
  handleContentEvent,
573
405
  handleUserCancelledEvent,
@@ -576,8 +408,6 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
576
408
  handleChatCompressionEvent,
577
409
  handleFinishedEvent,
578
410
  handleMaxSessionTurnsEvent,
579
- config,
580
- addItem,
581
411
  ]);
582
412
  const submitQuery = useCallback(async (query, options, prompt_id) => {
583
413
  if ((streamingState === StreamingState.Responding ||
@@ -585,7 +415,6 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
585
415
  !options?.isContinuation)
586
416
  return;
587
417
  const userMessageTimestamp = Date.now();
588
- setShowHelp(false);
589
418
  // Reset quota error flag when starting a new query (not a continuation)
590
419
  if (!options?.isContinuation) {
591
420
  setModelSwitchedFromQuotaError(false);
@@ -608,10 +437,9 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
608
437
  setIsResponding(true);
609
438
  setInitError(null);
610
439
  try {
611
- onDebugMessage(`[Submit] Sending message to Gemini: ${typeof queryToSend === 'string' ? queryToSend : 'non-string content'}`);
612
440
  const stream = geminiClient.sendMessageStream(queryToSend, abortSignal, prompt_id);
613
- const processingResult = await processGeminiStreamEvents(stream, userMessageTimestamp, abortSignal);
614
- if (processingResult.status === StreamProcessingStatus.UserCancelled) {
441
+ const processingStatus = await processGeminiStreamEvents(stream, userMessageTimestamp, abortSignal);
442
+ if (processingStatus === StreamProcessingStatus.UserCancelled) {
615
443
  return;
616
444
  }
617
445
  if (pendingHistoryItemRef.current) {
@@ -622,10 +450,6 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
622
450
  loopDetectedRef.current = false;
623
451
  handleLoopDetectedEvent();
624
452
  }
625
- // TODO: Continuation hook integration point - stub implementation
626
- // This triggers todo continuation logic when stream completes
627
- // without tool calls but with active todos
628
- _handleStreamCompleted(processingResult.hadToolCalls);
629
453
  }
630
454
  catch (error) {
631
455
  if (error instanceof UnauthorizedError) {
@@ -640,20 +464,9 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
640
464
  }
641
465
  finally {
642
466
  setIsResponding(false);
643
- // Process any queued tool responses after the response completes
644
- if (queuedToolResponsesRef.current.length > 0) {
645
- const queuedTools = [...queuedToolResponsesRef.current];
646
- queuedToolResponsesRef.current = [];
647
- debugLogger.debug(() => `Processing queued tool responses: ${JSON.stringify(queuedTools.map((tc) => tc.request.name))}`);
648
- // Process the queued tools now that we're not responding
649
- if (handleCompletedToolsRef.current) {
650
- await handleCompletedToolsRef.current(queuedTools);
651
- }
652
- }
653
467
  }
654
468
  }, [
655
469
  streamingState,
656
- setShowHelp,
657
470
  setModelSwitchedFromQuotaError,
658
471
  prepareQueryForGemini,
659
472
  processGeminiStreamEvents,
@@ -667,17 +480,9 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
667
480
  startNewPrompt,
668
481
  getPromptCount,
669
482
  handleLoopDetectedEvent,
670
- onDebugMessage,
671
- _handleStreamCompleted,
672
483
  ]);
673
484
  const handleCompletedTools = useCallback(async (completedToolCallsFromScheduler) => {
674
485
  if (isResponding) {
675
- // Queue the tools to be processed after the current response completes
676
- queuedToolResponsesRef.current = [
677
- ...queuedToolResponsesRef.current,
678
- ...completedToolCallsFromScheduler,
679
- ];
680
- debugLogger.debug(() => `Queuing tool responses while model is responding: ${JSON.stringify(completedToolCallsFromScheduler.map((tc) => tc.request.name))}`);
681
486
  return;
682
487
  }
683
488
  const completedAndReadyToSubmitTools = completedToolCallsFromScheduler.filter((tc) => {
@@ -709,120 +514,33 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
709
514
  if (geminiTools.length === 0) {
710
515
  return;
711
516
  }
712
- // Group tools by prompt_id to ensure we send all tools from the same turn together
713
- const toolsByPromptId = new Map();
714
- geminiTools.forEach((tool) => {
715
- const promptId = tool.request.prompt_id;
716
- if (!toolsByPromptId.has(promptId)) {
717
- toolsByPromptId.set(promptId, []);
718
- }
719
- toolsByPromptId.get(promptId).push(tool);
720
- });
721
- // Process each prompt_id group
722
- for (const [promptId, toolsInPrompt] of toolsByPromptId) {
723
- // Check if we're still waiting for other tools with the same prompt_id
724
- // Include both global toolCalls and the current batch to ensure we have all tools
725
- const allToolCallsGlobal = toolCalls.filter((tc) => !tc.request.isClientInitiated && tc.request.prompt_id === promptId);
726
- // Also check if there are other tools in the current batch that we haven't processed yet
727
- const allToolsInBatch = geminiTools.filter((tc) => tc.request.prompt_id === promptId);
728
- const pendingTools = allToolCallsGlobal.filter((tc) => tc.status !== 'success' &&
729
- tc.status !== 'error' &&
730
- tc.status !== 'cancelled');
731
- if (pendingTools.length > 0) {
732
- // Still waiting for other tools in this turn, skip for now
733
- debugLogger.debug(() => `Waiting for ${pendingTools.length} more tools to complete for prompt ${promptId}: ${JSON.stringify(pendingTools.map((t) => t.request.name))}`);
734
- continue;
735
- }
736
- // If all tools for this prompt_id in the current batch are complete, use them all
737
- // This ensures that if multiple tools complete together, they're processed together
738
- const toolsToProcess = allToolsInBatch.length > 0 ? allToolsInBatch : toolsInPrompt;
739
- // All tools for this prompt_id are complete, process them
740
- debugLogger.debug(() => `All tools complete for prompt ${promptId}, sending ${toolsToProcess.length} responses`);
741
- // If all the tools were cancelled, don't submit a response to Gemini.
742
- const allToolsCancelled = toolsToProcess.every((tc) => tc.status === 'cancelled');
743
- if (allToolsCancelled) {
744
- if (geminiClient) {
745
- // We need to manually add the function responses to the history
746
- // so the model knows the tools were cancelled.
747
- const responsesToAdd = toolsToProcess.flatMap((toolCall) => toolCall.response.responseParts);
748
- const combinedParts = [];
749
- for (const response of responsesToAdd) {
750
- if (Array.isArray(response)) {
751
- combinedParts.push(...response);
752
- }
753
- else if (typeof response === 'string') {
754
- combinedParts.push({ text: response });
755
- }
756
- else {
757
- combinedParts.push(response);
758
- }
759
- }
760
- geminiClient.addHistory({
761
- role: 'user',
762
- parts: combinedParts,
763
- });
764
- }
765
- const callIdsToMarkAsSubmitted = toolsToProcess.map((toolCall) => toolCall.request.callId);
766
- markToolsAsSubmitted(callIdsToMarkAsSubmitted);
767
- continue;
768
- }
769
- const responsesToSend = toolsToProcess
770
- .map((toolCall, index) => {
771
- // responseParts is now an array with [functionCall, functionResponse]
772
- // We need to send BOTH to the model (they're not in history yet)
773
- const parts = Array.isArray(toolCall.response.responseParts)
774
- ? toolCall.response.responseParts
775
- : [toolCall.response.responseParts];
776
- debugLogger.debug(() => `Tool response for ${toolCall.request.name} (${toolCall.request.callId}): ${JSON.stringify(parts, null, 2)}`);
777
- // For the last tool response, append any queued system feedback
778
- // This ensures the model receives the emoji filter warnings
779
- if (index === toolsToProcess.length - 1 &&
780
- queuedSystemFeedbackRef.current.length > 0) {
781
- const feedbackMessages = queuedSystemFeedbackRef.current.join('\n');
782
- queuedSystemFeedbackRef.current = []; // Clear the queue
783
- // Since we need to return a single Part (functionResponse),
784
- // we can't append text directly. Log a warning instead.
785
- console.warn('[Warning] System feedback queued but cannot be appended to function response:', feedbackMessages);
786
- }
787
- // Return all parts (both tool call and response)
788
- // They'll be added to history together after model responds
789
- return parts;
790
- })
791
- .flat(); // Flatten since we now have arrays of parts
792
- const callIdsToMarkAsSubmitted = toolsToProcess.map((toolCall) => toolCall.request.callId);
793
- // Don't mark as submitted yet - wait until after responses are actually sent
794
- // Don't continue if model was switched due to quota error
795
- if (modelSwitchedFromQuotaError) {
796
- return;
797
- }
798
- // Debug logging BEFORE merging
799
- debugLogger.debug(() => `responsesToSend before merge: ${JSON.stringify(responsesToSend, null, 2)}, length: ${responsesToSend.length}`);
800
- responsesToSend.forEach((resp, idx) => {
801
- debugLogger.debug(() => `responsesToSend[${idx}] type: ${typeof resp}, isArray: ${Array.isArray(resp)}`);
802
- });
803
- // For Gemini, when there are multiple function responses, they should be sent
804
- // as an array of parts in a single message
805
- if (responsesToSend.length === 1) {
806
- // Single response - send as-is
807
- debugLogger.debug(() => 'Single function response, sending directly');
808
- submitQuery(responsesToSend[0], {
809
- isContinuation: true,
810
- }, promptId);
811
- // Mark as submitted after sending
812
- markToolsAsSubmitted(callIdsToMarkAsSubmitted);
813
- }
814
- else {
815
- // Multiple responses - send as array of parts
816
- debugLogger.debug(() => `Multiple function responses (${responsesToSend.length}), sending as array: ${JSON.stringify(responsesToSend, null, 2)}`);
817
- // Send all function responses as an array of parts
818
- // Gemini expects multiple function responses as separate parts in the same message
819
- submitQuery(responsesToSend, {
820
- isContinuation: true,
821
- }, promptId);
822
- // Mark all as submitted after sending
823
- markToolsAsSubmitted(callIdsToMarkAsSubmitted);
517
+ // If all the tools were cancelled, don't submit a response to Gemini.
518
+ const allToolsCancelled = geminiTools.every((tc) => tc.status === 'cancelled');
519
+ if (allToolsCancelled) {
520
+ if (geminiClient) {
521
+ // We need to manually add the function responses to the history
522
+ // so the model knows the tools were cancelled.
523
+ const combinedParts = geminiTools.flatMap((toolCall) => toolCall.response.responseParts);
524
+ geminiClient.addHistory({
525
+ role: 'user',
526
+ parts: combinedParts,
527
+ });
824
528
  }
825
- } // End of prompt_id loop
529
+ const callIdsToMarkAsSubmitted = geminiTools.map((toolCall) => toolCall.request.callId);
530
+ markToolsAsSubmitted(callIdsToMarkAsSubmitted);
531
+ return;
532
+ }
533
+ const responsesToSend = geminiTools.flatMap((toolCall) => toolCall.response.responseParts);
534
+ const callIdsToMarkAsSubmitted = geminiTools.map((toolCall) => toolCall.request.callId);
535
+ const prompt_ids = geminiTools.map((toolCall) => toolCall.request.prompt_id);
536
+ markToolsAsSubmitted(callIdsToMarkAsSubmitted);
537
+ // Don't continue if model was switched due to quota error
538
+ if (modelSwitchedFromQuotaError) {
539
+ return;
540
+ }
541
+ submitQuery(responsesToSend, {
542
+ isContinuation: true,
543
+ }, prompt_ids[0]);
826
544
  }, [
827
545
  isResponding,
828
546
  submitQuery,
@@ -830,10 +548,7 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
830
548
  geminiClient,
831
549
  performMemoryRefresh,
832
550
  modelSwitchedFromQuotaError,
833
- toolCalls,
834
551
  ]);
835
- // Assign the function to the ref so submitQuery can access it
836
- handleCompletedToolsRef.current = handleCompletedTools;
837
552
  const pendingHistoryItems = [
838
553
  pendingHistoryItemRef.current,
839
554
  pendingToolCallGroupDisplay,
@@ -847,9 +562,7 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
847
562
  toolCall.request.name === 'write_file') &&
848
563
  toolCall.status === 'awaiting_approval');
849
564
  if (restorableToolCalls.length > 0) {
850
- const checkpointDir = config.getProjectTempDir()
851
- ? path.join(config.getProjectTempDir(), 'checkpoints')
852
- : undefined;
565
+ const checkpointDir = storage.getProjectTempCheckpointsDir();
853
566
  if (!checkpointDir) {
854
567
  return;
855
568
  }
@@ -869,12 +582,22 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
869
582
  continue;
870
583
  }
871
584
  try {
872
- let commitHash = await gitService?.createFileSnapshot(`Snapshot for ${toolCall.request.name}`);
585
+ if (!gitService) {
586
+ onDebugMessage(`Checkpointing is enabled but Git service is not available. Failed to create snapshot for ${filePath}. Ensure Git is installed and working properly.`);
587
+ continue;
588
+ }
589
+ let commitHash;
590
+ try {
591
+ commitHash = await gitService.createFileSnapshot(`Snapshot for ${toolCall.request.name}`);
592
+ }
593
+ catch (error) {
594
+ onDebugMessage(`Failed to create new snapshot: ${getErrorMessage(error)}. Attempting to use current commit.`);
595
+ }
873
596
  if (!commitHash) {
874
- commitHash = await gitService?.getCurrentCommitHash();
597
+ commitHash = await gitService.getCurrentCommitHash();
875
598
  }
876
599
  if (!commitHash) {
877
- onDebugMessage(`Failed to create snapshot for ${filePath}. Skipping restorable tool call.`);
600
+ onDebugMessage(`Failed to create snapshot for ${filePath}. Checkpointing may not be working properly. Ensure Git is installed and the project directory is accessible.`);
878
601
  continue;
879
602
  }
880
603
  const timestamp = new Date()
@@ -887,7 +610,7 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
887
610
  const clientHistory = await geminiClient?.getHistory();
888
611
  const toolCallWithSnapshotFilePath = path.join(checkpointDir, toolCallWithSnapshotFileName);
889
612
  await fs.writeFile(toolCallWithSnapshotFilePath, JSON.stringify({
890
- history: historyRef.current,
613
+ history,
891
614
  clientHistory,
892
615
  toolCall: {
893
616
  name: toolCall.request.name,
@@ -898,15 +621,21 @@ export const useGeminiStream = (geminiClient, history, addItem, setShowHelp, con
898
621
  }, null, 2));
899
622
  }
900
623
  catch (error) {
901
- onDebugMessage(`Failed to write restorable tool call file: ${getErrorMessage(error)}`);
624
+ onDebugMessage(`Failed to create checkpoint for ${filePath}: ${getErrorMessage(error)}. This may indicate a problem with Git or file system permissions.`);
902
625
  }
903
626
  }
904
627
  }
905
628
  };
906
629
  saveRestorableToolCalls();
907
- // FIX: Removed 'history' from dependencies to prevent infinite loops
908
- // We use historyRef.current to access the latest history value
909
- }, [toolCalls, config, onDebugMessage, gitService, geminiClient]);
630
+ }, [
631
+ toolCalls,
632
+ config,
633
+ onDebugMessage,
634
+ gitService,
635
+ history,
636
+ geminiClient,
637
+ storage,
638
+ ]);
910
639
  return {
911
640
  streamingState,
912
641
  submitQuery,