@deepseek-harness-tui/dsh-tui 0.18.0 → 0.20.0

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 (318) hide show
  1. package/README.md +90 -59
  2. package/bin/dsh-tui.js +46 -3
  3. package/cordis.patch.yml +5 -3
  4. package/cordis.yml +3 -2
  5. package/guide/dsh-tui-guide/codex-backend.en.md +2 -2
  6. package/guide/dsh-tui-guide/codex-backend.md +2 -2
  7. package/guide/dsh-tui-guide/configuration.en.md +7 -2
  8. package/guide/dsh-tui-guide/configuration.md +7 -2
  9. package/guide/dsh-tui-guide/getting-started.en.md +168 -4
  10. package/guide/dsh-tui-guide/getting-started.md +121 -14
  11. package/guide/dsh-tui-guide/interaction.en.md +11 -10
  12. package/guide/dsh-tui-guide/interaction.md +5 -4
  13. package/guide/dsh-tui-guide/user-guide.en.md +12 -6
  14. package/guide/dsh-tui-guide/user-guide.md +12 -6
  15. package/lib/settings.json +24 -8
  16. package/lib/types/adapter/ports/channel-ui.d.ts +10 -7
  17. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  18. package/lib/types/adapter/ports/channel-view.d.ts +67 -8
  19. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  20. package/lib/types/agent/events.d.ts +14 -5
  21. package/lib/types/agent/events.d.ts.map +1 -1
  22. package/lib/types/agent/session.d.ts +5 -0
  23. package/lib/types/agent/session.d.ts.map +1 -1
  24. package/lib/types/backends/claude/tools.d.ts.map +1 -1
  25. package/lib/types/backends/claude/tools.js +8 -3
  26. package/lib/types/backends/claude/translate/core.d.ts +2 -2
  27. package/lib/types/backends/claude/translate/core.d.ts.map +1 -1
  28. package/lib/types/backends/claude/translate/core.js +10 -6
  29. package/lib/types/backends/codex/session/commands.d.ts +2 -0
  30. package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
  31. package/lib/types/backends/codex/session/commands.js +8 -4
  32. package/lib/types/backends/codex/session/input.d.ts +11 -7
  33. package/lib/types/backends/codex/session/input.d.ts.map +1 -1
  34. package/lib/types/backends/codex/session/input.js +68 -15
  35. package/lib/types/backends/codex/session/session.d.ts.map +1 -1
  36. package/lib/types/backends/codex/session/session.js +2 -3
  37. package/lib/types/backends/codex/translate/presentation.d.ts.map +1 -1
  38. package/lib/types/backends/codex/translate/presentation.js +5 -2
  39. package/lib/types/channel/interaction.d.ts.map +1 -1
  40. package/lib/types/channel/interaction.js +1 -0
  41. package/lib/types/channel/permissions.d.ts +15 -0
  42. package/lib/types/channel/permissions.d.ts.map +1 -1
  43. package/lib/types/channel/permissions.js +28 -0
  44. package/lib/types/channel/projection.d.ts.map +1 -1
  45. package/lib/types/channel/projection.js +89 -11
  46. package/lib/types/channel/questions.d.ts +45 -3
  47. package/lib/types/channel/questions.d.ts.map +1 -1
  48. package/lib/types/channel/questions.js +43 -0
  49. package/lib/types/channel/sanitize.d.ts.map +1 -1
  50. package/lib/types/channel/sanitize.js +8 -4
  51. package/lib/types/channel/subagent-failure.d.ts +49 -0
  52. package/lib/types/channel/subagent-failure.d.ts.map +1 -0
  53. package/lib/types/channel/subagent-failure.js +59 -0
  54. package/lib/types/channel/transcript.d.ts +17 -0
  55. package/lib/types/channel/transcript.d.ts.map +1 -1
  56. package/lib/types/channel/transcript.js +35 -0
  57. package/lib/types/commands.js +2 -2
  58. package/lib/types/components/MessageList.d.ts.map +1 -1
  59. package/lib/types/components/MessageList.js +14 -10
  60. package/lib/types/components/PromptInput.d.ts.map +1 -1
  61. package/lib/types/components/PromptInput.js +61 -6
  62. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  63. package/lib/types/components/SplitDiffView.js +3 -2
  64. package/lib/types/components/StarPrompt.d.ts +5 -3
  65. package/lib/types/components/StarPrompt.d.ts.map +1 -1
  66. package/lib/types/components/StarPrompt.js +56 -6
  67. package/lib/types/components/SubagentCard.d.ts.map +1 -1
  68. package/lib/types/components/SubagentCard.js +1 -1
  69. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  70. package/lib/types/components/SubagentDashboard.js +9 -2
  71. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  72. package/lib/types/components/SubagentDetailScene.js +1 -1
  73. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  74. package/lib/types/components/messages/AssistantToolUseMessage.js +126 -25
  75. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +5 -8
  76. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  77. package/lib/types/components/questions/AskUserQuestionPanel.js +7 -4
  78. package/lib/types/components/questions/PlanReviewPanel.d.ts +3 -6
  79. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
  80. package/lib/types/components/revealScope.d.ts +15 -0
  81. package/lib/types/components/revealScope.d.ts.map +1 -0
  82. package/lib/types/components/revealScope.js +17 -0
  83. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +34 -1
  84. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
  85. package/lib/types/components/sidePanel/btw/BtwComposer.js +108 -7
  86. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
  87. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +1 -1
  88. package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
  89. package/lib/types/components/sidePanel/btw/BtwThreadScene.js +1 -1
  90. package/lib/types/components/smoothReveal.d.ts +36 -6
  91. package/lib/types/components/smoothReveal.d.ts.map +1 -1
  92. package/lib/types/components/smoothReveal.js +92 -21
  93. package/lib/types/components/teamRoster.d.ts +6 -3
  94. package/lib/types/components/teamRoster.d.ts.map +1 -1
  95. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +4 -14
  96. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  97. package/lib/types/components/workspaces/HomeWorkspaceRow.js +26 -17
  98. package/lib/types/dsh-adapter/approvals.d.ts +19 -0
  99. package/lib/types/dsh-adapter/approvals.d.ts.map +1 -1
  100. package/lib/types/dsh-adapter/approvals.js +17 -1
  101. package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
  102. package/lib/types/dsh-adapter/backend/session.js +12 -0
  103. package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
  104. package/lib/types/dsh-adapter/backend/translate.js +21 -4
  105. package/lib/types/dsh-adapter/channel/attached-context.d.ts +15 -2
  106. package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -1
  107. package/lib/types/dsh-adapter/channel/attached-context.js +26 -3
  108. package/lib/types/dsh-adapter/channel/binding-events.d.ts +3 -0
  109. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  110. package/lib/types/dsh-adapter/channel/binding-events.js +43 -2
  111. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +2 -6
  112. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  113. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +7 -1
  114. package/lib/types/dsh-adapter/channel/core/compose.d.ts +2 -6
  115. package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
  116. package/lib/types/dsh-adapter/channel/core/compose.js +1 -1
  117. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
  118. package/lib/types/dsh-adapter/channel/core/local-actions.js +3 -26
  119. package/lib/types/dsh-adapter/channel/emitter.js +1 -1
  120. package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
  121. package/lib/types/dsh-adapter/channel/extensions.js +15 -4
  122. package/lib/types/dsh-adapter/channel/input-actions.d.ts +2 -2
  123. package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
  124. package/lib/types/dsh-adapter/channel/input-actions.js +34 -10
  125. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +3 -7
  126. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  127. package/lib/types/dsh-adapter/channel/input-delivery.js +14 -5
  128. package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
  129. package/lib/types/dsh-adapter/channel/local-actions.js +7 -3
  130. package/lib/types/dsh-adapter/channel/model-actions.d.ts +4 -1
  131. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
  132. package/lib/types/dsh-adapter/channel/model-actions.js +26 -9
  133. package/lib/types/dsh-adapter/channel/model-selection.d.ts +27 -2
  134. package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
  135. package/lib/types/dsh-adapter/channel/model-selection.js +81 -37
  136. package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -1
  137. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
  138. package/lib/types/dsh-adapter/channel/projection-helpers.d.ts.map +1 -1
  139. package/lib/types/dsh-adapter/channel/projection-helpers.js +4 -2
  140. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
  141. package/lib/types/dsh-adapter/channel/session-rewind.js +6 -2
  142. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
  143. package/lib/types/dsh-adapter/channel/session-tree-actions.js +8 -4
  144. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  145. package/lib/types/dsh-adapter/channel/settings-host.js +185 -36
  146. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +55 -4
  147. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
  148. package/lib/types/dsh-adapter/channel/subagent-projection.js +80 -16
  149. package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts +1 -1
  150. package/lib/types/dsh-adapter/channel/subagent-transcript.d.ts.map +1 -1
  151. package/lib/types/dsh-adapter/channel/subagent-transcript.js +6 -5
  152. package/lib/types/dsh-adapter/channel/task-completion.js +2 -10
  153. package/lib/types/dsh-adapter/channel/transcript.d.ts +3 -2
  154. package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
  155. package/lib/types/dsh-adapter/channel/transcript.js +13 -4
  156. package/lib/types/dsh-adapter/channel/types.d.ts +11 -2
  157. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  158. package/lib/types/dsh-adapter/compat/compaction-previews.d.ts +11 -0
  159. package/lib/types/dsh-adapter/compat/compaction-previews.d.ts.map +1 -0
  160. package/lib/types/dsh-adapter/compat/compaction-previews.js +38 -0
  161. package/lib/types/dsh-adapter/compat/messages.d.ts +1 -1
  162. package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
  163. package/lib/types/dsh-adapter/compat/messages.js +2 -2
  164. package/lib/types/dsh-adapter/contract.d.ts +29 -3
  165. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  166. package/lib/types/dsh-adapter/contract.js +48 -5
  167. package/lib/types/dsh-adapter/experimental-bundles.d.ts +5 -0
  168. package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -1
  169. package/lib/types/dsh-adapter/experimental-bundles.js +0 -2
  170. package/lib/types/dsh-adapter/fresh-agent.d.ts +1 -1
  171. package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -1
  172. package/lib/types/dsh-adapter/fresh-agent.js +60 -11
  173. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
  174. package/lib/types/dsh-adapter/host-access.js +60 -11
  175. package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
  176. package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -1
  177. package/lib/types/dsh-adapter/host-contract.js +5 -3
  178. package/lib/types/dsh-adapter/host-dsh.d.ts +2 -8
  179. package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -1
  180. package/lib/types/dsh-adapter/host-dsh.js +30 -6
  181. package/lib/types/dsh-adapter/host-entry.js +4 -0
  182. package/lib/types/dsh-adapter/index.d.ts +9 -1
  183. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  184. package/lib/types/dsh-adapter/index.js +5 -0
  185. package/lib/types/dsh-adapter/oauth/account-notifications.d.ts +73 -0
  186. package/lib/types/dsh-adapter/oauth/account-notifications.d.ts.map +1 -0
  187. package/lib/types/dsh-adapter/oauth/account-notifications.js +250 -0
  188. package/lib/types/dsh-adapter/oauth/bonus.d.ts +34 -9
  189. package/lib/types/dsh-adapter/oauth/bonus.d.ts.map +1 -1
  190. package/lib/types/dsh-adapter/oauth/bonus.js +47 -5
  191. package/lib/types/dsh-adapter/oauth/deepseek.d.ts +7 -2
  192. package/lib/types/dsh-adapter/oauth/deepseek.d.ts.map +1 -1
  193. package/lib/types/dsh-adapter/oauth/deepseek.js +6 -1
  194. package/lib/types/dsh-adapter/oauth/index.d.ts.map +1 -1
  195. package/lib/types/dsh-adapter/oauth/index.js +44 -0
  196. package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
  197. package/lib/types/dsh-adapter/oauth/profiles.js +14 -1
  198. package/lib/types/dsh-adapter/oauth/service.d.ts.map +1 -1
  199. package/lib/types/dsh-adapter/oauth/service.js +5 -6
  200. package/lib/types/dsh-adapter/plugin-manage.d.ts +6 -4
  201. package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
  202. package/lib/types/dsh-adapter/plugin-manage.js +3 -2
  203. package/lib/types/dsh-adapter/plugin.d.ts +237 -6
  204. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  205. package/lib/types/dsh-adapter/plugin.js +751 -67
  206. package/lib/types/dsh-adapter/presets.d.ts +38 -11
  207. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  208. package/lib/types/dsh-adapter/presets.js +46 -17
  209. package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
  210. package/lib/types/dsh-adapter/process-exit.js +1 -1
  211. package/lib/types/dsh-adapter/questions.d.ts +3 -4
  212. package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
  213. package/lib/types/dsh-adapter/questions.js +1 -1
  214. package/lib/types/dsh-adapter/session-list-metadata.js +2 -2
  215. package/lib/types/dsh-adapter/session-projection-store.d.ts +1 -1
  216. package/lib/types/dsh-adapter/session-projection-store.d.ts.map +1 -1
  217. package/lib/types/dsh-adapter/session-projection-store.js +30 -23
  218. package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
  219. package/lib/types/dsh-adapter/sessionTree.js +4 -1
  220. package/lib/types/dsh-adapter/subagents.d.ts +6 -0
  221. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  222. package/lib/types/dsh-adapter/subagents.js +32 -3
  223. package/lib/types/dsh-adapter/team-mode.d.ts +46 -27
  224. package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
  225. package/lib/types/dsh-adapter/team-mode.js +157 -29
  226. package/lib/types/dsh-adapter/team-roster.d.ts +53 -18
  227. package/lib/types/dsh-adapter/team-roster.d.ts.map +1 -1
  228. package/lib/types/dsh-adapter/team-roster.js +206 -39
  229. package/lib/types/dsh-adapter/team-tools.d.ts +25 -12
  230. package/lib/types/dsh-adapter/team-tools.d.ts.map +1 -1
  231. package/lib/types/dsh-adapter/team-tools.js +81 -26
  232. package/lib/types/dsh-adapter/tool-scope.d.ts +24 -0
  233. package/lib/types/dsh-adapter/tool-scope.d.ts.map +1 -0
  234. package/lib/types/dsh-adapter/tool-scope.js +127 -0
  235. package/lib/types/dsh-adapter/types.d.ts +2 -1
  236. package/lib/types/dsh-adapter/types.d.ts.map +1 -1
  237. package/lib/types/heldInputs.d.ts +55 -16
  238. package/lib/types/heldInputs.d.ts.map +1 -1
  239. package/lib/types/heldInputs.js +277 -41
  240. package/lib/types/i18n.d.ts +292 -20
  241. package/lib/types/i18n.d.ts.map +1 -1
  242. package/lib/types/i18n.js +89 -13
  243. package/lib/types/ink/components/App.d.ts +2 -0
  244. package/lib/types/ink/components/App.d.ts.map +1 -1
  245. package/lib/types/ink/components/App.js +8 -0
  246. package/lib/types/ink/dom.d.ts.map +1 -1
  247. package/lib/types/ink/dom.js +13 -3
  248. package/lib/types/ink/events/input-event.d.ts.map +1 -1
  249. package/lib/types/ink/events/input-event.js +7 -6
  250. package/lib/types/ink/flush-tick.d.ts +6 -0
  251. package/lib/types/ink/flush-tick.d.ts.map +1 -1
  252. package/lib/types/ink/flush-tick.js +31 -0
  253. package/lib/types/ink/hit-test.d.ts +2 -0
  254. package/lib/types/ink/hit-test.d.ts.map +1 -1
  255. package/lib/types/ink/hit-test.js +10 -0
  256. package/lib/types/ink/hooks/use-program-status.d.ts +1 -1
  257. package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -1
  258. package/lib/types/ink/hooks/use-program-status.js +3 -2
  259. package/lib/types/ink/hooks/use-terminal-title.d.ts +15 -0
  260. package/lib/types/ink/hooks/use-terminal-title.d.ts.map +1 -1
  261. package/lib/types/ink/hooks/use-terminal-title.js +23 -3
  262. package/lib/types/ink/ink.d.ts +1 -0
  263. package/lib/types/ink/ink.d.ts.map +1 -1
  264. package/lib/types/ink/ink.js +7 -4
  265. package/lib/types/ink/jumpback-state.d.ts +33 -0
  266. package/lib/types/ink/jumpback-state.d.ts.map +1 -0
  267. package/lib/types/ink/jumpback-state.js +51 -0
  268. package/lib/types/ink/jumpback.d.ts +78 -0
  269. package/lib/types/ink/jumpback.d.ts.map +1 -0
  270. package/lib/types/ink/jumpback.js +515 -0
  271. package/lib/types/ink/log-update.js +37 -14
  272. package/lib/types/ink/notify-helper/activate.cs +836 -0
  273. package/lib/types/ink/notify-helper/compile.d.ts +30 -0
  274. package/lib/types/ink/notify-helper/compile.d.ts.map +1 -0
  275. package/lib/types/ink/notify-helper/compile.js +235 -0
  276. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  277. package/lib/types/ink/parse-keypress.js +25 -0
  278. package/lib/types/ink/terminal-notification-windows.d.ts +8 -4
  279. package/lib/types/ink/terminal-notification-windows.d.ts.map +1 -1
  280. package/lib/types/ink/terminal-notification-windows.js +14 -21
  281. package/lib/types/ink/terminal-notification.d.ts +31 -2
  282. package/lib/types/ink/terminal-notification.d.ts.map +1 -1
  283. package/lib/types/ink/terminal-notification.js +51 -0
  284. package/lib/types/ink/terminal.d.ts +15 -3
  285. package/lib/types/ink/terminal.d.ts.map +1 -1
  286. package/lib/types/ink/terminal.js +38 -9
  287. package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -1
  288. package/lib/types/screens/AgentTranscriptScene.js +1 -1
  289. package/lib/types/screens/Chat.d.ts +4 -3
  290. package/lib/types/screens/Chat.d.ts.map +1 -1
  291. package/lib/types/screens/Chat.js +81 -11
  292. package/lib/types/screens/SessionSupervisor.d.ts +3 -6
  293. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  294. package/lib/types/screens/SessionSupervisor.js +5 -8
  295. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +1 -2
  296. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
  297. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +2 -2
  298. package/lib/types/screens/sessionSupervisor/model.d.ts +1 -1
  299. package/lib/types/screens/sessionSupervisor/model.js +1 -1
  300. package/lib/types/sessionMounts.d.ts +12 -5
  301. package/lib/types/sessionMounts.d.ts.map +1 -1
  302. package/lib/types/sessionMounts.js +33 -6
  303. package/lib/types/settings/definitions.d.ts +12 -0
  304. package/lib/types/settings/definitions.d.ts.map +1 -1
  305. package/lib/types/settings/definitions.js +15 -7
  306. package/lib/types/update.d.ts +412 -20
  307. package/lib/types/update.d.ts.map +1 -1
  308. package/lib/types/update.js +2094 -193
  309. package/lib/types/updateHost.d.ts +198 -0
  310. package/lib/types/updateHost.d.ts.map +1 -0
  311. package/lib/types/updateHost.js +608 -0
  312. package/lib/types/utils/processName.d.ts +16 -0
  313. package/lib/types/utils/processName.d.ts.map +1 -0
  314. package/lib/types/utils/processName.js +27 -0
  315. package/package.json +114 -111
  316. package/presets/liangshen/agent.cordis.yml +4 -0
  317. package/tui-profile/feed/README.md +1 -1
  318. package/tui-profile/feed/first-party.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../src/channel/transcript.ts"],"names":[],"mappings":"AAAA;gDACgD;AAEhD,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC,eAAO,MAAM,oBAAoB,MAAM,CAAA;AAEvC,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,MAAM,CAAA;AAE3B,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAG3D"}
