@deepseek-harness-tui/dsh-tui 0.8.8 → 0.9.1

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 (467) hide show
  1. package/README.md +60 -238
  2. package/bin/dsh-tui.js +172 -5
  3. package/cordis.patch.yml +16 -4
  4. package/dsh-ecosystem-spec/protocols/profile-definitions.d.ts +13 -13
  5. package/dsh-ecosystem-spec/protocols/profile-definitions.js +59 -59
  6. package/dsh-ecosystem-spec/protocols/tui-channel-http.d.ts +15 -15
  7. package/dsh-ecosystem-spec/protocols/tui-channel-http.js +32 -32
  8. package/dsh-ecosystem-spec/protocols/tui-channel.d.ts +59 -59
  9. package/dsh-ecosystem-spec/protocols/tui-channel.js +166 -166
  10. package/dsh-ecosystem-spec/protocols/tui-contributions.d.ts +42 -42
  11. package/dsh-ecosystem-spec/protocols/tui-contributions.js +143 -143
  12. package/dsh-ecosystem-spec/registry/README.md +14 -14
  13. package/dsh-ecosystem-spec/registry/host-descriptor.tui.example.json +56 -56
  14. package/dsh-ecosystem-spec/registry/permissions-0.1.json +13 -13
  15. package/dsh-ecosystem-spec/registry/registry-0.15.json +149 -149
  16. package/lib/types/cc/hyperlink.d.ts +7 -1
  17. package/lib/types/cc/hyperlink.d.ts.map +1 -1
  18. package/lib/types/cc/hyperlink.js +3 -2
  19. package/lib/types/cc/markdown.d.ts.map +1 -1
  20. package/lib/types/cc/markdown.js +33 -3
  21. package/lib/types/cc/sessionColors.d.ts +27 -0
  22. package/lib/types/cc/sessionColors.d.ts.map +1 -0
  23. package/lib/types/cc/sessionColors.js +39 -0
  24. package/lib/types/commands.d.ts.map +1 -1
  25. package/lib/types/commands.js +10 -2
  26. package/lib/types/components/ActivityPicker.d.ts +4 -1
  27. package/lib/types/components/ActivityPicker.d.ts.map +1 -1
  28. package/lib/types/components/ActivityPicker.js +2 -2
  29. package/lib/types/components/AutoRecapRow.d.ts +23 -0
  30. package/lib/types/components/AutoRecapRow.d.ts.map +1 -0
  31. package/lib/types/components/AutoRecapRow.js +23 -0
  32. package/lib/types/components/BtwPanel.d.ts.map +1 -1
  33. package/lib/types/components/BtwPanel.js +1 -1
  34. package/lib/types/components/Chat/SubagentMessage.d.ts +2 -1
  35. package/lib/types/components/Chat/SubagentMessage.d.ts.map +1 -1
  36. package/lib/types/components/Chat/SubagentMessage.js +11 -3
  37. package/lib/types/components/ColorPicker.d.ts +17 -0
  38. package/lib/types/components/ColorPicker.d.ts.map +1 -0
  39. package/lib/types/components/ColorPicker.js +20 -0
  40. package/lib/types/components/CommandSuggestions.d.ts +23 -4
  41. package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
  42. package/lib/types/components/CommandSuggestions.js +41 -14
  43. package/lib/types/components/ContextBarView.d.ts +33 -0
  44. package/lib/types/components/ContextBarView.d.ts.map +1 -0
  45. package/lib/types/components/ContextBarView.js +46 -0
  46. package/lib/types/components/EffortInputBorder.d.ts +12 -1
  47. package/lib/types/components/EffortInputBorder.d.ts.map +1 -1
  48. package/lib/types/components/EffortInputBorder.js +22 -5
  49. package/lib/types/components/EffortSlider.d.ts +4 -1
  50. package/lib/types/components/EffortSlider.d.ts.map +1 -1
  51. package/lib/types/components/EffortSlider.js +4 -2
  52. package/lib/types/components/ExtensionDialog.js +6 -2
  53. package/lib/types/components/FileActionsPanel.d.ts +22 -0
  54. package/lib/types/components/FileActionsPanel.d.ts.map +1 -0
  55. package/lib/types/components/FileActionsPanel.js +28 -0
  56. package/lib/types/components/FileSuggestions.d.ts +26 -7
  57. package/lib/types/components/FileSuggestions.d.ts.map +1 -1
  58. package/lib/types/components/FileSuggestions.js +39 -12
  59. package/lib/types/components/GoalTodoPanel.d.ts +26 -2
  60. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  61. package/lib/types/components/GoalTodoPanel.js +86 -17
  62. package/lib/types/components/HelpMenu.d.ts +7 -1
  63. package/lib/types/components/HelpMenu.d.ts.map +1 -1
  64. package/lib/types/components/HelpMenu.js +12 -4
  65. package/lib/types/components/HistorySearchDialog.d.ts +4 -1
  66. package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
  67. package/lib/types/components/HistorySearchDialog.js +2 -2
  68. package/lib/types/components/LangPicker.d.ts +14 -0
  69. package/lib/types/components/LangPicker.d.ts.map +1 -0
  70. package/lib/types/components/LangPicker.js +17 -0
  71. package/lib/types/components/LoadedContextPanel.d.ts.map +1 -1
  72. package/lib/types/components/LoadedContextPanel.js +3 -1
  73. package/lib/types/components/Markdown.d.ts.map +1 -1
  74. package/lib/types/components/Markdown.js +12 -3
  75. package/lib/types/components/MessageList.d.ts +45 -2
  76. package/lib/types/components/MessageList.d.ts.map +1 -1
  77. package/lib/types/components/MessageList.js +560 -41
  78. package/lib/types/components/ModelPicker.d.ts +27 -2
  79. package/lib/types/components/ModelPicker.d.ts.map +1 -1
  80. package/lib/types/components/ModelPicker.js +26 -6
  81. package/lib/types/components/PermissionsPicker.d.ts +21 -0
  82. package/lib/types/components/PermissionsPicker.d.ts.map +1 -0
  83. package/lib/types/components/PermissionsPicker.js +27 -0
  84. package/lib/types/components/PlanPicker.d.ts +15 -0
  85. package/lib/types/components/PlanPicker.d.ts.map +1 -0
  86. package/lib/types/components/PlanPicker.js +18 -0
  87. package/lib/types/components/PresetPicker.d.ts +4 -1
  88. package/lib/types/components/PresetPicker.d.ts.map +1 -1
  89. package/lib/types/components/PresetPicker.js +2 -2
  90. package/lib/types/components/PromptInput.d.ts +4 -3
  91. package/lib/types/components/PromptInput.d.ts.map +1 -1
  92. package/lib/types/components/PromptInput.js +602 -75
  93. package/lib/types/components/RecapPanel.d.ts +25 -0
  94. package/lib/types/components/RecapPanel.d.ts.map +1 -0
  95. package/lib/types/components/RecapPanel.js +55 -0
  96. package/lib/types/components/RewindPicker.d.ts +12 -1
  97. package/lib/types/components/RewindPicker.d.ts.map +1 -1
  98. package/lib/types/components/RewindPicker.js +6 -4
  99. package/lib/types/components/ScrollbarGutter.d.ts +28 -0
  100. package/lib/types/components/ScrollbarGutter.d.ts.map +1 -0
  101. package/lib/types/components/ScrollbarGutter.js +119 -0
  102. package/lib/types/components/Select.d.ts +8 -1
  103. package/lib/types/components/Select.d.ts.map +1 -1
  104. package/lib/types/components/Select.js +4 -2
  105. package/lib/types/components/SkillsPicker.d.ts +4 -1
  106. package/lib/types/components/SkillsPicker.d.ts.map +1 -1
  107. package/lib/types/components/SkillsPicker.js +2 -2
  108. package/lib/types/components/SubagentCard.d.ts +2 -1
  109. package/lib/types/components/SubagentCard.d.ts.map +1 -1
  110. package/lib/types/components/SubagentCard.js +9 -2
  111. package/lib/types/components/SubagentDashboard.d.ts +4 -0
  112. package/lib/types/components/SubagentDashboard.d.ts.map +1 -1
  113. package/lib/types/components/SubagentDashboard.js +9 -1
  114. package/lib/types/components/SubagentDetailScene.d.ts.map +1 -1
  115. package/lib/types/components/SubagentDetailScene.js +5 -4
  116. package/lib/types/components/SuggestionCard.d.ts +65 -0
  117. package/lib/types/components/SuggestionCard.d.ts.map +1 -0
  118. package/lib/types/components/SuggestionCard.js +77 -0
  119. package/lib/types/components/ThemePicker.d.ts +4 -1
  120. package/lib/types/components/ThemePicker.d.ts.map +1 -1
  121. package/lib/types/components/ThemePicker.js +2 -2
  122. package/lib/types/components/ThinkingToggle.d.ts +4 -1
  123. package/lib/types/components/ThinkingToggle.d.ts.map +1 -1
  124. package/lib/types/components/ThinkingToggle.js +2 -2
  125. package/lib/types/components/TimelineRail.d.ts +53 -0
  126. package/lib/types/components/TimelineRail.d.ts.map +1 -0
  127. package/lib/types/components/TimelineRail.js +197 -0
  128. package/lib/types/components/WorkspaceFlowPicker.d.ts +6 -1
  129. package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -1
  130. package/lib/types/components/WorkspaceFlowPicker.js +4 -2
  131. package/lib/types/components/WorkspaceMenuPicker.d.ts +19 -0
  132. package/lib/types/components/WorkspaceMenuPicker.d.ts.map +1 -0
  133. package/lib/types/components/WorkspaceMenuPicker.js +19 -0
  134. package/lib/types/components/WorkspacePicker.d.ts +4 -1
  135. package/lib/types/components/WorkspacePicker.d.ts.map +1 -1
  136. package/lib/types/components/WorkspacePicker.js +2 -2
  137. package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
  138. package/lib/types/components/approvals/ApprovalPanel.js +5 -1
  139. package/lib/types/components/design-system/ListItem.d.ts +8 -1
  140. package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
  141. package/lib/types/components/design-system/ListItem.js +8 -3
  142. package/lib/types/components/design-system/ThemeProvider.d.ts +7 -0
  143. package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
  144. package/lib/types/components/design-system/ThemeProvider.js +2 -1
  145. package/lib/types/components/messages/AssistantTextMessage.d.ts +5 -2
  146. package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -1
  147. package/lib/types/components/messages/AssistantTextMessage.js +6 -2
  148. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +2 -1
  149. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
  150. package/lib/types/components/messages/AssistantThinkingMessage.js +10 -4
  151. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +15 -1
  152. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  153. package/lib/types/components/messages/AssistantToolUseMessage.js +37 -7
  154. package/lib/types/components/messages/UserPromptMessage.d.ts +2 -1
  155. package/lib/types/components/messages/UserPromptMessage.d.ts.map +1 -1
  156. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +7 -3
  157. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  158. package/lib/types/components/questions/AskUserQuestionPanel.js +75 -11
  159. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
  160. package/lib/types/components/questions/PlanReviewPanel.js +13 -2
  161. package/lib/types/components/sessions/SessionListRow.d.ts +4 -1
  162. package/lib/types/components/sessions/SessionListRow.d.ts.map +1 -1
  163. package/lib/types/components/sessions/SessionListRow.js +4 -2
  164. package/lib/types/components/trajectory/HotspotView.d.ts +7 -1
  165. package/lib/types/components/trajectory/HotspotView.d.ts.map +1 -1
  166. package/lib/types/components/trajectory/HotspotView.js +8 -2
  167. package/lib/types/components/trajectory/Ledger.d.ts +9 -1
  168. package/lib/types/components/trajectory/Ledger.d.ts.map +1 -1
  169. package/lib/types/components/trajectory/Ledger.js +23 -5
  170. package/lib/types/components/trajectory/WaveBand.d.ts +10 -1
  171. package/lib/types/components/trajectory/WaveBand.d.ts.map +1 -1
  172. package/lib/types/components/trajectory/WaveBand.js +7 -2
  173. package/lib/types/dsh-adapter/channel.d.ts +117 -7
  174. package/lib/types/dsh-adapter/channel.d.ts.map +1 -1
  175. package/lib/types/dsh-adapter/channel.js +1301 -122
  176. package/lib/types/dsh-adapter/compat/index.d.ts +8 -6
  177. package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -1
  178. package/lib/types/dsh-adapter/compat/index.js +8 -6
  179. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +150 -0
  180. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -1
  181. package/lib/types/dsh-adapter/compat/sessionLog.js +518 -41
  182. package/lib/types/dsh-adapter/contract.d.ts +1 -1
  183. package/lib/types/dsh-adapter/contract.d.ts.map +1 -1
  184. package/lib/types/dsh-adapter/contract.js +1 -0
  185. package/lib/types/dsh-adapter/extension-events.d.ts +1 -1
  186. package/lib/types/dsh-adapter/extension-events.d.ts.map +1 -1
  187. package/lib/types/dsh-adapter/index.d.ts +20 -2
  188. package/lib/types/dsh-adapter/index.d.ts.map +1 -1
  189. package/lib/types/dsh-adapter/index.js +9 -1
  190. package/lib/types/dsh-adapter/plugin.d.ts +0 -9
  191. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -1
  192. package/lib/types/dsh-adapter/plugin.js +453 -14
  193. package/lib/types/dsh-adapter/presets.d.ts +18 -0
  194. package/lib/types/dsh-adapter/presets.d.ts.map +1 -1
  195. package/lib/types/dsh-adapter/presets.js +31 -0
  196. package/lib/types/dsh-adapter/providerWizard.d.ts +29 -1
  197. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -1
  198. package/lib/types/dsh-adapter/providerWizard.js +89 -5
  199. package/lib/types/dsh-adapter/questions.d.ts +19 -2
  200. package/lib/types/dsh-adapter/questions.d.ts.map +1 -1
  201. package/lib/types/dsh-adapter/questions.js +53 -10
  202. package/lib/types/dsh-adapter/recap.d.ts +49 -0
  203. package/lib/types/dsh-adapter/recap.d.ts.map +1 -0
  204. package/lib/types/dsh-adapter/recap.js +121 -0
  205. package/lib/types/dsh-adapter/sessionTree.d.ts +314 -0
  206. package/lib/types/dsh-adapter/sessionTree.d.ts.map +1 -0
  207. package/lib/types/dsh-adapter/sessionTree.js +954 -0
  208. package/lib/types/dsh-adapter/shortcuts.d.ts +15 -44
  209. package/lib/types/dsh-adapter/shortcuts.d.ts.map +1 -1
  210. package/lib/types/dsh-adapter/shortcuts.js +28 -165
  211. package/lib/types/dsh-adapter/types.d.ts +1 -1
  212. package/lib/types/dsh-adapter/types.d.ts.map +1 -1
  213. package/lib/types/herdr.js +1 -1
  214. package/lib/types/i18n.d.ts +770 -181
  215. package/lib/types/i18n.d.ts.map +1 -1
  216. package/lib/types/i18n.js +257 -80
  217. package/lib/types/ink/components/AlternateScreen.d.ts.map +1 -1
  218. package/lib/types/ink/components/AlternateScreen.js +13 -1
  219. package/lib/types/ink/components/App.d.ts +12 -1
  220. package/lib/types/ink/components/App.d.ts.map +1 -1
  221. package/lib/types/ink/components/App.js +101 -4
  222. package/lib/types/ink/components/ClockContext.d.ts.map +1 -1
  223. package/lib/types/ink/components/ClockContext.js +2 -0
  224. package/lib/types/ink/components/ScrollBox.d.ts.map +1 -1
  225. package/lib/types/ink/components/ScrollBox.js +170 -91
  226. package/lib/types/ink/constants.d.ts +9 -0
  227. package/lib/types/ink/constants.d.ts.map +1 -1
  228. package/lib/types/ink/constants.js +9 -0
  229. package/lib/types/ink/events/click-event.d.ts +7 -16
  230. package/lib/types/ink/events/click-event.d.ts.map +1 -1
  231. package/lib/types/ink/events/click-event.js +16 -19
  232. package/lib/types/ink/events/event-handlers.d.ts +11 -1
  233. package/lib/types/ink/events/event-handlers.d.ts.map +1 -1
  234. package/lib/types/ink/events/event-handlers.js +2 -0
  235. package/lib/types/ink/events/input-event.d.ts +9 -0
  236. package/lib/types/ink/events/input-event.d.ts.map +1 -1
  237. package/lib/types/ink/events/input-event.js +4 -0
  238. package/lib/types/ink/events/pointer-event.d.ts +61 -0
  239. package/lib/types/ink/events/pointer-event.d.ts.map +1 -0
  240. package/lib/types/ink/events/pointer-event.js +61 -0
  241. package/lib/types/ink/events/wheel-event.d.ts +17 -0
  242. package/lib/types/ink/events/wheel-event.d.ts.map +1 -0
  243. package/lib/types/ink/events/wheel-event.js +20 -0
  244. package/lib/types/ink/geometry-trace.d.ts +51 -0
  245. package/lib/types/ink/geometry-trace.d.ts.map +1 -0
  246. package/lib/types/ink/geometry-trace.js +83 -0
  247. package/lib/types/ink/hit-test.d.ts +56 -1
  248. package/lib/types/ink/hit-test.d.ts.map +1 -1
  249. package/lib/types/ink/hit-test.js +146 -8
  250. package/lib/types/ink/ink.d.ts +58 -1
  251. package/lib/types/ink/ink.d.ts.map +1 -1
  252. package/lib/types/ink/ink.js +230 -29
  253. package/lib/types/ink/log-update.d.ts.map +1 -1
  254. package/lib/types/ink/log-update.js +21 -0
  255. package/lib/types/ink/node-cache.d.ts +5 -0
  256. package/lib/types/ink/node-cache.d.ts.map +1 -1
  257. package/lib/types/ink/parse-keypress.d.ts +8 -0
  258. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  259. package/lib/types/ink/parse-keypress.js +101 -12
  260. package/lib/types/ink/render-node-to-output.d.ts +10 -0
  261. package/lib/types/ink/render-node-to-output.d.ts.map +1 -1
  262. package/lib/types/ink/render-node-to-output.js +111 -18
  263. package/lib/types/ink/timeline-rail.d.ts +138 -0
  264. package/lib/types/ink/timeline-rail.d.ts.map +1 -0
  265. package/lib/types/ink/timeline-rail.js +179 -0
  266. package/lib/types/ink/wrap-text.d.ts.map +1 -1
  267. package/lib/types/ink/wrap-text.js +47 -5
  268. package/lib/types/migrationPrefs.d.ts +60 -0
  269. package/lib/types/migrationPrefs.d.ts.map +1 -0
  270. package/lib/types/migrationPrefs.js +97 -0
  271. package/lib/types/modelGroups.d.ts +72 -0
  272. package/lib/types/modelGroups.d.ts.map +1 -0
  273. package/lib/types/modelGroups.js +97 -0
  274. package/lib/types/modelRecents.d.ts +39 -0
  275. package/lib/types/modelRecents.d.ts.map +1 -0
  276. package/lib/types/modelRecents.js +97 -0
  277. package/lib/types/native-ts/yoga-layout/index.d.ts +11 -0
  278. package/lib/types/native-ts/yoga-layout/index.d.ts.map +1 -1
  279. package/lib/types/native-ts/yoga-layout/index.js +31 -1
  280. package/lib/types/oauth.d.ts +15 -0
  281. package/lib/types/oauth.d.ts.map +1 -0
  282. package/lib/types/oauth.js +14 -0
  283. package/lib/types/reload.d.ts +109 -0
  284. package/lib/types/reload.d.ts.map +1 -0
  285. package/lib/types/reload.js +118 -0
  286. package/lib/types/screens/Chat.d.ts +3 -1
  287. package/lib/types/screens/Chat.d.ts.map +1 -1
  288. package/lib/types/screens/Chat.js +1377 -371
  289. package/lib/types/screens/SessionBrowser.d.ts.map +1 -1
  290. package/lib/types/screens/SessionBrowser.js +56 -29
  291. package/lib/types/screens/SessionTree.d.ts +27 -0
  292. package/lib/types/screens/SessionTree.d.ts.map +1 -0
  293. package/lib/types/screens/SessionTree.js +555 -0
  294. package/lib/types/screens/Settings.d.ts.map +1 -1
  295. package/lib/types/screens/Settings.js +64 -22
  296. package/lib/types/screens/StatusLine.d.ts +0 -8
  297. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  298. package/lib/types/screens/StatusLine.js +224 -45
  299. package/lib/types/screens/StatusMetrics.d.ts +35 -3
  300. package/lib/types/screens/StatusMetrics.d.ts.map +1 -1
  301. package/lib/types/screens/StatusMetrics.js +63 -8
  302. package/lib/types/screens/TrajectoryScene.d.ts.map +1 -1
  303. package/lib/types/screens/TrajectoryScene.js +81 -14
  304. package/lib/types/screens/chatOverlay.d.ts +237 -0
  305. package/lib/types/screens/chatOverlay.d.ts.map +1 -0
  306. package/lib/types/screens/chatOverlay.js +116 -0
  307. package/lib/types/tips.d.ts.map +1 -1
  308. package/lib/types/tips.js +64 -10
  309. package/lib/types/tuiDisplayPrefs.d.ts +15 -0
  310. package/lib/types/tuiDisplayPrefs.d.ts.map +1 -1
  311. package/lib/types/tuiDisplayPrefs.js +9 -0
  312. package/lib/types/update.d.ts +139 -0
  313. package/lib/types/update.d.ts.map +1 -1
  314. package/lib/types/update.js +382 -30
  315. package/lib/types/utils/debug.d.ts +10 -0
  316. package/lib/types/utils/debug.d.ts.map +1 -1
  317. package/lib/types/utils/debug.js +24 -0
  318. package/lib/types/utils/fileTarget.d.ts +46 -0
  319. package/lib/types/utils/fileTarget.d.ts.map +1 -0
  320. package/lib/types/utils/fileTarget.js +178 -0
  321. package/lib/types/utils/keymap.d.ts +134 -0
  322. package/lib/types/utils/keymap.d.ts.map +1 -0
  323. package/lib/types/utils/keymap.js +311 -0
  324. package/lib/types/utils/mentions.d.ts +25 -2
  325. package/lib/types/utils/mentions.d.ts.map +1 -1
  326. package/lib/types/utils/mentions.js +69 -10
  327. package/lib/types/utils/openExternal.d.ts +50 -0
  328. package/lib/types/utils/openExternal.d.ts.map +1 -0
  329. package/lib/types/utils/openExternal.js +170 -0
  330. package/lib/types/utils/paths.d.ts.map +1 -1
  331. package/lib/types/utils/paths.js +1 -0
  332. package/node_modules/@deepseek-harness-tui/dsh-auth/LICENSE +21 -0
  333. package/node_modules/@deepseek-harness-tui/dsh-auth/README.md +140 -0
  334. package/node_modules/@deepseek-harness-tui/dsh-auth/cordis.patch.yml +11 -0
  335. package/node_modules/@deepseek-harness-tui/dsh-auth/dsh-plugin.json +44 -0
  336. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/command.d.ts +14 -0
  337. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/command.js +67 -0
  338. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.d.ts +64 -0
  339. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/credentials.js +170 -0
  340. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.d.ts +79 -0
  341. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/index.js +196 -0
  342. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.d.ts +68 -0
  343. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/interaction.js +193 -0
  344. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/opener.d.ts +32 -0
  345. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/opener.js +101 -0
  346. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.d.ts +31 -0
  347. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/profiles.js +68 -0
  348. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.d.ts +69 -0
  349. package/node_modules/@deepseek-harness-tui/dsh-auth/lib/service.js +129 -0
  350. package/node_modules/@deepseek-harness-tui/dsh-auth/package.json +70 -0
  351. package/node_modules/@dsh-std/command/CHANGELOG.md +8 -8
  352. package/node_modules/@dsh-std/command/LICENSE +21 -21
  353. package/node_modules/@dsh-std/command/README.md +26 -26
  354. package/node_modules/@dsh-std/command/README.zh.md +28 -28
  355. package/node_modules/@dsh-std/command/lib/index.js.map +1 -1
  356. package/node_modules/@dsh-std/command/package.json +22 -22
  357. package/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  358. package/node_modules/@dsh-std/connection/LICENSE +21 -21
  359. package/node_modules/@dsh-std/connection/README.md +42 -42
  360. package/node_modules/@dsh-std/connection/README.zh.md +42 -42
  361. package/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  362. package/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  363. package/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  364. package/node_modules/@dsh-std/connection/package.json +20 -20
  365. package/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  366. package/node_modules/@dsh-std/core/LICENSE +21 -21
  367. package/node_modules/@dsh-std/core/README.md +13 -13
  368. package/node_modules/@dsh-std/core/README.zh.md +13 -13
  369. package/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  370. package/node_modules/@dsh-std/core/package.json +21 -21
  371. package/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
  372. package/node_modules/@dsh-std/manifest/LICENSE +21 -21
  373. package/node_modules/@dsh-std/manifest/README.md +5 -5
  374. package/node_modules/@dsh-std/manifest/README.zh.md +5 -5
  375. package/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
  376. package/node_modules/@dsh-std/manifest/package.json +20 -20
  377. package/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
  378. package/node_modules/@dsh-std/messages/CHANGELOG.md +8 -8
  379. package/node_modules/@dsh-std/messages/LICENSE +21 -21
  380. package/node_modules/@dsh-std/messages/README.md +5 -5
  381. package/node_modules/@dsh-std/messages/README.zh.md +7 -7
  382. package/node_modules/@dsh-std/messages/lib/index.js.map +1 -1
  383. package/node_modules/@dsh-std/messages/package.json +20 -20
  384. package/node_modules/@dsh-std/messages/schema/message-observer-envelope-0.15.schema.json +54 -54
  385. package/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
  386. package/node_modules/@dsh-std/presentation/LICENSE +21 -21
  387. package/node_modules/@dsh-std/presentation/README.md +27 -27
  388. package/node_modules/@dsh-std/presentation/README.zh.md +29 -29
  389. package/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
  390. package/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
  391. package/node_modules/@dsh-std/presentation/package.json +25 -25
  392. package/node_modules/@dsh-std/storage/CHANGELOG.md +8 -8
  393. package/node_modules/@dsh-std/storage/LICENSE +21 -21
  394. package/node_modules/@dsh-std/storage/README.md +5 -5
  395. package/node_modules/@dsh-std/storage/README.zh.md +7 -7
  396. package/node_modules/@dsh-std/storage/lib/index.js.map +1 -1
  397. package/node_modules/@dsh-std/storage/package.json +20 -20
  398. package/node_modules/@dsh-std/storage/schema/local-storage-0.15.schema.json +56 -56
  399. package/package.json +19 -5
  400. package/presets/liangshen/.dsh-tui-managed.json +1 -1
  401. package/presets/liangshen/instruction-hint.mjs +8 -0
  402. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  403. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/LICENSE +21 -21
  404. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.md +42 -42
  405. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/README.zh.md +42 -42
  406. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  407. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  408. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  409. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/connection/package.json +20 -20
  410. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  411. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/LICENSE +21 -21
  412. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.md +13 -13
  413. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/README.zh.md +13 -13
  414. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  415. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/core/package.json +21 -21
  416. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/CHANGELOG.md +9 -9
  417. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/LICENSE +21 -21
  418. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.md +5 -5
  419. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/README.zh.md +5 -5
  420. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/lib/index.js.map +1 -1
  421. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/package.json +20 -20
  422. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/manifest/schema/dsh-plugin-0.15.schema.json +144 -144
  423. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/CHANGELOG.md +9 -9
  424. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/LICENSE +21 -21
  425. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.md +27 -27
  426. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/README.zh.md +29 -29
  427. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/callback.js.map +1 -1
  428. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/lib/index.js.map +1 -1
  429. package/vendor/dsh-std/packages/command/node_modules/@dsh-std/presentation/package.json +25 -25
  430. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  431. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/LICENSE +21 -21
  432. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.md +13 -13
  433. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/README.zh.md +13 -13
  434. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  435. package/vendor/dsh-std/packages/connection/node_modules/@dsh-std/core/package.json +21 -21
  436. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  437. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/LICENSE +21 -21
  438. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.md +13 -13
  439. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/README.zh.md +13 -13
  440. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  441. package/vendor/dsh-std/packages/manifest/node_modules/@dsh-std/core/package.json +21 -21
  442. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  443. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/LICENSE +21 -21
  444. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.md +13 -13
  445. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/README.zh.md +13 -13
  446. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  447. package/vendor/dsh-std/packages/messages/node_modules/@dsh-std/core/package.json +21 -21
  448. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/CHANGELOG.md +8 -8
  449. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/LICENSE +21 -21
  450. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.md +42 -42
  451. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/README.zh.md +42 -42
  452. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/index.js.map +1 -1
  453. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/memory.js.map +1 -1
  454. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/lib/resolve-3X6ausgz.js.map +1 -1
  455. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/connection/package.json +20 -20
  456. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  457. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/LICENSE +21 -21
  458. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.md +13 -13
  459. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/README.zh.md +13 -13
  460. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  461. package/vendor/dsh-std/packages/presentation/node_modules/@dsh-std/core/package.json +21 -21
  462. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/CHANGELOG.md +8 -8
  463. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/LICENSE +21 -21
  464. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.md +13 -13
  465. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/README.zh.md +13 -13
  466. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/lib/index.js.map +1 -1
  467. package/vendor/dsh-std/packages/storage/node_modules/@dsh-std/core/package.json +21 -21
