@aiwayds/dsh-tui-pi 2.18.2 → 2.20.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 +12 -43
- package/README.zh-CN.md +11 -42
- package/lib/agents.js +67 -52
- package/lib/agents.js.map +1 -1
- package/lib/ask-user.d.ts +122 -3
- package/lib/ask-user.js +335 -41
- package/lib/ask-user.js.map +1 -1
- package/lib/attachments.js +8 -3
- package/lib/attachments.js.map +1 -1
- package/lib/btw.d.ts +4 -2
- package/lib/btw.js +22 -16
- package/lib/btw.js.map +1 -1
- package/lib/custom-provider.js +34 -28
- package/lib/custom-provider.js.map +1 -1
- package/lib/footer.d.ts +9 -8
- package/lib/footer.js +36 -18
- package/lib/footer.js.map +1 -1
- package/lib/hard-exit.d.ts +36 -0
- package/lib/hard-exit.js +64 -0
- package/lib/hard-exit.js.map +1 -0
- package/lib/history-fork.d.ts +2 -2
- package/lib/history-fork.js +12 -9
- package/lib/history-fork.js.map +1 -1
- package/lib/history-turns.d.ts +4 -2
- package/lib/history-turns.js +7 -3
- package/lib/history-turns.js.map +1 -1
- package/lib/history.js +57 -45
- package/lib/history.js.map +1 -1
- package/lib/hotkeys.js +44 -33
- package/lib/hotkeys.js.map +1 -1
- package/lib/i18n/index.d.ts +54 -0
- package/lib/i18n/index.js +98 -0
- package/lib/i18n/index.js.map +1 -0
- package/lib/i18n/registry.d.ts +65 -0
- package/lib/i18n/registry.js +129 -0
- package/lib/i18n/registry.js.map +1 -0
- package/lib/index.js +219 -109
- package/lib/index.js.map +1 -1
- package/lib/language-ask.d.ts +98 -0
- package/lib/language-ask.js +118 -0
- package/lib/language-ask.js.map +1 -0
- package/lib/live-widgets.js +9 -8
- package/lib/live-widgets.js.map +1 -1
- package/lib/login.js +5 -4
- package/lib/login.js.map +1 -1
- package/lib/messages.d.ts +0 -4
- package/lib/messages.js +14 -15
- package/lib/messages.js.map +1 -1
- package/lib/model-profiles.js +32 -20
- package/lib/model-profiles.js.map +1 -1
- package/lib/panels.js +18 -17
- package/lib/panels.js.map +1 -1
- package/lib/preflight-projcache.js +9 -3
- package/lib/preflight-projcache.js.map +1 -1
- package/lib/preset-dialog.d.ts +3 -3
- package/lib/preset-dialog.js +20 -17
- package/lib/preset-dialog.js.map +1 -1
- package/lib/provider-catalog.d.ts +23 -7
- package/lib/provider-catalog.js +90 -68
- package/lib/provider-catalog.js.map +1 -1
- package/lib/queue-panel.d.ts +2 -2
- package/lib/queue-panel.js +13 -9
- package/lib/queue-panel.js.map +1 -1
- package/lib/repair-dialog.d.ts +4 -4
- package/lib/repair-dialog.js +23 -16
- package/lib/repair-dialog.js.map +1 -1
- package/lib/route-dialog.d.ts +3 -3
- package/lib/route-dialog.js +20 -14
- package/lib/route-dialog.js.map +1 -1
- package/lib/selectors.d.ts +15 -1
- package/lib/selectors.js +57 -23
- package/lib/selectors.js.map +1 -1
- package/lib/sessions.d.ts +47 -14
- package/lib/sessions.js +162 -53
- package/lib/sessions.js.map +1 -1
- package/lib/settings.d.ts +68 -9
- package/lib/settings.js +327 -78
- package/lib/settings.js.map +1 -1
- package/lib/skills-manager.js +27 -21
- package/lib/skills-manager.js.map +1 -1
- package/lib/skills.js +5 -4
- package/lib/skills.js.map +1 -1
- package/lib/startup-info.js +9 -3
- package/lib/startup-info.js.map +1 -1
- package/lib/steer-flow.d.ts +14 -4
- package/lib/steer-flow.js +24 -9
- package/lib/steer-flow.js.map +1 -1
- package/lib/stop-dialog.d.ts +2 -2
- package/lib/stop-dialog.js +16 -12
- package/lib/stop-dialog.js.map +1 -1
- package/lib/subagent-viewer.d.ts +3 -8
- package/lib/subagent-viewer.js +38 -62
- package/lib/subagent-viewer.js.map +1 -1
- package/lib/theme-preview.js +12 -11
- package/lib/theme-preview.js.map +1 -1
- package/lib/theme-settings.d.ts +44 -2
- package/lib/theme-settings.js +97 -54
- package/lib/theme-settings.js.map +1 -1
- package/lib/tui.js +2 -1
- package/lib/tui.js.map +1 -1
- package/locales/en.json +646 -0
- package/locales/ja.json +646 -0
- package/locales/ko.json +646 -0
- package/locales/zh-CN.json +646 -0
- package/package.json +2 -1
- package/skills/dsh-tui-pi-config/SKILL.md +14 -4
package/lib/startup-info.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"startup-info.js","sourceRoot":"","sources":["../src/startup-info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAA;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAC3C,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AAElD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAA;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEvC,2EAA2E;AAC3E,MAAM,CAAC,MAAM,iBAAiB,GAAG,6BAA6B,CAAA;AAE9D,4EAA4E;AAC5E,MAAM,kBAAkB,GAAG,CAAC,eAAe,EAAE,SAAS,CAAC,CAAA;AA+CvD,+EAA+E;AAE/E;;;;GAIG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAwB;IAC5D,MAAM,MAAM,GAAG,IAAI,GAAG,EAAU,CAAA;IAChC,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC;YAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;aAClD,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,CAAA;IAClD,CAAC;IACD,OAAO,MAAM,CAAA;AACf,CAAC;AAED;;;;GAIG;AACH,MA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Pick<import("@deepseek-ai/dsh-llm").UserMessage, "
|
|
61
|
+
} & Pick<import("@deepseek-ai/dsh-llm").UserMessage, "id" | "role">;
|
|
62
62
|
/**
|
|
63
63
|
* Deliver a built message honoring the chosen route, with the design's race
|
|
64
64
|
* fallback: a requested steer that cannot land (the turn ended before
|
|
@@ -106,9 +106,19 @@ export type QueueActionResult = {
|
|
|
106
106
|
* Shared degrade notices — one wording source for the submit dialog path,
|
|
107
107
|
* the queue panel and the transcript mirrors (review nit: the copy was
|
|
108
108
|
* duplicated in three places and could drift).
|
|
109
|
+
*
|
|
110
|
+
* Kept as plain English consts (NOT resolved through {@link t}) because
|
|
111
|
+
* src/index.ts renders them directly and this module must not change that
|
|
112
|
+
* import shape. The i18n twins live under the `steer.notice.*` keys and are
|
|
113
|
+
* used by {@link describeQueueActionResult}; the en catalog values are
|
|
114
|
+
* byte-identical to these consts.
|
|
109
115
|
*/
|
|
110
116
|
export declare const STEER_UNAVAILABLE_NOTICE = "Steering was unavailable \u2014 the message stayed queued as a follow-up.";
|
|
111
117
|
export declare const TURN_ENDED_QUEUED_NOTICE = "The turn ended before the steer could land \u2014 queued as a follow-up instead.";
|
|
118
|
+
/** Translated twin of {@link STEER_UNAVAILABLE_NOTICE} for render paths that go through `t()`. */
|
|
119
|
+
export declare function steerUnavailableNotice(): string;
|
|
120
|
+
/** Translated twin of {@link TURN_ENDED_QUEUED_NOTICE} for render paths that go through `t()`. */
|
|
121
|
+
export declare function turnEndedQueuedNotice(): string;
|
|
112
122
|
/** Remove one pending message from the inbox (queue panel `d`). */
|
|
113
123
|
export declare function removeFromInbox(inbox: RemovableInbox, view: PendingPromptView): QueueActionResult;
|
|
114
124
|
/**
|
|
@@ -130,8 +140,8 @@ export declare function promotePending(agent: DeliverableAgent & {
|
|
|
130
140
|
readonly inbox: RemovableInbox;
|
|
131
141
|
}, view: PendingPromptView): QueueActionResult;
|
|
132
142
|
/**
|
|
133
|
-
* Human-readable transcript notice for one queue action result (
|
|
134
|
-
*
|
|
135
|
-
* the message took, per design §二.2/§二.4.
|
|
143
|
+
* Human-readable transcript notice for one queue action result (translated
|
|
144
|
+
* at call time through the `steer.notice.*` keys). The degrade wording
|
|
145
|
+
* states the ACTUAL route the message took, per design §二.2/§二.4.
|
|
136
146
|
*/
|
|
137
147
|
export declare function describeQueueActionResult(result: QueueActionResult): string;
|
package/lib/steer-flow.js
CHANGED
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
* follow-up instead of failing (design §二.2 race fallback).
|
|
21
21
|
*/
|
|
22
22
|
import { createUserMessage } from '@deepseek-ai/dsh-llm';
|
|
23
|
+
import { t } from "./i18n/index.js";
|
|
23
24
|
/** The submit path for one line: direct send when idle, dialog when running. */
|
|
24
25
|
export function decideSubmitPath(running) {
|
|
25
26
|
return running ? 'dialog' : 'direct';
|
|
@@ -79,9 +80,23 @@ export function deliverToAgent(agent, message, route) {
|
|
|
79
80
|
* Shared degrade notices — one wording source for the submit dialog path,
|
|
80
81
|
* the queue panel and the transcript mirrors (review nit: the copy was
|
|
81
82
|
* duplicated in three places and could drift).
|
|
83
|
+
*
|
|
84
|
+
* Kept as plain English consts (NOT resolved through {@link t}) because
|
|
85
|
+
* src/index.ts renders them directly and this module must not change that
|
|
86
|
+
* import shape. The i18n twins live under the `steer.notice.*` keys and are
|
|
87
|
+
* used by {@link describeQueueActionResult}; the en catalog values are
|
|
88
|
+
* byte-identical to these consts.
|
|
82
89
|
*/
|
|
83
90
|
export const STEER_UNAVAILABLE_NOTICE = 'Steering was unavailable — the message stayed queued as a follow-up.';
|
|
84
91
|
export const TURN_ENDED_QUEUED_NOTICE = 'The turn ended before the steer could land — queued as a follow-up instead.';
|
|
92
|
+
/** Translated twin of {@link STEER_UNAVAILABLE_NOTICE} for render paths that go through `t()`. */
|
|
93
|
+
export function steerUnavailableNotice() {
|
|
94
|
+
return t('steer.notice.unavailable');
|
|
95
|
+
}
|
|
96
|
+
/** Translated twin of {@link TURN_ENDED_QUEUED_NOTICE} for render paths that go through `t()`. */
|
|
97
|
+
export function turnEndedQueuedNotice() {
|
|
98
|
+
return t('steer.notice.turnEnded');
|
|
99
|
+
}
|
|
85
100
|
/** Remove one pending message from the inbox (queue panel `d`). */
|
|
86
101
|
export function removeFromInbox(inbox, view) {
|
|
87
102
|
let removed;
|
|
@@ -128,28 +143,28 @@ export function promotePending(agent, view) {
|
|
|
128
143
|
catch {
|
|
129
144
|
return {
|
|
130
145
|
kind: 'error',
|
|
131
|
-
error:
|
|
146
|
+
error: t('steer.notice.orphaned', { error: delivery.error }),
|
|
132
147
|
};
|
|
133
148
|
}
|
|
134
149
|
}
|
|
135
150
|
}
|
|
136
151
|
/**
|
|
137
|
-
* Human-readable transcript notice for one queue action result (
|
|
138
|
-
*
|
|
139
|
-
* the message took, per design §二.2/§二.4.
|
|
152
|
+
* Human-readable transcript notice for one queue action result (translated
|
|
153
|
+
* at call time through the `steer.notice.*` keys). The degrade wording
|
|
154
|
+
* states the ACTUAL route the message took, per design §二.2/§二.4.
|
|
140
155
|
*/
|
|
141
156
|
export function describeQueueActionResult(result) {
|
|
142
157
|
switch (result.kind) {
|
|
143
158
|
case 'removed':
|
|
144
|
-
return '
|
|
159
|
+
return t('steer.notice.removed');
|
|
145
160
|
case 'promoted':
|
|
146
161
|
return result.degraded
|
|
147
|
-
?
|
|
148
|
-
: '
|
|
162
|
+
? t('steer.notice.unavailable')
|
|
163
|
+
: t('steer.notice.promoted');
|
|
149
164
|
case 'not-found':
|
|
150
|
-
return '
|
|
165
|
+
return t('steer.notice.notFound');
|
|
151
166
|
case 'error':
|
|
152
|
-
return
|
|
167
|
+
return t('steer.notice.error', { error: result.error });
|
|
153
168
|
}
|
|
154
169
|
}
|
|
155
170
|
//# sourceMappingURL=steer-flow.js.map
|
package/lib/steer-flow.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steer-flow.js","sourceRoot":"","sources":["../src/steer-flow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;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,MAAyB;IACjE,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,SAAS;YACZ,OAAO,CAAC,CAAC,sBAAsB,CAAC,CAAA;QAClC,KAAK,UAAU;YACb,OAAO,MAAM,CAAC,QAAQ;gBACpB,CAAC,CAAC,CAAC,CAAC,0BAA0B,CAAC;gBAC/B,CAAC,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAA;QAChC,KAAK,WAAW;YACd,OAAO,CAAC,CAAC,uBAAuB,CAAC,CAAA;QACnC,KAAK,OAAO;YACV,OAAO,CAAC,CAAC,oBAAoB,EAAE,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAA;IAC3D,CAAC;AACH,CAAC"}
|
package/lib/stop-dialog.d.ts
CHANGED
|
@@ -45,8 +45,8 @@ export declare function stopConfirmOptions(): ReadonlyArray<{
|
|
|
45
45
|
}>;
|
|
46
46
|
/** Accent-BOLD dialog title. */
|
|
47
47
|
export declare function stopConfirmTitle(wording: StopConfirmWording): string;
|
|
48
|
-
/** Footer hint —
|
|
49
|
-
export declare
|
|
48
|
+
/** Footer hint — resolved per call so a live language switch repaints it. */
|
|
49
|
+
export declare function stopConfirmFooter(): string;
|
|
50
50
|
/**
|
|
51
51
|
* Pure dialog state: which row is highlighted, and the terminal outcome.
|
|
52
52
|
* Same shape as the preset dialog's state.
|
package/lib/stop-dialog.js
CHANGED
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
* the CURRENT editor instance through `restoreFocus`.
|
|
23
23
|
*/
|
|
24
24
|
import { getKeybindings } from '@earendil-works/pi-tui';
|
|
25
|
+
import { t } from "./i18n/index.js";
|
|
25
26
|
import { PanelHost, panelThemeFns } from "./panels.js";
|
|
26
27
|
import { BOLD, RESET, ansiFg } from "./theme/index.js";
|
|
27
28
|
import { clipToWidth, wrapText } from "./text.js";
|
|
@@ -37,35 +38,38 @@ export const STOP_CONFIRM_OPTION_IDS = ['stop', 'cancel'];
|
|
|
37
38
|
export function stopConfirmWording(mainRunning, runningChildren) {
|
|
38
39
|
const running = [];
|
|
39
40
|
if (mainRunning)
|
|
40
|
-
running.push('
|
|
41
|
+
running.push(t('stop.confirm.mainRunning'));
|
|
41
42
|
if (runningChildren > 0) {
|
|
42
|
-
running.push(
|
|
43
|
+
running.push(runningChildren === 1
|
|
44
|
+
? t('stop.confirm.childrenOne', { count: runningChildren })
|
|
45
|
+
: t('stop.confirm.childrenMany', { count: runningChildren }));
|
|
43
46
|
}
|
|
44
47
|
const situation = running.length > 0
|
|
45
|
-
?
|
|
46
|
-
: '
|
|
48
|
+
? t('stop.confirm.situation', { parts: running.join(t('stop.confirm.joiner')) })
|
|
49
|
+
: t('stop.confirm.idle');
|
|
47
50
|
return {
|
|
48
|
-
title: '
|
|
51
|
+
title: t('stop.confirm.title'),
|
|
49
52
|
body: [
|
|
50
53
|
situation,
|
|
51
|
-
'
|
|
52
|
-
+ 'Queued messages are kept and the session stays resumable.',
|
|
54
|
+
t('stop.confirm.reassure'),
|
|
53
55
|
],
|
|
54
56
|
};
|
|
55
57
|
}
|
|
56
58
|
/** The fixed option rows for one wording. */
|
|
57
59
|
export function stopConfirmOptions() {
|
|
58
60
|
return [
|
|
59
|
-
{ id: 'stop', text: '
|
|
60
|
-
{ id: 'cancel', text: '
|
|
61
|
+
{ id: 'stop', text: t('stop.option.stop') },
|
|
62
|
+
{ id: 'cancel', text: t('stop.option.cancel') },
|
|
61
63
|
];
|
|
62
64
|
}
|
|
63
65
|
/** Accent-BOLD dialog title. */
|
|
64
66
|
export function stopConfirmTitle(wording) {
|
|
65
67
|
return wording.title;
|
|
66
68
|
}
|
|
67
|
-
/** Footer hint —
|
|
68
|
-
export
|
|
69
|
+
/** Footer hint — resolved per call so a live language switch repaints it. */
|
|
70
|
+
export function stopConfirmFooter() {
|
|
71
|
+
return t('stop.footer');
|
|
72
|
+
}
|
|
69
73
|
export function initialStopConfirmState() {
|
|
70
74
|
return { selected: 0 };
|
|
71
75
|
}
|
|
@@ -142,7 +146,7 @@ export class StopConfirmPanel {
|
|
|
142
146
|
: fns.muted(row));
|
|
143
147
|
}
|
|
144
148
|
lines.push('');
|
|
145
|
-
lines.push(fns.subtle(clipToWidth(
|
|
149
|
+
lines.push(fns.subtle(clipToWidth(stopConfirmFooter(), wrap)));
|
|
146
150
|
return lines;
|
|
147
151
|
}
|
|
148
152
|
handleInput(data) {
|
package/lib/stop-dialog.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stop-dialog.js","sourceRoot":"","sources":["../src/stop-dialog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,cAAc,EAA4B,MAAM,wBAAwB,CAAA;AACjF,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,EAAiB,MAAM,kBAAkB,CAAA;AACrE,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAEjD,uEAAuE;AACvE,MAAM,CAAC,MAAM,uBAAuB,GAAqC,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAA;AAQ3F;;;;;;GAMG;AACH,MAAM,UAAU,kBAAkB,CAAC,WAAoB,EAAE,eAAuB;IAC9E,MAAM,OAAO,GAAa,EAAE,CAAA;IAC5B,IAAI,WAAW;QAAE,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"stop-dialog.js","sourceRoot":"","sources":["../src/stop-dialog.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,cAAc,EAA4B,MAAM,wBAAwB,CAAA;AACjF,OAAO,EAAE,CAAC,EAAE,MAAM,iBAAiB,CAAA;AACnC,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AACtD,OAAO,EAAE,IAAI,EAAE,KAAK,EA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;YACd,MAAM,CAAC,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAA;QACnD,CAAC,CAAA;QACD,MAAM,KAAK,GAAG,IAAI,gBAAgB,CAChC,KAAK,EACL,kBAAkB,CAAC,WAAW,EAAE,eAAe,CAAC,EAChD,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,EAC1B,GAAG,EAAE,CAAC,GAAG,CAAC,aAAa,EAAE,CAC1B,CAAA;QACD,uEAAuE;QACvE,iEAAiE;QACjE,iEAAiE;QACjE,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,CAAA;IAChC,CAAC,CAAC,CAAA;AACJ,CAAC"}
|
package/lib/subagent-viewer.d.ts
CHANGED
|
@@ -48,16 +48,13 @@ import { type TuiTheme } from './theme/index.ts';
|
|
|
48
48
|
export declare const STEER_SENT_NOTICE = "Steer message sent";
|
|
49
49
|
/** Notice shown when the target child can no longer receive steering. */
|
|
50
50
|
export declare const STEER_ENDED_NOTICE = "This subagent has ended \u2014 steering unavailable";
|
|
51
|
-
/** Transcript footer for a RUNNING child: x ×2 or k ×2 stops it. */
|
|
52
|
-
export declare const VIEWER_FOOTER_RUNNING = "\u2191\u2193 scroll \u00B7 Esc close \u00B7 x \u00D72 / k \u00D72 stop \u00B7 Enter steer";
|
|
53
|
-
/** Transcript footer for a SETTLED child: nothing to stop, x ×2 closes. */
|
|
54
|
-
export declare const VIEWER_FOOTER_SETTLED = "\u2191\u2193 scroll \u00B7 Esc close \u00B7 x \u00D72 close \u00B7 Enter steer";
|
|
55
51
|
/**
|
|
56
52
|
* The transcript footer for one child state. The x ×2 semantics flipped with
|
|
57
53
|
* the everything-stop work: on a running child the double press is the
|
|
58
54
|
* per-subagent STOP (cancel this child), on a settled one — nothing left to
|
|
59
55
|
* stop — it keeps its old close shortcut. The footer always names which one
|
|
60
|
-
* a press will do.
|
|
56
|
+
* a press will do. Resolved through t() per call (never freeze the language
|
|
57
|
+
* in a module constant).
|
|
61
58
|
*/
|
|
62
59
|
export declare function viewerFooter(running: boolean): string;
|
|
63
60
|
/** Steer input footer: hardcoded like every other in-panel key hint. */
|
|
@@ -120,7 +117,7 @@ export declare function buildSteerMessage(text: string): {
|
|
|
120
117
|
kind: "plugin";
|
|
121
118
|
plugin: string;
|
|
122
119
|
};
|
|
123
|
-
} & Pick<import("@deepseek-ai/dsh-llm").UserMessage, "
|
|
120
|
+
} & Pick<import("@deepseek-ai/dsh-llm").UserMessage, "id" | "role">;
|
|
124
121
|
/**
|
|
125
122
|
* Resolve the route for one child at THIS instant and deliver `text` when it
|
|
126
123
|
* is live. Pure decision + delivery, no scheduling: callers own the timing
|
|
@@ -190,8 +187,6 @@ export declare class SubagentViewerPanel implements Component {
|
|
|
190
187
|
private timer;
|
|
191
188
|
/** Timestamp of the last handled `x` press; 0 = none (the double-press arm). */
|
|
192
189
|
private lastXPress;
|
|
193
|
-
/** Timestamp of the last handled `k` press; 0 = none (the double-press arm). */
|
|
194
|
-
private lastKPress;
|
|
195
190
|
/** Current scroll offset into the transcript lines. */
|
|
196
191
|
private scrollTop;
|
|
197
192
|
/** Whether the view is pinned to the log tail (default, re-set on the bottom). */
|
package/lib/subagent-viewer.js
CHANGED
|
@@ -50,6 +50,7 @@ import { normalizePreview } from "./sessions.js";
|
|
|
50
50
|
import { toolSubject } from "./activity.js";
|
|
51
51
|
import { ansiFg, BOLD, RESET } from "./theme/index.js";
|
|
52
52
|
import { clipToWidth } from "./text.js";
|
|
53
|
+
import { t } from "./i18n/index.js";
|
|
53
54
|
/** Live-refresh interval of the transcript panel while it is open. */
|
|
54
55
|
const VIEWER_TICK_MS = 300;
|
|
55
56
|
/** How many recent settled children appear after the running ones. */
|
|
@@ -64,19 +65,16 @@ const CHILD_LOG_CAP = 2000;
|
|
|
64
65
|
export const STEER_SENT_NOTICE = 'Steer message sent';
|
|
65
66
|
/** Notice shown when the target child can no longer receive steering. */
|
|
66
67
|
export const STEER_ENDED_NOTICE = 'This subagent has ended — steering unavailable';
|
|
67
|
-
/** Transcript footer for a RUNNING child: x ×2 or k ×2 stops it. */
|
|
68
|
-
export const VIEWER_FOOTER_RUNNING = '↑↓ scroll · Esc close · x ×2 / k ×2 stop · Enter steer';
|
|
69
|
-
/** Transcript footer for a SETTLED child: nothing to stop, x ×2 closes. */
|
|
70
|
-
export const VIEWER_FOOTER_SETTLED = '↑↓ scroll · Esc close · x ×2 close · Enter steer';
|
|
71
68
|
/**
|
|
72
69
|
* The transcript footer for one child state. The x ×2 semantics flipped with
|
|
73
70
|
* the everything-stop work: on a running child the double press is the
|
|
74
71
|
* per-subagent STOP (cancel this child), on a settled one — nothing left to
|
|
75
72
|
* stop — it keeps its old close shortcut. The footer always names which one
|
|
76
|
-
* a press will do.
|
|
73
|
+
* a press will do. Resolved through t() per call (never freeze the language
|
|
74
|
+
* in a module constant).
|
|
77
75
|
*/
|
|
78
76
|
export function viewerFooter(running) {
|
|
79
|
-
return running ?
|
|
77
|
+
return running ? t('viewer.footer.running') : t('viewer.footer.settled');
|
|
80
78
|
}
|
|
81
79
|
/** Steer input footer: hardcoded like every other in-panel key hint. */
|
|
82
80
|
export const STEER_FOOTER = 'Enter send · Shift+Enter newline · Esc cancel';
|
|
@@ -197,13 +195,15 @@ function statusGlyph(view) {
|
|
|
197
195
|
export function eventLine(event, callNames) {
|
|
198
196
|
switch (event.type) {
|
|
199
197
|
case 'turn/start':
|
|
200
|
-
return
|
|
198
|
+
return t('viewer.event.turnStart', { n: event.data.turn });
|
|
201
199
|
case 'turn/end': {
|
|
202
200
|
const reason = event.data.reason;
|
|
203
201
|
const detail = reason.kind === 'error'
|
|
204
|
-
?
|
|
202
|
+
? (reason.error !== undefined
|
|
203
|
+
? t('viewer.event.errorDetail', { message: reason.error.message ?? '' })
|
|
204
|
+
: t('viewer.event.error'))
|
|
205
205
|
: reason.kind;
|
|
206
|
-
return
|
|
206
|
+
return t('viewer.event.turnEnd', { n: event.data.turn, detail });
|
|
207
207
|
}
|
|
208
208
|
case 'user/message': {
|
|
209
209
|
const message = event.data;
|
|
@@ -261,7 +261,7 @@ export function eventLine(event, callNames) {
|
|
|
261
261
|
}
|
|
262
262
|
case 'subagent/descriptor': {
|
|
263
263
|
const descriptor = event.data;
|
|
264
|
-
const parts = [`${sunglassesIcon()} subagent`];
|
|
264
|
+
const parts = [`${sunglassesIcon()} ${t('viewer.event.subagent')}`];
|
|
265
265
|
if (descriptor.provider !== undefined && descriptor.provider !== '')
|
|
266
266
|
parts.push(descriptor.provider);
|
|
267
267
|
if (descriptor.mode !== undefined)
|
|
@@ -274,7 +274,7 @@ export function eventLine(event, callNames) {
|
|
|
274
274
|
const summary = todos
|
|
275
275
|
.map(todo => `${todo.status === 'in_progress' ? '◐' : '☐'} ${todo.content}`)
|
|
276
276
|
.join(' ');
|
|
277
|
-
return
|
|
277
|
+
return t('viewer.event.todos', { done, total: todos.length, summary: normalizePreview(summary) });
|
|
278
278
|
}
|
|
279
279
|
default:
|
|
280
280
|
return undefined;
|
|
@@ -306,7 +306,7 @@ export function pickerItems(views, getRoundCount, maxRounds, getCompactionCount
|
|
|
306
306
|
.slice(0, SETTLED_CAP);
|
|
307
307
|
return [...running, ...settled].map(view => {
|
|
308
308
|
const rounds = getRoundCount(view.childId);
|
|
309
|
-
const roundsText = maxRounds > 0 ?
|
|
309
|
+
const roundsText = t('viewer.rounds', { count: rounds, cap: maxRounds > 0 ? `/${maxRounds}` : '' });
|
|
310
310
|
const mode = view.mode === undefined ? '' : ` [${view.mode}]`;
|
|
311
311
|
// Model short name — the route's model tail (the segment after the
|
|
312
312
|
// provider slash; a slash-less route shows whole). List rows scan, so
|
|
@@ -323,8 +323,8 @@ export function pickerItems(views, getRoundCount, maxRounds, getCompactionCount
|
|
|
323
323
|
// `⚡ injected` — a policy wrap-up (or steer) reached this child; shows
|
|
324
324
|
// the injection landed even when the child LLM then ignored it.
|
|
325
325
|
// `⏻ stopped` — the policy FORCE-stopped it (grace exhausted).
|
|
326
|
-
const injected = view.injectedAt !== undefined ? '
|
|
327
|
-
const stopped = view.hardStop !== undefined ? '
|
|
326
|
+
const injected = view.injectedAt !== undefined ? ` ${t('viewer.injected')}` : '';
|
|
327
|
+
const stopped = view.hardStop !== undefined ? ` ${t('viewer.stopped')}` : '';
|
|
328
328
|
return {
|
|
329
329
|
value: view.childId,
|
|
330
330
|
label: `${statusGlyph(view)} ${view.label}${mode}: ${roundsText}${stopped}${injected}${modelShort !== undefined ? ` · ${modelShort}` : ''}`,
|
|
@@ -424,14 +424,14 @@ class LiveSubagentTable {
|
|
|
424
424
|
/** A fresh table over `items` — widths re-fit, selection at `preselect`. */
|
|
425
425
|
buildList(items, preselect) {
|
|
426
426
|
return new TablePanel(this.theme, {
|
|
427
|
-
title: '
|
|
427
|
+
title: t('viewer.title'),
|
|
428
428
|
// Auto layout: SUB-AGENT fits its content, STATS runs to the edge.
|
|
429
|
-
columns: autoColumns([{ key: 'label', title: '
|
|
429
|
+
columns: autoColumns([{ key: 'label', title: t('viewer.col.subagent'), cap: 40 }, { key: 'description', title: t('viewer.col.stats') }], items, (item, key) => (key === 'description' ? item.description ?? '' : item.label)),
|
|
430
430
|
rows: items,
|
|
431
431
|
renderCell: (item, column) => (column.key === 'description' ? item.description ?? '' : item.label),
|
|
432
432
|
maxVisible: PICKER_MAX_VISIBLE,
|
|
433
433
|
preselect,
|
|
434
|
-
footer: '
|
|
434
|
+
footer: t('viewer.pickerFooter'),
|
|
435
435
|
onSelect: item => this.onSelectItem(item),
|
|
436
436
|
onCancel: () => this.onCancelPicker(),
|
|
437
437
|
});
|
|
@@ -504,8 +504,6 @@ export class SubagentViewerPanel {
|
|
|
504
504
|
timer;
|
|
505
505
|
/** Timestamp of the last handled `x` press; 0 = none (the double-press arm). */
|
|
506
506
|
lastXPress = 0;
|
|
507
|
-
/** Timestamp of the last handled `k` press; 0 = none (the double-press arm). */
|
|
508
|
-
lastKPress = 0;
|
|
509
507
|
/** Current scroll offset into the transcript lines. */
|
|
510
508
|
scrollTop = 0;
|
|
511
509
|
/** Whether the view is pinned to the log tail (default, re-set on the bottom). */
|
|
@@ -559,18 +557,18 @@ export class SubagentViewerPanel {
|
|
|
559
557
|
const wrap = Math.max(2, width - 2);
|
|
560
558
|
const out = [...this.headerLines(view)];
|
|
561
559
|
if (truncated)
|
|
562
|
-
out.push(fns.subtle(
|
|
560
|
+
out.push(fns.subtle(t('viewer.truncated', { cap: CHILD_LOG_CAP })));
|
|
563
561
|
// The `⏻` marker row: the maxRounds policy hard-stopped this child — a
|
|
564
562
|
// synthetic in-transcript line (render-layer composition, the same shape
|
|
565
563
|
// as the dsh-dcp compaction marker), NOT a log event. It states the
|
|
566
564
|
// round it fired at and the cap it enforced so the stop reads as policy,
|
|
567
565
|
// never as a mysterious failure.
|
|
568
566
|
if (view?.hardStop !== undefined) {
|
|
569
|
-
out.push(fns.subtle(clipToWidth(
|
|
567
|
+
out.push(fns.subtle(clipToWidth(t('viewer.hardStopped', { round: view.hardStop.round, cap: view.hardStop.cap }), wrap)));
|
|
570
568
|
}
|
|
571
569
|
const slice = lines.slice(this.scrollTop, this.scrollTop + this.bodyRows);
|
|
572
570
|
if (slice.length === 0) {
|
|
573
|
-
out.push(fns.subtle('
|
|
571
|
+
out.push(fns.subtle(t('viewer.noEvents')));
|
|
574
572
|
}
|
|
575
573
|
else {
|
|
576
574
|
for (const line of slice)
|
|
@@ -607,7 +605,7 @@ export class SubagentViewerPanel {
|
|
|
607
605
|
// broken.
|
|
608
606
|
const running = this.bridge.getAgentViews().some(view => view.childId === this.childId && view.outcome === undefined);
|
|
609
607
|
if (running && this.bridge.cancelChild(this.childId)) {
|
|
610
|
-
this.showNotice('
|
|
608
|
+
this.showNotice(t('viewer.canceling'));
|
|
611
609
|
}
|
|
612
610
|
else {
|
|
613
611
|
this.onClose();
|
|
@@ -622,30 +620,6 @@ export class SubagentViewerPanel {
|
|
|
622
620
|
this.onSteerRequested();
|
|
623
621
|
return;
|
|
624
622
|
}
|
|
625
|
-
// `k` — arm/confirm the per-child stop with an explicit second press
|
|
626
|
-
// (same double-press arm the `x` stop uses, a distinct key so a user who
|
|
627
|
-
// has learned `x ×2` keeps it and a user who wants a mnemonic gets one).
|
|
628
|
-
// The notice names the target so the confirm is unambiguous.
|
|
629
|
-
if (data.toLowerCase() === 'k') {
|
|
630
|
-
const now = Date.now();
|
|
631
|
-
if (this.lastKPress !== 0 && now - this.lastKPress < MIN_DOUBLE_PRESS_GAP_MS)
|
|
632
|
-
return;
|
|
633
|
-
if (this.lastKPress !== 0 && now - this.lastKPress <= DOUBLE_PRESS_MS) {
|
|
634
|
-
this.lastKPress = 0;
|
|
635
|
-
const running = this.bridge.getAgentViews().some(view => view.childId === this.childId && view.outcome === undefined);
|
|
636
|
-
if (running && this.bridge.cancelChild(this.childId)) {
|
|
637
|
-
this.showNotice('⏹ canceling this subagent…');
|
|
638
|
-
}
|
|
639
|
-
else {
|
|
640
|
-
this.showNotice('nothing running to stop');
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
else {
|
|
644
|
-
this.lastKPress = now;
|
|
645
|
-
this.showNotice('press k again to stop this subagent');
|
|
646
|
-
}
|
|
647
|
-
return;
|
|
648
|
-
}
|
|
649
623
|
if (kb.matches(data, 'tui.select.up'))
|
|
650
624
|
this.scrollBy(-1);
|
|
651
625
|
else if (kb.matches(data, 'tui.select.down'))
|
|
@@ -676,12 +650,12 @@ export class SubagentViewerPanel {
|
|
|
676
650
|
headerLines(view) {
|
|
677
651
|
const p = this.theme.palette;
|
|
678
652
|
if (view === undefined) {
|
|
679
|
-
return [ansiFg(p.accent) + BOLD +
|
|
653
|
+
return [ansiFg(p.accent) + BOLD + t('viewer.header.child', { id: clipToWidth(this.childId, 8) }) + RESET];
|
|
680
654
|
}
|
|
681
|
-
const status = view.outcome === undefined ? 'running'
|
|
682
|
-
: view.outcome === 'completed' ? 'completed'
|
|
683
|
-
: view.outcome === 'failed' ? 'failed'
|
|
684
|
-
: 'cancelled';
|
|
655
|
+
const status = view.outcome === undefined ? t('viewer.status.running')
|
|
656
|
+
: view.outcome === 'completed' ? t('viewer.status.completed')
|
|
657
|
+
: view.outcome === 'failed' ? t('viewer.status.failed')
|
|
658
|
+
: t('viewer.status.cancelled');
|
|
685
659
|
const statusColor = view.outcome === undefined ? p.accent
|
|
686
660
|
: view.outcome === 'completed' ? p.success
|
|
687
661
|
: view.outcome === 'failed' ? p.danger
|
|
@@ -697,7 +671,7 @@ export class SubagentViewerPanel {
|
|
|
697
671
|
if (view.modelRoute !== undefined)
|
|
698
672
|
routeParts.push(view.modelRoute);
|
|
699
673
|
if (view.thinking !== undefined)
|
|
700
|
-
routeParts.push(
|
|
674
|
+
routeParts.push(t('viewer.route.think', { effort: view.thinking }));
|
|
701
675
|
if (view.mode !== undefined)
|
|
702
676
|
routeParts.push(view.mode);
|
|
703
677
|
if (view.provider !== undefined && view.provider !== 'spawn')
|
|
@@ -707,11 +681,11 @@ export class SubagentViewerPanel {
|
|
|
707
681
|
// Line 3 — the activity/budget indicators (the old header tail).
|
|
708
682
|
const maxRounds = this.readMaxRounds();
|
|
709
683
|
const rounds = this.bridge.getRoundCount(this.childId);
|
|
710
|
-
const tail = [
|
|
684
|
+
const tail = [t('viewer.rounds', { count: rounds, cap: maxRounds > 0 ? `/${maxRounds}` : '' })];
|
|
711
685
|
if (view.hardStop !== undefined)
|
|
712
|
-
tail.push(
|
|
686
|
+
tail.push(t('viewer.hardStoppedAt', { round: view.hardStop.round }));
|
|
713
687
|
if (view.injectedAt !== undefined)
|
|
714
|
-
tail.push('
|
|
688
|
+
tail.push(t('viewer.injected'));
|
|
715
689
|
if (view.tokens > 0)
|
|
716
690
|
tail.push(formatTokens(view.tokens));
|
|
717
691
|
const elapsed = (view.outcome === undefined ? Date.now() : view.endedAt ?? Date.now()) - view.startedAt;
|
|
@@ -780,15 +754,15 @@ export class SteerInputPanel {
|
|
|
780
754
|
const fns = panelThemeFns(this.theme);
|
|
781
755
|
const wrap = Math.max(2, width - 2);
|
|
782
756
|
const lines = [
|
|
783
|
-
fns.accent(BOLD + clipToWidth(
|
|
784
|
-
fns.muted(clipToWidth('
|
|
757
|
+
fns.accent(BOLD + clipToWidth(t('viewer.steer.title', { label: this.options.label }), wrap) + RESET),
|
|
758
|
+
fns.muted(clipToWidth(t('viewer.steer.hint'), wrap)),
|
|
785
759
|
'',
|
|
786
760
|
...this.editor.render(wrap),
|
|
787
761
|
'',
|
|
788
762
|
];
|
|
789
763
|
if (this.error !== undefined)
|
|
790
764
|
lines.push(this.fgDanger(clipToWidth(`✘ ${this.error}`, wrap)));
|
|
791
|
-
lines.push(fns.subtle(clipToWidth(
|
|
765
|
+
lines.push(fns.subtle(clipToWidth(t('viewer.steer.footer'), wrap)));
|
|
792
766
|
return lines;
|
|
793
767
|
}
|
|
794
768
|
handleInput(data) {
|
|
@@ -900,7 +874,9 @@ export async function openSubagentViewer(ctx, tui, theme, bridge, restoreFocus)
|
|
|
900
874
|
if (key === 'K') {
|
|
901
875
|
const stopped = bridge.cancelAllChildren();
|
|
902
876
|
// Feedback rides the same toast channel as the per-viewer stop.
|
|
903
|
-
panel.showNotice?.(
|
|
877
|
+
panel.showNotice?.(stopped === 1
|
|
878
|
+
? t('viewer.stopAllOne')
|
|
879
|
+
: t('viewer.stopAllMany', { n: stopped }));
|
|
904
880
|
return true;
|
|
905
881
|
}
|
|
906
882
|
return false;
|
|
@@ -928,7 +904,7 @@ export async function openSubagentViewer(ctx, tui, theme, bridge, restoreFocus)
|
|
|
928
904
|
}, () => tui.requestRender(), () => {
|
|
929
905
|
// Ended children get an inline notice INSTEAD of the input box.
|
|
930
906
|
if (!steerAvailable(childId)) {
|
|
931
|
-
panel.showNotice(
|
|
907
|
+
panel.showNotice(t('viewer.steer.ended'));
|
|
932
908
|
return;
|
|
933
909
|
}
|
|
934
910
|
panel.dispose();
|
|
@@ -950,7 +926,7 @@ export async function openSubagentViewer(ctx, tui, theme, bridge, restoreFocus)
|
|
|
950
926
|
// settled while the message was being typed or queued.
|
|
951
927
|
deliverSubagentSteer(findView(childId), ctx.agents.get(SessionId(childId)), text),
|
|
952
928
|
onFinish: result => {
|
|
953
|
-
showViewer(childId, result.outcome === 'sent' ?
|
|
929
|
+
showViewer(childId, result.outcome === 'sent' ? t('viewer.steer.sent') : t('viewer.steer.ended'));
|
|
954
930
|
},
|
|
955
931
|
onCancel: () => showViewer(childId),
|
|
956
932
|
requestRender: () => tui.requestRender(),
|