1
+ {"version":3,"file":"transcript.d.ts","sourceRoot":"","sources":["../../../src/channel/transcript.ts"],"names":[],"mappings":"AAAA;gDACgD;AAEhD,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC,eAAO,MAAM,oBAAoB,MAAM,CAAA;AAEvC,uEAAuE;AACvE,eAAO,MAAM,kBAAkB,MAAM,CAAA;AAErC;;;;;;;GAOG;AACH,eAAO,MAAM,QAAQ,MAAM,CAAA;AAE3B,wBAAgB,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAG3D;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMnE;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAS/E"}
@@ -17,3 +17,38 @@ export function preview(text, limit) {
17
17
  const flat = text.replace(/\s+/g, ' ').trim();
18
18
  return flat.length <= limit ? flat : `${flat.slice(0, limit)}…`;
19
19
  }
20
+ /**
21
+ * One report line that keeps its shape: blank rows stay blank and leading
22
+ * indentation survives; a stray newline still cannot become a second row.
23
+ */
24
+ export function previewIndented(text, limit) {
25
+ const line = text.replace(/[\r\n]+/gu, ' ').replace(/\s+$/u, '');
26
+ // A truly empty Text node measures as zero height; one no-break space keeps
27
+ // the blank row the report asked for without painting anything.
28
+ if (line === '')
29
+ return '\u00a0';
30
+ return line.length <= limit ? line : `${line.slice(0, limit)}…`;
31
+ }
32
+ /**
33
+ * Keep local rows inside the transcript budget: drop the oldest `local` block
34
+ * (its title plus its `local-output` lines) until the incoming report fits.
35
+ * A run of headerless `local-output` rows (a `!!` replay with no `local`
36
+ * companion) counts as one block — nothing marks a boundary inside it.
37
+ * Local rows cannot be restored from backend history, so nothing else bounds
38
+ * them — `foldRows` deliberately leaves them alone. Shared by `pushLocal`
39
+ * (channel-side reports) and the projector (backend command reports).
40
+ */
41
+ export function trimLocalRows(rows, nextLines) {
42
+ let count = rows.reduce((sum, row) => sum + Number(row.kind === 'local' || row.kind === 'local-output'), nextLines);
43
+ for (let i = 0; count > MAX_ROWS && i < rows.length;) {
44
+ if (rows[i].kind !== 'local' && rows[i].kind !== 'local-output') {
45
+ i++;
46
+ continue;
47
+ }
48
+ let end = i + 1;
49
+ while (rows[end]?.kind === 'local-output')
50
+ end++;
51
+ count -= end - i;
52
+ rows.splice(i, end - i);
53
+ }
54
+ }
@@ -62,7 +62,7 @@ export const LOCAL_COMMANDS = [
62
62
  { name: 'migrate', description: 'Import conversations from other coding agents (claude-code / codex / omp / zcode / grok-build)' },
63
63
  { name: 'init', description: 'Create AGENTS.md in the working directory' },
64
64
  { name: 'agents', description: 'Show subagents of this session' },
65
- { name: 'team', description: 'Agent Teams: show status while the team service is running' },
65
+ { name: 'team', description: "Agent Teams: show status or switch this session's team (on/off)" },
66
66
  { name: 'jobs', description: 'Show background jobs of this session' },
67
67
  { name: 'panel', description: 'Side panel: toggle / focus / zoom / switch panels' },
68
68
  // Model / display
@@ -85,7 +85,7 @@ export const LOCAL_COMMANDS = [
85
85
  { name: 'mcp', description: 'Show MCP status' },
86
86
  { name: 'skills', description: 'List available skills' },
87
87
  { name: 'plugin', description: 'Show plugin diagnostics, added plugins, and switchable experimental features' },
88
- { name: 'update', description: 'Update dsh-tui and restart' },
88
+ { name: 'update', description: 'Align the TUI, dsh engine and global launcher, then restart' },
89
89
  // Skills are discovered through the DSH registry and added at runtime.
90
90
  // A local entry of the same name would win the collision filter.
91
91
  // Misc / not applicable on this leaf
@@ -1 +1 @@
1
- {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,EAA8B,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA;AAE3E,OAAO,KAAK,EAAE,OAAO,EAA2E,MAAM,2BAA2B,CAAA;AAEjI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC1E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAe/C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAA;AAO3C,OAAO,EAAe,KAAK,gBAAgB,EAAqB,MAAM,yBAAyB,CAAA;AAC/F,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AA8G3D;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,eAAe,GAAE,OAAuE,GACvF,MAAM,CAoBR;AA4LD,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,QAAQ,EACR,YAAY,EACZ,UAAU,EACV,WAAW,EACX,qBAA8C,EAC9C,kBAA4C,EAC5C,KAAK,EACL,UAAmB,EACnB,YAAwB,EACxB,YAAqB,EACrB,cAAuB,EACvB,mBAA2B,EAC3B,YAAoB,EACpB,eAAuB,EACvB,cAAc,EACd,OAAO,EACP,WAAW,EACX,WAAW,EACX,YAAY,EACZ,eAAsB,EACtB,mBAA0B,EAC1B,UAAkB,EAClB,cAAc,EACd,YAAY,EACZ,eAAe,EACf,aAAa,EACb,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,WAAW,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AAE,eAAe,KAAK,IAAI,CAAA;IACjD,qEAAqE;IACrE,qBAAqB,CAAC,EAAE,OAAO,CAAA;CAChC,qBAilCA;AA0gBD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,EACzB,KAAK,EACL,MAAM,EACN,GAAG,EACH,MAAM,EACN,KAAY,EACZ,SAAgB,EAChB,SAAiB,EACjB,KAAK,EACL,OAAe,EACf,WAAW,EACX,OAAe,EACf,SAAiB,GAClB,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,GAAG,EAAE,MAAM,CAAA;IACX;oEACgE;IAChE,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,mFAAmF;IACnF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kDAAkD;IAClD,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;qEACiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,GAAG,KAAK,CAAC,SAAS,CASlB"}
1
+ {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../src/components/MessageList.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,EAA8B,KAAK,eAAe,EAAE,MAAM,UAAU,CAAA;AAE3E,OAAO,KAAK,EAAE,OAAO,EAA2E,MAAM,2BAA2B,CAAA;AAEjI,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAA;AAE7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAC1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,EAAE,MAAM,GAAG,SAAS,CAAA;IAC3B,KAAK,CAAC,EAAE,OAAO,CAAA;IACf,wEAAwE;IACxE,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,mFAAmF;IACnF,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,kDAAkD;IAClD,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,0CAA0C;IAC1C,WAAW,CAAC,EAAE,MAAM,IAAI,CAAA;IACxB,8BAA8B;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB;qEACiE;IACjE,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB,GAAG,KAAK,CAAC,SAAS,CASlB"}
@@ -24,7 +24,8 @@ import { foldLongLines } from '../utils/fold-long-lines.js';
24
24
  import { stringWidth } from '../ink/stringWidth.js';
25
25
  import { truncateToWidth } from '../ink/truncateToWidth.js';
26
26
  import { clipPreview } from '../ink/timeline-rail.js';
27
- import { getRevealVersion, revealLengthOf, revealTextOf } from './smoothReveal.js';
27
+ import { getRevealVersion, revealLengthOf, revealTextOf, scopeRevealKey } from './smoothReveal.js';
28
+ import { useRevealScope } from './revealScope.js';
28
29
  import { useRevealVersion } from '../hooks/useRevealVersion.js';
29
30
  import { TranscriptImages } from './messages/TranscriptImages.js';
30
31
  import { primaryComboString } from '../utils/keymap.js';
@@ -109,16 +110,16 @@ function reasoningRevealText(row, enabled) {
109
110
  return revealTextOf(`r${row.id}`, row.text, { enabled, active: row.streaming === true });
110
111
  }
111
112
  /** Display length only (layout signature; no slice allocation). */
112
- function revealDisplayLen(row, enabled) {
113
+ function revealDisplayLen(row, enabled, scope) {
113
114
  if (row.kind === 'assistant') {
114
115
  const stripped = assistantDisplayText(row);
115
- return revealLengthOf(`a${row.id}`, stripped, {
116
+ return revealLengthOf(scopeRevealKey(scope, `a${row.id}`), stripped, {
116
117
  enabled,
117
118
  active: row.streaming === true || row.fresh === true,
118
119
  });
119
120
  }
120
121
  if (row.kind === 'reasoning') {
121
- return revealLengthOf(`r${row.id}`, row.text, { enabled, active: row.streaming === true });
122
+ return revealLengthOf(scopeRevealKey(scope, `r${row.id}`), row.text, { enabled, active: row.streaming === true });
122
123
  }
123
124
  return row.text.length;
124
125
  }
@@ -305,6 +306,9 @@ function signatureParts(row, columns, expanded, expandedRows, streamViewToggledR
305
306
  }
306
307
  export function MessageList({ rows, expanded, expandedRows, selectedId, onToggleRow, streamViewToggledRows = NO_STREAM_VIEW_TOGGLED, onToggleStreamView = NOOP_TOGGLE_STREAM_VIEW, model, diffLayout = 'auto', thinkingFold = 'preview', jobGroupFold = 'auto', toolBackground = 'none', foldTerminalCommand = false, turnUsageRow = false, smoothStreaming = false, activityFrames, showAll, onToggleAll, onLoadOlder, olderHistory, thinkingVisible = true, historyPaintEnabled = true, fullscreen = false, registerRowRef, scrollHandle, forceMountRowId, newSinceRowId, onUnseenCount, onTimeline, failureHintRowId, failureHint, onOpenSubagent, onOpenSubagentView, onOpenJobs, onWatchJobOutput, onOpenFile, sessionCwd, onPreviewImage, suppressImageGraphics = false, }) {
307
308
  const lang = React.useSyncExternalStore(subscribeLang, getLang);
309
+ // Reveal memory is per Chat root: a recompose can mount this transcript
310
+ // under a fresh root, and each root owns its row ids.
311
+ const revealScope = useRevealScope();
308
312
  const hiddenCount = rows.length - RENDERED_ROW_CAP;
309
313
  // The thinking filter runs BEFORE virtualization so window indices line up.
310
314
  //
@@ -665,7 +669,7 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
665
669
  // reasoning height at once, remounting the widened window over rows
666
670
  // whose rendering never changed (Yoga spike + measure churn for
667
671
  // nothing). Base parts cover the universal height inputs.
668
- const parts = signatureParts(row, columns, expanded, expandedRows, streamViewToggledRows, thinkingVisible, thinkingFold, diffLayout, foldTerminalCommand, model, failureHintRowId, failureHint, revealDisplayLen(row, smoothStreaming), sessionCwd, fullscreen);
672
+ const parts = signatureParts(row, columns, expanded, expandedRows, streamViewToggledRows, thinkingVisible, thinkingFold, diffLayout, foldTerminalCommand, model, failureHintRowId, failureHint, revealDisplayLen(row, smoothStreaming, revealScope), sessionCwd, fullscreen);
669
673
  const cachedParts = sigs.get(row.id);
670
674
  let same = false;
671
675
  if (cachedParts !== undefined && cachedParts.length === parts.length) {
@@ -1304,7 +1308,7 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
1304
1308
  let displayStreaming = row.streaming === true;
1305
1309
  if (row.kind === 'assistant' && smoothStreaming) {
1306
1310
  const stripped = assistantDisplayText(row);
1307
- displayText = revealTextOf(`a${row.id}`, stripped, {
1311
+ displayText = revealTextOf(scopeRevealKey(revealScope, `a${row.id}`), stripped, {
1308
1312
  enabled: true,
1309
1313
  active: displayStreaming || row.fresh === true,
1310
1314
  });
@@ -1314,9 +1318,9 @@ export function MessageList({ rows, expanded, expandedRows, selectedId, onToggle
1314
1318
  displayText = assistantDisplayText(row);
1315
1319
  }
1316
1320
  else if (row.kind === 'reasoning' && smoothStreaming) {
1317
- displayText = revealTextOf(`r${row.id}`, row.text, { enabled: true, active: displayStreaming });
1321
+ displayText = revealTextOf(scopeRevealKey(revealScope, `r${row.id}`), row.text, { enabled: true, active: displayStreaming });
1318
1322
  }
1319
- return (_jsx(MemoRow, { rowId: row.id, kind: row.kind, text: displayText, interruptBackend: row.interruptBackend, images: row.images, textFull: row.kind === 'reasoning' ? row.text : undefined, executionTarget: row.executionTarget, selectionAttached: row.selectionAttached, sender: teamSenderOf(row), streaming: displayStreaming, thinkingOpen: row.thinkingOpen === true, durationMs: row.durationMs, reasoningTokens: row.reasoningTokens, time: row.time, marginTopOnTurn: marginTopOnTurn, isSelected: selectedId === row.id, isExpanded: expandedRows.has(row.id), expanded: expanded, model: model, diffLayout: diffLayout, thinkingFold: thinkingFold, toolBackground: toolBackground, foldTerminalCommand: foldTerminalCommand, smoothStreaming: smoothStreaming, fresh: row.fresh === true, revealVersion: revealVersion, activityFrames: activityFrames, background: rowBackground(row.id), toolCallId: tool?.callId, toolName: tool?.name, toolArgsText: tool?.argsText, toolArgsFull: tool?.argsFull, toolStatus: tool?.status, toolResultText: tool?.resultText, toolResultFull: tool?.resultFull, toolErrorText: tool?.errorText, toolFootnote: failureHintRowId === row.id ? failureHint : undefined, toolCallView: tool?.callView, toolResultView: tool?.resultView, toolStartedAt: tool?.startedAt, toolDurationMs: tool?.durationMs, toolSourceFolded: row.folded === true, toolLiveOutput: tool?.liveOutput, toolLiveOutputDropped: tool?.liveOutputDropped, fullscreen: fullscreen, turnUsage: row.turnUsage, subagent: subagent, job: job, jobGroup: jobGroup, onToggleRow: onToggleRow, onToggleStreamView: onToggleStreamView, streamViewToggled: streamViewToggledRows.has(row.id), onOpenSubagent: onOpenSubagent, onOpenSubagentView: onOpenSubagentView, onOpenJobs: onOpenJobs, onWatchJobOutput: onWatchJobOutput, onOpenFile: onOpenFile, sessionCwd: sessionCwd, onPreviewImage: onPreviewImage, suppressImageGraphics: suppressImageGraphics, setRowRef: setRowRef }, row.id));
1323
+ return (_jsx(MemoRow, { rowId: row.id, kind: row.kind, text: displayText, compactSummaryPreview: row.compactPreview, interruptBackend: row.interruptBackend, images: row.images, textFull: row.kind === 'reasoning' ? row.text : undefined, executionTarget: row.executionTarget, selectionAttached: row.selectionAttached, sender: teamSenderOf(row), streaming: displayStreaming, thinkingOpen: row.thinkingOpen === true, durationMs: row.durationMs, reasoningTokens: row.reasoningTokens, time: row.time, marginTopOnTurn: marginTopOnTurn, isSelected: selectedId === row.id, isExpanded: expandedRows.has(row.id), expanded: expanded, model: model, diffLayout: diffLayout, thinkingFold: thinkingFold, toolBackground: toolBackground, foldTerminalCommand: foldTerminalCommand, smoothStreaming: smoothStreaming, fresh: row.fresh === true, revealVersion: revealVersion, activityFrames: activityFrames, background: rowBackground(row.id), toolCallId: tool?.callId, toolName: tool?.name, toolArgsText: tool?.argsText, toolArgsFull: tool?.argsFull, toolStatus: tool?.status, toolResultText: tool?.resultText, toolResultFull: tool?.resultFull, toolErrorText: tool?.errorText, toolFootnote: failureHintRowId === row.id ? failureHint : undefined, toolCallView: tool?.callView, toolResultView: tool?.resultView, toolStartedAt: tool?.startedAt, toolDurationMs: tool?.durationMs, toolSourceFolded: row.folded === true, toolLiveOutput: tool?.liveOutput, toolLiveOutputDropped: tool?.liveOutputDropped, fullscreen: fullscreen, turnUsage: row.turnUsage, subagent: subagent, job: job, jobGroup: jobGroup, onToggleRow: onToggleRow, onToggleStreamView: onToggleStreamView, streamViewToggled: streamViewToggledRows.has(row.id), onOpenSubagent: onOpenSubagent, onOpenSubagentView: onOpenSubagentView, onOpenJobs: onOpenJobs, onWatchJobOutput: onWatchJobOutput, onOpenFile: onOpenFile, sessionCwd: sessionCwd, onPreviewImage: onPreviewImage, suppressImageGraphics: suppressImageGraphics, setRowRef: setRowRef }, row.id));
1320
1324
  }), bottomPad > 0 && _jsx(Box, { height: bottomPad, flexShrink: 0 })] }));
1321
1325
  }
1322
1326
  /** Load-earlier / show-previous divider row with a mouse hover tint — the
@@ -1325,7 +1329,7 @@ function ClickableDivider({ title, onClick }) {
1325
1329
  const [hovered, setHovered] = useState(false);
1326
1330
  return (_jsx(Box, { marginTop: 1, onClick: onClick, onMouseEnter: () => setHovered(true), onMouseLeave: () => setHovered(false), backgroundColor: hovered ? 'userMessageBackgroundHover' : undefined, children: _jsx(Divider, { title: title }) }));
1327
1331
  }
1328
- function TranscriptRow({ rowId, kind, text, interruptBackend, images, textFull, executionTarget, selectionAttached, sender, sessionCwd, streaming, thinkingOpen, durationMs, reasoningTokens, time, marginTopOnTurn, isSelected, isExpanded, expanded, model, diffLayout, smoothStreaming, fresh, revealVersion, thinkingFold, toolBackground, foldTerminalCommand, activityFrames, background, toolCallId, toolName, toolArgsText, toolArgsFull, toolStatus, toolResultText, toolResultFull, toolErrorText, toolFootnote, toolCallView, toolResultView, toolStartedAt, toolDurationMs, toolSourceFolded, toolLiveOutput, toolLiveOutputDropped, fullscreen, turnUsage, subagent, job, jobGroup, onToggleRow, onToggleStreamView, streamViewToggled, onOpenSubagent, onOpenSubagentView, onOpenJobs, onWatchJobOutput, onOpenFile, onPreviewImage, suppressImageGraphics, setRowRef, }) {
1332
+ function TranscriptRow({ rowId, kind, text, compactSummaryPreview, interruptBackend, images, textFull, executionTarget, selectionAttached, sender, sessionCwd, streaming, thinkingOpen, durationMs, reasoningTokens, time, marginTopOnTurn, isSelected, isExpanded, expanded, model, diffLayout, smoothStreaming, fresh, revealVersion, thinkingFold, toolBackground, foldTerminalCommand, activityFrames, background, toolCallId, toolName, toolArgsText, toolArgsFull, toolStatus, toolResultText, toolResultFull, toolErrorText, toolFootnote, toolCallView, toolResultView, toolStartedAt, toolDurationMs, toolSourceFolded, toolLiveOutput, toolLiveOutputDropped, fullscreen, turnUsage, subagent, job, jobGroup, onToggleRow, onToggleStreamView, streamViewToggled, onOpenSubagent, onOpenSubagentView, onOpenJobs, onWatchJobOutput, onOpenFile, onPreviewImage, suppressImageGraphics, setRowRef, }) {
1329
1333
  const ref = React.useCallback((el) => {
1330
1334
  setRowRef(rowId, el);
1331
1335
  }, [setRowRef, rowId]);
@@ -1448,7 +1452,7 @@ function TranscriptRow({ rowId, kind, text, interruptBackend, images, textFull,
1448
1452
  // The post-compaction summary defaults to a folded one-liner with a
1449
1453
  // text preview; Ctrl+O (global), message-selection Enter, or a click
1450
1454
  // reveals the full summary.
1451
- return (_jsx(Box, { marginTop: marginTopOnTurn ? 1 : 0, paddingLeft: 2, backgroundColor: background, ref: ref, onClick: foldOnClick, onMouseEnter: () => setCompactHovered(true), onMouseLeave: () => setCompactHovered(false), children: expanded || isExpanded ? (_jsx(Text, { dimColor: true, children: text })) : (_jsxs(Text, { dimColor: true, italic: true, color: compactHovered ? 'text' : undefined, children: [_jsx(Text, { color: compactHovered ? 'text' : undefined, children: "\u2234" }), ' ', t('compact-summary-folded'), " \u00B7 ", compactPreview(displayText), ' ', t('hint-expand-ctrl-o', { key: primaryComboString('transcript') })] })) }));
1455
+ return (_jsx(Box, { marginTop: marginTopOnTurn ? 1 : 0, paddingLeft: 2, backgroundColor: background, ref: ref, onClick: foldOnClick, onMouseEnter: () => setCompactHovered(true), onMouseLeave: () => setCompactHovered(false), children: expanded || isExpanded ? (_jsx(Text, { dimColor: true, children: text })) : (_jsxs(Text, { dimColor: true, italic: true, color: compactHovered ? 'text' : undefined, children: [_jsx(Text, { color: compactHovered ? 'text' : undefined, children: "\u2234" }), ' ', t('compact-summary-folded'), " \u00B7 ", compactPreview(compactSummaryPreview ?? displayText), ' ', t('hint-expand-ctrl-o', { key: primaryComboString('transcript') })] })) }));
1452
1456
  case 'subagent':
1453
1457
  if (!subagent)
1454
1458
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../src/components/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA+BzB,OAAO,KAAK,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,KAAK,EACV,gBAAgB,EAGjB,MAAM,2BAA2B,CAAA;AAClC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAA;AAa1E,OAAO,EAIL,KAAK,gBAAgB,EAEtB,MAAM,uBAAuB,CAAA;AAC9B,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAA;AAgLjF;gFACgF;AAChF,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,aAAa,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,GACzC,gBAAgB,EAAE,CAWpB;AAoKD;;;;GAIG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,IAAI,OAAO,CAAA;IAClB,yFAAyF;IACzF,IAAI,IAAI,MAAM,CAAA;IACd,4EAA4E;IAC5E,aAAa,CAAC,IAAI,SAAS;QAAE,KAAK,EAAE,eAAe,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,EAAE,CAA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,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,cAAc,EACd,eAAe,EACf,mBAAmB,EACnB,cAAc,EACd,YAAY,EACZ,4BAA4B,EAC5B,aAAa,EACb,YAAY,EACZ,gBAAwB,EACxB,qBAAqB,EACrB,GAAc,GACf,EAAE,gBAAgB,4BAuhIlB"}
@@ -1465,6 +1465,25 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
1465
1465
  clearDeliveredDraft();
1466
1466
  channel.notify(t('input-queued-after-turn'), { timeoutMs: 2500 });
1467
1467
  };
1468
+ /**
1469
+ * Take a retracted row's staged contexts back into the composer. The
1470
+ * submission spent their chips (`consumeAttachedContexts()`), so only the
1471
+ * row's snapshot still has them: without this a row retracted for editing
1472
+ * would re-send without its panel bodies. `truncated` rides along — the
1473
+ * snapshot's body is already capped, and re-deriving the flag from it would
1474
+ * hand the model a cut body with no `[… truncated]` marker.
1475
+ */
1476
+ const restageContexts = (contexts) => {
1477
+ for (const context of contexts ?? []) {
1478
+ channel.attachContext({
1479
+ source: context.source,
1480
+ sourceId: context.sourceId,
1481
+ title: context.title,
1482
+ content: context.content,
1483
+ truncated: context.truncated,
1484
+ });
1485
+ }
1486
+ };
1468
1487
  /**
1469
1488
  * Alt+Up: pull the last pending message back into the input for editing
1470
1489
  * (never interrupts the running turn). Refused when the running dsh-agent
@@ -1481,6 +1500,7 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
1481
1500
  channel.notify(t('input-cannot-retract'), { color: 'warning', timeoutMs: 2500 });
1482
1501
  return;
1483
1502
  }
1503
+ restageContexts(item.contexts);
1484
1504
  restoreDraftImages({
1485
1505
  text: item.text,
1486
1506
  images: item.images ?? [],
@@ -1509,6 +1529,9 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
1509
1529
  if (target === undefined)
1510
1530
  return;
1511
1531
  if (channel.removePending(target.id)) {
1532
+ // The text is back in the composer; its "send to Chat" contexts belong
1533
+ // there too, or editing and resending drops the panel bodies.
1534
+ restageContexts(target.contexts);
1512
1535
  channel.notify(t('input-retracted'), { timeoutMs: 2000 });
1513
1536
  }
1514
1537
  else {
@@ -1574,6 +1597,7 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
1574
1597
  // already retains every capability (nothing is discarded).
1575
1598
  const beforeBlock = foldBlockRef.current;
1576
1599
  updateFoldBlock(null);
1600
+ restageContexts(item.contexts);
1577
1601
  setInput(item.text, item.text.length, 'step', beforeBlock);
1578
1602
  replaceDraftImages(item.images ?? []);
1579
1603
  setSelectedCommand(0);
@@ -1585,6 +1609,7 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
1585
1609
  channel.notify(t('input-cannot-retract'), { color: 'warning', timeoutMs: 2500 });
1586
1610
  return;
1587
1611
  }
1612
+ restageContexts(item.contexts);
1588
1613
  restoreDraftImages({
1589
1614
  text: item.text,
1590
1615
  images: item.images ?? [],
@@ -1772,6 +1797,28 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
1772
1797
  }
1773
1798
  return handled !== false;
1774
1799
  };
1800
+ /**
1801
+ * Run one completion row. The screen's own (and registry) commands consume
1802
+ * it; a backend command (`/usage`, `/diff`) or backend skill answers through
1803
+ * the session, so its line goes out through the ordinary submit path.
1804
+ * Enter, the mouse pick and the batched-stdin line all share this: returning
1805
+ * on `tryRunCommand`'s false is what used to leave them dead.
1806
+ */
1807
+ const dispatchCompletion = (line, placement = 'steer') => {
1808
+ if (tryRunCommand(line))
1809
+ return;
1810
+ // A backend command (Codex `/usage`, `/diff`, a backend skill) answers
1811
+ // through the session. Interactive entry points take the typed placement
1812
+ // while a turn runs; a piped whole line keeps the legacy direct submit
1813
+ // (nobody is watching a steer notice there).
1814
+ if (placement === 'steer' && channel.working) {
1815
+ // Same placement as a typed line; the notice is kept because the UI
1816
+ // cannot tell a self-answering command from a real skill here.
1817
+ steerSend(line);
1818
+ return;
1819
+ }
1820
+ submitText(line);
1821
+ };
1775
1822
  /**
1776
1823
  * The Enter main path, shared by the inline prompt, the expanded
1777
1824
  * editor's Ctrl+Enter, and its Send button:
@@ -1803,8 +1850,8 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
1803
1850
  // draft through the ordinary path instead of accepting a stale row.
1804
1851
  if (overlayOpen && value === completionInput) {
1805
1852
  const command = suggestions[selectedCommand];
1806
- if (command) {
1807
- tryRunCommand(command.commandLine);
1853
+ if (command !== undefined) {
1854
+ dispatchCompletion(command.commandLine);
1808
1855
  return;
1809
1856
  }
1810
1857
  }
@@ -2443,7 +2490,7 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
2443
2490
  if (line.startsWith('/')) {
2444
2491
  const matches = channel.commandCompletions(line);
2445
2492
  if (matches.length === 1) {
2446
- tryRunCommand(matches[0].commandLine);
2493
+ dispatchCompletion(matches[0].commandLine, 'submit');
2447
2494
  return;
2448
2495
  }
2449
2496
  }
@@ -3891,11 +3938,19 @@ export function PromptInput({ channel, toastSuppressed, suspended = false, curso
3891
3938
  onWheelStep: (step) => {
3892
3939
  setFileSelected(i => Math.max(0, Math.min(fileMatches.length - 1, i + step)));
3893
3940
  } })), overlayOpen && (_jsx(CommandSuggestions, { commands: suggestions, selectedIndex: selectedCommand, columns: columns, query: value, accent: promptAccent, holdFrom: suggestionsHoldFrom,
3894
- // 点击行 = 运行该命令(与 Enter 同路径)
3941
+ // 点击行 = 运行该命令(选中行与 Enter 共用派遣)
3895
3942
  onPick: (index) => {
3896
3943
  const command = suggestions[index];
3897
- if (command)
3898
- tryRunCommand(valueRef.current === completionInput ? command.commandLine : valueRef.current);
3944
+ if (command === undefined)
3945
+ return;
3946
+ // A stale row (the draft moved on while it was showing) does not
3947
+ // own the click: only run what the screen can dispatch, never
3948
+ // send the half-typed draft to the model.
3949
+ if (valueRef.current !== completionInput) {
3950
+ tryRunCommand(valueRef.current);
3951
+ return;
3952
+ }
3953
+ dispatchCompletion(command.commandLine);
3899
3954
  },
3900
3955
  // 滚轮 = 移动选中行(与 ↑/↓ 同路径,窗口跟随)
3901
3956
  onWheelStep: (step) => {
@@ -1 +1 @@
1
- {"version":3,"file":"SplitDiffView.d.ts","sourceRoot":"","sources":["../../../src/components/SplitDiffView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAQ7D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAI/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AAyhB3D,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAuB,EACvB,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAA;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3C,GAAG,KAAK,CAAC,SAAS,CA0MlB"}
1
+ {"version":3,"file":"SplitDiffView.d.ts","sourceRoot":"","sources":["../../../src/components/SplitDiffView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAQ7D,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAI/E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AA4hB3D,wBAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,KAAK,EACL,OAAO,EACP,OAAO,EACP,cAAuB,EACvB,MAAM,GACP,EAAE;IACD,QAAQ,CAAC,KAAK,EAAE,SAAS,YAAY,EAAE,CAAA;IACvC,8EAA8E;IAC9E,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;IACtB,qEAAqE;IACrE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,cAAc,CAAC,EAAE,cAAc,CAAA;IACxC;;;;;;OAMG;IACH,QAAQ,CAAC,MAAM,CAAC,EAAE;QAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;KAAE,CAAA;CAC3C,GAAG,KAAK,CAAC,SAAS,CA0MlB"}
@@ -393,8 +393,9 @@ function clippedGraphemes(segments, budget) {
393
393
  * the same distance from their divider; the one-cell gap between gutter and
394
394
  * text is the caller's. */
395
395
  function gutterText(kind, tone, lineNo, hasContent, lineNoWidth) {
396
- // Status gutter instead of line numbers: ToolFileDiff has no file
397
- // offsets, and an invented number misleads (issue #250, P2-3).
396
+ // Status gutter instead of line numbers: this view does not consume the
397
+ // optional oldStart/newStart offsets, and an invented number misleads
398
+ // (issue #250, P2-3).
398
399
  const marker = kind === 'context' ? ' ' : tone === 'old' ? '−' : '+';
399
400
  const numbered = lineNoWidth > 0
400
401
  ? `${(lineNo === undefined || !hasContent ? '' : String(lineNo)).padStart(lineNoWidth)} ${marker}`
@@ -1,3 +1,4 @@
1
+ import type { AccountNotificationNotice } from '../dsh-adapter/oauth/account-notifications.js';
1
2
  import React from 'react';
2
3
  import type { StarMilestone } from '../usageStats.js';
3
4
  import type { WhaleCouponNotice } from '../dsh-adapter/oauth/bonus.js';
@@ -51,9 +52,10 @@ export declare function StarPrompt({ milestone, actions, onClose, initialPhase,
51
52
  * 走这条(只演感谢,不再问一次)。 */
52
53
  readonly initialPhase?: 'ask' | 'done';
53
54
  }): React.ReactNode;
54
- export declare function WhaleCouponPrompt({ notice, onShown, onClose, }: {
55
- readonly notice: WhaleCouponNotice;
56
- readonly onShown: (orderId: WhaleCouponNotice['orderId']) => void;
55
+ /** One existing account-notice lane, with server copy when no coupon data exists. */
56
+ export declare function WhaleCouponPrompt(props: {
57
+ readonly notice: WhaleCouponNotice | AccountNotificationNotice;
58
+ readonly onShown: (orderId: string) => void;
57
59
  readonly onClose: () => void;
58
60
  }): React.ReactNode;
59
61
  //# sourceMappingURL=StarPrompt.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StarPrompt.d.ts","sourceRoot":"","sources":["../../../src/components/StarPrompt.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAazB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAuBtE,2EAA2E;AAC3E,MAAM,MAAM,WAAW,GACnB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAA;CAAE,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GAChD;IAAE,QAAQ,CAAC,IAAI,EAAE,YAAY,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAE9E;;0DAE0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IAChD,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;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AQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,GACrD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAA;AAE9E;;0DAE0D;AAC1D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,CAAA;IAChD,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAC,EACzB,SAAS,EACT,OAAO,EACP,OAAO,EACP,YAAoB,GACrB,EAAE;IACD,yEAAyE;IACzE,QAAQ,CAAC,SAAS,EAAE,aAAa,CAAA;IACjC,QAAQ,CAAC,OAAO,EAAE,iBAAiB,CAAA;IACnC,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;IAC5B;2BACuB;IACvB,QAAQ,CAAC,YAAY,CAAC,EAAE,KAAK,GAAG,MAAM,CAAA;CACvC,GAAG,KAAK,CAAC,SAAS,CAuOlB;AAqBD,qFAAqF;AACrF,wBAAgB,iBAAiB,CAAC,KAAK,EAAE;IACvC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,GAAG,yBAAyB,CAAA;IAC9D,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC3C,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAC7B,GAAG,KAAK,CAAC,SAAS,CASlB"}
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { sanitizeEditableText } from '../utils/inputPaste.js';
2
3
  import React from 'react';
3
- import { Box, Text, useInput, useTerminalImages, useTerminalSize } from '../ui.js';
4
+ import { afterNextTerminalFlush } from '../ink/flush-tick.js';
5
+ import { Box, Text, ScrollBox, useApp, useInput, useTerminalImages, useTerminalSize } from '../ui.js';
4
6
  import { getLang, subscribeLang, t } from '../i18n.js';
5
7
  import { Divider } from './design-system/Divider.js';
6
8
  import { HintLine } from './design-system/HintLine.js';
@@ -171,7 +173,19 @@ function couponExpiry(expiresAt) {
171
173
  return month === undefined || day === undefined || hour === undefined || minute === undefined
172
174
  ? null : { month, day, time: `${hour}:${minute}` };
173
175
  }
174
- export function WhaleCouponPrompt({ notice, onShown, onClose, }) {
176
+ /** One existing account-notice lane, with server copy when no coupon data exists. */
177
+ export function WhaleCouponPrompt(props) {
178
+ const notice = props.notice;
179
+ if (notice.kind !== 'account-notification')
180
+ return _jsx(LegacyWhaleCouponPrompt, { ...props, notice: notice });
181
+ if (notice.amount !== undefined && notice.currency !== undefined && notice.expiresAt !== undefined) {
182
+ // Keep the store's snapshot identity: allocating a presentation object here
183
+ // would re-arm the write receipt on every unrelated Chat commit.
184
+ return _jsx(LegacyWhaleCouponPrompt, { ...props, notice: notice });
185
+ }
186
+ return _jsx(ServerAccountNotice, { ...props, notice: notice });
187
+ }
188
+ function LegacyWhaleCouponPrompt({ notice, onShown, onClose, }) {
175
189
  const lang = React.useSyncExternalStore(subscribeLang, getLang);
176
190
  const { columns, rows } = useTerminalSize();
177
191
  const imagesAvailable = useTerminalImages();
@@ -186,10 +200,17 @@ export function WhaleCouponPrompt({ notice, onShown, onClose, }) {
186
200
  const amount = notice.amount.replace(/(\.\d*?)0+$/u, '$1').replace(/\.$/u, '');
187
201
  const unit = lang === 'zh' ? notice.currency === 'CNY' ? '元' : '美元' : notice.currency;
188
202
  const expiry = couponExpiry(notice.expiresAt);
189
- React.useEffect(() => {
190
- const timer = setTimeout(() => onShown(notice.orderId), 0);
191
- return () => { clearTimeout(timer); };
192
- }, [notice.orderId, onShown]);
203
+ const { stdout } = useApp();
204
+ // Register during mutation so even synchronous commits capture this card.
205
+ // A queued write is not presentation: wait for its successful completion.
206
+ // Register once per snapshot identity: an unrelated commit with a fresh
207
+ // parent callback must not re-arm the receipt, but a refreshed same-id
208
+ // snapshot must (the store rejects an ack carrying the previous snapshot).
209
+ // The callback reads the latest pair so the newest card acknowledges itself.
210
+ const receipt = React.useRef({ onShown, orderId: notice.orderId });
211
+ receipt.current.onShown = onShown;
212
+ receipt.current.orderId = notice.orderId;
213
+ React.useInsertionEffect(() => afterNextTerminalFlush(stdout, () => receipt.current.onShown(receipt.current.orderId)), [stdout, notice]);
193
214
  useInput((_input, key) => {
194
215
  if (key.return || key.escape)
195
216
  onClose();
@@ -326,3 +347,32 @@ function useConfettiFrame() {
326
347
  }, []);
327
348
  return frame;
328
349
  }
350
+ /** Server-authored account text uses the existing account-notice modal lane. */
351
+ function ServerAccountNotice({ notice, onShown, onClose }) {
352
+ const { columns, rows } = useTerminalSize();
353
+ const { stdout } = useApp();
354
+ const background = useTerminalBackground();
355
+ const scroll = React.useRef(null);
356
+ const width = Math.max(1, Math.min(columns, 72));
357
+ const height = Math.max(1, Math.min(rows, 20));
358
+ // Mutation-phase registration precedes even the synchronous test renderer's
359
+ // resetAfterCommit. The callback requires a real write, never a timer guess;
360
+ // it re-arms only when this snapshot changes (a language refresh keeps the
361
+ // same id) and reads the latest callback through the ref.
362
+ const receipt = React.useRef({ onShown, orderId: notice.orderId });
363
+ receipt.current.onShown = onShown;
364
+ receipt.current.orderId = notice.orderId;
365
+ React.useInsertionEffect(() => afterNextTerminalFlush(stdout, () => receipt.current.onShown(receipt.current.orderId)), [stdout, notice]);
366
+ useInput((_input, key, event) => {
367
+ event.stopImmediatePropagation();
368
+ if (key.return || key.escape)
369
+ onClose();
370
+ else if (key.upArrow || key.wheelUp || key.pageUp)
371
+ scroll.current?.scrollBy(key.pageUp ? -Math.max(1, height - 5) : -3);
372
+ else if (key.downArrow || key.wheelDown || key.pageDown)
373
+ scroll.current?.scrollBy(key.pageDown ? Math.max(1, height - 5) : 3);
374
+ });
375
+ const accountAction = notice.actions.find(action => action.target.type === 'app_route');
376
+ const dismiss = notice.actions.find(action => action.target.type === 'dismiss');
377
+ return _jsxs(_Fragment, { children: [_jsx(Box, { position: "absolute", bottom: 0, left: 0, width: "100%", height: rows, backdrop: "dim", onClick: onClose }), _jsxs(Box, { position: "absolute", left: Math.max(0, Math.floor((columns - width) / 2)), bottom: Math.max(0, Math.floor((rows - height) / 2)), width: width, height: height, flexDirection: "column", borderStyle: "round", borderColor: "inactive", paddingX: 1, backgroundColor: background, opaque: true, overflow: "hidden", onClick: event => event.stopImmediatePropagation(), children: [_jsx(Box, { flexShrink: 0, children: _jsx(Text, { bold: true, color: "accent", wrap: "truncate-end", children: sanitizeEditableText(notice.title) }) }), _jsxs(ScrollBox, { ref: scroll, flexDirection: "column", flexGrow: 1, height: Math.max(1, height - 5), children: [_jsx(Text, { wrap: "wrap", children: sanitizeEditableText(notice.body) }), accountAction !== undefined && _jsx(Text, { dimColor: true, wrap: "wrap", children: t('account-notice-account-route', { label: sanitizeEditableText(accountAction.label) }) })] }), _jsx(Box, { flexShrink: 0, children: _jsx(Text, { dimColor: true, wrap: "wrap", children: t('account-notice-hint', { label: dismiss === undefined ? t('account-notice-close') : sanitizeEditableText(dismiss.label) }) }) })] })] });
378
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"SubagentCard.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAEvC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAIhE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAA;AAC9D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAA;AAOvD,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,aAAa,CAAA;IACvB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,CAAC,KAAK,EAAE,UAAU,GAAG,IAAI,CAAA;IACjC,OAAO,CAAC,EAAE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AC,MAAM,EAAE,gBAAgB,EAAE,SAAS,EAAE,OAAO,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,GAAG,QAAQ,GAAG,OAAO,GAAG,QAAQ,CAAA;CAAE,CAQpK;AAED,wBAAgB,YAAY,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,OAAmB,EAAE,UAAU,EAAE,EAAE,iBAAiB,GAAG,KAAK,CAAC,SAAS,CAgGhI"}
@@ -70,7 +70,7 @@ export function SubagentCard({ subagent, focused, onClick, variant = 'default',
70
70
  subagent.effort,
71
71
  shownDuration === undefined ? undefined : formatDuration(shownDuration),
72
72
  ].filter(part => part !== undefined && part !== '').join(' · ');
73
- return _jsxs(Box, { ref: clockRef, flexDirection: "column", paddingLeft: 1, marginBottom: panelMode ? 0 : 1, onClick: onClick, onMouseEnter: onClick !== undefined ? () => setHovered(true) : undefined, onMouseLeave: onClick !== undefined ? () => setHovered(false) : undefined, backgroundColor: hoverTint ? 'userMessageBackgroundHover' : undefined, children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { flexShrink: 0, marginRight: 1, children: _jsx(Text, { color: glyphColor, children: glyph }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsx(Text, { bold: true, color: focused ? 'accent' : undefined, wrap: "truncate-end", children: teamMember !== undefined ? teamMember.name : panelMode ? subagent.description : `${t('subagent-card-prefix')}${subagent.description}` }) }), teamMember !== undefined && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : teamGlyph?.color, dimColor: teamMember.status === 'provisioning', children: t(`team-status-${teamMember.status}`) }) })), teamMember === undefined && subagent.mode === 'continuable' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : 'warning', children: t('subagent-mode-continuable') }) })), teamMember === undefined && subagent.mode === 'one-shot' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { dimColor: true, children: t('subagent-mode-one-shot') }) })), !panelMode && meta !== '' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: meta }) }))] }), panelMode && panelMeta !== '' && _jsx(Box, { paddingLeft: 3, children: _jsx(Text, { dimColor: true, wrap: "wrap", children: panelMeta }) }), panelMode
73
+ return _jsxs(Box, { ref: clockRef, flexDirection: "column", paddingLeft: 1, marginBottom: panelMode ? 0 : 1, onClick: onClick, onMouseEnter: onClick !== undefined ? () => setHovered(true) : undefined, onMouseLeave: onClick !== undefined ? () => setHovered(false) : undefined, backgroundColor: hoverTint ? 'userMessageBackgroundHover' : undefined, children: [_jsxs(Box, { flexDirection: "row", children: [_jsx(Box, { flexShrink: 0, marginRight: 1, children: _jsx(Text, { color: glyphColor, children: glyph }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsx(Text, { bold: true, color: focused ? 'accent' : undefined, wrap: "truncate-end", children: teamMember !== undefined ? teamMember.name : panelMode ? subagent.description : `${t('subagent-card-prefix')}${subagent.description}` }) }), teamMember === undefined && subagent.name !== undefined && subagent.name !== '' && (_jsx(Box, { flexShrink: 1, overflow: "hidden", marginLeft: 1, children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: subagent.name }) })), teamMember !== undefined && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : teamGlyph?.color, dimColor: teamMember.status === 'provisioning', children: t(`team-status-${teamMember.status}`) }) })), teamMember === undefined && subagent.mode === 'continuable' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : 'warning', children: t('subagent-mode-continuable') }) })), teamMember === undefined && subagent.mode === 'one-shot' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { dimColor: true, children: t('subagent-mode-one-shot') }) })), !panelMode && meta !== '' && (_jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { dimColor: true, wrap: "truncate-end", children: meta }) }))] }), panelMode && panelMeta !== '' && _jsx(Box, { paddingLeft: 3, children: _jsx(Text, { dimColor: true, wrap: "wrap", children: panelMeta }) }), panelMode
74
74
  ? previewRows.map(row => _jsx(Text, { dimColor: true, wrap: "truncate", children: ` ${row.text}` }, row.key))
