@sagmans/dsh-tui 0.7.0 → 0.9.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 (242) hide show
  1. package/.agents/skills/dsh-tui-dogfood/SKILL.md +5 -1
  2. package/.agents/skills/dsh-tui-dogfood/scripts/run-plugin-from-worktree.sh +26 -2
  3. package/.agents/skills/dsh-tui-update-models/SKILL.md +95 -17
  4. package/.agents/skills/dsh-tui-update-models/references/model-wiring.md +158 -28
  5. package/.agents/skills/dsh-tui-update-models/scripts/dump-model-catalog.mjs +152 -16
  6. package/README.md +117 -53
  7. package/lib/agent/history.d.ts +0 -2
  8. package/lib/agent/history.d.ts.map +1 -1
  9. package/lib/agent/history.js +1 -1
  10. package/lib/agent/history.js.map +1 -1
  11. package/lib/agent/host.d.ts +0 -25
  12. package/lib/agent/host.d.ts.map +1 -1
  13. package/lib/agent/host.js +2 -2
  14. package/lib/agent/host.js.map +1 -1
  15. package/lib/agent/model.d.ts +38 -6
  16. package/lib/agent/model.d.ts.map +1 -1
  17. package/lib/agent/model.js +38 -14
  18. package/lib/agent/model.js.map +1 -1
  19. package/lib/agent/prompt-history.d.ts +7 -12
  20. package/lib/agent/prompt-history.d.ts.map +1 -1
  21. package/lib/agent/prompt-history.js +10 -31
  22. package/lib/agent/prompt-history.js.map +1 -1
  23. package/lib/cards/composition.d.ts +1 -1
  24. package/lib/cards/composition.d.ts.map +1 -1
  25. package/lib/cards/composition.js +7 -0
  26. package/lib/cards/composition.js.map +1 -1
  27. package/lib/cards/presenter.d.ts.map +1 -1
  28. package/lib/cards/presenter.js +32 -2
  29. package/lib/cards/presenter.js.map +1 -1
  30. package/lib/cards.d.ts +27 -2
  31. package/lib/cards.d.ts.map +1 -1
  32. package/lib/cards.js +17 -3
  33. package/lib/cards.js.map +1 -1
  34. package/lib/compat/probe.js +1 -1
  35. package/lib/compat/probe.js.map +1 -1
  36. package/lib/config.d.ts +10 -0
  37. package/lib/config.d.ts.map +1 -1
  38. package/lib/config.js +18 -0
  39. package/lib/config.js.map +1 -1
  40. package/lib/contracts.d.ts +2 -0
  41. package/lib/contracts.d.ts.map +1 -1
  42. package/lib/export.d.ts +12 -0
  43. package/lib/export.d.ts.map +1 -1
  44. package/lib/export.js +34 -3
  45. package/lib/export.js.map +1 -1
  46. package/lib/herdr/client.d.ts +8 -9
  47. package/lib/herdr/client.d.ts.map +1 -1
  48. package/lib/herdr/client.js +14 -2
  49. package/lib/herdr/client.js.map +1 -1
  50. package/lib/herdr/constants.d.ts +18 -0
  51. package/lib/herdr/constants.d.ts.map +1 -1
  52. package/lib/herdr/constants.js +18 -0
  53. package/lib/herdr/constants.js.map +1 -1
  54. package/lib/herdr/reporter.d.ts +20 -4
  55. package/lib/herdr/reporter.d.ts.map +1 -1
  56. package/lib/herdr/reporter.js +70 -20
  57. package/lib/herdr/reporter.js.map +1 -1
  58. package/lib/herdr/state.d.ts +10 -10
  59. package/lib/herdr/state.d.ts.map +1 -1
  60. package/lib/herdr/state.js +22 -5
  61. package/lib/herdr/state.js.map +1 -1
  62. package/lib/identity.d.ts +0 -2
  63. package/lib/identity.d.ts.map +1 -1
  64. package/lib/identity.js +0 -1
  65. package/lib/identity.js.map +1 -1
  66. package/lib/index.d.ts +1 -4
  67. package/lib/index.d.ts.map +1 -1
  68. package/lib/index.js +15 -5
  69. package/lib/index.js.map +1 -1
  70. package/lib/input/keymap.d.ts +1 -7
  71. package/lib/input/keymap.d.ts.map +1 -1
  72. package/lib/input/keymap.js +3 -11
  73. package/lib/input/keymap.js.map +1 -1
  74. package/lib/input/submission.js +2 -2
  75. package/lib/input/submission.js.map +1 -1
  76. package/lib/install-skills.d.ts +20 -1
  77. package/lib/install-skills.d.ts.map +1 -1
  78. package/lib/install-skills.js +84 -9
  79. package/lib/install-skills.js.map +1 -1
  80. package/lib/model-list.d.ts.map +1 -1
  81. package/lib/model-list.js +17 -5
  82. package/lib/model-list.js.map +1 -1
  83. package/lib/queue.d.ts +0 -2
  84. package/lib/queue.d.ts.map +1 -1
  85. package/lib/queue.js +1 -1
  86. package/lib/queue.js.map +1 -1
  87. package/lib/settings-notice.d.ts +10 -1
  88. package/lib/settings-notice.d.ts.map +1 -1
  89. package/lib/settings-notice.js +17 -7
  90. package/lib/settings-notice.js.map +1 -1
  91. package/lib/spacing.d.ts +40 -0
  92. package/lib/spacing.d.ts.map +1 -0
  93. package/lib/spacing.js +54 -0
  94. package/lib/spacing.js.map +1 -0
  95. package/lib/stash/paths.d.ts +19 -10
  96. package/lib/stash/paths.d.ts.map +1 -1
  97. package/lib/stash/paths.js +52 -23
  98. package/lib/stash/paths.js.map +1 -1
  99. package/lib/stash/schema.d.ts +13 -12
  100. package/lib/stash/schema.d.ts.map +1 -1
  101. package/lib/stash/schema.js +11 -9
  102. package/lib/stash/schema.js.map +1 -1
  103. package/lib/stash/store.d.ts.map +1 -1
  104. package/lib/stash/store.js +9 -19
  105. package/lib/stash/store.js.map +1 -1
  106. package/lib/stash.d.ts +17 -10
  107. package/lib/stash.d.ts.map +1 -1
  108. package/lib/stash.js +31 -20
  109. package/lib/stash.js.map +1 -1
  110. package/lib/subagents.d.ts +0 -4
  111. package/lib/subagents.d.ts.map +1 -1
  112. package/lib/subagents.js +2 -2
  113. package/lib/subagents.js.map +1 -1
  114. package/lib/surface/appearance.d.ts +3 -0
  115. package/lib/surface/appearance.d.ts.map +1 -1
  116. package/lib/surface/appearance.js +5 -0
  117. package/lib/surface/appearance.js.map +1 -1
  118. package/lib/surface/background-work.d.ts +2 -0
  119. package/lib/surface/background-work.d.ts.map +1 -1
  120. package/lib/surface/background-work.js +45 -3
  121. package/lib/surface/background-work.js.map +1 -1
  122. package/lib/surface/commands.d.ts +2 -0
  123. package/lib/surface/commands.d.ts.map +1 -1
  124. package/lib/surface/commands.js +32 -6
  125. package/lib/surface/commands.js.map +1 -1
  126. package/lib/surface/modal-input.d.ts +3 -2
  127. package/lib/surface/modal-input.d.ts.map +1 -1
  128. package/lib/surface/modal-input.js +25 -8
  129. package/lib/surface/modal-input.js.map +1 -1
  130. package/lib/surface/model-choice.d.ts.map +1 -1
  131. package/lib/surface/model-choice.js +18 -18
  132. package/lib/surface/model-choice.js.map +1 -1
  133. package/lib/surface/preset-choice.d.ts.map +1 -1
  134. package/lib/surface/preset-choice.js +18 -10
  135. package/lib/surface/preset-choice.js.map +1 -1
  136. package/lib/surface/prompt-memory.d.ts +3 -1
  137. package/lib/surface/prompt-memory.d.ts.map +1 -1
  138. package/lib/surface/prompt-memory.js +10 -11
  139. package/lib/surface/prompt-memory.js.map +1 -1
  140. package/lib/surface/session-lifecycle.d.ts +6 -1
  141. package/lib/surface/session-lifecycle.d.ts.map +1 -1
  142. package/lib/surface/session-lifecycle.js +30 -8
  143. package/lib/surface/session-lifecycle.js.map +1 -1
  144. package/lib/surface/session-view.d.ts.map +1 -1
  145. package/lib/surface/session-view.js +1 -3
  146. package/lib/surface/session-view.js.map +1 -1
  147. package/lib/surface/staged-turns.d.ts +0 -2
  148. package/lib/surface/staged-turns.d.ts.map +1 -1
  149. package/lib/surface/staged-turns.js +37 -6
  150. package/lib/surface/staged-turns.js.map +1 -1
  151. package/lib/terminal/external-editor.d.ts +16 -0
  152. package/lib/terminal/external-editor.d.ts.map +1 -1
  153. package/lib/terminal/external-editor.js +38 -6
  154. package/lib/terminal/external-editor.js.map +1 -1
  155. package/lib/terminal/host-writes.d.ts +15 -2
  156. package/lib/terminal/host-writes.d.ts.map +1 -1
  157. package/lib/terminal/host-writes.js +10 -1
  158. package/lib/terminal/host-writes.js.map +1 -1
  159. package/lib/terminal/restore.d.ts +1 -2
  160. package/lib/terminal/restore.d.ts.map +1 -1
  161. package/lib/terminal/restore.js +1 -9
  162. package/lib/terminal/restore.js.map +1 -1
  163. package/lib/terminal/signals.d.ts +0 -1
  164. package/lib/terminal/signals.d.ts.map +1 -1
  165. package/lib/terminal/signals.js +1 -1
  166. package/lib/terminal/signals.js.map +1 -1
  167. package/lib/terminal/title.d.ts.map +1 -1
  168. package/lib/terminal/title.js +14 -3
  169. package/lib/terminal/title.js.map +1 -1
  170. package/lib/terminal/warning-screen.d.ts.map +1 -1
  171. package/lib/terminal/warning-screen.js +12 -1
  172. package/lib/terminal/warning-screen.js.map +1 -1
  173. package/lib/theme-capability.d.ts +0 -2
  174. package/lib/theme-capability.d.ts.map +1 -1
  175. package/lib/theme-capability.js +1 -1
  176. package/lib/theme-capability.js.map +1 -1
  177. package/lib/theme-defaults.d.ts.map +1 -1
  178. package/lib/theme-defaults.js +7 -0
  179. package/lib/theme-defaults.js.map +1 -1
  180. package/lib/theme-files.d.ts +1 -1
  181. package/lib/theme-files.d.ts.map +1 -1
  182. package/lib/theme-files.js +1 -1
  183. package/lib/theme-files.js.map +1 -1
  184. package/lib/theme-schema.d.ts +6 -6
  185. package/lib/theme-settings.d.ts +13 -8
  186. package/lib/theme-settings.d.ts.map +1 -1
  187. package/lib/theme-settings.js +17 -3
  188. package/lib/theme-settings.js.map +1 -1
  189. package/lib/theme-tokens.d.ts +1 -1
  190. package/lib/theme-tokens.d.ts.map +1 -1
  191. package/lib/theme-tokens.js +7 -2
  192. package/lib/theme-tokens.js.map +1 -1
  193. package/lib/transcript.d.ts +2 -2
  194. package/lib/transcript.d.ts.map +1 -1
  195. package/lib/transcript.js +9 -4
  196. package/lib/transcript.js.map +1 -1
  197. package/lib/ui/dock.d.ts +2 -0
  198. package/lib/ui/dock.d.ts.map +1 -1
  199. package/lib/ui/dock.js +18 -3
  200. package/lib/ui/dock.js.map +1 -1
  201. package/lib/ui/gap.d.ts +28 -0
  202. package/lib/ui/gap.d.ts.map +1 -0
  203. package/lib/ui/gap.js +47 -0
  204. package/lib/ui/gap.js.map +1 -0
  205. package/lib/ui/gutter.d.ts +25 -0
  206. package/lib/ui/gutter.d.ts.map +1 -0
  207. package/lib/ui/gutter.js +31 -0
  208. package/lib/ui/gutter.js.map +1 -0
  209. package/lib/ui/layout.d.ts +13 -1
  210. package/lib/ui/layout.d.ts.map +1 -1
  211. package/lib/ui/layout.js +32 -6
  212. package/lib/ui/layout.js.map +1 -1
  213. package/lib/ui/queue.d.ts +0 -4
  214. package/lib/ui/queue.d.ts.map +1 -1
  215. package/lib/ui/queue.js +2 -2
  216. package/lib/ui/queue.js.map +1 -1
  217. package/lib/ui/rows.d.ts +0 -8
  218. package/lib/ui/rows.d.ts.map +1 -1
  219. package/lib/ui/rows.js +1 -9
  220. package/lib/ui/rows.js.map +1 -1
  221. package/lib/ui/stash-picker.d.ts +2 -2
  222. package/lib/ui/stash-picker.d.ts.map +1 -1
  223. package/lib/ui/stash-picker.js +3 -3
  224. package/lib/ui/stash-picker.js.map +1 -1
  225. package/lib/ui/view/gate-card.d.ts.map +1 -1
  226. package/lib/ui/view/gate-card.js +4 -1
  227. package/lib/ui/view/gate-card.js.map +1 -1
  228. package/lib/ui/view/tool-card.d.ts +17 -2
  229. package/lib/ui/view/tool-card.d.ts.map +1 -1
  230. package/lib/ui/view/tool-card.js +40 -8
  231. package/lib/ui/view/tool-card.js.map +1 -1
  232. package/lib/ui/view/transcript-message.d.ts +3 -0
  233. package/lib/ui/view/transcript-message.d.ts.map +1 -1
  234. package/lib/ui/view/transcript-message.js +8 -1
  235. package/lib/ui/view/transcript-message.js.map +1 -1
  236. package/lib/ui/view.d.ts +36 -9
  237. package/lib/ui/view.d.ts.map +1 -1
  238. package/lib/ui/view.js +90 -32
  239. package/lib/ui/view.js.map +1 -1
  240. package/package.json +3 -1
  241. package/themes/deepseek-blue.yaml +3 -0
  242. package/themes/violet-orbit.yaml +16 -9
