osagent 0.1.41 → 0.1.42

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 (1563) hide show
  1. package/LICENSE +73 -0
  2. package/README.md +310 -0
  3. package/cli.js +387763 -0
  4. package/package.json +23 -84
  5. package/vendor/ripgrep/COPYING +3 -0
  6. package/vendor/ripgrep/arm64-darwin/rg +0 -0
  7. package/vendor/ripgrep/arm64-linux/rg +0 -0
  8. package/vendor/ripgrep/x64-darwin/rg +0 -0
  9. package/vendor/ripgrep/x64-linux/rg +0 -0
  10. package/vendor/ripgrep/x64-win32/rg.exe +0 -0
  11. package/dist/.last_build +0 -0
  12. package/dist/index.d.ts +0 -7
  13. package/dist/index.js +0 -29
  14. package/dist/index.js.map +0 -1
  15. package/dist/package.json +0 -102
  16. package/dist/src/commands/doctor.d.ts +0 -7
  17. package/dist/src/commands/doctor.js +0 -171
  18. package/dist/src/commands/doctor.js.map +0 -1
  19. package/dist/src/commands/extensions/disable.d.ts +0 -13
  20. package/dist/src/commands/extensions/disable.js +0 -56
  21. package/dist/src/commands/extensions/disable.js.map +0 -1
  22. package/dist/src/commands/extensions/enable.d.ts +0 -13
  23. package/dist/src/commands/extensions/enable.js +0 -59
  24. package/dist/src/commands/extensions/enable.js.map +0 -1
  25. package/dist/src/commands/extensions/examples/context/QWEN.md +0 -8
  26. package/dist/src/commands/extensions/examples/context/qwen-extension.json +0 -4
  27. package/dist/src/commands/extensions/examples/custom-commands/commands/fs/grep-code.toml +0 -6
  28. package/dist/src/commands/extensions/examples/custom-commands/qwen-extension.json +0 -4
  29. package/dist/src/commands/extensions/examples/exclude-tools/qwen-extension.json +0 -5
  30. package/dist/src/commands/extensions/examples/mcp-server/example.ts +0 -60
  31. package/dist/src/commands/extensions/examples/mcp-server/package.json +0 -18
  32. package/dist/src/commands/extensions/examples/mcp-server/qwen-extension.json +0 -11
  33. package/dist/src/commands/extensions/examples/mcp-server/tsconfig.json +0 -13
  34. package/dist/src/commands/extensions/install.d.ts +0 -14
  35. package/dist/src/commands/extensions/install.js +0 -78
  36. package/dist/src/commands/extensions/install.js.map +0 -1
  37. package/dist/src/commands/extensions/install.test.d.ts +0 -6
  38. package/dist/src/commands/extensions/install.test.js +0 -102
  39. package/dist/src/commands/extensions/install.test.js.map +0 -1
  40. package/dist/src/commands/extensions/link.d.ts +0 -12
  41. package/dist/src/commands/extensions/link.js +0 -37
  42. package/dist/src/commands/extensions/link.js.map +0 -1
  43. package/dist/src/commands/extensions/list.d.ts +0 -8
  44. package/dist/src/commands/extensions/list.js +0 -32
  45. package/dist/src/commands/extensions/list.js.map +0 -1
  46. package/dist/src/commands/extensions/new.d.ts +0 -7
  47. package/dist/src/commands/extensions/new.js +0 -90
  48. package/dist/src/commands/extensions/new.js.map +0 -1
  49. package/dist/src/commands/extensions/new.test.d.ts +0 -6
  50. package/dist/src/commands/extensions/new.test.js +0 -59
  51. package/dist/src/commands/extensions/new.test.js.map +0 -1
  52. package/dist/src/commands/extensions/uninstall.d.ts +0 -12
  53. package/dist/src/commands/extensions/uninstall.js +0 -38
  54. package/dist/src/commands/extensions/uninstall.js.map +0 -1
  55. package/dist/src/commands/extensions/uninstall.test.d.ts +0 -6
  56. package/dist/src/commands/extensions/uninstall.test.js +0 -18
  57. package/dist/src/commands/extensions/uninstall.test.js.map +0 -1
  58. package/dist/src/commands/extensions/update.d.ts +0 -13
  59. package/dist/src/commands/extensions/update.js +0 -104
  60. package/dist/src/commands/extensions/update.js.map +0 -1
  61. package/dist/src/commands/extensions.d.ts +0 -2
  62. package/dist/src/commands/extensions.js +0 -28
  63. package/dist/src/commands/extensions.js.map +0 -1
  64. package/dist/src/commands/mcp/add.d.ts +0 -7
  65. package/dist/src/commands/mcp/add.js +0 -171
  66. package/dist/src/commands/mcp/add.js.map +0 -1
  67. package/dist/src/commands/mcp/list.d.ts +0 -8
  68. package/dist/src/commands/mcp/list.js +0 -111
  69. package/dist/src/commands/mcp/list.js.map +0 -1
  70. package/dist/src/commands/mcp/remove.d.ts +0 -7
  71. package/dist/src/commands/mcp/remove.js +0 -44
  72. package/dist/src/commands/mcp/remove.js.map +0 -1
  73. package/dist/src/commands/mcp.d.ts +0 -7
  74. package/dist/src/commands/mcp.js +0 -23
  75. package/dist/src/commands/mcp.js.map +0 -1
  76. package/dist/src/config/auth.d.ts +0 -7
  77. package/dist/src/config/auth.js +0 -46
  78. package/dist/src/config/auth.js.map +0 -1
  79. package/dist/src/config/auth.test.d.ts +0 -6
  80. package/dist/src/config/auth.test.js +0 -37
  81. package/dist/src/config/auth.test.js.map +0 -1
  82. package/dist/src/config/config.d.ts +0 -58
  83. package/dist/src/config/config.js +0 -678
  84. package/dist/src/config/config.js.map +0 -1
  85. package/dist/src/config/extension.d.ts +0 -83
  86. package/dist/src/config/extension.js +0 -534
  87. package/dist/src/config/extension.js.map +0 -1
  88. package/dist/src/config/extensions/extensionEnablement.d.ts +0 -47
  89. package/dist/src/config/extensions/extensionEnablement.js +0 -189
  90. package/dist/src/config/extensions/extensionEnablement.js.map +0 -1
  91. package/dist/src/config/extensions/extensionEnablement.test.d.ts +0 -6
  92. package/dist/src/config/extensions/extensionEnablement.test.js +0 -333
  93. package/dist/src/config/extensions/extensionEnablement.test.js.map +0 -1
  94. package/dist/src/config/extensions/github.d.ts +0 -30
  95. package/dist/src/config/extensions/github.js +0 -322
  96. package/dist/src/config/extensions/github.js.map +0 -1
  97. package/dist/src/config/extensions/github.test.d.ts +0 -6
  98. package/dist/src/config/extensions/github.test.js +0 -334
  99. package/dist/src/config/extensions/github.test.js.map +0 -1
  100. package/dist/src/config/extensions/update.d.ts +0 -19
  101. package/dist/src/config/extensions/update.js +0 -113
  102. package/dist/src/config/extensions/update.js.map +0 -1
  103. package/dist/src/config/extensions/update.test.d.ts +0 -6
  104. package/dist/src/config/extensions/update.test.js +0 -342
  105. package/dist/src/config/extensions/update.test.js.map +0 -1
  106. package/dist/src/config/extensions/variableSchema.d.ts +0 -36
  107. package/dist/src/config/extensions/variableSchema.js +0 -22
  108. package/dist/src/config/extensions/variableSchema.js.map +0 -1
  109. package/dist/src/config/extensions/variables.d.ts +0 -17
  110. package/dist/src/config/extensions/variables.js +0 -40
  111. package/dist/src/config/extensions/variables.js.map +0 -1
  112. package/dist/src/config/extensions/variables.test.d.ts +0 -6
  113. package/dist/src/config/extensions/variables.test.js +0 -17
  114. package/dist/src/config/extensions/variables.test.js.map +0 -1
  115. package/dist/src/config/keyBindings.d.ts +0 -70
  116. package/dist/src/config/keyBindings.js +0 -130
  117. package/dist/src/config/keyBindings.js.map +0 -1
  118. package/dist/src/config/keyBindings.test.d.ts +0 -6
  119. package/dist/src/config/keyBindings.test.js +0 -51
  120. package/dist/src/config/keyBindings.test.js.map +0 -1
  121. package/dist/src/config/sandboxConfig.d.ts +0 -13
  122. package/dist/src/config/sandboxConfig.js +0 -73
  123. package/dist/src/config/sandboxConfig.js.map +0 -1
  124. package/dist/src/config/settings.d.ts +0 -72
  125. package/dist/src/config/settings.js +0 -631
  126. package/dist/src/config/settings.js.map +0 -1
  127. package/dist/src/config/settingsSchema.d.ts +0 -1189
  128. package/dist/src/config/settingsSchema.js +0 -1129
  129. package/dist/src/config/settingsSchema.js.map +0 -1
  130. package/dist/src/config/settingsSchema.test.d.ts +0 -6
  131. package/dist/src/config/settingsSchema.test.js +0 -201
  132. package/dist/src/config/settingsSchema.test.js.map +0 -1
  133. package/dist/src/config/trustedFolders.d.ts +0 -56
  134. package/dist/src/config/trustedFolders.js +0 -168
  135. package/dist/src/config/trustedFolders.js.map +0 -1
  136. package/dist/src/config/trustedFolders.test.d.ts +0 -6
  137. package/dist/src/config/trustedFolders.test.js +0 -340
  138. package/dist/src/config/trustedFolders.test.js.map +0 -1
  139. package/dist/src/config/webSearch.d.ts +0 -35
  140. package/dist/src/config/webSearch.js +0 -87
  141. package/dist/src/config/webSearch.js.map +0 -1
  142. package/dist/src/core/auth.d.ts +0 -13
  143. package/dist/src/core/auth.js +0 -34
  144. package/dist/src/core/auth.js.map +0 -1
  145. package/dist/src/core/initializer.d.ts +0 -21
  146. package/dist/src/core/initializer.js +0 -44
  147. package/dist/src/core/initializer.js.map +0 -1
  148. package/dist/src/core/theme.d.ts +0 -12
  149. package/dist/src/core/theme.js +0 -23
  150. package/dist/src/core/theme.js.map +0 -1
  151. package/dist/src/gemini.d.ts +0 -13
  152. package/dist/src/gemini.js +0 -328
  153. package/dist/src/gemini.js.map +0 -1
  154. package/dist/src/gemini.test.d.ts +0 -6
  155. package/dist/src/gemini.test.js +0 -507
  156. package/dist/src/gemini.test.js.map +0 -1
  157. package/dist/src/generated/git-commit.d.ts +0 -7
  158. package/dist/src/generated/git-commit.js +0 -10
  159. package/dist/src/generated/git-commit.js.map +0 -1
  160. package/dist/src/i18n/index.d.ts +0 -18
  161. package/dist/src/i18n/index.js +0 -184
  162. package/dist/src/i18n/index.js.map +0 -1
  163. package/dist/src/nonInteractive/control/ControlContext.d.ts +0 -63
  164. package/dist/src/nonInteractive/control/ControlContext.js +0 -31
  165. package/dist/src/nonInteractive/control/ControlContext.js.map +0 -1
  166. package/dist/src/nonInteractive/control/ControlDispatcher.d.ts +0 -86
  167. package/dist/src/nonInteractive/control/ControlDispatcher.js +0 -238
  168. package/dist/src/nonInteractive/control/ControlDispatcher.js.map +0 -1
  169. package/dist/src/nonInteractive/control/ControlDispatcher.test.d.ts +0 -6
  170. package/dist/src/nonInteractive/control/ControlDispatcher.test.js +0 -549
  171. package/dist/src/nonInteractive/control/ControlDispatcher.test.js.map +0 -1
  172. package/dist/src/nonInteractive/control/ControlService.d.ts +0 -78
  173. package/dist/src/nonInteractive/control/ControlService.js +0 -154
  174. package/dist/src/nonInteractive/control/ControlService.js.map +0 -1
  175. package/dist/src/nonInteractive/control/controllers/baseController.d.ts +0 -50
  176. package/dist/src/nonInteractive/control/controllers/baseController.js +0 -102
  177. package/dist/src/nonInteractive/control/controllers/baseController.js.map +0 -1
  178. package/dist/src/nonInteractive/control/controllers/hookController.d.ts +0 -25
  179. package/dist/src/nonInteractive/control/controllers/hookController.js +0 -42
  180. package/dist/src/nonInteractive/control/controllers/hookController.js.map +0 -1
  181. package/dist/src/nonInteractive/control/controllers/mcpController.d.ts +0 -42
  182. package/dist/src/nonInteractive/control/controllers/mcpController.js +0 -205
  183. package/dist/src/nonInteractive/control/controllers/mcpController.js.map +0 -1
  184. package/dist/src/nonInteractive/control/controllers/permissionController.d.ts +0 -78
  185. package/dist/src/nonInteractive/control/controllers/permissionController.js +0 -358
  186. package/dist/src/nonInteractive/control/controllers/permissionController.js.map +0 -1
  187. package/dist/src/nonInteractive/control/controllers/systemController.d.ts +0 -56
  188. package/dist/src/nonInteractive/control/controllers/systemController.js +0 -166
  189. package/dist/src/nonInteractive/control/controllers/systemController.js.map +0 -1
  190. package/dist/src/nonInteractive/control/types/serviceAPIs.d.ts +0 -120
  191. package/dist/src/nonInteractive/control/types/serviceAPIs.js +0 -7
  192. package/dist/src/nonInteractive/control/types/serviceAPIs.js.map +0 -1
  193. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.d.ts +0 -446
  194. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js +0 -891
  195. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js.map +0 -1
  196. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.d.ts +0 -6
  197. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js +0 -1197
  198. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js.map +0 -1
  199. package/dist/src/nonInteractive/io/JsonOutputAdapter.d.ts +0 -29
  200. package/dist/src/nonInteractive/io/JsonOutputAdapter.js +0 -56
  201. package/dist/src/nonInteractive/io/JsonOutputAdapter.js.map +0 -1
  202. package/dist/src/nonInteractive/io/JsonOutputAdapter.test.d.ts +0 -6
  203. package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js +0 -624
  204. package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js.map +0 -1
  205. package/dist/src/nonInteractive/io/StreamJsonInputReader.d.ts +0 -16
  206. package/dist/src/nonInteractive/io/StreamJsonInputReader.js +0 -54
  207. package/dist/src/nonInteractive/io/StreamJsonInputReader.js.map +0 -1
  208. package/dist/src/nonInteractive/io/StreamJsonInputReader.test.d.ts +0 -6
  209. package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js +0 -178
  210. package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js.map +0 -1
  211. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.d.ts +0 -69
  212. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js +0 -185
  213. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js.map +0 -1
  214. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.d.ts +0 -6
  215. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js +0 -808
  216. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js.map +0 -1
  217. package/dist/src/nonInteractive/session.d.ts +0 -23
  218. package/dist/src/nonInteractive/session.js +0 -549
  219. package/dist/src/nonInteractive/session.js.map +0 -1
  220. package/dist/src/nonInteractive/session.test.d.ts +0 -6
  221. package/dist/src/nonInteractive/session.test.js +0 -407
  222. package/dist/src/nonInteractive/session.test.js.map +0 -1
  223. package/dist/src/nonInteractive/types.d.ts +0 -344
  224. package/dist/src/nonInteractive/types.js +0 -78
  225. package/dist/src/nonInteractive/types.js.map +0 -1
  226. package/dist/src/nonInteractiveCli.d.ts +0 -28
  227. package/dist/src/nonInteractiveCli.js +0 -268
  228. package/dist/src/nonInteractiveCli.js.map +0 -1
  229. package/dist/src/nonInteractiveCliCommands.d.ts +0 -35
  230. package/dist/src/nonInteractiveCliCommands.js +0 -144
  231. package/dist/src/nonInteractiveCliCommands.js.map +0 -1
  232. package/dist/src/patches/is-in-ci.d.ts +0 -7
  233. package/dist/src/patches/is-in-ci.js +0 -15
  234. package/dist/src/patches/is-in-ci.js.map +0 -1
  235. package/dist/src/patches/punycode-shim.d.ts +0 -6
  236. package/dist/src/patches/punycode-shim.js +0 -19
  237. package/dist/src/patches/punycode-shim.js.map +0 -1
  238. package/dist/src/services/BuiltinCommandLoader.d.ts +0 -24
  239. package/dist/src/services/BuiltinCommandLoader.js +0 -120
  240. package/dist/src/services/BuiltinCommandLoader.js.map +0 -1
  241. package/dist/src/services/BuiltinCommandLoader.test.d.ts +0 -6
  242. package/dist/src/services/BuiltinCommandLoader.test.js +0 -167
  243. package/dist/src/services/BuiltinCommandLoader.test.js.map +0 -1
  244. package/dist/src/services/CommandService.d.ts +0 -55
  245. package/dist/src/services/CommandService.js +0 -90
  246. package/dist/src/services/CommandService.js.map +0 -1
  247. package/dist/src/services/CommandService.test.d.ts +0 -6
  248. package/dist/src/services/CommandService.test.js +0 -233
  249. package/dist/src/services/CommandService.test.js.map +0 -1
  250. package/dist/src/services/FileCommandLoader.d.ts +0 -51
  251. package/dist/src/services/FileCommandLoader.js +0 -230
  252. package/dist/src/services/FileCommandLoader.js.map +0 -1
  253. package/dist/src/services/McpPromptLoader.d.ts +0 -35
  254. package/dist/src/services/McpPromptLoader.js +0 -254
  255. package/dist/src/services/McpPromptLoader.js.map +0 -1
  256. package/dist/src/services/McpPromptLoader.test.d.ts +0 -6
  257. package/dist/src/services/McpPromptLoader.test.js +0 -341
  258. package/dist/src/services/McpPromptLoader.test.js.map +0 -1
  259. package/dist/src/services/ProjectAnalyzerService.d.ts +0 -136
  260. package/dist/src/services/ProjectAnalyzerService.js +0 -433
  261. package/dist/src/services/ProjectAnalyzerService.js.map +0 -1
  262. package/dist/src/services/prompt-processors/argumentProcessor.d.ts +0 -16
  263. package/dist/src/services/prompt-processors/argumentProcessor.js +0 -21
  264. package/dist/src/services/prompt-processors/argumentProcessor.js.map +0 -1
  265. package/dist/src/services/prompt-processors/atFileProcessor.d.ts +0 -12
  266. package/dist/src/services/prompt-processors/atFileProcessor.js +0 -62
  267. package/dist/src/services/prompt-processors/atFileProcessor.js.map +0 -1
  268. package/dist/src/services/prompt-processors/atFileProcessor.test.d.ts +0 -6
  269. package/dist/src/services/prompt-processors/atFileProcessor.test.js +0 -174
  270. package/dist/src/services/prompt-processors/atFileProcessor.test.js.map +0 -1
  271. package/dist/src/services/prompt-processors/injectionParser.d.ts +0 -29
  272. package/dist/src/services/prompt-processors/injectionParser.js +0 -60
  273. package/dist/src/services/prompt-processors/injectionParser.js.map +0 -1
  274. package/dist/src/services/prompt-processors/injectionParser.test.d.ts +0 -6
  275. package/dist/src/services/prompt-processors/injectionParser.test.js +0 -189
  276. package/dist/src/services/prompt-processors/injectionParser.test.js.map +0 -1
  277. package/dist/src/services/prompt-processors/shellProcessor.d.ts +0 -27
  278. package/dist/src/services/prompt-processors/shellProcessor.js +0 -128
  279. package/dist/src/services/prompt-processors/shellProcessor.js.map +0 -1
  280. package/dist/src/services/prompt-processors/types.d.ts +0 -45
  281. package/dist/src/services/prompt-processors/types.js +0 -20
  282. package/dist/src/services/prompt-processors/types.js.map +0 -1
  283. package/dist/src/services/types.d.ts +0 -22
  284. package/dist/src/services/types.js +0 -7
  285. package/dist/src/services/types.js.map +0 -1
  286. package/dist/src/test-utils/createExtension.d.ts +0 -15
  287. package/dist/src/test-utils/createExtension.js +0 -25
  288. package/dist/src/test-utils/createExtension.js.map +0 -1
  289. package/dist/src/test-utils/customMatchers.d.ts +0 -14
  290. package/dist/src/test-utils/customMatchers.js +0 -40
  291. package/dist/src/test-utils/customMatchers.js.map +0 -1
  292. package/dist/src/test-utils/mockCommandContext.d.ts +0 -18
  293. package/dist/src/test-utils/mockCommandContext.js +0 -93
  294. package/dist/src/test-utils/mockCommandContext.js.map +0 -1
  295. package/dist/src/test-utils/mockCommandContext.test.d.ts +0 -6
  296. package/dist/src/test-utils/mockCommandContext.test.js +0 -51
  297. package/dist/src/test-utils/mockCommandContext.test.js.map +0 -1
  298. package/dist/src/test-utils/render.d.ts +0 -12
  299. package/dist/src/test-utils/render.js +0 -14
  300. package/dist/src/test-utils/render.js.map +0 -1
  301. package/dist/src/ui/App.d.ts +0 -6
  302. package/dist/src/ui/App.js +0 -37
  303. package/dist/src/ui/App.js.map +0 -1
  304. package/dist/src/ui/AppContainer.d.ts +0 -17
  305. package/dist/src/ui/AppContainer.js +0 -1139
  306. package/dist/src/ui/AppContainer.js.map +0 -1
  307. package/dist/src/ui/AppContainer.test.d.ts +0 -6
  308. package/dist/src/ui/AppContainer.test.js +0 -831
  309. package/dist/src/ui/AppContainer.test.js.map +0 -1
  310. package/dist/src/ui/IdeIntegrationNudge.d.ts +0 -16
  311. package/dist/src/ui/IdeIntegrationNudge.js +0 -50
  312. package/dist/src/ui/IdeIntegrationNudge.js.map +0 -1
  313. package/dist/src/ui/auth/AuthDialog.d.ts +0 -7
  314. package/dist/src/ui/auth/AuthDialog.js +0 -94
  315. package/dist/src/ui/auth/AuthDialog.js.map +0 -1
  316. package/dist/src/ui/auth/AuthDialog.test.d.ts +0 -6
  317. package/dist/src/ui/auth/AuthDialog.test.js +0 -392
  318. package/dist/src/ui/auth/AuthDialog.test.js.map +0 -1
  319. package/dist/src/ui/auth/AuthInProgress.d.ts +0 -11
  320. package/dist/src/ui/auth/AuthInProgress.js +0 -24
  321. package/dist/src/ui/auth/AuthInProgress.js.map +0 -1
  322. package/dist/src/ui/auth/useAuth.d.ts +0 -26
  323. package/dist/src/ui/auth/useAuth.js +0 -212
  324. package/dist/src/ui/auth/useAuth.js.map +0 -1
  325. package/dist/src/ui/colors.d.ts +0 -7
  326. package/dist/src/ui/colors.js +0 -54
  327. package/dist/src/ui/colors.js.map +0 -1
  328. package/dist/src/ui/commands/aboutCommand.d.ts +0 -7
  329. package/dist/src/ui/commands/aboutCommand.js +0 -25
  330. package/dist/src/ui/commands/aboutCommand.js.map +0 -1
  331. package/dist/src/ui/commands/agentsCommand.d.ts +0 -7
  332. package/dist/src/ui/commands/agentsCommand.js +0 -212
  333. package/dist/src/ui/commands/agentsCommand.js.map +0 -1
  334. package/dist/src/ui/commands/approvalModeCommand.d.ts +0 -7
  335. package/dist/src/ui/commands/approvalModeCommand.js +0 -19
  336. package/dist/src/ui/commands/approvalModeCommand.js.map +0 -1
  337. package/dist/src/ui/commands/approvalModeCommand.test.d.ts +0 -6
  338. package/dist/src/ui/commands/approvalModeCommand.test.js +0 -49
  339. package/dist/src/ui/commands/approvalModeCommand.test.js.map +0 -1
  340. package/dist/src/ui/commands/authCommand.d.ts +0 -7
  341. package/dist/src/ui/commands/authCommand.js +0 -19
  342. package/dist/src/ui/commands/authCommand.js.map +0 -1
  343. package/dist/src/ui/commands/bugCommand.d.ts +0 -7
  344. package/dist/src/ui/commands/bugCommand.js +0 -51
  345. package/dist/src/ui/commands/bugCommand.js.map +0 -1
  346. package/dist/src/ui/commands/chatCommand.d.ts +0 -9
  347. package/dist/src/ui/commands/chatCommand.js +0 -351
  348. package/dist/src/ui/commands/chatCommand.js.map +0 -1
  349. package/dist/src/ui/commands/clearCommand.d.ts +0 -7
  350. package/dist/src/ui/commands/clearCommand.js +0 -30
  351. package/dist/src/ui/commands/clearCommand.js.map +0 -1
  352. package/dist/src/ui/commands/compressCommand.d.ts +0 -7
  353. package/dist/src/ui/commands/compressCommand.js +0 -71
  354. package/dist/src/ui/commands/compressCommand.js.map +0 -1
  355. package/dist/src/ui/commands/consultCommand.d.ts +0 -12
  356. package/dist/src/ui/commands/consultCommand.js +0 -193
  357. package/dist/src/ui/commands/consultCommand.js.map +0 -1
  358. package/dist/src/ui/commands/contextCommand.d.ts +0 -7
  359. package/dist/src/ui/commands/contextCommand.js +0 -89
  360. package/dist/src/ui/commands/contextCommand.js.map +0 -1
  361. package/dist/src/ui/commands/continueCommand.d.ts +0 -10
  362. package/dist/src/ui/commands/continueCommand.js +0 -218
  363. package/dist/src/ui/commands/continueCommand.js.map +0 -1
  364. package/dist/src/ui/commands/copyCommand.d.ts +0 -7
  365. package/dist/src/ui/commands/copyCommand.js +0 -62
  366. package/dist/src/ui/commands/copyCommand.js.map +0 -1
  367. package/dist/src/ui/commands/corgiCommand.d.ts +0 -7
  368. package/dist/src/ui/commands/corgiCommand.js +0 -16
  369. package/dist/src/ui/commands/corgiCommand.js.map +0 -1
  370. package/dist/src/ui/commands/dangerouslyCommand.d.ts +0 -15
  371. package/dist/src/ui/commands/dangerouslyCommand.js +0 -100
  372. package/dist/src/ui/commands/dangerouslyCommand.js.map +0 -1
  373. package/dist/src/ui/commands/delegateCommand.d.ts +0 -7
  374. package/dist/src/ui/commands/delegateCommand.js +0 -139
  375. package/dist/src/ui/commands/delegateCommand.js.map +0 -1
  376. package/dist/src/ui/commands/directoryCommand.d.ts +0 -8
  377. package/dist/src/ui/commands/directoryCommand.js +0 -153
  378. package/dist/src/ui/commands/directoryCommand.js.map +0 -1
  379. package/dist/src/ui/commands/docsCommand.d.ts +0 -7
  380. package/dist/src/ui/commands/docsCommand.js +0 -40
  381. package/dist/src/ui/commands/docsCommand.js.map +0 -1
  382. package/dist/src/ui/commands/doctorCommand.d.ts +0 -7
  383. package/dist/src/ui/commands/doctorCommand.js +0 -681
  384. package/dist/src/ui/commands/doctorCommand.js.map +0 -1
  385. package/dist/src/ui/commands/editorCommand.d.ts +0 -7
  386. package/dist/src/ui/commands/editorCommand.js +0 -19
  387. package/dist/src/ui/commands/editorCommand.js.map +0 -1
  388. package/dist/src/ui/commands/extensionsCommand.d.ts +0 -7
  389. package/dist/src/ui/commands/extensionsCommand.js +0 -115
  390. package/dist/src/ui/commands/extensionsCommand.js.map +0 -1
  391. package/dist/src/ui/commands/helpCommand.d.ts +0 -7
  392. package/dist/src/ui/commands/helpCommand.js +0 -24
  393. package/dist/src/ui/commands/helpCommand.js.map +0 -1
  394. package/dist/src/ui/commands/ideCommand.d.ts +0 -7
  395. package/dist/src/ui/commands/ideCommand.js +0 -241
  396. package/dist/src/ui/commands/ideCommand.js.map +0 -1
  397. package/dist/src/ui/commands/initCommand.d.ts +0 -7
  398. package/dist/src/ui/commands/initCommand.js +0 -118
  399. package/dist/src/ui/commands/initCommand.js.map +0 -1
  400. package/dist/src/ui/commands/languageCommand.d.ts +0 -7
  401. package/dist/src/ui/commands/languageCommand.js +0 -386
  402. package/dist/src/ui/commands/languageCommand.js.map +0 -1
  403. package/dist/src/ui/commands/mcpCommand.d.ts +0 -7
  404. package/dist/src/ui/commands/mcpCommand.js +0 -269
  405. package/dist/src/ui/commands/mcpCommand.js.map +0 -1
  406. package/dist/src/ui/commands/memoryCommand.d.ts +0 -7
  407. package/dist/src/ui/commands/memoryCommand.js +0 -254
  408. package/dist/src/ui/commands/memoryCommand.js.map +0 -1
  409. package/dist/src/ui/commands/modelCommand.d.ts +0 -7
  410. package/dist/src/ui/commands/modelCommand.js +0 -58
  411. package/dist/src/ui/commands/modelCommand.js.map +0 -1
  412. package/dist/src/ui/commands/modelCommand.test.d.ts +0 -6
  413. package/dist/src/ui/commands/modelCommand.test.js +0 -137
  414. package/dist/src/ui/commands/modelCommand.test.js.map +0 -1
  415. package/dist/src/ui/commands/openaiProfileCommand.d.ts +0 -7
  416. package/dist/src/ui/commands/openaiProfileCommand.js +0 -135
  417. package/dist/src/ui/commands/openaiProfileCommand.js.map +0 -1
  418. package/dist/src/ui/commands/permissionsCommand.d.ts +0 -7
  419. package/dist/src/ui/commands/permissionsCommand.js +0 -19
  420. package/dist/src/ui/commands/permissionsCommand.js.map +0 -1
  421. package/dist/src/ui/commands/permissionsCommand.test.d.ts +0 -6
  422. package/dist/src/ui/commands/permissionsCommand.test.js +0 -30
  423. package/dist/src/ui/commands/permissionsCommand.test.js.map +0 -1
  424. package/dist/src/ui/commands/providerCommand.d.ts +0 -11
  425. package/dist/src/ui/commands/providerCommand.js +0 -359
  426. package/dist/src/ui/commands/providerCommand.js.map +0 -1
  427. package/dist/src/ui/commands/quitCommand.d.ts +0 -8
  428. package/dist/src/ui/commands/quitCommand.js +0 -64
  429. package/dist/src/ui/commands/quitCommand.js.map +0 -1
  430. package/dist/src/ui/commands/resetCommand.d.ts +0 -11
  431. package/dist/src/ui/commands/resetCommand.js +0 -34
  432. package/dist/src/ui/commands/resetCommand.js.map +0 -1
  433. package/dist/src/ui/commands/restoreCommand.d.ts +0 -8
  434. package/dist/src/ui/commands/restoreCommand.js +0 -124
  435. package/dist/src/ui/commands/restoreCommand.js.map +0 -1
  436. package/dist/src/ui/commands/settingsCommand.d.ts +0 -7
  437. package/dist/src/ui/commands/settingsCommand.js +0 -19
  438. package/dist/src/ui/commands/settingsCommand.js.map +0 -1
  439. package/dist/src/ui/commands/setupGithubCommand.d.ts +0 -9
  440. package/dist/src/ui/commands/setupGithubCommand.js +0 -157
  441. package/dist/src/ui/commands/setupGithubCommand.js.map +0 -1
  442. package/dist/src/ui/commands/setupGithubCommand.test.d.ts +0 -6
  443. package/dist/src/ui/commands/setupGithubCommand.test.js +0 -167
  444. package/dist/src/ui/commands/setupGithubCommand.test.js.map +0 -1
  445. package/dist/src/ui/commands/spCommand.d.ts +0 -7
  446. package/dist/src/ui/commands/spCommand.js +0 -352
  447. package/dist/src/ui/commands/spCommand.js.map +0 -1
  448. package/dist/src/ui/commands/statsCommand.d.ts +0 -7
  449. package/dist/src/ui/commands/statsCommand.js +0 -61
  450. package/dist/src/ui/commands/statsCommand.js.map +0 -1
  451. package/dist/src/ui/commands/summaryCommand.d.ts +0 -7
  452. package/dist/src/ui/commands/summaryCommand.js +0 -156
  453. package/dist/src/ui/commands/summaryCommand.js.map +0 -1
  454. package/dist/src/ui/commands/systemPromptCommand.d.ts +0 -7
  455. package/dist/src/ui/commands/systemPromptCommand.js +0 -322
  456. package/dist/src/ui/commands/systemPromptCommand.js.map +0 -1
  457. package/dist/src/ui/commands/taskmasterCommand.d.ts +0 -10
  458. package/dist/src/ui/commands/taskmasterCommand.js +0 -174
  459. package/dist/src/ui/commands/taskmasterCommand.js.map +0 -1
  460. package/dist/src/ui/commands/terminalSetupCommand.d.ts +0 -13
  461. package/dist/src/ui/commands/terminalSetupCommand.js +0 -47
  462. package/dist/src/ui/commands/terminalSetupCommand.js.map +0 -1
  463. package/dist/src/ui/commands/themeCommand.d.ts +0 -7
  464. package/dist/src/ui/commands/themeCommand.js +0 -19
  465. package/dist/src/ui/commands/themeCommand.js.map +0 -1
  466. package/dist/src/ui/commands/toolsCommand.d.ts +0 -7
  467. package/dist/src/ui/commands/toolsCommand.js +0 -45
  468. package/dist/src/ui/commands/toolsCommand.js.map +0 -1
  469. package/dist/src/ui/commands/types.d.ts +0 -188
  470. package/dist/src/ui/commands/types.js +0 -12
  471. package/dist/src/ui/commands/types.js.map +0 -1
  472. package/dist/src/ui/commands/viewCommand.d.ts +0 -7
  473. package/dist/src/ui/commands/viewCommand.js +0 -160
  474. package/dist/src/ui/commands/viewCommand.js.map +0 -1
  475. package/dist/src/ui/commands/vimCommand.d.ts +0 -7
  476. package/dist/src/ui/commands/vimCommand.js +0 -26
  477. package/dist/src/ui/commands/vimCommand.js.map +0 -1
  478. package/dist/src/ui/components/AboutBox.d.ts +0 -10
  479. package/dist/src/ui/components/AboutBox.js +0 -10
  480. package/dist/src/ui/components/AboutBox.js.map +0 -1
  481. package/dist/src/ui/components/AgentResponseFooter.d.ts +0 -19
  482. package/dist/src/ui/components/AgentResponseFooter.js +0 -43
  483. package/dist/src/ui/components/AgentResponseFooter.js.map +0 -1
  484. package/dist/src/ui/components/AnsiOutput.d.ts +0 -13
  485. package/dist/src/ui/components/AnsiOutput.js +0 -12
  486. package/dist/src/ui/components/AnsiOutput.js.map +0 -1
  487. package/dist/src/ui/components/AnsiOutput.test.d.ts +0 -6
  488. package/dist/src/ui/components/AnsiOutput.test.js +0 -97
  489. package/dist/src/ui/components/AnsiOutput.test.js.map +0 -1
  490. package/dist/src/ui/components/AppHeader.d.ts +0 -10
  491. package/dist/src/ui/components/AppHeader.js +0 -19
  492. package/dist/src/ui/components/AppHeader.js.map +0 -1
  493. package/dist/src/ui/components/ApprovalModeDialog.d.ts +0 -21
  494. package/dist/src/ui/components/ApprovalModeDialog.js +0 -68
  495. package/dist/src/ui/components/ApprovalModeDialog.js.map +0 -1
  496. package/dist/src/ui/components/AsciiArt.d.ts +0 -13
  497. package/dist/src/ui/components/AsciiArt.js +0 -47
  498. package/dist/src/ui/components/AsciiArt.js.map +0 -1
  499. package/dist/src/ui/components/AutoAcceptIndicator.d.ts +0 -12
  500. package/dist/src/ui/components/AutoAcceptIndicator.js +0 -32
  501. package/dist/src/ui/components/AutoAcceptIndicator.js.map +0 -1
  502. package/dist/src/ui/components/Composer.d.ts +0 -6
  503. package/dist/src/ui/components/Composer.js +0 -56
  504. package/dist/src/ui/components/Composer.js.map +0 -1
  505. package/dist/src/ui/components/Composer.test.d.ts +0 -6
  506. package/dist/src/ui/components/Composer.test.js +0 -337
  507. package/dist/src/ui/components/Composer.test.js.map +0 -1
  508. package/dist/src/ui/components/ConfigInitDisplay.d.ts +0 -6
  509. package/dist/src/ui/components/ConfigInitDisplay.js +0 -42
  510. package/dist/src/ui/components/ConfigInitDisplay.js.map +0 -1
  511. package/dist/src/ui/components/ConsentPrompt.d.ts +0 -13
  512. package/dist/src/ui/components/ConsentPrompt.js +0 -19
  513. package/dist/src/ui/components/ConsentPrompt.js.map +0 -1
  514. package/dist/src/ui/components/ConsentPrompt.test.d.ts +0 -6
  515. package/dist/src/ui/components/ConsentPrompt.test.js +0 -67
  516. package/dist/src/ui/components/ConsentPrompt.test.js.map +0 -1
  517. package/dist/src/ui/components/ConsoleSummaryDisplay.d.ts +0 -11
  518. package/dist/src/ui/components/ConsoleSummaryDisplay.js +0 -11
  519. package/dist/src/ui/components/ConsoleSummaryDisplay.js.map +0 -1
  520. package/dist/src/ui/components/ConsultationDisplay.d.ts +0 -22
  521. package/dist/src/ui/components/ConsultationDisplay.js +0 -26
  522. package/dist/src/ui/components/ConsultationDisplay.js.map +0 -1
  523. package/dist/src/ui/components/ConsultationPanel.d.ts +0 -11
  524. package/dist/src/ui/components/ConsultationPanel.js +0 -36
  525. package/dist/src/ui/components/ConsultationPanel.js.map +0 -1
  526. package/dist/src/ui/components/ContextSummaryDisplay.d.ts +0 -20
  527. package/dist/src/ui/components/ContextSummaryDisplay.js +0 -90
  528. package/dist/src/ui/components/ContextSummaryDisplay.js.map +0 -1
  529. package/dist/src/ui/components/ContextUsageDisplay.d.ts +0 -10
  530. package/dist/src/ui/components/ContextUsageDisplay.js +0 -58
  531. package/dist/src/ui/components/ContextUsageDisplay.js.map +0 -1
  532. package/dist/src/ui/components/DebugProfiler.d.ts +0 -6
  533. package/dist/src/ui/components/DebugProfiler.js +0 -27
  534. package/dist/src/ui/components/DebugProfiler.js.map +0 -1
  535. package/dist/src/ui/components/DetailedMessagesDisplay.d.ts +0 -14
  536. package/dist/src/ui/components/DetailedMessagesDisplay.js +0 -34
  537. package/dist/src/ui/components/DetailedMessagesDisplay.js.map +0 -1
  538. package/dist/src/ui/components/DialogManager.d.ts +0 -12
  539. package/dist/src/ui/components/DialogManager.js +0 -192
  540. package/dist/src/ui/components/DialogManager.js.map +0 -1
  541. package/dist/src/ui/components/EditorSettingsDialog.d.ts +0 -16
  542. package/dist/src/ui/components/EditorSettingsDialog.js +0 -85
  543. package/dist/src/ui/components/EditorSettingsDialog.js.map +0 -1
  544. package/dist/src/ui/components/ExitWarning.d.ts +0 -7
  545. package/dist/src/ui/components/ExitWarning.js +0 -9
  546. package/dist/src/ui/components/ExitWarning.js.map +0 -1
  547. package/dist/src/ui/components/FolderTrustDialog.d.ts +0 -17
  548. package/dist/src/ui/components/FolderTrustDialog.js +0 -58
  549. package/dist/src/ui/components/FolderTrustDialog.js.map +0 -1
  550. package/dist/src/ui/components/FolderTrustDialog.test.d.ts +0 -6
  551. package/dist/src/ui/components/FolderTrustDialog.test.js +0 -88
  552. package/dist/src/ui/components/FolderTrustDialog.test.js.map +0 -1
  553. package/dist/src/ui/components/Footer.d.ts +0 -7
  554. package/dist/src/ui/components/Footer.js +0 -48
  555. package/dist/src/ui/components/Footer.js.map +0 -1
  556. package/dist/src/ui/components/GeminiRespondingSpinner.d.ts +0 -21
  557. package/dist/src/ui/components/GeminiRespondingSpinner.js +0 -23
  558. package/dist/src/ui/components/GeminiRespondingSpinner.js.map +0 -1
  559. package/dist/src/ui/components/Header.d.ts +0 -13
  560. package/dist/src/ui/components/Header.js +0 -28
  561. package/dist/src/ui/components/Header.js.map +0 -1
  562. package/dist/src/ui/components/Header.test.d.ts +0 -6
  563. package/dist/src/ui/components/Header.test.js +0 -37
  564. package/dist/src/ui/components/Header.test.js.map +0 -1
  565. package/dist/src/ui/components/Help.d.ts +0 -12
  566. package/dist/src/ui/components/Help.js +0 -23
  567. package/dist/src/ui/components/Help.js.map +0 -1
  568. package/dist/src/ui/components/Help.test.d.ts +0 -6
  569. package/dist/src/ui/components/Help.test.js +0 -57
  570. package/dist/src/ui/components/Help.test.js.map +0 -1
  571. package/dist/src/ui/components/HistoryItemDisplay.d.ts +0 -21
  572. package/dist/src/ui/components/HistoryItemDisplay.js +0 -31
  573. package/dist/src/ui/components/HistoryItemDisplay.js.map +0 -1
  574. package/dist/src/ui/components/HistoryItemDisplay.test.d.ts +0 -6
  575. package/dist/src/ui/components/HistoryItemDisplay.test.js +0 -183
  576. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +0 -1
  577. package/dist/src/ui/components/IdeTrustChangeDialog.d.ts +0 -11
  578. package/dist/src/ui/components/IdeTrustChangeDialog.js +0 -32
  579. package/dist/src/ui/components/IdeTrustChangeDialog.js.map +0 -1
  580. package/dist/src/ui/components/IdeTrustChangeDialog.test.d.ts +0 -6
  581. package/dist/src/ui/components/IdeTrustChangeDialog.test.js +0 -57
  582. package/dist/src/ui/components/IdeTrustChangeDialog.test.js.map +0 -1
  583. package/dist/src/ui/components/InputPrompt.d.ts +0 -37
  584. package/dist/src/ui/components/InputPrompt.js +0 -583
  585. package/dist/src/ui/components/InputPrompt.js.map +0 -1
  586. package/dist/src/ui/components/LoadingIndicator.d.ts +0 -15
  587. package/dist/src/ui/components/LoadingIndicator.js +0 -39
  588. package/dist/src/ui/components/LoadingIndicator.js.map +0 -1
  589. package/dist/src/ui/components/LoadingIndicator.test.d.ts +0 -6
  590. package/dist/src/ui/components/LoadingIndicator.test.js +0 -194
  591. package/dist/src/ui/components/LoadingIndicator.test.js.map +0 -1
  592. package/dist/src/ui/components/LoopDetectionConfirmation.d.ts +0 -13
  593. package/dist/src/ui/components/LoopDetectionConfirmation.js +0 -37
  594. package/dist/src/ui/components/LoopDetectionConfirmation.js.map +0 -1
  595. package/dist/src/ui/components/LoopDetectionConfirmation.test.d.ts +0 -6
  596. package/dist/src/ui/components/LoopDetectionConfirmation.test.js +0 -28
  597. package/dist/src/ui/components/LoopDetectionConfirmation.test.js.map +0 -1
  598. package/dist/src/ui/components/MainContent.d.ts +0 -6
  599. package/dist/src/ui/components/MainContent.js +0 -28
  600. package/dist/src/ui/components/MainContent.js.map +0 -1
  601. package/dist/src/ui/components/MemoryUsageDisplay.d.ts +0 -7
  602. package/dist/src/ui/components/MemoryUsageDisplay.js +0 -24
  603. package/dist/src/ui/components/MemoryUsageDisplay.js.map +0 -1
  604. package/dist/src/ui/components/ModelDialog.d.ts +0 -11
  605. package/dist/src/ui/components/ModelDialog.js +0 -43
  606. package/dist/src/ui/components/ModelDialog.js.map +0 -1
  607. package/dist/src/ui/components/ModelDialog.test.d.ts +0 -6
  608. package/dist/src/ui/components/ModelDialog.test.js +0 -158
  609. package/dist/src/ui/components/ModelDialog.test.js.map +0 -1
  610. package/dist/src/ui/components/ModelStatsDisplay.d.ts +0 -7
  611. package/dist/src/ui/components/ModelStatsDisplay.js +0 -34
  612. package/dist/src/ui/components/ModelStatsDisplay.js.map +0 -1
  613. package/dist/src/ui/components/ModelSwitchDialog.d.ts +0 -15
  614. package/dist/src/ui/components/ModelSwitchDialog.js +0 -40
  615. package/dist/src/ui/components/ModelSwitchDialog.js.map +0 -1
  616. package/dist/src/ui/components/ModelSwitchDialog.test.d.ts +0 -6
  617. package/dist/src/ui/components/ModelSwitchDialog.test.js +0 -128
  618. package/dist/src/ui/components/ModelSwitchDialog.test.js.map +0 -1
  619. package/dist/src/ui/components/Notifications.d.ts +0 -6
  620. package/dist/src/ui/components/Notifications.js +0 -23
  621. package/dist/src/ui/components/Notifications.js.map +0 -1
  622. package/dist/src/ui/components/OpenAIKeyPrompt.d.ts +0 -32
  623. package/dist/src/ui/components/OpenAIKeyPrompt.js +0 -196
  624. package/dist/src/ui/components/OpenAIKeyPrompt.js.map +0 -1
  625. package/dist/src/ui/components/OpenAIKeyPrompt.test.d.ts +0 -6
  626. package/dist/src/ui/components/OpenAIKeyPrompt.test.js +0 -51
  627. package/dist/src/ui/components/OpenAIKeyPrompt.test.js.map +0 -1
  628. package/dist/src/ui/components/OrchestrationStatusDisplay.d.ts +0 -15
  629. package/dist/src/ui/components/OrchestrationStatusDisplay.js +0 -58
  630. package/dist/src/ui/components/OrchestrationStatusDisplay.js.map +0 -1
  631. package/dist/src/ui/components/PermissionsModifyTrustDialog.d.ts +0 -13
  632. package/dist/src/ui/components/PermissionsModifyTrustDialog.js +0 -48
  633. package/dist/src/ui/components/PermissionsModifyTrustDialog.js.map +0 -1
  634. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.d.ts +0 -6
  635. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js +0 -154
  636. package/dist/src/ui/components/PermissionsModifyTrustDialog.test.js.map +0 -1
  637. package/dist/src/ui/components/PlanSummaryDisplay.d.ts +0 -14
  638. package/dist/src/ui/components/PlanSummaryDisplay.js +0 -9
  639. package/dist/src/ui/components/PlanSummaryDisplay.js.map +0 -1
  640. package/dist/src/ui/components/PrepareLabel.d.ts +0 -15
  641. package/dist/src/ui/components/PrepareLabel.js +0 -72
  642. package/dist/src/ui/components/PrepareLabel.js.map +0 -1
  643. package/dist/src/ui/components/PrepareLabel.test.d.ts +0 -6
  644. package/dist/src/ui/components/PrepareLabel.test.js +0 -71
  645. package/dist/src/ui/components/PrepareLabel.test.js.map +0 -1
  646. package/dist/src/ui/components/ProQuotaDialog.d.ts +0 -13
  647. package/dist/src/ui/components/ProQuotaDialog.js +0 -31
  648. package/dist/src/ui/components/ProQuotaDialog.js.map +0 -1
  649. package/dist/src/ui/components/ProQuotaDialog.test.d.ts +0 -6
  650. package/dist/src/ui/components/ProQuotaDialog.test.js +0 -58
  651. package/dist/src/ui/components/ProQuotaDialog.test.js.map +0 -1
  652. package/dist/src/ui/components/QueueStatusBar.d.ts +0 -17
  653. package/dist/src/ui/components/QueueStatusBar.js +0 -25
  654. package/dist/src/ui/components/QueueStatusBar.js.map +0 -1
  655. package/dist/src/ui/components/QueuedMessageDisplay.d.ts +0 -9
  656. package/dist/src/ui/components/QueuedMessageDisplay.js +0 -20
  657. package/dist/src/ui/components/QueuedMessageDisplay.js.map +0 -1
  658. package/dist/src/ui/components/QueuedMessageDisplay.test.d.ts +0 -6
  659. package/dist/src/ui/components/QueuedMessageDisplay.test.js +0 -56
  660. package/dist/src/ui/components/QueuedMessageDisplay.test.js.map +0 -1
  661. package/dist/src/ui/components/QuitConfirmationDialog.d.ts +0 -17
  662. package/dist/src/ui/components/QuitConfirmationDialog.js +0 -49
  663. package/dist/src/ui/components/QuitConfirmationDialog.js.map +0 -1
  664. package/dist/src/ui/components/QuittingDisplay.d.ts +0 -6
  665. package/dist/src/ui/components/QuittingDisplay.js +0 -20
  666. package/dist/src/ui/components/QuittingDisplay.js.map +0 -1
  667. package/dist/src/ui/components/QwenOAuthProgress.d.ts +0 -16
  668. package/dist/src/ui/components/QwenOAuthProgress.js +0 -111
  669. package/dist/src/ui/components/QwenOAuthProgress.js.map +0 -1
  670. package/dist/src/ui/components/QwenOAuthProgress.test.d.ts +0 -6
  671. package/dist/src/ui/components/QwenOAuthProgress.test.js +0 -364
  672. package/dist/src/ui/components/QwenOAuthProgress.test.js.map +0 -1
  673. package/dist/src/ui/components/SessionSummaryDisplay.d.ts +0 -11
  674. package/dist/src/ui/components/SessionSummaryDisplay.js +0 -5
  675. package/dist/src/ui/components/SessionSummaryDisplay.js.map +0 -1
  676. package/dist/src/ui/components/SettingsDialog.d.ts +0 -18
  677. package/dist/src/ui/components/SettingsDialog.js +0 -647
  678. package/dist/src/ui/components/SettingsDialog.js.map +0 -1
  679. package/dist/src/ui/components/SettingsDialog.test.d.ts +0 -6
  680. package/dist/src/ui/components/SettingsDialog.test.js +0 -1037
  681. package/dist/src/ui/components/SettingsDialog.test.js.map +0 -1
  682. package/dist/src/ui/components/ShellConfirmationDialog.d.ts +0 -15
  683. package/dist/src/ui/components/ShellConfirmationDialog.js +0 -50
  684. package/dist/src/ui/components/ShellConfirmationDialog.js.map +0 -1
  685. package/dist/src/ui/components/ShellConfirmationDialog.test.d.ts +0 -6
  686. package/dist/src/ui/components/ShellConfirmationDialog.test.js +0 -40
  687. package/dist/src/ui/components/ShellConfirmationDialog.test.js.map +0 -1
  688. package/dist/src/ui/components/ShellInputPrompt.d.ts +0 -11
  689. package/dist/src/ui/components/ShellInputPrompt.js +0 -36
  690. package/dist/src/ui/components/ShellInputPrompt.js.map +0 -1
  691. package/dist/src/ui/components/ShellModeIndicator.d.ts +0 -7
  692. package/dist/src/ui/components/ShellModeIndicator.js +0 -5
  693. package/dist/src/ui/components/ShellModeIndicator.js.map +0 -1
  694. package/dist/src/ui/components/ShowMoreLines.d.ts +0 -10
  695. package/dist/src/ui/components/ShowMoreLines.js +0 -24
  696. package/dist/src/ui/components/ShowMoreLines.js.map +0 -1
  697. package/dist/src/ui/components/StatsDisplay.d.ts +0 -12
  698. package/dist/src/ui/components/StatsDisplay.js +0 -44
  699. package/dist/src/ui/components/StatsDisplay.js.map +0 -1
  700. package/dist/src/ui/components/StatusBar.d.ts +0 -14
  701. package/dist/src/ui/components/StatusBar.js +0 -106
  702. package/dist/src/ui/components/StatusBar.js.map +0 -1
  703. package/dist/src/ui/components/SuggestionsDisplay.d.ts +0 -27
  704. package/dist/src/ui/components/SuggestionsDisplay.js +0 -40
  705. package/dist/src/ui/components/SuggestionsDisplay.js.map +0 -1
  706. package/dist/src/ui/components/TaskMasterPanel.d.ts +0 -18
  707. package/dist/src/ui/components/TaskMasterPanel.js +0 -142
  708. package/dist/src/ui/components/TaskMasterPanel.js.map +0 -1
  709. package/dist/src/ui/components/ThemeDialog.d.ts +0 -20
  710. package/dist/src/ui/components/ThemeDialog.js +0 -126
  711. package/dist/src/ui/components/ThemeDialog.js.map +0 -1
  712. package/dist/src/ui/components/ThemeDialog.test.d.ts +0 -6
  713. package/dist/src/ui/components/ThemeDialog.test.js +0 -75
  714. package/dist/src/ui/components/ThemeDialog.test.js.map +0 -1
  715. package/dist/src/ui/components/Tips.d.ts +0 -12
  716. package/dist/src/ui/components/Tips.js +0 -10
  717. package/dist/src/ui/components/Tips.js.map +0 -1
  718. package/dist/src/ui/components/TodoDisplay.d.ts +0 -16
  719. package/dist/src/ui/components/TodoDisplay.js +0 -27
  720. package/dist/src/ui/components/TodoDisplay.js.map +0 -1
  721. package/dist/src/ui/components/TodoDisplay.test.d.ts +0 -6
  722. package/dist/src/ui/components/TodoDisplay.test.js +0 -77
  723. package/dist/src/ui/components/TodoDisplay.test.js.map +0 -1
  724. package/dist/src/ui/components/ToolStatsDisplay.d.ts +0 -7
  725. package/dist/src/ui/components/ToolStatsDisplay.js +0 -42
  726. package/dist/src/ui/components/ToolStatsDisplay.js.map +0 -1
  727. package/dist/src/ui/components/UpdateNotification.d.ts +0 -10
  728. package/dist/src/ui/components/UpdateNotification.js +0 -10
  729. package/dist/src/ui/components/UpdateNotification.js.map +0 -1
  730. package/dist/src/ui/components/WelcomeBackDialog.d.ts +0 -13
  731. package/dist/src/ui/components/WelcomeBackDialog.js +0 -43
  732. package/dist/src/ui/components/WelcomeBackDialog.js.map +0 -1
  733. package/dist/src/ui/components/WorkspaceMigrationDialog.d.ts +0 -11
  734. package/dist/src/ui/components/WorkspaceMigrationDialog.js +0 -45
  735. package/dist/src/ui/components/WorkspaceMigrationDialog.js.map +0 -1
  736. package/dist/src/ui/components/messages/CompressionMessage.d.ts +0 -12
  737. package/dist/src/ui/components/messages/CompressionMessage.js +0 -62
  738. package/dist/src/ui/components/messages/CompressionMessage.js.map +0 -1
  739. package/dist/src/ui/components/messages/CompressionMessage.test.d.ts +0 -6
  740. package/dist/src/ui/components/messages/CompressionMessage.test.js +0 -160
  741. package/dist/src/ui/components/messages/CompressionMessage.test.js.map +0 -1
  742. package/dist/src/ui/components/messages/DiffRenderer.d.ts +0 -17
  743. package/dist/src/ui/components/messages/DiffRenderer.js +0 -218
  744. package/dist/src/ui/components/messages/DiffRenderer.js.map +0 -1
  745. package/dist/src/ui/components/messages/DiffRenderer.test.d.ts +0 -6
  746. package/dist/src/ui/components/messages/DiffRenderer.test.js +0 -239
  747. package/dist/src/ui/components/messages/DiffRenderer.test.js.map +0 -1
  748. package/dist/src/ui/components/messages/ErrorMessage.d.ts +0 -11
  749. package/dist/src/ui/components/messages/ErrorMessage.js +0 -9
  750. package/dist/src/ui/components/messages/ErrorMessage.js.map +0 -1
  751. package/dist/src/ui/components/messages/GeminiMessage.d.ts +0 -14
  752. package/dist/src/ui/components/messages/GeminiMessage.js +0 -11
  753. package/dist/src/ui/components/messages/GeminiMessage.js.map +0 -1
  754. package/dist/src/ui/components/messages/GeminiMessageContent.d.ts +0 -14
  755. package/dist/src/ui/components/messages/GeminiMessageContent.js +0 -15
  756. package/dist/src/ui/components/messages/GeminiMessageContent.js.map +0 -1
  757. package/dist/src/ui/components/messages/InfoMessage.d.ts +0 -11
  758. package/dist/src/ui/components/messages/InfoMessage.js +0 -14
  759. package/dist/src/ui/components/messages/InfoMessage.js.map +0 -1
  760. package/dist/src/ui/components/messages/SummaryMessage.d.ts +0 -11
  761. package/dist/src/ui/components/messages/SummaryMessage.js +0 -35
  762. package/dist/src/ui/components/messages/SummaryMessage.js.map +0 -1
  763. package/dist/src/ui/components/messages/ToolConfirmationMessage.d.ts +0 -16
  764. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +0 -245
  765. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +0 -1
  766. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.d.ts +0 -6
  767. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js +0 -165
  768. package/dist/src/ui/components/messages/ToolConfirmationMessage.test.js.map +0 -1
  769. package/dist/src/ui/components/messages/ToolGroupMessage.d.ts +0 -19
  770. package/dist/src/ui/components/messages/ToolGroupMessage.js +0 -58
  771. package/dist/src/ui/components/messages/ToolGroupMessage.js.map +0 -1
  772. package/dist/src/ui/components/messages/ToolGroupMessage.test.d.ts +0 -6
  773. package/dist/src/ui/components/messages/ToolGroupMessage.test.js +0 -261
  774. package/dist/src/ui/components/messages/ToolGroupMessage.test.js.map +0 -1
  775. package/dist/src/ui/components/messages/ToolMessage.d.ts +0 -19
  776. package/dist/src/ui/components/messages/ToolMessage.js +0 -190
  777. package/dist/src/ui/components/messages/ToolMessage.js.map +0 -1
  778. package/dist/src/ui/components/messages/ToolMessage.test.d.ts +0 -6
  779. package/dist/src/ui/components/messages/ToolMessage.test.js +0 -182
  780. package/dist/src/ui/components/messages/ToolMessage.test.js.map +0 -1
  781. package/dist/src/ui/components/messages/UserMessage.d.ts +0 -11
  782. package/dist/src/ui/components/messages/UserMessage.js +0 -13
  783. package/dist/src/ui/components/messages/UserMessage.js.map +0 -1
  784. package/dist/src/ui/components/messages/UserShellMessage.d.ts +0 -11
  785. package/dist/src/ui/components/messages/UserShellMessage.js +0 -9
  786. package/dist/src/ui/components/messages/UserShellMessage.js.map +0 -1
  787. package/dist/src/ui/components/messages/WarningMessage.d.ts +0 -11
  788. package/dist/src/ui/components/messages/WarningMessage.js +0 -10
  789. package/dist/src/ui/components/messages/WarningMessage.js.map +0 -1
  790. package/dist/src/ui/components/shared/BaseSelectionList.d.ts +0 -38
  791. package/dist/src/ui/components/shared/BaseSelectionList.js +0 -72
  792. package/dist/src/ui/components/shared/BaseSelectionList.js.map +0 -1
  793. package/dist/src/ui/components/shared/BaseSelectionList.test.d.ts +0 -6
  794. package/dist/src/ui/components/shared/BaseSelectionList.test.js +0 -376
  795. package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +0 -1
  796. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.d.ts +0 -35
  797. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js +0 -13
  798. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.js.map +0 -1
  799. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.d.ts +0 -6
  800. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js +0 -79
  801. package/dist/src/ui/components/shared/DescriptiveRadioButtonSelect.test.js.map +0 -1
  802. package/dist/src/ui/components/shared/EnumSelector.d.ts +0 -18
  803. package/dist/src/ui/components/shared/EnumSelector.js +0 -44
  804. package/dist/src/ui/components/shared/EnumSelector.js.map +0 -1
  805. package/dist/src/ui/components/shared/EnumSelector.test.d.ts +0 -6
  806. package/dist/src/ui/components/shared/EnumSelector.test.js +0 -70
  807. package/dist/src/ui/components/shared/EnumSelector.test.js.map +0 -1
  808. package/dist/src/ui/components/shared/MaxSizedBox.d.ts +0 -61
  809. package/dist/src/ui/components/shared/MaxSizedBox.js +0 -451
  810. package/dist/src/ui/components/shared/MaxSizedBox.js.map +0 -1
  811. package/dist/src/ui/components/shared/MaxSizedBox.test.d.ts +0 -6
  812. package/dist/src/ui/components/shared/MaxSizedBox.test.js +0 -154
  813. package/dist/src/ui/components/shared/MaxSizedBox.test.js.map +0 -1
  814. package/dist/src/ui/components/shared/RadioButtonSelect.d.ts +0 -45
  815. package/dist/src/ui/components/shared/RadioButtonSelect.js +0 -21
  816. package/dist/src/ui/components/shared/RadioButtonSelect.js.map +0 -1
  817. package/dist/src/ui/components/shared/RadioButtonSelect.test.d.ts +0 -6
  818. package/dist/src/ui/components/shared/RadioButtonSelect.test.js +0 -134
  819. package/dist/src/ui/components/shared/RadioButtonSelect.test.js.map +0 -1
  820. package/dist/src/ui/components/shared/ScopeSelector.d.ts +0 -19
  821. package/dist/src/ui/components/shared/ScopeSelector.js +0 -16
  822. package/dist/src/ui/components/shared/ScopeSelector.js.map +0 -1
  823. package/dist/src/ui/components/shared/TextInput.d.ts +0 -16
  824. package/dist/src/ui/components/shared/TextInput.js +0 -127
  825. package/dist/src/ui/components/shared/TextInput.js.map +0 -1
  826. package/dist/src/ui/components/shared/text-buffer.d.ts +0 -490
  827. package/dist/src/ui/components/shared/text-buffer.js +0 -1598
  828. package/dist/src/ui/components/shared/text-buffer.js.map +0 -1
  829. package/dist/src/ui/components/shared/vim-buffer-actions.d.ts +0 -72
  830. package/dist/src/ui/components/shared/vim-buffer-actions.js +0 -552
  831. package/dist/src/ui/components/shared/vim-buffer-actions.js.map +0 -1
  832. package/dist/src/ui/components/subagents/constants.d.ts +0 -23
  833. package/dist/src/ui/components/subagents/constants.js +0 -67
  834. package/dist/src/ui/components/subagents/constants.js.map +0 -1
  835. package/dist/src/ui/components/subagents/create/AgentCreationWizard.d.ts +0 -15
  836. package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +0 -186
  837. package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +0 -1
  838. package/dist/src/ui/components/subagents/create/ColorSelector.d.ts +0 -15
  839. package/dist/src/ui/components/subagents/create/ColorSelector.js +0 -43
  840. package/dist/src/ui/components/subagents/create/ColorSelector.js.map +0 -1
  841. package/dist/src/ui/components/subagents/create/CreationSummary.d.ts +0 -10
  842. package/dist/src/ui/components/subagents/create/CreationSummary.js +0 -174
  843. package/dist/src/ui/components/subagents/create/CreationSummary.js.map +0 -1
  844. package/dist/src/ui/components/subagents/create/DescriptionInput.d.ts +0 -10
  845. package/dist/src/ui/components/subagents/create/DescriptionInput.js +0 -107
  846. package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +0 -1
  847. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.d.ts +0 -10
  848. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +0 -39
  849. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +0 -1
  850. package/dist/src/ui/components/subagents/create/LocationSelector.d.ts +0 -10
  851. package/dist/src/ui/components/subagents/create/LocationSelector.js +0 -39
  852. package/dist/src/ui/components/subagents/create/LocationSelector.js.map +0 -1
  853. package/dist/src/ui/components/subagents/create/TextEntryStep.d.ts +0 -26
  854. package/dist/src/ui/components/subagents/create/TextEntryStep.js +0 -28
  855. package/dist/src/ui/components/subagents/create/TextEntryStep.js.map +0 -1
  856. package/dist/src/ui/components/subagents/create/ToolSelector.d.ts +0 -16
  857. package/dist/src/ui/components/subagents/create/ToolSelector.js +0 -145
  858. package/dist/src/ui/components/subagents/create/ToolSelector.js.map +0 -1
  859. package/dist/src/ui/components/subagents/index.d.ts +0 -8
  860. package/dist/src/ui/components/subagents/index.js +0 -12
  861. package/dist/src/ui/components/subagents/index.js.map +0 -1
  862. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.d.ts +0 -13
  863. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +0 -71
  864. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +0 -1
  865. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.d.ts +0 -13
  866. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +0 -36
  867. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +0 -1
  868. package/dist/src/ui/components/subagents/manage/AgentEditStep.d.ts +0 -15
  869. package/dist/src/ui/components/subagents/manage/AgentEditStep.js +0 -73
  870. package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +0 -1
  871. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.d.ts +0 -12
  872. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +0 -231
  873. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +0 -1
  874. package/dist/src/ui/components/subagents/manage/AgentViewerStep.d.ts +0 -11
  875. package/dist/src/ui/components/subagents/manage/AgentViewerStep.js +0 -20
  876. package/dist/src/ui/components/subagents/manage/AgentViewerStep.js.map +0 -1
  877. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.d.ts +0 -15
  878. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +0 -212
  879. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +0 -1
  880. package/dist/src/ui/components/subagents/reducers.d.ts +0 -14
  881. package/dist/src/ui/components/subagents/reducers.js +0 -162
  882. package/dist/src/ui/components/subagents/reducers.js.map +0 -1
  883. package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.d.ts +0 -20
  884. package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +0 -193
  885. package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js.map +0 -1
  886. package/dist/src/ui/components/subagents/runtime/MultiAgentSummary.d.ts +0 -50
  887. package/dist/src/ui/components/subagents/runtime/MultiAgentSummary.js +0 -131
  888. package/dist/src/ui/components/subagents/runtime/MultiAgentSummary.js.map +0 -1
  889. package/dist/src/ui/components/subagents/types.d.ts +0 -137
  890. package/dist/src/ui/components/subagents/types.js +0 -15
  891. package/dist/src/ui/components/subagents/types.js.map +0 -1
  892. package/dist/src/ui/components/subagents/utils.d.ts +0 -15
  893. package/dist/src/ui/components/subagents/utils.js +0 -79
  894. package/dist/src/ui/components/subagents/utils.js.map +0 -1
  895. package/dist/src/ui/components/views/ExtensionsList.d.ts +0 -6
  896. package/dist/src/ui/components/views/ExtensionsList.js +0 -47
  897. package/dist/src/ui/components/views/ExtensionsList.js.map +0 -1
  898. package/dist/src/ui/components/views/ExtensionsList.test.d.ts +0 -6
  899. package/dist/src/ui/components/views/ExtensionsList.test.js +0 -97
  900. package/dist/src/ui/components/views/ExtensionsList.test.js.map +0 -1
  901. package/dist/src/ui/components/views/McpStatus.d.ts +0 -27
  902. package/dist/src/ui/components/views/McpStatus.js +0 -90
  903. package/dist/src/ui/components/views/McpStatus.js.map +0 -1
  904. package/dist/src/ui/components/views/McpStatus.test.d.ts +0 -6
  905. package/dist/src/ui/components/views/McpStatus.test.js +0 -117
  906. package/dist/src/ui/components/views/McpStatus.test.js.map +0 -1
  907. package/dist/src/ui/components/views/ToolsList.d.ts +0 -14
  908. package/dist/src/ui/components/views/ToolsList.js +0 -8
  909. package/dist/src/ui/components/views/ToolsList.js.map +0 -1
  910. package/dist/src/ui/components/views/ToolsList.test.d.ts +0 -6
  911. package/dist/src/ui/components/views/ToolsList.test.js +0 -45
  912. package/dist/src/ui/components/views/ToolsList.test.js.map +0 -1
  913. package/dist/src/ui/constants.d.ts +0 -18
  914. package/dist/src/ui/constants.js +0 -23
  915. package/dist/src/ui/constants.js.map +0 -1
  916. package/dist/src/ui/contexts/AppContext.d.ts +0 -11
  917. package/dist/src/ui/contexts/AppContext.js +0 -15
  918. package/dist/src/ui/contexts/AppContext.js.map +0 -1
  919. package/dist/src/ui/contexts/ConfigContext.d.ts +0 -9
  920. package/dist/src/ui/contexts/ConfigContext.js +0 -16
  921. package/dist/src/ui/contexts/ConfigContext.js.map +0 -1
  922. package/dist/src/ui/contexts/ConsultationContext.d.ts +0 -63
  923. package/dist/src/ui/contexts/ConsultationContext.js +0 -186
  924. package/dist/src/ui/contexts/ConsultationContext.js.map +0 -1
  925. package/dist/src/ui/contexts/IntelligentOrchestratorContext.d.ts +0 -87
  926. package/dist/src/ui/contexts/IntelligentOrchestratorContext.js +0 -336
  927. package/dist/src/ui/contexts/IntelligentOrchestratorContext.js.map +0 -1
  928. package/dist/src/ui/contexts/KeypressContext.d.ts +0 -35
  929. package/dist/src/ui/contexts/KeypressContext.js +0 -637
  930. package/dist/src/ui/contexts/KeypressContext.js.map +0 -1
  931. package/dist/src/ui/contexts/KeypressContext.test.d.ts +0 -6
  932. package/dist/src/ui/contexts/KeypressContext.test.js +0 -1180
  933. package/dist/src/ui/contexts/KeypressContext.test.js.map +0 -1
  934. package/dist/src/ui/contexts/OrchestrationContext.d.ts +0 -55
  935. package/dist/src/ui/contexts/OrchestrationContext.js +0 -239
  936. package/dist/src/ui/contexts/OrchestrationContext.js.map +0 -1
  937. package/dist/src/ui/contexts/OverflowContext.d.ts +0 -19
  938. package/dist/src/ui/contexts/OverflowContext.js +0 -38
  939. package/dist/src/ui/contexts/OverflowContext.js.map +0 -1
  940. package/dist/src/ui/contexts/RoadmapContext.d.ts +0 -61
  941. package/dist/src/ui/contexts/RoadmapContext.js +0 -230
  942. package/dist/src/ui/contexts/RoadmapContext.js.map +0 -1
  943. package/dist/src/ui/contexts/SessionContext.d.ts +0 -45
  944. package/dist/src/ui/contexts/SessionContext.js +0 -157
  945. package/dist/src/ui/contexts/SessionContext.js.map +0 -1
  946. package/dist/src/ui/contexts/SettingsContext.d.ts +0 -9
  947. package/dist/src/ui/contexts/SettingsContext.js +0 -15
  948. package/dist/src/ui/contexts/SettingsContext.js.map +0 -1
  949. package/dist/src/ui/contexts/ShellFocusContext.d.ts +0 -7
  950. package/dist/src/ui/contexts/ShellFocusContext.js +0 -9
  951. package/dist/src/ui/contexts/ShellFocusContext.js.map +0 -1
  952. package/dist/src/ui/contexts/StreamingContext.d.ts +0 -9
  953. package/dist/src/ui/contexts/StreamingContext.js +0 -15
  954. package/dist/src/ui/contexts/StreamingContext.js.map +0 -1
  955. package/dist/src/ui/contexts/TaskmasterContext.d.ts +0 -87
  956. package/dist/src/ui/contexts/TaskmasterContext.js +0 -184
  957. package/dist/src/ui/contexts/TaskmasterContext.js.map +0 -1
  958. package/dist/src/ui/contexts/TodoContext.d.ts +0 -26
  959. package/dist/src/ui/contexts/TodoContext.js +0 -50
  960. package/dist/src/ui/contexts/TodoContext.js.map +0 -1
  961. package/dist/src/ui/contexts/UIActionsContext.d.ts +0 -46
  962. package/dist/src/ui/contexts/UIActionsContext.js +0 -22
  963. package/dist/src/ui/contexts/UIActionsContext.js.map +0 -1
  964. package/dist/src/ui/contexts/UIStateContext.d.ts +0 -116
  965. package/dist/src/ui/contexts/UIStateContext.js +0 -17
  966. package/dist/src/ui/contexts/UIStateContext.js.map +0 -1
  967. package/dist/src/ui/contexts/VimModeContext.d.ts +0 -19
  968. package/dist/src/ui/contexts/VimModeContext.js +0 -48
  969. package/dist/src/ui/contexts/VimModeContext.js.map +0 -1
  970. package/dist/src/ui/editors/editorSettingsManager.d.ts +0 -19
  971. package/dist/src/ui/editors/editorSettingsManager.js +0 -48
  972. package/dist/src/ui/editors/editorSettingsManager.js.map +0 -1
  973. package/dist/src/ui/hooks/atCommandProcessor.d.ts +0 -31
  974. package/dist/src/ui/hooks/atCommandProcessor.js +0 -364
  975. package/dist/src/ui/hooks/atCommandProcessor.js.map +0 -1
  976. package/dist/src/ui/hooks/atCommandProcessor.test.d.ts +0 -6
  977. package/dist/src/ui/hooks/atCommandProcessor.test.js +0 -836
  978. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +0 -1
  979. package/dist/src/ui/hooks/keyToAnsi.d.ts +0 -15
  980. package/dist/src/ui/hooks/keyToAnsi.js +0 -67
  981. package/dist/src/ui/hooks/keyToAnsi.js.map +0 -1
  982. package/dist/src/ui/hooks/shellCommandProcessor.d.ts +0 -18
  983. package/dist/src/ui/hooks/shellCommandProcessor.js +0 -284
  984. package/dist/src/ui/hooks/shellCommandProcessor.js.map +0 -1
  985. package/dist/src/ui/hooks/shellCommandProcessor.test.d.ts +0 -6
  986. package/dist/src/ui/hooks/shellCommandProcessor.test.js +0 -508
  987. package/dist/src/ui/hooks/shellCommandProcessor.test.js.map +0 -1
  988. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +0 -53
  989. package/dist/src/ui/hooks/slashCommandProcessor.js +0 -510
  990. package/dist/src/ui/hooks/slashCommandProcessor.js.map +0 -1
  991. package/dist/src/ui/hooks/useAgentsManagerDialog.d.ts +0 -11
  992. package/dist/src/ui/hooks/useAgentsManagerDialog.js +0 -21
  993. package/dist/src/ui/hooks/useAgentsManagerDialog.js.map +0 -1
  994. package/dist/src/ui/hooks/useApprovalModeCommand.d.ts +0 -14
  995. package/dist/src/ui/hooks/useApprovalModeCommand.js +0 -33
  996. package/dist/src/ui/hooks/useApprovalModeCommand.js.map +0 -1
  997. package/dist/src/ui/hooks/useAtCompletion.d.ts +0 -23
  998. package/dist/src/ui/hooks/useAtCompletion.js +0 -179
  999. package/dist/src/ui/hooks/useAtCompletion.js.map +0 -1
  1000. package/dist/src/ui/hooks/useAttentionNotifications.d.ts +0 -14
  1001. package/dist/src/ui/hooks/useAttentionNotifications.js +0 -41
  1002. package/dist/src/ui/hooks/useAttentionNotifications.js.map +0 -1
  1003. package/dist/src/ui/hooks/useAttentionNotifications.test.d.ts +0 -6
  1004. package/dist/src/ui/hooks/useAttentionNotifications.test.js +0 -113
  1005. package/dist/src/ui/hooks/useAttentionNotifications.test.js.map +0 -1
  1006. package/dist/src/ui/hooks/useAutoAcceptIndicator.d.ts +0 -13
  1007. package/dist/src/ui/hooks/useAutoAcceptIndicator.js +0 -40
  1008. package/dist/src/ui/hooks/useAutoAcceptIndicator.js.map +0 -1
  1009. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.d.ts +0 -6
  1010. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js +0 -306
  1011. package/dist/src/ui/hooks/useAutoAcceptIndicator.test.js.map +0 -1
  1012. package/dist/src/ui/hooks/useBracketedPaste.d.ts +0 -12
  1013. package/dist/src/ui/hooks/useBracketedPaste.js +0 -32
  1014. package/dist/src/ui/hooks/useBracketedPaste.js.map +0 -1
  1015. package/dist/src/ui/hooks/useCommandCompletion.d.ts +0 -29
  1016. package/dist/src/ui/hooks/useCommandCompletion.js +0 -164
  1017. package/dist/src/ui/hooks/useCommandCompletion.js.map +0 -1
  1018. package/dist/src/ui/hooks/useCompletion.d.ts +0 -24
  1019. package/dist/src/ui/hooks/useCompletion.js +0 -88
  1020. package/dist/src/ui/hooks/useCompletion.js.map +0 -1
  1021. package/dist/src/ui/hooks/useConsoleMessages.d.ts +0 -12
  1022. package/dist/src/ui/hooks/useConsoleMessages.js +0 -76
  1023. package/dist/src/ui/hooks/useConsoleMessages.js.map +0 -1
  1024. package/dist/src/ui/hooks/useConsultationGenerator.d.ts +0 -17
  1025. package/dist/src/ui/hooks/useConsultationGenerator.js +0 -207
  1026. package/dist/src/ui/hooks/useConsultationGenerator.js.map +0 -1
  1027. package/dist/src/ui/hooks/useDialogClose.d.ts +0 -35
  1028. package/dist/src/ui/hooks/useDialogClose.js +0 -53
  1029. package/dist/src/ui/hooks/useDialogClose.js.map +0 -1
  1030. package/dist/src/ui/hooks/useEditorSettings.d.ts +0 -16
  1031. package/dist/src/ui/hooks/useEditorSettings.js +0 -43
  1032. package/dist/src/ui/hooks/useEditorSettings.js.map +0 -1
  1033. package/dist/src/ui/hooks/useEditorSettings.test.d.ts +0 -6
  1034. package/dist/src/ui/hooks/useEditorSettings.test.js +0 -164
  1035. package/dist/src/ui/hooks/useEditorSettings.test.js.map +0 -1
  1036. package/dist/src/ui/hooks/useExtensionUpdates.d.ts +0 -21
  1037. package/dist/src/ui/hooks/useExtensionUpdates.js +0 -116
  1038. package/dist/src/ui/hooks/useExtensionUpdates.js.map +0 -1
  1039. package/dist/src/ui/hooks/useExtensionUpdates.test.d.ts +0 -6
  1040. package/dist/src/ui/hooks/useExtensionUpdates.test.js +0 -243
  1041. package/dist/src/ui/hooks/useExtensionUpdates.test.js.map +0 -1
  1042. package/dist/src/ui/hooks/useFocus.d.ts +0 -10
  1043. package/dist/src/ui/hooks/useFocus.js +0 -51
  1044. package/dist/src/ui/hooks/useFocus.js.map +0 -1
  1045. package/dist/src/ui/hooks/useFolderTrust.d.ts +0 -13
  1046. package/dist/src/ui/hooks/useFolderTrust.js +0 -60
  1047. package/dist/src/ui/hooks/useFolderTrust.js.map +0 -1
  1048. package/dist/src/ui/hooks/useGeminiStream.d.ts +0 -39
  1049. package/dist/src/ui/hooks/useGeminiStream.js +0 -781
  1050. package/dist/src/ui/hooks/useGeminiStream.js.map +0 -1
  1051. package/dist/src/ui/hooks/useGeminiStream.test.d.ts +0 -6
  1052. package/dist/src/ui/hooks/useGeminiStream.test.js +0 -2036
  1053. package/dist/src/ui/hooks/useGeminiStream.test.js.map +0 -1
  1054. package/dist/src/ui/hooks/useGitBranchName.d.ts +0 -6
  1055. package/dist/src/ui/hooks/useGitBranchName.js +0 -61
  1056. package/dist/src/ui/hooks/useGitBranchName.js.map +0 -1
  1057. package/dist/src/ui/hooks/useGitBranchName.test.d.ts +0 -6
  1058. package/dist/src/ui/hooks/useGitBranchName.test.js +0 -189
  1059. package/dist/src/ui/hooks/useGitBranchName.test.js.map +0 -1
  1060. package/dist/src/ui/hooks/useHistoryManager.d.ts +0 -22
  1061. package/dist/src/ui/hooks/useHistoryManager.js +0 -72
  1062. package/dist/src/ui/hooks/useHistoryManager.js.map +0 -1
  1063. package/dist/src/ui/hooks/useHistoryManager.test.d.ts +0 -6
  1064. package/dist/src/ui/hooks/useHistoryManager.test.js +0 -171
  1065. package/dist/src/ui/hooks/useHistoryManager.test.js.map +0 -1
  1066. package/dist/src/ui/hooks/useIdeTrustListener.d.ts +0 -16
  1067. package/dist/src/ui/hooks/useIdeTrustListener.js +0 -65
  1068. package/dist/src/ui/hooks/useIdeTrustListener.js.map +0 -1
  1069. package/dist/src/ui/hooks/useIdeTrustListener.test.d.ts +0 -6
  1070. package/dist/src/ui/hooks/useIdeTrustListener.test.js +0 -183
  1071. package/dist/src/ui/hooks/useIdeTrustListener.test.js.map +0 -1
  1072. package/dist/src/ui/hooks/useInitializationAuthError.d.ts +0 -22
  1073. package/dist/src/ui/hooks/useInitializationAuthError.js +0 -40
  1074. package/dist/src/ui/hooks/useInitializationAuthError.js.map +0 -1
  1075. package/dist/src/ui/hooks/useInputHistory.d.ts +0 -19
  1076. package/dist/src/ui/hooks/useInputHistory.js +0 -84
  1077. package/dist/src/ui/hooks/useInputHistory.js.map +0 -1
  1078. package/dist/src/ui/hooks/useInputHistory.test.d.ts +0 -6
  1079. package/dist/src/ui/hooks/useInputHistory.test.js +0 -207
  1080. package/dist/src/ui/hooks/useInputHistory.test.js.map +0 -1
  1081. package/dist/src/ui/hooks/useInputHistoryStore.d.ts +0 -19
  1082. package/dist/src/ui/hooks/useInputHistoryStore.js +0 -81
  1083. package/dist/src/ui/hooks/useInputHistoryStore.js.map +0 -1
  1084. package/dist/src/ui/hooks/useInputHistoryStore.test.d.ts +0 -6
  1085. package/dist/src/ui/hooks/useInputHistoryStore.test.js +0 -234
  1086. package/dist/src/ui/hooks/useInputHistoryStore.test.js.map +0 -1
  1087. package/dist/src/ui/hooks/useKeypress.d.ts +0 -17
  1088. package/dist/src/ui/hooks/useKeypress.js +0 -27
  1089. package/dist/src/ui/hooks/useKeypress.js.map +0 -1
  1090. package/dist/src/ui/hooks/useKittyKeyboardProtocol.d.ts +0 -15
  1091. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js +0 -20
  1092. package/dist/src/ui/hooks/useKittyKeyboardProtocol.js.map +0 -1
  1093. package/dist/src/ui/hooks/useLaunchEditor.d.ts +0 -10
  1094. package/dist/src/ui/hooks/useLaunchEditor.js +0 -70
  1095. package/dist/src/ui/hooks/useLaunchEditor.js.map +0 -1
  1096. package/dist/src/ui/hooks/useLoadingIndicator.d.ts +0 -10
  1097. package/dist/src/ui/hooks/useLoadingIndicator.js +0 -44
  1098. package/dist/src/ui/hooks/useLoadingIndicator.js.map +0 -1
  1099. package/dist/src/ui/hooks/useLoadingIndicator.test.d.ts +0 -6
  1100. package/dist/src/ui/hooks/useLoadingIndicator.test.js +0 -91
  1101. package/dist/src/ui/hooks/useLoadingIndicator.test.js.map +0 -1
  1102. package/dist/src/ui/hooks/useLogger.d.ts +0 -11
  1103. package/dist/src/ui/hooks/useLogger.js +0 -29
  1104. package/dist/src/ui/hooks/useLogger.js.map +0 -1
  1105. package/dist/src/ui/hooks/useMemoryMonitor.d.ts +0 -13
  1106. package/dist/src/ui/hooks/useMemoryMonitor.js +0 -28
  1107. package/dist/src/ui/hooks/useMemoryMonitor.js.map +0 -1
  1108. package/dist/src/ui/hooks/useMemoryMonitor.test.d.ts +0 -6
  1109. package/dist/src/ui/hooks/useMemoryMonitor.test.js +0 -57
  1110. package/dist/src/ui/hooks/useMemoryMonitor.test.js.map +0 -1
  1111. package/dist/src/ui/hooks/useMessageQueue.d.ts +0 -23
  1112. package/dist/src/ui/hooks/useMessageQueue.js +0 -51
  1113. package/dist/src/ui/hooks/useMessageQueue.js.map +0 -1
  1114. package/dist/src/ui/hooks/useMessageQueue.test.d.ts +0 -6
  1115. package/dist/src/ui/hooks/useMessageQueue.test.js +0 -167
  1116. package/dist/src/ui/hooks/useMessageQueue.test.js.map +0 -1
  1117. package/dist/src/ui/hooks/useModelCommand.d.ts +0 -12
  1118. package/dist/src/ui/hooks/useModelCommand.js +0 -21
  1119. package/dist/src/ui/hooks/useModelCommand.js.map +0 -1
  1120. package/dist/src/ui/hooks/useModelCommand.test.d.ts +0 -6
  1121. package/dist/src/ui/hooks/useModelCommand.test.js +0 -35
  1122. package/dist/src/ui/hooks/useModelCommand.test.js.map +0 -1
  1123. package/dist/src/ui/hooks/usePermissionsModifyTrust.d.ts +0 -17
  1124. package/dist/src/ui/hooks/usePermissionsModifyTrust.js +0 -78
  1125. package/dist/src/ui/hooks/usePermissionsModifyTrust.js.map +0 -1
  1126. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.d.ts +0 -6
  1127. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js +0 -182
  1128. package/dist/src/ui/hooks/usePermissionsModifyTrust.test.js.map +0 -1
  1129. package/dist/src/ui/hooks/usePhraseCycler.d.ts +0 -14
  1130. package/dist/src/ui/hooks/usePhraseCycler.js +0 -192
  1131. package/dist/src/ui/hooks/usePhraseCycler.js.map +0 -1
  1132. package/dist/src/ui/hooks/useQuitConfirmation.d.ts +0 -14
  1133. package/dist/src/ui/hooks/useQuitConfirmation.js +0 -36
  1134. package/dist/src/ui/hooks/useQuitConfirmation.js.map +0 -1
  1135. package/dist/src/ui/hooks/useQuotaAndFallback.d.ts +0 -21
  1136. package/dist/src/ui/hooks/useQuotaAndFallback.js +0 -122
  1137. package/dist/src/ui/hooks/useQuotaAndFallback.js.map +0 -1
  1138. package/dist/src/ui/hooks/useQuotaAndFallback.test.d.ts +0 -6
  1139. package/dist/src/ui/hooks/useQuotaAndFallback.test.js +0 -269
  1140. package/dist/src/ui/hooks/useQuotaAndFallback.test.js.map +0 -1
  1141. package/dist/src/ui/hooks/useQwenAuth.d.ts +0 -15
  1142. package/dist/src/ui/hooks/useQwenAuth.js +0 -74
  1143. package/dist/src/ui/hooks/useQwenAuth.js.map +0 -1
  1144. package/dist/src/ui/hooks/useQwenAuth.test.d.ts +0 -6
  1145. package/dist/src/ui/hooks/useQwenAuth.test.js +0 -266
  1146. package/dist/src/ui/hooks/useQwenAuth.test.js.map +0 -1
  1147. package/dist/src/ui/hooks/useReactToolScheduler.d.ts +0 -34
  1148. package/dist/src/ui/hooks/useReactToolScheduler.js +0 -192
  1149. package/dist/src/ui/hooks/useReactToolScheduler.js.map +0 -1
  1150. package/dist/src/ui/hooks/useRefreshMemoryCommand.d.ts +0 -6
  1151. package/dist/src/ui/hooks/useRefreshMemoryCommand.js +0 -7
  1152. package/dist/src/ui/hooks/useRefreshMemoryCommand.js.map +0 -1
  1153. package/dist/src/ui/hooks/useReverseSearchCompletion.d.ts +0 -19
  1154. package/dist/src/ui/hooks/useReverseSearchCompletion.js +0 -103
  1155. package/dist/src/ui/hooks/useReverseSearchCompletion.js.map +0 -1
  1156. package/dist/src/ui/hooks/useReverseSearchCompletion.test.d.ts +0 -6
  1157. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js +0 -163
  1158. package/dist/src/ui/hooks/useReverseSearchCompletion.test.js.map +0 -1
  1159. package/dist/src/ui/hooks/useSelectionList.d.ts +0 -34
  1160. package/dist/src/ui/hooks/useSelectionList.js +0 -245
  1161. package/dist/src/ui/hooks/useSelectionList.js.map +0 -1
  1162. package/dist/src/ui/hooks/useSelectionList.test.d.ts +0 -6
  1163. package/dist/src/ui/hooks/useSelectionList.test.js +0 -701
  1164. package/dist/src/ui/hooks/useSelectionList.test.js.map +0 -1
  1165. package/dist/src/ui/hooks/useSettingsCommand.d.ts +0 -10
  1166. package/dist/src/ui/hooks/useSettingsCommand.js +0 -21
  1167. package/dist/src/ui/hooks/useSettingsCommand.js.map +0 -1
  1168. package/dist/src/ui/hooks/useShellHistory.d.ts +0 -14
  1169. package/dist/src/ui/hooks/useShellHistory.js +0 -111
  1170. package/dist/src/ui/hooks/useShellHistory.js.map +0 -1
  1171. package/dist/src/ui/hooks/useShellHistory.test.d.ts +0 -6
  1172. package/dist/src/ui/hooks/useShellHistory.test.js +0 -187
  1173. package/dist/src/ui/hooks/useShellHistory.test.js.map +0 -1
  1174. package/dist/src/ui/hooks/useShowMemoryCommand.d.ts +0 -9
  1175. package/dist/src/ui/hooks/useShowMemoryCommand.js +0 -58
  1176. package/dist/src/ui/hooks/useShowMemoryCommand.js.map +0 -1
  1177. package/dist/src/ui/hooks/useSlashCompletion.d.ts +0 -20
  1178. package/dist/src/ui/hooks/useSlashCompletion.js +0 -349
  1179. package/dist/src/ui/hooks/useSlashCompletion.js.map +0 -1
  1180. package/dist/src/ui/hooks/useSlashCompletion.test.d.ts +0 -9
  1181. package/dist/src/ui/hooks/useSlashCompletion.test.js +0 -597
  1182. package/dist/src/ui/hooks/useSlashCompletion.test.js.map +0 -1
  1183. package/dist/src/ui/hooks/useStateAndRef.d.ts +0 -7
  1184. package/dist/src/ui/hooks/useStateAndRef.js +0 -26
  1185. package/dist/src/ui/hooks/useStateAndRef.js.map +0 -1
  1186. package/dist/src/ui/hooks/useSubagentCreateDialog.d.ts +0 -10
  1187. package/dist/src/ui/hooks/useSubagentCreateDialog.js +0 -21
  1188. package/dist/src/ui/hooks/useSubagentCreateDialog.js.map +0 -1
  1189. package/dist/src/ui/hooks/useTaskmasterOrchestrator.d.ts +0 -35
  1190. package/dist/src/ui/hooks/useTaskmasterOrchestrator.js +0 -177
  1191. package/dist/src/ui/hooks/useTaskmasterOrchestrator.js.map +0 -1
  1192. package/dist/src/ui/hooks/useTerminalSize.d.ts +0 -9
  1193. package/dist/src/ui/hooks/useTerminalSize.js +0 -27
  1194. package/dist/src/ui/hooks/useTerminalSize.js.map +0 -1
  1195. package/dist/src/ui/hooks/useThemeCommand.d.ts +0 -15
  1196. package/dist/src/ui/hooks/useThemeCommand.js +0 -73
  1197. package/dist/src/ui/hooks/useThemeCommand.js.map +0 -1
  1198. package/dist/src/ui/hooks/useTimer.d.ts +0 -12
  1199. package/dist/src/ui/hooks/useTimer.js +0 -58
  1200. package/dist/src/ui/hooks/useTimer.js.map +0 -1
  1201. package/dist/src/ui/hooks/useTimer.test.d.ts +0 -6
  1202. package/dist/src/ui/hooks/useTimer.test.js +0 -90
  1203. package/dist/src/ui/hooks/useTimer.test.js.map +0 -1
  1204. package/dist/src/ui/hooks/useToolScheduler.test.d.ts +0 -6
  1205. package/dist/src/ui/hooks/useToolScheduler.test.js +0 -623
  1206. package/dist/src/ui/hooks/useToolScheduler.test.js.map +0 -1
  1207. package/dist/src/ui/hooks/useVisionAutoSwitch.d.ts +0 -47
  1208. package/dist/src/ui/hooks/useVisionAutoSwitch.js +0 -262
  1209. package/dist/src/ui/hooks/useVisionAutoSwitch.js.map +0 -1
  1210. package/dist/src/ui/hooks/useVisionAutoSwitch.test.d.ts +0 -6
  1211. package/dist/src/ui/hooks/useVisionAutoSwitch.test.js +0 -515
  1212. package/dist/src/ui/hooks/useVisionAutoSwitch.test.js.map +0 -1
  1213. package/dist/src/ui/hooks/useWelcomeBack.d.ts +0 -23
  1214. package/dist/src/ui/hooks/useWelcomeBack.js +0 -79
  1215. package/dist/src/ui/hooks/useWelcomeBack.js.map +0 -1
  1216. package/dist/src/ui/hooks/useWorkspaceMigration.d.ts +0 -13
  1217. package/dist/src/ui/hooks/useWorkspaceMigration.js +0 -54
  1218. package/dist/src/ui/hooks/useWorkspaceMigration.js.map +0 -1
  1219. package/dist/src/ui/hooks/vim.d.ts +0 -28
  1220. package/dist/src/ui/hooks/vim.js +0 -639
  1221. package/dist/src/ui/hooks/vim.js.map +0 -1
  1222. package/dist/src/ui/keyMatchers.d.ts +0 -27
  1223. package/dist/src/ui/keyMatchers.js +0 -68
  1224. package/dist/src/ui/keyMatchers.js.map +0 -1
  1225. package/dist/src/ui/keyMatchers.test.d.ts +0 -6
  1226. package/dist/src/ui/keyMatchers.test.js +0 -293
  1227. package/dist/src/ui/keyMatchers.test.js.map +0 -1
  1228. package/dist/src/ui/layouts/DefaultAppLayout.d.ts +0 -9
  1229. package/dist/src/ui/layouts/DefaultAppLayout.js +0 -14
  1230. package/dist/src/ui/layouts/DefaultAppLayout.js.map +0 -1
  1231. package/dist/src/ui/layouts/ScreenReaderAppLayout.d.ts +0 -7
  1232. package/dist/src/ui/layouts/ScreenReaderAppLayout.js +0 -14
  1233. package/dist/src/ui/layouts/ScreenReaderAppLayout.js.map +0 -1
  1234. package/dist/src/ui/models/availableModels.d.ts +0 -56
  1235. package/dist/src/ui/models/availableModels.js +0 -223
  1236. package/dist/src/ui/models/availableModels.js.map +0 -1
  1237. package/dist/src/ui/noninteractive/nonInteractiveUi.d.ts +0 -12
  1238. package/dist/src/ui/noninteractive/nonInteractiveUi.js +0 -29
  1239. package/dist/src/ui/noninteractive/nonInteractiveUi.js.map +0 -1
  1240. package/dist/src/ui/semantic-colors.d.ts +0 -7
  1241. package/dist/src/ui/semantic-colors.js +0 -24
  1242. package/dist/src/ui/semantic-colors.js.map +0 -1
  1243. package/dist/src/ui/state/extensions.d.ts +0 -42
  1244. package/dist/src/ui/state/extensions.js +0 -62
  1245. package/dist/src/ui/state/extensions.js.map +0 -1
  1246. package/dist/src/ui/textConstants.d.ts +0 -9
  1247. package/dist/src/ui/textConstants.js +0 -10
  1248. package/dist/src/ui/textConstants.js.map +0 -1
  1249. package/dist/src/ui/themes/ansi-light.d.ts +0 -7
  1250. package/dist/src/ui/themes/ansi-light.js +0 -142
  1251. package/dist/src/ui/themes/ansi-light.js.map +0 -1
  1252. package/dist/src/ui/themes/ansi.d.ts +0 -7
  1253. package/dist/src/ui/themes/ansi.js +0 -152
  1254. package/dist/src/ui/themes/ansi.js.map +0 -1
  1255. package/dist/src/ui/themes/atom-one-dark.d.ts +0 -7
  1256. package/dist/src/ui/themes/atom-one-dark.js +0 -138
  1257. package/dist/src/ui/themes/atom-one-dark.js.map +0 -1
  1258. package/dist/src/ui/themes/ayu-light.d.ts +0 -7
  1259. package/dist/src/ui/themes/ayu-light.js +0 -130
  1260. package/dist/src/ui/themes/ayu-light.js.map +0 -1
  1261. package/dist/src/ui/themes/ayu.d.ts +0 -7
  1262. package/dist/src/ui/themes/ayu.js +0 -104
  1263. package/dist/src/ui/themes/ayu.js.map +0 -1
  1264. package/dist/src/ui/themes/color-utils.d.ts +0 -21
  1265. package/dist/src/ui/themes/color-utils.js +0 -221
  1266. package/dist/src/ui/themes/color-utils.js.map +0 -1
  1267. package/dist/src/ui/themes/color-utils.test.d.ts +0 -6
  1268. package/dist/src/ui/themes/color-utils.test.js +0 -197
  1269. package/dist/src/ui/themes/color-utils.test.js.map +0 -1
  1270. package/dist/src/ui/themes/default-light.d.ts +0 -7
  1271. package/dist/src/ui/themes/default-light.js +0 -100
  1272. package/dist/src/ui/themes/default-light.js.map +0 -1
  1273. package/dist/src/ui/themes/default.d.ts +0 -7
  1274. package/dist/src/ui/themes/default.js +0 -143
  1275. package/dist/src/ui/themes/default.js.map +0 -1
  1276. package/dist/src/ui/themes/dracula.d.ts +0 -7
  1277. package/dist/src/ui/themes/dracula.js +0 -115
  1278. package/dist/src/ui/themes/dracula.js.map +0 -1
  1279. package/dist/src/ui/themes/github-dark.d.ts +0 -7
  1280. package/dist/src/ui/themes/github-dark.js +0 -138
  1281. package/dist/src/ui/themes/github-dark.js.map +0 -1
  1282. package/dist/src/ui/themes/github-light.d.ts +0 -7
  1283. package/dist/src/ui/themes/github-light.js +0 -140
  1284. package/dist/src/ui/themes/github-light.js.map +0 -1
  1285. package/dist/src/ui/themes/googlecode.d.ts +0 -7
  1286. package/dist/src/ui/themes/googlecode.js +0 -137
  1287. package/dist/src/ui/themes/googlecode.js.map +0 -1
  1288. package/dist/src/ui/themes/no-color.d.ts +0 -7
  1289. package/dist/src/ui/themes/no-color.js +0 -115
  1290. package/dist/src/ui/themes/no-color.js.map +0 -1
  1291. package/dist/src/ui/themes/qwen-dark.d.ts +0 -7
  1292. package/dist/src/ui/themes/qwen-dark.js +0 -106
  1293. package/dist/src/ui/themes/qwen-dark.js.map +0 -1
  1294. package/dist/src/ui/themes/qwen-light.d.ts +0 -7
  1295. package/dist/src/ui/themes/qwen-light.js +0 -131
  1296. package/dist/src/ui/themes/qwen-light.js.map +0 -1
  1297. package/dist/src/ui/themes/semantic-tokens.d.ts +0 -37
  1298. package/dist/src/ui/themes/semantic-tokens.js +0 -94
  1299. package/dist/src/ui/themes/semantic-tokens.js.map +0 -1
  1300. package/dist/src/ui/themes/shades-of-purple.d.ts +0 -11
  1301. package/dist/src/ui/themes/shades-of-purple.js +0 -304
  1302. package/dist/src/ui/themes/shades-of-purple.js.map +0 -1
  1303. package/dist/src/ui/themes/theme-manager.d.ts +0 -66
  1304. package/dist/src/ui/themes/theme-manager.js +0 -270
  1305. package/dist/src/ui/themes/theme-manager.js.map +0 -1
  1306. package/dist/src/ui/themes/theme-manager.test.d.ts +0 -6
  1307. package/dist/src/ui/themes/theme-manager.test.js +0 -142
  1308. package/dist/src/ui/themes/theme-manager.test.js.map +0 -1
  1309. package/dist/src/ui/themes/theme.d.ts +0 -130
  1310. package/dist/src/ui/themes/theme.js +0 -379
  1311. package/dist/src/ui/themes/theme.js.map +0 -1
  1312. package/dist/src/ui/themes/xcode.d.ts +0 -7
  1313. package/dist/src/ui/themes/xcode.js +0 -145
  1314. package/dist/src/ui/themes/xcode.js.map +0 -1
  1315. package/dist/src/ui/types.d.ts +0 -311
  1316. package/dist/src/ui/types.js +0 -60
  1317. package/dist/src/ui/types.js.map +0 -1
  1318. package/dist/src/ui/utils/CodeColorizer.d.ts +0 -17
  1319. package/dist/src/ui/utils/CodeColorizer.js +0 -111
  1320. package/dist/src/ui/utils/CodeColorizer.js.map +0 -1
  1321. package/dist/src/ui/utils/ConsolePatcher.d.ts +0 -25
  1322. package/dist/src/ui/utils/ConsolePatcher.js +0 -52
  1323. package/dist/src/ui/utils/ConsolePatcher.js.map +0 -1
  1324. package/dist/src/ui/utils/InlineMarkdownRenderer.d.ts +0 -16
  1325. package/dist/src/ui/utils/InlineMarkdownRenderer.js +0 -111
  1326. package/dist/src/ui/utils/InlineMarkdownRenderer.js.map +0 -1
  1327. package/dist/src/ui/utils/MarkdownDisplay.d.ts +0 -14
  1328. package/dist/src/ui/utils/MarkdownDisplay.js +0 -207
  1329. package/dist/src/ui/utils/MarkdownDisplay.js.map +0 -1
  1330. package/dist/src/ui/utils/MarkdownDisplay.test.d.ts +0 -6
  1331. package/dist/src/ui/utils/MarkdownDisplay.test.js +0 -169
  1332. package/dist/src/ui/utils/MarkdownDisplay.test.js.map +0 -1
  1333. package/dist/src/ui/utils/TableRenderer.d.ts +0 -17
  1334. package/dist/src/ui/utils/TableRenderer.js +0 -84
  1335. package/dist/src/ui/utils/TableRenderer.js.map +0 -1
  1336. package/dist/src/ui/utils/clipboardUtils.d.ts +0 -22
  1337. package/dist/src/ui/utils/clipboardUtils.js +0 -126
  1338. package/dist/src/ui/utils/clipboardUtils.js.map +0 -1
  1339. package/dist/src/ui/utils/clipboardUtils.test.d.ts +0 -6
  1340. package/dist/src/ui/utils/clipboardUtils.test.js +0 -65
  1341. package/dist/src/ui/utils/clipboardUtils.test.js.map +0 -1
  1342. package/dist/src/ui/utils/commandUtils.d.ts +0 -40
  1343. package/dist/src/ui/utils/commandUtils.js +0 -146
  1344. package/dist/src/ui/utils/commandUtils.js.map +0 -1
  1345. package/dist/src/ui/utils/commandUtils.test.d.ts +0 -6
  1346. package/dist/src/ui/utils/commandUtils.test.js +0 -352
  1347. package/dist/src/ui/utils/commandUtils.test.js.map +0 -1
  1348. package/dist/src/ui/utils/computeStats.d.ts +0 -10
  1349. package/dist/src/ui/utils/computeStats.js +0 -57
  1350. package/dist/src/ui/utils/computeStats.js.map +0 -1
  1351. package/dist/src/ui/utils/displayUtils.d.ts +0 -18
  1352. package/dist/src/ui/utils/displayUtils.js +0 -27
  1353. package/dist/src/ui/utils/displayUtils.js.map +0 -1
  1354. package/dist/src/ui/utils/displayUtils.test.d.ts +0 -6
  1355. package/dist/src/ui/utils/displayUtils.test.js +0 -61
  1356. package/dist/src/ui/utils/displayUtils.test.js.map +0 -1
  1357. package/dist/src/ui/utils/formatters.d.ts +0 -13
  1358. package/dist/src/ui/utils/formatters.js +0 -56
  1359. package/dist/src/ui/utils/formatters.js.map +0 -1
  1360. package/dist/src/ui/utils/formatters.test.d.ts +0 -6
  1361. package/dist/src/ui/utils/formatters.test.js +0 -56
  1362. package/dist/src/ui/utils/formatters.test.js.map +0 -1
  1363. package/dist/src/ui/utils/highlight.d.ts +0 -11
  1364. package/dist/src/ui/utils/highlight.js +0 -78
  1365. package/dist/src/ui/utils/highlight.js.map +0 -1
  1366. package/dist/src/ui/utils/highlight.test.d.ts +0 -6
  1367. package/dist/src/ui/utils/highlight.test.js +0 -120
  1368. package/dist/src/ui/utils/highlight.test.js.map +0 -1
  1369. package/dist/src/ui/utils/isNarrowWidth.d.ts +0 -6
  1370. package/dist/src/ui/utils/isNarrowWidth.js +0 -9
  1371. package/dist/src/ui/utils/isNarrowWidth.js.map +0 -1
  1372. package/dist/src/ui/utils/kittyProtocolDetector.d.ts +0 -13
  1373. package/dist/src/ui/utils/kittyProtocolDetector.js +0 -98
  1374. package/dist/src/ui/utils/kittyProtocolDetector.js.map +0 -1
  1375. package/dist/src/ui/utils/markdownUtilities.d.ts +0 -6
  1376. package/dist/src/ui/utils/markdownUtilities.js +0 -110
  1377. package/dist/src/ui/utils/markdownUtilities.js.map +0 -1
  1378. package/dist/src/ui/utils/markdownUtilities.test.d.ts +0 -6
  1379. package/dist/src/ui/utils/markdownUtilities.test.js +0 -42
  1380. package/dist/src/ui/utils/markdownUtilities.test.js.map +0 -1
  1381. package/dist/src/ui/utils/platformConstants.d.ts +0 -75
  1382. package/dist/src/ui/utils/platformConstants.js +0 -78
  1383. package/dist/src/ui/utils/platformConstants.js.map +0 -1
  1384. package/dist/src/ui/utils/terminalSetup.d.ts +0 -30
  1385. package/dist/src/ui/utils/terminalSetup.js +0 -308
  1386. package/dist/src/ui/utils/terminalSetup.js.map +0 -1
  1387. package/dist/src/ui/utils/terminalUI.d.ts +0 -162
  1388. package/dist/src/ui/utils/terminalUI.js +0 -285
  1389. package/dist/src/ui/utils/terminalUI.js.map +0 -1
  1390. package/dist/src/ui/utils/textUtils.d.ts +0 -42
  1391. package/dist/src/ui/utils/textUtils.js +0 -185
  1392. package/dist/src/ui/utils/textUtils.js.map +0 -1
  1393. package/dist/src/ui/utils/textUtils.test.d.ts +0 -6
  1394. package/dist/src/ui/utils/textUtils.test.js +0 -132
  1395. package/dist/src/ui/utils/textUtils.test.js.map +0 -1
  1396. package/dist/src/ui/utils/updateCheck.d.ts +0 -12
  1397. package/dist/src/ui/utils/updateCheck.js +0 -78
  1398. package/dist/src/ui/utils/updateCheck.js.map +0 -1
  1399. package/dist/src/ui/utils/updateCheck.test.d.ts +0 -6
  1400. package/dist/src/ui/utils/updateCheck.test.js +0 -145
  1401. package/dist/src/ui/utils/updateCheck.test.js.map +0 -1
  1402. package/dist/src/utils/attentionNotification.d.ts +0 -20
  1403. package/dist/src/utils/attentionNotification.js +0 -34
  1404. package/dist/src/utils/attentionNotification.js.map +0 -1
  1405. package/dist/src/utils/attentionNotification.test.d.ts +0 -6
  1406. package/dist/src/utils/attentionNotification.test.js +0 -46
  1407. package/dist/src/utils/attentionNotification.test.js.map +0 -1
  1408. package/dist/src/utils/checks.d.ts +0 -19
  1409. package/dist/src/utils/checks.js +0 -24
  1410. package/dist/src/utils/checks.js.map +0 -1
  1411. package/dist/src/utils/cleanup.d.ts +0 -8
  1412. package/dist/src/utils/cleanup.js +0 -35
  1413. package/dist/src/utils/cleanup.js.map +0 -1
  1414. package/dist/src/utils/commands.d.ts +0 -20
  1415. package/dist/src/utils/commands.js +0 -53
  1416. package/dist/src/utils/commands.js.map +0 -1
  1417. package/dist/src/utils/commands.test.d.ts +0 -6
  1418. package/dist/src/utils/commands.test.js +0 -115
  1419. package/dist/src/utils/commands.test.js.map +0 -1
  1420. package/dist/src/utils/commentJson.d.ts +0 -9
  1421. package/dist/src/utils/commentJson.js +0 -55
  1422. package/dist/src/utils/commentJson.js.map +0 -1
  1423. package/dist/src/utils/commentJson.test.d.ts +0 -6
  1424. package/dist/src/utils/commentJson.test.js +0 -146
  1425. package/dist/src/utils/commentJson.test.js.map +0 -1
  1426. package/dist/src/utils/deepMerge.d.ts +0 -9
  1427. package/dist/src/utils/deepMerge.js +0 -58
  1428. package/dist/src/utils/deepMerge.js.map +0 -1
  1429. package/dist/src/utils/deepMerge.test.d.ts +0 -6
  1430. package/dist/src/utils/deepMerge.test.js +0 -143
  1431. package/dist/src/utils/deepMerge.test.js.map +0 -1
  1432. package/dist/src/utils/dialogScopeUtils.d.ts +0 -28
  1433. package/dist/src/utils/dialogScopeUtils.js +0 -51
  1434. package/dist/src/utils/dialogScopeUtils.js.map +0 -1
  1435. package/dist/src/utils/envVarResolver.d.ts +0 -39
  1436. package/dist/src/utils/envVarResolver.js +0 -97
  1437. package/dist/src/utils/envVarResolver.js.map +0 -1
  1438. package/dist/src/utils/envVarResolver.test.d.ts +0 -6
  1439. package/dist/src/utils/envVarResolver.test.js +0 -221
  1440. package/dist/src/utils/envVarResolver.test.js.map +0 -1
  1441. package/dist/src/utils/errors.d.ts +0 -35
  1442. package/dist/src/utils/errors.js +0 -106
  1443. package/dist/src/utils/errors.js.map +0 -1
  1444. package/dist/src/utils/errors.test.d.ts +0 -6
  1445. package/dist/src/utils/errors.test.js +0 -340
  1446. package/dist/src/utils/errors.test.js.map +0 -1
  1447. package/dist/src/utils/events.d.ts +0 -12
  1448. package/dist/src/utils/events.js +0 -14
  1449. package/dist/src/utils/events.js.map +0 -1
  1450. package/dist/src/utils/gitUtils.d.ts +0 -30
  1451. package/dist/src/utils/gitUtils.js +0 -89
  1452. package/dist/src/utils/gitUtils.js.map +0 -1
  1453. package/dist/src/utils/gitUtils.test.d.ts +0 -6
  1454. package/dist/src/utils/gitUtils.test.js +0 -113
  1455. package/dist/src/utils/gitUtils.test.js.map +0 -1
  1456. package/dist/src/utils/handleAutoUpdate.d.ts +0 -11
  1457. package/dist/src/utils/handleAutoUpdate.js +0 -102
  1458. package/dist/src/utils/handleAutoUpdate.js.map +0 -1
  1459. package/dist/src/utils/installationInfo.d.ts +0 -23
  1460. package/dist/src/utils/installationInfo.js +0 -153
  1461. package/dist/src/utils/installationInfo.js.map +0 -1
  1462. package/dist/src/utils/installationInfo.test.d.ts +0 -6
  1463. package/dist/src/utils/installationInfo.test.js +0 -242
  1464. package/dist/src/utils/installationInfo.test.js.map +0 -1
  1465. package/dist/src/utils/math.d.ts +0 -13
  1466. package/dist/src/utils/math.js +0 -14
  1467. package/dist/src/utils/math.js.map +0 -1
  1468. package/dist/src/utils/nonInteractiveHelpers.d.ts +0 -88
  1469. package/dist/src/utils/nonInteractiveHelpers.js +0 -470
  1470. package/dist/src/utils/nonInteractiveHelpers.js.map +0 -1
  1471. package/dist/src/utils/nonInteractiveHelpers.test.d.ts +0 -6
  1472. package/dist/src/utils/nonInteractiveHelpers.test.js +0 -945
  1473. package/dist/src/utils/nonInteractiveHelpers.test.js.map +0 -1
  1474. package/dist/src/utils/package.d.ts +0 -12
  1475. package/dist/src/utils/package.js +0 -24
  1476. package/dist/src/utils/package.js.map +0 -1
  1477. package/dist/src/utils/processUtils.d.ts +0 -13
  1478. package/dist/src/utils/processUtils.js +0 -18
  1479. package/dist/src/utils/processUtils.js.map +0 -1
  1480. package/dist/src/utils/processUtils.test.d.ts +0 -6
  1481. package/dist/src/utils/processUtils.test.js +0 -20
  1482. package/dist/src/utils/processUtils.test.js.map +0 -1
  1483. package/dist/src/utils/readStdin.d.ts +0 -6
  1484. package/dist/src/utils/readStdin.js +0 -59
  1485. package/dist/src/utils/readStdin.js.map +0 -1
  1486. package/dist/src/utils/readStdin.test.d.ts +0 -6
  1487. package/dist/src/utils/readStdin.test.js +0 -88
  1488. package/dist/src/utils/readStdin.test.js.map +0 -1
  1489. package/dist/src/utils/relaunch.d.ts +0 -7
  1490. package/dist/src/utils/relaunch.js +0 -57
  1491. package/dist/src/utils/relaunch.js.map +0 -1
  1492. package/dist/src/utils/relaunch.test.d.ts +0 -6
  1493. package/dist/src/utils/relaunch.test.js +0 -273
  1494. package/dist/src/utils/relaunch.test.js.map +0 -1
  1495. package/dist/src/utils/resolvePath.d.ts +0 -6
  1496. package/dist/src/utils/resolvePath.js +0 -21
  1497. package/dist/src/utils/resolvePath.js.map +0 -1
  1498. package/dist/src/utils/sandbox.d.ts +0 -7
  1499. package/dist/src/utils/sandbox.js +0 -763
  1500. package/dist/src/utils/sandbox.js.map +0 -1
  1501. package/dist/src/utils/settingsUtils.d.ts +0 -144
  1502. package/dist/src/utils/settingsUtils.js +0 -346
  1503. package/dist/src/utils/settingsUtils.js.map +0 -1
  1504. package/dist/src/utils/settingsUtils.test.d.ts +0 -6
  1505. package/dist/src/utils/settingsUtils.test.js +0 -808
  1506. package/dist/src/utils/settingsUtils.test.js.map +0 -1
  1507. package/dist/src/utils/spawnWrapper.d.ts +0 -7
  1508. package/dist/src/utils/spawnWrapper.js +0 -8
  1509. package/dist/src/utils/spawnWrapper.js.map +0 -1
  1510. package/dist/src/utils/startupWarnings.d.ts +0 -6
  1511. package/dist/src/utils/startupWarnings.js +0 -40
  1512. package/dist/src/utils/startupWarnings.js.map +0 -1
  1513. package/dist/src/utils/systemInfo.d.ts +0 -66
  1514. package/dist/src/utils/systemInfo.js +0 -125
  1515. package/dist/src/utils/systemInfo.js.map +0 -1
  1516. package/dist/src/utils/systemInfo.test.d.ts +0 -6
  1517. package/dist/src/utils/systemInfo.test.js +0 -259
  1518. package/dist/src/utils/systemInfo.test.js.map +0 -1
  1519. package/dist/src/utils/systemInfoFields.d.ts +0 -22
  1520. package/dist/src/utils/systemInfoFields.js +0 -96
  1521. package/dist/src/utils/systemInfoFields.js.map +0 -1
  1522. package/dist/src/utils/updateEventEmitter.d.ts +0 -11
  1523. package/dist/src/utils/updateEventEmitter.js +0 -12
  1524. package/dist/src/utils/updateEventEmitter.js.map +0 -1
  1525. package/dist/src/utils/userStartupWarnings.d.ts +0 -12
  1526. package/dist/src/utils/userStartupWarnings.js +0 -74
  1527. package/dist/src/utils/userStartupWarnings.js.map +0 -1
  1528. package/dist/src/utils/userStartupWarnings.test.d.ts +0 -6
  1529. package/dist/src/utils/userStartupWarnings.test.js +0 -88
  1530. package/dist/src/utils/userStartupWarnings.test.js.map +0 -1
  1531. package/dist/src/utils/version.d.ts +0 -6
  1532. package/dist/src/utils/version.js +0 -11
  1533. package/dist/src/utils/version.js.map +0 -1
  1534. package/dist/src/utils/windowTitle.d.ts +0 -12
  1535. package/dist/src/utils/windowTitle.js +0 -19
  1536. package/dist/src/utils/windowTitle.js.map +0 -1
  1537. package/dist/src/utils/windowTitle.test.d.ts +0 -6
  1538. package/dist/src/utils/windowTitle.test.js +0 -49
  1539. package/dist/src/utils/windowTitle.test.js.map +0 -1
  1540. package/dist/src/validateNonInterActiveAuth.d.ts +0 -9
  1541. package/dist/src/validateNonInterActiveAuth.js +0 -76
  1542. package/dist/src/validateNonInterActiveAuth.js.map +0 -1
  1543. package/dist/src/zed-integration/acp.d.ts +0 -63
  1544. package/dist/src/zed-integration/acp.js +0 -225
  1545. package/dist/src/zed-integration/acp.js.map +0 -1
  1546. package/dist/src/zed-integration/fileSystemService.d.ts +0 -20
  1547. package/dist/src/zed-integration/fileSystemService.js +0 -46
  1548. package/dist/src/zed-integration/fileSystemService.js.map +0 -1
  1549. package/dist/src/zed-integration/schema.d.ts +0 -12024
  1550. package/dist/src/zed-integration/schema.js +0 -324
  1551. package/dist/src/zed-integration/schema.js.map +0 -1
  1552. package/dist/src/zed-integration/zedIntegration.d.ts +0 -17
  1553. package/dist/src/zed-integration/zedIntegration.js +0 -1135
  1554. package/dist/src/zed-integration/zedIntegration.js.map +0 -1
  1555. package/dist/tsconfig.tsbuildinfo +0 -1
  1556. /package/{dist/src/i18n/locales → locales}/en.js +0 -0
  1557. /package/{dist/src/i18n/locales → locales}/zh.js +0 -0
  1558. /package/{dist/src/utils/sandbox-macos-permissive-closed.sb → sandbox-macos-permissive-closed.sb} +0 -0
  1559. /package/{dist/src/utils/sandbox-macos-permissive-open.sb → sandbox-macos-permissive-open.sb} +0 -0
  1560. /package/{dist/src/utils/sandbox-macos-permissive-proxied.sb → sandbox-macos-permissive-proxied.sb} +0 -0
  1561. /package/{dist/src/utils/sandbox-macos-restrictive-closed.sb → sandbox-macos-restrictive-closed.sb} +0 -0
  1562. /package/{dist/src/utils/sandbox-macos-restrictive-open.sb → sandbox-macos-restrictive-open.sb} +0 -0
  1563. /package/{dist/src/utils/sandbox-macos-restrictive-proxied.sb → sandbox-macos-restrictive-proxied.sb} +0 -0
