@deepseek-harness-tui/dsh-tui 0.16.1 → 0.18.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 (488) hide show
  1. package/README.md +213 -34
  2. package/assets/plugin-icon.svg +13 -0
  3. package/assets/windows-installer.cs +308 -0
  4. package/assets/windows-installer.ps1 +17 -0
  5. package/bin/dsh-tui.js +64 -5
  6. package/cli/adapters/dsh/index.mjs +111 -0
  7. package/cli/adapters/dsh/locate.mjs +73 -0
  8. package/cli/adapters/dsh/management-plugin.mjs +111 -0
  9. package/cli/args.mjs +154 -0
  10. package/cli/contracts.d.ts +48 -0
  11. package/cli/engine.mjs +92 -0
  12. package/cli/entry.mjs +48 -0
  13. package/cli/process.mjs +118 -0
  14. package/cli/protocol.mjs +23 -0
  15. package/cli/schema-v1.json +33 -0
  16. package/cordis.patch.yml +3 -1
  17. package/cordis.yml +3 -1
  18. package/guide/dsh-tui-guide/SKILL.md +1 -0
  19. package/guide/dsh-tui-guide/cli.en.md +114 -0
  20. package/guide/dsh-tui-guide/cli.md +114 -0
  21. package/guide/dsh-tui-guide/configuration.en.md +7 -5
  22. package/guide/dsh-tui-guide/configuration.md +7 -5
  23. package/guide/dsh-tui-guide/getting-started.en.md +33 -3
  24. package/guide/dsh-tui-guide/getting-started.md +23 -2
  25. package/guide/dsh-tui-guide/interaction.en.md +50 -17
  26. package/guide/dsh-tui-guide/interaction.md +35 -13
  27. package/guide/dsh-tui-guide/plugins.en.md +63 -11
  28. package/guide/dsh-tui-guide/plugins.md +41 -7
  29. package/guide/dsh-tui-guide/user-guide.en.md +55 -34
  30. package/guide/dsh-tui-guide/user-guide.md +45 -28
  31. package/lib/settings.json +85 -42
  32. package/lib/types/adapter/channel/plugins.d.ts.map +1 -1
  33. package/lib/types/adapter/channel/plugins.js +8 -0
  34. package/lib/types/adapter/channel/ui-policy.d.ts +2 -1
  35. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  36. package/lib/types/adapter/channel/ui-policy.js +4 -0
  37. package/lib/types/adapter/ports/channel-display.d.ts +10 -0
  38. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
  39. package/lib/types/adapter/ports/channel-session.d.ts +2 -0
  40. package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
  41. package/lib/types/adapter/ports/channel-settings.d.ts +20 -0
  42. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
  43. package/lib/types/adapter/ports/channel-ui.d.ts +22 -2
  44. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  45. package/lib/types/adapter/ports/channel-view.d.ts +11 -1
  46. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  47. package/lib/types/adapter/ports/channel.d.ts +7 -0
  48. package/lib/types/adapter/ports/channel.d.ts.map +1 -1
  49. package/lib/types/adapter/standard/grants.d.ts +60 -0
  50. package/lib/types/adapter/standard/grants.d.ts.map +1 -1
  51. package/lib/types/adapter/standard/grants.js +74 -0
  52. package/lib/types/agent/capabilities.d.ts +2 -0
  53. package/lib/types/agent/capabilities.d.ts.map +1 -1
  54. package/lib/types/agent/events.d.ts +15 -1
  55. package/lib/types/agent/events.d.ts.map +1 -1
  56. package/lib/types/api.d.ts +2 -2
  57. package/lib/types/api.d.ts.map +1 -1
  58. package/lib/types/backends/claude/translate/events.d.ts.map +1 -1
  59. package/lib/types/backends/claude/translate/events.js +2 -1
  60. package/lib/types/backends/codex/auth/status.js +1 -1
  61. package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
  62. package/lib/types/backends/codex/session/controls.js +6 -5
  63. package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
  64. package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
  65. package/lib/types/backends/codex/translate/events.d.ts.map +1 -1
  66. package/lib/types/backends/codex/translate/events.js +3 -1
  67. package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
  68. package/lib/types/backends/shared/channel-tokens.js +9 -8
  69. package/lib/types/channel/history-restore.d.ts.map +1 -1
  70. package/lib/types/channel/history-restore.js +2 -0
  71. package/lib/types/channel/interaction.d.ts.map +1 -1
  72. package/lib/types/channel/interaction.js +1 -0
  73. package/lib/types/channel/projection.d.ts +1 -1
  74. package/lib/types/channel/projection.d.ts.map +1 -1
  75. package/lib/types/channel/projection.js +19 -4
  76. package/lib/types/channel/questions.d.ts +2 -0
  77. package/lib/types/channel/questions.d.ts.map +1 -1
  78. package/lib/types/channel/sanitize.d.ts +14 -0
  79. package/lib/types/channel/sanitize.d.ts.map +1 -1
  80. package/lib/types/channel/sanitize.js +55 -0
  81. package/lib/types/channel/working-directory.d.ts +9 -0
  82. package/lib/types/channel/working-directory.d.ts.map +1 -0
  83. package/lib/types/channel/working-directory.js +7 -0
  84. package/lib/types/commands.d.ts +8 -1
  85. package/lib/types/commands.d.ts.map +1 -1
  86. package/lib/types/commands.js +14 -5
  87. package/lib/types/components/ChatTitle.d.ts +7 -0
  88. package/lib/types/components/ChatTitle.d.ts.map +1 -0
  89. package/lib/types/components/ChatTitle.js +15 -0
  90. package/lib/types/components/CodeBlockFrame.d.ts.map +1 -1
  91. package/lib/types/components/CodeBlockFrame.js +10 -5
  92. package/lib/types/components/CompactionStatusRow.d.ts.map +1 -1
  93. package/lib/types/components/CompactionStatusRow.js +24 -3
  94. package/lib/types/components/GoalTodoPanel.d.ts +73 -6
  95. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  96. package/lib/types/components/GoalTodoPanel.js +165 -17
  97. package/lib/types/components/Markdown.d.ts +9 -1
  98. package/lib/types/components/Markdown.d.ts.map +1 -1
  99. package/lib/types/components/Markdown.js +5 -4
  100. package/lib/types/components/MessageList.d.ts.map +1 -1
  101. package/lib/types/components/MessageList.js +20 -14
  102. package/lib/types/components/PluginGrantList.d.ts +45 -0
  103. package/lib/types/components/PluginGrantList.d.ts.map +1 -0
  104. package/lib/types/components/PluginGrantList.js +126 -0
  105. package/lib/types/components/PluginInstallPane.d.ts.map +1 -1
  106. package/lib/types/components/PluginInstallPane.js +35 -6
  107. package/lib/types/components/PluginManagePane.d.ts.map +1 -1
  108. package/lib/types/components/PluginManagePane.js +65 -8
  109. package/lib/types/components/PromptInput.d.ts +13 -5
  110. package/lib/types/components/PromptInput.d.ts.map +1 -1
  111. package/lib/types/components/PromptInput.js +190 -108
  112. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  113. package/lib/types/components/SplitDiffView.js +232 -22
  114. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  115. package/lib/types/components/SubagentDashboard.js +10 -0
  116. package/lib/types/components/SubagentDetailScene.d.ts +3 -1
  117. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  118. package/lib/types/components/SubagentDetailScene.js +17 -1
  119. package/lib/types/components/Whale.d.ts.map +1 -1
  120. package/lib/types/components/Whale.js +8 -5
  121. package/lib/types/components/approvals/ApprovalPanel.d.ts +1 -1
  122. package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
  123. package/lib/types/components/approvals/ApprovalPanel.js +93 -11
  124. package/lib/types/components/bigfont.d.ts.map +1 -1
  125. package/lib/types/components/bigfont.js +2 -1
  126. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -1
  127. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  128. package/lib/types/components/messages/AssistantToolUseMessage.js +24 -11
  129. package/lib/types/components/onboardingModel.d.ts +2 -2
  130. package/lib/types/components/onboardingModel.js +3 -3
  131. package/lib/types/components/onboardingProviderPlan.d.ts +110 -0
  132. package/lib/types/components/onboardingProviderPlan.d.ts.map +1 -0
  133. package/lib/types/components/onboardingProviderPlan.js +78 -0
  134. package/lib/types/components/previewRows.d.ts +19 -0
  135. package/lib/types/components/previewRows.d.ts.map +1 -0
  136. package/lib/types/components/previewRows.js +46 -0
  137. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  138. package/lib/types/components/questions/AskUserQuestionPanel.js +75 -10
  139. package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -9
  140. package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
  141. package/lib/types/components/sessions/ForeignSessionRow.js +6 -10
  142. package/lib/types/components/sessions/SessionListRow.d.ts +4 -9
  143. package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
  144. package/lib/types/components/sessions/SessionListRow.js +18 -10
  145. package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -1
  146. package/lib/types/components/sidePanel/InfoPanel.js +4 -3
  147. package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
  148. package/lib/types/components/sidePanel/SidePanelLayout.js +5 -5
  149. package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -1
  150. package/lib/types/components/sidePanel/WorkspacePanel.js +19 -7
  151. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +7 -0
  152. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
  153. package/lib/types/components/sidePanel/btw/BtwComposer.js +16 -0
  154. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
  155. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +8 -1
  156. package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +7 -1
  157. package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
  158. package/lib/types/components/sidePanel/btw/BtwThreadScene.js +8 -1
  159. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts +30 -0
  160. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts.map +1 -0
  161. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.js +94 -0
  162. package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
  163. package/lib/types/components/sidePanel/builtinPanels.js +36 -18
  164. package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -1
  165. package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -1
  166. package/lib/types/components/sidePanel/panelMarkdown.d.ts +32 -0
  167. package/lib/types/components/sidePanel/panelMarkdown.d.ts.map +1 -0
  168. package/lib/types/components/sidePanel/panelMarkdown.js +45 -0
  169. package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -1
  170. package/lib/types/components/sidePanel/pluginPanelAdapter.js +6 -1
  171. package/lib/types/components/sidePanel/subagentFailureRead.d.ts +21 -0
  172. package/lib/types/components/sidePanel/subagentFailureRead.d.ts.map +1 -0
  173. package/lib/types/components/sidePanel/subagentFailureRead.js +66 -0
  174. package/lib/types/components/sidePanel/types.d.ts +2 -0
  175. package/lib/types/components/sidePanel/types.d.ts.map +1 -1
  176. package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
  177. package/lib/types/components/sidePanel/useSidePanel.js +39 -7
  178. package/lib/types/components/trajectory/MiniWake.d.ts +2 -2
  179. package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
  180. package/lib/types/components/trajectory/MiniWake.js +7 -3
  181. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  182. package/lib/types/components/workspaces/HomeWorkspaceRow.js +4 -7
  183. package/lib/types/dsh-adapter/backend/session.d.ts +7 -1
  184. package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
  185. package/lib/types/dsh-adapter/backend/session.js +62 -6
  186. package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
  187. package/lib/types/dsh-adapter/backend/translate.js +18 -4
  188. package/lib/types/dsh-adapter/backend-admission.d.ts +3 -3
  189. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +1 -1
  190. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
  191. package/lib/types/dsh-adapter/channel/agent-view-projection.js +3 -1
  192. package/lib/types/dsh-adapter/channel/binding-events.d.ts +5 -1
  193. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  194. package/lib/types/dsh-adapter/channel/binding-events.js +18 -1
  195. package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
  196. package/lib/types/dsh-adapter/channel/command-completions.js +6 -8
  197. package/lib/types/dsh-adapter/channel/composer-images.d.ts +11 -1
  198. package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
  199. package/lib/types/dsh-adapter/channel/composer-images.js +121 -113
  200. package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -1
  201. package/lib/types/dsh-adapter/channel/composer-mentions.js +38 -17
  202. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +1 -1
  203. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  204. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +9 -5
  205. package/lib/types/dsh-adapter/channel/core/actions.d.ts +1 -1
  206. package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
  207. package/lib/types/dsh-adapter/channel/core/actions.js +23 -2
  208. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +10 -1
  209. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
  210. package/lib/types/dsh-adapter/channel/core/binding-feed.js +48 -3
  211. package/lib/types/dsh-adapter/channel/core/compose.d.ts +5 -2
  212. package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
  213. package/lib/types/dsh-adapter/channel/core/compose.js +7 -0
  214. package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
  215. package/lib/types/dsh-adapter/channel/core/files.js +2 -1
  216. package/lib/types/dsh-adapter/channel/core/host.d.ts +14 -10
  217. package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
  218. package/lib/types/dsh-adapter/channel/core/host.js +192 -13
  219. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +1 -0
  220. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
  221. package/lib/types/dsh-adapter/channel/core/local-actions.js +32 -3
  222. package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
  223. package/lib/types/dsh-adapter/channel/extensions.js +31 -5
  224. package/lib/types/dsh-adapter/channel/input-actions.d.ts +2 -2
  225. package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
  226. package/lib/types/dsh-adapter/channel/input-actions.js +34 -0
  227. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +5 -2
  228. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  229. package/lib/types/dsh-adapter/channel/input-delivery.js +31 -4
  230. package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
  231. package/lib/types/dsh-adapter/channel/mentions.js +21 -7
  232. package/lib/types/dsh-adapter/channel/model-actions.d.ts +1 -1
  233. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
  234. package/lib/types/dsh-adapter/channel/model-actions.js +7 -1
  235. package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
  236. package/lib/types/dsh-adapter/channel/model-selection.js +6 -4
  237. package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
  238. package/lib/types/dsh-adapter/channel/paths.js +11 -9
  239. package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
  240. package/lib/types/dsh-adapter/channel/session-fork.js +1 -0
  241. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +1 -1
  242. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
  243. package/lib/types/dsh-adapter/channel/session-live-adoption.js +6 -1
  244. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
  245. package/lib/types/dsh-adapter/channel/session-metadata.js +15 -2
  246. package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
  247. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  248. package/lib/types/dsh-adapter/channel/session-reset.js +7 -1
  249. package/lib/types/dsh-adapter/channel/session-resume.d.ts +1 -1
  250. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
  251. package/lib/types/dsh-adapter/channel/session-resume.js +56 -36
  252. package/lib/types/dsh-adapter/channel/session-rewind.d.ts +1 -1
  253. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
  254. package/lib/types/dsh-adapter/channel/session-rewind.js +3 -1
  255. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +1 -1
  256. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
  257. package/lib/types/dsh-adapter/channel/session-tree-actions.js +3 -1
  258. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  259. package/lib/types/dsh-adapter/channel/settings-host.js +10 -3
  260. package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
  261. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  262. package/lib/types/dsh-adapter/channel/state.js +2 -2
  263. package/lib/types/dsh-adapter/channel/types.d.ts +13 -1
  264. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  265. package/lib/types/dsh-adapter/compat/liveSession.d.ts +3 -3
  266. package/lib/types/dsh-adapter/compat/liveSession.js +3 -3
  267. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +1 -1
  268. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
  269. package/lib/types/dsh-adapter/compat/sessionLog.js +17 -1
  270. package/lib/types/dsh-adapter/contract.d.ts +7 -5
  271. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  272. package/lib/types/dsh-adapter/contract.js +10 -5
  273. package/lib/types/dsh-adapter/effect-ledger.d.ts +1 -1
  274. package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
  275. package/lib/types/dsh-adapter/effect-ledger.js +1 -0
  276. package/lib/types/dsh-adapter/entry-slot.d.ts +6 -0
  277. package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -1
  278. package/lib/types/dsh-adapter/experimental-bundles.d.ts +29 -0
  279. package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -0
  280. package/lib/types/dsh-adapter/experimental-bundles.js +15 -0
  281. package/lib/types/dsh-adapter/grant-file.d.ts +70 -0
  282. package/lib/types/dsh-adapter/grant-file.d.ts.map +1 -0
  283. package/lib/types/dsh-adapter/grant-file.js +178 -0
  284. package/lib/types/dsh-adapter/host-access.d.ts +4 -0
  285. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
  286. package/lib/types/dsh-adapter/host-access.js +54 -4
  287. package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
  288. package/lib/types/dsh-adapter/host-contract.js +2 -2
  289. package/lib/types/dsh-adapter/host-dsh.js +3 -3
  290. package/lib/types/dsh-adapter/index.d.ts +8 -4
  291. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  292. package/lib/types/dsh-adapter/index.js +17 -12
  293. package/lib/types/dsh-adapter/panels.d.ts +28 -8
  294. package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
  295. package/lib/types/dsh-adapter/panels.js +11 -56
  296. package/lib/types/dsh-adapter/plugin-declaration.d.ts +28 -0
  297. package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -1
  298. package/lib/types/dsh-adapter/plugin-declaration.js +43 -1
  299. package/lib/types/dsh-adapter/plugin-install.d.ts +28 -1
  300. package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -1
  301. package/lib/types/dsh-adapter/plugin-install.js +160 -13
  302. package/lib/types/dsh-adapter/plugin-manage.d.ts +53 -10
  303. package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
  304. package/lib/types/dsh-adapter/plugin-manage.js +240 -51
  305. package/lib/types/dsh-adapter/plugin.d.ts +81 -0
  306. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  307. package/lib/types/dsh-adapter/plugin.js +378 -84
  308. package/lib/types/dsh-adapter/plugins-info.d.ts +6 -7
  309. package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
  310. package/lib/types/dsh-adapter/plugins-info.js +99 -31
  311. package/lib/types/dsh-adapter/presets.d.ts +19 -6
  312. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  313. package/lib/types/dsh-adapter/presets.js +69 -12
  314. package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
  315. package/lib/types/dsh-adapter/process-exit.js +1 -1
  316. package/lib/types/dsh-adapter/providerWizard.d.ts +2 -0
  317. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
  318. package/lib/types/dsh-adapter/providerWizard.js +11 -5
  319. package/lib/types/dsh-adapter/row-attachment.d.ts +30 -0
  320. package/lib/types/dsh-adapter/row-attachment.d.ts.map +1 -0
  321. package/lib/types/dsh-adapter/row-attachment.js +29 -0
  322. package/lib/types/dsh-adapter/session-tools.d.ts +34 -0
  323. package/lib/types/dsh-adapter/session-tools.d.ts.map +1 -0
  324. package/lib/types/dsh-adapter/session-tools.js +39 -0
  325. package/lib/types/dsh-adapter/settings-sections.d.ts +18 -1
  326. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
  327. package/lib/types/dsh-adapter/settings-sections.js +73 -0
  328. package/lib/types/dsh-adapter/status.d.ts +88 -1
  329. package/lib/types/dsh-adapter/status.d.ts.map +1 -1
  330. package/lib/types/dsh-adapter/status.js +318 -3
  331. package/lib/types/dsh-adapter/team-mode.d.ts +42 -33
  332. package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
  333. package/lib/types/dsh-adapter/team-mode.js +76 -112
  334. package/lib/types/dsh-adapter/worktree-tool.d.ts +27 -0
  335. package/lib/types/dsh-adapter/worktree-tool.d.ts.map +1 -0
  336. package/lib/types/dsh-adapter/worktree-tool.js +87 -0
  337. package/lib/types/extensions.d.ts +1 -1
  338. package/lib/types/extensions.d.ts.map +1 -1
  339. package/lib/types/force-production-react.js +3 -3
  340. package/lib/types/heldInputs.d.ts +36 -0
  341. package/lib/types/heldInputs.d.ts.map +1 -0
  342. package/lib/types/heldInputs.js +173 -0
  343. package/lib/types/i18n.d.ts +543 -73
  344. package/lib/types/i18n.d.ts.map +1 -1
  345. package/lib/types/i18n.js +265 -46
  346. package/lib/types/ink/colorize.d.ts +7 -1
  347. package/lib/types/ink/colorize.d.ts.map +1 -1
  348. package/lib/types/ink/colorize.js +29 -8
  349. package/lib/types/ink/components/App.d.ts +2 -1
  350. package/lib/types/ink/components/App.d.ts.map +1 -1
  351. package/lib/types/ink/components/App.js +10 -3
  352. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
  353. package/lib/types/ink/components/ScrollBox.js +1 -0
  354. package/lib/types/ink/dom.d.ts +1 -0
  355. package/lib/types/ink/dom.d.ts.map +1 -1
  356. package/lib/types/ink/hooks/use-program-status.d.ts +78 -0
  357. package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -0
  358. package/lib/types/ink/hooks/use-program-status.js +96 -0
  359. package/lib/types/ink/ink.d.ts +13 -4
  360. package/lib/types/ink/ink.d.ts.map +1 -1
  361. package/lib/types/ink/ink.js +119 -25
  362. package/lib/types/ink/output.d.ts +17 -2
  363. package/lib/types/ink/output.d.ts.map +1 -1
  364. package/lib/types/ink/output.js +85 -2
  365. package/lib/types/ink/parse-keypress.d.ts +1 -0
  366. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  367. package/lib/types/ink/parse-keypress.js +5 -4
  368. package/lib/types/ink/render-node-to-output.d.ts +2 -0
  369. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  370. package/lib/types/ink/render-node-to-output.js +79 -10
  371. package/lib/types/ink/root.d.ts +8 -0
  372. package/lib/types/ink/root.d.ts.map +1 -1
  373. package/lib/types/ink/root.js +12 -3
  374. package/lib/types/ink/screen.d.ts +11 -0
  375. package/lib/types/ink/screen.d.ts.map +1 -1
  376. package/lib/types/ink/screen.js +44 -0
  377. package/lib/types/ink/selection.d.ts +7 -2
  378. package/lib/types/ink/selection.d.ts.map +1 -1
  379. package/lib/types/ink/selection.js +187 -44
  380. package/lib/types/ink/shutdown-input.d.ts +15 -0
  381. package/lib/types/ink/shutdown-input.d.ts.map +1 -0
  382. package/lib/types/ink/shutdown-input.js +28 -0
  383. package/lib/types/ink/sixel-cursor-heal.d.ts +21 -0
  384. package/lib/types/ink/sixel-cursor-heal.d.ts.map +1 -0
  385. package/lib/types/ink/sixel-cursor-heal.js +62 -0
  386. package/lib/types/ink/sixel-graphics.d.ts +6 -0
  387. package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
  388. package/lib/types/ink/sixel-graphics.js +18 -0
  389. package/lib/types/ink/styles.d.ts +8 -1
  390. package/lib/types/ink/styles.d.ts.map +1 -1
  391. package/lib/types/ink/terminal-notification-windows.d.ts +195 -0
  392. package/lib/types/ink/terminal-notification-windows.d.ts.map +1 -0
  393. package/lib/types/ink/terminal-notification-windows.js +433 -0
  394. package/lib/types/ink/terminal-notification.d.ts +3 -1
  395. package/lib/types/ink/terminal-notification.d.ts.map +1 -1
  396. package/lib/types/ink/terminal-notification.js +4 -1
  397. package/lib/types/ink/terminal-querier.d.ts +9 -1
  398. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  399. package/lib/types/ink/terminal-querier.js +32 -1
  400. package/lib/types/ink/terminal.d.ts +23 -2
  401. package/lib/types/ink/terminal.d.ts.map +1 -1
  402. package/lib/types/ink/terminal.js +32 -2
  403. package/lib/types/ink/termio/osc.d.ts +2 -1
  404. package/lib/types/ink/termio/osc.d.ts.map +1 -1
  405. package/lib/types/ink/termio/osc.js +37 -8
  406. package/lib/types/ink/termio/osc7501.d.ts +102 -0
  407. package/lib/types/ink/termio/osc7501.d.ts.map +1 -0
  408. package/lib/types/ink/termio/osc7501.js +229 -0
  409. package/lib/types/ink/termio/tokenize.js +5 -7
  410. package/lib/types/onboardingDraft.d.ts +143 -0
  411. package/lib/types/onboardingDraft.d.ts.map +1 -0
  412. package/lib/types/onboardingDraft.js +71 -0
  413. package/lib/types/panels.d.ts +1 -1
  414. package/lib/types/panels.d.ts.map +1 -1
  415. package/lib/types/screens/AgentTranscriptScene.d.ts +3 -1
  416. package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -1
  417. package/lib/types/screens/AgentTranscriptScene.js +5 -1
  418. package/lib/types/screens/Chat.d.ts +6 -6
  419. package/lib/types/screens/Chat.d.ts.map +1 -1
  420. package/lib/types/screens/Chat.js +394 -141
  421. package/lib/types/screens/Launchpad.d.ts +8 -2
  422. package/lib/types/screens/Launchpad.d.ts.map +1 -1
  423. package/lib/types/screens/Launchpad.js +32 -12
  424. package/lib/types/screens/Onboarding.d.ts +22 -3
  425. package/lib/types/screens/Onboarding.d.ts.map +1 -1
  426. package/lib/types/screens/Onboarding.js +606 -36
  427. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  428. package/lib/types/screens/SessionSupervisor.js +31 -21
  429. package/lib/types/screens/Settings.d.ts +5 -1
  430. package/lib/types/screens/Settings.d.ts.map +1 -1
  431. package/lib/types/screens/Settings.js +528 -51
  432. package/lib/types/screens/StatusLine.d.ts +9 -3
  433. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  434. package/lib/types/screens/StatusLine.js +91 -15
  435. package/lib/types/screens/StatusMetrics.d.ts +2 -11
  436. package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
  437. package/lib/types/screens/StatusMetrics.js +20 -14
  438. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
  439. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +1 -1
  440. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +1 -1
  441. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
  442. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +13 -21
  443. package/lib/types/sessionMounts.d.ts +14 -0
  444. package/lib/types/sessionMounts.d.ts.map +1 -1
  445. package/lib/types/sessionMounts.js +20 -9
  446. package/lib/types/sessions/format.d.ts +39 -0
  447. package/lib/types/sessions/format.d.ts.map +1 -1
  448. package/lib/types/sessions/format.js +83 -0
  449. package/lib/types/sessions/resumeFailure.d.ts +4 -0
  450. package/lib/types/sessions/resumeFailure.d.ts.map +1 -1
  451. package/lib/types/sessions/resumeFailure.js +12 -4
  452. package/lib/types/sessions/workspaceCounts.d.ts +6 -0
  453. package/lib/types/sessions/workspaceCounts.d.ts.map +1 -0
  454. package/lib/types/sessions/workspaceCounts.js +24 -0
  455. package/lib/types/settings/definitions.d.ts +24 -0
  456. package/lib/types/settings/definitions.d.ts.map +1 -1
  457. package/lib/types/settings/definitions.js +40 -15
  458. package/lib/types/tips.js +2 -2
  459. package/lib/types/tuiDisplayPrefs.d.ts +113 -5
  460. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  461. package/lib/types/tuiDisplayPrefs.js +276 -14
  462. package/lib/types/update.d.ts +15 -14
  463. package/lib/types/update.d.ts.map +1 -1
  464. package/lib/types/update.js +163 -115
  465. package/lib/types/updateProcess.d.ts +28 -0
  466. package/lib/types/updateProcess.d.ts.map +1 -0
  467. package/lib/types/updateProcess.js +135 -0
  468. package/lib/types/utils/inputWordBoundary.d.ts +5 -0
  469. package/lib/types/utils/inputWordBoundary.d.ts.map +1 -0
  470. package/lib/types/utils/inputWordBoundary.js +18 -0
  471. package/lib/types/utils/keymap.d.ts +1 -1
  472. package/lib/types/utils/keymap.d.ts.map +1 -1
  473. package/lib/types/utils/keymap.js +6 -1
  474. package/lib/types/utils/paths.d.ts +15 -0
  475. package/lib/types/utils/paths.d.ts.map +1 -1
  476. package/lib/types/utils/paths.js +25 -0
  477. package/lib/types/windowsInstaller.d.ts +4 -0
  478. package/lib/types/windowsInstaller.d.ts.map +1 -0
  479. package/lib/types/windowsInstaller.js +237 -0
  480. package/locale/en.json +6 -0
  481. package/locale/zh.json +6 -0
  482. package/package.json +130 -111
  483. package/presets/liangshen/custom-bash.mjs +13 -1
  484. package/presets/liangshen/instruction-hint.mjs +4 -1
  485. package/presets/liangshen/skill-search.mjs +14 -2
  486. package/presets/winbash.mjs +16 -4
  487. package/tui-profile/feed/README.md +17 -8
  488. package/tui-profile/feed/first-party.json +1 -1
