@pentoshi/clai 2.0.62 → 3.0.0
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 +262 -368
- package/dist/agent/context-manager.d.ts +5 -0
- package/dist/agent/context-manager.js +14 -2
- package/dist/agent/context-manager.js.map +1 -1
- package/dist/agent/events.d.ts +4 -1
- package/dist/agent/runner.js +150 -83
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/tool-call-parser.d.ts +15 -0
- package/dist/agent/tool-call-parser.js +171 -2
- package/dist/agent/tool-call-parser.js.map +1 -1
- package/dist/app/adapters/agent-event-adapter.d.ts +29 -0
- package/dist/app/adapters/agent-event-adapter.js +143 -0
- package/dist/app/adapters/agent-event-adapter.js.map +1 -0
- package/dist/app/adapters/current-agent-adapter.d.ts +7 -0
- package/dist/app/adapters/current-agent-adapter.js +27 -0
- package/dist/app/adapters/current-agent-adapter.js.map +1 -0
- package/dist/app/adapters/current-jobs-adapter.d.ts +4 -0
- package/dist/app/adapters/current-jobs-adapter.js +13 -0
- package/dist/app/adapters/current-jobs-adapter.js.map +1 -0
- package/dist/app/adapters/current-store-adapter.d.ts +3 -0
- package/dist/app/adapters/current-store-adapter.js +22 -0
- package/dist/app/adapters/current-store-adapter.js.map +1 -0
- package/dist/app/adapters/current-terminal-adapter.d.ts +9 -0
- package/dist/app/adapters/current-terminal-adapter.js +31 -0
- package/dist/app/adapters/current-terminal-adapter.js.map +1 -0
- package/dist/app/adapters/current-updates-adapter.d.ts +7 -0
- package/dist/app/adapters/current-updates-adapter.js +31 -0
- package/dist/app/adapters/current-updates-adapter.js.map +1 -0
- package/dist/app/adapters/in-memory-clipboard-adapter.d.ts +10 -0
- package/dist/app/adapters/in-memory-clipboard-adapter.js +20 -0
- package/dist/app/adapters/in-memory-clipboard-adapter.js.map +1 -0
- package/dist/app/commands/command.d.ts +24 -0
- package/dist/app/commands/command.js +4 -0
- package/dist/app/commands/command.js.map +1 -0
- package/dist/app/commands/registry.d.ts +45 -0
- package/dist/app/commands/registry.js +164 -0
- package/dist/app/commands/registry.js.map +1 -0
- package/dist/app/controllers/disposable.d.ts +15 -0
- package/dist/app/controllers/disposable.js +38 -0
- package/dist/app/controllers/disposable.js.map +1 -0
- package/dist/app/controllers/job-controller.d.ts +22 -0
- package/dist/app/controllers/job-controller.js +35 -0
- package/dist/app/controllers/job-controller.js.map +1 -0
- package/dist/app/controllers/plan-controller.d.ts +31 -0
- package/dist/app/controllers/plan-controller.js +69 -0
- package/dist/app/controllers/plan-controller.js.map +1 -0
- package/dist/app/controllers/session-controller.d.ts +167 -0
- package/dist/app/controllers/session-controller.js +467 -0
- package/dist/app/controllers/session-controller.js.map +1 -0
- package/dist/app/controllers/turn-controller.d.ts +52 -0
- package/dist/app/controllers/turn-controller.js +118 -0
- package/dist/app/controllers/turn-controller.js.map +1 -0
- package/dist/app/events/app-event.d.ts +118 -0
- package/dist/app/events/app-event.js +25 -0
- package/dist/app/events/app-event.js.map +1 -0
- package/dist/app/events/event-buffer.d.ts +51 -0
- package/dist/app/events/event-buffer.js +109 -0
- package/dist/app/events/event-buffer.js.map +1 -0
- package/dist/app/events/sequencer.d.ts +32 -0
- package/dist/app/events/sequencer.js +55 -0
- package/dist/app/events/sequencer.js.map +1 -0
- package/dist/app/ports/agent-port.d.ts +29 -0
- package/dist/app/ports/agent-port.js +2 -0
- package/dist/app/ports/agent-port.js.map +1 -0
- package/dist/app/ports/clipboard-port.d.ts +9 -0
- package/dist/app/ports/clipboard-port.js +2 -0
- package/dist/app/ports/clipboard-port.js.map +1 -0
- package/dist/app/ports/confirm-port.d.ts +17 -0
- package/dist/app/ports/confirm-port.js +2 -0
- package/dist/app/ports/confirm-port.js.map +1 -0
- package/dist/app/ports/jobs-port.d.ts +18 -0
- package/dist/app/ports/jobs-port.js +2 -0
- package/dist/app/ports/jobs-port.js.map +1 -0
- package/dist/app/ports/persistence-port.d.ts +21 -0
- package/dist/app/ports/persistence-port.js +2 -0
- package/dist/app/ports/persistence-port.js.map +1 -0
- package/dist/app/ports/secret-port.d.ts +12 -0
- package/dist/app/ports/secret-port.js +2 -0
- package/dist/app/ports/secret-port.js.map +1 -0
- package/dist/app/ports/terminal-port.d.ts +18 -0
- package/dist/app/ports/terminal-port.js +2 -0
- package/dist/app/ports/terminal-port.js.map +1 -0
- package/dist/app/ports/updates-port.d.ts +12 -0
- package/dist/app/ports/updates-port.js +2 -0
- package/dist/app/ports/updates-port.js.map +1 -0
- package/dist/commands/doctor.js +9 -0
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/update.js +1 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/dist/llm/router.js +4 -2
- package/dist/llm/router.js.map +1 -1
- package/dist/prompts/index.d.ts +1 -1
- package/dist/prompts/index.js +5 -3
- package/dist/prompts/index.js.map +1 -1
- package/dist/repl/slash-commands.js +1 -1
- package/dist/repl/slash-commands.js.map +1 -1
- package/dist/repl.js +35 -107
- package/dist/repl.js.map +1 -1
- package/dist/store/config.js +3 -1
- package/dist/store/config.js.map +1 -1
- package/dist/store/history.d.ts +26 -2
- package/dist/store/history.js +383 -72
- package/dist/store/history.js.map +1 -1
- package/dist/store/logs.js +3 -3
- package/dist/store/logs.js.map +1 -1
- package/dist/store/paths.d.ts +6 -0
- package/dist/store/paths.js +38 -0
- package/dist/store/paths.js.map +1 -0
- package/dist/store/plan.js +8 -5
- package/dist/store/plan.js.map +1 -1
- package/dist/tools/jobs.js +2 -2
- package/dist/tools/jobs.js.map +1 -1
- package/dist/tools/registry.js +117 -46
- package/dist/tools/registry.js.map +1 -1
- package/dist/tools/shell.js +2 -2
- package/dist/tools/shell.js.map +1 -1
- package/dist/tui/state.js +20 -17
- package/dist/tui/state.js.map +1 -1
- package/dist/tui-v2/actions/action-id.d.ts +14 -0
- package/dist/tui-v2/actions/action-id.js +109 -0
- package/dist/tui-v2/actions/action-id.js.map +1 -0
- package/dist/tui-v2/actions/action-router.d.ts +18 -0
- package/dist/tui-v2/actions/action-router.js +62 -0
- package/dist/tui-v2/actions/action-router.js.map +1 -0
- package/dist/tui-v2/actions/chord-from-key.d.ts +26 -0
- package/dist/tui-v2/actions/chord-from-key.js +45 -0
- package/dist/tui-v2/actions/chord-from-key.js.map +1 -0
- package/dist/tui-v2/actions/keymap.d.ts +24 -0
- package/dist/tui-v2/actions/keymap.js +134 -0
- package/dist/tui-v2/actions/keymap.js.map +1 -0
- package/dist/tui-v2/app/App.d.ts +13 -0
- package/dist/tui-v2/app/App.js +320 -0
- package/dist/tui-v2/app/App.js.map +1 -0
- package/dist/tui-v2/app/command-handlers.d.ts +8 -0
- package/dist/tui-v2/app/command-handlers.js +66 -0
- package/dist/tui-v2/app/command-handlers.js.map +1 -0
- package/dist/tui-v2/app/commands/config-commands.d.ts +14 -0
- package/dist/tui-v2/app/commands/config-commands.js +161 -0
- package/dist/tui-v2/app/commands/config-commands.js.map +1 -0
- package/dist/tui-v2/app/commands/key-commands.d.ts +9 -0
- package/dist/tui-v2/app/commands/key-commands.js +263 -0
- package/dist/tui-v2/app/commands/key-commands.js.map +1 -0
- package/dist/tui-v2/app/commands/picker-commands.d.ts +24 -0
- package/dist/tui-v2/app/commands/picker-commands.js +423 -0
- package/dist/tui-v2/app/commands/picker-commands.js.map +1 -0
- package/dist/tui-v2/app/commands/session-commands.d.ts +19 -0
- package/dist/tui-v2/app/commands/session-commands.js +162 -0
- package/dist/tui-v2/app/commands/session-commands.js.map +1 -0
- package/dist/tui-v2/app/plan-lifecycle.d.ts +16 -0
- package/dist/tui-v2/app/plan-lifecycle.js +59 -0
- package/dist/tui-v2/app/plan-lifecycle.js.map +1 -0
- package/dist/tui-v2/app/providers.d.ts +17 -0
- package/dist/tui-v2/app/providers.js +32 -0
- package/dist/tui-v2/app/providers.js.map +1 -0
- package/dist/tui-v2/bootstrap/capabilities.d.ts +35 -0
- package/dist/tui-v2/bootstrap/capabilities.js +93 -0
- package/dist/tui-v2/bootstrap/capabilities.js.map +1 -0
- package/dist/tui-v2/bootstrap/composition-root.d.ts +85 -0
- package/dist/tui-v2/bootstrap/composition-root.js +131 -0
- package/dist/tui-v2/bootstrap/composition-root.js.map +1 -0
- package/dist/tui-v2/bootstrap/disable-native-selection.d.ts +11 -0
- package/dist/tui-v2/bootstrap/disable-native-selection.js +13 -0
- package/dist/tui-v2/bootstrap/disable-native-selection.js.map +1 -0
- package/dist/tui-v2/bootstrap/lifecycle.d.ts +62 -0
- package/dist/tui-v2/bootstrap/lifecycle.js +123 -0
- package/dist/tui-v2/bootstrap/lifecycle.js.map +1 -0
- package/dist/tui-v2/bootstrap/osc52-clipboard.d.ts +28 -0
- package/dist/tui-v2/bootstrap/osc52-clipboard.js +44 -0
- package/dist/tui-v2/bootstrap/osc52-clipboard.js.map +1 -0
- package/dist/tui-v2/bootstrap/overlay-ports.d.ts +12 -0
- package/dist/{tui/confirm.js → tui-v2/bootstrap/overlay-ports.js} +17 -25
- package/dist/tui-v2/bootstrap/overlay-ports.js.map +1 -0
- package/dist/tui-v2/bootstrap/pager-export.d.ts +24 -0
- package/dist/tui-v2/bootstrap/pager-export.js +87 -0
- package/dist/tui-v2/bootstrap/pager-export.js.map +1 -0
- package/dist/tui-v2/bootstrap/start-tui-v2.d.ts +15 -0
- package/dist/tui-v2/bootstrap/start-tui-v2.js +95 -0
- package/dist/tui-v2/bootstrap/start-tui-v2.js.map +1 -0
- package/dist/tui-v2/bootstrap/ui-selection.d.ts +30 -0
- package/dist/tui-v2/bootstrap/ui-selection.js +59 -0
- package/dist/tui-v2/bootstrap/ui-selection.js.map +1 -0
- package/dist/tui-v2/components/completion/completion-menu.d.ts +23 -0
- package/dist/tui-v2/components/completion/completion-menu.js +84 -0
- package/dist/tui-v2/components/completion/completion-menu.js.map +1 -0
- package/dist/tui-v2/components/jobs/jobs-panel.d.ts +16 -0
- package/dist/tui-v2/components/jobs/jobs-panel.js +92 -0
- package/dist/tui-v2/components/jobs/jobs-panel.js.map +1 -0
- package/dist/tui-v2/components/modal/confirm-modal.d.ts +21 -0
- package/dist/tui-v2/components/modal/confirm-modal.js +71 -0
- package/dist/tui-v2/components/modal/confirm-modal.js.map +1 -0
- package/dist/tui-v2/components/modal/prompt-actions-modal.d.ts +15 -0
- package/dist/tui-v2/components/modal/prompt-actions-modal.js +80 -0
- package/dist/tui-v2/components/modal/prompt-actions-modal.js.map +1 -0
- package/dist/tui-v2/components/modal/secret-modal.d.ts +24 -0
- package/dist/tui-v2/components/modal/secret-modal.js +50 -0
- package/dist/tui-v2/components/modal/secret-modal.js.map +1 -0
- package/dist/tui-v2/components/overlay/overlay-host.d.ts +17 -0
- package/dist/tui-v2/components/overlay/overlay-host.js +28 -0
- package/dist/tui-v2/components/overlay/overlay-host.js.map +1 -0
- package/dist/tui-v2/components/pager/pager.d.ts +20 -0
- package/dist/tui-v2/components/pager/pager.js +396 -0
- package/dist/tui-v2/components/pager/pager.js.map +1 -0
- package/dist/tui-v2/components/picker/picker.d.ts +17 -0
- package/dist/tui-v2/components/picker/picker.js +222 -0
- package/dist/tui-v2/components/picker/picker.js.map +1 -0
- package/dist/tui-v2/components/plan/plan-view.d.ts +20 -0
- package/dist/tui-v2/components/plan/plan-view.js +116 -0
- package/dist/tui-v2/components/plan/plan-view.js.map +1 -0
- package/dist/tui-v2/components/queue/queue-panel.d.ts +23 -0
- package/dist/tui-v2/components/queue/queue-panel.js +58 -0
- package/dist/tui-v2/components/queue/queue-panel.js.map +1 -0
- package/dist/tui-v2/components/status/status-line.d.ts +27 -0
- package/dist/tui-v2/components/status/status-line.js +158 -0
- package/dist/tui-v2/components/status/status-line.js.map +1 -0
- package/dist/tui-v2/components/toast/toast-host.d.ts +15 -0
- package/dist/tui-v2/components/toast/toast-host.js +48 -0
- package/dist/tui-v2/components/toast/toast-host.js.map +1 -0
- package/dist/tui-v2/components/transcript/assistant-message.d.ts +20 -0
- package/dist/tui-v2/components/transcript/assistant-message.js +35 -0
- package/dist/tui-v2/components/transcript/assistant-message.js.map +1 -0
- package/dist/tui-v2/components/transcript/compacted-row.d.ts +19 -0
- package/dist/tui-v2/components/transcript/compacted-row.js +94 -0
- package/dist/tui-v2/components/transcript/compacted-row.js.map +1 -0
- package/dist/tui-v2/components/transcript/intro-card.d.ts +19 -0
- package/dist/tui-v2/components/transcript/intro-card.js +50 -0
- package/dist/tui-v2/components/transcript/intro-card.js.map +1 -0
- package/dist/tui-v2/components/transcript/linkable-text.d.ts +21 -0
- package/dist/tui-v2/components/transcript/linkable-text.js +46 -0
- package/dist/tui-v2/components/transcript/linkable-text.js.map +1 -0
- package/dist/tui-v2/components/transcript/notice-row.d.ts +14 -0
- package/dist/tui-v2/components/transcript/notice-row.js +40 -0
- package/dist/tui-v2/components/transcript/notice-row.js.map +1 -0
- package/dist/tui-v2/components/transcript/search-bar.d.ts +19 -0
- package/dist/tui-v2/components/transcript/search-bar.js +7 -0
- package/dist/tui-v2/components/transcript/search-bar.js.map +1 -0
- package/dist/tui-v2/components/transcript/thinking-block.d.ts +22 -0
- package/dist/tui-v2/components/transcript/thinking-block.js +27 -0
- package/dist/tui-v2/components/transcript/thinking-block.js.map +1 -0
- package/dist/tui-v2/components/transcript/tool-card.d.ts +26 -0
- package/dist/tui-v2/components/transcript/tool-card.js +175 -0
- package/dist/tui-v2/components/transcript/tool-card.js.map +1 -0
- package/dist/tui-v2/components/transcript/transcript-row.d.ts +25 -0
- package/dist/tui-v2/components/transcript/transcript-row.js +30 -0
- package/dist/tui-v2/components/transcript/transcript-row.js.map +1 -0
- package/dist/tui-v2/components/transcript/transcript-scroll-port.d.ts +52 -0
- package/dist/tui-v2/components/transcript/transcript-scroll-port.js +86 -0
- package/dist/tui-v2/components/transcript/transcript-scroll-port.js.map +1 -0
- package/dist/tui-v2/components/transcript/transcript-view.d.ts +24 -0
- package/dist/tui-v2/components/transcript/transcript-view.js +403 -0
- package/dist/tui-v2/components/transcript/transcript-view.js.map +1 -0
- package/dist/tui-v2/components/transcript/use-click-without-drag.d.ts +13 -0
- package/dist/tui-v2/components/transcript/use-click-without-drag.js +35 -0
- package/dist/tui-v2/components/transcript/use-click-without-drag.js.map +1 -0
- package/dist/tui-v2/components/transcript/use-native-selection-copy.d.ts +10 -0
- package/dist/tui-v2/components/transcript/use-native-selection-copy.js +37 -0
- package/dist/tui-v2/components/transcript/use-native-selection-copy.js.map +1 -0
- package/dist/tui-v2/components/transcript/use-transcript-selection.d.ts +23 -0
- package/dist/tui-v2/components/transcript/use-transcript-selection.js +136 -0
- package/dist/tui-v2/components/transcript/use-transcript-selection.js.map +1 -0
- package/dist/tui-v2/components/transcript/user-message.d.ts +10 -0
- package/dist/tui-v2/components/transcript/user-message.js +23 -0
- package/dist/tui-v2/components/transcript/user-message.js.map +1 -0
- package/dist/tui-v2/composer/arrow-intent.d.ts +23 -0
- package/dist/tui-v2/composer/arrow-intent.js +35 -0
- package/dist/tui-v2/composer/arrow-intent.js.map +1 -0
- package/dist/tui-v2/composer/completion.d.ts +37 -0
- package/dist/tui-v2/composer/completion.js +67 -0
- package/dist/tui-v2/composer/completion.js.map +1 -0
- package/dist/tui-v2/composer/composer-editor.d.ts +33 -0
- package/dist/tui-v2/composer/composer-editor.js +620 -0
- package/dist/tui-v2/composer/composer-editor.js.map +1 -0
- package/dist/tui-v2/composer/composer-height.d.ts +21 -0
- package/dist/tui-v2/composer/composer-height.js +29 -0
- package/dist/tui-v2/composer/composer-height.js.map +1 -0
- package/dist/tui-v2/composer/composer-meta.d.ts +9 -0
- package/dist/tui-v2/composer/composer-meta.js +38 -0
- package/dist/tui-v2/composer/composer-meta.js.map +1 -0
- package/dist/tui-v2/composer/history-nav.d.ts +15 -0
- package/dist/tui-v2/composer/history-nav.js +16 -0
- package/dist/tui-v2/composer/history-nav.js.map +1 -0
- package/dist/tui-v2/composer/newline-hint.d.ts +13 -0
- package/dist/tui-v2/composer/newline-hint.js +13 -0
- package/dist/tui-v2/composer/newline-hint.js.map +1 -0
- package/dist/tui-v2/composer/paste-placeholder.d.ts +35 -0
- package/dist/tui-v2/composer/paste-placeholder.js +55 -0
- package/dist/tui-v2/composer/paste-placeholder.js.map +1 -0
- package/dist/tui-v2/composer/prompt-history.d.ts +22 -0
- package/dist/tui-v2/composer/prompt-history.js +51 -0
- package/dist/tui-v2/composer/prompt-history.js.map +1 -0
- package/dist/tui-v2/composer/secret-buffer.d.ts +20 -0
- package/dist/tui-v2/composer/secret-buffer.js +42 -0
- package/dist/tui-v2/composer/secret-buffer.js.map +1 -0
- package/dist/tui-v2/composer/textarea-keybindings.d.ts +22 -0
- package/dist/tui-v2/composer/textarea-keybindings.js +27 -0
- package/dist/tui-v2/composer/textarea-keybindings.js.map +1 -0
- package/dist/tui-v2/controllers/focus-controller.d.ts +30 -0
- package/dist/tui-v2/controllers/focus-controller.js +80 -0
- package/dist/tui-v2/controllers/focus-controller.js.map +1 -0
- package/dist/tui-v2/controllers/overlay-controller.d.ts +99 -0
- package/dist/tui-v2/controllers/overlay-controller.js +195 -0
- package/dist/tui-v2/controllers/overlay-controller.js.map +1 -0
- package/dist/tui-v2/controllers/selection-controller.d.ts +76 -0
- package/dist/tui-v2/controllers/selection-controller.js +238 -0
- package/dist/tui-v2/controllers/selection-controller.js.map +1 -0
- package/dist/tui-v2/controllers/toast-controller.d.ts +35 -0
- package/dist/tui-v2/controllers/toast-controller.js +88 -0
- package/dist/tui-v2/controllers/toast-controller.js.map +1 -0
- package/dist/tui-v2/layout/compute-layout.d.ts +59 -0
- package/dist/tui-v2/layout/compute-layout.js +170 -0
- package/dist/tui-v2/layout/compute-layout.js.map +1 -0
- package/dist/tui-v2/rendering/ansi-to-styled.d.ts +17 -0
- package/dist/tui-v2/rendering/ansi-to-styled.js +217 -0
- package/dist/tui-v2/rendering/ansi-to-styled.js.map +1 -0
- package/dist/tui-v2/rendering/batch-sections.d.ts +45 -0
- package/dist/tui-v2/rendering/batch-sections.js +109 -0
- package/dist/tui-v2/rendering/batch-sections.js.map +1 -0
- package/dist/tui-v2/rendering/link-detector.d.ts +16 -0
- package/dist/tui-v2/rendering/link-detector.js +43 -0
- package/dist/tui-v2/rendering/link-detector.js.map +1 -0
- package/dist/tui-v2/rendering/open-tool-output.d.ts +28 -0
- package/dist/tui-v2/rendering/open-tool-output.js +138 -0
- package/dist/tui-v2/rendering/open-tool-output.js.map +1 -0
- package/dist/tui-v2/rendering/picker-filter.d.ts +22 -0
- package/dist/tui-v2/rendering/picker-filter.js +68 -0
- package/dist/tui-v2/rendering/picker-filter.js.map +1 -0
- package/dist/tui-v2/rendering/plan-view.d.ts +32 -0
- package/dist/tui-v2/rendering/plan-view.js +196 -0
- package/dist/tui-v2/rendering/plan-view.js.map +1 -0
- package/dist/tui-v2/rendering/render-markdown-lines.d.ts +29 -0
- package/dist/tui-v2/rendering/render-markdown-lines.js +46 -0
- package/dist/tui-v2/rendering/render-markdown-lines.js.map +1 -0
- package/dist/tui-v2/rendering/sanitize-display.d.ts +13 -0
- package/dist/tui-v2/rendering/sanitize-display.js +24 -0
- package/dist/tui-v2/rendering/sanitize-display.js.map +1 -0
- package/dist/tui-v2/rendering/theme.d.ts +67 -0
- package/dist/tui-v2/rendering/theme.js +74 -0
- package/dist/tui-v2/rendering/theme.js.map +1 -0
- package/dist/tui-v2/rendering/tool-presenter.d.ts +39 -0
- package/dist/tui-v2/rendering/tool-presenter.js +207 -0
- package/dist/tui-v2/rendering/tool-presenter.js.map +1 -0
- package/dist/tui-v2/rendering/transcript-export.d.ts +11 -0
- package/dist/tui-v2/rendering/transcript-export.js +18 -0
- package/dist/tui-v2/rendering/transcript-export.js.map +1 -0
- package/dist/tui-v2/rendering/transcript-semantic.d.ts +17 -0
- package/dist/tui-v2/rendering/transcript-semantic.js +67 -0
- package/dist/tui-v2/rendering/transcript-semantic.js.map +1 -0
- package/dist/tui-v2/state/pager-search.d.ts +22 -0
- package/dist/tui-v2/state/pager-search.js +78 -0
- package/dist/tui-v2/state/pager-search.js.map +1 -0
- package/dist/tui-v2/state/semantic-document.d.ts +34 -0
- package/dist/tui-v2/state/semantic-document.js +201 -0
- package/dist/tui-v2/state/semantic-document.js.map +1 -0
- package/dist/tui-v2/state/transcript-compaction.d.ts +24 -0
- package/dist/tui-v2/state/transcript-compaction.js +79 -0
- package/dist/tui-v2/state/transcript-compaction.js.map +1 -0
- package/dist/tui-v2/state/transcript-hydrate.d.ts +27 -0
- package/dist/tui-v2/state/transcript-hydrate.js +272 -0
- package/dist/tui-v2/state/transcript-hydrate.js.map +1 -0
- package/dist/tui-v2/state/transcript-reducer.d.ts +10 -0
- package/dist/tui-v2/state/transcript-reducer.js +281 -0
- package/dist/tui-v2/state/transcript-reducer.js.map +1 -0
- package/dist/tui-v2/state/transcript-search.d.ts +17 -0
- package/dist/tui-v2/state/transcript-search.js +38 -0
- package/dist/tui-v2/state/transcript-search.js.map +1 -0
- package/dist/tui-v2/state/transcript-store.d.ts +32 -0
- package/dist/tui-v2/state/transcript-store.js +66 -0
- package/dist/tui-v2/state/transcript-store.js.map +1 -0
- package/dist/tui-v2/state/transcript-struct.d.ts +15 -0
- package/dist/tui-v2/state/transcript-struct.js +133 -0
- package/dist/tui-v2/state/transcript-struct.js.map +1 -0
- package/dist/tui-v2/state/transcript-types.d.ts +76 -0
- package/dist/tui-v2/state/transcript-types.js +65 -0
- package/dist/tui-v2/state/transcript-types.js.map +1 -0
- package/dist/tui-v2/state/use-overlay.d.ts +3 -0
- package/dist/tui-v2/state/use-overlay.js +6 -0
- package/dist/tui-v2/state/use-overlay.js.map +1 -0
- package/dist/tui-v2/state/use-plan.d.ts +4 -0
- package/dist/tui-v2/state/use-plan.js +6 -0
- package/dist/tui-v2/state/use-plan.js.map +1 -0
- package/dist/tui-v2/state/use-session-state.d.ts +2 -0
- package/dist/tui-v2/state/use-session-state.js +7 -0
- package/dist/tui-v2/state/use-session-state.js.map +1 -0
- package/dist/tui-v2/state/use-toast.d.ts +3 -0
- package/dist/tui-v2/state/use-toast.js +15 -0
- package/dist/tui-v2/state/use-toast.js.map +1 -0
- package/dist/tui-v2/state/use-transcript-store.d.ts +10 -0
- package/dist/tui-v2/state/use-transcript-store.js +12 -0
- package/dist/tui-v2/state/use-transcript-store.js.map +1 -0
- package/dist/ui/intro-card.js +3 -3
- package/dist/ui/intro-card.js.map +1 -1
- package/dist/ui/intro-header.d.ts +23 -0
- package/dist/ui/intro-header.js +232 -0
- package/dist/ui/intro-header.js.map +1 -0
- package/dist/ui/markdown.js +0 -1
- package/dist/ui/markdown.js.map +1 -1
- package/dist/ui/mentions.d.ts +9 -2
- package/dist/ui/mentions.js +102 -4
- package/dist/ui/mentions.js.map +1 -1
- package/dist/ui/output-pane.js +1 -1
- package/dist/ui/output-pane.js.map +1 -1
- package/dist/ui/plan-pane.d.ts +8 -0
- package/dist/ui/plan-pane.js +38 -0
- package/dist/ui/plan-pane.js.map +1 -1
- package/dist/ui/wordmark.d.ts +5 -0
- package/dist/ui/wordmark.js +6 -1
- package/dist/ui/wordmark.js.map +1 -1
- package/package.json +14 -10
- package/dist/tui/App.d.ts +0 -12
- package/dist/tui/App.js +0 -2174
- package/dist/tui/App.js.map +0 -1
- package/dist/tui/components/ConfirmModal.d.ts +0 -9
- package/dist/tui/components/ConfirmModal.js +0 -55
- package/dist/tui/components/ConfirmModal.js.map +0 -1
- package/dist/tui/components/JobsPanel.d.ts +0 -11
- package/dist/tui/components/JobsPanel.js +0 -55
- package/dist/tui/components/JobsPanel.js.map +0 -1
- package/dist/tui/components/Pager.d.ts +0 -14
- package/dist/tui/components/Pager.js +0 -56
- package/dist/tui/components/Pager.js.map +0 -1
- package/dist/tui/components/PickerPanel.d.ts +0 -15
- package/dist/tui/components/PickerPanel.js +0 -126
- package/dist/tui/components/PickerPanel.js.map +0 -1
- package/dist/tui/components/PlanSidebar.d.ts +0 -6
- package/dist/tui/components/PlanSidebar.js +0 -99
- package/dist/tui/components/PlanSidebar.js.map +0 -1
- package/dist/tui/components/SecretInputPanel.d.ts +0 -7
- package/dist/tui/components/SecretInputPanel.js +0 -38
- package/dist/tui/components/SecretInputPanel.js.map +0 -1
- package/dist/tui/confirm.d.ts +0 -16
- package/dist/tui/confirm.js.map +0 -1
- package/dist/tui/default.d.ts +0 -6
- package/dist/tui/default.js +0 -11
- package/dist/tui/default.js.map +0 -1
- package/dist/tui/hooks/useAgentRunner.d.ts +0 -73
- package/dist/tui/hooks/useAgentRunner.js +0 -277
- package/dist/tui/hooks/useAgentRunner.js.map +0 -1
- package/dist/tui/hooks/useJobs.d.ts +0 -7
- package/dist/tui/hooks/useJobs.js +0 -39
- package/dist/tui/hooks/useJobs.js.map +0 -1
- package/dist/tui/hooks/useSpinner.d.ts +0 -5
- package/dist/tui/hooks/useSpinner.js +0 -21
- package/dist/tui/hooks/useSpinner.js.map +0 -1
- package/dist/tui/hooks/useTerminalSize.d.ts +0 -9
- package/dist/tui/hooks/useTerminalSize.js +0 -26
- package/dist/tui/hooks/useTerminalSize.js.map +0 -1
- package/dist/tui/index.d.ts +0 -10
- package/dist/tui/index.js +0 -37
- package/dist/tui/index.js.map +0 -1
- package/dist/tui/key-intent.d.ts +0 -36
- package/dist/tui/key-intent.js +0 -54
- package/dist/tui/key-intent.js.map +0 -1
- package/dist/tui/mouse.d.ts +0 -8
- package/dist/tui/mouse.js +0 -34
- package/dist/tui/mouse.js.map +0 -1
- package/dist/tui/plan-sidebar-lines.d.ts +0 -2
- package/dist/tui/plan-sidebar-lines.js +0 -140
- package/dist/tui/plan-sidebar-lines.js.map +0 -1
- package/dist/tui/render-lines.d.ts +0 -22
- package/dist/tui/render-lines.js +0 -611
- package/dist/tui/render-lines.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-card.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/transcript/tool-card.tsx"],"names":[],"mappings":";AAeA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAK/C,OAAO,EACL,gBAAgB,EAChB,0BAA0B,EAC1B,eAAe,EACf,kBAAkB,EAClB,mBAAmB,GAEpB,MAAM,mCAA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,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/react */
|
|
2
|
+
/**
|
|
3
|
+
* Dispatches one normalized item to its renderer (V2-051..055).
|
|
4
|
+
*
|
|
5
|
+
* The only place that switches on `item.kind`; adding an item kind means
|
|
6
|
+
* adding one case here plus its renderer, not touching a scattered UI switch
|
|
7
|
+
* (ARCHITECTURE "commands are data plus handlers, not switch statements").
|
|
8
|
+
*/
|
|
9
|
+
import type { ReactNode } from "react";
|
|
10
|
+
import type { OutputSpool } from "../../../app/events/event-buffer.js";
|
|
11
|
+
import type { AppServices } from "../../bootstrap/composition-root.js";
|
|
12
|
+
import type { TranscriptStore } from "../../state/transcript-store.js";
|
|
13
|
+
import { type TranscriptItem, type TranscriptState } from "../../state/transcript-types.js";
|
|
14
|
+
import type { Theme } from "../../rendering/theme.js";
|
|
15
|
+
export declare function TranscriptRow(props: {
|
|
16
|
+
item: TranscriptItem;
|
|
17
|
+
state: TranscriptState;
|
|
18
|
+
theme: Theme;
|
|
19
|
+
store: TranscriptStore;
|
|
20
|
+
spool: OutputSpool;
|
|
21
|
+
services: AppServices;
|
|
22
|
+
onOpenUserPrompt: (prompt: string) => void;
|
|
23
|
+
/** Chat-pane columns so markdown tables reflow beside the plan pane. */
|
|
24
|
+
contentWidth?: number | undefined;
|
|
25
|
+
}): ReactNode;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { isItemExpanded } from "../../state/transcript-types.js";
|
|
3
|
+
import { UserMessage } from "./user-message.js";
|
|
4
|
+
import { AssistantMessage } from "./assistant-message.js";
|
|
5
|
+
import { ThinkingBlock } from "./thinking-block.js";
|
|
6
|
+
import { ToolCard } from "./tool-card.js";
|
|
7
|
+
import { NoticeRow } from "./notice-row.js";
|
|
8
|
+
import { CompactedRow } from "./compacted-row.js";
|
|
9
|
+
export function TranscriptRow(props) {
|
|
10
|
+
const { item, state, theme, store, spool, services, onOpenUserPrompt, contentWidth, } = props;
|
|
11
|
+
switch (item.kind) {
|
|
12
|
+
case "user":
|
|
13
|
+
return _jsx(UserMessage, { item: item, theme: theme, onOpen: onOpenUserPrompt });
|
|
14
|
+
case "assistant":
|
|
15
|
+
return (_jsx(AssistantMessage, { item: item, theme: theme, contentWidth: contentWidth }));
|
|
16
|
+
case "thinking":
|
|
17
|
+
return (_jsx(ThinkingBlock, { item: item, theme: theme, expanded: isItemExpanded(state, item), onToggle: () => store.toggleItemOverride(item.id, state.expandThinkingGlobal) }));
|
|
18
|
+
case "tool":
|
|
19
|
+
return (_jsx(ToolCard, { item: item, theme: theme, spool: spool, services: services, expanded: isItemExpanded(state, item), onToggle: () => store.toggleItemOverride(item.id, state.expandOutputGlobal) }));
|
|
20
|
+
case "notice":
|
|
21
|
+
return _jsx(NoticeRow, { item: item, theme: theme });
|
|
22
|
+
case "compacted":
|
|
23
|
+
return (_jsx(CompactedRow, { item: item, theme: theme, contentWidth: contentWidth, expanded: isItemExpanded(state, item), onToggle: () => store.toggleItemOverride(item.id, state.expandOutputGlobal) }));
|
|
24
|
+
default: {
|
|
25
|
+
const unreachable = item;
|
|
26
|
+
throw new Error(`unhandled transcript item: ${JSON.stringify(unreachable)}`);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=transcript-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-row.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/transcript/transcript-row.tsx"],"names":[],"mappings":";AAaA,OAAO,EAAE,cAAc,EAA6C,MAAM,iCAAiC,CAAC;AAE5G,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CA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ACH,CAAC;QACJ,KAAK,QAAQ;YACX,OAAO,KAAC,SAAS,IAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,GAAI,CAAC;QACjD,KAAK,WAAW;YACd,OAAO,CACL,KAAC,YAAY,IACX,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,KAAK,EACZ,YAAY,EAAE,YAAY,EAC1B,QAAQ,EAAE,cAAc,CAAC,KAAK,EAAE,IAAI,CAAC,EACrC,QAAQ,EAAE,GAAG,EAAE,CACb,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,EAAE,KAAK,CAAC,kBAAkB,CAAC,GAE7D,CACH,CAAC;QACJ,OAAO,CAAC,CAAC,CAAC;YACR,MAAM,WAAW,GAAU,IAAI,CAAC;YAChC,MAAM,IAAI,KAAK,CAAC,8BAA8B,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;QAC/E,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App-wide transcript scroll bridge.
|
|
3
|
+
*
|
|
4
|
+
* Wheel/trackpad events often land on the focused composer (or fail hit-test
|
|
5
|
+
* and fall back to it). Those events never bubble into the transcript
|
|
6
|
+
* ScrollBox, so scroll felt like “walking prompt history” instead of moving
|
|
7
|
+
* the chat. TranscriptView registers its native scrollbox here; App +
|
|
8
|
+
* Composer forward every free wheel event to this port.
|
|
9
|
+
*
|
|
10
|
+
* Selection drag uses the same port for edge autoscroll when the pointer
|
|
11
|
+
* leaves the scrollbox (e.g. over the composer) so “select down” keeps moving.
|
|
12
|
+
*
|
|
13
|
+
* Scroll metrics (lines above / below the viewport) feed the status bar badges
|
|
14
|
+
* that classic Ink showed under the input (`▲ N` / `▼ N`).
|
|
15
|
+
*/
|
|
16
|
+
export interface TranscriptScrollPort {
|
|
17
|
+
/** Scroll the chat by `dy` rows (negative = up). Returns false if unmounted. */
|
|
18
|
+
scrollBy(dy: number): boolean;
|
|
19
|
+
/** OpenTUI ScrollBox edge autoscroll while drag-selecting. */
|
|
20
|
+
updateAutoScroll(x: number, y: number): void;
|
|
21
|
+
stopAutoScroll(): void;
|
|
22
|
+
/** True when the live port is registered. */
|
|
23
|
+
readonly active: boolean;
|
|
24
|
+
/** Latest lines-above / lines-below metrics (classic status badges). */
|
|
25
|
+
readonly metrics: ScrollMetrics;
|
|
26
|
+
/** Subscribe to metric changes; fires immediately with the current value. */
|
|
27
|
+
onMetrics(listener: (metrics: ScrollMetrics) => void): () => void;
|
|
28
|
+
}
|
|
29
|
+
/** Classic-parity remaining-line counts for the status strip under the input. */
|
|
30
|
+
export interface ScrollMetrics {
|
|
31
|
+
/** Rows of transcript above the viewport (scroll further up to read). */
|
|
32
|
+
readonly linesAbove: number;
|
|
33
|
+
/** Rows of transcript below the viewport (scroll further down to catch up). */
|
|
34
|
+
readonly linesBelow: number;
|
|
35
|
+
}
|
|
36
|
+
export declare const EMPTY_SCROLL_METRICS: ScrollMetrics;
|
|
37
|
+
type Handler = (dy: number) => void;
|
|
38
|
+
type AutoScrollHandler = {
|
|
39
|
+
update(x: number, y: number): void;
|
|
40
|
+
stop(): void;
|
|
41
|
+
};
|
|
42
|
+
export declare const transcriptScrollPort: TranscriptScrollPort;
|
|
43
|
+
/** TranscriptView calls this on mount; returns an unregister function. */
|
|
44
|
+
export declare function registerTranscriptScrollPort(next: Handler): () => void;
|
|
45
|
+
/** Wire ScrollBox start/update/stop auto-scroll for selection edge scroll. */
|
|
46
|
+
export declare function registerTranscriptAutoScroll(next: AutoScrollHandler): () => void;
|
|
47
|
+
/**
|
|
48
|
+
* TranscriptView publishes viewport remainder so the status line can show
|
|
49
|
+
* classic `▲ N` / `▼ N` badges under the composer.
|
|
50
|
+
*/
|
|
51
|
+
export declare function publishTranscriptScrollMetrics(next: ScrollMetrics): void;
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* App-wide transcript scroll bridge.
|
|
3
|
+
*
|
|
4
|
+
* Wheel/trackpad events often land on the focused composer (or fail hit-test
|
|
5
|
+
* and fall back to it). Those events never bubble into the transcript
|
|
6
|
+
* ScrollBox, so scroll felt like “walking prompt history” instead of moving
|
|
7
|
+
* the chat. TranscriptView registers its native scrollbox here; App +
|
|
8
|
+
* Composer forward every free wheel event to this port.
|
|
9
|
+
*
|
|
10
|
+
* Selection drag uses the same port for edge autoscroll when the pointer
|
|
11
|
+
* leaves the scrollbox (e.g. over the composer) so “select down” keeps moving.
|
|
12
|
+
*
|
|
13
|
+
* Scroll metrics (lines above / below the viewport) feed the status bar badges
|
|
14
|
+
* that classic Ink showed under the input (`▲ N` / `▼ N`).
|
|
15
|
+
*/
|
|
16
|
+
export const EMPTY_SCROLL_METRICS = {
|
|
17
|
+
linesAbove: 0,
|
|
18
|
+
linesBelow: 0,
|
|
19
|
+
};
|
|
20
|
+
let handler;
|
|
21
|
+
let autoScroll;
|
|
22
|
+
let metrics = EMPTY_SCROLL_METRICS;
|
|
23
|
+
const metricListeners = new Set();
|
|
24
|
+
function publishMetrics(next) {
|
|
25
|
+
if (next.linesAbove === metrics.linesAbove &&
|
|
26
|
+
next.linesBelow === metrics.linesBelow) {
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
metrics = next;
|
|
30
|
+
for (const listener of metricListeners)
|
|
31
|
+
listener(metrics);
|
|
32
|
+
}
|
|
33
|
+
export const transcriptScrollPort = {
|
|
34
|
+
get active() {
|
|
35
|
+
return handler !== undefined;
|
|
36
|
+
},
|
|
37
|
+
get metrics() {
|
|
38
|
+
return metrics;
|
|
39
|
+
},
|
|
40
|
+
scrollBy(dy) {
|
|
41
|
+
if (!handler || dy === 0)
|
|
42
|
+
return false;
|
|
43
|
+
handler(dy);
|
|
44
|
+
return true;
|
|
45
|
+
},
|
|
46
|
+
updateAutoScroll(x, y) {
|
|
47
|
+
autoScroll?.update(x, y);
|
|
48
|
+
},
|
|
49
|
+
stopAutoScroll() {
|
|
50
|
+
autoScroll?.stop();
|
|
51
|
+
},
|
|
52
|
+
onMetrics(listener) {
|
|
53
|
+
metricListeners.add(listener);
|
|
54
|
+
listener(metrics);
|
|
55
|
+
return () => {
|
|
56
|
+
metricListeners.delete(listener);
|
|
57
|
+
};
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
/** TranscriptView calls this on mount; returns an unregister function. */
|
|
61
|
+
export function registerTranscriptScrollPort(next) {
|
|
62
|
+
handler = next;
|
|
63
|
+
return () => {
|
|
64
|
+
if (handler === next)
|
|
65
|
+
handler = undefined;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/** Wire ScrollBox start/update/stop auto-scroll for selection edge scroll. */
|
|
69
|
+
export function registerTranscriptAutoScroll(next) {
|
|
70
|
+
autoScroll = next;
|
|
71
|
+
return () => {
|
|
72
|
+
if (autoScroll === next)
|
|
73
|
+
autoScroll = undefined;
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* TranscriptView publishes viewport remainder so the status line can show
|
|
78
|
+
* classic `▲ N` / `▼ N` badges under the composer.
|
|
79
|
+
*/
|
|
80
|
+
export function publishTranscriptScrollMetrics(next) {
|
|
81
|
+
publishMetrics({
|
|
82
|
+
linesAbove: Math.max(0, Math.floor(next.linesAbove)),
|
|
83
|
+
linesBelow: Math.max(0, Math.floor(next.linesBelow)),
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=transcript-scroll-port.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-scroll-port.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/transcript/transcript-scroll-port.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAwBH,MAAM,CAAC,MAAM,oBAAoB,GAAkB;IACjD,UAAU,EAAE,CAAC;IACb,UAAU,EAAE,CAAC;CACd,CAAC;AAQF,IAAI,OAA4B,CAAC;AACjC,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AO,KAAK,IAAI;YAAE,OAAO,GAAG,SAAS,CAAC;IAC5C,CAAC,CAAC;AACJ,CAAC;AAED,8EAA8E;AAC9E,MAAM,UAAU,4BAA4B,CAAC,IAAuB;IAClE,UAAU,GAAG,IAAI,CAAC;IAClB,OAAO,GAAG,EAAE;QACV,IAAI,UAAU,KAAK,IAAI;YAAE,UAAU,GAAG,SAAS,CAAC;IAClD,CAAC,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAAC,IAAmB;IAChE,cAAc,CAAC;QACb,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QACpD,UAAU,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;KACrD,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/react */
|
|
2
|
+
/**
|
|
3
|
+
* Chat pane: virtualized, auto-following transcript (V2-050, 056, 057).
|
|
4
|
+
*
|
|
5
|
+
* Auto-follow uses OpenTUI ScrollBox `stickyScroll` + `stickyStart="bottom"`
|
|
6
|
+
* so new rows and growing stream text pin the viewport to the latest content.
|
|
7
|
+
* Manual scroll-up suspends follow (library `_hasManualScroll`); scrolling back
|
|
8
|
+
* to the bottom or a new user prompt re-engages. We still call pinToBottom on
|
|
9
|
+
* content changes as a belt-and-suspenders for layout races.
|
|
10
|
+
*/
|
|
11
|
+
import { type ReactNode } from "react";
|
|
12
|
+
import type { AppServices } from "../../bootstrap/composition-root.js";
|
|
13
|
+
import type { Theme } from "../../rendering/theme.js";
|
|
14
|
+
export interface TranscriptViewProps {
|
|
15
|
+
readonly services: AppServices;
|
|
16
|
+
readonly theme: Theme;
|
|
17
|
+
readonly focused: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* Available content columns for the chat pane (not full terminal). Used for
|
|
20
|
+
* the intro card and markdown wrap (tables reflow when the plan pane is open).
|
|
21
|
+
*/
|
|
22
|
+
readonly contentWidth?: number | undefined;
|
|
23
|
+
}
|
|
24
|
+
export declare function TranscriptView(props: TranscriptViewProps): ReactNode;
|
|
@@ -0,0 +1,403 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @opentui/react */
|
|
3
|
+
/**
|
|
4
|
+
* Chat pane: virtualized, auto-following transcript (V2-050, 056, 057).
|
|
5
|
+
*
|
|
6
|
+
* Auto-follow uses OpenTUI ScrollBox `stickyScroll` + `stickyStart="bottom"`
|
|
7
|
+
* so new rows and growing stream text pin the viewport to the latest content.
|
|
8
|
+
* Manual scroll-up suspends follow (library `_hasManualScroll`); scrolling back
|
|
9
|
+
* to the bottom or a new user prompt re-engages. We still call pinToBottom on
|
|
10
|
+
* content changes as a belt-and-suspenders for layout races.
|
|
11
|
+
*/
|
|
12
|
+
import { useEffect, useMemo, useRef, useState } from "react";
|
|
13
|
+
import { useKeyboard, useTerminalDimensions } from "@opentui/react";
|
|
14
|
+
import { chordFromKeyEvent } from "../../actions/chord-from-key.js";
|
|
15
|
+
import { useTranscriptState } from "../../state/use-transcript-store.js";
|
|
16
|
+
import { useSessionState } from "../../state/use-session-state.js";
|
|
17
|
+
import { transcriptItems } from "../../state/transcript-types.js";
|
|
18
|
+
import { findMatches, nextMatchIndex } from "../../state/transcript-search.js";
|
|
19
|
+
import { TranscriptRow } from "./transcript-row.js";
|
|
20
|
+
import { SearchBar } from "./search-bar.js";
|
|
21
|
+
import { IntroCard } from "./intro-card.js";
|
|
22
|
+
import { EMPTY_SCROLL_METRICS, publishTranscriptScrollMetrics, registerTranscriptAutoScroll, registerTranscriptScrollPort, } from "./transcript-scroll-port.js";
|
|
23
|
+
import { useNativeSelectionCopy } from "./use-native-selection-copy.js";
|
|
24
|
+
/** Hide OpenTUI's native scrollbar chrome. */
|
|
25
|
+
const HIDDEN_SCROLLBARS = {
|
|
26
|
+
visible: false,
|
|
27
|
+
showArrows: false,
|
|
28
|
+
};
|
|
29
|
+
/** Max scrollTop for a ScrollBox (not scrollHeight — that overshoots). */
|
|
30
|
+
function maxScrollTop(sb) {
|
|
31
|
+
const vh = sb.viewport?.height ?? 0;
|
|
32
|
+
return Math.max(0, sb.scrollHeight - vh);
|
|
33
|
+
}
|
|
34
|
+
function isNearBottom(sb, slack = 2) {
|
|
35
|
+
const max = maxScrollTop(sb);
|
|
36
|
+
if (max <= 0)
|
|
37
|
+
return true;
|
|
38
|
+
return sb.scrollTop >= max - slack;
|
|
39
|
+
}
|
|
40
|
+
/** Classic status badges: ▲ lines above · ▼ lines below the viewport. */
|
|
41
|
+
function publishScrollRemainder(sb) {
|
|
42
|
+
if (!sb) {
|
|
43
|
+
publishTranscriptScrollMetrics(EMPTY_SCROLL_METRICS);
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
const max = maxScrollTop(sb);
|
|
47
|
+
const top = Math.max(0, Math.min(max, sb.scrollTop));
|
|
48
|
+
publishTranscriptScrollMetrics({
|
|
49
|
+
linesAbove: top,
|
|
50
|
+
linesBelow: Math.max(0, max - top),
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
export function TranscriptView(props) {
|
|
54
|
+
const { services, theme, focused, contentWidth } = props;
|
|
55
|
+
const state = useTranscriptState(services.transcript);
|
|
56
|
+
const session = useSessionState(services.session);
|
|
57
|
+
const items = useMemo(() => transcriptItems(state), [state]);
|
|
58
|
+
const { width: termWidth } = useTerminalDimensions();
|
|
59
|
+
// Prefer the shell-provided chat width so split/overlay plan never draws
|
|
60
|
+
// the intro card (or markdown tables) wider than the remaining columns.
|
|
61
|
+
const paneWidth = Math.max(20, contentWidth ?? termWidth - 6);
|
|
62
|
+
const introWidth = Math.max(40, paneWidth);
|
|
63
|
+
const scrollRef = useRef(null);
|
|
64
|
+
const closeOverlay = useRef(undefined);
|
|
65
|
+
const lastCount = useRef(items.length);
|
|
66
|
+
/**
|
|
67
|
+
* Product-level follow flag (force re-pin). OpenTUI sticky scroll is the
|
|
68
|
+
* primary follower; this tracks intentional scroll-away.
|
|
69
|
+
*/
|
|
70
|
+
const followBottom = useRef(true);
|
|
71
|
+
const wasRunning = useRef(false);
|
|
72
|
+
/**
|
|
73
|
+
* Bumps when anything visible can grow: new rows, streaming tails on the
|
|
74
|
+
* last few items, tool output bytes, running status.
|
|
75
|
+
*/
|
|
76
|
+
const followKey = useMemo(() => {
|
|
77
|
+
const parts = [
|
|
78
|
+
String(state.order.length),
|
|
79
|
+
state.runningStatus ?? "",
|
|
80
|
+
session.running ? "1" : "0",
|
|
81
|
+
];
|
|
82
|
+
// Last N items — streaming can grow any of the recent rows mid-turn.
|
|
83
|
+
const window = state.order.slice(-8);
|
|
84
|
+
for (const id of window) {
|
|
85
|
+
const item = state.byId.get(id);
|
|
86
|
+
if (!item)
|
|
87
|
+
continue;
|
|
88
|
+
switch (item.kind) {
|
|
89
|
+
case "assistant":
|
|
90
|
+
parts.push(`a:${item.id}:${item.text.length}:${item.streaming ? 1 : 0}`);
|
|
91
|
+
break;
|
|
92
|
+
case "thinking":
|
|
93
|
+
parts.push(`t:${item.id}:${item.content.length}:${item.streaming ? 1 : 0}`);
|
|
94
|
+
break;
|
|
95
|
+
case "user":
|
|
96
|
+
parts.push(`u:${item.id}:${item.text.length}`);
|
|
97
|
+
break;
|
|
98
|
+
case "tool":
|
|
99
|
+
parts.push(`o:${item.id}:${item.outputBytes}:${item.status}`);
|
|
100
|
+
break;
|
|
101
|
+
case "notice":
|
|
102
|
+
parts.push(`n:${item.id}:${item.text.length}`);
|
|
103
|
+
break;
|
|
104
|
+
case "compacted":
|
|
105
|
+
parts.push(`c:${item.id}`);
|
|
106
|
+
break;
|
|
107
|
+
default:
|
|
108
|
+
parts.push(id);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return parts.join("|");
|
|
112
|
+
}, [state, session.running]);
|
|
113
|
+
const [searchOpen, setSearchOpen] = useState(false);
|
|
114
|
+
const [query, setQuery] = useState("");
|
|
115
|
+
const [matchIndex, setMatchIndex] = useState(-1);
|
|
116
|
+
const matches = useMemo(() => findMatches(state, query), [state, query]);
|
|
117
|
+
// Drag-select on response/thinking text → OSC 52 copy on release.
|
|
118
|
+
useNativeSelectionCopy(services);
|
|
119
|
+
/**
|
|
120
|
+
* Click/touch in the chat pane: claim keyboard so ↑/↓ scroll the transcript
|
|
121
|
+
* instead of walking prompt history. Child handlers (YOU bubble, tool card)
|
|
122
|
+
* use selectable={false} + preventDefault so clicks open modals without
|
|
123
|
+
* starting a selection.
|
|
124
|
+
*/
|
|
125
|
+
function onTranscriptMouseDown(event) {
|
|
126
|
+
if (event.button !== 0)
|
|
127
|
+
return;
|
|
128
|
+
if (event.defaultPrevented)
|
|
129
|
+
return;
|
|
130
|
+
services.focus.focusRegion("transcript");
|
|
131
|
+
// Selecting = leave sticky follow so content can scroll with the drag.
|
|
132
|
+
followBottom.current = false;
|
|
133
|
+
}
|
|
134
|
+
function onTranscriptMouseDrag(event) {
|
|
135
|
+
if (!event.isDragging)
|
|
136
|
+
return;
|
|
137
|
+
followBottom.current = false;
|
|
138
|
+
const sb = scrollRef.current;
|
|
139
|
+
if (!sb)
|
|
140
|
+
return;
|
|
141
|
+
sb.updateAutoScroll(event.x, event.y);
|
|
142
|
+
}
|
|
143
|
+
function onTranscriptMouseUp() {
|
|
144
|
+
scrollRef.current?.stopAutoScroll();
|
|
145
|
+
}
|
|
146
|
+
/** Scroll to the true bottom after layout settles (double-rAF). */
|
|
147
|
+
function pinToBottom() {
|
|
148
|
+
const sb = scrollRef.current;
|
|
149
|
+
if (!sb)
|
|
150
|
+
return;
|
|
151
|
+
const go = () => {
|
|
152
|
+
sb.scrollTo(maxScrollTop(sb));
|
|
153
|
+
};
|
|
154
|
+
go();
|
|
155
|
+
requestAnimationFrame(() => {
|
|
156
|
+
go();
|
|
157
|
+
requestAnimationFrame(go);
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
function setFollowing(on) {
|
|
161
|
+
followBottom.current = on;
|
|
162
|
+
if (on)
|
|
163
|
+
pinToBottom();
|
|
164
|
+
}
|
|
165
|
+
// /history hydrate (or /new) swaps the first item id — re-pin to bottom.
|
|
166
|
+
const sessionFingerprint = state.order[0] ?? "__empty__";
|
|
167
|
+
const lastSessionFp = useRef(sessionFingerprint);
|
|
168
|
+
useEffect(() => {
|
|
169
|
+
if (sessionFingerprint === lastSessionFp.current)
|
|
170
|
+
return;
|
|
171
|
+
lastSessionFp.current = sessionFingerprint;
|
|
172
|
+
lastCount.current = items.length;
|
|
173
|
+
setFollowing(true);
|
|
174
|
+
}, [sessionFingerprint, items.length]);
|
|
175
|
+
// New agent turn: always re-engage follow so the live stream is visible.
|
|
176
|
+
useEffect(() => {
|
|
177
|
+
const running = session.running || Boolean(state.runningStatus);
|
|
178
|
+
if (running && !wasRunning.current) {
|
|
179
|
+
setFollowing(true);
|
|
180
|
+
}
|
|
181
|
+
wasRunning.current = running;
|
|
182
|
+
}, [session.running, state.runningStatus]);
|
|
183
|
+
useEffect(() => {
|
|
184
|
+
const grew = items.length - lastCount.current;
|
|
185
|
+
lastCount.current = items.length;
|
|
186
|
+
// New user prompt always re-engages follow (classic: show what you just sent).
|
|
187
|
+
if (grew > 0) {
|
|
188
|
+
const last = items[items.length - 1];
|
|
189
|
+
if (last?.kind === "user") {
|
|
190
|
+
followBottom.current = true;
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
// While a turn is live, keep following unless the user has scrolled away.
|
|
194
|
+
// (followBottom is cleared by wheel/keys; stickyScroll also respects that.)
|
|
195
|
+
if (followBottom.current) {
|
|
196
|
+
pinToBottom();
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (grew > 0) {
|
|
200
|
+
const sb = scrollRef.current;
|
|
201
|
+
if (!sb || isNearBottom(sb)) {
|
|
202
|
+
// Near bottom → re-engage follow.
|
|
203
|
+
setFollowing(true);
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
}, [followKey, items]);
|
|
207
|
+
// Keep the intro card at the top when the transcript is empty.
|
|
208
|
+
useEffect(() => {
|
|
209
|
+
if (items.length > 0)
|
|
210
|
+
return;
|
|
211
|
+
const sb = scrollRef.current;
|
|
212
|
+
if (sb)
|
|
213
|
+
sb.scrollTo(0);
|
|
214
|
+
followBottom.current = true;
|
|
215
|
+
}, [items.length, introWidth]);
|
|
216
|
+
// Force-hide scrollbars after mount (constructor options alone can be
|
|
217
|
+
// overridden by OpenTUI's auto-visibility when content overflows).
|
|
218
|
+
useEffect(() => {
|
|
219
|
+
const sb = scrollRef.current;
|
|
220
|
+
if (!sb)
|
|
221
|
+
return;
|
|
222
|
+
sb.verticalScrollBar.visible = false;
|
|
223
|
+
sb.horizontalScrollBar.visible = false;
|
|
224
|
+
}, [items.length, introWidth]);
|
|
225
|
+
// App + composer forward every free wheel event here so trackpad never
|
|
226
|
+
// lands on the focused textarea and walks prompt history instead.
|
|
227
|
+
useEffect(() => {
|
|
228
|
+
return registerTranscriptScrollPort((dy) => {
|
|
229
|
+
const sb = scrollRef.current;
|
|
230
|
+
if (!sb)
|
|
231
|
+
return;
|
|
232
|
+
const max = maxScrollTop(sb);
|
|
233
|
+
const next = Math.max(0, Math.min(max, sb.scrollTop + dy));
|
|
234
|
+
sb.scrollTo(next);
|
|
235
|
+
followBottom.current = next >= max - 1;
|
|
236
|
+
publishScrollRemainder(sb);
|
|
237
|
+
});
|
|
238
|
+
}, []);
|
|
239
|
+
// Publish ▲/▼ remaining-line metrics for the status strip under the input.
|
|
240
|
+
// Poll lightly: OpenTUI ScrollBox has no scroll-event subscription.
|
|
241
|
+
useEffect(() => {
|
|
242
|
+
const tick = () => {
|
|
243
|
+
publishScrollRemainder(scrollRef.current);
|
|
244
|
+
};
|
|
245
|
+
tick();
|
|
246
|
+
const id = setInterval(tick, 200);
|
|
247
|
+
return () => {
|
|
248
|
+
clearInterval(id);
|
|
249
|
+
publishTranscriptScrollMetrics(EMPTY_SCROLL_METRICS);
|
|
250
|
+
};
|
|
251
|
+
}, [followKey, items.length, introWidth]);
|
|
252
|
+
// Selection drag often ends over the composer; App forwards pointer coords
|
|
253
|
+
// here so edge-autoscroll continues when selecting downward past the pane.
|
|
254
|
+
useEffect(() => {
|
|
255
|
+
return registerTranscriptAutoScroll({
|
|
256
|
+
update(x, y) {
|
|
257
|
+
const sb = scrollRef.current;
|
|
258
|
+
if (!sb)
|
|
259
|
+
return;
|
|
260
|
+
followBottom.current = false;
|
|
261
|
+
sb.updateAutoScroll(x, y);
|
|
262
|
+
},
|
|
263
|
+
stop() {
|
|
264
|
+
scrollRef.current?.stopAutoScroll();
|
|
265
|
+
},
|
|
266
|
+
});
|
|
267
|
+
}, []);
|
|
268
|
+
function jumpToBottom() {
|
|
269
|
+
setFollowing(true);
|
|
270
|
+
}
|
|
271
|
+
function openSearch() {
|
|
272
|
+
if (searchOpen || services.focus.hasOverlay())
|
|
273
|
+
return;
|
|
274
|
+
closeOverlay.current = services.focus.pushOverlay("transcript-search");
|
|
275
|
+
setSearchOpen(true);
|
|
276
|
+
}
|
|
277
|
+
function closeSearch() {
|
|
278
|
+
setSearchOpen(false);
|
|
279
|
+
setQuery("");
|
|
280
|
+
setMatchIndex(-1);
|
|
281
|
+
closeOverlay.current?.();
|
|
282
|
+
closeOverlay.current = undefined;
|
|
283
|
+
}
|
|
284
|
+
function submitSearch() {
|
|
285
|
+
const index = nextMatchIndex(matches, matchIndex);
|
|
286
|
+
setMatchIndex(index);
|
|
287
|
+
const match = matches[index];
|
|
288
|
+
if (match)
|
|
289
|
+
scrollRef.current?.scrollChildIntoView(match.itemId);
|
|
290
|
+
}
|
|
291
|
+
function resendPrompt(prompt) {
|
|
292
|
+
void (async () => {
|
|
293
|
+
const trimmed = prompt.trim();
|
|
294
|
+
if (services.commands.looksLikeCommand(trimmed)) {
|
|
295
|
+
const invocation = services.commands.parse(trimmed);
|
|
296
|
+
if (!invocation) {
|
|
297
|
+
services.session.notice("warn", `unknown command: ${trimmed.split(/\s/, 1)[0] ?? trimmed}. Try /help`);
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
if (!(await services.commands.dispatch(invocation))) {
|
|
301
|
+
services.session.notice("warn", `command /${invocation.name} is not available right now`);
|
|
302
|
+
}
|
|
303
|
+
return;
|
|
304
|
+
}
|
|
305
|
+
if (services.session.getState().running)
|
|
306
|
+
services.session.enqueue(prompt);
|
|
307
|
+
else
|
|
308
|
+
await services.session.submit(prompt);
|
|
309
|
+
})();
|
|
310
|
+
}
|
|
311
|
+
function openUserPrompt(prompt) {
|
|
312
|
+
services.overlay.openPromptActions({ prompt, onResend: () => resendPrompt(prompt) });
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Wheel over the chat pane: claim focus so ↑/↓ don’t walk prompt history,
|
|
316
|
+
* and stop bubble so App doesn’t also scroll via the port (double-step).
|
|
317
|
+
* Actual motion is handled by ScrollBox’s native onMouseEvent.
|
|
318
|
+
*/
|
|
319
|
+
function onWheelScroll(event) {
|
|
320
|
+
if (!event.scroll)
|
|
321
|
+
return;
|
|
322
|
+
event.stopPropagation();
|
|
323
|
+
services.focus.focusRegion("transcript");
|
|
324
|
+
// Keep followBottom in sync after the native ScrollBox applies the delta.
|
|
325
|
+
queueMicrotask(() => {
|
|
326
|
+
const sb = scrollRef.current;
|
|
327
|
+
if (!sb)
|
|
328
|
+
return;
|
|
329
|
+
followBottom.current = isNearBottom(sb);
|
|
330
|
+
publishScrollRemainder(sb);
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
useKeyboard((key) => {
|
|
334
|
+
if (key.eventType === "release")
|
|
335
|
+
return;
|
|
336
|
+
const chord = chordFromKeyEvent(key);
|
|
337
|
+
if (searchOpen && chord === "escape") {
|
|
338
|
+
key.preventDefault();
|
|
339
|
+
closeSearch();
|
|
340
|
+
return;
|
|
341
|
+
}
|
|
342
|
+
if (chord === "ctrl+r") {
|
|
343
|
+
key.preventDefault();
|
|
344
|
+
openSearch();
|
|
345
|
+
}
|
|
346
|
+
// Arrow / page scroll when transcript owns focus.
|
|
347
|
+
if (!searchOpen && services.focus.activeContext() === "transcript") {
|
|
348
|
+
const sb = scrollRef.current;
|
|
349
|
+
if (!sb)
|
|
350
|
+
return;
|
|
351
|
+
const page = sb.viewport.height || 10;
|
|
352
|
+
const max = maxScrollTop(sb);
|
|
353
|
+
if (chord === "up" || chord === "k") {
|
|
354
|
+
key.preventDefault();
|
|
355
|
+
sb.scrollTo(Math.max(0, sb.scrollTop - 1));
|
|
356
|
+
followBottom.current = false;
|
|
357
|
+
publishScrollRemainder(sb);
|
|
358
|
+
}
|
|
359
|
+
else if (chord === "down" || chord === "j") {
|
|
360
|
+
key.preventDefault();
|
|
361
|
+
const next = Math.min(max, sb.scrollTop + 1);
|
|
362
|
+
sb.scrollTo(next);
|
|
363
|
+
followBottom.current = next >= max - 1;
|
|
364
|
+
publishScrollRemainder(sb);
|
|
365
|
+
}
|
|
366
|
+
else if (chord === "pageup") {
|
|
367
|
+
key.preventDefault();
|
|
368
|
+
sb.scrollTo(Math.max(0, sb.scrollTop - page));
|
|
369
|
+
followBottom.current = false;
|
|
370
|
+
publishScrollRemainder(sb);
|
|
371
|
+
}
|
|
372
|
+
else if (chord === "pagedown") {
|
|
373
|
+
key.preventDefault();
|
|
374
|
+
const next = Math.min(max, sb.scrollTop + page);
|
|
375
|
+
sb.scrollTo(next);
|
|
376
|
+
followBottom.current = next >= max - 1;
|
|
377
|
+
publishScrollRemainder(sb);
|
|
378
|
+
}
|
|
379
|
+
else if (chord === "end") {
|
|
380
|
+
key.preventDefault();
|
|
381
|
+
jumpToBottom();
|
|
382
|
+
publishScrollRemainder(sb);
|
|
383
|
+
}
|
|
384
|
+
else if (chord === "home") {
|
|
385
|
+
key.preventDefault();
|
|
386
|
+
sb.scrollTo(0);
|
|
387
|
+
followBottom.current = false;
|
|
388
|
+
publishScrollRemainder(sb);
|
|
389
|
+
}
|
|
390
|
+
}
|
|
391
|
+
});
|
|
392
|
+
return (_jsxs("box", { style: { flexDirection: "column", flexGrow: 1, width: "100%", position: "relative" }, onMouseDown: onTranscriptMouseDown, onMouseDrag: onTranscriptMouseDrag, onMouseUp: onTranscriptMouseUp, onMouseDragEnd: onTranscriptMouseUp, onMouseScroll: onWheelScroll, children: [searchOpen ? (_jsx(SearchBar, { theme: theme, query: query, matchCount: matches.length, activeOrdinal: matchIndex + 1, onQueryChange: (value) => {
|
|
393
|
+
setQuery(value);
|
|
394
|
+
setMatchIndex(-1);
|
|
395
|
+
}, onSubmit: submitSearch })) : null, _jsxs("scrollbox", { ref: scrollRef,
|
|
396
|
+
// Keep the scrollbox focusable for wheel even when the composer has
|
|
397
|
+
// keyboard focus; selection/mouse-down still routes region focus.
|
|
398
|
+
focused: focused,
|
|
399
|
+
// Native auto-follow: when content grows and the user is (or returns)
|
|
400
|
+
// at the bottom, stay pinned to the latest agent output.
|
|
401
|
+
stickyScroll: true, stickyStart: items.length > 0 ? "bottom" : "top", viewportCulling: true, scrollY: true, scrollX: false, scrollbarOptions: HIDDEN_SCROLLBARS, verticalScrollbarOptions: HIDDEN_SCROLLBARS, horizontalScrollbarOptions: HIDDEN_SCROLLBARS, style: { flexGrow: 1, width: "100%" }, onMouseScroll: onWheelScroll, children: [_jsx(IntroCard, { services: services, theme: theme, width: introWidth }), items.map((item) => (_jsx(TranscriptRow, { item: item, state: state, theme: theme, store: services.transcript, spool: services.session.spool, services: services, onOpenUserPrompt: openUserPrompt, contentWidth: paneWidth }, item.id)))] })] }));
|
|
402
|
+
}
|
|
403
|
+
//# sourceMappingURL=transcript-view.js.map
|