@linxiraos/pi-tui 1.2.0 → 1.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/CHANGELOG.md +188 -120
- package/README.md +36 -0
- package/THIRD-PARTY-NOTICES.txt +55 -5
- package/dist/types/app-keybindings.d.ts +18 -8
- package/dist/types/apps/git/diff-pane.d.ts +5 -0
- package/dist/types/apps/git/git-tui.d.ts +16 -2
- package/dist/types/apps/git/state.d.ts +11 -0
- package/dist/types/autocomplete.d.ts +2 -0
- package/dist/types/charts/chart-svg.d.ts +7 -13
- package/dist/types/chat/advisor-message.d.ts +4 -1
- package/dist/types/chat/assistant-message.d.ts +9 -4
- package/dist/types/chat/figure-markdown.d.ts +7 -2
- package/dist/types/chat/messages.d.ts +3 -1
- package/dist/types/chat/read-tool-group.d.ts +2 -2
- package/dist/types/chat/table-chart.d.ts +11 -15
- package/dist/types/chat/tool-execution.d.ts +32 -20
- package/dist/types/chat/user-message.d.ts +3 -2
- package/dist/types/chrome/countdown-timer.d.ts +3 -2
- package/dist/types/chrome/diff.d.ts +2 -3
- package/dist/types/chrome/transcript-container.d.ts +2 -0
- package/dist/types/components/image.d.ts +2 -0
- package/dist/types/components/markdown.d.ts +49 -3
- package/dist/types/components/text.d.ts +2 -0
- package/dist/types/debug-server.d.ts +2 -0
- package/dist/types/keybinding-matchers.d.ts +6 -0
- package/dist/types/multiplexers/tmux.d.ts +1 -0
- package/dist/types/multiplexers/types.d.ts +6 -0
- package/dist/types/native/backend.d.ts +5 -4
- package/dist/types/native/blobs.d.ts +24 -12
- package/dist/types/overlays/agent-hub-projection.d.ts +10 -5
- package/dist/types/overlays/annotation-overlay.d.ts +19 -0
- package/dist/types/overlays/approval-dialog.d.ts +79 -0
- package/dist/types/overlays/ask-dialog.d.ts +11 -6
- package/dist/types/overlays/btw-history-panel.d.ts +2 -6
- package/dist/types/overlays/hook-editor.d.ts +7 -2
- package/dist/types/overlays/hook-input.d.ts +12 -4
- package/dist/types/overlays/job-tree.d.ts +50 -0
- package/dist/types/overlays/jobs-panel.d.ts +25 -11
- package/dist/types/overlays/login-dialog.d.ts +8 -3
- package/dist/types/overlays/mcp-add-wizard.d.ts +9 -1
- package/dist/types/overlays/model-browser.d.ts +6 -1
- package/dist/types/overlays/model-picker.d.ts +2 -0
- package/dist/types/overlays/pause-screen.d.ts +5 -0
- package/dist/types/overlays/plan-review-overlay.d.ts +4 -0
- package/dist/types/overlays/report-panel.d.ts +5 -1
- package/dist/types/overlays/reset-usage-selector.d.ts +7 -5
- package/dist/types/overlays/session-account-selector.d.ts +4 -0
- package/dist/types/overlays/session-info-overlay.d.ts +7 -3
- package/dist/types/overlays/session-selector.d.ts +3 -1
- package/dist/types/overlays/usage-dashboard.d.ts +6 -6
- package/dist/types/prompt/composer.d.ts +22 -26
- package/dist/types/prompt/custom-editor.d.ts +20 -10
- package/dist/types/prompt/image-references.d.ts +22 -0
- package/dist/types/prompt/internal-url-autocomplete.d.ts +1 -0
- package/dist/types/prompt/macos-spelling.d.ts +2 -1
- package/dist/types/prompt/prose-gate.d.ts +3 -0
- package/dist/types/prompt/queued-messages.d.ts +1 -1
- package/dist/types/prompt/typing-word.d.ts +25 -0
- package/dist/types/prompt/welcome.d.ts +35 -43
- package/dist/types/render/hanging-wrap.d.ts +7 -0
- package/dist/types/render/hyperlink.d.ts +2 -0
- package/dist/types/render/render-utils.d.ts +9 -1
- package/dist/types/render/utils.d.ts +1 -1
- package/dist/types/setup/scenes/splash.d.ts +6 -5
- package/dist/types/status-line/context-usage.d.ts +4 -1
- package/dist/types/status-line/host.d.ts +6 -4
- package/dist/types/status-line/startup.d.ts +6 -6
- package/dist/types/status-line/types.d.ts +3 -0
- package/dist/types/stdin-buffer.d.ts +7 -0
- package/dist/types/terminal-capabilities.d.ts +16 -1
- package/dist/types/terminal-multiplexer.d.ts +7 -0
- package/dist/types/terminal.d.ts +8 -4
- package/dist/types/theme/symbols.d.ts +1 -1
- package/dist/types/theme/theme.d.ts +11 -0
- package/dist/types/thinking.d.ts +5 -0
- package/dist/types/tmux.d.ts +39 -4
- package/dist/types/tools/ast-edit.d.ts +2 -2
- package/dist/types/tools/ast-grep.d.ts +2 -2
- package/dist/types/tools/bash.d.ts +6 -1
- package/dist/types/tools/edit.d.ts +2 -0
- package/dist/types/tools/eval.d.ts +53 -4
- package/dist/types/tools/find.d.ts +14 -4
- package/dist/types/tools/glob.d.ts +3 -3
- package/dist/types/tools/grep.d.ts +2 -2
- package/dist/types/tools/grouped-file-output.d.ts +9 -4
- package/dist/types/tools/native-view.d.ts +1 -1
- package/dist/types/tools/read.d.ts +32 -10
- package/dist/types/tools/renderer.d.ts +2 -0
- package/dist/types/tools/task.d.ts +31 -0
- package/dist/types/tools/write.d.ts +2 -0
- package/dist/types/tui.d.ts +20 -3
- package/package.json +10 -10
- package/src/app-keybindings.d.ts +18 -8
- package/src/app-keybindings.ts +20 -8
- package/src/apps/autoresearch-dashboard.ts +444 -27
- package/src/apps/debug/raw-sse.ts +2 -2
- package/src/apps/git/diff-pane.ts +39 -41
- package/src/apps/git/git-tui.ts +80 -14
- package/src/apps/git/sidebar.ts +10 -1
- package/src/apps/git/state.ts +12 -0
- package/src/autocomplete.d.ts +2 -0
- package/src/autocomplete.ts +21 -19
- package/src/bracketed-paste.ts +9 -2
- package/src/charts/chart-svg.d.ts +7 -13
- package/src/charts/chart-svg.ts +19 -22
- package/src/chat/advisor-message.d.ts +4 -1
- package/src/chat/advisor-message.ts +77 -24
- package/src/chat/assistant-message.d.ts +9 -4
- package/src/chat/assistant-message.ts +127 -31
- package/src/chat/bash-execution.ts +7 -2
- package/src/chat/figure-markdown.d.ts +7 -2
- package/src/chat/figure-markdown.ts +10 -3
- package/src/chat/image-loading.ts +9 -6
- package/src/chat/messages.d.ts +3 -1
- package/src/chat/messages.ts +4 -1
- package/src/chat/read-tool-group.d.ts +2 -2
- package/src/chat/read-tool-group.ts +97 -42
- package/src/chat/svg-figure.ts +3 -1
- package/src/chat/svg-source.ts +6 -3
- package/src/chat/table-chart.d.ts +11 -15
- package/src/chat/table-chart.ts +24 -57
- package/src/chat/tool-execution.d.ts +32 -20
- package/src/chat/tool-execution.ts +103 -36
- package/src/chat/user-message.d.ts +3 -2
- package/src/chat/user-message.ts +54 -34
- package/src/chrome/countdown-timer.ts +3 -3
- package/src/chrome/diff.d.ts +2 -3
- package/src/chrome/diff.ts +4 -9
- package/src/chrome/transcript-container.d.ts +2 -0
- package/src/chrome/transcript-container.ts +212 -28
- package/src/components/editor.ts +12 -12
- package/src/components/image.d.ts +2 -0
- package/src/components/image.ts +54 -20
- package/src/components/markdown.d.ts +49 -3
- package/src/components/markdown.ts +461 -11
- package/src/components/settings-list.ts +2 -4
- package/src/components/text.d.ts +2 -0
- package/src/components/text.ts +11 -1
- package/src/debug-server.d.ts +2 -0
- package/src/debug-server.ts +51 -69
- package/src/hotkeys-markdown.ts +2 -0
- package/src/keybinding-matchers.d.ts +6 -0
- package/src/keybinding-matchers.ts +19 -0
- package/src/multiplexers/tmux.d.ts +1 -0
- package/src/multiplexers/tmux.ts +3 -0
- package/src/multiplexers/types.d.ts +6 -0
- package/src/multiplexers/types.ts +6 -0
- package/src/native/backend.d.ts +5 -4
- package/src/native/backend.ts +13 -5
- package/src/native/blobs.d.ts +24 -12
- package/src/native/blobs.ts +56 -7
- package/src/native/reconcile.ts +43 -21
- package/src/overlays/advisor-config.ts +259 -8
- package/src/overlays/agent-hub-projection.d.ts +10 -5
- package/src/overlays/agent-hub-projection.ts +63 -12
- package/src/overlays/agent-hub.ts +2 -2
- package/src/overlays/annotation-overlay.ts +422 -168
- package/src/overlays/approval-dialog.ts +389 -0
- package/src/overlays/ask-dialog.ts +244 -105
- package/src/overlays/btw-history-panel.ts +208 -147
- package/src/overlays/extensions/extension-list.ts +4 -6
- package/src/overlays/hook-editor.ts +90 -32
- package/src/overlays/hook-input.ts +105 -19
- package/src/overlays/job-tree.ts +177 -0
- package/src/overlays/jobs-panel.ts +222 -142
- package/src/overlays/login-dialog.ts +201 -91
- package/src/overlays/mcp-add-wizard.ts +562 -279
- package/src/overlays/model-browser.ts +32 -7
- package/src/overlays/model-hub.ts +4 -10
- package/src/overlays/model-picker.ts +58 -21
- package/src/overlays/pause-screen.ts +81 -23
- package/src/overlays/plan-review-overlay.ts +16 -0
- package/src/overlays/plugin-selector.ts +17 -1
- package/src/overlays/plugin-settings.ts +8 -2
- package/src/overlays/queue-mode-selector.ts +10 -0
- package/src/overlays/report-panel.ts +6 -2
- package/src/overlays/reset-usage-selector.ts +130 -21
- package/src/overlays/session-account-selector.ts +36 -0
- package/src/overlays/session-info-overlay.ts +199 -76
- package/src/overlays/session-selector.ts +15 -10
- package/src/overlays/settings-selector.ts +3 -0
- package/src/overlays/show-images-selector.ts +1 -0
- package/src/overlays/snapcompact-shape-preview.ts +13 -6
- package/src/overlays/theme-selector.ts +6 -1
- package/src/overlays/thinking-selector.ts +8 -4
- package/src/overlays/tree-selector.ts +117 -2
- package/src/overlays/usage-dashboard.ts +498 -144
- package/src/prompt/composer-cache.ts +4 -6
- package/src/prompt/composer.ts +196 -96
- package/src/prompt/custom-editor.ts +168 -65
- package/src/prompt/image-references.d.ts +22 -0
- package/src/prompt/image-references.ts +79 -2
- package/src/prompt/internal-url-autocomplete.ts +1 -0
- package/src/prompt/macos-spelling.ts +28 -5
- package/src/prompt/prose-gate.ts +3 -0
- package/src/prompt/queued-messages.ts +9 -2
- package/src/prompt/tips.txt +1 -2
- package/src/prompt/typing-word.ts +59 -0
- package/src/prompt/welcome.ts +256 -423
- package/src/render/code-cell.ts +18 -5
- package/src/render/hanging-wrap.d.ts +7 -0
- package/src/render/hanging-wrap.ts +58 -0
- package/src/render/hyperlink.d.ts +2 -0
- package/src/render/hyperlink.ts +5 -0
- package/src/render/render-utils.d.ts +9 -1
- package/src/render/render-utils.ts +16 -2
- package/src/render/utils.d.ts +1 -1
- package/src/render/utils.ts +1 -1
- package/src/render/width-aware-text.ts +6 -5
- package/src/setup/scenes/splash.ts +137 -60
- package/src/status-line/component.ts +23 -10
- package/src/status-line/context-usage.ts +176 -73
- package/src/status-line/footer.ts +18 -35
- package/src/status-line/host.ts +6 -1
- package/src/status-line/segments.ts +16 -5
- package/src/status-line/startup.ts +6 -6
- package/src/status-line/types.ts +1 -0
- package/src/stdin-buffer.d.ts +7 -0
- package/src/stdin-buffer.ts +11 -1
- package/src/terminal-capabilities.d.ts +16 -1
- package/src/terminal-capabilities.ts +66 -28
- package/src/terminal-multiplexer.d.ts +7 -0
- package/src/terminal-multiplexer.ts +14 -0
- package/src/terminal.d.ts +8 -4
- package/src/terminal.ts +160 -46
- package/src/theme/symbols.d.ts +1 -1
- package/src/theme/symbols.ts +1 -0
- package/src/theme/theme-class.ts +1 -0
- package/src/theme/theme.d.ts +11 -0
- package/src/theme/theme.ts +46 -14
- package/src/thinking.d.ts +5 -0
- package/src/thinking.ts +9 -1
- package/src/tmux.d.ts +39 -4
- package/src/tmux.ts +110 -16
- package/src/tools/ask.ts +20 -9
- package/src/tools/ast-edit.d.ts +2 -2
- package/src/tools/ast-edit.ts +30 -7
- package/src/tools/ast-grep.d.ts +2 -2
- package/src/tools/ast-grep.ts +39 -35
- package/src/tools/bash.d.ts +6 -1
- package/src/tools/bash.ts +15 -9
- package/src/tools/debug.ts +2 -1
- package/src/tools/default-renderer.ts +3 -2
- package/src/tools/edit.d.ts +2 -0
- package/src/tools/edit.ts +100 -21
- package/src/tools/eval.d.ts +53 -4
- package/src/tools/eval.ts +173 -137
- package/src/tools/find.d.ts +14 -4
- package/src/tools/find.ts +71 -18
- package/src/tools/glob.d.ts +3 -3
- package/src/tools/glob.ts +51 -17
- package/src/tools/grep.d.ts +2 -2
- package/src/tools/grep.ts +99 -22
- package/src/tools/grouped-file-output.d.ts +9 -4
- package/src/tools/grouped-file-output.ts +21 -6
- package/src/tools/lsp.ts +30 -18
- package/src/tools/mcp.ts +2 -2
- package/src/tools/native-view.d.ts +1 -1
- package/src/tools/native-view.ts +2 -2
- package/src/tools/read.d.ts +32 -10
- package/src/tools/read.ts +89 -43
- package/src/tools/renderer.d.ts +2 -0
- package/src/tools/renderer.ts +2 -0
- package/src/tools/task.d.ts +31 -0
- package/src/tools/task.ts +40 -7
- package/src/tools/todo.ts +3 -2
- package/src/tools/wait.ts +16 -30
- package/src/tools/web-search.ts +2 -1
- package/src/tools/write.d.ts +2 -0
- package/src/tools/write.ts +36 -12
- package/src/tools/yield.ts +2 -2
- package/src/tui.d.ts +20 -3
- package/src/tui.ts +140 -36
- package/src/utils.ts +5 -3
- package/dist/types/tools/eval-format/code-mode-declarations.d.ts +0 -5
- package/src/tools/eval-format/code-mode-declarations.ts +0 -61
|
@@ -9,6 +9,8 @@ import type { KeyId } from "./app-keybindings.js";
|
|
|
9
9
|
export declare function matchesAppInterrupt(data: string): boolean;
|
|
10
10
|
/** Match `app.tools.expand`, falling back to Ctrl+O when the action is unbound. */
|
|
11
11
|
export declare function matchesAppToolsExpand(data: string): boolean;
|
|
12
|
+
/** Effective tools-expand key: the first bound key, or Ctrl+O when unbound. */
|
|
13
|
+
export declare function appToolsExpandKey(): KeyId;
|
|
12
14
|
/** Match the generic selector cancel keybinding. */
|
|
13
15
|
export declare function matchesSelectCancel(data: string): boolean;
|
|
14
16
|
/** Match the generic selector up-navigation keybinding. */
|
|
@@ -36,3 +38,7 @@ export declare function matchesAppExternalEditor(data: string): boolean;
|
|
|
36
38
|
* effective follow-up binding.
|
|
37
39
|
*/
|
|
38
40
|
export declare function matchesAppFollowUp(data: string): boolean;
|
|
41
|
+
/** Effective tool-approval keys: the `app.approval.approve` bindings, or Ctrl+Enter/Ctrl+Q when unbound. */
|
|
42
|
+
export declare function appApproveKeys(): readonly KeyId[];
|
|
43
|
+
/** Match the tool-approval key, recognizing modifier-tagged LF as Ctrl+Enter like {@link matchesAppFollowUp}. */
|
|
44
|
+
export declare function matchesAppApprove(data: string): boolean;
|
|
@@ -22,6 +22,7 @@ export declare const tmuxMultiplexer: {
|
|
|
22
22
|
readonly passthrough: typeof wrapTmuxPassthrough;
|
|
23
23
|
readonly settleMs: 100;
|
|
24
24
|
};
|
|
25
|
+
readonly gatesBracketedPaste: true;
|
|
25
26
|
readonly expandsRepPadding: true;
|
|
26
27
|
readonly expiresSynchronizedOutput: true;
|
|
27
28
|
readonly altRestoreEndsSynchronizedOutput: true;
|
|
@@ -73,6 +73,12 @@ export interface TerminalMultiplexerModule<Id extends string = string> {
|
|
|
73
73
|
* session, and an unrecognized report does not turn it off.
|
|
74
74
|
*/
|
|
75
75
|
readonly honorsSynchronizedOutput?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* Tracks DEC 2004 per pane and forwards paste markers only while it is set,
|
|
78
|
+
* yet may leave DECRQM 2004 unanswered, so bracketed paste is reasserted
|
|
79
|
+
* without waiting for a DECRPM confirmation.
|
|
80
|
+
*/
|
|
81
|
+
readonly gatesBracketedPaste?: boolean;
|
|
76
82
|
/**
|
|
77
83
|
* The session does not reveal whether its client renders graphics while
|
|
78
84
|
* outer-terminal identity variables leak in, so images and Kitty
|
|
@@ -47,10 +47,11 @@ export interface NativeBackendOptions {
|
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* The reply a v1 terminal is assumed to give before its real `hello` arrives
|
|
50
|
-
* (the `TERM_PROGRAM=tern` optimistic start): the whole vocabulary
|
|
51
|
-
* default APC limit and credits, the terminal's
|
|
52
|
-
* already detected, full motion, and `blobs`, so a
|
|
53
|
-
* are asked about rather than resent before the
|
|
50
|
+
* (the `TERM_PROGRAM=tern` optimistic start): the whole vocabulary except
|
|
51
|
+
* {@link UNASSUMED_KINDS}, the default APC limit and credits, the terminal's
|
|
52
|
+
* width, the appearance omp already detected, full motion, and `blobs`, so a
|
|
53
|
+
* resumed session's images are asked about rather than resent before the
|
|
54
|
+
* reply comes.
|
|
54
55
|
*/
|
|
55
56
|
export declare function assumedTspHello(terminal: Terminal): TspHello;
|
|
56
57
|
export declare class NativeBackend {
|
|
@@ -1,14 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Content-addressed binary blobs (images) for `image` nodes.
|
|
3
|
-
*
|
|
4
|
-
* `describe()` registers the bytes and puts the returned id in `image.p.blob`;
|
|
5
|
-
* the native backend delivers each referenced blob once per terminal
|
|
6
|
-
* connection (asking the terminal first which it holds, or through its blob
|
|
7
|
-
* cache), else uploads it with verb `b` before the frame that first
|
|
8
|
-
* references it.
|
|
9
|
-
*/
|
|
10
1
|
import type { TspProps } from "@linxiraos/pi-wire";
|
|
11
|
-
import type { NativeNode } from "./node.js";
|
|
2
|
+
import type { NativeChild, NativeNode } from "./node.js";
|
|
12
3
|
export interface NativeBlob {
|
|
13
4
|
readonly id: string;
|
|
14
5
|
readonly mime: string;
|
|
@@ -26,8 +17,29 @@ export declare function nativeImageNode(bytes: Uint8Array, mime: string, p?: Omi
|
|
|
26
17
|
* so callers cache the node per payload ({@link NativeImageCache}).
|
|
27
18
|
*/
|
|
28
19
|
export declare function base64ImageNode(data: string, mimeType: string, p?: Omit<TspProps<"image">, "blob" | "builtin" | "w" | "h">, key?: string): NativeNode;
|
|
29
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* Props that make an `image` node open the file at `filePath` (as a `file://` URL, the TSP
|
|
22
|
+
* open-target form): a click zooms the image in the terminal, and the file opens from its
|
|
23
|
+
* context menu. Empty without a file.
|
|
24
|
+
*/
|
|
25
|
+
export declare function openableImageProps(filePath: string | undefined): Pick<TspProps<"image">, "href" | "actions">;
|
|
26
|
+
/**
|
|
27
|
+
* `image` nodes for base64 payloads, one per slot key, rebuilt only when the slot's payload
|
|
28
|
+
* or the link policy changes. Each opens its file (`sourcePath`, else a blob copy).
|
|
29
|
+
*/
|
|
30
30
|
export declare class NativeImageCache {
|
|
31
31
|
#private;
|
|
32
|
-
get(key: string, data: string, mimeType: string): NativeNode;
|
|
32
|
+
get(key: string, data: string, mimeType: string, sourcePath?: string): NativeNode;
|
|
33
33
|
}
|
|
34
|
+
/** The disk file a tool result's image was read from (`read` details `mediaPath`), when it has one. */
|
|
35
|
+
export declare function readMediaPath(details: unknown): string | undefined;
|
|
36
|
+
/**
|
|
37
|
+
* A `media` node the host loads by path, capped at the inline image preview
|
|
38
|
+
* height. Callers check `cx.supports("media")` first.
|
|
39
|
+
*/
|
|
40
|
+
export declare function nativeMediaNode(path: string, key: string): NativeNode;
|
|
41
|
+
/** Blob ids of the `image` nodes and paths of the `media` nodes under `children` (described nodes only). */
|
|
42
|
+
export declare function shownMedia(children: readonly NativeChild[] | undefined): {
|
|
43
|
+
blobs: Set<string>;
|
|
44
|
+
paths: Set<string>;
|
|
45
|
+
};
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import type { AgentMetricsSummary, AgentRecordLike, AgentStatus } from "./agent-hub-types.js";
|
|
2
2
|
import type { ObservableSession } from "./session-observer-registry.js";
|
|
3
3
|
export type AgentMetrics = AgentMetricsSummary;
|
|
4
|
+
export interface AgentCostSnapshot {
|
|
5
|
+
cost: number | undefined;
|
|
6
|
+
}
|
|
4
7
|
export interface AggregateMetrics extends AgentMetrics {
|
|
5
8
|
reportedAgents: number;
|
|
6
9
|
/** Rows whose duration is an observer-measured active runtime. */
|
|
@@ -17,14 +20,16 @@ export declare const STATUS_ORDER: Record<AgentStatus, number>;
|
|
|
17
20
|
export declare function progressMetrics(observed: ObservableSession | undefined): AgentMetrics | undefined;
|
|
18
21
|
/** Live session used to cache a row's direct assistant usage, including with observer progress. */
|
|
19
22
|
export declare function hubFallbackStatsSession<TRecord extends AgentRecordLike>(ref: TRecord, observed: ObservableSession | undefined): NonNullable<TRecord["session"]> | undefined;
|
|
20
|
-
/**
|
|
21
|
-
* Preserve progress/history for non-cost metrics, overlaying cumulative direct-session cost.
|
|
22
|
-
* Persisted `history.metrics.cost` is a leaf-scoped snapshot, so it never overrides live
|
|
23
|
-
* progress; only the cumulative direct-cost sources do.
|
|
24
|
-
*/
|
|
23
|
+
/** Full Agent Hub row metrics; see {@link projectRowMetrics} for source precedence. */
|
|
25
24
|
export declare function hubRowMetrics<TRecord extends AgentRecordLike>(ref: TRecord, observed: ObservableSession | undefined, sessionMetrics: WeakMap<object, {
|
|
26
25
|
metrics: AgentMetrics | undefined;
|
|
27
26
|
}>): AgentMetrics | undefined;
|
|
27
|
+
/** Cost-only projection for frequent status updates; full roster metrics keep their own cache. */
|
|
28
|
+
export declare function aggregateCost<TRecord extends AgentRecordLike>(args: {
|
|
29
|
+
rows: readonly TRecord[];
|
|
30
|
+
observedById: ReadonlyMap<string, ObservableSession>;
|
|
31
|
+
sessionCosts: WeakMap<object, AgentCostSnapshot>;
|
|
32
|
+
}): number;
|
|
28
33
|
export declare function aggregateMetrics<TRecord extends AgentRecordLike>(args: {
|
|
29
34
|
rows: readonly TRecord[];
|
|
30
35
|
observedById: ReadonlyMap<string, ObservableSession>;
|
|
@@ -2,6 +2,7 @@ import { type Focusable, type TUI } from "../index.js";
|
|
|
2
2
|
import { type KeybindingsManager } from "../app-keybindings.js";
|
|
3
3
|
import { type Theme } from "../theme/theme.js";
|
|
4
4
|
import type { CodeReviewAnnotation, CodeReviewOverlayResult, ReviewDiffFile, TextReviewAnnotation, TextReviewOverlayResult, TextReviewSource } from "./annotation-types.js";
|
|
5
|
+
import type { TspSpan } from "@linxiraos/pi-wire";
|
|
5
6
|
import { type NativeNode, type NativeUiEvent } from "../native/node.js";
|
|
6
7
|
export declare const CONTINUE_CODE_REVIEW_ACTION = "Continue with LLM review";
|
|
7
8
|
export declare const PASTE_CODE_REVIEW_ACTION = "Paste annotations into prompt";
|
|
@@ -21,6 +22,12 @@ export interface TextReviewOverlayCallbacks extends AnnotationOverlayCallbacks {
|
|
|
21
22
|
}
|
|
22
23
|
/** Splits a text source into the overlay's 1-based annotatable lines. */
|
|
23
24
|
export declare function splitTextLines(text: string): string[];
|
|
25
|
+
/** The native sheet: full-pane glass, titled by the review kind with what is under review after it. */
|
|
26
|
+
interface NativeSheet {
|
|
27
|
+
readonly role: "zeta.overlay.codeReview" | "zeta.overlay.annotateText";
|
|
28
|
+
readonly size: "full";
|
|
29
|
+
readonly head: TspSpan[];
|
|
30
|
+
}
|
|
24
31
|
/** A fullscreen, annotated diff picker that only relies on public OMP APIs. */
|
|
25
32
|
export declare class AnnotationOverlay implements Focusable {
|
|
26
33
|
#private;
|
|
@@ -44,7 +51,19 @@ export declare class AnnotationOverlay implements Focusable {
|
|
|
44
51
|
*/
|
|
45
52
|
replaceTextSource(text: string): number;
|
|
46
53
|
handleInput(data: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* The terminal draws the frame: a full-pane glass sheet titled `Code review`
|
|
56
|
+
* (or `Annotate text`), then what is under review as a quieter subtitle.
|
|
57
|
+
*/
|
|
58
|
+
get nativeOverlay(): NativeSheet;
|
|
59
|
+
/**
|
|
60
|
+
* The sheet's body: the file rail (totals over the changed files) beside
|
|
61
|
+
* the current file's diff (text: its numbered lines), the note composer
|
|
62
|
+
* docked under the lines while a note is open, and a footer of key hints
|
|
63
|
+
* and the actions.
|
|
64
|
+
*/
|
|
47
65
|
describe(): NativeNode;
|
|
48
66
|
handleNativeEvent(event: NativeUiEvent): void;
|
|
49
67
|
render(width: number): readonly string[];
|
|
50
68
|
}
|
|
69
|
+
export {};
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool-approval prompt in the composer's place, presented like the ask
|
|
3
|
+
* dialog: the approval title and its details over a list of choices —
|
|
4
|
+
* Approve, an optional "approve for this session", and Deny — and an action
|
|
5
|
+
* bar. The arrows move between the choices and Enter takes the highlighted
|
|
6
|
+
* one; `app.approval.approve` (Ctrl+Enter by default) approves this call
|
|
7
|
+
* outright and Esc denies. Enter and the approve chord only arm
|
|
8
|
+
* {@link APPROVE_ARM_MS} after mount, so a key meant for the composer (Enter,
|
|
9
|
+
* or the follow-up chord pressed mid-run) as the prompt appears never answers
|
|
10
|
+
* it. With an {@link ApprovalDialogDraft}, every other key edits the composer
|
|
11
|
+
* mounted beneath the dialog, so a message can deny the call and steer the
|
|
12
|
+
* turn instead: while the composer holds a draft, the arrows and Enter edit and
|
|
13
|
+
* send it, and the highlight sits on Deny, relabeled to say Enter sends.
|
|
14
|
+
* The prompt stays a few rows so the composer keeps its room; Page Up/Down
|
|
15
|
+
* scroll the details, and with a full prompt the expand key
|
|
16
|
+
* (`app.tools.expand`) swaps it in, wrapped.
|
|
17
|
+
*/
|
|
18
|
+
import { type Component, type TUI } from "../index.js";
|
|
19
|
+
import { type NativeNode, type NativeUiEvent } from "../native/node.js";
|
|
20
|
+
/** Enter and the approve key are ignored this long after mount, so a key sent as the prompt appears cannot answer it. */
|
|
21
|
+
export declare const APPROVE_ARM_MS = 500;
|
|
22
|
+
interface ApprovalDialogCallbacks {
|
|
23
|
+
onApprove(): void;
|
|
24
|
+
onDeny(): void;
|
|
25
|
+
}
|
|
26
|
+
/** The composer mounted beneath the dialog: it receives every key the dialog does not own. */
|
|
27
|
+
export interface ApprovalDialogDraft {
|
|
28
|
+
/** True while the composer holds a draft — text, attachments, or a paste still landing: keys then edit and send it. */
|
|
29
|
+
hasDraft(): boolean;
|
|
30
|
+
handleInput(keyData: string): void;
|
|
31
|
+
}
|
|
32
|
+
interface ApprovalDialogOptions {
|
|
33
|
+
tui?: TUI;
|
|
34
|
+
/** The prompt with every detail in full, which the expand key swaps in (wrapped) for the summarized one. */
|
|
35
|
+
fullPrompt?: string;
|
|
36
|
+
/** Deny once this many ms pass without input (any key restarts the countdown). */
|
|
37
|
+
timeout?: number;
|
|
38
|
+
/** Called when {@link timeout} expires, before the dialog denies. */
|
|
39
|
+
onTimeout?: () => void;
|
|
40
|
+
/** Called when the countdown starts, as the dialog mounts. */
|
|
41
|
+
onTimeoutStart?: () => void;
|
|
42
|
+
/** Called each time a key restarts the countdown. */
|
|
43
|
+
onTimeoutReset?: () => void;
|
|
44
|
+
/** Route typing to the composer instead of dropping it. */
|
|
45
|
+
draft?: ApprovalDialogDraft;
|
|
46
|
+
/** Offer to approve this and later like calls for the rest of the session, as the row between Approve and Deny. */
|
|
47
|
+
session?: {
|
|
48
|
+
label: string;
|
|
49
|
+
onApprove(): void;
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
export declare class ApprovalDialogComponent implements Component {
|
|
53
|
+
#private;
|
|
54
|
+
private readonly callbacks;
|
|
55
|
+
private readonly options;
|
|
56
|
+
/** `prompt`: the approval title on its first line, the details after it. */
|
|
57
|
+
constructor(prompt: string, callbacks: ApprovalDialogCallbacks, options?: ApprovalDialogOptions);
|
|
58
|
+
invalidate(): void;
|
|
59
|
+
dispose(): void;
|
|
60
|
+
handleInput(keyData: string): void;
|
|
61
|
+
/**
|
|
62
|
+
* Swap the summarized prompt for every detail, wrapped, or back, as the expand key does here;
|
|
63
|
+
* for hosts that intercept that key first. Restarts the countdown like any key. False (nothing
|
|
64
|
+
* changes) without a full prompt, so the host's own expand handling (tool previews) can run.
|
|
65
|
+
*/
|
|
66
|
+
toggleDetails(): boolean;
|
|
67
|
+
render(width: number): readonly string[];
|
|
68
|
+
/**
|
|
69
|
+
* In the dock, in the composer's place and framed as the composer is (an
|
|
70
|
+
* `zeta.editor.*` root role), like the ask dialog, rather than a card over
|
|
71
|
+
* the transcript: the title, the details, the choices with the keyboard's
|
|
72
|
+
* highlight (a click takes one), then Details (with a full prompt), Deny,
|
|
73
|
+
* and the primary Approve, whose keys show in their tooltips.
|
|
74
|
+
*/
|
|
75
|
+
describe(): NativeNode;
|
|
76
|
+
/** Deny, Approve, and Details run exactly what Esc, the approve key, and the expand key run; a click on a choice takes it. */
|
|
77
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
78
|
+
}
|
|
79
|
+
export {};
|
|
@@ -88,7 +88,6 @@ export declare class AskDialogComponent implements Component {
|
|
|
88
88
|
#private;
|
|
89
89
|
private readonly callbacks;
|
|
90
90
|
private readonly options;
|
|
91
|
-
readonly retireDisplacedTranscript = true;
|
|
92
91
|
constructor(questions: ExtensionAskDialogQuestion[], callbacks: AskDialogCallbacks, options?: AskDialogOptions);
|
|
93
92
|
invalidate(): void;
|
|
94
93
|
dispose(): void;
|
|
@@ -102,17 +101,23 @@ export declare class AskDialogComponent implements Component {
|
|
|
102
101
|
render(width: number): readonly string[];
|
|
103
102
|
/**
|
|
104
103
|
* In the dock, in the composer's place and framed as the composer is: a
|
|
105
|
-
* `col` with
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
104
|
+
* `col` with an `zeta.editor.*` root role (`zeta.editor.ask`, collapsed
|
|
105
|
+
* `zeta.editor.ask.hidden`), so the terminal draws the composer's shell
|
|
106
|
+
* around it. Not a modal `overlay` sheet: one anchored at the bottom
|
|
107
|
+
* covered the transcript rows that explain the question and blocked
|
|
108
|
+
* scrolling until the question was answered.
|
|
109
|
+
*
|
|
110
|
+
* Anatomy: the question tabs (several questions), the question, its
|
|
111
|
+
* answers as radio/check rows, and the action bar as the footer (the
|
|
112
|
+
* countdown, Hide, then Note, Skip and the primary Submit/Next).
|
|
109
113
|
*/
|
|
110
114
|
describe(cx: DescribeContext): NativeNode;
|
|
111
115
|
/**
|
|
112
116
|
* Pointer actions: a tab click switches to it; a click on an answer row is
|
|
113
117
|
* Enter on it (Space for a multi-select option, so it toggles; its
|
|
114
118
|
* double-click `activate` is Enter); the action bar's Submit, Note and Skip
|
|
115
|
-
* run exactly what Enter, `n` and Esc run on the highlighted row
|
|
119
|
+
* run exactly what Enter, `n` and Esc run on the highlighted row; Hide/Show
|
|
120
|
+
* collapse and restore the dialog.
|
|
116
121
|
*/
|
|
117
122
|
handleNativeEvent(event: NativeUiEvent): void;
|
|
118
123
|
}
|
|
@@ -40,12 +40,8 @@ export declare class BtwHistoryPanel implements Component, Focusable {
|
|
|
40
40
|
/** Enhanced clipboard pastes belong only to the active composer. */
|
|
41
41
|
pasteText(text: string): void;
|
|
42
42
|
handleInput(data: string): void;
|
|
43
|
-
/** A large glass sheet
|
|
44
|
-
|
|
45
|
-
readonly role: "zeta.overlay.btwHistory";
|
|
46
|
-
readonly size: "lg";
|
|
47
|
-
readonly head: "BTW history";
|
|
48
|
-
};
|
|
43
|
+
/** A large glass sheet (the list beside the reader), palette-sized while there is nothing to list. */
|
|
44
|
+
get nativeOverlay(): NonNullable<Component["nativeOverlay"]>;
|
|
49
45
|
describe(): NativeNode;
|
|
50
46
|
handleNativeEvent(event: NativeUiEvent): void;
|
|
51
47
|
render(width: number): readonly string[];
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
import type { ImageContent } from "@linxiraos/pi-ai";
|
|
11
11
|
import { type Focusable, type TUI } from "../index.js";
|
|
12
12
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
13
|
-
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
13
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
14
14
|
/**
|
|
15
15
|
* `prefix` and `question` flattened onto one line, wrapped to the terminal's width and cut to
|
|
16
16
|
* {@link MAX_PROMPT_TITLE_ROWS} rows (the last ends in `…` when cut). For terminal rendering only:
|
|
@@ -58,8 +58,13 @@ export declare class HookEditorComponent extends OverlayPanel implements Focusab
|
|
|
58
58
|
/** Focus state mirrored to the nested editor during rendering. */
|
|
59
59
|
focused: boolean;
|
|
60
60
|
constructor(tui: TUI, title: string, prefill: string | undefined, onSubmit: (value: string, images?: ImageContent[]) => void, onCancel: () => void, options?: HookEditorOptions);
|
|
61
|
-
/**
|
|
61
|
+
/**
|
|
62
|
+
* A sheet in the composer's place: the title (or, answering a question, the question under the
|
|
63
|
+
* prompt's name) over a hairline, the editor, and Open in editor · Cancel · Submit.
|
|
64
|
+
*/
|
|
62
65
|
describe(_cx: DescribeContext): NativeNode;
|
|
66
|
+
/** The action bar's buttons run what their keys run. */
|
|
67
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
63
68
|
/** Keep the nested editor's software/hardware cursor mode aligned with the dialog focus target. */
|
|
64
69
|
setUseTerminalCursor(useTerminalCursor: boolean): void;
|
|
65
70
|
/** Render the dialog after forwarding its focus state to the nested editor. */
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
*
|
|
2
|
+
* One-line text prompt an extension (hook) asks the user.
|
|
3
3
|
*/
|
|
4
4
|
import { type TUI } from "../index.js";
|
|
5
5
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
6
|
-
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
6
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
7
7
|
export interface HookInputOptions {
|
|
8
8
|
tui?: TUI;
|
|
9
9
|
timeout?: number;
|
|
@@ -11,13 +11,21 @@ export interface HookInputOptions {
|
|
|
11
11
|
}
|
|
12
12
|
export declare class HookInputComponent extends OverlayPanel {
|
|
13
13
|
#private;
|
|
14
|
-
constructor(title: string,
|
|
14
|
+
constructor(title: string, placeholder: string | undefined, onSubmit: (value: string) => void, onCancel: () => void, opts?: HookInputOptions);
|
|
15
15
|
handleInput(keyData: string): void;
|
|
16
16
|
/** Route non-bracketed paste transports (e.g. kitty's OSC 5522 enhanced clipboard)
|
|
17
17
|
* into the inner field, mirroring bracketed-paste semantics. Pasting counts as
|
|
18
18
|
* interaction, so the timeout countdown resets like any keystroke. */
|
|
19
19
|
pasteText(text: string): void;
|
|
20
|
+
/** Submit and Cancel run what Enter and the interrupt key run. */
|
|
21
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
20
22
|
dispose(): void;
|
|
21
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* A sheet in the composer's place, built like the extension editor's: the
|
|
25
|
+
* title's first line (the countdown at its end while a timeout runs) over
|
|
26
|
+
* any further lines as detail, the field written on the sheet (tinted, the
|
|
27
|
+
* reason under it, while a submit was refused), and Cancel · Submit, whose
|
|
28
|
+
* keys live in their tooltips.
|
|
29
|
+
*/
|
|
22
30
|
describe(_cx: DescribeContext): NativeNode;
|
|
23
31
|
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { Theme } from "../theme/theme.js";
|
|
2
|
+
/** What the tree reads off a job. */
|
|
3
|
+
export interface JobTreeJob {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly status: "running" | "completed" | "failed" | "cancelled";
|
|
6
|
+
readonly startTime: number;
|
|
7
|
+
/** Registry id of the agent that owns the job; absent or the root id: a top-level job. */
|
|
8
|
+
readonly ownerId?: string;
|
|
9
|
+
/** Registry id of the subagent a task job runs: the job heads that agent's subtree. */
|
|
10
|
+
readonly agentId?: string;
|
|
11
|
+
}
|
|
12
|
+
/** A subagent in the tree, by registry id: an owner of listed jobs, or an ancestor linking one to the root. */
|
|
13
|
+
export interface JobTreeAgent {
|
|
14
|
+
readonly id: string;
|
|
15
|
+
readonly parentId?: string;
|
|
16
|
+
}
|
|
17
|
+
/** Where a row sits: its depth and the rails drawn left of it. */
|
|
18
|
+
export interface JobTreePlace {
|
|
19
|
+
/** 0 for the top level. */
|
|
20
|
+
readonly depth: number;
|
|
21
|
+
/** Per enclosing level below the top, whether that level's rail continues past this row. */
|
|
22
|
+
readonly rails: readonly boolean[];
|
|
23
|
+
/** Whether this row is the last of its siblings. */
|
|
24
|
+
readonly last: boolean;
|
|
25
|
+
/** Whether rows nest under this one. */
|
|
26
|
+
readonly parent: boolean;
|
|
27
|
+
}
|
|
28
|
+
/** One tree row: a job (a task job also heads its subagent), or a header for a subagent with no listed task job. */
|
|
29
|
+
export type JobTreeRow<J extends JobTreeJob> = (JobTreePlace & {
|
|
30
|
+
readonly kind: "job";
|
|
31
|
+
readonly job: J;
|
|
32
|
+
readonly agent?: JobTreeAgent;
|
|
33
|
+
}) | (JobTreePlace & {
|
|
34
|
+
readonly kind: "agent";
|
|
35
|
+
readonly agent: JobTreeAgent;
|
|
36
|
+
});
|
|
37
|
+
/**
|
|
38
|
+
* `jobs` as tree rows in display order. `rootId` is the viewing agent: its
|
|
39
|
+
* jobs, ownerless jobs and jobs of owners outside `agents` sit at the top
|
|
40
|
+
* level, as do agents whose parent is the root or unknown.
|
|
41
|
+
*/
|
|
42
|
+
export declare function buildJobTree<J extends JobTreeJob>(jobs: readonly J[], agents: readonly JobTreeAgent[], rootId: string | undefined): JobTreeRow<J>[];
|
|
43
|
+
/** The connector drawn before a row's head: nothing at the top level, else rails then a branch. */
|
|
44
|
+
export declare function jobTreeGuide(row: JobTreePlace, theme: Theme): string;
|
|
45
|
+
/**
|
|
46
|
+
* The prefix of lines under a row's head (its label, a wrapped command): the
|
|
47
|
+
* rails that continue past it, then the rail down to its children or blank,
|
|
48
|
+
* two columns wide so a top-level leaf's lines indent by two.
|
|
49
|
+
*/
|
|
50
|
+
export declare function jobTreeIndent(row: JobTreePlace, theme: Theme): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Component } from "../tui.js";
|
|
2
2
|
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
|
+
import { type JobTreeAgent } from "./job-tree.js";
|
|
3
4
|
/** One async job as the session snapshots it. */
|
|
4
5
|
export interface JobsPanelJob {
|
|
5
6
|
readonly id: string;
|
|
@@ -8,13 +9,19 @@ export interface JobsPanelJob {
|
|
|
8
9
|
readonly label: string;
|
|
9
10
|
readonly startTime: number;
|
|
10
11
|
readonly endTime?: number;
|
|
12
|
+
/** Registry id of the agent that owns the job. */
|
|
13
|
+
readonly ownerId?: string;
|
|
11
14
|
/** Registry id of the subagent a task job runs. */
|
|
12
15
|
readonly agentId?: string;
|
|
13
16
|
}
|
|
14
|
-
/** Running and recently settled jobs. */
|
|
17
|
+
/** Running and recently settled jobs of an agent and its subagents. */
|
|
15
18
|
export interface JobsPanelSnapshot {
|
|
16
19
|
readonly running: readonly JobsPanelJob[];
|
|
17
20
|
readonly recent: readonly JobsPanelJob[];
|
|
21
|
+
/** The agent the sheet is for: its jobs sit at the top level, and only they can be cancelled. */
|
|
22
|
+
readonly rootId?: string;
|
|
23
|
+
/** Subagents owning listed jobs, with the ancestors linking them to the root. */
|
|
24
|
+
readonly agents?: readonly JobTreeAgent[];
|
|
18
25
|
}
|
|
19
26
|
/** What the sheet shows about the selected job beyond its row. */
|
|
20
27
|
export interface JobsPanelDetail {
|
|
@@ -35,19 +42,26 @@ export interface JobsSheetSource {
|
|
|
35
42
|
load(): JobsPanelSnapshot;
|
|
36
43
|
/** The selected job's detail; runs once per frame, undefined once the job is gone. */
|
|
37
44
|
inspect(id: string): JobsPanelDetail | undefined;
|
|
38
|
-
/**
|
|
39
|
-
|
|
45
|
+
/**
|
|
46
|
+
* Cancel a running job. Omitted by a read-only sheet (a focused subagent
|
|
47
|
+
* view, which only watches that agent): it lists the jobs and offers no way
|
|
48
|
+
* to stop them.
|
|
49
|
+
*/
|
|
50
|
+
cancel?(id: string): void;
|
|
40
51
|
/** Dismiss the sheet. */
|
|
41
52
|
close(): void;
|
|
42
53
|
}
|
|
43
54
|
/**
|
|
44
55
|
* The jobs pill's sheet: a centred `lg` glass sheet titled Background jobs.
|
|
45
|
-
* A
|
|
46
|
-
* job's detail
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
56
|
+
* A master–detail split (it stacks in a narrow pane): the selectable job tree
|
|
57
|
+
* beside the selected job's detail — a status pill with live elapsed and
|
|
58
|
+
* Cancel job, its command or task, facts (agent, cwd, live pids, exit code,
|
|
59
|
+
* artifact) and a tail-following output pane. With no jobs it shows an empty
|
|
60
|
+
* state. It re-reads the session every frame, so the caller re-renders it on
|
|
61
|
+
* a timer while it is open. ↑/↓ select, X cancels the selected running job,
|
|
62
|
+
* Esc or Close dismisses; nothing enters the transcript. A source without
|
|
63
|
+
* `cancel` renders read-only, and a subagent's job never offers Cancel: only
|
|
64
|
+
* the root's own jobs can be stopped here.
|
|
51
65
|
*/
|
|
52
66
|
export declare class JobsSheet implements Component {
|
|
53
67
|
#private;
|
|
@@ -58,8 +72,8 @@ export declare class JobsSheet implements Component {
|
|
|
58
72
|
readonly head: "Background jobs";
|
|
59
73
|
};
|
|
60
74
|
constructor(source: JobsSheetSource);
|
|
61
|
-
describe(
|
|
62
|
-
/** Rows for a terminal without the native surface:
|
|
75
|
+
describe(_cx: DescribeContext): NativeNode;
|
|
76
|
+
/** Rows for a terminal without the native surface: the job tree, then the selected job's facts and output tail. */
|
|
63
77
|
render(width: number): readonly string[];
|
|
64
78
|
invalidate(): void;
|
|
65
79
|
handleInput(data: string): void;
|
|
@@ -40,9 +40,14 @@ export declare class LoginDialogComponent extends OverlayPanel {
|
|
|
40
40
|
showProgress(message: string): void;
|
|
41
41
|
/**
|
|
42
42
|
* A glass sheet over the composer (the dialog replaces the editor in the
|
|
43
|
-
* dock; the `overlay` hoists into the terminal's layer)
|
|
44
|
-
*
|
|
45
|
-
* field
|
|
43
|
+
* dock; the `overlay` hoists into the terminal's layer). Top to bottom: one
|
|
44
|
+
* sentence saying what to do, the device code as a large click-to-copy
|
|
45
|
+
* well, the sign-in link as a read-only field with Copy, the questions
|
|
46
|
+
* (answered ones as label/value lines, the live one as a field), and the
|
|
47
|
+
* flow's status — finished stages checked, the current one spinning. The
|
|
48
|
+
* footer holds Cancel and one primary action: Continue while a field waits
|
|
49
|
+
* for an answer (Open sign-in page then leads the footer as a plain
|
|
50
|
+
* button), else Open sign-in page.
|
|
46
51
|
*/
|
|
47
52
|
describe(): NativeNode;
|
|
48
53
|
/** Cancel and Continue run what Esc and Enter run. */
|
|
@@ -83,8 +83,16 @@ interface MCPAddWizardOAuthOptions {
|
|
|
83
83
|
export declare class MCPAddWizard extends OverlayPanel {
|
|
84
84
|
#private;
|
|
85
85
|
constructor(deps: MCPAddWizardDeps, onComplete: (name: string, config: MCPAddWizardConfig, scope: Scope) => void, onCancel: () => void, onOAuth?: (authUrl: string, tokenUrl: string, clientId: string, clientSecret: string, scopes: string, options?: MCPAddWizardOAuthOptions) => Promise<MCPAddWizardOAuthResult>, onTestConnection?: (config: MCPAddWizardConfig) => Promise<void>, onRender?: () => void, initialName?: string);
|
|
86
|
+
/**
|
|
87
|
+
* The sheet: the phase strip, the step's title and lead, its body (field,
|
|
88
|
+
* status, summary), its choices, and a footer whose buttons run what
|
|
89
|
+
* Escape, Enter and Ctrl+C run.
|
|
90
|
+
*/
|
|
86
91
|
describe(_cx: DescribeContext): NativeNode;
|
|
87
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* A click on a choice is Enter on it, exactly as highlighting it with the
|
|
94
|
+
* arrows and pressing Enter; the footer's buttons run what their keys run.
|
|
95
|
+
*/
|
|
88
96
|
handleNativeEvent(event: NativeUiEvent): void;
|
|
89
97
|
handleInput(keyData: string): void;
|
|
90
98
|
}
|
|
@@ -4,7 +4,7 @@ import type { Component } from "../tui.js";
|
|
|
4
4
|
import type { SgrMouseEvent } from "../mouse.js";
|
|
5
5
|
import { type ConfiguredThinkingLevel } from "../thinking.js";
|
|
6
6
|
import { type ThemeColor } from "../theme/theme.js";
|
|
7
|
-
import type { TspPickerColumn, TspPickerGroup, TspPickerItem } from "@linxiraos/pi-wire";
|
|
7
|
+
import type { TspPickerColumn, TspPickerGroup, TspPickerItem, TspPickerMark } from "@linxiraos/pi-wire";
|
|
8
8
|
import type { NativeChild, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
9
9
|
/** Canonical display ordering of built-in model roles. */
|
|
10
10
|
export type ModelRole = "default" | "smol" | "slow" | "vision" | "plan" | "commit" | "tiny" | "memory" | "task" | "advisor" | "image" | "web" | "speech" | "dictation" | "judge";
|
|
@@ -198,6 +198,11 @@ export declare function rankModelItems(query: string, items: ReadonlyArray<Model
|
|
|
198
198
|
export declare function formatRoleChip(role: string, assignment: RoleAssignment, settings: ModelBrowserSource): string;
|
|
199
199
|
/** Fact columns of a model picker (Stencil `NATIVE_REDESIGN.md` §4.7); the lowest priority hides first. */
|
|
200
200
|
export declare const MODEL_PICKER_COLUMNS: readonly TspPickerColumn[];
|
|
201
|
+
/**
|
|
202
|
+
* A provider's picker mark: the terminal's logo for it, else its initials
|
|
203
|
+
* (`amazon-bedrock` → `AB`, `anthropic` → `An`) on its own gradient.
|
|
204
|
+
*/
|
|
205
|
+
export declare function providerMark(providerId: string): TspPickerMark;
|
|
201
206
|
/** The omp theme token of a thinking level's dot (`thinkingHigh`); none for inherit and auto. */
|
|
202
207
|
export declare function thinkingDotToken(level: ConfiguredThinkingLevel): string | undefined;
|
|
203
208
|
/**
|
|
@@ -57,6 +57,8 @@ export interface ModelPickerOptions {
|
|
|
57
57
|
taskModeKeys?: readonly KeyId[];
|
|
58
58
|
/** `provider/id` highlighted and preselected in task mode (current Task subagent model). */
|
|
59
59
|
taskSelector?: string;
|
|
60
|
+
/** Present selection-only chrome; consumers handle the chosen selector without mutating a session. */
|
|
61
|
+
selectOnly?: boolean;
|
|
60
62
|
}
|
|
61
63
|
/** Rows the browser renders around its list window (search + blank, blank + two detail rows). */
|
|
62
64
|
export declare const BROWSER_FRAME_ROWS = 5;
|
|
@@ -41,6 +41,11 @@ export declare class PauseScreenComponent implements Component, OverlayFocusOwne
|
|
|
41
41
|
readonly anchor: "center";
|
|
42
42
|
readonly head: "Paused";
|
|
43
43
|
};
|
|
44
|
+
/**
|
|
45
|
+
* The sheet: a hero (the pause glyph beside the live hold clock and the
|
|
46
|
+
* session it holds), what the hold means as four facts, and a footer that
|
|
47
|
+
* reassures and resumes. The resume keys live in the button's tooltip.
|
|
48
|
+
*/
|
|
44
49
|
describe(): NativeNode;
|
|
45
50
|
/** Resume runs what Esc/Enter/Space run. */
|
|
46
51
|
handleNativeEvent(event: NativeUiEvent): void;
|
|
@@ -86,6 +86,10 @@ export declare class PlanReviewOverlay implements Component {
|
|
|
86
86
|
* reset scroll/focus so the operator starts at the top. Does not emit
|
|
87
87
|
* `onPlanEdited` (the editor round-trip already persisted the file). */
|
|
88
88
|
setPlanContent(planContent: string): void;
|
|
89
|
+
/** Synchronize an external tier pick with the displayed slider before committing. */
|
|
90
|
+
setSliderIndex(index: number): void;
|
|
91
|
+
/** Commit an external answer through the same input-locking path as Enter; false when nothing was committed. */
|
|
92
|
+
selectOption(label: string): boolean;
|
|
89
93
|
handleInput(keyData: string): void;
|
|
90
94
|
/** The native sheet: large glass, titled by the plan's own title heading (the body never repeats it). */
|
|
91
95
|
get nativeOverlay(): NonNullable<Component["nativeOverlay"]>;
|
|
@@ -55,7 +55,11 @@ export declare class ReportPanel extends OverlayPanel {
|
|
|
55
55
|
render(width: number): readonly string[];
|
|
56
56
|
/** Text mode: rows the whole box takes at `width` when nothing caps it. */
|
|
57
57
|
heightAt(width: number): number;
|
|
58
|
-
/**
|
|
58
|
+
/**
|
|
59
|
+
* The sheet body (the overlay is the frame, and its body the scroller): the
|
|
60
|
+
* report as `zeta.report.body`, which the terminal sets on the reading
|
|
61
|
+
* measure, then Close (Esc) as the sheet's footer.
|
|
62
|
+
*/
|
|
59
63
|
describe(): NativeNode;
|
|
60
64
|
invalidate(): void;
|
|
61
65
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { UsageResetCreditDetail } from "@linxiraos/pi-ai";
|
|
2
2
|
import { OverlayPanel } from "../chrome/overlay-box.js";
|
|
3
|
-
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
4
4
|
/** One account row with its redeemable rate-limit reset credits. */
|
|
5
5
|
export interface ResetUsageAccount {
|
|
6
6
|
label: string;
|
|
@@ -33,11 +33,13 @@ export declare class ResetUsageSelectorComponent extends OverlayPanel {
|
|
|
33
33
|
#private;
|
|
34
34
|
constructor(accounts: ResetUsageAccount[], onSelect: (account: ResetUsageAccount) => void, onCancel: () => void);
|
|
35
35
|
handleInput(keyData: string): void;
|
|
36
|
-
describe(): NativeNode;
|
|
36
|
+
describe(cx: DescribeContext): NativeNode;
|
|
37
37
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
38
|
+
* Picker: a row click selects, a double-click or `Spend reset` presses
|
|
39
|
+
* Enter (so spending still takes a second activation, on the confirm
|
|
40
|
+
* strip), the strip's `Keep` drops the confirmation and `Close` cancels.
|
|
41
|
+
* Card list: a click (or double-click) on an account highlights it and
|
|
42
|
+
* presses Enter.
|
|
41
43
|
*/
|
|
42
44
|
handleNativeEvent(event: NativeUiEvent): void;
|
|
43
45
|
}
|