@@ -1,6 +1,10 @@
1
1
  # Interaction and Commands
2
2
 
3
3
  [Documentation index](README.md) · [简体中文](interaction.md)
4
+ `Ctrl+Q` folds running todos; while idle it hides/restores the goal/todo footer. Clicking the idle todo header hides it too. New goal/todo data or another session shows it again. Completed goals leave the footer once idle; their history remains in the Todo side panel.
5
+
6
+
7
+ Fullscreen text selection belongs to its starting pane (chat, sidebar or one diff column). Dragging diagonally across rows, double-clicking words and triple-clicking lines retain that ownership. Copy ignores gutters and joins only that pane’s soft wraps, preserving source newlines. Scrolling the other pane does not move or invalidate the selection. Divider dragging resizes without selecting text.
4
8
 
5
9
  ## Input and global shortcuts
6
10
 
@@ -16,7 +20,7 @@
16
20
  | `Ctrl+V` / `Alt+V` | Insert clipboard text or files; images are sent as durable attachments. Use `Alt+V` when the terminal intercepts `Ctrl+V` |
17
21
  | `Ctrl+G` | Edit the current input in an external editor (`$VISUAL` → `$EDITOR`); saving and quitting fills it back, `:cq`/non-zero exit keeps the draft; with neither variable set the TUI asks you to configure one (no `vi` fallback) |
