@deepseek-harness-tui/dsh-tui 0.16.0 → 0.17.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 (401) hide show
  1. package/README.md +214 -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/claude-backend.en.md +8 -0
  20. package/guide/dsh-tui-guide/claude-backend.md +5 -0
  21. package/guide/dsh-tui-guide/cli.en.md +114 -0
  22. package/guide/dsh-tui-guide/cli.md +114 -0
  23. package/guide/dsh-tui-guide/configuration.en.md +6 -5
  24. package/guide/dsh-tui-guide/configuration.md +6 -5
  25. package/guide/dsh-tui-guide/getting-started.en.md +44 -10
  26. package/guide/dsh-tui-guide/getting-started.md +31 -9
  27. package/guide/dsh-tui-guide/interaction.en.md +22 -10
  28. package/guide/dsh-tui-guide/interaction.md +18 -8
  29. package/guide/dsh-tui-guide/plugins.en.md +35 -4
  30. package/guide/dsh-tui-guide/plugins.md +23 -2
  31. package/guide/dsh-tui-guide/user-guide.en.md +30 -23
  32. package/guide/dsh-tui-guide/user-guide.md +29 -22
  33. package/lib/settings.json +83 -40
  34. package/lib/types/adapter/channel/plugins.d.ts.map +1 -1
  35. package/lib/types/adapter/channel/plugins.js +8 -0
  36. package/lib/types/adapter/channel/ui-policy.d.ts +1 -1
  37. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  38. package/lib/types/adapter/channel/ui-policy.js +3 -0
  39. package/lib/types/adapter/ports/channel-display.d.ts +10 -0
  40. package/lib/types/adapter/ports/channel-display.d.ts.map +1 -1
  41. package/lib/types/adapter/ports/channel-session.d.ts +2 -0
  42. package/lib/types/adapter/ports/channel-session.d.ts.map +1 -1
  43. package/lib/types/adapter/ports/channel-settings.d.ts +20 -0
  44. package/lib/types/adapter/ports/channel-settings.d.ts.map +1 -1
  45. package/lib/types/adapter/ports/channel-ui.d.ts +17 -2
  46. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  47. package/lib/types/adapter/ports/channel-view.d.ts +8 -1
  48. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  49. package/lib/types/adapter/ports/channel.d.ts +7 -0
  50. package/lib/types/adapter/ports/channel.d.ts.map +1 -1
  51. package/lib/types/agent/capabilities.d.ts +2 -0
  52. package/lib/types/agent/capabilities.d.ts.map +1 -1
  53. package/lib/types/agent/events.d.ts +8 -0
  54. package/lib/types/agent/events.d.ts.map +1 -1
  55. package/lib/types/api.d.ts +2 -2
  56. package/lib/types/api.d.ts.map +1 -1
  57. package/lib/types/backends/claude/translate/events.d.ts.map +1 -1
  58. package/lib/types/backends/claude/translate/events.js +2 -1
  59. package/lib/types/backends/codex/auth/status.js +1 -1
  60. package/lib/types/backends/codex/session/controls.d.ts.map +1 -1
  61. package/lib/types/backends/codex/session/controls.js +6 -5
  62. package/lib/types/backends/codex/session/goals.d.ts.map +1 -1
  63. package/lib/types/backends/codex/session/side-query.d.ts.map +1 -1
  64. package/lib/types/backends/codex/translate/events.d.ts.map +1 -1
  65. package/lib/types/backends/codex/translate/events.js +3 -1
  66. package/lib/types/backends/shared/channel-tokens.d.ts.map +1 -1
  67. package/lib/types/backends/shared/channel-tokens.js +9 -8
  68. package/lib/types/channel/history-restore.d.ts.map +1 -1
  69. package/lib/types/channel/history-restore.js +2 -0
  70. package/lib/types/channel/interaction.d.ts.map +1 -1
  71. package/lib/types/channel/interaction.js +1 -0
  72. package/lib/types/channel/projection.d.ts +1 -1
  73. package/lib/types/channel/projection.d.ts.map +1 -1
  74. package/lib/types/channel/projection.js +19 -4
  75. package/lib/types/channel/questions.d.ts +2 -0
  76. package/lib/types/channel/questions.d.ts.map +1 -1
  77. package/lib/types/channel/sanitize.d.ts +14 -0
  78. package/lib/types/channel/sanitize.d.ts.map +1 -1
  79. package/lib/types/channel/sanitize.js +55 -0
  80. package/lib/types/channel/working-directory.d.ts +9 -0
  81. package/lib/types/channel/working-directory.d.ts.map +1 -0
  82. package/lib/types/channel/working-directory.js +7 -0
  83. package/lib/types/commands.d.ts +8 -1
  84. package/lib/types/commands.d.ts.map +1 -1
  85. package/lib/types/commands.js +13 -4
  86. package/lib/types/components/ChatTitle.d.ts +7 -0
  87. package/lib/types/components/ChatTitle.d.ts.map +1 -0
  88. package/lib/types/components/ChatTitle.js +15 -0
  89. package/lib/types/components/CodeBlockFrame.d.ts.map +1 -1
  90. package/lib/types/components/CodeBlockFrame.js +10 -5
  91. package/lib/types/components/CompactionStatusRow.d.ts.map +1 -1
  92. package/lib/types/components/CompactionStatusRow.js +24 -3
  93. package/lib/types/components/GoalTodoPanel.d.ts +3 -1
  94. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  95. package/lib/types/components/GoalTodoPanel.js +2 -2
  96. package/lib/types/components/Markdown.d.ts +9 -1
  97. package/lib/types/components/Markdown.d.ts.map +1 -1
  98. package/lib/types/components/Markdown.js +5 -4
  99. package/lib/types/components/MessageList.d.ts.map +1 -1
  100. package/lib/types/components/MessageList.js +17 -12
  101. package/lib/types/components/PromptInput.d.ts +13 -5
  102. package/lib/types/components/PromptInput.d.ts.map +1 -1
  103. package/lib/types/components/PromptInput.js +189 -107
  104. package/lib/types/components/SplitDiffView.d.ts.map +1 -1
  105. package/lib/types/components/SplitDiffView.js +232 -22
  106. package/lib/types/components/SubagentDetailScene.d.ts +3 -1
  107. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  108. package/lib/types/components/SubagentDetailScene.js +5 -1
  109. package/lib/types/components/Whale.d.ts.map +1 -1
  110. package/lib/types/components/Whale.js +8 -5
  111. package/lib/types/components/approvals/ApprovalPanel.d.ts +1 -1
  112. package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
  113. package/lib/types/components/approvals/ApprovalPanel.js +93 -11
  114. package/lib/types/components/bigfont.d.ts.map +1 -1
  115. package/lib/types/components/bigfont.js +2 -1
  116. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  117. package/lib/types/components/messages/AssistantToolUseMessage.js +13 -6
  118. package/lib/types/components/previewRows.d.ts +19 -0
  119. package/lib/types/components/previewRows.d.ts.map +1 -0
  120. package/lib/types/components/previewRows.js +46 -0
  121. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  122. package/lib/types/components/questions/AskUserQuestionPanel.js +75 -10
  123. package/lib/types/components/sessions/ForeignSessionRow.d.ts +3 -9
  124. package/lib/types/components/sessions/ForeignSessionRow.d.ts.map +1 -1
  125. package/lib/types/components/sessions/ForeignSessionRow.js +6 -10
  126. package/lib/types/components/sessions/SessionListRow.d.ts +4 -9
  127. package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
  128. package/lib/types/components/sessions/SessionListRow.js +18 -10
  129. package/lib/types/components/sidePanel/InfoPanel.d.ts.map +1 -1
  130. package/lib/types/components/sidePanel/InfoPanel.js +4 -3
  131. package/lib/types/components/sidePanel/SidePanelLayout.d.ts.map +1 -1
  132. package/lib/types/components/sidePanel/SidePanelLayout.js +5 -5
  133. package/lib/types/components/sidePanel/WorkspacePanel.d.ts.map +1 -1
  134. package/lib/types/components/sidePanel/WorkspacePanel.js +19 -7
  135. package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
  136. package/lib/types/components/sidePanel/builtinPanels.js +22 -16
  137. package/lib/types/components/sidePanel/companion/CompanionPanel.d.ts.map +1 -1
  138. package/lib/types/components/sidePanel/companion/CompanionPanel.js +2 -1
  139. package/lib/types/components/sidePanel/panelMarkdown.d.ts +32 -0
  140. package/lib/types/components/sidePanel/panelMarkdown.d.ts.map +1 -0
  141. package/lib/types/components/sidePanel/panelMarkdown.js +45 -0
  142. package/lib/types/components/sidePanel/pluginPanelAdapter.d.ts.map +1 -1
  143. package/lib/types/components/sidePanel/pluginPanelAdapter.js +6 -1
  144. package/lib/types/components/sidePanel/subagentFailureRead.d.ts +21 -0
  145. package/lib/types/components/sidePanel/subagentFailureRead.d.ts.map +1 -0
  146. package/lib/types/components/sidePanel/subagentFailureRead.js +66 -0
  147. package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
  148. package/lib/types/components/sidePanel/useSidePanel.js +24 -6
  149. package/lib/types/components/trajectory/MiniWake.d.ts +2 -2
  150. package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -1
  151. package/lib/types/components/trajectory/MiniWake.js +7 -3
  152. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  153. package/lib/types/components/workspaces/HomeWorkspaceRow.js +4 -7
  154. package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
  155. package/lib/types/dsh-adapter/backend/translate.js +11 -1
  156. package/lib/types/dsh-adapter/backend-admission.d.ts +3 -3
  157. package/lib/types/dsh-adapter/channel/binding-events.d.ts +5 -1
  158. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  159. package/lib/types/dsh-adapter/channel/binding-events.js +18 -1
  160. package/lib/types/dsh-adapter/channel/command-completions.d.ts.map +1 -1
  161. package/lib/types/dsh-adapter/channel/command-completions.js +6 -8
  162. package/lib/types/dsh-adapter/channel/composer-images.d.ts +9 -1
  163. package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
  164. package/lib/types/dsh-adapter/channel/composer-images.js +111 -111
  165. package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -1
  166. package/lib/types/dsh-adapter/channel/composer-mentions.js +16 -10
  167. package/lib/types/dsh-adapter/channel/core/actions.d.ts +1 -1
  168. package/lib/types/dsh-adapter/channel/core/actions.d.ts.map +1 -1
  169. package/lib/types/dsh-adapter/channel/core/actions.js +23 -2
  170. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +4 -1
  171. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
  172. package/lib/types/dsh-adapter/channel/core/binding-feed.js +13 -2
  173. package/lib/types/dsh-adapter/channel/core/compose.d.ts +4 -1
  174. package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
  175. package/lib/types/dsh-adapter/channel/core/compose.js +2 -0
  176. package/lib/types/dsh-adapter/channel/core/files.d.ts.map +1 -1
  177. package/lib/types/dsh-adapter/channel/core/files.js +2 -1
  178. package/lib/types/dsh-adapter/channel/core/host.d.ts +14 -10
  179. package/lib/types/dsh-adapter/channel/core/host.d.ts.map +1 -1
  180. package/lib/types/dsh-adapter/channel/core/host.js +192 -13
  181. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts +1 -0
  182. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
  183. package/lib/types/dsh-adapter/channel/core/local-actions.js +32 -3
  184. package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
  185. package/lib/types/dsh-adapter/channel/extensions.js +31 -5
  186. package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
  187. package/lib/types/dsh-adapter/channel/input-actions.js +4 -0
  188. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +4 -1
  189. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  190. package/lib/types/dsh-adapter/channel/input-delivery.js +24 -1
  191. package/lib/types/dsh-adapter/channel/model-actions.d.ts +1 -1
  192. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
  193. package/lib/types/dsh-adapter/channel/model-actions.js +7 -1
  194. package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
  195. package/lib/types/dsh-adapter/channel/model-selection.js +6 -4
  196. package/lib/types/dsh-adapter/channel/session-fork.d.ts.map +1 -1
  197. package/lib/types/dsh-adapter/channel/session-fork.js +1 -0
  198. package/lib/types/dsh-adapter/channel/session-metadata.d.ts.map +1 -1
  199. package/lib/types/dsh-adapter/channel/session-metadata.js +15 -2
  200. package/lib/types/dsh-adapter/channel/session-reset.d.ts +1 -1
  201. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  202. package/lib/types/dsh-adapter/channel/session-reset.js +4 -0
  203. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
  204. package/lib/types/dsh-adapter/channel/session-resume.js +46 -33
  205. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  206. package/lib/types/dsh-adapter/channel/settings-host.js +10 -3
  207. package/lib/types/dsh-adapter/channel/state.d.ts +1 -1
  208. package/lib/types/dsh-adapter/channel/state.d.ts.map +1 -1
  209. package/lib/types/dsh-adapter/channel/state.js +2 -2
  210. package/lib/types/dsh-adapter/channel/types.d.ts +13 -1
  211. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  212. package/lib/types/dsh-adapter/compat/liveSession.d.ts +3 -3
  213. package/lib/types/dsh-adapter/compat/liveSession.js +3 -3
  214. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +1 -1
  215. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
  216. package/lib/types/dsh-adapter/compat/sessionLog.js +17 -1
  217. package/lib/types/dsh-adapter/contract.d.ts +6 -5
  218. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  219. package/lib/types/dsh-adapter/contract.js +7 -5
  220. package/lib/types/dsh-adapter/effect-ledger.d.ts +1 -1
  221. package/lib/types/dsh-adapter/effect-ledger.d.ts.map +1 -1
  222. package/lib/types/dsh-adapter/effect-ledger.js +1 -0
  223. package/lib/types/dsh-adapter/experimental-bundles.d.ts +26 -0
  224. package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -0
  225. package/lib/types/dsh-adapter/experimental-bundles.js +11 -0
  226. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
  227. package/lib/types/dsh-adapter/host-access.js +4 -0
  228. package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
  229. package/lib/types/dsh-adapter/host-contract.js +2 -2
  230. package/lib/types/dsh-adapter/host-dsh.js +3 -3
  231. package/lib/types/dsh-adapter/host-entry.js +5 -3
  232. package/lib/types/dsh-adapter/index.d.ts +8 -4
  233. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  234. package/lib/types/dsh-adapter/index.js +9 -7
  235. package/lib/types/dsh-adapter/install/pnpm-profile-add.d.ts.map +1 -1
  236. package/lib/types/dsh-adapter/install/pnpm-profile-add.js +9 -3
  237. package/lib/types/dsh-adapter/panels.d.ts +21 -7
  238. package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
  239. package/lib/types/dsh-adapter/panels.js +11 -56
  240. package/lib/types/dsh-adapter/plugin.d.ts +81 -0
  241. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  242. package/lib/types/dsh-adapter/plugin.js +318 -70
  243. package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
  244. package/lib/types/dsh-adapter/plugins-info.js +65 -10
  245. package/lib/types/dsh-adapter/presets.d.ts +15 -6
  246. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  247. package/lib/types/dsh-adapter/presets.js +51 -12
  248. package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
  249. package/lib/types/dsh-adapter/process-exit.js +1 -1
  250. package/lib/types/dsh-adapter/session-tools.d.ts +34 -0
  251. package/lib/types/dsh-adapter/session-tools.d.ts.map +1 -0
  252. package/lib/types/dsh-adapter/session-tools.js +39 -0
  253. package/lib/types/dsh-adapter/settings-sections.d.ts +18 -1
  254. package/lib/types/dsh-adapter/settings-sections.d.ts.map +1 -1
  255. package/lib/types/dsh-adapter/settings-sections.js +73 -0
  256. package/lib/types/dsh-adapter/status.d.ts +88 -1
  257. package/lib/types/dsh-adapter/status.d.ts.map +1 -1
  258. package/lib/types/dsh-adapter/status.js +318 -3
  259. package/lib/types/dsh-adapter/team-mode.d.ts +42 -33
  260. package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
  261. package/lib/types/dsh-adapter/team-mode.js +76 -112
  262. package/lib/types/extensions.d.ts +1 -1
  263. package/lib/types/extensions.d.ts.map +1 -1
  264. package/lib/types/force-production-react.js +3 -3
  265. package/lib/types/i18n.d.ts +195 -52
  266. package/lib/types/i18n.d.ts.map +1 -1
  267. package/lib/types/i18n.js +96 -30
  268. package/lib/types/ink/colorize.d.ts +7 -1
  269. package/lib/types/ink/colorize.d.ts.map +1 -1
  270. package/lib/types/ink/colorize.js +29 -8
  271. package/lib/types/ink/components/App.d.ts +2 -1
  272. package/lib/types/ink/components/App.d.ts.map +1 -1
  273. package/lib/types/ink/components/App.js +10 -3
  274. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
  275. package/lib/types/ink/components/ScrollBox.js +1 -0
  276. package/lib/types/ink/dom.d.ts +1 -0
  277. package/lib/types/ink/dom.d.ts.map +1 -1
  278. package/lib/types/ink/hooks/use-program-status.d.ts +78 -0
  279. package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -0
  280. package/lib/types/ink/hooks/use-program-status.js +96 -0
  281. package/lib/types/ink/ink.d.ts +13 -4
  282. package/lib/types/ink/ink.d.ts.map +1 -1
  283. package/lib/types/ink/ink.js +119 -25
  284. package/lib/types/ink/output.d.ts +17 -2
  285. package/lib/types/ink/output.d.ts.map +1 -1
  286. package/lib/types/ink/output.js +85 -2
  287. package/lib/types/ink/parse-keypress.d.ts +1 -0
  288. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  289. package/lib/types/ink/parse-keypress.js +5 -4
  290. package/lib/types/ink/render-node-to-output.d.ts +2 -0
  291. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  292. package/lib/types/ink/render-node-to-output.js +79 -10
  293. package/lib/types/ink/root.d.ts +8 -0
  294. package/lib/types/ink/root.d.ts.map +1 -1
  295. package/lib/types/ink/root.js +12 -3
  296. package/lib/types/ink/screen.d.ts +11 -0
  297. package/lib/types/ink/screen.d.ts.map +1 -1
  298. package/lib/types/ink/screen.js +44 -0
  299. package/lib/types/ink/selection.d.ts +7 -2
  300. package/lib/types/ink/selection.d.ts.map +1 -1
  301. package/lib/types/ink/selection.js +187 -44
  302. package/lib/types/ink/shutdown-input.d.ts +15 -0
  303. package/lib/types/ink/shutdown-input.d.ts.map +1 -0
  304. package/lib/types/ink/shutdown-input.js +28 -0
  305. package/lib/types/ink/sixel-cursor-heal.d.ts +21 -0
  306. package/lib/types/ink/sixel-cursor-heal.d.ts.map +1 -0
  307. package/lib/types/ink/sixel-cursor-heal.js +62 -0
  308. package/lib/types/ink/sixel-graphics.d.ts +6 -0
  309. package/lib/types/ink/sixel-graphics.d.ts.map +1 -1
  310. package/lib/types/ink/sixel-graphics.js +18 -0
  311. package/lib/types/ink/styles.d.ts +8 -1
  312. package/lib/types/ink/styles.d.ts.map +1 -1
  313. package/lib/types/ink/terminal-notification-windows.d.ts +195 -0
  314. package/lib/types/ink/terminal-notification-windows.d.ts.map +1 -0
  315. package/lib/types/ink/terminal-notification-windows.js +433 -0
  316. package/lib/types/ink/terminal-notification.d.ts +3 -1
  317. package/lib/types/ink/terminal-notification.d.ts.map +1 -1
  318. package/lib/types/ink/terminal-notification.js +4 -1
  319. package/lib/types/ink/terminal-querier.d.ts +9 -1
  320. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  321. package/lib/types/ink/terminal-querier.js +32 -1
  322. package/lib/types/ink/terminal.d.ts +23 -2
  323. package/lib/types/ink/terminal.d.ts.map +1 -1
  324. package/lib/types/ink/terminal.js +32 -2
  325. package/lib/types/ink/termio/osc.d.ts +2 -1
  326. package/lib/types/ink/termio/osc.d.ts.map +1 -1
  327. package/lib/types/ink/termio/osc.js +37 -8
  328. package/lib/types/ink/termio/osc7501.d.ts +102 -0
  329. package/lib/types/ink/termio/osc7501.d.ts.map +1 -0
  330. package/lib/types/ink/termio/osc7501.js +229 -0
  331. package/lib/types/ink/termio/tokenize.js +5 -7
  332. package/lib/types/panels.d.ts +1 -1
  333. package/lib/types/panels.d.ts.map +1 -1
  334. package/lib/types/screens/AgentTranscriptScene.d.ts +3 -1
  335. package/lib/types/screens/AgentTranscriptScene.d.ts.map +1 -1
  336. package/lib/types/screens/AgentTranscriptScene.js +5 -1
  337. package/lib/types/screens/Chat.d.ts +6 -6
  338. package/lib/types/screens/Chat.d.ts.map +1 -1
  339. package/lib/types/screens/Chat.js +304 -111
  340. package/lib/types/screens/Launchpad.d.ts +8 -2
  341. package/lib/types/screens/Launchpad.d.ts.map +1 -1
  342. package/lib/types/screens/Launchpad.js +32 -12
  343. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  344. package/lib/types/screens/SessionSupervisor.js +31 -21
  345. package/lib/types/screens/Settings.d.ts +5 -1
  346. package/lib/types/screens/Settings.d.ts.map +1 -1
  347. package/lib/types/screens/Settings.js +528 -51
  348. package/lib/types/screens/StatusLine.d.ts +9 -3
  349. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  350. package/lib/types/screens/StatusLine.js +91 -15
  351. package/lib/types/screens/StatusMetrics.d.ts +2 -11
  352. package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
  353. package/lib/types/screens/StatusMetrics.js +20 -14
  354. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
  355. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +1 -1
  356. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts +1 -1
  357. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.d.ts.map +1 -1
  358. package/lib/types/screens/sessionSupervisor/useSessionSupervisor.js +13 -21
  359. package/lib/types/sessionMounts.d.ts +14 -0
  360. package/lib/types/sessionMounts.d.ts.map +1 -1
  361. package/lib/types/sessionMounts.js +20 -9
  362. package/lib/types/sessions/format.d.ts +39 -0
  363. package/lib/types/sessions/format.d.ts.map +1 -1
  364. package/lib/types/sessions/format.js +83 -0
  365. package/lib/types/sessions/resumeFailure.d.ts +4 -0
  366. package/lib/types/sessions/resumeFailure.d.ts.map +1 -1
  367. package/lib/types/sessions/resumeFailure.js +12 -4
  368. package/lib/types/sessions/workspaceCounts.d.ts +6 -0
  369. package/lib/types/sessions/workspaceCounts.d.ts.map +1 -0
  370. package/lib/types/sessions/workspaceCounts.js +24 -0
  371. package/lib/types/settings/definitions.d.ts +24 -0
  372. package/lib/types/settings/definitions.d.ts.map +1 -1
  373. package/lib/types/settings/definitions.js +38 -13
  374. package/lib/types/tips.js +2 -2
  375. package/lib/types/tuiDisplayPrefs.d.ts +113 -5
  376. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  377. package/lib/types/tuiDisplayPrefs.js +276 -14
  378. package/lib/types/update.d.ts +46 -36
  379. package/lib/types/update.d.ts.map +1 -1
  380. package/lib/types/update.js +248 -157
  381. package/lib/types/updateProcess.d.ts +28 -0
  382. package/lib/types/updateProcess.d.ts.map +1 -0
  383. package/lib/types/updateProcess.js +135 -0
  384. package/lib/types/utils/inputWordBoundary.d.ts +5 -0
  385. package/lib/types/utils/inputWordBoundary.d.ts.map +1 -0
  386. package/lib/types/utils/inputWordBoundary.js +18 -0
  387. package/lib/types/utils/keymap.d.ts +1 -1
  388. package/lib/types/utils/keymap.d.ts.map +1 -1
  389. package/lib/types/utils/keymap.js +6 -1
  390. package/lib/types/windowsInstaller.d.ts +4 -0
  391. package/lib/types/windowsInstaller.d.ts.map +1 -0
  392. package/lib/types/windowsInstaller.js +237 -0
  393. package/locale/en.json +6 -0
  394. package/locale/zh.json +6 -0
  395. package/package.json +127 -111
  396. package/presets/liangshen/custom-bash.mjs +13 -1
  397. package/presets/liangshen/instruction-hint.mjs +4 -1
  398. package/presets/liangshen/skill-search.mjs +14 -2
  399. package/presets/winbash.mjs +16 -4
  400. package/tui-profile/feed/README.md +17 -8
  401. package/tui-profile/feed/first-party.json +1 -1
