@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
|
@@ -63,6 +63,12 @@ export interface TranscriptViewportSpan {
|
|
|
63
63
|
export declare class TranscriptContainer extends Container {
|
|
64
64
|
#private;
|
|
65
65
|
addChild(component: Component): void;
|
|
66
|
+
/**
|
|
67
|
+
* `#entries` mirrors `children`; move both together or the next `#syncEntries`
|
|
68
|
+
* pays a full O(n) rebuild.
|
|
69
|
+
*/
|
|
70
|
+
insertChildAt(component: Component, index: number): void;
|
|
71
|
+
/** Removes `component` if {@link canRemoveBlock} allows it; otherwise does nothing. */
|
|
66
72
|
removeChild(component: Component): void;
|
|
67
73
|
clear(): void;
|
|
68
74
|
setToolActivityVisible(visible: boolean): void;
|
|
@@ -30,6 +30,7 @@ export declare class Box implements Component {
|
|
|
30
30
|
setBgFn(bgFn?: (text: string) => string): void;
|
|
31
31
|
setBorder(border?: BoxBorder): void;
|
|
32
32
|
invalidate(): void;
|
|
33
|
+
releaseRenderCaches(): void;
|
|
33
34
|
/**
|
|
34
35
|
* A `card` when the box has a border or background: the background token
|
|
35
36
|
* picks tone/role (user message, tool state, selection), a border colour
|
|
@@ -36,6 +36,7 @@ export declare class Disclosure implements Component {
|
|
|
36
36
|
setExpanded(expanded: boolean): void;
|
|
37
37
|
setIgnoreTight(ignore: boolean): this;
|
|
38
38
|
invalidate(): void;
|
|
39
|
+
releaseRenderCaches(): void;
|
|
39
40
|
dispose(): void;
|
|
40
41
|
debugState(): Record<string, unknown>;
|
|
41
42
|
get debugChildren(): readonly Component[];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type AutocompleteProvider } from "../autocomplete.js";
|
|
2
|
-
import type { TspEditorDecoration, TspTone } from "@linxiraos/pi-wire";
|
|
2
|
+
import type { TspEditorDecoration, TspText, TspTone } from "@linxiraos/pi-wire";
|
|
3
3
|
import { type DescribeContext, type NativeChild, type NativeNode, type NativeTextEdit, type NativeUiEvent } from "../native/node.js";
|
|
4
4
|
import type { SymbolTheme } from "../symbols.js";
|
|
5
5
|
import { type Component, type Focusable } from "../tui.js";
|
|
@@ -106,8 +106,11 @@ export declare class Editor implements Component, Focusable {
|
|
|
106
106
|
* dialog's text field; only the prompt composer claims `zeta.editor`).
|
|
107
107
|
*/
|
|
108
108
|
describeLayout: ((input: NativeNode, cx: DescribeContext) => NativeEditorLayout) | undefined;
|
|
109
|
-
/**
|
|
110
|
-
|
|
109
|
+
/**
|
|
110
|
+
* TSP placeholder for the empty buffer; natively it replaces the rotating ANSI {@link placeholder} hints.
|
|
111
|
+
* Return a stable value (the same spans array) while it is unchanged: the editor node is reused by identity.
|
|
112
|
+
*/
|
|
113
|
+
describePlaceholder: (() => TspText) | undefined;
|
|
111
114
|
/** Called with the selected text when Visual mode yanks, so hosts can reach the system
|
|
112
115
|
* clipboard — `packages/tui` deliberately has no clipboard dependency of its own. */
|
|
113
116
|
onYank?: (text: string) => void;
|
|
@@ -146,6 +149,12 @@ export declare class Editor implements Component, Focusable {
|
|
|
146
149
|
* cursor. The host styles it (ANSI allowed). Re-evaluated on every render, so hosts can derive
|
|
147
150
|
* it from live state. */
|
|
148
151
|
placeholder?: () => string | undefined;
|
|
152
|
+
/** Whole-message prediction for the next prompt, painted as ghost text after the cursor while
|
|
153
|
+
* the single-line buffer is a strict prefix of it, the cursor sits at its end, and no
|
|
154
|
+
* autocomplete is open. A shown prediction replaces the {@link placeholder}; Tab or Right inserts
|
|
155
|
+
* the rest without submitting. Must be a single line. Re-evaluated on every render, so hosts can
|
|
156
|
+
* derive it from live state. */
|
|
157
|
+
prediction?: () => string | undefined;
|
|
149
158
|
constructor(theme: EditorTheme);
|
|
150
159
|
/** Return bounded editor content, cursor, and transient child state for debug inspection. */
|
|
151
160
|
debugState(): Record<string, unknown>;
|
|
@@ -250,6 +259,8 @@ export declare class Editor implements Component, Focusable {
|
|
|
250
259
|
get atoms(): ReadonlyMap<string, string>;
|
|
251
260
|
/** Monotonic buffer-content revision for render caches. Cursor-only movement does not advance it. */
|
|
252
261
|
get textRevision(): number;
|
|
262
|
+
/** Monotonic atom-table revision for render caches: advances whenever {@link atoms} is mutated or replaced. */
|
|
263
|
+
get atomsRevision(): number;
|
|
253
264
|
/** Whether the buffer text equals `value`, without `getText()`'s full join —
|
|
254
265
|
* O(1) for the hot per-keystroke probes against short single-line values. */
|
|
255
266
|
textEquals(value: string): boolean;
|
|
@@ -285,7 +296,7 @@ export declare class Editor implements Component, Focusable {
|
|
|
285
296
|
* Mirrors the transient state the key dispatch tears down before this action so the two
|
|
286
297
|
* cannot diverge: a pending character jump is cancelled by any other key, and an open
|
|
287
298
|
* spelling-assist popup is dismissed by anything that is not one of its accept keys (its
|
|
288
|
-
*
|
|
299
|
+
* refresh skips assist mode, so a surviving list would hang around forever).
|
|
289
300
|
* While Vim owns the buffer (Normal or Visual) the operation is Vim's `x` — deleting the
|
|
290
301
|
* selection and returning to Normal in Visual mode, the grapheme under the cursor
|
|
291
302
|
* otherwise. Only Insert mode and Vim-off editors delete straight through. */
|
|
@@ -44,6 +44,7 @@ export declare class FormField implements Component, Focusable, MouseRoutable {
|
|
|
44
44
|
/** Label, description, details, preview, the control, error, summary, hint and footer as one column. */
|
|
45
45
|
describe(_cx: DescribeContext): NativeNode;
|
|
46
46
|
get focused(): boolean;
|
|
47
|
+
get hasError(): boolean;
|
|
47
48
|
get debugChildren(): readonly Component[];
|
|
48
49
|
set focused(value: boolean);
|
|
49
50
|
setUseTerminalCursor(useTerminalCursor: boolean): void;
|
|
@@ -29,6 +29,8 @@ export interface ImageOptions {
|
|
|
29
29
|
* synchronously instead of committing its reserved blank rows.
|
|
30
30
|
*/
|
|
31
31
|
export declare function renderForScrollback<T>(render: () => T): T;
|
|
32
|
+
/** Widest an {@link Image} rendered at `width` columns draws; callers sizing a raster for it (`SvgFigure`) match it. */
|
|
33
|
+
export declare function imageMaxColumns(width: number): number;
|
|
32
34
|
/** Default count of inline images kept as live graphics before older ones fall back to text. */
|
|
33
35
|
export declare const DEFAULT_MAX_INLINE_IMAGES = 8;
|
|
34
36
|
/**
|
|
@@ -73,6 +75,13 @@ export declare class ImageBudget {
|
|
|
73
75
|
* gets a fresh id every call.
|
|
74
76
|
*/
|
|
75
77
|
acquireId(key?: string): number;
|
|
78
|
+
/**
|
|
79
|
+
* Retire the graphic held under `key` as soon as no frame shows it, instead
|
|
80
|
+
* of when the residency sweep reaches it. For an owner that replaced the
|
|
81
|
+
* image for good — a streaming SVG figure's earlier raster — so superseded
|
|
82
|
+
* revisions never push older images (scrollback included) out of the store.
|
|
83
|
+
*/
|
|
84
|
+
release(key: string): void;
|
|
76
85
|
/**
|
|
77
86
|
* Start an alternate-buffer lifecycle. Call once per `?1049h`, before the
|
|
78
87
|
* first pass of the fullscreen overlay or resize borrow that owns the buffer.
|
|
@@ -140,50 +149,8 @@ export declare class ImageBudget {
|
|
|
140
149
|
* the image is purged from the terminal store.
|
|
141
150
|
*/
|
|
142
151
|
registerPlacementGeometry(imageId: number, widthPx: number, heightPx: number): void;
|
|
143
|
-
/**
|
|
144
|
-
|
|
145
|
-
* that is committed once the frame's writes land). Called once per rendered
|
|
146
|
-
* frame — including frames that emit no placements — so an epoch whose rows
|
|
147
|
-
* commit while its line is never rewritten is still flagged before the next
|
|
148
|
-
* re-emission.
|
|
149
|
-
*/
|
|
150
|
-
observeCommitWatermark(committedTo: number): void;
|
|
151
|
-
/**
|
|
152
|
-
* End the physical-row coordinate epoch after observing its final commit
|
|
153
|
-
* watermark. Placement ids and latched archive state survive, but attachment
|
|
154
|
-
* rows do not: the next placement emit records them in the new-width frame.
|
|
155
|
-
*/
|
|
156
|
-
beginPlacementCoordinateEpoch(): void;
|
|
157
|
-
/**
|
|
158
|
-
* Resolve the placement id and geometry for a direct-placement emit whose
|
|
159
|
-
* topmost attached cell sits at `attachTopFrameRow` — the first frame row
|
|
160
|
-
* the placement covers, i.e. the block's first *visible* row, not its
|
|
161
|
-
* origin (-1 when the writer has no frame-space position: alt-screen,
|
|
162
|
-
* resize, ConPTY-truncated replays). `committedTo` is this frame's commit
|
|
163
|
-
* target in the same frame-row space (-1 when unknown).
|
|
164
|
-
*
|
|
165
|
-
* Invariant: a placement id may be re-used (Kitty replace strips that id's
|
|
166
|
-
* cells everywhere, scrollback included) only while none of the cells it
|
|
167
|
-
* attached have entered native scrollback. The epoch — the `p=` id —
|
|
168
|
-
* advances exactly when the archived flag says otherwise; rewrites with no
|
|
169
|
-
* commit progression keep replacing the same id in place.
|
|
170
|
-
*/
|
|
171
|
-
resolvePlacementEmit(imageId: number, attachTopFrameRow: number, committedTo: number): {
|
|
172
|
-
placementId: number;
|
|
173
|
-
widthPx: number;
|
|
174
|
-
heightPx: number;
|
|
175
|
-
} | null;
|
|
176
|
-
/**
|
|
177
|
-
* Restart every placement epoch after a destructive history clear (`CSI 3 J`
|
|
178
|
-
* full paint). The clear destroys all placement cells — scrollback rows are
|
|
179
|
-
* gone and the replay rewrites the viewport — so no archive remains to
|
|
180
|
-
* protect. Reverting to epoch 1 lets the replay recreate every visible
|
|
181
|
-
* placement after the terminal-wide cleanup.
|
|
182
|
-
*/
|
|
183
|
-
resetPlacementEpochs(): ReadonlyArray<{
|
|
184
|
-
imageId: number;
|
|
185
|
-
lastEpoch: number;
|
|
186
|
-
}>;
|
|
152
|
+
/** Source dimensions used by the frame writer to clip a direct placement. */
|
|
153
|
+
getPlacementGeometry(imageId: number): ImageDimensions | undefined;
|
|
187
154
|
/**
|
|
188
155
|
* Queue a one-time transmit for `imageId` on the surface the in-flight pass
|
|
189
156
|
* paints. No-op if that surface already holds the data, so a repeated call
|
|
@@ -218,6 +185,7 @@ export declare class Image implements Component {
|
|
|
218
185
|
/** Return source metadata without exposing the encoded image buffer. */
|
|
219
186
|
debugState(): Record<string, unknown>;
|
|
220
187
|
invalidate(): void;
|
|
188
|
+
releaseRenderCaches(): void;
|
|
221
189
|
/**
|
|
222
190
|
* A native `image` backed by a content-addressed blob; the terminal fits
|
|
223
191
|
* it. Cell caps become `ch`/`lines` bounds. The inline-image budget and
|
|
@@ -21,6 +21,7 @@ export declare class KeyValueList implements Component {
|
|
|
21
21
|
constructor(rows: readonly KeyValueRow[], options: KeyValueListOptions);
|
|
22
22
|
setRows(rows: readonly KeyValueRow[]): boolean;
|
|
23
23
|
invalidate(): void;
|
|
24
|
+
releaseRenderCaches(): void;
|
|
24
25
|
/** An aligned `kv` grid; label width and value wrapping are the terminal's. */
|
|
25
26
|
describe(_cx: DescribeContext): NativeNode;
|
|
26
27
|
render(width: number): readonly string[];
|
|
@@ -48,6 +48,7 @@ export declare class Row implements Component, MouseRoutable {
|
|
|
48
48
|
setDecorations(prefix: LayoutDecoration | undefined, gap: LayoutDecoration | undefined, suffix: LayoutDecoration | undefined): void;
|
|
49
49
|
setIgnoreTight(ignore: boolean): this;
|
|
50
50
|
invalidate(): void;
|
|
51
|
+
releaseRenderCaches(): void;
|
|
51
52
|
dispose(): void;
|
|
52
53
|
/**
|
|
53
54
|
* A flex `row`: each child sits in a slot carrying its width bounds
|
|
@@ -43,6 +43,7 @@ export declare class Stack implements Component, MouseRoutable {
|
|
|
43
43
|
setHeight(height: number | undefined): void;
|
|
44
44
|
setIgnoreTight(ignore: boolean): this;
|
|
45
45
|
invalidate(): void;
|
|
46
|
+
releaseRenderCaches(): void;
|
|
46
47
|
dispose(): void;
|
|
47
48
|
/**
|
|
48
49
|
* A `col` of slots carrying each child's height bounds (fixed → min = max
|
|
@@ -1,13 +1,27 @@
|
|
|
1
|
+
import { type TokensList } from "@linxiraos/pi-utils/marked";
|
|
1
2
|
import type { DescribeContext, NativeNode } from "../native/node.js";
|
|
2
3
|
import type { SymbolTheme } from "../symbols.js";
|
|
3
4
|
import type { Component } from "../tui.js";
|
|
4
5
|
/** @internal exported for tests — the grown-line block-kind gate. */
|
|
5
6
|
export declare function fastLineStartHazard(grownLine: string): boolean;
|
|
6
|
-
/**
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Lex a whole document with the renderer's rules (math, custom rules,
|
|
9
|
+
* strikethrough). Callers that split a document along its blocks (table
|
|
10
|
+
* charts) lex through this so they see the blocks Markdown renders.
|
|
11
|
+
*/
|
|
12
|
+
export declare function lexDocument(text: string): TokensList;
|
|
13
|
+
/**
|
|
14
|
+
* `source` as a fenced code block in `lang`: the fence is one backtick longer
|
|
15
|
+
* than any backtick run in the source (at least three), so the block always
|
|
16
|
+
* closes where intended. `open` leaves it unclosed, the source verbatim, for
|
|
17
|
+
* a body that is still arriving.
|
|
18
|
+
*/
|
|
19
|
+
export declare function fencedCode(lang: string, source: string, options?: {
|
|
20
|
+
open?: boolean;
|
|
21
|
+
}): string;
|
|
8
22
|
/** A hyperlink as the renderer sees it: inline `[text](href)`, `<autolink>`, bare GFM URL, or reference link. */
|
|
9
23
|
export interface MarkdownLink {
|
|
10
|
-
/**
|
|
24
|
+
/** Flattened visible label with whitespace collapsed to one row; falls back to `href` when empty. */
|
|
11
25
|
text: string;
|
|
12
26
|
/** Destination exactly as marked resolved it (references resolved, no normalization). */
|
|
13
27
|
href: string;
|
|
@@ -19,6 +33,17 @@ export interface MarkdownLink {
|
|
|
19
33
|
* Duplicate hrefs are kept; callers decide how to fold them.
|
|
20
34
|
*/
|
|
21
35
|
export declare function extractMarkdownLinks(text: string): MarkdownLink[];
|
|
36
|
+
/**
|
|
37
|
+
* Rewrite the destinations of inline links and link reference definitions in
|
|
38
|
+
* `text` to `resolve(href)`, leaving everything else byte-for-byte intact.
|
|
39
|
+
* Hosts that render the Markdown source themselves (a native terminal's `md`
|
|
40
|
+
* node) resolve relative destinations against their own idea of the working
|
|
41
|
+
* directory; handing them the session-resolved target keeps links pointing at
|
|
42
|
+
* what the author meant. Links inside code, images, autolinks and reference
|
|
43
|
+
* uses (`[x][ref]`, rewritten through their definition) are untouched; a link
|
|
44
|
+
* whose source cannot be located exactly is left as written.
|
|
45
|
+
*/
|
|
46
|
+
export declare function rewriteMarkdownLinkDestinations(text: string, resolve: (href: string) => string | undefined): string;
|
|
22
47
|
/** Drop all L2 cache entries. Call on theme change to prevent stale styled output. */
|
|
23
48
|
export declare function clearRenderCache(): void;
|
|
24
49
|
/**
|
|
@@ -28,6 +53,13 @@ export declare function clearRenderCache(): void;
|
|
|
28
53
|
export interface DefaultTextStyle {
|
|
29
54
|
/** Foreground color function */
|
|
30
55
|
color?: (text: string) => string;
|
|
56
|
+
/**
|
|
57
|
+
* The `color` foreground is prose-level: semantically-themed markdown spans
|
|
58
|
+
* (headings, links) keep their own `md*` theme colors instead of being
|
|
59
|
+
* painted over by it, while plain text runs still use `color`. Unset keeps
|
|
60
|
+
* the historical behavior where `color` paints every run.
|
|
61
|
+
*/
|
|
62
|
+
proseFg?: boolean;
|
|
31
63
|
/** Background color function */
|
|
32
64
|
bgColor?: (text: string) => string;
|
|
33
65
|
/** Bold text */
|
|
@@ -99,6 +131,7 @@ export declare class Markdown implements Component {
|
|
|
99
131
|
debugState(): Record<string, unknown>;
|
|
100
132
|
setText(text: string): boolean;
|
|
101
133
|
invalidate(): void;
|
|
134
|
+
releaseRenderCaches(): void;
|
|
102
135
|
/**
|
|
103
136
|
* The unrendered source as an `md` node, `stream` while the streaming
|
|
104
137
|
* (transient) cache is on. Append-only growth yields a fresh node of the
|
|
@@ -92,6 +92,7 @@ export declare class ScrollView implements Component {
|
|
|
92
92
|
/** Apply Arrow, Shift+Arrow, Page, Home, and End navigation keys. */
|
|
93
93
|
handleScrollKey(data: string): boolean;
|
|
94
94
|
invalidate(): void;
|
|
95
|
+
releaseRenderCaches(): void;
|
|
95
96
|
/** Permanently release a wrapped child's timers, subscriptions, and other resources. */
|
|
96
97
|
dispose(): void;
|
|
97
98
|
/**
|
|
@@ -15,6 +15,7 @@ export declare class Section implements Component {
|
|
|
15
15
|
#private;
|
|
16
16
|
constructor(options: SectionOptions);
|
|
17
17
|
invalidate(): void;
|
|
18
|
+
releaseRenderCaches(): void;
|
|
18
19
|
dispose(): void;
|
|
19
20
|
/** A `section` headed by the styled title; the rule is the terminal's. */
|
|
20
21
|
describe(_cx: DescribeContext): NativeNode;
|
|
@@ -29,6 +29,7 @@ export declare class Table implements Component {
|
|
|
29
29
|
constructor(rows: readonly (readonly TableCell[])[], columns: readonly TableColumn[], options?: TableOptions);
|
|
30
30
|
setRows(rows: readonly (readonly TableCell[])[]): boolean;
|
|
31
31
|
invalidate(): void;
|
|
32
|
+
releaseRenderCaches(): void;
|
|
32
33
|
/**
|
|
33
34
|
* A native `table`. Column priorities carry over unchanged (lower gives
|
|
34
35
|
* way first); truncating columns truncate at the end, the rest keep
|
|
@@ -26,6 +26,7 @@ export declare class Text implements Component {
|
|
|
26
26
|
*/
|
|
27
27
|
setStyleFn(styleFn?: (text: string) => string): this;
|
|
28
28
|
invalidate(): void;
|
|
29
|
+
releaseRenderCaches(): void;
|
|
29
30
|
/**
|
|
30
31
|
* Wrapped text; styling re-derived from the styled source so a theme swap
|
|
31
32
|
* re-resolves tokens. A background fill becomes the node's tone.
|
|
@@ -34,6 +34,13 @@ export interface FlattenTreeOptions<T, K extends TreeKey> {
|
|
|
34
34
|
rootDepth?: number;
|
|
35
35
|
/** Override the display depth inherited by direct children. */
|
|
36
36
|
getChildDepth?: (item: T, row: TreeRow<T, K>, children: readonly T[]) => number;
|
|
37
|
+
/**
|
|
38
|
+
* Reuse the parent ancestor list when a child keeps the same display depth
|
|
39
|
+
* and the current item has no siblings (`siblingCount === 1`). Otherwise
|
|
40
|
+
* retain the current item as an ancestor so connector gutters remain
|
|
41
|
+
* accurate, including when the item has multiple children.
|
|
42
|
+
*/
|
|
43
|
+
compactSameDepthAncestors?: boolean;
|
|
37
44
|
/** Stop projection after this many structural items. Omit for no traversal cap. */
|
|
38
45
|
maxItems?: number;
|
|
39
46
|
}
|
|
@@ -9,6 +9,7 @@ export declare class TruncatedText implements Component {
|
|
|
9
9
|
/** Return bounded source text and the last-known truncation state. */
|
|
10
10
|
debugState(): Record<string, unknown>;
|
|
11
11
|
invalidate(): void;
|
|
12
|
+
releaseRenderCaches(): void;
|
|
12
13
|
/** First line only, clamped to one visual line with an end ellipsis. */
|
|
13
14
|
describe(_cx: DescribeContext): NativeNode;
|
|
14
15
|
render(width: number): readonly string[];
|
package/dist/types/fuzzy.d.ts
CHANGED
|
@@ -16,6 +16,20 @@ export interface FuzzyFilterResult<T> {
|
|
|
16
16
|
score: number;
|
|
17
17
|
}
|
|
18
18
|
export declare function fuzzyMatch(query: string, text: string): FuzzyMatch;
|
|
19
|
+
/**
|
|
20
|
+
* A query normalized and tokenized once for matching against many texts.
|
|
21
|
+
*
|
|
22
|
+
* `fuzzyMatch(query, text)` re-normalizes `query` (and rebuilds its
|
|
23
|
+
* alphanumeric-swap variants) on every call; filters that test one query
|
|
24
|
+
* against every row should build one `FuzzyQuery` per keystroke instead.
|
|
25
|
+
* `query.match(text)` returns exactly what `fuzzyMatch(query, text)` returns.
|
|
26
|
+
*/
|
|
27
|
+
export declare class FuzzyQuery {
|
|
28
|
+
#private;
|
|
29
|
+
constructor(query: string);
|
|
30
|
+
/** Same result as `fuzzyMatch(query, text)`; `text` may be a prepared {@link FuzzyText}. */
|
|
31
|
+
match(text: string | FuzzyText): FuzzyMatch;
|
|
32
|
+
}
|
|
19
33
|
/**
|
|
20
34
|
* A text prepared once for repeated fuzzy matching.
|
|
21
35
|
*
|
|
@@ -30,7 +44,21 @@ export declare class FuzzyText {
|
|
|
30
44
|
#private;
|
|
31
45
|
constructor(text: string);
|
|
32
46
|
/** Match `query` (space-separated tokens; all must match) against the prepared text. */
|
|
33
|
-
match(query: string): FuzzyMatch;
|
|
47
|
+
match(query: string | FuzzyQuery): FuzzyMatch;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Items prepared once for repeated {@link fuzzyRank}-equivalent ranking.
|
|
51
|
+
*
|
|
52
|
+
* `fuzzyRank` resolves each candidate's search index through the bounded module
|
|
53
|
+
* cache, which holds at most {@link INDEX_CACHE_MAX} entries; larger candidate
|
|
54
|
+
* lists (the full model catalog) rebuild the overflow on every query. Hold one
|
|
55
|
+
* corpus per stable candidate list and call {@link rank} per keystroke instead.
|
|
56
|
+
*/
|
|
57
|
+
export declare class FuzzyCorpus<T> {
|
|
58
|
+
#private;
|
|
59
|
+
constructor(items: readonly T[], getText: (item: T) => string);
|
|
60
|
+
/** Same results as `fuzzyRank(items, query, getText)` for the prepared items. */
|
|
61
|
+
rank(query: string): FuzzyFilterResult<T>[];
|
|
34
62
|
}
|
|
35
63
|
/**
|
|
36
64
|
* Filter and sort items by fuzzy match quality (best matches first).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Key-hint formatting, kept free of the native addon: it imports only types
|
|
3
|
-
* plus the theme symbol mirror, so addon-free CLI paths (`
|
|
3
|
+
* plus the theme symbol mirror, so addon-free CLI paths (`zetacode --version`,
|
|
4
4
|
* help text in cli/command-help.ts) can format keys without loading
|
|
5
5
|
* `@linxiraos/pi-natives` through the keybindings registry.
|
|
6
6
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { KeyId } from "./app-keybindings.js";
|
|
1
2
|
/**
|
|
2
3
|
* Match the coding-agent interrupt key.
|
|
3
4
|
*
|
|
@@ -18,6 +19,8 @@ export declare function matchesSelectDown(data: string): boolean;
|
|
|
18
19
|
export declare function matchesSelectPageUp(data: string): boolean;
|
|
19
20
|
/** Match the generic selector page-down keybinding. */
|
|
20
21
|
export declare function matchesSelectPageDown(data: string): boolean;
|
|
22
|
+
/** Effective external-editor key: the first bound key, or Ctrl+G when unbound. */
|
|
23
|
+
export declare function appExternalEditorKey(): KeyId;
|
|
21
24
|
/** Match the external-editor keybinding, falling back to Ctrl+G when unbound. */
|
|
22
25
|
export declare function matchesAppExternalEditor(data: string): boolean;
|
|
23
26
|
/**
|
|
@@ -107,7 +107,7 @@ export declare const TUI_KEYBINDINGS: {
|
|
|
107
107
|
readonly description: "Delete word backward";
|
|
108
108
|
};
|
|
109
109
|
readonly "tui.editor.deleteWordForward": {
|
|
110
|
-
readonly defaultKeys: ["alt+delete", "alt+d", "super+alt+delete", "super+alt+d"];
|
|
110
|
+
readonly defaultKeys: ["alt+delete", "alt+d", "ctrl+delete", "super+alt+delete", "super+alt+d"];
|
|
111
111
|
readonly description: "Delete word forward";
|
|
112
112
|
};
|
|
113
113
|
readonly "tui.editor.deleteToLineStart": {
|
|
@@ -30,8 +30,8 @@ export interface KittyGraphicsFeatures {
|
|
|
30
30
|
* cannot use cursor-positioned placements because the outer terminal does not
|
|
31
31
|
* know pane scroll/reflow state. An explicit `PI_FORCE_IMAGE_PROTOCOL=kitty`
|
|
32
32
|
* opts into placeholders under any multiplexer — matching `timg -pk`.
|
|
33
|
-
* Automatic
|
|
34
|
-
* that
|
|
33
|
+
* Automatic fallback stays off inside multiplexers whose pane marker does not
|
|
34
|
+
* prove that a Kitty renderer is enabled (Herdr's is experimental).
|
|
35
35
|
*
|
|
36
36
|
* `PI_NO_KITTY_PLACEHOLDERS=1` and `PI_KITTY_PLACEHOLDERS=0` remain hard
|
|
37
37
|
* opt-outs; `PI_KITTY_PLACEHOLDERS=1` explicitly opts in anywhere else.
|
|
@@ -21,13 +21,14 @@ interface LoopWatchdogTimer {
|
|
|
21
21
|
cancel?(): void;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
* Always-on event-loop lag probe. Each tick is scheduled `intervalMs` ahead
|
|
25
|
-
*
|
|
26
|
-
* the loop was blocked that long. The overshoot is
|
|
27
|
-
* edge (one block ⇒ one line, deduped via
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
24
|
+
* Always-on event-loop lag probe. Each tick is scheduled `intervalMs` ahead,
|
|
25
|
+
* with that target recorded as its deadline; a tick that fires `thresholdMs`
|
|
26
|
+
* past its deadline means the loop was blocked that long. The overshoot is
|
|
27
|
+
* logged once on the rising edge (one block ⇒ one line, deduped via
|
|
28
|
+
* `#wasBlocked`). Attribution via
|
|
29
|
+
* {@link takeLoopPhaseAttribution} totals each innermost phase only after the tick's
|
|
30
|
+
* deadline. A phase is named, with `phaseMs`, only when its total outweighs all
|
|
31
|
+
* unlabeled time in that late window; otherwise the block remains "unknown".
|
|
31
32
|
*
|
|
32
33
|
* The handle is `unref`'d so the probe never keeps the process alive, and stop()
|
|
33
34
|
* cancels the armed timer when the handle exposes `cancel` (the default
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const cmuxMultiplexer: {
|
|
2
|
+
readonly id: "cmux";
|
|
3
|
+
readonly precedence: "session";
|
|
4
|
+
readonly sessionEnvKeys: readonly ["CMUX_WORKSPACE_ID", "CMUX_SURFACE_ID", "CMUX_REMOTE_TRANSPORT"];
|
|
5
|
+
readonly ownsScreenGrid: true;
|
|
6
|
+
readonly isInside: (env?: NodeJS.ProcessEnv) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Workspace/socket state alone is not enough: only the injected surface UUID
|
|
9
|
+
* identifies the pane that should receive the notification. Without a valid
|
|
10
|
+
* surface, or without the binary, delivery falls through unchanged.
|
|
11
|
+
*/
|
|
12
|
+
readonly notifier: {
|
|
13
|
+
readonly tier: "surface";
|
|
14
|
+
readonly send: ({ message, env }: import("./types.js").TerminalMultiplexerNotificationRequest) => boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare const herdrMultiplexer: {
|
|
2
|
+
readonly id: "herdr";
|
|
3
|
+
readonly precedence: "session";
|
|
4
|
+
readonly sessionEnvKeys: readonly ["HERDR_ENV", "HERDR_PANE_ID", "HERDR_TAB_ID", "HERDR_WORKSPACE_ID"];
|
|
5
|
+
readonly ownsScreenGrid: true;
|
|
6
|
+
readonly isInside: (env?: NodeJS.ProcessEnv) => boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Herdr multiplexes panes like tmux but swallows bare OSC 9 / OSC 99 and has
|
|
9
|
+
* no DCS passthrough envelope, and its bell relay does not flag a
|
|
10
|
+
* backgrounded tab — so without its CLI a backgrounded pane gets no signal
|
|
11
|
+
* at all that the agent finished or is waiting for input.
|
|
12
|
+
*
|
|
13
|
+
* `sound` maps the notification kind onto what Herdr offers: a question
|
|
14
|
+
* waiting on the user and a turn that stopped with an error both need the
|
|
15
|
+
* human and ring `request`, a settled turn rings `done`, anything else stays
|
|
16
|
+
* silent. The exact pane ID addresses the CLI call; without a valid one, or
|
|
17
|
+
* without the binary, delivery falls through.
|
|
18
|
+
*/
|
|
19
|
+
readonly notifier: {
|
|
20
|
+
readonly tier: "pane";
|
|
21
|
+
readonly send: ({ message, env }: import("./types.js").TerminalMultiplexerNotificationRequest) => boolean;
|
|
22
|
+
};
|
|
23
|
+
readonly hyperlinks: "render";
|
|
24
|
+
readonly honorsSynchronizedOutput: true;
|
|
25
|
+
readonly imagesRequireOverride: true;
|
|
26
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { TerminalNotification } from "../terminal-capabilities.js";
|
|
2
|
+
/** Title for out-of-band multiplexer notifications that carry none of their own. */
|
|
3
|
+
export declare const DEFAULT_NOTIFICATION_TITLE = "omp";
|
|
4
|
+
/** Title and body for an out-of-band multiplexer notification (cmux, Herdr). */
|
|
5
|
+
export declare function notificationTitleAndBody(message: string | TerminalNotification): {
|
|
6
|
+
title: string;
|
|
7
|
+
body: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Start a notifier CLI without waiting for or pinning it. Returns false when
|
|
11
|
+
* the binary cannot be spawned, which leaves delivery to the terminal fallback.
|
|
12
|
+
*/
|
|
13
|
+
export declare function spawnNotifier(cmd: string[]): boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orca is an xterm.js-based IDE whose terminals expose paired pane/worktree IDs.
|
|
3
|
+
* It is recognized for launches, but it ranks below nested multiplexers and keeps
|
|
4
|
+
* the direct-terminal render path it used before it was recognized.
|
|
5
|
+
*/
|
|
6
|
+
export declare const orcaMultiplexer: {
|
|
7
|
+
readonly id: "orca";
|
|
8
|
+
readonly precedence: "outerApp";
|
|
9
|
+
readonly sessionEnvKeys: readonly ["ORCA_PANE_KEY", "ORCA_WORKTREE_ID"];
|
|
10
|
+
readonly ownsScreenGrid: false;
|
|
11
|
+
readonly isInside: (env?: NodeJS.ProcessEnv) => boolean;
|
|
12
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const screenMultiplexer: {
|
|
2
|
+
readonly id: "screen";
|
|
3
|
+
readonly precedence: "session";
|
|
4
|
+
readonly sessionEnvKeys: readonly ["STY"];
|
|
5
|
+
readonly termPrefix: "screen";
|
|
6
|
+
readonly ownsScreenGrid: true;
|
|
7
|
+
readonly isInside: (env?: NodeJS.ProcessEnv) => boolean;
|
|
8
|
+
readonly hyperlinks: "drop";
|
|
9
|
+
};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Wrap a control sequence in tmux's DCS passthrough envelope. */
|
|
2
|
+
export declare function wrapTmuxPassthrough(payload: string): string;
|
|
3
|
+
export declare const tmuxMultiplexer: {
|
|
4
|
+
readonly id: "tmux";
|
|
5
|
+
readonly precedence: "session";
|
|
6
|
+
readonly sessionEnvKeys: readonly ["TMUX"];
|
|
7
|
+
readonly termPrefix: "tmux";
|
|
8
|
+
readonly ownsScreenGrid: true;
|
|
9
|
+
readonly isInside: (env?: NodeJS.ProcessEnv) => boolean;
|
|
10
|
+
readonly notifier: {
|
|
11
|
+
readonly tier: "inBand";
|
|
12
|
+
readonly send: ({ sequence, write }: import("./types.js").TerminalMultiplexerNotificationRequest) => boolean;
|
|
13
|
+
};
|
|
14
|
+
readonly hyperlinks: {
|
|
15
|
+
readonly forward: {
|
|
16
|
+
readonly termProgram: "tmux";
|
|
17
|
+
readonly major: 3;
|
|
18
|
+
readonly minor: 4;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
readonly backgroundColorCache: {
|
|
22
|
+
readonly passthrough: typeof wrapTmuxPassthrough;
|
|
23
|
+
readonly settleMs: 100;
|
|
24
|
+
};
|
|
25
|
+
readonly expandsRepPadding: true;
|
|
26
|
+
readonly expiresSynchronizedOutput: true;
|
|
27
|
+
readonly altRestoreEndsSynchronizedOutput: true;
|
|
28
|
+
readonly growsBeforeSigwinch: true;
|
|
29
|
+
};
|