18
22
  | `Ctrl+Shift+E` | Expand the fullscreen draft editor (or click the `⛶` affordance at the end of the input row): line numbers + current-line highlight + live line/char stats<br>`Enter` inserts a newline, `Ctrl+Enter` or the Send button sends, `Esc` or the Collapse button keeps the draft and returns<br>wheel-scrolls freely; click/drag/double-click selection work as in the inline prompt; remappable via `/settings` |
19
- | `Esc` | Ladder: close help → close the image preview → close the command menu → close the file menu (only the current `@` token)<br>→ **with a selection in the prompt input: only clear it (text untouched)** → with the held-queue selector open: only leave the selector → interrupt the turn and hold the queued messages (no automatic re-send, see "Message delivery semantics") → clear non-empty input → double-tap on empty input = rewind<br>in fullscreen, an active mouse selection is cleared first (not copied) |
23
+ | `Esc` | Ladder: close help → close the image preview → close the command menu → close the file menu (only the current `@` token)<br>→ with the held-queue selector open: only leave the selector → **with a selection in the prompt input: only clear it (text untouched)** → collapse the draft editor → unfold a pasted block → remove context chips → interrupt the turn and hold the queued messages (ordinary draft kept; no automatic re-send, see "Message delivery semantics") → clear non-empty idle input → double-tap on empty idle input = rewind<br>in fullscreen, an active mouse selection is cleared first (not copied) |
20
24
  | `Ctrl+Z` | Undo the prompt draft's last word-level edit (text, caret and images together). Draft-only: a submit, a history recall (`Ctrl+R`/`↑`) or a session switch ends the history; it is NOT the message/conversation rewind behind `Esc Esc`. Remappable via `/settings` |
21
25
  | `Esc` / `Ctrl+C` / `Enter` while an image preview is open | Close the preview and restore the surface underneath; other keys are not passed through |
22
26
  | `Left` / `Right` in the image modal | Previous / next image, no wrapping; caret peeks keep arrows with the prompt |
@@ -25,7 +29,7 @@
25
29
  | `Ctrl+D` | Same ladder as `Ctrl+C`: interrupt while working (press again to force-exit if the interrupt stalls); press twice while idle to exit |
26
30
  | `Ctrl+O` | Toggle transcript/verbose detail, including full reasoning and tool arguments/output; also the escape hatch for the **long-line fold** (a single line over 1000 chars is clipped to 1000 with a `… N chars folded` marker — see the user guide §5). Clicking the folded row (or the tool card face) toggles it too |
27
31
  | `Ctrl+P` | Toggle the loaded-context panel shown at startup (while it is on screen) |
28
- | `Ctrl+B` | Side panel, three states: closed → open and focus the right column; open with the chat focused → focus the right column; panel focused → close and return to the chat. Splits only under `fullscreen` at a content width of ≥93 columns; on narrow terminals and in inline mode the key does nothing (`/jobs` & co. keep their full-screen panels — see the user guide §2.8) |
32
+ | `Ctrl+B` | Side panel, three states: closed → open and focus the right column; open with the chat focused → focus the right column; panel focused → close and return to the chat. Splits only under `fullscreen` at a content width of ≥93 columns; on narrow terminals and in inline mode the key does nothing (`/jobs` & co. keep their full-screen panels — see the user guide §2.8); with the panel focused, `↑`/`↓`/`PgUp`/`PgDn` go to the active panel (jobs selects and scrolls, todo scrolls a long goal with `↑`/`↓`) |
29
33
  | `Alt+Z` | Zoom the active side panel (the chat column keeps its minimum width); press again to restore |
