@linxiraos/pi-tui 1.1.27 → 1.2.1
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 +50 -461
- package/README.md +7 -5
- package/dist/types/app-keybindings.d.ts +1 -1
- package/dist/types/apps/cleanse-board.d.ts +1 -1
- package/dist/types/apps/debug/log-viewer.d.ts +4 -0
- package/dist/types/apps/debug/raw-sse-buffer.d.ts +2 -0
- package/dist/types/apps/git/git-tui.d.ts +2 -2
- package/dist/types/apps/git/help.d.ts +3 -1
- package/dist/types/apps/if-bench-board.d.ts +2 -2
- package/dist/types/apps/setup-model-picker.d.ts +1 -1
- package/dist/types/autocomplete.d.ts +5 -2
- package/dist/types/charts/chart-plan.d.ts +674 -0
- package/dist/types/charts/chart-svg.d.ts +59 -0
- package/dist/types/charts/table-data.d.ts +175 -0
- package/dist/types/chat/assistant-message.d.ts +5 -0
- package/dist/types/chat/chat-transcript-builder.d.ts +2 -0
- package/dist/types/chat/compaction-summary-message.d.ts +1 -0
- package/dist/types/chat/execution-shared.d.ts +6 -5
- package/dist/types/chat/fence-figure.d.ts +42 -0
- package/dist/types/chat/figure-markdown.d.ts +42 -0
- package/dist/types/chat/messages.d.ts +1 -1
- package/dist/types/chat/svg-figure.d.ts +33 -0
- package/dist/types/chat/svg-source.d.ts +49 -0
- package/dist/types/chat/table-chart.d.ts +89 -0
- package/dist/types/chat/tool-execution.d.ts +2 -0
- package/dist/types/chat/user-message.d.ts +15 -2
- package/dist/types/chrome/shared.d.ts +9 -0
- package/dist/types/chrome/transcript-container.d.ts +6 -0
- package/dist/types/components/box.d.ts +1 -0
- package/dist/types/components/disclosure.d.ts +1 -0
- package/dist/types/components/editor.d.ts +15 -4
- package/dist/types/components/form.d.ts +1 -0
- package/dist/types/components/image.d.ts +12 -44
- package/dist/types/components/key-value-list.d.ts +1 -0
- package/dist/types/components/layout/row.d.ts +1 -0
- package/dist/types/components/layout/stack.d.ts +1 -0
- package/dist/types/components/markdown.d.ts +36 -3
- package/dist/types/components/scroll-view.d.ts +1 -0
- package/dist/types/components/section.d.ts +1 -0
- package/dist/types/components/table.d.ts +1 -0
- package/dist/types/components/text.d.ts +1 -0
- package/dist/types/components/tree-view.d.ts +7 -0
- package/dist/types/components/truncated-text.d.ts +1 -0
- package/dist/types/fuzzy.d.ts +29 -1
- package/dist/types/key-hint-format.d.ts +1 -1
- package/dist/types/keybinding-matchers.d.ts +3 -0
- package/dist/types/keybindings.d.ts +1 -1
- package/dist/types/kitty-graphics.d.ts +2 -2
- package/dist/types/loop-watchdog.d.ts +8 -7
- package/dist/types/multiplexers/cmux.d.ts +16 -0
- package/dist/types/multiplexers/herdr.d.ts +26 -0
- package/dist/types/multiplexers/notify.d.ts +13 -0
- package/dist/types/multiplexers/orca.d.ts +12 -0
- package/dist/types/multiplexers/screen.d.ts +9 -0
- package/dist/types/multiplexers/tmux.d.ts +29 -0
- package/dist/types/multiplexers/types.d.ts +100 -0
- package/dist/types/multiplexers/wmux.d.ts +12 -0
- package/dist/types/multiplexers/zellij.d.ts +12 -0
- package/dist/types/native/backend.d.ts +3 -2
- package/dist/types/native/blobs.d.ts +7 -3
- package/dist/types/native/encode.d.ts +3 -4
- package/dist/types/native/overlay.d.ts +5 -0
- package/dist/types/overlays/agent-hub-projection.d.ts +6 -5
- package/dist/types/overlays/agent-hub-types.d.ts +9 -0
- package/dist/types/overlays/agent-hub.d.ts +2 -0
- package/dist/types/overlays/agent-transcript-viewer.d.ts +11 -2
- package/dist/types/overlays/agents-hub.d.ts +9 -0
- package/dist/types/overlays/annotation-overlay.d.ts +19 -2
- package/dist/types/overlays/annotation-types.d.ts +2 -0
- package/dist/types/overlays/ask-dialog.d.ts +5 -2
- package/dist/types/overlays/history-search.d.ts +10 -0
- package/dist/types/overlays/hook-selector.d.ts +9 -4
- package/dist/types/overlays/jobs-panel.d.ts +1 -7
- package/dist/types/overlays/model-browser.d.ts +54 -7
- package/dist/types/overlays/model-hub.d.ts +23 -0
- package/dist/types/overlays/oauth-selector.d.ts +0 -1
- package/dist/types/overlays/plan-review-overlay.d.ts +3 -2
- package/dist/types/overlays/session-observer-registry.d.ts +2 -0
- package/dist/types/overlays/session-selector.d.ts +6 -2
- package/dist/types/overlays/settings-defs.d.ts +1 -0
- package/dist/types/overlays/usage-dashboard.d.ts +8 -4
- package/dist/types/overlays/usage-display.d.ts +3 -1
- package/dist/types/prompt/composer.d.ts +2 -7
- package/dist/types/prompt/custom-editor.d.ts +11 -8
- package/dist/types/prompt/image-source.d.ts +2 -1
- package/dist/types/prompt/interactive-context-helpers.d.ts +4 -1
- package/dist/types/prompt/model-mention-autocomplete.d.ts +1 -1
- package/dist/types/prompt/welcome.d.ts +19 -42
- package/dist/types/render/composite.d.ts +2 -0
- package/dist/types/render/output-pane.d.ts +1 -0
- package/dist/types/render/render-utils.d.ts +1 -0
- package/dist/types/render/tool-card.d.ts +6 -0
- package/dist/types/render/width-aware-text.d.ts +2 -0
- package/dist/types/setup/scenes/splash.d.ts +1 -1
- package/dist/types/setup/scenes/types.d.ts +1 -0
- package/dist/types/status-line/component.d.ts +3 -0
- package/dist/types/status-line/host.d.ts +4 -1
- package/dist/types/status-line/segments.d.ts +2 -0
- package/dist/types/status-line/types.d.ts +14 -3
- package/dist/types/terminal-capabilities.d.ts +27 -35
- package/dist/types/terminal-multiplexer.d.ts +127 -14
- package/dist/types/terminal.d.ts +22 -6
- package/dist/types/theme/active-symbols.d.ts +1 -1
- package/dist/types/theme/schema.d.ts +11 -2
- package/dist/types/theme/symbols.d.ts +1 -1
- package/dist/types/theme/theme-class.d.ts +7 -0
- package/dist/types/theme/theme.d.ts +1 -1
- package/dist/types/theme/tui-adapters.d.ts +3 -0
- package/dist/types/tmux.d.ts +11 -4
- package/dist/types/tools/daemon.d.ts +1 -1
- package/dist/types/tools/eval.d.ts +22 -3
- package/dist/types/tools/glob.d.ts +4 -0
- package/dist/types/tools/native-view.d.ts +47 -0
- package/dist/types/tools/output-meta.d.ts +11 -1
- package/dist/types/tools/renderer.d.ts +37 -2
- package/dist/types/tools/streaming-output.d.ts +20 -1
- package/dist/types/tools/task.d.ts +0 -4
- package/dist/types/tools/write.d.ts +9 -2
- package/dist/types/tools/yield.d.ts +22 -0
- package/dist/types/tui.d.ts +31 -0
- package/dist/types/utils.d.ts +6 -0
- package/dist/types/vim.d.ts +19 -5
- package/package.json +13 -9
- package/src/app-keybindings.d.ts +1 -1
- package/src/app-keybindings.ts +1 -1
- package/src/apps/autoresearch-dashboard.ts +7 -3
- package/src/apps/cleanse-board.ts +2 -2
- package/src/apps/cleanse-picker.ts +1 -1
- package/src/apps/debug/log-viewer.ts +188 -72
- package/src/apps/debug/raw-sse-buffer.ts +8 -0
- package/src/apps/debug/raw-sse.ts +39 -5
- package/src/apps/git/diff-pane.ts +26 -5
- package/src/apps/git/git-tui.ts +2 -2
- package/src/apps/git/help.ts +29 -20
- package/src/apps/if-bench-board.ts +2 -2
- package/src/apps/ps-top.ts +2 -2
- package/src/apps/setup-model-picker.ts +1 -1
- package/src/autocomplete.d.ts +5 -2
- package/src/autocomplete.ts +67 -43
- package/src/charts/chart-plan.d.ts +674 -0
- package/src/charts/chart-plan.ts +5081 -0
- package/src/charts/chart-svg.d.ts +59 -0
- package/src/charts/chart-svg.ts +4657 -0
- package/src/charts/table-data.d.ts +175 -0
- package/src/charts/table-data.ts +1478 -0
- package/src/chat/advisor-message.ts +11 -0
- package/src/chat/assistant-message.d.ts +5 -0
- package/src/chat/assistant-message.ts +219 -50
- package/src/chat/chat-transcript-builder.d.ts +2 -0
- package/src/chat/chat-transcript-builder.ts +5 -3
- package/src/chat/compaction-summary-message.d.ts +1 -0
- package/src/chat/compaction-summary-message.ts +8 -0
- package/src/chat/execution-shared.d.ts +6 -5
- package/src/chat/execution-shared.ts +42 -25
- package/src/chat/fence-figure.d.ts +42 -0
- package/src/chat/fence-figure.ts +80 -0
- package/src/chat/figure-markdown.d.ts +42 -0
- package/src/chat/figure-markdown.ts +174 -0
- package/src/chat/messages.d.ts +1 -1
- package/src/chat/messages.ts +1 -1
- package/src/chat/read-tool-group.ts +6 -4
- package/src/chat/skill-message.ts +6 -0
- package/src/chat/svg-figure.d.ts +33 -0
- package/src/chat/svg-figure.ts +399 -0
- package/src/chat/svg-source.d.ts +49 -0
- package/src/chat/svg-source.ts +188 -0
- package/src/chat/table-chart.d.ts +89 -0
- package/src/chat/table-chart.ts +294 -0
- package/src/chat/tool-execution.d.ts +2 -0
- package/src/chat/tool-execution.ts +80 -6
- package/src/chat/user-message.d.ts +15 -2
- package/src/chat/user-message.ts +55 -3
- package/src/chrome/shared.ts +53 -0
- package/src/chrome/transcript-container.d.ts +6 -0
- package/src/chrome/transcript-container.ts +93 -13
- package/src/components/box.d.ts +1 -0
- package/src/components/box.ts +5 -0
- package/src/components/disclosure.d.ts +1 -0
- package/src/components/disclosure.ts +8 -0
- package/src/components/editor.d.ts +15 -4
- package/src/components/editor.ts +294 -46
- package/src/components/form.d.ts +1 -0
- package/src/components/form.ts +8 -0
- package/src/components/image.d.ts +12 -44
- package/src/components/image.ts +47 -151
- package/src/components/key-value-list.d.ts +1 -0
- package/src/components/key-value-list.ts +4 -0
- package/src/components/layout/row.d.ts +1 -0
- package/src/components/layout/row.ts +7 -0
- package/src/components/layout/stack.d.ts +1 -0
- package/src/components/layout/stack.ts +7 -0
- package/src/components/markdown.d.ts +36 -3
- package/src/components/markdown.ts +433 -318
- package/src/components/scroll-view.d.ts +1 -0
- package/src/components/scroll-view.ts +5 -0
- package/src/components/section.d.ts +1 -0
- package/src/components/section.ts +5 -0
- package/src/components/settings-list.ts +2 -0
- package/src/components/table.d.ts +1 -0
- package/src/components/table.ts +4 -0
- package/src/components/text.d.ts +1 -0
- package/src/components/text.ts +7 -0
- package/src/components/tree-view.d.ts +7 -0
- package/src/components/tree-view.ts +38 -8
- package/src/components/truncated-text.d.ts +1 -0
- package/src/components/truncated-text.ts +5 -0
- package/src/desktop-notify.ts +1 -1
- package/src/fuzzy.d.ts +29 -1
- package/src/fuzzy.ts +115 -30
- package/src/key-hint-format.d.ts +1 -1
- package/src/key-hint-format.ts +1 -1
- package/src/keybinding-matchers.d.ts +3 -0
- package/src/keybinding-matchers.ts +6 -2
- package/src/keybindings.d.ts +1 -1
- package/src/keybindings.ts +1 -1
- package/src/kitty-graphics.d.ts +2 -2
- package/src/kitty-graphics.ts +4 -4
- package/src/loop-watchdog.d.ts +8 -7
- package/src/loop-watchdog.ts +18 -13
- package/src/multiplexers/cmux.d.ts +16 -0
- package/src/multiplexers/cmux.ts +29 -0
- package/src/multiplexers/herdr.d.ts +26 -0
- package/src/multiplexers/herdr.ts +64 -0
- package/src/multiplexers/notify.d.ts +13 -0
- package/src/multiplexers/notify.ts +24 -0
- package/src/multiplexers/orca.d.ts +12 -0
- package/src/multiplexers/orca.ts +16 -0
- package/src/multiplexers/screen.d.ts +9 -0
- package/src/multiplexers/screen.ts +15 -0
- package/src/multiplexers/tmux.d.ts +29 -0
- package/src/multiplexers/tmux.ts +40 -0
- package/src/multiplexers/types.d.ts +100 -0
- package/src/multiplexers/types.ts +110 -0
- package/src/multiplexers/wmux.d.ts +12 -0
- package/src/multiplexers/wmux.ts +16 -0
- package/src/multiplexers/zellij.d.ts +12 -0
- package/src/multiplexers/zellij.ts +24 -0
- package/src/native/backend.d.ts +3 -2
- package/src/native/backend.ts +174 -18
- package/src/native/blobs.d.ts +7 -3
- package/src/native/blobs.ts +47 -12
- package/src/native/encode.d.ts +3 -4
- package/src/native/encode.ts +58 -31
- package/src/native/overlay.d.ts +5 -0
- package/src/native/overlay.ts +13 -0
- package/src/native/reconcile.ts +4 -0
- package/src/overlays/agent-hub-projection.d.ts +6 -5
- package/src/overlays/agent-hub-projection.ts +124 -13
- package/src/overlays/agent-hub-types.d.ts +9 -0
- package/src/overlays/agent-hub-types.ts +6 -0
- package/src/overlays/agent-hub.ts +46 -31
- package/src/overlays/agent-transcript-viewer.ts +91 -23
- package/src/overlays/agents-hub.ts +28 -8
- package/src/overlays/annotation-overlay.ts +293 -90
- package/src/overlays/annotation-types.ts +2 -0
- package/src/overlays/ask-dialog.ts +7 -10
- package/src/overlays/btw-history-panel.ts +12 -1
- package/src/overlays/copy-selector.ts +30 -8
- package/src/overlays/extensions/state-manager.ts +52 -12
- package/src/overlays/history-search.ts +100 -7
- package/src/overlays/hook-selector.ts +12 -5
- package/src/overlays/jobs-panel.ts +28 -46
- package/src/overlays/model-browser.ts +341 -110
- package/src/overlays/model-hub.ts +300 -49
- package/src/overlays/move-overlay.ts +28 -14
- package/src/overlays/oauth-selector.ts +54 -70
- package/src/overlays/plan-review-overlay.ts +194 -70
- package/src/overlays/plugin-settings.ts +11 -5
- package/src/overlays/report-panel.ts +2 -2
- package/src/overlays/rewind-selector.ts +86 -17
- package/src/overlays/session-observer-registry.d.ts +2 -0
- package/src/overlays/session-observer-registry.ts +10 -2
- package/src/overlays/session-selector.ts +64 -26
- package/src/overlays/settings-defs.ts +4 -3
- package/src/overlays/settings-selector.ts +33 -8
- package/src/overlays/snapcompact-shape-preview.ts +2 -3
- package/src/overlays/stats-notice.ts +1 -1
- package/src/overlays/tree-selector.ts +41 -20
- package/src/overlays/usage-dashboard.ts +100 -50
- package/src/overlays/usage-display.ts +10 -4
- package/src/prompt/attachment-chips.ts +15 -11
- package/src/prompt/composer-attachments.ts +6 -4
- package/src/prompt/composer-cache.ts +4 -6
- package/src/prompt/composer.ts +6 -37
- package/src/prompt/custom-editor.ts +54 -26
- package/src/prompt/image-source.ts +2 -1
- package/src/prompt/interactive-context-helpers.ts +30 -18
- package/src/prompt/macos-spelling.ts +7 -0
- package/src/prompt/magic-keywords.ts +11 -2
- package/src/prompt/model-mention-autocomplete.ts +14 -14
- package/src/prompt/tips.txt +6 -5
- package/src/prompt/welcome.ts +235 -411
- package/src/prompt/word-completion.ts +38 -5
- package/src/render/composite.d.ts +2 -0
- package/src/render/composite.ts +64 -0
- package/src/render/output-pane.d.ts +1 -0
- package/src/render/output-pane.ts +6 -0
- package/src/render/render-utils.d.ts +1 -0
- package/src/render/render-utils.ts +11 -0
- package/src/render/tool-card.d.ts +6 -0
- package/src/render/tool-card.ts +15 -0
- package/src/render/width-aware-text.d.ts +2 -0
- package/src/render/width-aware-text.ts +5 -0
- package/src/setup/scenes/model.ts +2 -1
- package/src/setup/scenes/splash.ts +116 -53
- package/src/setup/scenes/types.ts +1 -0
- package/src/status-line/component.ts +292 -78
- package/src/status-line/host.ts +4 -1
- package/src/status-line/segments.ts +40 -22
- package/src/status-line/types.ts +15 -3
- package/src/terminal-capabilities.d.ts +27 -35
- package/src/terminal-capabilities.ts +75 -189
- package/src/terminal-multiplexer.d.ts +127 -14
- package/src/terminal-multiplexer.ts +112 -33
- package/src/terminal.d.ts +22 -6
- package/src/terminal.ts +139 -37
- package/src/theme/active-symbols.d.ts +1 -1
- package/src/theme/active-symbols.ts +1 -1
- package/src/theme/schema-validation.ts +1 -0
- package/src/theme/schema.d.ts +11 -2
- package/src/theme/schema.ts +14 -1
- package/src/theme/session-color.ts +1 -7
- package/src/theme/symbols.d.ts +1 -1
- package/src/theme/symbols.ts +6 -1
- package/src/theme/theme-class.d.ts +7 -0
- package/src/theme/theme-class.ts +26 -1
- package/src/theme/theme-schema.json +5 -1
- package/src/theme/theme.d.ts +1 -1
- package/src/theme/theme.ts +8 -4
- package/src/theme/tui-adapters.d.ts +3 -0
- package/src/theme/tui-adapters.ts +68 -0
- package/src/tmux.d.ts +11 -4
- package/src/tmux.ts +47 -11
- package/src/tools/ast-edit.ts +59 -35
- package/src/tools/ast-grep.ts +35 -16
- package/src/tools/bash.ts +92 -42
- package/src/tools/daemon.d.ts +1 -1
- package/src/tools/daemon.ts +1 -1
- package/src/tools/default-renderer.ts +35 -19
- package/src/tools/edit.ts +142 -120
- package/src/tools/eval-format/index.ts +28 -2
- package/src/tools/eval-format/javascript.ts +7 -5
- package/src/tools/eval.d.ts +22 -3
- package/src/tools/eval.ts +364 -208
- package/src/tools/fetch.ts +5 -6
- package/src/tools/glob.d.ts +4 -0
- package/src/tools/glob.ts +33 -65
- package/src/tools/grep.ts +81 -48
- package/src/tools/index.ts +2 -0
- package/src/tools/lsp.ts +81 -59
- package/src/tools/mcp.ts +111 -68
- package/src/tools/native-view.d.ts +47 -0
- package/src/tools/native-view.ts +102 -1
- package/src/tools/output-meta.d.ts +11 -1
- package/src/tools/output-meta.ts +23 -3
- package/src/tools/read.ts +7 -5
- package/src/tools/renderer.d.ts +37 -2
- package/src/tools/renderer.ts +42 -2
- package/src/tools/streaming-output.d.ts +20 -1
- package/src/tools/streaming-output.ts +149 -50
- package/src/tools/task.d.ts +0 -4
- package/src/tools/task.ts +112 -59
- package/src/tools/todo.ts +119 -30
- package/src/tools/wait.ts +34 -24
- package/src/tools/web-search.ts +1 -1
- package/src/tools/write.d.ts +9 -2
- package/src/tools/write.ts +147 -95
- package/src/tools/yield.d.ts +22 -0
- package/src/tools/yield.ts +225 -0
- package/src/tui.d.ts +31 -0
- package/src/tui.ts +309 -160
- package/src/utils.d.ts +6 -0
- package/src/utils.ts +19 -0
- package/src/vim.d.ts +19 -5
- package/src/vim.ts +333 -18
- package/src/windows-input-mode.ts +8 -0
|
@@ -107,8 +107,6 @@ export interface TaskItem {
|
|
|
107
107
|
solutionSpace?: string;
|
|
108
108
|
/** Per-spawn thinking effort: lowest/middle/highest level the resolved model supports. Overrides the agent's default selector (e.g. `auto`). */
|
|
109
109
|
effort?: "lo" | "med" | "hi";
|
|
110
|
-
/** Per-spawn model selector or ordered selector array; overrides agent and settings preferences. */
|
|
111
|
-
model?: string | string[];
|
|
112
110
|
/** Caller-provided output schema; its presence overrides the selected agent's schema. */
|
|
113
111
|
outputSchema?: unknown;
|
|
114
112
|
/** Validation behavior for a caller-provided or inherited output schema. */
|
|
@@ -135,8 +133,6 @@ export interface TaskParams {
|
|
|
135
133
|
solutionSpace?: string;
|
|
136
134
|
/** Per-spawn thinking effort (flat form): lowest/middle/highest level the resolved model supports. */
|
|
137
135
|
effort?: "lo" | "med" | "hi";
|
|
138
|
-
/** Per-spawn model selector or ordered selector array; overrides agent and settings preferences. */
|
|
139
|
-
model?: string | string[];
|
|
140
136
|
/** Caller-provided output schema; its presence overrides the selected agent's schema. */
|
|
141
137
|
outputSchema?: unknown;
|
|
142
138
|
/** Validation behavior for a caller-provided or inherited output schema. */
|
|
@@ -6,7 +6,7 @@ import { type ProcWriteDetails } from "./proc-render.js";
|
|
|
6
6
|
import { type CfgWriteDetails } from "./cfg-render.js";
|
|
7
7
|
import type { FileDiagnosticsResult } from "./lsp.js";
|
|
8
8
|
import type { OutputMeta } from "./output-meta.js";
|
|
9
|
-
import type { NativeToolView, RenderResultOptions, ToolActivityContext, ToolActivitySummary } from "./renderer.js";
|
|
9
|
+
import type { NativeToolView, RenderResultOptions, ToolActivityContext, ToolActivitySummary, ToolFigure } from "./renderer.js";
|
|
10
10
|
import { type XdevRenderDispatch, type XdevMountedRenderer } from "./xdev.js";
|
|
11
11
|
/** Details returned by the write tool for transcript rendering. */
|
|
12
12
|
export interface WriteToolDetails {
|
|
@@ -37,6 +37,12 @@ interface WriteResult {
|
|
|
37
37
|
details?: WriteToolDetails;
|
|
38
38
|
isError?: boolean;
|
|
39
39
|
}
|
|
40
|
+
/**
|
|
41
|
+
* The fence a file write draws as while its content streams and after: its
|
|
42
|
+
* extension names a figure language and it has content, closed once the args
|
|
43
|
+
* are final. None for URL-card writes, or after an error.
|
|
44
|
+
*/
|
|
45
|
+
declare function writeFigure(args: WriteRenderArgs | undefined, result: WriteResult | undefined, options: RenderResultOptions): ToolFigure | undefined;
|
|
40
46
|
declare const writeStreamingPreviewStateKey: unique symbol;
|
|
41
47
|
/**
|
|
42
48
|
* Per-component state for incrementally rendering a streamed write.
|
|
@@ -75,7 +81,7 @@ export declare const writeToolRenderer: {
|
|
|
75
81
|
renderCall(args: WriteRenderArgs, options: RenderResultOptions & WriteStreamingPreviewStateCarrier & {
|
|
76
82
|
renderContext?: WriteRenderContext;
|
|
77
83
|
}, uiTheme: Theme): Component | undefined;
|
|
78
|
-
renderResult(result: WriteResult, options: RenderResultOptions & {
|
|
84
|
+
renderResult(result: WriteResult, options: RenderResultOptions & WriteStreamingPreviewStateCarrier & {
|
|
79
85
|
renderContext?: WriteRenderContext;
|
|
80
86
|
}, uiTheme: Theme, args?: WriteRenderArgs): Component;
|
|
81
87
|
describeCall(args: WriteRenderArgs, options: RenderResultOptions & {
|
|
@@ -84,6 +90,7 @@ export declare const writeToolRenderer: {
|
|
|
84
90
|
describeResult(result: WriteResult, options: RenderResultOptions & {
|
|
85
91
|
renderContext?: WriteRenderContext;
|
|
86
92
|
}, args?: WriteRenderArgs): NativeToolView | undefined;
|
|
93
|
+
figure: typeof writeFigure;
|
|
87
94
|
mergeCallAndResult: true;
|
|
88
95
|
forceFirstResultViewportRepaint: (args: unknown, options: RenderResultOptions) => boolean;
|
|
89
96
|
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { Theme } from "../theme/theme.js";
|
|
2
|
+
import type { Component } from "../tui.js";
|
|
3
|
+
import type { NativeToolView, RenderResultContextOptions, RenderResultOptions, ToolRenderResult } from "./renderer.js";
|
|
4
|
+
import type { YieldItem } from "./task.js";
|
|
5
|
+
/** `yield` arguments as sent; strict-mode providers send omitted optionals as `null`. */
|
|
6
|
+
interface YieldRenderArgs {
|
|
7
|
+
type?: string | string[] | null;
|
|
8
|
+
data?: unknown;
|
|
9
|
+
error?: string | null;
|
|
10
|
+
/** 1-based workpool item number. */
|
|
11
|
+
key?: number;
|
|
12
|
+
}
|
|
13
|
+
/** Shows a `yield` call's submitted data instead of its model-facing acknowledgement. */
|
|
14
|
+
export declare const yieldToolRenderer: {
|
|
15
|
+
renderCall(args: YieldRenderArgs, options: RenderResultOptions, theme: Theme): Component;
|
|
16
|
+
renderResult(result: ToolRenderResult<YieldItem>, options: RenderResultContextOptions, theme: Theme, args?: YieldRenderArgs): Component;
|
|
17
|
+
describeCall(args: YieldRenderArgs, options: RenderResultOptions): NativeToolView;
|
|
18
|
+
describeResult(result: ToolRenderResult<YieldItem>, _options: RenderResultContextOptions, args?: YieldRenderArgs): NativeToolView;
|
|
19
|
+
mergeCallAndResult: true;
|
|
20
|
+
animatedPendingPreview: true;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
package/dist/types/tui.d.ts
CHANGED
|
@@ -78,6 +78,10 @@ export interface TUIStartOptions {
|
|
|
78
78
|
* Paint without owning stdin: the terminal stays in cooked mode (kernel
|
|
79
79
|
* echo + line editing at the hardware cursor) until {@link TUI.enableInput}
|
|
80
80
|
* switches to raw input and replays the kernel-buffered keystrokes.
|
|
81
|
+
*
|
|
82
|
+
* A terminal expected to speak TSP needs raw input from the start, so it
|
|
83
|
+
* gets it; its keystrokes are held instead (TSP events and the cell-size
|
|
84
|
+
* reply still apply) until {@link TUI.releaseHeldInput} replays them.
|
|
81
85
|
*/
|
|
82
86
|
deferInput?: boolean;
|
|
83
87
|
}
|
|
@@ -169,6 +173,16 @@ export interface Component {
|
|
|
169
173
|
* Called when theme changes or when component needs to re-render from scratch.
|
|
170
174
|
*/
|
|
171
175
|
invalidate?(): void;
|
|
176
|
+
/**
|
|
177
|
+
* Optional hook to drop memoized render output (rows, parse and wrap state)
|
|
178
|
+
* that the next `render()` can rebuild from state the component keeps.
|
|
179
|
+
* Unlike {@link invalidate}, it must not rebuild anything eagerly: no
|
|
180
|
+
* renderer or extension callbacks, no image conversions, and no child
|
|
181
|
+
* replacement or disposal. The next render must return the same rows it
|
|
182
|
+
* would have returned without the release. Components without it are
|
|
183
|
+
* simply not released.
|
|
184
|
+
*/
|
|
185
|
+
releaseRenderCaches?(): void;
|
|
172
186
|
/**
|
|
173
187
|
* Optional hook to set whether this component ignores tight layout mode.
|
|
174
188
|
*/
|
|
@@ -308,6 +322,7 @@ export declare class Container implements Component {
|
|
|
308
322
|
/** Dispose every child, then detach it from this container. */
|
|
309
323
|
disposeChildren(): void;
|
|
310
324
|
invalidate(): void;
|
|
325
|
+
releaseRenderCaches(): void;
|
|
311
326
|
/**
|
|
312
327
|
* Propagate teardown to children. Call when the container's children are
|
|
313
328
|
* being permanently discarded (not when they are detached for reuse — use
|
|
@@ -476,6 +491,22 @@ export declare class TUI extends Container {
|
|
|
476
491
|
* path. Idempotent; no-op when input was never deferred.
|
|
477
492
|
*/
|
|
478
493
|
enableInput(): void;
|
|
494
|
+
/**
|
|
495
|
+
* Replay the keystrokes held since a TSP `deferInput` start through the
|
|
496
|
+
* normal input path, then deliver input live. Call once the app's key
|
|
497
|
+
* handlers are installed so a hotkey pressed during startup still fires.
|
|
498
|
+
* Only keys typed while the start-time focus owner had focus are held. The
|
|
499
|
+
* hold survives a stop/start until released. Idempotent; no-op when nothing
|
|
500
|
+
* is held.
|
|
501
|
+
*/
|
|
502
|
+
releaseHeldInput(): void;
|
|
503
|
+
/**
|
|
504
|
+
* Hand held-key ownership from `previous` to `next` when the app replaces
|
|
505
|
+
* the component focused at start (a swapped-in custom editor), so keys
|
|
506
|
+
* typed into the replacement stay queued behind the held ones instead of
|
|
507
|
+
* overtaking them. No-op unless `previous` owns the held keys.
|
|
508
|
+
*/
|
|
509
|
+
replaceHeldFocus(previous: Component, next: Component): void;
|
|
479
510
|
addStartListener(listener: StartListener): () => void;
|
|
480
511
|
addInputListener(listener: InputListener): () => void;
|
|
481
512
|
removeInputListener(listener: InputListener): void;
|
package/dist/types/utils.d.ts
CHANGED
|
@@ -26,6 +26,12 @@ export interface TextSizingOptions {
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function encodeTextSized(text: string, options?: TextSizingOptions): string;
|
|
28
28
|
export declare function sliceWithWidth(line: string, startCol: number, length: number, strict?: boolean | null): SliceResult;
|
|
29
|
+
/**
|
|
30
|
+
* Hard-wrap one literal terminal row without trimming spaces or splitting graphemes.
|
|
31
|
+
* An oversized grapheme is emitted intact even when it exceeds the requested width.
|
|
32
|
+
* Zero-cell rows remain one empty row, matching restored-terminal reflow.
|
|
33
|
+
*/
|
|
34
|
+
export declare function wrapLiteralLine(line: string, width: number): string[];
|
|
29
35
|
export declare function truncateToWidth(text: string, maxWidth: number, ellipsisKind?: Ellipsis | null | "", pad?: boolean | null): string;
|
|
30
36
|
export declare function wrapTextWithAnsi(text: string, width: number): string[];
|
|
31
37
|
export declare function extractSegments(line: string, beforeEnd: number, afterStart: number, afterLen: number, strictAfter: boolean): ExtractSegmentsResult;
|
package/dist/types/vim.d.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
* This is a usable subset of Vim, not a reimplementation of it (see issue #3299): Normal and Visual
|
|
9
9
|
* modes, the common motions, and operators built from those motions.
|
|
10
10
|
*/
|
|
11
|
-
export type VimMode = "insert" | "normal" | "visual" | "visual-line";
|
|
12
|
-
export type VimOperator = "d" | "y" | "c";
|
|
11
|
+
export type VimMode = "insert" | "normal" | "visual" | "visual-line" | "replace";
|
|
12
|
+
export type VimOperator = "d" | "y" | "c" | ">" | "<";
|
|
13
13
|
export interface VimPosition {
|
|
14
14
|
line: number;
|
|
15
15
|
col: number;
|
|
@@ -50,6 +50,20 @@ export type VimCommand = {
|
|
|
50
50
|
count: number;
|
|
51
51
|
} | {
|
|
52
52
|
kind: "undo";
|
|
53
|
+
} | {
|
|
54
|
+
kind: "replace";
|
|
55
|
+
from: VimPosition;
|
|
56
|
+
to: VimPosition;
|
|
57
|
+
text: string;
|
|
58
|
+
} | {
|
|
59
|
+
kind: "join";
|
|
60
|
+
fromLine: number;
|
|
61
|
+
lines: number;
|
|
62
|
+
} | {
|
|
63
|
+
kind: "indent";
|
|
64
|
+
fromLine: number;
|
|
65
|
+
toLine: number;
|
|
66
|
+
out: boolean;
|
|
53
67
|
};
|
|
54
68
|
/** Start offset of the grapheme after `col`, clamped to `text.length`. */
|
|
55
69
|
export declare function nextGraphemeStart(text: string, col: number): number;
|
|
@@ -62,11 +76,11 @@ export declare class VimState {
|
|
|
62
76
|
mode: VimMode;
|
|
63
77
|
/** Fixed end of a Visual selection; the cursor is the moving end. */
|
|
64
78
|
anchor: VimPosition | null;
|
|
65
|
-
/** True while a count, operator, `g`,
|
|
79
|
+
/** True while a count, operator, `g`, text-object, find, or `r` prefix is half-typed — Escape cancels it. */
|
|
66
80
|
get pending(): boolean;
|
|
67
81
|
/**
|
|
68
|
-
* The half-typed command as Vim would echo it (`"2"`, `"d"`, `"2d"`, `"di"`) — empty
|
|
69
|
-
* nothing is pending. Hosts render this next to the mode so a partially entered operator is
|
|
82
|
+
* The half-typed command as Vim would echo it (`"2"`, `"d"`, `"2d"`, `"di"`, `"df"`, `"r"`) — empty
|
|
83
|
+
* when nothing is pending. Hosts render this next to the mode so a partially entered operator is
|
|
70
84
|
* visible instead of silently swallowing the next keystroke.
|
|
71
85
|
*/
|
|
72
86
|
get pendingText(): string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"type": "module",
|
|
3
3
|
"name": "@linxiraos/pi-tui",
|
|
4
|
-
"version": "1.1
|
|
4
|
+
"version": "1.2.1",
|
|
5
5
|
"description": "Terminal User Interface library with differential rendering for efficient text-based applications",
|
|
6
6
|
"homepage": "https://linxira-os.github.io/zeta/",
|
|
7
7
|
"author": "Linxira-OS",
|
|
@@ -38,14 +38,14 @@
|
|
|
38
38
|
"gen:glyphs": "bun scripts/gen-glyphs.ts"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@linxiraos/pi-omptype": "1.1
|
|
42
|
-
"@linxiraos/pi-agent-core": "1.1
|
|
43
|
-
"@linxiraos/pi-ai": "1.1
|
|
44
|
-
"@linxiraos/pi-catalog": "1.1
|
|
45
|
-
"@linxiraos/pi-natives": "1.1
|
|
46
|
-
"@linxiraos/pi-utils": "1.1
|
|
47
|
-
"@linxiraos/pi-wire": "1.1
|
|
48
|
-
"@linxiraos/pi-snapcompact": "1.1
|
|
41
|
+
"@linxiraos/pi-omptype": "1.2.1",
|
|
42
|
+
"@linxiraos/pi-agent-core": "1.2.1",
|
|
43
|
+
"@linxiraos/pi-ai": "1.2.1",
|
|
44
|
+
"@linxiraos/pi-catalog": "1.2.1",
|
|
45
|
+
"@linxiraos/pi-natives": "1.2.1",
|
|
46
|
+
"@linxiraos/pi-utils": "1.2.1",
|
|
47
|
+
"@linxiraos/pi-wire": "1.2.1",
|
|
48
|
+
"@linxiraos/pi-snapcompact": "1.2.1"
|
|
49
49
|
},
|
|
50
50
|
"devDependencies": {
|
|
51
51
|
"kitty-vt-wasm": "^0.2.0"
|
|
@@ -102,6 +102,10 @@
|
|
|
102
102
|
"types": "./dist/types/components/*.d.ts",
|
|
103
103
|
"import": "./src/components/*.ts"
|
|
104
104
|
},
|
|
105
|
+
"./native/*": {
|
|
106
|
+
"types": "./dist/types/native/*.d.ts",
|
|
107
|
+
"import": "./src/native/*.ts"
|
|
108
|
+
},
|
|
105
109
|
"./*.js": "./src/*.ts"
|
|
106
110
|
}
|
|
107
111
|
}
|
package/src/app-keybindings.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export declare const KEYBINDINGS: {
|
|
|
119
119
|
readonly description: "Delete word backward";
|
|
120
120
|
};
|
|
121
121
|
readonly "tui.editor.deleteWordForward": {
|
|
122
|
-
readonly defaultKeys: ["alt+delete", "alt+d", "super+alt+delete", "super+alt+d"];
|
|
122
|
+
readonly defaultKeys: ["alt+delete", "alt+d", "ctrl+delete", "super+alt+delete", "super+alt+d"];
|
|
123
123
|
readonly description: "Delete word forward";
|
|
124
124
|
};
|
|
125
125
|
readonly "tui.editor.deleteToLineStart": {
|
package/src/app-keybindings.ts
CHANGED
|
@@ -2,7 +2,7 @@ import * as fs from "node:fs";
|
|
|
2
2
|
import * as path from "node:path";
|
|
3
3
|
// Subpaths, not the `@linxiraos/pi-utils` barrel: the barrel loads the native
|
|
4
4
|
// addon (file-lock), and key-hint formatting runs on addon-free CLI paths
|
|
5
|
-
// (`
|
|
5
|
+
// (`zetacode --version`, help) through cli/command-help.ts.
|
|
6
6
|
import { getActiveProfile, getAgentDir, getProfileRootDir } from "@linxiraos/pi-utils/dirs";
|
|
7
7
|
import { isEnoent } from "@linxiraos/pi-utils/fs-error";
|
|
8
8
|
import * as logger from "@linxiraos/pi-utils/logger";
|
|
@@ -17,8 +17,8 @@ import {
|
|
|
17
17
|
import { formatNum, type ExperimentResult, type ExperimentState } from "../tools/autoresearch";
|
|
18
18
|
import type { TspSpan, TspTableColumn, TspText } from "@linxiraos/pi-wire";
|
|
19
19
|
import { card, col, elapsed, keyed, node, row, span, text } from "../native/describe";
|
|
20
|
-
import type { DescribeContext, NativeNode } from "../native/node";
|
|
21
|
-
import { hintsRow } from "../native/overlay";
|
|
20
|
+
import type { DescribeContext, NativeNode, NativeUiEvent } from "../native/node";
|
|
21
|
+
import { actionBar, actionButton, hintsRow } from "../native/overlay";
|
|
22
22
|
import { Memo } from "../native/memo";
|
|
23
23
|
import { isNativeRendering } from "../native/state";
|
|
24
24
|
|
|
@@ -190,9 +190,9 @@ export function createDashboardController(): DashboardController {
|
|
|
190
190
|
{ keys: ["up", "down", "j", "k"], label: "scroll" },
|
|
191
191
|
{ keys: ["pageUp", "pageDown"], label: "page" },
|
|
192
192
|
{ keys: ["g", "shift+g"], label: "top/bottom" },
|
|
193
|
-
{ keys: ["escape"], label: "close" },
|
|
194
193
|
]),
|
|
195
194
|
);
|
|
195
|
+
children.push(actionBar([null, actionButton("Close", "close", { keys: "escape" })]));
|
|
196
196
|
return col(children, { gap: "md", role: "zeta.app.autoresearch" });
|
|
197
197
|
},
|
|
198
198
|
);
|
|
@@ -214,6 +214,10 @@ export function createDashboardController(): DashboardController {
|
|
|
214
214
|
scrollView.setHeight(viewportRows);
|
|
215
215
|
return [header, ...scrollView.render(width), renderOverlayFooter(width, theme)];
|
|
216
216
|
},
|
|
217
|
+
/** The Close button runs Esc's path. */
|
|
218
|
+
handleNativeEvent(event: NativeUiEvent): void {
|
|
219
|
+
if (event.type === "action" && event.act === "close") done(undefined);
|
|
220
|
+
},
|
|
217
221
|
handleInput(data: string): void {
|
|
218
222
|
if (matchesKey(data, "escape") || matchesKey(data, "esc") || data === "q") {
|
|
219
223
|
done(undefined);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Live status board for `
|
|
2
|
+
* Live status board for `zetacode cleanse`.
|
|
3
3
|
*
|
|
4
4
|
* Interactive terminals get a transient board repainted in place: a phase
|
|
5
5
|
* spinner (model resolution, checker discovery), one row per running checker,
|
|
@@ -59,7 +59,7 @@ const REPAIR_BAR_STYLE: ProgressBarStyle = {
|
|
|
59
59
|
styleEmpty: text => fgOrPlain("dim", text),
|
|
60
60
|
};
|
|
61
61
|
|
|
62
|
-
/** Rendering surface for one `
|
|
62
|
+
/** Rendering surface for one `zetacode cleanse` run. */
|
|
63
63
|
export interface CleanseStatusBoard {
|
|
64
64
|
readonly interactive: boolean;
|
|
65
65
|
/** Print a permanent line above the live area (plain write when non-TTY). */
|