75
75
  : liveLine !== undefined && _jsx(Text, { dimColor: true, wrap: "truncate", children: ` │ ${liveLine}` })] });
76
76
  }
@@ -1 +1 @@
1
- {"version":3,"file":"SubagentDashboard.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentDashboard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAOhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAA;AAC9E,OAAO,KAAK,EAAY,QAAQ,EAAE,MAAM,kCAAkC,CAAA;AAI1E,MAAM,WAAW,sBAAsB;IACrC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAA;IACnC,+EAA+E;IAC/E,QAAQ,CAAC,KAAK,CAAC,EAAE,SAAS,aAAa,EAAE,CAAA;IACzC;mDAC+C;IAC/C,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC;0BACsB;IACtB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,wCAAwC;IACxC,QAAQ,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACtC;6DACyD;IACzD,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf;2DACuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;I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,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACpC;0BACsB;IACtB,UAAU,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACtC,wCAAwC;IACxC,QAAQ,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACtC;6DACyD;IACzD,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf;2DACuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB;iCAC6B;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,2EAA2E;AAC3E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,iBAAiB,GAAG,OAAO,CAOjF;AAED,yCAAyC;AACzC,wBAAgB,UAAU,CAAC,EAAE,OAAO,EAAE,EAAE;IAAE,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,GAAG,KAAK,CAAC,SAAS,CAWhF;AAiED;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,SAAS,EACT,IAAI,EACJ,SAAS,EACT,KAAK,EACL,OAAO,EACP,QAAQ,EACR,UAAU,EACV,QAAQ,EACR,OAAmB,EACnB,OAAc,EACd,OAAc,GACf,EAAE,sBAAsB,GAAG,KAAK,CAAC,SAAS,CA6T1C"}
@@ -9,6 +9,7 @@ import { actionMatches } from '../utils/keymap.js';
9
9
  import { usePanelInput } from './sidePanel/usePanelInput.js';