30
34
  | `Ctrl+T` | Open the trajectory scene (same as `/trace`); `q`/`Esc` returns to the conversation |
31
35
  | `Ctrl+R` | Open input-history search; repeat or press `Down` for the next result |
@@ -118,9 +122,10 @@ results back to the chat screen and add no new behavior.
118
122
  jobs`; update detected → `Update available`; usage milestone reached and never starred → `Feed us a
119
123
  star`; fallback `Help`). Full screens opened from the launchpad (sessions & workspaces / settings /
120
124
  background jobs / the family tree / the wizard) render **above the launchpad** — `Esc` closes them
121
- back onto the launchpad (draft, params and focus intact); **the only way off the launchpad into the
122
- chat is submitting a non-command line with Enter**. Overlays on the launchpad side (pickers, the
123
- command palette) are a **clean cutout** — every cell in the overlay rect is space-filled (host
125
+ back onto the launchpad (draft, params and focus intact); there are two ways off the launchpad into
126
+ the chat: submit a non-command line with Enter, or press `Shift+Enter` (`Option+Enter`) in the input
127
+ to carry the unsent draft over and start a new line at the caret. Overlays on the launchpad side
128
+ (pickers, the command palette) are a **clean cutout** — every cell in the overlay rect is space-filled (host
124
129
  glyphs never bleed through), yet no background color is emitted (no white block; Kitty splash
125
130
  art still shows through the terminal-default cells; the chat page's pickers are unaffected).
126
131
  - **Tips line**: click to rotate (three tips cycle; the first-run tip has top priority and never rotates);
@@ -139,10 +144,16 @@ results back to the chat screen and add no new behavior.
139
144
  and opens the same kernel picker (keyboard path =
140
145
  focus ring + `Enter`). Every row ends flush at the same right edge, the cwd plate is top-aligned to the
141
146
  first row, and narrow terminals truncate per the existing truncate-middle contract.
142
- - **Wizard**: `←`/`→` change step (except the effort slider in step 3 and a drilled-in model list, where the
143
- horizontal keys belong to the child control), `Tab` switches between the language/theme and
144
- model/effort/workspace panes, `↑`/`↓` move the selection; `Enter` runs the step (step 1 = re-check
145
- connectivity, step 3 = drill into a provider / switch model / open the workspace picker — **effort is not
147
+ - **Wizard**: `←`/`→` change step (except step 3's effort slider, a drilled-in model list and step 1's
148
+ access sub-layer, where the horizontal keys belong to the child control), `Tab` switches between the language/theme and
149
+ model/effort/workspace panes, `↑`/`↓` move the selection; `Enter` runs the step (step 1 = act on the
150
+ focused action row — sign in to a subscription / add a provider (API key) / check again / skip this step;
151
+ both sign-in and key entry ride the shared question panel, which takes over the whole terminal and then
152
+ remounts the guide exactly where it was (progress lives in `src/onboardingDraft.ts`); after a sign-in
153
+ with several new models an inline default picker (single choice) appears: `↑`/`↓` move, `Enter` sets the
154
+ default, the last row "Keep the current model" leaves it alone, and `Esc` means the same and only pops
155
+ that layer. Step 3 = drill into a provider /
156
+ switch model / open the workspace picker — **effort is not
146
157
  on Enter**, it is `←`/`→` only and applies as you move); the theme pane previews on cursor move while the
147
158
  **language pane applies on `Enter`**; `Enter` on the last step finishes and records the guide when the
148
159
  focused card is a shortcut card, and tries the command when it is a command card; `Esc` skips
@@ -157,12 +168,12 @@ results back to the chat screen and add no new behavior.
157
168
  | Key | Behavior |
158
169
  | --- | --- |
159
170
  | `Left/Right` | Move by character; **with a selection, collapse to the corresponding edge** |
160
- | `Ctrl+Left/Right` | Move by word |
171
+ | `Ctrl+Left/Right` / `Alt/Option+Left/Right` | Move by whitespace-delimited words; also supported on the launchpad |
161
172
  | `Home/End` | Move to the start/end of the current logical line |
162
173
  | `Ctrl+A` / `Ctrl+E` | `Ctrl+A` opens the subagent dashboard (`Mod+A` in the editor still moves to line start); `Ctrl+E` moves to line end and also expands or folds hidden older rows in long transcripts |
163
- | `Ctrl+U` | Delete before the caret |
174
+ | `Ctrl+U` | Delete to the current line start, preserving text to the right; also supported in the focused launchpad input, with image chips removed whole |
164
175
  | `Ctrl+K` | Delete after the caret |
165
- | `Ctrl+W` | Delete the preceding word |
176
+ | `Ctrl+W` / `Alt/Option+Backspace` | Delete the preceding word; staged image attachments are removed whole |
166
177
  | `Backspace` / `Delete` | Delete the character before / after the caret; **with a selection, delete the whole selection** |
167
178
  | Typing | **Replaces an active selection** (standard editor semantics), caret after the inserted text |
168
179
 
@@ -242,6 +253,9 @@ Type `@` at **any position** of the message to open file completion.
242
253
  - Keep typing to filter; `Tab`/`Enter` to pick; directories can be entered further.
243
254
  - Plain fragments match **fuzzily** — `@ment` matches `src/utils/mentions.ts` (prefix/boundary and short-path boosts).
244
255
  - Path-shaped queries (`@src/`, `@./`, `@../`, `@~/`, `@D:\`, or anything containing a separator) read **only that directory** for local completion.
256
+ - `~/` and `~\` expand to home at **any depth** (`@~/a/b/c` names the same directory as `@<home>/a/b/c`); the two spellings are equivalent, and a non-Windows terminal expands `~\` before completing too.
257
+ - `~user/` is **not** expanded (it is a literal path); when the current directory really has a child named `~`, `@~/…` still expands to home (shell semantics) — use `@./~/…` for the literal directory.
258
+ - Completion and the attachment produced on send share the same expansion: a `~/` path the menu can list resolves through the same home path.
245
259
  - `Esc` closes only the current `@` token's menu; async refreshes keep your selected candidate.
246
260
  - Text files and directory listings are attached as text; PNG, JPEG, WebP, and GIF files are sent as durable Harness image blocks.
247
261
  - Reads use the active workspace filesystem, including provider-owned workspaces.
@@ -323,10 +337,22 @@ While the model is working, three paths have different placement:
323
337
  with the draft right away.
324
338
  - When a turn ends normally, queued messages still flow into the next turn;
325
339
  `Ctrl+C` keeps the queue.
326
- - Only messages the backend confirmed as withdrawn are held. With an older
340
+ - On `Esc`, only messages the backend confirmed as withdrawn are held. With an older
327
341
  Claude CLI that cannot withdraw them, or when the withdrawal request fails,
328
342
  the backend still runs them next turn; dsh-TUI stops holding them, says so,
329
343
  and never sends them twice.
344
+ - Messages the DSH kernel dropped without running them (the session ended
345
+ unexpectedly, or the kernel discarded them) are held as "not delivered";
346
+ Claude and Codex still report such losses as discarded, so those are not
347
+ held. Held messages are never re-sent by themselves and stay for the next
348
+ session; on DSH, a message submitted after the session ended is held the
349
+ same way. While the session
350
+ is ended `⏎` sends nothing: `/new` starts a new session and `⏎` sends them
351
+ there, or `/restart` resumes this one (only text survives a restart).
352
+ Images attached to a held message stay with it into the next session. A held
353
+ message taken back with `↑` while the session is ended is an ordinary draft
354
+ again, and a draft's images do not survive `/new`: to keep the images,
355
+ run `/new` first and edit there.
330
356
 
331
357
  ## Session workflows
332
358
 
@@ -465,7 +491,8 @@ completes, and may reply with a summary toast.
465
491
 
466
492
  `/btw <question>` asks a quick side question without disturbing the main task: it reuses
467
493
  the current session context (system prompt + existing history) for a single **tool-less,
468
- one-turn** model call, and shows the answer in a scrollable panel.
494
+ one-turn** model call, and shows the answer in a scrollable panel (the sidebar panel, or
495
+ an overlay in the conversation).
469
496
 
470
497
  Notes:
471
498
 
@@ -473,7 +500,7 @@ Notes:
473
500
  and never reaches the main context or token counts (closing the panel discards it).
474
501
  - **Never interrupts the running turn**: it can be triggered while the model is streaming; the main task keeps going.
475
502
  - Inside the panel: `↑`/`↓` scroll, `Space`/`Enter`/`Esc` dismiss, `c` copies the answer; `Esc` cancels while the answer is still pending.
476
- - The sidebar panel (when the panel column is open) has two layers: the default **reading layer** — `←`/`→` switch panels, `↑`/`↓` move the **selection** between turns, `PgUp`/`PgDn` page, `n` starts a new topic, `s` sends the **selected** turn's answer to the main composer (press `s` again to take it back), `c` copies the selected turn's answer; `Enter`/`Tab` (or a click on the input) enters the **editing layer** (`Esc` leaves one layer at a time: editing first, draft kept), where `←`/`→` move the caret first and, once the caret sits at the start/end, the same key falls through and switches panels again, while `↑` goes straight back up to the titles.
503
+ - The sidebar panel (when the panel column is open) has two layers: the default **reading layer** — `←`/`→` switch panels, `↑`/`↓` move the **selection** between turns, `PgUp`/`PgDn` page, `n` starts a new topic, `s` sends the **selected** turn's answer to the main composer (press `s` again to take it back), `c` copies the selected turn's answer; `Enter`/`Tab` (or a click on the input) enters the **editing layer** (`Esc` leaves one layer at a time: editing first, draft kept), where `←`/`→` move the caret first and, once the caret sits at the start/end, the same key falls through and switches panels again, while `↑` goes straight back up to the titles. In the editing layer `Ctrl+V`/`Alt+V` pastes clipboard text at the caret (terminal-native paste works too, flattened to one line), and it always lands in the btw composer — with the column focused, paste **never** writes into the main draft below. A clipboard holding an image or files is refused with "not pastable as text".
477
504
  - The sidebar's bottom hint line **follows the layer** (the panel advertises it, the host only stitches it): with the cursor in the **list** it says `↑/↓ select · s to chat · c copy` (or `s unsend` for the attached turn); with the cursor in the **input** it drops s/c (there `s` is just a letter) and says `↑ select` instead. An empty thread advertises nothing there. The input box keeps only an `Enter to ask` placeholder.
478
505
  - The selection shows itself in exactly two ways: the title's **text** is inverted (not the whole row) and the terminal cursor parks on that row — so `↑`/`↓` visibly walks the native caret between titles. Both are hidden while the cursor sits in the main input or the side composer: they mean "the list owns the keyboard". **Clicking a title row** moves the selection there too.
479
506
  - Scrolling only happens when it must: a target title already inside the viewport scrolls nothing at all; one outside it scrolls just far enough to **exactly reveal** that row (flush to the top edge when walking up, flush to the bottom edge when walking down).
@@ -481,6 +508,8 @@ Notes:
481
508
  - Clicking the **message area** (question or answer text) only hands the column focus to the panel, exactly like clicking anywhere else in it — it never injects anything; `s` is the only way in.
482
509
  - The `⤢` full-screen scene shares the sidebar's keys and selection state (both read the same thread store); the only difference is that after sending it steps aside and returns you to the main composer.
483
510
  - Triggering `/btw` again aborts the previous side question.
511
+ - **Which surface shows the answer** follows whether the split can actually render: under `fullscreen` at a content width of ≥93 columns, with `sidePanel.splitEnabled` on, no fullscreen draft editor open, and the btw panel enabled, it goes to the sidebar panel; otherwise it falls back to an overlay in the conversation. One exchange never shows in two places; when the split comes back, the overlay only yields while the sidebar is actually showing the **btw** panel — a split parked on another panel leaves the overlay where it is. When another overlay or fullscreen view owns the screen, the question is still sent, but the only feedback is a notice (the fullscreen draft editor covers that notice).
512
+ - An open side-question overlay yields to a main-task questionnaire or the fullscreen draft editor. Answering the questionnaire or collapsing the editor restores the side question according to the current layout, preserving the running side question and editor draft. While the questionnaire is visible, `Enter` answers it.
484
513
 
485
514
  ### Trajectory scene (/trace / Ctrl+T)
486
515
 
@@ -637,6 +666,7 @@ In inline mode, the terminal emulator owns native scrollback and selection.
637
666
  - **Double/triple click** — Select and copy a word/line (exception: the
638
667
  `scrollGutter: scrollbar` track is a drag target, so multi-clicks there no longer select a line).
639
668
  - **`Esc`** — Cancel an active drag (or an existing selection) without copying.
669
+ - **Code blocks** — A body-anchored selection joins soft-wrapped rows without frame padding or extra newlines, for light and full frames. Hard line breaks and hard-line insets keep their existing screen-copy behavior; this is not a byte-for-byte source export.
640
670
  - **Single-click a message row** — Plain text rows (user/assistant) do nothing — the
641
671
  transcript is a reading surface, selection is the mouse's job there.
642
672
  - **Single-click a tool card / thinking / compact summary** — Expand / collapse (header
@@ -717,6 +747,7 @@ When the model invokes the questionnaire tool, its panel temporarily owns the ke
717
747
  | `Esc` (from question 1) | Cancel the whole batch; the model receives `ASK_CANCELLED` |
718
748
  | `Ctrl+C` | Cancel the whole batch from any question; the model receives `ASK_CANCELLED` (a harness-side abort still reports `ASK_ABORTED`) |
719
749
  | `Ctrl+K` | Fold/unfold the ask_user_question questionnaire panel (the ask keeps waiting; while folded, `Esc`/`Ctrl+C` expand first) |
750
+ | `Alt+Up` / `Alt+Down` | Page through question text and details inside their fixed-height area without moving the answer focus; remappable in `/settings` → `Shortcuts`. Fullscreen also supports the wheel over the body |
720
751
 
721
752
  The last row is a free-form input line:
722
753
 
@@ -750,8 +781,9 @@ in the review panel (the dedicated decision layout for `intent: plan-review`):
750
781
  ## Tool approval
751
782
 
752
783
  When the permission layer issues an `approval/request`, the approval panel shows the tool
753
- name, the full command extracted from the paired tool call, and the reason. It temporarily
754
- owns the keyboard (when a questionnaire is also pending, approval takes priority):
784
+ name and previews the paired tool call's command and reason. Very short terminals use a
785
+ compact layout with the full preview in a fixed-height area. The panel temporarily owns
786
+ the keyboard (when a questionnaire is also pending, approval takes priority):
755
787
 
756
788
  | Key | Behavior |
757
789
  | --- | --- |
@@ -759,6 +791,7 @@ owns the keyboard (when a questionnaire is also pending, approval takes priority
759
791
  | `1` / `2` | Allow (this time only) / deny |
760
792
  | `Enter` | Submit the focused item |
761
793
  | `Esc` / `Ctrl+C` | Deny (fail closed) |
794
+ | `Alt+Up` / `Alt+Down` | Page through the full preview in a compact approval panel on very short terminals without moving the choice focus; fullscreen also supports the wheel over the preview |
762
795
 
763
796
  The protocol offers only "allow once / deny" — there is **no "always allow"**.
764
797
 
@@ -1,6 +1,10 @@
1
1
  # 交互与命令
2
2
 
3
3
  [文档索引](README.md) · [English](interaction.en.md)
4
+ `Ctrl+Q` 在运行中折叠待办;空闲时隐藏/恢复目标与待办底部面板,也可点击空闲待办标题隐藏。新目标/待办数据或切换会话后重新显示。已完成目标在空闲后退出底部面板,历史仍可在 Todo 侧栏查看。
5
+
6
+
7
+ 全屏文本选区属于起始栏(聊天、侧栏或 diff 的一侧)。跨行对角拖选、双击选词和三击选行保持同一归属。复制跳过装饰列,只拼接该栏软换行,保留原文硬换行。另一栏滚动不移动或失效当前选区;分隔线拖动只调整宽度。
4
8
 
5
9
  ## 输入与全局快捷键
6
10
 
@@ -17,7 +21,7 @@
17
21
  | `Ctrl+G` | 用外部编辑器(`$VISUAL` → `$EDITOR`)编辑当前输入,保存退出后回填;`:cq` 或非零退出保留原稿;未设置变量时提示配置,无 `vi` 兜底 |
18
22
  | `Ctrl+Shift+E` | 展开全屏草稿编辑器(也可点输入行尾 `⛶`):行号 + 当前行高亮 + 行/字统计,`Enter` 换行、`Ctrl+Enter` 或「发送」按钮发送、`Esc` 或「收起」按钮收起(草稿保留);滚轮自由滚动、点击定位/拖选/双击选词与输入框一致;可经 `/settings` 重映射 |
19
23
  | `Ctrl+Z` | 撤销输入框草稿的上一步「词级」编辑(文本、光标、图片一起回退)。只作用于草稿:提交、历史召回(`Ctrl+R`/`↑`)或换会话后即结束;`Esc Esc` 的会话/消息回溯与它不是一回事。可经 `/settings` 重映射 |
20
- | `Esc` | 层级:关帮助 → 关图片预览 → 关命令菜单 → 关文件菜单(仅当前 `@` token)→ **输入框内有选区时仅清选区(文本不动)** → 排队选择器开着时仅退出选择器 → 中断回合并暂存排队消息(不自动重发,见「消息投递语义」)→ 有输入时清空 → 空输入连续两次 = 时间回溯 rewind;fullscreen 下有鼠标选区时优先取消选区(不复制) |
24
+ | `Esc` | 层级:关帮助 → 关图片预览 → 关命令菜单 → 关文件菜单(仅当前 `@` token)→ 排队选择器开着时仅退出选择器 → **输入框内有选区时仅清选区(文本不动)** → 收起草稿编辑器 → 展开粘贴折叠块 → 移除上下文附件 → 中断回合并暂存排队消息(保留普通草稿,不自动重发,见「消息投递语义」)→ 空闲有输入时清空 → 空闲空输入连续两次 = 时间回溯 rewind;fullscreen 下有鼠标选区时优先取消选区(不复制) |
21
25
  | 图片预览打开时 `Esc` / `Ctrl+C` / `Enter` | 关闭预览,恢复下层界面;其余按键不透传 |
22
26
  | 图片弹窗中的 `←` / `→` | 上一张 / 下一张;首尾不循环,临时光标预览不抢输入框方向键 |
23
27
  | `←`(输入框为空) | 打开会话管理界面;DSH 内核会先把当前会话转入后台,Claude/Codex 内核保持当前会话运行 |
@@ -25,7 +29,7 @@
25
29
  | `Ctrl+D` | 与 `Ctrl+C` 同阶梯:工作中=中断(未收敛时再按=强制退出);空闲时连续两次退出 |
26
30
  | `Ctrl+O` | 切换 transcript/verbose 详情,展开思考与完整工具参数/输出;也是**超长单行折叠**(单行 > 1000 字符裁到 1000 + `… 已折叠 N 字符` 标记,见 user guide §5)的展开逃生门——鼠标点被折叠的那一行(或工具卡卡面)同样能展开/收起 |
27
31
  | `Ctrl+P` | 切换启动时加载的 loaded-context 面板(面板在屏时有效) |
28
- | `Ctrl+B` | 侧栏三态:未开 → 打开并聚焦右栏;已开且焦点在聊天 → 聚焦右栏;焦点在右栏 → 关闭并回聊天。仅 fullscreen 且内容区 ≥93 列可分栏,窄屏与 inline 下此键不生效(`/jobs` 等仍走整屏面板,见用户指南 §2.8) |
32
+ | `Ctrl+B` | 侧栏三态:未开 → 打开并聚焦右栏;已开且焦点在聊天 → 聚焦右栏;焦点在右栏 → 关闭并回聊天。仅 fullscreen 且内容区 ≥93 列可分栏,窄屏与 inline 下此键不生效(`/jobs` 等仍走整屏面板,见用户指南 §2.8);聚焦右栏后 `↑`/`↓`/`PgUp`/`PgDn` 交给活动面板(jobs 选择与滚动,todo 用 `↑`/`↓` 滚动长目标) |
29
33
  | `Alt+Z` | 缩放当前侧栏面板(聊天列保留最小宽度),再按恢复 |
30
34
  | `Ctrl+T` | 打开轨迹场景(等同 `/trace`);场景内 `q`/`Esc` 返回对话 |
31
35
  | `Ctrl+R` | 打开输入历史搜索;重复按或 `Down` 移到下一项 |
@@ -97,8 +101,9 @@
97
101
  历史会话与工作区合并成一个入口)· `设置`(`/settings`)· `内核 · <当前内核>`(`/kernel`,打开内核选择器,见「命令」一节)· **条件位**(优先级:有后台任务在跑 →
98
102
  `后台任务`;检测到新版本 → `有新版本`;用量到档且从未 star → `投喂一颗 Star`;兜底 `帮助`)。
99
103
  从落地页打开的整屏界面(会话与工作区 / 设置 / 后台任务 / 家谱 / 引导向导)都**盖在落地页之上**,
100
- `Esc` 退出回到落地页(草稿/参数/焦点原样保留);**离开落地页进对话页的唯一方式是回车提交一条
101
- 非命令消息**。落地页这一侧的浮层(选择器/命令面板)是**干净的镂空**——矩形内空格占位
104
+ `Esc` 退出回到落地页(草稿/参数/焦点原样保留);离开落地页进对话页有两条路:**回车提交一条
105
+ 非命令消息**,或输入框里按 `Shift+Enter`(`Option+Enter`)带着未发送的草稿进对话页、在光标处换行。
106
+ 落地页这一侧的浮层(选择器/命令面板)是**干净的镂空**——矩形内空格占位
102
107
  遮掉宿主屏的字形(绝不重影)、不发背景色(无白底;Kitty 立绘图像仍从终端默认背景透出;
103
108
  聊天页同款选择器不受影响)。
104
109
  - **Tips 行**:可点击轮换(三条 Tips 循环;首启那一句优先级最高、不参与轮换),键盘路径 = 焦点环 + `Enter`;
@@ -112,9 +117,13 @@
112
117
  「检测中…」;**登录状态不进铭牌**——要切内核时在选择器里看(未登录行可选,副标题标注「未登录」)。
113
118
  整块可点,打开同一个内核选择器(键盘路径 = 焦点环 + `Enter`)。
114
119
  各行右端贴齐同一条右边界,左下目录铭牌与第一行顶对齐,窄屏按既有 truncate-middle 截断。
115
- - **引导向导**:`←`/`→` 换步骤(例外:第三步的强度区、以及已钻进去的模型列表,横向键归子控件,不换步骤)、
120
+ - **引导向导**:`←`/`→` 换步骤(例外:第三步的强度区、已钻进去的模型列表,以及第一步的
121
+ 接入子层——横向键归子控件/子层,不换步骤)、
116
122
  `Tab` 在「语言 / 主题」与「模型 / 强度 / 工作区」两组面板间切、`↑`/`↓` 移动选择;
117
- `Enter` 执行这一步(第一步 = 重新检查连通性,第三步 = 钻进 provider / 换模型 / 打开工作区选择器——**强度不走 Enter**,只用 `←`/`→` 调且移动即生效);
123
+ `Enter` 执行这一步(第一步 = 落在动作行上:登录订阅账号 / 添加模型提供方(API key)/ 重新检查 / 跳过这一步——
124
+ 登录与加 key 都用共享问答面板,**面板挂起时向导让出整屏、回答后原步骤原样回来**(进度记在
125
+ `src/onboardingDraft.ts`);登录后若有多个新模型,进入内联选默认层(单选):`↑`/`↓` 移动、
126
+ `Enter` 设为默认,末尾「保持当前模型」不动默认,`Esc` 与它同义、只退这一层。第三步 = 钻进 provider / 换模型 / 打开工作区选择器——**强度不走 Enter**,只用 `←`/`→` 调且移动即生效);
118
127
  主题面板移动光标即预览,**语言面板要 `Enter` 才生效**;最后一步的 `Enter` 在**键位卡**上「完成」并记账,
119
128
  在命令卡上则是「试一下」;`Esc` 跳过(**不记账**,下次启动再问)。
120
129
  - **鼠标**(落地页这一屏恒启用鼠标跟踪):落地页的快捷入口(悬停 = 文字变主题蓝加粗,移开复原)、
@@ -126,12 +135,12 @@
126
135
  | 按键 | 行为 |
127
136
  | --- | --- |
128
137
  | `Left/Right` | 按字符移动光标;**有选区时坍缩到选区对应边缘** |
129
- | `Ctrl+Left/Right` | 按单词移动 |
138
+ | `Ctrl+Left/Right` / `Alt/Option+Left/Right` | 按空白分隔的单词移动;启动页也支持 |
130
139
  | `Home/End` | 移到当前逻辑行首/行尾 |
131
140
  | `Ctrl+A` / `Ctrl+E` | `Ctrl+A` 打开子代理面板(编辑器内 `Mod+A` 仍移到行首);`Ctrl+E` 移到行尾,还会展开或折叠长会话中隐藏的旧消息 |
132
- | `Ctrl+U` | 删除光标前内容 |
141
+ | `Ctrl+U` | 删除光标至当前行首,保留右侧文字;启动页输入框聚焦时也支持,图片 chip 整体删除 |
133
142
  | `Ctrl+K` | 删除光标后内容 |
134
- | `Ctrl+W` | 删除前一个单词 |
143
+ | `Ctrl+W` / `Alt/Option+Backspace` | 删除前一个单词;已暂存的图片附件整体删除 |
135
144
  | `Backspace` / `Delete` | 删前一 / 后一字符;**有选区时删除整个选区** |
136
145
  | 打字 | **有选区时替换整个选区**,光标落在插入文本之后 |
137
146
 
@@ -214,6 +223,9 @@ Bracketed paste(右键或终端原生粘贴)保留普通文本与换行。
214
223
  - 输入即过滤,`Tab`/`Enter` 选择,目录可继续深入。
215
224
  - 普通片段走**模糊匹配**(`@ment` 命中 `src/utils/mentions.ts`;前缀/边界命中优先,短路径优先)。
216
225
  - 路径形态(`@src/`、`@./`、`@../`、`@~/`、`@D:\` 或含分隔符)只读**该目录**,不全仓扫描。
226
+ - `~/` 与 `~\` 展开到 home,且**逐级深入到任意层**(`@~/a/b/c` 与 `@<home>/a/b/c` 指向同一个目录);两种写法同义,非 Windows 终端也把 `~\` 展开后再补全。
227
+ - `~user/` **不展开**(按字面路径处理);当前目录里确实有名为 `~` 的目录时,`@~/…` 仍按 home 展开(与 shell 一致),要引用字面目录用 `@./~/…`。
228
+ - 补全与发送时的附加走同一套展开:菜单里能列出的 `~/` 路径,附加解析用的是同一个 home 路径。
217
229
  - `Esc` 只关当前 `@` token 的菜单。
218
230
  - 异步候选刷新时按候选身份保持当前选中项。
219
231
 
@@ -314,8 +326,13 @@ Bracketed paste(右键或终端原生粘贴)保留普通文本与换行。
314
326
  消息继续暂存,不会和草稿合并发出。
315
327
  - `Ctrl+Enter`(有草稿时)中断当前回合,连同暂存消息一起立即发送。
316
328
  - 回合正常结束时,排队消息照常进入下一回合;`Ctrl+C` 中断时保留队列。
317
- - 只有后端确认已撤回的消息才会暂存。旧版 Claude CLI 不支持撤回,或撤回请求失败时,这些
329
+ - `Esc` 中断时,只有后端确认已撤回的消息才会暂存。旧版 Claude CLI 不支持撤回,或撤回请求失败时,这些
318
330
  消息仍由后端在下一回合执行,dsh-TUI 不再暂存它们并给出提示,不会重复发送。
331
+ - 会话意外结束、或 DSH 内核自行丢弃的消息显示为「未送达」暂存(Claude 与 Codex 后端目前把这类丢失
332
+ 记为「已丢弃」,不暂存),不会自动重发,并且会留到下一个会话;在 DSH 上,会话结束后再提交的消息
333
+ 也同样暂存。会话结束时 `⏎` 不发送,`/new` 开新会话后
334
+ 再按 `⏎`,或用 `/restart` 恢复本会话(跨重启只保留文字)。消息附带的图片随暂存消息留到下一个会话;
335
+ 但会话结束时按 `↑` 取回编辑的消息会变回普通草稿,草稿里的图片在 `/new` 时不保留,要带图片就先 `/new` 再编辑。
319
336
 
320
337
  ## 会话工作流
321
338
 
@@ -457,11 +474,11 @@ Windows `dsh-tui.cmd --resume` 使用 `~/.dsh-tui/resume.txt` 中最后选择的
457
474
  `/btw <问题>` 发起一次不打扰主任务的快速侧问。
458
475
 
459
476
  - 复用当前会话上下文(system prompt + 已有历史)。
460
- - 做一次**无工具、单轮**的模型调用,答案显示在可滚动的浮层面板里。
477
+ - 做一次**无工具、单轮**的模型调用,答案显示在可滚动的面板(侧栏面板或聊天流里的浮层)里。
461
478
  - **不进会话历史**:问答不写入 session log,也不会出现在主上下文与 token 计数里(关闭面板即消失)。
462
479
  - **不打断主回合**:模型正在流式输出时也可以触发,主任务继续运行。
463
480
  - 面板内 `↑`/`↓` 滚动,`Space`/`Enter`/`Esc` 关闭,`c` 复制答案;等待答案时 `Esc` 取消。
464
- - 侧栏面板形态(面板列展开时)分两层:默认**阅读层**——`←`/`→` 切面板、`↑`/`↓` 在轮之间移动**选中**、`PgUp`/`PgDn` 翻页、`n` 新话题、`s` 把**选中轮**的答案送进主输入框(再按一次 `s` = 撤回)、`c` 复制选中轮的答案;`Enter`/`Tab`(或点击输入框)进**编辑层**(`Esc` 逐层退出:先退编辑、草稿保留),编辑层里 `←`/`→` 先移光标,光标贴到行首/行尾后再按同一个键就交回宿主切面板,`↑` 则直接回到标题(列表)。
481
+ - 侧栏面板形态(面板列展开时)分两层:默认**阅读层**——`←`/`→` 切面板、`↑`/`↓` 在轮之间移动**选中**、`PgUp`/`PgDn` 翻页、`n` 新话题、`s` 把**选中轮**的答案送进主输入框(再按一次 `s` = 撤回)、`c` 复制选中轮的答案;`Enter`/`Tab`(或点击输入框)进**编辑层**(`Esc` 逐层退出:先退编辑、草稿保留),编辑层里 `←`/`→` 先移光标,光标贴到行首/行尾后再按同一个键就交回宿主切面板,`↑` 则直接回到标题(列表)。编辑层里 `Ctrl+V`/`Alt+V` 把剪贴板文本粘到光标处(终端原生粘贴同样可用,多行压成一行),落点始终是 btw 输入框——光标在右栏时粘贴**不会**写进下面的主草稿;剪贴板是图片/文件时只提示「不能作为文字粘贴」。
465
482
  - 侧栏那行底栏提示**按层换**(面板自己广告、宿主只拼):光标在**列表**里说 `↑/↓ 选择 · s 送聊天 · c 复制`(已附加的那一轮说 `s 撤回`),光标在**输入框**里则不说 s/c(那里 `s` 只是打字),改说 `↑ 选择`;空线程没有可选的轮,这一段不画。输入框里只留一句 `Enter 提问` 占位。
466
483
  - 选中的标记只有两点:标题**文字**反色(不铺满整行),以及终端光标停在那一行(所以按 `↑`/`↓` 时原生光标的拖尾是在标题之间上下走)。光标在主输入框或侧栏输入框里时两者都不显示——它表示的是「列表正拿着键盘」。**点标题行**也能把选中挪到那一轮。
467
484
  - 滚动只在必要时发生:目标标题已经在视口里就一行都不滚;走出视口才滚,而且只滚到**恰好露出**这一行(往上走贴视口顶、往下走贴视口底)。
@@ -469,6 +486,8 @@ Windows `dsh-tui.cmd --resume` 使用 `~/.dsh-tui/resume.txt` 中最后选择的
469
486
  - 点**消息区**(问题/答案正文)跟点面板其它地方一样,只把列焦点交给面板,不会注入任何东西——注入只有 `s` 一个入口。
470
487
  - `⤢` 全屏场景与侧栏面板同一套键位与选中态(线程 store 共享),区别只是送完聊天后整屏场景让位、回到主输入框。
471
488
  - 再次触发 `/btw` 会中止上一个侧问。
489
+ - 答案落在**哪块屏**由分栏能不能渲出来决定:`fullscreen`、内容区 ≥93 列、`sidePanel.splitEnabled` 开着、没展开整屏草稿编辑器,且 btw 面板已启用时进侧栏面板;否则退到聊天流里的浮层。同一个问答只在一处显示;分栏回来时,只有侧栏正在显示 **btw** 面板,浮层才让位(侧栏停在别的面板上时浮层留在原处)。屏被别的浮层或整屏界面占着时,侧问照常发出,但只在通知通道里说一句——整屏草稿编辑器会盖住这条提示。
490
+ - 已打开的侧问浮层会让位给后来到达的主任务问卷或全屏草稿编辑器;回答问卷或收起编辑器后按当前布局恢复侧问,不取消在途侧问,也不清空编辑器草稿。问卷上屏时,`Enter` 回答问卷。
472
491
 
473
492
  ### 轨迹场景(/trace / Ctrl+T)
474
493
 
@@ -645,6 +664,7 @@ dsh-tui 不修改 `~/.claude/settings.json`;会话启动时若其中的 `ANTHR
645
664
  - **双击/三击**:选择单词/整行并复制。
