@umsai/ums-code 0.1.4-v2 → 0.3.0-v1

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 (382) hide show
  1. package/dist/package.json +11 -3
  2. package/dist/src/config/config.d.ts +6 -0
  3. package/dist/src/config/config.js +102 -11
  4. package/dist/src/config/config.js.map +1 -1
  5. package/dist/src/config/settings.d.ts +5 -0
  6. package/dist/src/config/settings.js +15 -1
  7. package/dist/src/config/settings.js.map +1 -1
  8. package/dist/src/config/settingsSchema.d.ts +75 -17
  9. package/dist/src/config/settingsSchema.js +57 -17
  10. package/dist/src/config/settingsSchema.js.map +1 -1
  11. package/dist/src/config/webSearch.d.ts +35 -0
  12. package/dist/src/config/webSearch.js +87 -0
  13. package/dist/src/config/webSearch.js.map +1 -0
  14. package/dist/src/core/auth.d.ts +1 -1
  15. package/dist/src/core/auth.js +19 -3
  16. package/dist/src/core/auth.js.map +1 -1
  17. package/dist/src/core/initializer.js +13 -2
  18. package/dist/src/core/initializer.js.map +1 -1
  19. package/dist/src/core/theme.js +4 -1
  20. package/dist/src/core/theme.js.map +1 -1
  21. package/dist/src/gemini.d.ts +1 -1
  22. package/dist/src/gemini.js +53 -44
  23. package/dist/src/gemini.js.map +1 -1
  24. package/dist/src/gemini.test.js +117 -0
  25. package/dist/src/gemini.test.js.map +1 -1
  26. package/dist/src/generated/git-commit.d.ts +2 -2
  27. package/dist/src/generated/git-commit.js +2 -2
  28. package/dist/src/i18n/index.d.ts +18 -0
  29. package/dist/src/i18n/index.js +184 -0
  30. package/dist/src/i18n/index.js.map +1 -0
  31. package/dist/src/i18n/locales/en.js +1129 -0
  32. package/dist/src/i18n/locales/zh.js +1052 -0
  33. package/dist/src/nonInteractive/control/ControlContext.d.ts +63 -0
  34. package/dist/src/nonInteractive/control/ControlContext.js +31 -0
  35. package/dist/src/nonInteractive/control/ControlContext.js.map +1 -0
  36. package/dist/src/nonInteractive/control/ControlDispatcher.d.ts +86 -0
  37. package/dist/src/nonInteractive/control/ControlDispatcher.js +238 -0
  38. package/dist/src/nonInteractive/control/ControlDispatcher.js.map +1 -0
  39. package/dist/src/nonInteractive/control/ControlDispatcher.test.d.ts +6 -0
  40. package/dist/src/nonInteractive/control/ControlDispatcher.test.js +549 -0
  41. package/dist/src/nonInteractive/control/ControlDispatcher.test.js.map +1 -0
  42. package/dist/src/nonInteractive/control/ControlService.d.ts +78 -0
  43. package/dist/src/nonInteractive/control/ControlService.js +154 -0
  44. package/dist/src/nonInteractive/control/ControlService.js.map +1 -0
  45. package/dist/src/nonInteractive/control/controllers/baseController.d.ts +50 -0
  46. package/dist/src/nonInteractive/control/controllers/baseController.js +102 -0
  47. package/dist/src/nonInteractive/control/controllers/baseController.js.map +1 -0
  48. package/dist/src/nonInteractive/control/controllers/hookController.d.ts +25 -0
  49. package/dist/src/nonInteractive/control/controllers/hookController.js +42 -0
  50. package/dist/src/nonInteractive/control/controllers/hookController.js.map +1 -0
  51. package/dist/src/nonInteractive/control/controllers/mcpController.d.ts +42 -0
  52. package/dist/src/nonInteractive/control/controllers/mcpController.js +205 -0
  53. package/dist/src/nonInteractive/control/controllers/mcpController.js.map +1 -0
  54. package/dist/src/nonInteractive/control/controllers/permissionController.d.ts +78 -0
  55. package/dist/src/nonInteractive/control/controllers/permissionController.js +358 -0
  56. package/dist/src/nonInteractive/control/controllers/permissionController.js.map +1 -0
  57. package/dist/src/nonInteractive/control/controllers/systemController.d.ts +56 -0
  58. package/dist/src/nonInteractive/control/controllers/systemController.js +166 -0
  59. package/dist/src/nonInteractive/control/controllers/systemController.js.map +1 -0
  60. package/dist/src/nonInteractive/control/types/serviceAPIs.d.ts +120 -0
  61. package/dist/src/nonInteractive/control/types/serviceAPIs.js +7 -0
  62. package/dist/src/nonInteractive/control/types/serviceAPIs.js.map +1 -0
  63. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.d.ts +446 -0
  64. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js +891 -0
  65. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.js.map +1 -0
  66. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.d.ts +6 -0
  67. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js +1197 -0
  68. package/dist/src/nonInteractive/io/BaseJsonOutputAdapter.test.js.map +1 -0
  69. package/dist/src/nonInteractive/io/JsonOutputAdapter.d.ts +29 -0
  70. package/dist/src/nonInteractive/io/JsonOutputAdapter.js +56 -0
  71. package/dist/src/nonInteractive/io/JsonOutputAdapter.js.map +1 -0
  72. package/dist/src/nonInteractive/io/JsonOutputAdapter.test.d.ts +6 -0
  73. package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js +624 -0
  74. package/dist/src/nonInteractive/io/JsonOutputAdapter.test.js.map +1 -0
  75. package/dist/src/nonInteractive/io/StreamJsonInputReader.d.ts +16 -0
  76. package/dist/src/nonInteractive/io/StreamJsonInputReader.js +54 -0
  77. package/dist/src/nonInteractive/io/StreamJsonInputReader.js.map +1 -0
  78. package/dist/src/nonInteractive/io/StreamJsonInputReader.test.d.ts +6 -0
  79. package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js +178 -0
  80. package/dist/src/nonInteractive/io/StreamJsonInputReader.test.js.map +1 -0
  81. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.d.ts +69 -0
  82. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js +185 -0
  83. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.js.map +1 -0
  84. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.d.ts +6 -0
  85. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js +808 -0
  86. package/dist/src/nonInteractive/io/StreamJsonOutputAdapter.test.js.map +1 -0
  87. package/dist/src/nonInteractive/session.d.ts +23 -0
  88. package/dist/src/nonInteractive/session.js +549 -0
  89. package/dist/src/nonInteractive/session.js.map +1 -0
  90. package/dist/src/nonInteractive/session.test.d.ts +6 -0
  91. package/dist/src/nonInteractive/session.test.js +407 -0
  92. package/dist/src/nonInteractive/session.test.js.map +1 -0
  93. package/dist/src/nonInteractive/types.d.ts +344 -0
  94. package/dist/src/nonInteractive/types.js +78 -0
  95. package/dist/src/nonInteractive/types.js.map +1 -0
  96. package/dist/src/nonInteractiveCli.d.ts +21 -1
  97. package/dist/src/nonInteractiveCli.js +204 -57
  98. package/dist/src/nonInteractiveCli.js.map +1 -1
  99. package/dist/src/nonInteractiveCliCommands.d.ts +19 -1
  100. package/dist/src/nonInteractiveCliCommands.js +69 -4
  101. package/dist/src/nonInteractiveCliCommands.js.map +1 -1
  102. package/dist/src/services/BuiltinCommandLoader.js +2 -0
  103. package/dist/src/services/BuiltinCommandLoader.js.map +1 -1
  104. package/dist/src/services/FileCommandLoader.js +4 -1
  105. package/dist/src/services/FileCommandLoader.js.map +1 -1
  106. package/dist/src/ui/AppContainer.js +41 -38
  107. package/dist/src/ui/AppContainer.js.map +1 -1
  108. package/dist/src/ui/auth/AuthDialog.d.ts +1 -13
  109. package/dist/src/ui/auth/AuthDialog.js +41 -111
  110. package/dist/src/ui/auth/AuthDialog.js.map +1 -1
  111. package/dist/src/ui/auth/AuthDialog.test.js +49 -19
  112. package/dist/src/ui/auth/AuthDialog.test.js.map +1 -1
  113. package/dist/src/ui/auth/AuthInProgress.js +2 -1
  114. package/dist/src/ui/auth/AuthInProgress.js.map +1 -1
  115. package/dist/src/ui/auth/useAuth.d.ts +9 -8
  116. package/dist/src/ui/auth/useAuth.js +135 -63
  117. package/dist/src/ui/auth/useAuth.js.map +1 -1
  118. package/dist/src/ui/commands/aboutCommand.js +7 -31
  119. package/dist/src/ui/commands/aboutCommand.js.map +1 -1
  120. package/dist/src/ui/commands/agentsCommand.js +10 -3
  121. package/dist/src/ui/commands/agentsCommand.js.map +1 -1
  122. package/dist/src/ui/commands/approvalModeCommand.js +8 -329
  123. package/dist/src/ui/commands/approvalModeCommand.js.map +1 -1
  124. package/dist/src/ui/commands/approvalModeCommand.test.js +19 -263
  125. package/dist/src/ui/commands/approvalModeCommand.test.js.map +1 -1
  126. package/dist/src/ui/commands/authCommand.js +4 -1
  127. package/dist/src/ui/commands/authCommand.js.map +1 -1
  128. package/dist/src/ui/commands/bugCommand.js +13 -47
  129. package/dist/src/ui/commands/bugCommand.js.map +1 -1
  130. package/dist/src/ui/commands/chatCommand.js +51 -25
  131. package/dist/src/ui/commands/chatCommand.js.map +1 -1
  132. package/dist/src/ui/commands/clearCommand.js +6 -3
  133. package/dist/src/ui/commands/clearCommand.js.map +1 -1
  134. package/dist/src/ui/commands/compressCommand.js +9 -4
  135. package/dist/src/ui/commands/compressCommand.js.map +1 -1
  136. package/dist/src/ui/commands/copyCommand.js +4 -1
  137. package/dist/src/ui/commands/copyCommand.js.map +1 -1
  138. package/dist/src/ui/commands/directoryCommand.js +30 -12
  139. package/dist/src/ui/commands/directoryCommand.js.map +1 -1
  140. package/dist/src/ui/commands/docsCommand.js +9 -3
  141. package/dist/src/ui/commands/docsCommand.js.map +1 -1
  142. package/dist/src/ui/commands/editorCommand.js +4 -1
  143. package/dist/src/ui/commands/editorCommand.js.map +1 -1
  144. package/dist/src/ui/commands/extensionsCommand.js +10 -3
  145. package/dist/src/ui/commands/extensionsCommand.js.map +1 -1
  146. package/dist/src/ui/commands/helpCommand.js +4 -1
  147. package/dist/src/ui/commands/helpCommand.js.map +1 -1
  148. package/dist/src/ui/commands/ideCommand.js +23 -7
  149. package/dist/src/ui/commands/ideCommand.js.map +1 -1
  150. package/dist/src/ui/commands/initCommand.js +5 -3
  151. package/dist/src/ui/commands/initCommand.js.map +1 -1
  152. package/dist/src/ui/commands/languageCommand.d.ts +7 -0
  153. package/dist/src/ui/commands/languageCommand.js +386 -0
  154. package/dist/src/ui/commands/languageCommand.js.map +1 -0
  155. package/dist/src/ui/commands/mcpCommand.js +38 -18
  156. package/dist/src/ui/commands/mcpCommand.js.map +1 -1
  157. package/dist/src/ui/commands/memoryCommand.js +54 -25
  158. package/dist/src/ui/commands/memoryCommand.js.map +1 -1
  159. package/dist/src/ui/commands/modelCommand.js +9 -4
  160. package/dist/src/ui/commands/modelCommand.js.map +1 -1
  161. package/dist/src/ui/commands/permissionsCommand.js +4 -1
  162. package/dist/src/ui/commands/permissionsCommand.js.map +1 -1
  163. package/dist/src/ui/commands/quitCommand.js +7 -2
  164. package/dist/src/ui/commands/quitCommand.js.map +1 -1
  165. package/dist/src/ui/commands/settingsCommand.js +4 -1
  166. package/dist/src/ui/commands/settingsCommand.js.map +1 -1
  167. package/dist/src/ui/commands/setupGithubCommand.js +4 -1
  168. package/dist/src/ui/commands/setupGithubCommand.js.map +1 -1
  169. package/dist/src/ui/commands/statsCommand.js +11 -4
  170. package/dist/src/ui/commands/statsCommand.js.map +1 -1
  171. package/dist/src/ui/commands/summaryCommand.js +15 -8
  172. package/dist/src/ui/commands/summaryCommand.js.map +1 -1
  173. package/dist/src/ui/commands/terminalSetupCommand.js +9 -3
  174. package/dist/src/ui/commands/terminalSetupCommand.js.map +1 -1
  175. package/dist/src/ui/commands/themeCommand.js +4 -1
  176. package/dist/src/ui/commands/themeCommand.js.map +1 -1
  177. package/dist/src/ui/commands/toolsCommand.js +5 -2
  178. package/dist/src/ui/commands/toolsCommand.js.map +1 -1
  179. package/dist/src/ui/commands/types.d.ts +1 -1
  180. package/dist/src/ui/commands/types.js.map +1 -1
  181. package/dist/src/ui/commands/vimCommand.js +4 -1
  182. package/dist/src/ui/commands/vimCommand.js.map +1 -1
  183. package/dist/src/ui/components/AboutBox.d.ts +2 -9
  184. package/dist/src/ui/components/AboutBox.js +6 -2
  185. package/dist/src/ui/components/AboutBox.js.map +1 -1
  186. package/dist/src/ui/components/ApprovalModeDialog.d.ts +21 -0
  187. package/dist/src/ui/components/ApprovalModeDialog.js +68 -0
  188. package/dist/src/ui/components/ApprovalModeDialog.js.map +1 -0
  189. package/dist/src/ui/components/AutoAcceptIndicator.js +7 -6
  190. package/dist/src/ui/components/AutoAcceptIndicator.js.map +1 -1
  191. package/dist/src/ui/components/Composer.js +4 -3
  192. package/dist/src/ui/components/Composer.js.map +1 -1
  193. package/dist/src/ui/components/ConfigInitDisplay.js +7 -3
  194. package/dist/src/ui/components/ConfigInitDisplay.js.map +1 -1
  195. package/dist/src/ui/components/ContextSummaryDisplay.js +33 -9
  196. package/dist/src/ui/components/ContextSummaryDisplay.js.map +1 -1
  197. package/dist/src/ui/components/DialogManager.js +60 -13
  198. package/dist/src/ui/components/DialogManager.js.map +1 -1
  199. package/dist/src/ui/components/EditorSettingsDialog.js +8 -3
  200. package/dist/src/ui/components/EditorSettingsDialog.js.map +1 -1
  201. package/dist/src/ui/components/Help.js +14 -4
  202. package/dist/src/ui/components/Help.js.map +1 -1
  203. package/dist/src/ui/components/HistoryItemDisplay.js +1 -1
  204. package/dist/src/ui/components/HistoryItemDisplay.js.map +1 -1
  205. package/dist/src/ui/components/HistoryItemDisplay.test.js +17 -8
  206. package/dist/src/ui/components/HistoryItemDisplay.test.js.map +1 -1
  207. package/dist/src/ui/components/InputPrompt.js +10 -136
  208. package/dist/src/ui/components/InputPrompt.js.map +1 -1
  209. package/dist/src/ui/components/LoadingIndicator.js +6 -1
  210. package/dist/src/ui/components/LoadingIndicator.js.map +1 -1
  211. package/dist/src/ui/components/ModelDialog.js +2 -1
  212. package/dist/src/ui/components/ModelDialog.js.map +1 -1
  213. package/dist/src/ui/components/ModelStatsDisplay.js +6 -5
  214. package/dist/src/ui/components/ModelStatsDisplay.js.map +1 -1
  215. package/dist/src/ui/components/OpenAIKeyPrompt.d.ts +19 -1
  216. package/dist/src/ui/components/OpenAIKeyPrompt.js +38 -6
  217. package/dist/src/ui/components/OpenAIKeyPrompt.js.map +1 -1
  218. package/dist/src/ui/components/ProQuotaDialog.js +5 -4
  219. package/dist/src/ui/components/ProQuotaDialog.js.map +1 -1
  220. package/dist/src/ui/components/QuitConfirmationDialog.js +6 -5
  221. package/dist/src/ui/components/QuitConfirmationDialog.js.map +1 -1
  222. package/dist/src/ui/components/QwenOAuthProgress.d.ts +2 -2
  223. package/dist/src/ui/components/QwenOAuthProgress.js +14 -7
  224. package/dist/src/ui/components/QwenOAuthProgress.js.map +1 -1
  225. package/dist/src/ui/components/QwenOAuthProgress.test.js +1 -0
  226. package/dist/src/ui/components/QwenOAuthProgress.test.js.map +1 -1
  227. package/dist/src/ui/components/SessionSummaryDisplay.js +2 -1
  228. package/dist/src/ui/components/SessionSummaryDisplay.js.map +1 -1
  229. package/dist/src/ui/components/SettingsDialog.d.ts +3 -1
  230. package/dist/src/ui/components/SettingsDialog.js +35 -12
  231. package/dist/src/ui/components/SettingsDialog.js.map +1 -1
  232. package/dist/src/ui/components/SettingsDialog.test.js +5 -4
  233. package/dist/src/ui/components/SettingsDialog.test.js.map +1 -1
  234. package/dist/src/ui/components/ShellConfirmationDialog.js +5 -4
  235. package/dist/src/ui/components/ShellConfirmationDialog.js.map +1 -1
  236. package/dist/src/ui/components/StatsDisplay.js +5 -4
  237. package/dist/src/ui/components/StatsDisplay.js.map +1 -1
  238. package/dist/src/ui/components/ThemeDialog.js +5 -2
  239. package/dist/src/ui/components/ThemeDialog.js.map +1 -1
  240. package/dist/src/ui/components/ToolStatsDisplay.js +3 -2
  241. package/dist/src/ui/components/ToolStatsDisplay.js.map +1 -1
  242. package/dist/src/ui/components/WelcomeBackDialog.js +13 -4
  243. package/dist/src/ui/components/WelcomeBackDialog.js.map +1 -1
  244. package/dist/src/ui/components/messages/CompressionMessage.js +10 -6
  245. package/dist/src/ui/components/messages/CompressionMessage.js.map +1 -1
  246. package/dist/src/ui/components/messages/ToolConfirmationMessage.js +40 -29
  247. package/dist/src/ui/components/messages/ToolConfirmationMessage.js.map +1 -1
  248. package/dist/src/ui/components/shared/BaseSelectionList.test.js +1 -1
  249. package/dist/src/ui/components/shared/BaseSelectionList.test.js.map +1 -1
  250. package/dist/src/ui/components/shared/ScopeSelector.js +3 -1
  251. package/dist/src/ui/components/shared/ScopeSelector.js.map +1 -1
  252. package/dist/src/ui/components/subagents/create/AgentCreationWizard.js +39 -26
  253. package/dist/src/ui/components/subagents/create/AgentCreationWizard.js.map +1 -1
  254. package/dist/src/ui/components/subagents/create/CreationSummary.js +20 -10
  255. package/dist/src/ui/components/subagents/create/CreationSummary.js.map +1 -1
  256. package/dist/src/ui/components/subagents/create/DescriptionInput.js +6 -3
  257. package/dist/src/ui/components/subagents/create/DescriptionInput.js.map +1 -1
  258. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js +7 -2
  259. package/dist/src/ui/components/subagents/create/GenerationMethodSelector.js.map +1 -1
  260. package/dist/src/ui/components/subagents/create/LocationSelector.js +7 -2
  261. package/dist/src/ui/components/subagents/create/LocationSelector.js.map +1 -1
  262. package/dist/src/ui/components/subagents/create/ToolSelector.js +8 -7
  263. package/dist/src/ui/components/subagents/create/ToolSelector.js.map +1 -1
  264. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js +29 -4
  265. package/dist/src/ui/components/subagents/manage/ActionSelectionStep.js.map +1 -1
  266. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js +6 -3
  267. package/dist/src/ui/components/subagents/manage/AgentDeleteStep.js.map +1 -1
  268. package/dist/src/ui/components/subagents/manage/AgentEditStep.js +14 -5
  269. package/dist/src/ui/components/subagents/manage/AgentEditStep.js.map +1 -1
  270. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js +13 -6
  271. package/dist/src/ui/components/subagents/manage/AgentSelectionStep.js.map +1 -1
  272. package/dist/src/ui/components/subagents/manage/AgentViewerStep.js +3 -2
  273. package/dist/src/ui/components/subagents/manage/AgentViewerStep.js.map +1 -1
  274. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js +14 -13
  275. package/dist/src/ui/components/subagents/manage/AgentsManagerDialog.js.map +1 -1
  276. package/dist/src/ui/components/subagents/runtime/AgentExecutionDisplay.js +8 -8
  277. package/dist/src/ui/components/views/McpStatus.js +28 -15
  278. package/dist/src/ui/components/views/McpStatus.js.map +1 -1
  279. package/dist/src/ui/components/views/ToolsList.js +2 -1
  280. package/dist/src/ui/components/views/ToolsList.js.map +1 -1
  281. package/dist/src/ui/contexts/UIActionsContext.d.ts +5 -4
  282. package/dist/src/ui/contexts/UIActionsContext.js +1 -0
  283. package/dist/src/ui/contexts/UIActionsContext.js.map +1 -1
  284. package/dist/src/ui/contexts/UIStateContext.d.ts +5 -7
  285. package/dist/src/ui/contexts/UIStateContext.js.map +1 -1
  286. package/dist/src/ui/editors/editorSettingsManager.js +1 -0
  287. package/dist/src/ui/editors/editorSettingsManager.js.map +1 -1
  288. package/dist/src/ui/hooks/atCommandProcessor.test.js +2 -0
  289. package/dist/src/ui/hooks/atCommandProcessor.test.js.map +1 -1
  290. package/dist/src/ui/hooks/slashCommandProcessor.d.ts +1 -0
  291. package/dist/src/ui/hooks/slashCommandProcessor.js +4 -7
  292. package/dist/src/ui/hooks/slashCommandProcessor.js.map +1 -1
  293. package/dist/src/ui/hooks/useApprovalModeCommand.d.ts +14 -0
  294. package/dist/src/ui/hooks/useApprovalModeCommand.js +33 -0
  295. package/dist/src/ui/hooks/useApprovalModeCommand.js.map +1 -0
  296. package/dist/src/ui/hooks/useAttentionNotifications.d.ts +14 -0
  297. package/dist/src/ui/hooks/useAttentionNotifications.js +41 -0
  298. package/dist/src/ui/hooks/useAttentionNotifications.js.map +1 -0
  299. package/dist/src/ui/hooks/useAttentionNotifications.test.d.ts +6 -0
  300. package/dist/src/ui/hooks/useAttentionNotifications.test.js +113 -0
  301. package/dist/src/ui/hooks/useAttentionNotifications.test.js.map +1 -0
  302. package/dist/src/ui/hooks/useCommandCompletion.d.ts +1 -4
  303. package/dist/src/ui/hooks/useCommandCompletion.js +1 -23
  304. package/dist/src/ui/hooks/useCommandCompletion.js.map +1 -1
  305. package/dist/src/ui/hooks/useDialogClose.d.ts +6 -3
  306. package/dist/src/ui/hooks/useDialogClose.js +5 -0
  307. package/dist/src/ui/hooks/useDialogClose.js.map +1 -1
  308. package/dist/src/ui/hooks/useGitBranchName.js +6 -3
  309. package/dist/src/ui/hooks/useGitBranchName.js.map +1 -1
  310. package/dist/src/ui/hooks/useGitBranchName.test.js +39 -21
  311. package/dist/src/ui/hooks/useGitBranchName.test.js.map +1 -1
  312. package/dist/src/ui/hooks/useInitializationAuthError.d.ts +22 -0
  313. package/dist/src/ui/hooks/useInitializationAuthError.js +40 -0
  314. package/dist/src/ui/hooks/useInitializationAuthError.js.map +1 -0
  315. package/dist/src/ui/hooks/usePhraseCycler.js +6 -4
  316. package/dist/src/ui/hooks/usePhraseCycler.js.map +1 -1
  317. package/dist/src/ui/hooks/useQwenAuth.d.ts +7 -12
  318. package/dist/src/ui/hooks/useQwenAuth.js +4 -8
  319. package/dist/src/ui/hooks/useQwenAuth.js.map +1 -1
  320. package/dist/src/ui/hooks/useQwenAuth.test.js +72 -98
  321. package/dist/src/ui/hooks/useQwenAuth.test.js.map +1 -1
  322. package/dist/src/ui/hooks/useThemeCommand.js +8 -3
  323. package/dist/src/ui/hooks/useThemeCommand.js.map +1 -1
  324. package/dist/src/ui/models/availableModels.js +7 -2
  325. package/dist/src/ui/models/availableModels.js.map +1 -1
  326. package/dist/src/ui/types.d.ts +32 -14
  327. package/dist/src/ui/types.js.map +1 -1
  328. package/dist/src/ui/utils/clipboardUtils.js +3 -3
  329. package/dist/src/ui/utils/clipboardUtils.js.map +1 -1
  330. package/dist/src/ui/utils/commandUtils.d.ts +16 -0
  331. package/dist/src/ui/utils/commandUtils.js +16 -1
  332. package/dist/src/ui/utils/commandUtils.js.map +1 -1
  333. package/dist/src/ui/utils/commandUtils.test.js +5 -2
  334. package/dist/src/ui/utils/commandUtils.test.js.map +1 -1
  335. package/dist/src/ui/utils/terminalSetup.js +45 -18
  336. package/dist/src/ui/utils/terminalSetup.js.map +1 -1
  337. package/dist/src/utils/attentionNotification.d.ts +20 -0
  338. package/dist/src/utils/attentionNotification.js +34 -0
  339. package/dist/src/utils/attentionNotification.js.map +1 -0
  340. package/dist/src/utils/attentionNotification.test.d.ts +6 -0
  341. package/dist/src/utils/attentionNotification.test.js +46 -0
  342. package/dist/src/utils/attentionNotification.test.js.map +1 -0
  343. package/dist/src/utils/dialogScopeUtils.d.ts +0 -4
  344. package/dist/src/utils/dialogScopeUtils.js +5 -2
  345. package/dist/src/utils/dialogScopeUtils.js.map +1 -1
  346. package/dist/src/utils/errors.d.ts +10 -2
  347. package/dist/src/utils/errors.js +14 -13
  348. package/dist/src/utils/errors.js.map +1 -1
  349. package/dist/src/utils/errors.test.js +91 -54
  350. package/dist/src/utils/errors.test.js.map +1 -1
  351. package/dist/src/utils/nonInteractiveHelpers.d.ts +88 -0
  352. package/dist/src/utils/nonInteractiveHelpers.js +470 -0
  353. package/dist/src/utils/nonInteractiveHelpers.js.map +1 -0
  354. package/dist/src/utils/nonInteractiveHelpers.test.d.ts +6 -0
  355. package/dist/src/utils/nonInteractiveHelpers.test.js +945 -0
  356. package/dist/src/utils/nonInteractiveHelpers.test.js.map +1 -0
  357. package/dist/src/utils/sandbox.js +1 -1
  358. package/dist/src/utils/sandbox.js.map +1 -1
  359. package/dist/src/utils/settingsUtils.js +7 -1
  360. package/dist/src/utils/settingsUtils.js.map +1 -1
  361. package/dist/src/utils/systemInfo.d.ts +66 -0
  362. package/dist/src/utils/systemInfo.js +125 -0
  363. package/dist/src/utils/systemInfo.js.map +1 -0
  364. package/dist/src/utils/systemInfo.test.d.ts +6 -0
  365. package/dist/src/utils/systemInfo.test.js +259 -0
  366. package/dist/src/utils/systemInfo.test.js.map +1 -0
  367. package/dist/src/utils/systemInfoFields.d.ts +22 -0
  368. package/dist/src/utils/systemInfoFields.js +96 -0
  369. package/dist/src/utils/systemInfoFields.js.map +1 -0
  370. package/dist/src/utils/userStartupWarnings.js +9 -4
  371. package/dist/src/utils/userStartupWarnings.js.map +1 -1
  372. package/dist/src/validateNonInterActiveAuth.js +27 -6
  373. package/dist/src/validateNonInterActiveAuth.js.map +1 -1
  374. package/dist/src/zed-integration/acp.js +1 -2
  375. package/dist/src/zed-integration/acp.js.map +1 -1
  376. package/dist/src/zed-integration/schema.d.ts +506 -264
  377. package/dist/src/zed-integration/schema.js +13 -0
  378. package/dist/src/zed-integration/schema.js.map +1 -1
  379. package/dist/src/zed-integration/zedIntegration.js +376 -32
  380. package/dist/src/zed-integration/zedIntegration.js.map +1 -1
  381. package/dist/tsconfig.tsbuildinfo +1 -1
  382. package/package.json +12 -4
