@linxiraos/pi-tui 1.4.4 → 1.4.6
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 +29 -27
- package/dist/types/app-keybindings.d.ts +5 -0
- package/dist/types/chrome/context-map.d.ts +15 -0
- package/dist/types/chrome/context-presentation.d.ts +48 -0
- package/dist/types/chrome/context-view-model.d.ts +77 -0
- package/dist/types/components/image.d.ts +20 -0
- package/dist/types/components/loader.d.ts +1 -1
- package/dist/types/native/blobs.d.ts +9 -0
- package/dist/types/overlays/advisor-config.d.ts +6 -0
- package/dist/types/overlays/agent-hub-projection.d.ts +3 -1
- package/dist/types/overlays/ask-dialog.d.ts +12 -3
- package/dist/types/overlays/btw-history-panel.d.ts +16 -2
- package/dist/types/overlays/btw-history.d.ts +7 -0
- package/dist/types/overlays/btw-panel.d.ts +2 -0
- package/dist/types/overlays/context-viewer-format.d.ts +42 -0
- package/dist/types/overlays/context-viewer-overview.d.ts +70 -0
- package/dist/types/overlays/context-viewer.d.ts +25 -0
- package/dist/types/overlays/hook-input.d.ts +1 -0
- package/dist/types/overlays/mcp-add-wizard.d.ts +2 -0
- package/dist/types/overlays/pause-screen.d.ts +13 -3
- package/dist/types/overlays/running-subagent-badge.d.ts +7 -1
- package/dist/types/prompt/macos-spelling.d.ts +2 -2
- package/dist/types/render/hyperlink.d.ts +15 -2
- package/dist/types/render/output-pane.d.ts +1 -1
- package/dist/types/render/render-utils.d.ts +7 -1
- package/dist/types/status-line/component.d.ts +2 -2
- package/dist/types/status-line/context-usage.d.ts +15 -30
- package/dist/types/terminal-capabilities.d.ts +7 -0
- package/dist/types/theme/symbols.d.ts +1 -1
- package/dist/types/tools/ask.d.ts +4 -0
- package/dist/types/tools/edit.d.ts +3 -1
- package/dist/types/tools/fetch.d.ts +1 -0
- package/dist/types/tools/github.d.ts +3 -0
- package/dist/types/tools/grouped-file-output.d.ts +2 -0
- package/dist/types/tools/mcp.d.ts +3 -3
- package/dist/types/tools/read.d.ts +3 -0
- package/dist/types/tools/wait.d.ts +16 -2
- package/dist/types/tui.d.ts +2 -0
- package/dist/types/vim.d.ts +39 -0
- package/package.json +9 -9
- package/src/app-keybindings.d.ts +5 -0
- package/src/app-keybindings.ts +5 -0
- package/src/chat/bash-execution.ts +7 -1
- package/src/chat/read-tool-group.ts +1 -2
- package/src/chat/skill-message.ts +2 -6
- package/src/chrome/context-map.ts +62 -0
- package/src/chrome/context-presentation.ts +26 -0
- package/src/chrome/context-view-model.ts +73 -0
- package/src/chrome/transcript-container.ts +89 -59
- package/src/components/editor.ts +455 -13
- package/src/components/image.d.ts +20 -0
- package/src/components/image.ts +83 -18
- package/src/components/loader.d.ts +1 -1
- package/src/components/loader.ts +1 -1
- package/src/components/markdown.ts +109 -7
- package/src/hotkeys-markdown.ts +1 -0
- package/src/native/blobs.d.ts +9 -0
- package/src/native/blobs.ts +3 -2
- package/src/overlays/advisor-config.ts +9 -2
- package/src/overlays/agent-hub-projection.d.ts +3 -1
- package/src/overlays/agent-hub-projection.ts +6 -5
- package/src/overlays/agent-hub.ts +51 -42
- package/src/overlays/ask-dialog.ts +125 -35
- package/src/overlays/btw-history-panel.ts +124 -12
- package/src/overlays/btw-history.ts +11 -0
- package/src/overlays/btw-panel.ts +8 -4
- package/src/overlays/context-viewer-format.ts +145 -0
- package/src/overlays/context-viewer-overview.ts +381 -0
- package/src/overlays/context-viewer.ts +728 -0
- package/src/overlays/hook-input.ts +2 -0
- package/src/overlays/mcp-add-wizard.ts +5 -0
- package/src/overlays/pause-screen.ts +166 -33
- package/src/overlays/running-subagent-badge.ts +12 -1
- package/src/overlays/settings-defs.ts +1 -0
- package/src/overlays/usage-dashboard.ts +15 -2
- package/src/prompt/macos-spelling.ts +24 -15
- package/src/render/hyperlink.d.ts +15 -2
- package/src/render/hyperlink.ts +41 -18
- package/src/render/output-pane.d.ts +1 -1
- package/src/render/output-pane.ts +60 -17
- package/src/render/render-utils.d.ts +7 -1
- package/src/render/render-utils.ts +11 -2
- package/src/setup/scenes/sign-in.ts +6 -0
- package/src/status-line/component.ts +6 -4
- package/src/status-line/context-usage.ts +56 -582
- package/src/terminal-capabilities.d.ts +7 -0
- package/src/terminal-capabilities.ts +10 -0
- package/src/theme/symbols.d.ts +1 -1
- package/src/theme/symbols.ts +16 -0
- package/src/tools/ask.d.ts +4 -0
- package/src/tools/ask.ts +4 -0
- package/src/tools/ast-grep.ts +3 -2
- package/src/tools/bash.ts +5 -23
- package/src/tools/edit.d.ts +3 -1
- package/src/tools/edit.ts +8 -4
- package/src/tools/fetch.d.ts +1 -0
- package/src/tools/fetch.ts +1 -0
- package/src/tools/find.ts +3 -10
- package/src/tools/github.d.ts +3 -0
- package/src/tools/github.ts +23 -3
- package/src/tools/glob.ts +4 -3
- package/src/tools/grep.ts +3 -4
- package/src/tools/grouped-file-output.d.ts +2 -0
- package/src/tools/grouped-file-output.ts +8 -2
- package/src/tools/mcp.d.ts +3 -3
- package/src/tools/mcp.ts +27 -9
- package/src/tools/native-view.ts +2 -2
- package/src/tools/read.d.ts +3 -0
- package/src/tools/read.ts +3 -1
- package/src/tools/vibe.ts +14 -3
- package/src/tools/wait.d.ts +16 -2
- package/src/tools/wait.ts +16 -2
- package/src/tui.d.ts +2 -0
- package/src/tui.ts +59 -19
- package/src/vim.d.ts +39 -0
- package/src/vim.ts +313 -22
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import { type Component, type OverlayFocusOwner, type OverlayHandle, type OverlayOptions } from "../index.js";
|
|
2
2
|
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
|
+
/** Outstanding turn and job counts supplied by the pause-screen host. */
|
|
4
|
+
export interface PauseWorkStatus {
|
|
5
|
+
unsettledTurns: number;
|
|
6
|
+
unfinishedJobs: number;
|
|
7
|
+
}
|
|
8
|
+
/** Optional live work source for the pause overlay. */
|
|
9
|
+
export interface PauseScreenOptions {
|
|
10
|
+
getWorkStatus?: () => PauseWorkStatus;
|
|
11
|
+
}
|
|
3
12
|
/**
|
|
4
13
|
* Slice of `InteractiveModeContext` the pause screen drives. Narrow so tests
|
|
5
14
|
* can exercise the full engage → hold → release lifecycle without a real TUI.
|
|
@@ -22,12 +31,13 @@ export interface PauseScreenHost {
|
|
|
22
31
|
* Paint the pause scene as exactly `height` rows, vertically centered.
|
|
23
32
|
* Exported for tests.
|
|
24
33
|
*/
|
|
25
|
-
export declare function renderPauseScreen(width: number, height: number, elapsedMs: number, sessionName?: string): string[];
|
|
34
|
+
export declare function renderPauseScreen(width: number, height: number, elapsedMs: number, sessionName?: string, workStatus?: PauseWorkStatus): string[];
|
|
26
35
|
/** Fullscreen overlay component; resolves {@link run} when a resume key lands. */
|
|
27
36
|
export declare class PauseScreenComponent implements Component, OverlayFocusOwner {
|
|
28
37
|
#private;
|
|
29
38
|
readonly host: PauseScreenHost;
|
|
30
|
-
|
|
39
|
+
readonly options: PauseScreenOptions;
|
|
40
|
+
constructor(host: PauseScreenHost, options?: PauseScreenOptions);
|
|
31
41
|
/** Start the clock; resolves once the user asks to resume. */
|
|
32
42
|
run(): Promise<void>;
|
|
33
43
|
dispose(): void;
|
|
@@ -57,4 +67,4 @@ export declare class PauseScreenComponent implements Component, OverlayFocusOwne
|
|
|
57
67
|
* gate on the way out (including teardown throws) — a leaked pause would
|
|
58
68
|
* freeze every agent in the process with no UI left to release it.
|
|
59
69
|
*/
|
|
60
|
-
export declare function runPauseScreen(host: PauseScreenHost): Promise<void>;
|
|
70
|
+
export declare function runPauseScreen(host: PauseScreenHost, options?: PauseScreenOptions): Promise<void>;
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AgentHubRegistry } from "./agent-hub-types.js";
|
|
2
2
|
export interface RunningSubagentRegistrySource<T extends AgentHubRegistry = AgentHubRegistry> {
|
|
3
3
|
agentRegistry: T;
|
|
4
4
|
}
|
|
5
5
|
export declare function getRunningSubagentBadgeRegistry<T extends AgentHubRegistry>(collabGuest: RunningSubagentRegistrySource<T> | undefined, localRegistry: T): T;
|
|
6
6
|
export declare function getRunningSubagentBadgeAgentIds(registry: AgentHubRegistry): string[];
|
|
7
|
+
/**
|
|
8
|
+
* Agents the Agent Hub roster can show (every registry ref but the main
|
|
9
|
+
* session), whatever their status: finished, parked and killed subagents
|
|
10
|
+
* stay inspectable after the last one stops running.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getInspectableSubagentCount(registry: AgentHubRegistry): number;
|
|
@@ -31,8 +31,8 @@ export declare class MacOSSpellingProvider implements EditorTextAssistProvider {
|
|
|
31
31
|
/**
|
|
32
32
|
* Misspelled prose ranges in `text` (offsets into it), in order and
|
|
33
33
|
* non-overlapping, except ones touching `context.typing` (the word still
|
|
34
|
-
* being typed).
|
|
35
|
-
*
|
|
34
|
+
* being typed). Checks the full logical line so rendering cuts cannot
|
|
35
|
+
* change spelling or prose boundaries. Uncached lines arrive through {@link onUpdate}.
|
|
36
36
|
*/
|
|
37
37
|
typoRanges(text: string, context: SpellingDecorationContext): readonly native.SpellingRange[];
|
|
38
38
|
/** Return the confident macOS correction after a completed prose word. */
|
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
import type { TspSpan } from "@linxiraos/pi-wire";
|
|
2
2
|
import { type TerminalId } from "../terminal-capabilities.js";
|
|
3
|
+
/**
|
|
4
|
+
* A `file:` URL for `filePath`, or `undefined` when Node cannot encode it.
|
|
5
|
+
*
|
|
6
|
+
* Node rejects a malformed UNC target (a UNC path escaped twice by its author,
|
|
7
|
+
* e.g. `\\\wsl.localhost\…`) with `ERR_INVALID_ARG_VALUE: Empty UNC servername`.
|
|
8
|
+
* A stored session keeps whatever a tool call recorded, so a transcript must
|
|
9
|
+
* render such a path without a link rather than throw while it rebuilds.
|
|
10
|
+
*/
|
|
11
|
+
export declare function tryFileUri(filePath: string): string | undefined;
|
|
3
12
|
/**
|
|
4
13
|
* Build the OSC 8 target for a file path on `terminalId`.
|
|
5
14
|
*
|
|
@@ -15,11 +24,14 @@ import { type TerminalId } from "../terminal-capabilities.js";
|
|
|
15
24
|
* `vscode://file/<path>:<line>:<col>` form. Everywhere else the plain `file:`
|
|
16
25
|
* URI is right, with the location left in the visible text — terminals that
|
|
17
26
|
* parse a `path:line:col` suffix resolve that on their own.
|
|
27
|
+
*
|
|
28
|
+
* Returns `undefined` when `filePath` cannot be encoded — a malformed UNC
|
|
29
|
+
* target on the `file:` branch, or a lone surrogate on the `vscode://` branch.
|
|
18
30
|
*/
|
|
19
31
|
export declare function fileUriForTerminal(filePath: string, opts: {
|
|
20
32
|
line?: number;
|
|
21
33
|
col?: number;
|
|
22
|
-
} | undefined, terminalId: TerminalId): string;
|
|
34
|
+
} | undefined, terminalId: TerminalId): string | undefined;
|
|
23
35
|
/**
|
|
24
36
|
* Returns true when OSC 8 hyperlinks should be emitted.
|
|
25
37
|
*
|
|
@@ -84,7 +96,8 @@ export declare function fileLinkSpan(filePath: string, displayText: string, s?:
|
|
|
84
96
|
* Returns `displayText` unchanged when hyperlinks are disabled or when
|
|
85
97
|
* the text already contains an OSC 8 sequence (prevents double-wrapping).
|
|
86
98
|
* Relative paths resolve against the current working directory before URI
|
|
87
|
-
* encoding so the OSC 8 target is always a valid `file://` URL.
|
|
99
|
+
* encoding so the OSC 8 target is always a valid `file://` URL. A path Node
|
|
100
|
+
* cannot encode renders as `displayText` with no link.
|
|
88
101
|
*
|
|
89
102
|
* @param filePath - Filesystem path
|
|
90
103
|
* @param displayText - Text to render as the hyperlink anchor (may contain ANSI codes)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
2
|
-
import type
|
|
2
|
+
import { type Theme } from "../theme/theme.js";
|
|
3
3
|
import type { Component } from "../tui.js";
|
|
4
4
|
/** Which side of an output stream remains visible when the pane is capped. */
|
|
5
5
|
export type OutputPaneEdge = "head" | "tail";
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* tool renderers to ensure a unified TUI experience.
|
|
6
6
|
*/
|
|
7
7
|
import { ThinkingLevel } from "@linxiraos/pi-agent-core";
|
|
8
|
-
import
|
|
8
|
+
import { Ellipsis } from "@linxiraos/pi-natives";
|
|
9
9
|
import type { Theme } from "../theme/theme.js";
|
|
10
10
|
import type { Component } from "../tui.js";
|
|
11
11
|
export { Ellipsis } from "@linxiraos/pi-natives";
|
|
@@ -284,6 +284,12 @@ export declare function capParseErrors(errors: string[] | undefined, limit?: num
|
|
|
284
284
|
export declare function createCachedComponent(getExpanded: () => boolean, compute: (width: number, expanded: boolean) => string[], options?: {
|
|
285
285
|
paddingX?: number;
|
|
286
286
|
}): Component;
|
|
287
|
+
/**
|
|
288
|
+
* Fit a status header plus body rows to `width` for search-style results. The
|
|
289
|
+
* header soft-wraps so its trailing summary meta (counts, `truncated`) stays
|
|
290
|
+
* visible behind a long pattern; body rows keep single-row truncation.
|
|
291
|
+
*/
|
|
292
|
+
export declare function fitHeaderedRows(header: string, rows: readonly string[], width: number): string[];
|
|
287
293
|
/**
|
|
288
294
|
* Single-slot memo for an expensive rendered string (syntax highlighting, diff
|
|
289
295
|
* coloring) keyed by the exact inputs that shape the bytes: theme instance,
|
|
@@ -32,9 +32,9 @@ export declare class StatusLineComponent<TSession extends StatusLineSession = St
|
|
|
32
32
|
updateSettings(settings: StatusLineSettings): void;
|
|
33
33
|
getEffectiveSettingsForTest(): EffectiveStatusLineSettings;
|
|
34
34
|
setAutoCompactEnabled(enabled: boolean): void;
|
|
35
|
-
setRunningSubagents(agentIds: readonly string[]):
|
|
35
|
+
setRunningSubagents(agentIds: readonly string[]): boolean;
|
|
36
36
|
/** Host-computed spend of the main session's whole subagent tree (Agent Hub projection). */
|
|
37
|
-
setSubagentTreeCost(cost: number):
|
|
37
|
+
setSubagentTreeCost(cost: number): boolean;
|
|
38
38
|
/**
|
|
39
39
|
* Compatibility shim for callers predating the simplified subagent badge.
|
|
40
40
|
* The status line now intentionally shows only the active count.
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { AgentMessage, Tokenizer } from "@linxiraos/pi-agent-core";
|
|
2
2
|
import type { CompactionSettings } from "@linxiraos/pi-agent-core/compaction";
|
|
3
3
|
import type { Tool as AiTool, Model } from "@linxiraos/pi-ai";
|
|
4
|
-
import type { Theme } from "../theme/index.js";
|
|
5
|
-
import { Container } from "../tui.js";
|
|
6
|
-
import type { TspText } from "@linxiraos/pi-wire";
|
|
7
|
-
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
8
4
|
interface ContextSkill {
|
|
9
5
|
readonly name: string;
|
|
10
6
|
readonly description?: string;
|
|
@@ -63,8 +59,6 @@ interface CategoryInfo {
|
|
|
63
59
|
id: CategoryId;
|
|
64
60
|
label: string;
|
|
65
61
|
tokens: number;
|
|
66
|
-
color: "accent" | "warning" | "success" | "userMessageText" | "customMessageLabel";
|
|
67
|
-
glyph: string;
|
|
68
62
|
}
|
|
69
63
|
export interface ContextBreakdown {
|
|
70
64
|
model: Model | undefined;
|
|
@@ -128,6 +122,21 @@ export declare function getToolSchemaMetadataRevision(tools: ToolSchemaSource):
|
|
|
128
122
|
* discovered-agent metadata changes).
|
|
129
123
|
*/
|
|
130
124
|
export declare function invalidateToolSchemaMetadata(tools: ToolSchemaSource): void;
|
|
125
|
+
/** Provider-visible text of one tool definition, in wire order. */
|
|
126
|
+
export interface ToolSchemaFragments {
|
|
127
|
+
/** Name, description, wire schema JSON, then rendered examples; fields that cannot be serialized are omitted. */
|
|
128
|
+
readonly fragments: string[];
|
|
129
|
+
/** `fragments` with the schema JSON indented for reading; present only when a display indent was requested. */
|
|
130
|
+
readonly display?: string[];
|
|
131
|
+
/** Why serialization stopped; the schema or examples after that point are missing from `fragments`. */
|
|
132
|
+
readonly schemaError?: string;
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Provider-visible text of one tool definition. `displayIndent` additionally
|
|
136
|
+
* returns `display`, the same fragments with the schema JSON indented, from
|
|
137
|
+
* the same schema conversion.
|
|
138
|
+
*/
|
|
139
|
+
export declare function toolSchemaFragments(tool: ContextTool, displayIndent?: number): ToolSchemaFragments;
|
|
131
140
|
/**
|
|
132
141
|
* Estimate provider-visible tool-schema tokens.
|
|
133
142
|
*
|
|
@@ -158,28 +167,4 @@ export declare function computeNonMessageBreakdown(session: NonMessageTokenSourc
|
|
|
158
167
|
* session and model.
|
|
159
168
|
*/
|
|
160
169
|
export declare function computeContextBreakdown(session: ContextUsageSession, options: ContextUsageOptions): ContextBreakdown;
|
|
161
|
-
/** The `/context` title: the model once one is selected (the body leads with its window). */
|
|
162
|
-
export declare function contextUsageHead(breakdown: ContextBreakdown): TspText;
|
|
163
|
-
/**
|
|
164
|
-
* Native context-usage panel for terminals without `meter`: the cell grid as
|
|
165
|
-
* unwrapped styled rows beside the legend. The terminal places the legend
|
|
166
|
-
* beside the grid, or below it when narrow.
|
|
167
|
-
*/
|
|
168
|
-
export declare function describeContextUsage(breakdown: ContextBreakdown): NativeNode;
|
|
169
|
-
/**
|
|
170
|
-
* The `/context` report body, without a frame or title of its own (the panel
|
|
171
|
-
* showing it is titled {@link contextUsageHead}): ANSI renders the cell grid
|
|
172
|
-
* beside the legend; natively it is drawn with `meter`s where the terminal has
|
|
173
|
-
* them and as the glyph grid otherwise.
|
|
174
|
-
*/
|
|
175
|
-
export declare class ContextUsageView extends Container {
|
|
176
|
-
#private;
|
|
177
|
-
constructor(breakdown: ContextBreakdown, theme: Theme);
|
|
178
|
-
describe(cx: DescribeContext): NativeNode;
|
|
179
|
-
}
|
|
180
|
-
/**
|
|
181
|
-
* Render a colorful context-usage panel as ANSI text. Output is a series of
|
|
182
|
-
* lines pairing the grid (left) with the legend (right).
|
|
183
|
-
*/
|
|
184
|
-
export declare function renderContextUsage(breakdown: ContextBreakdown, theme: Theme): string;
|
|
185
170
|
export {};
|
|
@@ -354,6 +354,13 @@ export declare function parseKittyDirectPlacementLine(line: string): ParsedKitty
|
|
|
354
354
|
* byte-identical between frames, so the diff never rewrites them.
|
|
355
355
|
*/
|
|
356
356
|
export declare function directPlacementLift(line: string): number;
|
|
357
|
+
/**
|
|
358
|
+
* Re-anchor an {@link Image} direct-placement line `lift` rows above its own
|
|
359
|
+
* row instead of its encoded `CUU(rows-1)`. The renderer lowers the lift when
|
|
360
|
+
* the block's top is clipped by the frame: the cursor-up would otherwise climb
|
|
361
|
+
* past the frame's first row into whatever the terminal shows above it.
|
|
362
|
+
*/
|
|
363
|
+
export declare function withDirectPlacementLift(line: string, lift: number): string;
|
|
357
364
|
/**
|
|
358
365
|
* Rebuild an {@link Image} direct-placement line for the viewport row it is
|
|
359
366
|
* written at. The component-rendered line encodes `CUU(rows-1)`, which clamps
|
|
@@ -2,7 +2,7 @@ export type SymbolPreset = "unicode" | "nerd" | "ascii";
|
|
|
2
2
|
/**
|
|
3
3
|
* All available symbol keys organized by category.
|
|
4
4
|
*/
|
|
5
|
-
export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted" | "status.done" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "progress.filled" | "progress.empty" | "context.speculation" | "context.compaction" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxDotted.horizontal" | "boxDotted.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.powerlineCapLeft" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.prewalk" | "icon.goal" | "icon.pause" | "icon.loop" | "icon.folder" | "icon.worktree" | "icon.search" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.pin" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.subscription" | "icon.advisor" | "icon.advisorClosed" | "icon.time" | "icon.omp" | "icon.ghost" | "icon.agents" | "icon.job" | "icon.cache" | "icon.cacheMiss" | "icon.input" | "icon.output" | "icon.throughput" | "icon.intelligence" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.vimNormal" | "icon.vimInsert" | "icon.vimVisual" | "icon.vimVisualLine" | "icon.vimReplace" | "cmd.action" | "cmd.prompt" | "cmd.extension" | "cmd.settings" | "cmd.gear" | "cmd.shield" | "cmd.wave" | "cmd.compass" | "cmd.inbox" | "cmd.swap" | "cmd.expand" | "cmd.computer" | "cmd.eye" | "cmd.todo" | "cmd.stats" | "cmd.news" | "cmd.keyboard" | "cmd.export" | "cmd.clipboard" | "cmd.share" | "cmd.broadcast" | "cmd.globe" | "cmd.copy" | "cmd.plus" | "cmd.restart" | "cmd.eraser" | "cmd.trash" | "cmd.compress" | "cmd.vibrate" | "cmd.handoff" | "cmd.history" | "cmd.question" | "cmd.rocket" | "cmd.stethoscope" | "cmd.redo" | "cmd.bug" | "cmd.memory" | "cmd.pencil" | "cmd.folderMove" | "cmd.folderPlus" | "cmd.folderMinus" | "cmd.hammer" | "cmd.power" | "cmd.cart" | "icon.mic" | "icon.camera" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.max" | "thinking.autoPending" | "checkbox.checked" | "checkbox.unchecked" | "radio.selected" | "radio.unselected" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "md.colorSwatch" | "advisor.rail" | "skill.rail" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.julia" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "chip.image" | "chip.video" | "chip.paste" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.files" | "tab.shell" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tool.write" | "tool.edit" | "tool.bash" | "tool.ssh" | "tool.lsp" | "tool.gh" | "tool.webSearch" | "tool.exa" | "tool.browser" | "tool.eval" | "tool.debug" | "tool.mcp" | "tool.job" | "tool.launch" | "tool.task" | "tool.todo" | "tool.memory" | "tool.ask" | "tool.resolve" | "tool.review" | "tool.goal" | "tool.irc" | "tool.delete" | "tool.move" | "key.ctrl" | "key.ctrlMac" | "key.shift" | "key.alt" | "key.altMac" | "key.super" | "key.superMac" | "key.joiner" | "key.enter" | "key.esc" | "key.tab" | "key.backspace" | "key.delete" | "key.space" | "key.up" | "key.down" | "key.left" | "key.right";
|
|
5
|
+
export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted" | "status.done" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "progress.filled" | "progress.empty" | "context.speculation" | "context.compaction" | "context.content" | "context.messages" | "context.buffer" | "context.free" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxDotted.horizontal" | "boxDotted.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.powerlineCapLeft" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.prewalk" | "icon.goal" | "icon.pause" | "icon.loop" | "icon.folder" | "icon.worktree" | "icon.search" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.pin" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.subscription" | "icon.advisor" | "icon.advisorClosed" | "icon.time" | "icon.omp" | "icon.ghost" | "icon.agents" | "icon.job" | "icon.cache" | "icon.cacheMiss" | "icon.input" | "icon.output" | "icon.throughput" | "icon.intelligence" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.vimNormal" | "icon.vimInsert" | "icon.vimVisual" | "icon.vimVisualLine" | "icon.vimReplace" | "cmd.action" | "cmd.prompt" | "cmd.extension" | "cmd.settings" | "cmd.gear" | "cmd.shield" | "cmd.wave" | "cmd.compass" | "cmd.inbox" | "cmd.swap" | "cmd.expand" | "cmd.computer" | "cmd.eye" | "cmd.todo" | "cmd.stats" | "cmd.news" | "cmd.keyboard" | "cmd.export" | "cmd.clipboard" | "cmd.share" | "cmd.broadcast" | "cmd.globe" | "cmd.copy" | "cmd.plus" | "cmd.restart" | "cmd.eraser" | "cmd.trash" | "cmd.compress" | "cmd.vibrate" | "cmd.handoff" | "cmd.history" | "cmd.question" | "cmd.rocket" | "cmd.stethoscope" | "cmd.redo" | "cmd.bug" | "cmd.memory" | "cmd.pencil" | "cmd.folderMove" | "cmd.folderPlus" | "cmd.folderMinus" | "cmd.hammer" | "cmd.power" | "cmd.cart" | "icon.mic" | "icon.camera" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.max" | "thinking.autoPending" | "checkbox.checked" | "checkbox.unchecked" | "radio.selected" | "radio.unselected" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "md.colorSwatch" | "advisor.rail" | "skill.rail" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.julia" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "chip.image" | "chip.video" | "chip.paste" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.files" | "tab.shell" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tool.write" | "tool.edit" | "tool.bash" | "tool.ssh" | "tool.lsp" | "tool.gh" | "tool.webSearch" | "tool.exa" | "tool.browser" | "tool.eval" | "tool.debug" | "tool.mcp" | "tool.job" | "tool.launch" | "tool.task" | "tool.todo" | "tool.memory" | "tool.ask" | "tool.resolve" | "tool.review" | "tool.goal" | "tool.irc" | "tool.delete" | "tool.move" | "key.ctrl" | "key.ctrlMac" | "key.shift" | "key.alt" | "key.altMac" | "key.super" | "key.superMac" | "key.joiner" | "key.enter" | "key.esc" | "key.tab" | "key.backspace" | "key.delete" | "key.space" | "key.up" | "key.down" | "key.left" | "key.right";
|
|
6
6
|
export type SymbolMap = Record<SymbolKey, string>;
|
|
7
7
|
/**
|
|
8
8
|
* Icon vocabulary for slash-command autocomplete type indicators. Each name
|
|
@@ -12,6 +12,8 @@ export interface QuestionResult {
|
|
|
12
12
|
customInput?: string;
|
|
13
13
|
/** Optional note attached to the selected answer in the rich ask dialog. */
|
|
14
14
|
note?: string;
|
|
15
|
+
/** Label of the option the note is on; unset when it is on the custom answer. */
|
|
16
|
+
noteOption?: string;
|
|
15
17
|
/** True when the answer was auto-selected because the dialog timed out. */
|
|
16
18
|
timedOut?: boolean;
|
|
17
19
|
}
|
|
@@ -24,6 +26,8 @@ export interface AskToolDetails {
|
|
|
24
26
|
customInput?: string;
|
|
25
27
|
/** Optional note attached to the selected answer in the rich ask dialog. */
|
|
26
28
|
note?: string;
|
|
29
|
+
/** Label of the option the note is on; unset when it is on the custom answer. */
|
|
30
|
+
noteOption?: string;
|
|
27
31
|
/** True when the answer was auto-selected because the dialog timed out. */
|
|
28
32
|
timedOut?: boolean;
|
|
29
33
|
/** Multi-part question mode */
|
|
@@ -51,8 +51,10 @@ export interface EditToolPerFileResult {
|
|
|
51
51
|
}
|
|
52
52
|
/** Diff, diagnostics, and snapshots returned by an edit. */
|
|
53
53
|
export interface EditToolDetails {
|
|
54
|
-
/** Unified diff of the changes made */
|
|
54
|
+
/** Unified diff of the changes made; empty when the edit failed */
|
|
55
55
|
diff: string;
|
|
56
|
+
/** Why the edit failed, as the engine classed it (`unseen_lines`, `stale_tag`, `parse`, …) */
|
|
57
|
+
errorKind?: string;
|
|
56
58
|
/** Line number of the first change in the new file (for editor navigation) */
|
|
57
59
|
firstChangedLine?: number;
|
|
58
60
|
/** Diagnostic result (if available) */
|
|
@@ -85,6 +85,7 @@ export interface GhRunWatchFailedLogDetails {
|
|
|
85
85
|
conclusion?: string;
|
|
86
86
|
tail?: string;
|
|
87
87
|
available: boolean;
|
|
88
|
+
unavailableReason?: string;
|
|
88
89
|
}
|
|
89
90
|
/** Live workflow watcher display snapshot. */
|
|
90
91
|
export interface GhRunWatchViewDetails {
|
|
@@ -130,6 +131,8 @@ export interface GhFailedJobLog {
|
|
|
130
131
|
full?: string;
|
|
131
132
|
tail?: string;
|
|
132
133
|
available: boolean;
|
|
134
|
+
unavailableReason?: string;
|
|
135
|
+
truncated?: boolean;
|
|
133
136
|
}
|
|
134
137
|
/** Choose the terminal conclusion or current job state. */
|
|
135
138
|
export declare function formatJobState(job: GhRunJobSnapshot): string;
|
|
@@ -18,6 +18,8 @@ export interface GroupedFileSection {
|
|
|
18
18
|
export interface GroupedFilesOutput {
|
|
19
19
|
model: string[];
|
|
20
20
|
display: string[];
|
|
21
|
+
/** Per file, the `model` index just past its last line: a head cut keeping `n` lines shows it whole when this is <= n. */
|
|
22
|
+
modelEnds: Map<string, number>;
|
|
21
23
|
}
|
|
22
24
|
/**
|
|
23
25
|
* Render a list of files as a multi-level, prefix-folded directory tree shared by
|
|
@@ -22,12 +22,12 @@ export declare function renderMCPResult(result: {
|
|
|
22
22
|
details?: MCPToolDetails;
|
|
23
23
|
isError?: boolean;
|
|
24
24
|
}, options: RenderResultOptions, theme: Theme, args?: Record<string, unknown>): Component;
|
|
25
|
-
/** Native MCP call view: the head
|
|
25
|
+
/** Native MCP call view: the head plus the folded args, inline while pending. */
|
|
26
26
|
export declare function describeMCPCall(args: Record<string, unknown>, label: string): NativeToolView;
|
|
27
27
|
/**
|
|
28
28
|
* Native MCP result view: JSON output as a JSON tree, Markdown when the
|
|
29
|
-
* preference is on, otherwise the raw text as tool output
|
|
30
|
-
*
|
|
29
|
+
* preference is on, otherwise the raw text as tool output; the folded Args
|
|
30
|
+
* section follows, so the collapsed preview still leads with the output.
|
|
31
31
|
*/
|
|
32
32
|
export declare function describeMCPResult(result: {
|
|
33
33
|
content: Array<{
|
|
@@ -29,7 +29,10 @@ export interface ReadToolDetails {
|
|
|
29
29
|
suffixResolution?: {
|
|
30
30
|
from: string;
|
|
31
31
|
to: string;
|
|
32
|
+
raw?: boolean;
|
|
32
33
|
};
|
|
34
|
+
/** Raw source output keeps descriptive diagnostics in details, not in the body. */
|
|
35
|
+
raw?: boolean;
|
|
33
36
|
url?: string;
|
|
34
37
|
finalUrl?: string;
|
|
35
38
|
contentType?: string;
|
|
@@ -10,8 +10,8 @@ import type { NativeToolView, ToolRenderResult } from "./renderer.js";
|
|
|
10
10
|
/** Whether a wait snapshot contains only running jobs and no cancellations. */
|
|
11
11
|
export declare function isWaitingPollDetails(details: unknown): boolean;
|
|
12
12
|
/** Coordination details retained by wait and background job operations. */
|
|
13
|
-
export type CoordinationOp = "send" | "wait" | "
|
|
14
|
-
/** Background-job row surfaced by `wait`/`cancel
|
|
13
|
+
export type CoordinationOp = "send" | "wait" | "cancel";
|
|
14
|
+
/** Background-job row surfaced by `wait`/`cancel` results and `proc://` listings. */
|
|
15
15
|
export interface JobSnapshot {
|
|
16
16
|
id: string;
|
|
17
17
|
type: "bash" | "task" | "eval";
|
|
@@ -32,6 +32,14 @@ export interface JobSnapshot {
|
|
|
32
32
|
completionPercent?: number;
|
|
33
33
|
/** The task agent's latest stage in its own words; see `AgentProgress.stage`. */
|
|
34
34
|
stage?: string;
|
|
35
|
+
/** Running task only: assistant requests so far; see `AgentProgress.requests`. */
|
|
36
|
+
requests?: number;
|
|
37
|
+
/** Running task only: cumulative cost in USD; see `AgentProgress.cost`. */
|
|
38
|
+
cost?: number;
|
|
39
|
+
/** Running task only: latest per-turn context size; see `AgentProgress.contextTokens`. */
|
|
40
|
+
contextTokens?: number;
|
|
41
|
+
/** Running task only: the model's context window; see `AgentProgress.contextWindow`. */
|
|
42
|
+
contextWindow?: number;
|
|
35
43
|
/** The job's live widget, while one is being drawn; frozen at its last state once the job settles. */
|
|
36
44
|
widget?: JobWidgetView;
|
|
37
45
|
resultText?: string;
|
|
@@ -47,6 +55,12 @@ export interface JobSnapshot {
|
|
|
47
55
|
* on collision, else the job id itself. See {@link AsyncJob.agentId}.
|
|
48
56
|
*/
|
|
49
57
|
agentUrlId?: string;
|
|
58
|
+
/**
|
|
59
|
+
* Whether this job's turn published `<agentUrlId>.md`. False where the job
|
|
60
|
+
* body reported that it wrote none, so `agent://` still holds an earlier
|
|
61
|
+
* turn's output; undefined where the body does not report it.
|
|
62
|
+
*/
|
|
63
|
+
agentOutputPublished?: boolean;
|
|
50
64
|
}
|
|
51
65
|
/** Outcome of cancelling one background job. */
|
|
52
66
|
export type CancelStatus = "cancelled" | "not_found" | "already_completed";
|
package/dist/types/tui.d.ts
CHANGED
|
@@ -363,6 +363,8 @@ export declare class TUI extends Container {
|
|
|
363
363
|
* observers (live stream publisher, session recorder) coexist.
|
|
364
364
|
*/
|
|
365
365
|
addPaintListener(listener: PaintListener): () => void;
|
|
366
|
+
/** Observe actual ANSI frame writes, including transient resize paints; returns the unsubscribe. */
|
|
367
|
+
addFrameWriteListener(listener: (data: string) => void): () => void;
|
|
366
368
|
/** Install the product-owned bounded frame provider. */
|
|
367
369
|
setFrameProvider(provider: TerminalFrameProvider | undefined): void;
|
|
368
370
|
get fullRedraws(): number;
|
package/dist/types/vim.d.ts
CHANGED
|
@@ -64,13 +64,43 @@ export type VimCommand = {
|
|
|
64
64
|
fromLine: number;
|
|
65
65
|
toLine: number;
|
|
66
66
|
out: boolean;
|
|
67
|
+
} | {
|
|
68
|
+
kind: "retype";
|
|
69
|
+
record: VimInsertRecord;
|
|
70
|
+
times: number;
|
|
71
|
+
newline: boolean;
|
|
72
|
+
overwrite: boolean;
|
|
67
73
|
};
|
|
74
|
+
/** What an Insert/Replace session typed, relative to where it started; `.` replays it. */
|
|
75
|
+
export interface VimInsertRecord {
|
|
76
|
+
/** Graphemes removed before the session's start cursor (Backspace past the insert point). */
|
|
77
|
+
deleteBefore: number;
|
|
78
|
+
/** Graphemes removed after it (forward delete). */
|
|
79
|
+
deleteAfter: number;
|
|
80
|
+
text: string;
|
|
81
|
+
}
|
|
68
82
|
/** Start offset of the grapheme after `col`, clamped to `text.length`. */
|
|
69
83
|
export declare function nextGraphemeStart(text: string, col: number): number;
|
|
70
84
|
/** Start offset of the grapheme before `col`, clamped to 0. */
|
|
71
85
|
export declare function prevGraphemeStart(text: string, col: number): number;
|
|
72
86
|
/** Offset of the final grapheme — where a Normal-mode cursor rests on a non-empty line. */
|
|
73
87
|
export declare function lastGraphemeStart(text: string): number;
|
|
88
|
+
export declare function countGraphemes(text: string): number;
|
|
89
|
+
/** Offset `count` graphemes forward or backward from `offset`, clamped to the text. */
|
|
90
|
+
export declare function stepGraphemes(text: string, offset: number, count: number, forward: boolean): number;
|
|
91
|
+
/**
|
|
92
|
+
* What a session turned `before` into, anchored at its start `cursor`: the prefix match stops at the
|
|
93
|
+
* cursor and the suffix match never crosses it, so typing `aa` before an existing `a` records `aa`
|
|
94
|
+
* at the cursor rather than after the old one. Comparisons are whole graphemes, so a shared high
|
|
95
|
+
* surrogate cannot split an emoji into the replayed text.
|
|
96
|
+
*/
|
|
97
|
+
export declare function diffInsertSession(before: string, cursor: number, after: string): VimInsertRecord;
|
|
98
|
+
/** Buffer flattened to one string plus the cursor's offset in it, so scans can cross lines. */
|
|
99
|
+
export declare function flatten(buf: VimBuffer): {
|
|
100
|
+
text: string;
|
|
101
|
+
cursor: number;
|
|
102
|
+
};
|
|
103
|
+
export declare function offsetToPos(lines: readonly string[], offset: number): VimPosition;
|
|
74
104
|
export declare class VimState {
|
|
75
105
|
#private;
|
|
76
106
|
mode: VimMode;
|
|
@@ -94,6 +124,15 @@ export declare class VimState {
|
|
|
94
124
|
* through to its regular handling (and, for Escape in Normal mode, to the app's interrupt).
|
|
95
125
|
*/
|
|
96
126
|
handleKey(key: string, buf: VimBuffer): VimCommand[] | null;
|
|
127
|
+
/**
|
|
128
|
+
* Attach what an Insert/Replace session typed to the change that opened it. After an arrow key
|
|
129
|
+
* split the session, Vim's redo becomes a plain insert of the text typed since.
|
|
130
|
+
*/
|
|
131
|
+
recordInsert(record: VimInsertRecord, afterArrow: boolean): void;
|
|
132
|
+
/** Commit a staged change when the editor confirms text changed. */
|
|
133
|
+
commitChange(): void;
|
|
134
|
+
/** Discard a staged change when the command was a no-op (e.g. `J` on the last line). */
|
|
135
|
+
discardChange(): void;
|
|
97
136
|
}
|
|
98
137
|
/**
|
|
99
138
|
* Normalized, end-exclusive span covered by a Visual selection.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@linxiraos/pi-tui",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.6",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://linxira-os.github.io/zeta/",
|
|
7
7
|
"author": "Linxira-OS",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"gen:glyphs": "bun scripts/gen-glyphs.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@linxiraos/pi-omptype": "1.4.
|
|
42
|
-
"@linxiraos/pi-agent-core": "1.4.
|
|
43
|
-
"@linxiraos/pi-ai": "1.4.
|
|
44
|
-
"@linxiraos/pi-catalog": "1.4.
|
|
45
|
-
"@linxiraos/pi-natives": "1.4.
|
|
46
|
-
"@linxiraos/pi-utils": "1.4.
|
|
47
|
-
"@linxiraos/pi-wire": "1.4.
|
|
48
|
-
"@linxiraos/pi-snapcompact": "1.4.
|
|
41
|
+
"@linxiraos/pi-omptype": "1.4.6",
|
|
42
|
+
"@linxiraos/pi-agent-core": "1.4.6",
|
|
43
|
+
"@linxiraos/pi-ai": "1.4.6",
|
|
44
|
+
"@linxiraos/pi-catalog": "1.4.6",
|
|
45
|
+
"@linxiraos/pi-natives": "1.4.6",
|
|
46
|
+
"@linxiraos/pi-utils": "1.4.6",
|
|
47
|
+
"@linxiraos/pi-wire": "1.4.6",
|
|
48
|
+
"@linxiraos/pi-snapcompact": "1.4.6"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"kitty-vt-wasm": "^0.2.0"
|
package/src/app-keybindings.d.ts
CHANGED
|
@@ -20,6 +20,7 @@ interface AppKeybindings {
|
|
|
20
20
|
"app.ask.hide": true;
|
|
21
21
|
"app.approval.approve": true;
|
|
22
22
|
"app.editor.external": true;
|
|
23
|
+
"app.local.open": true;
|
|
23
24
|
"app.message.followUp": true;
|
|
24
25
|
"app.retry": true;
|
|
25
26
|
"app.message.dequeue": true;
|
|
@@ -252,6 +253,10 @@ export declare const KEYBINDINGS: {
|
|
|
252
253
|
readonly defaultKeys: "ctrl+g";
|
|
253
254
|
readonly description: "Open external editor";
|
|
254
255
|
};
|
|
256
|
+
readonly "app.local.open": {
|
|
257
|
+
readonly defaultKeys: "alt+g";
|
|
258
|
+
readonly description: "Open a local:// file in external editor";
|
|
259
|
+
};
|
|
255
260
|
readonly "app.message.followUp": {
|
|
256
261
|
readonly defaultKeys: ["ctrl+q", "ctrl+enter"];
|
|
257
262
|
readonly description: "Send follow-up message";
|
package/src/app-keybindings.ts
CHANGED
|
@@ -40,6 +40,7 @@ interface AppKeybindings {
|
|
|
40
40
|
"app.ask.hide": true;
|
|
41
41
|
"app.approval.approve": true;
|
|
42
42
|
"app.editor.external": true;
|
|
43
|
+
"app.local.open": true;
|
|
43
44
|
"app.message.followUp": true;
|
|
44
45
|
"app.retry": true;
|
|
45
46
|
"app.message.dequeue": true;
|
|
@@ -154,6 +155,10 @@ export const KEYBINDINGS = {
|
|
|
154
155
|
defaultKeys: "ctrl+g",
|
|
155
156
|
description: "Open external editor",
|
|
156
157
|
},
|
|
158
|
+
"app.local.open": {
|
|
159
|
+
defaultKeys: "alt+g",
|
|
160
|
+
description: "Open a local:// file in external editor",
|
|
161
|
+
},
|
|
157
162
|
"app.message.followUp": {
|
|
158
163
|
// Ctrl+Enter is preserved for terminals that deliver it (Kitty/iTerm2/WezTerm/Ghostty),
|
|
159
164
|
// but Windows Terminal does not emit a distinct event for Ctrl+Enter — Ctrl+Q is listed
|
|
@@ -253,7 +253,13 @@ export class BashExecutionComponent extends Container {
|
|
|
253
253
|
/** Switch to PTY rendering and feed raw terminal bytes through the vterm replay. */
|
|
254
254
|
appendPtyChunk(chunk: string): void {
|
|
255
255
|
if (this.#status !== "running" && !this.#ptyWriting && this.#ptyQueue.length === 0) return;
|
|
256
|
-
this.#ptyMode
|
|
256
|
+
if (!this.#ptyMode) {
|
|
257
|
+
this.#ptyMode = true;
|
|
258
|
+
// The pane's `styleLine` reads `#ptyMode`, so its styled rows change
|
|
259
|
+
// the moment this flips — with the rows themselves unchanged. The pane
|
|
260
|
+
// memoizes its styled output, so it has to be told.
|
|
261
|
+
this.#outputPane.invalidate();
|
|
262
|
+
}
|
|
257
263
|
this.#ptyReplayFinalized = false;
|
|
258
264
|
this.#ptyQueue.push(chunk);
|
|
259
265
|
if (this.#ptyQueue.length > MAX_PTY_QUEUE_CHUNKS) {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import * as path from "node:path";
|
|
2
|
-
import { pathToFileURL } from "node:url";
|
|
3
2
|
import type { AssistantMessage, Usage } from "@linxiraos/pi-ai";
|
|
4
3
|
import { type Component } from "../tui";
|
|
5
4
|
import { Container } from "../tui";
|
|
@@ -876,7 +875,7 @@ export class ReadToolGroupComponent extends Container implements ToolExecutionHa
|
|
|
876
875
|
const linkPath = linkPathForTargets(row.targets);
|
|
877
876
|
const spans: TspSpan[] = [];
|
|
878
877
|
if (filePath) {
|
|
879
|
-
const href = linkPath
|
|
878
|
+
const href = linkPath ? fileHref(linkPath) : undefined;
|
|
880
879
|
spans.push(span(filePath, "path", href ? { href } : undefined));
|
|
881
880
|
} else {
|
|
882
881
|
spans.push(span("…", "toolOutput"));
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { TextContent } from "@linxiraos/pi-ai";
|
|
2
|
-
import { pathToFileURL } from "node:url";
|
|
3
2
|
import { type Component } from "../tui";
|
|
4
3
|
import { Box } from "../components/box";
|
|
5
4
|
import { Disclosure } from "../components/disclosure";
|
|
@@ -10,6 +9,7 @@ import { Text } from "../components/text";
|
|
|
10
9
|
import { getMarkdownTheme, theme } from "../theme";
|
|
11
10
|
import type { CustomMessage, SkillPromptDetails } from "./messages";
|
|
12
11
|
import { fileHyperlink } from "../render";
|
|
12
|
+
import { tryFileUri } from "../render/hyperlink";
|
|
13
13
|
import { collapseSkillTokens, skillChipLabel, skillChipStyle, skillToken } from "../prompt/composer-attachments";
|
|
14
14
|
import { tuiText, tuiTextFmt } from "../i18n";
|
|
15
15
|
import { type UserBubbleOptions, UserMessageComponent, userBubbleColor } from "./user-message";
|
|
@@ -88,11 +88,7 @@ export class SkillMessageComponent extends Container {
|
|
|
88
88
|
const leading = display.startsWith(label) && /^\s*$/.test(display.charAt(label.length));
|
|
89
89
|
const draft = leading ? display.slice(label.length).trim() : display;
|
|
90
90
|
const head: TspSpan[] = [
|
|
91
|
-
span(
|
|
92
|
-
label,
|
|
93
|
-
"customMessageLabel strong",
|
|
94
|
-
details?.path ? { href: pathToFileURL(details.path).href } : undefined,
|
|
95
|
-
),
|
|
91
|
+
span(label, "customMessageLabel strong", details?.path ? { href: tryFileUri(details.path) } : undefined),
|
|
96
92
|
];
|
|
97
93
|
if (typeof details?.lineCount === "number") {
|
|
98
94
|
head.push(span(` ${details.lineCount} ${details.lineCount === 1 ? "line" : "lines"}`, "muted"));
|