646
665
  - `scrollGutter: scrollbar` 的轨道例外:轨道是拖拽目标,其上多击不再选行。
647
666
  - **`Esc`**:取消正在进行的拖拽(或现有选区),不复制。
667
+ - **代码块**:从正文开始拖选时,light 与 full 代码框的软换行直接拼接,不额外复制边框内边距或换行。硬换行与硬行行首间距保留既有屏幕复制行为,不提供逐字节源码导出。
648
668
  - **单击消息行**:纯文本行(用户/assistant)无操作——转录是阅读区,鼠标职责是选字。
649
669
  - **单击工具卡 / thinking / compact 摘要**:展开 / 收起(hover 时标题提亮指示,行右侧空白不触发)。
650
670
  - **单击子代理卡**:打开该子代理的详情场景(hover 时状态符号提亮)。
@@ -712,6 +732,7 @@ dsh-tui 不修改 `~/.claude/settings.json`;会话启动时若其中的 `ANTHR
712
732
  | `Esc`(第 1 题) | 取消整批提问,模型收到 `ASK_CANCELLED` |
713
733
  | `Ctrl+C` | 从任意题取消整批提问,模型收到 `ASK_CANCELLED`(harness 侧中止仍报 `ASK_ABORTED`) |
714
734
  | `Ctrl+K` | 折叠/展开 ask_user_question 问卷面板 |
735
+ | `Alt+Up` / `Alt+Down` | 在固定高度区域内翻阅问题正文和说明,保留回答焦点;可在 `/settings` → `Shortcuts` 改键。全屏可在正文区域使用滚轮 |
715
736
 
716
737
  **最后一行是自由输入行**:
717
738
 
@@ -751,7 +772,7 @@ dsh-tui 不修改 `~/.claude/settings.json`;会话启动时若其中的 `ANTHR
751
772
 
