@sagmans/dsh-tui 0.5.2 → 0.7.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 (285) hide show
  1. package/.agents/skills/dsh-tui-dogfood/SKILL.md +83 -0
  2. package/.agents/skills/dsh-tui-dogfood/references/home-state.md +78 -0
  3. package/.agents/skills/dsh-tui-dogfood/scripts/clone-links.mjs +133 -0
  4. package/.agents/skills/dsh-tui-dogfood/scripts/run-plugin-from-worktree.sh +417 -0
  5. package/.agents/skills/dsh-tui-update-models/SKILL.md +121 -0
  6. package/.agents/skills/dsh-tui-update-models/references/model-wiring.md +162 -0
  7. package/.agents/skills/dsh-tui-update-models/scripts/dump-model-catalog.mjs +178 -0
  8. package/README.md +131 -17
  9. package/lib/agent/host.d.ts +11 -0
  10. package/lib/agent/host.d.ts.map +1 -1
  11. package/lib/agent/host.js +16 -2
  12. package/lib/agent/host.js.map +1 -1
  13. package/lib/agent/present.d.ts.map +1 -1
  14. package/lib/agent/present.js +2 -1
  15. package/lib/agent/present.js.map +1 -1
  16. package/lib/agent/undo.d.ts +52 -0
  17. package/lib/agent/undo.d.ts.map +1 -0
  18. package/lib/agent/undo.js +106 -0
  19. package/lib/agent/undo.js.map +1 -0
  20. package/lib/cards/composition.d.ts +68 -0
  21. package/lib/cards/composition.d.ts.map +1 -0
  22. package/lib/cards/composition.js +117 -0
  23. package/lib/cards/composition.js.map +1 -0
  24. package/lib/cards/presenter.d.ts +23 -0
  25. package/lib/cards/presenter.d.ts.map +1 -0
  26. package/lib/cards/presenter.js +394 -0
  27. package/lib/cards/presenter.js.map +1 -0
  28. package/lib/cards/preview.d.ts +42 -0
  29. package/lib/cards/preview.d.ts.map +1 -0
  30. package/lib/cards/preview.js +51 -0
  31. package/lib/cards/preview.js.map +1 -0
  32. package/lib/cards.d.ts +42 -95
  33. package/lib/cards.d.ts.map +1 -1
  34. package/lib/cards.js +4 -526
  35. package/lib/cards.js.map +1 -1
  36. package/lib/compat/section.d.ts +29 -0
  37. package/lib/compat/section.d.ts.map +1 -0
  38. package/lib/compat/section.js +82 -0
  39. package/lib/compat/section.js.map +1 -0
  40. package/lib/config.d.ts +27 -2
  41. package/lib/config.d.ts.map +1 -1
  42. package/lib/config.js +61 -1
  43. package/lib/config.js.map +1 -1
  44. package/lib/contracts.d.ts +28 -0
  45. package/lib/contracts.d.ts.map +1 -1
  46. package/lib/fold-cursor.d.ts +8 -0
  47. package/lib/fold-cursor.d.ts.map +1 -1
  48. package/lib/fold-cursor.js +18 -0
  49. package/lib/fold-cursor.js.map +1 -1
  50. package/lib/gates/question-card.d.ts +77 -0
  51. package/lib/gates/question-card.d.ts.map +1 -0
  52. package/lib/gates/question-card.js +113 -0
  53. package/lib/gates/question-card.js.map +1 -0
  54. package/lib/gates/questions.d.ts +127 -0
  55. package/lib/gates/questions.d.ts.map +1 -0
  56. package/lib/gates/questions.js +418 -0
  57. package/lib/gates/questions.js.map +1 -0
  58. package/lib/gates.d.ts +1 -113
  59. package/lib/gates.d.ts.map +1 -1
  60. package/lib/gates.js +1 -484
  61. package/lib/gates.js.map +1 -1
  62. package/lib/herdr/reporter.d.ts +9 -4
  63. package/lib/herdr/reporter.d.ts.map +1 -1
  64. package/lib/herdr/reporter.js +5 -9
  65. package/lib/herdr/reporter.js.map +1 -1
  66. package/lib/herdr/state.d.ts +35 -4
  67. package/lib/herdr/state.d.ts.map +1 -1
  68. package/lib/herdr/state.js +37 -4
  69. package/lib/herdr/state.js.map +1 -1
  70. package/lib/index.d.ts +1 -0
  71. package/lib/index.d.ts.map +1 -1
  72. package/lib/index.js +343 -2267
  73. package/lib/index.js.map +1 -1
  74. package/lib/input/action-catalog.d.ts +74 -0
  75. package/lib/input/action-catalog.d.ts.map +1 -0
  76. package/lib/input/action-catalog.js +137 -0
  77. package/lib/input/action-catalog.js.map +1 -0
  78. package/lib/input/actions.d.ts +5 -81
  79. package/lib/input/actions.d.ts.map +1 -1
  80. package/lib/input/actions.js +4 -621
  81. package/lib/input/actions.js.map +1 -1
  82. package/lib/input/completion.d.ts +11 -1
  83. package/lib/input/completion.d.ts.map +1 -1
  84. package/lib/input/completion.js +17 -1
  85. package/lib/input/completion.js.map +1 -1
  86. package/lib/input/file-index.d.ts +40 -0
  87. package/lib/input/file-index.d.ts.map +1 -0
  88. package/lib/input/file-index.js +141 -0
  89. package/lib/input/file-index.js.map +1 -0
  90. package/lib/input/file-search.d.ts +1 -38
  91. package/lib/input/file-search.d.ts.map +1 -1
  92. package/lib/input/file-search.js +1 -487
  93. package/lib/input/file-search.js.map +1 -1
  94. package/lib/input/key-press.d.ts +57 -0
  95. package/lib/input/key-press.d.ts.map +1 -0
  96. package/lib/input/key-press.js +218 -0
  97. package/lib/input/key-press.js.map +1 -0
  98. package/lib/input/keymap-conflicts.d.ts +59 -0
  99. package/lib/input/keymap-conflicts.d.ts.map +1 -0
  100. package/lib/input/keymap-conflicts.js +292 -0
  101. package/lib/input/keymap-conflicts.js.map +1 -0
  102. package/lib/input/keymap-settings.js +1 -1
  103. package/lib/input/keymap-settings.js.map +1 -1
  104. package/lib/input/keymap.d.ts.map +1 -1
  105. package/lib/input/keymap.js +5 -1
  106. package/lib/input/keymap.js.map +1 -1
  107. package/lib/input/submission.d.ts +11 -1
  108. package/lib/input/submission.d.ts.map +1 -1
  109. package/lib/input/submission.js +10 -1
  110. package/lib/input/submission.js.map +1 -1
  111. package/lib/input/workspace-files.d.ts +10 -0
  112. package/lib/input/workspace-files.d.ts.map +1 -0
  113. package/lib/input/workspace-files.js +359 -0
  114. package/lib/input/workspace-files.js.map +1 -0
  115. package/lib/install-skills.d.ts +20 -0
  116. package/lib/install-skills.d.ts.map +1 -0
  117. package/lib/install-skills.js +198 -0
  118. package/lib/install-skills.js.map +1 -0
  119. package/lib/keys-command.d.ts +2 -1
  120. package/lib/keys-command.d.ts.map +1 -1
  121. package/lib/keys-command.js +2 -1
  122. package/lib/keys-command.js.map +1 -1
  123. package/lib/model-list.d.ts +37 -0
  124. package/lib/model-list.d.ts.map +1 -0
  125. package/lib/model-list.js +60 -0
  126. package/lib/model-list.js.map +1 -0
  127. package/lib/startup.d.ts +8 -0
  128. package/lib/startup.d.ts.map +1 -1
  129. package/lib/startup.js +120 -24
  130. package/lib/startup.js.map +1 -1
  131. package/lib/subagents.d.ts +7 -3
  132. package/lib/subagents.d.ts.map +1 -1
  133. package/lib/subagents.js +28 -4
  134. package/lib/subagents.js.map +1 -1
  135. package/lib/surface/appearance-preferences.d.ts +26 -0
  136. package/lib/surface/appearance-preferences.d.ts.map +1 -0
  137. package/lib/surface/appearance-preferences.js +139 -0
  138. package/lib/surface/appearance-preferences.js.map +1 -0
  139. package/lib/surface/appearance.d.ts +87 -0
  140. package/lib/surface/appearance.d.ts.map +1 -0
  141. package/lib/surface/appearance.js +353 -0
  142. package/lib/surface/appearance.js.map +1 -0
  143. package/lib/surface/background-work.d.ts +49 -0
  144. package/lib/surface/background-work.d.ts.map +1 -0
  145. package/lib/surface/background-work.js +146 -0
  146. package/lib/surface/background-work.js.map +1 -0
  147. package/lib/surface/commands.d.ts +80 -0
  148. package/lib/surface/commands.d.ts.map +1 -0
  149. package/lib/surface/commands.js +364 -0
  150. package/lib/surface/commands.js.map +1 -0
  151. package/lib/surface/modal-input.d.ts +58 -0
  152. package/lib/surface/modal-input.d.ts.map +1 -0
  153. package/lib/surface/modal-input.js +237 -0
  154. package/lib/surface/modal-input.js.map +1 -0
  155. package/lib/surface/model-choice.d.ts +54 -0
  156. package/lib/surface/model-choice.d.ts.map +1 -0
  157. package/lib/surface/model-choice.js +325 -0
  158. package/lib/surface/model-choice.js.map +1 -0
  159. package/lib/surface/preset-choice.d.ts +78 -0
  160. package/lib/surface/preset-choice.d.ts.map +1 -0
  161. package/lib/surface/preset-choice.js +163 -0
  162. package/lib/surface/preset-choice.js.map +1 -0
  163. package/lib/surface/prompt-input.d.ts +97 -0
  164. package/lib/surface/prompt-input.d.ts.map +1 -0
  165. package/lib/surface/prompt-input.js +215 -0
  166. package/lib/surface/prompt-input.js.map +1 -0
  167. package/lib/surface/prompt-memory.d.ts +76 -0
  168. package/lib/surface/prompt-memory.d.ts.map +1 -0
  169. package/lib/surface/prompt-memory.js +167 -0
  170. package/lib/surface/prompt-memory.js.map +1 -0
  171. package/lib/surface/session-lifecycle.d.ts +120 -0
  172. package/lib/surface/session-lifecycle.d.ts.map +1 -0
  173. package/lib/surface/session-lifecycle.js +321 -0
  174. package/lib/surface/session-lifecycle.js.map +1 -0
  175. package/lib/surface/session-picker.d.ts +39 -0
  176. package/lib/surface/session-picker.d.ts.map +1 -0
  177. package/lib/surface/session-picker.js +107 -0
  178. package/lib/surface/session-picker.js.map +1 -0
  179. package/lib/surface/session-view.d.ts +86 -0
  180. package/lib/surface/session-view.d.ts.map +1 -0
  181. package/lib/surface/session-view.js +215 -0
  182. package/lib/surface/session-view.js.map +1 -0
  183. package/lib/surface/staged-turns.d.ts +81 -0
  184. package/lib/surface/staged-turns.d.ts.map +1 -0
  185. package/lib/surface/staged-turns.js +206 -0
  186. package/lib/surface/staged-turns.js.map +1 -0
  187. package/lib/surface/terminal-lifecycle.d.ts +76 -0
  188. package/lib/surface/terminal-lifecycle.d.ts.map +1 -0
  189. package/lib/surface/terminal-lifecycle.js +222 -0
  190. package/lib/surface/terminal-lifecycle.js.map +1 -0
  191. package/lib/terminal/warning-screen.d.ts +8 -1
  192. package/lib/terminal/warning-screen.d.ts.map +1 -1
  193. package/lib/terminal/warning-screen.js +9 -0
  194. package/lib/terminal/warning-screen.js.map +1 -1
  195. package/lib/terminal-text/scan.d.ts +44 -0
  196. package/lib/terminal-text/scan.d.ts.map +1 -0
  197. package/lib/terminal-text/scan.js +195 -0
  198. package/lib/terminal-text/scan.js.map +1 -0
  199. package/lib/terminal-text/sgr.d.ts +32 -0
  200. package/lib/terminal-text/sgr.d.ts.map +1 -0
  201. package/lib/terminal-text/sgr.js +203 -0
  202. package/lib/terminal-text/sgr.js.map +1 -0
  203. package/lib/terminal-text.d.ts +1 -1
  204. package/lib/terminal-text.d.ts.map +1 -1
  205. package/lib/terminal-text.js +2 -379
  206. package/lib/terminal-text.js.map +1 -1
  207. package/lib/theme-command.js +2 -1
  208. package/lib/theme-command.js.map +1 -1
  209. package/lib/theme-defaults.d.ts +64 -0
  210. package/lib/theme-defaults.d.ts.map +1 -0
  211. package/lib/theme-defaults.js +248 -0
  212. package/lib/theme-defaults.js.map +1 -0
  213. package/lib/theme-resolver.d.ts +36 -0
  214. package/lib/theme-resolver.d.ts.map +1 -0
  215. package/lib/theme-resolver.js +112 -0
  216. package/lib/theme-resolver.js.map +1 -0
  217. package/lib/theme-schema.d.ts +6 -6
  218. package/lib/theme-schema.d.ts.map +1 -1
  219. package/lib/theme-schema.js +3 -2
  220. package/lib/theme-schema.js.map +1 -1
  221. package/lib/theme-settings.d.ts +13 -15
  222. package/lib/theme-settings.d.ts.map +1 -1
  223. package/lib/theme-settings.js +27 -19
  224. package/lib/theme-settings.js.map +1 -1
  225. package/lib/theme-tokens.d.ts +1 -90
  226. package/lib/theme-tokens.d.ts.map +1 -1
  227. package/lib/theme-tokens.js +11 -341
  228. package/lib/theme-tokens.js.map +1 -1
  229. package/lib/theme.d.ts +1 -1
  230. package/lib/theme.d.ts.map +1 -1
  231. package/lib/theme.js +2 -1
  232. package/lib/theme.js.map +1 -1
  233. package/lib/tool-display.d.ts.map +1 -1
  234. package/lib/tool-display.js +2 -1
  235. package/lib/tool-display.js.map +1 -1
  236. package/lib/transcript/message-content.d.ts +21 -0
  237. package/lib/transcript/message-content.d.ts.map +1 -0
  238. package/lib/transcript/message-content.js +61 -0
  239. package/lib/transcript/message-content.js.map +1 -0
  240. package/lib/transcript/tool-calls.d.ts +106 -0
  241. package/lib/transcript/tool-calls.d.ts.map +1 -0
  242. package/lib/transcript/tool-calls.js +254 -0
  243. package/lib/transcript/tool-calls.js.map +1 -0
  244. package/lib/transcript.d.ts +38 -43
  245. package/lib/transcript.d.ts.map +1 -1
  246. package/lib/transcript.js +58 -245
  247. package/lib/transcript.js.map +1 -1
  248. package/lib/ui/copy.d.ts +17 -0
  249. package/lib/ui/copy.d.ts.map +1 -0
  250. package/lib/ui/copy.js +104 -0
  251. package/lib/ui/copy.js.map +1 -0
  252. package/lib/ui/dock.d.ts +35 -3
  253. package/lib/ui/dock.d.ts.map +1 -1
  254. package/lib/ui/dock.js +124 -23
  255. package/lib/ui/dock.js.map +1 -1
  256. package/lib/ui/editor.d.ts.map +1 -1
  257. package/lib/ui/editor.js +2 -1
  258. package/lib/ui/editor.js.map +1 -1
  259. package/lib/ui/frame.d.ts +31 -0
  260. package/lib/ui/frame.d.ts.map +1 -1
  261. package/lib/ui/frame.js +27 -4
  262. package/lib/ui/frame.js.map +1 -1
  263. package/lib/ui/keymap-picker.d.ts +2 -1
  264. package/lib/ui/keymap-picker.d.ts.map +1 -1
  265. package/lib/ui/keymap-picker.js +1 -0
  266. package/lib/ui/keymap-picker.js.map +1 -1
  267. package/lib/ui/view/gate-card.d.ts +21 -0
  268. package/lib/ui/view/gate-card.d.ts.map +1 -0
  269. package/lib/ui/view/gate-card.js +104 -0
  270. package/lib/ui/view/gate-card.js.map +1 -0
  271. package/lib/ui/view/tool-card.d.ts +138 -0
  272. package/lib/ui/view/tool-card.d.ts.map +1 -0
  273. package/lib/ui/view/tool-card.js +413 -0
  274. package/lib/ui/view/tool-card.js.map +1 -0
  275. package/lib/ui/view/transcript-message.d.ts +62 -0
  276. package/lib/ui/view/transcript-message.d.ts.map +1 -0
  277. package/lib/ui/view/transcript-message.js +158 -0
  278. package/lib/ui/view/transcript-message.js.map +1 -0
  279. package/lib/ui/view.d.ts +87 -156
  280. package/lib/ui/view.d.ts.map +1 -1
  281. package/lib/ui/view.js +122 -556
  282. package/lib/ui/view.js.map +1 -1
  283. package/package.json +3 -1
  284. package/themes/deepseek-blue.yaml +9 -0
  285. package/themes/violet-orbit.yaml +7 -0
