@pentoshi/clai 2.0.61 → 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 +210 -91
- 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,19 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/react */
|
|
2
|
+
/**
|
|
3
|
+
* Compacted-context card — same shape as tool OUTPUT cards (CHAT-007).
|
|
4
|
+
*
|
|
5
|
+
* Auto and manual `/compact` both land here. Collapsed shows head + tail like
|
|
6
|
+
* tool output; Ctrl+O (global output expand) or click expands/collapses in place.
|
|
7
|
+
*/
|
|
8
|
+
import { type ReactNode } from "react";
|
|
9
|
+
import type { CompactedItem } from "../../state/transcript-types.js";
|
|
10
|
+
import type { Theme } from "../../rendering/theme.js";
|
|
11
|
+
export declare function CompactedRow(props: {
|
|
12
|
+
item: CompactedItem;
|
|
13
|
+
theme: Theme;
|
|
14
|
+
/** Chat-pane columns (plan split/overlay already subtracted). */
|
|
15
|
+
contentWidth?: number | undefined;
|
|
16
|
+
/** Ctrl+O global / per-item expand (same flag as tool OUTPUT). */
|
|
17
|
+
expanded: boolean;
|
|
18
|
+
onToggle: () => void;
|
|
19
|
+
}): ReactNode;
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @opentui/react */
|
|
3
|
+
/**
|
|
4
|
+
* Compacted-context card — same shape as tool OUTPUT cards (CHAT-007).
|
|
5
|
+
*
|
|
6
|
+
* Auto and manual `/compact` both land here. Collapsed shows head + tail like
|
|
7
|
+
* tool output; Ctrl+O (global output expand) or click expands/collapses in place.
|
|
8
|
+
*/
|
|
9
|
+
import { useMemo } from "react";
|
|
10
|
+
import { TextAttributes } from "@opentui/core";
|
|
11
|
+
import { useTerminalDimensions } from "@opentui/react";
|
|
12
|
+
import { displayCompactSummary } from "../../state/transcript-hydrate.js";
|
|
13
|
+
import { renderMarkdownLines } from "../../rendering/render-markdown-lines.js";
|
|
14
|
+
import { useClickWithoutDrag } from "./use-click-without-drag.js";
|
|
15
|
+
const COLLAPSED_HEAD = 4;
|
|
16
|
+
const COLLAPSED_TAIL = 4;
|
|
17
|
+
export function CompactedRow(props) {
|
|
18
|
+
const { item, theme, contentWidth, expanded, onToggle } = props;
|
|
19
|
+
const { width: termWidth } = useTerminalDimensions();
|
|
20
|
+
// Card has border + horizontal padding (~4 cols of chrome).
|
|
21
|
+
const wrapWidth = Math.max(20, contentWidth != null
|
|
22
|
+
? Math.max(20, contentWidth - 4)
|
|
23
|
+
: Math.max(40, termWidth - 10));
|
|
24
|
+
const summary = displayCompactSummary(item.summary);
|
|
25
|
+
const allLines = useMemo(() => renderMarkdownLines(summary, {
|
|
26
|
+
width: wrapWidth,
|
|
27
|
+
defaultFg: theme.foreground,
|
|
28
|
+
stripOuterIndent: true,
|
|
29
|
+
}), [summary, wrapWidth, theme.foreground]);
|
|
30
|
+
const bodyLines = useMemo(() => {
|
|
31
|
+
if (expanded || allLines.length <= COLLAPSED_HEAD + COLLAPSED_TAIL) {
|
|
32
|
+
return allLines.map((content) => ({ kind: "text", content }));
|
|
33
|
+
}
|
|
34
|
+
const hidden = allLines.length - COLLAPSED_HEAD - COLLAPSED_TAIL;
|
|
35
|
+
const out = [];
|
|
36
|
+
for (const content of allLines.slice(0, COLLAPSED_HEAD)) {
|
|
37
|
+
out.push({ kind: "text", content });
|
|
38
|
+
}
|
|
39
|
+
out.push({ kind: "gap", hidden });
|
|
40
|
+
for (const content of allLines.slice(-COLLAPSED_TAIL)) {
|
|
41
|
+
out.push({ kind: "text", content });
|
|
42
|
+
}
|
|
43
|
+
return out;
|
|
44
|
+
}, [allLines, expanded]);
|
|
45
|
+
const hiddenCount = bodyLines.find((l) => l.kind === "gap")?.hidden ?? 0;
|
|
46
|
+
const tokenLabel = item.beforeTokens > 0 || item.afterTokens > 0
|
|
47
|
+
? `~${item.beforeTokens.toLocaleString()} → ~${item.afterTokens.toLocaleString()} tokens`
|
|
48
|
+
: "";
|
|
49
|
+
const click = useClickWithoutDrag(() => {
|
|
50
|
+
onToggle();
|
|
51
|
+
});
|
|
52
|
+
const footerHint = expanded
|
|
53
|
+
? "expanded · click or Ctrl+O to collapse"
|
|
54
|
+
: hiddenCount > 0
|
|
55
|
+
? `+${hiddenCount} more · click or Ctrl+O to expand`
|
|
56
|
+
: "click or Ctrl+O to expand";
|
|
57
|
+
const borderFg = theme.activity;
|
|
58
|
+
return (_jsxs("box", { id: item.id, border: true, borderStyle: "rounded", style: {
|
|
59
|
+
flexDirection: "column",
|
|
60
|
+
width: "100%",
|
|
61
|
+
marginBottom: 1,
|
|
62
|
+
borderColor: borderFg,
|
|
63
|
+
backgroundColor: theme.statusBackground,
|
|
64
|
+
paddingLeft: 1,
|
|
65
|
+
paddingRight: 1,
|
|
66
|
+
paddingTop: 0,
|
|
67
|
+
paddingBottom: 0,
|
|
68
|
+
}, onMouseDown: click.onMouseDown, onMouseUp: click.onMouseUp, children: [_jsxs("box", { style: {
|
|
69
|
+
flexDirection: "row",
|
|
70
|
+
width: "100%",
|
|
71
|
+
paddingTop: 0,
|
|
72
|
+
paddingBottom: 0,
|
|
73
|
+
}, children: [_jsx("text", { selectable: true, style: { fg: borderFg, attributes: TextAttributes.BOLD }, children: "\u2726 Compacted context" }), _jsx("text", { content: " ", selectable: true }), _jsx("text", { selectable: true, style: {
|
|
74
|
+
fg: borderFg,
|
|
75
|
+
bg: theme.chip,
|
|
76
|
+
attributes: TextAttributes.BOLD,
|
|
77
|
+
}, children: " memory " }), tokenLabel ? (_jsxs(_Fragment, { children: [_jsx("text", { content: " ", selectable: true }), _jsx("text", { selectable: true, style: { fg: theme.muted, attributes: TextAttributes.DIM }, children: tokenLabel })] })) : null] }), bodyLines.length > 0 ? (_jsxs("box", { style: {
|
|
78
|
+
flexDirection: "column",
|
|
79
|
+
width: "100%",
|
|
80
|
+
marginTop: 0,
|
|
81
|
+
flexShrink: 1,
|
|
82
|
+
}, children: [_jsx("text", { selectable: true, style: {
|
|
83
|
+
fg: theme.white,
|
|
84
|
+
bg: theme.chipTeal,
|
|
85
|
+
attributes: TextAttributes.BOLD,
|
|
86
|
+
}, children: " SUMMARY " }), bodyLines.map((line, i) => {
|
|
87
|
+
if (line.kind === "gap") {
|
|
88
|
+
return (_jsxs("text", { selectable: true, children: [_jsx("span", { style: { fg: theme.muted }, children: "│ " }), _jsx("span", { style: { fg: theme.muted, attributes: TextAttributes.DIM }, children: `··· ${line.hidden} lines more ···` })] }, `gap-${i}`));
|
|
89
|
+
}
|
|
90
|
+
// Prefixed gutter like tool OUTPUT rows; markdown body is StyledText.
|
|
91
|
+
return (_jsxs("box", { style: { flexDirection: "row", width: "100%" }, children: [_jsx("text", { selectable: true, style: { fg: theme.muted }, children: "│ " }), _jsx("text", { content: line.content, selectable: true })] }, `l-${i}`));
|
|
92
|
+
})] })) : null, _jsxs("box", { style: { flexDirection: "row", width: "100%", marginTop: 0 }, children: [_jsx("text", { selectable: false, style: { fg: theme.cyan }, children: "› " }), _jsx("text", { selectable: false, style: { fg: theme.cyan, attributes: TextAttributes.DIM }, children: footerHint })] })] }));
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=compacted-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compacted-row.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/transcript/compacted-row.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAGvD,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,0CAA0C,CAAC;AAC/E,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,cAAc,GAAG,CAAC,CAAC;AACzB,MAAM,cAAc,GAAG,CAAC,CAAC;AAMzB,MAAM,UAAU,YAAY,CAAC,KAQ5B;IACC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IAChE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,GAAG,qBAAqB,EAAE,CAAC;IACrD,4DAA4D;IAC5D,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CACxB,EAAE,EACF,YAAY,IAAI,I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CACL,gBAAuB,UAAU,mBAC/B,eAAM,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,YAAG,IAAI,GAAQ,EAC/C,eAAM,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,UAAU,EAAE,cAAc,CAAC,GAAG,EAAE,YAC7D,OAAO,IAAI,CAAC,MAAM,iBAAiB,GAC/B,KAJE,OAAO,CAAC,EAAE,CAKd,CACR,CAAC;wBACJ,CAAC;wBACD,sEAAsE;wBACtE,OAAO,CACL,eAAoB,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,aAChE,eAAM,UAAU,QAAC,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,YACxC,IAAI,GACA,EACP,eAAM,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,SAAG,KAJlC,KAAK,CAAC,EAAE,CAKZ,CACP,CAAC;oBACJ,CAAC,CAAC,IACE,CACP,CAAC,CAAC,CAAC,IAAI,EAER,eAAK,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,EAAE,aAC/D,eAAM,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,YAC/C,IAAI,GACA,EACP,eACE,UAAU,EAAE,KAAK,EACjB,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,IAAI,EAAE,UAAU,EAAE,cAAc,CAAC,GAAG,EAAE,YAExD,UAAU,GACN,IACH,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/react */
|
|
2
|
+
/**
|
|
3
|
+
* Startup intro / model card for OpenTUI v2.
|
|
4
|
+
*
|
|
5
|
+
* Same layout and colors as the legacy Ink TUI: chalk lines from
|
|
6
|
+
* `renderIntroHeaderLines` converted to OpenTUI `StyledText` so chips,
|
|
7
|
+
* badges, and the wordmark gradient keep their colors (not B&W).
|
|
8
|
+
* Always the first scroll child so it scrolls with chat.
|
|
9
|
+
*/
|
|
10
|
+
import { type ReactNode } from "react";
|
|
11
|
+
import type { AppServices } from "../../bootstrap/composition-root.js";
|
|
12
|
+
import type { Theme } from "../../rendering/theme.js";
|
|
13
|
+
export interface IntroCardProps {
|
|
14
|
+
readonly services: AppServices;
|
|
15
|
+
readonly theme: Theme;
|
|
16
|
+
/** Available width of the chat pane (fallback: full terminal width). */
|
|
17
|
+
readonly width?: number | undefined;
|
|
18
|
+
}
|
|
19
|
+
export declare function IntroCard(props: IntroCardProps): ReactNode;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@opentui/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @opentui/react */
|
|
3
|
+
/**
|
|
4
|
+
* Startup intro / model card for OpenTUI v2.
|
|
5
|
+
*
|
|
6
|
+
* Same layout and colors as the legacy Ink TUI: chalk lines from
|
|
7
|
+
* `renderIntroHeaderLines` converted to OpenTUI `StyledText` so chips,
|
|
8
|
+
* badges, and the wordmark gradient keep their colors (not B&W).
|
|
9
|
+
* Always the first scroll child so it scrolls with chat.
|
|
10
|
+
*/
|
|
11
|
+
import { useMemo } from "react";
|
|
12
|
+
import { useTerminalDimensions } from "@opentui/react";
|
|
13
|
+
import { homedir } from "node:os";
|
|
14
|
+
import { ansiToStyledText } from "../../rendering/ansi-to-styled.js";
|
|
15
|
+
import { renderIntroHeaderLines } from "../../../ui/intro-header.js";
|
|
16
|
+
import { getCurrentVersion } from "../../../commands/update.js";
|
|
17
|
+
import { getConfig } from "../../../store/config.js";
|
|
18
|
+
import { safeCwd } from "../../../os/cwd.js";
|
|
19
|
+
function displayWorkdir(workdir) {
|
|
20
|
+
const home = homedir();
|
|
21
|
+
return workdir.startsWith(home) ? `~${workdir.slice(home.length)}` : workdir;
|
|
22
|
+
}
|
|
23
|
+
export function IntroCard(props) {
|
|
24
|
+
const { services, width: widthProp } = props;
|
|
25
|
+
const { width: termWidth } = useTerminalDimensions();
|
|
26
|
+
const width = widthProp ?? Math.max(56, termWidth - 4);
|
|
27
|
+
const session = services.session.getState();
|
|
28
|
+
const permissions = getConfig().permissions ?? "default";
|
|
29
|
+
const version = getCurrentVersion();
|
|
30
|
+
const workdir = displayWorkdir(safeCwd());
|
|
31
|
+
const lines = useMemo(() => renderIntroHeaderLines({
|
|
32
|
+
width,
|
|
33
|
+
version,
|
|
34
|
+
mode: session.mode,
|
|
35
|
+
provider: session.provider ?? "default",
|
|
36
|
+
model: session.model ?? "",
|
|
37
|
+
permissions,
|
|
38
|
+
workdir,
|
|
39
|
+
}).map((line) => ansiToStyledText(line.length === 0 ? " " : line)), [
|
|
40
|
+
width,
|
|
41
|
+
version,
|
|
42
|
+
session.mode,
|
|
43
|
+
session.provider,
|
|
44
|
+
session.model,
|
|
45
|
+
permissions,
|
|
46
|
+
workdir,
|
|
47
|
+
]);
|
|
48
|
+
return (_jsx("box", { id: "intro-card", style: { flexDirection: "column", width: "100%", marginBottom: 1 }, children: lines.map((content, i) => (_jsx("text", { content: content, selectable: false }, i))) }));
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=intro-card.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"intro-card.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/transcript/intro-card.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC;;;;;;;GAOG;AAEH,OAAO,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAGlC,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,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CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,EACpE;QACE,KAAK;QACL,OAAO;QACP,OAAO,CAAC,IAAI;QACZ,OAAO,CAAC,QAAQ;QAChB,OAAO,CAAC,KAAK;QACb,WAAW;QACX,OAAO;KACR,CACF,CAAC;IAEF,OAAO,CACL,cACE,EAAE,EAAC,YAAY,EACf,KAAK,EAAE,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC,EAAE,YAEjE,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,CACzB,eAAc,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,IAAtC,CAAC,CAAyC,CACtD,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/react */
|
|
2
|
+
/**
|
|
3
|
+
* Renders plain text with detected URLs/paths as real hyperlinks (P1
|
|
4
|
+
* "clickable links/file paths"; V2-055). `<a href>` emits the terminal's
|
|
5
|
+
* native OSC 8 hyperlink, so the host terminal's own click/modifier
|
|
6
|
+
* convention applies — there is no custom open-URL port to build here.
|
|
7
|
+
*
|
|
8
|
+
* Only absolute (`/...`) and home-relative (`~/...`) paths resolve to a
|
|
9
|
+
* `file://` href; a bare relative path (`./foo.ts`) has no reliable base
|
|
10
|
+
* directory at this layer, so it gets the accent color without a href rather
|
|
11
|
+
* than risking a link to the wrong file.
|
|
12
|
+
*/
|
|
13
|
+
import type { ReactNode } from "react";
|
|
14
|
+
import type { Theme } from "../../rendering/theme.js";
|
|
15
|
+
export declare function LinkableText(props: {
|
|
16
|
+
text: string;
|
|
17
|
+
theme: Theme;
|
|
18
|
+
fg?: string;
|
|
19
|
+
/** Default true; set false on clickable chrome (YOU bubble). */
|
|
20
|
+
selectable?: boolean;
|
|
21
|
+
}): ReactNode;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx } from "@opentui/react/jsx-runtime";
|
|
2
|
+
/** @jsxImportSource @opentui/react */
|
|
3
|
+
/**
|
|
4
|
+
* Renders plain text with detected URLs/paths as real hyperlinks (P1
|
|
5
|
+
* "clickable links/file paths"; V2-055). `<a href>` emits the terminal's
|
|
6
|
+
* native OSC 8 hyperlink, so the host terminal's own click/modifier
|
|
7
|
+
* convention applies — there is no custom open-URL port to build here.
|
|
8
|
+
*
|
|
9
|
+
* Only absolute (`/...`) and home-relative (`~/...`) paths resolve to a
|
|
10
|
+
* `file://` href; a bare relative path (`./foo.ts`) has no reliable base
|
|
11
|
+
* directory at this layer, so it gets the accent color without a href rather
|
|
12
|
+
* than risking a link to the wrong file.
|
|
13
|
+
*/
|
|
14
|
+
import { homedir } from "node:os";
|
|
15
|
+
import { detectLinks } from "../../rendering/link-detector.js";
|
|
16
|
+
function resolveHref(span) {
|
|
17
|
+
if (span.kind === "url")
|
|
18
|
+
return span.value;
|
|
19
|
+
const pathOnly = span.value.split(":")[0] ?? span.value;
|
|
20
|
+
if (pathOnly.startsWith("/"))
|
|
21
|
+
return `file://${pathOnly}`;
|
|
22
|
+
if (pathOnly.startsWith("~/"))
|
|
23
|
+
return `file://${homedir()}${pathOnly.slice(1)}`;
|
|
24
|
+
return undefined;
|
|
25
|
+
}
|
|
26
|
+
export function LinkableText(props) {
|
|
27
|
+
const { text, theme, fg, selectable = true } = props;
|
|
28
|
+
const spans = detectLinks(text);
|
|
29
|
+
if (spans.length === 0) {
|
|
30
|
+
return (_jsx("text", { selectable: selectable, style: { fg: fg ?? theme.foreground }, children: text }));
|
|
31
|
+
}
|
|
32
|
+
const nodes = [];
|
|
33
|
+
let cursor = 0;
|
|
34
|
+
for (const span of spans) {
|
|
35
|
+
if (span.start > cursor)
|
|
36
|
+
nodes.push(text.slice(cursor, span.start));
|
|
37
|
+
const href = resolveHref(span);
|
|
38
|
+
const key = `${span.start}-${span.end}`;
|
|
39
|
+
nodes.push(href ? (_jsx("a", { href: href, style: { fg: theme.accent }, children: span.value }, key)) : (_jsx("span", { style: { fg: theme.accent }, children: span.value }, key)));
|
|
40
|
+
cursor = span.end;
|
|
41
|
+
}
|
|
42
|
+
if (cursor < text.length)
|
|
43
|
+
nodes.push(text.slice(cursor));
|
|
44
|
+
return (_jsx("text", { selectable: selectable, style: { fg: fg ?? theme.foreground }, children: nodes }));
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=linkable-text.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"linkable-text.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/transcript/linkable-text.tsx"],"names":[],"mappings":";AAAA,sCAAsC;AACtC;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,OAAO,EAAE,WAAW,EAAiB,MAAM,kCAAkC,CAAC;AAG9E,SAAS,WAAW,CAAC,IAAc;IACjC,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC;IAC3C,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC;IACxD,IAAI,QAAQ,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,UAAU,QAAQ,EAAE,CAAC;IAC1D,IAAI,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,UAAU,OAAO,EAAE,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,CAAC;IAChF,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,YAAY,CAAC,KAM5B;IACC,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,EAAE,UAAU,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IACrD,M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AAE,EAAE,IAAI,KAAK,CAAC,UAAU,EAAE,YAChE,KAAK,GACD,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/react */
|
|
2
|
+
/**
|
|
3
|
+
* Renders a `NoticeItem` (CHAT-007, V2-051).
|
|
4
|
+
*
|
|
5
|
+
* Classic Ink: solid WARN / INFO / ERR badge, then body text that wraps in its
|
|
6
|
+
* own column so multi-line errors never paint over the badge.
|
|
7
|
+
*/
|
|
8
|
+
import type { ReactNode } from "react";
|
|
9
|
+
import type { NoticeItem } from "../../state/transcript-types.js";
|
|
10
|
+
import type { Theme } from "../../rendering/theme.js";
|
|
11
|
+
export declare function NoticeRow(props: {
|
|
12
|
+
item: NoticeItem;
|
|
13
|
+
theme: Theme;
|
|
14
|
+
}): ReactNode;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { TextAttributes } from "@opentui/core";
|
|
3
|
+
import { LinkableText } from "./linkable-text.js";
|
|
4
|
+
function badge(level) {
|
|
5
|
+
// Fixed-width labels so wrap indent stays consistent across levels.
|
|
6
|
+
if (level === "warn")
|
|
7
|
+
return { label: " WARN ", fg: "#FFFFFF", bg: "#D97706" };
|
|
8
|
+
if (level === "error")
|
|
9
|
+
return { label: " ERR ", fg: "#FFFFFF", bg: "#B91C1C" };
|
|
10
|
+
return { label: " INFO ", fg: "#FFFFFF", bg: "#334155" };
|
|
11
|
+
}
|
|
12
|
+
function bodyColor(level, theme) {
|
|
13
|
+
if (level === "warn")
|
|
14
|
+
return theme.activity;
|
|
15
|
+
if (level === "error")
|
|
16
|
+
return theme.mode;
|
|
17
|
+
return theme.cyan;
|
|
18
|
+
}
|
|
19
|
+
export function NoticeRow(props) {
|
|
20
|
+
const { item, theme } = props;
|
|
21
|
+
const b = badge(item.level);
|
|
22
|
+
return (_jsxs("box", { id: item.id, style: {
|
|
23
|
+
marginBottom: 1,
|
|
24
|
+
flexDirection: "row",
|
|
25
|
+
width: "100%",
|
|
26
|
+
alignItems: "flex-start",
|
|
27
|
+
}, children: [_jsx("text", { selectable: true, style: {
|
|
28
|
+
fg: b.fg,
|
|
29
|
+
bg: b.bg,
|
|
30
|
+
attributes: TextAttributes.BOLD,
|
|
31
|
+
flexShrink: 0,
|
|
32
|
+
}, children: b.label }), _jsx("box", { style: {
|
|
33
|
+
flexGrow: 1,
|
|
34
|
+
flexShrink: 1,
|
|
35
|
+
flexDirection: "column",
|
|
36
|
+
paddingLeft: 1,
|
|
37
|
+
minWidth: 0,
|
|
38
|
+
}, children: _jsx(LinkableText, { text: item.text, theme: theme, fg: bodyColor(item.level, theme), selectable: true }) })] }));
|
|
39
|
+
}
|
|
40
|
+
//# sourceMappingURL=notice-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"notice-row.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/transcript/notice-row.tsx"],"names":[],"mappings":";AASA,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAG/C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,SAAS,KAAK,CAAC,KAAkB;IAC/B,oEAAoE;IACpE,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC;IAC/E,IAAI,KAAK,KAAK,OAAO;QAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC;IAChF,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,SAAS,EAAE,CAAC;AAC3D,CAAC;AAED,SAAS,SAAS,CAAC,KAAkB,EAAE,KAAY;IACjD,IAAI,KAAK,KAAK,MAAM;QAAE,OAAO,KAAK,CAAC,QAAQ,CAAC;IAC5C,IAAI,KAAK,KAAK,OAAO;QAAE,OAAO,KAAK,CAAC,IAAI,CAAC;IACzC,OAAO,KAAK,CAAC,IAAI,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,SAAS,CAAC,KAAyC;IACjE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,KAAK,CAAC;IAC9B,MAAM,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5B,OAAO,CACL,eACE,EAAE,EAAE,IAAI,CAAC,EAAE,EACX,KAAK,EAAE;YACL,YAAY,EAAE,CAAC;YACf,aAAa,EAAE,KAAK;YACpB,KAAK,EAAE,MAAM;YACb,UAAU,EAAE,YAAY;SACzB,aAED,eACE,UAAU,QACV,KAAK,EAAE;oBACL,EAAE,EAAE,CAAC,CAAC,EAAE;oBACR,EAAE,EAAE,CAAC,CAAC,EAAE;oBACR,UAAU,EAAE,cAAc,CAAC,IAAI;oBAC/B,UAAU,EAAE,CAAC;iBACd,YAEA,CAAC,CAAC,KAAK,GACH,EACP,cACE,KAAK,EAAE;oBACL,QAAQ,EAAE,CAAC;oBACX,UAAU,EAAE,CAAC;oBACb,aAAa,EAAE,QAAQ;oBACvB,WAAW,EAAE,CAAC;oBACd,QAAQ,EAAE,CAAC;iBACZ,YAED,KAAC,YAAY,IAAC,IAAI,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,KAAK,CAAC,EAAE,UAAU,SAAG,GACxF,IACF,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/react */
|
|
2
|
+
/**
|
|
3
|
+
* Transcript search input (CHAT/V2-057). Purely a text field plus a match
|
|
4
|
+
* counter; query matching and index navigation live in the renderer-
|
|
5
|
+
* independent `transcript-search.ts` and are owned by `TranscriptView`, which
|
|
6
|
+
* also handles Escape (global key handling can't be typed on `<input>`'s
|
|
7
|
+
* React props — see that component for why).
|
|
8
|
+
*/
|
|
9
|
+
import type { ReactNode } from "react";
|
|
10
|
+
import type { Theme } from "../../rendering/theme.js";
|
|
11
|
+
export interface SearchBarProps {
|
|
12
|
+
readonly theme: Theme;
|
|
13
|
+
readonly query: string;
|
|
14
|
+
readonly matchCount: number;
|
|
15
|
+
readonly activeOrdinal: number;
|
|
16
|
+
readonly onQueryChange: (value: string) => void;
|
|
17
|
+
readonly onSubmit: () => void;
|
|
18
|
+
}
|
|
19
|
+
export declare function SearchBar(props: SearchBarProps): ReactNode;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
export function SearchBar(props) {
|
|
3
|
+
const { theme, query, matchCount, activeOrdinal, onQueryChange, onSubmit } = props;
|
|
4
|
+
const status = matchCount > 0 ? `${activeOrdinal}/${matchCount}` : query ? "no matches" : "";
|
|
5
|
+
return (_jsxs("box", { style: { flexDirection: "row", backgroundColor: theme.statusBackground, paddingLeft: 1 }, children: [_jsx("text", { style: { fg: theme.muted }, children: "type:filter " }), _jsx("input", { focused: true, value: query, onInput: onQueryChange, onSubmit: onSubmit, textColor: theme.foreground, backgroundColor: theme.statusBackground, style: { flexGrow: 1 } }), _jsxs("text", { style: { fg: theme.muted }, children: [" ", status, " \u00B7 enter:next \u00B7 esc:close"] })] }));
|
|
6
|
+
}
|
|
7
|
+
//# sourceMappingURL=search-bar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"search-bar.js","sourceRoot":"","sources":["../../../../src/tui-v2/components/transcript/search-bar.tsx"],"names":[],"mappings":";AAqBA,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,KAAK,CAAC;IACnF,MAAM,MAAM,GAAG,UAAU,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,aAAa,IAAI,UAAU,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;IAC7F,OAAO,CACL,eAAK,KAAK,EAAE,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,EAAE,KAAK,CAAC,gBAAgB,EAAE,WAAW,EAAE,CAAC,EAAE,aAC3F,eAAM,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,8BAAsB,EACtD,gBACE,OAAO,QACP,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,QAAQ,EAClB,SAAS,EAAE,KAAK,CAAC,UAAU,EAC3B,eAAe,EAAE,KAAK,CAAC,gBAAgB,EACvC,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,GACtB,EACF,gBAAM,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,KAAK,EAAE,aAC7B,GAAG,EACH,MAAM,+CACF,IACH,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/react */
|
|
2
|
+
/**
|
|
3
|
+
* Renders a `ThinkingItem` (CHAT-006, V2-053).
|
|
4
|
+
*
|
|
5
|
+
* Live stream: while the model is still reasoning (`item.streaming`), the body
|
|
6
|
+
* is always shown — same as the classic TUI's thinking preview. After the
|
|
7
|
+
* block is finalized, the body follows the global Ctrl+T toggle (or a per-
|
|
8
|
+
* block override from clicking the header).
|
|
9
|
+
*
|
|
10
|
+
* Placement: thinking rows always precede the ◆ Response / tool cards for
|
|
11
|
+
* the same model step (agent emits thinking-block before assistant-message
|
|
12
|
+
* and tool-call). Violet accent distinguishes reasoning from green replies.
|
|
13
|
+
*/
|
|
14
|
+
import type { ReactNode } from "react";
|
|
15
|
+
import type { ThinkingItem } from "../../state/transcript-types.js";
|
|
16
|
+
import type { Theme } from "../../rendering/theme.js";
|
|
17
|
+
export declare function ThinkingBlock(props: {
|
|
18
|
+
item: ThinkingItem;
|
|
19
|
+
theme: Theme;
|
|
20
|
+
expanded: boolean;
|
|
21
|
+
onToggle: () => void;
|
|
22
|
+
}): ReactNode;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { TextAttributes } from "@opentui/core";
|
|
3
|
+
export function ThinkingBlock(props) {
|
|
4
|
+
const { item, theme, expanded, onToggle } = props;
|
|
5
|
+
// Always show live content while streaming; after finalize, honor toggle.
|
|
6
|
+
const showBody = item.streaming || expanded;
|
|
7
|
+
const onMouseUp = (event) => {
|
|
8
|
+
event.preventDefault();
|
|
9
|
+
// Only allow collapse/expand once the block is complete.
|
|
10
|
+
if (item.streaming)
|
|
11
|
+
return;
|
|
12
|
+
onToggle();
|
|
13
|
+
};
|
|
14
|
+
const header = item.streaming
|
|
15
|
+
? "✦ thinking…"
|
|
16
|
+
: showBody
|
|
17
|
+
? "▾ thinking"
|
|
18
|
+
: "▸ thinking · ctrl+t or click to view";
|
|
19
|
+
return (_jsxs("box", { id: item.id, style: { flexDirection: "column", marginBottom: 1, width: "100%" }, children: [_jsx("box", { onMouseUp: onMouseUp, style: { flexDirection: "row" }, children: _jsx("text", { selectable: true, style: {
|
|
20
|
+
fg: theme.thinking,
|
|
21
|
+
attributes: TextAttributes.ITALIC,
|
|
22
|
+
}, children: header }) }), showBody && item.content ? (_jsx("box", { style: { flexDirection: "column", paddingLeft: 2 }, children: _jsx("text", { selectable: true, style: {
|
|
23
|
+
fg: theme.thinking,
|
|
24
|
+
attributes: TextAttributes.ITALIC,
|
|
25
|
+
}, children: item.content }) })) : null] }));
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=thinking-block.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
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,CAAC,QAAQ;wBAClB,UAAU,EAAE,cAAc,CAAC,MAAM;qBAClC,YAEA,IAAI,CAAC,OAAO,GACR,GACH,CACP,CAAC,CAAC,CAAC,IAAI,IACJ,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/** @jsxImportSource @opentui/react */
|
|
2
|
+
/**
|
|
3
|
+
* Tool card: flat single-border pane (classic parity — no 3D depth / outer plate).
|
|
4
|
+
*
|
|
5
|
+
* Click (body or footer) opens the full-output pager modal — unless the card is
|
|
6
|
+
* already expanded in place via Ctrl+O. Ctrl+O expands every card to show the
|
|
7
|
+
* full cleaned body; click does not toggle expand (classic: keyboard expands,
|
|
8
|
+
* click opens the unbounded viewer).
|
|
9
|
+
*
|
|
10
|
+
* tool.batch: parent card nests one mini-card per sub-tool. Click the parent
|
|
11
|
+
* (header/footer) for the full batch; click a sub-card for that call only.
|
|
12
|
+
* Ctrl+O expands sub-bodies in place the same as a normal tool.
|
|
13
|
+
*/
|
|
14
|
+
import type { ReactNode } from "react";
|
|
15
|
+
import type { OutputSpool } from "../../../app/events/event-buffer.js";
|
|
16
|
+
import type { AppServices } from "../../bootstrap/composition-root.js";
|
|
17
|
+
import type { ToolItem } from "../../state/transcript-types.js";
|
|
18
|
+
import type { Theme } from "../../rendering/theme.js";
|
|
19
|
+
export declare function ToolCard(props: {
|
|
20
|
+
item: ToolItem;
|
|
21
|
+
theme: Theme;
|
|
22
|
+
spool: OutputSpool;
|
|
23
|
+
expanded: boolean;
|
|
24
|
+
services: AppServices;
|
|
25
|
+
onToggle: () => void;
|
|
26
|
+
}): ReactNode;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@opentui/react/jsx-runtime";
|
|
2
|
+
import { TextAttributes } from "@opentui/core";
|
|
3
|
+
import { batchSummaryLine, formatBatchSectionForPager, isBatchToolName, parseBatchSections, presentBatchSection, } from "../../rendering/batch-sections.js";
|
|
4
|
+
import { presentOutput, presentTool } from "../../rendering/tool-presenter.js";
|
|
5
|
+
import { openToolOutputPager } from "../../rendering/open-tool-output.js";
|
|
6
|
+
import { LinkableText } from "./linkable-text.js";
|
|
7
|
+
import { useClickWithoutDrag } from "./use-click-without-drag.js";
|
|
8
|
+
const STATUS_COLOR = {
|
|
9
|
+
running: "activity",
|
|
10
|
+
ok: "response",
|
|
11
|
+
failed: "mode",
|
|
12
|
+
blocked: "mode",
|
|
13
|
+
};
|
|
14
|
+
function OutputLines(props) {
|
|
15
|
+
const { lines, theme, gutterFg } = props;
|
|
16
|
+
// Tool/output body: CLAI wordmark magenta (same as task-pane border / logo "I").
|
|
17
|
+
const bodyFg = theme.magenta;
|
|
18
|
+
return (_jsx(_Fragment, { children: lines.map((line, i) => {
|
|
19
|
+
const isGap = line.startsWith("···");
|
|
20
|
+
return (_jsxs("text", { selectable: true, children: [_jsx("span", { style: { fg: isGap ? theme.muted : gutterFg }, children: "│ " }), _jsx("span", { style: {
|
|
21
|
+
fg: isGap ? theme.muted : bodyFg,
|
|
22
|
+
attributes: isGap ? TextAttributes.DIM : TextAttributes.NONE,
|
|
23
|
+
}, children: line })] }, i));
|
|
24
|
+
}) }));
|
|
25
|
+
}
|
|
26
|
+
function BatchSubCard(props) {
|
|
27
|
+
const { section, theme, expanded, parentExpanded, onOpen } = props;
|
|
28
|
+
const presented = presentBatchSection(section, expanded);
|
|
29
|
+
const borderFg = section.ok ? theme.response : theme.mode;
|
|
30
|
+
const statusFg = borderFg;
|
|
31
|
+
// Click (no drag) opens pager; drag-select copies output lines.
|
|
32
|
+
const click = useClickWithoutDrag(() => {
|
|
33
|
+
if (parentExpanded)
|
|
34
|
+
return;
|
|
35
|
+
onOpen(section);
|
|
36
|
+
});
|
|
37
|
+
let footerHint;
|
|
38
|
+
if (presented.hasBody) {
|
|
39
|
+
if (expanded) {
|
|
40
|
+
footerHint = "expanded · Ctrl+O to collapse";
|
|
41
|
+
}
|
|
42
|
+
else if (presented.hiddenAboveCount > 0) {
|
|
43
|
+
footerHint = `+${presented.hiddenAboveCount} more · click for full · Ctrl+O to expand`;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
footerHint = "click for full · Ctrl+O to expand";
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
return (_jsxs("box", { border: true, borderStyle: "rounded", style: {
|
|
50
|
+
flexDirection: "column",
|
|
51
|
+
width: "100%",
|
|
52
|
+
marginTop: 1,
|
|
53
|
+
marginBottom: 0,
|
|
54
|
+
borderColor: borderFg,
|
|
55
|
+
// Match parent face — no second elevated plate.
|
|
56
|
+
backgroundColor: theme.statusBackground,
|
|
57
|
+
paddingLeft: 1,
|
|
58
|
+
paddingRight: 1,
|
|
59
|
+
paddingTop: 0,
|
|
60
|
+
paddingBottom: 0,
|
|
61
|
+
}, onMouseDown: click.onMouseDown, onMouseUp: click.onMouseUp, children: [_jsxs("box", { style: { flexDirection: "row", width: "100%" }, children: [_jsxs("text", { selectable: true, style: { fg: statusFg, attributes: TextAttributes.BOLD }, children: [presented.glyph, " ", presented.name] }), _jsx("text", { content: " ", selectable: true }), _jsx("text", { selectable: true, style: { fg: statusFg, bg: theme.chip, attributes: TextAttributes.BOLD }, children: ` ${presented.statusLabel} ` }), _jsx("text", { content: " ", selectable: true }), _jsxs("text", { selectable: true, style: { fg: theme.muted, attributes: TextAttributes.DIM }, children: ["#", section.index] })] }), presented.lines.length > 0 ? (_jsx("box", { style: {
|
|
62
|
+
flexDirection: "column",
|
|
63
|
+
width: "100%",
|
|
64
|
+
marginTop: 0,
|
|
65
|
+
flexShrink: 1,
|
|
66
|
+
}, children: _jsx(OutputLines, { lines: presented.lines, theme: theme, gutterFg: borderFg }) })) : null, footerHint ? (_jsxs("box", { style: { flexDirection: "row", width: "100%", marginTop: 0 }, children: [_jsx("text", { selectable: false, style: { fg: theme.cyan }, children: "› " }), _jsx("text", { selectable: false, style: { fg: theme.cyan, attributes: TextAttributes.DIM }, children: footerHint })] })) : null] }));
|
|
67
|
+
}
|
|
68
|
+
export function ToolCard(props) {
|
|
69
|
+
const { item, theme, spool, expanded, services } = props;
|
|
70
|
+
const { glyph, statusLabel, name, argsLabel, argsDisplay, detail } = presentTool(item);
|
|
71
|
+
const tail = spool.tail(item.toolCallId);
|
|
72
|
+
const spoolState = spool.state(item.toolCallId);
|
|
73
|
+
const batchSections = isBatchToolName(item.name) && item.status !== "running" && tail
|
|
74
|
+
? parseBatchSections(tail)
|
|
75
|
+
: [];
|
|
76
|
+
const isBatch = batchSections.length > 0;
|
|
77
|
+
const { lines, hiddenAboveCount, truncatedNotice } = isBatch
|
|
78
|
+
? { lines: [], hiddenAboveCount: 0, truncatedNotice: undefined }
|
|
79
|
+
: presentOutput(tail, spoolState, expanded);
|
|
80
|
+
const statusFg = theme[STATUS_COLOR[item.status]];
|
|
81
|
+
const highlight = item.status === "running"
|
|
82
|
+
? theme.activity
|
|
83
|
+
: item.status === "ok"
|
|
84
|
+
? theme.toolBorder
|
|
85
|
+
: theme.mode;
|
|
86
|
+
const hasBody = isBatch ||
|
|
87
|
+
lines.length > 0 ||
|
|
88
|
+
item.outputBytes > 0 ||
|
|
89
|
+
Boolean(item.artifactPath);
|
|
90
|
+
/** Open unbounded pager for the whole tool (or full batch). */
|
|
91
|
+
const openFull = () => {
|
|
92
|
+
if (expanded)
|
|
93
|
+
return;
|
|
94
|
+
if (item.status === "running" && !hasBody)
|
|
95
|
+
return;
|
|
96
|
+
void openToolOutputPager(services, item);
|
|
97
|
+
};
|
|
98
|
+
// Click without drag opens pager; drag-select includes output text.
|
|
99
|
+
const openFullClick = useClickWithoutDrag(openFull);
|
|
100
|
+
const openSection = (section) => {
|
|
101
|
+
void openToolOutputPager(services, {
|
|
102
|
+
toolCallId: item.toolCallId,
|
|
103
|
+
name: section.name,
|
|
104
|
+
argsDisplay: `#${section.index}`,
|
|
105
|
+
artifactPath: undefined,
|
|
106
|
+
}, {
|
|
107
|
+
bodyOverride: formatBatchSectionForPager(section),
|
|
108
|
+
titleOverride: `${section.name} · #${section.index}`,
|
|
109
|
+
skipArtifact: true,
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
// Footer: keyboard expand always advertised; click-for-modal only when collapsed.
|
|
113
|
+
let footerHint;
|
|
114
|
+
if (item.status !== "running" && hasBody) {
|
|
115
|
+
if (expanded) {
|
|
116
|
+
footerHint = isBatch
|
|
117
|
+
? "expanded · Ctrl+O to collapse · click a sub-tool for its full output"
|
|
118
|
+
: "expanded · Ctrl+O to collapse";
|
|
119
|
+
}
|
|
120
|
+
else if (isBatch) {
|
|
121
|
+
footerHint = "click batch for full · click a sub-tool · Ctrl+O to expand";
|
|
122
|
+
}
|
|
123
|
+
else if (hiddenAboveCount > 0) {
|
|
124
|
+
footerHint = `+${hiddenAboveCount} more · click for full · Ctrl+O to expand`;
|
|
125
|
+
}
|
|
126
|
+
else {
|
|
127
|
+
footerHint = "click for full · Ctrl+O to expand";
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else if (item.status === "running" && hasBody && !expanded) {
|
|
131
|
+
footerHint = "click for full · Ctrl+O to expand";
|
|
132
|
+
}
|
|
133
|
+
const summary = isBatch ? batchSummaryLine(batchSections) : undefined;
|
|
134
|
+
const summaryFg = isBatch && batchSections.some((s) => !s.ok) ? theme.mode : theme.muted;
|
|
135
|
+
return (_jsxs("box", { id: item.id, border: true, borderStyle: "rounded", style: {
|
|
136
|
+
flexDirection: "column",
|
|
137
|
+
width: "100%",
|
|
138
|
+
marginBottom: 1,
|
|
139
|
+
borderColor: highlight,
|
|
140
|
+
// Flat face only — no layered header/well plate outside the border.
|
|
141
|
+
backgroundColor: theme.statusBackground,
|
|
142
|
+
paddingLeft: 1,
|
|
143
|
+
paddingRight: 1,
|
|
144
|
+
paddingTop: 0,
|
|
145
|
+
paddingBottom: 0,
|
|
146
|
+
}, children: [_jsxs("box", { style: {
|
|
147
|
+
flexDirection: "row",
|
|
148
|
+
width: "100%",
|
|
149
|
+
paddingTop: 0,
|
|
150
|
+
paddingBottom: 0,
|
|
151
|
+
}, onMouseDown: openFullClick.onMouseDown, onMouseUp: openFullClick.onMouseUp, children: [_jsxs("text", { selectable: true, style: { fg: statusFg, attributes: TextAttributes.BOLD }, children: [glyph, " ", name] }), _jsx("text", { content: " ", selectable: true }), _jsx("text", { selectable: true, style: { fg: statusFg, bg: theme.chip, attributes: TextAttributes.BOLD }, children: ` ${statusLabel} ` }), isBatch ? (_jsxs(_Fragment, { children: [_jsx("text", { content: " ", selectable: true }), _jsx("text", { selectable: true, style: { fg: theme.muted, attributes: TextAttributes.DIM }, children: "batch" })] })) : null] }), argsDisplay && argsLabel ? (_jsxs("box", { style: { flexDirection: "row", width: "100%", marginTop: 0 }, children: [_jsxs("text", { selectable: true, style: { fg: theme.muted }, children: [argsLabel, ": "] }), _jsx("text", { selectable: true, style: { fg: theme.cyan }, children: argsDisplay })] })) : null, detail ? _jsx(LinkableText, { text: detail, theme: theme, fg: theme.mode, selectable: true }) : null, summary ? (_jsx("text", { selectable: true, style: { fg: summaryFg, attributes: TextAttributes.DIM }, children: summary })) : null, isBatch
|
|
152
|
+
? batchSections.map((section) => (_jsx(BatchSubCard, { section: section, theme: theme, expanded: expanded, parentExpanded: expanded, onOpen: openSection }, `${item.id}-sub-${section.index}`)))
|
|
153
|
+
: null, !isBatch && lines.length > 0 ? (_jsxs("box", { style: {
|
|
154
|
+
flexDirection: "column",
|
|
155
|
+
width: "100%",
|
|
156
|
+
paddingLeft: 0,
|
|
157
|
+
paddingRight: 0,
|
|
158
|
+
paddingTop: 0,
|
|
159
|
+
paddingBottom: 0,
|
|
160
|
+
marginTop: 0,
|
|
161
|
+
flexShrink: 1,
|
|
162
|
+
}, onMouseDown: openFullClick.onMouseDown, onMouseUp: openFullClick.onMouseUp, children: [_jsx("text", { selectable: true, style: { fg: theme.white, bg: theme.chipTeal, attributes: TextAttributes.BOLD }, children: " OUTPUT " }), _jsx(OutputLines, { lines: lines, theme: theme, gutterFg: theme.muted })] })) : null, item.artifactPath ? (_jsxs("box", { style: { flexDirection: "row", width: "100%", marginTop: 0 }, children: [_jsx("text", { selectable: true, style: { fg: theme.white, bg: theme.chipTeal, attributes: TextAttributes.BOLD }, children: " SAVED " }), _jsx("text", { content: " ", selectable: true }), _jsx(LinkableText, { text: item.artifactPath, theme: theme, fg: theme.cyan, selectable: true })] })) : null, truncatedNotice ? (_jsx("text", { selectable: true, style: { fg: theme.muted, attributes: TextAttributes.ITALIC }, children: truncatedNotice })) : null, footerHint ? (_jsxs("box", { style: {
|
|
163
|
+
flexDirection: "row",
|
|
164
|
+
width: "100%",
|
|
165
|
+
marginTop: 0,
|
|
166
|
+
marginBottom: 0,
|
|
167
|
+
paddingBottom: 0,
|
|
168
|
+
}, ...(expanded
|
|
169
|
+
? {}
|
|
170
|
+
: {
|
|
171
|
+
onMouseDown: openFullClick.onMouseDown,
|
|
172
|
+
onMouseUp: openFullClick.onMouseUp,
|
|
173
|
+
}), children: [_jsx("text", { selectable: false, style: { fg: theme.cyan }, children: "› " }), _jsx("text", { selectable: false, style: { fg: theme.cyan, attributes: TextAttributes.DIM }, children: footerHint })] })) : null] }));
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=tool-card.js.map
|