752
773
  权限层发起 `approval/request` 时,审批面板暂时拥有键盘(同时挂起问卷时审批优先)。
753
774
 
754
- - 显示工具名、从配对 tool call 提取的完整命令与原因。
775
+ - 显示工具名、从配对 tool call 提取的命令与原因预览;极矮终端自动压缩间距,并在固定高度区域保留完整预览。
755
776
 
756
777
  | 按键 | 行为 |
757
778
  | --- | --- |
@@ -759,6 +780,7 @@ dsh-tui 不修改 `~/.claude/settings.json`;会话启动时若其中的 `ANTHR
759
780
  | `1` / `2` | 允许(仅本次)/ 拒绝 |
760
781
  | `Enter` | 提交当前焦点项 |
761
782
  | `Esc` / `Ctrl+C` | 拒绝(fail closed) |
783
+ | `Alt+Up` / `Alt+Down` | 在极矮终端的紧凑审批面板中翻阅完整预览,不移动选项焦点;全屏可在预览区域使用滚轮 |
762
784
 
763
785
  协议只有「允许一次 / 拒绝」两种结果,**没有「总是允许」**。
764
786
 
@@ -36,10 +36,22 @@ reference**, not a promise:
36
36
 
37
37
  | Tier | Seams |
38
38
  | --- | --- |
39
- | Stable candidate (shape frozen; breaking changes go through a minor-version deprecation warning before removal) | VI settings sections · VIII full-screen scenes · X managed dialogs · XI status line · XII keyboard shortcuts · XIII entry renderers |
39
+ | Stable candidate (shape frozen; breaking changes go through a minor-version deprecation warning before removal) | VI settings sections · VIII full-screen scenes · X managed dialogs · XI status line (+ footer fields via `setField`) · XII keyboard shortcuts · XIII entry renderers |
40
40
  | Experimental (may still shift with dsh-std / the TUI Profile) | IX decision events · toast notifications (`ctx.tuiToast`, new) · **Side panels (`ctx.tuiPanels`, full panel + compact row, experimental)** |
41
41
  | Upstream-tracked (stability owned by the cordis / dsh mechanisms underneath) | I session events · II official prompt slots · III bundled skills · IV themes · V system-prompt sections · VII profile composition |
42
42
 
43
+ **Footer fields (an addition to seam XI)**: `ctx.tuiStatus.setField(key, text,
44
+ options?)` joins one keyed text cell into the footer's existing left/right
45
+ groups (three slots — `left-tail` / `right-head` / `right-tail` — with an
46
+ optional hover detail and a fullscreen-only click) without adding a row;
47
+ `/settings → statusBar.pluginFields` turns every plugin field off at once, and
48
+ `statusBar.pluginFieldsOrder` lets the user tick fields individually and order
49
+ them by slot group: `build,ci;git;pet` — three groups, three slots, and a
50
+ **listed field follows its group** (overriding the declared slot). Once the user
51
+ pins a list, fields registered later stay hidden until ticked.
52
+ Contract, rule table, and example: seam XI "footer fields" in the
53
+ [admission & development guide](../tui-profile/docs/plugin-admission-and-development.md).
54
+
43
55
  Also an experimental public surface:
44
56
 
45
57
  - `@deepseek-harness-tui/dsh-tui/api` (types-only entry).
@@ -57,6 +69,22 @@ Also an experimental public surface:
57
69
  requires the `panels.chat.attach` grant (a later version) and currently
58
70
  always returns `false` with a one-time hint. Types live at
59
71
  `@deepseek-harness-tui/dsh-tui/panels` and `./api`.
72
+ Panel bodies can use `ui.Markdown` / `ui.CodeBlock` (experimental, narrowed
73
+ wrappers): the first takes a markdown string, the second raw code plus an
74
+ optional language tag (fence length, language-tag sanitising and syntax
75
+ highlighting are the host's job). `ui.Markdown` keeps chat parity: the host
76
+ first strips `<commit_analysis>` / `<context>` / `<function_analysis>` /
77
+ `<pr_analysis>` tag blocks (inside code fences too), while `ui.CodeBlock`
78
+ skips that pass and keeps the raw code line for line. Four limits: ① **no
79
+ highlighting on the first frame** (`cli-highlight` loads asynchronously,
80
+ same as host prose);
81
+ ② panels are **not selectable/copyable** (the whole sidebar column is
82
+ `noSelect`; a copy capability is a separate proposal); ③ block `$$` math
83
+ **follows the user's `mathRendering` setting** (an image when the terminal
84
+ supports graphics); inline math never becomes an image and stays Unicode;
85
+ ④ keep the body content **unchanged** to hit `React.memo` (strings compare
86
+ by value, so a fresh string with the same content still hits; only changed
87
+ content re-runs formatting and layout, while lexing is cached by content).
60
88
  - The `@deepseek-harness-tui/dsh-tui/test-utils` subpath and
61
89
  `ctx.tuiPluginHost.grants.corrupt` were removed in the adapter layering
62
90
  refactor (#705).
@@ -94,9 +122,12 @@ Also an experimental public surface:
94
122
  for the current write and stops subsequent grants and the retry; exemptions
95
123
  already written remain. **Known gaps**:
96
124
  provenance is only a one-vote-to-veto seam with no online check at all (the
97
- host service exposes no such API), and with no service the transcript reports
98
- the CLI command and the reason instead of **running `dsh plugin` on the user's
99
- behalf** (no pane opens: there is no flow to drive).
125
+ host service exposes no such API; the clause and its six evidence levels are
126
+ written up in the [admission and development
127
+ guide](https://github.com/ccch1mneyyy/dsh-TUI/blob/main/tui-profile/docs/plugin-admission-and-development.md)), and with no
128
+ service the transcript reports the CLI command and the reason instead of
129
+ **running `dsh plugin` on the user's behalf** (no pane opens: there is no flow
130
+ to drive).
100
131
  - **Lifecycle actions are available in the terminal itself (C-5)**: `/plugin remove
