@deepseek-harness-tui/dsh-tui 0.17.0 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (318) hide show
  1. package/README.md +43 -16
  2. package/bin/dsh-tui.js +46 -3
  3. package/cli/adapters/dsh/index.mjs +2 -2
  4. package/guide/dsh-tui-guide/cli.en.md +1 -1
  5. package/guide/dsh-tui-guide/cli.md +1 -1
  6. package/guide/dsh-tui-guide/codex-backend.en.md +2 -2
  7. package/guide/dsh-tui-guide/codex-backend.md +2 -2
  8. package/guide/dsh-tui-guide/configuration.en.md +8 -2
  9. package/guide/dsh-tui-guide/configuration.md +8 -2
  10. package/guide/dsh-tui-guide/getting-started.en.md +174 -6
  11. package/guide/dsh-tui-guide/getting-started.md +125 -15
  12. package/guide/dsh-tui-guide/interaction.en.md +30 -8
  13. package/guide/dsh-tui-guide/interaction.md +18 -5
  14. package/guide/dsh-tui-guide/plugins.en.md +28 -7
  15. package/guide/dsh-tui-guide/plugins.md +18 -5
  16. package/guide/dsh-tui-guide/user-guide.en.md +32 -17
  17. package/guide/dsh-tui-guide/user-guide.md +23 -12
  18. package/lib/settings.json +3 -3
  19. package/lib/types/adapter/channel/ui-policy.d.ts +1 -0
  20. package/lib/types/adapter/channel/ui-policy.d.ts.map +1 -1
  21. package/lib/types/adapter/channel/ui-policy.js +1 -0
  22. package/lib/types/adapter/ports/channel-ui.d.ts +10 -2
  23. package/lib/types/adapter/ports/channel-ui.d.ts.map +1 -1
  24. package/lib/types/adapter/ports/channel-view.d.ts +31 -5
  25. package/lib/types/adapter/ports/channel-view.d.ts.map +1 -1
  26. package/lib/types/adapter/standard/grants.d.ts +60 -0
  27. package/lib/types/adapter/standard/grants.d.ts.map +1 -1
  28. package/lib/types/adapter/standard/grants.js +74 -0
  29. package/lib/types/agent/events.d.ts +16 -3
  30. package/lib/types/agent/events.d.ts.map +1 -1
  31. package/lib/types/agent/session.d.ts +5 -0
  32. package/lib/types/agent/session.d.ts.map +1 -1
  33. package/lib/types/backends/claude/translate/core.d.ts +2 -2
  34. package/lib/types/backends/claude/translate/core.d.ts.map +1 -1
  35. package/lib/types/backends/claude/translate/core.js +10 -6
  36. package/lib/types/backends/codex/session/commands.d.ts +2 -0
  37. package/lib/types/backends/codex/session/commands.d.ts.map +1 -1
  38. package/lib/types/backends/codex/session/commands.js +8 -4
  39. package/lib/types/backends/codex/session/input.d.ts +11 -7
  40. package/lib/types/backends/codex/session/input.d.ts.map +1 -1
  41. package/lib/types/backends/codex/session/input.js +68 -15
  42. package/lib/types/backends/codex/session/session.d.ts.map +1 -1
  43. package/lib/types/backends/codex/session/session.js +2 -3
  44. package/lib/types/channel/projection.d.ts.map +1 -1
  45. package/lib/types/channel/projection.js +78 -10
  46. package/lib/types/channel/questions.d.ts +19 -3
  47. package/lib/types/channel/questions.d.ts.map +1 -1
  48. package/lib/types/channel/sanitize.d.ts.map +1 -1
  49. package/lib/types/channel/sanitize.js +8 -4
  50. package/lib/types/channel/subagent-failure.d.ts +49 -0
  51. package/lib/types/channel/subagent-failure.d.ts.map +1 -0
  52. package/lib/types/channel/subagent-failure.js +59 -0
  53. package/lib/types/channel/transcript.d.ts +17 -0
  54. package/lib/types/channel/transcript.d.ts.map +1 -1
  55. package/lib/types/channel/transcript.js +35 -0
  56. package/lib/types/commands.js +2 -2
  57. package/lib/types/components/GoalTodoPanel.d.ts +71 -6
  58. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  59. package/lib/types/components/GoalTodoPanel.js +165 -17
  60. package/lib/types/components/MessageList.d.ts.map +1 -1
  61. package/lib/types/components/MessageList.js +14 -9
  62. package/lib/types/components/PluginGrantList.d.ts +45 -0
  63. package/lib/types/components/PluginGrantList.d.ts.map +1 -0
  64. package/lib/types/components/PluginGrantList.js +126 -0
  65. package/lib/types/components/PluginInstallPane.d.ts.map +1 -1
  66. package/lib/types/components/PluginInstallPane.js +35 -6
  67. package/lib/types/components/PluginManagePane.d.ts.map +1 -1
  68. package/lib/types/components/PluginManagePane.js +65 -8
  69. package/lib/types/components/PromptInput.d.ts.map +1 -1
  70. package/lib/types/components/PromptInput.js +63 -8
  71. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  72. package/lib/types/components/SubagentDashboard.js +17 -1
  73. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  74. package/lib/types/components/SubagentDetailScene.js +12 -0
  75. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +2 -1
  76. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  77. package/lib/types/components/messages/AssistantToolUseMessage.js +16 -7
  78. package/lib/types/components/onboardingModel.d.ts +2 -2
  79. package/lib/types/components/onboardingModel.js +3 -3
  80. package/lib/types/components/onboardingProviderPlan.d.ts +110 -0
  81. package/lib/types/components/onboardingProviderPlan.d.ts.map +1 -0
  82. package/lib/types/components/onboardingProviderPlan.js +78 -0
  83. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +5 -8
  84. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  85. package/lib/types/components/questions/AskUserQuestionPanel.js +7 -4
  86. package/lib/types/components/questions/PlanReviewPanel.d.ts +3 -6
  87. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
  88. package/lib/types/components/revealScope.d.ts +15 -0
  89. package/lib/types/components/revealScope.d.ts.map +1 -0
  90. package/lib/types/components/revealScope.js +17 -0
  91. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts +41 -1
  92. package/lib/types/components/sidePanel/btw/BtwComposer.d.ts.map +1 -1
  93. package/lib/types/components/sidePanel/btw/BtwComposer.js +123 -6
  94. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.d.ts.map +1 -1
  95. package/lib/types/components/sidePanel/btw/BtwPanelAdapter.js +9 -2
  96. package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts +7 -1
  97. package/lib/types/components/sidePanel/btw/BtwThreadScene.d.ts.map +1 -1
  98. package/lib/types/components/sidePanel/btw/BtwThreadScene.js +9 -2
  99. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts +30 -0
  100. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.d.ts.map +1 -0
  101. package/lib/types/components/sidePanel/btw/useBtwComposerPaste.js +94 -0
  102. package/lib/types/components/sidePanel/builtinPanels.d.ts.map +1 -1
  103. package/lib/types/components/sidePanel/builtinPanels.js +14 -2
  104. package/lib/types/components/sidePanel/types.d.ts +2 -0
  105. package/lib/types/components/sidePanel/types.d.ts.map +1 -1
  106. package/lib/types/components/sidePanel/useSidePanel.d.ts.map +1 -1
  107. package/lib/types/components/sidePanel/useSidePanel.js +15 -1
  108. package/lib/types/components/smoothReveal.d.ts +36 -6
  109. package/lib/types/components/smoothReveal.d.ts.map +1 -1
  110. package/lib/types/components/smoothReveal.js +92 -21
  111. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts +4 -14
  112. package/lib/types/components/workspaces/HomeWorkspaceRow.d.ts.map +1 -1
  113. package/lib/types/components/workspaces/HomeWorkspaceRow.js +26 -17
  114. package/lib/types/dsh-adapter/backend/session.d.ts +7 -1
  115. package/lib/types/dsh-adapter/backend/session.d.ts.map +1 -1
  116. package/lib/types/dsh-adapter/backend/session.js +74 -6
  117. package/lib/types/dsh-adapter/backend/translate.d.ts.map +1 -1
  118. package/lib/types/dsh-adapter/backend/translate.js +15 -6
  119. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts +1 -1
  120. package/lib/types/dsh-adapter/channel/agent-view-projection.d.ts.map +1 -1
  121. package/lib/types/dsh-adapter/channel/agent-view-projection.js +3 -1
  122. package/lib/types/dsh-adapter/channel/attached-context.d.ts +15 -2
  123. package/lib/types/dsh-adapter/channel/attached-context.d.ts.map +1 -1
  124. package/lib/types/dsh-adapter/channel/attached-context.js +26 -3
  125. package/lib/types/dsh-adapter/channel/binding-events.d.ts +3 -0
  126. package/lib/types/dsh-adapter/channel/binding-events.d.ts.map +1 -1
  127. package/lib/types/dsh-adapter/channel/binding-events.js +43 -2
  128. package/lib/types/dsh-adapter/channel/composer-images.d.ts +2 -0
  129. package/lib/types/dsh-adapter/channel/composer-images.d.ts.map +1 -1
  130. package/lib/types/dsh-adapter/channel/composer-images.js +10 -2
  131. package/lib/types/dsh-adapter/channel/composer-mentions.d.ts.map +1 -1
  132. package/lib/types/dsh-adapter/channel/composer-mentions.js +22 -7
  133. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts +3 -7
  134. package/lib/types/dsh-adapter/channel/context-bookkeeping.d.ts.map +1 -1
  135. package/lib/types/dsh-adapter/channel/context-bookkeeping.js +16 -6
  136. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts +6 -0
  137. package/lib/types/dsh-adapter/channel/core/binding-feed.d.ts.map +1 -1
  138. package/lib/types/dsh-adapter/channel/core/binding-feed.js +35 -1
  139. package/lib/types/dsh-adapter/channel/core/compose.d.ts +3 -7
  140. package/lib/types/dsh-adapter/channel/core/compose.d.ts.map +1 -1
  141. package/lib/types/dsh-adapter/channel/core/compose.js +6 -1
  142. package/lib/types/dsh-adapter/channel/core/local-actions.d.ts.map +1 -1
  143. package/lib/types/dsh-adapter/channel/core/local-actions.js +3 -26
  144. package/lib/types/dsh-adapter/channel/emitter.js +1 -1
  145. package/lib/types/dsh-adapter/channel/extensions.d.ts.map +1 -1
  146. package/lib/types/dsh-adapter/channel/extensions.js +8 -0
  147. package/lib/types/dsh-adapter/channel/input-actions.d.ts +4 -4
  148. package/lib/types/dsh-adapter/channel/input-actions.d.ts.map +1 -1
  149. package/lib/types/dsh-adapter/channel/input-actions.js +59 -5
  150. package/lib/types/dsh-adapter/channel/input-delivery.d.ts +3 -7
  151. package/lib/types/dsh-adapter/channel/input-delivery.d.ts.map +1 -1
  152. package/lib/types/dsh-adapter/channel/input-delivery.js +21 -8
  153. package/lib/types/dsh-adapter/channel/mentions.d.ts.map +1 -1
  154. package/lib/types/dsh-adapter/channel/mentions.js +21 -7
  155. package/lib/types/dsh-adapter/channel/model-actions.d.ts +4 -1
  156. package/lib/types/dsh-adapter/channel/model-actions.d.ts.map +1 -1
  157. package/lib/types/dsh-adapter/channel/model-actions.js +26 -9
  158. package/lib/types/dsh-adapter/channel/model-selection.d.ts +27 -2
  159. package/lib/types/dsh-adapter/channel/model-selection.d.ts.map +1 -1
  160. package/lib/types/dsh-adapter/channel/model-selection.js +81 -37
  161. package/lib/types/dsh-adapter/channel/model-switch.d.ts +1 -1
  162. package/lib/types/dsh-adapter/channel/model-switch.d.ts.map +1 -1
  163. package/lib/types/dsh-adapter/channel/paths.d.ts.map +1 -1
  164. package/lib/types/dsh-adapter/channel/paths.js +11 -9
  165. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts +1 -1
  166. package/lib/types/dsh-adapter/channel/session-live-adoption.d.ts.map +1 -1
  167. package/lib/types/dsh-adapter/channel/session-live-adoption.js +6 -1
  168. package/lib/types/dsh-adapter/channel/session-reset.d.ts.map +1 -1
  169. package/lib/types/dsh-adapter/channel/session-reset.js +3 -1
  170. package/lib/types/dsh-adapter/channel/session-resume.d.ts +1 -1
  171. package/lib/types/dsh-adapter/channel/session-resume.d.ts.map +1 -1
  172. package/lib/types/dsh-adapter/channel/session-resume.js +10 -3
  173. package/lib/types/dsh-adapter/channel/session-rewind.d.ts +1 -1
  174. package/lib/types/dsh-adapter/channel/session-rewind.d.ts.map +1 -1
  175. package/lib/types/dsh-adapter/channel/session-rewind.js +9 -3
  176. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts +1 -1
  177. package/lib/types/dsh-adapter/channel/session-tree-actions.d.ts.map +1 -1
  178. package/lib/types/dsh-adapter/channel/session-tree-actions.js +11 -5
  179. package/lib/types/dsh-adapter/channel/settings-host.d.ts.map +1 -1
  180. package/lib/types/dsh-adapter/channel/settings-host.js +6 -3
  181. package/lib/types/dsh-adapter/channel/transcript.d.ts +3 -2
  182. package/lib/types/dsh-adapter/channel/transcript.d.ts.map +1 -1
  183. package/lib/types/dsh-adapter/channel/transcript.js +13 -4
  184. package/lib/types/dsh-adapter/channel/types.d.ts +11 -2
  185. package/lib/types/dsh-adapter/channel/types.d.ts.map +1 -1
  186. package/lib/types/dsh-adapter/contract.d.ts +27 -3
  187. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  188. package/lib/types/dsh-adapter/contract.js +47 -5
  189. package/lib/types/dsh-adapter/entry-slot.d.ts +6 -0
  190. package/lib/types/dsh-adapter/entry-slot.d.ts.map +1 -1
  191. package/lib/types/dsh-adapter/experimental-bundles.d.ts +3 -0
  192. package/lib/types/dsh-adapter/experimental-bundles.d.ts.map +1 -1
  193. package/lib/types/dsh-adapter/experimental-bundles.js +4 -0
  194. package/lib/types/dsh-adapter/fresh-agent.d.ts +1 -1
  195. package/lib/types/dsh-adapter/fresh-agent.d.ts.map +1 -1
  196. package/lib/types/dsh-adapter/fresh-agent.js +60 -11
  197. package/lib/types/dsh-adapter/grant-file.d.ts +70 -0
  198. package/lib/types/dsh-adapter/grant-file.d.ts.map +1 -0
  199. package/lib/types/dsh-adapter/grant-file.js +178 -0
  200. package/lib/types/dsh-adapter/host-access.d.ts +4 -0
  201. package/lib/types/dsh-adapter/host-access.d.ts.map +1 -1
  202. package/lib/types/dsh-adapter/host-access.js +114 -15
  203. package/lib/types/dsh-adapter/host-contract.d.ts +1 -1
  204. package/lib/types/dsh-adapter/host-contract.d.ts.map +1 -1
  205. package/lib/types/dsh-adapter/host-contract.js +5 -3
  206. package/lib/types/dsh-adapter/host-dsh.d.ts +0 -8
  207. package/lib/types/dsh-adapter/host-dsh.d.ts.map +1 -1
  208. package/lib/types/dsh-adapter/host-dsh.js +27 -6
  209. package/lib/types/dsh-adapter/host-entry.js +4 -0
  210. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  211. package/lib/types/dsh-adapter/index.js +8 -5
  212. package/lib/types/dsh-adapter/oauth/profiles.d.ts.map +1 -1
  213. package/lib/types/dsh-adapter/oauth/profiles.js +14 -1
  214. package/lib/types/dsh-adapter/panels.d.ts +7 -1
  215. package/lib/types/dsh-adapter/panels.d.ts.map +1 -1
  216. package/lib/types/dsh-adapter/plugin-declaration.d.ts +28 -0
  217. package/lib/types/dsh-adapter/plugin-declaration.d.ts.map +1 -1
  218. package/lib/types/dsh-adapter/plugin-declaration.js +43 -1
  219. package/lib/types/dsh-adapter/plugin-install.d.ts +28 -1
  220. package/lib/types/dsh-adapter/plugin-install.d.ts.map +1 -1
  221. package/lib/types/dsh-adapter/plugin-install.js +160 -13
  222. package/lib/types/dsh-adapter/plugin-manage.d.ts +53 -10
  223. package/lib/types/dsh-adapter/plugin-manage.d.ts.map +1 -1
  224. package/lib/types/dsh-adapter/plugin-manage.js +240 -51
  225. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  226. package/lib/types/dsh-adapter/plugin.js +203 -58
  227. package/lib/types/dsh-adapter/plugins-info.d.ts +6 -7
  228. package/lib/types/dsh-adapter/plugins-info.d.ts.map +1 -1
  229. package/lib/types/dsh-adapter/plugins-info.js +34 -21
  230. package/lib/types/dsh-adapter/presets.d.ts +41 -10
  231. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  232. package/lib/types/dsh-adapter/presets.js +59 -12
  233. package/lib/types/dsh-adapter/process-exit.d.ts +1 -1
  234. package/lib/types/dsh-adapter/process-exit.js +1 -1
  235. package/lib/types/dsh-adapter/providerWizard.d.ts +2 -0
  236. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
  237. package/lib/types/dsh-adapter/providerWizard.js +11 -5
  238. package/lib/types/dsh-adapter/questions.d.ts +3 -4
  239. package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
  240. package/lib/types/dsh-adapter/questions.js +1 -1
  241. package/lib/types/dsh-adapter/row-attachment.d.ts +30 -0
  242. package/lib/types/dsh-adapter/row-attachment.d.ts.map +1 -0
  243. package/lib/types/dsh-adapter/row-attachment.js +29 -0
  244. package/lib/types/dsh-adapter/session-list-metadata.js +2 -2
  245. package/lib/types/dsh-adapter/subagents.d.ts +5 -0
  246. package/lib/types/dsh-adapter/subagents.d.ts.map +1 -1
  247. package/lib/types/dsh-adapter/subagents.js +22 -1
  248. package/lib/types/dsh-adapter/team-mode.d.ts +17 -10
  249. package/lib/types/dsh-adapter/team-mode.d.ts.map +1 -1
  250. package/lib/types/dsh-adapter/team-mode.js +19 -12
  251. package/lib/types/dsh-adapter/tool-scope.d.ts +24 -0
  252. package/lib/types/dsh-adapter/tool-scope.d.ts.map +1 -0
  253. package/lib/types/dsh-adapter/tool-scope.js +127 -0
  254. package/lib/types/dsh-adapter/types.d.ts +2 -1
  255. package/lib/types/dsh-adapter/types.d.ts.map +1 -1
  256. package/lib/types/dsh-adapter/worktree-tool.d.ts +27 -0
  257. package/lib/types/dsh-adapter/worktree-tool.d.ts.map +1 -0
  258. package/lib/types/dsh-adapter/worktree-tool.js +87 -0
  259. package/lib/types/heldInputs.d.ts +75 -0
  260. package/lib/types/heldInputs.d.ts.map +1 -0
  261. package/lib/types/heldInputs.js +409 -0
  262. package/lib/types/i18n.d.ts +577 -34
  263. package/lib/types/i18n.d.ts.map +1 -1
  264. package/lib/types/i18n.js +230 -22
  265. package/lib/types/ink/components/App.d.ts +2 -0
  266. package/lib/types/ink/components/App.d.ts.map +1 -1
  267. package/lib/types/ink/components/App.js +8 -0
  268. package/lib/types/ink/events/input-event.d.ts.map +1 -1
  269. package/lib/types/ink/events/input-event.js +7 -6
  270. package/lib/types/ink/hit-test.d.ts +2 -0
  271. package/lib/types/ink/hit-test.d.ts.map +1 -1
  272. package/lib/types/ink/hit-test.js +10 -0
  273. package/lib/types/ink/hooks/use-program-status.d.ts +1 -1
  274. package/lib/types/ink/hooks/use-program-status.d.ts.map +1 -1
  275. package/lib/types/ink/hooks/use-program-status.js +3 -2
  276. package/lib/types/ink/ink.d.ts +1 -0
  277. package/lib/types/ink/ink.d.ts.map +1 -1
  278. package/lib/types/ink/ink.js +5 -2
  279. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  280. package/lib/types/ink/parse-keypress.js +25 -0
  281. package/lib/types/ink/terminal.d.ts +13 -2
  282. package/lib/types/ink/terminal.d.ts.map +1 -1
  283. package/lib/types/ink/terminal.js +29 -5
  284. package/lib/types/onboardingDraft.d.ts +143 -0
  285. package/lib/types/onboardingDraft.d.ts.map +1 -0
  286. package/lib/types/onboardingDraft.js +71 -0
  287. package/lib/types/screens/Chat.d.ts.map +1 -1
  288. package/lib/types/screens/Chat.js +133 -32
  289. package/lib/types/screens/Onboarding.d.ts +22 -3
  290. package/lib/types/screens/Onboarding.d.ts.map +1 -1
  291. package/lib/types/screens/Onboarding.js +606 -36
  292. package/lib/types/screens/SessionSupervisor.d.ts +3 -6
  293. package/lib/types/screens/SessionSupervisor.d.ts.map +1 -1
  294. package/lib/types/screens/SessionSupervisor.js +5 -8
  295. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts +1 -2
  296. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.d.ts.map +1 -1
  297. package/lib/types/screens/sessionSupervisor/ForeignSessionPanes.js +2 -2
  298. package/lib/types/screens/sessionSupervisor/model.d.ts +1 -1
  299. package/lib/types/screens/sessionSupervisor/model.js +1 -1
  300. package/lib/types/sessionMounts.d.ts +12 -5
  301. package/lib/types/sessionMounts.d.ts.map +1 -1
  302. package/lib/types/sessionMounts.js +33 -6
  303. package/lib/types/settings/definitions.js +2 -2
  304. package/lib/types/update.d.ts +412 -20
  305. package/lib/types/update.d.ts.map +1 -1
  306. package/lib/types/update.js +2094 -193
  307. package/lib/types/updateHost.d.ts +198 -0
  308. package/lib/types/updateHost.d.ts.map +1 -0
  309. package/lib/types/updateHost.js +608 -0
  310. package/lib/types/utils/paths.d.ts +15 -0
  311. package/lib/types/utils/paths.d.ts.map +1 -1
  312. package/lib/types/utils/paths.js +25 -0
  313. package/lib/types/utils/processName.d.ts +16 -0
  314. package/lib/types/utils/processName.d.ts.map +1 -0
  315. package/lib/types/utils/processName.js +27 -0
  316. package/package.json +114 -108
  317. package/tui-profile/feed/README.md +1 -1
  318. package/tui-profile/feed/first-party.json +1 -1
