@deepseek-harness-tui/dsh-tui 0.11.0 → 0.11.2

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 (484) hide show
  1. package/README.md +55 -20
  2. package/assets/whale-girl/whale-girl-dark.png +0 -0
  3. package/assets/whale-girl/whale-girl-happy.png +0 -0
  4. package/assets/whale-girl/whale-girl.png +0 -0
  5. package/bin/dsh-tui.js +63 -3
  6. package/cordis.patch.yml +43 -20
  7. package/cordis.yml +6 -4
  8. package/lib/settings.json +1272 -0
  9. package/lib/types/activityPrefs.d.ts +24 -0
  10. package/lib/types/activityPrefs.d.ts.map +1 -1
  11. package/lib/types/activityPrefs.js +50 -1
  12. package/lib/types/adapter/channel/state.d.ts.map +1 -1
  13. package/lib/types/adapter/channel/state.js +3 -1
  14. package/lib/types/adapter/channel/ui-policy.d.ts +9 -2
  15. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  16. package/lib/types/adapter/channel/ui-policy.js +14 -1
  17. package/lib/types/adapter/kernel/replay.d.ts.map +1 -1
  18. package/lib/types/adapter/kernel/replay.js +2 -0
  19. package/lib/types/adapter/ports/channel-display.d.ts +12 -0
  20. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
  21. package/lib/types/adapter/ports/channel-session.d.ts +38 -0
  22. package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
  23. package/lib/types/adapter/ports/channel-settings.d.ts +12 -0
  24. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
  25. package/lib/types/adapter/ports/channel-ui.d.ts +53 -7
  26. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  27. package/lib/types/adapter/ports/channel-view.d.ts +43 -12
  28. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  29. package/lib/types/adapter/ports/channel.d.ts +4 -1
  30. package/lib/types/adapter/ports/channel.d.ts.map +1 -1
  31. package/lib/types/commands.d.ts.map +1 -1
  32. package/lib/types/commands.js +2 -0
  33. package/lib/types/components/ActivityLine.d.ts +7 -2
  34. package/lib/types/components/ActivityLine.d.ts.map +1 -1
  35. package/lib/types/components/ActivityLine.js +0 -8
  36. package/lib/types/components/BalanceReportRow.d.ts +10 -2
  37. package/lib/types/components/BalanceReportRow.d.ts.map +1 -1
  38. package/lib/types/components/BalanceReportRow.js +18 -4
  39. package/lib/types/components/CompactionStatusRow.d.ts +24 -0
  40. package/lib/types/components/CompactionStatusRow.d.ts.map +1 -0
  41. package/lib/types/components/CompactionStatusRow.js +72 -0
  42. package/lib/types/components/GoalTodoPanel.js +2 -2
  43. package/lib/types/components/HelpMenu.d.ts +2 -2
  44. package/lib/types/components/HelpMenu.d.ts.map +1 -1
  45. package/lib/types/components/HelpMenu.js +5 -4
  46. package/lib/types/components/InlineMathParagraph.d.ts +22 -0
  47. package/lib/types/components/InlineMathParagraph.d.ts.map +1 -0
  48. package/lib/types/components/InlineMathParagraph.js +178 -0
  49. package/lib/types/components/LogoV2.d.ts +41 -3
  50. package/lib/types/components/LogoV2.d.ts.map +1 -1
  51. package/lib/types/components/LogoV2.js +148 -24
  52. package/lib/types/components/Markdown.d.ts +10 -3
  53. package/lib/types/components/Markdown.d.ts.map +1 -1
  54. package/lib/types/components/Markdown.js +47 -14
  55. package/lib/types/components/MathBlock.d.ts +13 -0
  56. package/lib/types/components/MathBlock.d.ts.map +1 -0
  57. package/lib/types/components/MathBlock.js +136 -0
  58. package/lib/types/components/MessageList.d.ts +10 -1
  59. package/lib/types/components/MessageList.d.ts.map +1 -1
  60. package/lib/types/components/MessageList.js +15 -5
  61. package/lib/types/components/MigratePicker.d.ts +30 -0
  62. package/lib/types/components/MigratePicker.d.ts.map +1 -0
  63. package/lib/types/components/MigratePicker.js +38 -0
  64. package/lib/types/components/PromptInput.d.ts +17 -0
  65. package/lib/types/components/PromptInput.d.ts.map +1 -1
  66. package/lib/types/components/PromptInput.js +96 -9
  67. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  68. package/lib/types/components/SplitDiffView.js +3 -1
  69. package/lib/types/components/StarPrompt.d.ts +53 -0
  70. package/lib/types/components/StarPrompt.d.ts.map +1 -0
  71. package/lib/types/components/StarPrompt.js +281 -0
  72. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
  73. package/lib/types/components/StreamingMarkdown.js +20 -3
  74. package/lib/types/components/SubagentCard.d.ts.map +1 -1
  75. package/lib/types/components/SubagentCard.js +12 -6
  76. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  77. package/lib/types/components/SubagentDetailScene.js +8 -3
  78. package/lib/types/components/TimelineRail.d.ts.map +1 -1
  79. package/lib/types/components/TimelineRail.js +9 -1
  80. package/lib/types/components/Whale.d.ts +17 -8
  81. package/lib/types/components/Whale.d.ts.map +1 -1
  82. package/lib/types/components/Whale.js +25 -15
  83. package/lib/types/components/WhaleGirl.d.ts +29 -0
  84. package/lib/types/components/WhaleGirl.d.ts.map +1 -0
  85. package/lib/types/components/WhaleGirl.js +32 -0
  86. package/lib/types/components/WorkingSpinner.d.ts +4 -1
  87. package/lib/types/components/WorkingSpinner.d.ts.map +1 -1
  88. package/lib/types/components/WorkingSpinner.js +2 -2
  89. package/lib/types/components/bigfont.d.ts +47 -18
  90. package/lib/types/components/bigfont.d.ts.map +1 -1
  91. package/lib/types/components/bigfont.js +55 -40
  92. package/lib/types/components/design-system/HintLine.d.ts +1 -2
  93. package/lib/types/components/design-system/HintLine.d.ts.map +1 -1
  94. package/lib/types/components/design-system/HintLine.js +1 -2
  95. package/lib/types/components/design-system/ThemeProvider.d.ts +6 -0
  96. package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
  97. package/lib/types/components/design-system/ThemeProvider.js +40 -1
  98. package/lib/types/components/maidPortrait.d.ts +44 -0
  99. package/lib/types/components/maidPortrait.d.ts.map +1 -0
  100. package/lib/types/components/maidPortrait.js +178 -0
  101. package/lib/types/components/mathPreview.d.ts +25 -0
  102. package/lib/types/components/mathPreview.d.ts.map +1 -0
  103. package/lib/types/components/mathPreview.js +48 -0
  104. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +2 -1
  105. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
  106. package/lib/types/components/messages/AssistantThinkingMessage.js +4 -2
  107. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -2
  108. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  109. package/lib/types/components/messages/AssistantToolUseMessage.js +31 -26
  110. package/lib/types/components/messages/TranscriptImages.d.ts.map +1 -1
  111. package/lib/types/components/messages/TranscriptImages.js +11 -1
  112. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +14 -2
  113. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  114. package/lib/types/components/questions/AskUserQuestionPanel.js +80 -38
  115. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
  116. package/lib/types/components/questions/PlanReviewPanel.js +3 -3
  117. package/lib/types/components/sessions/ForeignSessionRow.d.ts +34 -0
  118. package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -0
  119. package/lib/types/components/sessions/ForeignSessionRow.js +43 -0
  120. package/lib/types/components/sessions/SourceTabs.d.ts +52 -0
  121. package/lib/types/components/sessions/SourceTabs.d.ts.map +1 -0
  122. package/lib/types/components/sessions/SourceTabs.js +70 -0
  123. package/lib/types/components/splashEggs.d.ts +56 -0
  124. package/lib/types/components/splashEggs.d.ts.map +1 -0
  125. package/lib/types/components/splashEggs.js +67 -0
  126. package/lib/types/components/splashFonts.d.ts +119 -0
  127. package/lib/types/components/splashFonts.d.ts.map +1 -0
  128. package/lib/types/components/splashFonts.js +267 -0
  129. package/lib/types/components/splashLayout.d.ts +41 -0
  130. package/lib/types/components/splashLayout.d.ts.map +1 -0
  131. package/lib/types/components/splashLayout.js +40 -0
  132. package/lib/types/components/whaleGirlSprite.d.ts +17 -0
  133. package/lib/types/components/whaleGirlSprite.d.ts.map +1 -0
  134. package/lib/types/components/whaleGirlSprite.js +47 -0
  135. package/lib/types/deepseekPricing.d.ts +74 -0
  136. package/lib/types/deepseekPricing.d.ts.map +1 -1
  137. package/lib/types/deepseekPricing.js +110 -11
  138. package/lib/types/dsh-adapter/activity-store.d.ts +221 -0
  139. package/lib/types/dsh-adapter/activity-store.d.ts.map +1 -0
  140. package/lib/types/dsh-adapter/activity-store.js +359 -0
  141. package/lib/types/dsh-adapter/channel/action-readiness.d.ts +1 -1
  142. package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
  143. package/lib/types/dsh-adapter/channel/action-readiness.js +6 -1
  144. package/lib/types/dsh-adapter/channel/background-action.d.ts +2 -1
  145. package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
  146. package/lib/types/dsh-adapter/channel/background-action.js +2 -0
  147. package/lib/types/dsh-adapter/channel/binding-events.d.ts +15 -14
  148. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  149. package/lib/types/dsh-adapter/channel/binding-events.js +70 -21
  150. package/lib/types/dsh-adapter/channel/compaction.d.ts +2 -2
  151. package/lib/types/dsh-adapter/channel/compaction.d.ts.map +1 -1
  152. package/lib/types/dsh-adapter/channel/compaction.js +35 -4
  153. package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
  154. package/lib/types/dsh-adapter/channel/local-actions.js +6 -1
  155. package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -2
  156. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
  157. package/lib/types/dsh-adapter/channel/model-switch.js +6 -2
  158. package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
  159. package/lib/types/dsh-adapter/channel/paths.js +7 -1
  160. package/lib/types/dsh-adapter/channel/preferences.d.ts +1 -1
  161. package/lib/types/dsh-adapter/channel/preferences.d.ts.map +1 -1
  162. package/lib/types/dsh-adapter/channel/preferences.js +16 -0
  163. package/lib/types/dsh-adapter/channel/projection.d.ts +1 -2
  164. package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
  165. package/lib/types/dsh-adapter/channel/projection.js +127 -17
  166. package/lib/types/dsh-adapter/channel/question-record.d.ts +76 -0
  167. package/lib/types/dsh-adapter/channel/question-record.d.ts.map +1 -0
  168. package/lib/types/dsh-adapter/channel/question-record.js +107 -0
  169. package/lib/types/dsh-adapter/channel/session-adoption.d.ts +1 -1
  170. package/lib/types/dsh-adapter/channel/session-adoption.d.ts.map +1 -1
  171. package/lib/types/dsh-adapter/channel/session-adoption.js +1 -0
  172. package/lib/types/dsh-adapter/channel/session-lineage.d.ts +42 -0
  173. package/lib/types/dsh-adapter/channel/session-lineage.d.ts.map +1 -0
  174. package/lib/types/dsh-adapter/channel/session-lineage.js +51 -0
  175. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +3 -1
  176. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
  177. package/lib/types/dsh-adapter/channel/session-live-adoption.js +10 -3
  178. package/lib/types/dsh-adapter/channel/session-metadata.d.ts +2 -1
  179. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
  180. package/lib/types/dsh-adapter/channel/session-metadata.js +43 -9
  181. package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
  182. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  183. package/lib/types/dsh-adapter/channel/session-reset.js +7 -1
  184. package/lib/types/dsh-adapter/channel/session-resume.d.ts +2 -1
  185. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
  186. package/lib/types/dsh-adapter/channel/session-resume.js +5 -2
  187. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  188. package/lib/types/dsh-adapter/channel/settings-host.js +8 -0
  189. package/lib/types/dsh-adapter/channel/state.d.ts +19 -1
  190. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  191. package/lib/types/dsh-adapter/channel/state.js +8 -3
  192. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts +32 -17
  193. package/lib/types/dsh-adapter/channel/subagent-projection.d.ts.map +1 -1
  194. package/lib/types/dsh-adapter/channel/subagent-projection.js +309 -8
  195. package/lib/types/dsh-adapter/channel/types.d.ts +1 -1
  196. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  197. package/lib/types/dsh-adapter/channel.d.ts +1 -1
  198. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  199. package/lib/types/dsh-adapter/channel.js +34 -18
  200. package/lib/types/dsh-adapter/compat/index.d.ts +1 -1
  201. package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
  202. package/lib/types/dsh-adapter/compat/index.js +1 -1
  203. package/lib/types/dsh-adapter/compat/messages.d.ts +6 -0
  204. package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -1
  205. package/lib/types/dsh-adapter/compat/messages.js +9 -0
  206. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +18 -0
  207. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
  208. package/lib/types/dsh-adapter/compat/sessionLog.js +18 -3
  209. package/lib/types/dsh-adapter/compat/settings.d.ts +2 -0
  210. package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -1
  211. package/lib/types/dsh-adapter/compat/settings.js +14 -0
  212. package/lib/types/dsh-adapter/contract.d.ts +5 -4
  213. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  214. package/lib/types/dsh-adapter/contract.js +9 -5
  215. package/lib/types/dsh-adapter/index.d.ts +36 -1
  216. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  217. package/lib/types/dsh-adapter/index.js +22 -6
  218. package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts +3 -0
  219. package/lib/types/dsh-adapter/migrate/adapters/claude-code.d.ts.map +1 -0
  220. package/lib/types/dsh-adapter/migrate/adapters/claude-code.js +131 -0
  221. package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts +17 -0
  222. package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.d.ts.map +1 -0
  223. package/lib/types/dsh-adapter/migrate/adapters/claude-code.parse.js +329 -0
  224. package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts +3 -0
  225. package/lib/types/dsh-adapter/migrate/adapters/codex.d.ts.map +1 -0
  226. package/lib/types/dsh-adapter/migrate/adapters/codex.js +102 -0
  227. package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts +16 -0
  228. package/lib/types/dsh-adapter/migrate/adapters/codex.parse.d.ts.map +1 -0
  229. package/lib/types/dsh-adapter/migrate/adapters/codex.parse.js +289 -0
  230. package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts +3 -0
  231. package/lib/types/dsh-adapter/migrate/adapters/grok-build.d.ts.map +1 -0
  232. package/lib/types/dsh-adapter/migrate/adapters/grok-build.js +117 -0
  233. package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts +13 -0
  234. package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.d.ts.map +1 -0
  235. package/lib/types/dsh-adapter/migrate/adapters/grok-build.parse.js +178 -0
  236. package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts +3 -0
  237. package/lib/types/dsh-adapter/migrate/adapters/omp.d.ts.map +1 -0
  238. package/lib/types/dsh-adapter/migrate/adapters/omp.js +133 -0
  239. package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts +60 -0
  240. package/lib/types/dsh-adapter/migrate/adapters/scan-fs.d.ts.map +1 -0
  241. package/lib/types/dsh-adapter/migrate/adapters/scan-fs.js +178 -0
  242. package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts +8 -0
  243. package/lib/types/dsh-adapter/migrate/adapters/scan.d.ts.map +1 -0
  244. package/lib/types/dsh-adapter/migrate/adapters/scan.js +40 -0
  245. package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts +3 -0
  246. package/lib/types/dsh-adapter/migrate/adapters/zcode.d.ts.map +1 -0
  247. package/lib/types/dsh-adapter/migrate/adapters/zcode.js +93 -0
  248. package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts +9 -0
  249. package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.d.ts.map +1 -0
  250. package/lib/types/dsh-adapter/migrate/adapters/zcode.parse.js +89 -0
  251. package/lib/types/dsh-adapter/migrate/bin-path.d.ts +6 -0
  252. package/lib/types/dsh-adapter/migrate/bin-path.d.ts.map +1 -0
  253. package/lib/types/dsh-adapter/migrate/bin-path.js +30 -0
  254. package/lib/types/dsh-adapter/migrate/browse.d.ts +42 -0
  255. package/lib/types/dsh-adapter/migrate/browse.d.ts.map +1 -0
  256. package/lib/types/dsh-adapter/migrate/browse.js +90 -0
  257. package/lib/types/dsh-adapter/migrate/cli.d.ts +9 -0
  258. package/lib/types/dsh-adapter/migrate/cli.d.ts.map +1 -0
  259. package/lib/types/dsh-adapter/migrate/cli.js +106 -0
  260. package/lib/types/dsh-adapter/migrate/import-one.d.ts +89 -0
  261. package/lib/types/dsh-adapter/migrate/import-one.d.ts.map +1 -0
  262. package/lib/types/dsh-adapter/migrate/import-one.js +133 -0
  263. package/lib/types/dsh-adapter/migrate/index.d.ts +35 -0
  264. package/lib/types/dsh-adapter/migrate/index.d.ts.map +1 -0
  265. package/lib/types/dsh-adapter/migrate/index.js +107 -0
  266. package/lib/types/dsh-adapter/migrate/parse/injection.d.ts +40 -0
  267. package/lib/types/dsh-adapter/migrate/parse/injection.d.ts.map +1 -0
  268. package/lib/types/dsh-adapter/migrate/parse/injection.js +127 -0
  269. package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts +28 -0
  270. package/lib/types/dsh-adapter/migrate/parse/jsonl.d.ts.map +1 -0
  271. package/lib/types/dsh-adapter/migrate/parse/jsonl.js +40 -0
  272. package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts +28 -0
  273. package/lib/types/dsh-adapter/migrate/parse/role-turns.d.ts.map +1 -0
  274. package/lib/types/dsh-adapter/migrate/parse/role-turns.js +50 -0
  275. package/lib/types/dsh-adapter/migrate/parse/title.d.ts +18 -0
  276. package/lib/types/dsh-adapter/migrate/parse/title.d.ts.map +1 -0
  277. package/lib/types/dsh-adapter/migrate/parse/title.js +29 -0
  278. package/lib/types/dsh-adapter/migrate/parse/tools.d.ts +62 -0
  279. package/lib/types/dsh-adapter/migrate/parse/tools.d.ts.map +1 -0
  280. package/lib/types/dsh-adapter/migrate/parse/tools.js +110 -0
  281. package/lib/types/dsh-adapter/migrate/picker.d.ts +64 -0
  282. package/lib/types/dsh-adapter/migrate/picker.d.ts.map +1 -0
  283. package/lib/types/dsh-adapter/migrate/picker.js +86 -0
  284. package/lib/types/dsh-adapter/migrate/recent-agents.d.ts +40 -0
  285. package/lib/types/dsh-adapter/migrate/recent-agents.d.ts.map +1 -0
  286. package/lib/types/dsh-adapter/migrate/recent-agents.js +100 -0
  287. package/lib/types/dsh-adapter/migrate/sessionize.d.ts +39 -0
  288. package/lib/types/dsh-adapter/migrate/sessionize.d.ts.map +1 -0
  289. package/lib/types/dsh-adapter/migrate/sessionize.js +271 -0
  290. package/lib/types/dsh-adapter/migrate/types.d.ts +176 -0
  291. package/lib/types/dsh-adapter/migrate/types.d.ts.map +1 -0
  292. package/lib/types/dsh-adapter/migrate/types.js +11 -0
  293. package/lib/types/dsh-adapter/migrate/uuid.d.ts +7 -0
  294. package/lib/types/dsh-adapter/migrate/uuid.d.ts.map +1 -0
  295. package/lib/types/dsh-adapter/migrate/uuid.js +25 -0
  296. package/lib/types/dsh-adapter/plugin.d.ts +5 -3
  297. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  298. package/lib/types/dsh-adapter/plugin.js +168 -372
  299. package/lib/types/dsh-adapter/providerWizard.d.ts +17 -0
  300. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
  301. package/lib/types/dsh-adapter/providerWizard.js +254 -66
  302. package/lib/types/dsh-adapter/questions.d.ts +22 -15
  303. package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
  304. package/lib/types/dsh-adapter/questions.js +47 -45
  305. package/lib/types/dsh-adapter/sessions/digest.d.ts +11 -6
  306. package/lib/types/dsh-adapter/sessions/digest.d.ts.map +1 -1
  307. package/lib/types/dsh-adapter/sessions/digest.js +20 -13
  308. package/lib/types/dsh-adapter/sessions/frames.d.ts +3 -1
  309. package/lib/types/dsh-adapter/sessions/frames.d.ts.map +1 -1
  310. package/lib/types/dsh-adapter/sessions/frames.js +5 -4
  311. package/lib/types/dsh-adapter/sessions/list.d.ts +6 -1
  312. package/lib/types/dsh-adapter/sessions/list.d.ts.map +1 -1
  313. package/lib/types/dsh-adapter/sessions/list.js +188 -164
  314. package/lib/types/dsh-adapter/sessions/recovery.d.ts +16 -0
  315. package/lib/types/dsh-adapter/sessions/recovery.d.ts.map +1 -0
  316. package/lib/types/dsh-adapter/sessions/recovery.js +108 -0
  317. package/lib/types/dsh-adapter/sessions/snapshot.d.ts +7 -0
  318. package/lib/types/dsh-adapter/sessions/snapshot.d.ts.map +1 -0
  319. package/lib/types/dsh-adapter/sessions/snapshot.js +90 -0
  320. package/lib/types/dsh-adapter/sessions/store.d.ts +10 -4
  321. package/lib/types/dsh-adapter/sessions/store.d.ts.map +1 -1
  322. package/lib/types/dsh-adapter/sessions/store.js +62 -25
  323. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
  324. package/lib/types/dsh-adapter/settings-sections.js +7 -4
  325. package/lib/types/dsh-adapter/sideQuestion.d.ts +41 -2
  326. package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -1
  327. package/lib/types/dsh-adapter/sideQuestion.js +98 -2
  328. package/lib/types/dsh-adapter/subagents.d.ts +44 -6
  329. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  330. package/lib/types/dsh-adapter/subagents.js +163 -26
  331. package/lib/types/herdr.d.ts +2 -0
  332. package/lib/types/herdr.d.ts.map +1 -1
  333. package/lib/types/herdr.js +9 -3
  334. package/lib/types/history.d.ts +13 -1
  335. package/lib/types/history.d.ts.map +1 -1
  336. package/lib/types/history.js +15 -2
  337. package/lib/types/i18n.d.ts +512 -41
  338. package/lib/types/i18n.d.ts.map +1 -1
  339. package/lib/types/i18n.js +199 -20
  340. package/lib/types/ink/components/App.d.ts +2 -2
  341. package/lib/types/ink/components/App.d.ts.map +1 -1
  342. package/lib/types/ink/components/App.js +5 -1
  343. package/lib/types/ink/components/Image.d.ts +14 -1
  344. package/lib/types/ink/components/Image.d.ts.map +1 -1
  345. package/lib/types/ink/components/Image.js +2 -2
  346. package/lib/types/ink/events/input-event.js +3 -3
  347. package/lib/types/ink/hooks/use-terminal-images.d.ts +12 -0
  348. package/lib/types/ink/hooks/use-terminal-images.d.ts.map +1 -1
  349. package/lib/types/ink/hooks/use-terminal-images.js +13 -0
  350. package/lib/types/ink/ink.d.ts +6 -0
  351. package/lib/types/ink/ink.d.ts.map +1 -1
  352. package/lib/types/ink/ink.js +16 -1
  353. package/lib/types/ink/kitty-graphics.d.ts +44 -3
  354. package/lib/types/ink/kitty-graphics.d.ts.map +1 -1
  355. package/lib/types/ink/kitty-graphics.js +184 -23
  356. package/lib/types/ink/log-update.d.ts.map +1 -1
  357. package/lib/types/ink/log-update.js +19 -1
  358. package/lib/types/ink/output.d.ts +24 -2
  359. package/lib/types/ink/output.d.ts.map +1 -1
  360. package/lib/types/ink/output.js +83 -5
  361. package/lib/types/ink/parse-keypress.d.ts +26 -1
  362. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  363. package/lib/types/ink/parse-keypress.js +156 -13
  364. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  365. package/lib/types/ink/render-node-to-output.js +8 -1
  366. package/lib/types/ink/screen.d.ts +24 -0
  367. package/lib/types/ink/screen.d.ts.map +1 -1
  368. package/lib/types/ink/screen.js +89 -0
  369. package/lib/types/ink/selection.d.ts +68 -18
  370. package/lib/types/ink/selection.d.ts.map +1 -1
  371. package/lib/types/ink/selection.js +178 -31
  372. package/lib/types/ink/sixel-codec.d.ts +12 -1
  373. package/lib/types/ink/sixel-codec.d.ts.map +1 -1
  374. package/lib/types/ink/sixel-codec.js +29 -5
  375. package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
  376. package/lib/types/ink/sixel-graphics.js +5 -3
  377. package/lib/types/ink/styles.d.ts +9 -0
  378. package/lib/types/ink/styles.d.ts.map +1 -1
  379. package/lib/types/ink/terminal-image.d.ts +8 -0
  380. package/lib/types/ink/terminal-image.d.ts.map +1 -1
  381. package/lib/types/ink/terminal-querier.d.ts +7 -1
  382. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  383. package/lib/types/ink/terminal-querier.js +12 -2
  384. package/lib/types/ink/timeline-rail.d.ts +5 -0
  385. package/lib/types/ink/timeline-rail.d.ts.map +1 -1
  386. package/lib/types/math/inline-layout.d.ts +29 -0
  387. package/lib/types/math/inline-layout.d.ts.map +1 -0
  388. package/lib/types/math/inline-layout.js +106 -0
  389. package/lib/types/math/layout.d.ts +58 -0
  390. package/lib/types/math/layout.d.ts.map +1 -0
  391. package/lib/types/math/layout.js +59 -0
  392. package/lib/types/math/renderer.d.ts +64 -0
  393. package/lib/types/math/renderer.d.ts.map +1 -0
  394. package/lib/types/math/renderer.js +256 -0
  395. package/lib/types/screens/Chat.d.ts +17 -1
  396. package/lib/types/screens/Chat.d.ts.map +1 -1
  397. package/lib/types/screens/Chat.js +618 -57
  398. package/lib/types/screens/SessionSupervisor.d.ts +2 -1
  399. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  400. package/lib/types/screens/SessionSupervisor.js +156 -19
  401. package/lib/types/screens/Settings.d.ts.map +1 -1
  402. package/lib/types/screens/Settings.js +49 -11
  403. package/lib/types/screens/StatusLine.d.ts +5 -1
  404. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  405. package/lib/types/screens/StatusLine.js +47 -17
  406. package/lib/types/screens/chatOverlay.d.ts +5 -0
  407. package/lib/types/screens/chatOverlay.d.ts.map +1 -1
  408. package/lib/types/screens/chatOverlay.js +1 -0
  409. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +47 -0
  410. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -0
  411. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +65 -0
  412. package/lib/types/screens/sessionSupervisor/model.d.ts +12 -0
  413. package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -1
  414. package/lib/types/screens/sessionSupervisor/model.js +26 -0
  415. package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts +107 -0
  416. package/lib/types/screens/sessionSupervisor/useForeignSessions.d.ts.map +1 -0
  417. package/lib/types/screens/sessionSupervisor/useForeignSessions.js +312 -0
  418. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +4 -1
  419. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
  420. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +97 -14
  421. package/lib/types/sessionHistory.d.ts +2 -2
  422. package/lib/types/sessionHistory.d.ts.map +1 -1
  423. package/lib/types/sessionHistory.js +31 -5
  424. package/lib/types/settings/definitions.d.ts +681 -0
  425. package/lib/types/settings/definitions.d.ts.map +1 -0
  426. package/lib/types/settings/definitions.js +511 -0
  427. package/lib/types/starAction.d.ts +44 -0
  428. package/lib/types/starAction.d.ts.map +1 -0
  429. package/lib/types/starAction.js +52 -0
  430. package/lib/types/terminal-utils/latex.d.ts +10 -0
  431. package/lib/types/terminal-utils/latex.d.ts.map +1 -0
  432. package/lib/types/terminal-utils/latex.js +1417 -0
  433. package/lib/types/terminal-utils/markdown.d.ts +3 -1
  434. package/lib/types/terminal-utils/markdown.d.ts.map +1 -1
  435. package/lib/types/terminal-utils/markdown.js +26 -1
  436. package/lib/types/terminal-utils/math.d.ts +66 -0
  437. package/lib/types/terminal-utils/math.d.ts.map +1 -0
  438. package/lib/types/terminal-utils/math.js +337 -0
  439. package/lib/types/tips.d.ts.map +1 -1
  440. package/lib/types/tips.js +6 -0
  441. package/lib/types/tuiDisplayPrefs.d.ts +67 -0
  442. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  443. package/lib/types/tuiDisplayPrefs.js +59 -0
  444. package/lib/types/ui.d.ts +1 -1
  445. package/lib/types/ui.d.ts.map +1 -1
  446. package/lib/types/ui.js +1 -1
  447. package/lib/types/usageStats.d.ts +98 -0
  448. package/lib/types/usageStats.d.ts.map +1 -0
  449. package/lib/types/usageStats.js +169 -0
  450. package/lib/types/utils/bmp.d.ts +17 -0
  451. package/lib/types/utils/bmp.d.ts.map +1 -0
  452. package/lib/types/utils/bmp.js +154 -0
  453. package/lib/types/utils/clipboard.d.ts +14 -2
  454. package/lib/types/utils/clipboard.d.ts.map +1 -1
  455. package/lib/types/utils/clipboard.js +143 -8
  456. package/lib/types/utils/fold-long-lines.d.ts +1 -1
  457. package/lib/types/utils/fold-long-lines.d.ts.map +1 -1
  458. package/lib/types/utils/fold-long-lines.js +3 -2
  459. package/lib/types/utils/keymap.d.ts +4 -1
  460. package/lib/types/utils/keymap.d.ts.map +1 -1
  461. package/lib/types/utils/keymap.js +8 -0
  462. package/lib/types/utils/modifiers.d.ts +4 -3
  463. package/lib/types/utils/modifiers.d.ts.map +1 -1
  464. package/lib/types/utils/modifiers.js +4 -3
  465. package/lib/types/working-activity.d.ts +10 -9
  466. package/lib/types/working-activity.d.ts.map +1 -1
  467. package/lib/types/working-activity.js +17 -10
  468. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/LICENSE +202 -0
  469. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/NOTICE +20 -0
  470. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/index.d.ts +16 -0
  471. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/bundled-packages.json +4 -0
  472. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs +20 -0
  473. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/lib/index.mjs.LEGAL.txt +35 -0
  474. package/node_modules/@dsh-tui-vendor/mathjax-tex-svg/package.json +29 -0
  475. package/package.json +117 -99
  476. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +0 -19
  477. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts.map +0 -1
  478. package/lib/types/components/design-system/KeyboardShortcutHint.js +0 -14
  479. package/lib/types/dsh-adapter/channel/activity.d.ts +0 -20
  480. package/lib/types/dsh-adapter/channel/activity.d.ts.map +0 -1
  481. package/lib/types/dsh-adapter/channel/activity.js +0 -113
  482. package/lib/types/terminal-utils/terminal.d.ts +0 -18
  483. package/lib/types/terminal-utils/terminal.d.ts.map +0 -1
  484. package/lib/types/terminal-utils/terminal.js +0 -96
