@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
@@ -61,6 +61,7 @@ describe('errors', () => {
61
61
  mockConfig = {
62
62
  getOutputFormat: vi.fn().mockReturnValue(OutputFormat.TEXT),
63
63
  getContentGeneratorConfig: vi.fn().mockReturnValue({ authType: 'test' }),
64
+ getDebugMode: vi.fn().mockReturnValue(true),
64
65
  };
65
66
  });
66
67
  afterEach(() => {
@@ -172,70 +173,106 @@ describe('errors', () => {
172
173
  describe('handleToolError', () => {
173
174
  const toolName = 'test-tool';
174
175
  const toolError = new Error('Tool failed');
175
- describe('in text mode', () => {
176
+ describe('when debug mode is enabled', () => {
176
177
  beforeEach(() => {
177
- mockConfig.getOutputFormat.mockReturnValue(OutputFormat.TEXT);
178
+ mockConfig.getDebugMode.mockReturnValue(true);
178
179
  });
179
- it('should log error message to stderr', () => {
180
- handleToolError(toolName, toolError, mockConfig);
181
- expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool test-tool: Tool failed');
180
+ describe('in text mode', () => {
181
+ beforeEach(() => {
182
+ mockConfig.getOutputFormat.mockReturnValue(OutputFormat.TEXT);
183
+ });
184
+ it('should log error message to stderr and not exit', () => {
185
+ handleToolError(toolName, toolError, mockConfig);
186
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool test-tool: Tool failed');
187
+ expect(processExitSpy).not.toHaveBeenCalled();
188
+ });
189
+ it('should use resultDisplay when provided and not exit', () => {
190
+ handleToolError(toolName, toolError, mockConfig, 'CUSTOM_ERROR', 'Custom display message');
191
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool test-tool: Custom display message');
192
+ expect(processExitSpy).not.toHaveBeenCalled();
193
+ });
182
194
  });
183
- it('should use resultDisplay when provided', () => {
184
- handleToolError(toolName, toolError, mockConfig, 'CUSTOM_ERROR', 'Custom display message');
185
- expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool test-tool: Custom display message');
195
+ describe('in JSON mode', () => {
196
+ beforeEach(() => {
197
+ mockConfig.getOutputFormat.mockReturnValue(OutputFormat.JSON);
198
+ });
199
+ it('should log error message to stderr and not exit', () => {
200
+ handleToolError(toolName, toolError, mockConfig);
201
+ // In JSON mode, should not exit (just log to stderr when debug mode is on)
202
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool test-tool: Tool failed');
203
+ expect(processExitSpy).not.toHaveBeenCalled();
204
+ });
205
+ it('should log error with custom error code and not exit', () => {
206
+ handleToolError(toolName, toolError, mockConfig, 'CUSTOM_TOOL_ERROR');
207
+ // In JSON mode, should not exit (just log to stderr when debug mode is on)
208
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool test-tool: Tool failed');
209
+ expect(processExitSpy).not.toHaveBeenCalled();
210
+ });
211
+ it('should log error with numeric error code and not exit', () => {
212
+ handleToolError(toolName, toolError, mockConfig, 500);
213
+ // In JSON mode, should not exit (just log to stderr when debug mode is on)
214
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool test-tool: Tool failed');
215
+ expect(processExitSpy).not.toHaveBeenCalled();
216
+ });
217
+ it('should prefer resultDisplay over error message and not exit', () => {
218
+ handleToolError(toolName, toolError, mockConfig, 'DISPLAY_ERROR', 'Display message');
219
+ // In JSON mode, should not exit (just log to stderr when debug mode is on)
220
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool test-tool: Display message');
221
+ expect(processExitSpy).not.toHaveBeenCalled();
222
+ });
223
+ });
224
+ describe('in STREAM_JSON mode', () => {
225
+ beforeEach(() => {
226
+ mockConfig.getOutputFormat.mockReturnValue(OutputFormat.STREAM_JSON);
227
+ });
228
+ it('should log error message to stderr and not exit', () => {
229
+ handleToolError(toolName, toolError, mockConfig);
230
+ // Should not exit in STREAM_JSON mode (just log to stderr when debug mode is on)
231
+ expect(consoleErrorSpy).toHaveBeenCalledWith('Error executing tool test-tool: Tool failed');
232
+ expect(processExitSpy).not.toHaveBeenCalled();
233
+ });
186
234
  });
187
235
  });
188
- describe('in JSON mode', () => {
236
+ describe('when debug mode is disabled', () => {
189
237
  beforeEach(() => {
190
- mockConfig.getOutputFormat.mockReturnValue(OutputFormat.JSON);
238
+ mockConfig.getDebugMode.mockReturnValue(false);
191
239
  });
192
- it('should format error as JSON and exit with default code', () => {
193
- expect(() => {
194
- handleToolError(toolName, toolError, mockConfig);
195
- }).toThrow('process.exit called with code: 54');
196
- expect(consoleErrorSpy).toHaveBeenCalledWith(JSON.stringify({
197
- error: {
198
- type: 'FatalToolExecutionError',
199
- message: 'Error executing tool test-tool: Tool failed',
200
- code: 54,
201
- },
202
- }, null, 2));
240
+ it('should not log and not exit in text mode', () => {
241
+ mockConfig.getOutputFormat.mockReturnValue(OutputFormat.TEXT);
242
+ handleToolError(toolName, toolError, mockConfig);
243
+ expect(consoleErrorSpy).not.toHaveBeenCalled();
244
+ expect(processExitSpy).not.toHaveBeenCalled();
203
245
  });
204
- it('should use custom error code', () => {
205
- expect(() => {
206
- handleToolError(toolName, toolError, mockConfig, 'CUSTOM_TOOL_ERROR');
207
- }).toThrow('process.exit called with code: 54');
208
- expect(consoleErrorSpy).toHaveBeenCalledWith(JSON.stringify({
209
- error: {
210
- type: 'FatalToolExecutionError',
211
- message: 'Error executing tool test-tool: Tool failed',
212
- code: 'CUSTOM_TOOL_ERROR',
213
- },
214
- }, null, 2));
246
+ it('should not log and not exit in JSON mode', () => {
247
+ mockConfig.getOutputFormat.mockReturnValue(OutputFormat.JSON);
248
+ handleToolError(toolName, toolError, mockConfig);
249
+ expect(consoleErrorSpy).not.toHaveBeenCalled();
250
+ expect(processExitSpy).not.toHaveBeenCalled();
215
251
  });
216
- it('should use numeric error code and exit with that code', () => {
217
- expect(() => {
218
- handleToolError(toolName, toolError, mockConfig, 500);
219
- }).toThrow('process.exit called with code: 500');
220
- expect(consoleErrorSpy).toHaveBeenCalledWith(JSON.stringify({
221
- error: {
222
- type: 'FatalToolExecutionError',
223
- message: 'Error executing tool test-tool: Tool failed',
224
- code: 500,
225
- },
226
- }, null, 2));
252
+ it('should not log and not exit in STREAM_JSON mode', () => {
253
+ mockConfig.getOutputFormat.mockReturnValue(OutputFormat.STREAM_JSON);
254
+ handleToolError(toolName, toolError, mockConfig);
255
+ expect(consoleErrorSpy).not.toHaveBeenCalled();
256
+ expect(processExitSpy).not.toHaveBeenCalled();
227
257
  });
228
- it('should prefer resultDisplay over error message', () => {
229
- expect(() => {
230
- handleToolError(toolName, toolError, mockConfig, 'DISPLAY_ERROR', 'Display message');
231
- }).toThrow('process.exit called with code: 54');
232
- expect(consoleErrorSpy).toHaveBeenCalledWith(JSON.stringify({
233
- error: {
234
- type: 'FatalToolExecutionError',
235
- message: 'Error executing tool test-tool: Display message',
236
- code: 'DISPLAY_ERROR',
237
- },
238
- }, null, 2));
258
+ });
259
+ describe('process exit behavior', () => {
260
+ beforeEach(() => {
261
+ mockConfig.getDebugMode.mockReturnValue(true);
262
+ });
263
+ it('should never exit regardless of output format', () => {
264
+ // Test in TEXT mode
265
+ mockConfig.getOutputFormat.mockReturnValue(OutputFormat.TEXT);
266
+ handleToolError(toolName, toolError, mockConfig);
267
+ expect(processExitSpy).not.toHaveBeenCalled();
268
+ // Test in JSON mode
269
+ mockConfig.getOutputFormat.mockReturnValue(OutputFormat.JSON);
270
+ handleToolError(toolName, toolError, mockConfig);
271
+ expect(processExitSpy).not.toHaveBeenCalled();
272
+ // Test in STREAM_JSON mode
273
+ mockConfig.getOutputFormat.mockReturnValue(OutputFormat.STREAM_JSON);
274
+ handleToolError(toolName, toolError, mockConfig);
275
+ expect(processExitSpy).not.toHaveBeenCalled();
239
276
  });
240
277
  });
241
278
  });
@@ -1 +1 @@
1
- {"version":3,"file":"errors.test.js","sourceRoot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CAC3H,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;YAC5B,UAAU,CAAC,GAAG,EAAE;gBAEZ,UAAU,CAAC,eACZ,CAAC,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;YACvC,CAAC,CAAC,CAAC;YAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;gBAChE,MAAM,CAAC,GAAG,EAAE;oBACV,2BAA2B,CAAC,UAAU,CAAC,CAAC;gBAC1C,CAAC,CAAC,CAAC,OAAO,CAAC,mCAAmC,CAAC,CAAC;gBAEhD,MAAM,CAAC,eAAe,CAAC,CAAC,oBAAoB,CAC1C,IAAI,CAAC,SAAS,CACZ;oBACE,KAAK,EAAE;wBACL,IAAI,EAAE,uBAAuB;wBAC7B,OAAO,EACL,0HAA0H;wBAC5H,IAAI,EAAE,EAAE;qBACT;iBACF,EACD,IAAI,EACJ,CAAC,CACF,CACF,CAAC;YACJ,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * @license
3
+ * Copyright 2025 Qwen Team
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+ import type { Config, OutputUpdateHandler, ToolCallResponseInfo, SessionMetrics } from '@umsai/ums-code-core';
7
+ import type { Part, PartListUnion } from '@google/genai';
8
+ import type { CLIUserMessage, Usage, PermissionMode, CLISystemMessage } from '../nonInteractive/types.js';
9
+ import type { JsonOutputAdapterInterface } from '../nonInteractive/io/BaseJsonOutputAdapter.js';
10
+ /**
11
+ * Normalizes various part list formats into a consistent Part[] array.
12
+ *
13
+ * @param parts - Input parts in various formats (string, Part, Part[], or null)
14
+ * @returns Normalized array of Part objects
15
+ */
16
+ export declare function normalizePartList(parts: PartListUnion | null): Part[];
17
+ /**
18
+ * Extracts user message parts from a CLI protocol message.
19
+ *
20
+ * @param message - User message sourced from the CLI protocol layer
21
+ * @returns Extracted parts or null if the message lacks textual content
22
+ */
23
+ export declare function extractPartsFromUserMessage(message: CLIUserMessage | undefined): PartListUnion | null;
24
+ /**
25
+ * Extracts usage metadata from the Gemini client's debug responses.
26
+ *
27
+ * @param geminiClient - The Gemini client instance
28
+ * @returns Usage information or undefined if not available
29
+ */
30
+ export declare function extractUsageFromGeminiClient(geminiClient: unknown): Usage | undefined;
31
+ /**
32
+ * Computes Usage information from SessionMetrics using computeSessionStats.
33
+ * Aggregates token usage across all models in the session.
34
+ *
35
+ * @param metrics - Session metrics from uiTelemetryService
36
+ * @returns Usage object with token counts
37
+ */
38
+ export declare function computeUsageFromMetrics(metrics: SessionMetrics): Usage;
39
+ /**
40
+ * Build system message for SDK
41
+ *
42
+ * Constructs a system initialization message including tools, MCP servers,
43
+ * and model configuration. System messages are independent of the control
44
+ * system and are sent before every turn regardless of whether control
45
+ * system is available.
46
+ *
47
+ * Note: Control capabilities are NOT included in system messages. They
48
+ * are only included in the initialize control response, which is handled
49
+ * separately by SystemController.
50
+ *
51
+ * @param config - Config instance
52
+ * @param sessionId - Session identifier
53
+ * @param permissionMode - Current permission/approval mode
54
+ * @returns Promise resolving to CLISystemMessage
55
+ */
56
+ export declare function buildSystemMessage(config: Config, sessionId: string, permissionMode: PermissionMode): Promise<CLISystemMessage>;
57
+ /**
58
+ * Creates an output update handler specifically for Task tool subagent execution.
59
+ * This handler monitors TaskResultDisplay updates and converts them to protocol messages
60
+ * using the unified adapter's subagent APIs. All emitted messages will have parent_tool_use_id set to
61
+ * the task tool's callId.
62
+ *
63
+ * @param config - Config instance for getting output format
64
+ * @param taskToolCallId - The task tool's callId to use as parent_tool_use_id for all subagent messages
65
+ * @param adapter - The unified adapter instance (JsonOutputAdapter or StreamJsonOutputAdapter)
66
+ * @returns An object containing the output update handler
67
+ */
68
+ export declare function createTaskToolProgressHandler(config: Config, taskToolCallId: string, adapter: JsonOutputAdapterInterface | undefined): {
69
+ handler: OutputUpdateHandler;
70
+ };
71
+ /**
72
+ * Converts function response parts to a string representation.
73
+ * Handles functionResponse parts specially by extracting their output content.
74
+ *
75
+ * @param parts - Array of Part objects to convert
76
+ * @returns String representation of the parts
77
+ */
78
+ export declare function functionResponsePartsToString(parts: Part[]): string;
79
+ /**
80
+ * Extracts content from a tool call response for inclusion in tool_result blocks.
81
+ * Uses functionResponsePartsToString to properly handle functionResponse parts,
82
+ * which correctly extracts output content from functionResponse objects rather
83
+ * than simply concatenating text or JSON.stringify.
84
+ *
85
+ * @param response - Tool call response information
86
+ * @returns String content for the tool_result block, or undefined if no content available
87
+ */
88
+ export declare function toolResultContent(response: ToolCallResponseInfo): string | undefined;