package/lib/ui/view.js CHANGED
@@ -3,9 +3,11 @@ import {} from "./picker.js";
3
3
  import { pickerCardLines } from "./picker-card.js";
4
4
  import { ANSWER_FACE } from "./markdown.js";
5
5
  import {} from "./frame.js";
6
+ import { gapRows, placeGap, pushGap } from "./gap.js";
6
7
  import {} from "../theme.js";
7
8
  import {} from "../theme-tokens.js";
8
9
  import { DEFAULT_TOOL_DISPLAY } from "../tool-display.js";
10
+ import { DEFAULT_SPACING } from "../spacing.js";
9
11
  import { SECOND_MS } from "../transcript/tool-calls.js";
10
12
  import {} from "../transcript.js";
11
13
  import {} from "../gates.js";
@@ -21,15 +23,27 @@ const CARD_OPEN_FALLBACK = 'ctrl+o';
21
23
  * The state a reader gets before opening anything, and the view's own fallback.
22
24
  *
23
25
  * Thoughts start folded because they can be long enough to push the answer off
24
- * the screen. Cards and a program's calls start from the reader's own `tools:`
25
- * settings, which ship folded for cards — one clipped line each — and inline for
26
- * a program's calls, whose one line per dispatch is what the card stands for.
26
+ * the screen. Cards start from the reader's own `tools:` settings, which ship
27
+ * folded — one clipped line each — and a program's calls start folded with them:
28
+ * one line per dispatch is a wall of rows over the answer, and those rows answer
29
+ * to a click on the card's own header or to the nested-calls key.
27
30
  */