package/lib/cards.d.ts CHANGED
@@ -1,5 +1,4 @@
1
- import type { FileDiff, ToolCallView, ToolResultView } from '@deepseek-ai/dsh-tools';
2
- import type { CardRowClass } from './theme-tokens.ts';
1
+ import { type CardRowClass } from './theme-tokens.ts';
3
2
  /** What a tool's result presenter receives, plus the call arguments it was asked with. */
4
3
  export interface ToolResultInput {
5
4
  readonly argumentsJson: string;
@@ -63,6 +62,24 @@ export interface ToolSubCall {
63
62
  readonly title: string;
64
63
  readonly argument?: string;
65
64
  readonly failed: boolean;
65
+ /**
66
+ * Whether the call is dispatched and still running.
67
+ *
68
+ * A program's calls are the only work a reader sees between the moment the
69
+ * program starts and its return value, so a call that has settled already and
70
+ * one still in flight have to be told apart: the card they sit under is one
71
+ * row either way until the program comes back.
72
+ */
73
+ readonly running: boolean;
74
+ /**
75
+ * How the call finished, in the words the tool that ran it reported.
76
+ *
77
+ * A program's calls all look alike once they are back, so the row keeps the
78
+ * one line the tool itself drew about its outcome — a shell's exit status — and
79
+ * a reader can tell a command that worked from one that did not without
80
+ * opening anything.
81
+ */
82
+ readonly status?: string;
66
83
  /**
67
84
  * What the tool's own presenter drew for the call — a diff derived from the
68
85
  * arguments, a raw input — kept only for the reader who opens the row.
@@ -126,6 +143,18 @@ export interface ToolCard {
126
143
  /** Rows retained for rendering, already capped at CARD_DETAIL_MAX. */
127
144
  readonly detail: readonly CardRow[];
128
145
  readonly failed: boolean;
146
+ /**
147
+ * Whether the call is logged and still unanswered, filled in at draw time.
148
+ *
149
+ * The surface is told when a call is requested and when its result lands, and
150
+ * nothing in between: between those two events the call is what the model is
151
+ * waiting on, which is the one thing a reader watching a long run needs to see.
152
+ * Only a frame sets these, and it sets them on a copy of the folded card, so a
153
+ * stored card never claims a call that has since answered is still running.
154
+ */
155
+ readonly running?: boolean;
156
+ /** Whole seconds the call has been in flight, drawn only while it is. */
157
+ readonly elapsed?: number;
129
158
  /** Rows the tool actually presented, which retention may have cut short. */
130
159
  readonly totalLines: number;
131
160
  /**
@@ -147,23 +176,6 @@ export interface ToolCard {
147
176
  * memory for a reader who will never scroll that far.
148
177
  */
149
178
  export declare const CARD_DETAIL_MAX = 200;
150
- /**
151
- * Output rows a folded card keeps on screen when a tool configures a tail.
152
- *
153
- * Shipped as the `tail` default for every tool, but drawn only when that tool
154
- * asks for `output: tail`: the shipped `output: hidden` is what makes a folded
155
- * card one line. The tail is the part that carries the outcome of a long run,
156
- * and the retention cap still bounds what ctrl+o can reveal.
157
- */
158
- export declare const CARD_SHELL_PREVIEW = 20;
159
- /**
160
- * Nested calls retained on one PTC card.
161
- *
162
- * A program can dispatch in a loop, and one line each is small but not free;
163
- * the cap keeps a card bounded while {@link ToolCard.subCallsTotal} still
164
- * reports everything the program ran.
165
- */
166
- export declare const SUBCALL_MAX = 100;
167
179
  /** Character budget for one detail row, so a minified file cannot flood the viewport. */
168
180
  export declare const CARD_LINE_LIMIT = 200;
169
181
  /**
@@ -177,6 +189,7 @@ export declare const CARD_LINE_LIMIT = 200;
177
189
  * row keeps as many words as a plain one.
178
190
  */
179
191
  export declare function clip(text: string, limit: number): string;
192
+ export declare function clipLine(text: string): string;
180
193
  /**
181
194
  * Text on one row, with every run of whitespace collapsed.
182
195
  *
@@ -184,53 +197,21 @@ export declare function clip(text: string, limit: number): string;
184
197
  * wrapped continuation would make one card read as two.
185
198
  */
186
199
  export declare function oneLine(text: string): string;
187
- /**
188
- * The one-line row for one nested call.
189
- *
190
- * A tool that declares a call view is drawn exactly as its own header would be;
191
- * only a tool with no view at all falls back to its registry name and raw call,
192
- * because the surface cannot name a salient argument for a schema it never saw.
193
- */
194
- export declare function subCallOf(id: string, name: string, argumentsJson: string, view: ToolCard | undefined): ToolSubCall;
195
- /**
196
- * The rows one dispatched call keeps, from the card that drew them.
197
- *
198
- * The total is clamped to what was kept: a card built from a call or result
199
- * view reports no total of its own, because it is not a stream retention had to
200
- * cut, and a count below the rows on screen would hint at rows already shown.
201
- */
202
- export declare function subCallRows(card: ToolCard | undefined): ToolSubCallRows | undefined;
203
- /**
204
- * How much of a card the reader has asked for.
205
- *
206
- * The folded state names its own treatment because the reader's settings decide
207
- * whether a folded card shows a tail of its rows or nothing beyond its header;
208
- * the count travels with the choice so the view never re-reads the policy.
209
- */
210
- export type CardPreview = {
211
- readonly expanded: true;
212
- } | {
213
- readonly expanded: false;
214
- readonly preview: 'title';
215
- } | {
216
- readonly expanded: false;
217
- readonly preview: 'tail';
218
- readonly rows: number;
200
+ export declare function bound(rows: readonly CardRow[]): {
201
+ detail: CardRow[];
202
+ totalLines: number;
219
203
  };
220
204
  /**
221
- * The rows a card shows right now, and how many the reader is not seeing.
205
+ * Bound a card to its retained rows from the END.
222
206
  *
223
- * Expansion is a view decision rather than a card field so one key press can
224
- * change every card at once without rebuilding the transcript.
207
+ * A command's answer is its last lines, so keeping the head would show a long
208
+ * run's middle and lose the ending the reader asked for; the tail is also what
209
+ * a folded shell card tails again.
225
210
  */
226
- export declare function cardDetailRows(card: ToolCard, preview: CardPreview): {
227
- lines: readonly CardRow[];
228
- hidden: number;
211
+ export declare function boundTail(rows: readonly CardRow[]): {
212
+ detail: CardRow[];
213
+ totalLines: number;
229
214
  };
230
- /** The hint row for a folded shell card, or undefined when its preview dropped nothing. */
231
- export declare function shellFoldHint(hidden: number, showMoreKey: string): string | undefined;
232
- /** The hint row for an opened shell card whose retention dropped the run's earlier rows. */
233
- export declare function shellRetentionHint(hidden: number): string | undefined;
234
215
  /**
235
216
  * Build a card from raw text lines.
236
217
  *
@@ -241,38 +222,4 @@ export declare function shellRetentionHint(hidden: number): string | undefined;
241
222
  export declare function cardFromLines(kind: ToolCardKind, tool: string, title: string, lines: readonly string[], failed: boolean): ToolCard;
242
223
  /** Text lines carried by model-facing content blocks. */
243
224
  export declare function contentLines(content: unknown): string[];
244
- /**
245
- * The header fields a rebuilt card must keep.
246
- *
247
- * Replacing a card's rows says nothing about what the call was made with, what
248
- * it measured, how it ended, or which calls it dispatched, so those fields
249
- * travel with the rebuild: dropping the argument is how a shell card loses its
250
- * command the moment a presenter declines the result.
251
- */
252
- export declare function carriedFields(card: ToolCard): Pick<ToolCard, 'argument' | 'stats' | 'status' | 'subCalls' | 'subCallsTotal'>;
253
- /**
254
- * Collapse one call and its result into the single row the reader sees.
255
- *
256
- * The pending row already told the reader what the tool is doing, so the
257
- * settled row keeps that header and swaps in the outcome; a result that
258
- * presents nothing keeps the call's detail rather than blanking the row.
259
- */
260
- export declare function mergeCards(call: ToolCard | undefined, result: ToolCard | undefined): ToolCard;
261
- /**
262
- * Render one file change as a bounded unified hunk.
263
- *
264
- * Only the changed middle is shown: a presenter has the prior and next text but
265
- * no hunk list, so trimming the shared prefix and suffix yields the same region
266
- * a full diff would highlight without paying for a line-diff computation on
267
- * every frame.
268
- */
269
- export declare function renderFileDiff(diff: FileDiff): CardRow[];
270
- /** Map a tool's pending-call intent to a card, falling back to the raw call name. */
271
- export declare function cardOfCall(view: ToolCallView | undefined, name: string): ToolCard;
272
- /** Map a tool's result intent to a card, falling back to the model-facing text. */
273
- export declare function cardOfResult(view: ToolResultView | undefined, input: {
274
- readonly name: string;
275
- readonly failed: boolean;
276
- readonly contentLines: readonly string[];
277
- }): ToolCard;
278
225
  //# sourceMappingURL=cards.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../src/cards.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAGV,QAAQ,EAOR,YAAY,EACZ,cAAc,EAEf,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAIrD,0FAA0F;AAC1F,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAA;IAC9B,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAA;IACzB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;CACvB;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,aAAa,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