@linxiraos/pi-tui 1.2.1 → 1.3.1
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 +245 -224
- 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/status-notice.d.ts +2 -0
- 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 +23 -20
- 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 +26 -6
- 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/web-search-types.d.ts +1 -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/charts/table-data.ts +17 -6
- 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/status-notice.ts +5 -0
- 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 +482 -12
- 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/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/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 -1
- package/src/prompt/composer.ts +200 -74
- 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 +97 -45
- 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 +22 -8
- package/src/status-line/component.ts +79 -11
- 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 +300 -62
- 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 +190 -63
- 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-types.d.ts +1 -0
- package/src/tools/web-search-types.ts +1 -0
- 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 +160 -43
- 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
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Status line for the speculative first frame, before any session exists.
|
|
3
3
|
*
|
|
4
|
-
* InteractiveMode persists {@link StatusLineStartupData} (settings plus the
|
|
5
|
-
*
|
|
6
|
-
* real {@link StatusLineComponent} as a fresh, unnamed session at
|
|
7
|
-
* terminal width. Path and git branch are read live; context usage is
|
|
8
|
-
* unknown so the gauge shows the window without a percent.
|
|
4
|
+
* InteractiveMode persists {@link StatusLineStartupData} (settings plus the
|
|
5
|
+
* resolved default role model and status inputs); the next launch renders it
|
|
6
|
+
* through the real {@link StatusLineComponent} as a fresh, unnamed session at
|
|
7
|
+
* the live terminal width. Path and git branch are read live; context usage is
|
|
8
|
+
* reported unknown so the gauge shows the window without a percent.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* ```ts ignore
|
|
@@ -22,7 +22,7 @@ import type { StatusLineSettings } from "./types.js";
|
|
|
22
22
|
export interface StatusLineStartupData {
|
|
23
23
|
readonly settings: StatusLineSettings;
|
|
24
24
|
readonly gitEnabled: boolean;
|
|
25
|
-
/** Model
|
|
25
|
+
/** Model resolved for the next fresh session's default role. */
|
|
26
26
|
readonly model?: Model;
|
|
27
27
|
readonly thinkingLevel?: ThinkingLevel;
|
|
28
28
|
readonly autoThinking: boolean;
|
|
@@ -61,6 +61,13 @@ export type StdinBufferEventMap = {
|
|
|
61
61
|
export declare class StdinBuffer extends EventEmitter<StdinBufferEventMap> {
|
|
62
62
|
#private;
|
|
63
63
|
constructor(options?: StdinBufferOptions);
|
|
64
|
+
/**
|
|
65
|
+
* Whether a bracketed paste has started and its end marker has not arrived.
|
|
66
|
+
* Terminal skips its per-read DEC 2004 reassertion meanwhile: the host is
|
|
67
|
+
* evidently in bracketed-paste mode, and a paste delivered one key record
|
|
68
|
+
* per read would otherwise cost one terminal write per pasted key (#15757).
|
|
69
|
+
*/
|
|
70
|
+
get pasting(): boolean;
|
|
64
71
|
process(data: string | Buffer): void;
|
|
65
72
|
/**
|
|
66
73
|
* Gate unbracketed raw-paste classification on event-loop responsiveness.
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { HangulCompatibilityJamoWidth } from "./utils.js";
|
|
2
2
|
export * from "./terminal-multiplexer.js";
|
|
3
3
|
export { wrapTmuxPassthrough } from "./tmux.js";
|
|
4
|
+
/**
|
|
5
|
+
* Trusted terminal background when reported; otherwise black for detected dark
|
|
6
|
+
* appearance or white for detected light appearance, using theme auto-detection.
|
|
7
|
+
*/
|
|
8
|
+
export declare function getTerminalBackgroundColor(): number;
|
|
9
|
+
/** Store an OSC 11 background, or reset to appearance detection (also for tests). */
|
|
10
|
+
export declare function setTerminalBackgroundColor(color: number | undefined): void;
|
|
4
11
|
export declare enum ImageProtocol {
|
|
5
12
|
Kitty = "\u001B_G",
|
|
6
13
|
Iterm2 = "\u001B]1337;File=",
|
|
@@ -339,6 +346,14 @@ export interface ParsedKittyPlacementLine {
|
|
|
339
346
|
* callers fall back to writing the line verbatim.
|
|
340
347
|
*/
|
|
341
348
|
export declare function parseKittyDirectPlacementLine(line: string): ParsedKittyPlacementLine | null;
|
|
349
|
+
/**
|
|
350
|
+
* Rows above its own line that an {@link Image} direct-placement line paints
|
|
351
|
+
* over: the `CUU(rows-1)` of its lead-in, or 0 for any other line. The renderer
|
|
352
|
+
* erases those rows before a SIXEL/iTerm2 block is written again, because
|
|
353
|
+
* those protocols have no delete command and the block's reserved rows are
|
|
354
|
+
* byte-identical between frames, so the diff never rewrites them.
|
|
355
|
+
*/
|
|
356
|
+
export declare function directPlacementLift(line: string): number;
|
|
342
357
|
/**
|
|
343
358
|
* Rebuild an {@link Image} direct-placement line for the viewport row it is
|
|
344
359
|
* written at. The component-rendered line encodes `CUU(rows-1)`, which clamps
|
|
@@ -397,7 +412,7 @@ export declare function getImageDimensions(base64Data: string, mimeType: string)
|
|
|
397
412
|
* thread; `null` when the encode fails. For output that cannot wait for an
|
|
398
413
|
* off-thread encode.
|
|
399
414
|
*/
|
|
400
|
-
export declare function encodeSixelNow(base64Data: string, widthPx: number, heightPx: number): string | null;
|
|
415
|
+
export declare function encodeSixelNow(base64Data: string, widthPx: number, heightPx: number, backgroundRgb?: number): string | null;
|
|
401
416
|
export declare function renderImage(base64Data: string, imageDimensions: ImageDimensions, options?: ImageRenderOptions): {
|
|
402
417
|
sequence?: string;
|
|
403
418
|
lines?: string[];
|
|
@@ -38,6 +38,7 @@ declare const registry: readonly [{
|
|
|
38
38
|
readonly passthrough: typeof import("./tmux.js").wrapTmuxPassthrough;
|
|
39
39
|
readonly settleMs: 100;
|
|
40
40
|
};
|
|
41
|
+
readonly gatesBracketedPaste: true;
|
|
41
42
|
readonly expandsRepPadding: true;
|
|
42
43
|
readonly expiresSynchronizedOutput: true;
|
|
43
44
|
readonly altRestoreEndsSynchronizedOutput: true;
|
|
@@ -100,6 +101,12 @@ export declare function hasTerminalMultiplexerSession(multiplexer: TerminalMulti
|
|
|
100
101
|
* order. Nested sessions all appear; TERM is not consulted.
|
|
101
102
|
*/
|
|
102
103
|
export declare function terminalMultiplexerSessions(env?: NodeJS.ProcessEnv): TerminalMultiplexerModule<TerminalMultiplexer>[];
|
|
104
|
+
/**
|
|
105
|
+
* Whether OSC 11 background replies are trusted on this platform. Any active
|
|
106
|
+
* session with `backgroundQueryBrokenOn` matching the platform makes the entire
|
|
107
|
+
* path untrusted; TERM-only classification does not identify an active session.
|
|
108
|
+
*/
|
|
109
|
+
export declare function isTerminalBackgroundQueryTrusted(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform): boolean;
|
|
103
110
|
/**
|
|
104
111
|
* The multiplexer TERM names, whether or not its session markers survived.
|
|
105
112
|
* This is classification's TERM fallback; session markers are not consulted.
|
package/dist/types/terminal.d.ts
CHANGED
|
@@ -117,7 +117,7 @@ export type GlyphProtocolReportHandler = (supported: boolean) => void;
|
|
|
117
117
|
/**
|
|
118
118
|
* Outcome of the Tern Surface Protocol `hello` probe: the terminal's reply,
|
|
119
119
|
* or null when it answered the DA1 sentinel first (no TSP) or the probe was
|
|
120
|
-
* skipped (`PI_TUI_NATIVE=0`, multiplexers).
|
|
120
|
+
* skipped (`PI_TUI_NATIVE=0`, multiplexers, devenv's reloading shell).
|
|
121
121
|
*/
|
|
122
122
|
export type TspHelloHandler = (hello: TspHello | null) => void;
|
|
123
123
|
/**
|
|
@@ -181,6 +181,7 @@ export interface Terminal {
|
|
|
181
181
|
get kittyEnableSequence(): string | null;
|
|
182
182
|
readonly keyboardEnhancementEnterSequence?: string | null;
|
|
183
183
|
readonly keyboardEnhancementExitSequence?: string | null;
|
|
184
|
+
readonly keyboardEnhancementRestoreSequence?: string | null;
|
|
184
185
|
moveBy(lines: number): void;
|
|
185
186
|
hideCursor(force?: boolean): void;
|
|
186
187
|
showCursor(force?: boolean): void;
|
|
@@ -283,9 +284,11 @@ export interface ProcessTerminalOptions {
|
|
|
283
284
|
conpty?: boolean;
|
|
284
285
|
/**
|
|
285
286
|
* Whether stdin is a native Windows console handle (win32, not WSL), whose
|
|
286
|
-
* console host
|
|
287
|
-
*
|
|
288
|
-
*
|
|
287
|
+
* console host is certain to answer `CSI ? 9001 h` with win32-input-mode key
|
|
288
|
+
* records. When false (WSL), the keyboard fallback requests modifyOtherKeys
|
|
289
|
+
* alongside win32-input-mode, since a WSL pty may not be relayed by a console
|
|
290
|
+
* host. Defaults to `process.platform === "win32"`; only consulted when
|
|
291
|
+
* `conpty` is also true.
|
|
289
292
|
*/
|
|
290
293
|
nativeWindowsConsole?: boolean;
|
|
291
294
|
}
|
|
@@ -298,6 +301,7 @@ export declare class ProcessTerminal implements Terminal {
|
|
|
298
301
|
get kittyProtocolActive(): boolean;
|
|
299
302
|
get kittyEnableSequence(): string | null;
|
|
300
303
|
get keyboardEnhancementEnterSequence(): string | null;
|
|
304
|
+
get keyboardEnhancementRestoreSequence(): string | null;
|
|
301
305
|
get keyboardEnhancementExitSequence(): string | null;
|
|
302
306
|
get appearance(): TerminalAppearance | undefined;
|
|
303
307
|
onAppearanceChange(callback: (appearance: TerminalAppearance, requestToken?: TerminalAppearanceRequestToken) => void): void;
|
|
@@ -9,7 +9,7 @@ export type SymbolMap = Record<SymbolKey, string>;
|
|
|
9
9
|
* resolves through `Theme.cmd` to either a dedicated `cmd.*` symbol or an
|
|
10
10
|
* existing `icon.*` symbol shared with the rest of the UI.
|
|
11
11
|
*/
|
|
12
|
-
export type SlashCommandIconName = "action" | "prompt" | "extension" | "settings" | "gear" | "shield" | "wave" | "compass" | "inbox" | "swap" | "expand" | "computer" | "eye" | "todo" | "stats" | "news" | "keyboard" | "export" | "clipboard" | "share" | "broadcast" | "globe" | "copy" | "plus" | "restart" | "eraser" | "trash" | "compress" | "vibrate" | "handoff" | "history" | "question" | "rocket" | "stethoscope" | "redo" | "bug" | "memory" | "pencil" | "folderMove" | "folderPlus" | "folderMinus" | "hammer" | "power" | "cart" | "model" | "plan" | "prewalk" | "goal" | "pause" | "loop" | "session" | "jobs" | "gauge" | "context" | "agents" | "branch" | "tree" | "signIn" | "signOut" | "advisor" | "host" | "package" | "fast" | "voice" | "tools" | "rule" | "skill" | "mcp" | "pin";
|
|
12
|
+
export type SlashCommandIconName = "action" | "prompt" | "extension" | "settings" | "gear" | "shield" | "wave" | "compass" | "inbox" | "swap" | "expand" | "computer" | "eye" | "todo" | "stats" | "news" | "keyboard" | "export" | "clipboard" | "share" | "broadcast" | "globe" | "copy" | "plus" | "restart" | "eraser" | "trash" | "compress" | "vibrate" | "handoff" | "history" | "question" | "rocket" | "stethoscope" | "redo" | "bug" | "memory" | "pencil" | "folderMove" | "folderPlus" | "folderMinus" | "hammer" | "power" | "cart" | "model" | "plan" | "prewalk" | "goal" | "pause" | "loop" | "session" | "jobs" | "gauge" | "context" | "ghost" | "agents" | "branch" | "tree" | "signIn" | "signOut" | "advisor" | "host" | "package" | "fast" | "voice" | "tools" | "rule" | "skill" | "mcp" | "pin";
|
|
13
13
|
export declare const SYMBOL_PRESETS: Record<SymbolPreset, SymbolMap>;
|
|
14
14
|
export type SpinnerType = "status" | "activity";
|
|
15
15
|
export declare const SPINNER_FRAMES: Record<SymbolPreset, Record<SpinnerType, string[]>>;
|
|
@@ -7,6 +7,17 @@ export { isValidThemeColor, type ThemeBg, type ThemeColor } from "./schema.js";
|
|
|
7
7
|
export { getAvailableSymbolPresets, isValidSymbolPreset, type SpinnerType, type SymbolKey, type SymbolPreset, } from "./symbols.js";
|
|
8
8
|
export { Theme } from "./theme-class.js";
|
|
9
9
|
export { createHighlightStream, getEditorTheme, getMarkdownTheme, getMarkdownThemeWithLinkTargets, getSelectListTheme, getSettingsListTheme, getSymbolTheme, highlightCode, setMarkdownMermaidRendering, warmHighlighter, } from "./tui-adapters.js";
|
|
10
|
+
/**
|
|
11
|
+
* Subscribe to native fallback appearance changes independently of theme changes.
|
|
12
|
+
* Consumers must re-check the effective background: COLORFGBG can override it.
|
|
13
|
+
*/
|
|
14
|
+
export declare function onTerminalBackgroundFallbackChange(callback: () => void): () => void;
|
|
15
|
+
/**
|
|
16
|
+
* Detect appearance from trusted OSC 11 reports, then COLORFGBG, then native
|
|
17
|
+
* macOS appearance only on known-broken multiplexer background-query paths.
|
|
18
|
+
* Defaults to dark when none of those signals is available.
|
|
19
|
+
*/
|
|
20
|
+
export declare function detectTerminalBackground(): "dark" | "light";
|
|
10
21
|
/** Active theme; imports remain live across initialization, previews, and theme switches. */
|
|
11
22
|
export declare var theme: Theme;
|
|
12
23
|
type ThemeBinding = (value: Theme) => void;
|
package/dist/types/thinking.d.ts
CHANGED
|
@@ -37,6 +37,11 @@ export declare function shouldDisableReasoning(level: ThinkingLevel | undefined)
|
|
|
37
37
|
* Resolves a selector against the current model while preserving explicit "off".
|
|
38
38
|
*/
|
|
39
39
|
export declare function resolveThinkingLevelForModel(model: Model | undefined, level: ThinkingLevel | undefined): ResolvedThinkingLevel | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Level applied to `model` when the user has not picked one for it (carried,
|
|
42
|
+
* global default, auto). Unverified thinking stays unset until the user picks.
|
|
43
|
+
*/
|
|
44
|
+
export declare function automaticThinkingLevel<T>(model: Model | undefined, fallback: T): T | undefined;
|
|
40
45
|
/**
|
|
41
46
|
* Sentinel selector for the coding-agent "auto" thinking mode. Kept entirely
|
|
42
47
|
* inside the coding-agent layer: it is never an {@link Effort} or
|
package/dist/types/tmux.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
1
|
export { wrapTmuxPassthrough } from "./multiplexers/tmux.js";
|
|
2
2
|
/** Pass a control sequence through tmux, leaving direct-terminal output unchanged. */
|
|
3
3
|
export declare function wrapTmuxPassthroughIfNeeded(payload: string, env?: NodeJS.ProcessEnv): string;
|
|
4
|
+
/**
|
|
5
|
+
* Emulator name candidates from a `#{client_termtype}<TAB>#{client_termname}`
|
|
6
|
+
* line, best first: the terminal-type reply (tmux 3.4+, XTVERSION), then the
|
|
7
|
+
* emulator the client's `TERM` names when it ships its own terminfo entry. Both
|
|
8
|
+
* are kept because the reply can name an unrecognized program (a nested tmux
|
|
9
|
+
* answers `tmux 3.4`) while `TERM` still identifies the emulator.
|
|
10
|
+
*/
|
|
11
|
+
export declare function tmuxClientProgramsFromReport(report: string): string[];
|
|
4
12
|
/**
|
|
5
13
|
* Whether the terminal hosting this tmux session draws TSP programs natively:
|
|
6
14
|
* it sets the session user option `@tern-tsp` while it watches the session.
|
|
@@ -12,10 +20,37 @@ export declare function tmuxSessionSpeaksTsp(env?: NodeJS.ProcessEnv): boolean;
|
|
|
12
20
|
*/
|
|
13
21
|
export declare function setTmuxPaneApcTitles(on: boolean, env?: NodeJS.ProcessEnv): void;
|
|
14
22
|
/**
|
|
15
|
-
* Resolve the terminal emulator
|
|
23
|
+
* Resolve the terminal emulator names recorded for this tmux client, best first.
|
|
16
24
|
*
|
|
17
25
|
* tmux overwrites pane identity variables with its own values, but retains the
|
|
18
|
-
* attached client's terminal-type reply in `#{client_termtype}
|
|
19
|
-
*
|
|
26
|
+
* attached client's terminal-type reply in `#{client_termtype}` and its `TERM`
|
|
27
|
+
* in `#{client_termname}` (see {@link tmuxClientProgramsFromReport}). The local
|
|
28
|
+
* IPC query runs once per process and degrades to `[]` when unavailable.
|
|
29
|
+
*/
|
|
30
|
+
export declare function resolveTmuxClientTerminalNames(env?: NodeJS.ProcessEnv): readonly string[];
|
|
31
|
+
/**
|
|
32
|
+
* Whether tmux draws SIXEL to the client attached to this session: its
|
|
33
|
+
* effective terminal description for that client carries `Sxl`.
|
|
34
|
+
*
|
|
35
|
+
* A tmux built with SIXEL answers every pane's DA1 with attribute 4 and draws a
|
|
36
|
+
* `SIXEL IMAGE (WxH)` text placeholder for clients without SIXEL, so the pane's
|
|
37
|
+
* DA1 says nothing about the outer terminal. tmux itself renders SIXEL only
|
|
38
|
+
* when the client's terminal has `Sxl`, whether from terminfo,
|
|
39
|
+
* `terminal-overrides`, or the `sixel` feature (DA1 or `terminal-features`),
|
|
40
|
+
* and `show-messages -T` reports that merged description. The TUI consults
|
|
41
|
+
* this before trusting the pane's DA1 attribute. Queried once per tmux
|
|
42
|
+
* session; `false` outside tmux, with no attached client, or when the query
|
|
43
|
+
* fails. Nested tmux usually reports no `Sxl`: the inner client's terminal is
|
|
44
|
+
* the outer tmux, whose DA1 starts with level 1, which tmux does not parse
|
|
45
|
+
* for features.
|
|
46
|
+
*/
|
|
47
|
+
export declare function tmuxClientRendersSixel(env?: NodeJS.ProcessEnv): boolean;
|
|
48
|
+
/**
|
|
49
|
+
* Whether tmux forwards this pane's `\x1bPtmux;…\x1b\\` passthrough envelopes
|
|
50
|
+
* to the attached client. tmux 3.3+ defaults `allow-passthrough` to `off` and
|
|
51
|
+
* then silently drops every wrapped sequence, so Kitty graphics sent through
|
|
52
|
+
* the envelope never reach a Kitty-capable outer terminal. Resolves the
|
|
53
|
+
* effective pane value (pane → window → global). Queried once per pane;
|
|
54
|
+
* `false` outside tmux or when the query fails.
|
|
20
55
|
*/
|
|
21
|
-
export declare function
|
|
56
|
+
export declare function tmuxPaneAllowsPassthrough(env?: NodeJS.ProcessEnv): boolean;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Component } from "../tui.js";
|
|
2
2
|
import type { Theme } from "../theme/theme.js";
|
|
3
3
|
import type { OutputMeta } from "./output-meta.js";
|
|
4
|
-
import type { NativeToolView, RenderResultOptions } from "./renderer.js";
|
|
4
|
+
import type { NativeToolView, RenderResultContextOptions, RenderResultOptions } from "./renderer.js";
|
|
5
5
|
/** Display metadata returned by ast-edit. */
|
|
6
6
|
export interface AstEditToolDetails {
|
|
7
7
|
totalReplacements: number;
|
|
@@ -47,7 +47,7 @@ export declare const astEditToolRenderer: {
|
|
|
47
47
|
}>;
|
|
48
48
|
details?: AstEditToolDetails;
|
|
49
49
|
isError?: boolean;
|
|
50
|
-
}, options:
|
|
50
|
+
}, options: RenderResultContextOptions, uiTheme: Theme, args?: AstEditRenderArgs): Component;
|
|
51
51
|
describeCall(args: AstEditRenderArgs): NativeToolView;
|
|
52
52
|
describeResult(result: {
|
|
53
53
|
content: Array<{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Component } from "../tui.js";
|
|
2
2
|
import type { Theme } from "../theme/theme.js";
|
|
3
3
|
import type { OutputMeta } from "./output-meta.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { NativeToolView, RenderResultContextOptions, RenderResultOptions } from "./renderer.js";
|
|
5
5
|
/** Display metadata returned by ast-grep. */
|
|
6
6
|
export interface AstGrepToolDetails {
|
|
7
7
|
matchCount: number;
|
|
@@ -46,7 +46,7 @@ export declare const astGrepToolRenderer: {
|
|
|
46
46
|
}>;
|
|
47
47
|
details?: AstGrepToolDetails;
|
|
48
48
|
isError?: boolean;
|
|
49
|
-
}, options:
|
|
49
|
+
}, options: RenderResultContextOptions, uiTheme: Theme, args?: AstGrepRenderArgs): Component;
|
|
50
50
|
describeCall(args: AstGrepRenderArgs): NativeToolView;
|
|
51
51
|
describeResult(result: {
|
|
52
52
|
content: Array<{
|
|
@@ -18,6 +18,8 @@ export interface BashToolDetails {
|
|
|
18
18
|
requestedTimeoutSeconds?: number;
|
|
19
19
|
timeoutDisabled?: boolean;
|
|
20
20
|
wallTimeMs?: number;
|
|
21
|
+
/** False when no wall-time footer was emitted; absent on older results. */
|
|
22
|
+
wallTimeNoticeEmitted?: boolean;
|
|
21
23
|
/** Exit code of a command that ran to completion but failed (non-zero). */
|
|
22
24
|
exitCode?: number;
|
|
23
25
|
/** True when the command was killed by its timeout deadline (not a failure). */
|
|
@@ -31,12 +33,15 @@ export interface BashToolDetails {
|
|
|
31
33
|
timedOut: boolean;
|
|
32
34
|
pid?: number;
|
|
33
35
|
};
|
|
36
|
+
/** Background job behind the call; `cancelled`: killed (`proc://<id>/kill`) before it finished. */
|
|
34
37
|
async?: {
|
|
35
|
-
state: "running" | "completed" | "failed";
|
|
38
|
+
state: "running" | "completed" | "failed" | "cancelled";
|
|
36
39
|
jobId: string;
|
|
37
40
|
type: "bash";
|
|
38
41
|
};
|
|
39
42
|
}
|
|
43
|
+
/** Minimum duration for a model-facing wall-time notice; shorter runs keep timing only in details. */
|
|
44
|
+
export declare const WALL_TIME_NOTICE_MIN_MS = 1000;
|
|
40
45
|
/** Formats the model-facing command duration notice. */
|
|
41
46
|
export declare function formatWallTimeNotice(wallTimeMs: number): string;
|
|
42
47
|
/** Formats the model-facing command exit status notice. */
|
|
@@ -133,6 +133,8 @@ export interface EditRenderContext {
|
|
|
133
133
|
renderDiff?: (diffText: string, options?: {
|
|
134
134
|
filePath?: string;
|
|
135
135
|
}) => string;
|
|
136
|
+
/** Unsanitized result metadata, used only for filesystem link targets. */
|
|
137
|
+
rawDetails?: unknown;
|
|
136
138
|
}
|
|
137
139
|
/** Render replacement text until a computed diff preview is available. */
|
|
138
140
|
export declare function renderStreamingFallback(editMode: EditMode, args: unknown, theme: Theme): string;
|
|
@@ -13,25 +13,60 @@ export interface EvalStatusEvent {
|
|
|
13
13
|
resolvedThinkingLevel?: ConfiguredThinkingLevel;
|
|
14
14
|
[key: string]: unknown;
|
|
15
15
|
}
|
|
16
|
+
/** One column of a table view. */
|
|
17
|
+
export interface EvalTableColumn {
|
|
18
|
+
head: string;
|
|
19
|
+
/** Numeric values: renderers right-align the column. */
|
|
20
|
+
numeric?: boolean;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A pretty rendering of something a cell printed, shown to the user in place
|
|
24
|
+
* of its text; the model only ever sees the text.
|
|
25
|
+
* - `table`: a data frame or `console.table`; leading index columns are plain
|
|
26
|
+
* columns, and a truncated frame's elided rows/columns are `…` cells.
|
|
27
|
+
* - `json`: a structured value (dict/list, object/array) as a collapsible tree.
|
|
28
|
+
* - `markdown`: an object's Markdown representation.
|
|
29
|
+
*/
|
|
30
|
+
export type EvalView = {
|
|
31
|
+
kind: "table";
|
|
32
|
+
columns: EvalTableColumn[];
|
|
33
|
+
rows: string[][];
|
|
34
|
+
} | {
|
|
35
|
+
kind: "json";
|
|
36
|
+
value: unknown;
|
|
37
|
+
} | {
|
|
38
|
+
kind: "markdown";
|
|
39
|
+
text: string;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* A view and the exact printed text it stands for. Renderers locate `text` in
|
|
43
|
+
* the cell's `output` (entries in print order) and show the view there; an
|
|
44
|
+
* entry whose text is no longer in the output (truncated) is skipped.
|
|
45
|
+
*/
|
|
46
|
+
export interface EvalViewEntry {
|
|
47
|
+
text: string;
|
|
48
|
+
view: EvalView;
|
|
49
|
+
}
|
|
16
50
|
/** Per-cell execution result for transcript rendering. */
|
|
17
51
|
export interface EvalCellResult {
|
|
18
52
|
index: number;
|
|
19
53
|
title?: string;
|
|
20
54
|
code: string;
|
|
21
55
|
language?: EvalLanguage;
|
|
56
|
+
/** What the model saw: the cell's printed text plus image notes. */
|
|
22
57
|
output: string;
|
|
58
|
+
/** Pretty views of spans of `output`, in print order. */
|
|
59
|
+
views?: EvalViewEntry[];
|
|
23
60
|
status: "pending" | "running" | "complete" | "error";
|
|
24
61
|
durationMs?: number;
|
|
25
62
|
exitCode?: number;
|
|
26
63
|
statusEvents?: EvalStatusEvent[];
|
|
27
64
|
/** Discrete events dropped from the front of `statusEvents` (see {@link recordStatusEvent}). */
|
|
28
65
|
statusEventsElided?: number;
|
|
29
|
-
hasMarkdown?: boolean;
|
|
30
66
|
}
|
|
31
67
|
/** Tool result detail object surfaced to the UI/transcript. */
|
|
32
68
|
export interface EvalToolDetails {
|
|
33
69
|
cells?: EvalCellResult[];
|
|
34
|
-
jsonOutputs?: unknown[];
|
|
35
70
|
images?: ImageContent[];
|
|
36
71
|
statusEvents?: EvalStatusEvent[];
|
|
37
72
|
/** Discrete events dropped from the front of `statusEvents` (see {@link recordStatusEvent}). */
|
|
@@ -44,9 +79,9 @@ export interface EvalToolDetails {
|
|
|
44
79
|
languages?: EvalLanguage[];
|
|
45
80
|
/** Optional human-readable notice (e.g. fallback explanation). */
|
|
46
81
|
notice?: string;
|
|
47
|
-
/** Present when the cell was auto-backgrounded as an async job. */
|
|
82
|
+
/** Present when the cell was auto-backgrounded as an async job; `cancelled`: killed before it finished. */
|
|
48
83
|
async?: {
|
|
49
|
-
state: "running" | "completed" | "failed";
|
|
84
|
+
state: "running" | "completed" | "failed" | "cancelled";
|
|
50
85
|
jobId: string;
|
|
51
86
|
type: "eval";
|
|
52
87
|
};
|
|
@@ -100,6 +135,20 @@ export declare function upsertStatusEvent(events: EvalStatusEvent[], event: Eval
|
|
|
100
135
|
* events behind an "… N earlier" row.
|
|
101
136
|
*/
|
|
102
137
|
export declare function recordStatusEvent(log: StatusEventLog, event: EvalStatusEvent): void;
|
|
138
|
+
/** One ordered piece of a cell's output: printed text, or a view shown in place of the text it matched. */
|
|
139
|
+
export type EvalOutputPart = {
|
|
140
|
+
kind: "text";
|
|
141
|
+
text: string;
|
|
142
|
+
} | {
|
|
143
|
+
kind: "view";
|
|
144
|
+
view: EvalView;
|
|
145
|
+
};
|
|
146
|
+
/**
|
|
147
|
+
* Split `output` around its views, in order: each view's `text` is searched
|
|
148
|
+
* from the end of the previous match, unmatched entries are skipped, and
|
|
149
|
+
* blank text between views is dropped (newlines bordering a view trimmed).
|
|
150
|
+
*/
|
|
151
|
+
export declare function splitEvalOutput(output: string, views: readonly EvalViewEntry[] | undefined): EvalOutputPart[];
|
|
103
152
|
/** Render eval code cells, structured display output, and progress events. */
|
|
104
153
|
export declare const evalToolRenderer: {
|
|
105
154
|
animatedPendingPreview: true;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Theme } from "../theme/theme.js";
|
|
2
2
|
import type { Component } from "../tui.js";
|
|
3
3
|
import type { OutputMeta } from "./output-meta.js";
|
|
4
|
-
import type { NativeToolView, RenderResultOptions } from "./renderer.js";
|
|
4
|
+
import type { NativeToolView, RenderResultContextOptions, RenderResultOptions } from "./renderer.js";
|
|
5
5
|
/** A verified line range with its yes-probability and a one-line preview. */
|
|
6
6
|
export interface FindRange {
|
|
7
7
|
start: number;
|
|
@@ -22,12 +22,21 @@ export interface FindHit {
|
|
|
22
22
|
linesSeen: number;
|
|
23
23
|
truncated: boolean;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* How much of a search the judge actually covered. `unavailable`: every judge
|
|
27
|
+
* request failed, so an empty result is not evidence of absence. `partial`:
|
|
28
|
+
* some requests failed. `complete`: none failed (or none were needed).
|
|
29
|
+
*/
|
|
30
|
+
export type FindCoverage = "complete" | "partial" | "unavailable";
|
|
25
31
|
/** Search accounting reported alongside the hits. */
|
|
26
32
|
export interface FindStats {
|
|
27
33
|
/** Eligible files under the root. */
|
|
28
34
|
listed: number;
|
|
29
35
|
requests: number;
|
|
30
|
-
|
|
36
|
+
/** Judge requests that failed outright; decides {@link FindCoverage}. */
|
|
37
|
+
failed: number;
|
|
38
|
+
/** Questions a successful response left without a usable answer. */
|
|
39
|
+
unanswered: number;
|
|
31
40
|
/** Entries judged by name. */
|
|
32
41
|
judged: number;
|
|
33
42
|
/** Files whose content was read and sent. */
|
|
@@ -51,6 +60,7 @@ export interface FindToolDetails {
|
|
|
51
60
|
/** Verified-passage probability at or above which a file is a hit. */
|
|
52
61
|
threshold: number;
|
|
53
62
|
hits: FindHit[];
|
|
63
|
+
coverage: FindCoverage;
|
|
54
64
|
stats: FindStats;
|
|
55
65
|
elapsedMs: number;
|
|
56
66
|
/** Session cwd; hit paths are relative to it. */
|
|
@@ -74,7 +84,7 @@ export declare const findToolRenderer: {
|
|
|
74
84
|
}>;
|
|
75
85
|
details?: FindToolDetails;
|
|
76
86
|
isError?: boolean;
|
|
77
|
-
}, options:
|
|
87
|
+
}, options: RenderResultContextOptions, uiTheme: Theme, args?: FindRenderArgs): Component;
|
|
78
88
|
describeCall(args: FindRenderArgs): NativeToolView;
|
|
79
89
|
/**
|
|
80
90
|
* Inline (§7.3 find): `Find “query” 2 hits · 8 files`, then per hit its
|
|
@@ -88,7 +98,7 @@ export declare const findToolRenderer: {
|
|
|
88
98
|
}>;
|
|
89
99
|
details?: FindToolDetails;
|
|
90
100
|
isError?: boolean;
|
|
91
|
-
}, options:
|
|
101
|
+
}, options: RenderResultContextOptions, args?: FindRenderArgs): NativeToolView;
|
|
92
102
|
mergeCallAndResult: true;
|
|
93
103
|
animatedPendingPreview: true;
|
|
94
104
|
animatedPartialResult: true;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Component } from "../tui.js";
|
|
2
|
-
import type { NativeToolView, RenderResultOptions } from "./renderer.js";
|
|
2
|
+
import type { NativeToolView, RenderResultContextOptions, RenderResultOptions } from "./renderer.js";
|
|
3
3
|
import { type Theme } from "../theme/theme.js";
|
|
4
4
|
import type { OutputMeta } from "./output-meta.js";
|
|
5
5
|
import type { TruncationResult } from "./streaming-output.js";
|
|
@@ -42,7 +42,7 @@ export declare const globToolRenderer: {
|
|
|
42
42
|
}>;
|
|
43
43
|
details?: GlobToolDetails;
|
|
44
44
|
isError?: boolean;
|
|
45
|
-
}, options:
|
|
45
|
+
}, options: RenderResultContextOptions, uiTheme: Theme, args?: GlobRenderArgs): Component;
|
|
46
46
|
describeCall(args: GlobRenderArgs): NativeToolView;
|
|
47
47
|
/**
|
|
48
48
|
* Inline (§7.3 glob): `Glob “pattern” 5 files`, then the files as rows
|
|
@@ -55,7 +55,7 @@ export declare const globToolRenderer: {
|
|
|
55
55
|
}>;
|
|
56
56
|
details?: GlobToolDetails;
|
|
57
57
|
isError?: boolean;
|
|
58
|
-
},
|
|
58
|
+
}, options: RenderResultContextOptions, args?: GlobRenderArgs): NativeToolView;
|
|
59
59
|
mergeCallAndResult: true;
|
|
60
60
|
};
|
|
61
61
|
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Component } from "../tui.js";
|
|
2
|
-
import type { NativeToolView, RenderResultOptions } from "./renderer.js";
|
|
2
|
+
import type { NativeToolView, RenderResultContextOptions, RenderResultOptions } from "./renderer.js";
|
|
3
3
|
import { type Theme } from "../theme/theme.js";
|
|
4
4
|
import type { OutputMeta } from "./output-meta.js";
|
|
5
5
|
import type { TruncationResult } from "./streaming-output.js";
|
|
@@ -58,7 +58,7 @@ export declare const grepToolRenderer: {
|
|
|
58
58
|
}>;
|
|
59
59
|
details?: GrepToolDetails;
|
|
60
60
|
isError?: boolean;
|
|
61
|
-
}, options:
|
|
61
|
+
}, options: RenderResultContextOptions, uiTheme: Theme, args?: GrepRenderArgs): Component;
|
|
62
62
|
describeCall(args: GrepRenderArgs): NativeToolView;
|
|
63
63
|
/**
|
|
64
64
|
* Inline (§7.3 grep): `Grep “pattern” 5 matches · 2 files in src`, then
|
|
@@ -110,10 +110,13 @@ export interface NumberedLine {
|
|
|
110
110
|
* Numbered `code` for possibly non-contiguous source lines: one block per run
|
|
111
111
|
* of consecutive line numbers (`start` = the run's first line, match lines
|
|
112
112
|
* `mark`ed), with a `…` row wherever the numbers jump or an elision marker
|
|
113
|
-
* (`n: null`) sits.
|
|
113
|
+
* (`n: null`) sits. `path` is the file the lines come from: Tern picks their
|
|
114
|
+
* grammar from it and draws no header (the row or head above names the file).
|
|
115
|
+
* `wrap` soft-wraps long lines instead of scrolling the block sideways.
|
|
114
116
|
*/
|
|
115
117
|
export declare function numberedCode(lines: readonly NumberedLine[], opts?: {
|
|
116
|
-
|
|
118
|
+
path?: string;
|
|
119
|
+
wrap?: boolean;
|
|
117
120
|
}): NativeNode[];
|
|
118
121
|
/**
|
|
119
122
|
* Describe grouped search output (grep / ast-grep / ast-edit display content)
|
|
@@ -121,9 +124,11 @@ export declare function numberedCode(lines: readonly NumberedLine[], opts?: {
|
|
|
121
124
|
* header's suffix or the match count as a chip), then its lines as
|
|
122
125
|
* {@link numberedCode} with match lines marked and `…` between non-adjacent
|
|
123
126
|
* runs. Unnumbered body lines stay plain `code`. `maxFiles` keeps only the
|
|
124
|
-
* first files (the caller says how many were left out).
|
|
127
|
+
* first files (the caller says how many were left out). `file` owns the lines
|
|
128
|
+
* before any header: a single-file search prints none, yet its lines get the
|
|
129
|
+
* same file row as a directory search's.
|
|
125
130
|
*/
|
|
126
131
|
export declare function describeGroupedOutput(lines: readonly string[], options?: {
|
|
127
|
-
lang?: (path: string) => string | undefined;
|
|
128
132
|
maxFiles?: number;
|
|
133
|
+
file?: string;
|
|
129
134
|
}): NativeNode[];
|
|
@@ -85,7 +85,7 @@ export interface RunFootInput {
|
|
|
85
85
|
readonly state: RunState;
|
|
86
86
|
/** Exit code of a `failed` run; a non-zero code names the state `exit N`. */
|
|
87
87
|
readonly exitCode?: number;
|
|
88
|
-
/** Milliseconds run so far (`running`) or in total;
|
|
88
|
+
/** Milliseconds run so far (`running`, a live `background` job) or in total; omitted when undefined. */
|
|
89
89
|
readonly elapsedMs?: number;
|
|
90
90
|
/** Quiet facts (job id, service state, artifact), muted and ` · `-joined. */
|
|
91
91
|
readonly facts?: readonly string[];
|