@pentoshi/clai 3.18.3 → 4.0.2
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/README.md +44 -24
- package/bin/postinstall-policy.mjs +3 -0
- package/bin/postinstall.mjs +6 -3
- package/dist/agent/confirm-port.d.ts +5 -17
- package/dist/agent/confirm-port.js +8 -65
- package/dist/agent/confirm-port.js.map +1 -1
- package/dist/agent/evidence-governor.d.ts +1 -1
- package/dist/agent/evidence-governor.js +2 -2
- package/dist/agent/evidence-governor.js.map +1 -1
- package/dist/agent/finalize-gate.d.ts +0 -1
- package/dist/agent/finalize-gate.js +6 -24
- package/dist/agent/finalize-gate.js.map +1 -1
- package/dist/agent/loop-guard.d.ts +1 -0
- package/dist/agent/loop-guard.js +34 -1
- package/dist/agent/loop-guard.js.map +1 -1
- package/dist/agent/must-continue.d.ts +1 -4
- package/dist/agent/must-continue.js +0 -22
- package/dist/agent/must-continue.js.map +1 -1
- package/dist/agent/outcomes.js +2 -13
- package/dist/agent/outcomes.js.map +1 -1
- package/dist/agent/plan-decision.d.ts +0 -29
- package/dist/agent/plan-decision.js +0 -96
- package/dist/agent/plan-decision.js.map +1 -1
- package/dist/agent/plan-tool.js +19 -14
- package/dist/agent/plan-tool.js.map +1 -1
- package/dist/agent/progress-pause-policy.d.ts +0 -15
- package/dist/agent/progress-pause-policy.js +0 -15
- package/dist/agent/progress-pause-policy.js.map +1 -1
- package/dist/agent/runner.js +152 -393
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/task-evidence.d.ts +6 -0
- package/dist/agent/task-evidence.js +48 -3
- package/dist/agent/task-evidence.js.map +1 -1
- package/dist/agent/tool-history.js +11 -4
- package/dist/agent/tool-history.js.map +1 -1
- package/dist/app/commands/catalog.js +397 -0
- package/dist/app/commands/catalog.js.map +1 -0
- package/dist/app/commands/registry.js +1 -1
- package/dist/app/commands/registry.js.map +1 -1
- package/dist/app/confirm-prompt-text.d.ts +17 -0
- package/dist/app/confirm-prompt-text.js +34 -0
- package/dist/app/confirm-prompt-text.js.map +1 -0
- package/dist/app/controllers/session-controller.d.ts +1 -1
- package/dist/app/controllers/session-controller.js +3 -1
- package/dist/app/controllers/session-controller.js.map +1 -1
- package/dist/app/controllers/session-prompt-queue.d.ts +5 -1
- package/dist/app/controllers/session-prompt-queue.js +47 -30
- package/dist/app/controllers/session-prompt-queue.js.map +1 -1
- package/dist/app/controllers/turn-controller.js +41 -3
- package/dist/app/controllers/turn-controller.js.map +1 -1
- package/dist/app/ports/confirm-port.d.ts +0 -1
- package/dist/app/ports/persistence-port.d.ts +1 -1
- package/dist/app/ports/transcript-item.d.ts +63 -0
- package/dist/app/ports/transcript-item.js +2 -0
- package/dist/app/ports/transcript-item.js.map +1 -0
- package/dist/classic/app/ClassicApp.d.ts +12 -0
- package/dist/classic/app/ClassicApp.js +119 -0
- package/dist/classic/app/ClassicApp.js.map +1 -0
- package/dist/classic/app/action-handlers.d.ts +45 -0
- package/dist/classic/app/action-handlers.js +280 -0
- package/dist/classic/app/action-handlers.js.map +1 -0
- package/dist/classic/app/app-wiring.d.ts +133 -0
- package/dist/classic/app/app-wiring.js +383 -0
- package/dist/classic/app/app-wiring.js.map +1 -0
- package/dist/classic/app/git-branch.d.ts +1 -0
- package/dist/classic/app/git-branch.js +50 -0
- package/dist/classic/app/git-branch.js.map +1 -0
- package/dist/classic/app/use-feed.d.ts +40 -0
- package/dist/classic/app/use-feed.js +52 -0
- package/dist/classic/app/use-feed.js.map +1 -0
- package/dist/classic/app/wiring-interactions.d.ts +40 -0
- package/dist/classic/app/wiring-interactions.js +433 -0
- package/dist/classic/app/wiring-interactions.js.map +1 -0
- package/dist/classic/app/wiring-lifecycle.d.ts +10 -0
- package/dist/classic/app/wiring-lifecycle.js +242 -0
- package/dist/classic/app/wiring-lifecycle.js.map +1 -0
- package/dist/classic/app/wiring-selection.d.ts +3 -0
- package/dist/classic/app/wiring-selection.js +113 -0
- package/dist/classic/app/wiring-selection.js.map +1 -0
- package/dist/classic/app/wiring-types.d.ts +157 -0
- package/dist/classic/app/wiring-types.js +2 -0
- package/dist/classic/app/wiring-types.js.map +1 -0
- package/dist/classic/blocks/AssistantBlock.d.ts +3 -0
- package/dist/classic/blocks/AssistantBlock.js +6 -0
- package/dist/classic/blocks/AssistantBlock.js.map +1 -0
- package/dist/classic/blocks/BatchBlock.d.ts +3 -0
- package/dist/classic/blocks/BatchBlock.js +6 -0
- package/dist/classic/blocks/BatchBlock.js.map +1 -0
- package/dist/classic/blocks/CompactedBlock.d.ts +3 -0
- package/dist/classic/blocks/CompactedBlock.js +6 -0
- package/dist/classic/blocks/CompactedBlock.js.map +1 -0
- package/dist/classic/blocks/DiffBlock.d.ts +3 -0
- package/dist/classic/blocks/DiffBlock.js +6 -0
- package/dist/classic/blocks/DiffBlock.js.map +1 -0
- package/dist/classic/blocks/IntroBlock.d.ts +3 -0
- package/dist/classic/blocks/IntroBlock.js +6 -0
- package/dist/classic/blocks/IntroBlock.js.map +1 -0
- package/dist/classic/blocks/NoticeBlock.d.ts +3 -0
- package/dist/classic/blocks/NoticeBlock.js +6 -0
- package/dist/classic/blocks/NoticeBlock.js.map +1 -0
- package/dist/classic/blocks/ThinkingBlock.d.ts +3 -0
- package/dist/classic/blocks/ThinkingBlock.js +6 -0
- package/dist/classic/blocks/ThinkingBlock.js.map +1 -0
- package/dist/classic/blocks/ToolBlock.d.ts +3 -0
- package/dist/classic/blocks/ToolBlock.js +6 -0
- package/dist/classic/blocks/ToolBlock.js.map +1 -0
- package/dist/classic/blocks/UserBlock.d.ts +3 -0
- package/dist/classic/blocks/UserBlock.js +6 -0
- package/dist/classic/blocks/UserBlock.js.map +1 -0
- package/dist/classic/blocks/assistant-lines.d.ts +10 -0
- package/dist/classic/blocks/assistant-lines.js +43 -0
- package/dist/classic/blocks/assistant-lines.js.map +1 -0
- package/dist/classic/blocks/batch-lines.d.ts +7 -0
- package/dist/classic/blocks/batch-lines.js +79 -0
- package/dist/classic/blocks/batch-lines.js.map +1 -0
- package/dist/classic/blocks/block-context.d.ts +33 -0
- package/dist/classic/blocks/block-context.js +41 -0
- package/dist/classic/blocks/block-context.js.map +1 -0
- package/dist/classic/blocks/compacted-lines.d.ts +5 -0
- package/dist/classic/blocks/compacted-lines.js +54 -0
- package/dist/classic/blocks/compacted-lines.js.map +1 -0
- package/dist/classic/blocks/diff-lines.d.ts +13 -0
- package/dist/classic/blocks/diff-lines.js +116 -0
- package/dist/classic/blocks/diff-lines.js.map +1 -0
- package/dist/classic/blocks/intro-lines.d.ts +16 -0
- package/dist/classic/blocks/intro-lines.js +23 -0
- package/dist/classic/blocks/intro-lines.js.map +1 -0
- package/dist/classic/blocks/notice-lines.d.ts +7 -0
- package/dist/classic/blocks/notice-lines.js +28 -0
- package/dist/classic/blocks/notice-lines.js.map +1 -0
- package/dist/classic/blocks/thinking-lines.d.ts +5 -0
- package/dist/classic/blocks/thinking-lines.js +34 -0
- package/dist/classic/blocks/thinking-lines.js.map +1 -0
- package/dist/classic/blocks/tool-lines.d.ts +22 -0
- package/dist/classic/blocks/tool-lines.js +135 -0
- package/dist/classic/blocks/tool-lines.js.map +1 -0
- package/dist/classic/blocks/user-lines.d.ts +5 -0
- package/dist/classic/blocks/user-lines.js +26 -0
- package/dist/classic/blocks/user-lines.js.map +1 -0
- package/dist/classic/bootstrap/osc52-renderer.d.ts +10 -0
- package/dist/classic/bootstrap/osc52-renderer.js +38 -0
- package/dist/classic/bootstrap/osc52-renderer.js.map +1 -0
- package/dist/classic/bootstrap/renderer-handle.d.ts +15 -0
- package/dist/classic/bootstrap/renderer-handle.js +22 -0
- package/dist/classic/bootstrap/renderer-handle.js.map +1 -0
- package/dist/classic/bootstrap/start-classic.d.ts +8 -0
- package/dist/classic/bootstrap/start-classic.js +130 -0
- package/dist/classic/bootstrap/start-classic.js.map +1 -0
- package/dist/classic/bootstrap/suspend-port.d.ts +14 -0
- package/dist/classic/bootstrap/suspend-port.js +29 -0
- package/dist/classic/bootstrap/suspend-port.js.map +1 -0
- package/dist/classic/bootstrap/terminal-session.d.ts +58 -0
- package/dist/classic/bootstrap/terminal-session.js +136 -0
- package/dist/classic/bootstrap/terminal-session.js.map +1 -0
- package/dist/classic/chrome/Chrome.d.ts +19 -0
- package/dist/classic/chrome/Chrome.js +30 -0
- package/dist/classic/chrome/Chrome.js.map +1 -0
- package/dist/classic/chrome/Composer.d.ts +12 -0
- package/dist/classic/chrome/Composer.js +61 -0
- package/dist/classic/chrome/Composer.js.map +1 -0
- package/dist/classic/chrome/QueuePanel.d.ts +3 -0
- package/dist/classic/chrome/QueuePanel.js +10 -0
- package/dist/classic/chrome/QueuePanel.js.map +1 -0
- package/dist/classic/chrome/ResponderStrip.d.ts +3 -0
- package/dist/classic/chrome/ResponderStrip.js +9 -0
- package/dist/classic/chrome/ResponderStrip.js.map +1 -0
- package/dist/classic/chrome/StatusBar.d.ts +3 -0
- package/dist/classic/chrome/StatusBar.js +7 -0
- package/dist/classic/chrome/StatusBar.js.map +1 -0
- package/dist/classic/chrome/ToastRow.d.ts +3 -0
- package/dist/classic/chrome/ToastRow.js +10 -0
- package/dist/classic/chrome/ToastRow.js.map +1 -0
- package/dist/classic/chrome/composer-controller.d.ts +57 -0
- package/dist/classic/chrome/composer-controller.js +345 -0
- package/dist/classic/chrome/composer-controller.js.map +1 -0
- package/dist/classic/chrome/composer-frame.d.ts +35 -0
- package/dist/classic/chrome/composer-frame.js +46 -0
- package/dist/classic/chrome/composer-frame.js.map +1 -0
- package/dist/classic/chrome/composer-keys.d.ts +4 -0
- package/dist/classic/chrome/composer-keys.js +45 -0
- package/dist/classic/chrome/composer-keys.js.map +1 -0
- package/dist/classic/chrome/context-limit-editor.d.ts +7 -0
- package/dist/classic/chrome/context-limit-editor.js +13 -0
- package/dist/classic/chrome/context-limit-editor.js.map +1 -0
- package/dist/classic/chrome/directory-row.d.ts +14 -0
- package/dist/classic/chrome/directory-row.js +26 -0
- package/dist/classic/chrome/directory-row.js.map +1 -0
- package/dist/classic/chrome/editor-model.d.ts +37 -0
- package/dist/classic/chrome/editor-model.js +195 -0
- package/dist/classic/chrome/editor-model.js.map +1 -0
- package/dist/classic/chrome/editor-view.d.ts +34 -0
- package/dist/classic/chrome/editor-view.js +141 -0
- package/dist/classic/chrome/editor-view.js.map +1 -0
- package/dist/classic/chrome/queue-rows.d.ts +10 -0
- package/dist/classic/chrome/queue-rows.js +32 -0
- package/dist/classic/chrome/queue-rows.js.map +1 -0
- package/dist/classic/chrome/responder-row.d.ts +9 -0
- package/dist/classic/chrome/responder-row.js +17 -0
- package/dist/classic/chrome/responder-row.js.map +1 -0
- package/dist/classic/chrome/row-budget.d.ts +43 -0
- package/dist/classic/chrome/row-budget.js +78 -0
- package/dist/classic/chrome/row-budget.js.map +1 -0
- package/dist/classic/chrome/status-rows.d.ts +44 -0
- package/dist/classic/chrome/status-rows.js +165 -0
- package/dist/classic/chrome/status-rows.js.map +1 -0
- package/dist/classic/chrome/toast-rows.d.ts +14 -0
- package/dist/classic/chrome/toast-rows.js +82 -0
- package/dist/classic/chrome/toast-rows.js.map +1 -0
- package/dist/classic/chrome/use-terminal-size.d.ts +14 -0
- package/dist/classic/chrome/use-terminal-size.js +38 -0
- package/dist/classic/chrome/use-terminal-size.js.map +1 -0
- package/dist/classic/feed/Feed.d.ts +17 -0
- package/dist/classic/feed/Feed.js +37 -0
- package/dist/classic/feed/Feed.js.map +1 -0
- package/dist/classic/feed/FeedStatic.d.ts +13 -0
- package/dist/classic/feed/FeedStatic.js +15 -0
- package/dist/classic/feed/FeedStatic.js.map +1 -0
- package/dist/classic/feed/LiveTail.d.ts +10 -0
- package/dist/classic/feed/LiveTail.js +20 -0
- package/dist/classic/feed/LiveTail.js.map +1 -0
- package/dist/classic/feed/ScrollbarGutter.d.ts +9 -0
- package/dist/classic/feed/ScrollbarGutter.js +42 -0
- package/dist/classic/feed/ScrollbarGutter.js.map +1 -0
- package/dist/classic/feed/block-height.d.ts +12 -0
- package/dist/classic/feed/block-height.js +34 -0
- package/dist/classic/feed/block-height.js.map +1 -0
- package/dist/classic/feed/commit-ledger.d.ts +26 -0
- package/dist/classic/feed/commit-ledger.js +52 -0
- package/dist/classic/feed/commit-ledger.js.map +1 -0
- package/dist/classic/feed/feed-blocks.d.ts +39 -0
- package/dist/classic/feed/feed-blocks.js +124 -0
- package/dist/classic/feed/feed-blocks.js.map +1 -0
- package/dist/classic/feed/live-tail-policy.d.ts +35 -0
- package/dist/classic/feed/live-tail-policy.js +80 -0
- package/dist/classic/feed/live-tail-policy.js.map +1 -0
- package/dist/classic/feed/scrollbar-rows.d.ts +6 -0
- package/dist/classic/feed/scrollbar-rows.js +18 -0
- package/dist/classic/feed/scrollbar-rows.js.map +1 -0
- package/dist/classic/feed/transcript-selection.d.ts +16 -0
- package/dist/classic/feed/transcript-selection.js +92 -0
- package/dist/classic/feed/transcript-selection.js.map +1 -0
- package/dist/classic/feed/transcript-window.d.ts +33 -0
- package/dist/classic/feed/transcript-window.js +53 -0
- package/dist/classic/feed/transcript-window.js.map +1 -0
- package/dist/classic/input/cancel-ladder.d.ts +47 -0
- package/dist/classic/input/cancel-ladder.js +100 -0
- package/dist/classic/input/cancel-ladder.js.map +1 -0
- package/dist/classic/input/chord-from-key.d.ts +2 -0
- package/dist/classic/input/chord-from-key.js +25 -0
- package/dist/classic/input/chord-from-key.js.map +1 -0
- package/dist/classic/input/input-router.d.ts +33 -0
- package/dist/classic/input/input-router.js +146 -0
- package/dist/classic/input/input-router.js.map +1 -0
- package/dist/classic/input/key-event.d.ts +39 -0
- package/dist/classic/input/key-event.js +12 -0
- package/dist/classic/input/key-event.js.map +1 -0
- package/dist/classic/input/paste-decoder.d.ts +1 -0
- package/dist/classic/input/paste-decoder.js +9 -0
- package/dist/classic/input/paste-decoder.js.map +1 -0
- package/dist/classic/input/raw-decoder.d.ts +31 -0
- package/dist/classic/input/raw-decoder.js +325 -0
- package/dist/classic/input/raw-decoder.js.map +1 -0
- package/dist/classic/input/sgr-mouse.d.ts +2 -0
- package/dist/classic/input/sgr-mouse.js +37 -0
- package/dist/classic/input/sgr-mouse.js.map +1 -0
- package/dist/classic/input/terminal-sequences.d.ts +38 -0
- package/dist/classic/input/terminal-sequences.js +111 -0
- package/dist/classic/input/terminal-sequences.js.map +1 -0
- package/dist/classic/panels/CompletionPanel.d.ts +3 -0
- package/dist/classic/panels/CompletionPanel.js +10 -0
- package/dist/classic/panels/CompletionPanel.js.map +1 -0
- package/dist/classic/panels/ConfirmPanel.d.ts +3 -0
- package/dist/classic/panels/ConfirmPanel.js +7 -0
- package/dist/classic/panels/ConfirmPanel.js.map +1 -0
- package/dist/classic/panels/JobsPanel.d.ts +3 -0
- package/dist/classic/panels/JobsPanel.js +7 -0
- package/dist/classic/panels/JobsPanel.js.map +1 -0
- package/dist/classic/panels/KeysPanel.d.ts +3 -0
- package/dist/classic/panels/KeysPanel.js +7 -0
- package/dist/classic/panels/KeysPanel.js.map +1 -0
- package/dist/classic/panels/PagerPanel.d.ts +3 -0
- package/dist/classic/panels/PagerPanel.js +7 -0
- package/dist/classic/panels/PagerPanel.js.map +1 -0
- package/dist/classic/panels/PanelFrame.d.ts +3 -0
- package/dist/classic/panels/PanelFrame.js +8 -0
- package/dist/classic/panels/PanelFrame.js.map +1 -0
- package/dist/classic/panels/PickerPanel.d.ts +3 -0
- package/dist/classic/panels/PickerPanel.js +7 -0
- package/dist/classic/panels/PickerPanel.js.map +1 -0
- package/dist/classic/panels/PlanPanel.d.ts +3 -0
- package/dist/classic/panels/PlanPanel.js +7 -0
- package/dist/classic/panels/PlanPanel.js.map +1 -0
- package/dist/classic/panels/PromptActionsPanel.d.ts +3 -0
- package/dist/classic/panels/PromptActionsPanel.js +7 -0
- package/dist/classic/panels/PromptActionsPanel.js.map +1 -0
- package/dist/classic/panels/ScopePanel.d.ts +3 -0
- package/dist/classic/panels/ScopePanel.js +7 -0
- package/dist/classic/panels/ScopePanel.js.map +1 -0
- package/dist/classic/panels/SearchPanel.d.ts +3 -0
- package/dist/classic/panels/SearchPanel.js +7 -0
- package/dist/classic/panels/SearchPanel.js.map +1 -0
- package/dist/classic/panels/SecretPanel.d.ts +3 -0
- package/dist/classic/panels/SecretPanel.js +7 -0
- package/dist/classic/panels/SecretPanel.js.map +1 -0
- package/dist/classic/panels/completion-accept.d.ts +17 -0
- package/dist/classic/panels/completion-accept.js +58 -0
- package/dist/classic/panels/completion-accept.js.map +1 -0
- package/dist/classic/panels/completion-rows.d.ts +29 -0
- package/dist/classic/panels/completion-rows.js +135 -0
- package/dist/classic/panels/completion-rows.js.map +1 -0
- package/dist/classic/panels/confirm-panel.d.ts +24 -0
- package/dist/classic/panels/confirm-panel.js +115 -0
- package/dist/classic/panels/confirm-panel.js.map +1 -0
- package/dist/classic/panels/jobs-panel.d.ts +32 -0
- package/dist/classic/panels/jobs-panel.js +116 -0
- package/dist/classic/panels/jobs-panel.js.map +1 -0
- package/dist/classic/panels/keys-panel.d.ts +40 -0
- package/dist/classic/panels/keys-panel.js +174 -0
- package/dist/classic/panels/keys-panel.js.map +1 -0
- package/dist/classic/panels/list-rows.d.ts +27 -0
- package/dist/classic/panels/list-rows.js +42 -0
- package/dist/classic/panels/list-rows.js.map +1 -0
- package/dist/classic/panels/list-window.d.ts +15 -0
- package/dist/classic/panels/list-window.js +25 -0
- package/dist/classic/panels/list-window.js.map +1 -0
- package/dist/classic/panels/pager-panel.d.ts +50 -0
- package/dist/classic/panels/pager-panel.js +238 -0
- package/dist/classic/panels/pager-panel.js.map +1 -0
- package/dist/classic/panels/panel-controller.d.ts +29 -0
- package/dist/classic/panels/panel-controller.js +320 -0
- package/dist/classic/panels/panel-controller.js.map +1 -0
- package/dist/classic/panels/panel-effect.d.ts +74 -0
- package/dist/classic/panels/panel-effect.js +7 -0
- package/dist/classic/panels/panel-effect.js.map +1 -0
- package/dist/classic/panels/panel-effects.d.ts +11 -0
- package/dist/classic/panels/panel-effects.js +105 -0
- package/dist/classic/panels/panel-effects.js.map +1 -0
- package/dist/classic/panels/panel-frame.d.ts +20 -0
- package/dist/classic/panels/panel-frame.js +47 -0
- package/dist/classic/panels/panel-frame.js.map +1 -0
- package/dist/classic/panels/panel-host.d.ts +16 -0
- package/dist/classic/panels/panel-host.js +49 -0
- package/dist/classic/panels/panel-host.js.map +1 -0
- package/dist/classic/panels/panel-initial-states.d.ts +18 -0
- package/dist/classic/panels/panel-initial-states.js +33 -0
- package/dist/classic/panels/panel-initial-states.js.map +1 -0
- package/dist/classic/panels/panel-types.d.ts +47 -0
- package/dist/classic/panels/panel-types.js +2 -0
- package/dist/classic/panels/panel-types.js.map +1 -0
- package/dist/classic/panels/panel-wheel.d.ts +20 -0
- package/dist/classic/panels/panel-wheel.js +82 -0
- package/dist/classic/panels/panel-wheel.js.map +1 -0
- package/dist/classic/panels/picker-panel.d.ts +35 -0
- package/dist/classic/panels/picker-panel.js +150 -0
- package/dist/classic/panels/picker-panel.js.map +1 -0
- package/dist/classic/panels/plan-panel.d.ts +27 -0
- package/dist/classic/panels/plan-panel.js +98 -0
- package/dist/classic/panels/plan-panel.js.map +1 -0
- package/dist/classic/panels/prompt-actions-panel.d.ts +25 -0
- package/dist/classic/panels/prompt-actions-panel.js +57 -0
- package/dist/classic/panels/prompt-actions-panel.js.map +1 -0
- package/dist/classic/panels/scope-panel.d.ts +27 -0
- package/dist/classic/panels/scope-panel.js +122 -0
- package/dist/classic/panels/scope-panel.js.map +1 -0
- package/dist/classic/panels/search-panel.d.ts +32 -0
- package/dist/classic/panels/search-panel.js +126 -0
- package/dist/classic/panels/search-panel.js.map +1 -0
- package/dist/classic/panels/secret-panel.d.ts +28 -0
- package/dist/classic/panels/secret-panel.js +70 -0
- package/dist/classic/panels/secret-panel.js.map +1 -0
- package/dist/classic/render/ansi-text.d.ts +36 -0
- package/dist/classic/render/ansi-text.js +234 -0
- package/dist/classic/render/ansi-text.js.map +1 -0
- package/dist/classic/render/glyphs.d.ts +49 -0
- package/dist/classic/render/glyphs.js +111 -0
- package/dist/classic/render/glyphs.js.map +1 -0
- package/dist/classic/render/ink-theme.d.ts +49 -0
- package/dist/classic/render/ink-theme.js +73 -0
- package/dist/classic/render/ink-theme.js.map +1 -0
- package/dist/classic/render/measure.d.ts +17 -0
- package/dist/classic/render/measure.js +33 -0
- package/dist/classic/render/measure.js.map +1 -0
- package/dist/classic/render/shell-width.d.ts +12 -0
- package/dist/classic/render/shell-width.js +23 -0
- package/dist/classic/render/shell-width.js.map +1 -0
- package/dist/classic/render/wrap.d.ts +19 -0
- package/dist/classic/render/wrap.js +102 -0
- package/dist/classic/render/wrap.js.map +1 -0
- package/dist/commands/doctor.js +9 -8
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/providers.js +43 -50
- package/dist/commands/providers.js.map +1 -1
- package/dist/commands/search-providers.js +3 -5
- package/dist/commands/search-providers.js.map +1 -1
- package/dist/index.js +76 -84
- package/dist/index.js.map +1 -1
- package/dist/llm/capabilities.js +5 -2
- package/dist/llm/capabilities.js.map +1 -1
- package/dist/llm/custom-providers.js +16 -3
- package/dist/llm/custom-providers.js.map +1 -1
- package/dist/llm/http.d.ts +5 -0
- package/dist/llm/http.js +38 -8
- package/dist/llm/http.js.map +1 -1
- package/dist/llm/meta.js +56 -24
- package/dist/llm/meta.js.map +1 -1
- package/dist/llm/modal.js +3 -2
- package/dist/llm/modal.js.map +1 -1
- package/dist/llm/router.js +36 -23
- package/dist/llm/router.js.map +1 -1
- package/dist/llm/system-messages.d.ts +1 -0
- package/dist/llm/system-messages.js +6 -0
- package/dist/llm/system-messages.js.map +1 -1
- package/dist/llm/token-usage.js +11 -1
- package/dist/llm/token-usage.js.map +1 -1
- package/dist/llm/tool-protocol.js +10 -3
- package/dist/llm/tool-protocol.js.map +1 -1
- package/dist/modes/agent.d.ts +3 -0
- package/dist/modes/agent.js +10 -3
- package/dist/modes/agent.js.map +1 -1
- package/dist/modes/ask.js +2 -2
- package/dist/modes/ask.js.map +1 -1
- package/dist/noninteractive/read-stdin.d.ts +1 -0
- package/dist/noninteractive/read-stdin.js +8 -0
- package/dist/noninteractive/read-stdin.js.map +1 -0
- package/dist/noninteractive/readline-prompts.d.ts +47 -0
- package/dist/noninteractive/readline-prompts.js +201 -0
- package/dist/noninteractive/readline-prompts.js.map +1 -0
- package/dist/noninteractive/start-noninteractive.d.ts +32 -0
- package/dist/noninteractive/start-noninteractive.js +100 -0
- package/dist/noninteractive/start-noninteractive.js.map +1 -0
- package/dist/noninteractive/stdio-confirm-port.d.ts +15 -0
- package/dist/noninteractive/stdio-confirm-port.js +45 -0
- package/dist/noninteractive/stdio-confirm-port.js.map +1 -0
- package/dist/noninteractive/stream-blocks.d.ts +117 -0
- package/dist/noninteractive/stream-blocks.js +445 -0
- package/dist/noninteractive/stream-blocks.js.map +1 -0
- package/dist/noninteractive/stream-renderer.d.ts +40 -0
- package/dist/noninteractive/stream-renderer.js +164 -0
- package/dist/noninteractive/stream-renderer.js.map +1 -0
- package/dist/noninteractive/stream-spinner.d.ts +28 -0
- package/dist/noninteractive/stream-spinner.js +45 -0
- package/dist/noninteractive/stream-spinner.js.map +1 -0
- package/dist/os/bun-runtime.js +207 -0
- package/dist/os/bun-runtime.js.map +1 -0
- package/dist/store/config.d.ts +3 -1
- package/dist/store/config.js +37 -5
- package/dist/store/config.js.map +1 -1
- package/dist/store/history.d.ts +1 -1
- package/dist/store/history.js +3 -0
- package/dist/store/history.js.map +1 -1
- package/dist/store/keys.d.ts +5 -2
- package/dist/store/keys.js +97 -14
- package/dist/store/keys.js.map +1 -1
- package/dist/tools/registry.js +27 -4
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/web/providers/duckduckgo.js +1 -1
- package/dist/tools/web/providers/duckduckgo.js.map +1 -1
- package/dist/tools/web/readable.js +1 -1
- package/dist/tools/web/readable.js.map +1 -1
- package/dist/tui-v2/app/App.js +20 -28
- package/dist/tui-v2/app/App.js.map +1 -1
- package/dist/tui-v2/bootstrap/pager-export.d.ts +9 -18
- package/dist/tui-v2/bootstrap/pager-export.js +15 -72
- package/dist/tui-v2/bootstrap/pager-export.js.map +1 -1
- package/dist/tui-v2/bootstrap/start-tui-v2.js +8 -8
- package/dist/tui-v2/bootstrap/start-tui-v2.js.map +1 -1
- package/dist/tui-v2/components/completion/completion-menu.d.ts +2 -2
- package/dist/tui-v2/components/composer/composer-input-box.d.ts +1 -1
- package/dist/tui-v2/components/composer/paste-chip.d.ts +2 -2
- package/dist/tui-v2/components/composer/paste-chip.js +1 -1
- package/dist/tui-v2/components/composer/paste-chip.js.map +1 -1
- package/dist/tui-v2/components/jobs/jobs-panel.d.ts +2 -2
- package/dist/tui-v2/components/jobs/jobs-panel.js +4 -4
- package/dist/tui-v2/components/jobs/jobs-panel.js.map +1 -1
- package/dist/tui-v2/components/modal/confirm-modal.d.ts +3 -3
- package/dist/tui-v2/components/modal/confirm-modal.js +6 -6
- package/dist/tui-v2/components/modal/confirm-modal.js.map +1 -1
- package/dist/tui-v2/components/modal/keys-modal.d.ts +3 -3
- package/dist/tui-v2/components/modal/keys-modal.js +24 -9
- package/dist/tui-v2/components/modal/keys-modal.js.map +1 -1
- package/dist/tui-v2/components/modal/prompt-actions-modal.d.ts +3 -3
- package/dist/tui-v2/components/modal/prompt-actions-modal.js +2 -2
- package/dist/tui-v2/components/modal/prompt-actions-modal.js.map +1 -1
- package/dist/tui-v2/components/modal/scope-modal.d.ts +3 -3
- package/dist/tui-v2/components/modal/scope-modal.js +1 -1
- package/dist/tui-v2/components/modal/scope-modal.js.map +1 -1
- package/dist/tui-v2/components/modal/secret-modal.d.ts +3 -3
- package/dist/tui-v2/components/modal/secret-modal.js +2 -2
- package/dist/tui-v2/components/modal/secret-modal.js.map +1 -1
- package/dist/tui-v2/components/overlay/overlay-host.d.ts +2 -2
- package/dist/tui-v2/components/overlay/overlay-host.js +1 -1
- package/dist/tui-v2/components/overlay/overlay-host.js.map +1 -1
- package/dist/tui-v2/components/pager/pager-line.d.ts +3 -3
- package/dist/tui-v2/components/pager/pager-line.js +3 -3
- package/dist/tui-v2/components/pager/pager-line.js.map +1 -1
- package/dist/tui-v2/components/pager/pager.d.ts +3 -3
- package/dist/tui-v2/components/pager/pager.js +6 -5
- package/dist/tui-v2/components/pager/pager.js.map +1 -1
- package/dist/tui-v2/components/picker/picker.d.ts +3 -3
- package/dist/tui-v2/components/picker/picker.js +2 -2
- package/dist/tui-v2/components/picker/picker.js.map +1 -1
- package/dist/tui-v2/components/plan/plan-pane-anim.js +1 -1
- package/dist/tui-v2/components/plan/plan-pane-anim.js.map +1 -1
- package/dist/tui-v2/components/plan/plan-view.d.ts +2 -2
- package/dist/tui-v2/components/plan/plan-view.js +2 -2
- package/dist/tui-v2/components/plan/plan-view.js.map +1 -1
- package/dist/tui-v2/components/queue/queue-panel.d.ts +2 -2
- package/dist/tui-v2/components/queue/queue-panel.js +3 -3
- package/dist/tui-v2/components/queue/queue-panel.js.map +1 -1
- package/dist/tui-v2/components/status/context-limit-chip.d.ts +1 -5
- package/dist/tui-v2/components/status/context-limit-chip.js +1 -38
- package/dist/tui-v2/components/status/context-limit-chip.js.map +1 -1
- package/dist/tui-v2/components/status/status-line.d.ts +5 -34
- package/dist/tui-v2/components/status/status-line.js +7 -99
- package/dist/tui-v2/components/status/status-line.js.map +1 -1
- package/dist/tui-v2/components/toast/toast-anim.d.ts +0 -1
- package/dist/tui-v2/components/toast/toast-anim.js +2 -3
- package/dist/tui-v2/components/toast/toast-anim.js.map +1 -1
- package/dist/tui-v2/components/toast/toast-host.d.ts +2 -2
- package/dist/tui-v2/components/toast/toast-host.js +2 -2
- package/dist/tui-v2/components/toast/toast-host.js.map +1 -1
- package/dist/tui-v2/components/transcript/assistant-message.d.ts +2 -2
- package/dist/tui-v2/components/transcript/assistant-message.js +3 -2
- package/dist/tui-v2/components/transcript/assistant-message.js.map +1 -1
- package/dist/tui-v2/components/transcript/compacted-row.d.ts +3 -3
- package/dist/tui-v2/components/transcript/compacted-row.js +6 -5
- package/dist/tui-v2/components/transcript/compacted-row.js.map +1 -1
- package/dist/tui-v2/components/transcript/file-diff-card.d.ts +1 -1
- package/dist/tui-v2/components/transcript/file-diff-card.js +1 -1
- package/dist/tui-v2/components/transcript/file-diff-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/intro-card.d.ts +2 -2
- package/dist/tui-v2/components/transcript/intro-card.js +1 -1
- package/dist/tui-v2/components/transcript/intro-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/linkable-text.d.ts +1 -1
- package/dist/tui-v2/components/transcript/linkable-text.js +1 -1
- package/dist/tui-v2/components/transcript/linkable-text.js.map +1 -1
- package/dist/tui-v2/components/transcript/notice-row.d.ts +2 -2
- package/dist/tui-v2/components/transcript/search-bar.d.ts +1 -1
- package/dist/tui-v2/components/transcript/thinking-block.d.ts +2 -2
- package/dist/tui-v2/components/transcript/thinking-block.js +3 -3
- package/dist/tui-v2/components/transcript/thinking-block.js.map +1 -1
- package/dist/tui-v2/components/transcript/tool-card.d.ts +3 -3
- package/dist/tui-v2/components/transcript/tool-card.js +7 -7
- package/dist/tui-v2/components/transcript/tool-card.js.map +1 -1
- package/dist/tui-v2/components/transcript/transcript-row.d.ts +4 -4
- package/dist/tui-v2/components/transcript/transcript-scrollbar.d.ts +1 -1
- package/dist/tui-v2/components/transcript/transcript-view.d.ts +3 -3
- package/dist/tui-v2/components/transcript/transcript-view.js +6 -6
- package/dist/tui-v2/components/transcript/transcript-view.js.map +1 -1
- package/dist/tui-v2/components/transcript/use-native-selection-copy.d.ts +1 -1
- package/dist/tui-v2/components/transcript/use-transcript-selection.d.ts +2 -2
- package/dist/tui-v2/components/transcript/use-transcript-selection.js +3 -3
- package/dist/tui-v2/components/transcript/use-transcript-selection.js.map +1 -1
- package/dist/tui-v2/components/transcript/user-message.d.ts +2 -2
- package/dist/tui-v2/components/transcript/user-message.js +1 -1
- package/dist/tui-v2/components/transcript/user-message.js.map +1 -1
- package/dist/tui-v2/composer/composer-editor.d.ts +2 -2
- package/dist/tui-v2/composer/composer-editor.js +20 -22
- package/dist/tui-v2/composer/composer-editor.js.map +1 -1
- package/dist/tui-v2/composer/composer-image-paste.d.ts +1 -1
- package/dist/tui-v2/composer/composer-image-paste.js +1 -1
- package/dist/tui-v2/composer/composer-image-paste.js.map +1 -1
- package/dist/tui-v2/composer/use-draft-actions.d.ts +2 -2
- package/dist/tui-v2/composer/use-draft-actions.js +2 -2
- package/dist/tui-v2/composer/use-draft-actions.js.map +1 -1
- package/dist/tui-v2/input/chord-from-opentui-key.d.ts +20 -0
- package/dist/tui-v2/input/chord-from-opentui-key.js +51 -0
- package/dist/tui-v2/input/chord-from-opentui-key.js.map +1 -0
- package/dist/tui-v2/rendering/pager-markdown.d.ts +2 -22
- package/dist/tui-v2/rendering/pager-markdown.js +4 -103
- package/dist/tui-v2/rendering/pager-markdown.js.map +1 -1
- package/dist/tui-v2/rendering/styled-markdown.d.ts +20 -0
- package/dist/tui-v2/rendering/styled-markdown.js +35 -0
- package/dist/tui-v2/rendering/styled-markdown.js.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/ui/mentions.d.ts +5 -8
- package/dist/ui/mentions.js +26 -8
- package/dist/ui/mentions.js.map +1 -1
- package/dist/ui/warn-once.d.ts +2 -0
- package/dist/ui/warn-once.js +13 -0
- package/dist/ui/warn-once.js.map +1 -0
- package/dist/ui-core/actions/action-id.d.ts +14 -0
- package/dist/ui-core/actions/action-id.js +123 -0
- package/dist/ui-core/actions/action-id.js.map +1 -0
- package/dist/ui-core/actions/action-router.js.map +1 -0
- package/dist/ui-core/actions/chord.d.ts +20 -0
- package/dist/ui-core/actions/chord.js +28 -0
- package/dist/ui-core/actions/chord.js.map +1 -0
- package/dist/ui-core/actions/format-shortcuts.js +267 -0
- package/dist/ui-core/actions/format-shortcuts.js.map +1 -0
- package/dist/ui-core/actions/keymap.d.ts +23 -0
- package/dist/ui-core/actions/keymap.js +145 -0
- package/dist/ui-core/actions/keymap.js.map +1 -0
- package/dist/ui-core/actions/mode-cycle.js.map +1 -0
- package/dist/ui-core/bootstrap/can-use-tui.js.map +1 -0
- package/dist/ui-core/bootstrap/capabilities.d.ts +37 -0
- package/dist/ui-core/bootstrap/capabilities.js +111 -0
- package/dist/ui-core/bootstrap/capabilities.js.map +1 -0
- package/dist/ui-core/bootstrap/composition-root.d.ts +92 -0
- package/dist/ui-core/bootstrap/composition-root.js.map +1 -0
- package/dist/ui-core/bootstrap/console-guard.js.map +1 -0
- package/dist/ui-core/bootstrap/console-suppress.js.map +1 -0
- package/dist/ui-core/bootstrap/lifecycle.js.map +1 -0
- package/dist/ui-core/bootstrap/overlay-ports.js +92 -0
- package/dist/ui-core/bootstrap/overlay-ports.js.map +1 -0
- package/dist/ui-core/bootstrap/ui-selection.d.ts +27 -0
- package/dist/ui-core/bootstrap/ui-selection.js +109 -0
- package/dist/ui-core/bootstrap/ui-selection.js.map +1 -0
- package/dist/ui-core/commands/command-handlers.js +86 -0
- package/dist/ui-core/commands/command-handlers.js.map +1 -0
- package/dist/ui-core/commands/config-commands.d.ts +14 -0
- package/dist/ui-core/commands/config-commands.js +315 -0
- package/dist/ui-core/commands/config-commands.js.map +1 -0
- package/dist/ui-core/commands/key-commands.d.ts +9 -0
- package/dist/ui-core/commands/key-commands.js +532 -0
- package/dist/ui-core/commands/key-commands.js.map +1 -0
- package/dist/ui-core/commands/picker-commands.d.ts +25 -0
- package/dist/ui-core/commands/picker-commands.js +1045 -0
- package/dist/ui-core/commands/picker-commands.js.map +1 -0
- package/dist/ui-core/commands/session-commands.d.ts +19 -0
- package/dist/ui-core/commands/session-commands.js +183 -0
- package/dist/ui-core/commands/session-commands.js.map +1 -0
- package/dist/ui-core/commands/startup-update.js.map +1 -0
- package/dist/ui-core/composer/arrow-intent.js.map +1 -0
- package/dist/ui-core/composer/completion.js.map +1 -0
- package/dist/ui-core/composer/composer-action-port.js.map +1 -0
- package/dist/ui-core/composer/composer-height.js +29 -0
- package/dist/ui-core/composer/composer-height.js.map +1 -0
- package/dist/ui-core/composer/composer-image-paste.d.ts +20 -0
- package/dist/ui-core/composer/composer-image-paste.js +77 -0
- package/dist/ui-core/composer/composer-image-paste.js.map +1 -0
- package/dist/ui-core/composer/composer-meta.js.map +1 -0
- package/dist/ui-core/composer/composer-wheel.d.ts +58 -0
- package/dist/ui-core/composer/composer-wheel.js +108 -0
- package/dist/ui-core/composer/composer-wheel.js.map +1 -0
- package/dist/ui-core/composer/draft-actions.d.ts +31 -0
- package/dist/ui-core/composer/draft-actions.js +45 -0
- package/dist/ui-core/composer/draft-actions.js.map +1 -0
- package/dist/ui-core/composer/history-nav.js.map +1 -0
- package/dist/ui-core/composer/input-history.js +9 -0
- package/dist/ui-core/composer/input-history.js.map +1 -0
- package/dist/ui-core/composer/newline-hint.d.ts +13 -0
- package/dist/ui-core/composer/newline-hint.js.map +1 -0
- package/dist/ui-core/composer/paste-placeholder.js.map +1 -0
- package/dist/ui-core/composer/prompt-history.js.map +1 -0
- package/dist/ui-core/composer/secret-buffer.js.map +1 -0
- package/dist/ui-core/composer/textarea-keybindings.d.ts +25 -0
- package/dist/ui-core/composer/textarea-keybindings.js +84 -0
- package/dist/ui-core/composer/textarea-keybindings.js.map +1 -0
- package/dist/ui-core/controllers/focus-controller.js.map +1 -0
- package/dist/ui-core/controllers/interruptible-controller.js.map +1 -0
- package/dist/ui-core/controllers/overlay-controller.d.ts +211 -0
- package/dist/ui-core/controllers/overlay-controller.js.map +1 -0
- package/dist/ui-core/controllers/selection-controller.js.map +1 -0
- package/dist/ui-core/controllers/toast-controller.js.map +1 -0
- package/dist/ui-core/layout/compute-layout.js.map +1 -0
- package/dist/ui-core/motion/ease.js.map +1 -0
- package/dist/ui-core/notify.js.map +1 -0
- package/dist/ui-core/plan/plan-lifecycle.js.map +1 -0
- package/dist/ui-core/ports/clipboard-osc52.js +44 -0
- package/dist/ui-core/ports/clipboard-osc52.js.map +1 -0
- package/dist/ui-core/ports/pager-export-port.d.ts +16 -0
- package/dist/ui-core/ports/pager-export-port.js +70 -0
- package/dist/ui-core/ports/pager-export-port.js.map +1 -0
- package/dist/ui-core/ports/renderer-port.d.ts +10 -0
- package/dist/ui-core/ports/renderer-port.js +2 -0
- package/dist/ui-core/ports/renderer-port.js.map +1 -0
- package/dist/ui-core/react/providers.d.ts +16 -0
- package/dist/ui-core/react/providers.js +31 -0
- package/dist/ui-core/react/providers.js.map +1 -0
- package/dist/ui-core/react/use-has-draft.js.map +1 -0
- package/dist/ui-core/react/use-overlay.js.map +1 -0
- package/dist/ui-core/react/use-plan.js.map +1 -0
- package/dist/ui-core/react/use-session-state.js.map +1 -0
- package/dist/ui-core/react/use-toast.js.map +1 -0
- package/dist/ui-core/react/use-transcript-store.d.ts +10 -0
- package/dist/ui-core/react/use-transcript-store.js.map +1 -0
- package/dist/ui-core/rendering/artifact-pager-source.js.map +1 -0
- package/dist/ui-core/rendering/batch-sections.js.map +1 -0
- package/dist/ui-core/rendering/code-block.d.ts +48 -0
- package/dist/ui-core/rendering/code-block.js +407 -0
- package/dist/ui-core/rendering/code-block.js.map +1 -0
- package/dist/ui-core/rendering/context-limit.d.ts +8 -0
- package/dist/ui-core/rendering/context-limit.js +49 -0
- package/dist/ui-core/rendering/context-limit.js.map +1 -0
- package/dist/ui-core/rendering/file-diff-view.js.map +1 -0
- package/dist/ui-core/rendering/format-help.js.map +1 -0
- package/dist/ui-core/rendering/format-keys.d.ts +14 -0
- package/dist/ui-core/rendering/format-keys.js +78 -0
- package/dist/ui-core/rendering/format-keys.js.map +1 -0
- package/dist/ui-core/rendering/incremental-strip.js.map +1 -0
- package/dist/ui-core/rendering/intro-header.js.map +1 -0
- package/dist/ui-core/rendering/job-tail-source.js.map +1 -0
- package/dist/ui-core/rendering/link-detector.js.map +1 -0
- package/dist/ui-core/rendering/markdown.js.map +1 -0
- package/dist/ui-core/rendering/open-tool-output.js +346 -0
- package/dist/ui-core/rendering/open-tool-output.js.map +1 -0
- package/dist/ui-core/rendering/pager-chrome.js +119 -0
- package/dist/ui-core/rendering/pager-chrome.js.map +1 -0
- package/dist/ui-core/rendering/pager-source.d.ts +20 -0
- package/dist/ui-core/rendering/pager-source.js +101 -0
- package/dist/ui-core/rendering/pager-source.js.map +1 -0
- package/dist/ui-core/rendering/pager-text.d.ts +24 -0
- package/dist/ui-core/rendering/pager-text.js +105 -0
- package/dist/ui-core/rendering/pager-text.js.map +1 -0
- package/dist/ui-core/rendering/pager-view-policy.js +98 -0
- package/dist/ui-core/rendering/pager-view-policy.js.map +1 -0
- package/dist/ui-core/rendering/picker-filter.js.map +1 -0
- package/dist/ui-core/rendering/plan-view.js.map +1 -0
- package/dist/ui-core/rendering/prompt-preview.js.map +1 -0
- package/dist/ui-core/rendering/render-markdown-lines.d.ts +7 -0
- package/dist/ui-core/rendering/render-markdown-lines.js +26 -0
- package/dist/ui-core/rendering/render-markdown-lines.js.map +1 -0
- package/dist/ui-core/rendering/sanitize-display.js.map +1 -0
- package/dist/ui-core/rendering/status-segments.d.ts +25 -0
- package/dist/ui-core/rendering/status-segments.js +88 -0
- package/dist/ui-core/rendering/status-segments.js.map +1 -0
- package/dist/ui-core/rendering/streaming-markdown.d.ts +23 -0
- package/dist/ui-core/rendering/streaming-markdown.js +118 -0
- package/dist/ui-core/rendering/streaming-markdown.js.map +1 -0
- package/dist/ui-core/rendering/strip-tool-surfaces.js.map +1 -0
- package/dist/ui-core/rendering/syntax-highlight.js.map +1 -0
- package/dist/ui-core/rendering/text-format.js.map +1 -0
- package/dist/ui-core/rendering/text-width.js.map +1 -0
- package/dist/ui-core/rendering/theme.js.map +1 -0
- package/dist/ui-core/rendering/thinking-tail.js.map +1 -0
- package/dist/ui-core/rendering/tool-presenter.d.ts +68 -0
- package/dist/ui-core/rendering/tool-presenter.js +371 -0
- package/dist/ui-core/rendering/tool-presenter.js.map +1 -0
- package/dist/ui-core/rendering/transcript-export.d.ts +11 -0
- package/dist/ui-core/rendering/transcript-export.js +18 -0
- package/dist/ui-core/rendering/transcript-export.js.map +1 -0
- package/dist/ui-core/rendering/transcript-semantic.js.map +1 -0
- package/dist/ui-core/rendering/user-message-wrap.d.ts +18 -0
- package/dist/ui-core/rendering/user-message-wrap.js +23 -0
- package/dist/ui-core/rendering/user-message-wrap.js.map +1 -0
- package/dist/ui-core/rendering/wordmark.js.map +1 -0
- package/dist/ui-core/state/pager-search.js.map +1 -0
- package/dist/ui-core/state/semantic-document.js.map +1 -0
- package/dist/ui-core/state/transcript-compaction.js.map +1 -0
- package/dist/ui-core/state/transcript-hydrate.d.ts +67 -0
- package/dist/ui-core/state/transcript-hydrate.js +665 -0
- package/dist/ui-core/state/transcript-hydrate.js.map +1 -0
- package/dist/ui-core/state/transcript-reducer.js +484 -0
- package/dist/ui-core/state/transcript-reducer.js.map +1 -0
- package/dist/ui-core/state/transcript-search.js.map +1 -0
- package/dist/ui-core/state/transcript-store.js.map +1 -0
- package/dist/ui-core/state/transcript-struct.js.map +1 -0
- package/dist/ui-core/state/transcript-types.d.ts +103 -0
- package/dist/ui-core/state/transcript-types.js.map +1 -0
- package/dist/version.generated.d.ts +2 -2
- package/dist/version.generated.js +2 -2
- package/dist/version.generated.js.map +1 -1
- package/package.json +18 -12
- package/dist/agent/classic-renderer.d.ts +0 -5
- package/dist/agent/classic-renderer.js +0 -136
- package/dist/agent/classic-renderer.js.map +0 -1
- package/dist/app/adapters/current-terminal-adapter.d.ts +0 -2
- package/dist/app/adapters/current-terminal-adapter.js +0 -24
- package/dist/app/adapters/current-terminal-adapter.js.map +0 -1
- package/dist/app/controllers/job-controller.d.ts +0 -28
- package/dist/app/controllers/job-controller.js +0 -70
- package/dist/app/controllers/job-controller.js.map +0 -1
- package/dist/repl/prompt-line.d.ts +0 -24
- package/dist/repl/prompt-line.js +0 -558
- package/dist/repl/prompt-line.js.map +0 -1
- package/dist/repl/slash-commands.js +0 -392
- package/dist/repl/slash-commands.js.map +0 -1
- package/dist/repl.d.ts +0 -18
- package/dist/repl.js +0 -1868
- package/dist/repl.js.map +0 -1
- package/dist/safety/path-permissions.d.ts +0 -14
- package/dist/safety/path-permissions.js +0 -43
- package/dist/safety/path-permissions.js.map +0 -1
- package/dist/tools/reducers/generic.d.ts +0 -14
- package/dist/tools/reducers/generic.js +0 -5
- package/dist/tools/reducers/generic.js.map +0 -1
- package/dist/tui/can-use-tui.js.map +0 -1
- package/dist/tui/format-keys.d.ts +0 -13
- package/dist/tui/format-keys.js +0 -78
- package/dist/tui/format-keys.js.map +0 -1
- package/dist/tui/input-history.js +0 -9
- package/dist/tui/input-history.js.map +0 -1
- package/dist/tui/runtime.js +0 -207
- package/dist/tui/runtime.js.map +0 -1
- package/dist/tui/state.d.ts +0 -124
- package/dist/tui/state.js +0 -496
- package/dist/tui/state.js.map +0 -1
- package/dist/tui/text-format.js.map +0 -1
- package/dist/tui-v2/actions/action-id.d.ts +0 -14
- package/dist/tui-v2/actions/action-id.js +0 -117
- package/dist/tui-v2/actions/action-id.js.map +0 -1
- package/dist/tui-v2/actions/action-router.js.map +0 -1
- package/dist/tui-v2/actions/chord-from-key.d.ts +0 -10
- package/dist/tui-v2/actions/chord-from-key.js +0 -34
- package/dist/tui-v2/actions/chord-from-key.js.map +0 -1
- package/dist/tui-v2/actions/format-shortcuts.js +0 -267
- package/dist/tui-v2/actions/format-shortcuts.js.map +0 -1
- package/dist/tui-v2/actions/keymap.d.ts +0 -24
- package/dist/tui-v2/actions/keymap.js +0 -151
- package/dist/tui-v2/actions/keymap.js.map +0 -1
- package/dist/tui-v2/app/command-handlers.js +0 -86
- package/dist/tui-v2/app/command-handlers.js.map +0 -1
- package/dist/tui-v2/app/commands/config-commands.d.ts +0 -14
- package/dist/tui-v2/app/commands/config-commands.js +0 -315
- package/dist/tui-v2/app/commands/config-commands.js.map +0 -1
- package/dist/tui-v2/app/commands/key-commands.d.ts +0 -9
- package/dist/tui-v2/app/commands/key-commands.js +0 -496
- package/dist/tui-v2/app/commands/key-commands.js.map +0 -1
- package/dist/tui-v2/app/commands/picker-commands.d.ts +0 -25
- package/dist/tui-v2/app/commands/picker-commands.js +0 -1045
- package/dist/tui-v2/app/commands/picker-commands.js.map +0 -1
- package/dist/tui-v2/app/commands/session-commands.d.ts +0 -19
- package/dist/tui-v2/app/commands/session-commands.js +0 -183
- package/dist/tui-v2/app/commands/session-commands.js.map +0 -1
- package/dist/tui-v2/app/mode-cycle.js.map +0 -1
- package/dist/tui-v2/app/plan-lifecycle.js.map +0 -1
- package/dist/tui-v2/app/providers.d.ts +0 -17
- package/dist/tui-v2/app/providers.js +0 -32
- package/dist/tui-v2/app/providers.js.map +0 -1
- package/dist/tui-v2/app/startup-update.js.map +0 -1
- package/dist/tui-v2/bootstrap/capabilities.d.ts +0 -36
- package/dist/tui-v2/bootstrap/capabilities.js +0 -93
- package/dist/tui-v2/bootstrap/capabilities.js.map +0 -1
- package/dist/tui-v2/bootstrap/composition-root.d.ts +0 -92
- package/dist/tui-v2/bootstrap/composition-root.js.map +0 -1
- package/dist/tui-v2/bootstrap/console-guard.js.map +0 -1
- package/dist/tui-v2/bootstrap/console-suppress.js.map +0 -1
- package/dist/tui-v2/bootstrap/disable-native-selection.d.ts +0 -11
- package/dist/tui-v2/bootstrap/disable-native-selection.js +0 -13
- package/dist/tui-v2/bootstrap/disable-native-selection.js.map +0 -1
- package/dist/tui-v2/bootstrap/lifecycle.js.map +0 -1
- package/dist/tui-v2/bootstrap/osc52-clipboard.js +0 -44
- package/dist/tui-v2/bootstrap/osc52-clipboard.js.map +0 -1
- package/dist/tui-v2/bootstrap/overlay-ports.js +0 -114
- package/dist/tui-v2/bootstrap/overlay-ports.js.map +0 -1
- package/dist/tui-v2/bootstrap/ui-selection.d.ts +0 -30
- package/dist/tui-v2/bootstrap/ui-selection.js +0 -59
- package/dist/tui-v2/bootstrap/ui-selection.js.map +0 -1
- package/dist/tui-v2/composer/arrow-intent.js.map +0 -1
- package/dist/tui-v2/composer/completion.js.map +0 -1
- package/dist/tui-v2/composer/composer-action-port.js.map +0 -1
- package/dist/tui-v2/composer/composer-height.js +0 -29
- package/dist/tui-v2/composer/composer-height.js.map +0 -1
- package/dist/tui-v2/composer/composer-meta.js.map +0 -1
- package/dist/tui-v2/composer/draft-actions.d.ts +0 -31
- package/dist/tui-v2/composer/draft-actions.js +0 -45
- package/dist/tui-v2/composer/draft-actions.js.map +0 -1
- package/dist/tui-v2/composer/history-nav.js.map +0 -1
- package/dist/tui-v2/composer/newline-hint.d.ts +0 -13
- package/dist/tui-v2/composer/newline-hint.js.map +0 -1
- package/dist/tui-v2/composer/paste-placeholder.js.map +0 -1
- package/dist/tui-v2/composer/prompt-history.js.map +0 -1
- package/dist/tui-v2/composer/secret-buffer.js.map +0 -1
- package/dist/tui-v2/controllers/focus-controller.js.map +0 -1
- package/dist/tui-v2/controllers/interruptible-controller.js.map +0 -1
- package/dist/tui-v2/controllers/overlay-controller.d.ts +0 -209
- package/dist/tui-v2/controllers/overlay-controller.js.map +0 -1
- package/dist/tui-v2/controllers/selection-controller.js.map +0 -1
- package/dist/tui-v2/controllers/toast-controller.js.map +0 -1
- package/dist/tui-v2/layout/compute-layout.js.map +0 -1
- package/dist/tui-v2/motion/ease.js.map +0 -1
- package/dist/tui-v2/notify.js.map +0 -1
- package/dist/tui-v2/rendering/artifact-pager-source.js.map +0 -1
- package/dist/tui-v2/rendering/batch-sections.js.map +0 -1
- package/dist/tui-v2/rendering/file-diff-view.js.map +0 -1
- package/dist/tui-v2/rendering/format-help.js.map +0 -1
- package/dist/tui-v2/rendering/incremental-strip.js.map +0 -1
- package/dist/tui-v2/rendering/job-tail-source.js.map +0 -1
- package/dist/tui-v2/rendering/link-detector.js.map +0 -1
- package/dist/tui-v2/rendering/open-tool-output.js +0 -346
- package/dist/tui-v2/rendering/open-tool-output.js.map +0 -1
- package/dist/tui-v2/rendering/pager-chrome.js +0 -119
- package/dist/tui-v2/rendering/pager-chrome.js.map +0 -1
- package/dist/tui-v2/rendering/pager-view-policy.js +0 -98
- package/dist/tui-v2/rendering/pager-view-policy.js.map +0 -1
- package/dist/tui-v2/rendering/picker-filter.js.map +0 -1
- package/dist/tui-v2/rendering/plan-view.js.map +0 -1
- package/dist/tui-v2/rendering/prompt-preview.js.map +0 -1
- package/dist/tui-v2/rendering/render-markdown-lines.d.ts +0 -29
- package/dist/tui-v2/rendering/render-markdown-lines.js +0 -46
- package/dist/tui-v2/rendering/render-markdown-lines.js.map +0 -1
- package/dist/tui-v2/rendering/sanitize-display.js.map +0 -1
- package/dist/tui-v2/rendering/streaming-markdown.d.ts +0 -25
- package/dist/tui-v2/rendering/streaming-markdown.js +0 -117
- package/dist/tui-v2/rendering/streaming-markdown.js.map +0 -1
- package/dist/tui-v2/rendering/strip-tool-surfaces.js.map +0 -1
- package/dist/tui-v2/rendering/syntax-highlight.js.map +0 -1
- package/dist/tui-v2/rendering/theme.js.map +0 -1
- package/dist/tui-v2/rendering/thinking-tail.js.map +0 -1
- package/dist/tui-v2/rendering/tool-presenter.d.ts +0 -63
- package/dist/tui-v2/rendering/tool-presenter.js +0 -376
- package/dist/tui-v2/rendering/tool-presenter.js.map +0 -1
- package/dist/tui-v2/rendering/transcript-export.d.ts +0 -11
- package/dist/tui-v2/rendering/transcript-export.js +0 -18
- package/dist/tui-v2/rendering/transcript-export.js.map +0 -1
- package/dist/tui-v2/rendering/transcript-semantic.js.map +0 -1
- package/dist/tui-v2/rendering/user-message-wrap.d.ts +0 -16
- package/dist/tui-v2/rendering/user-message-wrap.js +0 -21
- package/dist/tui-v2/rendering/user-message-wrap.js.map +0 -1
- package/dist/tui-v2/state/pager-search.js.map +0 -1
- package/dist/tui-v2/state/semantic-document.js.map +0 -1
- package/dist/tui-v2/state/transcript-compaction.js.map +0 -1
- package/dist/tui-v2/state/transcript-hydrate.d.ts +0 -67
- package/dist/tui-v2/state/transcript-hydrate.js +0 -648
- package/dist/tui-v2/state/transcript-hydrate.js.map +0 -1
- package/dist/tui-v2/state/transcript-reducer.js +0 -482
- package/dist/tui-v2/state/transcript-reducer.js.map +0 -1
- package/dist/tui-v2/state/transcript-search.js.map +0 -1
- package/dist/tui-v2/state/transcript-store.js.map +0 -1
- package/dist/tui-v2/state/transcript-struct.js.map +0 -1
- package/dist/tui-v2/state/transcript-types.d.ts +0 -101
- package/dist/tui-v2/state/transcript-types.js.map +0 -1
- package/dist/tui-v2/state/use-has-draft.js.map +0 -1
- package/dist/tui-v2/state/use-overlay.js.map +0 -1
- package/dist/tui-v2/state/use-plan.js.map +0 -1
- package/dist/tui-v2/state/use-session-state.js.map +0 -1
- package/dist/tui-v2/state/use-toast.js.map +0 -1
- package/dist/tui-v2/state/use-transcript-store.d.ts +0 -10
- package/dist/tui-v2/state/use-transcript-store.js.map +0 -1
- package/dist/ui/ansi-box.d.ts +0 -9
- package/dist/ui/ansi-box.js +0 -25
- package/dist/ui/ansi-box.js.map +0 -1
- package/dist/ui/banner.d.ts +0 -3
- package/dist/ui/banner.js +0 -13
- package/dist/ui/banner.js.map +0 -1
- package/dist/ui/code-block.d.ts +0 -48
- package/dist/ui/code-block.js +0 -407
- package/dist/ui/code-block.js.map +0 -1
- package/dist/ui/intro-card.d.ts +0 -10
- package/dist/ui/intro-card.js +0 -67
- package/dist/ui/intro-card.js.map +0 -1
- package/dist/ui/intro-header.js.map +0 -1
- package/dist/ui/keys.d.ts +0 -23
- package/dist/ui/keys.js +0 -23
- package/dist/ui/keys.js.map +0 -1
- package/dist/ui/markdown.js.map +0 -1
- package/dist/ui/output-pane.d.ts +0 -59
- package/dist/ui/output-pane.js +0 -398
- package/dist/ui/output-pane.js.map +0 -1
- package/dist/ui/spinner.d.ts +0 -8
- package/dist/ui/spinner.js +0 -185
- package/dist/ui/spinner.js.map +0 -1
- package/dist/ui/task-pane.d.ts +0 -17
- package/dist/ui/task-pane.js +0 -80
- package/dist/ui/task-pane.js.map +0 -1
- package/dist/ui/text-width.js.map +0 -1
- package/dist/ui/wordmark.js.map +0 -1
- /package/dist/{repl/slash-commands.d.ts → app/commands/catalog.d.ts} +0 -0
- /package/dist/{tui/runtime.d.ts → os/bun-runtime.d.ts} +0 -0
- /package/dist/{tui-v2 → ui-core}/actions/action-router.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/actions/action-router.js +0 -0
- /package/dist/{tui-v2 → ui-core}/actions/format-shortcuts.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/actions}/mode-cycle.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/actions}/mode-cycle.js +0 -0
- /package/dist/{tui → ui-core/bootstrap}/can-use-tui.d.ts +0 -0
- /package/dist/{tui → ui-core/bootstrap}/can-use-tui.js +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/composition-root.js +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/console-guard.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/console-guard.js +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/console-suppress.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/console-suppress.js +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/lifecycle.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/lifecycle.js +0 -0
- /package/dist/{tui-v2 → ui-core}/bootstrap/overlay-ports.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/commands}/command-handlers.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/commands}/startup-update.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/commands}/startup-update.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/arrow-intent.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/arrow-intent.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/completion.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/completion.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/composer-action-port.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/composer-action-port.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/composer-height.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/composer-meta.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/composer-meta.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/history-nav.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/history-nav.js +0 -0
- /package/dist/{tui → ui-core/composer}/input-history.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/newline-hint.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/paste-placeholder.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/paste-placeholder.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/prompt-history.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/prompt-history.js +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/secret-buffer.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/composer/secret-buffer.js +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/focus-controller.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/focus-controller.js +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/interruptible-controller.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/interruptible-controller.js +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/overlay-controller.js +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/selection-controller.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/selection-controller.js +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/toast-controller.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/controllers/toast-controller.js +0 -0
- /package/dist/{tui-v2 → ui-core}/layout/compute-layout.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/layout/compute-layout.js +0 -0
- /package/dist/{tui-v2 → ui-core}/motion/ease.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/motion/ease.js +0 -0
- /package/dist/{tui-v2 → ui-core}/notify.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/notify.js +0 -0
- /package/dist/{tui-v2/app → ui-core/plan}/plan-lifecycle.d.ts +0 -0
- /package/dist/{tui-v2/app → ui-core/plan}/plan-lifecycle.js +0 -0
- /package/dist/{tui-v2/bootstrap/osc52-clipboard.d.ts → ui-core/ports/clipboard-osc52.d.ts} +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-has-draft.d.ts +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-has-draft.js +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-overlay.d.ts +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-overlay.js +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-plan.d.ts +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-plan.js +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-session-state.d.ts +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-session-state.js +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-toast.d.ts +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-toast.js +0 -0
- /package/dist/{tui-v2/state → ui-core/react}/use-transcript-store.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/artifact-pager-source.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/artifact-pager-source.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/batch-sections.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/batch-sections.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/file-diff-view.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/file-diff-view.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/format-help.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/format-help.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/incremental-strip.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/incremental-strip.js +0 -0
- /package/dist/{ui → ui-core/rendering}/intro-header.d.ts +0 -0
- /package/dist/{ui → ui-core/rendering}/intro-header.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/job-tail-source.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/job-tail-source.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/link-detector.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/link-detector.js +0 -0
- /package/dist/{ui → ui-core/rendering}/markdown.d.ts +0 -0
- /package/dist/{ui → ui-core/rendering}/markdown.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/open-tool-output.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/pager-chrome.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/pager-view-policy.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/picker-filter.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/picker-filter.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/plan-view.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/plan-view.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/prompt-preview.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/prompt-preview.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/sanitize-display.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/sanitize-display.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/strip-tool-surfaces.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/strip-tool-surfaces.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/syntax-highlight.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/syntax-highlight.js +0 -0
- /package/dist/{tui → ui-core/rendering}/text-format.d.ts +0 -0
- /package/dist/{tui → ui-core/rendering}/text-format.js +0 -0
- /package/dist/{ui → ui-core/rendering}/text-width.d.ts +0 -0
- /package/dist/{ui → ui-core/rendering}/text-width.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/theme.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/theme.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/thinking-tail.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/thinking-tail.js +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/transcript-semantic.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/rendering/transcript-semantic.js +0 -0
- /package/dist/{ui → ui-core/rendering}/wordmark.d.ts +0 -0
- /package/dist/{ui → ui-core/rendering}/wordmark.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/pager-search.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/pager-search.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/semantic-document.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/semantic-document.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-compaction.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-compaction.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-reducer.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-search.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-search.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-store.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-store.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-struct.d.ts +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-struct.js +0 -0
- /package/dist/{tui-v2 → ui-core}/state/transcript-types.js +0 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { findMatches, nextMatchIndex, prevMatchIndex, } from "../../ui-core/state/transcript-search.js";
|
|
2
|
+
import { itemSearchText, transcriptItems, } from "../../ui-core/state/transcript-types.js";
|
|
3
|
+
import { clipToWidth, padToWidth, sealStyle } from "../render/ansi-text.js";
|
|
4
|
+
import { emptyRow, filterRow } from "./list-rows.js";
|
|
5
|
+
import { listWindow, windowCounter } from "./list-window.js";
|
|
6
|
+
import { panelBodyHeight, panelBodyWidth } from "./panel-frame.js";
|
|
7
|
+
import { handled, unhandled } from "./panel-effect.js";
|
|
8
|
+
import { isPrintable } from "./picker-panel.js";
|
|
9
|
+
export const SEARCH_INITIAL_STATE = { query: "", cursor: 0, top: 0 };
|
|
10
|
+
export function itemGlyph(ink, item) {
|
|
11
|
+
const glyphs = ink.glyphs;
|
|
12
|
+
switch (item.kind) {
|
|
13
|
+
case "user":
|
|
14
|
+
return { glyph: glyphs.userRail, token: "prompt" };
|
|
15
|
+
case "assistant":
|
|
16
|
+
return { glyph: glyphs.assistantBullet, token: "response" };
|
|
17
|
+
case "thinking":
|
|
18
|
+
return { glyph: glyphs.thinkingGutter, token: "thinking" };
|
|
19
|
+
case "tool":
|
|
20
|
+
return { glyph: glyphs.toolRunning, token: "activity" };
|
|
21
|
+
case "notice":
|
|
22
|
+
return { glyph: glyphs.warning, token: "activity" };
|
|
23
|
+
default:
|
|
24
|
+
return { glyph: glyphs.compacted, token: "muted" };
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export function searchKey(input) {
|
|
28
|
+
const { state, chord } = input;
|
|
29
|
+
const matches = findMatches(input.transcript, state.query);
|
|
30
|
+
const height = Math.max(1, panelBodyHeight(input.rows) - 1);
|
|
31
|
+
const moveTo = (cursor) => {
|
|
32
|
+
if (cursor < 0)
|
|
33
|
+
return handled(state);
|
|
34
|
+
const window = listWindow({
|
|
35
|
+
count: matches.length,
|
|
36
|
+
active: cursor,
|
|
37
|
+
height,
|
|
38
|
+
previousTop: state.top,
|
|
39
|
+
});
|
|
40
|
+
return handled({ ...state, cursor, top: window.top });
|
|
41
|
+
};
|
|
42
|
+
if (chord === "up")
|
|
43
|
+
return moveTo(prevMatchIndex(matches, state.cursor));
|
|
44
|
+
if (chord === "down")
|
|
45
|
+
return moveTo(nextMatchIndex(matches, state.cursor));
|
|
46
|
+
if (chord === "enter") {
|
|
47
|
+
const match = matches[state.cursor];
|
|
48
|
+
return match
|
|
49
|
+
? handled(state, { kind: "search-open", itemId: match.itemId })
|
|
50
|
+
: handled(state);
|
|
51
|
+
}
|
|
52
|
+
if (chord === "backspace") {
|
|
53
|
+
return handled({ ...state, query: state.query.slice(0, -1), cursor: 0, top: 0 });
|
|
54
|
+
}
|
|
55
|
+
if (chord === "ctrl+u")
|
|
56
|
+
return handled({ ...state, query: "", cursor: 0, top: 0 });
|
|
57
|
+
if (isPrintable(chord, input.text)) {
|
|
58
|
+
return handled({
|
|
59
|
+
...state,
|
|
60
|
+
query: `${state.query}${input.text ?? ""}`,
|
|
61
|
+
cursor: 0,
|
|
62
|
+
top: 0,
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return unhandled(state);
|
|
66
|
+
}
|
|
67
|
+
const EXCERPT_LEAD = 24;
|
|
68
|
+
export function matchExcerpt(ink, text, match, width) {
|
|
69
|
+
const flat = text.replace(/\s+/g, " ");
|
|
70
|
+
const start = Math.max(0, match.start - EXCERPT_LEAD);
|
|
71
|
+
const head = start > 0 ? ink.glyphs.ellipsis : "";
|
|
72
|
+
const before = flat.slice(start, match.start);
|
|
73
|
+
const hit = flat.slice(match.start, match.end);
|
|
74
|
+
const after = flat.slice(match.end);
|
|
75
|
+
const painted = `${head}${before}${ink.inverse(hit)}${after}`;
|
|
76
|
+
return clipToWidth(painted, Math.max(1, width), ink.glyphs.ellipsis);
|
|
77
|
+
}
|
|
78
|
+
export function searchView(input) {
|
|
79
|
+
const { ink, state } = input;
|
|
80
|
+
const width = panelBodyWidth(input.columns);
|
|
81
|
+
const height = panelBodyHeight(input.rows);
|
|
82
|
+
const matches = findMatches(input.transcript, state.query);
|
|
83
|
+
const items = new Map(transcriptItems(input.transcript).map((item) => [item.id, item]));
|
|
84
|
+
const window = listWindow({
|
|
85
|
+
count: matches.length,
|
|
86
|
+
active: state.cursor,
|
|
87
|
+
height: Math.max(1, height - 1),
|
|
88
|
+
previousTop: state.top,
|
|
89
|
+
});
|
|
90
|
+
const body = [filterRow(ink, width, "find", state.query)];
|
|
91
|
+
if (matches.length === 0) {
|
|
92
|
+
body.push(emptyRow(ink, width, state.query === "" ? "type to search" : "no matches"));
|
|
93
|
+
}
|
|
94
|
+
else {
|
|
95
|
+
for (let index = window.top; index < Math.min(matches.length, window.top + window.height); index += 1) {
|
|
96
|
+
const match = matches[index];
|
|
97
|
+
const item = items.get(match.itemId);
|
|
98
|
+
const active = index === state.cursor;
|
|
99
|
+
const marker = ink.style(active ? `${ink.glyphs.promptMark} ` : " ", {
|
|
100
|
+
fg: "inputBorder",
|
|
101
|
+
bold: active,
|
|
102
|
+
});
|
|
103
|
+
const glyph = item ? itemGlyph(ink, item) : { glyph: ink.glyphs.separator, token: "muted" };
|
|
104
|
+
const head = ink.style(`${glyph.glyph} `, { fg: glyph.token });
|
|
105
|
+
const excerptWidth = Math.max(1, width - 4);
|
|
106
|
+
const excerpt = item
|
|
107
|
+
? matchExcerpt(ink, itemSearchText(item), match, excerptWidth)
|
|
108
|
+
: "";
|
|
109
|
+
body.push(sealStyle(`${marker}${head}${padToWidth(excerpt, excerptWidth)}`));
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
ink,
|
|
114
|
+
columns: input.columns,
|
|
115
|
+
rows: input.rows,
|
|
116
|
+
title: "Find in transcript",
|
|
117
|
+
counter: windowCounter(state.cursor, matches.length),
|
|
118
|
+
hints: [
|
|
119
|
+
`${ink.glyphs.scrollUp}${ink.glyphs.scrollDown}`,
|
|
120
|
+
`${ink.glyphs.enter} open in pager`,
|
|
121
|
+
"esc close",
|
|
122
|
+
],
|
|
123
|
+
body,
|
|
124
|
+
};
|
|
125
|
+
}
|
|
126
|
+
//# sourceMappingURL=search-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-panel.js","sourceRoot":"","sources":["../../../src/classic/panels/search-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,cAAc,EACd,cAAc,GAEf,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,cAAc,EACd,eAAe,GAGhB,MAAM,yCAAyC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C,GAAG,KAAK,CAAC,KAAK,GAAG,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC,CAAC;YAC/D,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC;YAC5C,MAAM,OAAO,GAAG,IAAI;gBAClB,CAAC,CAAC,YAAY,CAAC,GAAG,EAAE,cAAc,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC;gBAC9D,CAAC,CAAC,EAAE,CAAC;YACP,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,MAAM,GAAG,IAAI,GAAG,UAAU,CAAC,OAAO,EAAE,YAAY,CAAC,EAAE,CAAC,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;IAED,OAAO;QACL,GAAG;QACH,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,KAAK,EAAE,oBAAoB;QAC3B,OAAO,EAAE,aAAa,CAAC,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,MAAM,CAAC;QACpD,KAAK,EAAE;YACL,GAAG,GAAG,CAAC,MAAM,CAAC,QAAQ,GAAG,GAAG,CAAC,MAAM,CAAC,UAAU,EAAE;YAChD,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,gBAAgB;YACnC,WAAW;SACZ;QACD,IAAI;KACL,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SecretBuffer } from "../../ui-core/composer/secret-buffer.js";
|
|
2
|
+
import type { SecretRequestView } from "../../ui-core/controllers/overlay-controller.js";
|
|
3
|
+
import type { InkTheme } from "../render/ink-theme.js";
|
|
4
|
+
import { type PanelFrameInput } from "./panel-frame.js";
|
|
5
|
+
import { type PanelKeyResult } from "./panel-effect.js";
|
|
6
|
+
export interface SecretPanelState {
|
|
7
|
+
readonly buffer: SecretBuffer;
|
|
8
|
+
readonly cursor: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function secretInitialState(): SecretPanelState;
|
|
11
|
+
/** Pasted bytes reach the buffer stripped of escapes and line breaks. */
|
|
12
|
+
export declare function sanitizeSecretInput(text: string): string;
|
|
13
|
+
export interface SecretKeyInput {
|
|
14
|
+
readonly state: SecretPanelState;
|
|
15
|
+
readonly chord: string;
|
|
16
|
+
readonly text?: string | undefined;
|
|
17
|
+
}
|
|
18
|
+
export declare function secretKey(input: SecretKeyInput): PanelKeyResult<SecretPanelState>;
|
|
19
|
+
export declare function secretPaste(state: SecretPanelState, text: string): SecretPanelState;
|
|
20
|
+
export interface SecretViewInput {
|
|
21
|
+
readonly ink: InkTheme;
|
|
22
|
+
readonly columns: number;
|
|
23
|
+
readonly rows: number;
|
|
24
|
+
readonly request: SecretRequestView;
|
|
25
|
+
readonly state: SecretPanelState;
|
|
26
|
+
}
|
|
27
|
+
export declare function secretRowsWanted(input: SecretViewInput): number;
|
|
28
|
+
export declare function secretView(input: SecretViewInput): PanelFrameInput;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { SecretBuffer } from "../../ui-core/composer/secret-buffer.js";
|
|
2
|
+
import { clipToWidth, sealStyle } from "../render/ansi-text.js";
|
|
3
|
+
import { stripAnsi } from "../render/measure.js";
|
|
4
|
+
import { wrapWithPrefixes } from "../render/wrap.js";
|
|
5
|
+
import { panelBodyWidth } from "./panel-frame.js";
|
|
6
|
+
import { handled } from "./panel-effect.js";
|
|
7
|
+
import { isPrintable } from "./picker-panel.js";
|
|
8
|
+
export function secretInitialState() {
|
|
9
|
+
return { buffer: new SecretBuffer(), cursor: 0 };
|
|
10
|
+
}
|
|
11
|
+
/** Pasted bytes reach the buffer stripped of escapes and line breaks. */
|
|
12
|
+
export function sanitizeSecretInput(text) {
|
|
13
|
+
return stripAnsi(text).replace(/[\r\n\t]+/g, "");
|
|
14
|
+
}
|
|
15
|
+
export function secretKey(input) {
|
|
16
|
+
const { state, chord } = input;
|
|
17
|
+
if (chord === "enter") {
|
|
18
|
+
return handled(state, { kind: "secret", value: state.buffer.reveal() });
|
|
19
|
+
}
|
|
20
|
+
if (chord === "escape") {
|
|
21
|
+
state.buffer.clear();
|
|
22
|
+
return handled({ ...state, cursor: 0 }, { kind: "secret", value: undefined });
|
|
23
|
+
}
|
|
24
|
+
if (chord === "backspace") {
|
|
25
|
+
return handled({ ...state, cursor: state.buffer.deleteBackward(state.cursor) });
|
|
26
|
+
}
|
|
27
|
+
if (chord === "ctrl+u") {
|
|
28
|
+
state.buffer.clear();
|
|
29
|
+
return handled({ ...state, cursor: 0 });
|
|
30
|
+
}
|
|
31
|
+
if (isPrintable(chord, input.text)) {
|
|
32
|
+
const clean = sanitizeSecretInput(input.text ?? "");
|
|
33
|
+
if (clean.length === 0)
|
|
34
|
+
return handled(state);
|
|
35
|
+
return handled({ ...state, cursor: state.buffer.insert(clean, state.cursor) });
|
|
36
|
+
}
|
|
37
|
+
return handled(state);
|
|
38
|
+
}
|
|
39
|
+
export function secretPaste(state, text) {
|
|
40
|
+
const clean = sanitizeSecretInput(text);
|
|
41
|
+
if (clean.length === 0)
|
|
42
|
+
return state;
|
|
43
|
+
return { ...state, cursor: state.buffer.insert(clean, state.cursor) };
|
|
44
|
+
}
|
|
45
|
+
export function secretRowsWanted(input) {
|
|
46
|
+
return secretBody(input).length + 2;
|
|
47
|
+
}
|
|
48
|
+
function secretBody(input) {
|
|
49
|
+
const { ink, state } = input;
|
|
50
|
+
const width = panelBodyWidth(input.columns);
|
|
51
|
+
const prompt = wrapWithPrefixes(input.request.prompt.replace(/\r/g, "").trim(), {
|
|
52
|
+
width,
|
|
53
|
+
});
|
|
54
|
+
const value = input.request.reveal === true ? state.buffer.reveal() : state.buffer.masked();
|
|
55
|
+
const field = sealStyle(`${ink.fg("inputBorder", ink.glyphs.promptMark)} ${clipToWidth(value, Math.max(1, width - 2), ink.glyphs.ellipsis)}`);
|
|
56
|
+
return [...prompt, field];
|
|
57
|
+
}
|
|
58
|
+
export function secretView(input) {
|
|
59
|
+
const { ink } = input;
|
|
60
|
+
return {
|
|
61
|
+
ink,
|
|
62
|
+
columns: input.columns,
|
|
63
|
+
rows: input.rows,
|
|
64
|
+
title: `${ink.glyphs.lock} ${input.request.title}`,
|
|
65
|
+
borderColor: "magenta",
|
|
66
|
+
hints: [`${ink.glyphs.enter} submit`, "esc cancel"],
|
|
67
|
+
body: secretBody(input),
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=secret-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"secret-panel.js","sourceRoot":"","sources":["../../../src/classic/panels/secret-panel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,yCAAyC,CAAC;AAEvE,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAEhE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAwB,MAAM,kBAAkB,CAAC;AACxE,OAAO,EAAE,OAAO,EAAuB,MAAM,mBAAmB,CAAC;AACjE,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAOhD,MAAM,UAAU,kBAAkB;IAChC,OAAO,EAAE,MAAM,EAAE,IAAI,YAAY,EAAE,EAAE,MAAM,EAAE,CAAC,EAAE,CAAC;AACnD,CAAC;AAED,yEAAyE;AACzE,MAAM,UAAU,mBAAmB,CAAC,IAAY;IAC9C,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC;AACnD,CAAC;AAQD,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAC/B,IAAI,KAAK,KAAK,OAAO,EAAE,CAAC;QACtB,OA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AC,CAAC;AAC5B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAsB;IAC/C,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,CAAC;IACtB,OAAO;QACL,GAAG;QACH,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,IAAI,EAAE,KAAK,CAAC,IAAI;QAChB,KAAK,EAAE,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE;QAClD,WAAW,EAAE,SAAS;QACtB,KAAK,EAAE,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,KAAK,SAAS,EAAE,YAAY,CAAC;QACnD,IAAI,EAAE,UAAU,CAAC,KAAK,CAAC;KACxB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export declare function graphemes(text: string): string[];
|
|
2
|
+
interface Token {
|
|
3
|
+
readonly kind: "escape" | "text";
|
|
4
|
+
readonly value: string;
|
|
5
|
+
}
|
|
6
|
+
/** Split into escape sequences and printable runs, in order. */
|
|
7
|
+
export declare function tokenize(text: string): Token[];
|
|
8
|
+
/** True when the string opens a styling sequence it does not reset. */
|
|
9
|
+
export declare function hasOpenStyle(text: string): boolean;
|
|
10
|
+
/** Guarantee no frame row leaks styling into the next row. */
|
|
11
|
+
export declare function sealStyle(text: string): string;
|
|
12
|
+
/**
|
|
13
|
+
* Clip to `max` layout columns, keeping every escape sequence intact and
|
|
14
|
+
* appending `suffix` (unstyled) when content was dropped.
|
|
15
|
+
*/
|
|
16
|
+
export declare function clipToWidth(text: string, max: number, suffix?: string): string;
|
|
17
|
+
export declare function padToWidth(text: string, width: number): string;
|
|
18
|
+
/**
|
|
19
|
+
* Middle-ellipsis for PLAIN text (no ANSI): keeps ~60% of the budget at the
|
|
20
|
+
* head and ~40% at the tail so both ends of a path stay recognizable.
|
|
21
|
+
*/
|
|
22
|
+
export declare function middleClipPlain(text: string, max: number, ellipsis?: string): string;
|
|
23
|
+
export declare function padStartToWidth(text: string, width: number): string;
|
|
24
|
+
/**
|
|
25
|
+
* Place `right` flush to `width`, dropping it entirely when it cannot fit with
|
|
26
|
+
* at least one separating column. The left side is clipped, never the right.
|
|
27
|
+
*/
|
|
28
|
+
export declare function alignEnds(left: string, right: string, width: number, ellipsis: string): string;
|
|
29
|
+
export declare function plainText(text: string): string;
|
|
30
|
+
/**
|
|
31
|
+
* Drop trailing blanks that sit outside every styling run. Padding that belongs
|
|
32
|
+
* to a background wash ends before its reset sequence and is therefore kept.
|
|
33
|
+
*/
|
|
34
|
+
export declare function trimTrailingSpaces(text: string): string;
|
|
35
|
+
export declare function joinSeparated(parts: readonly (string | undefined)[], separator: string): string;
|
|
36
|
+
export {};
|
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import { layoutWidth, stripAnsi } from "./measure.js";
|
|
2
|
+
const RESET = "\x1b[0m";
|
|
3
|
+
// biome-ignore lint: ANSI escape sequences are intentional.
|
|
4
|
+
const ESCAPE_START = /\x1b/;
|
|
5
|
+
const segmenter = new Intl.Segmenter("en", { granularity: "grapheme" });
|
|
6
|
+
export function graphemes(text) {
|
|
7
|
+
const out = [];
|
|
8
|
+
for (const part of segmenter.segment(text))
|
|
9
|
+
out.push(part.segment);
|
|
10
|
+
return out;
|
|
11
|
+
}
|
|
12
|
+
/** Split into escape sequences and printable runs, in order. */
|
|
13
|
+
export function tokenize(text) {
|
|
14
|
+
if (!ESCAPE_START.test(text)) {
|
|
15
|
+
return text.length > 0 ? [{ kind: "text", value: text }] : [];
|
|
16
|
+
}
|
|
17
|
+
const tokens = [];
|
|
18
|
+
let index = 0;
|
|
19
|
+
let run = "";
|
|
20
|
+
while (index < text.length) {
|
|
21
|
+
if (text.charCodeAt(index) !== 0x1b) {
|
|
22
|
+
run += text[index];
|
|
23
|
+
index += 1;
|
|
24
|
+
continue;
|
|
25
|
+
}
|
|
26
|
+
if (run.length > 0) {
|
|
27
|
+
tokens.push({ kind: "text", value: run });
|
|
28
|
+
run = "";
|
|
29
|
+
}
|
|
30
|
+
let end = index + 1;
|
|
31
|
+
if (text[end] === "[") {
|
|
32
|
+
end += 1;
|
|
33
|
+
while (end < text.length && !/[A-Za-z]/.test(text[end]))
|
|
34
|
+
end += 1;
|
|
35
|
+
end += 1;
|
|
36
|
+
}
|
|
37
|
+
else if (text[end] === "]") {
|
|
38
|
+
end += 1;
|
|
39
|
+
while (end < text.length && text.charCodeAt(end) !== 0x07)
|
|
40
|
+
end += 1;
|
|
41
|
+
end += 1;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
end += 1;
|
|
45
|
+
}
|
|
46
|
+
tokens.push({ kind: "escape", value: text.slice(index, Math.min(end, text.length)) });
|
|
47
|
+
index = Math.min(end, text.length);
|
|
48
|
+
}
|
|
49
|
+
if (run.length > 0)
|
|
50
|
+
tokens.push({ kind: "text", value: run });
|
|
51
|
+
return tokens;
|
|
52
|
+
}
|
|
53
|
+
/** True when the string opens a styling sequence it does not reset. */
|
|
54
|
+
export function hasOpenStyle(text) {
|
|
55
|
+
let foreground = false;
|
|
56
|
+
let background = false;
|
|
57
|
+
let bold = false;
|
|
58
|
+
let dim = false;
|
|
59
|
+
let italic = false;
|
|
60
|
+
let underline = false;
|
|
61
|
+
let inverse = false;
|
|
62
|
+
let hidden = false;
|
|
63
|
+
let strike = false;
|
|
64
|
+
for (const token of tokenize(text)) {
|
|
65
|
+
if (token.kind !== "escape" || !token.value.endsWith("m"))
|
|
66
|
+
continue;
|
|
67
|
+
const body = token.value.slice(2, -1);
|
|
68
|
+
const codes = body === "" ? [0] : body.split(";").map(Number);
|
|
69
|
+
for (const code of codes) {
|
|
70
|
+
if (!Number.isFinite(code))
|
|
71
|
+
continue;
|
|
72
|
+
if (code === 0) {
|
|
73
|
+
foreground = false;
|
|
74
|
+
background = false;
|
|
75
|
+
bold = false;
|
|
76
|
+
dim = false;
|
|
77
|
+
italic = false;
|
|
78
|
+
underline = false;
|
|
79
|
+
inverse = false;
|
|
80
|
+
hidden = false;
|
|
81
|
+
strike = false;
|
|
82
|
+
}
|
|
83
|
+
else if (code === 1)
|
|
84
|
+
bold = true;
|
|
85
|
+
else if (code === 2)
|
|
86
|
+
dim = true;
|
|
87
|
+
else if (code === 3)
|
|
88
|
+
italic = true;
|
|
89
|
+
else if (code === 4)
|
|
90
|
+
underline = true;
|
|
91
|
+
else if (code === 7)
|
|
92
|
+
inverse = true;
|
|
93
|
+
else if (code === 8)
|
|
94
|
+
hidden = true;
|
|
95
|
+
else if (code === 9)
|
|
96
|
+
strike = true;
|
|
97
|
+
else if (code === 22) {
|
|
98
|
+
bold = false;
|
|
99
|
+
dim = false;
|
|
100
|
+
}
|
|
101
|
+
else if (code === 23)
|
|
102
|
+
italic = false;
|
|
103
|
+
else if (code === 24)
|
|
104
|
+
underline = false;
|
|
105
|
+
else if (code === 27)
|
|
106
|
+
inverse = false;
|
|
107
|
+
else if (code === 28)
|
|
108
|
+
hidden = false;
|
|
109
|
+
else if (code === 29)
|
|
110
|
+
strike = false;
|
|
111
|
+
else if (code === 39)
|
|
112
|
+
foreground = false;
|
|
113
|
+
else if (code === 49)
|
|
114
|
+
background = false;
|
|
115
|
+
else if ((code >= 30 && code <= 37) || (code >= 90 && code <= 97) || code === 38) {
|
|
116
|
+
foreground = true;
|
|
117
|
+
}
|
|
118
|
+
else if ((code >= 40 && code <= 47) || (code >= 100 && code <= 107) || code === 48) {
|
|
119
|
+
background = true;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
return foreground || background || bold || dim || italic || underline || inverse || hidden || strike;
|
|
124
|
+
}
|
|
125
|
+
/** Guarantee no frame row leaks styling into the next row. */
|
|
126
|
+
export function sealStyle(text) {
|
|
127
|
+
return hasOpenStyle(text) ? `${text}${RESET}` : text;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Clip to `max` layout columns, keeping every escape sequence intact and
|
|
131
|
+
* appending `suffix` (unstyled) when content was dropped.
|
|
132
|
+
*/
|
|
133
|
+
export function clipToWidth(text, max, suffix = "") {
|
|
134
|
+
if (max <= 0)
|
|
135
|
+
return "";
|
|
136
|
+
if (layoutWidth(text) <= max)
|
|
137
|
+
return sealStyle(text);
|
|
138
|
+
const suffixWidth = layoutWidth(suffix);
|
|
139
|
+
const budget = Math.max(0, max - suffixWidth);
|
|
140
|
+
let out = "";
|
|
141
|
+
let used = 0;
|
|
142
|
+
let truncated = false;
|
|
143
|
+
for (const token of tokenize(text)) {
|
|
144
|
+
if (token.kind === "escape") {
|
|
145
|
+
out += token.value;
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
for (const grapheme of graphemes(token.value)) {
|
|
149
|
+
const width = layoutWidth(grapheme);
|
|
150
|
+
if (used + width > budget) {
|
|
151
|
+
truncated = true;
|
|
152
|
+
break;
|
|
153
|
+
}
|
|
154
|
+
out += grapheme;
|
|
155
|
+
used += width;
|
|
156
|
+
}
|
|
157
|
+
if (truncated)
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
160
|
+
return `${sealStyle(out)}${suffix}`;
|
|
161
|
+
}
|
|
162
|
+
export function padToWidth(text, width) {
|
|
163
|
+
const deficit = width - layoutWidth(text);
|
|
164
|
+
return deficit > 0 ? `${text}${" ".repeat(deficit)}` : text;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Middle-ellipsis for PLAIN text (no ANSI): keeps ~60% of the budget at the
|
|
168
|
+
* head and ~40% at the tail so both ends of a path stay recognizable.
|
|
169
|
+
*/
|
|
170
|
+
export function middleClipPlain(text, max, ellipsis = "…") {
|
|
171
|
+
if (max <= 0)
|
|
172
|
+
return "";
|
|
173
|
+
if (layoutWidth(text) <= max)
|
|
174
|
+
return text;
|
|
175
|
+
const marker = layoutWidth(ellipsis);
|
|
176
|
+
if (max <= marker)
|
|
177
|
+
return clipToWidth(text, max, "");
|
|
178
|
+
const keep = max - marker;
|
|
179
|
+
const head = Math.ceil(keep * 0.6);
|
|
180
|
+
const tail = Math.floor(keep * 0.4);
|
|
181
|
+
const headText = clipToWidth(text, head, "");
|
|
182
|
+
let tailText = "";
|
|
183
|
+
let used = 0;
|
|
184
|
+
for (const grapheme of graphemes(text).reverse()) {
|
|
185
|
+
const width = layoutWidth(grapheme);
|
|
186
|
+
if (used + width > tail)
|
|
187
|
+
break;
|
|
188
|
+
tailText = grapheme + tailText;
|
|
189
|
+
used += width;
|
|
190
|
+
}
|
|
191
|
+
return `${headText}${ellipsis}${tailText}`;
|
|
192
|
+
}
|
|
193
|
+
export function padStartToWidth(text, width) {
|
|
194
|
+
const deficit = width - layoutWidth(text);
|
|
195
|
+
return deficit > 0 ? `${" ".repeat(deficit)}${text}` : text;
|
|
196
|
+
}
|
|
197
|
+
/**
|
|
198
|
+
* Place `right` flush to `width`, dropping it entirely when it cannot fit with
|
|
199
|
+
* at least one separating column. The left side is clipped, never the right.
|
|
200
|
+
*/
|
|
201
|
+
export function alignEnds(left, right, width, ellipsis) {
|
|
202
|
+
if (width <= 0)
|
|
203
|
+
return "";
|
|
204
|
+
if (right.length === 0)
|
|
205
|
+
return clipToWidth(left, width, ellipsis);
|
|
206
|
+
const rightWidth = layoutWidth(right);
|
|
207
|
+
if (rightWidth + 2 > width)
|
|
208
|
+
return clipToWidth(left, width, ellipsis);
|
|
209
|
+
const leftBudget = width - rightWidth - 1;
|
|
210
|
+
const clipped = clipToWidth(left, leftBudget, ellipsis);
|
|
211
|
+
return `${padToWidth(clipped, leftBudget)} ${right}`;
|
|
212
|
+
}
|
|
213
|
+
export function plainText(text) {
|
|
214
|
+
return stripAnsi(text);
|
|
215
|
+
}
|
|
216
|
+
/**
|
|
217
|
+
* Drop trailing blanks that sit outside every styling run. Padding that belongs
|
|
218
|
+
* to a background wash ends before its reset sequence and is therefore kept.
|
|
219
|
+
*/
|
|
220
|
+
export function trimTrailingSpaces(text) {
|
|
221
|
+
const lastEscape = text.lastIndexOf("\x1b");
|
|
222
|
+
if (lastEscape === -1)
|
|
223
|
+
return text.replace(/[ \t]+$/, "");
|
|
224
|
+
const tail = text.slice(lastEscape);
|
|
225
|
+
const closeAt = tail.search(/[A-Za-z]/);
|
|
226
|
+
if (closeAt === -1)
|
|
227
|
+
return text;
|
|
228
|
+
const head = text.slice(0, lastEscape + closeAt + 1);
|
|
229
|
+
return `${head}${tail.slice(closeAt + 1).replace(/[ \t]+$/, "")}`;
|
|
230
|
+
}
|
|
231
|
+
export function joinSeparated(parts, separator) {
|
|
232
|
+
return parts.filter((part) => Boolean(part)).join(separator);
|
|
233
|
+
}
|
|
234
|
+
//# sourceMappingURL=ansi-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ansi-text.js","sourceRoot":"","sources":["../../../src/classic/render/ansi-text.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEtD,MAAM,KAAK,GAAG,SAAS,CAAC;AACxB,4DAA4D;AAC5D,MAAM,YAAY,GAAG,MAAM,CAAC;AAE5B,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,WAAW,EAAE,UAAU,EAAE,CAAC,CAAC;AAExE,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,MAAM,GAAG,GAAa,EAAE,CAAC;IACzB,KAAK,MAAM,IAAI,IAAI,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC;QAAE,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnE,OAAO,GAAG,CAAC;AACb,CAAC;AAOD,gEAAgE;AAChE,MAAM,UAAU,QAAQ,CAAC,IAAY;IACnC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QAC7B,OAAO,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAA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C;IACrD,OAAO,GAAG,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,OAAO,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,EAAE,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,aAAa,CAC3B,KAAsC,EACtC,SAAiB;IAEjB,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAkB,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface Glyphs {
|
|
2
|
+
readonly promptMark: string;
|
|
3
|
+
readonly userRail: string;
|
|
4
|
+
readonly assistantBullet: string;
|
|
5
|
+
readonly thinkingGutter: string;
|
|
6
|
+
readonly toolQueued: string;
|
|
7
|
+
readonly toolRunning: string;
|
|
8
|
+
readonly toolOk: string;
|
|
9
|
+
readonly toolFailed: string;
|
|
10
|
+
readonly toolBlocked: string;
|
|
11
|
+
readonly bodyBranch: string;
|
|
12
|
+
readonly ellipsis: string;
|
|
13
|
+
readonly rule: string;
|
|
14
|
+
readonly boxTopLeft: string;
|
|
15
|
+
readonly boxTopRight: string;
|
|
16
|
+
readonly boxBottomLeft: string;
|
|
17
|
+
readonly boxBottomRight: string;
|
|
18
|
+
readonly boxVertical: string;
|
|
19
|
+
readonly taskPending: string;
|
|
20
|
+
readonly taskActive: string;
|
|
21
|
+
readonly taskDone: string;
|
|
22
|
+
readonly taskFailed: string;
|
|
23
|
+
readonly taskSkipped: string;
|
|
24
|
+
readonly progressFilled: string;
|
|
25
|
+
readonly progressEmpty: string;
|
|
26
|
+
readonly warning: string;
|
|
27
|
+
readonly scrollUp: string;
|
|
28
|
+
readonly scrollDown: string;
|
|
29
|
+
readonly separator: string;
|
|
30
|
+
readonly compacted: string;
|
|
31
|
+
readonly caret: string;
|
|
32
|
+
readonly clip: string;
|
|
33
|
+
readonly tab: string;
|
|
34
|
+
readonly enter: string;
|
|
35
|
+
readonly sticky: string;
|
|
36
|
+
readonly stickyOff: string;
|
|
37
|
+
readonly remove: string;
|
|
38
|
+
readonly lock: string;
|
|
39
|
+
readonly spinner: readonly string[];
|
|
40
|
+
}
|
|
41
|
+
export declare const UNICODE_GLYPHS: Glyphs;
|
|
42
|
+
export declare const ASCII_GLYPHS: Glyphs;
|
|
43
|
+
export declare function glyphsFor(unicode: boolean): Glyphs;
|
|
44
|
+
/**
|
|
45
|
+
* Downgrade glyphs produced by shared `ui-core` presenters, which always emit
|
|
46
|
+
* the Unicode table. Applied to presenter output, never to user content.
|
|
47
|
+
*/
|
|
48
|
+
export declare function toAsciiGlyphs(text: string): string;
|
|
49
|
+
export declare function adaptPresenterGlyphs(text: string, unicode: boolean): string;
|