@oh-my-pi/pi-tui 18.13.0 → 18.13.2
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 +36 -32
- 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/overlays/advisor-config.d.ts +6 -0
- package/dist/types/overlays/ask-dialog.d.ts +12 -3
- 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/pause-screen.d.ts +13 -3
- package/dist/types/overlays/running-subagent-badge.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/theme/symbols.d.ts +1 -1
- package/dist/types/tools/ask.d.ts +4 -0
- package/dist/types/tools/fetch.d.ts +1 -0
- package/dist/types/tools/github.d.ts +3 -0
- package/dist/types/tools/read.d.ts +3 -0
- package/dist/types/tools/wait.d.ts +6 -0
- package/dist/types/tui.d.ts +2 -0
- package/package.json +9 -9
- 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/components/editor.ts +23 -0
- package/src/components/markdown.ts +14 -2
- package/src/overlays/advisor-config.ts +9 -2
- package/src/overlays/ask-dialog.ts +122 -35
- 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/pause-screen.ts +166 -37
- package/src/overlays/running-subagent-badge.ts +12 -1
- package/src/render/output-pane.ts +3 -3
- package/src/status-line/component.ts +6 -4
- package/src/status-line/context-usage.ts +56 -580
- package/src/theme/symbols.ts +16 -0
- package/src/tools/ask.ts +4 -0
- package/src/tools/bash.ts +5 -23
- package/src/tools/fetch.ts +1 -0
- package/src/tools/github.ts +23 -3
- package/src/tools/read.ts +3 -1
- package/src/tools/wait.ts +6 -0
- package/src/tui.ts +23 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,41 @@
|
|
|
2
2
|
|
|
3
3
|
## [Unreleased]
|
|
4
4
|
|
|
5
|
+
## [18.13.2] - 2026-10-27
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
|
|
9
|
+
- Added a frame-write listener (`TUI.addFrameWriteListener`) for terminal integrations that need to react to emitted ANSI output, including resize paints ([#17145](https://github.com/can1357/oh-my-pi/issues/17145))
|
|
10
|
+
- `HookInputComponent` (`showHookInput`) now accepts `{ secret: true }` to mask typed characters as bullets (`•`) in input overlays ([#17080](https://github.com/can1357/oh-my-pi/pull/17080) by [@GTanger](https://github.com/GTanger))
|
|
11
|
+
- Added an ANSI and native `/context` viewer with category navigation, content inspection, token-usage and compaction estimates, and keyboard/mouse controls that adapt across Tern and other terminals ([#16160](https://github.com/can1357/oh-my-pi/pull/16160) by [@C-W-Z](https://github.com/C-W-Z)).
|
|
12
|
+
|
|
13
|
+
### Fixed
|
|
14
|
+
|
|
15
|
+
- Fixed `AskDialogComponent`'s draft input guard holding the keyboard until the draft was cleared; Up/Down (or a pointer action) now release it so the question can be answered with the draft parked, and `syncPresentation` receives the effective blocked state ([#17215](https://github.com/can1357/oh-my-pi/pull/17215) by [@H4vC](https://github.com/H4vC))
|
|
16
|
+
- Fixed the prompt editor's autocomplete popup (e.g. emoji suggestions after `:D`) staying open and following the cursor after Shift/Ctrl/Alt+Enter inserted a newline, so the next Enter submitted past a stale list; newlines and cursor motion (arrows, Home/End, word jumps, character jumps) now close it ([#17215](https://github.com/can1357/oh-my-pi/pull/17215) by [@H4vC](https://github.com/H4vC))
|
|
17
|
+
- Fixed `run_watch` failed-job rows hiding why a job's logs are unavailable; multiline `gh` errors now stay on one row ([#17173](https://github.com/can1357/oh-my-pi/pull/17173) by [@alphastorm](https://github.com/alphastorm))
|
|
18
|
+
|
|
19
|
+
### Removed
|
|
20
|
+
|
|
21
|
+
- Removed the static context usage report (`ContextUsageView`, `renderContextUsage`, `describeContextUsage`), `contextUsageHead()`, and the `glyph` and `color` fields of `ContextBreakdown` categories; use `ContextViewer` ([#16160](https://github.com/can1357/oh-my-pi/pull/16160) by [@C-W-Z](https://github.com/C-W-Z)).
|
|
22
|
+
- Fixed Markdown tables inside list items disappearing from the terminal transcript ([#17165](https://github.com/can1357/oh-my-pi/issues/17165)).
|
|
23
|
+
|
|
24
|
+
## [18.13.1] - 2026-10-27
|
|
25
|
+
|
|
26
|
+
### Added
|
|
27
|
+
|
|
28
|
+
- ANSI and TSP `/pause` screens show unsettled turns and jobs, hide settled counters, and preserve counts and resume controls on short terminals ([#17073](https://github.com/can1357/oh-my-pi/pull/17073) by [@anatoli-tsinovoy](https://github.com/anatoli-tsinovoy)).
|
|
29
|
+
- Added `noteOption` to `ExtensionAskDialogResultItem`, `QuestionResult`, and single-question `AskToolDetails`: the label of the option an ask note is on (unset for a note on the custom answer) ([#17126](https://github.com/can1357/oh-my-pi/pull/17126) by [@H4vC](https://github.com/H4vC))
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- `StatusLineComponent.setRunningSubagents()` and `setSubagentTreeCost()` now report whether their state changed, allowing callers to skip redundant redraws ([#17131](https://github.com/can1357/oh-my-pi/pull/17131) by [@iliaal](https://github.com/iliaal)).
|
|
34
|
+
|
|
35
|
+
### Fixed
|
|
36
|
+
|
|
37
|
+
- Fixed the ask dialog's Note (button or `n`) right after a pick moved to the next question annotating that question's highlighted row instead of the answer just picked ([#17126](https://github.com/can1357/oh-my-pi/pull/17126) by [@H4vC](https://github.com/H4vC))
|
|
38
|
+
- Fixed the ask dialog's Next button reopening the custom-answer editor after Other was cancelled instead of moving on to the next question or Review tab
|
|
39
|
+
|
|
5
40
|
## [18.13.0] - 2026-10-26
|
|
6
41
|
|
|
7
42
|
### Breaking Changes
|
|
@@ -2453,35 +2488,4 @@
|
|
|
2453
2488
|
|
|
2454
2489
|
- Fixed native Windows + Windows Terminal scrollback being yanked to the top when a streaming response triggered a TUI full redraw. Under ConPTY the `kernel32` `GetConsoleScreenBufferInfo` probe answers about the pseudo-console (always at the buffer tail) and not about WT's host scrollback, so `isNativeViewportAtBottom()` falsely returned `true` while the user was scrolled up and the shrink-across-viewport branch issued a destructive `historyRebuild` (`\x1b[2J\x1b[H\x1b[3J`). The probe now short-circuits to `undefined` whenever `WT_SESSION` is set, letting the existing deferred-rebuild path keep streaming-time mutations non-destructive and reconcile native history at the next prompt-submit checkpoint. ([#1635](https://github.com/can1357/oh-my-pi/issues/1635))
|
|
2455
2490
|
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
### Added
|
|
2459
|
-
|
|
2460
|
-
- Added `overflowSearch` to `SelectListLayoutOptions` to let consumers enable or disable type-to-filter search and search-status rendering per SelectList instance
|
|
2461
|
-
- Added fuzzy type-to-filter search to overflowing `SelectList` pickers, with search status and result counts.
|
|
2462
|
-
- Added `TUI.setEagerNativeScrollbackRebuild(enabled)` — while enabled, live render frames rebuild native scrollback on offscreen/structural changes even when the viewport position is unobservable (POSIX), instead of deferring to a non-destructive repaint. Trades the anti-yank guarantee for clean, duplicate-free history; intended for windows where output above the fold is actively re-laying out (e.g. a tool whose result is still streaming). A terminal that reports a known-scrolled viewport still defers.
|
|
2463
|
-
|
|
2464
|
-
### Changed
|
|
2465
|
-
|
|
2466
|
-
- Disabled interactive search filtering for editor autocomplete and slash-command `SelectList`s by passing `overflowSearch: false` in their layout options
|
|
2467
|
-
|
|
2468
|
-
### Fixed
|
|
2469
|
-
|
|
2470
|
-
- Preserved hidden tmux overlays in the live viewport by removing overlay content from view when an overlay was hidden while keeping pane history intact
|
|
2471
|
-
- Preserved native scrollback when forced TUI renders coalesce with content growth, and deferred pure tail appends while readers are scrolled into history.
|
|
2472
|
-
- Preserved existing terminal scrollback during forced and structural TUI renders so preexisting shell lines remained visible after component mutations
|
|
2473
|
-
- Rebuilt native scrollback for safe bottom-anchored offscreen edits and high-water preview collapses instead of repainting only the viewport, preventing stale or duplicated rows above the live viewport.
|
|
2474
|
-
- Stripped internal cursor marker sentinels from all rendered lines so offscreen focus markers no longer leak into terminal output
|
|
2475
|
-
- Truncated all painted lines to terminal width during viewport repaints and append-tail updates so long content no longer overflows or wraps unexpectedly
|
|
2476
|
-
- Fixed `tui.select.cancel` handling in `SelectList` so pressing Escape or Ctrl+C closes the list even when no matches are currently shown
|
|
2477
|
-
- Fixed native scrollback corruption when an offscreen row edit and repeated-tail append land in one render frame; ambiguous appended tails now rebuild history instead of splicing stale rows into the buffer.
|
|
2478
|
-
- Fixed scrolled-up readers being yanked back to the tail whenever streaming content arrived on POSIX terminals (macOS/Linux). Native viewport position is unobservable there (`isNativeViewportAtBottom()` returns `undefined`), and the planner optimistically treated "unknown" as "at bottom", so every offscreen streaming edit ran a destructive `historyRebuild` that cleared scrollback and snapped the view to the bottom. Live render frames now treat an unknown viewport as unsafe for a destructive rebuild — they defer to a non-destructive viewport repaint and reconcile native scrollback at the next explicit checkpoint (prompt submit). Resize and checkpoint replays keep the prior behavior.
|
|
2479
|
-
- Fixed native scrollback not rewrapping when the terminal widens on POSIX. A width increase reflows the transcript to fewer lines, which the shrink-across-boundary branch intercepted and (after the unknown-viewport deferral) repainted only the viewport — leaving committed history wrapped at the old width and duplicated above the live viewport. Width changes now rebuild native scrollback at the new geometry even when the viewport position is unknown (a yank is acceptable on an explicit resize); a terminal that can report a scrolled viewport still defers.
|
|
2480
|
-
|
|
2481
|
-
## [15.7.0] - 2026-05-31
|
|
2482
|
-
|
|
2483
|
-
### Fixed
|
|
2484
|
-
|
|
2485
|
-
- Fixed slash-command autocomplete repainting when a Windows Terminal session cannot report native scrollback position; live input renders can now bypass the unknown-viewport deferral without weakening background scrollback protection. ([#1550](https://github.com/can1357/oh-my-pi/issues/1550))
|
|
2486
|
-
|
|
2487
|
-
Older entries are archived in [packages/tui/CHANGELOG.md@539f05ae39f8](https://github.com/can1357/oh-my-pi/blob/539f05ae39f81319dc75d650757dad3c76482343/packages/tui/CHANGELOG.md).
|
|
2491
|
+
Older entries are archived in [packages/tui/CHANGELOG.md@3d45d8557cd7](https://github.com/can1357/oh-my-pi/blob/3d45d8557cd7493221b69c7ed3c6b6a2307f46e7/packages/tui/CHANGELOG.md).
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Pure occupancy calculations for contiguous token segments, independent of themes and renderers. */
|
|
2
|
+
export interface ContextMapSegment<T> {
|
|
3
|
+
readonly id: T;
|
|
4
|
+
readonly tokens: number;
|
|
5
|
+
}
|
|
6
|
+
export interface ContextMapCell<T> {
|
|
7
|
+
readonly id: T;
|
|
8
|
+
readonly full: boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Lays `segments` out in order over a `columns` × `rows` grid representing `windowTokens`; each cell takes the
|
|
12
|
+
* segment covering most of it and is `full` at 70% coverage or more. Returns `[]` when the window or grid
|
|
13
|
+
* size is unusable, and omits cells no segment touches.
|
|
14
|
+
*/
|
|
15
|
+
export declare function planContextMap<T>(segments: readonly ContextMapSegment<T>[], windowTokens: number, columns: number, rows: number): ContextMapCell<T>[];
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import type { ContextCategoryId } from "./context-view-model.js";
|
|
2
|
+
export declare const CONTEXT_PRESENTATION: {
|
|
3
|
+
readonly "system-prompt": {
|
|
4
|
+
readonly color: "accent";
|
|
5
|
+
readonly symbol: "context.content";
|
|
6
|
+
};
|
|
7
|
+
readonly skills: {
|
|
8
|
+
readonly color: "success";
|
|
9
|
+
readonly symbol: "context.content";
|
|
10
|
+
};
|
|
11
|
+
readonly "built-in-tools": {
|
|
12
|
+
readonly color: "warning";
|
|
13
|
+
readonly symbol: "context.content";
|
|
14
|
+
};
|
|
15
|
+
readonly "custom-tools": {
|
|
16
|
+
readonly color: "customMessageLabel";
|
|
17
|
+
readonly symbol: "context.content";
|
|
18
|
+
};
|
|
19
|
+
readonly "user-messages": {
|
|
20
|
+
readonly color: "accent";
|
|
21
|
+
readonly symbol: "context.messages";
|
|
22
|
+
};
|
|
23
|
+
readonly "assistant-messages": {
|
|
24
|
+
readonly color: "userMessageText";
|
|
25
|
+
readonly symbol: "context.messages";
|
|
26
|
+
};
|
|
27
|
+
readonly "assistant-thinking": {
|
|
28
|
+
readonly color: "customMessageLabel";
|
|
29
|
+
readonly symbol: "context.content";
|
|
30
|
+
};
|
|
31
|
+
readonly "tool-calls": {
|
|
32
|
+
readonly color: "warning";
|
|
33
|
+
readonly symbol: "context.content";
|
|
34
|
+
};
|
|
35
|
+
readonly "tool-output": {
|
|
36
|
+
readonly color: "muted";
|
|
37
|
+
readonly symbol: "context.messages";
|
|
38
|
+
};
|
|
39
|
+
readonly buffer: {
|
|
40
|
+
readonly color: "warning";
|
|
41
|
+
readonly symbol: "context.buffer";
|
|
42
|
+
};
|
|
43
|
+
readonly free: {
|
|
44
|
+
readonly color: "dim";
|
|
45
|
+
readonly symbol: "context.free";
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
export type ContextPresentationId = ContextCategoryId | "buffer" | "free";
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
/** Context snapshot shapes shared by the session snapshot builder and the context viewer. */
|
|
2
|
+
import type { ContextBreakdown } from "../status-line/context-usage.js";
|
|
3
|
+
interface ContextCategoryDescriptor {
|
|
4
|
+
readonly id: string;
|
|
5
|
+
readonly label: string;
|
|
6
|
+
/** Overview row label when the Overview weight differs from the category's content. */
|
|
7
|
+
readonly overviewLabel?: string;
|
|
8
|
+
/** Listed with its weight but never opened. */
|
|
9
|
+
readonly openable?: false;
|
|
10
|
+
}
|
|
11
|
+
/** Context categories in display order. */
|
|
12
|
+
export declare const CONTEXT_CATEGORIES: readonly [{
|
|
13
|
+
readonly id: "system-prompt";
|
|
14
|
+
readonly label: "System Prompt";
|
|
15
|
+
readonly overviewLabel: "System Prompt (excluding Skills)";
|
|
16
|
+
}, {
|
|
17
|
+
readonly id: "skills";
|
|
18
|
+
readonly label: "Skills";
|
|
19
|
+
readonly openable: false;
|
|
20
|
+
}, {
|
|
21
|
+
readonly id: "built-in-tools";
|
|
22
|
+
readonly label: "Built-in Tools";
|
|
23
|
+
}, {
|
|
24
|
+
readonly id: "custom-tools";
|
|
25
|
+
readonly label: "Custom Tools";
|
|
26
|
+
}, {
|
|
27
|
+
readonly id: "user-messages";
|
|
28
|
+
readonly label: "User / Developer Messages";
|
|
29
|
+
}, {
|
|
30
|
+
readonly id: "assistant-messages";
|
|
31
|
+
readonly label: "Assistant Messages";
|
|
32
|
+
}, {
|
|
33
|
+
readonly id: "assistant-thinking";
|
|
34
|
+
readonly label: "Assistant Thinking";
|
|
35
|
+
}, {
|
|
36
|
+
readonly id: "tool-calls";
|
|
37
|
+
readonly label: "Tool Calls";
|
|
38
|
+
}, {
|
|
39
|
+
readonly id: "tool-output";
|
|
40
|
+
readonly label: "Tool Output";
|
|
41
|
+
}];
|
|
42
|
+
export type ContextCategoryId = (typeof CONTEXT_CATEGORIES)[number]["id"];
|
|
43
|
+
/** Descriptor of a category id: its label, optional Overview label, and whether it can be opened. */
|
|
44
|
+
export declare function contextCategoryDescriptor(id: ContextCategoryId): ContextCategoryDescriptor;
|
|
45
|
+
export interface ContextThinkingGroup {
|
|
46
|
+
readonly id: string;
|
|
47
|
+
readonly label: string;
|
|
48
|
+
readonly tokens: number;
|
|
49
|
+
readonly interrupted?: boolean;
|
|
50
|
+
}
|
|
51
|
+
export interface ContextViewEntry {
|
|
52
|
+
readonly id: string;
|
|
53
|
+
readonly label: string;
|
|
54
|
+
readonly text: string;
|
|
55
|
+
/** Aggregation weight for the unscaled replay estimate; shared blocks contribute through their group. */
|
|
56
|
+
readonly tokens: number;
|
|
57
|
+
readonly interrupted?: boolean;
|
|
58
|
+
readonly thinkingGroup?: ContextThinkingGroup;
|
|
59
|
+
readonly path?: string;
|
|
60
|
+
readonly info?: string;
|
|
61
|
+
readonly timestamp?: number;
|
|
62
|
+
readonly callId?: string;
|
|
63
|
+
}
|
|
64
|
+
export interface ContextViewCategory {
|
|
65
|
+
id: ContextCategoryId;
|
|
66
|
+
key?: string;
|
|
67
|
+
label: string;
|
|
68
|
+
/** Overview attribution weight, not reported usage; may differ from the entry sum (e.g. Skills subtraction). */
|
|
69
|
+
tokens: number;
|
|
70
|
+
entries: ContextViewEntry[];
|
|
71
|
+
children?: ContextViewCategory[];
|
|
72
|
+
}
|
|
73
|
+
export interface ContextViewData {
|
|
74
|
+
readonly breakdown: ContextBreakdown;
|
|
75
|
+
readonly categories: readonly ContextViewCategory[];
|
|
76
|
+
}
|
|
77
|
+
export {};
|
|
@@ -22,8 +22,10 @@ import { type ModelBrowserSource } from "./model-browser.js";
|
|
|
22
22
|
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
23
23
|
export declare const ADVISOR_REVIEW_MODES: readonly ["turn", "agent-end"];
|
|
24
24
|
export declare const ADVISOR_SYNC_BACKLOG_MODES: readonly ["off", "1", "3", "5", "strict"];
|
|
25
|
+
export declare const ADVISOR_SESSION_SCOPES: readonly ["main", "subagent", "all"];
|
|
25
26
|
export type AdvisorReviewMode = (typeof ADVISOR_REVIEW_MODES)[number];
|
|
26
27
|
export type AdvisorSyncBacklog = (typeof ADVISOR_SYNC_BACKLOG_MODES)[number];
|
|
28
|
+
export type AdvisorSessionScope = (typeof ADVISOR_SESSION_SCOPES)[number];
|
|
27
29
|
/** One advisor declared in `WATCHDOG.yml`; its instructions specialize the shared baseline. */
|
|
28
30
|
export interface AdvisorConfig {
|
|
29
31
|
name: string;
|
|
@@ -39,6 +41,10 @@ export interface AdvisorConfig {
|
|
|
39
41
|
reviewMode?: AdvisorReviewMode;
|
|
40
42
|
reviewInterval?: number;
|
|
41
43
|
syncBacklog?: AdvisorSyncBacklog;
|
|
44
|
+
/** Which session kinds this advisor attaches to (`main`, `subagent`, or `all`; defaults to `all`). */
|
|
45
|
+
scope?: AdvisorSessionScope;
|
|
46
|
+
/** Whether primary assistant thinking blocks are included in updates sent to this advisor (defaults to `true`). */
|
|
47
|
+
includeReasoning?: boolean;
|
|
42
48
|
}
|
|
43
49
|
/** Which level a `WATCHDOG.yml` lives at: the project root or the user agent dir. */
|
|
44
50
|
export type AdvisorConfigScope = "project" | "user";
|
|
@@ -31,6 +31,8 @@ export interface ExtensionAskDialogResultItem {
|
|
|
31
31
|
customInputImages?: ImageContent[];
|
|
32
32
|
note?: string;
|
|
33
33
|
noteImages?: ImageContent[];
|
|
34
|
+
/** Label of the option the note is on; unset when it is on the custom answer. */
|
|
35
|
+
noteOption?: string;
|
|
34
36
|
timedOut?: boolean;
|
|
35
37
|
}
|
|
36
38
|
/** Answers submitted from the dialog. */
|
|
@@ -59,14 +61,21 @@ interface AskDialogCallbacks {
|
|
|
59
61
|
/** Prompt that accepts pasted images; without it, prompts use `onPrompt`. */
|
|
60
62
|
onImagePrompt?(prompt: AskDialogPrompt, prefill: AskDialogPromptValue | undefined): Promise<AskDialogPromptValue | undefined>;
|
|
61
63
|
}
|
|
64
|
+
/**
|
|
65
|
+
* Routes typing to a composer draft that was in progress when the dialog
|
|
66
|
+
* opened, so in-flight keystrokes never answer by accident. The up/down select
|
|
67
|
+
* keys are the explicit hand-off: they release the guard for the rest of the
|
|
68
|
+
* dialog's life and the draft stays parked (intact) beneath it.
|
|
69
|
+
*/
|
|
62
70
|
interface AskDialogInputGuard {
|
|
63
71
|
isBlocked(): boolean;
|
|
64
72
|
handleInput(keyData: string): void;
|
|
73
|
+
/** Shown after the release keys while the guard holds input. */
|
|
65
74
|
hint: string;
|
|
66
75
|
/** Mirror the guard's blocked state onto the proxied draft surface each
|
|
67
76
|
* render, so a draft that owns input shows a visible insertion cursor even
|
|
68
|
-
* though this dialog holds TUI focus. */
|
|
69
|
-
syncPresentation?(): void;
|
|
77
|
+
* though this dialog holds TUI focus, and drops it once the dialog takes over. */
|
|
78
|
+
syncPresentation?(blocked: boolean): void;
|
|
70
79
|
}
|
|
71
80
|
interface AskDialogOptions {
|
|
72
81
|
timeout?: number;
|
|
@@ -116,7 +125,7 @@ export declare class AskDialogComponent implements Component {
|
|
|
116
125
|
* Pointer actions: a tab click switches to it; a click on an answer row is
|
|
117
126
|
* Enter on it (Space for a multi-select option, so it toggles; its
|
|
118
127
|
* double-click `activate` is Enter); the action bar's Submit, Note and Skip
|
|
119
|
-
* run
|
|
128
|
+
* run what Enter (see {@link #pressEnter} for Other), `n` and Esc run on the highlighted row; Hide/Show
|
|
120
129
|
* collapse and restore the dialog.
|
|
121
130
|
*/
|
|
122
131
|
handleNativeEvent(event: NativeUiEvent): void;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { TspSpan } from "@oh-my-pi/pi-wire";
|
|
2
|
+
import type { ContextCategoryId, ContextThinkingGroup, ContextViewEntry } from "../chrome/context-view-model.js";
|
|
3
|
+
/** Normalized newlines, control characters removed, tabs expanded. */
|
|
4
|
+
export declare function safeContent(value: string): string;
|
|
5
|
+
/** {@link safeContent} with embedded home paths shortened, for labels and metadata. */
|
|
6
|
+
export declare function safeText(value: string): string;
|
|
7
|
+
/** {@link safeText} collapsed to one row. */
|
|
8
|
+
export declare function safeLine(value: string): string;
|
|
9
|
+
/** Token label of an entry or group: `—` for a grouped entry, `N/A · Interrupted`, else `N token(s)` (unscaled estimate). */
|
|
10
|
+
export declare function tokenEstimate(item: ContextViewEntry | ContextThinkingGroup): string;
|
|
11
|
+
/** `[label] N tokens` as ANSI. */
|
|
12
|
+
export declare function entryHeaderLine(entry: ContextViewEntry, category: ContextCategoryId): string;
|
|
13
|
+
/** `[label] N tokens` as spans. */
|
|
14
|
+
export declare function entryHeaderSpans(entry: ContextViewEntry, category: ContextCategoryId): TspSpan[];
|
|
15
|
+
/** Heading for a shared thinking group: label plus its token estimate. */
|
|
16
|
+
export declare function groupHeaderLine(group: ContextThinkingGroup, category: ContextCategoryId): string;
|
|
17
|
+
/** Truncation marker under a preview; the selected preview also advertises the open key. */
|
|
18
|
+
export declare function previewHint(selected: boolean): string;
|
|
19
|
+
/**
|
|
20
|
+
* Metadata rows: info and path, call id, timestamp. The full-content view also
|
|
21
|
+
* lists the thinking group, which previews show as a shared heading instead.
|
|
22
|
+
*/
|
|
23
|
+
export declare function entryMetadata(entry: ContextViewEntry, options: {
|
|
24
|
+
hour12: boolean | undefined;
|
|
25
|
+
withGroup: boolean;
|
|
26
|
+
}): string[];
|
|
27
|
+
/** Preview row budget for a list of `height` rows: room for the entry heading, hint, and group heading. */
|
|
28
|
+
export declare function previewRows(entry: ContextViewEntry, height: number): number;
|
|
29
|
+
export interface EntryPreviewOptions {
|
|
30
|
+
/** Wrap width of preview rows. */
|
|
31
|
+
readonly width: number;
|
|
32
|
+
/** Maximum preview rows. */
|
|
33
|
+
readonly rows: number;
|
|
34
|
+
/** Viewport width; bounds the source read to `sourceWidth × rows × 2` characters before sanitizing and wrapping. */
|
|
35
|
+
readonly sourceWidth: number;
|
|
36
|
+
readonly hour12: boolean | undefined;
|
|
37
|
+
}
|
|
38
|
+
/** Dim metadata rows, then the indented body, cut to `rows`; `complete` is false when anything was omitted. */
|
|
39
|
+
export declare function entryPreview(entry: ContextViewEntry, options: EntryPreviewOptions): {
|
|
40
|
+
lines: string[];
|
|
41
|
+
complete: boolean;
|
|
42
|
+
};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { TspSpan } from "@oh-my-pi/pi-wire";
|
|
2
|
+
import type { ContextBreakdown } from "../status-line/context-usage.js";
|
|
3
|
+
import { type ContextMapCell } from "../chrome/context-map.js";
|
|
4
|
+
import { type ContextPresentationId } from "../chrome/context-presentation.js";
|
|
5
|
+
import type { NativeNode } from "../native/node.js";
|
|
6
|
+
import type { ThemeColor } from "../theme/index.js";
|
|
7
|
+
import { type ContextViewCategory, type ContextViewData } from "../chrome/context-view-model.js";
|
|
8
|
+
/** Columns between the map and the legend. */
|
|
9
|
+
export declare const MAP_LEGEND_GAP = 3;
|
|
10
|
+
export interface OverviewRow {
|
|
11
|
+
readonly key: string;
|
|
12
|
+
readonly id: ContextPresentationId;
|
|
13
|
+
readonly label: string;
|
|
14
|
+
/** Attributed usage; undefined when the weights cannot scale current usage. */
|
|
15
|
+
readonly tokens: number | undefined;
|
|
16
|
+
/** Category opened on confirm; undefined rows are listed but not selectable. */
|
|
17
|
+
readonly category?: ContextViewCategory;
|
|
18
|
+
readonly child?: boolean;
|
|
19
|
+
/** Right-aligned token column. */
|
|
20
|
+
readonly tokenColumn: string;
|
|
21
|
+
/** Right-aligned share column, including its leading separator. */
|
|
22
|
+
readonly shareColumn: string;
|
|
23
|
+
}
|
|
24
|
+
export interface MapGeometry {
|
|
25
|
+
readonly columns: number;
|
|
26
|
+
readonly rows: number;
|
|
27
|
+
readonly cellWidth: number;
|
|
28
|
+
readonly gap: string;
|
|
29
|
+
readonly width: number;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Attribute current usage to categories by weight, then each category's share to its children.
|
|
33
|
+
* Attributed values are not entry sums: entries keep their unscaled content/replay estimates.
|
|
34
|
+
* Undefined when the top-level weights cannot scale; unscalable children stay unattributed.
|
|
35
|
+
*/
|
|
36
|
+
export declare function allocateUsage(categories: readonly ContextViewCategory[], usage: number): Map<ContextViewCategory, number> | undefined;
|
|
37
|
+
/** Overview row label for a category: its Overview-specific label when the weight differs from its content. */
|
|
38
|
+
export declare function overviewLabel(category: ContextViewCategory): string;
|
|
39
|
+
/** Category and child rows, then buffer and free space, with aligned token and share columns. */
|
|
40
|
+
export declare function buildOverviewRows(data: ContextViewData, allocation: ReadonlyMap<ContextViewCategory, number> | undefined): OverviewRow[];
|
|
41
|
+
/** ANSI legend row: cursor, swatch, label padded to `width`, token and share columns. */
|
|
42
|
+
export declare function legendLine(row: OverviewRow, selected: boolean, width: number): string;
|
|
43
|
+
/** Native legend item; `meterGlyphs` swaps map glyphs for the meter's bar glyphs. */
|
|
44
|
+
export declare function legendItem(row: OverviewRow, selected: boolean, meterGlyphs: boolean, window: number): NativeNode;
|
|
45
|
+
/** Map size beside a legend in a `width` × `height` body; undefined when either would not fit. */
|
|
46
|
+
export declare function mapGeometry(width: number, height: number): MapGeometry | undefined;
|
|
47
|
+
/** Map cells per row, in window order: categories, free space, then buffer. */
|
|
48
|
+
export declare function planMapRows(data: ContextViewData, allocation: ReadonlyMap<ContextViewCategory, number>, geometry: MapGeometry): ContextMapCell<ContextPresentationId>[][];
|
|
49
|
+
/** ANSI map row; partially filled cells are dim. */
|
|
50
|
+
export declare function mapRowLine(cells: readonly ContextMapCell<ContextPresentationId>[], geometry: MapGeometry): string;
|
|
51
|
+
/** Native map row; partially filled cells are dim. */
|
|
52
|
+
export declare function mapRowSpans(cells: readonly ContextMapCell<ContextPresentationId>[], geometry: MapGeometry): TspSpan[];
|
|
53
|
+
/** Snapcompact savings lines of the Overview; empty when no snapcompact setting is on. */
|
|
54
|
+
export declare function contextSnapcompactLines(breakdown: ContextBreakdown): string[];
|
|
55
|
+
interface ContextMeterData extends Pick<ContextBreakdown, "contextWindow" | "usedTokens" | "freeTokens" | "autoCompactBufferTokens" | "thresholdTokens"> {
|
|
56
|
+
categories: readonly {
|
|
57
|
+
label: string;
|
|
58
|
+
tokens: number;
|
|
59
|
+
color: ThemeColor;
|
|
60
|
+
}[];
|
|
61
|
+
}
|
|
62
|
+
/** Shared usage and compaction labels for ANSI and native context views. */
|
|
63
|
+
export declare function contextUsageSummary(breakdown: Pick<ContextBreakdown, "contextWindow" | "usedTokens" | "freeTokens" | "thresholdTokens">): {
|
|
64
|
+
used: string;
|
|
65
|
+
detail: string;
|
|
66
|
+
room: string;
|
|
67
|
+
};
|
|
68
|
+
/** Native usage summary and stacked bar; callers provide the category list. */
|
|
69
|
+
export declare function describeContextMeter(breakdown: ContextMeterData): [NativeNode, NativeNode];
|
|
70
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ContextViewData } from "../chrome/context-view-model.js";
|
|
2
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
|
+
import type { Component } from "../tui.js";
|
|
4
|
+
/**
|
|
5
|
+
* Read-only context snapshot with three states: Overview → category previews → full entry content.
|
|
6
|
+
* Navigation state is shared; `render` (ANSI) and `describe` (native) each draw every state,
|
|
7
|
+
* via `#render<State>` and `#describe<State>` respectively.
|
|
8
|
+
*/
|
|
9
|
+
export declare class ContextViewer implements Component {
|
|
10
|
+
#private;
|
|
11
|
+
constructor(data: ContextViewData, options: {
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
requestRender: () => void;
|
|
14
|
+
getRows: () => number;
|
|
15
|
+
});
|
|
16
|
+
invalidate(): void;
|
|
17
|
+
dispose(): void;
|
|
18
|
+
get nativeOverlay(): NonNullable<Component["nativeOverlay"]>;
|
|
19
|
+
/** Capture only handled navigation keys; the focus path consumes other modal input. */
|
|
20
|
+
capturesInput(data: string): boolean;
|
|
21
|
+
handleInput(data: string): void;
|
|
22
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
23
|
+
render(width: number): readonly string[];
|
|
24
|
+
describe(cx: DescribeContext): NativeNode;
|
|
25
|
+
}
|
|
@@ -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;
|
|
@@ -30,9 +30,9 @@ export declare class StatusLineComponent<TSession extends StatusLineSession = St
|
|
|
30
30
|
updateSettings(settings: StatusLineSettings): void;
|
|
31
31
|
getEffectiveSettingsForTest(): EffectiveStatusLineSettings;
|
|
32
32
|
setAutoCompactEnabled(enabled: boolean): void;
|
|
33
|
-
setRunningSubagents(agentIds: readonly string[]):
|
|
33
|
+
setRunningSubagents(agentIds: readonly string[]): boolean;
|
|
34
34
|
/** Host-computed spend of the main session's whole subagent tree (Agent Hub projection). */
|
|
35
|
-
setSubagentTreeCost(cost: number):
|
|
35
|
+
setSubagentTreeCost(cost: number): boolean;
|
|
36
36
|
/**
|
|
37
37
|
* Compatibility shim for callers predating the simplified subagent badge.
|
|
38
38
|
* The status line now intentionally shows only the active count.
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import type { AgentMessage, Tokenizer } from "@oh-my-pi/pi-agent-core";
|
|
2
2
|
import type { CompactionSettings } from "@oh-my-pi/pi-agent-core/compaction";
|
|
3
3
|
import type { Tool as AiTool, Model } from "@oh-my-pi/pi-ai";
|
|
4
|
-
import type { Theme } from "../theme/index.js";
|
|
5
|
-
import { Container } from "../tui.js";
|
|
6
|
-
import type { TspText } from "@oh-my-pi/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 {};
|
|
@@ -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 */
|