@linxiraos/pi-tui 1.4.11 → 1.4.12
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 +33 -240
- package/README.md +4 -1
- package/THIRD-PARTY-NOTICES.txt +4 -5
- package/dist/types/apps/shell-visualizer.d.ts +24 -0
- package/dist/types/autocomplete.d.ts +20 -0
- package/dist/types/chat/cache-invalidation-marker.d.ts +15 -7
- package/dist/types/chat/chat-transcript-builder.d.ts +5 -3
- package/dist/types/chat/display-preferences.d.ts +2 -0
- package/dist/types/chat/extension-types.d.ts +72 -1
- package/dist/types/chat/image-loading.d.ts +2 -2
- package/dist/types/chat/messages.d.ts +2 -3
- package/dist/types/chat/read-tool-group.d.ts +15 -2
- package/dist/types/chat/skill-message.d.ts +1 -0
- package/dist/types/chat/spotlight.d.ts +203 -0
- package/dist/types/chat/tool-execution.d.ts +26 -5
- package/dist/types/chat/transcript-actions.d.ts +11 -0
- package/dist/types/chat/transcript-browser.d.ts +9 -0
- package/dist/types/chat/transcript-presentation.d.ts +164 -0
- package/dist/types/chat/ttsr-notification.d.ts +2 -0
- package/dist/types/chrome/message-frame.d.ts +2 -0
- package/dist/types/chrome/transcript-container.d.ts +27 -6
- package/dist/types/components/loader.d.ts +0 -2
- package/dist/types/components/markdown.d.ts +11 -1
- package/dist/types/components/settings-list.d.ts +12 -2
- package/dist/types/frame-rate.d.ts +18 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/keybinding-matchers.d.ts +4 -1
- package/dist/types/kitty-graphics.d.ts +1 -1
- package/dist/types/motion-effects.d.ts +10 -0
- package/dist/types/native/encode.d.ts +2 -0
- package/dist/types/native/measure.d.ts +10 -0
- package/dist/types/native/overlay.d.ts +1 -1
- package/dist/types/native/quiet.d.ts +5 -0
- package/dist/types/native/reconcile.d.ts +6 -1
- package/dist/types/native/spans.d.ts +6 -0
- package/dist/types/native/state.d.ts +4 -0
- package/dist/types/overlays/agent-hub.d.ts +6 -0
- package/dist/types/overlays/link-browser.d.ts +55 -0
- package/dist/types/overlays/running-subagent-badge.d.ts +1 -4
- package/dist/types/overlays/spotlight-sheet.d.ts +36 -0
- package/dist/types/prompt/composer-attachments.d.ts +5 -2
- package/dist/types/prompt/composer-cache.d.ts +7 -2
- package/dist/types/prompt/composer.d.ts +6 -11
- package/dist/types/prompt/custom-editor.d.ts +8 -2
- package/dist/types/prompt/gradient-highlight.d.ts +2 -2
- package/dist/types/prompt/magic-keywords.d.ts +2 -0
- package/dist/types/prompt/model-mention-autocomplete.d.ts +9 -7
- package/dist/types/prompt/model-mention-syntax.d.ts +6 -0
- package/dist/types/prompt/prompt-action-autocomplete.d.ts +2 -1
- package/dist/types/prompt/welcome.d.ts +19 -0
- package/dist/types/render/extension-links.d.ts +0 -6
- package/dist/types/render/index.d.ts +1 -0
- package/dist/types/render/link-hints.d.ts +78 -0
- package/dist/types/render/render-utils.d.ts +0 -2
- package/dist/types/setup/scenes/types.d.ts +8 -0
- package/dist/types/setup/scenes/updates.d.ts +6 -0
- package/dist/types/setup/wizard.d.ts +7 -2
- package/dist/types/spinner-clock.d.ts +34 -0
- package/dist/types/status-line/component.d.ts +8 -4
- package/dist/types/status-line/host.d.ts +62 -0
- package/dist/types/status-line/index.d.ts +1 -0
- package/dist/types/status-line/prompt-cache.d.ts +14 -0
- package/dist/types/status-line/schema.d.ts +1 -1
- package/dist/types/status-line/startup.d.ts +6 -0
- package/dist/types/status-line/types.d.ts +8 -21
- package/dist/types/theme/schema.d.ts +28 -1
- package/dist/types/theme/symbols.d.ts +1 -1
- package/dist/types/theme/theme-class.d.ts +12 -2
- package/dist/types/theme/theme.d.ts +1 -1
- package/dist/types/theme/tui-adapters.d.ts +7 -0
- package/dist/types/thinking.d.ts +12 -0
- package/dist/types/tools/ask.d.ts +1 -1
- package/dist/types/tools/bash.d.ts +21 -0
- package/dist/types/tools/find.d.ts +9 -1
- package/dist/types/tools/grep.d.ts +2 -1
- package/dist/types/tools/grouped-file-output.d.ts +17 -0
- package/dist/types/tools/job-widget.d.ts +2 -2
- package/dist/types/tools/lsp.d.ts +4 -2
- package/dist/types/tools/native-view.d.ts +4 -0
- package/dist/types/tools/renderer.d.ts +9 -1
- package/dist/types/tools/shell-trace.d.ts +10 -0
- package/dist/types/tools/shell-viz-render.d.ts +6 -0
- package/dist/types/tools/shell-viz.d.ts +16 -0
- package/dist/types/tools/wait.d.ts +2 -2
- package/dist/types/tools/web-search-types.d.ts +1 -0
- package/dist/types/tools/write.d.ts +2 -0
- package/dist/types/tui.d.ts +15 -1
- package/package.json +15 -11
- package/src/apps/shell-visualizer.d.ts +24 -0
- package/src/apps/shell-visualizer.ts +167 -0
- package/src/autocomplete.d.ts +20 -0
- package/src/autocomplete.ts +14 -0
- package/src/chat/assistant-message.ts +11 -6
- package/src/chat/cache-invalidation-marker.d.ts +15 -7
- package/src/chat/cache-invalidation-marker.ts +18 -9
- package/src/chat/chat-transcript-builder.d.ts +5 -3
- package/src/chat/chat-transcript-builder.ts +16 -12
- package/src/chat/display-preferences.d.ts +2 -0
- package/src/chat/display-preferences.ts +3 -0
- package/src/chat/extension-types.d.ts +72 -1
- package/src/chat/extension-types.ts +74 -1
- package/src/chat/image-loading.d.ts +2 -2
- package/src/chat/image-loading.ts +2 -2
- package/src/chat/messages.d.ts +2 -3
- package/src/chat/messages.ts +3 -8
- package/src/chat/read-tool-group.d.ts +15 -2
- package/src/chat/read-tool-group.ts +201 -41
- package/src/chat/skill-message.d.ts +1 -0
- package/src/chat/skill-message.ts +4 -0
- package/src/chat/spotlight.d.ts +203 -0
- package/src/chat/spotlight.ts +460 -0
- package/src/chat/tool-execution.d.ts +26 -5
- package/src/chat/tool-execution.ts +360 -38
- package/src/chat/transcript-actions.d.ts +11 -0
- package/src/chat/transcript-actions.ts +13 -1
- package/src/chat/transcript-browser.d.ts +9 -0
- package/src/chat/transcript-browser.ts +18 -0
- package/src/chat/transcript-presentation.d.ts +164 -0
- package/src/chat/transcript-presentation.ts +642 -0
- package/src/chat/ttsr-notification.d.ts +25 -0
- package/src/chat/ttsr-notification.ts +5 -0
- package/src/chrome/message-frame.d.ts +2 -0
- package/src/chrome/message-frame.ts +7 -0
- package/src/chrome/message-notice.d.ts +58 -0
- package/src/chrome/transcript-container.d.ts +27 -6
- package/src/chrome/transcript-container.ts +317 -66
- package/src/components/editor.ts +25 -1
- package/src/components/loader.d.ts +0 -2
- package/src/components/loader.ts +30 -18
- package/src/components/markdown.d.ts +11 -1
- package/src/components/markdown.ts +41 -16
- package/src/components/settings-list.d.ts +12 -2
- package/src/components/settings-list.ts +29 -13
- package/src/frame-rate.d.ts +18 -0
- package/src/frame-rate.ts +36 -0
- package/src/hotkeys-markdown.ts +4 -1
- package/src/index.d.ts +3 -0
- package/src/index.ts +3 -0
- package/src/keybinding-matchers.d.ts +4 -1
- package/src/keybinding-matchers.ts +13 -12
- package/src/kitty-graphics.d.ts +1 -1
- package/src/kitty-graphics.ts +3 -2
- package/src/motion-effects.d.ts +10 -0
- package/src/motion-effects.ts +27 -0
- package/src/native/backend.ts +66 -7
- package/src/native/encode.d.ts +2 -0
- package/src/native/encode.ts +2 -0
- package/src/native/measure.d.ts +10 -0
- package/src/native/measure.ts +185 -0
- package/src/native/overlay.d.ts +1 -1
- package/src/native/overlay.ts +1 -1
- package/src/native/quiet.d.ts +5 -0
- package/src/native/quiet.ts +105 -0
- package/src/native/reconcile.d.ts +6 -1
- package/src/native/reconcile.ts +16 -10
- package/src/native/spans.d.ts +6 -0
- package/src/native/spans.ts +40 -0
- package/src/native/state.d.ts +4 -0
- package/src/native/state.ts +18 -0
- package/src/overlays/agent-hub.ts +15 -2
- package/src/overlays/ask-dialog.ts +1 -0
- package/src/overlays/btw-history-panel.ts +73 -6
- package/src/overlays/link-browser.ts +295 -0
- package/src/overlays/running-subagent-badge.ts +2 -9
- package/src/overlays/settings-defs.ts +1 -1
- package/src/overlays/settings-selector.ts +17 -3
- package/src/overlays/spotlight-sheet.ts +478 -0
- package/src/overlays/usage-dashboard.ts +6 -5
- package/src/prompt/composer-attachments.d.ts +5 -2
- package/src/prompt/composer-attachments.ts +6 -6
- package/src/prompt/composer-cache.ts +17 -16
- package/src/prompt/composer.ts +30 -123
- package/src/prompt/custom-editor.ts +17 -13
- package/src/prompt/gradient-highlight.d.ts +2 -2
- package/src/prompt/gradient-highlight.ts +5 -4
- package/src/prompt/magic-keywords.d.ts +2 -0
- package/src/prompt/magic-keywords.ts +4 -1
- package/src/prompt/model-mention-autocomplete.ts +73 -20
- package/src/prompt/model-mention-syntax.d.ts +6 -0
- package/src/prompt/model-mention-syntax.ts +9 -0
- package/src/prompt/prompt-action-autocomplete.ts +49 -33
- package/src/prompt/tips.txt +1 -0
- package/src/prompt/welcome.ts +104 -2
- package/src/render/extension-links.d.ts +0 -6
- package/src/render/extension-links.ts +0 -20
- package/src/render/index.d.ts +1 -0
- package/src/render/index.ts +1 -0
- package/src/render/link-hints.d.ts +78 -0
- package/src/render/link-hints.ts +299 -0
- package/src/render/render-utils.d.ts +0 -2
- package/src/render/render-utils.ts +0 -5
- package/src/setup/scenes/glyph.ts +1 -1
- package/src/setup/scenes/types.ts +8 -0
- package/src/setup/scenes/updates.ts +116 -0
- package/src/setup/wizard.ts +19 -8
- package/src/spinner-clock.d.ts +34 -0
- package/src/spinner-clock.ts +79 -0
- package/src/status-line/component.ts +145 -53
- package/src/status-line/host.ts +51 -0
- package/src/status-line/index.ts +1 -0
- package/src/status-line/presets.ts +3 -1
- package/src/status-line/prompt-cache.ts +154 -0
- package/src/status-line/schema.ts +1 -1
- package/src/status-line/segments.ts +33 -22
- package/src/status-line/startup.ts +22 -4
- package/src/status-line/types.ts +8 -22
- package/src/stdin-buffer.ts +89 -46
- package/src/terminal-capabilities.ts +3 -3
- package/src/terminal.ts +1 -8
- package/src/theme/loader.ts +3 -2
- package/src/theme/schema.d.ts +28 -1
- package/src/theme/schema.ts +30 -1
- package/src/theme/symbols.d.ts +1 -1
- package/src/theme/symbols.ts +15 -3
- package/src/theme/theme-class.d.ts +12 -2
- package/src/theme/theme-class.ts +23 -0
- package/src/theme/theme-schema.json +1 -1
- package/src/theme/theme.d.ts +1 -1
- package/src/theme/theme.ts +3 -7
- package/src/theme/tui-adapters.d.ts +7 -0
- package/src/theme/tui-adapters.ts +33 -1
- package/src/thinking.d.ts +12 -0
- package/src/thinking.ts +31 -0
- package/src/tools/ask.d.ts +1 -1
- package/src/tools/ask.ts +99 -38
- package/src/tools/ast-edit.ts +51 -32
- package/src/tools/ast-grep.ts +31 -19
- package/src/tools/bash.d.ts +21 -0
- package/src/tools/bash.ts +166 -24
- package/src/tools/find.d.ts +9 -1
- package/src/tools/find.ts +23 -2
- package/src/tools/grep.d.ts +2 -1
- package/src/tools/grep.ts +52 -36
- package/src/tools/grouped-file-output.d.ts +17 -0
- package/src/tools/grouped-file-output.ts +20 -2
- package/src/tools/job-widget.d.ts +2 -2
- package/src/tools/job-widget.ts +2 -2
- package/src/tools/lsp.d.ts +4 -2
- package/src/tools/lsp.ts +537 -642
- package/src/tools/native-view.d.ts +4 -0
- package/src/tools/native-view.ts +8 -2
- package/src/tools/renderer.d.ts +9 -1
- package/src/tools/renderer.ts +9 -1
- package/src/tools/shell-trace.d.ts +10 -0
- package/src/tools/shell-trace.ts +80 -0
- package/src/tools/shell-viz-render.d.ts +6 -0
- package/src/tools/shell-viz-render.ts +156 -0
- package/src/tools/shell-viz.d.ts +16 -0
- package/src/tools/shell-viz.ts +181 -0
- package/src/tools/streaming-output.ts +18 -8
- package/src/tools/wait.d.ts +2 -2
- package/src/tools/wait.ts +39 -34
- package/src/tools/web-search-types.d.ts +1 -0
- package/src/tools/web-search-types.ts +1 -0
- package/src/tools/write.d.ts +2 -0
- package/src/tools/write.ts +2 -0
- package/src/tui.d.ts +15 -1
- package/src/tui.ts +63 -6
- package/src/windows-input-mode.ts +7 -1
- package/dist/types/chat/collab-prompt-message.d.ts +0 -14
- package/dist/types/chrome/collab-qrcode.d.ts +0 -35
- package/src/chat/collab-prompt-message.d.ts +0 -14
- package/src/chat/collab-prompt-message.ts +0 -46
- package/src/chrome/collab-qrcode.ts +0 -99
|
@@ -138,7 +138,8 @@ export declare function getMarkdownLinkUrls(text: string): string[];
|
|
|
138
138
|
* Each function takes text and returns styled text with ANSI codes.
|
|
139
139
|
*/
|
|
140
140
|
export interface MarkdownTheme {
|
|
141
|
-
heading
|
|
141
|
+
/** Color a heading; `depth` is its level, 1–6. Bold/underline/`#` prefix are already applied. */
|
|
142
|
+
heading: (text: string, depth: number) => string;
|
|
142
143
|
link: (text: string) => string;
|
|
143
144
|
linkUrl: (text: string) => string;
|
|
144
145
|
/** Resolve the OSC 8 destination without changing visible text; undefined preserves the authored URL. */
|
|
@@ -154,6 +155,15 @@ export interface MarkdownTheme {
|
|
|
154
155
|
italic: (text: string) => string;
|
|
155
156
|
strikethrough: (text: string) => string;
|
|
156
157
|
underline: (text: string) => string;
|
|
158
|
+
/**
|
|
159
|
+
* Style `**strong**` spans, including their weight. Omitted → {@link bold}.
|
|
160
|
+
* A theme that colors them owns the span's foreground over a `proseFg` default.
|
|
161
|
+
*/
|
|
162
|
+
strong?: (text: string) => string;
|
|
163
|
+
/** Style `*emphasis*` spans, including their slant. Omitted → {@link italic}; colors win like {@link strong}. */
|
|
164
|
+
emphasis?: (text: string) => string;
|
|
165
|
+
/** Style table header cells, including their weight. Omitted → {@link bold}; colors win like {@link strong}. */
|
|
166
|
+
tableHeader?: (text: string) => string;
|
|
157
167
|
highlightCode?: (code: string, lang?: string) => string[];
|
|
158
168
|
/**
|
|
159
169
|
* Create a stateful incremental highlighter for one streaming code fence.
|
|
@@ -3,6 +3,8 @@ import type { TspPrefsControl, TspPrefsRow, TspPrefsSection } from "@linxiraos/p
|
|
|
3
3
|
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node.js";
|
|
4
4
|
import type { Component } from "../tui.js";
|
|
5
5
|
import { FormField, type FormFieldOptions, type FormFieldTheme } from "./form.js";
|
|
6
|
+
/** Builds a row's editor from its current value; `done` closes it, with the value picked if one was. */
|
|
7
|
+
export type SettingEditor = (currentValue: string, done: (selectedValue?: string) => void) => Component;
|
|
6
8
|
export interface SettingItem {
|
|
7
9
|
/** Unique identifier for this setting */
|
|
8
10
|
id: string;
|
|
@@ -17,7 +19,12 @@ export interface SettingItem {
|
|
|
17
19
|
/** If provided, Enter/Space cycles through these values */
|
|
18
20
|
values?: string[];
|
|
19
21
|
/** If provided, Enter opens this submenu. Receives current value and done callback. */
|
|
20
|
-
submenu?:
|
|
22
|
+
submenu?: SettingEditor;
|
|
23
|
+
/**
|
|
24
|
+
* A `values` row's choices as a menu: a native settings page's popup button
|
|
25
|
+
* opens it ({@link SettingsList.openSubmenuFor}); Enter/Space still cycle.
|
|
26
|
+
*/
|
|
27
|
+
menu?: SettingEditor;
|
|
21
28
|
/** True when the displayed setting differs from its default value. */
|
|
22
29
|
changed?: boolean;
|
|
23
30
|
/** The default, as a native settings page names it in the changed dot's title. */
|
|
@@ -142,7 +149,10 @@ export declare class SettingsList implements Component {
|
|
|
142
149
|
prefsEditing(inlineMenu: (id: string) => boolean): PrefsEditing | null;
|
|
143
150
|
/** Applies `value` to a cycling (boolean/enum) row the way Enter does: the row shows it and `onChange` runs. */
|
|
144
151
|
applyValue(id: string, value: string): void;
|
|
145
|
-
/**
|
|
152
|
+
/**
|
|
153
|
+
* Opens row `id`'s submenu (a cycling row's `menu`) the way Enter opens a
|
|
154
|
+
* submenu, leaving one already open for it; returns it.
|
|
155
|
+
*/
|
|
146
156
|
openSubmenuFor(id: string): Component | undefined;
|
|
147
157
|
/** Resize the visible viewport (fullscreen hosts call this every render). */
|
|
148
158
|
setMaxVisible(rows: number): void;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The frame-rate ceiling (`tui.maxFps`): the render scheduler paints no closer than
|
|
3
|
+
* {@link minFrameIntervalMs}, except frames a keystroke is waiting on. Dependency-free: the host's
|
|
4
|
+
* flag table imports it during CLI bootstrap.
|
|
5
|
+
*/
|
|
6
|
+
/** Default ceiling, in frames per second (the historical scheduler cadence). */
|
|
7
|
+
export declare const DEFAULT_MAX_FPS = 30;
|
|
8
|
+
/** Shortest interval between two frames at the live ceiling, in milliseconds. */
|
|
9
|
+
export declare function minFrameIntervalMs(): number;
|
|
10
|
+
/** Set the ceiling; callers pass a value {@link parseMaxFps} accepted. Applies from the next scheduled frame. */
|
|
11
|
+
export declare function setMaxFps(next: number): void;
|
|
12
|
+
/**
|
|
13
|
+
* Canonicalize a configured ceiling: an integer from 1 to 120. Numeric strings are accepted so one
|
|
14
|
+
* parser serves the CLI flag, the environment variable, and the setting.
|
|
15
|
+
*
|
|
16
|
+
* @throws Error on a non-numeric, fractional, or out-of-range value.
|
|
17
|
+
*/
|
|
18
|
+
export declare function parseMaxFps(value: unknown): number;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -15,6 +15,9 @@ export * from "./components/layout/row.js";
|
|
|
15
15
|
export * from "./components/layout/split-pane.js";
|
|
16
16
|
export * from "./components/layout/stack.js";
|
|
17
17
|
export * from "./components/loader.js";
|
|
18
|
+
export * from "./spinner-clock.js";
|
|
19
|
+
export * from "./frame-rate.js";
|
|
20
|
+
export * from "./motion-effects.js";
|
|
18
21
|
export * from "./components/markdown.js";
|
|
19
22
|
export * from "./components/menu-selection.js";
|
|
20
23
|
export * from "./components/metric.js";
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { KeyId } from "./app-keybindings.js";
|
|
2
|
+
import { type KeybindingsManager } from "./keybindings.js";
|
|
2
3
|
/**
|
|
3
4
|
* Match the coding-agent interrupt key.
|
|
4
5
|
*
|
|
@@ -38,8 +39,10 @@ export declare function matchesAppExternalEditor(data: string): boolean;
|
|
|
38
39
|
* effective follow-up binding.
|
|
39
40
|
*/
|
|
40
41
|
export declare function matchesAppFollowUp(data: string): boolean;
|
|
42
|
+
/** Effective follow-up keys: the `app.message.followUp` bindings, or Ctrl+Enter/Ctrl+Q when unbound. */
|
|
43
|
+
export declare function appFollowUpKeys(keybindings?: KeybindingsManager): readonly KeyId[];
|
|
41
44
|
/** Effective tool-approval keys: the `app.approval.approve` bindings, or Ctrl+Enter/Ctrl+Q when unbound. */
|
|
42
|
-
export declare function appApproveKeys(): readonly KeyId[];
|
|
45
|
+
export declare function appApproveKeys(keybindings?: KeybindingsManager): readonly KeyId[];
|
|
43
46
|
/** Match the tool-approval key, recognizing modifier-tagged LF as Ctrl+Enter like {@link matchesAppFollowUp}. */
|
|
44
47
|
export declare function matchesAppApprove(data: string): boolean;
|
|
45
48
|
/**
|
|
@@ -26,7 +26,7 @@ export interface KittyGraphicsFeatures {
|
|
|
26
26
|
* Whether the detected terminal renders Kitty Unicode placeholders (`U=1` +
|
|
27
27
|
* U+10EEEE with row/column diacritics).
|
|
28
28
|
*
|
|
29
|
-
* Kitty, Ghostty and
|
|
29
|
+
* Kitty, Ghostty, Otty and Tern advertise placeholder support directly. A multiplexer
|
|
30
30
|
* cannot use cursor-positioned placements because the outer terminal does not
|
|
31
31
|
* know pane scroll/reflow state. An explicit `PI_FORCE_IMAGE_PROTOCOL=kitty`
|
|
32
32
|
* opts into placeholders under any multiplexer — matching `timg -pk`.
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Decorative motion with no knob of its own — the status-line blink and brand fade, the editor's
|
|
3
|
+
* magic-keyword sweep, native `fx` spans — behind one switch the host's `tui.motion` preset drives.
|
|
4
|
+
*/
|
|
5
|
+
/** Whether decorative motion may run. */
|
|
6
|
+
export declare function motionEffectsEnabled(): boolean;
|
|
7
|
+
/** Enable or disable decorative motion. Timer-driven effects stop at their next frame. */
|
|
8
|
+
export declare function setMotionEffects(next: boolean): void;
|
|
9
|
+
/** Observe switch flips, for output nothing would otherwise re-describe; returns the unsubscribe. */
|
|
10
|
+
export declare function onMotionEffectsChange(listener: () => void): () => void;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { type TspEvent, type TspReply, type TspVerb } from "@linxiraos/pi-wire";
|
|
2
2
|
/** Every TSP message starts with this. */
|
|
3
3
|
export declare const TSP_PREFIX = "\u001B_tsp;";
|
|
4
|
+
/** TSP input framing through ConPTY, whose input parser discards APC. */
|
|
5
|
+
export declare const TSP_OSC_PREFIX = "\u001B]877;tsp;";
|
|
4
6
|
/** The terminal's hello reply. */
|
|
5
7
|
export type TspHello = Extract<TspReply, {
|
|
6
8
|
r: "hello";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Component } from "../tui.js";
|
|
2
|
+
import type { NativeChild, NativeNode } from "./node.js";
|
|
3
|
+
/** The last description of a component, or undefined when unknown. */
|
|
4
|
+
export type DescribedOf = (component: Component) => NativeNode | undefined;
|
|
5
|
+
/**
|
|
6
|
+
* Estimated rows of `root` at `cols` cells wide, stopping once `limit` is
|
|
7
|
+
* reached (the result never exceeds it). Component children are measured
|
|
8
|
+
* through `described`.
|
|
9
|
+
*/
|
|
10
|
+
export declare function estimateRows(root: NativeChild, cols: number, limit: number, described: DescribedOf): number;
|
|
@@ -10,7 +10,7 @@ import type { TspProps, TspSpan, TspText } from "@linxiraos/pi-wire";
|
|
|
10
10
|
import { type KeyName } from "../key-hint-format.js";
|
|
11
11
|
import { type Keybinding } from "../keybindings.js";
|
|
12
12
|
import type { NativeChild, NativeNode } from "./node.js";
|
|
13
|
-
/** Below this many columns a centered sheet fills the pane instead of floating with margins. */
|
|
13
|
+
/** Below this many columns a centered sheet with tall content fills the pane instead of floating with margins. */
|
|
14
14
|
export declare const NARROW_SHEET_COLS = 100;
|
|
15
15
|
/** One footer hint: the keys that trigger it and what it does. */
|
|
16
16
|
export interface NativeHint {
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { NativeNode } from "./node.js";
|
|
2
|
+
/** Forget cached translations; the backend calls this when a motion switch flips, then re-describes. */
|
|
3
|
+
export declare function resetQuietMotion(): void;
|
|
4
|
+
/** `node` as described, or with its terminal-clocked animations stilled per the motion switches. */
|
|
5
|
+
export declare function quietMotion(node: NativeNode): NativeNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type TspOp } from "@linxiraos/pi-wire";
|
|
2
2
|
import { type Component } from "../tui.js";
|
|
3
|
-
import type { DescribeContext, NativeChild } from "./node.js";
|
|
3
|
+
import type { DescribeContext, NativeChild, NativeNode } from "./node.js";
|
|
4
4
|
/** The regions a frame fills. */
|
|
5
5
|
export interface NativeRegions {
|
|
6
6
|
readonly main: readonly NativeChild[];
|
|
@@ -41,6 +41,11 @@ export declare class Reconciler {
|
|
|
41
41
|
itemKey(id: string): string;
|
|
42
42
|
/** Wire id of the first `editor`/`input` `component` describes (for `focus`), or null. */
|
|
43
43
|
focusTarget(component: Component): string | null;
|
|
44
|
+
/**
|
|
45
|
+
* The last description of `component` on this surface (a settled one only
|
|
46
|
+
* while still referenced elsewhere), or undefined when it isn't mounted.
|
|
47
|
+
*/
|
|
48
|
+
described(component: Component): NativeNode | undefined;
|
|
44
49
|
/** Stop referencing ids the terminal dropped (`gone`). */
|
|
45
50
|
forget(ids: readonly string[]): void;
|
|
46
51
|
}
|
|
@@ -17,5 +17,11 @@ export declare function styleSpans(content: string, style?: (text: string) => st
|
|
|
17
17
|
export declare function compactText(spans: readonly TspSpan[]): TspText;
|
|
18
18
|
/** Pre-rendered ANSI rows as one unwrapped text block (rows already carry their line breaks). */
|
|
19
19
|
export declare function rowsText(lines: readonly string[]): NativeNode;
|
|
20
|
+
/**
|
|
21
|
+
* Styled text as one ANSI terminal line: the reverse of {@link styledSpans}. Each span takes the
|
|
22
|
+
* last theme colour (or semantic colour token) in `s`, bold for `strong` and italic for `em`; text
|
|
23
|
+
* is sanitized like {@link plainText} and line breaks become spaces.
|
|
24
|
+
*/
|
|
25
|
+
export declare function spansLine(content: TspText): string;
|
|
20
26
|
/** Theme background token of the first SGR background in ANSI-styled text. */
|
|
21
27
|
export declare function styledBackground(styled: string): ThemeBg | undefined;
|
|
@@ -6,5 +6,9 @@ export declare function setNativeRendering(on: boolean): void;
|
|
|
6
6
|
export declare function nativeButtons(): boolean;
|
|
7
7
|
/** Called by the native backend when it adopts a `hello` reply and when it stops. */
|
|
8
8
|
export declare function setNativeButtons(on: boolean): void;
|
|
9
|
+
/** Whether a live surface's terminal paces streamed `md` (see {@link setNativePacing}). */
|
|
10
|
+
export declare function nativePacing(): boolean;
|
|
11
|
+
/** Called by the native backend when it adopts a `hello` reply and when it stops. */
|
|
12
|
+
export declare function setNativePacing(on: boolean): void;
|
|
9
13
|
/** Call `listener` whenever native rendering starts or stops; returns the unsubscribe. */
|
|
10
14
|
export declare function onNativeRenderingChange(listener: (on: boolean) => void): () => void;
|
|
@@ -56,6 +56,12 @@ export interface AgentHubDeps<TRecord extends AgentRecordLike = AgentRecordLike>
|
|
|
56
56
|
requestRender: () => void;
|
|
57
57
|
/** Registry supplying the roster. */
|
|
58
58
|
registry: AgentHubRegistry<TRecord>;
|
|
59
|
+
/**
|
|
60
|
+
* Whether a registry ref belongs to the open session's tree. The host registry
|
|
61
|
+
* outlives `/new` and session switches, so earlier sessions' agents stay
|
|
62
|
+
* registered; absent, every ref is listed.
|
|
63
|
+
*/
|
|
64
|
+
inSession?: (ref: AgentRecordLike) => boolean;
|
|
59
65
|
/** Resolve lifecycle actions lazily when a local action needs them. */
|
|
60
66
|
lifecycle: () => AgentLifecycleLike<TRecord>;
|
|
61
67
|
/** Host message bus supplying unread counts. */
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fullscreen extension link browser: the transcript replayed on the alternate screen, so links
|
|
3
|
+
* that have scrolled into terminal scrollback (which omp cannot draw over) can be picked too.
|
|
4
|
+
*
|
|
5
|
+
* Each extension link label ({@link extensionLinkLabels}) on the rows in view gets a hint tag that
|
|
6
|
+
* it keeps while it stays in view (see {@link LinkHints.update}); typing a whole tag, or a left click on
|
|
7
|
+
* a label, picks its link. Arrows, Page Up/Down, Home/End and the wheel scroll; Esc closes; other
|
|
8
|
+
* keys do nothing. The browser stays open after a pick, so an extension redrawing the reply
|
|
9
|
+
* ({@link LinkBrowserComponent.rerenderMessage}) is seen in place.
|
|
10
|
+
*
|
|
11
|
+
* The transcript is a snapshot taken when the browser opens: a reply still streaming shows as far
|
|
12
|
+
* as it had come. Like `/copy`, it replays the recent part of a long branch first, and the rest
|
|
13
|
+
* once the view scrolls to its top.
|
|
14
|
+
*/
|
|
15
|
+
import type { AgentTool } from "@linxiraos/pi-agent-core";
|
|
16
|
+
import type { AssistantTextRenderer, MessageRenderer } from "../chat/extension-types.js";
|
|
17
|
+
import { type TranscriptEntryLike as TranscriptEntry } from "../chat/transcript-entry.js";
|
|
18
|
+
import type { Component, TUI } from "../tui.js";
|
|
19
|
+
export interface LinkBrowserDeps {
|
|
20
|
+
ui: TUI;
|
|
21
|
+
getTool?: (name: string) => AgentTool | undefined;
|
|
22
|
+
/** Whether the active registry entry came from a built-in factory. */
|
|
23
|
+
isBuiltInTool?: (name: string) => boolean;
|
|
24
|
+
getMessageRenderer?: (customType: string) => MessageRenderer | undefined;
|
|
25
|
+
cwd: string;
|
|
26
|
+
hideThinkingBlock?: () => boolean;
|
|
27
|
+
proseOnlyThinking?: () => boolean;
|
|
28
|
+
expandThinkingBlocks?: () => boolean;
|
|
29
|
+
linkTargets?: ReadonlyMap<string, string>;
|
|
30
|
+
/** The extension assistant text renderers the transcript draws with, which may write the links. */
|
|
31
|
+
textRenderers: readonly AssistantTextRenderer[];
|
|
32
|
+
requestRender: () => void;
|
|
33
|
+
/** A link was picked: raise `link_activate` for `url`. */
|
|
34
|
+
onActivate: (url: string) => void;
|
|
35
|
+
onClose: () => void;
|
|
36
|
+
}
|
|
37
|
+
export declare class LinkBrowserComponent implements Component {
|
|
38
|
+
#private;
|
|
39
|
+
constructor(entries: TranscriptEntry[], deps: LinkBrowserDeps);
|
|
40
|
+
/**
|
|
41
|
+
* Whether the transcript draws any extension link at frame width `width`. The recent part is
|
|
42
|
+
* checked first; the whole branch is replayed only when that part has none.
|
|
43
|
+
*/
|
|
44
|
+
hasLinks(width: number): boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Redraw the browser's copy of the reply sent at `timestamp`, re-running the text renderers;
|
|
47
|
+
* returns whether it holds one. The rows above it stay where they are on screen, and the links
|
|
48
|
+
* below it keep their tags on the rows they move to.
|
|
49
|
+
*/
|
|
50
|
+
rerenderMessage(timestamp: number): boolean;
|
|
51
|
+
invalidate(): void;
|
|
52
|
+
dispose(): void;
|
|
53
|
+
handleInput(data: string): void;
|
|
54
|
+
render(width: number): readonly string[];
|
|
55
|
+
}
|
|
@@ -1,8 +1,5 @@
|
|
|
1
1
|
import { type AgentHubRegistry } from "./agent-hub-types.js";
|
|
2
|
-
export
|
|
3
|
-
agentRegistry: T;
|
|
4
|
-
}
|
|
5
|
-
export declare function getRunningSubagentBadgeRegistry<T extends AgentHubRegistry>(collabGuest: RunningSubagentRegistrySource<T> | undefined, localRegistry: T): T;
|
|
2
|
+
export declare function getRunningSubagentBadgeRegistry<T extends AgentHubRegistry>(localRegistry: T): T;
|
|
6
3
|
export declare function getRunningSubagentBadgeAgentIds(registry: AgentHubRegistry): string[];
|
|
7
4
|
/**
|
|
8
5
|
* Agents the Agent Hub roster can show (every registry ref but the main
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { type SpotlightDetails, type SpotlightOriginal } from "../chat/spotlight.js";
|
|
2
|
+
import type { NativeNode, NativeUiEvent } from "../native/node.js";
|
|
3
|
+
import type { Component } from "../tui.js";
|
|
4
|
+
export interface SpotlightSheetOptions {
|
|
5
|
+
spotlight: SpotlightDetails & {
|
|
6
|
+
original: SpotlightOriginal;
|
|
7
|
+
};
|
|
8
|
+
/** The original text, as its artifact holds it. */
|
|
9
|
+
original: string;
|
|
10
|
+
/**
|
|
11
|
+
* The text the model saw, or of a held-out result the would-be text its `shapedUrl` holds (its lines label folds and
|
|
12
|
+
* give the shaping notes, through the trace's `map`).
|
|
13
|
+
*/
|
|
14
|
+
reduced: string;
|
|
15
|
+
close(): void;
|
|
16
|
+
}
|
|
17
|
+
export declare class SpotlightSheet implements Component {
|
|
18
|
+
#private;
|
|
19
|
+
readonly nativeOverlay: {
|
|
20
|
+
role: string;
|
|
21
|
+
head: string;
|
|
22
|
+
size: "lg";
|
|
23
|
+
anchor: "center";
|
|
24
|
+
};
|
|
25
|
+
constructor(options: SpotlightSheetOptions);
|
|
26
|
+
describe(): NativeNode;
|
|
27
|
+
render(width: number): string[];
|
|
28
|
+
invalidate(): void;
|
|
29
|
+
handleInput(data: string): void;
|
|
30
|
+
/** Close runs what Esc runs; the parameters' toggle shows every parameter or only the intent. */
|
|
31
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
32
|
+
}
|
|
33
|
+
/** Whether a trace has an original to show. */
|
|
34
|
+
export declare function hasSpotlightOriginal(spotlight: SpotlightDetails): spotlight is SpotlightDetails & {
|
|
35
|
+
original: SpotlightOriginal;
|
|
36
|
+
};
|
|
@@ -22,9 +22,12 @@ export declare function modelChipStyle(label: string, restore?: string): string;
|
|
|
22
22
|
export declare function collapseSkillTokens(text: string, isKnown: (name: string) => boolean, register: (label: string, expansion: string) => void): string;
|
|
23
23
|
/**
|
|
24
24
|
* Replaces mentionable model selectors with their display chips and registers
|
|
25
|
-
* each chip's canonical selector as its atomic editor expansion.
|
|
25
|
+
* each chip's canonical `^selector` as its atomic editor expansion.
|
|
26
26
|
*/
|
|
27
|
-
export declare function collapseModelMentions(text: string,
|
|
27
|
+
export declare function collapseModelMentions(text: string, chipFor: (selector: string) => {
|
|
28
|
+
label: string;
|
|
29
|
+
selector: string;
|
|
30
|
+
} | undefined, register: (label: string, expansion: string) => void): string;
|
|
28
31
|
/** Compact atomic composer token for attachment `n` in the active symbol preset. */
|
|
29
32
|
export declare function chipLabel(kind: ChipKind, n: number): string;
|
|
30
33
|
/** Infers an attachment kind from a chip label emitted by any configured symbol preset. */
|
|
@@ -33,7 +33,12 @@ export declare class ComposerCache {
|
|
|
33
33
|
read(cwd: string): ComposerStartupCache;
|
|
34
34
|
/** Resolved theme and composer settings for the next prepaint. */
|
|
35
35
|
writeUi(cwd: string, preferences: ComposerPreferences, theme: ComposerThemePreferences): void;
|
|
36
|
-
/**
|
|
37
|
-
|
|
36
|
+
/**
|
|
37
|
+
* Status-bar inputs for the next prepaint's startup status line. `shared: false`
|
|
38
|
+
* keeps them out of the any-project fallback (a project-scoped default model).
|
|
39
|
+
*/
|
|
40
|
+
writeStatus(cwd: string, status: ComposerStatusCache, options?: {
|
|
41
|
+
shared?: boolean;
|
|
42
|
+
}): void;
|
|
38
43
|
close(): void;
|
|
39
44
|
}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import type { StatusLineComponent } from "../status-line/component.js";
|
|
2
|
+
import { type ViewportLink } from "../render/link-hints.js";
|
|
2
3
|
import type { StatusLineSession } from "../status-line/host.js";
|
|
3
4
|
import { type StatusLineStartupData } from "../status-line/startup.js";
|
|
4
5
|
import { type Terminal } from "../terminal.js";
|
|
5
6
|
import { type Component, Container, type ResizeScrollbackMode, type TerminalFramePlan, type TerminalFrameProvider, TUI, type TUIOptions, type ViewportSize } from "../tui.js";
|
|
6
|
-
import type { NativeSurface, NativeSurfaceProvider } from "../native/node.js";
|
|
7
|
+
import type { DescribeContext, NativeSurface, NativeSurfaceProvider } from "../native/node.js";
|
|
7
8
|
import { CustomEditor } from "./custom-editor.js";
|
|
8
9
|
import type { WordCompletionMethod } from "./word-completion.js";
|
|
9
|
-
import { WelcomeComponent } from "./welcome.js";
|
|
10
|
+
import { type VersionUpdate, WelcomeComponent } from "./welcome.js";
|
|
10
11
|
/** Live settings that affect the composer before and after session adoption. */
|
|
11
12
|
export interface ComposerPreferences {
|
|
12
13
|
readonly quiet: boolean;
|
|
@@ -27,6 +28,8 @@ export declare const COMPOSER_DEFAULTS: ComposerPreferences;
|
|
|
27
28
|
/** Welcome data that can be supplied initially or patched as startup resolves it. */
|
|
28
29
|
export interface ComposerWelcomeUpdate {
|
|
29
30
|
readonly version?: string;
|
|
31
|
+
/** Background self-update activity after the version label; `null` clears it. */
|
|
32
|
+
readonly versionUpdate?: VersionUpdate | null;
|
|
30
33
|
}
|
|
31
34
|
/**
|
|
32
35
|
* Status-bar inputs persisted by the last session. The first frame renders
|
|
@@ -115,14 +118,6 @@ export interface ViewportClickRowTarget {
|
|
|
115
118
|
* decides focusability and recency.
|
|
116
119
|
*/
|
|
117
120
|
export declare function routeViewportClick(spans: readonly ViewportClickSpan[], index: number): string[];
|
|
118
|
-
/** An extension link label drawn on a mutable-viewport line: what a click or hint tag lands on. */
|
|
119
|
-
export interface ViewportLink {
|
|
120
|
-
readonly url: string;
|
|
121
|
-
/** Mutable-viewport line the label is drawn on. */
|
|
122
|
-
readonly row: number;
|
|
123
|
-
/** First cell of the label's part on that line. */
|
|
124
|
-
readonly start: number;
|
|
125
|
-
}
|
|
126
121
|
/**
|
|
127
122
|
* Called once when link-hint mode ends; `reason` is `"crowded"` when a row held more links than
|
|
128
123
|
* their tags could fit side by side, so no tags were drawn.
|
|
@@ -160,7 +155,7 @@ export declare class Composer implements TerminalFrameProvider, NativeSurfacePro
|
|
|
160
155
|
* row, the editor and the status line. There is no history/viewport split:
|
|
161
156
|
* retirement, resize replay and hover bands are ANSI concerns.
|
|
162
157
|
*/
|
|
163
|
-
describeSurface(): NativeSurface;
|
|
158
|
+
describeSurface(cx: DescribeContext): NativeSurface;
|
|
164
159
|
/**
|
|
165
160
|
* Candidate subagent ids under a mutable-viewport line, for click-to-focus.
|
|
166
161
|
* Empty when the line has no click target (chrome, separators, retired rows
|
|
@@ -169,8 +169,14 @@ export declare class CustomEditor extends Editor {
|
|
|
169
169
|
* to "none known".
|
|
170
170
|
*/
|
|
171
171
|
skillFilePath: (name: string) => string | undefined;
|
|
172
|
-
/**
|
|
173
|
-
|
|
172
|
+
/**
|
|
173
|
+
* Host-owned model probe: a mentionable `provider/id[:level]` selector's chip label and
|
|
174
|
+
* canonical selector, so equivalent spellings (`:hi`/`:high`, bare/`:auto`) share a chip.
|
|
175
|
+
*/
|
|
176
|
+
resolveModelMention: (selector: string) => {
|
|
177
|
+
label: string;
|
|
178
|
+
selector: string;
|
|
179
|
+
} | undefined;
|
|
174
180
|
/** Host-owned session probe: maps a persisted model pseudonym back to its selector. */
|
|
175
181
|
modelMentionSelector: (agent: string) => string | undefined;
|
|
176
182
|
/**
|
|
@@ -19,8 +19,8 @@ export interface GradientHighlightSpec {
|
|
|
19
19
|
hue: (t: number) => number;
|
|
20
20
|
/** HSL saturation percentage. Default 90. */
|
|
21
21
|
saturation?: number;
|
|
22
|
-
/** HSL lightness percentage. Default 62. */
|
|
23
|
-
lightness?: number;
|
|
22
|
+
/** Maps a normalized position `t` in [0, 1) to an HSL lightness percentage. Default: 62 everywhere. */
|
|
23
|
+
lightness?: (t: number) => number;
|
|
24
24
|
}
|
|
25
25
|
/**
|
|
26
26
|
* Build a stateless highlighter that paints each standalone match of `highlight`
|
|
@@ -12,6 +12,8 @@ export interface MagicKeywordSpec {
|
|
|
12
12
|
readonly word: string;
|
|
13
13
|
/** HSL hue sweep `[from, to]` in degrees painted across the word; `to` may exceed 360 to wrap through red. */
|
|
14
14
|
readonly hue: readonly [number, number];
|
|
15
|
+
/** HSL lightness sweep `[from, to]` in percent painted alongside `hue`; omitted keeps the default lightness. */
|
|
16
|
+
readonly lightness?: readonly [number, number];
|
|
15
17
|
}
|
|
16
18
|
export interface RegisteredKeyword {
|
|
17
19
|
readonly word: string;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type { Model } from "@linxiraos/pi-ai";
|
|
2
|
-
import type { AutocompleteItem } from "../index.js";
|
|
2
|
+
import type { AutocompleteItem, ModelMentionCompletion } from "../index.js";
|
|
3
3
|
import type { ModelBrowserRegistry, ModelBrowserSource } from "../overlays/model-browser.js";
|
|
4
4
|
import type { ModelBrowserItem } from "../overlays/model-browser.js";
|
|
5
|
-
/**
|
|
6
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Supplies picker-ranked model candidates for the query after `^`. `availableModelIds`
|
|
7
|
+
* lists every available model's selector, in or out of the picker scope.
|
|
8
|
+
*/
|
|
9
|
+
export type ModelMentionCandidateSource = ((query: string) => ReadonlyArray<ModelBrowserItem>) & {
|
|
10
|
+
availableModelIds?: () => ReadonlySet<string>;
|
|
11
|
+
};
|
|
7
12
|
/** Whether an autocomplete prefix belongs to a model mention. */
|
|
8
13
|
export declare function isModelMentionPrefix(prefix: string): boolean;
|
|
9
14
|
/** Build model mention choices for the whitespace-delimited token at the cursor. */
|
|
10
|
-
export declare function getModelMentionSuggestions(textBeforeCursor: string, candidates: ModelMentionCandidateSource | undefined):
|
|
11
|
-
items: AutocompleteItem[];
|
|
12
|
-
prefix: string;
|
|
13
|
-
} | null;
|
|
15
|
+
export declare function getModelMentionSuggestions(textBeforeCursor: string, candidates: ModelMentionCandidateSource | undefined): ModelMentionCompletion;
|
|
14
16
|
/** Replace the live mention token with the selected canonical selector and a trailing space. */
|
|
15
17
|
export declare function applyModelMentionCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
|
|
16
18
|
lines: string[];
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* the startup composer prepaint graph never loads the catalog or task agents.
|
|
5
5
|
*/
|
|
6
6
|
import type { Model } from "@linxiraos/pi-ai";
|
|
7
|
+
import type { Effort } from "@linxiraos/pi-catalog/effort";
|
|
7
8
|
/** Whitespace-delimited token; groups are leading delimiter and selector. Reset lastIndex before reuse. */
|
|
8
9
|
export declare const MODEL_MENTION_RE: RegExp;
|
|
9
10
|
/** Submitted mention; groups are agent pseudonym and display name. */
|
|
@@ -11,8 +12,11 @@ export declare const MODEL_MENTION_TAG_RE: RegExp;
|
|
|
11
12
|
/** A user-tagged model usable as a subagent pseudonym on the current session branch. */
|
|
12
13
|
export interface ModelMention {
|
|
13
14
|
agent: string;
|
|
15
|
+
/** Canonical selector: `provider/id`, plus `:<effort>` when the tag names one. */
|
|
14
16
|
selector: string;
|
|
15
17
|
name: string;
|
|
18
|
+
/** Initial effort from the tag's `:<level>` suffix; absent keeps the agent's default policy. */
|
|
19
|
+
thinkingLevel?: Effort;
|
|
16
20
|
}
|
|
17
21
|
/** Expand a composer atom back into its canonical model selector. */
|
|
18
22
|
export declare function modelMentionToken(selector: string): string;
|
|
@@ -20,5 +24,7 @@ export declare function modelMentionToken(selector: string): string;
|
|
|
20
24
|
export declare function modelMentionTag(mention: ModelMention): string;
|
|
21
25
|
/** Use the catalog display name, without quotes, or the id when the name is empty. */
|
|
22
26
|
export declare function modelMentionDisplayName(model: Model): string;
|
|
27
|
+
/** Display name of a mention, naming the tagged effort so tags of one model stay distinct. */
|
|
28
|
+
export declare function modelMentionName(displayName: string, thinkingLevel: Effort): string;
|
|
23
29
|
/** Restore known submitted tags to editable selectors; leave unknown agents literal. */
|
|
24
30
|
export declare function expandModelMentionTags(text: string, selectorFor: (agent: string) => string | undefined): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AutocompleteItem, type AutocompleteProvider, type SlashCommand } from "../index.js";
|
|
1
|
+
import { type AutocompleteItem, type AutocompleteProvider, type ModelMentionCompletion, type SlashCommand } from "../index.js";
|
|
2
2
|
import { type KeybindingsManager } from "../app-keybindings.js";
|
|
3
3
|
import { type InternalUrlCallerContext } from "./internal-url-autocomplete.js";
|
|
4
4
|
import { type ModelMentionCandidateSource } from "./model-mention-autocomplete.js";
|
|
@@ -50,6 +50,7 @@ export declare class PromptActionAutocompleteProvider implements AutocompletePro
|
|
|
50
50
|
items: AutocompleteItem[];
|
|
51
51
|
prefix: string;
|
|
52
52
|
} | null;
|
|
53
|
+
trySyncModelMentionCompletion(lines: string[], cursorLine: number, cursorCol: number): ModelMentionCompletion;
|
|
53
54
|
trySyncInlineReplace(textBeforeCursor: string): {
|
|
54
55
|
replaceLen: number;
|
|
55
56
|
insert: string;
|
|
@@ -26,6 +26,23 @@ export declare function pickWeightedTip(tips: readonly string[], r: number): str
|
|
|
26
26
|
* `width` leaves no room for a useful line.
|
|
27
27
|
*/
|
|
28
28
|
export declare function renderWelcomeTip(tip: string, width: number, phase?: number, isNew?: boolean): string[];
|
|
29
|
+
/**
|
|
30
|
+
* Background self-update activity shown after the welcome banner's version
|
|
31
|
+
* label: `updating` while a newer `version` downloads (`fraction` once bytes
|
|
32
|
+
* are counted) or installs, `ready` once the next launch starts it, `failed`
|
|
33
|
+
* when the attempt stopped.
|
|
34
|
+
*/
|
|
35
|
+
export type VersionUpdate = {
|
|
36
|
+
phase: "updating";
|
|
37
|
+
version: string;
|
|
38
|
+
fraction?: number;
|
|
39
|
+
} | {
|
|
40
|
+
phase: "ready";
|
|
41
|
+
version: string;
|
|
42
|
+
} | {
|
|
43
|
+
phase: "failed";
|
|
44
|
+
version: string;
|
|
45
|
+
};
|
|
29
46
|
/**
|
|
30
47
|
* The session's welcome banner. In a terminal: the gradient mark beside the
|
|
31
48
|
* `Zeta` wordmark, with the version under the wordmark and the `Linxira-Zeta`
|
|
@@ -67,6 +84,8 @@ export declare class WelcomeComponent implements Component {
|
|
|
67
84
|
stopIntro(): void;
|
|
68
85
|
/** Update the version embedded in the welcome border title. */
|
|
69
86
|
setVersion(version: string): void;
|
|
87
|
+
/** Show (or with `null`, clear) background self-update activity after the version label. */
|
|
88
|
+
setVersionUpdate(update: VersionUpdate | null): void;
|
|
70
89
|
render(termWidth: number): readonly string[];
|
|
71
90
|
}
|
|
72
91
|
/** Brand mark: FIGlet `ANSI Shadow` render of `Z` (generated). */
|
|
@@ -31,12 +31,6 @@ export declare function extensionLinkScheme(href: string): string | undefined;
|
|
|
31
31
|
* not change between renders of the same text, or rows rendered twice stop matching.
|
|
32
32
|
*/
|
|
33
33
|
export declare function formatExtensionLink(label: string, href: string, key: string): string;
|
|
34
|
-
/**
|
|
35
|
-
* Tags for `count` links in keyboard link-hint mode: single letters while they suffice, otherwise
|
|
36
|
-
* two letters each, so no tag is a prefix of another. At most the alphabet squared (676) are made;
|
|
37
|
-
* links past that stay untagged.
|
|
38
|
-
*/
|
|
39
|
-
export declare function linkHintTags(count: number): string[];
|
|
40
34
|
/**
|
|
41
35
|
* `line` without omp's extension-link markers (the OSC 8 open and close around each label), for
|
|
42
36
|
* terminal output. Every other hyperlink is kept as is.
|
|
@@ -5,6 +5,7 @@ export * from "./code-cell.js";
|
|
|
5
5
|
export * from "./extension-links.js";
|
|
6
6
|
export * from "./file-list.js";
|
|
7
7
|
export * from "./hyperlink.js";
|
|
8
|
+
export * from "./link-hints.js";
|
|
8
9
|
export * from "./output-block.js";
|
|
9
10
|
export * from "./output-pane.js";
|
|
10
11
|
export * from "./render-utils.js";
|