@agi-fans/dsh-tui 0.9.0 → 0.11.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 +4 -4
- package/lib/CHANGELOG.md +40 -4
- package/lib/chrome/welcome-tips.js +1 -0
- package/lib/chrome/welcome-tips.js.map +1 -1
- package/lib/chrome/width.js +36 -0
- package/lib/chrome/width.js.map +1 -1
- package/lib/commands/export.js +11 -6
- package/lib/commands/export.js.map +1 -1
- package/lib/commands/model.js +111 -4
- package/lib/commands/model.js.map +1 -1
- package/lib/commands/session.js +79 -36
- package/lib/commands/session.js.map +1 -1
- package/lib/commands/trajectory.d.ts +5 -0
- package/lib/commands/trajectory.js +20 -0
- package/lib/commands/trajectory.js.map +1 -0
- package/lib/definition.d.ts +12 -0
- package/lib/input/keybindings-config.d.ts +1 -1
- package/lib/input/keybindings-config.js +7 -1
- package/lib/input/keybindings-config.js.map +1 -1
- package/lib/runtime/provider-local.d.ts +1 -0
- package/lib/runtime/provider-local.js +115 -20
- package/lib/runtime/provider-local.js.map +1 -1
- package/lib/runtime/terminal-notifications.d.ts +24 -0
- package/lib/runtime/terminal-notifications.js +61 -0
- package/lib/runtime/terminal-notifications.js.map +1 -0
- package/lib/session/context-diagnostics.d.ts +8 -0
- package/lib/session/context-diagnostics.js +50 -0
- package/lib/session/context-diagnostics.js.map +1 -0
- package/lib/session/model-favorites.d.ts +11 -0
- package/lib/session/model-favorites.js +74 -0
- package/lib/session/model-favorites.js.map +1 -0
- package/lib/session/session-controller.d.ts +13 -1
- package/lib/session/session-controller.js +49 -7
- package/lib/session/session-controller.js.map +1 -1
- package/lib/session/session-library.d.ts +8 -0
- package/lib/session/session-library.js +43 -0
- package/lib/session/session-library.js.map +1 -0
- package/lib/session/subagent-roster.js +11 -1
- package/lib/session/subagent-roster.js.map +1 -1
- package/lib/session/tui-settings.d.ts +2 -0
- package/lib/session/tui-settings.js +2 -0
- package/lib/session/tui-settings.js.map +1 -1
- package/lib/views/agent-hub.d.ts +29 -0
- package/lib/views/agent-hub.js +165 -0
- package/lib/views/agent-hub.js.map +1 -0
- package/lib/views/event-views.d.ts +6 -0
- package/lib/views/event-views.js +18 -0
- package/lib/views/event-views.js.map +1 -1
- package/lib/views/hotkeys.js +3 -0
- package/lib/views/hotkeys.js.map +1 -1
- package/lib/views/prompt-selector.js +2 -1
- package/lib/views/prompt-selector.js.map +1 -1
- package/lib/views/settings-list.d.ts +2 -0
- package/lib/views/settings-list.js +21 -1
- package/lib/views/settings-list.js.map +1 -1
- package/lib/views/trajectory.d.ts +64 -0
- package/lib/views/trajectory.js +550 -0
- package/lib/views/trajectory.js.map +1 -0
- package/lib/views/transcript-export.d.ts +2 -0
- package/lib/views/transcript-export.js +34 -0
- package/lib/views/transcript-export.js.map +1 -1
- package/package.json +5 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/commands/session.ts"],"names":[],"mappings":"AAAA,iFAAiF;
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/commands/session.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAGjF,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAA;AAKhC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAA;AAC9D,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AAC/F,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,+BAA+B,CAAA;AAC7H,OAAO,EAAE,0BAA0B,EAAE,MAAM,mCAAmC,CAAA;AAE9E,MAAM,CAAC,MAAM,IAA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a,CAAC,GAAG,EAAE,UAAU,CAAC;SACtD;QACD,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,kCAAkC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,aAAa,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE;QAC5H,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,8BAA8B,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,WAAW,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE;QACrH,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,wCAAwC,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,KAAK,CAAC,GAAG,EAAE,UAAU,CAAC,EAAE;QACvH,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,oCAAoC,EAAE,OAAO,EAAE,QAAQ,EAAE;KACvF,EAAE,wBAAwB,CAAC,CAAA;AAC9B,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Full-screen session Trajectory command registered through dsh-commands. */
|
|
2
|
+
import type { Context } from '@deepseek-ai/cordis';
|
|
3
|
+
export declare const name = "omdsh-command-trajectory";
|
|
4
|
+
export declare const inject: string[];
|
|
5
|
+
export declare function apply(ctx: Context): void;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** Full-screen session Trajectory command registered through dsh-commands. */
|
|
2
|
+
import { registerCommands } from "./registration.js";
|
|
3
|
+
export const name = 'omdsh-command-trajectory';
|
|
4
|
+
export const inject = ['commands', 'tui'];
|
|
5
|
+
function openTrajectory(ctx, invocation) {
|
|
6
|
+
if (invocation.rawInput.trim() !== '')
|
|
7
|
+
return { kind: 'error', text: 'Usage: /trajectory' };
|
|
8
|
+
if (!ctx.tui.openTrajectory(invocation.agent.session.events)) {
|
|
9
|
+
return { kind: 'error', text: 'Trajectory requires an interactive terminal.' };
|
|
10
|
+
}
|
|
11
|
+
return { kind: 'success' };
|
|
12
|
+
}
|
|
13
|
+
export function apply(ctx) {
|
|
14
|
+
registerCommands(ctx, [{
|
|
15
|
+
name: 'trajectory',
|
|
16
|
+
description: 'Inspect the session event trajectory',
|
|
17
|
+
handler: invocation => openTrajectory(ctx, invocation),
|
|
18
|
+
}], 'omdsh trajectory command');
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=trajectory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trajectory.js","sourceRoot":"","sources":["../../src/commands/trajectory.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAI9E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAA;AAEpD,MAAM,CAAC,MAAM,IAAI,GAAG,0BAA0B,CAAA;AAC9C,MAAM,CAAC,MAAM,MAAM,GAAG,CAAC,UAAU,EAAE,KAAK,CAAC,CAAA;AAEzC,SAAS,cAAc,CAAC,GAAY,EAAE,UAA6B;IACjE,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,CAAA;IAC3F,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,cAAc,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QAC7D,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,8CAA8C,EAAE,CAAA;IAChF,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;AAC5B,CAAC;AAED,MAAM,UAAU,KAAK,CAAC,GAAY;IAChC,gBAAgB,CAAC,GAAG,EAAE,CAAC;YACrB,IAAI,EAAE,YAAY;YAClB,WAAW,EAAE,sCAAsC;YACnD,OAAO,EAAE,UAAU,CAAC,EAAE,CAAC,cAAc,CAAC,GAAG,EAAE,UAAU,CAAC;SACvD,CAAC,EAAE,0BAA0B,CAAC,CAAA;AACjC,CAAC"}
|
package/lib/definition.d.ts
CHANGED
|
@@ -48,6 +48,13 @@ export interface TuiPrompt {
|
|
|
48
48
|
tone: 'success' | 'warning' | 'error' | 'muted';
|
|
49
49
|
};
|
|
50
50
|
}[];
|
|
51
|
+
/** Optional single-key actions applied to the active option while the filter is empty. */
|
|
52
|
+
actions?: readonly {
|
|
53
|
+
key: string;
|
|
54
|
+
label: string;
|
|
55
|
+
/** Prefix returned before the selected option value. */
|
|
56
|
+
valuePrefix: string;
|
|
57
|
+
}[];
|
|
51
58
|
multiSelect?: boolean;
|
|
52
59
|
allowCustom?: boolean;
|
|
53
60
|
/** Mask custom input while retaining the real value only in the prompt editor. */
|
|
@@ -110,6 +117,9 @@ export interface TuiSubagentView {
|
|
|
110
117
|
readonly mode?: 'one-shot' | 'continuable';
|
|
111
118
|
readonly phase: TuiSubagentPhase;
|
|
112
119
|
readonly activity: readonly TuiSubagentActivity[];
|
|
120
|
+
/** First and latest durable event timestamps for elapsed-time presentation. */
|
|
121
|
+
readonly startedAt?: number;
|
|
122
|
+
readonly updatedAt?: number;
|
|
113
123
|
}
|
|
114
124
|
/** Live descendant roster for the active root session. */
|
|
115
125
|
export interface TuiSubagentRoster {
|
|
@@ -196,6 +206,8 @@ export interface TuiService {
|
|
|
196
206
|
}[]): void;
|
|
197
207
|
/** Replace commands contributed by the active agent's Harness scope. */
|
|
198
208
|
setCommands(commands: readonly TuiCommand[]): void;
|
|
209
|
+
/** Open a keyboard-driven event ledger for the active session. */
|
|
210
|
+
openTrajectory(events: readonly SessionEvent[]): boolean;
|
|
199
211
|
/** Append a direct UI/command result without fabricating a session event. */
|
|
200
212
|
notice(text: string, options?: TuiNoticeOptions): void;
|
|
201
213
|
/** Append one successful plugin command result using the command-output surface. */
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** User-overridable application keybindings loaded from one JSON document. */
|
|
2
|
-
export type TuiAction = 'external-editor' | 'retry' | 'paste-clipboard' | 'copy-prompt' | 'copy-line' | 'inspect-subagent';
|
|
2
|
+
export type TuiAction = 'external-editor' | 'retry' | 'paste-clipboard' | 'copy-prompt' | 'copy-line' | 'inspect-subagent' | 'cycle-model-forward' | 'cycle-model-backward' | 'cycle-reasoning';
|
|
3
3
|
export declare const DEFAULT_KEYBINDINGS: Readonly<Record<string, TuiAction>>;
|
|
4
4
|
/** Load `{ "key-id": "action" }`; invalid rows are ignored independently. */
|
|
5
5
|
export declare function loadKeybindings(path: string | undefined): Record<string, TuiAction>;
|
|
@@ -7,8 +7,14 @@ export const DEFAULT_KEYBINDINGS = Object.freeze({
|
|
|
7
7
|
'alt+c': 'copy-prompt',
|
|
8
8
|
'ctrl+alt+c': 'copy-line',
|
|
9
9
|
'alt+a': 'inspect-subagent',
|
|
10
|
+
'ctrl+p': 'cycle-model-forward',
|
|
11
|
+
'alt+p': 'cycle-model-backward',
|
|
12
|
+
'ctrl+t': 'cycle-reasoning',
|
|
10
13
|
});
|
|
11
|
-
const ACTIONS = [
|
|
14
|
+
const ACTIONS = [
|
|
15
|
+
'external-editor', 'retry', 'paste-clipboard', 'copy-prompt', 'copy-line', 'inspect-subagent',
|
|
16
|
+
'cycle-model-forward', 'cycle-model-backward', 'cycle-reasoning',
|
|
17
|
+
];
|
|
12
18
|
/** Load `{ "key-id": "action" }`; invalid rows are ignored independently. */
|
|
13
19
|
export function loadKeybindings(path) {
|
|
14
20
|
const result = { ...DEFAULT_KEYBINDINGS };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keybindings-config.js","sourceRoot":"","sources":["../../src/input/keybindings-config.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"keybindings-config.js","sourceRoot":"","sources":["../../src/input/keybindings-config.ts"],"names":[],"mappings":"AAAA,8EAA8E;AAE9E,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAA;AAKtC,MAAM,CAAC,MAAM,mBAAmB,GAAwC,MAA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ubagent(inspected: TuiInspectedSubagent | undefined): void;
|
|
93
93
|
setTools(tools: readonly ToolInfo[]): void;
|
|
94
94
|
setCommands(commands: readonly TuiCommand[]): void;
|
|
95
|
+
openTrajectory(events: readonly SessionEvent[]): boolean;
|
|
95
96
|
setSessionSearch(search?: SessionSearcher): void;
|
|
96
97
|
setFileSearch(search?: FileSearcher): void;
|
|
97
98
|
setImageValidator(validate?: (image: TuiInputImage) => Promise<void>): void;
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* printing of settled blocks.
|
|
11
11
|
* @module @agi-fans/dsh-tui
|
|
12
12
|
*/
|
|
13
|
+
import { TerminalNotificationController, terminalNotificationSequence } from "./terminal-notifications.js";
|
|
13
14
|
import { homedir } from 'node:os';
|
|
14
15
|
import { join } from 'node:path';
|
|
15
16
|
import { createInterface } from 'node:readline';
|
|
@@ -24,6 +25,8 @@ import { buildCopyTargets, extractCopyTarget, parseCopyKind } from "../views/cop
|
|
|
24
25
|
import { applyHistorySearchEvent, createHistorySearch, } from "../views/history-search.js";
|
|
25
26
|
import { InputEditor, lineEnd, lineStart } from "../input/editor.js";
|
|
26
27
|
import { applySettingsEvent, createSettings, } from "../views/settings-list.js";
|
|
28
|
+
import { appendTrajectoryEvent, applyTrajectoryEvent, createTrajectory, } from "../views/trajectory.js";
|
|
29
|
+
import { applyAgentHubEvent, createAgentHub, updateAgentHub, } from "../views/agent-hub.js";
|
|
27
30
|
import { applyEvent, blockLines, initialTranscript, replayEvents, renderView, TRANSCRIPT_FAST_SCROLL, } from "../views/event-views.js";
|
|
28
31
|
import { flushPending, parseKeys } from "../input/keys.js";
|
|
29
32
|
import { MainScreenRenderer } from "../chrome/main-screen-renderer.js";
|
|
@@ -83,6 +86,8 @@ export class LocalTui {
|
|
|
83
86
|
#search = null;
|
|
84
87
|
#settings = null;
|
|
85
88
|
#copySelector = null;
|
|
89
|
+
#trajectory = null;
|
|
90
|
+
#agentHub = null;
|
|
86
91
|
#pending = null;
|
|
87
92
|
#queuedSubmissions = [];
|
|
88
93
|
/** Newer queue entries temporarily detached while Up browses backward. */
|
|
@@ -128,6 +133,9 @@ export class LocalTui {
|
|
|
128
133
|
#expandTools = false;
|
|
129
134
|
#checkUpdates = true;
|
|
130
135
|
#startupChangelog = 'summary';
|
|
136
|
+
#notifications = new TerminalNotificationController();
|
|
137
|
+
#notificationPolicy = 'off';
|
|
138
|
+
#notificationThreshold = '30s';
|
|
131
139
|
#statusBar = defaultStatusBarConfig();
|
|
132
140
|
#toolsExpanded = false;
|
|
133
141
|
#expandedToolCalls = new Set();
|
|
@@ -238,6 +246,9 @@ export class LocalTui {
|
|
|
238
246
|
}
|
|
239
247
|
event(event, presentation) {
|
|
240
248
|
this.#state = applyEvent(this.#state, event, presentation);
|
|
249
|
+
this.#emitNotification(this.#notifications.event({ type: event.type, ...('reason' in event && typeof event.reason === 'string' ? { reason: event.reason } : {}) }));
|
|
250
|
+
if (this.#trajectory !== null)
|
|
251
|
+
this.#trajectory = appendTrajectoryEvent(this.#trajectory, event);
|
|
241
252
|
this.#syncTick();
|
|
242
253
|
if (this.#tty) {
|
|
243
254
|
if (event.type === 'assistant/chunk' && this.#streamRenderMs > 0) {
|
|
@@ -277,6 +288,12 @@ export class LocalTui {
|
|
|
277
288
|
: { agents: roster.agents.map(agent => ({ ...agent, activity: [...agent.activity] })) };
|
|
278
289
|
if ((this.#subagents?.agents.length ?? 0) === 0)
|
|
279
290
|
this.#subagentLauncherFocused = false;
|
|
291
|
+
if (this.#agentHub !== null) {
|
|
292
|
+
if (this.#subagents === undefined)
|
|
293
|
+
this.#agentHub = null;
|
|
294
|
+
else
|
|
295
|
+
this.#agentHub = updateAgentHub(this.#agentHub, this.#subagents);
|
|
296
|
+
}
|
|
280
297
|
const inspected = this.#inspected;
|
|
281
298
|
if (inspected !== undefined) {
|
|
282
299
|
const current = this.#subagents?.agents.find(agent => agent.id === inspected.id);
|
|
@@ -315,6 +332,19 @@ export class LocalTui {
|
|
|
315
332
|
if (this.#tty)
|
|
316
333
|
this.#render();
|
|
317
334
|
}
|
|
335
|
+
openTrajectory(events) {
|
|
336
|
+
if (!this.#tty)
|
|
337
|
+
return false;
|
|
338
|
+
this.#trajectory = createTrajectory(events);
|
|
339
|
+
this.#agentHub = null;
|
|
340
|
+
this.#prompt = null;
|
|
341
|
+
this.#settings = null;
|
|
342
|
+
this.#copySelector = null;
|
|
343
|
+
this.#search = null;
|
|
344
|
+
this.#ac = null;
|
|
345
|
+
this.#render();
|
|
346
|
+
return true;
|
|
347
|
+
}
|
|
318
348
|
setSessionSearch(search) {
|
|
319
349
|
this.#searchSessions = search;
|
|
320
350
|
this.#refreshAutocomplete();
|
|
@@ -355,6 +385,7 @@ export class LocalTui {
|
|
|
355
385
|
return Promise.reject(new Error('omdsh-tui: prompt already in flight'));
|
|
356
386
|
if (this.#disposed || request.signal?.aborted === true)
|
|
357
387
|
return Promise.resolve(null);
|
|
388
|
+
this.#emitNotification(this.#notifications.humanPrompt());
|
|
358
389
|
this.#editor.setText('');
|
|
359
390
|
this.#ac = null;
|
|
360
391
|
return new Promise((resolve) => {
|
|
@@ -386,6 +417,7 @@ export class LocalTui {
|
|
|
386
417
|
});
|
|
387
418
|
}
|
|
388
419
|
replaceSession(events, presentations, status = 'idle') {
|
|
420
|
+
this.#trajectory = null;
|
|
389
421
|
const state = replayEvents(events, presentations);
|
|
390
422
|
this.#state = { ...state, status, compactCommandId: undefined };
|
|
391
423
|
this.#plainPrinted = 0;
|
|
@@ -407,7 +439,11 @@ export class LocalTui {
|
|
|
407
439
|
...info.controls,
|
|
408
440
|
...(info.controls.plan === undefined ? {} : { plan: { ...info.controls.plan } }),
|
|
409
441
|
};
|
|
410
|
-
if (this.#tty)
|
|
442
|
+
if (!this.#tty)
|
|
443
|
+
return;
|
|
444
|
+
if (this.#streamRenderMs > 0 && this.#busy())
|
|
445
|
+
this.#scheduleStreamRender();
|
|
446
|
+
else
|
|
411
447
|
this.#render();
|
|
412
448
|
}
|
|
413
449
|
/** Apply prefs loaded from the settings document (does not persist). */
|
|
@@ -417,6 +453,9 @@ export class LocalTui {
|
|
|
417
453
|
this.#expandTools = prefs.expandTools;
|
|
418
454
|
this.#checkUpdates = prefs.checkUpdates ?? true;
|
|
419
455
|
this.#startupChangelog = prefs.startupChangelog ?? 'summary';
|
|
456
|
+
this.#notificationPolicy = prefs.notifications ?? 'off';
|
|
457
|
+
this.#notificationThreshold = prefs.notificationThreshold ?? '30s';
|
|
458
|
+
this.#configureNotifications();
|
|
420
459
|
this.#statusBar = resolveStatusBarConfig(prefs.statusBar, prefs.statusPreset);
|
|
421
460
|
this.#toolsExpanded = prefs.expandTools;
|
|
422
461
|
if (this.#settings !== null)
|
|
@@ -714,6 +753,8 @@ export class LocalTui {
|
|
|
714
753
|
...(this.#subagents === undefined ? {} : { subagents: this.#subagents }),
|
|
715
754
|
subagentLauncherFocused: this.#subagentLauncherFocused,
|
|
716
755
|
...(this.#inspected === undefined ? {} : { inspected: this.#inspected }),
|
|
756
|
+
...(this.#trajectory === null ? {} : { trajectory: this.#trajectory }),
|
|
757
|
+
...(this.#agentHub === null ? {} : { agentHub: this.#agentHub }),
|
|
717
758
|
statusBar: this.#statusBar,
|
|
718
759
|
...(this.#prompt === null ? {} : { promptSelector: this.#prompt }),
|
|
719
760
|
...(this.#settings !== null
|
|
@@ -1026,6 +1067,28 @@ export class LocalTui {
|
|
|
1026
1067
|
this.#lastEscapeTime = 0;
|
|
1027
1068
|
if (this.#handlePrompt(event))
|
|
1028
1069
|
return;
|
|
1070
|
+
if (this.#trajectory !== null) {
|
|
1071
|
+
const command = applyTrajectoryEvent(this.#trajectory, event);
|
|
1072
|
+
if ('close' in command)
|
|
1073
|
+
this.#trajectory = null;
|
|
1074
|
+
else
|
|
1075
|
+
this.#trajectory = command.state;
|
|
1076
|
+
this.#render();
|
|
1077
|
+
return;
|
|
1078
|
+
}
|
|
1079
|
+
if (this.#agentHub !== null) {
|
|
1080
|
+
const command = applyAgentHubEvent(this.#agentHub, event);
|
|
1081
|
+
if ('close' in command)
|
|
1082
|
+
this.#agentHub = null;
|
|
1083
|
+
else if ('open' in command) {
|
|
1084
|
+
this.#agentHub = null;
|
|
1085
|
+
this.#openInspect(command.open);
|
|
1086
|
+
}
|
|
1087
|
+
else
|
|
1088
|
+
this.#agentHub = command.state;
|
|
1089
|
+
this.#render();
|
|
1090
|
+
return;
|
|
1091
|
+
}
|
|
1029
1092
|
if (event.type === 'key') {
|
|
1030
1093
|
const action = this.#keybindings[event.id];
|
|
1031
1094
|
if (action !== undefined) {
|
|
@@ -1184,6 +1247,15 @@ export class LocalTui {
|
|
|
1184
1247
|
return false;
|
|
1185
1248
|
if (prompt.request.presentation === 'plan-review')
|
|
1186
1249
|
return this.#handlePlanReview(event, prompt);
|
|
1250
|
+
if (event.type === 'text' && this.#editor.text === '') {
|
|
1251
|
+
const action = prompt.request.actions?.find(item => item.key === event.value);
|
|
1252
|
+
const selected = filteredPromptOptions(prompt.request, '')[prompt.selected];
|
|
1253
|
+
if (action !== undefined && selected !== undefined) {
|
|
1254
|
+
this.#finishPrompt(action.valuePrefix + (selected.value ?? selected.label));
|
|
1255
|
+
this.#render();
|
|
1256
|
+
return true;
|
|
1257
|
+
}
|
|
1258
|
+
}
|
|
1187
1259
|
if (event.type === 'text' && event.value === ' ' && prompt.request.multiSelect === true && this.#editor.text === '') {
|
|
1188
1260
|
this.#prompt = togglePromptSelection(prompt);
|
|
1189
1261
|
this.#render();
|
|
@@ -1391,31 +1463,21 @@ export class LocalTui {
|
|
|
1391
1463
|
for (const listener of this.#inspectCloses)
|
|
1392
1464
|
listener();
|
|
1393
1465
|
}
|
|
1394
|
-
|
|
1466
|
+
#pickSubagent() {
|
|
1395
1467
|
this.#subagentLauncherFocused = false;
|
|
1396
1468
|
const agents = this.#subagents?.agents ?? [];
|
|
1397
1469
|
if (agents.length === 0) {
|
|
1398
1470
|
this.notice('No subagents are available in this session.');
|
|
1399
1471
|
return;
|
|
1400
1472
|
}
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
})),
|
|
1410
|
-
...(initialValue === undefined ? {} : { initialValue }),
|
|
1411
|
-
allowCustom: false,
|
|
1412
|
-
presentation: 'fullscreen-list',
|
|
1413
|
-
filterable: true,
|
|
1414
|
-
submitLabel: 'open',
|
|
1415
|
-
});
|
|
1416
|
-
if (answer === null || answer === '')
|
|
1417
|
-
return;
|
|
1418
|
-
this.#openInspect(answer);
|
|
1473
|
+
this.#prompt = null;
|
|
1474
|
+
this.#settings = null;
|
|
1475
|
+
this.#copySelector = null;
|
|
1476
|
+
this.#search = null;
|
|
1477
|
+
this.#trajectory = null;
|
|
1478
|
+
this.#ac = null;
|
|
1479
|
+
this.#agentHub = createAgentHub({ agents });
|
|
1480
|
+
this.#render();
|
|
1419
1481
|
}
|
|
1420
1482
|
#prefs() {
|
|
1421
1483
|
return {
|
|
@@ -1424,6 +1486,8 @@ export class LocalTui {
|
|
|
1424
1486
|
expandTools: this.#expandTools,
|
|
1425
1487
|
checkUpdates: this.#checkUpdates,
|
|
1426
1488
|
startupChangelog: this.#startupChangelog,
|
|
1489
|
+
notifications: this.#notificationPolicy,
|
|
1490
|
+
notificationThreshold: this.#notificationThreshold,
|
|
1427
1491
|
statusBar: {
|
|
1428
1492
|
...this.#statusBar,
|
|
1429
1493
|
groups: [...this.#statusBar.groups],
|
|
@@ -1442,6 +1506,9 @@ export class LocalTui {
|
|
|
1442
1506
|
this.#expandTools = prefs.expandTools;
|
|
1443
1507
|
this.#checkUpdates = prefs.checkUpdates ?? true;
|
|
1444
1508
|
this.#startupChangelog = prefs.startupChangelog ?? 'summary';
|
|
1509
|
+
this.#notificationPolicy = prefs.notifications ?? 'off';
|
|
1510
|
+
this.#notificationThreshold = prefs.notificationThreshold ?? '30s';
|
|
1511
|
+
this.#configureNotifications();
|
|
1445
1512
|
this.#statusBar = resolveStatusBarConfig(prefs.statusBar, prefs.statusPreset);
|
|
1446
1513
|
if (expandChanged)
|
|
1447
1514
|
this.#toolsExpanded = prefs.expandTools;
|
|
@@ -1827,6 +1894,8 @@ export class LocalTui {
|
|
|
1827
1894
|
this.#search = null;
|
|
1828
1895
|
this.#settings = null;
|
|
1829
1896
|
this.#copySelector = null;
|
|
1897
|
+
this.#trajectory = null;
|
|
1898
|
+
this.#agentHub = null;
|
|
1830
1899
|
this.#followTail();
|
|
1831
1900
|
// Image placeholders are TUI-owned. Mixed image+slash drafts stay a
|
|
1832
1901
|
// submission so restore can keep the original markers; the runner strips
|
|
@@ -2031,6 +2100,20 @@ export class LocalTui {
|
|
|
2031
2100
|
blocks: [...this.#state.blocks, { kind: 'notice', level: 'info', text }],
|
|
2032
2101
|
};
|
|
2033
2102
|
}
|
|
2103
|
+
#configureNotifications() {
|
|
2104
|
+
const thresholds = { '15s': 15_000, '30s': 30_000, '1m': 60_000, '2m': 120_000 };
|
|
2105
|
+
this.#notifications.configure({
|
|
2106
|
+
policy: this.#notificationPolicy,
|
|
2107
|
+
thresholdMs: thresholds[this.#notificationThreshold],
|
|
2108
|
+
});
|
|
2109
|
+
}
|
|
2110
|
+
#emitNotification(notification) {
|
|
2111
|
+
if (notification === undefined || !this.#tty)
|
|
2112
|
+
return;
|
|
2113
|
+
const sequence = terminalNotificationSequence(notification);
|
|
2114
|
+
if (sequence !== '')
|
|
2115
|
+
this.#term.output.write(sequence);
|
|
2116
|
+
}
|
|
2034
2117
|
#toolCatalog() {
|
|
2035
2118
|
this.#state = {
|
|
2036
2119
|
...this.#state,
|
|
@@ -2053,6 +2136,18 @@ export class LocalTui {
|
|
|
2053
2136
|
this.#submit('/retry');
|
|
2054
2137
|
return;
|
|
2055
2138
|
}
|
|
2139
|
+
if (action === 'cycle-model-forward') {
|
|
2140
|
+
this.#submit('/model next');
|
|
2141
|
+
return;
|
|
2142
|
+
}
|
|
2143
|
+
if (action === 'cycle-model-backward') {
|
|
2144
|
+
this.#submit('/model previous');
|
|
2145
|
+
return;
|
|
2146
|
+
}
|
|
2147
|
+
if (action === 'cycle-reasoning') {
|
|
2148
|
+
this.#submit('/model reasoning');
|
|
2149
|
+
return;
|
|
2150
|
+
}
|
|
2056
2151
|
if (action === 'copy-prompt') {
|
|
2057
2152
|
void this.#copyPicked(this.#editor.text, 'current prompt');
|
|
2058
2153
|
return;
|