@linxiraos/pi-tui 1.4.10 → 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 +34 -237
- package/README.md +4 -1
- package/THIRD-PARTY-NOTICES.txt +99 -0
- 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/settings-selector.d.ts +1 -1
- package/dist/types/overlays/snapcompact-shape-preview.d.ts +1 -1
- 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 +2 -1
- package/src/overlays/settings-selector.ts +18 -4
- package/src/overlays/snapcompact-shape-preview.ts +1 -1
- 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 +23 -5
- 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-validation.ts +1 -1
- 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/task.ts +1 -1
- 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
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
import type { SpinnerFramesOverride } from "./symbols.js";
|
|
2
2
|
export type ColorValue = string | number;
|
|
3
|
+
/**
|
|
4
|
+
* Index of each slot in a theme's 16-color `terminal.ansi` palette (0–7
|
|
5
|
+
* normal, 8–15 bright). `Theme.ansiFg()` paints by slot name.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ANSI_COLOR_INDEX: {
|
|
8
|
+
readonly black: 0;
|
|
9
|
+
readonly red: 1;
|
|
10
|
+
readonly green: 2;
|
|
11
|
+
readonly yellow: 3;
|
|
12
|
+
readonly blue: 4;
|
|
13
|
+
readonly magenta: 5;
|
|
14
|
+
readonly cyan: 6;
|
|
15
|
+
readonly white: 7;
|
|
16
|
+
readonly brightBlack: 8;
|
|
17
|
+
readonly brightRed: 9;
|
|
18
|
+
readonly brightGreen: 10;
|
|
19
|
+
readonly brightYellow: 11;
|
|
20
|
+
readonly brightBlue: 12;
|
|
21
|
+
readonly brightMagenta: 13;
|
|
22
|
+
readonly brightCyan: 14;
|
|
23
|
+
readonly brightWhite: 15;
|
|
24
|
+
};
|
|
25
|
+
export type AnsiColor = keyof typeof ANSI_COLOR_INDEX;
|
|
3
26
|
/**
|
|
4
27
|
* Tokens a theme is allowed to omit. They resolve to the terminal default
|
|
5
28
|
* foreground, so `Theme.fg()` stays total for callers that paint a token a theme
|
|
@@ -36,7 +59,11 @@ export interface ThemeJson {
|
|
|
36
59
|
chrome?: ColorValue;
|
|
37
60
|
/** Lifted surfaces: popovers, menus, buttons. */
|
|
38
61
|
widget?: ColorValue;
|
|
39
|
-
/**
|
|
62
|
+
/**
|
|
63
|
+
* ANSI colors 0–15: exactly 16. omp also paints colorful Markdown
|
|
64
|
+
* (headings, emphasis, table headers) from this palette; slots it
|
|
65
|
+
* omits fall back to the terminal's own palette.
|
|
66
|
+
*/
|
|
40
67
|
ansi?: ColorValue[];
|
|
41
68
|
};
|
|
42
69
|
symbols?: {
|
|
@@ -4,7 +4,7 @@ export type SymbolPreset = "unicode" | "nerd" | "ascii";
|
|
|
4
4
|
*/
|
|
5
5
|
export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted"
|
|
6
6
|
/** @deprecated Alias of `status.success`; kept so extensions and theme overrides that name it keep working. */
|
|
7
|
-
| "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" | "btw.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";
|
|
7
|
+
| "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.cacheWarm" | "icon.cacheCold" | "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" | "btw.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";
|
|
8
8
|
export type SymbolMap = Record<SymbolKey, string>;
|
|
9
9
|
/**
|
|
10
10
|
* Icon vocabulary for slash-command autocomplete type indicators. Each name
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type ColorMode, type ThemeBg, type ThemeColor } from "./schema.js";
|
|
1
|
+
import { type AnsiColor, type ColorMode, type ThemeBg, type ThemeColor } from "./schema.js";
|
|
2
2
|
import type { SessionAccentTheme } from "./session-color.js";
|
|
3
3
|
import { type SlashCommandIconName, type SpinnerType, type SymbolKey, type SymbolPreset } from "./symbols.js";
|
|
4
4
|
/** Theme token of a thinking/effort level name (`off`…`max`); unknown levels (`auto`) map to `thinkingOff`. */
|
|
@@ -15,7 +15,7 @@ export declare class Theme {
|
|
|
15
15
|
* otherwise-light theme.
|
|
16
16
|
*/
|
|
17
17
|
readonly statusLineLuminance: number | undefined;
|
|
18
|
-
constructor(fgColors: Record<ThemeColor, string | number>, bgColors: Record<ThemeBg, string | number>, mode: ColorMode, symbolPreset: SymbolPreset, symbolOverrides: Partial<Record<SymbolKey, string>>, spinnerFramesOverrides?: Partial<Record<SpinnerType, string[]
|
|
18
|
+
constructor(fgColors: Record<ThemeColor, string | number>, bgColors: Record<ThemeBg, string | number>, mode: ColorMode, symbolPreset: SymbolPreset, symbolOverrides: Partial<Record<SymbolKey, string>>, spinnerFramesOverrides?: Partial<Record<SpinnerType, string[]>>, ansiPalette?: ReadonlyArray<string | number>);
|
|
19
19
|
/** True when the active theme has a light status-line background. */
|
|
20
20
|
get isLight(): boolean;
|
|
21
21
|
/**
|
|
@@ -62,6 +62,12 @@ export declare class Theme {
|
|
|
62
62
|
*/
|
|
63
63
|
hasColor(color: ThemeColor): boolean;
|
|
64
64
|
fg(color: ThemeColor, text: string): string;
|
|
65
|
+
/**
|
|
66
|
+
* Color `text` with slot `color` of the theme's `terminal.ansi` palette, or
|
|
67
|
+
* the terminal's own palette when the theme ships none. Like {@link fg}, the
|
|
68
|
+
* color resumes after nested foreground resets.
|
|
69
|
+
*/
|
|
70
|
+
ansiFg(color: AnsiColor, text: string): string;
|
|
65
71
|
/** Apply a foreground, replacing terminal-default tokens with the theme's contrast-safe fallback. */
|
|
66
72
|
fgResolved(color: ThemeColor, text: string): string;
|
|
67
73
|
bg(color: ThemeBg, text: string): string;
|
|
@@ -79,6 +85,8 @@ export declare class Theme {
|
|
|
79
85
|
*/
|
|
80
86
|
fgOnBg(color: ThemeColor, background: ThemeBg, text: string): string;
|
|
81
87
|
bold(text: string): string;
|
|
88
|
+
/** Reduce terminal intensity without replacing the text's foreground colors. */
|
|
89
|
+
faint(text: string): string;
|
|
82
90
|
italic(text: string): string;
|
|
83
91
|
underline(text: string): string;
|
|
84
92
|
strikethrough(text: string): string;
|
|
@@ -228,6 +236,8 @@ export declare class Theme {
|
|
|
228
236
|
job: string;
|
|
229
237
|
cache: string;
|
|
230
238
|
cacheMiss: string;
|
|
239
|
+
cacheWarm: string;
|
|
240
|
+
cacheCold: string;
|
|
231
241
|
input: string;
|
|
232
242
|
output: string;
|
|
233
243
|
throughput: string;
|
|
@@ -6,7 +6,7 @@ export { getAvailableThemes, getAvailableThemesWithPaths, getThemeByName, type T
|
|
|
6
6
|
export { isValidThemeColor, type ThemeBg, type ThemeColor } from "./schema.js";
|
|
7
7
|
export { getAvailableSymbolPresets, isValidSymbolPreset, type SpinnerType, type SymbolKey, type SymbolPreset, } from "./symbols.js";
|
|
8
8
|
export { Theme } from "./theme-class.js";
|
|
9
|
-
export { createHighlightStream, getEditorTheme, getMarkdownTheme, getMarkdownThemeWithLinkTargets, getSelectListTheme, getSettingsListTheme, getSymbolTheme, highlightCode, isHighlightLanguage, setMarkdownMermaidRendering, warmHighlighter, } from "./tui-adapters.js";
|
|
9
|
+
export { createHighlightStream, getEditorTheme, getMarkdownTheme, getMarkdownThemeWithLinkTargets, getSelectListTheme, getSettingsListTheme, getSymbolTheme, highlightCode, isHighlightLanguage, setMarkdownColorful, setMarkdownMermaidRendering, warmHighlighter, } from "./tui-adapters.js";
|
|
10
10
|
/**
|
|
11
11
|
* Subscribe to native fallback appearance changes independently of theme changes.
|
|
12
12
|
* Consumers must re-check the effective background: COLORFGBG can override it.
|
|
@@ -22,6 +22,13 @@ export declare function getSymbolTheme(): SymbolTheme;
|
|
|
22
22
|
export declare function canCacheMarkdownListItems(candidate: MarkdownTheme): boolean;
|
|
23
23
|
export declare function getMarkdownThemeWithLinkTargets(targets: ReadonlyMap<string, string>): MarkdownTheme;
|
|
24
24
|
export declare function setMarkdownMermaidRendering(enabled: boolean): void;
|
|
25
|
+
/**
|
|
26
|
+
* Toggle colorful Markdown (`tui.colorfulMarkdown`): headings, emphasis, inline
|
|
27
|
+
* code and table headers take distinct hues from the theme's `terminal.ansi`
|
|
28
|
+
* palette instead of one heading color and plain bold/italic. Components built
|
|
29
|
+
* afterwards pick it up; callers rebuild existing transcript rows.
|
|
30
|
+
*/
|
|
31
|
+
export declare function setMarkdownColorful(enabled: boolean): void;
|
|
25
32
|
export declare function getMarkdownTheme(): MarkdownTheme;
|
|
26
33
|
export declare function getSelectListTheme(): SelectListTheme;
|
|
27
34
|
/**
|
package/dist/types/thinking.d.ts
CHANGED
|
@@ -53,6 +53,18 @@ export declare const AUTO_THINKING: "auto";
|
|
|
53
53
|
export type { ConfiguredThinkingLevel } from "./render/render-utils.js";
|
|
54
54
|
/** Maps the session-level `auto` sentinel to `undefined`; concrete levels pass through. */
|
|
55
55
|
export declare function concreteThinkingLevel(level: ConfiguredThinkingLevel | undefined): ThinkingLevel | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Selector a new session on `model` starts with when neither the launch nor a
|
|
58
|
+
* restored session pins one: the default role's explicit selector, then the
|
|
59
|
+
* model's own default level (unless the configured default is `auto`), then the
|
|
60
|
+
* configured default. Shared by session startup and the next launch's prepaint.
|
|
61
|
+
*/
|
|
62
|
+
export declare function newSessionThinkingLevel(model: Model | undefined, roleLevel: ConfiguredThinkingLevel | undefined, configuredDefault: ConfiguredThinkingLevel | undefined): ConfiguredThinkingLevel | undefined;
|
|
63
|
+
/**
|
|
64
|
+
* Concrete level `selector` runs at on `model`: clamped to its ladder, or the
|
|
65
|
+
* provisional effort while `auto` awaits its first per-turn classification.
|
|
66
|
+
*/
|
|
67
|
+
export declare function resolveConfiguredThinkingLevel(model: Model | undefined, selector: ConfiguredThinkingLevel | undefined): ResolvedThinkingLevel | undefined;
|
|
56
68
|
/**
|
|
57
69
|
* True when a prewalk hand-off from `current`/`currentLevel` to
|
|
58
70
|
* `target`/`targetLevel` would change nothing observable: same model id, same
|
|
@@ -69,6 +69,6 @@ export declare const askToolRenderer: {
|
|
|
69
69
|
text?: string;
|
|
70
70
|
}>;
|
|
71
71
|
details?: AskToolDetails;
|
|
72
|
-
}, _options: RenderResultOptions, uiTheme: Theme): Component;
|
|
72
|
+
}, _options: RenderResultOptions, uiTheme: Theme, args?: AskRenderArgs): Component;
|
|
73
73
|
};
|
|
74
74
|
export {};
|
|
@@ -2,6 +2,8 @@ import type { Component } from "../tui.js";
|
|
|
2
2
|
import { type Theme } from "../theme/theme.js";
|
|
3
3
|
import { type OutputMeta } from "./output-meta.js";
|
|
4
4
|
import type { NativeToolView, RenderResultContextOptions, RenderResultOptions } from "./renderer.js";
|
|
5
|
+
import { type ShellTrace } from "@linxiraos/pi-wire";
|
|
6
|
+
import type { SpotlightDetails } from "../chat/spotlight.js";
|
|
5
7
|
/** Default collapsed shell output preview height. */
|
|
6
8
|
export declare const BASH_DEFAULT_PREVIEW_LINES = 10;
|
|
7
9
|
/**
|
|
@@ -26,6 +28,21 @@ export interface BashToolDetails {
|
|
|
26
28
|
timedOut?: boolean;
|
|
27
29
|
/** Text the command wrote to `out://`, oldest first; transcripts draw each as a reply after the call. */
|
|
28
30
|
replies?: string[];
|
|
31
|
+
/**
|
|
32
|
+
* The embedded shell's live trace of the command (pi-shell `RunTrace`): every frame carries the
|
|
33
|
+
* latest snapshot and the final result the last one. Absent on the PTY and user-shell paths.
|
|
34
|
+
*/
|
|
35
|
+
trace?: ShellTrace;
|
|
36
|
+
/**
|
|
37
|
+
* Working directory the command ran in when the call set one, explicitly or by the
|
|
38
|
+
* executor hoisting a leading `cd <dir>`; absent when it ran in the session cwd.
|
|
39
|
+
* Pairs with {@link trace}: the traced script is the command after hoisting.
|
|
40
|
+
*/
|
|
41
|
+
cwd?: string;
|
|
42
|
+
/** `;` when the hoisted leading cd was `cd <dir>;`, so the card redraws it as written; absent means `&&`. */
|
|
43
|
+
cdSeparator?: ";";
|
|
44
|
+
/** What the session's Spotlight shaping did to the output. */
|
|
45
|
+
spotlight?: SpotlightDetails;
|
|
29
46
|
/** Live ACP update only; completed results refer to released terminals. */
|
|
30
47
|
terminalId?: string;
|
|
31
48
|
service?: {
|
|
@@ -54,6 +71,8 @@ export interface BashRenderArgs {
|
|
|
54
71
|
env?: Record<string, unknown>;
|
|
55
72
|
timeout?: number;
|
|
56
73
|
cwd?: string;
|
|
74
|
+
/** How the `cd <dir>` prefix joins the command: `;` as written by the model, else `&&`. */
|
|
75
|
+
cdSeparator?: ";";
|
|
57
76
|
__partialJson?: string;
|
|
58
77
|
[key: string]: unknown;
|
|
59
78
|
}
|
|
@@ -88,6 +107,8 @@ export declare function getBashEnvForDisplay(args: BashRenderArgs): Record<strin
|
|
|
88
107
|
* `theme.fg("dim", ...)` form render only the first line as dim.
|
|
89
108
|
*/
|
|
90
109
|
export declare function formatBashCommandLines(args: BashRenderArgs, uiTheme: Theme): string[];
|
|
110
|
+
/** The dim `$ cd <dir> && NAME="…" ` prefix ahead of a command's first line (trailing space included). */
|
|
111
|
+
export declare function bashCommandPrefix(args: BashRenderArgs, uiTheme: Theme): string;
|
|
91
112
|
/**
|
|
92
113
|
* Plain (unstyled) command line for native views: `cd <dir> && NAME="…" <command>`,
|
|
93
114
|
* built from the same decoded display args (incl. streamed `__partialJson` env) as the ANSI path.
|
|
@@ -25,9 +25,15 @@ export interface FindHit {
|
|
|
25
25
|
/**
|
|
26
26
|
* How much of a search the judge actually covered. `unavailable`: every judge
|
|
27
27
|
* request failed, so an empty result is not evidence of absence. `partial`:
|
|
28
|
-
* some requests failed
|
|
28
|
+
* some requests failed, or the call's deadline cut verification short.
|
|
29
|
+
* `complete`: none failed (or none were needed).
|
|
29
30
|
*/
|
|
30
31
|
export type FindCoverage = "complete" | "partial" | "unavailable";
|
|
32
|
+
/** Verification cut short by the call's deadline: complete passages verified of those routed to it. */
|
|
33
|
+
export interface FindTimeout {
|
|
34
|
+
verified: number;
|
|
35
|
+
passages: number;
|
|
36
|
+
}
|
|
31
37
|
/** Search accounting reported alongside the hits. */
|
|
32
38
|
export interface FindStats {
|
|
33
39
|
/** Eligible files under the root. */
|
|
@@ -62,6 +68,8 @@ export interface FindToolDetails {
|
|
|
62
68
|
hits: FindHit[];
|
|
63
69
|
coverage: FindCoverage;
|
|
64
70
|
stats: FindStats;
|
|
71
|
+
/** Set when the deadline ended verification; the hits are those verified before it. */
|
|
72
|
+
timeout?: FindTimeout;
|
|
65
73
|
elapsedMs: number;
|
|
66
74
|
/** Session cwd; hit paths are relative to it. */
|
|
67
75
|
cwd: string;
|
|
@@ -61,7 +61,8 @@ export declare const grepToolRenderer: {
|
|
|
61
61
|
}, options: RenderResultContextOptions, uiTheme: Theme, args?: GrepRenderArgs): Component;
|
|
62
62
|
describeCall(args: GrepRenderArgs): NativeToolView;
|
|
63
63
|
/**
|
|
64
|
-
* Inline (§7.3 grep): `Grep “pattern” 5 matches · 2 files
|
|
64
|
+
* Inline (§7.3 grep): `Grep “pattern” in src 5 matches · 2 files`, the scope
|
|
65
|
+
* leading the counts as in the terminal card, then
|
|
65
66
|
* the matches grouped by file; collapsed shows the first two files.
|
|
66
67
|
*/
|
|
67
68
|
describeResult(result: {
|
|
@@ -154,6 +154,18 @@ export declare function fitGroupsToBudget(groups: readonly (readonly number[])[]
|
|
|
154
154
|
* indices lets callers slice parallel arrays (raw lines, styled lines, contexts).
|
|
155
155
|
*/
|
|
156
156
|
export declare function groupLineIndicesByBlank(rawLines: readonly string[]): number[][];
|
|
157
|
+
/** A code-frame row split after its rule: the gutter (match marker, line number, rule) and the source line. */
|
|
158
|
+
export interface CodeFrameRow {
|
|
159
|
+
gutter: string;
|
|
160
|
+
source: string;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Draw the code-frame rows of consecutive source lines: each gutter in
|
|
164
|
+
* `color`, the sources highlighted in `lang` as one run, so a multi-line
|
|
165
|
+
* string or comment keeps its colors. Without a language the sources take
|
|
166
|
+
* `color` too.
|
|
167
|
+
*/
|
|
168
|
+
export declare function renderCodeFrameRun(rows: readonly CodeFrameRow[], lang: string | undefined, color: ThemeColor, theme: Theme): string[];
|
|
157
169
|
/**
|
|
158
170
|
* Styled code-frame rows of grouped search output, highlighted in each owning
|
|
159
171
|
* file's language (`lang` overrides it when the highlighter knows it). A run of
|
|
@@ -163,6 +175,11 @@ export declare function groupLineIndicesByBlank(rawLines: readonly string[]): nu
|
|
|
163
175
|
* undefined, for the caller to style.
|
|
164
176
|
*/
|
|
165
177
|
export declare function createCodeFrameStyler(lines: readonly string[], contexts: readonly GroupedLineContext[], color: ThemeColor, theme: Theme, lang?: string): (index: number) => string | undefined;
|
|
178
|
+
/**
|
|
179
|
+
* Search header subject, `pattern in scope`, with `in` dim so the pattern and
|
|
180
|
+
* the scope read as two parts of one subject. Counts follow it as status meta.
|
|
181
|
+
*/
|
|
182
|
+
export declare function formatScopedSubject(subject: string | undefined, scope: string | undefined, theme: Theme): string | undefined;
|
|
166
183
|
/** One event of {@link walkGroupedOutput}: a directory header, a file header, or a non-blank body line. */
|
|
167
184
|
export type GroupedOutputEvent = {
|
|
168
185
|
readonly kind: "dir";
|
|
@@ -115,7 +115,7 @@ export type JobWidgetBlock = JobWidgetSparkBlock | JobWidgetBarsBlock | JobWidge
|
|
|
115
115
|
* a session reload.
|
|
116
116
|
*/
|
|
117
117
|
export interface JobWidgetView {
|
|
118
|
-
/** Short name of what is being watched (`
|
|
118
|
+
/** Short name of what is being watched (`loadtest · 3 models`). */
|
|
119
119
|
title: string;
|
|
120
120
|
headline?: JobWidgetHeadline;
|
|
121
121
|
/** What the job is doing now: a subagent's stage, or the last line of output. */
|
|
@@ -144,7 +144,7 @@ export declare function jobWidgetGlance(view: JobWidgetView): JobWidgetGlance |
|
|
|
144
144
|
export declare function jobWidgetSpark(view: JobWidgetView, points?: number): JobWidgetSparkBlock | undefined;
|
|
145
145
|
/** The entry whose live widget (one a spec drives) saw data last. */
|
|
146
146
|
export declare function latestJobWidget<T extends JobWidgetEntry>(entries: readonly T[]): T | undefined;
|
|
147
|
-
/** The widget as one plain line for tooltips: `
|
|
147
|
+
/** The widget as one plain line for tooltips: `loadtest · 3 models — decode 186 tok/s ▲ 15%`. */
|
|
148
148
|
export declare function jobWidgetSummary(view: JobWidgetView): string;
|
|
149
149
|
/** Spans of a glance: muted label, strong number, toned trend. */
|
|
150
150
|
export declare function jobWidgetGlanceSpans(glance: JobWidgetGlance): TspSpan[];
|
|
@@ -43,10 +43,12 @@ export declare enum FileFormatResult {
|
|
|
43
43
|
FAILED = "failed",
|
|
44
44
|
UNSUPPORTED = "unsupported"
|
|
45
45
|
}
|
|
46
|
+
/** Render the LSP tool call: `LSP: <action> <file:line (symbol)>`. */
|
|
46
47
|
export declare function renderCall(args: LspParams, _options: RenderResultOptions, theme: Theme): Text;
|
|
47
48
|
/**
|
|
48
|
-
* Render LSP
|
|
49
|
-
*
|
|
49
|
+
* Render an LSP result flush: one status line carrying the request and the
|
|
50
|
+
* result counts, over the result rows. Detects locations, hover, diagnostics,
|
|
51
|
+
* references and symbols; anything else is listed line by line.
|
|
50
52
|
*/
|
|
51
53
|
export declare function renderResult(result: {
|
|
52
54
|
content: Array<{
|
|
@@ -31,6 +31,10 @@ export declare function fileDiffSection(file: {
|
|
|
31
31
|
* it), the path with a dim directory and a strong name (cut in the middle),
|
|
32
32
|
* a quiet `range` suffix (`:13-36`), then an optional count `chip` and a
|
|
33
33
|
* muted `detail`.
|
|
34
|
+
*
|
|
35
|
+
* A URL is one target, not a directory and a name: its last `/` does not
|
|
36
|
+
* separate a dim parent from a strong basename, and the whole visible text
|
|
37
|
+
* carries the link so a click anywhere on the URL opens it.
|
|
34
38
|
*/
|
|
35
39
|
export declare function fileRow(filePath: string, p?: {
|
|
36
40
|
range?: string;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* transcript components. Built-in renderers live beside this file; the
|
|
4
4
|
* coding-agent tools implement the matching `*Details` payloads.
|
|
5
5
|
*/
|
|
6
|
-
import type { TspPreview, TspText, TspTone, TspToolProps } from "@linxiraos/pi-wire";
|
|
6
|
+
import type { ShellTrace, ShellVizPresentation, TspPreview, TspText, TspTone, TspToolProps } from "@linxiraos/pi-wire";
|
|
7
7
|
import type { NativeChild } from "../native/node.js";
|
|
8
8
|
import type { Component } from "../tui.js";
|
|
9
9
|
import type { Theme } from "../theme/theme.js";
|
|
@@ -38,6 +38,14 @@ export interface RenderResultOptions {
|
|
|
38
38
|
media?: boolean;
|
|
39
39
|
/** The native host draws raw JSON values (`cx.supports("json")`). Native describe hooks only. */
|
|
40
40
|
json?: boolean;
|
|
41
|
+
/** The native host draws a live shell trace (`cx.supports("shell")`). Native describe hooks only. */
|
|
42
|
+
shell?: boolean;
|
|
43
|
+
/** Native semantic presentation, decoded and cached by the tool component. */
|
|
44
|
+
shellPresentation?: ShellVizPresentation;
|
|
45
|
+
/** Validated immutable trace associated with shellPresentation. */
|
|
46
|
+
shellTrace?: ShellTrace;
|
|
47
|
+
/** Explicit seeks/resets change this epoch; ordinary playback ticks do not. */
|
|
48
|
+
shellReplayEpoch?: number;
|
|
41
49
|
}
|
|
42
50
|
/** Render options for a result, plus the tool-specific context the transcript threads through. */
|
|
43
51
|
export type RenderResultContextOptions = RenderResultOptions & {
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ShellVizLayer, ShellVizPreferences, ShellVizView } from "@linxiraos/pi-wire";
|
|
2
|
+
import type { NativeUiEvent } from "../native/node.js";
|
|
3
|
+
/** Canonical ordered views used by the inspector and native event adapter. */
|
|
4
|
+
export declare const SHELL_VIZ_VIEWS: readonly ShellVizView[];
|
|
5
|
+
/** Canonical toggleable semantic layers. */
|
|
6
|
+
export declare const SHELL_VIZ_LAYERS: readonly ShellVizLayer[];
|
|
7
|
+
/** Normalize action/change/selection events to the shared action vocabulary. */
|
|
8
|
+
export declare function shellVizEventAction(event: NativeUiEvent, preferences: ShellVizPreferences): string | undefined;
|
|
9
|
+
/** Apply shared actions; node keys remain opaque and playback values remain numeric. */
|
|
10
|
+
export declare function changeShellVizPreferences(preferences: ShellVizPreferences, action: string, length: number): ShellVizPreferences;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { ShellVizPresentation } from "@linxiraos/pi-wire";
|
|
2
|
+
import type { Theme } from "../theme/theme.js";
|
|
3
|
+
/** Sanitize untrusted shell source, values and outputs before applying terminal styling. */
|
|
4
|
+
export declare function shellVizText(text: string): string;
|
|
5
|
+
/** Render the canonical presentation; transcript cards and focused inspector share this path. */
|
|
6
|
+
export declare function renderShellVisualization(presentation: ShellVizPresentation, theme: Theme, width: number, includeOutput?: boolean): string[];
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { RunTrace, ShellVisualization } from "@linxiraos/pi-natives";
|
|
2
|
+
import type { ShellTrace, ShellVizPreferences, ShellVizPresentation } from "@linxiraos/pi-wire";
|
|
3
|
+
/** Native live-run or restored-trace owner; the UI never holds shell syntax. */
|
|
4
|
+
export type ShellVisualizationSource = RunTrace | ShellVisualization;
|
|
5
|
+
/** Bind the immutable snapshot before publishing it; live paints borrow the actual run. */
|
|
6
|
+
export declare function attachShellTrace(snapshot: ShellTrace, trace: RunTrace): void;
|
|
7
|
+
/** Historical traces restore their canonical native archive only once per snapshot. */
|
|
8
|
+
export declare function shellVisualization(snapshot: ShellTrace): ShellVisualizationSource;
|
|
9
|
+
/** Python-like Pseudo, all layers enabled, one pane, live, paused, normal speed. */
|
|
10
|
+
export declare function defaultShellVizPreferences(): ShellVizPreferences;
|
|
11
|
+
/** Render through native ownership; an explicit replay cursor never uses the normal output sink. */
|
|
12
|
+
export declare function readShellPresentation(source: ShellVisualizationSource, preferences: ShellVizPreferences, snapshot?: ShellTrace, output?: string): ShellVizPresentation;
|
|
13
|
+
/** Node keys are opaque; validation must never invent or reinterpret engine identity. */
|
|
14
|
+
export declare function isShellVizNode(value: unknown): value is string;
|
|
15
|
+
/** Decode semantic display data, never shell syntax or execution state. */
|
|
16
|
+
export declare function decodeShellPresentation(json: string): ShellVizPresentation;
|
|
@@ -106,8 +106,8 @@ export interface CoordinationDetails {
|
|
|
106
106
|
from?: string;
|
|
107
107
|
to?: string;
|
|
108
108
|
receipts?: IrcDeliveryReceipt[];
|
|
109
|
-
/**
|
|
110
|
-
waited?: IrcMessage
|
|
109
|
+
/** Messages consumed by `wait`, oldest first. */
|
|
110
|
+
waited?: IrcMessage[];
|
|
111
111
|
jobs?: JobSnapshot[];
|
|
112
112
|
cancelled?: {
|
|
113
113
|
id: string;
|
|
@@ -22,6 +22,8 @@ export interface WriteToolDetails {
|
|
|
22
22
|
message?: CoordinationDetails;
|
|
23
23
|
proc?: ProcWriteDetails;
|
|
24
24
|
cfg?: CfgWriteDetails;
|
|
25
|
+
/** Set when the write touched no files: a peer message, a reply, or a background-work cancellation. */
|
|
26
|
+
touchesNoFiles?: boolean;
|
|
25
27
|
}
|
|
26
28
|
interface WriteRenderArgs {
|
|
27
29
|
path?: unknown;
|
package/dist/types/tui.d.ts
CHANGED
|
@@ -129,7 +129,9 @@ export interface Component {
|
|
|
129
129
|
* an overlay: the sheet's `role` (Tern styles `zeta.overlay.*` roles as
|
|
130
130
|
* glass sheets, so the component's own root must not draw a second frame),
|
|
131
131
|
* `head` spans for the sheet's title row, and `size`/`anchor` overriding
|
|
132
|
-
* the ones derived from the overlay options.
|
|
132
|
+
* the ones derived from the overlay options. `size` is a width class: on a
|
|
133
|
+
* narrow pane the backend fills it only when the described content is tall
|
|
134
|
+
* (see `NativeBackend`).
|
|
133
135
|
*/
|
|
134
136
|
nativeOverlay?: {
|
|
135
137
|
role?: string;
|
|
@@ -153,6 +155,12 @@ export interface Component {
|
|
|
153
155
|
describeScreen?(cx: DescribeContext): NativeScreen;
|
|
154
156
|
/** User actions on nodes this component described (toggle, select, activate, custom). */
|
|
155
157
|
handleNativeEvent?(event: NativeUiEvent): void;
|
|
158
|
+
/**
|
|
159
|
+
* Native transcript blocks drawn right after this one as siblings (a `TranscriptContainer` child only): notes
|
|
160
|
+
* about the block that must show while it is collapsed, such as a tool card's Spotlight notice. The terminal
|
|
161
|
+
* rows never show them. Return the same array while unchanged.
|
|
162
|
+
*/
|
|
163
|
+
nativeTrailers?(): readonly Component[];
|
|
156
164
|
/**
|
|
157
165
|
* Pure preflight for focused input that must precede TUI-wide input listeners
|
|
158
166
|
* and debug shortcuts. A true result routes the event to this component first.
|
|
@@ -343,6 +351,12 @@ export declare class Container implements Component {
|
|
|
343
351
|
render(width: number): readonly string[];
|
|
344
352
|
describe(_cx: DescribeContext): NativeNode | null;
|
|
345
353
|
}
|
|
354
|
+
/**
|
|
355
|
+
* `component`'s own native description, or `null` when it draws as rendered rows: it has no
|
|
356
|
+
* `describe`, answers `null`, or is a Container subclass that paints its own rows but inherits the
|
|
357
|
+
* plain column description, which would lose that rendering.
|
|
358
|
+
*/
|
|
359
|
+
export declare function ownDescription(component: Component, cx: DescribeContext): NativeNode | null;
|
|
346
360
|
/**
|
|
347
361
|
* Merge runs of byte-adjacent SGR sequences (`CSI [0-9;:]* m`) into one. Only
|
|
348
362
|
* CSI-SGR sequences are touched; text, cursor moves, OSC, hyperlinks and image
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@linxiraos/pi-tui",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.12",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://linxira-os.github.io/zeta/",
|
|
7
7
|
"author": "Linxira-OS",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"types": "./dist/types/index.d.ts",
|
|
31
31
|
"scripts": {
|
|
32
32
|
"check": "oxlint . && oxfmt --check --no-error-on-unmatched-pattern 'src/**/*.{ts,tsx}' '{test,bench,examples,scripts}/**/*.ts' '*.ts' && bun run check:types",
|
|
33
|
-
"check:types": "
|
|
33
|
+
"check:types": "bun check --no-script -p tsconfig.json",
|
|
34
34
|
"lint": "oxlint .",
|
|
35
35
|
"test": "bun test --parallel test/*.test.ts",
|
|
36
36
|
"fix": "oxlint --fix --fix-suggestions . && bun run fmt",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"gen:glyphs": "bun scripts/gen-glyphs.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@linxiraos/
|
|
42
|
-
"@linxiraos/pi-agent-core": "1.4.
|
|
43
|
-
"@linxiraos/pi-ai": "1.4.
|
|
44
|
-
"@linxiraos/pi-catalog": "1.4.
|
|
45
|
-
"@linxiraos/pi-natives": "1.4.
|
|
46
|
-
"@linxiraos/pi-utils": "1.4.
|
|
47
|
-
"@linxiraos/pi-wire": "1.4.
|
|
48
|
-
"@linxiraos/
|
|
41
|
+
"@linxiraos/zeta-schema": "1.4.12",
|
|
42
|
+
"@linxiraos/pi-agent-core": "1.4.12",
|
|
43
|
+
"@linxiraos/pi-ai": "1.4.12",
|
|
44
|
+
"@linxiraos/pi-catalog": "1.4.12",
|
|
45
|
+
"@linxiraos/pi-natives": "1.4.12",
|
|
46
|
+
"@linxiraos/pi-utils": "1.4.12",
|
|
47
|
+
"@linxiraos/pi-wire": "1.4.12",
|
|
48
|
+
"@linxiraos/zeta-compact": "1.4.12"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"kitty-vt-wasm": "^0.2.0"
|
|
@@ -102,6 +102,10 @@
|
|
|
102
102
|
"types": "./dist/types/native/*.d.ts",
|
|
103
103
|
"import": "./src/native/*.ts"
|
|
104
104
|
},
|
|
105
|
-
"./*.js": "./src/*.ts"
|
|
105
|
+
"./*.js": "./src/*.ts",
|
|
106
|
+
"./tools/shell-viz": {
|
|
107
|
+
"types": "./dist/types/tools/shell-viz.d.ts",
|
|
108
|
+
"import": "./src/tools/shell-viz.ts"
|
|
109
|
+
}
|
|
106
110
|
}
|
|
107
111
|
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { ShellVizPresentation } from "@linxiraos/pi-wire";
|
|
2
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node";
|
|
3
|
+
import type { Component } from "../tui";
|
|
4
|
+
/** Focused inspector host; state and replay timers remain owned by the transcript tool call. */
|
|
5
|
+
export interface ShellVisualizerHost {
|
|
6
|
+
presentation(): ShellVizPresentation | undefined;
|
|
7
|
+
replayEpoch(): number;
|
|
8
|
+
liveOrigin(): boolean;
|
|
9
|
+
action(value: string): void;
|
|
10
|
+
close(): void;
|
|
11
|
+
requestRender(): void;
|
|
12
|
+
height(): number;
|
|
13
|
+
}
|
|
14
|
+
/** Keyboard and native inspector for the exact presentation shown in the transcript. */
|
|
15
|
+
export declare class ShellVisualizer implements Component {
|
|
16
|
+
#private;
|
|
17
|
+
readonly host: ShellVisualizerHost;
|
|
18
|
+
constructor(host: ShellVisualizerHost);
|
|
19
|
+
invalidate(): void;
|
|
20
|
+
handleInput(data: string): void;
|
|
21
|
+
handleNativeEvent(event: NativeUiEvent): void;
|
|
22
|
+
describe(cx: DescribeContext): NativeNode;
|
|
23
|
+
render(width: number): string[];
|
|
24
|
+
}
|