28
- export const DEFAULT_VIEW_STATE = { expandCards: false, expandReasoning: false, expandSubCalls: true };
31
+ export const DEFAULT_VIEW_STATE = { expandCards: false, expandReasoning: false, expandSubCalls: false };
29
32
  /** Keys are prefixed because cards, thoughts, and dispatches all share one map. */
30
33
  const toolClickKey = (id) => (id === '' ? undefined : `tool:${id}`);
31
34
  const reasoningClickKey = (id) => (id === '' ? undefined : `reason:${id}`);
32
35
  const subCallClickKey = (parentId, id) => `sub:${parentId}/${id}`;
36
+ /**
37
+ * The key one card's own answer about its dispatched calls is remembered under.
38
+ *
39
+ * Beside the card's own key rather than inside it, because the two are different
40
+ * questions: the card's key folds the row, this one says whether the calls under
41
+ * it are worth the rows they cost. A reader who clicked one program's header is
42
+ * answering for that program, and folding a card is not an answer about what it
43
+ * dispatched.
44
+ */
45
+ const NESTED_CALLS_CLICK_PREFIX = 'subcalls:';
46
+ const nestedCallsClickKey = (id) => (id === '' ? undefined : `${NESTED_CALLS_CLICK_PREFIX}${id}`);
33
47
  export class TranscriptView {
34
48
  model;
35
49
  theme;
@@ -73,10 +87,10 @@ export class TranscriptView {
73
87
  this.theme = theme;
74
88
  this.markdown = markdown;
75
89
  this.options = options;
76
- this.cards = new ToolCards({ theme: this.theme, state: () => this.viewState, keymap: () => this.keymap(), toolDisplay: tool => this.toolDisplay(tool), expansionOf: entry => this.expansionOf(entry), liveCall: callId => this.model.liveCall(callId), cardOpenHint: () => hintKeys(this.keymap(), 'surface.toolDetail') || CARD_OPEN_FALLBACK, toolKey: id => toolClickKey(id), subCallKey: (parentId, id) => subCallClickKey(parentId, id), subCallOpen: (parentId, id) => this.subCallOpen(parentId, id) });
77
- this.messages = new Messages({ theme: this.theme, markdown: this.markdown, reasoningOpen: entry => this.reasoningOpen(entry), reasoningFoldHint: () => this.reasoningFoldHint(), reasoningKey: id => reasoningClickKey(id), pushWrapped: (lines, text, width, prefix, token) => this.pushWrapped(lines, text, width, prefix, token) });
90
+ this.cards = new ToolCards({ theme: this.theme, keymap: () => this.keymap(), toolDisplay: tool => this.toolDisplay(tool), expansionOf: entry => this.expansionOf(entry), subCallsOpen: entry => this.subCallsOpen(entry), liveCall: callId => this.model.liveCall(callId), cardOpenHint: () => hintKeys(this.keymap(), 'surface.toolDetail') || CARD_OPEN_FALLBACK, toolKey: id => toolClickKey(id), subCallsKey: id => nestedCallsClickKey(id), subCallKey: (parentId, id) => subCallClickKey(parentId, id), subCallOpen: (parentId, id) => this.subCallOpen(parentId, id) });
91
+ this.messages = new Messages({ theme: this.theme, markdown: this.markdown, reasoningOpen: entry => this.reasoningOpen(entry), reasoningFoldHint: () => this.reasoningFoldHint(), reasoningKey: id => reasoningClickKey(id), spacing: () => this.air(), pushWrapped: (lines, text, width, prefix, token) => this.pushWrapped(lines, text, width, prefix, token) });
78
92
  this.gates = new GateCards({ theme: this.theme, pushWrapped: (lines, text, width, prefix, token) => this.pushWrapped(lines, text, width, prefix, token) });
79
- this.rows = options.rows ?? new RowCache();
93
+ this.rows = new RowCache();
80
94
  }
81
95
  get viewState() {
82
96
  return this.options.state?.() ?? DEFAULT_VIEW_STATE;
@@ -85,6 +99,10 @@ export class TranscriptView {
85
99
  toolDisplay(tool) {
86
100
  return this.options.toolDisplay?.(tool) ?? DEFAULT_TOOL_DISPLAY;
87
101
  }
102
+ /** The air in force, or the shipped spacing for a caller that lent none. */
103
+ air() {
104
+ return this.options.spacing?.() ?? DEFAULT_SPACING;
105
+ }
88
106
  /**
89
107
  * Whether one tool message draws open.
90
108
  *
@@ -107,6 +125,27 @@ export class TranscriptView {
107
125
  subCallOpen(parentId, id) {
108
126
  return this.clicked.get(subCallClickKey(parentId, id)) ?? false;
109
127
  }
128
+ /**
129
+ * Whether one card draws the calls its program dispatched.
130
+ *
131
+ * A click on the card's header outranks the nested-calls key, which stays the
132
+ * one press that shows or hides every program at once; a card nobody clicked
133
+ * follows it. The answer is remembered per card rather than folded into the
134
+ * shared key, because a reader reading one program's work should not have to
135
+ * open every other card in the session to see it.
136
+ *
137
+ * The card's own fold is a different question, answered by a different click:
138
+ * a folded program is one row, and its calls are the work that row summarised
139
+ * — which is what a reader unrolls it for, whether or not the program's own
140
+ * return value is on screen with them.
141
+ */
142
+ subCallsOpen(entry) {
143
+ if (entry.card.subCalls === undefined)
144
+ return false;
145
+ const key = nestedCallsClickKey(entry.id);
146
+ const clicked = key === undefined ? undefined : this.clicked.get(key);
147
+ return clicked ?? this.viewState.expandSubCalls;
148
+ }
110
149
  /**
111
150
  * Answer a click on a message by folding or unfolding that one row.
112
151
  *
@@ -128,13 +167,18 @@ export class TranscriptView {
128
167
  }
129
168
  if (span === undefined)
130
169
  return undefined;
170
+ // One click on a program's header opens the one level under it: the calls the
171
+ // program dispatched, each still the single row it is read at. The program's
172
+ // own body is the level below that, and it stays folded here because a click
173
+ // that drew both would spend rows the reader never asked for, with nothing
174
+ // left to click for less. Ctrl+O is what opens a card's own rows.
175
+ if (span.key.startsWith(NESTED_CALLS_CLICK_PREFIX)) {
176
+ this.clicked.set(span.key, this.clicked.get(span.key) !== true);
177
+ return { handled: true, render: true };
178
+ }
131
179
  this.clicked.set(span.key, !span.expanded);
132
180
  return { handled: true, render: true };
133
181
  }
134
- /** The cache's own account of the work it avoided; a test reads this. */
135
- rowStats() {
136
- return this.rows.stats();
137
- }
138
182
  invalidate() {
139
183
  // The rows are keyed by width and expansion state, so a real change misses
140
184
  // anyway; an explicit invalidate means the caller wants them rebuilt.
@@ -180,7 +224,9 @@ export class TranscriptView {
180
224
  return this.model.liveCall(entry.id).running || (entry.card.subCalls ?? []).some(call => call.running);
181
225
  }
182
226
  pushPicker(lines, picker, width) {
183
- lines.push('');
227
+ // The overlay opens under the transcript on one row of air, unless the row
228
+ // above is already air: the break belongs between the two, not to each.
229
+ pushGap(lines);
184
230
  // The rows come from the renderer a popup also draws through, so a card
185
231
  // reads the same whether it sits at the end of the transcript or in a box
186
232
  // over it, and a field added to a card reaches both at once.
@@ -195,6 +241,12 @@ export class TranscriptView {
195
241
  case 'reasoning':
196
242
  this.messages.pushReasoning(lines, entry, width, spans);
197
243
  return;
244
+ case 'step':
245
+ // The log opened a step of the turn here, so the rows it costs are the air
246
+ // that keeps one step's thought and calls from reading as the next step's
247
+ // tail. Nothing else is drawn: the step is a boundary, not a thing said.
248
+ lines.push(...gapRows(this.air().steps));
249
+ return;
198
250
  case 'assistant':
199
251
  // The reply is boxed the way the prompt that asked for it is, so one
200
252
  // exchange reads as two objects rather than as a box and then a stream.
@@ -203,9 +255,8 @@ export class TranscriptView {
203
255
  case 'user': {
204
256
  if (!this.theme.visible('transcript.user'))
205
257
  return;
206
- // A prompt is boxed wherever it is read, so the row it left in the queue
207
- // and the row it becomes here are recognisably the same object.
208
- this.messages.pushFramed(lines, copy, entry.text, width, false, this.messages.userFace(), 'editor.border');
258
+ // A sent prompt keeps its frame without inheriting changes to the input bar.
259
+ this.messages.pushFramed(lines, copy, entry.text, width, false, this.messages.userFace(), 'transcript.user.border');
209
260
  return;
210
261
  }
211
262
  case 'notice':
@@ -227,7 +278,10 @@ export class TranscriptView {
227
278
  // The revision is part of the key: rows drawn under an older theme table
228
279
  // must miss, or a settings change would restyle only the rows that happened
229
280
  // to be redrawn for another reason.
230
- const baseTag = `${width}|${state.expandCards ? 'c' : '-'}${state.expandReasoning ? 'r' : '-'}${state.expandSubCalls ? 'p' : '-'}|${this.theme.revision}`;
281
+ // The air the reader asked for is part of the key for the same reason: the rows
282
+ // an entry holds are its own air plus its own body.
283
+ const gaps = this.air();
284
+ const baseTag = `${width}|${state.expandCards ? 'c' : '-'}${state.expandReasoning ? 'r' : '-'}${state.expandSubCalls ? 'p' : '-'}|${this.theme.revision}|${gaps.messages}${gaps.steps}`;
231
285
  const lines = [];
232
286
  const spans = [];
233
287
  const liveCopy = [];
@@ -239,8 +293,13 @@ export class TranscriptView {
239
293
  // message — or one call inside it — rebuilds that message alone while the
240
294
  // rows around it stay cached.
241
295
  const open = entry.kind === 'tool' ? this.expansionOf(entry) : entry.kind === 'reasoning' ? this.reasoningOpen(entry) : undefined;
296
+ // Whether a program's calls are drawn is part of the key, because it moves
297
+ // rows the card's own fold does not: the calls come and go under a header
298
+ // that stays where it is, and a cached entry would keep answering with what
299
+ // the reader had already clicked away from.
300
+ const shape = entry.kind === 'tool' && this.subCallsOpen(entry) ? 'P' : 'p';
242
301
  const marks = entry.kind === 'tool'
243
- ? `${open === true ? '+' : '-'}${(entry.card.subCalls ?? []).map(call => (this.subCallOpen(entry.id, call.id) ? '1' : '0')).join('')}`
302
+ ? `${open === true ? '+' : '-'}${shape}${(entry.card.subCalls ?? []).map(call => (this.subCallOpen(entry.id, call.id) ? '1' : '0')).join('')}`
244
303
  : open === true ? '+' : '-';
245
304
  // A running row is drawn from a clock the rest of the row is not, so its
246
305
  // cache is spent every second: the entries after it stay put, and a card
@@ -249,40 +308,39 @@ export class TranscriptView {
249
308
  const tag = `${baseTag}|${marks}${this.isLive(entry) ? `|${Math.floor(this.model.now() / SECOND_MS)}` : ''}`;
250
309
  const local = [];
251
310
  const copy = [];
311
+ const rows = [];
252
312
  // The in-flight rows change on every frame, so caching them would only
253
313
  // fill the cache with objects nobody will ask for again.
254
314
  if (index >= settled) {
255
- this.renderEntry(entry, lines, width, true, local, copy);
315
+ this.renderEntry(entry, rows, width, true, local, copy);
256
316
  // A row still arriving is drawn every frame, so it is never cached: its
257
317
  // copy account goes to the frame rather than to an entry nobody can name.
258
318
  liveCopy.push(...copy);
259
- // An in-flight entry draws straight into the transcript, so the spans it
260
- // recorded already name transcript rows; offsetting them again would move
261
- // every hit target as many rows down as the entry's own start.
262
- spans.push(...local);
263
319
  }
264
320
  else {
265
321
  const cached = this.rows.lookup(entry, tag);
266
322
  const saved = this.entrySpans.get(entry);
267
323
  const savedCopy = this.entryCopy.get(entry);
268
324
  if (cached !== undefined && saved !== undefined && savedCopy !== undefined) {
269
- lines.push(...cached);
325
+ rows.push(...cached);
270
326
  local.push(...saved);
271
327
  }
272
328
  else {
273
- const rendered = [];
274
- this.renderEntry(entry, rendered, width, false, local, copy);
275
- this.rows.store(entry, tag, rendered);
329
+ this.renderEntry(entry, rows, width, false, local, copy);
330
+ this.rows.store(entry, tag, rows);
276
331
  this.entrySpans.set(entry, local);
277
332
  this.entryCopy.set(entry, copy);
278
- lines.push(...rendered);
279
- }
280
- // A cached span is kept relative to its entry so the entry can hand it
281
- // back; a click needs it in transcript rows.
282
- for (const span of local) {
283
- spans.push({ key: span.key, start: span.start + start, end: span.end + start, expanded: span.expanded });
284
333
  }
285
334
  }
335
+ // The entry goes in through the seam rather than straight onto the rows drawn
336
+ // so far: the air it opens with is given up when the row above is already air,
337
+ // so a break between two things stays one break however many asked for one.
338
+ const base = start - placeGap(lines, rows);
339
+ // A span is kept relative to its entry so a cached entry can still hand it
340
+ // back, and the row of air a seam dropped moves it with the rows that stayed.
341
+ for (const span of local) {
342
+ spans.push({ ...span, start: span.start + base, end: span.end + base });
343
+ }
286
344
  }
287
345
  this.spans = spans;
288
346
  this.liveCopy = liveCopy;
@@ -1 +1 @@
1
- {"version":3,"file":"view.js","sourceRoot":"","sources":["../../src/ui/view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAsB,MAAM,WAAW,CAAA;AACxD,OAAO,EA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C,MAAM,EAAE,EAAE,CAAA;QACtC,IAAI,MAAM,KAAK,SAAS;YAAE,IAAI,CAAC,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAA;QAC/D,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAA;QAClC,IAAI,IAAI,KAAK,SAAS;YAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAA;QAC/D,OAAO,KAAK,CAAA;IACd,CAAC;IACH;;;;;;;SAOK;IACH,QAAQ;QACN,MAAM,IAAI,GAAe,EAAE,CAAA;QAC3B,KAAK,MAAM,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC;YACzC,MAAM,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;YACvC,IAAI,KAAK,KAAK,SAAS;gBAAE,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAA;QAC9C,CAAC;QACD,8EAA8E;QAC9E,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAA;QAC3B,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sagmans/dsh-tui",
3
- "version": "0.7.0",
3
+ "version": "0.9.0",
4
4
  "description": "Terminal (CLI TUI) surface for DeepSeek Harness: interactive dsh in a terminal, no browser required",
5
5
  "keywords": [
6
6
  "deepseek-harness",
@@ -72,6 +72,7 @@
72
72
  "build": "tsc -p tsconfig.json",
73
73
  "typecheck": "tsc -p tsconfig.json --noEmit && tsc -p tsconfig.test.json",
74
74
  "test": "vitest run",
75
+ "coverage": "vitest run --coverage",
75
76
  "test:release": "python3 -m unittest discover -s tests/release -p 'test_*.py'",
76
77
  "prepare": "npm run build",
77
78
  "prepack": "npm run build",
@@ -147,6 +148,7 @@
147
148
  "@deepseek-ai/dsh-user-approval": "0.1.5-rc.3",
148
149
  "@deepseek-ai/dsh-user-questions": "0.1.5-rc.3",
149
150
  "@types/node": "^24.0.0",
151
+ "@vitest/coverage-v8": "4.1.11",
150
152
  "node-pty": "1.1.0",
151
153
  "typescript": "^5.9.0",
152
154
  "vitest": "^4.1.0"
@@ -44,6 +44,8 @@ palette:
44
44
  tokens:
45
45
  # A row of the conversation.
46
46
  transcript.user: { fg: default, bg: user } # the product marks your own turn with a bubble, not a hue
47
+ # The sent prompt keeps the brand shade without inheriting editor overrides.
48
+ transcript.user.border: { fg: accent }
47
49
  # The reply's own frame. A border is a container rather than a fact, so it may
48
50
  # not take a signal shade; a warm neutral keeps the answer held without moving
49
51
  # it into the amber the surface reserves for state.
@@ -58,6 +60,7 @@ tokens:
58
60
  # the loudest thing on the row, so it carries the brand instead.
59
61
  tool.title: { fg: accent }
60
62
  tool.glyph: { fg: accent } # follows the label it sits beside
63
+ tool.skill: { fg: accent } # follows the label it sits beside
61
64
  tool.args: { fg: arg }
62
65
  tool.stat.added: { fg: added }
63
66
  tool.stat.changed: { fg: warn }
@@ -25,21 +25,25 @@ palette:
25
25
  assistant: '#e8e9ff' # text
26
26
  # Pi has no argument colour of its own, and its link blue — the shade that
27
27
  # first came over — shares a family with the label pi gives a tool name, so
28
- # the two halves of one row could not be told apart. A sage separates them by
29
- # family rather than by shade, at the cost of the family that means something
30
- # arrived: on a diff card the argument and an added line read as two shades of
31
- # one green.
32
- arg: '#aed69a' # no pi key: see the note below
28
+ # the two halves of one row could not be told apart. Separating them by family
29
+ # costs a hue, and the obvious one is already spent: a sage that differs from
30
+ # the label also differs from nothing on a diff card, where an argument and an
31
+ # added line read as two shades of one green. Separating by value costs no hue
32
+ # at all — the argument sits dark enough to recede under the label it belongs
33
+ # to, and the shades that mean something arrived go on being the only ones.
34
+ arg: '#4B5680' # no pi key: see the note below
33
35
 
34
36
  tokens:
35
37
  # A reader's own turn. Pi fills the row, but this surface already frames it,
36
38
  # and a band inside that frame treats one fact twice: it reads as a selected
37
39
  # row rather than as the reader's own words. The shade carries over alone.
38
40
  transcript.user: { fg: user } # userMessageText
41
+ # A submitted prompt keeps its current shade without borrowing the editor setting.
42
+ transcript.user.border: { fg: '#6f76c9' }
39
43
  # The reply's own frame. Pi has no box around a reply, so there is no pi key to
40
44
  # carry over; the violet family it would otherwise borrow disappears against the
41
45
  # answer it holds, and a neutral gold is what keeps the frame a container.
42
- transcript.assistant.border: { fg: '#d6c29a' }
46
+ transcript.assistant.border: { fg: '#a89771' }
43
47
  transcript.notice: { fg: muted } # unchanged from the shipped table
44
48
  transcript.marker: { fg: muted } # unchanged from the shipped table
45
49
  transcript.reasoning.summary: { fg: faint, italic: true } # unchanged from the shipped table
@@ -49,6 +53,10 @@ tokens:
49
53
  # which is the single change that moves the card family into the theme.
50
54
  tool.title: { fg: '#8197f7' } # toolTitle
51
55
  tool.glyph: { fg: '#8197f7' } # toolTitle
56
+ # The skill name rides beside the label on the same row, so it needs a violet
57
+ # the periwinkle label can be read against — neither the label's own hue nor
58
+ # the argument's dark slate, which is chosen for a path rather than a name.
59
+ tool.skill: { fg: '#C9A3D9' }
52
60
  tool.args: { fg: arg } # unchanged from the shipped table
53
61
  tool.stat.added: { fg: added } # unchanged from the shipped table
54
62
  tool.stat.changed: { fg: warn } # unchanged from the shipped table
@@ -172,9 +180,8 @@ tokens:
172
180
  # Pi draws its borders a shade above its background, which is what a
173
181
  # separator between facts is; the shipped muted grey reads as a fact itself.
174
182
  status.separator: { fg: '#343652' } # border
175
- # The editor is the one element that always holds the reader's attention,
176
- # so it takes pi's focused border rather than its resting one.
177
- editor.border: { fg: '#8a8aff' } # borderAccent
183
+ # The input bar owns its border even when the sent prompt starts at the same shade.
184
+ editor.border: { fg: '#6f76c9' }
178
185
  editor.queued: { fg: faint, italic: true }
179
186
  editor.queued.more: { fg: faint }
180
187
  editor.ghost: { dim: true } # unchanged from the shipped table