@@ -72,12 +72,9 @@ export declare function SessionSupervisor({ channel, home, onClose, onOpenSessio
72
72
  * directly. It used to be offset by the `+` row that led the rail, which is
73
73
  * gone — a workspace joins the ledger by being a terminal's launch directory.
74
74
  *
75
- * `capacity` is a count of ENTRIES, not of terminal rows. It used to be handed
76
- * the row count, which is wrong for this list in a way that hides the cursor:
77
- * each entry is {@link WORKSPACE_ROW_LINES} rows tall, so treating rows as
78
- * entries made the window believe it could show twice as many workspaces as it
79
- * can, and the focused entry was simply clipped away by `overflow="hidden"`
80
- * while the user navigated it blind.
75
+ * `capacity` counts entries after accounting for {@link WORKSPACE_ROW_LINES}.
76
+ * Previously, two-line entries were budgeted as one terminal row, clipping
77
+ * the focused workspace out of the viewport.
81
78
  */
82
79
  export declare function railWindowTop(focus: number, entryCount: number, capacity: number): number;
83
80
  /** Re-exported so a regression can drive the spinner without importing ink. */
@@ -1 +1 @@
1
- {"version":3,"file":"SessionSupervisor.d.ts","sourceRoot":"","sources":["../../../src/screens/SessionSupervisor.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAahF,OAAO,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAA;AAEpE,OAAO,KAAK,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AAUzH,OAAO,KAAK,EAAqB,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC7E,OAAO,KAAK,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,iCAAiC,CAAA;AAC3E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAMpE,OAAO,EAA2L,mBAAmB,EAAsD,mBAAmB,EAAE,MAAM,8BAA8B,CAAA;AACpU,OAAO,EAAE,mBAAmB,EAAE,CAAA;AAE9B;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wB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EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAOzF;AAED,+EAA+E;AAC/E,OAAO,EAAE,YAAY,EAAE,CAAA"}
@@ -501,14 +501,14 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
501
501
  const next = { col: event.col, row: event.row, item: 0 };
502
502
  tabMenuRef.current = next;
503
503
  setTabMenu(next);
504
- } }) }))] }), _jsx(Divider, { bleed: true }), pathRows > 0 && (_jsx(Box, { flexDirection: "column", flexShrink: 0, paddingX: 1, ...pathTooltip, children: pathLines.map((line, index) => _jsx(Text, { dimColor: true, children: line }, index)) })), tab !== DSH_TAB && (_jsx(ForeignSessionPanes, { model: foreign, sourceLabel: activeSource?.label ?? tab, home: home, now: now, query: query, notice: notice, railVisible: railVisible, railWidth: railWidth, railEntryCapacity: visibleRailCapacity, sessionWidth: sessionWidth, rows: rows - pathRows, isTerminalFocused: isTerminalFocused, filterFocused: filterFocused, cursorActive: cursorActive, onFilterFocus: setFilterFocused })), tab === DSH_TAB && (_jsxs(Box, { flexDirection: "row", flexGrow: 1, flexShrink: 1, overflow: "hidden", children: [railVisible && (_jsxs("ink-box", { style: { flexDirection: 'column', width: railWidth, height: '100%', flexShrink: 0, overflow: 'hidden' }, onClick: focusRail, onMouseEnter: focusRail, onWheel: (event) => {
504
+ } }) }))] }), _jsx(Divider, { bleed: true }), pathRows > 0 && (_jsx(Box, { flexDirection: "column", flexShrink: 0, paddingX: 1, ...pathTooltip, children: pathLines.map((line, index) => _jsx(Text, { dimColor: true, children: line }, index)) })), tab !== DSH_TAB && (_jsx(ForeignSessionPanes, { model: foreign, sourceLabel: activeSource?.label ?? tab, now: now, query: query, notice: notice, railVisible: railVisible, railWidth: railWidth, railEntryCapacity: visibleRailCapacity, sessionWidth: sessionWidth, rows: rows - pathRows, isTerminalFocused: isTerminalFocused, filterFocused: filterFocused, cursorActive: cursorActive, onFilterFocus: setFilterFocused })), tab === DSH_TAB && (_jsxs(Box, { flexDirection: "row", flexGrow: 1, flexShrink: 1, overflow: "hidden", children: [railVisible && (_jsxs("ink-box", { style: { flexDirection: 'column', width: railWidth, height: '100%', flexShrink: 0, overflow: 'hidden' }, onClick: focusRail, onMouseEnter: focusRail, onWheel: (event) => {
505
505
  setFilterFocused(false);
506
506
  moveRail(event.deltaY >= 0 ? 1 : -1);
507
507
  }, children: [_jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", paddingX: 1, children: _jsx(Text, { dimColor: true, children: truncateWidth(railEntries.length === entries.length
508
508
  ? t('home-section-workspaces', { n: entries.length })
509
509
  : t('supervisor-workspace-groups', { registered: entries.length, history: railEntries.length - entries.length }), railWidth - 2) }) }), !loading && railEntries.length === 0 && (_jsx(Box, { paddingX: 1, children: _jsx(Text, { dimColor: true, italic: true, wrap: "truncate-end", children: truncateWidth(t('home-no-workspaces'), railWidth - 2) }) })), visibleRailRows.map((entry) => {
510
510
  const absolute = railEntries.indexOf(entry);
511
- return (_jsx(HomeWorkspaceRow, { title: entry.title, path: entry.path, home: home, sessionCount: countOf(entry), historyOnly: entry.from === 'unregistered', present: entry.present, selected: selected !== undefined && selected.id === entry.id, focused: activePane === 'rail' && railFocus === absolute, declareCursor: cursorActive && !searchCursor, width: railWidth, onSelect: (event) => {
511
+ return (_jsx(HomeWorkspaceRow, { title: entry.title, sessionCount: countOf(entry), historyOnly: entry.from === 'unregistered', present: entry.present, selected: selected !== undefined && selected.id === entry.id, focused: activePane === 'rail' && railFocus === absolute, declareCursor: cursorActive && !searchCursor, width: railWidth, onSelect: (event) => {
512
512
  event.stopImmediatePropagation();
513
513
  setFilterFocused(false);
514
514
  railRef.current = absolute;
@@ -586,12 +586,9 @@ export function SessionSupervisor({ channel, home, onClose, onOpenSession, onNew
586
586
  * directly. It used to be offset by the `+` row that led the rail, which is
587
587
  * gone — a workspace joins the ledger by being a terminal's launch directory.
588
588
  *
589
- * `capacity` is a count of ENTRIES, not of terminal rows. It used to be handed
590
- * the row count, which is wrong for this list in a way that hides the cursor:
591
- * each entry is {@link WORKSPACE_ROW_LINES} rows tall, so treating rows as
592
- * entries made the window believe it could show twice as many workspaces as it
593
- * can, and the focused entry was simply clipped away by `overflow="hidden"`
594
- * while the user navigated it blind.
589
+ * `capacity` counts entries after accounting for {@link WORKSPACE_ROW_LINES}.
590
+ * Previously, two-line entries were budgeted as one terminal row, clipping
591
+ * the focused workspace out of the viewport.
595
592
  */
596
593
  export function railWindowTop(focus, entryCount, capacity) {
597
594
  const entries = Math.max(1, capacity);
@@ -25,11 +25,10 @@ export declare function windowTop(focus: number, total: number, capacity: number
25
25
  * no workspace menu (the rail is derived, not a ledger), no new-session card,
26
26
  * no live state and no pins.
27
27
  */
28
- export declare function ForeignSessionPanes({ model, sourceLabel, home, now, query, notice, railVisible, railWidth, railEntryCapacity, sessionWidth, rows, isTerminalFocused, filterFocused, cursorActive, onFilterFocus, }: {
28
+ export declare function ForeignSessionPanes({ model, sourceLabel, now, query, notice, railVisible, railWidth, railEntryCapacity, sessionWidth, rows, isTerminalFocused, filterFocused, cursorActive, onFilterFocus, }: {
29
29
  model: ForeignSessionsModel;
30
30
  /** The active source's display name. */
31
31
  sourceLabel: string;
32
- home: string;
33
32
  now: number;
34
33
  query: string;
35
34
  notice: {
@@ -1 +1 @@
1
- {"version":3,"file":"ForeignSessionPanes.d.ts","sourceRoot":"","sources":["../../../../src/screens/sessionSupervisor/ForeignSessionPanes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAEnE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIhF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,WAAW,EACX,IAAI,EACJ,GAAG,EACH,KAAK,EACL,MAAM,EACN,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,IAAI,EACJ,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,aAAa,GACd,EAAE;IACD,KAAK,EAAE,oBAAoB,CAAA;IAC3B,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,SAAS,CAAA;IAC5D,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,iBAAiB,EAAE,MAAM,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,iBAAiB,EAAE,OAAO,CAAA;IAC1B,aAAa,EAAE,OAAO,CAAA;IACtB,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACtC,GAAG,KAAK,CAAC,SAAS,CAiKlB"}
1
+ {"version":3,"file":"ForeignSessionPanes.d.ts","sourceRoot":"","sources":["../../../../src/screens/sessionSupervisor/ForeignSessionPanes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAUzB,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAEnE;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,IAAI,CAAA;AAEzC;;;;;;;GAOG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIhF;AAED;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,EAClC,KAAK,EACL,WAAW,EACX,GAAG,EACH,KAAK,EACL,MAAM,EACN,WAAW,EACX,SAAS,EACT,iBAAiB,EACjB,YAAY,EACZ,IAAI,EACJ,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,aAAa,GACd,EAAE;IACD,KAAK,EAAE,oBAAoB,CAAA;IAC3B,wCAAwC;IACxC,WAAW,EAAE,MAAM,CAAA;IACnB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,GAAG,SAAS,CAAA;IAC5D,WAAW,EAAE,OAAO,CAAA;IACpB,SAAS,EAAE,MAAM,CAAA;IACjB,iBAAiB,EAAE,MAAM,CAAA;IACzB,YAAY,EAAE,MAAM,CAAA;IACpB,yCAAyC;IACzC,IAAI,EAAE,MAAM,CAAA;IACZ,iBAAiB,EAAE,OAAO,CAAA;IAC1B,aAAa,EAAE,OAAO,CAAA;IACtB,YAAY,EAAE,OAAO,CAAA;IACrB,aAAa,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;CACtC,GAAG,KAAK,CAAC,SAAS,CA+JlB"}
@@ -36,7 +36,7 @@ export function windowTop(focus, total, capacity) {
36
36
  * no workspace menu (the rail is derived, not a ledger), no new-session card,
37
37
  * no live state and no pins.
38
38
  */
39
- export function ForeignSessionPanes({ model, sourceLabel, home, now, query, notice, railVisible, railWidth, railEntryCapacity, sessionWidth, rows, isTerminalFocused, filterFocused, cursorActive, onFilterFocus, }) {
39
+ export function ForeignSessionPanes({ model, sourceLabel, now, query, notice, railVisible, railWidth, railEntryCapacity, sessionWidth, rows, isTerminalFocused, filterFocused, cursorActive, onFilterFocus, }) {
40
40
  const { groups, selected, railFocus, visibleRows, rowIndex, pane, loading } = model;
41
41
  const searchCursor = filterFocused || (!railVisible && pane === 'rail') || (pane === 'list' && visibleRows.length === 0);
42
42
  const activateRail = () => {
@@ -61,7 +61,7 @@ export function ForeignSessionPanes({ model, sourceLabel, home, now, query, noti
61
61
  model.moveRail(event.deltaY >= 0 ? 1 : -1);
62
62
  }, children: [_jsx(Box, { height: 1, flexShrink: 0, overflow: "hidden", paddingX: 1, children: _jsx(Text, { dimColor: true, children: truncateWidth(t('home-section-workspaces', { n: groups.length }), railWidth - 2) }) }), !loading && groups.length === 0 && (_jsx(Box, { paddingX: 1, children: _jsx(Text, { dimColor: true, italic: true, wrap: "truncate-end", children: truncateWidth(t('supervisor-foreign-empty', { source: sourceLabel }), railWidth - 2) }) })), railRows.map((group) => {
63
63
  const absolute = groups.indexOf(group);
64
- return (_jsx(HomeWorkspaceRow, { title: group.title, path: group.path, home: home, sessionCount: group.rows.length, present: group.present, selected: selected?.key === group.key, focused: pane === 'rail' && railFocus === absolute, declareCursor: cursorActive && !searchCursor, width: railWidth, onSelect: (event) => {
64
+ return (_jsx(HomeWorkspaceRow, { title: group.title, sessionCount: group.rows.length, present: group.present, selected: selected?.key === group.key, focused: pane === 'rail' && railFocus === absolute, declareCursor: cursorActive && !searchCursor, width: railWidth, onSelect: (event) => {
65
65
  event.stopImmediatePropagation();
66
66
  onFilterFocus(false);
67
67
  model.selectGroup(group);
@@ -18,7 +18,7 @@ import type { TuiWorkspaceEntry } from '../../workspaces.js';
18
18
  */
19
19
  export declare const RAIL_CHROME_ROWS = 4;
20
20
  /** Terminal rows one rail entry occupies; see {@link HomeWorkspaceRow}. */
21
- export declare const WORKSPACE_ROW_LINES = 2;
21
+ export declare const WORKSPACE_ROW_LINES = 1;
22
22
  /** Width the rail gets when the terminal is wide enough to show both panes. */
23
23
  export declare const RAIL_MIN_TOTAL_COLUMNS = 84;
24
24
  export declare const RAIL_WIDTH_MIN = 24;
@@ -20,7 +20,7 @@ import { stringWidth } from '../../ink/stringWidth.js';
20
20
  */
21
21
  export const RAIL_CHROME_ROWS = 4;
22
22
  /** Terminal rows one rail entry occupies; see {@link HomeWorkspaceRow}. */
23
- export const WORKSPACE_ROW_LINES = 2;
23
+ export const WORKSPACE_ROW_LINES = 1;
24
24
  /** Width the rail gets when the terminal is wide enough to show both panes. */
25
25
  export const RAIL_MIN_TOTAL_COLUMNS = 84;
26
26
  export const RAIL_WIDTH_MIN = 24;
@@ -11,12 +11,15 @@
11
11
  * the set of sessions it has mounted, and a reader that sees a foreign entry
12
12
  * treats the session as OCCUPIED and refuses to mount it.
13
13
  *
14
- * Liveness is one witness, `process.kill(pid, 0)`: it catches a clean exit and
15
- * a `kill -9`. There is no heartbeat timestamp, because a timestamp only stays
14
+ * Liveness starts with `process.kill(pid, 0)`: it catches a clean exit and
15
+ * a `kill -9`. On Linux, a surviving id must not be a non-leader thread: a TUI
16
+ * publishes its process id (TGID), but kill also accepts a recycled thread id.
17
+ * There is no heartbeat timestamp, because a timestamp only stays
16
18
  * truthful while a timer keeps refreshing it, and the process that cannot
17
19
  * refresh it is exactly the one whose record should expire. The cost is pid
18
- * REUSE — a recycled pid keeps a dead owner's record alive — which errs toward
19
- * refusing a session that is in fact free and costs one restart; the opposite
20
+ * REUSE — a recycled process id can keep a dead owner's record alive — which
21
+ * errs toward refusing a session that is in fact free until that process exits;
22
+ * the opposite
20
23
  * error interleaves two writers into one transcript. This is a same-machine
21
24
  * guard only: the host's own session write lock stays the authority that
22
25
  * actually separates writers.
@@ -114,7 +117,11 @@ export type MountClaim = {
114
117
  /**
115
118
  * Whether a process id is still alive. `process.kill(pid, 0)` sends no signal
116
119
  * and throws `ESRCH` when the process is gone; `EPERM` means it exists but is
117
- * owned by another user, which still counts as alive here.
120
+ * owned by another user, which still counts as alive here. Linux also accepts
121
+ * non-leader thread ids, which cannot own a TUI record: Node's process.pid is
122
+ * the thread group id. Only a readable, valid, different TGID disproves that
123
+ * identity, after confirming proc uses our PID namespace. Missing or unreadable
124
+ * proc information must preserve the owner.
118
125
  */
119
126
  export declare function pidAlive(pid: number): boolean;
120
127
  /**
@@ -1 +1 @@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;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAC7B;AAED,8EAA8E;AAC9E,MAAM,MAAM,sBAAsB,GAC9B;IAAE,QAAQ,CAAC,EAAE,EAAE,IAAI,CAAC;IAAC,QAAQ,CAAC,WAAW,EAAE,gBAAgB,CAAA;CAAE,GAC7D,YAAY,CAAA;AAEhB;;;;;;;;;;;GAWG;AACH,wBAAsB,YAAY,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,sBAAsB,CAAC,CAwBrF"}
@@ -11,12 +11,15 @@
11
11
  * the set of sessions it has mounted, and a reader that sees a foreign entry
12
12
  * treats the session as OCCUPIED and refuses to mount it.
13
13
  *
14
- * Liveness is one witness, `process.kill(pid, 0)`: it catches a clean exit and
15
- * a `kill -9`. There is no heartbeat timestamp, because a timestamp only stays
14
+ * Liveness starts with `process.kill(pid, 0)`: it catches a clean exit and
15
+ * a `kill -9`. On Linux, a surviving id must not be a non-leader thread: a TUI
16
+ * publishes its process id (TGID), but kill also accepts a recycled thread id.
17
+ * There is no heartbeat timestamp, because a timestamp only stays
16
18
  * truthful while a timer keeps refreshing it, and the process that cannot
17
19
  * refresh it is exactly the one whose record should expire. The cost is pid
18
- * REUSE — a recycled pid keeps a dead owner's record alive — which errs toward
19
- * refusing a session that is in fact free and costs one restart; the opposite
20
+ * REUSE — a recycled process id can keep a dead owner's record alive — which
21
+ * errs toward refusing a session that is in fact free until that process exits;
22
+ * the opposite
20
23
  * error interleaves two writers into one transcript. This is a same-machine
21
24
  * guard only: the host's own session write lock stays the authority that
22
25
  * actually separates writers.
@@ -74,7 +77,11 @@ const EMPTY = { kind: 'free' };
74
77
  /**
75
78
  * Whether a process id is still alive. `process.kill(pid, 0)` sends no signal
76
79
  * and throws `ESRCH` when the process is gone; `EPERM` means it exists but is
77
- * owned by another user, which still counts as alive here.
80
+ * owned by another user, which still counts as alive here. Linux also accepts
81
+ * non-leader thread ids, which cannot own a TUI record: Node's process.pid is
82
+ * the thread group id. Only a readable, valid, different TGID disproves that
83
+ * identity, after confirming proc uses our PID namespace. Missing or unreadable
84
+ * proc information must preserve the owner.
78
85
  */
79
86
  export function pidAlive(pid) {
80
87
  if (!Number.isInteger(pid) || pid <= 0)
@@ -83,11 +90,31 @@ export function pidAlive(pid) {
83
90
  return true;
84
91
  try {
85
92
  process.kill(pid, 0);
86
- return true;
87
93
  }
88
94
  catch (error) {
89
95
  return hasCode(error, 'EPERM');
90
96
  }
97
+ if (process.platform === 'linux') {
98
+ try {
99
+ // A proc mount from another PID namespace may use different ids from
100
+ // process.kill. Do not compare its thread identities with our pids.
101
+ const selfStatus = readFileSync('/proc/self/status', 'utf8');
102
+ const selfTgid = Number(/^Tgid:[\t ]+([1-9]\d*)[\t ]*$/m.exec(selfStatus)?.[1]);
103
+ // NStgid lists ids from the proc mount's namespace inward. Require one
104
+ // id: equal numbers in two namespaces still do not prove equal views.
105
+ const namespaceTgid = Number(/^NStgid:[\t ]+([1-9]\d*)[\t ]*$/m.exec(selfStatus)?.[1]);
106
+ if (selfTgid !== process.pid || namespaceTgid !== process.pid)
107
+ return true;
108
+ const status = readFileSync(`/proc/${pid}/status`, 'utf8');
109
+ const tgid = Number(/^Tgid:[\t ]+([1-9]\d*)[\t ]*$/m.exec(status)?.[1]);
110
+ if (Number.isSafeInteger(tgid) && tgid > 0 && tgid !== pid)
111
+ return false;
112
+ }
113
+ catch {
114
+ // An unavailable identity witness is not evidence that an owner is gone.
115
+ }
116
+ }
117
+ return true;
91
118
  }
92
119
  /** Parse one record, or undefined when the shape is wrong. */
93
120
  function parseOwner(value) {
@@ -502,8 +502,8 @@ export const SETTING_DEFINITIONS = {
502
502
  label: 'Tool background',
503
503
  descriptions: { zh: '工具卡背景' },
504
504
  group: 'appearance',
505
- hint: 'Choose whether tool-call cards add no, subtle, or strong background emphasis.',
506
- hintDescriptions: { zh: '选择工具调用卡片不添加、轻微或明显的背景强调。' },
505
+ hint: 'Choose whether tool-call cards add no, subtle, or strong background emphasis; also applies when expanded.',
506
+ hintDescriptions: { zh: '选择工具调用卡片不添加、轻微或明显的背景强调;展开后也生效。' },
507
507
  kind: 'select',
508
508
  options: [
509
509
  { value: 'none', label: 'None', descriptions: { zh: '无' } },