@@ -160,6 +160,39 @@ export function Settings({ channel, onClose, }) {
160
160
  setNotice(undefined);
161
161
  bump();
162
162
  };
163
+ /**
164
+ * Activate one focusable entry — the keyboard Enter path, shared with the
165
+ * mouse click. Groups open their subpage; boolean/select fields cycle their
166
+ * value; text/secret fields enter the edit mode.
167
+ */
168
+ const activateEntry = (entry) => {
169
+ if (entry.kind === 'group') {
170
+ setActiveGroup({ ns: entry.ns, id: entry.group.id });
171
+ setFocusIndex(0);
172
+ setWindowStart(0);
173
+ return;
174
+ }
175
+ // A save in flight owns the section's drafts; starting an edit mid-write
176
+ // is exactly the lost-draft race the staged model exists to prevent.
177
+ const form = forms.get(entry.ns);
178
+ if (form === undefined || !form.available || form.saving)
179
+ return;
180
+ if (entry.field.kind === 'boolean' || entry.field.kind === 'select') {
181
+ cycleField(entry.ns, entry.field);
182
+ }
183
+ else {
184
+ setEditing({ ns: entry.ns, field: entry.field, draft: form.field(entry.field).text });
185
+ setMode('edit');
186
+ }
187
+ };
188
+ /** Mouse wheel moves the focus (the window is focus-follow, so moving the
189
+ * focus IS scrolling); the edit mode keeps the keyboard as sole owner. */
190
+ const handleWheel = (event) => {
191
+ if (mode === 'edit')
192
+ return;
193
+ const direction = event.deltaY >= 0 ? 1 : -1;
194
+ setFocusIndex(previous => Math.min(Math.max(0, focusable.length - 1), Math.max(0, previous + direction)));
195
+ };
163
196
  useInput((input, key) => {
164
197
  if (mode === 'edit' && editing !== null) {
165
198
  if (isPlainReturn(key)) {
@@ -192,23 +225,7 @@ export function Settings({ channel, onClose, }) {
192
225
  setFocusIndex(Math.min(Math.max(0, focusable.length - 1), effFocus + 1));
193
226
  }
194
227
  else if (isPlainReturn(key) && focused !== undefined) {
195
- if (focused.kind === 'group') {
196
- setActiveGroup({ ns: focused.ns, id: focused.group.id });
197
- setFocusIndex(0);
198
- setWindowStart(0);
199
- return;
200
- }
201
- // A save in flight owns the section's drafts; starting an edit mid-write
202
- // is exactly the lost-draft race the staged model exists to prevent.
203
- if (focusedForm === undefined || !focusedForm.available || focusedForm.saving)
204
- return;
205
- if (focused.field.kind === 'boolean' || focused.field.kind === 'select') {
206
- cycleField(focused.ns, focused.field);
207
- }
208
- else {
209
- setEditing({ ns: focused.ns, field: focused.field, draft: focusedForm.field(focused.field).text });
210
- setMode('edit');
211
- }
228
+ activateEntry(focused);
212
229
  }
213
230
  else if (input === 's' && focused !== undefined) {
214
231
  commitSave(focused.ns);
@@ -246,7 +263,7 @@ export function Settings({ channel, onClose, }) {
246
263
  }
247
264
  }
248
265
  });
249
- const renderField = (section, field) => {
266
+ const renderField = (section, field, focus) => {
250
267
  const ns = section.ns;
251
268
  const form = forms.get(ns);
252
269
  const state = form?.field(field) ?? { text: '', overridden: false, invalid: false };
@@ -254,6 +271,20 @@ export function Settings({ channel, onClose, }) {
254
271
  const isEditing = isFocused && mode === 'edit' && editing !== null;
255
272
  const label = pick(field.label, field.descriptions);
256
273
  const hint = field.hint !== undefined ? pick(field.hint, field.hintDescriptions) : undefined;
274
+ // 鼠标:编辑态整屏不响应(草稿由键盘独占,防误触抢焦点);列表态
275
+ // 悬停即移动焦点(lazygit 语义——焦点就是选中),点击 = 焦点 + 该行
276
+ // 的 Enter 动作(boolean/select 循环值,文本/secret 进编辑态)。
277
+ const rowEvents = mode === 'edit'
278
+ ? undefined
279
+ : {
280
+ onClick: () => {
281
+ setFocusIndex(focus);
282
+ activateEntry({ kind: 'field', ns: section.ns, field });
283
+ },
284
+ onMouseEnter: () => {
285
+ setFocusIndex(focus);
286
+ },
287
+ };
257
288
  let value;
258
289
  if (field.secret !== undefined) {
259
290
  const configured = secrets.get(`${ns}:${field.path.join('.')}`) === true;
@@ -276,7 +307,7 @@ export function Settings({ channel, onClose, }) {
276
307
  else {
277
308
  value = state.text;
278
309
  }
279
- return (_jsxs(Box, { children: [_jsx(Text, { color: isFocused ? 'suggestion' : undefined, children: isFocused ? '❯ ' : ' ' }), _jsx(Text, { bold: isFocused, children: label }), _jsx(Box, { flexGrow: 1 }), state.invalid && _jsxs(Text, { color: "error", children: [t('settings-field-invalid'), " "] }), state.overridden && _jsxs(Text, { dimColor: true, children: ["[", t('settings-badge-override'), "] "] }), form?.isStaged(field) === true && !isEditing && _jsx(Text, { color: "suggestion", children: "* " }), _jsx(Text, { color: isEditing || isFocused ? 'suggestion' : undefined, dimColor: !isFocused && !isEditing && state.text === '', children: value }), hint !== undefined && isFocused && (_jsxs(Text, { dimColor: true, children: ['\n ', hint] }))] }));
310
+ return (_jsxs(Box, { ...rowEvents, children: [_jsx(Text, { color: isFocused ? 'suggestion' : undefined, children: isFocused ? '❯ ' : ' ' }), _jsx(Text, { bold: isFocused, children: label }), _jsx(Box, { flexGrow: 1 }), state.invalid && _jsxs(Text, { color: "error", children: [t('settings-field-invalid'), " "] }), state.overridden && _jsxs(Text, { dimColor: true, children: ["[", t('settings-badge-override'), "] "] }), form?.isStaged(field) === true && !isEditing && _jsx(Text, { color: "suggestion", children: "* " }), _jsx(Text, { color: isEditing || isFocused ? 'suggestion' : undefined, dimColor: !isFocused && !isEditing && state.text === '', children: value }), hint !== undefined && isFocused && (_jsxs(Text, { dimColor: true, children: ['\n ', hint] }))] }));
280
311
  };
281
312
  // ── Layout: a flat entry list with accounted line heights, windowed so the
282
313
  // focused row is always on screen no matter how long the current page gets. ─
@@ -290,7 +321,7 @@ export function Settings({ channel, onClose, }) {
290
321
  key: `field:${section.ns}:${field.path.join('.')}`,
291
322
  lines: field.hint !== undefined && isFocused ? 2 : 1,
292
323
  focus: index,
293
- node: renderField(section, field),
324
+ node: renderField(section, field, index),
294
325
  });
295
326
  };
296
327
  if (activeSection !== undefined && activeGroupSpec !== undefined) {
@@ -319,11 +350,22 @@ export function Settings({ channel, onClose, }) {
319
350
  const isFocused = focused?.kind === 'group' && focused.ns === section.ns && focused.group === group;
320
351
  const index = focusCursor;
321
352
  focusCursor += 1;
353
+ const groupRowEvents = mode === 'edit'
354
+ ? undefined
355
+ : {
356
+ onClick: () => {
357
+ setFocusIndex(index);
358
+ activateEntry({ kind: 'group', ns: section.ns, group });
359
+ },
360
+ onMouseEnter: () => {
361
+ setFocusIndex(index);
362
+ },
363
+ };
322
364
  entries.push({
323
365
  key: `group:${section.ns}:${group.id}`,
324
366
  lines: 1,
325
367
  focus: index,
326
- node: (_jsxs(Box, { children: [_jsx(Text, { color: isFocused ? 'suggestion' : undefined, children: isFocused ? '❯ ' : ' ' }), _jsx(Text, { bold: isFocused, children: pick(group.title, group.descriptions) }), _jsx(Box, { flexGrow: 1 }), _jsx(Text, { color: isFocused ? 'suggestion' : undefined, children: "\u203A" })] })),
368
+ node: (_jsxs(Box, { ...groupRowEvents, children: [_jsx(Text, { color: isFocused ? 'suggestion' : undefined, children: isFocused ? '❯ ' : ' ' }), _jsx(Text, { bold: isFocused, children: pick(group.title, group.descriptions) }), _jsx(Box, { flexGrow: 1 }), _jsx(Text, { color: isFocused ? 'suggestion' : undefined, children: "\u203A" })] })),
327
369
  });
328
370
  }
329
371
  });
@@ -388,5 +430,5 @@ export function Settings({ channel, onClose, }) {
388
430
  ? `${t('settings-title')} › ${pick(activeSection.title, activeSection.descriptions)} › ${pick(activeGroupSpec.title, activeGroupSpec.descriptions)}`
389
431
  : t('settings-title');
390
432
  const navigationHint = activeGroupSpec === undefined ? t('settings-hint-list') : t('settings-hint-group');
391
- return (_jsxs(Box, { flexDirection: "column", width: columns, height: rows, children: [_jsxs(Box, { children: [_jsx(Text, { bold: true, children: title }), _jsx(Box, { flexGrow: 1 }), host === undefined && _jsx(Text, { color: "warning", children: t('settings-unavailable') })] }), _jsx(Divider, {}), visible.map(entry => (_jsx(React.Fragment, { children: entry.node }, entry.key))), _jsx(Box, { flexGrow: 1 }), notice !== undefined && (_jsx(Text, { color: notice.tone === 'error' ? 'error' : 'success', children: notice.text })), _jsx(Divider, {}), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: mode === 'edit' ? t('settings-hint-edit') : navigationHint }) })] }));
433
+ return (_jsxs(Box, { flexDirection: "column", width: columns, height: rows, children: [_jsxs(Box, { children: [_jsx(Text, { bold: true, children: title }), _jsx(Box, { flexGrow: 1 }), host === undefined && _jsx(Text, { color: "warning", children: t('settings-unavailable') })] }), _jsx(Divider, {}), _jsx("ink-box", { style: { flexDirection: 'column', flexGrow: 1, flexShrink: 1, overflow: 'hidden' }, onWheel: handleWheel, children: visible.map(entry => (_jsx(React.Fragment, { children: entry.node }, entry.key))) }), _jsx(Box, { flexGrow: 1 }), notice !== undefined && (_jsx(Text, { color: notice.tone === 'error' ? 'error' : 'success', children: notice.text })), _jsx(Divider, {}), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: mode === 'edit' ? t('settings-hint-edit') : navigationHint }) })] }));
392
434
  }