10
10
  import { AgentMessagesSummary } from './messages/AgentMessageFlow.js';
11
11
  import { isTeamTaskBlocked, teamDashboardModel, teamTaskProgress } from './teamRoster.js';
12
+ import { isDegradedChannel, summarizeChannelFailures } from '../channel/subagent-failure.js';
12
13
  import { isMinimalUiMode } from '../minimalUiMode.js';
13
14
  /** Accept Ink's Enter flag and the panel dispatcher's normalized alias. */
14
15
  export function isPanelPlainReturn(input, key) {
@@ -27,7 +28,7 @@ export function ExitButton({ onClick }) {
27
28
  /** A teammate the host has not announced as a subagent yet. */
28
29
  function TeamRosterOnlyRow({ row, focused, panelMode, self }) {
29
30
  const { glyph, color } = teamStatusGlyph(row.status, isMinimalUiMode());
30
- return (_jsxs(Box, { flexDirection: "row", paddingLeft: 1, marginBottom: panelMode ? 0 : 1, children: [_jsx(Box, { flexShrink: 0, marginRight: 1, children: _jsx(Text, { color: color, children: glyph }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { bold: true, color: focused ? 'accent' : undefined, children: row.member.name }), self && _jsx(Text, { dimColor: true, children: ' · ' + t('team-self-mark') })] }) }), _jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : color, dimColor: row.status === 'provisioning', children: t(`team-status-${row.status}`) }) })] }));
31
+ return (_jsxs(Box, { flexDirection: "row", paddingLeft: 1, marginBottom: panelMode ? 0 : 1, children: [_jsx(Box, { flexShrink: 0, marginRight: 1, children: _jsx(Text, { color: color, children: glyph }) }), _jsx(Box, { flexGrow: 1, flexShrink: 1, overflow: "hidden", children: _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { bold: true, color: focused ? 'accent' : undefined, children: row.member.name }), row.member.description !== undefined && _jsx(Text, { dimColor: true, children: ' · ' + row.member.description }), self && _jsx(Text, { dimColor: true, children: ' · ' + t('team-self-mark') })] }) }), _jsx(Box, { flexShrink: 0, marginLeft: 1, children: _jsx(Text, { color: focused ? 'accent' : color, dimColor: row.status === 'provisioning', children: t(`team-status-${row.status}`) }) })] }));
31
32
  }