@@ -1,11 +1,43 @@
1
+ import { carrierKeyOf } from '@deepseek-ai/dsh-scope';
2
+ import { isTokenDelta, tokenDeltaChars } from './usage.js';
1
3
  /**
2
- * The binding event router is the sole subscriber for a foreground Agent.
3
- * It captures the binding generation at every listener entry; teardown is
4
- * incremental and retained callbacks check that captured Agent/session pair
5
- * before touching state. Transcript presentation remains exclusively owned by
6
- * ChannelProjection.
4
+ * Foreground transcript listeners capture a binding generation. Child event
5
+ * listeners instead span the Channel owner, keeping parked reducers current
6
+ * across rebinds. Both paths own registrations incrementally and fence retained
7
+ * callbacks; only ChannelProjection presents the foreground transcript.
7
8
  */
8
9
  export function createBindingEvents(ctx, deps) {
10
+ let subagentsInstalled = false;
11
+ const installSubagents = () => {
12
+ if (subagentsInstalled)
13
+ return;
14
+ subagentsInstalled = true;
15
+ // Child reducers span foreground bindings. One owner subscription keeps
16
+ // parked stores current; only the active reducer publishes view changes.
17
+ deps.owner.own(ctx.on('session/event', (session, event) => {
18
+ if (deps.owner.current())
19
+ deps.subagents.onSessionEvent(session, event);
20
+ }));
21
+ deps.owner.own(ctx.on('agent/assistant-stream', ({ agent, frame }) => {
22
+ if (deps.owner.current())
23
+ deps.subagents.onStreamFrame?.(agent, frame);
24
+ }));
25
+ // Cordis binds the dispatch receiver as `this`. The upstream carrier
26
+ // names the direct delegating parent, even for external children absent
27
+ // from agents.get(); its ancestor-inclusive filter cannot identify it.
28
+ deps.owner.own(ctx.on('subagent/start', (function (info) {
29
+ if (deps.owner.current())
30
+ deps.subagents.onStart(info, carrierKeyOf(this) ?? null);
31
+ })));
32
+ deps.owner.own(ctx.on('subagent/end', (function (info) {
33
+ if (deps.owner.current())
34
+ deps.subagents.onEnd(info, carrierKeyOf(this) ?? null);
35
+ })));
36
+ deps.owner.own(ctx.on('agent/disposed', ({ agent }) => {
37
+ if (deps.owner.current())
38
+ deps.subagents.forget?.(agent);
39
+ }));
40
+ };
9
41
  const reconcileRetiredProjection = (status) => {
10
42
  if (!deps.state.working)
11
43
  return;
@@ -20,9 +52,10 @@ export function createBindingEvents(ctx, deps) {
20
52
  const bind = () => {
21
53
  try {
22
54
  deps.state.agentBindingGeneration = deps.binding.bind();
55
+ installSubagents();
23
56
  deps.inputConvergence.cancelInFlight = false;
24
57
  deps.inputConvergence.interruptSeq += 1;
25
- deps.activity.start(deps.binding.agent);
58
+ deps.seedActivity?.(deps.binding.agent.session);
26
59
  deps.modelActions.selection.current = undefined;
27
60
  deps.modelActions.selection.assembled = undefined;
28
61
  if (deps.binding.agent.options?.model === undefined && deps.state.provider !== '' && deps.state.model !== '') {
@@ -80,7 +113,6 @@ export function createBindingEvents(ctx, deps) {
80
113
  if (!current() || subject !== capture.agent)
81
114
  return;
82
115
  deps.state.status = status;
83
- deps.activity.onAgentStatus(status);
84
116
  if (status === 'idle')
85
117
  reconcileRetiredProjection('idle');
86
118
  deps.state.emit();
@@ -89,7 +121,6 @@ export function createBindingEvents(ctx, deps) {
89
121
  if (!current() || subject !== capture.agent)
90
122
  return;
91
123
  deps.state.status = 'disposed';
92
- deps.activity.stop();
93
124
  reconcileRetiredProjection('disposed');
94
125
  deps.state.emit();
95
126
  });
@@ -120,12 +151,9 @@ export function createBindingEvents(ctx, deps) {
120
151
  if (!current())
121
152
  return;
122
153
  const isMainSession = subject === session;
123
- if (!isMainSession && deps.subagents.onSessionEvent(subject, event))
124
- return;
125
154
  if (!isMainSession)
126
155
  return;
127
156
  deps.messageObserver?.publish(subject, event);
128
- deps.activity.onSessionEvent(event);
129
157
  deps.modeActions.onSessionEvent(subject, event);
130
158
  deps.projector.renderEvent(event);
131
159
  if (event.type === 'assistant/chunk')
@@ -141,24 +169,45 @@ export function createBindingEvents(ctx, deps) {
141
169
  on('agent/assistant-stream', ({ agent: subject, frame }) => {
142
170
  if (!current())
143
171
  return;
144
- if (subject !== capture.agent) {
145
- deps.subagents.onStreamFrame?.(subject, frame);
172
+ if (subject !== capture.agent)
146
173
  return;
147
- }
148
174
  deps.projector.renderStreamFrame(frame);
149
175
  if (frame.type === 'chunk')
150
176
  deps.state.emitStream();
151
177
  else if (frame.type === 'end')
152
178
  deps.state.emit();
153
179
  });
154
- on('subagent/start', (info) => {
155
- if (current())
156
- deps.subagents.onStart(info);
157
- });
158
- on('subagent/end', (info) => {
159
- if (current())
160
- deps.subagents.onEnd(info);
180
+ /**
181
+ * Live compaction progress. The summarizer is one `ctx.llm.stream()`
182
+ * call, so its chunks are the only work signal a compaction has between
183
+ * `compaction/start` and `compaction/end` (dsh-llm tags the call
184
+ * `purpose: 'compaction'`, and a manual one runs while the session is
185
+ * idle, so it cannot be confused with the foreground turn's stream).
186
+ * Everything else passes through untouched: the original iterable is
187
+ * returned for any other purpose or session.
188
+ */
189
+ const disposeCompactionStream = ctx.on('llm/stream', (options, next) => {
190
+ const stream = next();
191
+ if (options.purpose !== 'compaction')
192
+ return stream;
193
+ if (options.sessionId === undefined || String(options.sessionId) !== String(session.id))
194
+ return stream;
195
+ return (async function* compactionStream() {
196
+ for await (const chunk of stream) {
197
+ const compaction = deps.state.compaction;
198
+ if (compaction !== undefined && isTokenDelta(chunk)) {
199
+ deps.state.compaction = {
200
+ ...compaction,
201
+ phase: 'summary',
202
+ outputChars: compaction.outputChars + tokenDeltaChars(chunk),
203
+ };
204
+ deps.state.emitStream();
205
+ }
206
+ yield chunk;
207
+ }
208
+ })();
161
209
  });
210
+ register(disposeCompactionStream);
162
211
  }
163
212
  catch (error) {
164
213
  deps.owner.dispose();
@@ -2,7 +2,7 @@ import type { Agent } from '@deepseek-ai/dsh-agent';
2
2
  import type { Context } from '@deepseek-ai/cordis';
3
3
  import type { ChannelOwner } from './owner.js';
4
4
  import type { ChannelState } from './types.js';
5
- type CompactionState = Pick<ChannelState, 'agentId' | 'cwd' | 'working'>;
5
+ type CompactionState = Pick<ChannelState, 'agentId' | 'cwd' | 'working' | 'compaction' | 'emit'>;
6
6
  type Notify = ChannelState['notify'];
7
7
  /** Owns the one manual compaction transaction that must settle before a switch. */
8
8
  export declare function createManualCompaction(ctx: Context, state: CompactionState, deps: {
@@ -10,10 +10,10 @@ export declare function createManualCompaction(ctx: Context, state: CompactionSt
10
10
  agent(): Agent;
11
11
  withDecisionPending<T>(name: string, pending: Promise<T>): Promise<T>;
12
12
  notify: Notify;
13
- onComplete(): void;
14
13
  }): {
15
14
  compact: () => void;
16
15
  settle: () => Promise<void>;
16
+ cancel: () => void;
17
17
  };
18
18
  export {};
19
19
  //# sourceMappingURL=compaction.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"compaction.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/compaction.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAIlD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAO9C,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC,CAAA;AACxE,KAAK,MAAM,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;AAEpC,mFAAmF;AACnF,wBAAgB,sBAAsB,CACpC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,eAAe,EACtB,IAA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A;CACf;mBA0BmB,IAAI;kBAlBC,OAAO,CAAC,IAAI,CAAC;kBA4HnB,IAAI;EAQxB"}
@@ -5,6 +5,9 @@ import { serviceForAgent } from '../presets.js';
5
5
  export function createManualCompaction(ctx, state, deps) {
6
6
  let active;
7
7
  const cancelled = new WeakSet();
8
+ /** Aborts the user asked for (Esc / Ctrl+C) rather than an ownership change:
9
+ * only those are reported as a cancellation instead of a failure. */
10
+ const userCancelled = new WeakSet();
8
11
  const settle = async () => {
9
12
  const transaction = active;
10
13
  if (transaction === undefined)
@@ -71,17 +74,30 @@ export function createManualCompaction(ctx, state, deps) {
71
74
  deps.notify(t('compact-while-working'), { color: 'warning' });
72
75
  return;
73
76
  }
74
- deps.notify(t('compact-working'));
77
+ // The status row replaces the old 4s toast: a real compaction runs for
78
+ // tens of seconds (measured: median ~25s, p90 ~70s), and the toast was
79
+ // gone for all but the first four of them.
80
+ const row = {
81
+ startedAt: Date.now(),
82
+ phase: 'prefill',
83
+ outputChars: 0,
84
+ cancellable: true,
85
+ };
86
+ state.compaction = row;
87
+ state.emit();
75
88
  try {
76
89
  // Compact the entry agent, never a later binding read after await.
77
90
  const result = await compactService.compactNow(originAgent, controller.signal);
78
91
  if (!isCurrent())
79
92
  return;
80
93
  deps.notify(result ? t('compact-done') : t('compact-nothing'));
81
- if (result)
82
- deps.onComplete();
83
94
  }
84
95
  catch (error) {
96
+ if (userCancelled.has(controller)) {
97
+ if (isCurrent())
98
+ deps.notify(t('compact-cancelled'));
99
+ return;
100
+ }
85
101
  if (!isCurrent() || cancelled.has(controller))
86
102
  return;
87
103
  if (error.code === 'persistence') {
@@ -101,6 +117,13 @@ export function createManualCompaction(ctx, state, deps) {
101
117
  finally {
102
118
  finished = true;
103
119
  releaseOwner();
120
+ // The durable `compaction/end` event already cleared the row on every
121
+ // path that reached the host; this covers the ones that never did
122
+ // (vetoed decision, unavailable service, a throw before the bracket).
123
+ if (state.compaction?.cancellable === true) {
124
+ state.compaction = undefined;
125
+ state.emit();
126
+ }
104
127
  const currentTransaction = active;
105
128
  if (currentTransaction?.controller === controller)
106
129
  active = undefined;
@@ -112,5 +135,13 @@ export function createManualCompaction(ctx, state, deps) {
112
135
  if (!finished)
113
136
  active = { controller, settled };
114
137
  };
115
- return { compact, settle };
138
+ /** Abort the in-flight manual compaction the user asked to stop. */
139
+ const cancel = () => {
140
+ const transaction = active;
141
+ if (transaction === undefined)
142
+ return;
143
+ userCancelled.add(transaction.controller);
144
+ transaction.controller.abort(new Error('user cancelled compaction'));
145
+ };
146
+ return { compact, settle, cancel };
116
147
  }
@@ -1 +1 @@
1
- {"version":3,"file":"local-actions.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/local-actions.ts"],"names":[],"mappings":"AAOA,OAAO,EAAsB,KAAK,eAAe,EAAE,MAAM,oBAAoB,CAAA;AAC7E,OAAO,EAA+B,KAAK,QAAQ,IAAI,QAAQ,EAAE,MAAM,iBAAiB,CAAA;AACxF,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEjE,qFAAqF;AACrF,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACvC,GAAG,EAAE;QAAE,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAA;IACnC,KAAK,EAAE;QAAE,OAAO,IAAI,OAAO,CAAA;KAAE,CAAA;IAC7B,OAAO,EAAE;QACP,OAAO,IAAI,OAAO,CAAA;QAClB,SAAS,CAAC,OAAO,EAAE,OAAO,GAAG,OAAO,CAAA;QACpC,QAAQ,CAAC,KAAK,EAAE;YAAE,OAAO,EAAE,OAAO,CAAC;YAAC,QAAQ,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;SAAE,CAAA;KACvE,CAAA;IACD,KAAK,EAAE,YAAY,CAAA;IACnB,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,CAAA;IACzB,SAAS,EAAE;QAAE,KAAK,IAAI,IAA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MAAM,SAAS,SAAS,MAAM,EAAE,GAAG,IAAI;4BAKhC,MAAM,GAAG,OAAO;qBAajB,OAAO,CAAC,MAAM,EAAE,CAAC;6BAwBT,MAAM,oBAAoB,OAAO,GAAG,OAAO,CAAC,IAAI,CAAC;EAqBnF"}
@@ -70,7 +70,12 @@ export function createLocalActions(deps) {
70
70
  return [t('subagent-none')];
71
71
  return children.map(child => {
72
72
  const id = typeof child.id === 'string' ? child.id : (child.id.value ?? '');
73
- return t('subagent-row', { mode: child.mode === 'continuable' ? t('subagent-resumable') : t('subagent-oneshot'), label: child.label ? `「${child.label}」` : '', activity: child.activity === 'running' ? t('subagent-running') : t('subagent-archived'), id: id.slice(0, 8) });
73
+ // The host's non-running activity is not proof that a child was
74
+ // archived: continuable children can be idle or temporarily unknown.
75
+ // Prefer the live projection when this process still owns the run.
76
+ const running = state.subagents.some(sub => sub.agentId === id && sub.status === 'running');
77
+ const activity = running || child.activity === 'running' ? t('subagent-running') : t('subagent-unknown');
78
+ return t('subagent-row', { mode: child.mode === 'continuable' ? t('subagent-resumable') : t('subagent-oneshot'), label: child.label ? `「${child.label}」` : '', activity, id: id.slice(0, 8) });
74
79
  });
75
80
  }
76
81
  catch (error) {
@@ -5,7 +5,7 @@ import type { ChannelOwner } from './owner.js';
5
5
  import { resetSessionProjection } from './session-reset.js';
6
6
  import type { ChannelState } from './types.js';
7
7
  type Binding = ReturnType<typeof createChannelBinding>;
8
- type SwitchState = Parameters<typeof resetSessionProjection>[0] & Pick<ChannelState, 'cwd' | 'working' | 'status' | 'agentId' | 'agentPreset' | 'provider' | 'model' | 'contextWindow' | 'effortLevels' | 'reasoningEffort' | 'emit'>;
8
+ type SwitchState = Parameters<typeof resetSessionProjection>[0] & Pick<ChannelState, 'cwd' | 'working' | 'status' | 'agentId' | 'sessionId' | 'agentPreset' | 'provider' | 'model' | 'contextWindow' | 'effortLevels' | 'reasoningEffort' | 'emit'>;
9
9
  /** Model-route adoption transaction. It settles compaction before its fork snapshot and owns the post-commit reset. */
10
10
  export declare function createModelSwitchAction(ctx: Context, state: SwitchState, deps: {
11
11
  owner: Pick<ChannelOwner, 'current'>;
@@ -25,7 +25,6 @@ export declare function createModelSwitchAction(ctx: Context, state: SwitchState
25
25
  refreshSkillCommands(): Promise<void>;
26
26
  clearStagedImages(): void;
27
27
  dropModelCompletion(): void;
28
- onModelSwitch(model: string): void;
29
28
  notify: ChannelState['notify'];
30
29
  }): (provider: string, model: string) => Promise<boolean>;
31
30
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"model-switch.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/model-switch.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAGlD,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQvE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAC9C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAA;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAE9C,KAAK,OAAO,GAAG,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAA;AACtD,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,YAAY,EACjF,KAAK,GAAG,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,aAAa,GAAG,UAAU,GAAG,OAAO,GAAG,eAAe,GAAG,cAAc,GAAG,iBAAiB,GAAG,MAAM,CAAC,CAAA;AAElJ,uHAAuH;AACvH,wBAAgB,uBAAuB,CACrC,GAAG,EAAE,OAAO,EACZ,KAAK,EAAE,WAAW,EAClB,IAAI,EAAE;IACJ,KAAK,EAAE,IAAI,CAAC,YAAY,EAAE,SAAS,CAAC,CAAA;IACpC,OAAO,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AAO,MAAM,KAAG,OAAO,CAAC,OAAO,CAAC,CA+EjE"}
@@ -8,6 +8,7 @@ import { composePreset, runningPresetOf } from '../presets.js';
8
8
  import { reserveNewSession } from '../../sessionMounts.js';
9
9
  import { attachSessionToWorkspace } from '../workspace.js';
10
10
  import { resetSessionProjection } from './session-reset.js';
11
+ import { childRecordsLineage } from './session-lineage.js';
11
12
  /** Model-route adoption transaction. It settles compaction before its fork snapshot and owns the post-commit reset. */
12
13
  export function createModelSwitchAction(ctx, state, deps) {
13
14
  return async (provider, model) => {
@@ -48,7 +49,10 @@ export function createModelSwitchAction(ctx, state, deps) {
48
49
  runtimeSession: deps.binding.agent.session,
49
50
  inheritedCount: seed.length,
50
51
  cwd: state.cwd,
51
- parentSession: deps.binding.agent.session.id,
52
+ // A session nobody has typed into has no conversation to relate, and
53
+ // lineage would cost its first real prompt the generated title — the
54
+ // child stands as its own root instead (session-lineage.ts).
55
+ parentSession: childRecordsLineage(seed) ? deps.binding.agent.session.id : undefined,
52
56
  agentPreset: composed.agentPreset,
53
57
  agentOptions: { provider, model },
54
58
  setup: composed.setup,
@@ -76,6 +80,7 @@ export function createModelSwitchAction(ctx, state, deps) {
76
80
  resetSessionProjection(state, deps.rowIds, deps.resetProjector, deps.resetSubagents, deps.resetJobs);
77
81
  state.status = handle.agent.status;
78
82
  state.agentId = handle.agent.id;
83
+ state.sessionId = handle.agent.session.id;
79
84
  state.agentPreset = composed.agentPreset;
80
85
  state.provider = provider;
81
86
  state.model = model;
@@ -92,7 +97,6 @@ export function createModelSwitchAction(ctx, state, deps) {
92
97
  // order).
93
98
  deps.clearStagedImages();
94
99
  deps.bindAgent();
95
- deps.onModelSwitch(model);
96
100
  deps.refreshCommands();
97
101
  void deps.refreshLoadedContext();
98
102
  void deps.refreshSkillCommands();
@@ -1 +1 @@
1
- {"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/paths.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK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AAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,eAAe,GAAE,OAAsC,GACtD,OAAO,CAwBT;AAED,wBAAsB,kBAAkB,CAAC,EAAE,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CA+BlK;AAED,wBAAsB,uBAAuB,CAAC,EAAE,EAAE,gBAAgB,GAAG,SAAS,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,aAAa,EAAE,CAAC,CAmD5I"}
@@ -59,9 +59,15 @@ export function sessionCwdMatches(stateCwd, headerCwd, caseInsensitive = process
59
59
  export async function listPathCandidates(fs, cwd, query, signal, topK) {
60
60
  const normalized = query.replaceAll('\\', '/');
61
61
  const slash = normalized.lastIndexOf('/');
62
+ // Keep the user's spelling for the completion result. The normalized form
63
+ // is only for resolution/ranking; writing it back turns Windows `\\` paths
64
+ // into `/` paths and makes completion mutate otherwise valid input.
65
+ const rawSlash = Math.max(query.lastIndexOf('/'), query.lastIndexOf('\\'));
62
66
  // `.` / `..` without a trailing separator are whole-directory queries too.
63
67
  const bareDir = slash < 0 && (normalized === '.' || normalized === '..' || normalized === '~');
64
68
  const directoryPart = slash < 0 ? (bareDir ? `${normalized}/` : '') : normalized.slice(0, slash + 1);
69
+ const displayDirectoryPart = rawSlash < 0 ? (bareDir ? `${query}/` : '') : query.slice(0, rawSlash + 1);
70
+ const displaySeparator = displayDirectoryPart.endsWith('\\') ? '\\' : '/';
65
71
  const nameQuery = slash < 0 || bareDir ? '' : normalized.slice(slash + 1);
66
72
  // `~/` expands against the host home (matches the cwd resolution rules);
67
73
  // drive-letter and POSIX-absolute prefixes pass through untouched.
@@ -76,7 +82,7 @@ export async function listPathCandidates(fs, cwd, query, signal, topK) {
76
82
  const target = await fs.resolve(expanded);
77
83
  const entries = (await fs.listDir(target)).slice().sort((a, b) => a.name.localeCompare(b.name));
78
84
  return rankFileCandidates(entries.filter(entry => entry.type === 'file' || entry.type === 'directory').map(entry => {
79
- const path = `${directoryPart}${entry.name}${entry.type === 'directory' ? '/' : ''}`;
85
+ const path = `${displayDirectoryPart}${entry.name}${entry.type === 'directory' ? displaySeparator : ''}`;
80
86
  return { id: path, path, displayPath: path, name: entry.name, kind: entry.type, score: 0 };
81
87
  }), nameQuery, topK);
82
88
  }
@@ -1,3 +1,3 @@
1
1
  import type { ChannelState } from '../channel/types.js';
2
- export declare function createPreferences(getState: () => Pick<ChannelState, 'diffLayout' | 'thinkingFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'minimal' | 'emit'>): Pick<ChannelState, 'setDiffLayout' | 'setThinkingFold' | 'setToolBackground' | 'setScrollGutter' | 'setPageMargin' | 'setFoldTerminalCommand' | 'setPromptSessionLabel' | 'setExpandEditor' | 'setSmoothStreaming' | 'setStatusBar' | 'setWhale' | 'setWhaleIdle' | 'setMinimal'>;
2
+ export declare function createPreferences(getState: () => Pick<ChannelState, 'diffLayout' | 'thinkingFold' | 'toolBackground' | 'scrollGutter' | 'pageMargin' | 'foldTerminalCommand' | 'promptSessionLabel' | 'expandEditor' | 'smoothStreaming' | 'statusBar' | 'whale' | 'whaleIdle' | 'whaleGirl' | 'splashFont' | 'minimal' | 'emit'>): Pick<ChannelState, 'setDiffLayout' | 'setThinkingFold' | 'setToolBackground' | 'setScrollGutter' | 'setPageMargin' | 'setFoldTerminalCommand' | 'setPromptSessionLabel' | 'setExpandEditor' | 'setSmoothStreaming' | 'setStatusBar' | 'setWhale' | 'setWhaleIdle' | 'setWhaleGirl' | 'setSplashFont' | 'setMinimal'>;
3
3
  //# sourceMappingURL=preferences.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/preferences.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,YAAY,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,cAAc,GAAG,iBAAiB,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,SAAS,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,eAAe,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,eAAe,GAAG,wBAAwB,GAAG,uBAAuB,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,cAAc,GAAG,UAAU,GAAG,cAAc,GAAG,YAAY,CAAC,CAsGxjB"}
1
+ {"version":3,"file":"preferences.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/preferences.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAEvD,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC,YAAY,EAAE,YAAY,GAAG,cAAc,GAAG,gBAAgB,GAAG,cAAc,GAAG,YAAY,GAAG,qBAAqB,GAAG,oBAAoB,GAAG,cAAc,GAAG,iBAAiB,GAAG,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,WAAW,GAAG,YAAY,GAAG,SAAS,GAAG,MAAM,CAAC,GAAG,IAAI,CAAC,YAAY,EAAE,eAAe,GAAG,iBAAiB,GAAG,mBAAmB,GAAG,iBAAiB,GAAG,eAAe,GAAG,wBAAwB,GAAG,uBAAuB,GAAG,iBAAiB,GAAG,oBAAoB,GAAG,cAAc,GAAG,UAAU,GAAG,cAAc,GAAG,cAAc,GAAG,eAAe,GAAG,YAAY,CAAC,CAqHxnB"}
@@ -1,4 +1,5 @@
1
1
  import { setMinimalMode } from '../../minimalMode.js';
2
+ import { normalizeSplashFont } from '../../components/splashFonts.js';
2
3
  import { normalizePageMargin, normalizeScrollGutter, normalizeStatusBar, normalizeToolBackground } from '../../tuiDisplayPrefs.js';
3
4
  export function createPreferences(getState) {
4
5
  return {
@@ -91,6 +92,21 @@ export function createPreferences(getState) {
91
92
  state.whaleIdle = enabled;
92
93
  state.emit();
93
94
  },
95
+ setSplashFont(setting) {
96
+ const state = getState();
97
+ const normalized = normalizeSplashFont(setting);
98
+ if (normalized === state.splashFont)
99
+ return;
100
+ state.splashFont = normalized;
101
+ state.emit();
102
+ },
103
+ setWhaleGirl(enabled) {
104
+ const state = getState();
105
+ if (enabled === state.whaleGirl)
106
+ return;
107
+ state.whaleGirl = enabled;
108
+ state.emit();
109
+ },
94
110
  setMinimal(enabled) {
95
111
  const state = getState();
96
112
  setMinimalMode(enabled);
@@ -6,14 +6,13 @@ import type { SelectionAttachment } from '../../adapter/ports/channel-view.js';
6
6
  import type { InputConvergence } from './input-actions.js';
7
7
  import type { BackgroundJobStore } from '../jobs.js';
8
8
  import type { TuiRendererHost } from '../renderers.js';
9
- type ProjectionState = Pick<ChannelState, 'rows' | 'thinkingFold' | 'activeToolCount' | 'spinnerMode' | 'goal' | 'contextSegments' | 'tokens' | 'lastUsage' | 'lastUserText' | 'responseChars' | 'tps' | 'cancelPending' | 'working' | 'turnStart' | 'tpsSamples' | 'contextWindow' | 'reasoningEffort' | 'sessionTitle' | 'todos' | 'agentPreset' | 'sessionColor' | 'status' | 'emit'>;
9
+ type ProjectionState = Pick<ChannelState, 'rows' | 'thinkingFold' | 'activeToolCount' | 'spinnerMode' | 'goal' | 'contextSegments' | 'tokens' | 'mainCost' | 'model' | 'lastUsage' | 'lastUserText' | 'responseChars' | 'tps' | 'cancelPending' | 'working' | 'compaction' | 'turnStart' | 'tpsSamples' | 'contextWindow' | 'reasoningEffort' | 'sessionTitle' | 'todos' | 'agentPreset' | 'sessionColor' | 'status' | 'emit'>;
10
10
  interface ProjectionDependencies {
11
11
  agent(): Agent;
12
12
  rowIds: {
13
13
  value: number;
14
14
  };
15
15
  resetContextWarning(): void;
16
- pendingTaskDescriptions: string[];
17
16
  jobs: Pick<BackgroundJobStore, 'onOutputSeen' | 'onStarted'>;
18
17
  inputConvergence: Pick<InputConvergence, 'cancelInFlight'>;
19
18
  checkContextWarning(): void;
@@ -1 +1 @@
1
- {"version":3,"file":"projection.d.ts","sourceRoot":"","sources":["../../../../src/dsh-adapter/channel/projection.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AACzE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,YAAY,EAAe,MAAM,sBAAsB,CAAA;AACrE,OAAO,KAAK,EAAE,YAAY,EAAwB,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AACrH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAE9E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAC1D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AAatD,KAAK,eAAe,GAAG,IAAI,CAAC,YAAY,EAAE,MAAM,GAAG,cAAc,GAAG,iBAAiB,GAAG,aAAa,GAAG,MAAM,GAAG,iBAAiB,GAAG,QAAQ,GAAG,WAAW,GAAG,cAAc,GAAG,eAAe,GAAG,KAAK,GAAG,eAAe,GAAG,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,eAAe,GAAG,iBAAiB,GAAG,cAAc,GAAG,OAAO,GAAG,aAAa,GAAG,cAAc,GAAG,QAAQ,GAAG,MAAM,CAAC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