@@ -1,14 +1,6 @@
1
1
  import React from 'react';
2
2
  import type { Channel } from '../dsh-adapter/channel.js';
3
3
  import type { WaveBand } from '../dsh-adapter/types.js';
4
- /**
5
- * The footer under the prompt input, in Claude Code's PromptInputFooter
6
- * layout: the segmented context progress bar on its own first line, the
7
- * status line below (left group: model · tokens · think level · cache · tps
8
- * gauge/sparkline; right group: git · cwd · title, right-aligned), and the
9
- * mode/hint line last. The right side of the footer shows the latest
10
- * transient notification (errors in red, warnings in amber — CC style).
11
- */
12
4
  export declare function StatusLine({ channel, selectionActive, helpOpen, wake, }: {
13
5
  channel: Channel;
14
6
  selectionActive?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"StatusLine.d.ts","sourceRoot":"","sources":["../../../src/screens/StatusLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAGxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AAQvD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,eAAuB,EACvB,QAAgB,EAChB,IAAI,GACL,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CACvD,qBA0PA;AAED,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAED,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKvF"}
1
+ {"version":3,"file":"StatusLine.d.ts","sourceRoot":"","sources":["../../../src/screens/StatusLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAQzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAYxD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAA;AA6EvD,wBAAgB,UAAU,CAAC,EACzB,OAAO,EACP,eAAuB,EACvB,QAAgB,EAChB,IAAI,GACL,EAAE;IACD,OAAO,EAAE,OAAO,CAAA;IAChB,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;;;;;;;;OAQG;IACH,IAAI,CAAC,EAAE;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAA;CACvD,qBA8VA;AAED,KAAK,aAAa,GAAG;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,CAAA;CACnB,CAAA;AAyHD,8EAA8E;AAC9E,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,aAAa,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKvF"}
@@ -1,24 +1,36 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import React from 'react';
2
3
  import { Box, Text, useTerminalSize, useTheme } from '../ui.js';
3
4
  import { formatTokens } from '../cc/format.js';
4
5
  import { t } from '../i18n.js';
5
6
  import { formatContextUsage, DEFAULT_STATUS_BAR, normalizeStatusBar } from '../tuiDisplayPrefs.js';
6
- import { Byline } from '../components/design-system/Byline.js';
7
7
  import { ActivityLine, contextPressurePct } from '../components/ActivityLine.js';
8
+ import { GoalStatusChip } from '../components/GoalTodoPanel.js';
8
9
  import { modeDisplayName } from '../sessionModes.js';
9
10
  import { MiniWake } from '../components/trajectory/MiniWake.js';
10
- import { renderContextBar, renderTpsGauge, renderTpsSparkline, speedColor, } from './StatusMetrics.js';
11
+ import { ContextBarView } from '../components/ContextBarView.js';
12
+ import { USED_SEGMENTS, renderMiniContextBar, renderTpsGauge, renderTpsSparkline, speedColor, tpsStats, } from './StatusMetrics.js';
11
13
  /**
12
- * The footer under the prompt input, in Claude Code's PromptInputFooter
13
- * layout: the segmented context progress bar on its own first line, the
14
- * status line below (left group: model · tokens · think level · cache · tps
15
- * gauge/sparkline; right group: git · cwd · title, right-aligned), and the
16
- * mode/hint line last. The right side of the footer shows the latest
17
- * transient notification (errors in red, warnings in amber — CC style).
14
+ * Render field parts as sibling shrinkable Boxes joined by the Byline
15
+ * separator (` · `). The Box-per-field layout is what makes individual
16
+ * fields hoverable — a Byline inside one Text cannot carry per-field mouse
17
+ * rects — at the cost of truncating each field on its own under pressure
18
+ * instead of truncating the joined string's tail.
18
19
  */
20
+ function FieldLine({ parts, hoverProps, }) {
21
+ const visible = parts.filter(part => part.node !== null && part.node !== undefined && part.node !== false);
22
+ return (_jsx(_Fragment, { children: visible.map((part, index) => (_jsxs(React.Fragment, { children: [index > 0 ? _jsx(Text, { dimColor: true, children: " \u00B7 " }) : null, _jsx(Box, { flexShrink: 1, ...(part.id === undefined ? {} : hoverProps(part.id)), children: _jsx(Text, { wrap: "truncate", children: part.node }) })] }, part.key))) }));
23
+ }
19
24
  export function StatusLine({ channel, selectionActive = false, helpOpen = false, wake, }) {
20
25
  const { columns } = useTerminalSize();
21
26
  const [themeName] = useTheme();
27
+ const [hover, setHover] = React.useState(null);
28
+ const hoverProps = React.useCallback((id) => ({
29
+ onMouseEnter: () => setHover(id),
30
+ // Guarded leave: a late leave from a field the pointer already left must
31
+ // not clobber the field it entered.
32
+ onMouseLeave: () => setHover(current => (current === id ? null : current)),
33
+ }), []);
22
34
  const statusBar = channel.minimal
23
35
  // Minimal mode overrides every field switch: model + cwd only, so the
24
36
  // footer can never grow decorations regardless of saved preferences.
@@ -30,65 +42,145 @@ export function StatusLine({ channel, selectionActive = false, helpOpen = false,
30
42
  : usage.input + usage.cacheRead + usage.cacheWrite;
31
43
  const contextParts = [];
32
44
  if (statusBar.thinking && channel.reasoningEffort !== undefined) {
33
- contextParts.push(_jsx(Text, { color: "inactiveShimmer", children: channel.reasoningEffort }, "effort"));
45
+ contextParts.push({
46
+ key: 'effort',
47
+ node: _jsx(Text, { color: "inactiveShimmer", children: channel.reasoningEffort }),
48
+ });
34
49
  }
35
50
  if (statusBar.mode && channel.modeIndex > 0) {
36
- contextParts.push(_jsx(Text, { color: channel.mode.plan === true ? 'planMode' : 'warning', children: modeDisplayName(channel.mode) }, "mode"));
51
+ contextParts.push({
52
+ key: 'mode',
53
+ node: (_jsx(Text, { color: channel.mode.plan === true ? 'planMode' : 'warning', children: modeDisplayName(channel.mode) })),
54
+ });
37
55
  }
38
56
  const formattedContext = statusBar.contextUsage
39
57
  ? formatContextUsage(contextUsed, channel.contextWindow, statusBar.compact)
40
58
  : undefined;
41
- const contextUsagePart = formattedContext === undefined
59
+ // The ctx field's two faces: the idle readout, and the hover state — an
60
+ // in-place pressure bar (the user-liked "text becomes a bar" morph).
61
+ //
62
+ // WIDTH-STABLE BY CONSTRUCTION: the idle variable part is
63
+ // `P + " (" + C + ")"` (either order; P = percent text, C = counts) —
64
+ // len(P)+len(C)+3 cells. The hover variant is `▕+bar+▏ + " " + P` —
65
+ // 3+barLen+len(P) cells. Sizing barLen = len(C) makes them equal, so the
66
+ // morph swaps glyphs in place and NO sibling field, separator, or the
67
+ // right-aligned group moves a single cell (the first attempt used a fixed
68
+ // 10-cell gauge and made the whole row jump).
69
+ const ctxParts = (() => {
70
+ if (formattedContext === undefined)
71
+ return undefined;
72
+ const open = formattedContext.indexOf(' (');
73
+ if (open < 0)
74
+ return undefined;
75
+ const first = formattedContext.slice(0, open);
76
+ const second = formattedContext.slice(open + 2, -1);
77
+ if (first.endsWith('%'))
78
+ return { percent: first, counts: second };
79
+ if (second.endsWith('%'))
80
+ return { percent: second, counts: first };
81
+ return undefined;
82
+ })();
83
+ const ctxHoverBarWidth = ctxParts?.counts.length ?? 0;
84
+ const ctxNode = formattedContext === undefined
42
85
  ? undefined
43
- : (_jsxs(Text, { color: "inactiveShimmer", children: [_jsx(Text, { dimColor: true, children: "ctx " }), formattedContext] }, "context"));
86
+ : hover === 'ctx' &&
87
+ ctxParts !== undefined &&
88
+ ctxHoverBarWidth > 0 &&
89
+ contextUsed !== undefined &&
90
+ channel.contextWindow !== undefined
91
+ ? (_jsxs(Text, { color: "inactiveShimmer", children: [_jsx(Text, { dimColor: true, children: "ctx " }), renderMiniContextBar(contextUsed, channel.contextWindow, ctxHoverBarWidth), ' ', ctxParts.percent] }))
92
+ : (_jsxs(Text, { color: "inactiveShimmer", children: [_jsx(Text, { dimColor: true, children: "ctx " }), formattedContext] }));
44
93
  if (statusBar.cache) {
45
94
  const cacheRate = formatCacheHitRate(usage);
46
95
  if (cacheRate !== undefined) {
47
- contextParts.push(_jsxs(Text, { color: "inactiveShimmer", children: [_jsx(Text, { dimColor: true, children: t('status-cache-label') }), cacheRate] }, "cache"));
96
+ contextParts.push({
97
+ key: 'cache',
98
+ id: 'cache',
99
+ node: (_jsxs(Text, { color: "inactiveShimmer", children: [_jsx(Text, { dimColor: true, children: t('status-cache-label') }), cacheRate] })),
100
+ });
48
101
  }
49
102
  }
50
- const tpsParts = [];
103
+ let tpsPart;
51
104
  if (statusBar.tps && channel.tps !== undefined) {
52
105
  if (channel.working && channel.tpsSamples.length === 0) {
53
- tpsParts.push(_jsxs(Text, { children: [renderTpsGauge(channel.tps, channel.tps), ' ', _jsxs(Text, { dimColor: true, children: [Math.round(channel.tps), " tps"] })] }, "tps"));
106
+ tpsPart = {
107
+ key: 'tps',
108
+ id: 'tps',
109
+ node: (_jsxs(Text, { children: [renderTpsGauge(channel.tps, channel.tps), ' ', _jsxs(Text, { dimColor: true, children: [Math.round(channel.tps), " tps"] })] })),
110
+ };
54
111
  }
55
112
  else if (channel.tpsSamples.length > 0) {
56
113
  const peak = Math.max(...channel.tpsSamples.map(sample => sample.tps), channel.tps);
57
- tpsParts.push(_jsxs(Text, { children: [channel.working
58
- ? renderTpsGauge(channel.tps, peak)
59
- : renderTpsSparkline(channel.tpsSamples), ' ', speedColor(channel.tps, `${Math.round(channel.tps)}`), " tps"] }, "tps"));
114
+ tpsPart = {
115
+ key: 'tps',
116
+ id: 'tps',
117
+ node: (_jsxs(Text, { children: [channel.working
118
+ ? renderTpsGauge(channel.tps, peak)
119
+ : renderTpsSparkline(channel.tpsSamples), ' ', speedColor(channel.tps, `${Math.round(channel.tps)}`), " tps"] })),
120
+ };
60
121
  }
61
122
  else {
62
- tpsParts.push(_jsxs(Text, { dimColor: true, children: [Math.round(channel.tps), " t/s"] }, "tps"));
123
+ tpsPart = {
124
+ key: 'tps',
125
+ id: 'tps',
126
+ node: _jsxs(Text, { dimColor: true, children: [Math.round(channel.tps), " t/s"] }),
127
+ };
63
128
  }
64
129
  }
65
- const leftParts = [
130
+ const leftFields = [
66
131
  ...(statusBar.model
67
- ? [_jsx(Text, { color: "inactiveShimmer", children: channel.model }, "model")]
132
+ ? [{ key: 'model', node: _jsx(Text, { color: "inactiveShimmer", children: channel.model }) }]
68
133
  : []),
69
- ...tpsParts,
134
+ ...(tpsPart !== undefined ? [tpsPart] : []),
70
135
  ...contextParts,
71
136
  ...(statusBar.tokens
72
- ? [
73
- _jsxs(Text, { color: "inactiveShimmer", children: [formatTokens(channel.tokens.input), "\u2192", formatTokens(channel.tokens.output)] }, "tokens"),
74
- ]
137
+ ? [{
138
+ key: 'tokens',
139
+ id: 'tokens',
140
+ node: (_jsxs(Text, { color: "inactiveShimmer", children: [formatTokens(channel.tokens.input), "\u2192", formatTokens(channel.tokens.output)] })),
141
+ }]
75
142
  : []),
76
143
  ];
77
- const rightParts = [
144
+ const rightFields = [
145
+ // Goal chip first: session-level state outranks repo/location details.
146
+ ...(statusBar.goal && channel.goal !== undefined
147
+ ? [{
148
+ key: 'goal',
149
+ id: 'goal',
150
+ node: _jsx(GoalStatusChip, { goal: channel.goal, minimal: channel.minimal }),
151
+ }]
152
+ : []),
78
153
  ...(statusBar.gitBranch && channel.gitBranch
79
154
  ? [
80
- _jsx(Text, { color: "professionalBlue", children: channel.gitBranch }, "git"),
155
+ {
156
+ key: 'git',
157
+ node: _jsx(Text, { color: "professionalBlue", children: channel.gitBranch }),
158
+ },
81
159
  ]
82
160
  : []),
83
161
  ...(statusBar.cwd
84
- ? [
85
- _jsx(Text, { color: "inactiveShimmer", children: statusBar.compact ? basename(channel.displayCwd) : channel.displayCwd }, "cwd"),
86
- ]
162
+ ? [{
163
+ key: 'cwd',
164
+ id: 'cwd',
165
+ node: (_jsx(Text, { color: "inactiveShimmer", children: statusBar.compact ? basename(channel.displayCwd) : channel.displayCwd })),
166
+ }]
87
167
  : []),
88
168
  ...(statusBar.sessionTitle && channel.sessionTitle
89
- ? [
90
- _jsx(Text, { dimColor: true, children: channel.sessionTitle }, "title"),
91
- ]
169
+ ? [{
170
+ key: 'title',
171
+ id: 'title',
172
+ node: _jsx(Text, { dimColor: true, children: channel.sessionTitle }),
173
+ }]
174
+ : []),
175
+ // Short id last: a provenance tag trails the content it identifies, and
176
+ // the 8-char form is what the session log filename starts with, so a
177
+ // truncated rendering still names the right log for --resume.
178
+ ...(statusBar.sessionId && channel.agentId
179
+ ? [{
180
+ key: 'sessionId',
181
+ id: 'sessionId',
182
+ node: _jsx(Text, { dimColor: true, children: `#${channel.agentId.slice(0, 8)}` }),
183
+ }]
92
184
  : []),
93
185
  ];
94
186
  const hint = selectionActive
@@ -106,24 +198,111 @@ export function StatusLine({ channel, selectionActive = false, helpOpen = false,
106
198
  activity.phase !== 'idle';
107
199
  const showTrajectory = statusBar.trajectory && wake !== undefined;
108
200
  const barWidth = columns - 4;
109
- let bar = null;
110
201
  const barColors = themeName === 'light'
111
202
  ? undefined
112
203
  : { freeFill: '#2E3440', freeText: '#8D95A6' };
113
- if (statusBar.contextBar &&
204
+ const barVisible = statusBar.contextBar &&
114
205
  channel.contextBarEnabled &&
115
206
  barWidth >= 14 &&
116
207
  usage !== undefined &&
117
- channel.contextWindow !== undefined) {
118
- bar = renderContextBar(channel.contextSegments, contextUsed ?? 0, channel.contextWindow, barWidth, barColors);
208
+ channel.contextWindow !== undefined;
209
+ // The supplemental-row readout for the hovered field: replaces the idle
210
+ // hint (never the activity line) while the pointer dwells on a field.
211
+ const detail = buildHoverDetail(hover, channel, usage, contextUsed);
212
+ const trailer = detail !== null
213
+ ? detail
214
+ : hint !== ''
215
+ ? _jsx(Text, { color: "inactiveShimmer", children: hint })
216
+ : null;
217
+ const compactFields = [...leftFields, ...rightFields];
218
+ const fullLeftFields = [
219
+ ...leftFields,
220
+ ...(ctxNode !== undefined ? [{ key: 'context', id: 'ctx', node: ctxNode }] : []),
221
+ ];
222
+ const hasStatusFields = compactFields.length > 0 || ctxNode !== undefined;
223
+ // The supplemental row is PERMANENTLY mounted (height pinned to 1)
224
+ // whenever the footer carries hoverable chrome — mounting it from nothing
225
+ // on hover is what made the footer grow mid-gesture and shoved the
226
+ // transcript up (user feedback). Idle it may sit blank: a stable footer
227
+ // outranks a reclaimable row, and hovering only ever swaps this line's
228
+ // content. Minimal mode keeps the old contract — no hover details, the
229
+ // row appears only for real content (which its defaults never produce).
230
+ const showSupplementalRow = (!channel.minimal && (hasStatusFields || barVisible)) ||
231
+ showActivity ||
232
+ showTrajectory ||
233
+ hint !== '';
234
+ return (_jsx(Box, { paddingX: 1, width: columns, flexShrink: 0, children: _jsxs(Box, { flexDirection: "column", width: "100%", children: [barVisible ? (_jsx(ContextBarView, { segments: channel.contextSegments, usedTokens: contextUsed ?? 0, contextWindow: channel.contextWindow ?? 0, width: barWidth, colors: barColors, onHover: segment => setHover(current => segment === null
235
+ ? (current !== null && current.startsWith('segment:') ? null : current)
236
+ : `segment:${segment}`) })) : null, hasStatusFields ? statusBar.compact ? (_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, flexDirection: "row", overflow: "hidden", children: _jsx(FieldLine, { parts: compactFields, hoverProps: hoverProps }) }), ctxNode !== undefined ? (_jsx(Box, { flexShrink: 0, ...hoverProps('ctx'), children: _jsx(Text, { wrap: "truncate", children: ctxNode }) })) : null] })) : (_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, flexDirection: "row", overflow: "hidden", children: _jsx(FieldLine, { parts: fullLeftFields, hoverProps: hoverProps }) }), _jsx(Box, { justifyContent: "flex-end", flexShrink: 2, flexDirection: "row", overflow: "hidden", children: _jsx(FieldLine, { parts: rightFields, hoverProps: hoverProps }) })] })) : null, showSupplementalRow ? _jsxs(Box, { height: 1, overflow: "hidden", flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsxs(Box, { flexDirection: "row", flexGrow: 1, justifyContent: showActivity && trailer !== null ? 'space-between' : 'flex-start', gap: 2, children: [showActivity && activity !== undefined ? (_jsx(ActivityLine, { activity: activity, activityFrames: channel.activityFrames, warnPct: contextPressurePct(usage, channel.contextWindow), warnDanger: (contextPressurePct(usage, channel.contextWindow) ?? 0) >= 95 })) : trailer, showActivity ? trailer : null] }), showTrajectory && wake !== undefined ? (_jsx(MiniWake, { band: wake.band, hint: wake.hint, tick: wake.tick })) : null] }) : null] }) }));
237
+ }
238
+ /**
239
+ * The supplemental-row readout for a hovered footer field. Technical label
240
+ * tokens (ctx, free, read, sys…) stay unlocalized like the footer fields
241
+ * themselves; sentences go through t(). Returns null when nothing is
242
+ * hovered (or the hover outlived its data, which the field gating makes
243
+ * near-impossible).
244
+ */
245
+ function buildHoverDetail(hover, channel, usage, contextUsed) {
246
+ if (hover === null)
247
+ return null;
248
+ const window = channel.contextWindow;
249
+ const dim = (label) => _jsx(Text, { dimColor: true, children: label });
250
+ if (hover.startsWith('segment:')) {
251
+ if (window === undefined || window <= 0 || contextUsed === undefined)
252
+ return null;
253
+ const key = hover.slice('segment:'.length);
254
+ const free = Math.max(0, window - contextUsed);
255
+ if (key === 'free') {
256
+ return (_jsxs(Text, { wrap: "truncate", children: [dim('free '), formatTokens(free), " \u00B7 ", ((free / window) * 100).toFixed(1), "% ", t('status-detail-of-window')] }));
257
+ }
258
+ const segment = USED_SEGMENTS.find(s => s.key === key);
259
+ if (segment === undefined)
260
+ return null;
261
+ const tokens = channel.contextSegments[segment.key];
262
+ return (_jsxs(Text, { wrap: "truncate", children: [dim(`${segment.labels[1] ?? segment.key} `), formatTokens(tokens), " \u00B7", ' ', ((tokens / window) * 100).toFixed(1), "% ", t('status-detail-of-window')] }));
263
+ }
264
+ switch (hover) {
265
+ case 'ctx': {
266
+ if (contextUsed === undefined || window === undefined || window <= 0)
267
+ return null;
268
+ const free = Math.max(0, window - contextUsed);
269
+ // The hover payoff for the ctx ask: percent + counts + free, then the
270
+ // segment breakdown as the truncate-able tail (no bar — the row's
271
+ // in-place morph and the segment bar above already carry the gauge).
272
+ const segments = USED_SEGMENTS.map(segment => `${segment.labels[1] ?? segment.key} ${formatTokens(channel.contextSegments[segment.key])}`).join(' · ');
273
+ return (_jsxs(Text, { wrap: "truncate", children: [((contextUsed / window) * 100).toFixed(1), "% \u00B7", ' ', formatTokens(contextUsed), "/", formatTokens(window), " \u00B7 ", dim('free '), formatTokens(free), ' · ', segments] }));
274
+ }
275
+ case 'cache': {
276
+ const rate = formatCacheHitRate(usage);
277
+ if (usage === undefined || rate === undefined)
278
+ return null;
279
+ return (_jsxs(Text, { wrap: "truncate", children: [dim('cache '), rate, " \u00B7 ", dim('read '), formatTokens(usage.cacheRead), " \u00B7", ' ', dim('write '), formatTokens(usage.cacheWrite), " \u00B7 ", dim('input '), formatTokens(usage.input)] }));
280
+ }
281
+ case 'tps': {
282
+ if (channel.tps === undefined)
283
+ return null;
284
+ const stats = tpsStats(channel.tpsSamples, Date.now());
285
+ return (_jsxs(Text, { wrap: "truncate", children: [dim('tps '), Math.round(channel.tps), " \u00B7 ", dim('avg60 '), stats.avg.toFixed(1), " \u00B7", ' ', dim('mean '), stats.mean.toFixed(1), " \u00B7 ", dim('p95 '), stats.p95.toFixed(1)] }));
286
+ }
287
+ case 'tokens': {
288
+ const { input, output } = channel.tokens;
289
+ return (_jsxs(Text, { wrap: "truncate", children: [dim('in '), input.toLocaleString(), " \u00B7 ", dim('out '), output.toLocaleString(), " \u00B7", ' ', dim('total '), (input + output).toLocaleString()] }));
290
+ }
291
+ case 'goal': {
292
+ const goal = channel.goal;
293
+ if (goal === undefined)
294
+ return null;
295
+ return (_jsxs(Text, { wrap: "truncate", children: [dim('goal '), goal.phase, " \u00B7 ", dim('r'), goal.roundsStarted, "/", goal.maxGoalRounds, " \u00B7", ' ', goal.objective] }));
296
+ }
297
+ case 'sessionId':
298
+ return (_jsxs(Text, { wrap: "truncate", children: [dim('# '), channel.agentId, " \u00B7 ", t('status-detail-session-id')] }));
299
+ case 'cwd':
300
+ return (_jsxs(Text, { wrap: "truncate", children: [dim('cwd '), channel.displayCwd] }));
301
+ case 'title':
302
+ return (_jsxs(Text, { wrap: "truncate", children: [dim('title '), channel.sessionTitle] }));
303
+ default:
304
+ return null;
119
305
  }
120
- const compactLeftParts = [...leftParts, ...rightParts];
121
- const fullLeftParts = contextUsagePart === undefined
122
- ? leftParts
123
- : [...leftParts, contextUsagePart];
124
- const hasStatusFields = compactLeftParts.length > 0 || contextUsagePart !== undefined;
125
- const showSupplementalRow = hint !== '' || showActivity || showTrajectory;
126
- return (_jsx(Box, { paddingX: 1, width: columns, flexShrink: 0, children: _jsxs(Box, { flexDirection: "column", width: "100%", children: [bar ? _jsx(Text, { children: bar }) : null, hasStatusFields ? statusBar.compact ? (_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsx(Text, { wrap: "truncate", children: _jsx(Byline, { children: compactLeftParts }) }) }), contextUsagePart ? (_jsx(Box, { flexShrink: 0, children: _jsx(Text, { wrap: "truncate", children: _jsx(Byline, { children: [contextUsagePart] }) }) })) : null] })) : (_jsxs(Box, { flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsx(Box, { flexGrow: 1, flexShrink: 1, children: _jsx(Text, { wrap: "truncate", children: _jsx(Byline, { children: fullLeftParts }) }) }), _jsx(Box, { justifyContent: "flex-end", flexShrink: 2, children: _jsx(Text, { wrap: "truncate", children: _jsx(Byline, { children: rightParts }) }) })] })) : null, showSupplementalRow ? _jsxs(Box, { height: 1, overflow: "hidden", flexDirection: "row", justifyContent: "space-between", gap: 2, children: [_jsxs(Box, { flexDirection: "row", flexGrow: 1, justifyContent: showActivity && hint ? 'space-between' : 'flex-start', gap: 2, children: [showActivity && activity !== undefined ? (_jsx(ActivityLine, { activity: activity, activityFrames: channel.activityFrames, warnPct: contextPressurePct(usage, channel.contextWindow), warnDanger: (contextPressurePct(usage, channel.contextWindow) ?? 0) >= 95 })) : hint ? (_jsx(Text, { color: "inactiveShimmer", children: hint })) : null, showActivity && hint ? (_jsx(Text, { color: "inactiveShimmer", wrap: "truncate", children: hint })) : null] }), showTrajectory && wake !== undefined ? (_jsx(MiniWake, { band: wake.band, hint: wake.hint, tick: wake.tick })) : null] }) : null] }) }));
127
306
  }
