@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.
- package/.agents/skills/dsh-tui-dogfood/SKILL.md +83 -0
- package/.agents/skills/dsh-tui-dogfood/references/home-state.md +78 -0
- package/.agents/skills/dsh-tui-dogfood/scripts/clone-links.mjs +133 -0
- package/.agents/skills/dsh-tui-dogfood/scripts/run-plugin-from-worktree.sh +417 -0
- package/.agents/skills/dsh-tui-update-models/SKILL.md +121 -0
- package/.agents/skills/dsh-tui-update-models/references/model-wiring.md +162 -0
- package/.agents/skills/dsh-tui-update-models/scripts/dump-model-catalog.mjs +178 -0
- package/README.md +131 -17
- package/lib/agent/host.d.ts +11 -0
- package/lib/agent/host.d.ts.map +1 -1
- package/lib/agent/host.js +16 -2
- package/lib/agent/host.js.map +1 -1
- package/lib/agent/present.d.ts.map +1 -1
- package/lib/agent/present.js +2 -1
- package/lib/agent/present.js.map +1 -1
- package/lib/agent/undo.d.ts +52 -0
- package/lib/agent/undo.d.ts.map +1 -0
- package/lib/agent/undo.js +106 -0
- package/lib/agent/undo.js.map +1 -0
- package/lib/cards/composition.d.ts +68 -0
- package/lib/cards/composition.d.ts.map +1 -0
- package/lib/cards/composition.js +117 -0
- package/lib/cards/composition.js.map +1 -0
- package/lib/cards/presenter.d.ts +23 -0
- package/lib/cards/presenter.d.ts.map +1 -0
- package/lib/cards/presenter.js +394 -0
- package/lib/cards/presenter.js.map +1 -0
- package/lib/cards/preview.d.ts +42 -0
- package/lib/cards/preview.d.ts.map +1 -0
- package/lib/cards/preview.js +51 -0
- package/lib/cards/preview.js.map +1 -0
- package/lib/cards.d.ts +42 -95
- package/lib/cards.d.ts.map +1 -1
- package/lib/cards.js +4 -526
- package/lib/cards.js.map +1 -1
- package/lib/compat/section.d.ts +29 -0
- package/lib/compat/section.d.ts.map +1 -0
- package/lib/compat/section.js +82 -0
- package/lib/compat/section.js.map +1 -0
- package/lib/config.d.ts +27 -2
- package/lib/config.d.ts.map +1 -1
- package/lib/config.js +61 -1
- package/lib/config.js.map +1 -1
- package/lib/contracts.d.ts +28 -0
- package/lib/contracts.d.ts.map +1 -1
- package/lib/fold-cursor.d.ts +8 -0
- package/lib/fold-cursor.d.ts.map +1 -1
- package/lib/fold-cursor.js +18 -0
- package/lib/fold-cursor.js.map +1 -1
- package/lib/gates/question-card.d.ts +77 -0
- package/lib/gates/question-card.d.ts.map +1 -0
- package/lib/gates/question-card.js +113 -0
- package/lib/gates/question-card.js.map +1 -0
- package/lib/gates/questions.d.ts +127 -0
- package/lib/gates/questions.d.ts.map +1 -0
- package/lib/gates/questions.js +418 -0
- package/lib/gates/questions.js.map +1 -0
- package/lib/gates.d.ts +1 -113
- package/lib/gates.d.ts.map +1 -1
- package/lib/gates.js +1 -484
- package/lib/gates.js.map +1 -1
- package/lib/herdr/reporter.d.ts +9 -4
- package/lib/herdr/reporter.d.ts.map +1 -1
- package/lib/herdr/reporter.js +5 -9
- package/lib/herdr/reporter.js.map +1 -1
- package/lib/herdr/state.d.ts +35 -4
- package/lib/herdr/state.d.ts.map +1 -1
- package/lib/herdr/state.js +37 -4
- package/lib/herdr/state.js.map +1 -1
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +343 -2267
- package/lib/index.js.map +1 -1
- package/lib/input/action-catalog.d.ts +74 -0
- package/lib/input/action-catalog.d.ts.map +1 -0
- package/lib/input/action-catalog.js +137 -0
- package/lib/input/action-catalog.js.map +1 -0
- package/lib/input/actions.d.ts +5 -81
- package/lib/input/actions.d.ts.map +1 -1
- package/lib/input/actions.js +4 -621
- package/lib/input/actions.js.map +1 -1
- package/lib/input/completion.d.ts +11 -1
- package/lib/input/completion.d.ts.map +1 -1
- package/lib/input/completion.js +17 -1
- package/lib/input/completion.js.map +1 -1
- package/lib/input/file-index.d.ts +40 -0
- package/lib/input/file-index.d.ts.map +1 -0
- package/lib/input/file-index.js +141 -0
- package/lib/input/file-index.js.map +1 -0
- package/lib/input/file-search.d.ts +1 -38
- package/lib/input/file-search.d.ts.map +1 -1
- package/lib/input/file-search.js +1 -487
- package/lib/input/file-search.js.map +1 -1
- package/lib/input/key-press.d.ts +57 -0
- package/lib/input/key-press.d.ts.map +1 -0
- package/lib/input/key-press.js +218 -0
- package/lib/input/key-press.js.map +1 -0
- package/lib/input/keymap-conflicts.d.ts +59 -0
- package/lib/input/keymap-conflicts.d.ts.map +1 -0
- package/lib/input/keymap-conflicts.js +292 -0
- package/lib/input/keymap-conflicts.js.map +1 -0
- package/lib/input/keymap-settings.js +1 -1
- package/lib/input/keymap-settings.js.map +1 -1
- package/lib/input/keymap.d.ts.map +1 -1
- package/lib/input/keymap.js +5 -1
- package/lib/input/keymap.js.map +1 -1
- package/lib/input/submission.d.ts +11 -1
- package/lib/input/submission.d.ts.map +1 -1
- package/lib/input/submission.js +10 -1
- package/lib/input/submission.js.map +1 -1
- package/lib/input/workspace-files.d.ts +10 -0
- package/lib/input/workspace-files.d.ts.map +1 -0
- package/lib/input/workspace-files.js +359 -0
- package/lib/input/workspace-files.js.map +1 -0
- package/lib/install-skills.d.ts +20 -0
- package/lib/install-skills.d.ts.map +1 -0
- package/lib/install-skills.js +198 -0
- package/lib/install-skills.js.map +1 -0
- package/lib/keys-command.d.ts +2 -1
- package/lib/keys-command.d.ts.map +1 -1
- package/lib/keys-command.js +2 -1
- package/lib/keys-command.js.map +1 -1
- package/lib/model-list.d.ts +37 -0
- package/lib/model-list.d.ts.map +1 -0
- package/lib/model-list.js +60 -0
- package/lib/model-list.js.map +1 -0
- package/lib/startup.d.ts +8 -0
- package/lib/startup.d.ts.map +1 -1
- package/lib/startup.js +120 -24
- package/lib/startup.js.map +1 -1
- package/lib/subagents.d.ts +7 -3
- package/lib/subagents.d.ts.map +1 -1
- package/lib/subagents.js +28 -4
- package/lib/subagents.js.map +1 -1
- package/lib/surface/appearance-preferences.d.ts +26 -0
- package/lib/surface/appearance-preferences.d.ts.map +1 -0
- package/lib/surface/appearance-preferences.js +139 -0
- package/lib/surface/appearance-preferences.js.map +1 -0
- package/lib/surface/appearance.d.ts +87 -0
- package/lib/surface/appearance.d.ts.map +1 -0
- package/lib/surface/appearance.js +353 -0
- package/lib/surface/appearance.js.map +1 -0
- package/lib/surface/background-work.d.ts +49 -0
- package/lib/surface/background-work.d.ts.map +1 -0
- package/lib/surface/background-work.js +146 -0
- package/lib/surface/background-work.js.map +1 -0
- package/lib/surface/commands.d.ts +80 -0
- package/lib/surface/commands.d.ts.map +1 -0
- package/lib/surface/commands.js +364 -0
- package/lib/surface/commands.js.map +1 -0
- package/lib/surface/modal-input.d.ts +58 -0
- package/lib/surface/modal-input.d.ts.map +1 -0
- package/lib/surface/modal-input.js +237 -0
- package/lib/surface/modal-input.js.map +1 -0
- package/lib/surface/model-choice.d.ts +54 -0
- package/lib/surface/model-choice.d.ts.map +1 -0
- package/lib/surface/model-choice.js +325 -0
- package/lib/surface/model-choice.js.map +1 -0
- package/lib/surface/preset-choice.d.ts +78 -0
- package/lib/surface/preset-choice.d.ts.map +1 -0
- package/lib/surface/preset-choice.js +163 -0
- package/lib/surface/preset-choice.js.map +1 -0
- package/lib/surface/prompt-input.d.ts +97 -0
- package/lib/surface/prompt-input.d.ts.map +1 -0
- package/lib/surface/prompt-input.js +215 -0
- package/lib/surface/prompt-input.js.map +1 -0
- package/lib/surface/prompt-memory.d.ts +76 -0
- package/lib/surface/prompt-memory.d.ts.map +1 -0
- package/lib/surface/prompt-memory.js +167 -0
- package/lib/surface/prompt-memory.js.map +1 -0
- package/lib/surface/session-lifecycle.d.ts +120 -0
- package/lib/surface/session-lifecycle.d.ts.map +1 -0
- package/lib/surface/session-lifecycle.js +321 -0
- package/lib/surface/session-lifecycle.js.map +1 -0
- package/lib/surface/session-picker.d.ts +39 -0
- package/lib/surface/session-picker.d.ts.map +1 -0
- package/lib/surface/session-picker.js +107 -0
- package/lib/surface/session-picker.js.map +1 -0
- package/lib/surface/session-view.d.ts +86 -0
- package/lib/surface/session-view.d.ts.map +1 -0
- package/lib/surface/session-view.js +215 -0
- package/lib/surface/session-view.js.map +1 -0
- package/lib/surface/staged-turns.d.ts +81 -0
- package/lib/surface/staged-turns.d.ts.map +1 -0
- package/lib/surface/staged-turns.js +206 -0
- package/lib/surface/staged-turns.js.map +1 -0
- package/lib/surface/terminal-lifecycle.d.ts +76 -0
- package/lib/surface/terminal-lifecycle.d.ts.map +1 -0
- package/lib/surface/terminal-lifecycle.js +222 -0
- package/lib/surface/terminal-lifecycle.js.map +1 -0
- package/lib/terminal/warning-screen.d.ts +8 -1
- package/lib/terminal/warning-screen.d.ts.map +1 -1
- package/lib/terminal/warning-screen.js +9 -0
- package/lib/terminal/warning-screen.js.map +1 -1
- package/lib/terminal-text/scan.d.ts +44 -0
- package/lib/terminal-text/scan.d.ts.map +1 -0
- package/lib/terminal-text/scan.js +195 -0
- package/lib/terminal-text/scan.js.map +1 -0
- package/lib/terminal-text/sgr.d.ts +32 -0
- package/lib/terminal-text/sgr.d.ts.map +1 -0
- package/lib/terminal-text/sgr.js +203 -0
- package/lib/terminal-text/sgr.js.map +1 -0
- package/lib/terminal-text.d.ts +1 -1
- package/lib/terminal-text.d.ts.map +1 -1
- package/lib/terminal-text.js +2 -379
- package/lib/terminal-text.js.map +1 -1
- package/lib/theme-command.js +2 -1
- package/lib/theme-command.js.map +1 -1
- package/lib/theme-defaults.d.ts +64 -0
- package/lib/theme-defaults.d.ts.map +1 -0
- package/lib/theme-defaults.js +248 -0
- package/lib/theme-defaults.js.map +1 -0
- package/lib/theme-resolver.d.ts +36 -0
- package/lib/theme-resolver.d.ts.map +1 -0
- package/lib/theme-resolver.js +112 -0
- package/lib/theme-resolver.js.map +1 -0
- package/lib/theme-schema.d.ts +6 -6
- package/lib/theme-schema.d.ts.map +1 -1
- package/lib/theme-schema.js +3 -2
- package/lib/theme-schema.js.map +1 -1
- package/lib/theme-settings.d.ts +13 -15
- package/lib/theme-settings.d.ts.map +1 -1
- package/lib/theme-settings.js +27 -19
- package/lib/theme-settings.js.map +1 -1
- package/lib/theme-tokens.d.ts +1 -90
- package/lib/theme-tokens.d.ts.map +1 -1
- package/lib/theme-tokens.js +11 -341
- package/lib/theme-tokens.js.map +1 -1
- package/lib/theme.d.ts +1 -1
- package/lib/theme.d.ts.map +1 -1
- package/lib/theme.js +2 -1
- package/lib/theme.js.map +1 -1
- package/lib/tool-display.d.ts.map +1 -1
- package/lib/tool-display.js +2 -1
- package/lib/tool-display.js.map +1 -1
- package/lib/transcript/message-content.d.ts +21 -0
- package/lib/transcript/message-content.d.ts.map +1 -0
- package/lib/transcript/message-content.js +61 -0
- package/lib/transcript/message-content.js.map +1 -0
- package/lib/transcript/tool-calls.d.ts +106 -0
- package/lib/transcript/tool-calls.d.ts.map +1 -0
- package/lib/transcript/tool-calls.js +254 -0
- package/lib/transcript/tool-calls.js.map +1 -0
- package/lib/transcript.d.ts +38 -43
- package/lib/transcript.d.ts.map +1 -1
- package/lib/transcript.js +58 -245
- package/lib/transcript.js.map +1 -1
- package/lib/ui/copy.d.ts +17 -0
- package/lib/ui/copy.d.ts.map +1 -0
- package/lib/ui/copy.js +104 -0
- package/lib/ui/copy.js.map +1 -0
- package/lib/ui/dock.d.ts +35 -3
- package/lib/ui/dock.d.ts.map +1 -1
- package/lib/ui/dock.js +124 -23
- package/lib/ui/dock.js.map +1 -1
- package/lib/ui/editor.d.ts.map +1 -1
- package/lib/ui/editor.js +2 -1
- package/lib/ui/editor.js.map +1 -1
- package/lib/ui/frame.d.ts +31 -0
- package/lib/ui/frame.d.ts.map +1 -1
- package/lib/ui/frame.js +27 -4
- package/lib/ui/frame.js.map +1 -1
- package/lib/ui/keymap-picker.d.ts +2 -1
- package/lib/ui/keymap-picker.d.ts.map +1 -1
- package/lib/ui/keymap-picker.js +1 -0
- package/lib/ui/keymap-picker.js.map +1 -1
- package/lib/ui/view/gate-card.d.ts +21 -0
- package/lib/ui/view/gate-card.d.ts.map +1 -0
- package/lib/ui/view/gate-card.js +104 -0
- package/lib/ui/view/gate-card.js.map +1 -0
- package/lib/ui/view/tool-card.d.ts +138 -0
- package/lib/ui/view/tool-card.d.ts.map +1 -0
- package/lib/ui/view/tool-card.js +413 -0
- package/lib/ui/view/tool-card.js.map +1 -0
- package/lib/ui/view/transcript-message.d.ts +62 -0
- package/lib/ui/view/transcript-message.d.ts.map +1 -0
- package/lib/ui/view/transcript-message.js +158 -0
- package/lib/ui/view/transcript-message.js.map +1 -0
- package/lib/ui/view.d.ts +87 -156
- package/lib/ui/view.d.ts.map +1 -1
- package/lib/ui/view.js +122 -556
- package/lib/ui/view.js.map +1 -1
- package/package.json +3 -1
- package/themes/deepseek-blue.yaml +9 -0
- package/themes/violet-orbit.yaml +7 -0
package/lib/cards.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
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
|
-
*
|
|
205
|
+
* Bound a card to its retained rows from the END.
|
|
222
206
|
*
|
|
223
|
-
*
|
|
224
|
-
*
|
|
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
|
|
227
|
-
|
|
228
|
-
|
|
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
|
package/lib/cards.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../src/cards.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../src/cards.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAGrD,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,EAAE,MAAM,GAAG,QAAQ,GAAG,SAAS,CAAA;IAC/D,MAAM,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,QAAQ,GAAG,SAAS,CAAA;CACnE;AAED,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,GAAG,KAAK,CAAA;AAEtF;;;;;;GAMG;AACH,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,KAAK,EAAE,YAAY,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CACtB;AAED,kEAAkE;AAClE,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,QAAQ,EAAE,CAAA;CACpC;AAED,qCAAqC;AACrC,wBAAgB,OAAO,CAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED,+EAA+E;AAC/E,wBAAgB,OAAO,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,C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