32
33
  const TASK_GLYPH = {
33
34
  pending: { glyph: '○', color: 'subtle' },
@@ -156,13 +157,19 @@ export function SubagentDashboard({ subagents, team, sessionId, peers, onClose,
156
157
  const running = subagents.filter(s => s.status === 'running').length;
157
158
  const completed = subagents.filter(s => s.status === 'completed').length;
158
159
  const failed = subagents.filter(s => s.status === 'failed').length;
160
+ const channelFailures = summarizeChannelFailures(subagents).filter(isDegradedChannel);
159
161
  const memberCount = (status) => model?.teammates.filter(row => row.status === status).length ?? 0;
160
162
  const teamSep = panelMode ? ' · ' : ' ';
161
163
  // Full-screen keeps its inset; the panel uses one cell on each side.
162
164
  const outer = panelMode
163
165
  ? { paddingLeft: 1, paddingRight: 1, paddingTop: 0 }
164
166
  : { paddingX: 2, paddingY: 1 };
165
- return (_jsxs(Box, { flexDirection: "column", ...outer, children: [!panelMode && _jsx(Divider, { color: "accent", title: t(team === undefined ? 'subagent-dashboard-title' : 'team-dashboard-title') }), _jsxs(Box, { flexDirection: "row", gap: 3, marginTop: panelMode ? 0 : 1, marginBottom: panelMode ? 0 : 1, children: [team !== undefined ? (_jsx(Box, { flexShrink: 1, overflow: "hidden", children: _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { color: "accent", children: memberCount('running') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-running') + teamSep }), _jsx(Text, { color: "accent", children: memberCount('idle') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-idle') + teamSep }), memberCount('provisioning') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: memberCount('provisioning') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-provisioning') + teamSep })] })), memberCount('active') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "accent", children: memberCount('active') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-active') + teamSep })] })), memberCount('failed') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "error", children: memberCount('failed') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-failed') + teamSep })] })), _jsx(Text, { dimColor: true, children: t('team-tasks-count', teamTaskProgress(team.tasks)) })] }) })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { children: [_jsx(Text, { color: "accent", children: running }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-running')] })] }), _jsxs(Text, { children: [_jsx(Text, { color: "success", children: completed }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-completed')] })] }), failed > 0 && (_jsxs(Text, { children: [_jsx(Text, { color: "error", children: failed }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-failed')] })] })), nested > 0 && (_jsxs(Text, { children: [_jsx(Text, { color: "accent", children: nested }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-nested')] })] }))] })), _jsx(Box, { flexGrow: 1 }), !panelMode && onClose !== undefined && _jsx(ExitButton, { onClick: onClose })] }), team?.failure !== undefined && (_jsx(Text, { color: "error", wrap: "wrap", children: '⚠ ' + t('team-failure', { failure: team.failure }) })), _jsx(Box, { flexDirection: "column", maxHeight: panelMode ? Math.max(6, rows - 4) : Math.max(10, rows - 10), marginTop: panelMode ? 0 : 1, children: _jsxs(ScrollBox, { ref: scrollRef, flexDirection: "column", flexGrow: 1, children: [model !== undefined && (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: t('team-members-title') }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: ' ◆ ' + t(model.viewedFromLead ? 'team-lead-row' : 'team-lead-row-peer') })] })), model === undefined && subagents.length === 0 ? (_jsxs(Box, { flexDirection: "column", alignItems: "center", marginTop: Math.max(2, Math.floor((rows - 16) / 3)), children: [_jsx(Text, { dimColor: true, children: '○' }), _jsx(Text, { dimColor: true, children: t('subagent-none') }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: t('subagent-empty-hint') }) })] })) : (entries.map(({ key, subagent, teamRow, nested: nestedMark }, index) => (_jsxs(Box, { flexDirection: "column", children: [index === othersStart && _jsx(Text, { dimColor: true, children: t('team-others-title') }), nestedMark && (_jsx(Text, { dimColor: true, children: ' ↳ ' + t('subagent-nested-mark') })), subagent === undefined ? (teamRow !== undefined && _jsx(TeamRosterOnlyRow, { row: teamRow, focused: index === focusIndex, panelMode: panelMode, self: teamRow.member.id === sessionId })) : (_jsx(SubagentCard, { subagent: subagent, variant: panelMode ? 'panel' : 'default', focused: index === focusIndex, onClick: onSelect !== undefined
167
+ const teamOff = team !== undefined && team.mode === 'switch' && !team.enabled;
168
+ return (_jsxs(Box, { flexDirection: "column", ...outer, children: [!panelMode && (_jsx(Divider, { color: "accent", title: t(team === undefined ? 'subagent-dashboard-title' : teamOff ? 'team-dashboard-title-off' : 'team-dashboard-title') })), _jsxs(Box, { flexDirection: "row", gap: 3, marginTop: panelMode ? 0 : 1, marginBottom: panelMode ? 0 : 1, children: [team !== undefined ? (_jsx(Box, { flexShrink: 1, overflow: "hidden", children: _jsxs(Text, { wrap: "truncate-end", children: [_jsx(Text, { color: "accent", children: memberCount('running') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-running') + teamSep }), _jsx(Text, { color: "accent", children: memberCount('idle') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-idle') + teamSep }), memberCount('provisioning') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: memberCount('provisioning') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-provisioning') + teamSep })] })), memberCount('active') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "accent", children: memberCount('active') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-active') + teamSep })] })), memberCount('failed') > 0 && (_jsxs(_Fragment, { children: [_jsx(Text, { color: "error", children: memberCount('failed') }), _jsx(Text, { dimColor: true, children: ' ' + t('team-status-failed') + teamSep })] })), _jsx(Text, { dimColor: true, children: t('team-tasks-count', teamTaskProgress(team.tasks)) })] }) })) : (_jsxs(_Fragment, { children: [_jsxs(Text, { children: [_jsx(Text, { color: "accent", children: running }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-running')] })] }), _jsxs(Text, { children: [_jsx(Text, { color: "success", children: completed }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-completed')] })] }), failed > 0 && (_jsxs(Text, { children: [_jsx(Text, { color: "error", children: failed }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-failed')] })] })), nested > 0 && (_jsxs(Text, { children: [_jsx(Text, { color: "accent", children: nested }), _jsxs(Text, { dimColor: true, children: [" ", t('subagent-count-nested')] })] }))] })), _jsx(Box, { flexGrow: 1 }), !panelMode && onClose !== undefined && _jsx(ExitButton, { onClick: onClose })] }), team?.failure !== undefined && (_jsx(Text, { color: "error", wrap: "wrap", children: '⚠ ' + t('team-failure', { failure: team.failure }) })), teamOff && _jsx(Text, { dimColor: true, wrap: "wrap", children: t('team-mode-off-note') }), channelFailures.map(summary => (_jsx(Text, { color: "error", wrap: "wrap", children: '⚠ ' + t('subagent-channel-degraded', {
169
+ provider: summary.provider,
170
+ failed: summary.failed,
171
+ settled: summary.settled,
172
+ }) }, summary.provider))), _jsx(Box, { flexDirection: "column", maxHeight: panelMode ? Math.max(6, rows - 4) : Math.max(10, rows - 10), marginTop: panelMode ? 0 : 1, children: _jsxs(ScrollBox, { ref: scrollRef, flexDirection: "column", flexGrow: 1, children: [model !== undefined && (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: t('team-members-title') }), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: ' ◆ ' + t(model.viewedFromLead ? 'team-lead-row' : 'team-lead-row-peer') })] })), model === undefined && subagents.length === 0 ? (_jsxs(Box, { flexDirection: "column", alignItems: "center", marginTop: Math.max(2, Math.floor((rows - 16) / 3)), children: [_jsx(Text, { dimColor: true, children: '○' }), _jsx(Text, { dimColor: true, children: t('subagent-none') }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { dimColor: true, children: t('subagent-empty-hint') }) })] })) : (entries.map(({ key, subagent, teamRow, nested: nestedMark }, index) => (_jsxs(Box, { flexDirection: "column", children: [index === othersStart && _jsx(Text, { dimColor: true, children: t('team-others-title') }), nestedMark && (_jsx(Text, { dimColor: true, children: ' ↳ ' + t('subagent-nested-mark') })), subagent === undefined ? (teamRow !== undefined && _jsx(TeamRosterOnlyRow, { row: teamRow, focused: index === focusIndex, panelMode: panelMode, self: teamRow.member.id === sessionId })) : (_jsx(SubagentCard, { subagent: subagent, variant: panelMode ? 'panel' : 'default', focused: index === focusIndex, onClick: onSelect !== undefined
166
173
  // Click = view detail, same as Enter on the focused card.
167
174
  ? () => onSelect(subagent.agentId)
168
175
  : undefined, ...teamRow === undefined ? {} : { teamMember: { name: teamRow.member.name, status: teamRow.status } } })), teamRow?.status === 'failed' && teamRow.member.error !== undefined && (_jsx(Text, { color: "error", wrap: "truncate-end", children: ' │ ' + teamRow.member.error })), teamRow?.status === 'idle' && subagent?.status === 'failed' && (_jsx(Text, { color: "error", wrap: "truncate-end", children: ' │ ' + t('team-last-run-failed', { error: subagent.error ?? '' }).trimEnd() })), subagent !== undefined && messages !== undefined && messages.length > 0 && (_jsx(AgentMessagesSummary, { messages: messages.filter(message => message.from === subagent.agentId || message.to === subagent.agentId), selfAgentId: subagent.agentId })), subagent !== undefined && onOpenView !== undefined && (!panelMode || index === focusIndex) && (_jsx(Box, { paddingLeft: 1, onClick: () => onOpenView(subagent.agentId), children: _jsx(Text, { color: "subtle", children: `⤢ ${t('agent-view-open-action')}` }) })), !panelMode && index < entries.length - 1 && index + 1 !== othersStart && (_jsx(Text, { dimColor: true, children: '─'.repeat(Math.max(20, Math.min(72, columns - 6))) }))] }, key)))), team !== undefined && _jsx(TeamTaskBoard, { tasks: team.tasks })] }) }), peers !== undefined && (!panelMode || peers.length > 0) && (_jsx(Box, { flexDirection: "column", children: panelMode ? (_jsx(Text, { dimColor: true, wrap: "truncate-end", children: t('agents-peers-title') + ' · ' + peers.length })) : (_jsxs(_Fragment, { children: [_jsx(Text, { dimColor: true, children: t('agents-peers-title') }), peers.length === 0 ? (_jsx(Text, { dimColor: true, children: ' ' + t('agents-peers-empty') })) : (_jsxs(Box, { flexDirection: "column", children: [peers.map(peer => (_jsx(Text, { dimColor: true, wrap: "truncate-end", children: ' · ' + (peer.name ?? peer.label ?? peer.agentId.slice(0, 8)) + ' · ' + peer.agentId.slice(0, 8) }, peer.agentId))), _jsx(Text, { dimColor: true, wrap: "truncate-end", children: ' ' + t('agents-peers-note') })] }))] })) })), !panelMode && (_jsxs(_Fragment, { children: [_jsx(Divider, { color: "subtle", title: "" }), _jsx(Box, { children: _jsx(Text, { dimColor: true, children: onSelect ? t('subagent-dashboard-hint-detail') : t('subagent-dashboard-hint-basic') }) })] }))] }));