128
307
  /** Return the prompt-cache hit rate, or nothing when usage is unavailable. */
129
308
  export function formatCacheHitRate(usage) {
@@ -8,8 +8,10 @@
8
8
  * yellow ≥ 20, red below.
9
9
  */
10
10
  /** Context bar segments — DeepSeek blue family (dark-theme friendly: deep
11
- * navy → brand blue, neutral grey free segment; labels adapt to width). */
12
- declare const USED_SEGMENTS: readonly [{
11
+ * navy → brand blue, neutral grey free segment; labels adapt to width).
12
+ * Exported for the hoverable JSX bar (ContextBarView), which re-derives
13
+ * the same column split this module's ANSI path renders. */
14
+ export declare const USED_SEGMENTS: readonly [{
13
15
  readonly key: "system";
14
16
  readonly color: "#22305F";
15
17
  readonly labels: readonly ["system", "sys", "s"];
@@ -37,6 +39,22 @@ export type ContextSegments = Record<(typeof USED_SEGMENTS)[number]['key'], numb
37
39
  * @returns The compact count string.
38
40
  */
39
41
  export declare function formatTokens(count: number): string;
42
+ /** Center `text` in `width` cells (plain spaces, no ANSI). Exported for
43
+ * ContextBarView's JSX used-segment labels. */
44
+ export declare function centeredText(text: string, width: number): string;
45
+ /** Pick the longest label that fits `width` cells. Exported for
46
+ * ContextBarView's JSX segments (same fallback ladder as the ANSI path). */
47
+ export declare function chooseLabel(labels: readonly string[], width: number): string;
48
+ /**
49
+ * Compose the free segment's plain text: the `free` label centered, the
50
+ * usage readout right-aligned into whatever width remains. Shared by the
51
+ * ANSI string path (renderContextBar) and the hoverable JSX bar
52
+ * (ContextBarView) so both render pixel-identical content.
53
+ */
54
+ export declare function composeFreeSegmentText(options: readonly string[], width: number): string;
55
+ /** Give every visible used segment at least one column before sharing the
56
+ * rest. Exported for ContextBarView (hoverable JSX twin of the bar). */
57
+ export declare function allocateBarColumns(values: readonly number[], width: number): number[];
40
58
  /**
41
59
  * The segmented context bar: used segments by content type, the remainder as
42
60
  * a light free segment whose right edge carries the usage readout
@@ -51,6 +69,21 @@ export declare function renderContextBar(segments: ContextSegments, usedTokens:
51
69
  freeFill: string;
52
70
  freeText: string;
53
71
  }): string;
72
+ /** Pressure-colored text: green below 80%, amber ≥ 80, red ≥ 95.
73
+ * @param pct - Context occupancy percent (0–100+).
74
+ * @param text - Text to color.
75
+ * @returns The ANSI 24-bit color-wrapped text.
76
+ */
77
+ export declare function pressureColor(pct: number, text: string): string;
78
+ /** Compact 1/8-cell context gauge for the footer's ctx field on hover:
79
+ * `▕██████▋···▏`, fill proportional to context occupancy, colored by the
80
+ * amber/red pressure thresholds. Same block ramp as the TPS gauge.
81
+ * @param usedTokens - Total context tokens in use.
82
+ * @param contextWindow - Context window size in tokens.
83
+ * @param width - Gauge width in terminal columns (fill cells, brackets excluded).
84
+ * @returns The ANSI gauge string, or '' for a non-positive window.
85
+ */
86
+ export declare function renderMiniContextBar(usedTokens: number, contextWindow: number, width?: number): string;
54
87
  /** Speed color: green ≥ 50, yellow ≥ 20, red below (pi-tps-meter).
55
88
  * @param tps - Tokens per second; selects the color threshold.
56
89
  * @param text - Text to color.
@@ -83,5 +116,4 @@ export declare function tpsStats(samples: readonly {
83
116
  mean: number;
84
117
  p95: number;
85
118
  };
86
- export {};
87
119
  //# sourceMappingURL=StatusMetrics.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"StatusMetrics.d.ts","sourceRoot":"","sources":["../../../src/screens/StatusMetrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;4EAC4E;AAC5E,QAAA,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;EAMT,CAAA;AAEV,yFAAyF;AACzF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;AAsBnF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOlD;AA+GD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC9C,MAAM,CAkBR;AAYD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG5D;AAYD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAYhE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAqB9E;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG;IACxF,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,CAUA"}
1
+ {"version":3,"file":"StatusMetrics.d.ts","sourceRoot":"","sources":["../../../src/screens/StatusMetrics.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;;6DAG6D;AAC7D,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;EAMhB,CAAA;AAEV,yFAAyF;AACzF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,CAAA;AAsBnF;;;GAGG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAOlD;AAID;gDACgD;AAChD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAMhE;AAED;6EAC6E;AAC7E,wBAAgB,WAAW,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAK5E;AA4BD;;;;;GAKG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,KAAK,EAAE,MAAM,GACZ,MAAM,CAmBR;AA+BD;yEACyE;AACzE,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAkBrF;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,eAAe,EACzB,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,KAAK,EAAE,MAAM,EACb,MAAM,CAAC,EAAE;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC9C,MAAM,CAkBR;AASD;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG/D;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,EAClB,aAAa,EAAE,MAAM,EACrB,KAAK,SAAK,GACT,MAAM,CAaR;AAYD;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAG5D;AAYD;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAYhE;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,SAAS;IAAE,GAAG,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAqB9E;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,SAAS;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,EAAE,EAAE,KAAK,EAAE,MAAM,GAAG;IACxF,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,GAAG,EAAE,MAAM,CAAA;CACZ,CAUA"}