101
132
  <bundle>`, `/plugin enable <name|id>` and `/plugin disable <name|id>` go through the
102
133
  same host service. **A bundle and a row are two levels**: a bundle is a composition
@@ -120,11 +151,28 @@ Also an experimental public surface:
120
151
  installed package sources: local and Git packages can claim the same name and version,
121
152
  so an exact feed match cannot waive confirmation when enabling. These actions have **no
122
153
  cancellation**: the service offers none, so `esc` only closes the pane while the write
123
- finishes and reports itself into the transcript (same session). **Known gaps**: a
124
- removal deletes no user data — `~/.dsh-tui/backends/<id>/`, grants and storage
125
- namespaces are **reported once** and left for the person to delete; when a package's
126
- declaration cannot be read, the flow says it could not judge rather than claiming the
127
- removal was clean.
154
+ finishes and reports itself into the transcript (same session).
155
+ - **Grants follow the lifecycle**: the `/plugin install` confirmation lists the
156
+ package's declared permissions and `Enter` writes the grant before installing
157
+ (rolling it back on a failed install); a registry package's declaration only
158
+ becomes readable after it lands, so a `grant` step follows a successful install.
159
+ `enable` grants the declaration before writing the profile, `disable` revokes the
160
+ permissions that component declared after switching it off, and `remove` deletes
161
+ the component's `grants`/`denies` entries after the removal — grants are keyed by
162
+ component id, so leaving them behind lets a later package reusing that id inherit
163
+ them silently; a reinstall therefore asks again. A failed grant write never blocks
164
+ an install or enable, it is reported instead. The grant matrix stays hand-editable
165
+ (`~/.dsh-tui/extension-grants.json`; the writer and reader share one strict parser,
166
+ and a corrupt file is refused rather than repaired). A write takes a sibling
167
+ `extension-grants.json.lock` (the same lock the profile's atomic writes use), so
168
+ a second TUI instance cannot lose a revoke/forget between the read and the rename.
169
+ On a terminal too short for a
170
+ permission row, the list folds to a count or the key hint carries the count; the
171
+ package identity and keys stay visible. **Known gaps**: a removal
172
+ deletes no user data — `~/.dsh-tui/backends/<id>/`, storage namespaces and the
173
+ effect ledger are **reported once by source** and left for the person to delete;
174
+ when a package's declaration cannot be read, the flow says it could not judge
175
+ rather than claiming the removal was clean.
128
176
  - `grants` is now the narrower `HostGrantFacade`; see that PR for migration
129
177
  details.
130
178
  - On `TuiSceneProps.channel` (`ChannelUi`), `minimal` / `setMinimal()` were
@@ -150,8 +198,12 @@ Also an experimental public surface:
150
198
  first frames use the auto-detected palette. The root-capability guard is
151
199
  the same as under `dsh --profile`: a row activating after the first TUI row
152
200
  cannot use `ctx.root` capabilities (`root.plugin`, `root.effect`,
153
- `root.on`, …) in its apply. A plugin that waits for something in its apply
154
- holds the composition: start long work detached, not awaited. On a scene's
201
+ `root.on`, …) in its apply. The one exception is the upstream-declared
202
+ root-owned `invocation` accessor, which the host materializes when it
203
+ installs the guard so a later official Remote service still constructs; a
204
+ plugin still cannot call `ctx.root` itself. A plugin that waits for
205
+ something in its apply holds the composition: start long work detached, not
206
+ awaited. On a scene's
155
207
  `TuiSceneProps.channel`, `ready` is `false` (and `status` `'starting'`)
156
208
  while no session stands behind the channel, e.g. after the startup session
157
209
  failed to open (`startupFailure`).
@@ -31,12 +31,20 @@
31
31
 
32
32
  | 分级 | 接缝 |
33
33
  | --- | --- |
34
- | 稳定候选(形态冻结;如有破坏性变更,先在次版本弃用告警再移除) | 六 设置区块 · 八 全屏场景 · 十 托管对话框 · 十一 状态行 · 十二 键盘快捷键 · 十三 条目渲染器 |
34
+ | 稳定候选(形态冻结;如有破坏性变更,先在次版本弃用告警再移除) | 六 设置区块 · 八 全屏场景 · 十 托管对话框 · 十一 状态行(+ 底栏字段 `setField`) · 十二 键盘快捷键 · 十三 条目渲染器 |
35
35
  | 实验性(仍可能随 dsh-std / TUI Profile 演进调整) | 九 决策事件 · toast 通知(`ctx.tuiToast`,新增) · **侧栏 Panel(`ctx.tuiPanels`,full 面板与 compact 行,实验性)** |
36
36
  | 跟随上游(稳定性由 cordis / dsh 官方机制决定) | 一 会话事件 · 二 官方 prompt 槽位 · 三 技能打包 · 四 主题 · 五 system prompt 段 · 七 profile 组合 |
37
37
 
38
38
  另:
39
39
 
40
+ - **底栏插件字段(接缝十一的加法)**:`ctx.tuiStatus.setField(key, text,
41
+ options?)` 把一段键控文本并进底栏既有的左右组(`left-tail` /
42
+ `right-head` / `right-tail` 三槽,可选 hover 详情与全屏点击),不新增行;
43
+ `/settings → statusBar.pluginFields` 可一键关掉全部插件字段,另有
44
+ `statusBar.pluginFieldsOrder` 让用户逐字段启停、按「槽组」排序:
45
+ `build,ci;git;pet` 三组即三槽,**列进名单的字段跟随所在组**(覆盖插件声明的槽)。
46
+ 用户把名单固定后,之后新注册的字段默认不出现,直到用户勾选。契约、规则表与
47
+ 示例见[准入与开发指南](../tui-profile/docs/plugin-admission-and-development.md)接缝十一「底栏字段」。
40
48
  - `@deepseek-harness-tui/dsh-tui/api`(纯类型入口)为实验性公开面。
41
49
  - **preset 内的行(实验性,接缝七)**:bundle 用 `@deepseek-harness-tui/dsh-tui/preset-patch`
42
50
  行改 dsh-TUI 注册的 preset 里某一行的 `config`(例如关掉 `standard` 的
@@ -49,6 +57,17 @@
49
57
  descriptor、尚不挂载渲染**;`sendToChat` 需要 `panels.chat.attach`
50
58
  授权(后续版本),当前恒返回 `false` 并提示一次。类型见
51
59
  `@deepseek-harness-tui/dsh-tui/panels` 与 `./api`。
60
+ 面板正文可用 `ui.Markdown` / `ui.CodeBlock`(实验性,收窄包装):前者收一段
61
+ markdown 字符串,后者收原始代码与可选语言标签(围栏长度、语言标签清洗与
62
+ 语法高亮由宿主负责)。`ui.Markdown` 与聊天正文同一口径:宿主会先剥离
63
+ `<commit_analysis>` / `<context>` / `<function_analysis>` / `<pr_analysis>`
64
+ 标签块(代码围栏内也会);`ui.CodeBlock` 不做这层剥离,原始代码逐行保留。
65
+ 四条限制:① **首帧无语法高亮**(`cli-highlight` 异步
66
+ 加载完成后补上,与宿主正文同理);② 面板**不可选择/复制**(侧栏整列
67
+ `noSelect`,复制能力位另议);③ 块级 `$$` 公式**跟随用户的 `mathRendering`
68
+ 偏好**(终端支持图形时走图片),行内公式不走图片、仍排成 Unicode;④ 正文
69
+ 内容**保持不变**才能命中 `React.memo`(字符串按值比较,内容相同的新字符串
70
+ 一样命中;只有内容变化才重跑格式化与排版,分词按内容缓存)。
52
71
  - `@deepseek-harness-tui/dsh-tui/test-utils` 子路径与
53
72
  `ctx.tuiPluginHost.grants.corrupt` 已随 adapter 分层重构(#705)移除。
54
73
  - **后端贡献族(`tui.dsh/v1alpha1` `Backend`,接缝十四)的公开面已随第一版 apiVersion 冻结**:类型面
@@ -69,7 +88,9 @@
69
88
  已进入应用阶段而来不及时则等待安装完成。构建脚本被拦时在面板里批准,
70
89
  版本不兼容可登记 **精确版本豁免**;登记期间取消会等待当前写入、停止后续登记和重试,
71
90
  已写入的豁免保留。**已知缺口**:provenance 只留了「一票否决」的缝、
72
- 没有任何在线校验(宿主服务不暴露这类 API);服务缺席时由转录给出 CLI 命令与原因
91
+ 没有任何在线校验(宿主服务不暴露这类 API;条款与六档 evidence 的写法见
92
+ [准入与开发指南](https://github.com/ccch1mneyyy/dsh-TUI/blob/main/tui-profile/docs/plugin-admission-and-development.md)的「供应链证据与
93
+ provenance」);服务缺席时由转录给出 CLI 命令与原因
73
94
  (不弹面板:没有可驱动的流程),**不在 TUI 内代跑 `dsh plugin`**。
74
95
  - **生命周期动作已在终端里可用(C-5)**:`/plugin remove <bundle>`、`/plugin enable