@@ -1,2036 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2025 OSAgent OC
4
- * SPDX-License-Identifier: Apache-2.0
5
- */
6
- import { describe, it, expect, vi, beforeEach } from 'vitest';
7
- import { renderHook, act, waitFor } from '@testing-library/react';
8
- import { useOSAStream } from './useGeminiStream.js';
9
- import { useKeypress } from './useKeypress.js';
10
- import * as atCommandProcessor from './atCommandProcessor.js';
11
- import { useReactToolScheduler } from './useReactToolScheduler.js';
12
- import { ApprovalMode, AuthType, OSAEventType as ServerOSAEventType, ToolErrorType, ToolConfirmationOutcome, } from 'osagent-core';
13
- import { MessageType, StreamingState } from '../types.js';
14
- // --- MOCKS ---
15
- const mockSendMessageStream = vi
16
- .fn()
17
- .mockReturnValue((async function* () { })());
18
- const mockStartChat = vi.fn();
19
- const MockedOSAClientClass = vi.hoisted(() => vi.fn().mockImplementation(function (_config) {
20
- // _config
21
- this.startChat = mockStartChat;
22
- this.sendMessageStream = mockSendMessageStream;
23
- this.addHistory = vi.fn();
24
- this.getChatRecordingService = vi.fn().mockReturnValue({
25
- recordThought: vi.fn(),
26
- initialize: vi.fn(),
27
- recordMessage: vi.fn(),
28
- recordMessageTokens: vi.fn(),
29
- recordToolCalls: vi.fn(),
30
- getConversationFile: vi.fn(),
31
- });
32
- }));
33
- const MockedUserPromptEvent = vi.hoisted(() => vi.fn().mockImplementation(() => { }));
34
- const MockedApiCancelEvent = vi.hoisted(() => vi.fn().mockImplementation(() => { }));
35
- const mockParseAndFormatApiError = vi.hoisted(() => vi.fn());
36
- const mockLogApiCancel = vi.hoisted(() => vi.fn());
37
- // Vision auto-switch mocks (hoisted)
38
- const mockHandleVisionSwitch = vi.hoisted(() => vi.fn().mockResolvedValue({ shouldProceed: true }));
39
- const mockRestoreOriginalModel = vi.hoisted(() => vi.fn().mockResolvedValue(undefined));
40
- vi.mock('osagent-core', async (importOriginal) => {
41
- const actualCoreModule = (await importOriginal());
42
- return {
43
- ...actualCoreModule,
44
- GitService: vi.fn(),
45
- OSAClient: MockedOSAClientClass,
46
- UserPromptEvent: MockedUserPromptEvent,
47
- ApiCancelEvent: MockedApiCancelEvent,
48
- parseAndFormatApiError: mockParseAndFormatApiError,
49
- logApiCancel: mockLogApiCancel,
50
- };
51
- });
52
- const mockUseReactToolScheduler = useReactToolScheduler;
53
- vi.mock('./useReactToolScheduler.js', async (importOriginal) => {
54
- const actualSchedulerModule = (await importOriginal());
55
- return {
56
- ...(actualSchedulerModule || {}),
57
- useReactToolScheduler: vi.fn(),
58
- };
59
- });
60
- vi.mock('./useVisionAutoSwitch.js', () => ({
61
- useVisionAutoSwitch: vi.fn(() => ({
62
- handleVisionSwitch: mockHandleVisionSwitch,
63
- restoreOriginalModel: mockRestoreOriginalModel,
64
- })),
65
- }));
66
- vi.mock('./useKeypress.js', () => ({
67
- useKeypress: vi.fn(),
68
- }));
69
- vi.mock('./shellCommandProcessor.js', () => ({
70
- useShellCommandProcessor: vi.fn().mockReturnValue({
71
- handleShellCommand: vi.fn(),
72
- }),
73
- }));
74
- vi.mock('./atCommandProcessor.js');
75
- vi.mock('../utils/markdownUtilities.js', () => ({
76
- findLastSafeSplitPoint: vi.fn((s) => s.length),
77
- }));
78
- vi.mock('./useStateAndRef.js', () => ({
79
- useStateAndRef: vi.fn((initial) => {
80
- let val = initial;
81
- const ref = { current: val };
82
- const setVal = vi.fn((updater) => {
83
- if (typeof updater === 'function') {
84
- val = updater(val);
85
- }
86
- else {
87
- val = updater;
88
- }
89
- ref.current = val;
90
- });
91
- return [val, ref, setVal];
92
- }),
93
- }));
94
- vi.mock('./useLogger.js', () => ({
95
- useLogger: vi.fn().mockReturnValue({
96
- logMessage: vi.fn().mockResolvedValue(undefined),
97
- }),
98
- }));
99
- const mockStartNewPrompt = vi.fn();
100
- const mockAddUsage = vi.fn();
101
- vi.mock('../contexts/SessionContext.js', () => ({
102
- useSessionStats: vi.fn(() => ({
103
- startNewPrompt: mockStartNewPrompt,
104
- addUsage: mockAddUsage,
105
- getPromptCount: vi.fn(() => 5),
106
- })),
107
- }));
108
- vi.mock('./slashCommandProcessor.js', () => ({
109
- handleSlashCommand: vi.fn().mockReturnValue(false),
110
- }));
111
- // --- END MOCKS ---
112
- // --- Tests for useOSAStream Hook ---
113
- describe('useOSAStream', () => {
114
- let mockAddItem;
115
- let mockConfig;
116
- let mockOnDebugMessage;
117
- let mockHandleSlashCommand;
118
- let mockScheduleToolCalls;
119
- let mockCancelAllToolCalls;
120
- let mockMarkToolsAsSubmitted;
121
- let handleAtCommandSpy;
122
- beforeEach(() => {
123
- vi.clearAllMocks(); // Clear mocks before each test
124
- mockAddItem = vi.fn();
125
- // Define the mock for getOSAClient
126
- const mockGetOSAClient = vi.fn().mockImplementation(() => {
127
- // MockedOSAClientClass is defined in the module scope by the previous change.
128
- // It will use the mockStartChat and mockSendMessageStream that are managed within beforeEach.
129
- const clientInstance = new MockedOSAClientClass(mockConfig);
130
- return clientInstance;
131
- });
132
- const contentGeneratorConfig = {
133
- model: 'test-model',
134
- apiKey: 'test-key',
135
- vertexai: false,
136
- authType: AuthType.USE_OSA,
137
- };
138
- mockConfig = {
139
- apiKey: 'test-api-key',
140
- model: 'OSA-pro',
141
- sandbox: false,
142
- targetDir: '/test/dir',
143
- debugMode: false,
144
- question: undefined,
145
- fullContext: false,
146
- coreTools: [],
147
- toolDiscoveryCommand: undefined,
148
- toolCallCommand: undefined,
149
- mcpServerCommand: undefined,
150
- mcpServers: undefined,
151
- userAgent: 'test-agent',
152
- userMemory: '',
153
- OSAMdFileCount: 0,
154
- alwaysSkipModificationConfirmation: false,
155
- vertexai: false,
156
- showMemoryUsage: false,
157
- contextFileName: undefined,
158
- getToolRegistry: vi.fn(() => ({ getToolSchemaList: vi.fn(() => []) })),
159
- getProjectRoot: vi.fn(() => '/test/dir'),
160
- getCheckpointingEnabled: vi.fn(() => false),
161
- getOSAClient: mockGetOSAClient,
162
- getApprovalMode: () => ApprovalMode.DEFAULT,
163
- getUsageStatisticsEnabled: () => true,
164
- getDebugMode: () => false,
165
- addHistory: vi.fn(),
166
- getSessionId() {
167
- return 'test-session-id';
168
- },
169
- setQuotaErrorOccurred: vi.fn(),
170
- getQuotaErrorOccurred: vi.fn(() => false),
171
- getModel: vi.fn(() => 'OSA-2.5-pro'),
172
- getContentGeneratorConfig: vi
173
- .fn()
174
- .mockReturnValue(contentGeneratorConfig),
175
- getMaxSessionTurns: vi.fn(() => 50),
176
- getUseSmartEdit: () => false,
177
- };
178
- mockOnDebugMessage = vi.fn();
179
- mockHandleSlashCommand = vi.fn().mockResolvedValue(false);
180
- // Mock return value for useReactToolScheduler
181
- mockScheduleToolCalls = vi.fn();
182
- mockCancelAllToolCalls = vi.fn();
183
- mockMarkToolsAsSubmitted = vi.fn();
184
- // Default mock for useReactToolScheduler to prevent toolCalls being undefined initially
185
- mockUseReactToolScheduler.mockReturnValue([
186
- [], // Default to empty array for toolCalls
187
- mockScheduleToolCalls,
188
- mockCancelAllToolCalls,
189
- mockMarkToolsAsSubmitted,
190
- ]);
191
- // Reset mocks for OSAClient instance methods (startChat and sendMessageStream)
192
- // The OSAClient constructor itself is mocked at the module level.
193
- mockStartChat.mockClear().mockResolvedValue({
194
- sendMessageStream: mockSendMessageStream,
195
- }); // OSAChat -> any
196
- mockSendMessageStream
197
- .mockClear()
198
- .mockReturnValue((async function* () { })());
199
- handleAtCommandSpy = vi.spyOn(atCommandProcessor, 'handleAtCommand');
200
- });
201
- const mockLoadedSettings = {
202
- merged: { preferredEditor: 'vscode' },
203
- user: { path: '/user/settings.json', settings: {} },
204
- workspace: { path: '/workspace/.OSA/settings.json', settings: {} },
205
- errors: [],
206
- forScope: vi.fn(),
207
- setValue: vi.fn(),
208
- };
209
- const renderTestHook = (initialToolCalls = [], OSAClient) => {
210
- let currentToolCalls = initialToolCalls;
211
- const setToolCalls = (newToolCalls) => {
212
- currentToolCalls = newToolCalls;
213
- };
214
- mockUseReactToolScheduler.mockImplementation(() => [
215
- currentToolCalls,
216
- mockScheduleToolCalls,
217
- mockCancelAllToolCalls,
218
- mockMarkToolsAsSubmitted,
219
- ]);
220
- const client = OSAClient || mockConfig.getOSAClient();
221
- const { result, rerender } = renderHook((props) => {
222
- // Update the mock's return value if new toolCalls are passed in props
223
- if (props.toolCalls) {
224
- setToolCalls(props.toolCalls);
225
- }
226
- return useOSAStream(props.client, props.history, props.addItem, props.config, props.loadedSettings, props.onDebugMessage, props.handleSlashCommand, props.shellModeActive, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
227
- () => { }, 80, 24);
228
- }, {
229
- initialProps: {
230
- client,
231
- history: [],
232
- addItem: mockAddItem,
233
- config: mockConfig,
234
- onDebugMessage: mockOnDebugMessage,
235
- handleSlashCommand: mockHandleSlashCommand,
236
- shellModeActive: false,
237
- loadedSettings: mockLoadedSettings,
238
- toolCalls: initialToolCalls,
239
- },
240
- });
241
- return {
242
- result,
243
- rerender,
244
- mockMarkToolsAsSubmitted,
245
- mockSendMessageStream,
246
- client,
247
- };
248
- };
249
- it('should not submit tool responses if not all tool calls are completed', () => {
250
- const toolCalls = [
251
- {
252
- request: {
253
- callId: 'call1',
254
- name: 'tool1',
255
- args: {},
256
- isClientInitiated: false,
257
- prompt_id: 'prompt-id-1',
258
- },
259
- status: 'success',
260
- responseSubmittedToOSA: false,
261
- response: {
262
- callId: 'call1',
263
- responseParts: [{ text: 'tool 1 response' }],
264
- error: undefined,
265
- errorType: undefined, // FIX: Added missing property
266
- resultDisplay: 'Tool 1 success display',
267
- },
268
- tool: {
269
- name: 'tool1',
270
- displayName: 'tool1',
271
- description: 'desc1',
272
- build: vi.fn(),
273
- },
274
- invocation: {
275
- getDescription: () => `Mock description`,
276
- },
277
- startTime: Date.now(),
278
- endTime: Date.now(),
279
- },
280
- {
281
- request: {
282
- callId: 'call2',
283
- name: 'tool2',
284
- args: {},
285
- prompt_id: 'prompt-id-1',
286
- },
287
- status: 'executing',
288
- responseSubmittedToOSA: false,
289
- tool: {
290
- name: 'tool2',
291
- displayName: 'tool2',
292
- description: 'desc2',
293
- build: vi.fn(),
294
- },
295
- invocation: {
296
- getDescription: () => `Mock description`,
297
- },
298
- startTime: Date.now(),
299
- liveOutput: '...',
300
- },
301
- ];
302
- const { mockMarkToolsAsSubmitted, mockSendMessageStream } = renderTestHook(toolCalls);
303
- // Effect for submitting tool responses depends on toolCalls and isResponding
304
- // isResponding is initially false, so the effect should run.
305
- expect(mockMarkToolsAsSubmitted).not.toHaveBeenCalled();
306
- expect(mockSendMessageStream).not.toHaveBeenCalled(); // submitQuery uses this
307
- });
308
- it('should submit tool responses when all tool calls are completed and ready', async () => {
309
- const toolCall1ResponseParts = [{ text: 'tool 1 final response' }];
310
- const toolCall2ResponseParts = [{ text: 'tool 2 final response' }];
311
- const completedToolCalls = [
312
- {
313
- request: {
314
- callId: 'call1',
315
- name: 'tool1',
316
- args: {},
317
- isClientInitiated: false,
318
- prompt_id: 'prompt-id-2',
319
- },
320
- status: 'success',
321
- responseSubmittedToOSA: false,
322
- response: {
323
- callId: 'call1',
324
- responseParts: toolCall1ResponseParts,
325
- errorType: undefined, // FIX: Added missing property
326
- },
327
- tool: {
328
- displayName: 'MockTool',
329
- },
330
- invocation: {
331
- getDescription: () => `Mock description`,
332
- },
333
- },
334
- {
335
- request: {
336
- callId: 'call2',
337
- name: 'tool2',
338
- args: {},
339
- isClientInitiated: false,
340
- prompt_id: 'prompt-id-2',
341
- },
342
- status: 'error',
343
- responseSubmittedToOSA: false,
344
- response: {
345
- callId: 'call2',
346
- responseParts: toolCall2ResponseParts,
347
- errorType: ToolErrorType.UNHANDLED_EXCEPTION, // FIX: Added missing property
348
- },
349
- },
350
- ];
351
- // Capture the onComplete callback
352
- let capturedOnComplete = null;
353
- mockUseReactToolScheduler.mockImplementation((onComplete) => {
354
- capturedOnComplete = onComplete;
355
- return [[], mockScheduleToolCalls, mockMarkToolsAsSubmitted];
356
- });
357
- renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
358
- () => { }, 80, 24));
359
- // Trigger the onComplete callback with completed tools
360
- await act(async () => {
361
- if (capturedOnComplete) {
362
- await capturedOnComplete(completedToolCalls);
363
- }
364
- });
365
- await waitFor(() => {
366
- expect(mockMarkToolsAsSubmitted).toHaveBeenCalledTimes(1);
367
- expect(mockSendMessageStream).toHaveBeenCalledTimes(1);
368
- });
369
- const expectedMergedResponse = [
370
- ...toolCall1ResponseParts,
371
- ...toolCall2ResponseParts,
372
- ];
373
- expect(mockSendMessageStream).toHaveBeenCalledWith(expectedMergedResponse, expect.any(AbortSignal), 'prompt-id-2');
374
- });
375
- it('should handle all tool calls being cancelled', async () => {
376
- const cancelledToolCalls = [
377
- {
378
- request: {
379
- callId: '1',
380
- name: 'testTool',
381
- args: {},
382
- isClientInitiated: false,
383
- prompt_id: 'prompt-id-3',
384
- },
385
- status: 'cancelled',
386
- response: {
387
- callId: '1',
388
- responseParts: [{ text: 'cancelled' }],
389
- errorType: undefined, // FIX: Added missing property
390
- },
391
- responseSubmittedToOSA: false,
392
- tool: {
393
- displayName: 'mock tool',
394
- },
395
- invocation: {
396
- getDescription: () => `Mock description`,
397
- },
398
- },
399
- ];
400
- const client = new MockedOSAClientClass(mockConfig);
401
- // Capture the onComplete callback
402
- let capturedOnComplete = null;
403
- mockUseReactToolScheduler.mockImplementation((onComplete) => {
404
- capturedOnComplete = onComplete;
405
- return [[], mockScheduleToolCalls, mockMarkToolsAsSubmitted];
406
- });
407
- renderHook(() => useOSAStream(client, [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
408
- () => { }, 80, 24));
409
- // Trigger the onComplete callback with cancelled tools
410
- await act(async () => {
411
- if (capturedOnComplete) {
412
- await capturedOnComplete(cancelledToolCalls);
413
- }
414
- });
415
- await waitFor(() => {
416
- expect(mockMarkToolsAsSubmitted).toHaveBeenCalledWith(['1']);
417
- expect(client.addHistory).toHaveBeenCalledWith({
418
- role: 'user',
419
- parts: [{ text: 'cancelled' }],
420
- });
421
- // Ensure we do NOT call back to the API
422
- expect(mockSendMessageStream).not.toHaveBeenCalled();
423
- });
424
- });
425
- it('should group multiple cancelled tool call responses into a single history entry', async () => {
426
- const cancelledToolCall1 = {
427
- request: {
428
- callId: 'cancel-1',
429
- name: 'toolA',
430
- args: {},
431
- isClientInitiated: false,
432
- prompt_id: 'prompt-id-7',
433
- },
434
- tool: {
435
- name: 'toolA',
436
- displayName: 'toolA',
437
- description: 'descA',
438
- build: vi.fn(),
439
- },
440
- invocation: {
441
- getDescription: () => `Mock description`,
442
- },
443
- status: 'cancelled',
444
- response: {
445
- callId: 'cancel-1',
446
- responseParts: [
447
- { functionResponse: { name: 'toolA', id: 'cancel-1' } },
448
- ],
449
- resultDisplay: undefined,
450
- error: undefined,
451
- errorType: undefined, // FIX: Added missing property
452
- },
453
- responseSubmittedToOSA: false,
454
- };
455
- const cancelledToolCall2 = {
456
- request: {
457
- callId: 'cancel-2',
458
- name: 'toolB',
459
- args: {},
460
- isClientInitiated: false,
461
- prompt_id: 'prompt-id-8',
462
- },
463
- tool: {
464
- name: 'toolB',
465
- displayName: 'toolB',
466
- description: 'descB',
467
- build: vi.fn(),
468
- },
469
- invocation: {
470
- getDescription: () => `Mock description`,
471
- },
472
- status: 'cancelled',
473
- response: {
474
- callId: 'cancel-2',
475
- responseParts: [
476
- { functionResponse: { name: 'toolB', id: 'cancel-2' } },
477
- ],
478
- resultDisplay: undefined,
479
- error: undefined,
480
- errorType: undefined, // FIX: Added missing property
481
- },
482
- responseSubmittedToOSA: false,
483
- };
484
- const allCancelledTools = [cancelledToolCall1, cancelledToolCall2];
485
- const client = new MockedOSAClientClass(mockConfig);
486
- let capturedOnComplete = null;
487
- mockUseReactToolScheduler.mockImplementation((onComplete) => {
488
- capturedOnComplete = onComplete;
489
- return [[], mockScheduleToolCalls, mockMarkToolsAsSubmitted];
490
- });
491
- renderHook(() => useOSAStream(client, [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
492
- () => { }, 80, 24));
493
- // Trigger the onComplete callback with multiple cancelled tools
494
- await act(async () => {
495
- if (capturedOnComplete) {
496
- await capturedOnComplete(allCancelledTools);
497
- }
498
- });
499
- await waitFor(() => {
500
- // The tools should be marked as submitted locally
501
- expect(mockMarkToolsAsSubmitted).toHaveBeenCalledWith([
502
- 'cancel-1',
503
- 'cancel-2',
504
- ]);
505
- // Crucially, addHistory should be called only ONCE
506
- expect(client.addHistory).toHaveBeenCalledTimes(1);
507
- // And that single call should contain BOTH function responses
508
- expect(client.addHistory).toHaveBeenCalledWith({
509
- role: 'user',
510
- parts: [
511
- ...cancelledToolCall1.response.responseParts,
512
- ...cancelledToolCall2.response.responseParts,
513
- ],
514
- });
515
- // No message should be sent back to the API for a turn with only cancellations
516
- expect(mockSendMessageStream).not.toHaveBeenCalled();
517
- });
518
- });
519
- it('should not flicker streaming state to Idle between tool completion and submission', async () => {
520
- const toolCallResponseParts = [
521
- { text: 'tool 1 final response' },
522
- ];
523
- const initialToolCalls = [
524
- {
525
- request: {
526
- callId: 'call1',
527
- name: 'tool1',
528
- args: {},
529
- isClientInitiated: false,
530
- prompt_id: 'prompt-id-4',
531
- },
532
- status: 'executing',
533
- responseSubmittedToOSA: false,
534
- tool: {
535
- name: 'tool1',
536
- displayName: 'tool1',
537
- description: 'desc',
538
- build: vi.fn(),
539
- },
540
- invocation: {
541
- getDescription: () => `Mock description`,
542
- },
543
- startTime: Date.now(),
544
- },
545
- ];
546
- const completedToolCalls = [
547
- {
548
- ...initialToolCalls[0],
549
- status: 'success',
550
- response: {
551
- callId: 'call1',
552
- responseParts: toolCallResponseParts,
553
- error: undefined,
554
- errorType: undefined, // FIX: Added missing property
555
- resultDisplay: 'Tool 1 success display',
556
- },
557
- endTime: Date.now(),
558
- },
559
- ];
560
- // Capture the onComplete callback
561
- let capturedOnComplete = null;
562
- let currentToolCalls = initialToolCalls;
563
- mockUseReactToolScheduler.mockImplementation((onComplete) => {
564
- capturedOnComplete = onComplete;
565
- return [
566
- currentToolCalls,
567
- mockScheduleToolCalls,
568
- mockMarkToolsAsSubmitted,
569
- ];
570
- });
571
- const { result, rerender } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
572
- () => { }, 80, 24));
573
- // 1. Initial state should be Responding because a tool is executing.
574
- expect(result.current.streamingState).toBe(StreamingState.Responding);
575
- // 2. Update the tool calls to completed state and rerender
576
- currentToolCalls = completedToolCalls;
577
- mockUseReactToolScheduler.mockImplementation((onComplete) => {
578
- capturedOnComplete = onComplete;
579
- return [
580
- completedToolCalls,
581
- mockScheduleToolCalls,
582
- mockMarkToolsAsSubmitted,
583
- ];
584
- });
585
- act(() => {
586
- rerender();
587
- });
588
- // 3. The state should *still* be Responding, not Idle.
589
- // This is because the completed tool's response has not been submitted yet.
590
- expect(result.current.streamingState).toBe(StreamingState.Responding);
591
- // 4. Trigger the onComplete callback to simulate tool completion
592
- await act(async () => {
593
- if (capturedOnComplete) {
594
- await capturedOnComplete(completedToolCalls);
595
- }
596
- });
597
- // 5. Wait for submitQuery to be called
598
- await waitFor(() => {
599
- expect(mockSendMessageStream).toHaveBeenCalledWith(toolCallResponseParts, expect.any(AbortSignal), 'prompt-id-4');
600
- });
601
- // 6. After submission, the state should remain Responding until the stream completes.
602
- expect(result.current.streamingState).toBe(StreamingState.Responding);
603
- });
604
- describe('User Cancellation', () => {
605
- let keypressCallback;
606
- const mockUseKeypress = useKeypress;
607
- beforeEach(() => {
608
- // Capture the callback passed to useKeypress
609
- mockUseKeypress.mockImplementation((callback, options) => {
610
- if (options.isActive) {
611
- keypressCallback = callback;
612
- }
613
- else {
614
- keypressCallback = () => { };
615
- }
616
- });
617
- });
618
- const simulateEscapeKeyPress = () => {
619
- act(() => {
620
- keypressCallback({ name: 'escape' });
621
- });
622
- };
623
- it('should cancel an in-progress stream when escape is pressed', async () => {
624
- const mockStream = (async function* () {
625
- yield { type: 'content', value: 'Part 1' };
626
- // Keep the stream open
627
- await new Promise(() => { });
628
- })();
629
- mockSendMessageStream.mockReturnValue(mockStream);
630
- const { result } = renderTestHook();
631
- // Start a query
632
- await act(async () => {
633
- result.current.submitQuery('test query');
634
- });
635
- // Wait for the first part of the response
636
- await waitFor(() => {
637
- expect(result.current.streamingState).toBe(StreamingState.Responding);
638
- });
639
- // Simulate escape key press
640
- simulateEscapeKeyPress();
641
- // Verify cancellation message is added
642
- await waitFor(() => {
643
- expect(mockAddItem).toHaveBeenCalledWith({
644
- type: MessageType.INFO,
645
- text: 'Request cancelled.',
646
- }, expect.any(Number));
647
- });
648
- // Verify state is reset
649
- expect(result.current.streamingState).toBe(StreamingState.Idle);
650
- });
651
- it('should call onCancelSubmit handler when escape is pressed', async () => {
652
- const cancelSubmitSpy = vi.fn();
653
- const mockStream = (async function* () {
654
- yield { type: 'content', value: 'Part 1' };
655
- // Keep the stream open
656
- await new Promise(() => { });
657
- })();
658
- mockSendMessageStream.mockReturnValue(mockStream);
659
- const { result } = renderHook(() => useOSAStream(mockConfig.getOSAClient(), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, cancelSubmitSpy, false, // visionModelPreviewEnabled
660
- () => { }, 80, 24));
661
- // Start a query
662
- await act(async () => {
663
- result.current.submitQuery('test query');
664
- });
665
- simulateEscapeKeyPress();
666
- expect(cancelSubmitSpy).toHaveBeenCalled();
667
- });
668
- it('should call setShellInputFocused(false) when escape is pressed', async () => {
669
- const setShellInputFocusedSpy = vi.fn();
670
- const mockStream = (async function* () {
671
- yield { type: 'content', value: 'Part 1' };
672
- await new Promise(() => { }); // Keep stream open
673
- })();
674
- mockSendMessageStream.mockReturnValue(mockStream);
675
- const { result } = renderHook(() => useOSAStream(mockConfig.getOSAClient(), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, vi.fn(), false, setShellInputFocusedSpy, // Pass the spy here
676
- 80, 24));
677
- // Start a query
678
- await act(async () => {
679
- result.current.submitQuery('test query');
680
- });
681
- simulateEscapeKeyPress();
682
- expect(setShellInputFocusedSpy).toHaveBeenCalledWith(false);
683
- });
684
- it('should not do anything if escape is pressed when not responding', () => {
685
- const { result } = renderTestHook();
686
- expect(result.current.streamingState).toBe(StreamingState.Idle);
687
- // Simulate escape key press
688
- simulateEscapeKeyPress();
689
- // No change should happen, no cancellation message
690
- expect(mockAddItem).not.toHaveBeenCalledWith(expect.objectContaining({
691
- text: 'Request cancelled.',
692
- }), expect.any(Number));
693
- });
694
- it('should prevent further processing after cancellation', async () => {
695
- let continueStream;
696
- const streamPromise = new Promise((resolve) => {
697
- continueStream = resolve;
698
- });
699
- const mockStream = (async function* () {
700
- yield { type: 'content', value: 'Initial' };
701
- await streamPromise; // Wait until we manually continue
702
- yield { type: 'content', value: ' Canceled' };
703
- })();
704
- mockSendMessageStream.mockReturnValue(mockStream);
705
- const { result } = renderTestHook();
706
- await act(async () => {
707
- result.current.submitQuery('long running query');
708
- });
709
- await waitFor(() => {
710
- expect(result.current.streamingState).toBe(StreamingState.Responding);
711
- });
712
- // Cancel the request
713
- simulateEscapeKeyPress();
714
- // Allow the stream to continue
715
- act(() => {
716
- continueStream();
717
- });
718
- // Wait a bit to see if the second part is processed
719
- await new Promise((resolve) => setTimeout(resolve, 50));
720
- // The text should not have been updated with " Canceled"
721
- const lastCall = mockAddItem.mock.calls.find((call) => call[0].type === 'OSA');
722
- expect(lastCall?.[0].text).toBe('Initial');
723
- // The final state should be idle after cancellation
724
- expect(result.current.streamingState).toBe(StreamingState.Idle);
725
- });
726
- it('should not cancel if a tool call is in progress (not just responding)', async () => {
727
- const toolCalls = [
728
- {
729
- request: { callId: 'call1', name: 'tool1', args: {} },
730
- status: 'executing',
731
- responseSubmittedToOSA: false,
732
- tool: {
733
- name: 'tool1',
734
- description: 'desc1',
735
- build: vi.fn().mockImplementation((_) => ({
736
- getDescription: () => `Mock description`,
737
- })),
738
- },
739
- invocation: {
740
- getDescription: () => `Mock description`,
741
- },
742
- startTime: Date.now(),
743
- liveOutput: '...',
744
- },
745
- ];
746
- const abortSpy = vi.spyOn(AbortController.prototype, 'abort');
747
- const { result } = renderTestHook(toolCalls);
748
- // State is `Responding` because a tool is running
749
- expect(result.current.streamingState).toBe(StreamingState.Responding);
750
- // Try to cancel
751
- simulateEscapeKeyPress();
752
- // Nothing should happen because the state is not `Responding`
753
- expect(abortSpy).not.toHaveBeenCalled();
754
- });
755
- });
756
- describe('Slash Command Handling', () => {
757
- it('should schedule a tool call when the command processor returns a schedule_tool action', async () => {
758
- const clientToolRequest = {
759
- type: 'schedule_tool',
760
- toolName: 'save_memory',
761
- toolArgs: { fact: 'test fact' },
762
- };
763
- mockHandleSlashCommand.mockResolvedValue(clientToolRequest);
764
- const { result } = renderTestHook();
765
- await act(async () => {
766
- await result.current.submitQuery('/memory add "test fact"');
767
- });
768
- await waitFor(() => {
769
- expect(mockScheduleToolCalls).toHaveBeenCalledWith([
770
- expect.objectContaining({
771
- name: 'save_memory',
772
- args: { fact: 'test fact' },
773
- isClientInitiated: true,
774
- }),
775
- ], expect.any(AbortSignal));
776
- expect(mockSendMessageStream).not.toHaveBeenCalled();
777
- });
778
- });
779
- it('should stop processing and not call OSA when a command is handled without a tool call', async () => {
780
- const uiOnlyCommandResult = {
781
- type: 'handled',
782
- };
783
- mockHandleSlashCommand.mockResolvedValue(uiOnlyCommandResult);
784
- const { result } = renderTestHook();
785
- await act(async () => {
786
- await result.current.submitQuery('/help');
787
- });
788
- await waitFor(() => {
789
- expect(mockHandleSlashCommand).toHaveBeenCalledWith('/help');
790
- expect(mockScheduleToolCalls).not.toHaveBeenCalled();
791
- expect(mockSendMessageStream).not.toHaveBeenCalled(); // No LLM call made
792
- });
793
- });
794
- it('should call OSA with prompt content when slash command returns a `submit_prompt` action', async () => {
795
- const customCommandResult = {
796
- type: 'submit_prompt',
797
- content: 'This is the actual prompt from the command file.',
798
- };
799
- mockHandleSlashCommand.mockResolvedValue(customCommandResult);
800
- const { result, mockSendMessageStream: localMockSendMessageStream } = renderTestHook();
801
- await act(async () => {
802
- await result.current.submitQuery('/my-custom-command');
803
- });
804
- await waitFor(() => {
805
- expect(mockHandleSlashCommand).toHaveBeenCalledWith('/my-custom-command');
806
- expect(localMockSendMessageStream).not.toHaveBeenCalledWith('/my-custom-command', expect.anything(), expect.anything());
807
- expect(localMockSendMessageStream).toHaveBeenCalledWith('This is the actual prompt from the command file.', expect.any(AbortSignal), expect.any(String));
808
- expect(mockScheduleToolCalls).not.toHaveBeenCalled();
809
- });
810
- });
811
- it('should correctly handle a submit_prompt action with empty content', async () => {
812
- const emptyPromptResult = {
813
- type: 'submit_prompt',
814
- content: '',
815
- };
816
- mockHandleSlashCommand.mockResolvedValue(emptyPromptResult);
817
- const { result, mockSendMessageStream: localMockSendMessageStream } = renderTestHook();
818
- await act(async () => {
819
- await result.current.submitQuery('/emptycmd');
820
- });
821
- await waitFor(() => {
822
- expect(mockHandleSlashCommand).toHaveBeenCalledWith('/emptycmd');
823
- expect(localMockSendMessageStream).toHaveBeenCalledWith('', expect.any(AbortSignal), expect.any(String));
824
- });
825
- });
826
- it('should not call handleSlashCommand for line comments', async () => {
827
- const { result, mockSendMessageStream: localMockSendMessageStream } = renderTestHook();
828
- await act(async () => {
829
- await result.current.submitQuery('// This is a line comment');
830
- });
831
- await waitFor(() => {
832
- expect(mockHandleSlashCommand).not.toHaveBeenCalled();
833
- expect(localMockSendMessageStream).toHaveBeenCalledWith('// This is a line comment', expect.any(AbortSignal), expect.any(String));
834
- });
835
- });
836
- it('should not call handleSlashCommand for block comments', async () => {
837
- const { result, mockSendMessageStream: localMockSendMessageStream } = renderTestHook();
838
- await act(async () => {
839
- await result.current.submitQuery('/* This is a block comment */');
840
- });
841
- await waitFor(() => {
842
- expect(mockHandleSlashCommand).not.toHaveBeenCalled();
843
- expect(localMockSendMessageStream).toHaveBeenCalledWith('/* This is a block comment */', expect.any(AbortSignal), expect.any(String));
844
- });
845
- });
846
- });
847
- describe('Memory Refresh on save_memory', () => {
848
- it('should call performMemoryRefresh when a save_memory tool call completes successfully', async () => {
849
- const mockPerformMemoryRefresh = vi.fn();
850
- const completedToolCall = {
851
- request: {
852
- callId: 'save-mem-call-1',
853
- name: 'save_memory',
854
- args: { fact: 'test' },
855
- isClientInitiated: true,
856
- prompt_id: 'prompt-id-6',
857
- },
858
- status: 'success',
859
- responseSubmittedToOSA: false,
860
- response: {
861
- callId: 'save-mem-call-1',
862
- responseParts: [{ text: 'Memory saved' }],
863
- resultDisplay: 'Success: Memory saved',
864
- error: undefined,
865
- errorType: undefined, // FIX: Added missing property
866
- },
867
- tool: {
868
- name: 'save_memory',
869
- displayName: 'save_memory',
870
- description: 'Saves memory',
871
- build: vi.fn(),
872
- },
873
- invocation: {
874
- getDescription: () => `Mock description`,
875
- },
876
- };
877
- // Capture the onComplete callback
878
- let capturedOnComplete = null;
879
- mockUseReactToolScheduler.mockImplementation((onComplete) => {
880
- capturedOnComplete = onComplete;
881
- return [[], mockScheduleToolCalls, mockMarkToolsAsSubmitted];
882
- });
883
- renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, mockPerformMemoryRefresh, false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
884
- () => { }, 80, 24));
885
- // Trigger the onComplete callback with the completed save_memory tool
886
- await act(async () => {
887
- if (capturedOnComplete) {
888
- await capturedOnComplete([completedToolCall]);
889
- }
890
- });
891
- await waitFor(() => {
892
- expect(mockPerformMemoryRefresh).toHaveBeenCalledTimes(1);
893
- });
894
- });
895
- });
896
- describe('Error Handling', () => {
897
- it('should call parseAndFormatApiError with the correct authType on stream initialization failure', async () => {
898
- // 1. Setup
899
- const mockError = new Error('Rate limit exceeded');
900
- const mockAuthType = AuthType.LOGIN_WITH_OSAGENT;
901
- mockParseAndFormatApiError.mockClear();
902
- mockSendMessageStream.mockReturnValue((async function* () {
903
- yield { type: 'content', value: '' };
904
- throw mockError;
905
- })());
906
- const testConfig = {
907
- ...mockConfig,
908
- getContentGeneratorConfig: vi.fn(() => ({
909
- authType: mockAuthType,
910
- })),
911
- getModel: vi.fn(() => 'OSA-2.5-pro'),
912
- };
913
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(testConfig), [], mockAddItem, testConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
914
- () => { }, 80, 24));
915
- // 2. Action
916
- await act(async () => {
917
- await result.current.submitQuery('test query');
918
- });
919
- // 3. Assertion
920
- await waitFor(() => {
921
- expect(mockParseAndFormatApiError).toHaveBeenCalledWith('Rate limit exceeded', mockAuthType, undefined, 'OSA-2.5-pro', 'OSA-2.5-flash');
922
- });
923
- });
924
- });
925
- describe('handleApprovalModeChange', () => {
926
- it('should auto-approve all pending tool calls when switching to YOLO mode', async () => {
927
- const mockOnConfirm = vi.fn().mockResolvedValue(undefined);
928
- const awaitingApprovalToolCalls = [
929
- {
930
- request: {
931
- callId: 'call1',
932
- name: 'replace',
933
- args: { old_string: 'old', new_string: 'new' },
934
- isClientInitiated: false,
935
- prompt_id: 'prompt-id-1',
936
- },
937
- status: 'awaiting_approval',
938
- responseSubmittedToOSA: false,
939
- confirmationDetails: {
940
- onConfirm: mockOnConfirm,
941
- onCancel: vi.fn(),
942
- message: 'Replace text?',
943
- displayedText: 'Replace old with new',
944
- },
945
- tool: {
946
- name: 'replace',
947
- displayName: 'replace',
948
- description: 'Replace text',
949
- build: vi.fn(),
950
- },
951
- invocation: {
952
- getDescription: () => 'Mock description',
953
- },
954
- },
955
- {
956
- request: {
957
- callId: 'call2',
958
- name: 'read_file',
959
- args: { path: '/test/file.txt' },
960
- isClientInitiated: false,
961
- prompt_id: 'prompt-id-1',
962
- },
963
- status: 'awaiting_approval',
964
- responseSubmittedToOSA: false,
965
- confirmationDetails: {
966
- onConfirm: mockOnConfirm,
967
- onCancel: vi.fn(),
968
- message: 'Read file?',
969
- displayedText: 'Read /test/file.txt',
970
- },
971
- tool: {
972
- name: 'read_file',
973
- displayName: 'read_file',
974
- description: 'Read file',
975
- build: vi.fn(),
976
- },
977
- invocation: {
978
- getDescription: () => 'Mock description',
979
- },
980
- },
981
- ];
982
- const { result } = renderTestHook(awaitingApprovalToolCalls);
983
- await act(async () => {
984
- await result.current.handleApprovalModeChange(ApprovalMode.YOLO);
985
- });
986
- // Both tool calls should be auto-approved
987
- expect(mockOnConfirm).toHaveBeenCalledTimes(2);
988
- expect(mockOnConfirm).toHaveBeenNthCalledWith(1, ToolConfirmationOutcome.ProceedOnce);
989
- expect(mockOnConfirm).toHaveBeenNthCalledWith(2, ToolConfirmationOutcome.ProceedOnce);
990
- });
991
- it('should only auto-approve edit tools when switching to AUTO_EDIT mode', async () => {
992
- const mockOnConfirmReplace = vi.fn().mockResolvedValue(undefined);
993
- const mockOnConfirmWrite = vi.fn().mockResolvedValue(undefined);
994
- const mockOnConfirmRead = vi.fn().mockResolvedValue(undefined);
995
- const awaitingApprovalToolCalls = [
996
- {
997
- request: {
998
- callId: 'call1',
999
- name: 'replace',
1000
- args: { old_string: 'old', new_string: 'new' },
1001
- isClientInitiated: false,
1002
- prompt_id: 'prompt-id-1',
1003
- },
1004
- status: 'awaiting_approval',
1005
- responseSubmittedToOSA: false,
1006
- confirmationDetails: {
1007
- onConfirm: mockOnConfirmReplace,
1008
- onCancel: vi.fn(),
1009
- message: 'Replace text?',
1010
- displayedText: 'Replace old with new',
1011
- },
1012
- tool: {
1013
- name: 'replace',
1014
- displayName: 'replace',
1015
- description: 'Replace text',
1016
- build: vi.fn(),
1017
- },
1018
- invocation: {
1019
- getDescription: () => 'Mock description',
1020
- },
1021
- },
1022
- {
1023
- request: {
1024
- callId: 'call2',
1025
- name: 'write_file',
1026
- args: { path: '/test/new.txt', content: 'content' },
1027
- isClientInitiated: false,
1028
- prompt_id: 'prompt-id-1',
1029
- },
1030
- status: 'awaiting_approval',
1031
- responseSubmittedToOSA: false,
1032
- confirmationDetails: {
1033
- onConfirm: mockOnConfirmWrite,
1034
- onCancel: vi.fn(),
1035
- message: 'Write file?',
1036
- displayedText: 'Write to /test/new.txt',
1037
- },
1038
- tool: {
1039
- name: 'write_file',
1040
- displayName: 'write_file',
1041
- description: 'Write file',
1042
- build: vi.fn(),
1043
- },
1044
- invocation: {
1045
- getDescription: () => 'Mock description',
1046
- },
1047
- },
1048
- {
1049
- request: {
1050
- callId: 'call3',
1051
- name: 'read_file',
1052
- args: { path: '/test/file.txt' },
1053
- isClientInitiated: false,
1054
- prompt_id: 'prompt-id-1',
1055
- },
1056
- status: 'awaiting_approval',
1057
- responseSubmittedToOSA: false,
1058
- confirmationDetails: {
1059
- onConfirm: mockOnConfirmRead,
1060
- onCancel: vi.fn(),
1061
- message: 'Read file?',
1062
- displayedText: 'Read /test/file.txt',
1063
- },
1064
- tool: {
1065
- name: 'read_file',
1066
- displayName: 'read_file',
1067
- description: 'Read file',
1068
- build: vi.fn(),
1069
- },
1070
- invocation: {
1071
- getDescription: () => 'Mock description',
1072
- },
1073
- },
1074
- ];
1075
- const { result } = renderTestHook(awaitingApprovalToolCalls);
1076
- await act(async () => {
1077
- await result.current.handleApprovalModeChange(ApprovalMode.AUTO_EDIT);
1078
- });
1079
- // Only replace and write_file should be auto-approved
1080
- expect(mockOnConfirmReplace).toHaveBeenCalledTimes(1);
1081
- expect(mockOnConfirmReplace).toHaveBeenCalledWith(ToolConfirmationOutcome.ProceedOnce);
1082
- expect(mockOnConfirmWrite).toHaveBeenCalledTimes(1);
1083
- expect(mockOnConfirmWrite).toHaveBeenCalledWith(ToolConfirmationOutcome.ProceedOnce);
1084
- // read_file should not be auto-approved
1085
- expect(mockOnConfirmRead).not.toHaveBeenCalled();
1086
- });
1087
- it('should not auto-approve any tools when switching to REQUIRE_CONFIRMATION mode', async () => {
1088
- const mockOnConfirm = vi.fn().mockResolvedValue(undefined);
1089
- const awaitingApprovalToolCalls = [
1090
- {
1091
- request: {
1092
- callId: 'call1',
1093
- name: 'replace',
1094
- args: { old_string: 'old', new_string: 'new' },
1095
- isClientInitiated: false,
1096
- prompt_id: 'prompt-id-1',
1097
- },
1098
- status: 'awaiting_approval',
1099
- responseSubmittedToOSA: false,
1100
- confirmationDetails: {
1101
- onConfirm: mockOnConfirm,
1102
- onCancel: vi.fn(),
1103
- message: 'Replace text?',
1104
- displayedText: 'Replace old with new',
1105
- },
1106
- tool: {
1107
- name: 'replace',
1108
- displayName: 'replace',
1109
- description: 'Replace text',
1110
- build: vi.fn(),
1111
- },
1112
- invocation: {
1113
- getDescription: () => 'Mock description',
1114
- },
1115
- },
1116
- ];
1117
- const { result } = renderTestHook(awaitingApprovalToolCalls);
1118
- await act(async () => {
1119
- await result.current.handleApprovalModeChange(ApprovalMode.DEFAULT);
1120
- });
1121
- // No tools should be auto-approved
1122
- expect(mockOnConfirm).not.toHaveBeenCalled();
1123
- });
1124
- it('should handle errors gracefully when auto-approving tool calls', async () => {
1125
- const consoleSpy = vi
1126
- .spyOn(console, 'error')
1127
- .mockImplementation(() => { });
1128
- const mockOnConfirmSuccess = vi.fn().mockResolvedValue(undefined);
1129
- const mockOnConfirmError = vi
1130
- .fn()
1131
- .mockRejectedValue(new Error('Approval failed'));
1132
- const awaitingApprovalToolCalls = [
1133
- {
1134
- request: {
1135
- callId: 'call1',
1136
- name: 'replace',
1137
- args: { old_string: 'old', new_string: 'new' },
1138
- isClientInitiated: false,
1139
- prompt_id: 'prompt-id-1',
1140
- },
1141
- status: 'awaiting_approval',
1142
- responseSubmittedToOSA: false,
1143
- confirmationDetails: {
1144
- onConfirm: mockOnConfirmSuccess,
1145
- onCancel: vi.fn(),
1146
- message: 'Replace text?',
1147
- displayedText: 'Replace old with new',
1148
- },
1149
- tool: {
1150
- name: 'replace',
1151
- displayName: 'replace',
1152
- description: 'Replace text',
1153
- build: vi.fn(),
1154
- },
1155
- invocation: {
1156
- getDescription: () => 'Mock description',
1157
- },
1158
- },
1159
- {
1160
- request: {
1161
- callId: 'call2',
1162
- name: 'write_file',
1163
- args: { path: '/test/file.txt', content: 'content' },
1164
- isClientInitiated: false,
1165
- prompt_id: 'prompt-id-1',
1166
- },
1167
- status: 'awaiting_approval',
1168
- responseSubmittedToOSA: false,
1169
- confirmationDetails: {
1170
- onConfirm: mockOnConfirmError,
1171
- onCancel: vi.fn(),
1172
- message: 'Write file?',
1173
- displayedText: 'Write to /test/file.txt',
1174
- },
1175
- tool: {
1176
- name: 'write_file',
1177
- displayName: 'write_file',
1178
- description: 'Write file',
1179
- build: vi.fn(),
1180
- },
1181
- invocation: {
1182
- getDescription: () => 'Mock description',
1183
- },
1184
- },
1185
- ];
1186
- const { result } = renderTestHook(awaitingApprovalToolCalls);
1187
- await act(async () => {
1188
- await result.current.handleApprovalModeChange(ApprovalMode.YOLO);
1189
- });
1190
- // Both confirmation methods should be called
1191
- expect(mockOnConfirmSuccess).toHaveBeenCalledTimes(1);
1192
- expect(mockOnConfirmError).toHaveBeenCalledTimes(1);
1193
- // Error should be logged
1194
- expect(consoleSpy).toHaveBeenCalledWith('Failed to auto-approve tool call call2:', expect.any(Error));
1195
- consoleSpy.mockRestore();
1196
- });
1197
- it('should skip tool calls without confirmationDetails', async () => {
1198
- const awaitingApprovalToolCalls = [
1199
- {
1200
- request: {
1201
- callId: 'call1',
1202
- name: 'replace',
1203
- args: { old_string: 'old', new_string: 'new' },
1204
- isClientInitiated: false,
1205
- prompt_id: 'prompt-id-1',
1206
- },
1207
- status: 'awaiting_approval',
1208
- responseSubmittedToOSA: false,
1209
- // No confirmationDetails
1210
- tool: {
1211
- name: 'replace',
1212
- displayName: 'replace',
1213
- description: 'Replace text',
1214
- build: vi.fn(),
1215
- },
1216
- invocation: {
1217
- getDescription: () => 'Mock description',
1218
- },
1219
- },
1220
- ];
1221
- const { result } = renderTestHook(awaitingApprovalToolCalls);
1222
- // Should not throw an error
1223
- await act(async () => {
1224
- await result.current.handleApprovalModeChange(ApprovalMode.YOLO);
1225
- });
1226
- });
1227
- it('should skip tool calls without onConfirm method in confirmationDetails', async () => {
1228
- const awaitingApprovalToolCalls = [
1229
- {
1230
- request: {
1231
- callId: 'call1',
1232
- name: 'replace',
1233
- args: { old_string: 'old', new_string: 'new' },
1234
- isClientInitiated: false,
1235
- prompt_id: 'prompt-id-1',
1236
- },
1237
- status: 'awaiting_approval',
1238
- responseSubmittedToOSA: false,
1239
- confirmationDetails: {
1240
- onCancel: vi.fn(),
1241
- message: 'Replace text?',
1242
- displayedText: 'Replace old with new',
1243
- // No onConfirm method
1244
- },
1245
- tool: {
1246
- name: 'replace',
1247
- displayName: 'replace',
1248
- description: 'Replace text',
1249
- build: vi.fn(),
1250
- },
1251
- invocation: {
1252
- getDescription: () => 'Mock description',
1253
- },
1254
- },
1255
- ];
1256
- const { result } = renderTestHook(awaitingApprovalToolCalls);
1257
- // Should not throw an error
1258
- await act(async () => {
1259
- await result.current.handleApprovalModeChange(ApprovalMode.YOLO);
1260
- });
1261
- });
1262
- it('should only process tool calls with awaiting_approval status', async () => {
1263
- const mockOnConfirmAwaiting = vi.fn().mockResolvedValue(undefined);
1264
- const mockOnConfirmExecuting = vi.fn().mockResolvedValue(undefined);
1265
- const mixedStatusToolCalls = [
1266
- {
1267
- request: {
1268
- callId: 'call1',
1269
- name: 'replace',
1270
- args: { old_string: 'old', new_string: 'new' },
1271
- isClientInitiated: false,
1272
- prompt_id: 'prompt-id-1',
1273
- },
1274
- status: 'awaiting_approval',
1275
- responseSubmittedToOSA: false,
1276
- confirmationDetails: {
1277
- onConfirm: mockOnConfirmAwaiting,
1278
- onCancel: vi.fn(),
1279
- message: 'Replace text?',
1280
- displayedText: 'Replace old with new',
1281
- },
1282
- tool: {
1283
- name: 'replace',
1284
- displayName: 'replace',
1285
- description: 'Replace text',
1286
- build: vi.fn(),
1287
- },
1288
- invocation: {
1289
- getDescription: () => 'Mock description',
1290
- },
1291
- },
1292
- {
1293
- request: {
1294
- callId: 'call2',
1295
- name: 'write_file',
1296
- args: { path: '/test/file.txt', content: 'content' },
1297
- isClientInitiated: false,
1298
- prompt_id: 'prompt-id-1',
1299
- },
1300
- status: 'executing',
1301
- responseSubmittedToOSA: false,
1302
- confirmationDetails: {
1303
- onConfirm: mockOnConfirmExecuting,
1304
- onCancel: vi.fn(),
1305
- message: 'Write file?',
1306
- displayedText: 'Write to /test/file.txt',
1307
- },
1308
- tool: {
1309
- name: 'write_file',
1310
- displayName: 'write_file',
1311
- description: 'Write file',
1312
- build: vi.fn(),
1313
- },
1314
- invocation: {
1315
- getDescription: () => 'Mock description',
1316
- },
1317
- startTime: Date.now(),
1318
- liveOutput: 'Writing...',
1319
- },
1320
- ];
1321
- const { result } = renderTestHook(mixedStatusToolCalls);
1322
- await act(async () => {
1323
- await result.current.handleApprovalModeChange(ApprovalMode.YOLO);
1324
- });
1325
- // Only the awaiting_approval tool should be processed
1326
- expect(mockOnConfirmAwaiting).toHaveBeenCalledTimes(1);
1327
- expect(mockOnConfirmExecuting).not.toHaveBeenCalled();
1328
- });
1329
- });
1330
- describe('handleFinishedEvent', () => {
1331
- it('should add info message for MAX_TOKENS finish reason', async () => {
1332
- // Setup mock to return a stream with MAX_TOKENS finish reason
1333
- mockSendMessageStream.mockReturnValue((async function* () {
1334
- yield {
1335
- type: ServerOSAEventType.Content,
1336
- value: 'This is a truncated response...',
1337
- };
1338
- yield {
1339
- type: ServerOSAEventType.Finished,
1340
- value: { reason: 'MAX_TOKENS', usageMetadata: undefined },
1341
- };
1342
- })());
1343
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1344
- () => { }, 80, 24));
1345
- // Submit a query
1346
- await act(async () => {
1347
- await result.current.submitQuery('Generate long text');
1348
- });
1349
- // Check that the info message was added
1350
- await waitFor(() => {
1351
- expect(mockAddItem).toHaveBeenCalledWith({
1352
- type: 'info',
1353
- text: '⚠️ Response truncated due to token limits.',
1354
- }, expect.any(Number));
1355
- });
1356
- });
1357
- it('should not add message for STOP finish reason', async () => {
1358
- // Setup mock to return a stream with STOP finish reason
1359
- mockSendMessageStream.mockReturnValue((async function* () {
1360
- yield {
1361
- type: ServerOSAEventType.Content,
1362
- value: 'Complete response',
1363
- };
1364
- yield {
1365
- type: ServerOSAEventType.Finished,
1366
- value: { reason: 'STOP', usageMetadata: undefined },
1367
- };
1368
- })());
1369
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1370
- () => { }, 80, 24));
1371
- // Submit a query
1372
- await act(async () => {
1373
- await result.current.submitQuery('Test normal completion');
1374
- });
1375
- // Wait a bit to ensure no message is added
1376
- await new Promise((resolve) => setTimeout(resolve, 100));
1377
- // Check that no info message was added for STOP
1378
- const infoMessages = mockAddItem.mock.calls.filter((call) => call[0].type === 'info');
1379
- expect(infoMessages).toHaveLength(0);
1380
- });
1381
- it('should not add message for FINISH_REASON_UNSPECIFIED', async () => {
1382
- // Setup mock to return a stream with FINISH_REASON_UNSPECIFIED
1383
- mockSendMessageStream.mockReturnValue((async function* () {
1384
- yield {
1385
- type: ServerOSAEventType.Content,
1386
- value: 'Response with unspecified finish',
1387
- };
1388
- yield {
1389
- type: ServerOSAEventType.Finished,
1390
- value: {
1391
- reason: 'FINISH_REASON_UNSPECIFIED',
1392
- usageMetadata: undefined,
1393
- },
1394
- };
1395
- })());
1396
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1397
- () => { }, 80, 24));
1398
- // Submit a query
1399
- await act(async () => {
1400
- await result.current.submitQuery('Test unspecified finish');
1401
- });
1402
- // Wait a bit to ensure no message is added
1403
- await new Promise((resolve) => setTimeout(resolve, 100));
1404
- // Check that no info message was added
1405
- const infoMessages = mockAddItem.mock.calls.filter((call) => call[0].type === 'info');
1406
- expect(infoMessages).toHaveLength(0);
1407
- });
1408
- it('should add appropriate messages for other finish reasons', async () => {
1409
- const testCases = [
1410
- {
1411
- reason: 'SAFETY',
1412
- message: '⚠️ Response stopped due to safety reasons.',
1413
- },
1414
- {
1415
- reason: 'RECITATION',
1416
- message: '⚠️ Response stopped due to recitation policy.',
1417
- },
1418
- {
1419
- reason: 'LANGUAGE',
1420
- message: '⚠️ Response stopped due to unsupported language.',
1421
- },
1422
- {
1423
- reason: 'BLOCKLIST',
1424
- message: '⚠️ Response stopped due to forbidden terms.',
1425
- },
1426
- {
1427
- reason: 'PROHIBITED_CONTENT',
1428
- message: '⚠️ Response stopped due to prohibited content.',
1429
- },
1430
- {
1431
- reason: 'SPII',
1432
- message: '⚠️ Response stopped due to sensitive personally identifiable information.',
1433
- },
1434
- { reason: 'OTHER', message: '⚠️ Response stopped for other reasons.' },
1435
- {
1436
- reason: 'MALFORMED_FUNCTION_CALL',
1437
- message: '⚠️ Response stopped due to malformed function call.',
1438
- },
1439
- {
1440
- reason: 'IMAGE_SAFETY',
1441
- message: '⚠️ Response stopped due to image safety violations.',
1442
- },
1443
- {
1444
- reason: 'UNEXPECTED_TOOL_CALL',
1445
- message: '⚠️ Response stopped due to unexpected tool call.',
1446
- },
1447
- ];
1448
- for (const { reason, message } of testCases) {
1449
- // Reset mocks for each test case
1450
- mockAddItem.mockClear();
1451
- mockSendMessageStream.mockReturnValue((async function* () {
1452
- yield {
1453
- type: ServerOSAEventType.Content,
1454
- value: `Response for ${reason}`,
1455
- };
1456
- yield {
1457
- type: ServerOSAEventType.Finished,
1458
- value: { reason, usageMetadata: undefined },
1459
- };
1460
- })());
1461
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1462
- vi.fn(), 80, 24));
1463
- await act(async () => {
1464
- await result.current.submitQuery(`Test ${reason}`);
1465
- });
1466
- await waitFor(() => {
1467
- expect(mockAddItem).toHaveBeenCalledWith({
1468
- type: 'info',
1469
- text: message,
1470
- }, expect.any(Number));
1471
- });
1472
- }
1473
- });
1474
- });
1475
- it('should process @include commands, adding user turn after processing to prevent race conditions', async () => {
1476
- const rawQuery = '@include file.txt Summarize this.';
1477
- const processedQueryParts = [
1478
- { text: 'Summarize this with content from @file.txt' },
1479
- { text: 'File content...' },
1480
- ];
1481
- const userMessageTimestamp = Date.now();
1482
- vi.spyOn(Date, 'now').mockReturnValue(userMessageTimestamp);
1483
- handleAtCommandSpy.mockResolvedValue({
1484
- processedQuery: processedQueryParts,
1485
- shouldProceed: true,
1486
- });
1487
- const { result } = renderHook(() => useOSAStream(mockConfig.getOSAClient(), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, // shellModeActive
1488
- vi.fn(), // getPreferredEditor
1489
- vi.fn(), // onAuthError
1490
- vi.fn(), // performMemoryRefresh
1491
- false, // modelSwitched
1492
- vi.fn(), // setModelSwitched
1493
- vi.fn(), // onEditorClose
1494
- vi.fn(), // onCancelSubmit
1495
- false, // visionModelPreviewEnabled
1496
- vi.fn(), // setShellInputFocused
1497
- 80, // terminalWidth
1498
- 24));
1499
- await act(async () => {
1500
- await result.current.submitQuery(rawQuery);
1501
- });
1502
- expect(handleAtCommandSpy).toHaveBeenCalledWith(expect.objectContaining({
1503
- query: rawQuery,
1504
- }));
1505
- expect(mockAddItem).toHaveBeenCalledWith({
1506
- type: MessageType.USER,
1507
- text: rawQuery,
1508
- }, userMessageTimestamp);
1509
- // FIX: The expectation now matches the actual call signature.
1510
- expect(mockSendMessageStream).toHaveBeenCalledWith(processedQueryParts, // Argument 1: The parts array directly
1511
- expect.any(AbortSignal), // Argument 2: An AbortSignal
1512
- expect.any(String));
1513
- });
1514
- describe('Thought Reset', () => {
1515
- it('should reset thought to null when starting a new prompt', async () => {
1516
- // First, simulate a response with a thought
1517
- mockSendMessageStream.mockReturnValue((async function* () {
1518
- yield {
1519
- type: ServerOSAEventType.Thought,
1520
- value: {
1521
- subject: 'Previous thought',
1522
- description: 'Old description',
1523
- },
1524
- };
1525
- yield {
1526
- type: ServerOSAEventType.Content,
1527
- value: 'Some response content',
1528
- };
1529
- yield {
1530
- type: ServerOSAEventType.Finished,
1531
- value: { reason: 'STOP', usageMetadata: undefined },
1532
- };
1533
- })());
1534
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1535
- () => { }, 80, 24));
1536
- // Submit first query to set a thought
1537
- await act(async () => {
1538
- await result.current.submitQuery('First query');
1539
- });
1540
- // Wait for the first response to complete
1541
- await waitFor(() => {
1542
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
1543
- type: 'OSA',
1544
- text: 'Some response content',
1545
- }), expect.any(Number));
1546
- });
1547
- // Now simulate a new response without a thought
1548
- mockSendMessageStream.mockReturnValue((async function* () {
1549
- yield {
1550
- type: ServerOSAEventType.Content,
1551
- value: 'New response content',
1552
- };
1553
- yield {
1554
- type: ServerOSAEventType.Finished,
1555
- value: { reason: 'STOP', usageMetadata: undefined },
1556
- };
1557
- })());
1558
- // Submit second query - thought should be reset
1559
- await act(async () => {
1560
- await result.current.submitQuery('Second query');
1561
- });
1562
- // The thought should be reset to null when starting the new prompt
1563
- // We can verify this by checking that the LoadingIndicator would not show the previous thought
1564
- // The actual thought state is internal to the hook, but we can verify the behavior
1565
- // by ensuring the second response doesn't show the previous thought
1566
- await waitFor(() => {
1567
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
1568
- type: 'OSA',
1569
- text: 'New response content',
1570
- }), expect.any(Number));
1571
- });
1572
- });
1573
- it('should memoize pendingHistoryItems', () => {
1574
- mockUseReactToolScheduler.mockReturnValue([
1575
- [],
1576
- mockScheduleToolCalls,
1577
- mockCancelAllToolCalls,
1578
- mockMarkToolsAsSubmitted,
1579
- ]);
1580
- const { result, rerender } = renderHook(() => useOSAStream(mockConfig.getOSAClient(), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1581
- vi.fn(), // setShellInputFocused
1582
- 80, 24));
1583
- const firstResult = result.current.pendingHistoryItems;
1584
- rerender();
1585
- const secondResult = result.current.pendingHistoryItems;
1586
- expect(firstResult).toStrictEqual(secondResult);
1587
- const newToolCalls = [
1588
- {
1589
- request: { callId: 'call1', name: 'tool1', args: {} },
1590
- status: 'executing',
1591
- tool: {
1592
- name: 'tool1',
1593
- displayName: 'tool1',
1594
- description: 'desc1',
1595
- build: vi.fn(),
1596
- },
1597
- invocation: {
1598
- getDescription: () => 'Mock description',
1599
- },
1600
- },
1601
- ];
1602
- mockUseReactToolScheduler.mockReturnValue([
1603
- newToolCalls,
1604
- mockScheduleToolCalls,
1605
- mockCancelAllToolCalls,
1606
- mockMarkToolsAsSubmitted,
1607
- ]);
1608
- rerender();
1609
- const thirdResult = result.current.pendingHistoryItems;
1610
- expect(thirdResult).not.toStrictEqual(secondResult);
1611
- });
1612
- it('should reset thought to null when user cancels', async () => {
1613
- // Mock a stream that yields a thought then gets cancelled
1614
- mockSendMessageStream.mockReturnValue((async function* () {
1615
- yield {
1616
- type: ServerOSAEventType.Thought,
1617
- value: { subject: 'Some thought', description: 'Description' },
1618
- };
1619
- yield { type: ServerOSAEventType.UserCancelled };
1620
- })());
1621
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1622
- () => { }, 80, 24));
1623
- // Submit query
1624
- await act(async () => {
1625
- await result.current.submitQuery('Test query');
1626
- });
1627
- // Verify cancellation message was added
1628
- await waitFor(() => {
1629
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
1630
- type: 'info',
1631
- text: 'User cancelled the request.',
1632
- }), expect.any(Number));
1633
- });
1634
- // Verify state is reset to idle
1635
- expect(result.current.streamingState).toBe(StreamingState.Idle);
1636
- });
1637
- it('should reset thought to null when there is an error', async () => {
1638
- // Mock a stream that yields a thought then encounters an error
1639
- mockSendMessageStream.mockReturnValue((async function* () {
1640
- yield {
1641
- type: ServerOSAEventType.Thought,
1642
- value: { subject: 'Some thought', description: 'Description' },
1643
- };
1644
- yield {
1645
- type: ServerOSAEventType.Error,
1646
- value: { error: { message: 'Test error' } },
1647
- };
1648
- })());
1649
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1650
- () => { }, 80, 24));
1651
- // Submit query
1652
- await act(async () => {
1653
- await result.current.submitQuery('Test query');
1654
- });
1655
- // Verify error message was added
1656
- await waitFor(() => {
1657
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
1658
- type: 'error',
1659
- }), expect.any(Number));
1660
- });
1661
- // Verify parseAndFormatApiError was called
1662
- expect(mockParseAndFormatApiError).toHaveBeenCalledWith({ message: 'Test error' }, expect.any(String), undefined, 'OSA-2.5-pro', 'OSA-2.5-flash');
1663
- });
1664
- });
1665
- describe('Concurrent Execution Prevention', () => {
1666
- it('should prevent concurrent submitQuery calls', async () => {
1667
- let resolveFirstCall;
1668
- let resolveSecondCall;
1669
- const firstCallPromise = new Promise((resolve) => {
1670
- resolveFirstCall = resolve;
1671
- });
1672
- const secondCallPromise = new Promise((resolve) => {
1673
- resolveSecondCall = resolve;
1674
- });
1675
- // Mock a long-running stream for the first call
1676
- const firstStream = (async function* () {
1677
- yield {
1678
- type: ServerOSAEventType.Content,
1679
- value: 'First call content',
1680
- };
1681
- await firstCallPromise; // Wait until we manually resolve
1682
- yield { type: ServerOSAEventType.Finished, value: 'STOP' };
1683
- })();
1684
- // Mock a stream for the second call (should not be used)
1685
- const secondStream = (async function* () {
1686
- yield {
1687
- type: ServerOSAEventType.Content,
1688
- value: 'Second call content',
1689
- };
1690
- await secondCallPromise;
1691
- yield { type: ServerOSAEventType.Finished, value: 'STOP' };
1692
- })();
1693
- let callCount = 0;
1694
- mockSendMessageStream.mockImplementation(() => {
1695
- callCount++;
1696
- if (callCount === 1) {
1697
- return firstStream;
1698
- }
1699
- else {
1700
- return secondStream;
1701
- }
1702
- });
1703
- const { result } = renderTestHook();
1704
- // Start first call
1705
- const firstCallResult = act(async () => {
1706
- await result.current.submitQuery('First query');
1707
- });
1708
- // Wait a bit to ensure first call has started
1709
- await new Promise((resolve) => setTimeout(resolve, 10));
1710
- // Try to start second call while first is still running
1711
- const secondCallResult = act(async () => {
1712
- await result.current.submitQuery('Second query');
1713
- });
1714
- // Resolve both calls
1715
- resolveFirstCall();
1716
- resolveSecondCall();
1717
- await Promise.all([firstCallResult, secondCallResult]);
1718
- // Verify only one call was made to sendMessageStream
1719
- expect(mockSendMessageStream).toHaveBeenCalledTimes(1);
1720
- expect(mockSendMessageStream).toHaveBeenCalledWith('First query', expect.any(AbortSignal), expect.any(String));
1721
- // Verify only the first query was added to history
1722
- const userMessages = mockAddItem.mock.calls.filter((call) => call[0].type === MessageType.USER);
1723
- expect(userMessages).toHaveLength(1);
1724
- expect(userMessages[0][0].text).toBe('First query');
1725
- });
1726
- it('should allow subsequent calls after first call completes', async () => {
1727
- // Mock streams that complete immediately
1728
- mockSendMessageStream
1729
- .mockReturnValueOnce((async function* () {
1730
- yield {
1731
- type: ServerOSAEventType.Content,
1732
- value: 'First response',
1733
- };
1734
- yield { type: ServerOSAEventType.Finished, value: 'STOP' };
1735
- })())
1736
- .mockReturnValueOnce((async function* () {
1737
- yield {
1738
- type: ServerOSAEventType.Content,
1739
- value: 'Second response',
1740
- };
1741
- yield { type: ServerOSAEventType.Finished, value: 'STOP' };
1742
- })());
1743
- const { result } = renderTestHook();
1744
- // First call
1745
- await act(async () => {
1746
- await result.current.submitQuery('First query');
1747
- });
1748
- // Second call after first completes
1749
- await act(async () => {
1750
- await result.current.submitQuery('Second query');
1751
- });
1752
- // Both calls should have been made
1753
- expect(mockSendMessageStream).toHaveBeenCalledTimes(2);
1754
- expect(mockSendMessageStream).toHaveBeenNthCalledWith(1, 'First query', expect.any(AbortSignal), expect.any(String));
1755
- expect(mockSendMessageStream).toHaveBeenNthCalledWith(2, 'Second query', expect.any(AbortSignal), expect.any(String));
1756
- });
1757
- it('should reset execution flag even when query preparation fails', async () => {
1758
- const { result } = renderTestHook();
1759
- // First call with empty query (should fail in preparation)
1760
- await act(async () => {
1761
- await result.current.submitQuery(' '); // Empty trimmed query
1762
- });
1763
- // Second call should work normally
1764
- await act(async () => {
1765
- await result.current.submitQuery('Second query');
1766
- });
1767
- // Verify that only the second call was made (empty query is filtered out)
1768
- expect(mockSendMessageStream).toHaveBeenCalledTimes(1);
1769
- expect(mockSendMessageStream).toHaveBeenCalledWith('Second query', expect.any(AbortSignal), expect.any(String));
1770
- });
1771
- });
1772
- // --- New tests focused on recent modifications ---
1773
- describe('Vision Auto Switch Integration', () => {
1774
- it('should call handleVisionSwitch and proceed to send when allowed', async () => {
1775
- mockHandleVisionSwitch.mockResolvedValueOnce({ shouldProceed: true });
1776
- mockSendMessageStream.mockReturnValue((async function* () {
1777
- yield { type: ServerOSAEventType.Content, value: 'ok' };
1778
- yield { type: ServerOSAEventType.Finished, value: 'STOP' };
1779
- })());
1780
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1781
- vi.fn(), // setShellInputFocused
1782
- 80, 24));
1783
- await act(async () => {
1784
- await result.current.submitQuery('image prompt');
1785
- });
1786
- await waitFor(() => {
1787
- expect(mockHandleVisionSwitch).toHaveBeenCalled();
1788
- expect(mockSendMessageStream).toHaveBeenCalled();
1789
- });
1790
- });
1791
- it('should gate submission when handleVisionSwitch returns shouldProceed=false', async () => {
1792
- mockHandleVisionSwitch.mockResolvedValueOnce({ shouldProceed: false });
1793
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1794
- vi.fn(), // setShellInputFocused
1795
- 80, 24));
1796
- await act(async () => {
1797
- await result.current.submitQuery('vision-gated');
1798
- });
1799
- // No call to API, no restoreOriginalModel needed since no override occurred
1800
- expect(mockSendMessageStream).not.toHaveBeenCalled();
1801
- expect(mockRestoreOriginalModel).not.toHaveBeenCalled();
1802
- // Next call allowed (flag reset path)
1803
- mockHandleVisionSwitch.mockResolvedValueOnce({ shouldProceed: true });
1804
- mockSendMessageStream.mockReturnValue((async function* () {
1805
- yield { type: ServerOSAEventType.Content, value: 'ok' };
1806
- yield { type: ServerOSAEventType.Finished, value: 'STOP' };
1807
- })());
1808
- await act(async () => {
1809
- await result.current.submitQuery('after-gate');
1810
- });
1811
- await waitFor(() => {
1812
- expect(mockSendMessageStream).toHaveBeenCalled();
1813
- });
1814
- });
1815
- });
1816
- describe('Model restore on completion and errors', () => {
1817
- it('should restore model after successful stream completion', async () => {
1818
- mockSendMessageStream.mockReturnValue((async function* () {
1819
- yield { type: ServerOSAEventType.Content, value: 'content' };
1820
- yield { type: ServerOSAEventType.Finished, value: 'STOP' };
1821
- })());
1822
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1823
- vi.fn(), // setShellInputFocused
1824
- 80, 24));
1825
- await act(async () => {
1826
- await result.current.submitQuery('restore-success');
1827
- });
1828
- await waitFor(() => {
1829
- expect(mockRestoreOriginalModel).toHaveBeenCalledTimes(1);
1830
- });
1831
- });
1832
- it('should restore model when an error occurs during streaming', async () => {
1833
- const testError = new Error('stream failure');
1834
- mockSendMessageStream.mockReturnValue((async function* () {
1835
- yield { type: ServerOSAEventType.Content, value: 'content' };
1836
- throw testError;
1837
- })());
1838
- const { result } = renderHook(() => useOSAStream(new MockedOSAClientClass(mockConfig), [], mockAddItem, mockConfig, mockLoadedSettings, mockOnDebugMessage, mockHandleSlashCommand, false, () => 'vscode', () => { }, () => Promise.resolve(), false, () => { }, () => { }, () => { }, false, // visionModelPreviewEnabled
1839
- vi.fn(), // setShellInputFocused
1840
- 80, 24));
1841
- await act(async () => {
1842
- await result.current.submitQuery('restore-error');
1843
- });
1844
- await waitFor(() => {
1845
- expect(mockRestoreOriginalModel).toHaveBeenCalledTimes(1);
1846
- });
1847
- });
1848
- });
1849
- describe('Loop Detection Confirmation', () => {
1850
- beforeEach(() => {
1851
- // Add mock for getLoopDetectionService to the config
1852
- const mockLoopDetectionService = {
1853
- disableForSession: vi.fn(),
1854
- };
1855
- mockConfig.getOSAClient = vi.fn().mockReturnValue({
1856
- ...new MockedOSAClientClass(mockConfig),
1857
- getLoopDetectionService: () => mockLoopDetectionService,
1858
- });
1859
- });
1860
- it('should set loopDetectionConfirmationRequest when LoopDetected event is received', async () => {
1861
- mockSendMessageStream.mockReturnValue((async function* () {
1862
- yield {
1863
- type: ServerOSAEventType.Content,
1864
- value: 'Some content',
1865
- };
1866
- yield {
1867
- type: ServerOSAEventType.LoopDetected,
1868
- };
1869
- })());
1870
- const { result } = renderTestHook();
1871
- await act(async () => {
1872
- await result.current.submitQuery('test query');
1873
- });
1874
- await waitFor(() => {
1875
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
1876
- expect(typeof result.current.loopDetectionConfirmationRequest?.onComplete).toBe('function');
1877
- });
1878
- });
1879
- it('should disable loop detection and show message when user selects "disable"', async () => {
1880
- const mockLoopDetectionService = {
1881
- disableForSession: vi.fn(),
1882
- };
1883
- const mockClient = {
1884
- ...new MockedOSAClientClass(mockConfig),
1885
- getLoopDetectionService: () => mockLoopDetectionService,
1886
- };
1887
- mockConfig.getOSAClient = vi.fn().mockReturnValue(mockClient);
1888
- mockSendMessageStream.mockReturnValueOnce((async function* () {
1889
- yield {
1890
- type: ServerOSAEventType.LoopDetected,
1891
- };
1892
- })());
1893
- const { result } = renderTestHook([], mockClient);
1894
- await act(async () => {
1895
- await result.current.submitQuery('test query');
1896
- });
1897
- // Wait for confirmation request to be set
1898
- await waitFor(() => {
1899
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
1900
- });
1901
- // Simulate user selecting "disable"
1902
- await act(async () => {
1903
- result.current.loopDetectionConfirmationRequest?.onComplete({
1904
- userSelection: 'disable',
1905
- });
1906
- });
1907
- // Verify loop detection was disabled
1908
- expect(mockLoopDetectionService.disableForSession).toHaveBeenCalledTimes(1);
1909
- // Verify confirmation request was cleared
1910
- expect(result.current.loopDetectionConfirmationRequest).toBeNull();
1911
- // Verify appropriate message was added
1912
- expect(mockAddItem).toHaveBeenCalledWith({
1913
- type: 'info',
1914
- text: 'Loop detection has been disabled for this session. Please try your request again.',
1915
- }, expect.any(Number));
1916
- });
1917
- it('should keep loop detection enabled and show message when user selects "keep"', async () => {
1918
- const mockLoopDetectionService = {
1919
- disableForSession: vi.fn(),
1920
- };
1921
- const mockClient = {
1922
- ...new MockedOSAClientClass(mockConfig),
1923
- getLoopDetectionService: () => mockLoopDetectionService,
1924
- };
1925
- mockConfig.getOSAClient = vi.fn().mockReturnValue(mockClient);
1926
- mockSendMessageStream.mockReturnValue((async function* () {
1927
- yield {
1928
- type: ServerOSAEventType.LoopDetected,
1929
- };
1930
- })());
1931
- const { result } = renderTestHook();
1932
- await act(async () => {
1933
- await result.current.submitQuery('test query');
1934
- });
1935
- // Wait for confirmation request to be set
1936
- await waitFor(() => {
1937
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
1938
- });
1939
- // Simulate user selecting "keep"
1940
- await act(async () => {
1941
- result.current.loopDetectionConfirmationRequest?.onComplete({
1942
- userSelection: 'keep',
1943
- });
1944
- });
1945
- // Verify loop detection was NOT disabled
1946
- expect(mockLoopDetectionService.disableForSession).not.toHaveBeenCalled();
1947
- // Verify confirmation request was cleared
1948
- expect(result.current.loopDetectionConfirmationRequest).toBeNull();
1949
- // Verify appropriate message was added
1950
- expect(mockAddItem).toHaveBeenCalledWith({
1951
- type: 'info',
1952
- text: 'A potential loop was detected. This can happen due to repetitive tool calls or other model behavior. The request has been halted.',
1953
- }, expect.any(Number));
1954
- });
1955
- it('should handle multiple loop detection events properly', async () => {
1956
- const { result } = renderTestHook();
1957
- // First loop detection - set up fresh mock for first call
1958
- mockSendMessageStream.mockReturnValueOnce((async function* () {
1959
- yield {
1960
- type: ServerOSAEventType.LoopDetected,
1961
- };
1962
- })());
1963
- // First loop detection
1964
- await act(async () => {
1965
- await result.current.submitQuery('first query');
1966
- });
1967
- await waitFor(() => {
1968
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
1969
- });
1970
- // Simulate user selecting "keep" for first request
1971
- await act(async () => {
1972
- result.current.loopDetectionConfirmationRequest?.onComplete({
1973
- userSelection: 'keep',
1974
- });
1975
- });
1976
- expect(result.current.loopDetectionConfirmationRequest).toBeNull();
1977
- // Verify first message was added
1978
- expect(mockAddItem).toHaveBeenCalledWith({
1979
- type: 'info',
1980
- text: 'A potential loop was detected. This can happen due to repetitive tool calls or other model behavior. The request has been halted.',
1981
- }, expect.any(Number));
1982
- // Second loop detection - set up fresh mock for second call
1983
- mockSendMessageStream.mockReturnValueOnce((async function* () {
1984
- yield {
1985
- type: ServerOSAEventType.LoopDetected,
1986
- };
1987
- })());
1988
- // Second loop detection
1989
- await act(async () => {
1990
- await result.current.submitQuery('second query');
1991
- });
1992
- await waitFor(() => {
1993
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
1994
- });
1995
- // Simulate user selecting "disable" for second request
1996
- await act(async () => {
1997
- result.current.loopDetectionConfirmationRequest?.onComplete({
1998
- userSelection: 'disable',
1999
- });
2000
- });
2001
- expect(result.current.loopDetectionConfirmationRequest).toBeNull();
2002
- // Verify second message was added
2003
- expect(mockAddItem).toHaveBeenCalledWith({
2004
- type: 'info',
2005
- text: 'Loop detection has been disabled for this session. Please try your request again.',
2006
- }, expect.any(Number));
2007
- });
2008
- it('should process LoopDetected event after moving pending history to history', async () => {
2009
- mockSendMessageStream.mockReturnValue((async function* () {
2010
- yield {
2011
- type: ServerOSAEventType.Content,
2012
- value: 'Some response content',
2013
- };
2014
- yield {
2015
- type: ServerOSAEventType.LoopDetected,
2016
- };
2017
- })());
2018
- const { result } = renderTestHook();
2019
- await act(async () => {
2020
- await result.current.submitQuery('test query');
2021
- });
2022
- // Verify that the content was added to history before the loop detection dialog
2023
- await waitFor(() => {
2024
- expect(mockAddItem).toHaveBeenCalledWith(expect.objectContaining({
2025
- type: 'OSA',
2026
- text: 'Some response content',
2027
- }), expect.any(Number));
2028
- });
2029
- // Then verify loop detection confirmation request was set
2030
- await waitFor(() => {
2031
- expect(result.current.loopDetectionConfirmationRequest).not.toBeNull();
2032
- });
2033
- });
2034
- });
2035
- });
2036
- //# sourceMappingURL=useGeminiStream.test.js.map