@@ -142,6 +142,8 @@ export function readMountLedger() {
142
142
  * a bad record and writing the ledger anyway is not an option either: the
143
143
  * record that failed to parse may be another writer's only claim, so the safe
144
144
  * move is to leave the file exactly as it is and ask the user to repair it.
145
+ * The five refusals that mean "read, but not a ledger document" carry
146
+ * `damaged`; a failure to read at all carries no verdict.
145
147
  */
146
148
  export function readMountLedgerStrict() {
147
149
  const path = join(DATA_DIR, MOUNTS_FILE);
@@ -159,23 +161,23 @@ export function readMountLedgerStrict() {
159
161
  parsed = JSON.parse(raw);
160
162
  }
161
163
  catch {
162
- return { ok: false, detail: `${path} is not valid JSON` };
164
+ return { ok: false, detail: `${path} is not valid JSON`, damaged: true };
163
165
  }
164
166
  if (typeof parsed !== 'object' || parsed === null) {
165
- return { ok: false, detail: `${path} is not a ledger document` };
167
+ return { ok: false, detail: `${path} is not a ledger document`, damaged: true };
166
168
  }
167
169
  const document = parsed;
168
170
  if (document.version !== MOUNTS_VERSION) {
169
- return { ok: false, detail: `${path} has unknown version ${JSON.stringify(document.version)}` };
171
+ return { ok: false, detail: `${path} has unknown version ${JSON.stringify(document.version)}`, damaged: true };
170
172
  }
171
173
  if (!Array.isArray(document.owners)) {
172
- return { ok: false, detail: `${path} has no owners array` };
174
+ return { ok: false, detail: `${path} has no owners array`, damaged: true };
173
175
  }
174
176
  const owners = [];
175
177
  for (const record of document.owners) {
176
178
  const owner = parseOwner(record);
177
179
  if (owner === undefined)
178
- return { ok: false, detail: `${path} has a record whose shape is wrong` };
180
+ return { ok: false, detail: `${path} has a record whose shape is wrong`, damaged: true };
179
181
  owners.push(owner);
180
182
  }
181
183
  return { ok: true, owners };
@@ -393,8 +395,14 @@ function writeLedger(mine) {
393
395
  // and fail the `wx` create.
394
396
  const temporary = `${target}.${process.pid}.${Date.now()}.${temporarySequence++}.tmp`;
395
397
  const existing = readMountLedgerStrict();
396
- if (!existing.ok)
397
- return { ok: false, reason: 'unavailable', detail: existing.detail };
398
+ if (!existing.ok) {
399
+ // The read's verdict is what tells the caller whether the file is
400
+ // something to repair, so it travels with the refusal rather than being
401
+ // flattened into "the write did not happen".
402
+ return existing.damaged === true
403
+ ? { ok: false, reason: 'unavailable', detail: existing.detail, damaged: true }
404
+ : { ok: false, reason: 'unavailable', detail: existing.detail };
405
+ }
398
406
  try {
399
407
  mkdirSync(DATA_DIR, { recursive: true, mode: 0o700 });
400
408
  const records = existing.owners.filter(owner => !ownerIsSelf(owner) && pidAlive(owner.pid));
@@ -541,8 +549,11 @@ export function claimMount(sessionId) {
541
549
  if (!lockIsHeld(lock))
542
550
  return { ok: false, reason: 'busy' };
543
551
  const read = readMountLedgerStrict();
544
- if (!read.ok)
545
- return { ok: false, reason: 'unavailable', detail: read.detail };
552
+ if (!read.ok) {
553
+ return read.damaged === true
554
+ ? { ok: false, reason: 'unavailable', detail: read.detail, damaged: true }
555
+ : { ok: false, reason: 'unavailable', detail: read.detail };
556
+ }
546
557
  const holders = [];
547
558
  for (const owner of read.owners) {
548
559
  if (ownerIsSelf(owner) || !pidAlive(owner.pid))
@@ -104,6 +104,8 @@ export declare function kindMark(kind: SessionKind): {
104
104
  * @returns The wrapped lines, never empty for non-empty input.
105
105
  */
106
106
  export declare function wrapWidth(text: string, width: number): string[];
107
+ /** Wrap a directory without dropping its spaces or splitting Unicode graphemes. */
108
+ export declare function wrapPathWidth(path: string, width: number): string[];
107
109
  /** Human name of a session kind, for the preview pane's header. */
108
110
  export declare function kindLabel(kind: SessionKind): string;
109
111
  /**
@@ -120,6 +122,43 @@ export declare function titleColor(source: TitleSource, focused: boolean): keyof
120
122
  * collapsed to `~` so the eye lands on the part that differs.
121
123
  */
122
124
  export declare function formatProject(cwd: string, home: string): string;
125
+ /** The session's current directory for display: the host's `displayCwd`
126
+ * until the session moves away from its project (DSH
127
+ * `working-directory/change`), then the directory it moved to. */
128
+ export declare function displayWorkingDirectory(channel: {
129
+ readonly cwd: string;
130
+ readonly displayCwd: string;
131
+ readonly workingDirectory: string | undefined;
132
+ }): string;
123
133
  /** Compact final path segment for the working-directory menu. */
124
134
  export declare function projectName(cwd: string): string;
135
+ /** The compact footer's cwd as a breadcrumb: the project the session belongs
136
+ * to, plus where it moved. `undefined` until the session actually moves, so
137
+ * an unmoved session keeps the bare project name it always showed. */
138
+ export interface CompactWorkingDirectory {
139
+ /** The project's final path segment — the anchor that must not scroll away:
140
+ * the leaf alone (`ink`, `try`) loses which project the session belongs to,
141
+ * and two worktrees can share one. */
142
+ readonly anchor: string;
143
+ /** `›` for a move inside the project, `→` for a move out of it. */
144
+ readonly separator: '›' | '→';
145
+ /** Project-relative path inside (left-truncated when deep), the home-folded
146
+ * absolute path outside. */
147
+ readonly target: string;
148
+ }
149
+ /**
150
+ * The compact footer's cwd breadcrumb. A move inside the project reads
151
+ * `project›relative`, a move outside it reads `project→path`; the `project`
152
+ * anchor is kept in both so the session's home stays visible after a `cd`.
153
+ * Returns undefined when the session never moved (or moved back to its
154
+ * project), where the caller shows the plain project name.
155
+ *
156
+ * Presentation only: project identity, session ownership and `/export` keep
157
+ * using `cwd`.
158
+ */
159
+ export declare function compactWorkingDirectory(channel: {
160
+ readonly cwd: string;
161
+ readonly displayCwd: string;
162
+ readonly workingDirectory: string | undefined;
163
+ }, home: string): CompactWorkingDirectory | undefined;
125
164
  //# sourceMappingURL=format.d.ts.map
@@ -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,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B,CACrC,OAAO,EAAE;IAAE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,SAAS,CAAA;CAAE,EAC7G,IAAI,EAAE,MAAM,GACX,uBAAuB,GAAG,SAAS,CAQrC"}
@@ -7,8 +7,11 @@
7
7
  *
8
8
  * @module @deepseek-harness-tui/dsh-tui/sessions/format
9
9
  */
10
+ import { isAbsolute, relative as pathRelative } from 'node:path';
11
+ import { sessionWorkingDirectory } from '../channel/working-directory.js';
10
12
  import { t } from '../i18n.js';
11
13
  import { stringWidth } from '../ink/stringWidth.js';
14
+ import { getGraphemeSegmenter } from '../utils/intl.js';
12
15
  /**
13
16
  * Truncate to a terminal DISPLAY width, CJK-aware (a wide character costs two
14
17
  * columns).
@@ -213,6 +216,27 @@ export function wrapWidth(text, width) {
213
216
  }
214
217
  return lines;
215
218
  }
219
+ /** Wrap a directory without dropping its spaces or splitting Unicode graphemes. */
220
+ export function wrapPathWidth(path, width) {
221
+ if (width <= 0 || path === '')
222
+ return [];
223
+ const lines = [];
224
+ let line = '';
225
+ let used = 0;
226
+ for (const { segment } of getGraphemeSegmenter().segment(path)) {
227
+ const cells = stringWidth(segment);
228
+ if (used + cells > width && line !== '') {
229
+ lines.push(line);
230
+ line = '';
231
+ used = 0;
232
+ }
233
+ line += segment;
234
+ used += cells;
235
+ }
236
+ if (line !== '')
237
+ lines.push(line);
238
+ return lines;
239
+ }
216
240
  /** Human name of a session kind, for the preview pane's header. */
217
241
  export function kindLabel(kind) {
218
242
  if (kind.kind === 'subagent')
@@ -265,6 +289,13 @@ export function formatProject(cwd, home) {
265
289
  }
266
290
  return normalized;
267
291
  }
292
+ /** The session's current directory for display: the host's `displayCwd`
293
+ * until the session moves away from its project (DSH
294
+ * `working-directory/change`), then the directory it moved to. */
295
+ export function displayWorkingDirectory(channel) {
296
+ const current = sessionWorkingDirectory(channel);
297
+ return current === channel.cwd ? channel.displayCwd : current;
298
+ }
268
299
  /** Compact final path segment for the working-directory menu. */
269
300
  export function projectName(cwd) {
270
301
  if (cwd.length === 0)
@@ -274,3 +305,55 @@ export function projectName(cwd) {
274
305
  const name = normalized.split('/').filter(Boolean).at(-1);
275
306
  return name ?? normalized;
276
307
  }
308
+ /** Cell budget for the relative half of the compact breadcrumb. The anchor
309
+ * stays whole, so a deep path gives up its leading segments rather than let
310
+ * the row's right edge eat the leaf. */
311
+ const COMPACT_RELATIVE_MAX_CELLS = 32;
312
+ /** `target` relative to `base` when it is genuinely below it, else undefined.
313
+ * `path.relative` is the authority: a string prefix would call `/a/bc` a child
314
+ * of `/a/b`. Non-path identities (a remote workspace's display URI against
315
+ * its host alias) cannot be compared and fall back to the absolute form. */
316
+ function relativeInside(base, target) {
317
+ if (base === '' || target === '' || !isAbsolute(base) || !isAbsolute(target))
318
+ return undefined;
319
+ const relative = pathRelative(base, target).replace(/\\/g, '/');
320
+ if (relative === '' || relative === '..' || relative.startsWith('../') || isAbsolute(relative))
321
+ return undefined;
322
+ return relative;
323
+ }
324
+ /** Keep the deepest whole segments that fit the budget under a leading `…/`.
325
+ * A single component wider than the budget keeps its own tail: the leaf names
326
+ * the directory, its head is the predictable part to lose. */
327
+ function truncateRelative(relative, maxCells) {
328
+ if (stringWidth(relative) <= maxCells)
329
+ return relative;
330
+ const segments = relative.split('/').filter(segment => segment !== '');
331
+ let tail = '';
332
+ for (let index = segments.length - 1; index >= 0; index -= 1) {
333
+ const next = tail === '' ? segments[index] : `${segments[index]}/${tail}`;
334
+ if (stringWidth(`…/${next}`) > maxCells)
335
+ break;
336
+ tail = next;
337
+ }
338
+ return tail === '' ? tailWidth(relative, maxCells) : `…/${tail}`;
339
+ }
340
+ /**
341
+ * The compact footer's cwd breadcrumb. A move inside the project reads
342
+ * `project›relative`, a move outside it reads `project→path`; the `project`
343
+ * anchor is kept in both so the session's home stays visible after a `cd`.
344
+ * Returns undefined when the session never moved (or moved back to its
345
+ * project), where the caller shows the plain project name.
346
+ *
347
+ * Presentation only: project identity, session ownership and `/export` keep
348
+ * using `cwd`.
349
+ */
350
+ export function compactWorkingDirectory(channel, home) {
351
+ const current = channel.workingDirectory;
352
+ if (current === undefined || current === channel.cwd)
353
+ return undefined;
354
+ const anchor = projectName(channel.displayCwd === '' ? channel.cwd : channel.displayCwd);
355
+ const inside = relativeInside(channel.cwd, current);
356
+ return inside === undefined
357
+ ? { anchor, separator: '→', target: formatProject(current, home) }
358
+ : { anchor, separator: '›', target: truncateRelative(inside, COMPACT_RELATIVE_MAX_CELLS) };
359
+ }
@@ -31,6 +31,10 @@ export declare function resumeFailureText(result: ResumeResult): string | undefi
31
31
  * `occupied` case is here too because it is a {@link MountFailure} and its
32
32
  * sentence already exists; {@link resumeFailureText} reaches the same key from
33
33
  * the adapter's own result.
34
+ *
35
+ * A refusal the user can clear gets the repair instruction appended: every
36
+ * interactive surface goes through here, and "occupancy could not be verified"
37
+ * on its own is a dead end when the cause is a file that has to be deleted.
34
38
  * @param failure - Why the session could not be claimed.
35
39
  * @returns The user-facing sentence.
36
40
  */
@@ -1 +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;AAIvD;;;;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"}
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;AAIvD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAc1E;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAU9D"}
@@ -35,7 +35,7 @@ export function resumeFailureText(result) {
35
35
  case 'occupied':
36
36
  return t('resume-session-occupied', { pid: result.pid });
37
37
  case 'failed':
38
- return t('session-resume-failed', { err: result.error });
38
+ return result.code === 'owned-elsewhere' ? t('resume-owned-elsewhere') : t('session-resume-failed', { err: result.error });
39
39
  }
40
40
  }
41
41
  /**
@@ -46,6 +46,10 @@ export function resumeFailureText(result) {
46
46
  * `occupied` case is here too because it is a {@link MountFailure} and its
47
47
  * sentence already exists; {@link resumeFailureText} reaches the same key from
48
48
  * the adapter's own result.
49
+ *
50
+ * A refusal the user can clear gets the repair instruction appended: every
51
+ * interactive surface goes through here, and "occupancy could not be verified"
52
+ * on its own is a dead end when the cause is a file that has to be deleted.
49
53
  * @param failure - Why the session could not be claimed.
50
54
  * @returns The user-facing sentence.
51
55
  */
@@ -53,7 +57,11 @@ export function mountFailureText(failure) {
53
57
  if (failure.reason === 'occupied') {
54
58
  return t('resume-session-occupied', { pid: failure.holders[0] ?? 0 });
55
59
  }
56
- return failure.reason === 'busy'
57
- ? t('resume-mount-busy')
58
- : t('resume-mount-unavailable', { detail: failure.detail });
60
+ if (failure.reason === 'busy')
61
+ return t('resume-mount-busy');
62
+ const refusal = t('resume-mount-unavailable', { detail: failure.detail });
63
+ // Without the flag this is exactly the sentence it was before; the repair
64
+ // line is added only for damage, because it is advice the other causes
65
+ // (permissions, a lock, a failed replace) would make wrong.
66
+ return failure.damaged === true ? `${refusal} ${t('resume-mount-ledger-repair')}` : refusal;
59
67
  }
@@ -0,0 +1,6 @@
1
+ import type { SessionSummary } from '../adapter/ports/channel-session.js';
2
+ /** Conversations shown by the workspace supervisor, including the live tip. */
3
+ export declare function visibleWorkspaceSessions(sessions: readonly SessionSummary[], currentId: string): readonly SessionSummary[];
4
+ /** Count an already-filtered listing by exact normalized working directory. */
5
+ export declare function workspaceSessionCounts(sessions: readonly SessionSummary[]): ReadonlyMap<string, number>;
6
+ //# sourceMappingURL=workspaceCounts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspaceCounts.d.ts","sourceRoot":"","sources":["../../../src/sessions/workspaceCounts.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAA;AAGzE,+EAA+E;AAC/E,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,SAAS,cAAc,EAAE,EACnC,SAAS,EAAE,MAAM,GAChB,SAAS,cAAc,EAAE,CAY3B;AAED,+EAA+E;AAC/E,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,SAAS,cAAc,EAAE,GAAG,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAOvG"}
@@ -0,0 +1,24 @@
1
+ import { normalizeWorkspaceCwd } from './view.js';
2
+ /** Conversations shown by the workspace supervisor, including the live tip. */
3
+ export function visibleWorkspaceSessions(sessions, currentId) {
4
+ const byId = new Map(sessions.map(session => [session.id, session]));
5
+ const ancestors = new Set();
6
+ let cursor = byId.get(currentId);
7
+ while (cursor?.kind.kind === 'fork') {
8
+ const parent = cursor.kind.parent;
9
+ if (parent === undefined || ancestors.has(parent))
10
+ break;
11
+ ancestors.add(parent);
12
+ cursor = byId.get(parent);
13
+ }
14
+ return sessions.filter(session => !session.archived && session.hasPrompt && session.kind.kind !== 'subagent' && !ancestors.has(session.id));
15
+ }
16
+ /** Count an already-filtered listing by exact normalized working directory. */
17
+ export function workspaceSessionCounts(sessions) {
18
+ const counts = new Map();
19
+ for (const session of sessions) {
20
+ const key = normalizeWorkspaceCwd(session.cwd);
21
+ counts.set(key, (counts.get(key) ?? 0) + 1);
22
+ }
23
+ return counts;
24
+ }
@@ -604,6 +604,30 @@ export declare const SETTING_DEFINITIONS: {
604
604
  kind: "boolean";
605
605
  group: string;
606
606
  };
607
+ 'statusBar.pluginFields': {
608
+ label: string;
609
+ descriptions: {
610
+ zh: string;
611
+ };
612
+ hint: string;
613
+ hintDescriptions: {
614
+ zh: string;
615
+ };
616
+ kind: "boolean";
617
+ group: string;
618
+ };
619
+ 'statusBar.pluginFieldsOrder': {
620
+ label: string;
621
+ descriptions: {
622
+ zh: string;
623
+ };
624
+ hint: string;
625
+ hintDescriptions: {
626
+ zh: string;
627
+ };
628
+ kind: "text";
629
+ group: string;
630
+ };
607
631
  'statusBar.sessionId': {
608
632
  label: string;
609
633
  descriptions: {
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../../src/settings/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAA;AAG5E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AAE1D,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,kBAAkB,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC,CAAA;AAE7I,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+hBa,CAAA;AAE7C,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,mBAAmB,CAAA;AAEzD;;;;;;;;;yCASyC;AACzC,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EASjB,CAAA;AAEV;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,EAAE,SAAS,MAAM,EAEjD,CAAA;AAED,sEAAsE;AACtE,wBAAgB,YAAY,CAAC,GAAG,EAAE,UAAU,GAAG,iBAAiB,GAAG;IAAE,IAAI,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAE7F;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,gBAAgB,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC;IAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAA;CAAE,CAmHnK,CAAA"}
@@ -68,15 +68,11 @@ export const SETTING_DEFINITIONS = {
68
68
  label: 'Default reasoning effort',
69
69
  descriptions: { zh: '默认推理强度' },
70
70
  group: 'conversation',
71
- hint: 'Reasoning-effort level new sessions start on; the current session applies it to its next request too, when the model offers the tier (an unlisted level falls back to the model default). Auto = follow the cordis.yml `effort` pin, then the persisted /effort choice, then the model default.',
72
- hintDescriptions: { zh: '新会话起始的推理强度档位;模型提供该档位时,当前会话的下一请求也会应用(模型不提供的档位会静默回落到模型默认)。自动 = 依次跟随 cordis.yml 的 effort 配置、持久化的 /effort 选择、模型默认档。' },
71
+ hint: 'Choices come from the current backend and model. A saved value absent from that catalog remains visible and stored until you change it. On DSH, Auto follows the persisted /effort choice, then cordis.yml effort, then the model default. On Claude/Codex, Auto at startup and resumed sessions preserve backend preferences; explicitly choosing Auto resets the model default. Explicit changes apply to the next request; unsupported preferences fall back only to a lower offered tier, or the model default, with a notice. While the catalog is loading or unavailable, only Auto is selectable.',
72
+ hintDescriptions: { zh: '选项来自当前后端和模型目录。目录没有的已存值仍显示并保留,直到你主动修改。DSH 自动依次采用持久化的 /effort 选择、cordis.yml effort 配置、模型默认。Claude/Codex 启动采用自动模式或恢复会话时保留后端偏好;在设置中主动选择自动会重置为模型默认。明确修改会作用于下一请求;不支持的偏好仅向下回落到可用档位,否则回到模型默认,并给出提示。目录加载中或不可用时仅可选自动。' },
73
73
  kind: 'select',
74
74
  options: [
75
- { value: 'auto', label: 'Auto (model default)', descriptions: { zh: '自动(模型默认)' } },
76
- { value: 'off', label: 'Off', descriptions: { zh: '关闭' } },
77
- { value: 'low', label: 'Low', descriptions: { zh: '低' } },
78
- { value: 'high', label: 'High', descriptions: { zh: '高' } },
79
- { value: 'max', label: 'Max', descriptions: { zh: '最高' } },
75
+ { value: 'auto', label: 'Auto', descriptions: { zh: '自动' } },
80
76
  ],
81
77
  },
82
78
  'expandEditor': {
@@ -207,13 +203,14 @@ export const SETTING_DEFINITIONS = {
207
203
  label: 'Notification method',
208
204
  descriptions: { zh: '通知方式' },
209
205
  group: 'conversation',
210
- hint: 'Auto uses separate title/body notifications on Ghostty and WezTerm (OSC 777) and Kitty (OSC 99). iTerm2 and Warp use OSC 9 with a title prefix; other terminals ring the bell. Explicit OSC 9 also uses the title prefix. Delivery depends on terminal settings. In tmux, OSC notifications need allow-passthrough on. Applies immediately.',
211
- hintDescriptions: { zh: '自动:Ghostty、WezTerm 使用 OSC 777,Kitty 使用 OSC 99,分别显示标题与正文;iTerm2、Warp 使用 OSC 9,将标题放在正文前;其他终端响铃。显式 OSC 9 同样使用标题前缀。实际提醒取决于终端设置;tmux 中 OSC 通知需要开启 allow-passthrough。立即生效。' },
206
+ hint: 'Auto uses a native toast in local Windows sessions and the client terminal protocol over SSH. Ghostty/WezTerm use OSC 777, Kitty OSC 99, and iTerm2/Warp OSC 9 with a title prefix; other terminals ring the bell. Explicit Windows uses a toast on the Windows host, including over SSH. The first toast registers a per-user HKCU ID and can take about 3 seconds. It yields only for DSH sessions with an enabled, active cc-dsh-notifier; a failed toast falls back to the bell. Terminal settings still apply; tmux OSC notifications need allow-passthrough. Applies immediately.',
207
+ hintDescriptions: { zh: '自动:Windows 本地会话用系统 toast,SSH 会话改走客户端终端协议。Ghostty/WezTerm 用 OSC 777,Kitty 用 OSC 99,iTerm2/Warp 用带标题前缀的 OSC 9,其他终端响铃。显式 Windows 仍在 Windows 主机弹窗,包括 SSH。首次 toast 会注册当前用户的 HKCU 标识,约延迟 3 秒;仅 DSH 会话遇到已启用、正在运行的 cc-dsh-notifier 时让位;弹窗失败回落响铃。实际效果依终端设置;tmux 的 OSC 通知需 allow-passthrough。立即生效。' },
212
208
  kind: 'select',
213
209
  options: [
214
210
  { value: 'auto', label: 'Auto', descriptions: { zh: '自动' } },
215
211
  { value: 'osc9', label: 'OSC 9', descriptions: { zh: 'OSC 9' } },
216
212
  { value: 'bel', label: 'Terminal bell', descriptions: { zh: '终端响铃' } },
213
+ { value: 'windows', label: 'Windows notification', descriptions: { zh: 'Windows 原生通知' } },
217
214
  ],
218
215
  },
219
216
  'pageMargin': {
@@ -271,8 +268,8 @@ export const SETTING_DEFINITIONS = {
271
268
  label: 'Enabled panels',
272
269
  descriptions: { zh: '启用的面板' },
273
270
  group: 'side-panel',
274
- hint: 'Tick the panels the side panel bar shows: a new tick appends at the end, unticking removes. Panels registered by plugins appear here automatically, and a well-formed id nothing claims yet stays as a checked placeholder. The Advanced row edits the raw comma list (e.g. to reorder). Applies immediately.',
275
- hintDescriptions: { zh: '勾选侧栏标签栏要显示的面板:新勾选的追加在末尾,取消即移除。插件注册的面板会自动出现在这里;格式合法但尚无面板认领的 id 会保留为已勾选的占位行。「高级」行可编辑原始逗号列表(如调整顺序)。立即生效。' },
271
+ hint: 'Default `*` shows every panel — the built-ins plus plugin panels registered later. Unticking a checkbox writes an explicit list: from then on a panel registered after the fact stays off until ticked (an unlisted registered panel shows unchecked, an unlisted well-formed id stays as a checked placeholder). Temporary panels show their title and a run-local number; their checkboxes affect this run only and are never saved, and an old actN placeholder must be removed and the current panel selected again. The Advanced row edits the raw list (`*` = all, persistent ids only). Applies immediately.',
272
+ hintDescriptions: { zh: '默认 `*` 显示全部面板——内置面板加上之后注册的插件面板。取消勾选会写成显式列表:此后新注册的面板保持关闭,直到勾选(已注册但未列出的面板显示为未勾选;未列出但格式合法的 id 仍保留为已勾选占位行)。临时面板显示标题和本次运行编号,其勾选只影响当前运行、不保存;旧 actN 占位项应移除后重新选择当前面板。「高级」行编辑原始列表(`*` = 全部,仅持久 id)。立即生效。' },
276
273
  kind: 'text',
277
274
  },
278
275
  'sidePanel.ratio': {
@@ -396,6 +393,22 @@ export const SETTING_DEFINITIONS = {
396
393
  kind: 'boolean',
397
394
  group: 'status-bar',
398
395
  },
396
+ 'statusBar.pluginFields': {
397
+ label: 'Show plugin fields',
398
+ descriptions: { zh: '显示插件底栏字段' },
399
+ hint: 'Show footer fields contributed by plugins. Turning this off does not uninstall anything.',
400
+ hintDescriptions: { zh: '显示插件贡献的底栏字段;关闭不会卸载任何插件。' },
401
+ kind: 'boolean',
402
+ group: 'status-bar',
403
+ },
404
+ 'statusBar.pluginFieldsOrder': {
405
+ label: 'Plugin field list',
406
+ descriptions: { zh: '插件底栏字段名单' },
407
+ hint: 'Three ";"-separated groups — left group tail; right group head; right group tail — with comma-separated keys inside: `a,b;c;d`. Empty shows nothing; "*" shows every field (default, fields registered later included). A listed key follows the group it sits in, overriding its plugin-declared slot.',
408
+ hintDescriptions: { zh: '用 ";" 分成三组——左组末尾;右组开头;右组末尾——组内逗号分隔:`a,b;c;d`。留空则一个都不显示;"*" 表示全部(默认,含以后注册的字段)。被列出的字段以名单里的组为准,覆盖插件声明的槽位。' },
409
+ kind: 'text',
410
+ group: 'status-bar',
411
+ },
399
412
  'statusBar.sessionId': {
400
413
  label: 'Show session id',
401
414
  descriptions: { zh: '显示会话 ID' },
@@ -632,8 +645,8 @@ export const SHORTCUT_FIELD_META = {
632
645
  todoFold: {
633
646
  label: 'Todo fold shortcut',
634
647
  zh: '待办折叠快捷键',
635
- hintEn: d => `Fold/unfold the goal/todo panel. Default: ${d}.`,
636
- hintZh: d => `折叠/展开目标与待办面板。默认 ${d}。`,
648
+ hintEn: d => `Fold running todos; hide/restore the idle goal/todo footer. Default: ${d}.`,
649
+ hintZh: d => `运行时折叠待办,空闲时隐藏/恢复目标与待办底部面板。默认 ${d}。`,
637
650
  },
638
651
  questionFold: {
639
652
  label: 'Question panel fold shortcut',
@@ -641,6 +654,18 @@ export const SHORTCUT_FIELD_META = {
641
654
  hintEn: d => `Fold/unfold the pending question panel. Default: ${d}.`,
642
655
  hintZh: d => `折叠/展开等待回答的提问面板。默认 ${d}。`,
643
656
  },
657
+ questionDetailUp: {
658
+ label: 'Panel preview previous page shortcut',
659
+ zh: '面板正文向上翻页快捷键',
660
+ hintEn: d => `Page up through question text or a compact approval preview without moving the choice focus. Default: ${d}.`,
661
+ hintZh: d => `向上翻阅问卷正文或紧凑审批预览,不移动选项焦点。默认 ${d}。`,
662
+ },
663
+ questionDetailDown: {
664
+ label: 'Panel preview next page shortcut',
665
+ zh: '面板正文向下翻页快捷键',
666
+ hintEn: d => `Page down through question text or a compact approval preview without moving the choice focus. Default: ${d}.`,
667
+ hintZh: d => `向下翻阅问卷正文或紧凑审批预览,不移动选项焦点。默认 ${d}。`,
668
+ },
644
669
  expandEditor: {
645
670
  label: 'Fullscreen editor shortcut',
646
671
  zh: '全屏草稿编辑快捷键',
package/lib/types/tips.js CHANGED
@@ -719,8 +719,8 @@ export const TIPS = [
719
719
  {
720
720
  id: 'disp-wheel-sel',
721
721
  group: 'display',
722
- zh: '有文本选区时,滚轮平移选区而非滚动列表',
723
- en: 'With a text selection, the wheel translates the selection, not the list',
722
+ zh: '滚轮滚动指针下的内容,选区随已选内容协调移动',
723
+ en: 'The wheel scrolls content under the pointer; the selection follows its selected content',
724
724
  },
725
725
  {
726
726
  id: 'disp-whale',
@@ -1,7 +1,56 @@
1
1
  import type { ToolBackground, ScrollGutterMode, PageMarginSetting, PageMarginMode, PageMarginSpec, StatusBarConfig, JobGroupFoldMode } from './adapter/ports/channel-display.js';
2
2
  export type { ToolBackground, ScrollGutterMode, PageMarginSetting, PageMarginMode, PageMarginSpec, StatusBarConfig, JobGroupFoldMode } from './adapter/ports/channel-display.js';
3
+ /** Where a plugin footer field joins the status row, in the list order the
4
+ * user's `statusBar.pluginFieldsOrder` groups map onto by index. Kept
5
+ * structurally identical to `TuiStatusFieldSlot` in `dsh-adapter/status.ts`
6
+ * (a script compares the two literal sets). */
7
+ export declare const STATUS_FIELD_SLOTS: readonly ["left-tail", "right-head", "right-tail"];
8
+ export type StatusFieldSlot = typeof STATUS_FIELD_SLOTS[number];
9
+ /** `statusBar.pluginFieldsOrder`'s "show everything" token — the default. */
10
+ export declare const ALL_PLUGIN_FIELDS = "*";
3
11
  /** Defaults keep the essential route/context information visible. */
4
12
  export declare const DEFAULT_STATUS_BAR: Readonly<StatusBarConfig>;
13
+ /** Parsed `statusBar.pluginFieldsOrder`. `invalid` is what the settings screen
14
+ * refuses to save; the renderer treats it as `all`. */
15
+ export type ParsedPluginFieldsOrder = {
16
+ readonly mode: 'all';
17
+ } | {
18
+ readonly mode: 'none';
19
+ } | {
20
+ readonly mode: 'groups';
21
+ readonly groups: readonly (readonly string[])[];
22
+ } | {
23
+ readonly mode: 'invalid';
24
+ readonly reason: 'groups' | 'token' | 'duplicate' | 'sentinel';
25
+ };
26
+ /** Strict parse of one `statusBar.pluginFieldsOrder` value:
27
+ * - `*` — every plugin field (the default);
28
+ * - `''` (or three empty groups) — none;
29
+ * - otherwise exactly three `;`-separated groups of comma-separated keys, the
30
+ * group index picking the slot and the group order the sequence.
31
+ * Any other shape is `invalid`: the settings screen blocks the save, and the
32
+ * renderer falls back to `all` so a hand-edited typo can only ever show MORE
33
+ * than asked, never hide a plugin silently. */
34
+ export declare function parsePluginFieldsOrder(value: string): ParsedPluginFieldsOrder;
35
+ /** Render parsed groups back to their canonical text (trimmed, lower-cased,
36
+ * one separator between groups). */
37
+ export declare function formatPluginFieldsOrder(groups: readonly (readonly string[])[]): string;
38
+ /** Normalize a settings/config-layer value: valid values land in canonical
39
+ * form, an invalid string is kept (so the settings screen can show and fix
40
+ * it), and anything that is not a string becomes the default `*`. */
41
+ export declare function normalizePluginFieldsOrder(value: unknown): string;
42
+ /** The structural minimum the footer renders from — keeps this module free of
43
+ * a `dsh-adapter` type import. */
44
+ export interface StatusFieldOrderEntry {
45
+ readonly key: string;
46
+ readonly slot: StatusFieldSlot;
47
+ }
48
+ /** Apply the user's list to the live field registry. `all` (and any invalid
49
+ * value) returns the input array itself — the default mode allocates nothing;
50
+ * `none` returns the shared empty array; `groups` returns new entries in list
51
+ * order with the slot taken from the group index (the user's group overrides
52
+ * the plugin-declared slot). Unknown keys are skipped. */
53
+ export declare function applyPluginFieldsOrder<T extends StatusFieldOrderEntry>(fields: readonly T[], order: string): readonly T[];
5
54
  /** Normalize untrusted/config-layer values without mutating the input. */
6
55
  export declare function normalizeToolBackground(value: unknown): ToolBackground;
7
56
  /** Same normalize contract as toolBackground; `auto` is the default. */
@@ -131,16 +180,75 @@ export declare const getImageBacking: () => ImageBacking;
131
180
  export declare const applyImageBacking: (value: unknown) => ImageBacking;
132
181
  /** Panel id grammar (plugins register under a `plugin:sub` namespace). */
133
182
  export declare const SIDE_PANEL_ID_PATTERN: RegExp;
183
+ /** Anonymous activations have no durable identity. Three segments cannot
184
+ * collide with a verified Component's two-segment panel address. */
185
+ export declare function isTemporarySidePanelId(id: string): boolean;
186
+ /** Old anonymous addresses cannot be attributed to a past activation. */
187
+ export declare function isLegacyAnonymousSidePanelId(id: string): boolean;
188
+ /** Encode only verified registered Component ids when writing preferences.
189
+ * Runtime addresses remain unchanged; bare actN CSV entries stay unclaimed. */
190
+ export declare function persistentSidePanelId(id: string): string;
191
+ /** Every built-in panel's id in the order the default lays them out. This is
192
+ * the ordering skeleton of `ALL_SIDE_PANELS`, not a snapshot of what is
193
+ * enabled: the resolver drops the ids that are not registered. */
134
194
  export declare const DEFAULT_SIDE_PANEL_IDS = "todo,jobs,agents,info,trajectory,workspace,btw,companion";
195
+ /** `sidePanel.panels`'s "show everything" token — the default. Under it the
196
+ * enabled set follows the registry: plugin panels registered later appear
197
+ * (and unregistered ones leave) without any settings write, and the picker
198
+ * reads the same value as "all checked". */
199
+ export declare const ALL_SIDE_PANELS = "*";
135
200
  /** Chat fraction of the content width; junk collapses to the default and
136
201
  * the value is sanity-clamped (geometry clamps further per width). */
137
202
  export declare function normalizeSidePanelRatio(value: unknown): number;
138
- /** Comma-separated enabled-panel ids: tokens that fail the id grammar are
139
- * dropped (a typo must never wedge the layout); unknown-but-well-formed
140
- * ids survive — a plugin may register them later in the session. */
203
+ /** Parsed `sidePanel.panels`. `*` is "every registered panel"; `''` is the
204
+ * settings screen's clear (use the default); otherwise the exact ids, in
205
+ * PanelBar order. `invalid` is what every write path refuses: the settings
206
+ * gate rejects the draft, and `normalizeSidePanelPanels` (the store, and the
207
+ * settings field's `format`) drops the unusable tokens. `resolveSidePanelIds`
208
+ * still folds a raw invalid value to `all` for a caller handing it
209
+ * un-normalized text — the PanelBar and the settings screen never do. */
210
+ export type ParsedSidePanelPanels = {
211
+ readonly mode: 'all';
212
+ } | {
213
+ readonly mode: 'empty';
214
+ } | {
215
+ readonly mode: 'list';
216
+ readonly ids: readonly string[];
217
+ } | {
218
+ readonly mode: 'invalid';
219
+ readonly reason: 'sentinel' | 'token' | 'temporary' | 'empty';
220
+ };
221
+ /** Strict parse of one `sidePanel.panels` value (the settings save gate). */
222
+ export declare function parseSidePanelPanels(value: string): ParsedSidePanelPanels;
223
+ /** Tolerant normalization for the config/store entry points: `*`, a
224
+ * non-string, a blank or an all-malformed value fold to `*`; otherwise
225
+ * tokens are lower-cased, de-duped and order-preserved. Unlike the picker's
226
+ * strict gate, a malformed token is dropped here — a typo must never wedge
227
+ * the layout — while unknown-but-well-formed ids survive, because a plugin
228
+ * may register them later in the session. A temporary address is dropped
229
+ * too: it is session state, and a stored value may never claim one. */
141
230
  export declare function normalizeSidePanelPanels(value: unknown): string;
142
- /** Enabled panel ids in PanelBar order. */
143
- export declare function parseSidePanelIds(value: string): readonly string[];
231
+ export declare function getHiddenTemporarySidePanels(): readonly string[];
232
+ export declare function subscribeHiddenTemporarySidePanels(listener: () => void): () => void;
233
+ /** Hide or restore one temporary panel for this run (`hidden` true = off the
234
+ * bar, i.e. its checkbox is clear). Returns whether anything changed. */
235
+ export declare function setTemporarySidePanelHidden(id: string, hidden: boolean): boolean;
236
+ /** The one derivation of "which panels are enabled", given the stored value
237
+ * and the live registry (ids in registry order).
238
+ *
239
+ * - `*` (and a raw invalid value): the built-ins in their default order,
240
+ * then every other registered panel in registry order — the same
241
+ * tail order the old registration-time append produced, so an upgrade
242
+ * changes no visible tab order.
243
+ * - an explicit list: its ids, in its order — a `component:`-encoded one
244
+ * decoded to the panel it names, an id nothing claims yet left as is (it
245
+ * stays a placeholder until a plugin registers it). A bare `actN:x` is
246
+ * never honoured: an old anonymous address cannot be attributed to this
247
+ * run's activation (#1695), so it enables nothing even when a panel
248
+ * happens to answer to that runtime id. Registered temporary panels join
249
+ * at the tail unless `hiddenTemporary` names them: a stored value cannot
250
+ * speak for a panel it cannot name. */
251
+ export declare function resolveSidePanelIds(configured: string | undefined, registered: readonly string[], hiddenTemporary?: readonly string[]): readonly string[];
144
252
  export declare const subscribeSidePanelSplitEnabled: (listener: () => void) => () => void;
145
253
  export declare const getSidePanelSplitEnabled: () => boolean;
146
254
  export declare const applySidePanelSplitEnabled: (value: unknown) => boolean;