75
96
  <名称|id>`、`/plugin disable <名称|id>` 走同一套宿主服务。**bundle 与行是两级语义**:
@@ -84,9 +105,20 @@
84
105
  `unaddressable`)则两个方向都拒,并原样转述上游的理由。**任何 `enable` 与 `remove` 都要确认**(卸载列出它会动的行数与覆盖数),
85
106
  `disable` 只对宿主层自己的行问一句(关掉它会卸载本应用注入的服务)。宿主不提供
86
107
  已装包的来源证明,本地或 Git 包也能声明嫡系的名称与版本,因此即使命中 feed 也不能免确认。这些动作**没有取消面**:
87
- 服务不提供,Esc 只关面板,写入照旧跑完并(在同一会话里)把结果写进转录。**已知缺口**:
88
- 卸载不删用户数据——`~/.dsh-tui/backends/<id>/`、grants、存储命名空间只**报告一次**,由
89
- 用户自己决定删不删;包内声明读不到时明说「判断不了」,不制造「已清理」的假象。
108
+ 服务不提供,Esc 只关面板,写入照旧跑完并(在同一会话里)把结果写进转录。
109
+ - **授权跟着生命周期走**:`/plugin install` 的确认页列出包内声明的权限,`Enter` 先写授权
110
+ 再安装(失败回滚);registry 包在装上后才读得到声明,装成功后补一个「授予」步骤。
111
+ `enable` 在写入 profile 前按声明授予,`disable` 在关闭后撤销该组件声明过的权限,`remove`
112
+ 在卸载后删除该组件的 `grants`/`denies` 条目——授权以 component id 为键,留着会被后来
113
+ 复用同一 id 的包静默继承,因此重新安装后需要再授权一次。写授权失败不阻塞安装或启用,
114
+ 只会在转录里说明;授权矩阵仍可直接手改(`~/.dsh-tui/extension-grants.json`,写入器与
115
+ 读取器共用同一套严格解析,损坏即拒写)。写入会取同目录的 `extension-grants.json.lock`
116
+ (与 profile 原子写同一把锁),多实例的读-改-写因此串行,不会丢掉 revoke/forget。
117
+ 终端高度不足以放下一行权限时,清单折成
118
+ 计数或把计数放进按键提示;包名与按键提示始终保留。
119
+ **已知缺口**:卸载不删用户数据——`~/.dsh-tui/backends/<id>/`、存储命名空间与效果台账
120
+ 保留并按来源逐项**报告一次**,由用户自己决定删不删;包内声明读不到时明说「判断不了」,
121
+ 不制造「已清理」的假象。
90
122
  - `grants` 收窄为 `HostGrantFacade`,迁移细节见该 PR。
91
123
  - `TuiSceneProps.channel`(`ChannelUi`)上的 `minimal` / `setMinimal()` 已更名为
92
124
  `minimalUi` / `setMinimalUi()`;旧名保留为 **deprecated 别名**,读写同一个
@@ -103,8 +135,10 @@
103
135
  已挂载的界面上(主题、面板、状态视图等实时加入)。用户选定的运行时主题在其插件
104
136
  注册后生效,此前的首帧用自动检测的配色。根能力守卫与 `dsh --profile` 一致:在首个
105
137
  TUI 行之后激活的行,apply 里不能用 `ctx.root` 的能力(`root.plugin`、
106
- `root.effect`、`root.on` 等)。apply 里等待会拖住组合:耗时工作脱离 apply 启动、
107
- 不要 await。场景的 `TuiSceneProps.channel` 在没有会话撑着时(例如启动会话打开失败,
138
+ `root.effect`、`root.on` 等)。上游声明为 root 所有的 `invocation` accessor 是唯一例外:
139
+ 宿主在装守卫时先物化它,之后的官方 Remote 服务因此仍能构造;插件自己调用 `ctx.root` 依旧被拒。
140
+ apply 里等待会拖住组合:耗时工作脱离 apply 启动、不要 await。场景的
141
+ `TuiSceneProps.channel` 在没有会话撑着时(例如启动会话打开失败,
108
142
  见 `startupFailure`)`ready` 为 `false`、`status` 为 `'starting'`。
109
143
  - **Claude 与 Codex 内核**(轻量 profile;Claude 已验收,Codex 走同一条组合路径但尚未验收):入口在首帧之后组合本包的行与 profile 声明的
110
144
  第三方 bundle,不含 `@deepseek-ai/dsh-base`,规则同上条。`inject` 里有只由 DSH 核心