@aiwayds/dsh-tui-pi 0.1.0 → 0.3.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/README.md +205 -68
- package/lib/agent-manager.d.ts +125 -0
- package/lib/agent-manager.js +298 -0
- package/lib/agent-manager.js.map +1 -0
- package/lib/agents.d.ts +30 -0
- package/lib/agents.js +468 -0
- package/lib/agents.js.map +1 -0
- package/lib/append-system.d.ts +2 -0
- package/lib/append-system.js +1 -1
- package/lib/append-system.js.map +1 -1
- package/lib/dsh-events.d.ts +12 -0
- package/lib/editor.d.ts +58 -0
- package/lib/editor.js +92 -0
- package/lib/editor.js.map +1 -1
- package/lib/footer.d.ts +8 -0
- package/lib/footer.js +8 -0
- package/lib/footer.js.map +1 -1
- package/lib/hotkeys.d.ts +93 -0
- package/lib/hotkeys.js +305 -0
- package/lib/hotkeys.js.map +1 -0
- package/lib/index.js +342 -38
- package/lib/index.js.map +1 -1
- package/lib/keymap.d.ts +177 -0
- package/lib/keymap.js +189 -0
- package/lib/keymap.js.map +1 -0
- package/lib/live-widgets.d.ts +82 -29
- package/lib/live-widgets.js +222 -92
- package/lib/live-widgets.js.map +1 -1
- package/lib/messages.d.ts +4 -2
- package/lib/messages.js +8 -3
- package/lib/messages.js.map +1 -1
- package/lib/panels.d.ts +177 -0
- package/lib/panels.js +331 -0
- package/lib/panels.js.map +1 -0
- package/lib/provider-catalog.d.ts +31 -8
- package/lib/provider-catalog.js +63 -8
- package/lib/provider-catalog.js.map +1 -1
- package/lib/selectors.d.ts +12 -1
- package/lib/selectors.js +5 -2
- package/lib/selectors.js.map +1 -1
- package/lib/session.d.ts +36 -0
- package/lib/session.js +171 -10
- package/lib/session.js.map +1 -1
- package/lib/settings.d.ts +1 -2
- package/lib/settings.js +29 -2
- package/lib/settings.js.map +1 -1
- package/lib/subagent-policy.d.ts +58 -0
- package/lib/subagent-policy.js +137 -0
- package/lib/subagent-policy.js.map +1 -0
- package/lib/subagent-viewer.d.ts +49 -0
- package/lib/subagent-viewer.js +523 -0
- package/lib/subagent-viewer.js.map +1 -0
- package/lib/theme/index.js +4 -0
- package/lib/theme/index.js.map +1 -1
- package/lib/theme/palette.d.ts +21 -3
- package/lib/theme/palette.js +27 -6
- package/lib/theme/palette.js.map +1 -1
- package/lib/theme-settings.d.ts +39 -4
- package/lib/theme-settings.js +69 -12
- package/lib/theme-settings.js.map +1 -1
- package/lib/tui.d.ts +32 -12
- package/lib/tui.js +109 -36
- package/lib/tui.js.map +1 -1
- package/package.json +3 -4
- package/patches/@earendil-works__pi-tui.patch +206 -2
- package/scripts/dev-install.mjs +87 -0
- package/scripts/link-dsh-closure.mjs +85 -0
package/lib/live-widgets.d.ts
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* in has auto height — it renders zero rows while both panels are empty and
|
|
6
|
-
* grows to their content while the model holds todos or has subagents running.
|
|
2
|
+
* Live widgets: the Todos boxed panel pinned ABOVE the chat input, and the
|
|
3
|
+
* running-subagent activity merged into the last-request area BELOW the
|
|
4
|
+
* editor. Two separate plain containers keep the two live surfaces apart:
|
|
7
5
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* - `todosDoc` — the dock slot above the input (`ui.widgets`): a single
|
|
7
|
+
* bordered Todos panel (top border + header row + tree body rows + bottom
|
|
8
|
+
* border, same chrome as the thinking/tool panels). Auto height — it
|
|
9
|
+
* renders zero rows while empty and grows to its content while the model
|
|
10
|
+
* has todos.
|
|
11
|
+
* - `activityDoc` — the lastRequest container below the editor
|
|
12
|
+
* (`ui.lastRequest`): the ` ● <last request>` line (persisting across
|
|
13
|
+
* agent churn) followed by one compact line PER RUNNING agent. NO box
|
|
14
|
+
* chrome, NO `● Agents` header, NO provider — just
|
|
15
|
+
* `├─ ⠋ <name> · ↻N≤M · 21k/1m · 13.6s · <latest output>`, the `├─ ` /
|
|
16
|
+
* `└─ ` prefix in the same column as the todo rows and the request ` ● `
|
|
17
|
+
* (the last running agent closes the list with `└─ `). Auto height — it
|
|
18
|
+
* collapses to zero rows when both the last-request line is cleared and no
|
|
19
|
+
* agent runs.
|
|
20
|
+
*
|
|
21
|
+
* Show-when-content, clear-when-done: the Todos panel appears only while it
|
|
22
|
+
* has content and disappears when it empties (an all-completed snapshot or
|
|
23
|
+
* `/new`); an agent line renders only while its child RUNS (a settled child
|
|
24
|
+
* drops off immediately). `clear()` (/new) drops the Todos panel and the
|
|
25
|
+
* agent lines but preserves the last-request echo.
|
|
13
26
|
*
|
|
14
27
|
* Live refresh: `tickLive` (the AGENT_TICK_MS timer in index.ts) advances the
|
|
15
28
|
* spinner and re-reads the elapsed clock; it is a no-op while nothing runs.
|
|
@@ -19,23 +32,49 @@
|
|
|
19
32
|
import { Container } from '@earendil-works/pi-tui';
|
|
20
33
|
import type { AgentView } from './dsh-events.ts';
|
|
21
34
|
import { type TuiTheme } from './theme/index.ts';
|
|
22
|
-
/** Refresh interval of the live
|
|
35
|
+
/** Refresh interval of the live running-agent lines (spinner + elapsed). */
|
|
23
36
|
export declare const AGENT_TICK_MS = 100;
|
|
24
37
|
/** Braille spinner cycle; the frame index advances once per tick. */
|
|
25
38
|
export declare const AGENT_SPINNER_FRAMES: readonly ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"];
|
|
39
|
+
/**
|
|
40
|
+
* Compact human-readable size: 1_500_000 → `1.5m`, 20_965 → `20k`, 999 → `999`.
|
|
41
|
+
* Millions keep one decimal (a trailing `.0` dropped), thousands floor to `k`.
|
|
42
|
+
*/
|
|
43
|
+
export declare function fmtCompact(n: number): string;
|
|
26
44
|
export declare class LiveWidgets {
|
|
27
|
-
private readonly
|
|
45
|
+
private readonly todosDoc;
|
|
46
|
+
private readonly activityDoc;
|
|
28
47
|
private theme;
|
|
29
48
|
private readonly requestRender;
|
|
30
49
|
/** Latest todo list from `todo/write`, rendered while non-empty. */
|
|
31
50
|
private liveTodos;
|
|
32
51
|
/** Latest subagent views from the bridge's onLive fold. */
|
|
33
52
|
private liveAgents;
|
|
34
|
-
/** The
|
|
35
|
-
private
|
|
53
|
+
/** The Todos panel Text in `todosDoc`, replaced on rebuild. */
|
|
54
|
+
private todosText;
|
|
55
|
+
/** The merged running-agent Text in `activityDoc`, replaced on rebuild. */
|
|
56
|
+
private agentsText;
|
|
57
|
+
/** The ` ● <last request>` Text in `activityDoc` (persists across churn). */
|
|
58
|
+
private requestText;
|
|
59
|
+
/** Plain clipped last-request text backing `requestText` (for setTheme). */
|
|
60
|
+
private requestDisplay;
|
|
36
61
|
/** Spinner frame counter, advanced by tickLive while any agent runs. */
|
|
37
62
|
private spinnerFrame;
|
|
38
|
-
|
|
63
|
+
/**
|
|
64
|
+
* @param todosDoc The dock slot ABOVE the chat input — the Todos boxed
|
|
65
|
+
* panel lives here.
|
|
66
|
+
* @param activityDoc The lastRequest container BELOW the editor — the ` ● `
|
|
67
|
+
* last-request line plus the compact running-agent lines live here.
|
|
68
|
+
*/
|
|
69
|
+
constructor(todosDoc: Container, activityDoc: Container, theme: TuiTheme, requestRender: () => void);
|
|
70
|
+
/**
|
|
71
|
+
* Render the ` ● <text>` last-request line in `activityDoc`, UNDER which the
|
|
72
|
+
* running-agent lines appear. `undefined` (or blank) removes the line. Same
|
|
73
|
+
* styling as before the merge: `fgMuted` prefix, but the text is clipped to
|
|
74
|
+
* the terminal width (`columns - 5`) so it ALWAYS renders on one row and
|
|
75
|
+
* never wraps; outside a TTY (columns undefined) it falls back to 195.
|
|
76
|
+
*/
|
|
77
|
+
setLastRequest(text: string | undefined): void;
|
|
39
78
|
/** Replace the todos snapshot (`todo/write` events and replay). */
|
|
40
79
|
renderTodos(todos: readonly {
|
|
41
80
|
content: string;
|
|
@@ -46,21 +85,28 @@ export declare class LiveWidgets {
|
|
|
46
85
|
/**
|
|
47
86
|
* Live refresh ~10x/sec while any subagent runs: advance the spinner and
|
|
48
87
|
* repaint (the elapsed column re-reads Date.now()). No-op when nothing runs
|
|
49
|
-
* — the
|
|
88
|
+
* — the activity area then holds its final (empty) state.
|
|
50
89
|
*/
|
|
51
90
|
tickLive(): void;
|
|
52
|
-
/** Recolor the widget
|
|
91
|
+
/** Recolor the widget (Todos panel, ● line and agent lines) under a theme
|
|
92
|
+
* hot-switch (no-op on the same bundle). */
|
|
53
93
|
setTheme(theme: TuiTheme): void;
|
|
54
|
-
/**
|
|
94
|
+
/**
|
|
95
|
+
* Drop everything except the last-request echo (`/new`): clears the Todos
|
|
96
|
+
* panel and the running-agent lines, keeps the ` ● ` line. The bridge also
|
|
97
|
+
* fires `renderAgents([])`.
|
|
98
|
+
*/
|
|
55
99
|
clear(): void;
|
|
56
100
|
/**
|
|
57
|
-
* Rebuild the
|
|
58
|
-
*
|
|
59
|
-
*
|
|
101
|
+
* Rebuild the two live surfaces:
|
|
102
|
+
* - `todosDoc`: one bordered Todos panel (or nothing when all completed).
|
|
103
|
+
* - `activityDoc`: the ` ● ` line (managed separately, persists) followed
|
|
104
|
+
* by ONE Text holding the compact running-agent lines joined by '\n'
|
|
105
|
+
* (or nothing when no agent runs — the slot collapses to the ● line).
|
|
60
106
|
* Clear-when-done: the Todos panel hides once every todo is completed (the
|
|
61
107
|
* model writes the whole-list snapshot and rarely clears it — an
|
|
62
|
-
* all-completed list is the
|
|
63
|
-
*
|
|
108
|
+
* all-completed list is the end-of-work signal); the agent lines hide once
|
|
109
|
+
* no child is running.
|
|
64
110
|
*/
|
|
65
111
|
private rebuild;
|
|
66
112
|
/** One bordered panel: top border + header row + body rows + bottom border. */
|
|
@@ -75,11 +121,18 @@ export declare class LiveWidgets {
|
|
|
75
121
|
*/
|
|
76
122
|
private todoLines;
|
|
77
123
|
/**
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
124
|
+
* One compact running-agent line for the last-request area, todo-style:
|
|
125
|
+
* `├─ `/`└─ ` connector (same column as the todo rows and the request
|
|
126
|
+
* ` ● `) + spinner + the agent NAME (`view.label`, matching the boxed
|
|
127
|
+
* panel's main line) + the exact meta that main line showed (`↻retries≤max`,
|
|
128
|
+
* compact `tokens[/contextWindow]`, elapsed) + the child's latest output
|
|
129
|
+
* line when one exists (` · <tail>`, so the user sees it is alive). NO box
|
|
130
|
+
* chrome, NO provider — the name is the prominent element; the last running
|
|
131
|
+
* agent closes the list with `└─ `. The label is the only unbounded field;
|
|
132
|
+
* it is clipped against a budget measured from the terminal width so the
|
|
133
|
+
* whole plain line (prefix included) fits, then the assembled plain line is
|
|
134
|
+
* clipped to the terminal width BEFORE any ANSI is applied (clipToWidth
|
|
135
|
+
* counts SGR fragments as visible columns — style last).
|
|
83
136
|
*/
|
|
84
|
-
private
|
|
137
|
+
private compactAgentLine;
|
|
85
138
|
}
|
package/lib/live-widgets.js
CHANGED
|
@@ -1,15 +1,28 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
* in has auto height — it renders zero rows while both panels are empty and
|
|
6
|
-
* grows to their content while the model holds todos or has subagents running.
|
|
2
|
+
* Live widgets: the Todos boxed panel pinned ABOVE the chat input, and the
|
|
3
|
+
* running-subagent activity merged into the last-request area BELOW the
|
|
4
|
+
* editor. Two separate plain containers keep the two live surfaces apart:
|
|
7
5
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
6
|
+
* - `todosDoc` — the dock slot above the input (`ui.widgets`): a single
|
|
7
|
+
* bordered Todos panel (top border + header row + tree body rows + bottom
|
|
8
|
+
* border, same chrome as the thinking/tool panels). Auto height — it
|
|
9
|
+
* renders zero rows while empty and grows to its content while the model
|
|
10
|
+
* has todos.
|
|
11
|
+
* - `activityDoc` — the lastRequest container below the editor
|
|
12
|
+
* (`ui.lastRequest`): the ` ● <last request>` line (persisting across
|
|
13
|
+
* agent churn) followed by one compact line PER RUNNING agent. NO box
|
|
14
|
+
* chrome, NO `● Agents` header, NO provider — just
|
|
15
|
+
* `├─ ⠋ <name> · ↻N≤M · 21k/1m · 13.6s · <latest output>`, the `├─ ` /
|
|
16
|
+
* `└─ ` prefix in the same column as the todo rows and the request ` ● `
|
|
17
|
+
* (the last running agent closes the list with `└─ `). Auto height — it
|
|
18
|
+
* collapses to zero rows when both the last-request line is cleared and no
|
|
19
|
+
* agent runs.
|
|
20
|
+
*
|
|
21
|
+
* Show-when-content, clear-when-done: the Todos panel appears only while it
|
|
22
|
+
* has content and disappears when it empties (an all-completed snapshot or
|
|
23
|
+
* `/new`); an agent line renders only while its child RUNS (a settled child
|
|
24
|
+
* drops off immediately). `clear()` (/new) drops the Todos panel and the
|
|
25
|
+
* agent lines but preserves the last-request echo.
|
|
13
26
|
*
|
|
14
27
|
* Live refresh: `tickLive` (the AGENT_TICK_MS timer in index.ts) advances the
|
|
15
28
|
* spinner and re-reads the elapsed clock; it is a no-op while nothing runs.
|
|
@@ -20,11 +33,24 @@ import { Container, Text } from '@earendil-works/pi-tui';
|
|
|
20
33
|
import { panelBodyText, panelBoxWidth, clipPanelLine } from "./messages.js";
|
|
21
34
|
import { ansiFg, RESET } from "./theme/index.js";
|
|
22
35
|
import { clipToWidth, visibleWidth } from "./text.js";
|
|
23
|
-
/** Refresh interval of the live
|
|
36
|
+
/** Refresh interval of the live running-agent lines (spinner + elapsed). */
|
|
24
37
|
export const AGENT_TICK_MS = 100;
|
|
25
38
|
/** Braille spinner cycle; the frame index advances once per tick. */
|
|
26
39
|
export const AGENT_SPINNER_FRAMES = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
|
|
27
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Compact human-readable size: 1_500_000 → `1.5m`, 20_965 → `20k`, 999 → `999`.
|
|
42
|
+
* Millions keep one decimal (a trailing `.0` dropped), thousands floor to `k`.
|
|
43
|
+
*/
|
|
44
|
+
export function fmtCompact(n) {
|
|
45
|
+
if (n >= 1_000_000) {
|
|
46
|
+
const m = n / 1_000_000;
|
|
47
|
+
return `${Number.isInteger(m) ? String(m) : m.toFixed(1).replace(/\.0$/, '')}m`;
|
|
48
|
+
}
|
|
49
|
+
if (n >= 1_000)
|
|
50
|
+
return `${Math.floor(n / 1_000)}k`;
|
|
51
|
+
return String(n);
|
|
52
|
+
}
|
|
53
|
+
/** One bordered row of the Todos panel: `│ ` + inner + ` │` (no trailing RESET). */
|
|
28
54
|
function borderedRow(boxWidth, borderFg, inner) {
|
|
29
55
|
const pad = Math.max(0, boxWidth - 4 - visibleWidth(inner));
|
|
30
56
|
return `${borderFg}│ ${inner}${' '.repeat(pad)}${borderFg} │`;
|
|
@@ -34,22 +60,73 @@ function panelTopBorder(boxWidth, borderFg) {
|
|
|
34
60
|
return `${borderFg}┌${'─'.repeat(Math.max(0, boxWidth - 2))}┐`;
|
|
35
61
|
}
|
|
36
62
|
export class LiveWidgets {
|
|
37
|
-
|
|
63
|
+
todosDoc;
|
|
64
|
+
activityDoc;
|
|
38
65
|
theme;
|
|
39
66
|
requestRender;
|
|
40
67
|
/** Latest todo list from `todo/write`, rendered while non-empty. */
|
|
41
68
|
liveTodos = [];
|
|
42
69
|
/** Latest subagent views from the bridge's onLive fold. */
|
|
43
70
|
liveAgents = [];
|
|
44
|
-
/** The
|
|
45
|
-
|
|
71
|
+
/** The Todos panel Text in `todosDoc`, replaced on rebuild. */
|
|
72
|
+
todosText;
|
|
73
|
+
/** The merged running-agent Text in `activityDoc`, replaced on rebuild. */
|
|
74
|
+
agentsText;
|
|
75
|
+
/** The ` ● <last request>` Text in `activityDoc` (persists across churn). */
|
|
76
|
+
requestText;
|
|
77
|
+
/** Plain clipped last-request text backing `requestText` (for setTheme). */
|
|
78
|
+
requestDisplay;
|
|
46
79
|
/** Spinner frame counter, advanced by tickLive while any agent runs. */
|
|
47
80
|
spinnerFrame = 0;
|
|
48
|
-
|
|
49
|
-
|
|
81
|
+
/**
|
|
82
|
+
* @param todosDoc The dock slot ABOVE the chat input — the Todos boxed
|
|
83
|
+
* panel lives here.
|
|
84
|
+
* @param activityDoc The lastRequest container BELOW the editor — the ` ● `
|
|
85
|
+
* last-request line plus the compact running-agent lines live here.
|
|
86
|
+
*/
|
|
87
|
+
constructor(todosDoc, activityDoc, theme, requestRender) {
|
|
88
|
+
this.todosDoc = todosDoc;
|
|
89
|
+
this.activityDoc = activityDoc;
|
|
50
90
|
this.theme = theme;
|
|
51
91
|
this.requestRender = requestRender;
|
|
52
92
|
}
|
|
93
|
+
/**
|
|
94
|
+
* Render the ` ● <text>` last-request line in `activityDoc`, UNDER which the
|
|
95
|
+
* running-agent lines appear. `undefined` (or blank) removes the line. Same
|
|
96
|
+
* styling as before the merge: `fgMuted` prefix, but the text is clipped to
|
|
97
|
+
* the terminal width (`columns - 5`) so it ALWAYS renders on one row and
|
|
98
|
+
* never wraps; outside a TTY (columns undefined) it falls back to 195.
|
|
99
|
+
*/
|
|
100
|
+
setLastRequest(text) {
|
|
101
|
+
if (text === undefined || text.trim() === '') {
|
|
102
|
+
if (this.requestText !== undefined) {
|
|
103
|
+
this.activityDoc.removeChild(this.requestText);
|
|
104
|
+
this.requestText = undefined;
|
|
105
|
+
this.requestDisplay = undefined;
|
|
106
|
+
this.requestRender();
|
|
107
|
+
}
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
// One-row budget: paddingX=1 on each side (2 cols) + the ` ● ` prefix (3
|
|
111
|
+
// cols) → the plain `display` must fit `columns - 5`. Non-TTY fallback
|
|
112
|
+
// keeps the old 200-col behavior.
|
|
113
|
+
const budget = Math.max(1, (process.stdout.columns ?? 200) - 5);
|
|
114
|
+
const display = clipToWidth(text, budget);
|
|
115
|
+
if (this.requestText === undefined) {
|
|
116
|
+
this.requestText = new Text('', 1, 0);
|
|
117
|
+
// Keep the ● line ABOVE the running-agent lines regardless of whether
|
|
118
|
+
// they already render (no insert-at on a plain Container — remove and
|
|
119
|
+
// re-add both in the right order).
|
|
120
|
+
if (this.agentsText !== undefined)
|
|
121
|
+
this.activityDoc.removeChild(this.agentsText);
|
|
122
|
+
this.activityDoc.addChild(this.requestText);
|
|
123
|
+
if (this.agentsText !== undefined)
|
|
124
|
+
this.activityDoc.addChild(this.agentsText);
|
|
125
|
+
}
|
|
126
|
+
this.requestDisplay = display;
|
|
127
|
+
this.requestText.setText(ansiFg(this.theme.palette.fgMuted) + ` ● ${display}` + RESET);
|
|
128
|
+
this.requestRender();
|
|
129
|
+
}
|
|
53
130
|
/** Replace the todos snapshot (`todo/write` events and replay). */
|
|
54
131
|
renderTodos(todos) {
|
|
55
132
|
this.liveTodos = todos;
|
|
@@ -63,7 +140,7 @@ export class LiveWidgets {
|
|
|
63
140
|
/**
|
|
64
141
|
* Live refresh ~10x/sec while any subagent runs: advance the spinner and
|
|
65
142
|
* repaint (the elapsed column re-reads Date.now()). No-op when nothing runs
|
|
66
|
-
* — the
|
|
143
|
+
* — the activity area then holds its final (empty) state.
|
|
67
144
|
*/
|
|
68
145
|
tickLive() {
|
|
69
146
|
if (!this.liveAgents.some(view => view.outcome === undefined))
|
|
@@ -71,53 +148,78 @@ export class LiveWidgets {
|
|
|
71
148
|
this.spinnerFrame += 1;
|
|
72
149
|
this.rebuild();
|
|
73
150
|
}
|
|
74
|
-
/** Recolor the widget
|
|
151
|
+
/** Recolor the widget (Todos panel, ● line and agent lines) under a theme
|
|
152
|
+
* hot-switch (no-op on the same bundle). */
|
|
75
153
|
setTheme(theme) {
|
|
76
154
|
if (theme === this.theme)
|
|
77
155
|
return;
|
|
78
156
|
this.theme = theme;
|
|
79
157
|
this.rebuild();
|
|
158
|
+
// The request line is not part of rebuild() (it persists independent of the
|
|
159
|
+
// agent lines); recolor it here from the cached plain text.
|
|
160
|
+
if (this.requestDisplay !== undefined && this.requestText !== undefined) {
|
|
161
|
+
this.requestText.setText(ansiFg(this.theme.palette.fgMuted) + ` ● ${this.requestDisplay}` + RESET);
|
|
162
|
+
}
|
|
80
163
|
}
|
|
81
|
-
/**
|
|
164
|
+
/**
|
|
165
|
+
* Drop everything except the last-request echo (`/new`): clears the Todos
|
|
166
|
+
* panel and the running-agent lines, keeps the ` ● ` line. The bridge also
|
|
167
|
+
* fires `renderAgents([])`.
|
|
168
|
+
*/
|
|
82
169
|
clear() {
|
|
83
170
|
this.liveTodos = [];
|
|
84
171
|
this.liveAgents = [];
|
|
85
172
|
this.spinnerFrame = 0;
|
|
86
|
-
if (this.
|
|
87
|
-
this.
|
|
88
|
-
this.
|
|
89
|
-
this.requestRender();
|
|
173
|
+
if (this.todosText !== undefined) {
|
|
174
|
+
this.todosDoc.removeChild(this.todosText);
|
|
175
|
+
this.todosText = undefined;
|
|
90
176
|
}
|
|
177
|
+
if (this.agentsText !== undefined) {
|
|
178
|
+
this.activityDoc.removeChild(this.agentsText);
|
|
179
|
+
this.agentsText = undefined;
|
|
180
|
+
}
|
|
181
|
+
this.requestRender();
|
|
91
182
|
}
|
|
92
183
|
/**
|
|
93
|
-
* Rebuild the
|
|
94
|
-
*
|
|
95
|
-
*
|
|
184
|
+
* Rebuild the two live surfaces:
|
|
185
|
+
* - `todosDoc`: one bordered Todos panel (or nothing when all completed).
|
|
186
|
+
* - `activityDoc`: the ` ● ` line (managed separately, persists) followed
|
|
187
|
+
* by ONE Text holding the compact running-agent lines joined by '\n'
|
|
188
|
+
* (or nothing when no agent runs — the slot collapses to the ● line).
|
|
96
189
|
* Clear-when-done: the Todos panel hides once every todo is completed (the
|
|
97
190
|
* model writes the whole-list snapshot and rarely clears it — an
|
|
98
|
-
* all-completed list is the
|
|
99
|
-
*
|
|
191
|
+
* all-completed list is the end-of-work signal); the agent lines hide once
|
|
192
|
+
* no child is running.
|
|
100
193
|
*/
|
|
101
194
|
rebuild() {
|
|
102
|
-
const panels = [];
|
|
103
195
|
if (this.liveTodos.some(todo => todo.status !== 'completed')) {
|
|
104
|
-
|
|
196
|
+
const panel = this.boxedPanel(this.todosHeader(), this.todoLines());
|
|
197
|
+
if (this.todosText !== undefined)
|
|
198
|
+
this.todosDoc.removeChild(this.todosText);
|
|
199
|
+
this.todosText = new Text(panel, 1, 0);
|
|
200
|
+
this.todosDoc.addChild(this.todosText);
|
|
201
|
+
}
|
|
202
|
+
else if (this.todosText !== undefined) {
|
|
203
|
+
this.todosDoc.removeChild(this.todosText);
|
|
204
|
+
this.todosText = undefined;
|
|
105
205
|
}
|
|
106
206
|
const running = this.liveAgents.filter(view => view.outcome === undefined);
|
|
107
|
-
if (running.length > 0)
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
if (this.
|
|
111
|
-
this.
|
|
112
|
-
this.liveText = undefined;
|
|
207
|
+
if (running.length > 0) {
|
|
208
|
+
const lines = running.map((view, i) => this.compactAgentLine(view, i === running.length - 1));
|
|
209
|
+
const text = lines.join('\n');
|
|
210
|
+
if (this.agentsText !== undefined) {
|
|
211
|
+
this.agentsText.setText(text);
|
|
113
212
|
}
|
|
114
|
-
|
|
115
|
-
|
|
213
|
+
else {
|
|
214
|
+
this.agentsText = new Text(text, 1, 0);
|
|
215
|
+
// Append under the ● line when it is present (plain Container appends).
|
|
216
|
+
this.activityDoc.addChild(this.agentsText);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
else if (this.agentsText !== undefined) {
|
|
220
|
+
this.activityDoc.removeChild(this.agentsText);
|
|
221
|
+
this.agentsText = undefined;
|
|
116
222
|
}
|
|
117
|
-
if (this.liveText !== undefined)
|
|
118
|
-
this.doc.removeChild(this.liveText);
|
|
119
|
-
this.liveText = new Text(panels.join('\n'), 1, 0);
|
|
120
|
-
this.doc.addChild(this.liveText);
|
|
121
223
|
this.requestRender();
|
|
122
224
|
}
|
|
123
225
|
/** One bordered panel: top border + header row + body rows + bottom border. */
|
|
@@ -161,58 +263,86 @@ export class LiveWidgets {
|
|
|
161
263
|
return lines;
|
|
162
264
|
}
|
|
163
265
|
/**
|
|
164
|
-
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
*
|
|
266
|
+
* One compact running-agent line for the last-request area, todo-style:
|
|
267
|
+
* `├─ `/`└─ ` connector (same column as the todo rows and the request
|
|
268
|
+
* ` ● `) + spinner + the agent NAME (`view.label`, matching the boxed
|
|
269
|
+
* panel's main line) + the exact meta that main line showed (`↻retries≤max`,
|
|
270
|
+
* compact `tokens[/contextWindow]`, elapsed) + the child's latest output
|
|
271
|
+
* line when one exists (` · <tail>`, so the user sees it is alive). NO box
|
|
272
|
+
* chrome, NO provider — the name is the prominent element; the last running
|
|
273
|
+
* agent closes the list with `└─ `. The label is the only unbounded field;
|
|
274
|
+
* it is clipped against a budget measured from the terminal width so the
|
|
275
|
+
* whole plain line (prefix included) fits, then the assembled plain line is
|
|
276
|
+
* clipped to the terminal width BEFORE any ANSI is applied (clipToWidth
|
|
277
|
+
* counts SGR fragments as visible columns — style last).
|
|
169
278
|
*/
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
const
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
279
|
+
compactAgentLine(view, isLast) {
|
|
280
|
+
// Todo-style tree connector: `├─ ` for non-final rows, `└─ ` for the last
|
|
281
|
+
// running agent — aligned with the todo rows and the request ` ● `.
|
|
282
|
+
const PREFIX = isLast ? '└─ ' : '├─ ';
|
|
283
|
+
const width = Math.max(1, process.stdout.columns ?? 80);
|
|
284
|
+
const glyph = AGENT_SPINNER_FRAMES[this.spinnerFrame % AGENT_SPINNER_FRAMES.length];
|
|
285
|
+
const metaParts = [];
|
|
286
|
+
if (view.retries >= 1) {
|
|
287
|
+
metaParts.push(view.maxRetries === undefined ? `↻${view.retries}` : `↻${view.retries}≤${view.maxRetries}`);
|
|
288
|
+
}
|
|
289
|
+
if (view.tokens > 0) {
|
|
290
|
+
// Compact tokens[/contextWindow]: `21k/1m` — no percent, no "token".
|
|
291
|
+
const ctx = typeof view.contextWindow === 'number' && view.contextWindow > 0
|
|
292
|
+
? `/${fmtCompact(view.contextWindow)}`
|
|
293
|
+
: '';
|
|
294
|
+
metaParts.push(`${fmtCompact(view.tokens)}${ctx}`);
|
|
295
|
+
}
|
|
296
|
+
const elapsed = (Date.now() - view.startedAt) / 1000;
|
|
297
|
+
metaParts.push(`${elapsed.toFixed(1)}s`);
|
|
298
|
+
let metaPlain = ' · ' + metaParts.join(' · ');
|
|
299
|
+
// Tail: the child's latest visible output line, appended after the elapsed
|
|
300
|
+
// column so the user knows it is alive. Budget ≤30% of the terminal width
|
|
301
|
+
// (clamped 20..60 cols); when the folded line is wider, clip to
|
|
302
|
+
// tailBudget-2 and end with `..` (clipToWidth's own `…` is stripped).
|
|
303
|
+
const lastLine = view.lastLine;
|
|
304
|
+
if (lastLine !== undefined && lastLine !== '') {
|
|
305
|
+
const folded = lastLine.replace(/\s+/g, ' ').trim();
|
|
306
|
+
if (folded !== '') {
|
|
307
|
+
const tailBudget = Math.min(60, Math.max(20, Math.floor(width * 0.3)));
|
|
308
|
+
if (visibleWidth(folded) > tailBudget) {
|
|
309
|
+
const clipped = clipToWidth(folded, tailBudget - 2).replace(/…$/, '');
|
|
310
|
+
metaPlain += ` · ${clipped}..`;
|
|
311
|
+
}
|
|
312
|
+
else {
|
|
313
|
+
metaPlain += ` · ${folded}`;
|
|
314
|
+
}
|
|
189
315
|
}
|
|
190
|
-
const elapsed = (Date.now() - view.startedAt) / 1000;
|
|
191
|
-
metaParts.push(`${elapsed.toFixed(1)}s`);
|
|
192
|
-
// Plain (unstyled) meta for the label budget; styled only once assembled.
|
|
193
|
-
const metaPlain = ' · ' + metaParts.join(' · ');
|
|
194
|
-
const providerPlain = view.provider ?? '';
|
|
195
|
-
// 3 = connector, 2 = icon + space, 2 = safety column so the styled line
|
|
196
|
-
// never wraps inside the box. Provider and label share the remaining
|
|
197
|
-
// name budget; both are clipped (provider is a config value and can be
|
|
198
|
-
// arbitrarily long, label is model-controlled).
|
|
199
|
-
const nameBudget = innerCap - 3 - 2 - visibleWidth(metaPlain) - 2;
|
|
200
|
-
const providerClipped = clipToWidth(providerPlain, Math.max(0, nameBudget - 12));
|
|
201
|
-
const labelBudget = Math.max(10, nameBudget - visibleWidth(providerClipped) - 2);
|
|
202
|
-
const label = clipPanelLine(view.label, 0);
|
|
203
|
-
const labelClipped = clipToWidth(label, labelBudget);
|
|
204
|
-
const nameStyled = providerClipped === ''
|
|
205
|
-
? ansiFg(this.theme.palette.fgMuted) + labelClipped + RESET
|
|
206
|
-
: ansiFg(this.theme.palette.fgDefault) + providerClipped + RESET + ' '
|
|
207
|
-
+ ansiFg(this.theme.palette.fgMuted) + labelClipped + RESET;
|
|
208
|
-
const metaStyled = ansiFg(this.theme.palette.fgSubtle) + metaPlain + RESET;
|
|
209
|
-
lines.push(connector + icon + ' ' + nameStyled + metaStyled);
|
|
210
|
-
const indent = last ? ' ' : '│ ';
|
|
211
|
-
const activity = view.lastTool === undefined ? 'working…' : `running ${view.lastTool}…`;
|
|
212
|
-
lines.push(indent + '⎿ ' + ansiFg(this.theme.palette.fgSubtle)
|
|
213
|
-
+ clipToWidth(activity, Math.max(1, innerCap - 8)) + RESET);
|
|
214
316
|
}
|
|
215
|
-
|
|
317
|
+
// Defensive: never render an empty name — fall back to `subagent`.
|
|
318
|
+
const rawLabel = clipPanelLine(view.label, 0).replace(/\r/g, '').trim();
|
|
319
|
+
const namePlain = rawLabel === ''
|
|
320
|
+
? 'subagent'
|
|
321
|
+
: rawLabel;
|
|
322
|
+
// Fixed chrome: prefix (3) + spinner (1) + following space (1) + a safety
|
|
323
|
+
// column. The label takes the remainder of the width budget after meta.
|
|
324
|
+
const fixed = visibleWidth(PREFIX) + 1 + 1 + 1;
|
|
325
|
+
const nameBudget = width - fixed - visibleWidth(metaPlain);
|
|
326
|
+
const nameClipped = clipToWidth(namePlain, Math.max(0, nameBudget));
|
|
327
|
+
// The full PLAIN line, clipped to the terminal width BEFORE styling.
|
|
328
|
+
const plain = PREFIX + glyph + ' ' + nameClipped + metaPlain;
|
|
329
|
+
const clipped = clipToWidth(plain, width);
|
|
330
|
+
// Style segments from the (clipped, guaranteed-identical-when-it-fits)
|
|
331
|
+
// plain pieces: connector subtle, spinner muted, NAME default (prominent),
|
|
332
|
+
// meta (incl. the tail) subtle.
|
|
333
|
+
const connector = ansiFg(this.theme.palette.fgSubtle) + PREFIX + RESET;
|
|
334
|
+
const spinner = ansiFg(this.theme.palette.fgMuted) + glyph + RESET;
|
|
335
|
+
const metaStyled = ansiFg(this.theme.palette.fgSubtle) + metaPlain + RESET;
|
|
336
|
+
const nameStyled = ansiFg(this.theme.palette.fgDefault) + nameClipped + RESET;
|
|
337
|
+
const base = connector + spinner + ' ' + nameStyled + metaStyled;
|
|
338
|
+
// If clipping truncated the plain line (pathological meta), re-clip the
|
|
339
|
+
// assembled styled line's visible width too; otherwise base is exact.
|
|
340
|
+
if (visibleWidth(clipped) < visibleWidth(plain)) {
|
|
341
|
+
// Defensive: fall back to a single muted style over the clipped line so
|
|
342
|
+
// no styled segment can push past the terminal width.
|
|
343
|
+
return ansiFg(this.theme.palette.fgMuted) + clipped + RESET;
|
|
344
|
+
}
|
|
345
|
+
return base;
|
|
216
346
|
}
|
|
217
347
|
}
|
|
218
348
|
//# sourceMappingURL=live-widgets.js.map
|
package/lib/live-widgets.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-widgets.js","sourceRoot":"","sources":["../src/live-widgets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAA;AAExD,OAAO,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,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E,CAAC;YAChD,wEAAwE;YACxE,sDAAsD;YACtD,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,OAAO,GAAG,KAAK,CAAA;QAC7D,CAAC;QACD,OAAO,IAAI,CAAA;IACb,CAAC;CACF"}
|
package/lib/messages.d.ts
CHANGED
|
@@ -218,8 +218,10 @@ export declare class TranscriptRenderer {
|
|
|
218
218
|
* built at the current terminal width: below 96 columns it degrades to
|
|
219
219
|
* the whale alone, and every rebuild (relayout/setTheme replay) reads the
|
|
220
220
|
* width afresh, so narrowing drops the wordmark and widening restores it.
|
|
221
|
-
* The quote line
|
|
222
|
-
*
|
|
221
|
+
* The quote line — whale-prefixed (`🐳 「…」`, the same 🐳 icon that
|
|
222
|
+
* speaks inline for the assistant in chat) — is clipped to the terminal
|
|
223
|
+
* width before styling (the repo rule — ANSI never goes through the
|
|
224
|
+
* clipper), so it never wraps.
|
|
223
225
|
*/
|
|
224
226
|
private renderWelcome;
|
|
225
227
|
private renderUserMessage;
|