@linxiraos/pi-tui 1.4.11 → 1.4.13
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 +30 -233
- 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/hotkeys-markdown.d.ts +2 -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 +9 -2
- 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
|
@@ -14,6 +14,7 @@ import { Markdown } from "../components/markdown";
|
|
|
14
14
|
import { Spacer } from "../components/spacer";
|
|
15
15
|
import { Text } from "../components/text";
|
|
16
16
|
import { type Component, Container } from "../tui";
|
|
17
|
+
import type { CompactTranscriptBlock } from "./transcript-container";
|
|
17
18
|
import { getMarkdownTheme, getThemeEpoch, type Theme, type ThemeColor, theme } from "../theme/index";
|
|
18
19
|
import { card, col, md, span } from "../native/describe";
|
|
19
20
|
import { type NativeNode, type NativeUiEvent, rootToggleExpanded } from "../native/node";
|
|
@@ -127,6 +128,12 @@ export class FramedMessageComponent<M extends FramedMessage> extends Container {
|
|
|
127
128
|
if (expanded !== undefined) this.setExpanded(expanded);
|
|
128
129
|
}
|
|
129
130
|
|
|
131
|
+
/** Packs with neighboring compact blocks while the extension renderer's component reports compact rows. */
|
|
132
|
+
isTranscriptBlockCompact(): boolean {
|
|
133
|
+
const custom = this.#customComponent as (Component & CompactTranscriptBlock) | undefined;
|
|
134
|
+
return custom?.isTranscriptBlockCompact?.() === true;
|
|
135
|
+
}
|
|
136
|
+
|
|
130
137
|
#messageText(): string {
|
|
131
138
|
const content = this.#options.message.content;
|
|
132
139
|
if (typeof content === "string") return content;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { TspPreview, TspText } from "@linxiraos/pi-wire";
|
|
2
|
+
import { type Component, Container } from "../tui";
|
|
3
|
+
import { type ThemeColor } from "../theme";
|
|
4
|
+
import { type NativeChild, type NativeNode, type NativeUiEvent } from "../native/node";
|
|
5
|
+
/** Render-time state supplied to a notice presentation. */
|
|
6
|
+
export interface MessageNoticeContext {
|
|
7
|
+
readonly expanded: boolean;
|
|
8
|
+
}
|
|
9
|
+
/** Header and optional detail rows rendered inside a notice box. */
|
|
10
|
+
export interface MessageNoticePresentation {
|
|
11
|
+
readonly header: string;
|
|
12
|
+
readonly icon?: string;
|
|
13
|
+
readonly body?: Component | readonly Component[];
|
|
14
|
+
}
|
|
15
|
+
/** Semantic notice content for native terminals: the card head and body, never pre-styled rows. */
|
|
16
|
+
export interface MessageNoticeNativePresentation {
|
|
17
|
+
readonly head: TspText;
|
|
18
|
+
readonly body?: readonly NativeChild[];
|
|
19
|
+
/** Body clamp while collapsed; set to make the notice collapsible. */
|
|
20
|
+
readonly preview?: TspPreview;
|
|
21
|
+
/**
|
|
22
|
+
* Draw as an inline notice (a named icon and one line, the body a
|
|
23
|
+
* disclosure below it) instead of a toned card.
|
|
24
|
+
*/
|
|
25
|
+
readonly inline?: {
|
|
26
|
+
readonly icon: string;
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
/** Presentation policy for a transcript notice. */
|
|
30
|
+
export interface MessageNoticeOptions {
|
|
31
|
+
readonly presentation: (context: MessageNoticeContext) => MessageNoticePresentation;
|
|
32
|
+
/** Card content for native terminals; the full content, since collapse is the terminal's. */
|
|
33
|
+
readonly nativePresentation: () => MessageNoticeNativePresentation;
|
|
34
|
+
/** Semantic role of the native card (`zeta.notice.<name>`). */
|
|
35
|
+
readonly role: string;
|
|
36
|
+
readonly severity?: ThemeColor;
|
|
37
|
+
readonly background?: (text: string) => string;
|
|
38
|
+
readonly leadingSpace?: boolean;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Shared transcript notice shell with expansion and tool-activity visibility.
|
|
42
|
+
* Domain controllers own their state and call {@link refresh} after mutations.
|
|
43
|
+
*/
|
|
44
|
+
export declare class MessageNoticeComponent extends Container {
|
|
45
|
+
#private;
|
|
46
|
+
constructor(options: MessageNoticeOptions);
|
|
47
|
+
setExpanded(expanded: boolean): void;
|
|
48
|
+
isExpanded(): boolean;
|
|
49
|
+
setToolActivityVisible(visible: boolean): void;
|
|
50
|
+
/** Rebuild the presentation after controller-owned state changes. */
|
|
51
|
+
refresh(): void;
|
|
52
|
+
invalidate(): void;
|
|
53
|
+
dispose(): void;
|
|
54
|
+
render(width: number): readonly string[];
|
|
55
|
+
/** A severity-toned card; collapse is local to the terminal and mirrored through {@link handleNativeEvent}. */
|
|
56
|
+
describe(): NativeNode;
|
|
57
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
58
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Component, Container, type HistoryBatch } from "../tui";
|
|
2
|
-
import type { NativeNode } from "../native/node";
|
|
2
|
+
import type { DescribeContext, NativeNode } from "../native/node";
|
|
3
3
|
/** Shared animation time supplied by the constrained transcript root. */
|
|
4
4
|
export interface AnimationFrame {
|
|
5
5
|
readonly tick: number;
|
|
@@ -42,6 +42,17 @@ export interface AppendOnlyTranscriptBlock {
|
|
|
42
42
|
*/
|
|
43
43
|
resetTranscriptStableRows?(): void;
|
|
44
44
|
}
|
|
45
|
+
/**
|
|
46
|
+
* Lets a block pack against its neighbors. Two consecutive compact blocks
|
|
47
|
+
* (blocks that draw nothing between them don't count) have no blank separator
|
|
48
|
+
* row between them in the terminal, and a native (TSP) surface groups each
|
|
49
|
+
* such run into one gapless entry. The hook is read every frame, so a block
|
|
50
|
+
* may change its answer at any time (expanded, collapsed, re-presented).
|
|
51
|
+
*/
|
|
52
|
+
export interface CompactTranscriptBlock {
|
|
53
|
+
/** Whether the block's current presentation is compact rows. */
|
|
54
|
+
isTranscriptBlockCompact?(): boolean;
|
|
55
|
+
}
|
|
45
56
|
/**
|
|
46
57
|
* Block lifecycle:
|
|
47
58
|
* - `active`: still mutating; renders live and counts against tool admission.
|
|
@@ -156,17 +167,27 @@ export declare class TranscriptContainer extends Container {
|
|
|
156
167
|
*/
|
|
157
168
|
renderTail(width: number, maxRows: number): readonly string[];
|
|
158
169
|
/**
|
|
159
|
-
* The transcript's blocks for a native (TSP) surface, one
|
|
160
|
-
*
|
|
170
|
+
* The transcript's blocks for a native (TSP) surface, one `main` child
|
|
171
|
+
* per block in transcript order; ids follow component identity, so
|
|
161
172
|
* inserts, removals (rewind, displacement) and reorders become targeted ops.
|
|
162
173
|
* Finalized blocks are settled as a hint; they stay editable, so a later
|
|
163
174
|
* expansion, late result or reaction still reaches them wherever they sit.
|
|
175
|
+
* A block's {@link Component.nativeTrailers} follow it as blocks of their own.
|
|
164
176
|
* No retirement happens on this path: the whole transcript is one document.
|
|
165
|
-
*
|
|
177
|
+
*
|
|
178
|
+
* Each run of two or more consecutive compact blocks
|
|
179
|
+
* ({@link CompactTranscriptBlock}), with any blocks between them that
|
|
180
|
+
* describe nothing at `cx`, is one gapless entry whose members stay
|
|
181
|
+
* component children, keeping their own description, wire id and native
|
|
182
|
+
* events. A compact block's trailers are members of its run; a trailer of
|
|
183
|
+
* any other block is not. The entry is the same object while the same block
|
|
184
|
+
* leads the run, and it never settles: a member joining later may still be live.
|
|
185
|
+
*
|
|
186
|
+
* Returns the same array while the entries are unchanged.
|
|
166
187
|
*/
|
|
167
|
-
nativeBlocks(): readonly Component[];
|
|
188
|
+
nativeBlocks(cx: DescribeContext): readonly Component[];
|
|
168
189
|
/** Embedded as a child (transcript viewers): a stack of the {@link nativeBlocks}. */
|
|
169
|
-
describe(): NativeNode;
|
|
190
|
+
describe(cx: DescribeContext): NativeNode;
|
|
170
191
|
/** Full semantic render used by exports and non-terminal commands. */
|
|
171
192
|
render(width: number): readonly string[];
|
|
172
193
|
/** Rendered row where a child's block begins in the last full render() (transcript deep-links). */
|