@@ -1 +1 @@
1
- {"version":3,"file":"SubagentDetailScene.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentDetailScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAsB,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAIpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAExG,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,kCAAkC,CAAA;AA+JzC,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,aAAa,CAAA;IACvB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAA;IACjD,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC;;qDAEiD;IACjD,cAAc,CAAC,EAAE,gBAAgB,CAAA;IACjC,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACtC,gDAAgD;IAChD,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAA;IACxF;iCAC6B;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,aAAa,EACb,MAAM,EACN,WAAW,EACX,cAAc,EACd,UAAU,EACV,QAAa,EACb,OAAO,EACP,OAAmB,EACnB,OAAc,EACd,OAAc,GACf,EAAE,wBAAwB,GAAG,KAAK,CAAC,SAAS,CAomB5C"}
1
+ {"version":3,"file":"SubagentDetailScene.d.ts","sourceRoot":"","sources":["../../../src/components/SubagentDetailScene.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAsB,aAAa,EAAE,MAAM,6BAA6B,CAAA;AAIpF,OAAO,KAAK,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAExG,OAAO,EAKL,KAAK,gBAAgB,EACtB,MAAM,kCAAkC,CAAA;AA+JzC,MAAM,WAAW,wBAAwB;IACvC,QAAQ,EAAE,aAAa,CAAA;IACvB,+DAA+D;IAC/D,aAAa,CAAC,EAAE,CAAC,QAAQ,EAAE,aAAa,KAAK,IAAI,CAAA;IACjD,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACvC;;qDAEiD;IACjD,cAAc,CAAC,EAAE,gBAAgB,CAAA;IACjC,yBAAyB;IACzB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,iCAAiC;IACjC,QAAQ,CAAC,EAAE,SAAS,gBAAgB,EAAE,CAAA;IACtC,gDAAgD;IAChD,OAAO,CAAC,EAAE;QAAE,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;QAAC,QAAQ,CAAC,MAAM,EAAE,kBAAkB,CAAA;KAAE,CAAA;IACxF;iCAC6B;IAC7B,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,CAAA;IAC7B,+CAA+C;IAC/C,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,QAAQ,EACR,aAAa,EACb,MAAM,EACN,WAAW,EACX,cAAc,EACd,UAAU,EACV,QAAa,EACb,OAAO,EACP,OAAmB,EACnB,OAAc,EACd,OAAc,GACf,EAAE,wBAAwB,GAAG,KAAK,CAAC,SAAS,CA2mB5C"}
@@ -398,7 +398,7 @@ export function SubagentDetailScene({ subagent, onFailureRead, onBack, onInterru
398
398
  const outer = panelMode
399
399
  ? { paddingLeft: 1, paddingRight: 1, paddingTop: 0 }
400
400
  : { paddingX: 2, paddingY: 1 };
401
- return (_jsxs(Box, { flexDirection: "column", ...outer, children: [_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { color: info.color, bold: true, children: info.glyph }), _jsx(Text, { bold: true, children: `${t('subagent-card-prefix')}${subagent.description}` }), _jsx(Text, { dimColor: true, children: "\u00B7" }), _jsx(Text, { color: info.color, children: info.label }), subagent.mode === 'continuable' && _jsx(Text, { color: "warning", children: t('subagent-mode-continuable') }), subagent.mode === 'one-shot' && _jsx(Text, { dimColor: true, children: t('subagent-mode-one-shot') }), _jsx(Box, { flexGrow: 1 }), onOpenView !== undefined && (_jsx(Box, { onClick: openMainView, children: _jsx(Text, { color: "subtle", children: "\u2922" }) })), _jsx(ExitButton, { onClick: onBack })] }), _jsxs(Text, { children: [_jsx(Text, { children: subagent.model ?? subagent.provider ?? 'default' }), _jsxs(Text, { dimColor: true, children: [shownDuration !== undefined ? ` · ${formatDuration(shownDuration)} · ` : ' · ', totalTokens || '—', " tok \u00B7 ", toolsCount, " tools"] })] }), _jsxs(Text, { dimColor: true, children: [`${t('subagent-started')} ${formatTimestamp(subagent.startedAt)}`
401
+ return (_jsxs(Box, { flexDirection: "column", ...outer, children: [_jsxs(Box, { flexDirection: "row", gap: 1, children: [_jsx(Text, { color: info.color, bold: true, children: info.glyph }), _jsx(Text, { bold: true, children: `${t('subagent-card-prefix')}${subagent.description}` }), subagent.name !== undefined && subagent.name !== '' && (_jsx(Box, { flexShrink: 1, overflow: "hidden", children: _jsx(Text, { color: "accent", wrap: "truncate-end", children: subagent.name }) })), _jsx(Text, { dimColor: true, children: "\u00B7" }), _jsx(Text, { color: info.color, children: info.label }), subagent.mode === 'continuable' && _jsx(Text, { color: "warning", children: t('subagent-mode-continuable') }), subagent.mode === 'one-shot' && _jsx(Text, { dimColor: true, children: t('subagent-mode-one-shot') }), _jsx(Box, { flexGrow: 1 }), onOpenView !== undefined && (_jsx(Box, { onClick: openMainView, children: _jsx(Text, { color: "subtle", children: "\u2922" }) })), _jsx(ExitButton, { onClick: onBack })] }), _jsxs(Text, { children: [_jsx(Text, { children: subagent.model ?? subagent.provider ?? 'default' }), _jsxs(Text, { dimColor: true, children: [shownDuration !== undefined ? ` · ${formatDuration(shownDuration)} · ` : ' · ', totalTokens || '—', " tok \u00B7 ", toolsCount, " tools"] })] }), _jsxs(Text, { dimColor: true, children: [`${t('subagent-started')} ${formatTimestamp(subagent.startedAt)}`
402
402
  + (subagent.completedAt ? ` · ${t('subagent-completed')} ${formatTimestamp(subagent.completedAt)}` : ''), ` · id ${subagent.agentId.slice(0, 8)}`] }), subagent.error && (_jsx(Box, { marginTop: 0, children: _jsx(Text, { color: "error", wrap: "wrap", children: `${t('subagent-error-label')}: ${subagent.error}` }) })), _jsxs(Box, { flexDirection: "row", gap: 0, marginTop: 1, children: [tab('summary', t('subagent-tab-summary')), tab('output', subagent.outputEvents.length > 0 ? `${t('subagent-output-label')} ${subagent.outputEvents.length}` : t('subagent-output-label')), loadTranscript !== undefined && tab('transcript', t('subagent-tab-transcript')), tab('tools', toolsCount > 0 ? `${t('subagent-tools')} ${toolsCount}` : t('subagent-tools')), messages.length > 0 && tab('messages', `${t('agent-messages-tab')} ${messages.length}`), _jsx(Text, { dimColor: true, children: ` ${pageIndex + 1}/${pages.length}` })] }), _jsx(Text, { dimColor: true, children: '─'.repeat(Math.max(20, Math.min(72, columns - 6))) }), activePage === 'output' && loadTranscript === undefined && subagent.outputEvents.length >= OUTPUT_WINDOW_CAP && (_jsx(Text, { dimColor: true, children: t('subagent-transcript-retained', { count: subagent.outputEvents.length }) })), _jsx(Box, { flexDirection: "column", paddingX: 1, maxHeight: panelMode ? Math.max(6, rows - 10) : Math.max(10, rows - 14), children: _jsxs(ScrollBox, { ref: scrollRef, flexDirection: "column", flexGrow: 1, children: [activePage === 'summary' && (_jsxs(Box, { flexDirection: "column", children: [_jsx(StatGrid, { subagent: subagent, totalTokens: totalTokens, elapsed: elapsed, statusLabel: info.label, statusColor: info.color }), subagent.summary && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { dimColor: true, bold: true, children: '─ summary ' }), _jsx(Text, { wrap: "wrap", children: subagent.summary })] })), !subagent.summary && (_jsx(Text, { dimColor: true, children: isRunning ? t('subagent-no-output') : t('subagent-no-summary') }))] })), activePage === 'output' && (subagent.outputEvents.length === 0 && subagent.output.length === 0 ? (_jsx(Text, { dimColor: true, children: t('subagent-no-output') })) : (_jsx(_Fragment, { children: blocks.map((block, index) => {
403
403
  if (block.kind === 'thinking') {
404
404
  const text = block.lines.map(line => line.text).join('\n');