@@ -237,6 +237,18 @@ export const promptRequestSchema = z.object({
237
237
  prompt: z.array(contentBlockSchema),
238
238
  sessionId: z.string(),
239
239
  });
240
+ export const availableCommandInputSchema = z.object({
241
+ hint: z.string(),
242
+ });
243
+ export const availableCommandSchema = z.object({
244
+ description: z.string(),
245
+ input: availableCommandInputSchema.nullable().optional(),
246
+ name: z.string(),
247
+ });
248
+ export const availableCommandsUpdateSchema = z.object({
249
+ availableCommands: z.array(availableCommandSchema),
250
+ sessionUpdate: z.literal('available_commands_update'),
251
+ });
240
252
  export const sessionUpdateSchema = z.union([
241
253
  z.object({
242
254
  content: contentBlockSchema,
@@ -274,6 +286,7 @@ export const sessionUpdateSchema = z.union([
274
286
  entries: z.array(planEntrySchema),
275
287
  sessionUpdate: z.literal('plan'),
276
288
  }),
289
+ availableCommandsUpdateSchema,
277
290
  ]);
278
291
  export const agentResponseSchema = z.union([
279
292
  initializeResponseSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/zed-integration/schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,YAAY,EAAE,cAAc;IAC5B,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,YAAY,EAAE,cAAc;IAC5B,WAAW,EAAE,aAAa;IAC1B,cAAc,EAAE,gBAAgB;CACjC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,iBAAiB,EAAE,mBAAmB;IACtC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AC,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC;IACxC,uBAAuB;IACvB,yBAAyB;IACzB,uBAAuB;IACvB,wBAAwB;IACxB,mBAAmB;CACpB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,uBAAuB,GAAG,yBAAyB,CAAC"}
@@ -3,7 +3,7 @@
3
3
  * Copyright 2025 Google LLC
4
4
  * SPDX-License-Identifier: Apache-2.0
5
5
  */
6
- import { AuthType, clearCachedCredentialFile, convertToFunctionResponse, DiscoveredMCPTool, StreamEventType, DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_MODEL_AUTO, DEFAULT_GEMINI_FLASH_MODEL, MCPServerConfig, ToolConfirmationOutcome, logToolCall, getErrorStatus, isWithinRoot, isNodeError, } from '@umsai/ums-code-core';
6
+ import { AuthType, clearCachedCredentialFile, convertToFunctionResponse, DiscoveredMCPTool, StreamEventType, DEFAULT_GEMINI_MODEL, DEFAULT_GEMINI_MODEL_AUTO, DEFAULT_GEMINI_FLASH_MODEL, MCPServerConfig, ToolConfirmationOutcome, logToolCall, logUserPrompt, getErrorStatus, isWithinRoot, isNodeError, SubAgentEventType, TaskTool, Kind, TodoWriteTool, UserPromptEvent, } from '@umsai/ums-code-core';
7
7
  import * as acp from './acp.js';
8
8
  import { AcpFileSystemService } from './fileSystemService.js';
9
9
  import { Readable, Writable } from 'node:stream';
@@ -16,6 +16,21 @@ import { getErrorMessage } from '../utils/errors.js';
16
16
  import { ExtensionStorage } from '../config/extension.js';
17
17
  import { loadCliConfig } from '../config/config.js';
18
18
  import { ExtensionEnablementManager } from '../config/extensions/extensionEnablement.js';
19
+ import { handleSlashCommand, getAvailableCommands, } from '../nonInteractiveCliCommands.js';
20
+ import { isSlashCommand } from '../ui/utils/commandUtils.js';
21
+ /**
22
+ * Built-in commands that are allowed in ACP integration mode.
23
+ * Only these commands will be available when using handleSlashCommand
24
+ * or getAvailableCommands in ACP integration.
25
+ *
26
+ * Currently, only "init" is supported because `handleSlashCommand` in
27
+ * nonInteractiveCliCommands.ts only supports handling results where
28
+ * result.type is "submit_prompt". Other result types are either coupled
29
+ * to the UI or cannot send notifications to the client via ACP.
30
+ *
31
+ * If you have a good idea to add support for more commands, PRs are welcome!
32
+ */
33
+ const ALLOWED_BUILTIN_COMMANDS_FOR_ACP = ['init'];
19
34
  /**
20
35
  * Resolves the model to use based on the current configuration.
21
36
  *
@@ -87,7 +102,7 @@ class GeminiAgent {
87
102
  this.settings.setValue(SettingScope.User, 'security.auth.selectedType', method);
88
103
  }
89
104
  async newSession({ cwd, mcpServers, }) {
90
- const sessionId = randomUUID();
105
+ const sessionId = this.config.getSessionId() || randomUUID();
91
106
  const config = await this.newSessionConfig(sessionId, cwd, mcpServers);
92
107
  let isAuthenticated = false;
93
108
  if (this.settings.merged.security?.auth?.selectedType) {
@@ -108,8 +123,12 @@ class GeminiAgent {
108
123
  }
109
124
  const geminiClient = config.getGeminiClient();
110
125
  const chat = await geminiClient.startChat();
111
- const session = new Session(sessionId, chat, config, this.client);
126
+ const session = new Session(sessionId, chat, config, this.client, this.settings);
112
127
  this.sessions.set(sessionId, session);
128
+ // Send available commands update as the first session update
129
+ setTimeout(async () => {
130
+ await session.sendAvailableCommandsUpdate();
131
+ }, 0);
113
132
  return {
114
133
  sessionId,
115
134
  };
@@ -148,12 +167,15 @@ class Session {
148
167
  chat;
149
168
  config;
150
169
  client;
170
+ settings;
151
171
  pendingPrompt = null;
152
- constructor(id, chat, config, client) {
172
+ turn = 0;
173
+ constructor(id, chat, config, client, settings) {
153
174
  this.id = id;
154
175
  this.chat = chat;
155
176
  this.config = config;
156
177
  this.client = client;
178
+ this.settings = settings;
157
179
  }
158
180
  async cancelPendingPrompt() {
159
181
  if (!this.pendingPrompt) {
@@ -166,9 +188,38 @@ class Session {
166
188
  this.pendingPrompt?.abort();
167
189
  const pendingSend = new AbortController();
168
190
  this.pendingPrompt = pendingSend;
169
- const promptId = Math.random().toString(16).slice(2);
191
+ // Increment turn counter for each user prompt
192
+ this.turn += 1;
170
193
  const chat = this.chat;
171
- const parts = await this.#resolvePrompt(params.prompt, pendingSend.signal);
194
+ const promptId = this.config.getSessionId() + '########' + this.turn;
195
+ // Extract text from all text blocks to construct the full prompt text for logging
196
+ const promptText = params.prompt
197
+ .filter((block) => block.type === 'text')
198
+ .map((block) => (block.type === 'text' ? block.text : ''))
199
+ .join(' ');
200
+ // Log user prompt
201
+ logUserPrompt(this.config, new UserPromptEvent(promptText.length, promptId, this.config.getContentGeneratorConfig()?.authType, promptText));
202
+ // Check if the input contains a slash command
203
+ // Extract text from the first text block if present
204
+ const firstTextBlock = params.prompt.find((block) => block.type === 'text');
205
+ const inputText = firstTextBlock?.text || '';
206
+ let parts;
207
+ if (isSlashCommand(inputText)) {
208
+ // Handle slash command - allow specific built-in commands for ACP integration
209
+ const slashCommandResult = await handleSlashCommand(inputText, pendingSend, this.config, this.settings, ALLOWED_BUILTIN_COMMANDS_FOR_ACP);
210
+ if (slashCommandResult) {
211
+ // Use the result from the slash command
212
+ parts = slashCommandResult;
213
+ }
214
+ else {
215
+ // Slash command didn't return a prompt, continue with normal processing
216
+ parts = await this.#resolvePrompt(params.prompt, pendingSend.signal);
217
+ }
218
+ }
219
+ else {
220
+ // Normal processing for non-slash commands
221
+ parts = await this.#resolvePrompt(params.prompt, pendingSend.signal);
222
+ }
172
223
  let nextMessage = { role: 'user', parts };
173
224
  while (nextMessage !== null) {
174
225
  if (pendingSend.signal.aborted) {
@@ -237,6 +288,27 @@ class Session {
237
288
  };
238
289
  await this.client.sessionUpdate(params);
239
290
  }
291
+ async sendAvailableCommandsUpdate() {
292
+ const abortController = new AbortController();
293
+ try {
294
+ const slashCommands = await getAvailableCommands(this.config, this.settings, abortController.signal, ALLOWED_BUILTIN_COMMANDS_FOR_ACP);
295
+ // Convert SlashCommand[] to AvailableCommand[] format for ACP protocol
296
+ const availableCommands = slashCommands.map((cmd) => ({
297
+ name: cmd.name,
298
+ description: cmd.description,
299
+ input: null,
300
+ }));
301
+ const update = {
302
+ sessionUpdate: 'available_commands_update',
303
+ availableCommands,
304
+ };
305
+ await this.sendUpdate(update);
306
+ }
307
+ catch (error) {
308
+ // Log error but don't fail session creation
309
+ console.error('Error sending available commands update:', error);
310
+ }
311
+ }
240
312
  async runTool(abortSignal, promptId, fc) {
241
313
  const callId = fc.id ?? `${fc.name}-${Date.now()}`;
242
314
  const args = (fc.args ?? {});
@@ -275,8 +347,20 @@ class Session {
275
347
  if (!tool) {
276
348
  return errorResponse(new Error(`Tool "${fc.name}" not found in registry.`));
277
349
  }
350
+ // Detect TodoWriteTool early - route to plan updates instead of tool_call events
351
+ const isTodoWriteTool = fc.name === TodoWriteTool.Name || tool.name === TodoWriteTool.Name;
352
+ // Declare subAgentToolEventListeners outside try block for cleanup in catch
353
+ let subAgentToolEventListeners = [];
278
354
  try {
279
355
  const invocation = tool.build(args);
356
+ // Detect TaskTool and set up sub-agent tool tracking
357
+ const isTaskTool = tool.name === TaskTool.Name;
358
+ if (isTaskTool && 'eventEmitter' in invocation) {
359
+ // Access eventEmitter from TaskTool invocation
360
+ const taskEventEmitter = invocation.eventEmitter;
361
+ // Set up sub-agent tool tracking
362
+ subAgentToolEventListeners = this.setupSubAgentToolTracking(taskEventEmitter, abortSignal);
363
+ }
280
364
  const confirmationDetails = await invocation.shouldConfirmExecute(abortSignal);
281
365
  if (confirmationDetails) {
282
366
  const content = [];
@@ -322,7 +406,8 @@ class Session {
322
406
  }
323
407
  }
324
408
  }
325
- else {
409
+ else if (!isTodoWriteTool) {
410
+ // Skip tool_call event for TodoWriteTool
326
411
  await this.sendUpdate({
327
412
  sessionUpdate: 'tool_call',
328
413
  toolCallId: callId,
@@ -334,13 +419,45 @@ class Session {
334
419
  });
335
420
  }
336
421
  const toolResult = await invocation.execute(abortSignal);
337
- const content = toToolCallContent(toolResult);
338
- await this.sendUpdate({
339
- sessionUpdate: 'tool_call_update',
340
- toolCallId: callId,
341
- status: 'completed',
342
- content: content ? [content] : [],
343
- });
422
+ // Clean up event listeners
423
+ subAgentToolEventListeners.forEach((cleanup) => cleanup());
424
+ // Handle TodoWriteTool: extract todos and send plan update
425
+ if (isTodoWriteTool) {
426
+ // Extract todos from args (initial state)
427
+ let todos = [];
428
+ if (Array.isArray(args['todos'])) {
429
+ todos = args['todos'];
430
+ }
431
+ // If returnDisplay has todos (e.g., modified by user), use those instead
432
+ if (toolResult.returnDisplay &&
433
+ typeof toolResult.returnDisplay === 'object' &&
434
+ 'type' in toolResult.returnDisplay &&
435
+ toolResult.returnDisplay.type === 'todo_list' &&
436
+ 'todos' in toolResult.returnDisplay &&
437
+ Array.isArray(toolResult.returnDisplay.todos)) {
438
+ todos = toolResult.returnDisplay.todos;
439
+ }
440
+ // Convert todos to plan entries and send plan update
441
+ if (todos.length > 0 || Array.isArray(args['todos'])) {
442
+ const planEntries = convertTodosToPlanEntries(todos);
443
+ await this.sendUpdate({
444
+ sessionUpdate: 'plan',
445
+ entries: planEntries,
446
+ });
447
+ }
448
+ // Skip tool_call_update event for TodoWriteTool
449
+ // Still log and return function response for LLM
450
+ }
451
+ else {
452
+ // Normal tool handling: send tool_call_update
453
+ const content = toToolCallContent(toolResult);
454
+ await this.sendUpdate({
455
+ sessionUpdate: 'tool_call_update',
456
+ toolCallId: callId,
457
+ status: 'completed',
458
+ content: content ? [content] : [],
459
+ });
460
+ }
344
461
  const durationMs = Date.now() - startTime;
345
462
  logToolCall(this.config, {
346
463
  'event.name': 'tool_call',
@@ -358,6 +475,8 @@ class Session {
358
475
  return convertToFunctionResponse(fc.name, callId, toolResult.llmContent);
359
476
  }
360
477
  catch (e) {
478
+ // Ensure cleanup on error
479
+ subAgentToolEventListeners.forEach((cleanup) => cleanup());
361
480
  const error = e instanceof Error ? e : new Error(String(e));
362
481
  await this.sendUpdate({
363
482
  sessionUpdate: 'tool_call_update',
@@ -370,6 +489,235 @@ class Session {
370
489
  return errorResponse(error);
371
490
  }
372
491
  }
492
+ /**
493
+ * Sets up event listeners to track sub-agent tool calls within a TaskTool execution.
494
+ * Converts subagent tool call events into zedIntegration session updates.
495
+ *
496
+ * @param eventEmitter - The SubAgentEventEmitter from TaskTool
497
+ * @param abortSignal - Signal to abort tracking if parent is cancelled
498
+ * @returns Array of cleanup functions to remove event listeners
499
+ */
500
+ setupSubAgentToolTracking(eventEmitter, abortSignal) {
501
+ const cleanupFunctions = [];
502
+ const toolRegistry = this.config.getToolRegistry();
503
+ // Track subagent tool call states
504
+ const subAgentToolStates = new Map();
505
+ // Listen for tool call start
506
+ const onToolCall = (...args) => {
507
+ const event = args[0];
508
+ if (abortSignal.aborted)
509
+ return;
510
+ const subAgentTool = toolRegistry.getTool(event.name);
511
+ let subAgentInvocation;
512
+ let toolKind = 'other';
513
+ let locations = [];
514
+ if (subAgentTool) {
515
+ try {
516
+ subAgentInvocation = subAgentTool.build(event.args);
517
+ toolKind = this.mapToolKind(subAgentTool.kind);
518
+ locations = subAgentInvocation.toolLocations().map((loc) => ({
519
+ path: loc.path,
520
+ line: loc.line ?? null,
521
+ }));
522
+ }
523
+ catch (e) {
524
+ // If building fails, continue with defaults
525
+ console.warn(`Failed to build subagent tool ${event.name}:`, e);
526
+ }
527
+ }
528
+ // Save state for subsequent updates
529
+ subAgentToolStates.set(event.callId, {
530
+ tool: subAgentTool,
531
+ invocation: subAgentInvocation,
532
+ args: event.args,
533
+ });
534
+ // Check if this is TodoWriteTool - if so, skip sending tool_call event
535
+ // Plan update will be sent in onToolResult when we have the final state
536
+ if (event.name === TodoWriteTool.Name) {
537
+ return;
538
+ }
539
+ // Send tool call start update with rawInput
540
+ void this.sendUpdate({
541
+ sessionUpdate: 'tool_call',
542
+ toolCallId: event.callId,
543
+ status: 'in_progress',
544
+ title: event.description || event.name,
545
+ content: [],
546
+ locations,
547
+ kind: toolKind,
548
+ rawInput: event.args,
549
+ });
550
+ };
551
+ // Listen for tool call result
552
+ const onToolResult = (...args) => {
553
+ const event = args[0];
554
+ if (abortSignal.aborted)
555
+ return;
556
+ const state = subAgentToolStates.get(event.callId);
557
+ // Check if this is TodoWriteTool - if so, route to plan updates
558
+ if (event.name === TodoWriteTool.Name) {
559
+ let todos;
560
+ // Try to extract todos from resultDisplay first (final state)
561
+ if (event.resultDisplay) {
562
+ try {
563
+ // resultDisplay might be a JSON stringified object
564
+ const parsed = typeof event.resultDisplay === 'string'
565
+ ? JSON.parse(event.resultDisplay)
566
+ : event.resultDisplay;
567
+ if (typeof parsed === 'object' &&
568
+ parsed !== null &&
569
+ 'type' in parsed &&
570
+ parsed.type === 'todo_list' &&
571
+ 'todos' in parsed &&
572
+ Array.isArray(parsed.todos)) {
573
+ todos = parsed.todos;
574
+ }
575
+ }
576
+ catch {
577
+ // If parsing fails, ignore - resultDisplay might not be JSON
578
+ }
579
+ }
580
+ // Fallback to args if resultDisplay doesn't have todos
581
+ if (!todos && state?.args && Array.isArray(state.args['todos'])) {
582
+ todos = state.args['todos'];
583
+ }
584
+ // Send plan update if we have todos
585
+ if (todos) {
586
+ const planEntries = convertTodosToPlanEntries(todos);
587
+ void this.sendUpdate({
588
+ sessionUpdate: 'plan',
589
+ entries: planEntries,
590
+ });
591
+ }
592
+ // Skip sending tool_call_update event for TodoWriteTool
593
+ // Clean up state
594
+ subAgentToolStates.delete(event.callId);
595
+ return;
596
+ }
597
+ let content = [];
598
+ // If there's a result display, try to convert to ToolCallContent
599
+ if (event.resultDisplay && state?.invocation) {
600
+ // resultDisplay is typically a string
601
+ if (typeof event.resultDisplay === 'string') {
602
+ content = [
603
+ {
604
+ type: 'content',
605
+ content: {
606
+ type: 'text',
607
+ text: event.resultDisplay,
608
+ },
609
+ },
610
+ ];
611
+ }
612
+ }
613
+ // Send tool call completion update
614
+ void this.sendUpdate({
615
+ sessionUpdate: 'tool_call_update',
616
+ toolCallId: event.callId,
617
+ status: event.success ? 'completed' : 'failed',
618
+ content: content.length > 0 ? content : [],
619
+ title: state?.invocation?.getDescription() ?? event.name,
620
+ kind: state?.tool ? this.mapToolKind(state.tool.kind) : null,
621
+ locations: state?.invocation?.toolLocations().map((loc) => ({
622
+ path: loc.path,
623
+ line: loc.line ?? null,
624
+ })) ?? null,
625
+ rawInput: state?.args,
626
+ });
627
+ // Clean up state
628
+ subAgentToolStates.delete(event.callId);
629
+ };
630
+ // Listen for permission requests
631
+ const onToolWaitingApproval = async (...args) => {
632
+ const event = args[0];
633
+ if (abortSignal.aborted)
634
+ return;
635
+ const state = subAgentToolStates.get(event.callId);
636
+ const content = [];
637
+ // Handle different confirmation types
638
+ if (event.confirmationDetails.type === 'edit') {
639
+ const editDetails = event.confirmationDetails;
640
+ content.push({
641
+ type: 'diff',
642
+ path: editDetails.fileName,
643
+ oldText: editDetails.originalContent ?? '',
644
+ newText: editDetails.newContent,
645
+ });
646
+ }
647
+ // Build permission request options from confirmation details
648
+ // event.confirmationDetails already contains all fields except onConfirm,
649
+ // which we add here to satisfy the type requirement for toPermissionOptions
650
+ const fullConfirmationDetails = {
651
+ ...event.confirmationDetails,
652
+ onConfirm: async () => {
653
+ // This is a placeholder - the actual response is handled via event.respond
654
+ },
655
+ };
656
+ const params = {
657
+ sessionId: this.id,
658
+ options: toPermissionOptions(fullConfirmationDetails),
659
+ toolCall: {
660
+ toolCallId: event.callId,
661
+ status: 'pending',
662
+ title: event.description || event.name,
663
+ content,
664
+ locations: state?.invocation?.toolLocations().map((loc) => ({
665
+ path: loc.path,
666
+ line: loc.line ?? null,
667
+ })) ?? [],
668
+ kind: state?.tool ? this.mapToolKind(state.tool.kind) : 'other',
669
+ rawInput: state?.args,
670
+ },
671
+ };
672
+ try {
673
+ // Request permission from zed client
674
+ const output = await this.client.requestPermission(params);
675
+ const outcome = output.outcome.outcome === 'cancelled'
676
+ ? ToolConfirmationOutcome.Cancel
677
+ : z
678
+ .nativeEnum(ToolConfirmationOutcome)
679
+ .parse(output.outcome.optionId);
680
+ // Respond to subagent with the outcome
681
+ await event.respond(outcome);
682
+ }
683
+ catch (error) {
684
+ // If permission request fails, cancel the tool call
685
+ console.error(`Permission request failed for subagent tool ${event.name}:`, error);
686
+ await event.respond(ToolConfirmationOutcome.Cancel);
687
+ }
688
+ };
689
+ // Register event listeners
690
+ eventEmitter.on(SubAgentEventType.TOOL_CALL, onToolCall);
691
+ eventEmitter.on(SubAgentEventType.TOOL_RESULT, onToolResult);
692
+ eventEmitter.on(SubAgentEventType.TOOL_WAITING_APPROVAL, onToolWaitingApproval);
693
+ // Return cleanup functions
694
+ cleanupFunctions.push(() => {
695
+ eventEmitter.off(SubAgentEventType.TOOL_CALL, onToolCall);
696
+ eventEmitter.off(SubAgentEventType.TOOL_RESULT, onToolResult);
697
+ eventEmitter.off(SubAgentEventType.TOOL_WAITING_APPROVAL, onToolWaitingApproval);
698
+ });
699
+ return cleanupFunctions;
700
+ }
701
+ /**
702
+ * Maps core Tool Kind enum to ACP ToolKind string literals.
703
+ *
704
+ * @param kind - The core Kind enum value
705
+ * @returns The corresponding ACP ToolKind string literal
706
+ */
707
+ mapToolKind(kind) {
708
+ const kindMap = {
709
+ [Kind.Read]: 'read',
710
+ [Kind.Edit]: 'edit',
711
+ [Kind.Delete]: 'delete',
712
+ [Kind.Move]: 'move',
713
+ [Kind.Search]: 'search',
714
+ [Kind.Execute]: 'execute',
715
+ [Kind.Think]: 'think',
716
+ [Kind.Fetch]: 'fetch',
717
+ [Kind.Other]: 'other',
718
+ };
719
+ return kindMap[kind] ?? 'other';
720
+ }
373
721
  async #resolvePrompt(message, abortSignal) {
374
722
  const FILE_URI_SCHEME = 'file://';
375
723
  const embeddedContext = [];
@@ -666,6 +1014,20 @@ class Session {
666
1014
  }
667
1015
  }
668
1016
  }
1017
+ /**
1018
+ * Converts todo items to plan entries format for zed integration.
1019
+ * Maps todo status to plan status and assigns a default priority.
1020
+ *
1021
+ * @param todos - Array of todo items with id, content, and status
1022
+ * @returns Array of plan entries with content, priority, and status
1023
+ */
1024
+ function convertTodosToPlanEntries(todos) {
1025
+ return todos.map((todo) => ({
1026
+ content: todo.content,
1027
+ priority: 'medium', // Default priority since todos don't have priority
1028
+ status: todo.status,
1029
+ }));
1030
+ }
669
1031
  function toToolCallContent(toolResult) {
670
1032
  if (toolResult.error?.message) {
671
1033
  throw new Error(toolResult.error.message);
@@ -677,24 +1039,6 @@ function toToolCallContent(toolResult) {
677
1039
  content: { type: 'text', text: toolResult.returnDisplay },
678
1040
  };
679
1041
  }
680
- else if ('type' in toolResult.returnDisplay &&
681
- toolResult.returnDisplay.type === 'todo_list') {
682
- // Handle TodoResultDisplay - convert to text representation
683
- const todoText = toolResult.returnDisplay.todos
684
- .map((todo) => {
685
- const statusIcon = {
686
- pending: '○',
687
- in_progress: '◐',
688
- completed: '●',
689
- }[todo.status];
690
- return `${statusIcon} ${todo.content}`;
691
- })
692
- .join('\n');
693
- return {
694
- type: 'content',
695
- content: { type: 'text', text: todoText },
696
- };
697
- }
698
1042
  else if ('type' in toolResult.returnDisplay &&
699
1043
  toolResult.returnDisplay.type === 'plan_summary') {
700
1044
  const planDisplay = toolResult.returnDisplay;