@deepseek-harness-tui/dsh-tui 0.10.2 → 0.11.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 (277) hide show
  1. package/README.md +171 -124
  2. package/bin/dsh-tui.js +748 -22
  3. package/cordis.patch.yml +38 -10
  4. package/cordis.yml +2 -0
  5. package/lib/types/adapter/channel/session-projection.d.ts.map +1 -1
  6. package/lib/types/adapter/channel/session-projection.js +2 -0
  7. package/lib/types/adapter/channel/ui-policy.d.ts +4 -1
  8. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  9. package/lib/types/adapter/channel/ui-policy.js +5 -1
  10. package/lib/types/adapter/kernel/host-facade.d.ts.map +1 -1
  11. package/lib/types/adapter/kernel/host-facade.js +1 -0
  12. package/lib/types/adapter/kernel/replay.d.ts.map +1 -1
  13. package/lib/types/adapter/kernel/replay.js +3 -0
  14. package/lib/types/adapter/kernel/runtime.d.ts.map +1 -1
  15. package/lib/types/adapter/kernel/runtime.js +2 -0
  16. package/lib/types/adapter/kernel/slices/workspace.d.ts.map +1 -1
  17. package/lib/types/adapter/kernel/slices/workspace.js +1 -0
  18. package/lib/types/adapter/ports/channel-ui.d.ts +22 -2
  19. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  20. package/lib/types/adapter/ports/channel-view.d.ts +66 -0
  21. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  22. package/lib/types/adapter/ports/channel-workspace.d.ts +23 -0
  23. package/lib/types/adapter/ports/channel-workspace.d.ts.map +1 -1
  24. package/lib/types/adapter/ports/workspace.d.ts +2 -0
  25. package/lib/types/adapter/ports/workspace.d.ts.map +1 -1
  26. package/lib/types/adapter/upstream/workspace-driver.d.ts.map +1 -1
  27. package/lib/types/adapter/upstream/workspace-driver.js +10 -2
  28. package/lib/types/commands.d.ts.map +1 -1
  29. package/lib/types/commands.js +1 -0
  30. package/lib/types/components/ContextBarView.d.ts +15 -7
  31. package/lib/types/components/ContextBarView.d.ts.map +1 -1
  32. package/lib/types/components/ContextBarView.js +26 -22
  33. package/lib/types/components/ImagePreviewOverlay.d.ts.map +1 -1
  34. package/lib/types/components/ImagePreviewOverlay.js +11 -5
  35. package/lib/types/components/Markdown.d.ts +11 -1
  36. package/lib/types/components/Markdown.d.ts.map +1 -1
  37. package/lib/types/components/Markdown.js +20 -2
  38. package/lib/types/components/MermaidDiagram.d.ts +13 -0
  39. package/lib/types/components/MermaidDiagram.d.ts.map +1 -0
  40. package/lib/types/components/MermaidDiagram.js +61 -0
  41. package/lib/types/components/MessageList.d.ts +26 -1
  42. package/lib/types/components/MessageList.d.ts.map +1 -1
  43. package/lib/types/components/MessageList.js +72 -7
  44. package/lib/types/components/PageMargin.d.ts +1 -1
  45. package/lib/types/components/PromptInput.d.ts +37 -1
  46. package/lib/types/components/PromptInput.d.ts.map +1 -1
  47. package/lib/types/components/PromptInput.js +243 -28
  48. package/lib/types/components/ScrollbarGutter.d.ts +20 -5
  49. package/lib/types/components/ScrollbarGutter.d.ts.map +1 -1
  50. package/lib/types/components/ScrollbarGutter.js +88 -10
  51. package/lib/types/components/StreamingMarkdown.d.ts.map +1 -1
  52. package/lib/types/components/StreamingMarkdown.js +30 -28
  53. package/lib/types/components/Tooltip.d.ts.map +1 -1
  54. package/lib/types/components/Tooltip.js +45 -7
  55. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
  56. package/lib/types/components/messages/UserPromptMessage.js +5 -7
  57. package/lib/types/components/messages/useImageInspection.d.ts.map +1 -1
  58. package/lib/types/components/messages/useImageInspection.js +19 -9
  59. package/lib/types/components/promptDraftCache.d.ts +102 -0
  60. package/lib/types/components/promptDraftCache.d.ts.map +1 -0
  61. package/lib/types/components/promptDraftCache.js +76 -0
  62. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +17 -1
  63. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  64. package/lib/types/components/questions/AskUserQuestionPanel.js +40 -7
  65. package/lib/types/components/questions/QuestionMinimizedBar.d.ts +12 -0
  66. package/lib/types/components/questions/QuestionMinimizedBar.d.ts.map +1 -0
  67. package/lib/types/components/questions/QuestionMinimizedBar.js +43 -0
  68. package/lib/types/components/sessions/SessionListRow.d.ts +23 -1
  69. package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
  70. package/lib/types/components/sessions/SessionListRow.js +52 -5
  71. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +49 -0
  72. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -0
  73. package/lib/types/components/workspaces/HomeWorkspaceRow.js +50 -0
  74. package/lib/types/dsh-adapter/bundled-presets.d.ts +10 -0
  75. package/lib/types/dsh-adapter/bundled-presets.d.ts.map +1 -0
  76. package/lib/types/dsh-adapter/bundled-presets.js +80 -0
  77. package/lib/types/dsh-adapter/channel/action-readiness.d.ts +1 -1
  78. package/lib/types/dsh-adapter/channel/action-readiness.d.ts.map +1 -1
  79. package/lib/types/dsh-adapter/channel/action-readiness.js +3 -0
  80. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +1 -1
  81. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
  82. package/lib/types/dsh-adapter/channel/agent-view-projection.js +19 -2
  83. package/lib/types/dsh-adapter/channel/background-action.d.ts.map +1 -1
  84. package/lib/types/dsh-adapter/channel/background-action.js +52 -29
  85. package/lib/types/dsh-adapter/channel/binding.d.ts +19 -2
  86. package/lib/types/dsh-adapter/channel/binding.d.ts.map +1 -1
  87. package/lib/types/dsh-adapter/channel/binding.js +78 -18
  88. package/lib/types/dsh-adapter/channel/composer-images.d.ts +5 -0
  89. package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
  90. package/lib/types/dsh-adapter/channel/composer-images.js +105 -6
  91. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +8 -0
  92. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  93. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +3 -2
  94. package/lib/types/dsh-adapter/channel/ide-selection.d.ts +58 -0
  95. package/lib/types/dsh-adapter/channel/ide-selection.d.ts.map +1 -0
  96. package/lib/types/dsh-adapter/channel/ide-selection.js +226 -0
  97. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +6 -1
  98. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  99. package/lib/types/dsh-adapter/channel/input-delivery.js +9 -1
  100. package/lib/types/dsh-adapter/channel/local-actions.d.ts +3 -19
  101. package/lib/types/dsh-adapter/channel/local-actions.d.ts.map +1 -1
  102. package/lib/types/dsh-adapter/channel/local-actions.js +2 -1
  103. package/lib/types/dsh-adapter/channel/model-actions.d.ts +4 -1
  104. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
  105. package/lib/types/dsh-adapter/channel/model-actions.js +82 -6
  106. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
  107. package/lib/types/dsh-adapter/channel/model-switch.js +49 -31
  108. package/lib/types/dsh-adapter/channel/projection.d.ts +4 -0
  109. package/lib/types/dsh-adapter/channel/projection.d.ts.map +1 -1
  110. package/lib/types/dsh-adapter/channel/projection.js +29 -19
  111. package/lib/types/dsh-adapter/channel/reports.d.ts.map +1 -1
  112. package/lib/types/dsh-adapter/channel/reports.js +4 -12
  113. package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
  114. package/lib/types/dsh-adapter/channel/session-fork.js +26 -2
  115. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +3 -0
  116. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
  117. package/lib/types/dsh-adapter/channel/session-live-adoption.js +1 -0
  118. package/lib/types/dsh-adapter/channel/session-metadata.d.ts +10 -0
  119. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
  120. package/lib/types/dsh-adapter/channel/session-metadata.js +2 -2
  121. package/lib/types/dsh-adapter/channel/session-resume.d.ts +11 -2
  122. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
  123. package/lib/types/dsh-adapter/channel/session-resume.js +291 -94
  124. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
  125. package/lib/types/dsh-adapter/channel/session-rewind.js +34 -16
  126. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
  127. package/lib/types/dsh-adapter/channel/session-tree-actions.js +19 -3
  128. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  129. package/lib/types/dsh-adapter/channel/settings-host.js +4 -3
  130. package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
  131. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  132. package/lib/types/dsh-adapter/channel/state.js +1 -1
  133. package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
  134. package/lib/types/dsh-adapter/channel/transcript.js +6 -12
  135. package/lib/types/dsh-adapter/channel/types.d.ts +6 -1
  136. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  137. package/lib/types/dsh-adapter/channel/workspace-actions.d.ts +4 -1
  138. package/lib/types/dsh-adapter/channel/workspace-actions.d.ts.map +1 -1
  139. package/lib/types/dsh-adapter/channel/workspace-actions.js +41 -1
  140. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  141. package/lib/types/dsh-adapter/channel.js +67 -6
  142. package/lib/types/dsh-adapter/compat/messages.d.ts +15 -0
  143. package/lib/types/dsh-adapter/compat/messages.d.ts.map +1 -0
  144. package/lib/types/dsh-adapter/compat/messages.js +15 -0
  145. package/lib/types/dsh-adapter/compat/settings.d.ts +33 -0
  146. package/lib/types/dsh-adapter/compat/settings.d.ts.map +1 -0
  147. package/lib/types/dsh-adapter/compat/settings.js +43 -0
  148. package/lib/types/dsh-adapter/compat/shell.d.ts +25 -0
  149. package/lib/types/dsh-adapter/compat/shell.d.ts.map +1 -0
  150. package/lib/types/dsh-adapter/compat/shell.js +11 -0
  151. package/lib/types/dsh-adapter/contract.d.ts +4 -4
  152. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  153. package/lib/types/dsh-adapter/contract.js +15 -6
  154. package/lib/types/dsh-adapter/ide-channel.d.ts +224 -0
  155. package/lib/types/dsh-adapter/ide-channel.d.ts.map +1 -0
  156. package/lib/types/dsh-adapter/ide-channel.js +556 -0
  157. package/lib/types/dsh-adapter/index.d.ts +18 -3
  158. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  159. package/lib/types/dsh-adapter/index.js +32 -5
  160. package/lib/types/dsh-adapter/plugin.d.ts +5 -2
  161. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  162. package/lib/types/dsh-adapter/plugin.js +173 -42
  163. package/lib/types/dsh-adapter/preset-resolution.d.ts +8 -0
  164. package/lib/types/dsh-adapter/preset-resolution.d.ts.map +1 -1
  165. package/lib/types/dsh-adapter/preset-resolution.js +10 -0
  166. package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts +53 -0
  167. package/lib/types/dsh-adapter/session-mount-heartbeat.d.ts.map +1 -0
  168. package/lib/types/dsh-adapter/session-mount-heartbeat.js +100 -0
  169. package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -1
  170. package/lib/types/dsh-adapter/sessionTree.js +3 -2
  171. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  172. package/lib/types/dsh-adapter/subagents.js +6 -5
  173. package/lib/types/dsh-adapter/workspaces.d.ts +46 -3
  174. package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -1
  175. package/lib/types/dsh-adapter/workspaces.js +116 -0
  176. package/lib/types/effortPrefs.d.ts +15 -3
  177. package/lib/types/effortPrefs.d.ts.map +1 -1
  178. package/lib/types/effortPrefs.js +37 -3
  179. package/lib/types/homePrefs.d.ts +15 -0
  180. package/lib/types/homePrefs.d.ts.map +1 -0
  181. package/lib/types/homePrefs.js +53 -0
  182. package/lib/types/i18n.d.ts +257 -296
  183. package/lib/types/i18n.d.ts.map +1 -1
  184. package/lib/types/i18n.js +78 -84
  185. package/lib/types/ink/colorize.d.ts +10 -0
  186. package/lib/types/ink/colorize.d.ts.map +1 -1
  187. package/lib/types/ink/colorize.js +21 -0
  188. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
  189. package/lib/types/ink/components/ScrollBox.js +12 -1
  190. package/lib/types/ink/dom.d.ts +1 -0
  191. package/lib/types/ink/dom.d.ts.map +1 -1
  192. package/lib/types/ink/hooks/use-copy-on-select.d.ts +5 -1
  193. package/lib/types/ink/hooks/use-copy-on-select.d.ts.map +1 -1
  194. package/lib/types/ink/hooks/use-copy-on-select.js +15 -1
  195. package/lib/types/ink/ink.d.ts.map +1 -1
  196. package/lib/types/ink/ink.js +36 -1
  197. package/lib/types/ink/output.d.ts +10 -1
  198. package/lib/types/ink/output.d.ts.map +1 -1
  199. package/lib/types/ink/output.js +109 -17
  200. package/lib/types/ink/render-border.d.ts +6 -1
  201. package/lib/types/ink/render-border.d.ts.map +1 -1
  202. package/lib/types/ink/render-border.js +25 -9
  203. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  204. package/lib/types/ink/render-node-to-output.js +48 -6
  205. package/lib/types/ink/renderer.d.ts +6 -0
  206. package/lib/types/ink/renderer.d.ts.map +1 -1
  207. package/lib/types/ink/renderer.js +2 -1
  208. package/lib/types/ink/selection.d.ts +60 -0
  209. package/lib/types/ink/selection.d.ts.map +1 -1
  210. package/lib/types/ink/selection.js +129 -0
  211. package/lib/types/ink/sixel-graphics.d.ts +19 -1
  212. package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
  213. package/lib/types/ink/sixel-graphics.js +124 -12
  214. package/lib/types/ink/terminal-image.d.ts +18 -1
  215. package/lib/types/ink/terminal-image.d.ts.map +1 -1
  216. package/lib/types/ink/terminal.d.ts +17 -0
  217. package/lib/types/ink/terminal.d.ts.map +1 -1
  218. package/lib/types/ink/terminal.js +20 -1
  219. package/lib/types/screens/Chat.d.ts +17 -1
  220. package/lib/types/screens/Chat.d.ts.map +1 -1
  221. package/lib/types/screens/Chat.js +284 -72
  222. package/lib/types/screens/SessionSupervisor.d.ts +84 -0
  223. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -0
  224. package/lib/types/screens/SessionSupervisor.js +350 -0
  225. package/lib/types/screens/SessionTree.js +2 -2
  226. package/lib/types/screens/Settings.d.ts.map +1 -1
  227. package/lib/types/screens/Settings.js +32 -9
  228. package/lib/types/screens/StatusLine.d.ts +13 -0
  229. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  230. package/lib/types/screens/StatusLine.js +36 -17
  231. package/lib/types/screens/StatusMetrics.d.ts +79 -22
  232. package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
  233. package/lib/types/screens/StatusMetrics.js +153 -88
  234. package/lib/types/screens/sessionSupervisor/model.d.ts +83 -0
  235. package/lib/types/screens/sessionSupervisor/model.d.ts.map +1 -0
  236. package/lib/types/screens/sessionSupervisor/model.js +69 -0
  237. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +120 -0
  238. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -0
  239. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +593 -0
  240. package/lib/types/sessionMounts.d.ts +272 -0
  241. package/lib/types/sessionMounts.d.ts.map +1 -0
  242. package/lib/types/sessionMounts.js +706 -0
  243. package/lib/types/sessions/format.d.ts.map +1 -1
  244. package/lib/types/sessions/format.js +4 -1
  245. package/lib/types/sessions/resumeFailure.d.ts +38 -0
  246. package/lib/types/sessions/resumeFailure.d.ts.map +1 -0
  247. package/lib/types/sessions/resumeFailure.js +58 -0
  248. package/lib/types/terminal-utils/mermaid.d.ts +44 -0
  249. package/lib/types/terminal-utils/mermaid.d.ts.map +1 -0
  250. package/lib/types/terminal-utils/mermaid.js +83 -0
  251. package/lib/types/tips.d.ts.map +1 -1
  252. package/lib/types/tips.js +175 -19
  253. package/lib/types/tuiDisplayPrefs.d.ts +7 -9
  254. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  255. package/lib/types/tuiDisplayPrefs.js +31 -28
  256. package/lib/types/update.d.ts +61 -0
  257. package/lib/types/update.d.ts.map +1 -1
  258. package/lib/types/update.js +194 -0
  259. package/lib/types/utils/imageResize.d.ts +90 -0
  260. package/lib/types/utils/imageResize.d.ts.map +1 -0
  261. package/lib/types/utils/imageResize.js +272 -0
  262. package/lib/types/utils/keymap.d.ts +5 -1
  263. package/lib/types/utils/keymap.d.ts.map +1 -1
  264. package/lib/types/utils/keymap.js +23 -0
  265. package/lib/types/workspaces.d.ts +2 -1
  266. package/lib/types/workspaces.d.ts.map +1 -1
  267. package/lib/types/workspaces.js +1 -1
  268. package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +10 -10
  269. package/package.json +120 -103
  270. package/presets/liangshen/.dsh-tui-managed.json +1 -1
  271. package/presets/liangshen/agent.cordis.yml +15 -0
  272. package/lib/types/screens/AgentView.d.ts +0 -23
  273. package/lib/types/screens/AgentView.d.ts.map +0 -1
  274. package/lib/types/screens/AgentView.js +0 -546
  275. package/lib/types/screens/SessionBrowser.d.ts +0 -42
  276. package/lib/types/screens/SessionBrowser.d.ts.map +0 -1
  277. package/lib/types/screens/SessionBrowser.js +0 -911
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../../src/sessions/format.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,kCAAkC,CAAA;AAChF,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAExC;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAYpE;AAED,6DAA6D;AAC7D,MAAM,WAAW,SAAS;IACxB,mEAAmE;IACnE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,4DAA4D;IAC5D,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA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I7F;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CA4B/D;AAED,mEAAmE;AACnE,wBAAgB,SAAS,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,CAInD;AAED;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,MAAM,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,GAAG,MAAM,KAAK,CAQ7E;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAkB/D;AAED,iEAAiE;AACjE,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM/C"}
@@ -230,8 +230,11 @@ export function kindLabel(kind) {
230
230
  * dimmest of all, because it says only "nothing here was readable".
231
231
  */
232
232
  export function titleColor(source, focused) {
233
+ // Selection is green (see SessionListRow): blue is reserved for the pointer
234
+ // hover prompt, so the row under the cursor cannot look like the row the
235
+ // pointer is merely passing over.
233
236
  if (focused)
234
- return 'suggestion';
237
+ return 'success';
235
238
  if (source === 'fallback')
236
239
  return 'subtle';
237
240
  if (source === 'prompt')
@@ -0,0 +1,38 @@
1
+ /**
2
+ * One wording for "why a session could not be mounted".
3
+ *
4
+ * Four surfaces can refuse a mount — the supervisor, the session browser, the
5
+ * workspace home screen and the transcript itself — and each used to spell the
6
+ * same failures out on its own. That is how `/resume` and `/agentview` ended
7
+ * up telling the user different things about the same refusal, and it is why a
8
+ * newly added reason (the cross-process occupancy case) would have been
9
+ * silently mis-reported as a generic failure on whichever surface was missed.
10
+ *
11
+ * The mapping is pure and total: it takes the adapter's discriminated result
12
+ * and returns the sentence to show, or `undefined` for the outcomes that need
13
+ * no words. The `cancelled` case is deliberately silent — the user (or a rival
14
+ * switch) asked for it, so there is nothing to explain.
15
+ *
16
+ * @module @deepseek-harness-tui/dsh-tui/sessions/resumeFailure
17
+ */
18
+ import type { ResumeResult } from '../adapter/ports/channel-view.js';
19
+ import type { MountFailure } from '../sessionMounts.js';
20
+ /**
21
+ * The message for a failed mount, or undefined when it should stay silent.
22
+ * @param result - The adapter's mount outcome.
23
+ * @returns The user-facing sentence, or undefined for `cancelled`.
24
+ */
25
+ export declare function resumeFailureText(result: ResumeResult): string | undefined;
26
+ /**
27
+ * The sentence for a ledger refusal that did NOT find a holder.
28
+ *
29
+ * A refusal to CHECK is not a refusal by a peer, so it must not borrow the
30
+ * "another terminal holds it" wording — that would invent a terminal. The
31
+ * `occupied` case is here too because it is a {@link MountFailure} and its
32
+ * sentence already exists; {@link resumeFailureText} reaches the same key from
33
+ * the adapter's own result.
34
+ * @param failure - Why the session could not be claimed.
35
+ * @returns The user-facing sentence.
36
+ */
37
+ export declare function mountFailureText(failure: MountFailure): string;
38
+ //# sourceMappingURL=resumeFailure.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"resumeFailure.d.ts","sourceRoot":"","sources":["../../../src/sessions/resumeFailure.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACpE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAA;AAGvD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAc1E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAO9D"}
@@ -0,0 +1,58 @@
1
+ /**
2
+ * One wording for "why a session could not be mounted".
3
+ *
4
+ * Four surfaces can refuse a mount — the supervisor, the session browser, the
5
+ * workspace home screen and the transcript itself — and each used to spell the
6
+ * same failures out on its own. That is how `/resume` and `/agentview` ended
7
+ * up telling the user different things about the same refusal, and it is why a
8
+ * newly added reason (the cross-process occupancy case) would have been
9
+ * silently mis-reported as a generic failure on whichever surface was missed.
10
+ *
11
+ * The mapping is pure and total: it takes the adapter's discriminated result
12
+ * and returns the sentence to show, or `undefined` for the outcomes that need
13
+ * no words. The `cancelled` case is deliberately silent — the user (or a rival
14
+ * switch) asked for it, so there is nothing to explain.
15
+ *
16
+ * @module @deepseek-harness-tui/dsh-tui/sessions/resumeFailure
17
+ */
18
+ import { t } from '../i18n.js';
19
+ /**
20
+ * The message for a failed mount, or undefined when it should stay silent.
21
+ * @param result - The adapter's mount outcome.
22
+ * @returns The user-facing sentence, or undefined for `cancelled`.
23
+ */
24
+ export function resumeFailureText(result) {
25
+ if (result.ok)
26
+ return undefined;
27
+ switch (result.reason) {
28
+ case 'cancelled':
29
+ return undefined;
30
+ case 'working':
31
+ return t('resume-while-working');
32
+ case 'unavailable':
33
+ return t('resume-unavailable');
34
+ case 'occupied':
35
+ return t('resume-session-occupied', { pid: result.pid });
36
+ case 'failed':
37
+ return t('session-resume-failed', { err: result.error });
38
+ }
39
+ }
40
+ /**
41
+ * The sentence for a ledger refusal that did NOT find a holder.
42
+ *
43
+ * A refusal to CHECK is not a refusal by a peer, so it must not borrow the
44
+ * "another terminal holds it" wording — that would invent a terminal. The
45
+ * `occupied` case is here too because it is a {@link MountFailure} and its
46
+ * sentence already exists; {@link resumeFailureText} reaches the same key from
47
+ * the adapter's own result.
48
+ * @param failure - Why the session could not be claimed.
49
+ * @returns The user-facing sentence.
50
+ */
51
+ export function mountFailureText(failure) {
52
+ if (failure.reason === 'occupied') {
53
+ return t('resume-session-occupied', { pid: failure.holders[0] ?? 0 });
54
+ }
55
+ return failure.reason === 'busy'
56
+ ? t('resume-mount-busy')
57
+ : t('resume-mount-unavailable', { detail: failure.detail });
58
+ }
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Mermaid fences → Unicode box-drawing art through `lovely-mermaid`.
3
+ *
4
+ * The engine is pure TypeScript: no browser, no SVG, no image protocol. It
5
+ * lays a diagram out at whatever width it needs and reports that width;
6
+ * fitting it to the viewport (or falling back to the fenced source) is the
7
+ * component's decision. Parsing is best-effort by design, so a streaming
8
+ * prefix keeps drawing instead of flipping between art and source.
9
+ *
10
+ * Like cli-highlight the module loads lazily on the first mermaid fence —
11
+ * most sessions never pay for it.
12
+ */
13
+ import type { MermaidArt } from 'lovely-mermaid';
14
+ import type { Theme } from '../theme.js';
15
+ export type { MermaidArt } from 'lovely-mermaid';
16
+ /** The lovely-mermaid surface dsh-tui consumes. */
17
+ export type MermaidEngine = Pick<typeof import('lovely-mermaid'), 'render'>;
18
+ /**
19
+ * Return the shared engine load promise, starting the lazy load on first call.
20
+ * @returns A promise of the engine, or null when the dynamic import fails.
21
+ */
22
+ export declare function getMermaidEnginePromise(): Promise<MermaidEngine | null>;
23
+ /**
24
+ * Synchronous view of the load: the engine once loaded, null after a failed
25
+ * import, undefined while pending. Lets a mounting component draw the
26
+ * diagram on its first render instead of flashing the source first.
27
+ */
28
+ export declare function peekMermaidEngine(): MermaidEngine | null | undefined;
29
+ /** Whether a fence info string names mermaid (`mermaid`, `Mermaid`, `mermaid title=…`). */
30
+ export declare function isMermaidLang(lang: string | undefined): boolean;
31
+ /**
32
+ * Lay out a mermaid source. `null` follows the engine's contract (blank,
33
+ * unsupported diagram type, nothing parsed) and additionally covers the
34
+ * source-length guard and any engine exception — a third-party parser
35
+ * failing on model output must degrade to the fenced source, never take
36
+ * the transcript down.
37
+ */
38
+ export declare function renderMermaid(engine: MermaidEngine, source: string): MermaidArt | null;
39
+ /**
40
+ * Paint the art's rows with the active theme, one string per row.
41
+ * `styled[i]` joined is exactly `plain[i]`, so widths are unchanged.
42
+ */
43
+ export declare function paintMermaidArt(art: MermaidArt, theme: Theme): string[];
44
+ //# sourceMappingURL=mermaid.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mermaid.d.ts","sourceRoot":"","sources":["../../../src/terminal-utils/mermaid.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,UAAU,EAAQ,MAAM,gBAAgB,CAAA;AAEtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAA;AAExC,YAAY,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEhD,mDAAmD;AACnD,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,cAAc,gBAAgB,CAAC,EAAE,QAAQ,CAAC,CAAA;AAqB3E;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC,CAMvE;AAED;;;;GAIG;AACH,wBAAgB,iBAAiB,IAAI,aAAa,GAAG,IAAI,GAAG,SAAS,CAEpE;AAED,2FAA2F;AAC3F,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAE/D;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAOtF;AAgBD;;;GAGG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,GAAG,MAAM,EAAE,CASvE"}
@@ -0,0 +1,83 @@
1
+ import { colorize } from '../ink/colorize.js';
2
+ /**
3
+ * Sources above this length skip the engine: the layout has its own node
4
+ * and edge caps, but the parser still walks every character, and a fence
5
+ * this long is a paste, not a diagram.
6
+ */
7
+ const MERMAID_SOURCE_LIMIT = 20_000;
8
+ let enginePromise;
9
+ let loadedEngine;
10
+ async function loadMermaidEngine() {
11
+ try {
12
+ const mod = await import('lovely-mermaid');
13
+ return { render: mod.render };
14
+ }
15
+ catch {
16
+ return null;
17
+ }
18
+ }
19
+ /**
20
+ * Return the shared engine load promise, starting the lazy load on first call.
21
+ * @returns A promise of the engine, or null when the dynamic import fails.
22
+ */
23
+ export function getMermaidEnginePromise() {
24
+ enginePromise ??= loadMermaidEngine().then(engine => {
25
+ loadedEngine = engine;
26
+ return engine;
27
+ });
28
+ return enginePromise;
29
+ }
30
+ /**
31
+ * Synchronous view of the load: the engine once loaded, null after a failed
32
+ * import, undefined while pending. Lets a mounting component draw the
33
+ * diagram on its first render instead of flashing the source first.
34
+ */
35
+ export function peekMermaidEngine() {
36
+ return loadedEngine;
37
+ }
38
+ /** Whether a fence info string names mermaid (`mermaid`, `Mermaid`, `mermaid title=…`). */
39
+ export function isMermaidLang(lang) {
40
+ return lang?.trim().split(/\s+/, 1)[0]?.toLowerCase() === 'mermaid';
41
+ }
42
+ /**
43
+ * Lay out a mermaid source. `null` follows the engine's contract (blank,
44
+ * unsupported diagram type, nothing parsed) and additionally covers the
45
+ * source-length guard and any engine exception — a third-party parser
46
+ * failing on model output must degrade to the fenced source, never take
47
+ * the transcript down.
48
+ */
49
+ export function renderMermaid(engine, source) {
50
+ if (source.length > MERMAID_SOURCE_LIMIT)
51
+ return null;
52
+ try {
53
+ return engine.render(source);
54
+ }
55
+ catch {
56
+ return null;
57
+ }
58
+ }
59
+ /**
60
+ * Theme key per semantic role. `text` (node labels) is deliberately left
61
+ * unpainted so it inherits the enclosing Text's color — body color in a
62
+ * reply, the dim color inside a folded thinking block.
63
+ */
64
+ const ROLE_COLOR = Object.freeze({
65
+ border: 'subtle',
66
+ text: undefined,
67
+ edge: 'permission',
68
+ edgeLabel: 'inactive',
69
+ title: 'subtle',
70
+ none: undefined,
71
+ });
72
+ /**
73
+ * Paint the art's rows with the active theme, one string per row.
74
+ * `styled[i]` joined is exactly `plain[i]`, so widths are unchanged.
75
+ */
76
+ export function paintMermaidArt(art, theme) {
77
+ return art.styled.map(row => row
78
+ .map(span => {
79
+ const key = ROLE_COLOR[span.role];
80
+ return key === undefined ? span.text : colorize(span.text, theme[key], 'foreground');
81
+ })
82
+ .join(''));
83
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"tips.d.ts","sourceRoot":"","sources":["../../src/tips.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,MAAM,QAAQ,GAAG,MAAM,GA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G,EAAE,CAElD"}
package/lib/types/tips.js CHANGED
@@ -26,8 +26,8 @@ export const TIPS = [
26
26
  {
27
27
  id: 'keys-esc-levels',
28
28
  group: 'keys',
29
- zh: 'Esc 逐层关闭:帮助 → 命令/文件菜单 → 清空输入',
30
- en: 'Esc closes layers: help → command/file menus → clear input',
29
+ zh: 'Esc 逐层收:帮助 → 图片预览 → 命令/文件菜单 → 清选区 → 清空',
30
+ en: 'Esc peels layers: help → image preview → command/file menus → selection → clear input',
31
31
  },
32
32
  {
33
33
  id: 'keys-ctrl-o',
@@ -122,8 +122,8 @@ export const TIPS = [
122
122
  {
123
123
  id: 'keys-shift-tab',
124
124
  group: 'keys',
125
- zh: 'Shift+Tab 循环会话模式:默认→计划→完全访问',
126
- en: 'Shift+Tab cycles modes: default → plan → full access',
125
+ zh: 'Shift+Tab 循环会话模式:默认→计划→完全访问(挂了第三方权限预设时按 registry 顺序追加到末尾)',
126
+ en: 'Shift+Tab cycles modes: default → plan → full access (third-party presets append in registry order)',
127
127
  },
128
128
  {
129
129
  id: 'keys-shift-up',
@@ -161,18 +161,72 @@ export const TIPS = [
161
161
  zh: '轨迹与 /settings 支持鼠标:行点击跳转/编辑,滚轮移动光标或焦点',
162
162
  en: 'Trajectory and /settings take the mouse: row clicks jump/edit, the wheel moves cursor or focus',
163
163
  },
164
+ {
165
+ id: 'keys-session-screen',
166
+ group: 'keys',
167
+ zh: '会话管理界面:←/→ 切栏,会话栏 Enter 进会话、工作区栏 Enter 开菜单(初始焦点在工作区栏)',
168
+ en: 'Session manager: ←/→ switch panes; Enter enters a session (list) or opens the workspace menu (rail)',
169
+ },
170
+ {
171
+ id: 'keys-session-actions',
172
+ group: 'keys',
173
+ zh: '会话管理界面:Ctrl+N 新建、Ctrl+X 停止后台会话、Ctrl+L 重读列表、打字即筛选',
174
+ en: 'Session manager: Ctrl+N new · Ctrl+X stop a background session · Ctrl+L reload · type to filter',
175
+ },
176
+ {
177
+ id: 'keys-prompt-background',
178
+ group: 'keys',
179
+ zh: '输入框空着按 ←:当前会话转后台并打开会话管理界面(同 /bg)',
180
+ en: '← on an empty prompt backgrounds this session and opens the session manager (same as /bg)',
181
+ },
182
+ {
183
+ id: 'keys-jobs-esc',
184
+ group: 'keys',
185
+ zh: '/jobs 面板里 Esc 只关面板,不会中断正在跑的回合',
186
+ en: 'In the /jobs panel, Esc only closes the panel — it does not interrupt the turn',
187
+ },
188
+ {
189
+ id: 'keys-settings-arrows',
190
+ group: 'keys',
191
+ zh: '/settings 里 ←/→ 在有选项的字段上循环切换;布尔项仍只认 Enter',
192
+ en: 'In /settings, ←/→ cycle options on fields that have them; booleans still only toggle with Enter',
193
+ },
194
+ {
195
+ id: 'keys-transcript-page',
196
+ group: 'keys',
197
+ zh: '全屏下 PgUp/PgDn 按页翻消息列表,跟翻书一样',
198
+ en: 'Fullscreen: PgUp/PgDn page through the message list like a book',
199
+ },
200
+ {
201
+ id: 'keys-expand-editor',
202
+ group: 'keys',
203
+ zh: 'Ctrl+Shift+E 或输入行尾 ⛶ 展开全屏草稿编辑器,写长文更舒服',
204
+ en: 'Ctrl+Shift+E or the ⛶ button opens the fullscreen draft editor — great for long posts',
205
+ },
206
+ {
207
+ id: 'keys-composer-fold',
208
+ group: 'keys',
209
+ zh: '粘贴大段(≥6 行或 ≥600 字)折成 ▸ 小条,点它或 Esc 展开;Enter 提交的还是全文',
210
+ en: 'Big pastes (≥6 lines or ≥600 chars) fold into a ▸ chip; click or Esc expands, Enter sends it all',
211
+ },
212
+ {
213
+ id: 'keys-image-preview',
214
+ group: 'keys',
215
+ zh: '大图预览:←/→ 换张,缩放走底部按钮(适应/100%/200%/400%/800%),拖动或滚轮平移',
216
+ en: 'Image preview: ←/→ switch, zoom via bottom buttons (fit/100/200/400/800%), drag or wheel to pan',
217
+ },
164
218
  // ── 命令 ──────────────────────────────────────────────────
165
219
  {
166
220
  id: 'cmd-new-resume',
167
221
  group: 'commands',
168
- zh: '/new 新会话;/resume 恢复历史会话',
169
- en: '/new starts a session; /resume brings back old ones',
222
+ zh: '/new 开新会话;/resume 打开会话管理界面找回历史会话',
223
+ en: '/new starts a session; /resume opens the session manager to bring back old ones',
170
224
  },
171
225
  {
172
- id: 'cmd-resume-search',
226
+ id: 'cmd-session-manager',
173
227
  group: 'commands',
174
- zh: '/resume 顶部可选工作目录,← 切目录,打字搜索当前层',
175
- en: '/resume has a directory selector; ← switches scope, typing searches the active list',
228
+ zh: '/resume、/home、/agentview、/bg 和输入框行首 ⌸,进的都是同一个会话管理界面',
229
+ en: '/resume, /home, /agentview, /bg and the ⌸ button all open one session manager',
176
230
  },
177
231
  {
178
232
  id: 'cmd-rename',
@@ -333,8 +387,8 @@ export const TIPS = [
333
387
  {
334
388
  id: 'cmd-provider',
335
389
  group: 'commands',
336
- zh: '/provider 交互式添加自己的模型提供方',
337
- en: '/provider adds your own model provider interactively',
390
+ zh: '/provider 交互式管理模型提供方:添加、编辑、删除',
391
+ en: '/provider adds, edits or deletes model providers interactively',
338
392
  },
339
393
  {
340
394
  id: 'cmd-login',
@@ -416,16 +470,46 @@ export const TIPS = [
416
470
  en: '/fork copies the session into a resumable twin; the original is untouched',
417
471
  },
418
472
  {
419
- id: 'flow-resume',
473
+ id: 'flow-session-park',
474
+ group: 'workflow',
475
+ zh: '切换会话只是停放(先放一边),回合照跑不打断;被其他 TUI 终端占用的会标红、进不去',
476
+ en: 'Switching a session just parks it (the turn keeps running); a session held elsewhere turns red',
477
+ },
478
+ {
479
+ id: 'flow-draft-kept',
480
+ group: 'workflow',
481
+ zh: '去 /settings、会话管理界面、轨迹转一圈再回来,草稿(含暂存图片)原样还在',
482
+ en: 'Leave for /settings, the session manager or trajectory: your draft (images too) is still there',
483
+ },
484
+ {
485
+ id: 'flow-first-launch',
486
+ group: 'workflow',
487
+ zh: '首次普通启动(不带 --resume、工作区目标或首条提示词)落在会话管理界面选工作区,之后直接进对话',
488
+ en: 'First plain launch (no --resume/workspace/prompt) opens the session manager; then straight to chat',
489
+ },
490
+ {
491
+ id: 'flow-prompt-background-return',
492
+ group: 'workflow',
493
+ zh: '/bg 或空输入 ← 之后,再按 Esc 回到刚转后台的那个会话',
494
+ en: 'After /bg (or ← on empty input), Esc takes you back to the session you just backgrounded',
495
+ },
496
+ {
497
+ id: 'flow-dialog-paste',
420
498
  group: 'workflow',
421
- zh: '/resume 里 Ctrl+S 折叠子 agent 运行',
422
- en: 'In /resume, Ctrl+S folds subagent runs',
499
+ zh: '问卷、计划评审和插件对话框里都能 Ctrl+V 粘贴文本',
500
+ en: 'Question, plan-review and plugin dialogs all accept Ctrl+V paste',
423
501
  },
424
502
  {
425
- id: 'flow-resume-clean',
503
+ id: 'flow-ide-selection',
426
504
  group: 'workflow',
427
- zh: '/resume 里 Ctrl+X 清理空壳会话',
428
- en: 'In /resume, Ctrl+X prunes empty sessions',
505
+ zh: 'VS Code 扩展 ≥0.7.0:选中代码后输入框下方显示 ⧉ N lines selected,发送自动附上选中行',
506
+ en: 'VS Code extension ≥0.7.0: select code to show ⧉ N lines selected below input; sent with the message',
507
+ },
508
+ {
509
+ id: 'flow-image-adapt',
510
+ group: 'workflow',
511
+ zh: '粘贴超尺寸图先等比缩放或转格式;需重编码的动图直接拒绝,不悄悄丢帧',
512
+ en: 'Oversized images get scaled or converted first; animated ones needing re-encode are refused',
429
513
  },
430
514
  {
431
515
  id: 'flow-search',
@@ -451,6 +535,12 @@ export const TIPS = [
451
535
  zh: '问卷选项行直接打字 = 选项 + 自定义文本一起提交',
452
536
  en: 'Typing on a question row submits option + custom text',
453
537
  },
538
+ {
539
+ id: 'flow-question-fold',
540
+ group: 'workflow',
541
+ zh: '问卷面板 Ctrl+K 或点标题行折叠;挂起时 Esc/Ctrl+C 先展开,不直接取消',
542
+ en: 'Fold the question panel with Ctrl+K or its header; when pending, Esc/Ctrl+C expands first',
543
+ },
454
544
  {
455
545
  id: 'flow-plan-review',
456
546
  group: 'workflow',
@@ -491,8 +581,8 @@ export const TIPS = [
491
581
  {
492
582
  id: 'disp-statusbar',
493
583
  group: 'display',
494
- zh: '底栏 TPS、轨迹条、上下文条默认关,/settings 里打开',
495
- en: 'TPS, trajectory, context bars are off by default — enable in /settings',
584
+ zh: '底栏 TPS、轨迹条默认关,上下文条默认开;都在 /settings 逐项开关',
585
+ en: 'TPS and trajectory bars are off by default, context bar on; all switch in /settings',
496
586
  },
497
587
  {
498
588
  id: 'disp-statusbar-session-id',
@@ -626,6 +716,48 @@ export const TIPS = [
626
716
  zh: '首屏鲸鱼动画(终端 ≥64 列才显示)',
627
717
  en: 'The whale intro shows on terminals ≥64 columns',
628
718
  },
719
+ {
720
+ id: 'disp-context-legend',
721
+ group: 'display',
722
+ zh: '悬停上下文条看分段图例;读数 ≥80% 琥珀、≥95% 红,该 /compact 了',
723
+ en: 'Hover the context bar for its legend; ≥80% amber, ≥95% red — time to /compact',
724
+ },
725
+ {
726
+ id: 'disp-long-line',
727
+ group: 'display',
728
+ zh: '超过 1000 字符的单行只显示前 1000 字符,行尾标记写明折叠了多少;点它或 Ctrl+O 看全文',
729
+ en: 'Lines over 1000 chars show the first 1000 plus a folded-count marker; click or Ctrl+O for the rest',
730
+ },
731
+ {
732
+ id: 'disp-gutter',
733
+ group: 'display',
734
+ zh: '转录边栏三选一:轮次时间线 / 滚动条 / 隐藏;滚动条能直接拖',
735
+ en: 'Transcript gutter: timeline, scrollbar or hidden; drag the scrollbar to scroll',
736
+ },
737
+ {
738
+ id: 'disp-mermaid',
739
+ group: 'display',
740
+ zh: '回复里的 ```mermaid 代码块直接画成字符图,/settings 里可关',
741
+ en: '```mermaid fences in replies are drawn as character diagrams; toggle in /settings',
742
+ },
743
+ {
744
+ id: 'disp-whale-click',
745
+ group: 'display',
746
+ zh: '开始第一个任务前点鲸鱼冒爱心、唤醒睡着的它;闲置动作可在 /settings 关',
747
+ en: 'Before your first task, click the whale for hearts and to wake it; idle moves toggle in /settings',
748
+ },
749
+ {
750
+ id: 'disp-smooth',
751
+ group: 'display',
752
+ zh: '流式输出默认平滑打出(约 30fps);嫌慢可在 /settings 关',
753
+ en: 'Streaming reveals smoothly by default (~30fps); turn it off in /settings',
754
+ },
755
+ {
756
+ id: 'disp-terminal-images',
757
+ group: 'display',
758
+ zh: '终端不支持 Kitty/Sixel 时图片只显示文字信息;预览开关在 /settings',
759
+ en: 'Without Kitty/Sixel, images show text only; the preview toggle lives in /settings',
760
+ },
629
761
  // ── 避坑 ──────────────────────────────────────────────────
630
762
  {
631
763
  id: 'pit-cost-approx',
@@ -729,6 +861,30 @@ export const TIPS = [
729
861
  zh: '需要交互 TTY;推荐 Windows Terminal ≥110 列',
730
862
  en: 'An interactive TTY is required; try Windows Terminal ≥110 cols',
731
863
  },
864
+ {
865
+ id: 'pit-safe-mode',
866
+ group: 'pitfalls',
867
+ zh: 'dsh 异常退出会提示进入 dsh-tui safe:只读诊断 + 干净救援 profile',
868
+ en: 'When dsh exits badly, dsh-tui safe offers read-only diagnostics and a clean rescue profile',
869
+ },
870
+ {
871
+ id: 'pit-effort-fallback',
872
+ group: 'pitfalls',
873
+ zh: '偏好的推理档当前模型没有时,自动就近降一级并弹提示说明',
874
+ en: 'If the model lacks your preferred effort tier, it drops to the nearest lower one and says so',
875
+ },
876
+ {
877
+ id: 'pit-selection-guard',
878
+ group: 'pitfalls',
879
+ zh: '选中高亮的内容被就地替换时,复制会被取消,避免复制到过期文本',
880
+ en: 'If the text under your selection is replaced in place, the copy is cancelled',
881
+ },
882
+ {
883
+ id: 'pit-tooltip-select',
884
+ group: 'pitfalls',
885
+ zh: '拖选转录文字时悬浮详情卡不会弹出,免得盖住要复制的格子',
886
+ en: 'Hover cards stay hidden while you drag-select the transcript, so nothing covers the text you copy',
887
+ },
732
888
  ];
733
889
  /**
734
890
  * 启动随机轮换选择:每次启动随机取一条,让首屏每次都有新鲜感。
@@ -39,13 +39,11 @@ export declare function resolvePageMargin(setting: PageMarginSetting): {
39
39
  readonly x: number;
40
40
  readonly y: number;
41
41
  };
42
- /** Subscribe to page-margin setting changes; returns the unsubscribe fn. */
43
- export declare function subscribePageMargin(listener: () => void): () => void;
44
- /** Current applied setting (normalized; safe for useSyncExternalStore —
45
- * a primitive string identity is stable). */
46
- export declare function getPageMarginSetting(): PageMarginSetting;
47
- /** Apply a new setting (normalized, no-op when unchanged). Returns the
48
- * value that ended up applied — useful for the plugin to mirror the
49
- * channel. */
50
- export declare function applyPageMargin(setting: unknown): PageMarginSetting;
42
+ export declare const subscribePageMargin: (listener: () => void) => () => void;
43
+ export declare const getPageMarginSetting: () => PageMarginSetting;
44
+ /** Returns the value that ended up applied — the plugin mirrors it into the channel. */
45
+ export declare const applyPageMargin: (value: unknown) => PageMarginSetting;
46
+ export declare const subscribeMermaidDiagrams: (listener: () => void) => () => void;
47
+ export declare const getMermaidDiagrams: () => boolean;
48
+ export declare const applyMermaidDiagrams: (value: unknown) => boolean;
51
49
  //# sourceMappingURL=tuiDisplayPrefs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"tuiDisplayPrefs.d.ts","sourceRoot":"","sources":["../../src/tuiDisplayPrefs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAC9J,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAA;AAG9J,qEAAqE;AACrE,eAAO,MAAM,kBAAkB,EAAE,QAAQ,CAAC,eAAe,CAuBvD,CAAA;AAMF,0EAA0E;AAC1E,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,OAAO,GAAG,cAAc,CAItE;AAED,4EAA4E;AAC5E,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,OAAO,GAAG,gBAAgB,CAItE;AAED,0EAA0E;AAC1E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,GAAG,eAAe,CASlE;AASD;;;G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AAClC,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,iBAAiB,CAOrE;AAED;2EAC2E;AAC3E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,iBAAiB,GAAG;IAAE,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,CAAC,EAAE,MAAM,CAAA;CAAE,CAWxG;AAyCD,eAAO,MAAM,mBAAmB,aA5BR,MAAM,IAAI,KAAK,MAAM,IA4Be,CAAA;AAC5D,eAAO,MAAM,oBAAoB,yBAAsB,CAAA;AACvD,wFAAwF;AACxF,eAAO,MAAM,eAAe,UA3BX,OAAO,sBA2B4B,CAAA;AAMpD,eAAO,MAAM,wBAAwB,aArCb,MAAM,IAAI,KAAK,MAAM,IAqCyB,CAAA;AACtE,eAAO,MAAM,kBAAkB,eAA2B,CAAA;AAC1D,eAAO,MAAM,oBAAoB,UAnChB,OAAO,YAmCsC,CAAA"}
@@ -134,32 +134,35 @@ export function resolvePageMargin(setting) {
134
134
  }
135
135
  return PAGE_MARGIN_PRESETS[DEFAULT_PAGE_MARGIN];
136
136
  }
137
- // ── Live module store ──────────────────────────────────────────────────
138
- // PageMargin sits ABOVE Chat in the tree, so it cannot observe the
139
- // channel's version bump used to re-render everything below Chat. The
140
- // settings watch therefore mirrors the applied setting through this store;
141
- // PageMargin subscribes with useSyncExternalStore and re-lays out.
142
- const pageMarginListeners = new Set();
143
- let pageMarginState = DEFAULT_PAGE_MARGIN;
144
- /** Subscribe to page-margin setting changes; returns the unsubscribe fn. */
145
- export function subscribePageMargin(listener) {
146
- pageMarginListeners.add(listener);
147
- return () => { pageMarginListeners.delete(listener); };
148
- }
149
- /** Current applied setting (normalized; safe for useSyncExternalStore —
150
- * a primitive string identity is stable). */
151
- export function getPageMarginSetting() {
152
- return normalizePageMargin(pageMarginState);
153
- }
154
- /** Apply a new setting (normalized, no-op when unchanged). Returns the
155
- * value that ended up applied — useful for the plugin to mirror the
156
- * channel. */
157
- export function applyPageMargin(setting) {
158
- const next = normalizePageMargin(setting);
159
- if (next !== pageMarginState) {
160
- pageMarginState = next;
161
- for (const listener of [...pageMarginListeners])
162
- listener();
163
- }
164
- return next;
137
+ function createLiveSetting(initial, normalize) {
138
+ const listeners = new Set();
139
+ let state = initial;
140
+ return {
141
+ subscribe(listener) {
142
+ listeners.add(listener);
143
+ return () => { listeners.delete(listener); };
144
+ },
145
+ get: () => state,
146
+ apply(value) {
147
+ const next = normalize(value);
148
+ if (next !== state) {
149
+ state = next;
150
+ for (const listener of [...listeners])
151
+ listener();
152
+ }
153
+ return next;
154
+ },
155
+ };
165
156
  }
157
+ const pageMarginStore = createLiveSetting(DEFAULT_PAGE_MARGIN, normalizePageMargin);
158
+ export const subscribePageMargin = pageMarginStore.subscribe;
159
+ export const getPageMarginSetting = pageMarginStore.get;
160
+ /** Returns the value that ended up applied — the plugin mirrors it into the channel. */
161
+ export const applyPageMargin = pageMarginStore.apply;
162
+ /** Whether ```mermaid fences render as box-drawing diagrams (settings
163
+ * `dsh-tui.mermaidDiagrams`, default on). Only an explicit `false` keeps
164
+ * the fenced source. */
165
+ const mermaidDiagramsStore = createLiveSetting(true, value => value !== false);
166
+ export const subscribeMermaidDiagrams = mermaidDiagramsStore.subscribe;
167
+ export const getMermaidDiagrams = mermaidDiagramsStore.get;
168
+ export const applyMermaidDiagrams = mermaidDiagramsStore.apply;