@prestyj/cli 4.3.210 → 4.3.237
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 +17 -9
- package/dist/cli/auth.d.ts +4 -0
- package/dist/cli/auth.d.ts.map +1 -0
- package/dist/cli/auth.js +344 -0
- package/dist/cli/auth.js.map +1 -0
- package/dist/cli/command-routing.d.ts +28 -0
- package/dist/cli/command-routing.d.ts.map +1 -0
- package/dist/cli/command-routing.js +53 -0
- package/dist/cli/command-routing.js.map +1 -0
- package/dist/cli/command-routing.test.d.ts +2 -0
- package/dist/cli/command-routing.test.d.ts.map +1 -0
- package/dist/cli/command-routing.test.js +60 -0
- package/dist/cli/command-routing.test.js.map +1 -0
- package/dist/cli/mcp.d.ts +2 -0
- package/dist/cli/mcp.d.ts.map +1 -0
- package/dist/cli/mcp.js +309 -0
- package/dist/cli/mcp.js.map +1 -0
- package/dist/cli/pixel.d.ts +27 -0
- package/dist/cli/pixel.d.ts.map +1 -0
- package/dist/cli/pixel.js +103 -0
- package/dist/cli/pixel.js.map +1 -0
- package/dist/cli/shared.d.ts +13 -0
- package/dist/cli/shared.d.ts.map +1 -0
- package/dist/cli/shared.js +82 -0
- package/dist/cli/shared.js.map +1 -0
- package/dist/cli.d.ts +4 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +174 -732
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +4 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +14 -1
- package/dist/config.js.map +1 -1
- package/dist/config.test.d.ts +2 -0
- package/dist/config.test.d.ts.map +1 -0
- package/dist/config.test.js +29 -0
- package/dist/config.test.js.map +1 -0
- package/dist/core/agent-session-compaction.test.d.ts +2 -0
- package/dist/core/agent-session-compaction.test.d.ts.map +1 -0
- package/dist/core/agent-session-compaction.test.js +114 -0
- package/dist/core/agent-session-compaction.test.js.map +1 -0
- package/dist/core/agent-session.d.ts +0 -23
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +6 -101
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/checkpoint-store.d.ts +93 -0
- package/dist/core/checkpoint-store.d.ts.map +1 -0
- package/dist/core/checkpoint-store.js +188 -0
- package/dist/core/checkpoint-store.js.map +1 -0
- package/dist/core/checkpoint-store.test.d.ts +2 -0
- package/dist/core/checkpoint-store.test.d.ts.map +1 -0
- package/dist/core/checkpoint-store.test.js +111 -0
- package/dist/core/checkpoint-store.test.js.map +1 -0
- package/dist/core/compaction/compactor.d.ts +4 -0
- package/dist/core/compaction/compactor.d.ts.map +1 -1
- package/dist/core/compaction/compactor.js +81 -28
- package/dist/core/compaction/compactor.js.map +1 -1
- package/dist/core/compaction/compactor.test.js +33 -9
- package/dist/core/compaction/compactor.test.js.map +1 -1
- package/dist/core/compaction/token-estimator.test.js +1 -1
- package/dist/core/continue-replay-inventory.test.d.ts +2 -0
- package/dist/core/continue-replay-inventory.test.d.ts.map +1 -0
- package/dist/core/continue-replay-inventory.test.js +42 -0
- package/dist/core/continue-replay-inventory.test.js.map +1 -0
- package/dist/core/goal-controller.d.ts +4 -0
- package/dist/core/goal-controller.d.ts.map +1 -1
- package/dist/core/goal-controller.js +223 -32
- package/dist/core/goal-controller.js.map +1 -1
- package/dist/core/goal-controller.test.js +387 -22
- package/dist/core/goal-controller.test.js.map +1 -1
- package/dist/core/goal-lifecycle-smoke.test.js +49 -8
- package/dist/core/goal-lifecycle-smoke.test.js.map +1 -1
- package/dist/core/goal-prerequisites.d.ts +23 -0
- package/dist/core/goal-prerequisites.d.ts.map +1 -0
- package/dist/core/goal-prerequisites.js +114 -0
- package/dist/core/goal-prerequisites.js.map +1 -0
- package/dist/core/goal-prerequisites.test.d.ts +2 -0
- package/dist/core/goal-prerequisites.test.d.ts.map +1 -0
- package/dist/core/goal-prerequisites.test.js +118 -0
- package/dist/core/goal-prerequisites.test.js.map +1 -0
- package/dist/core/goal-store.d.ts +12 -1
- package/dist/core/goal-store.d.ts.map +1 -1
- package/dist/core/goal-store.js +146 -40
- package/dist/core/goal-store.js.map +1 -1
- package/dist/core/goal-store.test.js +65 -8
- package/dist/core/goal-store.test.js.map +1 -1
- package/dist/core/goal-verifier.d.ts.map +1 -1
- package/dist/core/goal-verifier.js +4 -1
- package/dist/core/goal-verifier.js.map +1 -1
- package/dist/core/goal-verifier.test.js +43 -0
- package/dist/core/goal-verifier.test.js.map +1 -1
- package/dist/core/goal-worker.d.ts +2 -0
- package/dist/core/goal-worker.d.ts.map +1 -1
- package/dist/core/goal-worker.js +31 -7
- package/dist/core/goal-worker.js.map +1 -1
- package/dist/core/goal-worker.test.js +44 -0
- package/dist/core/goal-worker.test.js.map +1 -1
- package/dist/core/ideal-review.d.ts +20 -0
- package/dist/core/ideal-review.d.ts.map +1 -0
- package/dist/core/ideal-review.js +55 -0
- package/dist/core/ideal-review.js.map +1 -0
- package/dist/core/ideal-review.test.d.ts +2 -0
- package/dist/core/ideal-review.test.d.ts.map +1 -0
- package/dist/core/ideal-review.test.js +59 -0
- package/dist/core/ideal-review.test.js.map +1 -0
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/loop-breaker.d.ts +46 -0
- package/dist/core/loop-breaker.d.ts.map +1 -0
- package/dist/core/loop-breaker.js +79 -0
- package/dist/core/loop-breaker.js.map +1 -0
- package/dist/core/loop-breaker.test.d.ts +2 -0
- package/dist/core/loop-breaker.test.d.ts.map +1 -0
- package/dist/core/loop-breaker.test.js +110 -0
- package/dist/core/loop-breaker.test.js.map +1 -0
- package/dist/core/mcp/client.d.ts +20 -0
- package/dist/core/mcp/client.d.ts.map +1 -1
- package/dist/core/mcp/client.js +55 -11
- package/dist/core/mcp/client.js.map +1 -1
- package/dist/core/mcp/defaults.d.ts +7 -0
- package/dist/core/mcp/defaults.d.ts.map +1 -1
- package/dist/core/mcp/defaults.js +14 -0
- package/dist/core/mcp/defaults.js.map +1 -1
- package/dist/core/mcp/index.d.ts +6 -1
- package/dist/core/mcp/index.d.ts.map +1 -1
- package/dist/core/mcp/index.js +3 -1
- package/dist/core/mcp/index.js.map +1 -1
- package/dist/core/mcp/parse-add-command.d.ts +25 -0
- package/dist/core/mcp/parse-add-command.d.ts.map +1 -0
- package/dist/core/mcp/parse-add-command.js +220 -0
- package/dist/core/mcp/parse-add-command.js.map +1 -0
- package/dist/core/mcp/parse-add-command.test.d.ts +2 -0
- package/dist/core/mcp/parse-add-command.test.d.ts.map +1 -0
- package/dist/core/mcp/parse-add-command.test.js +75 -0
- package/dist/core/mcp/parse-add-command.test.js.map +1 -0
- package/dist/core/mcp/store.d.ts +80 -0
- package/dist/core/mcp/store.d.ts.map +1 -0
- package/dist/core/mcp/store.js +157 -0
- package/dist/core/mcp/store.js.map +1 -0
- package/dist/core/mcp/store.test.d.ts +2 -0
- package/dist/core/mcp/store.test.d.ts.map +1 -0
- package/dist/core/mcp/store.test.js +101 -0
- package/dist/core/mcp/store.test.js.map +1 -0
- package/dist/core/model-registry.d.ts +2 -2
- package/dist/core/model-registry.js +4 -4
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-registry.test.js +1 -1
- package/dist/core/model-registry.test.js.map +1 -1
- package/dist/core/prompt-commands.d.ts.map +1 -1
- package/dist/core/prompt-commands.js +64 -894
- package/dist/core/prompt-commands.js.map +1 -1
- package/dist/core/prompt-commands.test.js +49 -41
- package/dist/core/prompt-commands.test.js.map +1 -1
- package/dist/core/regrounding.d.ts +23 -0
- package/dist/core/regrounding.d.ts.map +1 -0
- package/dist/core/regrounding.js +21 -0
- package/dist/core/regrounding.js.map +1 -0
- package/dist/core/regrounding.test.d.ts +2 -0
- package/dist/core/regrounding.test.d.ts.map +1 -0
- package/dist/core/regrounding.test.js +38 -0
- package/dist/core/regrounding.test.js.map +1 -0
- package/dist/core/runtime-mode.d.ts +23 -0
- package/dist/core/runtime-mode.d.ts.map +1 -0
- package/dist/core/runtime-mode.js +30 -0
- package/dist/core/runtime-mode.js.map +1 -0
- package/dist/core/session-manager.d.ts +4 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +20 -0
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-restore-display.test.d.ts +2 -0
- package/dist/core/session-restore-display.test.d.ts.map +1 -0
- package/dist/core/session-restore-display.test.js +78 -0
- package/dist/core/session-restore-display.test.js.map +1 -0
- package/dist/core/settings-manager.d.ts +4 -2
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +3 -6
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts +0 -2
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +10 -15
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/style-packs/index.js +1 -1
- package/dist/core/style-packs/index.js.map +1 -1
- package/dist/core/task-store.d.ts +26 -0
- package/dist/core/task-store.d.ts.map +1 -0
- package/dist/core/task-store.js +147 -0
- package/dist/core/task-store.js.map +1 -0
- package/dist/core/tasks-store.d.ts +24 -0
- package/dist/core/tasks-store.d.ts.map +1 -0
- package/dist/core/tasks-store.js +81 -0
- package/dist/core/tasks-store.js.map +1 -0
- package/dist/core/thinking-level.d.ts +5 -0
- package/dist/core/thinking-level.d.ts.map +1 -0
- package/dist/core/thinking-level.js +59 -0
- package/dist/core/thinking-level.js.map +1 -0
- package/dist/core/thinking-level.test.d.ts +2 -0
- package/dist/core/thinking-level.test.d.ts.map +1 -0
- package/dist/core/thinking-level.test.js +38 -0
- package/dist/core/thinking-level.test.js.map +1 -0
- package/dist/core/verify-commands.js +4 -4
- package/dist/core/verify-commands.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interactive.d.ts.map +1 -1
- package/dist/interactive.js +3 -1
- package/dist/interactive.js.map +1 -1
- package/dist/system-prompt.d.ts +5 -1
- package/dist/system-prompt.d.ts.map +1 -1
- package/dist/system-prompt.js +76 -48
- package/dist/system-prompt.js.map +1 -1
- package/dist/system-prompt.test.js +98 -46
- package/dist/system-prompt.test.js.map +1 -1
- package/dist/tools/bash.d.ts +6 -1
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +21 -3
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/checkpoint-hook.test.d.ts +2 -0
- package/dist/tools/checkpoint-hook.test.d.ts.map +1 -0
- package/dist/tools/checkpoint-hook.test.js +65 -0
- package/dist/tools/checkpoint-hook.test.js.map +1 -0
- package/dist/tools/edit-diff.d.ts +17 -4
- package/dist/tools/edit-diff.d.ts.map +1 -1
- package/dist/tools/edit-diff.js +78 -16
- package/dist/tools/edit-diff.js.map +1 -1
- package/dist/tools/edit-diff.test.js +31 -1
- package/dist/tools/edit-diff.test.js.map +1 -1
- package/dist/tools/edit-robustness.test.d.ts +2 -0
- package/dist/tools/edit-robustness.test.d.ts.map +1 -0
- package/dist/tools/edit-robustness.test.js +415 -0
- package/dist/tools/edit-robustness.test.js.map +1 -0
- package/dist/tools/edit.d.ts +8 -2
- package/dist/tools/edit.d.ts.map +1 -1
- package/dist/tools/edit.js +48 -20
- package/dist/tools/edit.js.map +1 -1
- package/dist/tools/edit.test.js +23 -22
- package/dist/tools/edit.test.js.map +1 -1
- package/dist/tools/enter-plan.d.ts +1 -3
- package/dist/tools/enter-plan.d.ts.map +1 -1
- package/dist/tools/enter-plan.js +9 -21
- package/dist/tools/enter-plan.js.map +1 -1
- package/dist/tools/exit-plan.d.ts.map +1 -1
- package/dist/tools/exit-plan.js +8 -9
- package/dist/tools/exit-plan.js.map +1 -1
- package/dist/tools/goal-mode.test.d.ts +2 -0
- package/dist/tools/goal-mode.test.d.ts.map +1 -0
- package/dist/tools/goal-mode.test.js +121 -0
- package/dist/tools/goal-mode.test.js.map +1 -0
- package/dist/tools/goals.d.ts +14 -2
- package/dist/tools/goals.d.ts.map +1 -1
- package/dist/tools/goals.js +257 -26
- package/dist/tools/goals.js.map +1 -1
- package/dist/tools/goals.test.js +365 -1
- package/dist/tools/goals.test.js.map +1 -1
- package/dist/tools/html-extract.d.ts +58 -0
- package/dist/tools/html-extract.d.ts.map +1 -0
- package/dist/tools/html-extract.js +130 -0
- package/dist/tools/html-extract.js.map +1 -0
- package/dist/tools/html-extract.test.d.ts +2 -0
- package/dist/tools/html-extract.test.d.ts.map +1 -0
- package/dist/tools/html-extract.test.js +60 -0
- package/dist/tools/html-extract.test.js.map +1 -0
- package/dist/tools/index.d.ts +15 -12
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +12 -8
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/pdf-extract.d.ts +18 -0
- package/dist/tools/pdf-extract.d.ts.map +1 -0
- package/dist/tools/pdf-extract.js +43 -0
- package/dist/tools/pdf-extract.js.map +1 -0
- package/dist/tools/pdf-extract.test.d.ts +2 -0
- package/dist/tools/pdf-extract.test.d.ts.map +1 -0
- package/dist/tools/pdf-extract.test.js +15 -0
- package/dist/tools/pdf-extract.test.js.map +1 -0
- package/dist/tools/plan-mode.test.js +82 -243
- package/dist/tools/plan-mode.test.js.map +1 -1
- package/dist/tools/prompt-hints.d.ts.map +1 -1
- package/dist/tools/prompt-hints.js +6 -9
- package/dist/tools/prompt-hints.js.map +1 -1
- package/dist/tools/read-only-bash.d.ts +13 -0
- package/dist/tools/read-only-bash.d.ts.map +1 -0
- package/dist/tools/read-only-bash.js +155 -0
- package/dist/tools/read-only-bash.js.map +1 -0
- package/dist/tools/read-only-bash.test.d.ts +2 -0
- package/dist/tools/read-only-bash.test.d.ts.map +1 -0
- package/dist/tools/read-only-bash.test.js +47 -0
- package/dist/tools/read-only-bash.test.js.map +1 -0
- package/dist/tools/read.d.ts.map +1 -1
- package/dist/tools/read.js +14 -1
- package/dist/tools/read.js.map +1 -1
- package/dist/tools/read.test.js +4 -0
- package/dist/tools/read.test.js.map +1 -1
- package/dist/tools/screenshot.d.ts +25 -0
- package/dist/tools/screenshot.d.ts.map +1 -0
- package/dist/tools/screenshot.js +165 -0
- package/dist/tools/screenshot.js.map +1 -0
- package/dist/tools/screenshot.test.d.ts +2 -0
- package/dist/tools/screenshot.test.d.ts.map +1 -0
- package/dist/tools/screenshot.test.js +145 -0
- package/dist/tools/screenshot.test.js.map +1 -0
- package/dist/tools/subagent.d.ts +7 -2
- package/dist/tools/subagent.d.ts.map +1 -1
- package/dist/tools/subagent.js +31 -9
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/tasks.d.ts.map +1 -1
- package/dist/tools/tasks.js +22 -58
- package/dist/tools/tasks.js.map +1 -1
- package/dist/tools/web-fetch.d.ts +16 -1
- package/dist/tools/web-fetch.d.ts.map +1 -1
- package/dist/tools/web-fetch.js +357 -45
- package/dist/tools/web-fetch.js.map +1 -1
- package/dist/tools/web-fetch.test.js +263 -2
- package/dist/tools/web-fetch.test.js.map +1 -1
- package/dist/tools/web-search.d.ts +14 -0
- package/dist/tools/web-search.d.ts.map +1 -1
- package/dist/tools/web-search.js +321 -35
- package/dist/tools/web-search.js.map +1 -1
- package/dist/tools/web-search.test.js +144 -1
- package/dist/tools/web-search.test.js.map +1 -1
- package/dist/tools/write.d.ts +8 -2
- package/dist/tools/write.d.ts.map +1 -1
- package/dist/tools/write.js +36 -9
- package/dist/tools/write.js.map +1 -1
- package/dist/tools/write.test.js +0 -16
- package/dist/tools/write.test.js.map +1 -1
- package/dist/ui/App.d.ts +52 -280
- package/dist/ui/App.d.ts.map +1 -1
- package/dist/ui/App.js +1608 -2235
- package/dist/ui/App.js.map +1 -1
- package/dist/ui/activity-phrases.d.ts.map +1 -1
- package/dist/ui/activity-phrases.js +0 -2
- package/dist/ui/activity-phrases.js.map +1 -1
- package/dist/ui/app-items.d.ts +276 -0
- package/dist/ui/app-items.d.ts.map +1 -0
- package/dist/ui/app-items.js +52 -0
- package/dist/ui/app-items.js.map +1 -0
- package/dist/ui/app-items.test.d.ts +2 -0
- package/dist/ui/app-items.test.d.ts.map +1 -0
- package/dist/ui/app-items.test.js +38 -0
- package/dist/ui/app-items.test.js.map +1 -0
- package/dist/ui/app-state-persistence.test.js +45 -160
- package/dist/ui/app-state-persistence.test.js.map +1 -1
- package/dist/ui/assistant-stream-flush-parity.test.d.ts +2 -0
- package/dist/ui/assistant-stream-flush-parity.test.d.ts.map +1 -0
- package/dist/ui/assistant-stream-flush-parity.test.js +85 -0
- package/dist/ui/assistant-stream-flush-parity.test.js.map +1 -0
- package/dist/ui/chat-layout-pinning.test.d.ts +2 -0
- package/dist/ui/chat-layout-pinning.test.d.ts.map +1 -0
- package/dist/ui/chat-layout-pinning.test.js +525 -0
- package/dist/ui/chat-layout-pinning.test.js.map +1 -0
- package/dist/ui/components/ActivityIndicator.d.ts +1 -2
- package/dist/ui/components/ActivityIndicator.d.ts.map +1 -1
- package/dist/ui/components/ActivityIndicator.js +63 -94
- package/dist/ui/components/ActivityIndicator.js.map +1 -1
- package/dist/ui/components/AnimationContext.d.ts.map +1 -1
- package/dist/ui/components/AnimationContext.js +3 -5
- package/dist/ui/components/AnimationContext.js.map +1 -1
- package/dist/ui/components/AssistantMessage.d.ts +6 -2
- package/dist/ui/components/AssistantMessage.d.ts.map +1 -1
- package/dist/ui/components/AssistantMessage.js +9 -4
- package/dist/ui/components/AssistantMessage.js.map +1 -1
- package/dist/ui/components/AssistantMessage.test.d.ts +2 -0
- package/dist/ui/components/AssistantMessage.test.d.ts.map +1 -0
- package/dist/ui/components/AssistantMessage.test.js +387 -0
- package/dist/ui/components/AssistantMessage.test.js.map +1 -0
- package/dist/ui/components/BackgroundTasksBar.d.ts +1 -3
- package/dist/ui/components/BackgroundTasksBar.d.ts.map +1 -1
- package/dist/ui/components/BackgroundTasksBar.js +8 -10
- package/dist/ui/components/BackgroundTasksBar.js.map +1 -1
- package/dist/ui/components/Banner.d.ts +1 -2
- package/dist/ui/components/Banner.d.ts.map +1 -1
- package/dist/ui/components/Banner.js +9 -4
- package/dist/ui/components/Banner.js.map +1 -1
- package/dist/ui/components/ChatFooterPane.d.ts +25 -0
- package/dist/ui/components/ChatFooterPane.d.ts.map +1 -0
- package/dist/ui/components/ChatFooterPane.js +15 -0
- package/dist/ui/components/ChatFooterPane.js.map +1 -0
- package/dist/ui/components/ChatInputStack.d.ts +36 -0
- package/dist/ui/components/ChatInputStack.d.ts.map +1 -0
- package/dist/ui/components/ChatInputStack.js +10 -0
- package/dist/ui/components/ChatInputStack.js.map +1 -0
- package/dist/ui/components/ChatLayout.d.ts +37 -0
- package/dist/ui/components/ChatLayout.d.ts.map +1 -0
- package/dist/ui/components/ChatLayout.js +21 -0
- package/dist/ui/components/ChatLayout.js.map +1 -0
- package/dist/ui/components/ChatLivePane.d.ts +18 -0
- package/dist/ui/components/ChatLivePane.d.ts.map +1 -0
- package/dist/ui/components/ChatLivePane.js +22 -0
- package/dist/ui/components/ChatLivePane.js.map +1 -0
- package/dist/ui/components/ChatScreen.d.ts +136 -0
- package/dist/ui/components/ChatScreen.d.ts.map +1 -0
- package/dist/ui/components/ChatScreen.js +16 -0
- package/dist/ui/components/ChatScreen.js.map +1 -0
- package/dist/ui/components/ChatStatusRow.d.ts +34 -0
- package/dist/ui/components/ChatStatusRow.d.ts.map +1 -0
- package/dist/ui/components/ChatStatusRow.js +11 -0
- package/dist/ui/components/ChatStatusRow.js.map +1 -0
- package/dist/ui/components/CompactionNotice.d.ts +4 -2
- package/dist/ui/components/CompactionNotice.d.ts.map +1 -1
- package/dist/ui/components/CompactionNotice.js +4 -4
- package/dist/ui/components/CompactionNotice.js.map +1 -1
- package/dist/ui/components/Footer.d.ts +27 -6
- package/dist/ui/components/Footer.d.ts.map +1 -1
- package/dist/ui/components/Footer.js +75 -30
- package/dist/ui/components/Footer.js.map +1 -1
- package/dist/ui/components/FooterStatusRow.d.ts +20 -0
- package/dist/ui/components/FooterStatusRow.d.ts.map +1 -0
- package/dist/ui/components/FooterStatusRow.js +10 -0
- package/dist/ui/components/FooterStatusRow.js.map +1 -0
- package/dist/ui/components/FullScreenOverlayRouter.d.ts +19 -0
- package/dist/ui/components/FullScreenOverlayRouter.d.ts.map +1 -0
- package/dist/ui/components/FullScreenOverlayRouter.js +18 -0
- package/dist/ui/components/FullScreenOverlayRouter.js.map +1 -0
- package/dist/ui/components/GoalOverlay.d.ts +28 -20
- package/dist/ui/components/GoalOverlay.d.ts.map +1 -1
- package/dist/ui/components/GoalOverlay.js +283 -253
- package/dist/ui/components/GoalOverlay.js.map +1 -1
- package/dist/ui/components/GoalStatusBar.d.ts.map +1 -1
- package/dist/ui/components/GoalStatusBar.js +2 -1
- package/dist/ui/components/GoalStatusBar.js.map +1 -1
- package/dist/ui/components/IdealHookMessage.d.ts +14 -0
- package/dist/ui/components/IdealHookMessage.d.ts.map +1 -0
- package/dist/ui/components/IdealHookMessage.js +26 -0
- package/dist/ui/components/IdealHookMessage.js.map +1 -0
- package/dist/ui/components/InputArea.d.ts +31 -6
- package/dist/ui/components/InputArea.d.ts.map +1 -1
- package/dist/ui/components/InputArea.js +208 -50
- package/dist/ui/components/InputArea.js.map +1 -1
- package/dist/ui/components/InputArea.test.js +11 -1
- package/dist/ui/components/InputArea.test.js.map +1 -1
- package/dist/ui/components/LiveToolPanel.d.ts +30 -0
- package/dist/ui/components/LiveToolPanel.d.ts.map +1 -0
- package/dist/ui/components/LiveToolPanel.js +66 -0
- package/dist/ui/components/LiveToolPanel.js.map +1 -0
- package/dist/ui/components/Markdown.d.ts +11 -11
- package/dist/ui/components/Markdown.d.ts.map +1 -1
- package/dist/ui/components/Markdown.js +28 -198
- package/dist/ui/components/Markdown.js.map +1 -1
- package/dist/ui/components/ModelSelector.d.ts.map +1 -1
- package/dist/ui/components/ModelSelector.js +18 -18
- package/dist/ui/components/ModelSelector.js.map +1 -1
- package/dist/ui/components/PlanModeLogo.d.ts +3 -0
- package/dist/ui/components/PlanModeLogo.d.ts.map +1 -0
- package/dist/ui/components/PlanModeLogo.js +49 -0
- package/dist/ui/components/PlanModeLogo.js.map +1 -0
- package/dist/ui/components/PlanOverlay.d.ts +7 -0
- package/dist/ui/components/PlanOverlay.d.ts.map +1 -1
- package/dist/ui/components/PlanOverlay.js +17 -3
- package/dist/ui/components/PlanOverlay.js.map +1 -1
- package/dist/ui/components/PlanOverlay.test.d.ts +2 -0
- package/dist/ui/components/PlanOverlay.test.d.ts.map +1 -0
- package/dist/ui/components/PlanOverlay.test.js +24 -0
- package/dist/ui/components/PlanOverlay.test.js.map +1 -0
- package/dist/ui/components/QueueIndicator.d.ts +9 -0
- package/dist/ui/components/QueueIndicator.d.ts.map +1 -0
- package/dist/ui/components/QueueIndicator.js +9 -0
- package/dist/ui/components/QueueIndicator.js.map +1 -0
- package/dist/ui/components/RewindOverlay.d.ts +18 -0
- package/dist/ui/components/RewindOverlay.d.ts.map +1 -0
- package/dist/ui/components/RewindOverlay.js +52 -0
- package/dist/ui/components/RewindOverlay.js.map +1 -0
- package/dist/ui/components/SelectList.d.ts.map +1 -1
- package/dist/ui/components/SelectList.js +5 -0
- package/dist/ui/components/SelectList.js.map +1 -1
- package/dist/ui/components/ServerToolExecution.d.ts +2 -0
- package/dist/ui/components/ServerToolExecution.d.ts.map +1 -1
- package/dist/ui/components/ServerToolExecution.js +7 -23
- package/dist/ui/components/ServerToolExecution.js.map +1 -1
- package/dist/ui/components/SessionSummary.d.ts +5 -0
- package/dist/ui/components/SessionSummary.d.ts.map +1 -0
- package/dist/ui/components/SessionSummary.js +32 -0
- package/dist/ui/components/SessionSummary.js.map +1 -0
- package/dist/ui/components/SlashCommandMenu.d.ts +4 -3
- package/dist/ui/components/SlashCommandMenu.d.ts.map +1 -1
- package/dist/ui/components/SlashCommandMenu.js +38 -26
- package/dist/ui/components/SlashCommandMenu.js.map +1 -1
- package/dist/ui/components/SlashStyledSelectList.d.ts +21 -0
- package/dist/ui/components/SlashStyledSelectList.d.ts.map +1 -0
- package/dist/ui/components/SlashStyledSelectList.js +71 -0
- package/dist/ui/components/SlashStyledSelectList.js.map +1 -0
- package/dist/ui/components/StreamingArea.d.ts +11 -2
- package/dist/ui/components/StreamingArea.d.ts.map +1 -1
- package/dist/ui/components/StreamingArea.js +20 -23
- package/dist/ui/components/StreamingArea.js.map +1 -1
- package/dist/ui/components/StreamingArea.test.d.ts +2 -0
- package/dist/ui/components/StreamingArea.test.d.ts.map +1 -0
- package/dist/ui/components/StreamingArea.test.js +18 -0
- package/dist/ui/components/StreamingArea.test.js.map +1 -0
- package/dist/ui/components/SubAgentPanel.d.ts +2 -1
- package/dist/ui/components/SubAgentPanel.d.ts.map +1 -1
- package/dist/ui/components/SubAgentPanel.js +4 -3
- package/dist/ui/components/SubAgentPanel.js.map +1 -1
- package/dist/ui/components/TaskOverlay.d.ts.map +1 -1
- package/dist/ui/components/TaskOverlay.js +53 -82
- package/dist/ui/components/TaskOverlay.js.map +1 -1
- package/dist/ui/components/TaskPickerMenu.d.ts +9 -0
- package/dist/ui/components/TaskPickerMenu.d.ts.map +1 -0
- package/dist/ui/components/TaskPickerMenu.js +33 -0
- package/dist/ui/components/TaskPickerMenu.js.map +1 -0
- package/dist/ui/components/ThemeSelector.js +2 -2
- package/dist/ui/components/ThemeSelector.js.map +1 -1
- package/dist/ui/components/ToolExecution.d.ts +2 -0
- package/dist/ui/components/ToolExecution.d.ts.map +1 -1
- package/dist/ui/components/ToolExecution.js +18 -52
- package/dist/ui/components/ToolExecution.js.map +1 -1
- package/dist/ui/components/ToolGroupExecution.d.ts +6 -2
- package/dist/ui/components/ToolGroupExecution.d.ts.map +1 -1
- package/dist/ui/components/ToolGroupExecution.js +15 -147
- package/dist/ui/components/ToolGroupExecution.js.map +1 -1
- package/dist/ui/components/ToolUseLoader.d.ts +3 -1
- package/dist/ui/components/ToolUseLoader.d.ts.map +1 -1
- package/dist/ui/components/ToolUseLoader.js +2 -2
- package/dist/ui/components/ToolUseLoader.js.map +1 -1
- package/dist/ui/components/TranscriptViewport.d.ts +34 -0
- package/dist/ui/components/TranscriptViewport.d.ts.map +1 -0
- package/dist/ui/components/TranscriptViewport.js +45 -0
- package/dist/ui/components/TranscriptViewport.js.map +1 -0
- package/dist/ui/components/UserMessage.d.ts.map +1 -1
- package/dist/ui/components/UserMessage.js +15 -10
- package/dist/ui/components/UserMessage.js.map +1 -1
- package/dist/ui/components/UserMessage.test.d.ts +2 -0
- package/dist/ui/components/UserMessage.test.d.ts.map +1 -0
- package/dist/ui/components/UserMessage.test.js +39 -0
- package/dist/ui/components/UserMessage.test.js.map +1 -0
- package/dist/ui/components/index.d.ts +5 -0
- package/dist/ui/components/index.d.ts.map +1 -1
- package/dist/ui/components/index.js +5 -0
- package/dist/ui/components/index.js.map +1 -1
- package/dist/ui/duration-format.d.ts +2 -0
- package/dist/ui/duration-format.d.ts.map +1 -0
- package/dist/ui/duration-format.js +9 -0
- package/dist/ui/duration-format.js.map +1 -0
- package/dist/ui/duration-summary.d.ts +2 -0
- package/dist/ui/duration-summary.d.ts.map +1 -0
- package/dist/ui/duration-summary.js +66 -0
- package/dist/ui/duration-summary.js.map +1 -0
- package/dist/ui/error-item.d.ts +8 -0
- package/dist/ui/error-item.d.ts.map +1 -0
- package/dist/ui/error-item.js +32 -0
- package/dist/ui/error-item.js.map +1 -0
- package/dist/ui/footer-jump-regression.test.d.ts +2 -0
- package/dist/ui/footer-jump-regression.test.d.ts.map +1 -0
- package/dist/ui/footer-jump-regression.test.js +177 -0
- package/dist/ui/footer-jump-regression.test.js.map +1 -0
- package/dist/ui/footer-status-layout.test.js +22 -7
- package/dist/ui/footer-status-layout.test.js.map +1 -1
- package/dist/ui/goal-events.d.ts.map +1 -1
- package/dist/ui/goal-events.js +14 -6
- package/dist/ui/goal-events.js.map +1 -1
- package/dist/ui/goal-events.test.js +40 -2
- package/dist/ui/goal-events.test.js.map +1 -1
- package/dist/ui/goal-lifecycle-orchestration.test.d.ts +2 -0
- package/dist/ui/goal-lifecycle-orchestration.test.d.ts.map +1 -0
- package/dist/ui/goal-lifecycle-orchestration.test.js +512 -0
- package/dist/ui/goal-lifecycle-orchestration.test.js.map +1 -0
- package/dist/ui/goal-overlay.test.js +122 -44
- package/dist/ui/goal-overlay.test.js.map +1 -1
- package/dist/ui/goal-status-bar.test.js +29 -0
- package/dist/ui/goal-status-bar.test.js.map +1 -1
- package/dist/ui/goal-summary.d.ts +14 -0
- package/dist/ui/goal-summary.d.ts.map +1 -0
- package/dist/ui/goal-summary.js +194 -0
- package/dist/ui/goal-summary.js.map +1 -0
- package/dist/ui/hooks/useAgentLoop.d.ts +25 -4
- package/dist/ui/hooks/useAgentLoop.d.ts.map +1 -1
- package/dist/ui/hooks/useAgentLoop.js +197 -22
- package/dist/ui/hooks/useAgentLoop.js.map +1 -1
- package/dist/ui/hooks/useAgentLoop.test.d.ts +2 -0
- package/dist/ui/hooks/useAgentLoop.test.d.ts.map +1 -0
- package/dist/ui/hooks/useAgentLoop.test.js +8 -0
- package/dist/ui/hooks/useAgentLoop.test.js.map +1 -0
- package/dist/ui/hooks/useChatLayoutMeasurements.d.ts +45 -0
- package/dist/ui/hooks/useChatLayoutMeasurements.d.ts.map +1 -0
- package/dist/ui/hooks/useChatLayoutMeasurements.js +97 -0
- package/dist/ui/hooks/useChatLayoutMeasurements.js.map +1 -0
- package/dist/ui/hooks/useContextCompaction.d.ts +41 -0
- package/dist/ui/hooks/useContextCompaction.d.ts.map +1 -0
- package/dist/ui/hooks/useContextCompaction.js +149 -0
- package/dist/ui/hooks/useContextCompaction.js.map +1 -0
- package/dist/ui/hooks/useModeState.d.ts +56 -0
- package/dist/ui/hooks/useModeState.d.ts.map +1 -0
- package/dist/ui/hooks/useModeState.js +65 -0
- package/dist/ui/hooks/useModeState.js.map +1 -0
- package/dist/ui/hooks/usePixelFixFlow.d.ts +57 -0
- package/dist/ui/hooks/usePixelFixFlow.d.ts.map +1 -0
- package/dist/ui/hooks/usePixelFixFlow.js +102 -0
- package/dist/ui/hooks/usePixelFixFlow.js.map +1 -0
- package/dist/ui/hooks/useSessionPersistence.d.ts +34 -0
- package/dist/ui/hooks/useSessionPersistence.d.ts.map +1 -0
- package/dist/ui/hooks/useSessionPersistence.js +67 -0
- package/dist/ui/hooks/useSessionPersistence.js.map +1 -0
- package/dist/ui/hooks/useTaskPickerController.d.ts +19 -0
- package/dist/ui/hooks/useTaskPickerController.d.ts.map +1 -0
- package/dist/ui/hooks/useTaskPickerController.js +41 -0
- package/dist/ui/hooks/useTaskPickerController.js.map +1 -0
- package/dist/ui/hooks/useTerminalSize.d.ts +13 -10
- package/dist/ui/hooks/useTerminalSize.d.ts.map +1 -1
- package/dist/ui/hooks/useTerminalSize.js +21 -16
- package/dist/ui/hooks/useTerminalSize.js.map +1 -1
- package/dist/ui/hooks/useTranscriptHistory.d.ts +48 -0
- package/dist/ui/hooks/useTranscriptHistory.d.ts.map +1 -0
- package/dist/ui/hooks/useTranscriptHistory.js +113 -0
- package/dist/ui/hooks/useTranscriptHistory.js.map +1 -0
- package/dist/ui/hooks/useTranscriptHistory.test.d.ts +2 -0
- package/dist/ui/hooks/useTranscriptHistory.test.d.ts.map +1 -0
- package/dist/ui/hooks/useTranscriptHistory.test.js +61 -0
- package/dist/ui/hooks/useTranscriptHistory.test.js.map +1 -0
- package/dist/ui/hooks/useTranscriptScroll.d.ts +30 -0
- package/dist/ui/hooks/useTranscriptScroll.d.ts.map +1 -0
- package/dist/ui/hooks/useTranscriptScroll.js +44 -0
- package/dist/ui/hooks/useTranscriptScroll.js.map +1 -0
- package/dist/ui/hooks/useTranscriptScroll.test.d.ts +2 -0
- package/dist/ui/hooks/useTranscriptScroll.test.d.ts.map +1 -0
- package/dist/ui/hooks/useTranscriptScroll.test.js +119 -0
- package/dist/ui/hooks/useTranscriptScroll.test.js.map +1 -0
- package/dist/ui/item-helpers.d.ts +26 -0
- package/dist/ui/item-helpers.d.ts.map +1 -0
- package/dist/ui/item-helpers.js +114 -0
- package/dist/ui/item-helpers.js.map +1 -0
- package/dist/ui/layout-decisions.d.ts +81 -0
- package/dist/ui/layout-decisions.d.ts.map +1 -0
- package/dist/ui/layout-decisions.js +89 -0
- package/dist/ui/layout-decisions.js.map +1 -0
- package/dist/ui/live-area-clamp.test.d.ts +2 -0
- package/dist/ui/live-area-clamp.test.d.ts.map +1 -0
- package/dist/ui/live-area-clamp.test.js +88 -0
- package/dist/ui/live-area-clamp.test.js.map +1 -0
- package/dist/ui/live-area-height.d.ts +35 -0
- package/dist/ui/live-area-height.d.ts.map +1 -0
- package/dist/ui/live-area-height.js +80 -0
- package/dist/ui/live-area-height.js.map +1 -0
- package/dist/ui/live-area-height.test.d.ts +2 -0
- package/dist/ui/live-area-height.test.d.ts.map +1 -0
- package/dist/ui/live-area-height.test.js +67 -0
- package/dist/ui/live-area-height.test.js.map +1 -0
- package/dist/ui/live-frame-height.test.d.ts +2 -0
- package/dist/ui/live-frame-height.test.d.ts.map +1 -0
- package/dist/ui/live-frame-height.test.js +116 -0
- package/dist/ui/live-frame-height.test.js.map +1 -0
- package/dist/ui/live-item-flush.d.ts +2 -2
- package/dist/ui/live-item-flush.d.ts.map +1 -1
- package/dist/ui/live-item-flush.js +8 -4
- package/dist/ui/live-item-flush.js.map +1 -1
- package/dist/ui/login.js +1 -1
- package/dist/ui/long-prompt-regression-harness.test.d.ts +2 -0
- package/dist/ui/long-prompt-regression-harness.test.d.ts.map +1 -0
- package/dist/ui/long-prompt-regression-harness.test.js +195 -0
- package/dist/ui/long-prompt-regression-harness.test.js.map +1 -0
- package/dist/ui/mcp.d.ts +62 -0
- package/dist/ui/mcp.d.ts.map +1 -0
- package/dist/ui/mcp.js +306 -0
- package/dist/ui/mcp.js.map +1 -0
- package/dist/ui/plan-overlay.test.js +7 -29
- package/dist/ui/plan-overlay.test.js.map +1 -1
- package/dist/ui/prompt-routing.d.ts +11 -0
- package/dist/ui/prompt-routing.d.ts.map +1 -0
- package/dist/ui/prompt-routing.js +61 -0
- package/dist/ui/prompt-routing.js.map +1 -0
- package/dist/ui/queued-message.test.d.ts +2 -0
- package/dist/ui/queued-message.test.d.ts.map +1 -0
- package/dist/ui/queued-message.test.js +162 -0
- package/dist/ui/queued-message.test.js.map +1 -0
- package/dist/ui/render.d.ts +38 -42
- package/dist/ui/render.d.ts.map +1 -1
- package/dist/ui/render.js +128 -42
- package/dist/ui/render.js.map +1 -1
- package/dist/ui/render.test.d.ts +2 -0
- package/dist/ui/render.test.d.ts.map +1 -0
- package/dist/ui/render.test.js +16 -0
- package/dist/ui/render.test.js.map +1 -0
- package/dist/ui/scroll-stabilization.test.js +1 -7
- package/dist/ui/scroll-stabilization.test.js.map +1 -1
- package/dist/ui/session-summary.d.ts +63 -0
- package/dist/ui/session-summary.d.ts.map +1 -0
- package/dist/ui/session-summary.js +81 -0
- package/dist/ui/session-summary.js.map +1 -0
- package/dist/ui/slash-command-images.test.js +12 -11
- package/dist/ui/slash-command-images.test.js.map +1 -1
- package/dist/ui/stores/transcript-scroll-store.d.ts +27 -0
- package/dist/ui/stores/transcript-scroll-store.d.ts.map +1 -0
- package/dist/ui/stores/transcript-scroll-store.js +73 -0
- package/dist/ui/stores/transcript-scroll-store.js.map +1 -0
- package/dist/ui/stores/transcript-scroll-store.test.d.ts +2 -0
- package/dist/ui/stores/transcript-scroll-store.test.d.ts.map +1 -0
- package/dist/ui/stores/transcript-scroll-store.test.js +73 -0
- package/dist/ui/stores/transcript-scroll-store.test.js.map +1 -0
- package/dist/ui/streaming-flush-bounce.test.d.ts +2 -0
- package/dist/ui/streaming-flush-bounce.test.d.ts.map +1 -0
- package/dist/ui/streaming-flush-bounce.test.js +156 -0
- package/dist/ui/streaming-flush-bounce.test.js.map +1 -0
- package/dist/ui/submit-prompt-command.d.ts +49 -0
- package/dist/ui/submit-prompt-command.d.ts.map +1 -0
- package/dist/ui/submit-prompt-command.js +107 -0
- package/dist/ui/submit-prompt-command.js.map +1 -0
- package/dist/ui/submit-slash-commands.d.ts +12 -0
- package/dist/ui/submit-slash-commands.d.ts.map +1 -0
- package/dist/ui/submit-slash-commands.js +32 -0
- package/dist/ui/submit-slash-commands.js.map +1 -0
- package/dist/ui/terminal-history-format.d.ts +43 -0
- package/dist/ui/terminal-history-format.d.ts.map +1 -0
- package/dist/ui/terminal-history-format.js +133 -0
- package/dist/ui/terminal-history-format.js.map +1 -0
- package/dist/ui/terminal-history-retry-dedup.test.d.ts +2 -0
- package/dist/ui/terminal-history-retry-dedup.test.d.ts.map +1 -0
- package/dist/ui/terminal-history-retry-dedup.test.js +61 -0
- package/dist/ui/terminal-history-retry-dedup.test.js.map +1 -0
- package/dist/ui/terminal-history-spacing.d.ts +2 -0
- package/dist/ui/terminal-history-spacing.d.ts.map +1 -0
- package/dist/ui/terminal-history-spacing.js +2 -0
- package/dist/ui/terminal-history-spacing.js.map +1 -0
- package/dist/ui/terminal-history-status-renderers.d.ts +15 -0
- package/dist/ui/terminal-history-status-renderers.d.ts.map +1 -0
- package/dist/ui/terminal-history-status-renderers.js +99 -0
- package/dist/ui/terminal-history-status-renderers.js.map +1 -0
- package/dist/ui/terminal-history.d.ts +26 -0
- package/dist/ui/terminal-history.d.ts.map +1 -0
- package/dist/ui/terminal-history.js +916 -0
- package/dist/ui/terminal-history.js.map +1 -0
- package/dist/ui/terminal-history.test.d.ts +2 -0
- package/dist/ui/terminal-history.test.d.ts.map +1 -0
- package/dist/ui/terminal-history.test.js +550 -0
- package/dist/ui/terminal-history.test.js.map +1 -0
- package/dist/ui/testing/screen-recorder.d.ts +29 -0
- package/dist/ui/testing/screen-recorder.d.ts.map +1 -0
- package/dist/ui/testing/screen-recorder.js +179 -0
- package/dist/ui/testing/screen-recorder.js.map +1 -0
- package/dist/ui/thinking-level-cycle.test.d.ts +2 -0
- package/dist/ui/thinking-level-cycle.test.d.ts.map +1 -0
- package/dist/ui/thinking-level-cycle.test.js +45 -0
- package/dist/ui/thinking-level-cycle.test.js.map +1 -0
- package/dist/ui/thinking-level.d.ts +2 -0
- package/dist/ui/thinking-level.d.ts.map +1 -0
- package/dist/ui/thinking-level.js +2 -0
- package/dist/ui/thinking-level.js.map +1 -0
- package/dist/ui/tool-group-summary.d.ts +24 -0
- package/dist/ui/tool-group-summary.d.ts.map +1 -0
- package/dist/ui/tool-group-summary.js +233 -0
- package/dist/ui/tool-group-summary.js.map +1 -0
- package/dist/ui/tool-group-summary.test.d.ts +2 -0
- package/dist/ui/tool-group-summary.test.d.ts.map +1 -0
- package/dist/ui/tool-group-summary.test.js +79 -0
- package/dist/ui/tool-group-summary.test.js.map +1 -0
- package/dist/ui/tool-line-summary.d.ts +29 -0
- package/dist/ui/tool-line-summary.d.ts.map +1 -0
- package/dist/ui/tool-line-summary.js +153 -0
- package/dist/ui/tool-line-summary.js.map +1 -0
- package/dist/ui/transcript/MiscRows.d.ts +26 -0
- package/dist/ui/transcript/MiscRows.d.ts.map +1 -0
- package/dist/ui/transcript/MiscRows.js +68 -0
- package/dist/ui/transcript/MiscRows.js.map +1 -0
- package/dist/ui/transcript/StatusRow.d.ts +14 -0
- package/dist/ui/transcript/StatusRow.d.ts.map +1 -0
- package/dist/ui/transcript/StatusRow.js +14 -0
- package/dist/ui/transcript/StatusRow.js.map +1 -0
- package/dist/ui/transcript/ToolRows.d.ts +20 -0
- package/dist/ui/transcript/ToolRows.d.ts.map +1 -0
- package/dist/ui/transcript/ToolRows.js +25 -0
- package/dist/ui/transcript/ToolRows.js.map +1 -0
- package/dist/ui/transcript/TranscriptItemFrame.d.ts +8 -0
- package/dist/ui/transcript/TranscriptItemFrame.d.ts.map +1 -0
- package/dist/ui/transcript/TranscriptItemFrame.js +9 -0
- package/dist/ui/transcript/TranscriptItemFrame.js.map +1 -0
- package/dist/ui/transcript/TranscriptRenderer.d.ts +22 -0
- package/dist/ui/transcript/TranscriptRenderer.d.ts.map +1 -0
- package/dist/ui/transcript/TranscriptRenderer.js +111 -0
- package/dist/ui/transcript/TranscriptRenderer.js.map +1 -0
- package/dist/ui/transcript/presentation.d.ts +61 -0
- package/dist/ui/transcript/presentation.d.ts.map +1 -0
- package/dist/ui/transcript/presentation.js +86 -0
- package/dist/ui/transcript/presentation.js.map +1 -0
- package/dist/ui/transcript/spacing.d.ts +56 -0
- package/dist/ui/transcript/spacing.d.ts.map +1 -0
- package/dist/ui/transcript/spacing.js +129 -0
- package/dist/ui/transcript/spacing.js.map +1 -0
- package/dist/ui/transcript/spacing.test.d.ts +2 -0
- package/dist/ui/transcript/spacing.test.d.ts.map +1 -0
- package/dist/ui/transcript/spacing.test.js +193 -0
- package/dist/ui/transcript/spacing.test.js.map +1 -0
- package/dist/ui/transcript/tool-presentation.d.ts +12 -0
- package/dist/ui/transcript/tool-presentation.d.ts.map +1 -0
- package/dist/ui/transcript/tool-presentation.js +55 -0
- package/dist/ui/transcript/tool-presentation.js.map +1 -0
- package/dist/ui/transcript/transcript-lines.d.ts +32 -0
- package/dist/ui/transcript/transcript-lines.d.ts.map +1 -0
- package/dist/ui/transcript/transcript-lines.js +86 -0
- package/dist/ui/transcript/transcript-lines.js.map +1 -0
- package/dist/ui/transcript/transcript-lines.test.d.ts +2 -0
- package/dist/ui/transcript/transcript-lines.test.d.ts.map +1 -0
- package/dist/ui/transcript/transcript-lines.test.js +76 -0
- package/dist/ui/transcript/transcript-lines.test.js.map +1 -0
- package/dist/ui/transcript-viewport-pinning.test.d.ts +2 -0
- package/dist/ui/transcript-viewport-pinning.test.d.ts.map +1 -0
- package/dist/ui/transcript-viewport-pinning.test.js +148 -0
- package/dist/ui/transcript-viewport-pinning.test.js.map +1 -0
- package/dist/ui/tui-history-parity.test.d.ts +2 -0
- package/dist/ui/tui-history-parity.test.d.ts.map +1 -0
- package/dist/ui/tui-history-parity.test.js +381 -0
- package/dist/ui/tui-history-parity.test.js.map +1 -0
- package/dist/ui/tui-simulation.test.d.ts +2 -0
- package/dist/ui/tui-simulation.test.d.ts.map +1 -0
- package/dist/ui/tui-simulation.test.js +139 -0
- package/dist/ui/tui-simulation.test.js.map +1 -0
- package/dist/ui/tui-terminal-recorder.test.d.ts +2 -0
- package/dist/ui/tui-terminal-recorder.test.d.ts.map +1 -0
- package/dist/ui/tui-terminal-recorder.test.js +134 -0
- package/dist/ui/tui-terminal-recorder.test.js.map +1 -0
- package/dist/ui/utils/assistant-stream-split.d.ts +23 -0
- package/dist/ui/utils/assistant-stream-split.d.ts.map +1 -0
- package/dist/ui/utils/assistant-stream-split.js +41 -0
- package/dist/ui/utils/assistant-stream-split.js.map +1 -0
- package/dist/ui/utils/assistant-stream-split.test.d.ts +2 -0
- package/dist/ui/utils/assistant-stream-split.test.d.ts.map +1 -0
- package/dist/ui/utils/assistant-stream-split.test.js +40 -0
- package/dist/ui/utils/assistant-stream-split.test.js.map +1 -0
- package/dist/ui/utils/latex-to-unicode.d.ts +22 -0
- package/dist/ui/utils/latex-to-unicode.d.ts.map +1 -0
- package/dist/ui/utils/latex-to-unicode.js +538 -0
- package/dist/ui/utils/latex-to-unicode.js.map +1 -0
- package/dist/ui/utils/markdown-renderer.d.ts +20 -0
- package/dist/ui/utils/markdown-renderer.d.ts.map +1 -0
- package/dist/ui/utils/markdown-renderer.js +327 -0
- package/dist/ui/utils/markdown-renderer.js.map +1 -0
- package/dist/ui/utils/markdown-table.d.ts +9 -0
- package/dist/ui/utils/markdown-table.d.ts.map +1 -0
- package/dist/ui/utils/markdown-table.js +95 -0
- package/dist/ui/utils/markdown-table.js.map +1 -0
- package/dist/ui/utils/terminal-graphics.d.ts +16 -0
- package/dist/ui/utils/terminal-graphics.d.ts.map +1 -0
- package/dist/ui/utils/terminal-graphics.js +68 -0
- package/dist/ui/utils/terminal-graphics.js.map +1 -0
- package/dist/ui/utils/terminal-graphics.test.d.ts +2 -0
- package/dist/ui/utils/terminal-graphics.test.d.ts.map +1 -0
- package/dist/ui/utils/terminal-graphics.test.js +61 -0
- package/dist/ui/utils/terminal-graphics.test.js.map +1 -0
- package/dist/ui/utils/terminal-input.d.ts +3 -0
- package/dist/ui/utils/terminal-input.d.ts.map +1 -0
- package/dist/ui/utils/terminal-input.js +28 -0
- package/dist/ui/utils/terminal-input.js.map +1 -0
- package/dist/ui/utils/terminal-input.test.d.ts +2 -0
- package/dist/ui/utils/terminal-input.test.d.ts.map +1 -0
- package/dist/ui/utils/terminal-input.test.js +15 -0
- package/dist/ui/utils/terminal-input.test.js.map +1 -0
- package/dist/ui/utils/text-utils.d.ts +8 -0
- package/dist/ui/utils/text-utils.d.ts.map +1 -0
- package/dist/ui/utils/text-utils.js +16 -0
- package/dist/ui/utils/text-utils.js.map +1 -0
- package/dist/ui/utils/token-to-ansi.js +19 -9
- package/dist/ui/utils/token-to-ansi.js.map +1 -1
- package/dist/ui/utils/user-message-display.d.ts +7 -0
- package/dist/ui/utils/user-message-display.d.ts.map +1 -0
- package/dist/ui/utils/user-message-display.js +26 -0
- package/dist/ui/utils/user-message-display.js.map +1 -0
- package/dist/utils/format.js +7 -9
- package/dist/utils/format.js.map +1 -1
- package/dist/utils/image.d.ts +9 -0
- package/dist/utils/image.d.ts.map +1 -1
- package/dist/utils/image.js +25 -0
- package/dist/utils/image.js.map +1 -1
- package/dist/utils/plan-steps.d.ts.map +1 -1
- package/dist/utils/plan-steps.js +5 -1
- package/dist/utils/plan-steps.js.map +1 -1
- package/dist/utils/plan-steps.test.d.ts +2 -0
- package/dist/utils/plan-steps.test.d.ts.map +1 -0
- package/dist/utils/plan-steps.test.js +16 -0
- package/dist/utils/plan-steps.test.js.map +1 -0
- package/package.json +50 -10
- package/dist/core/repomap-context.d.ts +0 -11
- package/dist/core/repomap-context.d.ts.map +0 -1
- package/dist/core/repomap-context.js +0 -68
- package/dist/core/repomap-context.js.map +0 -1
- package/dist/core/repomap-context.test.d.ts +0 -2
- package/dist/core/repomap-context.test.d.ts.map +0 -1
- package/dist/core/repomap-context.test.js +0 -47
- package/dist/core/repomap-context.test.js.map +0 -1
- package/dist/core/repomap.d.ts +0 -74
- package/dist/core/repomap.d.ts.map +0 -1
- package/dist/core/repomap.js +0 -906
- package/dist/core/repomap.js.map +0 -1
- package/dist/core/repomap.test.d.ts +0 -2
- package/dist/core/repomap.test.d.ts.map +0 -1
- package/dist/core/repomap.test.js +0 -494
- package/dist/core/repomap.test.js.map +0 -1
- package/dist/ui/components/EyesOverlay.d.ts +0 -10
- package/dist/ui/components/EyesOverlay.d.ts.map +0 -1
- package/dist/ui/components/EyesOverlay.js +0 -220
- package/dist/ui/components/EyesOverlay.js.map +0 -1
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Update the maximum scroll offset (total transcript lines − viewport rows).
|
|
3
|
+
* Called by App whenever content length or viewport height changes. Re-pins to
|
|
4
|
+
* the bottom when the user hasn't scrolled, otherwise clamps their offset into
|
|
5
|
+
* the new range. Emits only when the offset actually changes, so growing
|
|
6
|
+
* content during a scroll-locked read doesn't churn renders.
|
|
7
|
+
*/
|
|
8
|
+
export declare function setTranscriptScrollBounds(nextMaxOffset: number): void;
|
|
9
|
+
/**
|
|
10
|
+
* Scroll by a signed number of lines. Positive scrolls UP (toward older
|
|
11
|
+
* output), negative scrolls DOWN (toward newest). No-op when clamped to an
|
|
12
|
+
* edge, so wheel jitter at the top/bottom can't churn renders.
|
|
13
|
+
*/
|
|
14
|
+
export declare function scrollTranscriptByLines(deltaLines: number): void;
|
|
15
|
+
/** Set the absolute offset (used by PageUp/Down, Shift+Arrows, g/G). */
|
|
16
|
+
export declare function setTranscriptScrollOffset(targetOffset: number): void;
|
|
17
|
+
/** Page up/down relative to the current offset by `page` lines. */
|
|
18
|
+
export declare function pageTranscriptScroll(page: number): void;
|
|
19
|
+
/** Snap back to the newest output (offset 0) — e.g. on a new prompt submit. */
|
|
20
|
+
export declare function resetTranscriptScroll(): void;
|
|
21
|
+
/** Jump to the very top (oldest output). */
|
|
22
|
+
export declare function scrollTranscriptToTop(): void;
|
|
23
|
+
/** Current clamped offset, non-reactively (for tests / imperative reads). */
|
|
24
|
+
export declare function getTranscriptScrollOffset(): number;
|
|
25
|
+
/** Reactive hook: re-renders the caller only when the scroll offset changes. */
|
|
26
|
+
export declare function useTranscriptScrollOffset(): number;
|
|
27
|
+
//# sourceMappingURL=transcript-scroll-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-scroll-store.d.ts","sourceRoot":"","sources":["../../../src/ui/stores/transcript-scroll-store.ts"],"names":[],"mappings":"AAkCA;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAKrE;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI,CAMhE;AAED,wEAAwE;AACxE,wBAAgB,yBAAyB,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAKpE;AAED,mEAAmE;AACnE,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAGvD;AAED,+EAA+E;AAC/E,wBAAgB,qBAAqB,IAAI,IAAI,CAI5C;AAED,4CAA4C;AAC5C,wBAAgB,qBAAqB,IAAI,IAAI,CAE5C;AAED,6EAA6E;AAC7E,wBAAgB,yBAAyB,IAAI,MAAM,CAElD;AAED,gFAAgF;AAChF,wBAAgB,yBAAyB,IAAI,MAAM,CAElD"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { createStore, useStore } from "./create-store.js";
|
|
2
|
+
const store = createStore({ offset: 0, isUserScrolled: false });
|
|
3
|
+
/**
|
|
4
|
+
* Scroll bounds kept OUTSIDE the reactive store: they change as content/layout
|
|
5
|
+
* change (driven by App), but on their own they should not trigger a viewport
|
|
6
|
+
* re-render — only an actual offset change should. `setTranscriptScrollBounds`
|
|
7
|
+
* re-clamps the offset and emits only when the visible offset actually moves.
|
|
8
|
+
*/
|
|
9
|
+
let maxOffset = 0;
|
|
10
|
+
function clamp(value) {
|
|
11
|
+
return Math.min(Math.max(0, value), maxOffset);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Update the maximum scroll offset (total transcript lines − viewport rows).
|
|
15
|
+
* Called by App whenever content length or viewport height changes. Re-pins to
|
|
16
|
+
* the bottom when the user hasn't scrolled, otherwise clamps their offset into
|
|
17
|
+
* the new range. Emits only when the offset actually changes, so growing
|
|
18
|
+
* content during a scroll-locked read doesn't churn renders.
|
|
19
|
+
*/
|
|
20
|
+
export function setTranscriptScrollBounds(nextMaxOffset) {
|
|
21
|
+
maxOffset = Math.max(0, Math.floor(nextMaxOffset));
|
|
22
|
+
const { offset, isUserScrolled } = store.getSnapshot();
|
|
23
|
+
const next = isUserScrolled ? Math.min(offset, maxOffset) : 0;
|
|
24
|
+
if (next !== offset)
|
|
25
|
+
store.setState({ offset: next });
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Scroll by a signed number of lines. Positive scrolls UP (toward older
|
|
29
|
+
* output), negative scrolls DOWN (toward newest). No-op when clamped to an
|
|
30
|
+
* edge, so wheel jitter at the top/bottom can't churn renders.
|
|
31
|
+
*/
|
|
32
|
+
export function scrollTranscriptByLines(deltaLines) {
|
|
33
|
+
if (deltaLines === 0)
|
|
34
|
+
return;
|
|
35
|
+
const { offset } = store.getSnapshot();
|
|
36
|
+
const next = clamp(offset + deltaLines);
|
|
37
|
+
if (next === offset)
|
|
38
|
+
return;
|
|
39
|
+
store.setState({ offset: next, isUserScrolled: next > 0 });
|
|
40
|
+
}
|
|
41
|
+
/** Set the absolute offset (used by PageUp/Down, Shift+Arrows, g/G). */
|
|
42
|
+
export function setTranscriptScrollOffset(targetOffset) {
|
|
43
|
+
const { offset } = store.getSnapshot();
|
|
44
|
+
const next = clamp(targetOffset);
|
|
45
|
+
if (next === offset)
|
|
46
|
+
return;
|
|
47
|
+
store.setState({ offset: next, isUserScrolled: next > 0 });
|
|
48
|
+
}
|
|
49
|
+
/** Page up/down relative to the current offset by `page` lines. */
|
|
50
|
+
export function pageTranscriptScroll(page) {
|
|
51
|
+
const { offset } = store.getSnapshot();
|
|
52
|
+
setTranscriptScrollOffset(offset + page);
|
|
53
|
+
}
|
|
54
|
+
/** Snap back to the newest output (offset 0) — e.g. on a new prompt submit. */
|
|
55
|
+
export function resetTranscriptScroll() {
|
|
56
|
+
const { offset, isUserScrolled } = store.getSnapshot();
|
|
57
|
+
if (offset === 0 && !isUserScrolled)
|
|
58
|
+
return;
|
|
59
|
+
store.setState({ offset: 0, isUserScrolled: false });
|
|
60
|
+
}
|
|
61
|
+
/** Jump to the very top (oldest output). */
|
|
62
|
+
export function scrollTranscriptToTop() {
|
|
63
|
+
setTranscriptScrollOffset(maxOffset);
|
|
64
|
+
}
|
|
65
|
+
/** Current clamped offset, non-reactively (for tests / imperative reads). */
|
|
66
|
+
export function getTranscriptScrollOffset() {
|
|
67
|
+
return clamp(store.getSnapshot().offset);
|
|
68
|
+
}
|
|
69
|
+
/** Reactive hook: re-renders the caller only when the scroll offset changes. */
|
|
70
|
+
export function useTranscriptScrollOffset() {
|
|
71
|
+
return useStore(store).offset;
|
|
72
|
+
}
|
|
73
|
+
//# sourceMappingURL=transcript-scroll-store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-scroll-store.js","sourceRoot":"","sources":["../../../src/ui/stores/transcript-scroll-store.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAoB1D,MAAM,KAAK,GAAG,WAAW,CAAwB,EAAE,MAAM,EAAE,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;AAEvF;;;;;GAKG;AACH,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB,SAAS,KAAK,CAAC,KAAa;IAC1B,OAAO,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,SAAS,CAAC,CAAC;AACjD,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,yBAAyB,CAAC,aAAqB;IAC7D,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,CAAC,CA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C3C,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,qBAAqB;IACnC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC;IACvD,IAAI,MAAM,KAAK,CAAC,IAAI,CAAC,cAAc;QAAE,OAAO;IAC5C,KAAK,CAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,cAAc,EAAE,KAAK,EAAE,CAAC,CAAC;AACvD,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,qBAAqB;IACnC,yBAAyB,CAAC,SAAS,CAAC,CAAC;AACvC,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,yBAAyB;IACvC,OAAO,KAAK,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,yBAAyB;IACvC,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC;AAChC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-scroll-store.test.d.ts","sourceRoot":"","sources":["../../../src/ui/stores/transcript-scroll-store.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { beforeEach, describe, expect, it } from "vitest";
|
|
2
|
+
import { getTranscriptScrollOffset, pageTranscriptScroll, resetTranscriptScroll, scrollTranscriptByLines, scrollTranscriptToTop, setTranscriptScrollBounds, setTranscriptScrollOffset, } from "./transcript-scroll-store.js";
|
|
3
|
+
// The store is a module singleton; reset bounds + offset before each test.
|
|
4
|
+
beforeEach(() => {
|
|
5
|
+
setTranscriptScrollBounds(0);
|
|
6
|
+
resetTranscriptScroll();
|
|
7
|
+
});
|
|
8
|
+
describe("transcript-scroll-store", () => {
|
|
9
|
+
it("starts pinned to the bottom", () => {
|
|
10
|
+
expect(getTranscriptScrollOffset()).toBe(0);
|
|
11
|
+
});
|
|
12
|
+
it("scrolls up by a positive delta within bounds", () => {
|
|
13
|
+
setTranscriptScrollBounds(90);
|
|
14
|
+
scrollTranscriptByLines(3);
|
|
15
|
+
expect(getTranscriptScrollOffset()).toBe(3);
|
|
16
|
+
});
|
|
17
|
+
it("scrolls down toward the newest and clamps at 0", () => {
|
|
18
|
+
setTranscriptScrollBounds(90);
|
|
19
|
+
scrollTranscriptByLines(5);
|
|
20
|
+
scrollTranscriptByLines(-2);
|
|
21
|
+
expect(getTranscriptScrollOffset()).toBe(3);
|
|
22
|
+
scrollTranscriptByLines(-100);
|
|
23
|
+
expect(getTranscriptScrollOffset()).toBe(0);
|
|
24
|
+
});
|
|
25
|
+
it("clamps scroll-up to the maximum offset", () => {
|
|
26
|
+
setTranscriptScrollBounds(90);
|
|
27
|
+
scrollTranscriptByLines(9999);
|
|
28
|
+
expect(getTranscriptScrollOffset()).toBe(90);
|
|
29
|
+
});
|
|
30
|
+
it("pages relative to the current offset", () => {
|
|
31
|
+
setTranscriptScrollBounds(90);
|
|
32
|
+
pageTranscriptScroll(20);
|
|
33
|
+
expect(getTranscriptScrollOffset()).toBe(20);
|
|
34
|
+
pageTranscriptScroll(-5);
|
|
35
|
+
expect(getTranscriptScrollOffset()).toBe(15);
|
|
36
|
+
});
|
|
37
|
+
it("jumps to the top (max offset) and to the bottom (0)", () => {
|
|
38
|
+
setTranscriptScrollBounds(90);
|
|
39
|
+
scrollTranscriptToTop();
|
|
40
|
+
expect(getTranscriptScrollOffset()).toBe(90);
|
|
41
|
+
setTranscriptScrollOffset(0);
|
|
42
|
+
expect(getTranscriptScrollOffset()).toBe(0);
|
|
43
|
+
});
|
|
44
|
+
it("re-pins to the bottom on reset", () => {
|
|
45
|
+
setTranscriptScrollBounds(90);
|
|
46
|
+
scrollTranscriptByLines(40);
|
|
47
|
+
resetTranscriptScroll();
|
|
48
|
+
expect(getTranscriptScrollOffset()).toBe(0);
|
|
49
|
+
});
|
|
50
|
+
it("re-clamps the offset when bounds shrink while the user is scrolled", () => {
|
|
51
|
+
setTranscriptScrollBounds(90);
|
|
52
|
+
scrollTranscriptByLines(80);
|
|
53
|
+
expect(getTranscriptScrollOffset()).toBe(80);
|
|
54
|
+
// Content shrinks (e.g. compaction) — offset must clamp into the new range.
|
|
55
|
+
setTranscriptScrollBounds(50);
|
|
56
|
+
expect(getTranscriptScrollOffset()).toBe(50);
|
|
57
|
+
});
|
|
58
|
+
it("keeps the user pinned to the bottom as content grows when not scrolled", () => {
|
|
59
|
+
setTranscriptScrollBounds(10);
|
|
60
|
+
expect(getTranscriptScrollOffset()).toBe(0);
|
|
61
|
+
// New output arrives; an un-scrolled user stays at the bottom.
|
|
62
|
+
setTranscriptScrollBounds(40);
|
|
63
|
+
expect(getTranscriptScrollOffset()).toBe(0);
|
|
64
|
+
});
|
|
65
|
+
it("treats a no-op scroll at an edge without moving the offset", () => {
|
|
66
|
+
setTranscriptScrollBounds(0);
|
|
67
|
+
scrollTranscriptByLines(5);
|
|
68
|
+
expect(getTranscriptScrollOffset()).toBe(0);
|
|
69
|
+
scrollTranscriptByLines(-5);
|
|
70
|
+
expect(getTranscriptScrollOffset()).toBe(0);
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
//# sourceMappingURL=transcript-scroll-store.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transcript-scroll-store.test.js","sourceRoot":"","sources":["../../../src/ui/stores/transcript-scroll-store.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC1D,OAAO,EACL,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,EACrB,uBAAuB,EACvB,qBAAqB,EACrB,yBAAyB,EACzB,yBAAyB,GAC1B,MAAM,8BAA8B,CAAC;AAEtC,2EAA2E;AAC3E,UAAU,CAAC,GAAG,EAAE;IACd,yBAAyB,CAAC,CAAC,CAAC,CAAC;IAC7B,qBAAqB,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C,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5C,+DAA+D;QAC/D,yBAAyB,CAAC,EAAE,CAAC,CAAC;QAC9B,MAAM,CAAC,yBAAyB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QACpE,yBAAyB,CAAC,CAAC,CAAC,CAAC;QAC7B,uBAAuB,CAAC,CAAC,CAAC,CAAC;QAC3B,MAAM,CAAC,yBAAyB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAC5C,uBAAuB,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5B,MAAM,CAAC,yBAAyB,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAC9C,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-flush-bounce.test.d.ts","sourceRoot":"","sources":["../../src/ui/streaming-flush-bounce.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// Regression for the per-chunk footer "bounce" during streaming.
|
|
3
|
+
//
|
|
4
|
+
// The assistant response is flushed to native scrollback paragraph-by-paragraph
|
|
5
|
+
// while it streams (see assistant-stream-split). The scrollback print happens in
|
|
6
|
+
// an effect AFTER paint, while `flushedChars` only advances in that same effect.
|
|
7
|
+
// If the live frame is sliced solely by the already-committed `flushedChars`,
|
|
8
|
+
// the just-flushed paragraph renders BOTH in scrollback and still live for one
|
|
9
|
+
// frame — a transient height bump that shoves the footer up, then back down on
|
|
10
|
+
// every paragraph boundary. App fixes this by slicing the live text with the
|
|
11
|
+
// PROSPECTIVE flush computed during render. This test models that flow and
|
|
12
|
+
// asserts the footer offset from the bottom stays constant across flushes.
|
|
13
|
+
import React, { useEffect, useRef, useState } from "react";
|
|
14
|
+
import { render, Text, useStdout } from "ink";
|
|
15
|
+
import { describe, expect, it } from "vitest";
|
|
16
|
+
import stripAnsi from "strip-ansi";
|
|
17
|
+
import { ChatControls, ChatLayout } from "./components/ChatLayout.js";
|
|
18
|
+
import { ChatLivePane } from "./components/ChatLivePane.js";
|
|
19
|
+
import { TerminalSizeProvider } from "./hooks/useTerminalSize.js";
|
|
20
|
+
import { renderTranscriptItem } from "./transcript/TranscriptRenderer.js";
|
|
21
|
+
import { loadTheme, ThemeContext } from "./theme/theme.js";
|
|
22
|
+
import { createTerminalHistoryPrinter } from "./terminal-history.js";
|
|
23
|
+
import { useTranscriptHistory } from "./hooks/useTranscriptHistory.js";
|
|
24
|
+
import { ScreenRecorder, makeRecordingStdout } from "./testing/screen-recorder.js";
|
|
25
|
+
import { splitAssistantStreamingText } from "./utils/assistant-stream-split.js";
|
|
26
|
+
import { stripDoneMarkers } from "../utils/plan-steps.js";
|
|
27
|
+
const COLUMNS = 80;
|
|
28
|
+
const ROWS = 24;
|
|
29
|
+
const theme = loadTheme("dark");
|
|
30
|
+
const terminalContext = {
|
|
31
|
+
theme,
|
|
32
|
+
columns: COLUMNS,
|
|
33
|
+
version: "sim",
|
|
34
|
+
model: "sim-model",
|
|
35
|
+
provider: "anthropic",
|
|
36
|
+
cwd: "/tmp/sim-project",
|
|
37
|
+
};
|
|
38
|
+
const FOOTER_BOTTOM = "SIM_ACTIVITY_BAR";
|
|
39
|
+
let idCounter = 0;
|
|
40
|
+
const getId = () => `chunk-${idCounter++}`;
|
|
41
|
+
function Controls() {
|
|
42
|
+
return (_jsxs(ChatControls, { controlsRef: () => { }, children: [_jsx(Text, { children: "SIM_STATUS" }), _jsx(Text, { children: "SIM_INPUT" }), _jsx(Text, { children: "SIM_FOOTER" }), _jsx(Text, { children: FOOTER_BOTTOM })] }));
|
|
43
|
+
}
|
|
44
|
+
// Mirrors App.tsx: prospective flush is computed during render so the live
|
|
45
|
+
// frame drops the to-be-flushed prefix immediately; the scrollback print is
|
|
46
|
+
// deferred to the effect.
|
|
47
|
+
function Driver({ rawText }) {
|
|
48
|
+
const { write: writeStdout } = useStdout();
|
|
49
|
+
const [history, setHistory] = useState([]);
|
|
50
|
+
const [liveItems, setLiveItems] = useState([]);
|
|
51
|
+
const flushRef = useRef({ flushedChars: 0, text: "" });
|
|
52
|
+
const { queueFlush } = useTranscriptHistory({
|
|
53
|
+
terminalHistoryPrinter: createTerminalHistoryPrinter(),
|
|
54
|
+
terminalHistoryContext: terminalContext,
|
|
55
|
+
writeStdout,
|
|
56
|
+
sessionPathRef: { current: undefined },
|
|
57
|
+
sessionManagerRef: { current: null },
|
|
58
|
+
history,
|
|
59
|
+
setHistory,
|
|
60
|
+
setLiveItems,
|
|
61
|
+
});
|
|
62
|
+
const alreadyFlushed = flushRef.current.flushedChars;
|
|
63
|
+
const pendingFlushChars = rawText
|
|
64
|
+
? splitAssistantStreamingText(rawText.slice(alreadyFlushed)).flushedText.length
|
|
65
|
+
: 0;
|
|
66
|
+
useEffect(() => {
|
|
67
|
+
if (!rawText) {
|
|
68
|
+
flushRef.current = { flushedChars: 0, text: "" };
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (rawText === flushRef.current.text)
|
|
72
|
+
return;
|
|
73
|
+
const split = splitAssistantStreamingText(rawText.slice(flushRef.current.flushedChars));
|
|
74
|
+
if (split.flushedText.length > 0) {
|
|
75
|
+
queueFlush([
|
|
76
|
+
{
|
|
77
|
+
kind: "assistant",
|
|
78
|
+
text: stripDoneMarkers(split.flushedText),
|
|
79
|
+
continuation: flushRef.current.flushedChars > 0,
|
|
80
|
+
id: getId(),
|
|
81
|
+
},
|
|
82
|
+
]);
|
|
83
|
+
flushRef.current = {
|
|
84
|
+
flushedChars: flushRef.current.flushedChars + split.flushedText.length,
|
|
85
|
+
text: rawText,
|
|
86
|
+
};
|
|
87
|
+
return;
|
|
88
|
+
}
|
|
89
|
+
flushRef.current = { ...flushRef.current, text: rawText };
|
|
90
|
+
}, [rawText, queueFlush]);
|
|
91
|
+
const visibleStreamingText = stripDoneMarkers(rawText.slice(alreadyFlushed + pendingFlushChars));
|
|
92
|
+
const renderItem = (item, index, items) => renderTranscriptItem({
|
|
93
|
+
item,
|
|
94
|
+
index,
|
|
95
|
+
items,
|
|
96
|
+
version: "sim",
|
|
97
|
+
currentModel: "sim-model",
|
|
98
|
+
currentProvider: "anthropic",
|
|
99
|
+
displayedCwd: "/tmp/sim-project",
|
|
100
|
+
columns: COLUMNS,
|
|
101
|
+
theme,
|
|
102
|
+
renderMarkdown: true,
|
|
103
|
+
measuredLiveAreaRows: ROWS,
|
|
104
|
+
});
|
|
105
|
+
return (_jsx(ThemeContext.Provider, { value: theme, children: _jsx(TerminalSizeProvider, { children: _jsxs(ChatLayout, { columns: COLUMNS, children: [_jsx(ChatLivePane, { liveItems: liveItems, renderItem: renderItem, isRunning: true, visibleStreamingText: visibleStreamingText, streamingThinking: "", thinkingMs: 0, reserveStreamingSpacing: false, renderMarkdown: true, measuredLiveAreaRows: ROWS, assistantMarginTop: 0, streamingContinuation: alreadyFlushed + pendingFlushChars > 0 }), _jsx(Controls, {})] }) }) }));
|
|
106
|
+
}
|
|
107
|
+
async function tick() {
|
|
108
|
+
await new Promise((resolve) => setTimeout(resolve, 45));
|
|
109
|
+
}
|
|
110
|
+
function paragraph(n) {
|
|
111
|
+
return Array.from({ length: 3 }, (_, i) => `P${n}_LINE_${i + 1}`).join("\n");
|
|
112
|
+
}
|
|
113
|
+
describe("streaming flush footer bounce", () => {
|
|
114
|
+
it("keeps the footer at a constant offset across paragraph flush boundaries", async () => {
|
|
115
|
+
const recorder = new ScreenRecorder({ columns: COLUMNS, rows: ROWS });
|
|
116
|
+
const stdout = makeRecordingStdout(recorder);
|
|
117
|
+
const footerOffsets = [];
|
|
118
|
+
const capture = () => {
|
|
119
|
+
const lines = recorder.viewportLines().map((line) => stripAnsi(line));
|
|
120
|
+
const footerIdx = lines.findIndex((line) => line.includes(FOOTER_BOTTOM));
|
|
121
|
+
footerOffsets.push(footerIdx === -1 ? -1 : lines.length - footerIdx);
|
|
122
|
+
};
|
|
123
|
+
// Stream a 3-paragraph response: text grows, then crosses a blank-line
|
|
124
|
+
// boundary (flush), then grows again, etc. The boundary frames are where the
|
|
125
|
+
// bounce used to occur.
|
|
126
|
+
const steps = [
|
|
127
|
+
paragraph(1),
|
|
128
|
+
`${paragraph(1)}\n\n`,
|
|
129
|
+
`${paragraph(1)}\n\n${paragraph(2)}`,
|
|
130
|
+
`${paragraph(1)}\n\n${paragraph(2)}\n\n`,
|
|
131
|
+
`${paragraph(1)}\n\n${paragraph(2)}\n\n${paragraph(3)}`,
|
|
132
|
+
];
|
|
133
|
+
const mounted = render(_jsx(Driver, { rawText: steps[0] }), {
|
|
134
|
+
stdout,
|
|
135
|
+
columns: COLUMNS,
|
|
136
|
+
rows: ROWS,
|
|
137
|
+
patchConsole: false,
|
|
138
|
+
maxFps: 1000,
|
|
139
|
+
});
|
|
140
|
+
await tick();
|
|
141
|
+
capture();
|
|
142
|
+
for (let i = 1; i < steps.length; i++) {
|
|
143
|
+
mounted.rerender(_jsx(Driver, { rawText: steps[i] }));
|
|
144
|
+
await tick();
|
|
145
|
+
await tick();
|
|
146
|
+
capture();
|
|
147
|
+
}
|
|
148
|
+
mounted.unmount();
|
|
149
|
+
// The footer (controls block) must stay pinned the same distance from the
|
|
150
|
+
// bottom on every frame — no transient grow/shrink as paragraphs flush.
|
|
151
|
+
for (const offset of footerOffsets) {
|
|
152
|
+
expect(offset).toBe(footerOffsets[0]);
|
|
153
|
+
}
|
|
154
|
+
});
|
|
155
|
+
});
|
|
156
|
+
//# sourceMappingURL=streaming-flush-bounce.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"streaming-flush-bounce.test.js","sourceRoot":"","sources":["../../src/ui/streaming-flush-bounce.test.tsx"],"names":[],"mappings":";AAAA,iEAAiE;AACjE,EAAE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OAAO,EAAE,OAAO;YAChB,IAAI,EAAE,IAAI;YACV,YAAY,EAAE,KAAK;YACnB,MAAM,EAAE,IAAI;SACb,CAAC,CAAC;QACH,MAAM,IAAI,EAAE,CAAC;QACb,OAAO,EAAE,CAAC;QACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACtC,OAAO,CAAC,QAAQ,CAAC,KAAC,MAAM,IAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAE,GAAI,CAAC,CAAC;YACjD,MAAM,IAAI,EAAE,CAAC;YACb,MAAM,IAAI,EAAE,CAAC;YACb,OAAO,EAAE,CAAC;QACZ,CAAC;QACD,OAAO,CAAC,OAAO,EAAE,CAAC;QAElB,0EAA0E;QAC1E,wEAAwE;QACxE,KAAK,MAAM,MAAM,IAAI,aAAa,EAAE,CAAC;YACnC,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,CAAC;QACxC,CAAC;IACH,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import type React from "react";
|
|
2
|
+
import type { ImageAttachment } from "../utils/image.js";
|
|
3
|
+
import type { CustomCommand } from "../core/custom-commands.js";
|
|
4
|
+
import type { CompletedItem, UserItem } from "./app-items.js";
|
|
5
|
+
import type { UserContent } from "./hooks/useAgentLoop.js";
|
|
6
|
+
import type { Message } from "@prestyj/ai";
|
|
7
|
+
import type { GoalMode } from "../core/runtime-mode.js";
|
|
8
|
+
export declare function collectAssistantTextSince(messages: readonly Message[], startIndex: number, maxChars?: number): string;
|
|
9
|
+
export declare function buildGoalSetupPromptFromPlanner({ originalGoalPrompt, plannerOutput, }: {
|
|
10
|
+
originalGoalPrompt: string;
|
|
11
|
+
plannerOutput: string;
|
|
12
|
+
}): string;
|
|
13
|
+
export declare function isGoalPromptCommandName(cmdName: string): boolean;
|
|
14
|
+
export declare function runGoalPromptSetupSequence({ userContent, fullPrompt, messagesRef, setGoalModeAndPrompt, runAgent, onStage, }: {
|
|
15
|
+
userContent: UserContent;
|
|
16
|
+
fullPrompt: string;
|
|
17
|
+
messagesRef: {
|
|
18
|
+
current: Message[];
|
|
19
|
+
};
|
|
20
|
+
setGoalModeAndPrompt: (nextMode: GoalMode) => Promise<void>;
|
|
21
|
+
runAgent: (content: UserContent) => Promise<void>;
|
|
22
|
+
onStage?: (text: string) => void;
|
|
23
|
+
}): Promise<void>;
|
|
24
|
+
interface PromptCommandSubmitOptions {
|
|
25
|
+
trimmed: string;
|
|
26
|
+
inputImages: ImageAttachment[];
|
|
27
|
+
currentModel: string;
|
|
28
|
+
customCommands: CustomCommand[];
|
|
29
|
+
setLastUserMessage: (message: string) => void;
|
|
30
|
+
setDoneStatus: (status: {
|
|
31
|
+
verb: string;
|
|
32
|
+
durationMs: number;
|
|
33
|
+
toolsUsed: string[];
|
|
34
|
+
} | null) => void;
|
|
35
|
+
finalizeSubmittedUserItem: (item: UserItem) => void;
|
|
36
|
+
runAgent: (content: UserContent) => Promise<void>;
|
|
37
|
+
setLiveItems: React.Dispatch<React.SetStateAction<CompletedItem[]>>;
|
|
38
|
+
getId: () => string;
|
|
39
|
+
reloadCustomCommands: () => void;
|
|
40
|
+
messagesRef?: {
|
|
41
|
+
current: Message[];
|
|
42
|
+
};
|
|
43
|
+
setGoalModeAndPrompt?: (nextMode: GoalMode) => Promise<void>;
|
|
44
|
+
onGoalStage?: (text: string) => void;
|
|
45
|
+
onGoalSetupComplete?: () => void | Promise<void>;
|
|
46
|
+
}
|
|
47
|
+
export declare function submitPromptCommand({ trimmed, inputImages, currentModel, customCommands, setLastUserMessage, setDoneStatus, finalizeSubmittedUserItem, runAgent, setLiveItems, getId, reloadCustomCommands, messagesRef, setGoalModeAndPrompt, onGoalStage, onGoalSetupComplete, }: PromptCommandSubmitOptions): Promise<boolean>;
|
|
48
|
+
export {};
|
|
49
|
+
//# sourceMappingURL=submit-prompt-command.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit-prompt-command.d.ts","sourceRoot":"","sources":["../../src/ui/submit-prompt-command.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGzD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAGhE,OAAO,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAE3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAYxD,wBAAgB,yBAAyB,CACvC,QAAQ,EAAE,SAAS,OAAO,EAAE,EAC5B,UAAU,EAAE,MAAM,EAClB,QAAQ,SAAgC,GACvC,MAAM,CASR;AAED,wBAAgB,+BAA+B,CAAC,EAC9C,kBAAkB,EAClB,aAAa,GACd,EAAE;IACD,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,CAQT;AAED,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED,wBAAsB,0BAA0B,CAAC,EAC/C,WAAW,EACX,UAAU,EACV,WAAW,EACX,oBAAoB,EACpB,QAAQ,EACR,OAAO,GACR,EAAE;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE;QAAE,OAAO,EAAE,OAAO,EAAE,CAAA;KAAE,CAAC;IACpC,oBAAoB,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5D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EACP,WAAW,EACX,YAAY,EACZ,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,yBAAyB,EACzB,QAAQ,EACR,YAAY,EACZ,KAAK,EACL,oBAAoB,EACpB,WAAW,EACX,oBAAoB,EACpB,WAAW,EACX,mBAAmB,GACpB,EAAE,0BAA0B,GAAG,OAAO,CAAC,OAAO,CAAC,CAyD/C"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { getModel } from "../core/model-registry.js";
|
|
2
|
+
import { PROMPT_COMMANDS, getPromptCommand } from "../core/prompt-commands.js";
|
|
3
|
+
import { log } from "../core/logger.js";
|
|
4
|
+
import { buildUserContentWithAttachments, routePromptCommandInput } from "./prompt-routing.js";
|
|
5
|
+
import { toErrorItem } from "./error-item.js";
|
|
6
|
+
const GOAL_PLANNER_OUTPUT_MAX_CHARS = 2400;
|
|
7
|
+
function messageTextContent(message) {
|
|
8
|
+
if (typeof message.content === "string")
|
|
9
|
+
return message.content;
|
|
10
|
+
return message.content
|
|
11
|
+
.filter((part) => part.type === "text")
|
|
12
|
+
.map((part) => part.text)
|
|
13
|
+
.join("\n");
|
|
14
|
+
}
|
|
15
|
+
export function collectAssistantTextSince(messages, startIndex, maxChars = GOAL_PLANNER_OUTPUT_MAX_CHARS) {
|
|
16
|
+
const text = messages
|
|
17
|
+
.slice(startIndex)
|
|
18
|
+
.filter((message) => message.role === "assistant")
|
|
19
|
+
.map(messageTextContent)
|
|
20
|
+
.join("\n")
|
|
21
|
+
.trim();
|
|
22
|
+
if (text.length <= maxChars)
|
|
23
|
+
return text;
|
|
24
|
+
return `${text.slice(0, maxChars).trimEnd()}\n[planner output truncated]`;
|
|
25
|
+
}
|
|
26
|
+
export function buildGoalSetupPromptFromPlanner({ originalGoalPrompt, plannerOutput, }) {
|
|
27
|
+
const compactPlannerOutput = plannerOutput.trim() || "GOAL_PLAN\nresearch=none\nEND_GOAL_PLAN";
|
|
28
|
+
return (`${originalGoalPrompt.trim()}\n\n` +
|
|
29
|
+
`## Goal Planner Output\n\n${compactPlannerOutput}\n\n` +
|
|
30
|
+
`Use the original objective plus this planner output to create durable Goal setup only. ` +
|
|
31
|
+
`Do not redo planner research unless the planner output is unusable.`);
|
|
32
|
+
}
|
|
33
|
+
export function isGoalPromptCommandName(cmdName) {
|
|
34
|
+
return getPromptCommand(cmdName)?.name === "goal";
|
|
35
|
+
}
|
|
36
|
+
export async function runGoalPromptSetupSequence({ userContent, fullPrompt, messagesRef, setGoalModeAndPrompt, runAgent, onStage, }) {
|
|
37
|
+
onStage?.("GOAL PLANNER STARTED");
|
|
38
|
+
await setGoalModeAndPrompt("planner");
|
|
39
|
+
const plannerStartIndex = messagesRef.current.length;
|
|
40
|
+
await runAgent(userContent);
|
|
41
|
+
const plannerOutput = collectAssistantTextSince(messagesRef.current, plannerStartIndex);
|
|
42
|
+
const setupPrompt = buildGoalSetupPromptFromPlanner({
|
|
43
|
+
originalGoalPrompt: fullPrompt,
|
|
44
|
+
plannerOutput,
|
|
45
|
+
});
|
|
46
|
+
onStage?.("GOAL PLAN CREATED -> PASSING TO SETUP AGENT");
|
|
47
|
+
await setGoalModeAndPrompt("setup");
|
|
48
|
+
onStage?.("GOAL SETUP AGENT STARTED");
|
|
49
|
+
await runAgent(setupPrompt);
|
|
50
|
+
onStage?.("GOAL SETUP COMPLETE -> OPENING GOAL PANE");
|
|
51
|
+
}
|
|
52
|
+
export async function submitPromptCommand({ trimmed, inputImages, currentModel, customCommands, setLastUserMessage, setDoneStatus, finalizeSubmittedUserItem, runAgent, setLiveItems, getId, reloadCustomCommands, messagesRef, setGoalModeAndPrompt, onGoalStage, onGoalSetupComplete, }) {
|
|
53
|
+
const promptCommandRoute = routePromptCommandInput(trimmed, PROMPT_COMMANDS, customCommands);
|
|
54
|
+
if (!promptCommandRoute)
|
|
55
|
+
return false;
|
|
56
|
+
const { cmdName, cmdArgs, fullPrompt } = promptCommandRoute;
|
|
57
|
+
log("INFO", "command", `Prompt command: /${cmdName}${cmdArgs ? ` (args: ${cmdArgs})` : ""}`);
|
|
58
|
+
const hasImages = inputImages.length > 0;
|
|
59
|
+
const modelInfo = getModel(currentModel);
|
|
60
|
+
const modelSupportsImages = modelInfo?.supportsImages ?? true;
|
|
61
|
+
const userContent = buildUserContentWithAttachments(fullPrompt, inputImages, modelSupportsImages);
|
|
62
|
+
const userItem = {
|
|
63
|
+
kind: "user",
|
|
64
|
+
text: trimmed,
|
|
65
|
+
imageCount: hasImages ? inputImages.length : undefined,
|
|
66
|
+
id: getId(),
|
|
67
|
+
};
|
|
68
|
+
setLastUserMessage(trimmed);
|
|
69
|
+
setDoneStatus(null);
|
|
70
|
+
finalizeSubmittedUserItem(userItem);
|
|
71
|
+
const isGoalSetupCommand = isGoalPromptCommandName(cmdName);
|
|
72
|
+
try {
|
|
73
|
+
if (isGoalSetupCommand && messagesRef && setGoalModeAndPrompt) {
|
|
74
|
+
await runGoalPromptSetupSequence({
|
|
75
|
+
userContent,
|
|
76
|
+
fullPrompt,
|
|
77
|
+
messagesRef,
|
|
78
|
+
setGoalModeAndPrompt,
|
|
79
|
+
runAgent,
|
|
80
|
+
onStage: onGoalStage,
|
|
81
|
+
});
|
|
82
|
+
await onGoalSetupComplete?.();
|
|
83
|
+
}
|
|
84
|
+
else {
|
|
85
|
+
await runAgent(userContent);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch (err) {
|
|
89
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
90
|
+
log("ERROR", "error", msg);
|
|
91
|
+
const isAbort = msg.includes("aborted") || msg.includes("abort");
|
|
92
|
+
setLiveItems((prev) => [
|
|
93
|
+
...prev,
|
|
94
|
+
isAbort
|
|
95
|
+
? { kind: "stopped", text: "Request was stopped.", id: getId() }
|
|
96
|
+
: toErrorItem(err, getId()),
|
|
97
|
+
]);
|
|
98
|
+
}
|
|
99
|
+
finally {
|
|
100
|
+
if (isGoalSetupCommand && setGoalModeAndPrompt) {
|
|
101
|
+
await setGoalModeAndPrompt("off");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
reloadCustomCommands();
|
|
105
|
+
return true;
|
|
106
|
+
}
|
|
107
|
+
//# sourceMappingURL=submit-prompt-command.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit-prompt-command.js","sourceRoot":"","sources":["../../src/ui/submit-prompt-command.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAE/E,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,+BAA+B,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAG/F,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C,MAAM,6BAA6B,GAAG,IAAI,CAAC;AAE3C,SAAS,kBAAkB,CAAC,OAAgB;IAC1C,IAAI,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ;QAAE,OAAO,OAAO,CAAC,OAAO,CAAC;IAChE,OAAO,OAAO,CAAC,OAAO;SACnB,MAAM,CAAC,CAAC,IAAI,EAA0C,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,MAAM,CAAC;SAC9E,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC;SACxB,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,yBAAyB,CACvC,QAA4B,EAC5B,UAAkB,EAClB,QAAQ,GAAG,6BAA6B;IAExC,MAAM,IAAI,GAAG,QAAQ;SAClB,KAAK,CAAC,UAAU,CAAC;SACjB,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,WAAW,CAAC;SACjD,GAAG,CAAC,kBAAkB,CAAC;SACvB,IAAI,CAAC,IAAI,CAAC;SACV,IAAI,EAAE,CA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
1
|
+
interface UiSlashCommandActions {
|
|
2
|
+
openModelSelector: () => void;
|
|
3
|
+
compactConversation: () => Promise<void>;
|
|
4
|
+
quit: () => void;
|
|
5
|
+
clearSession: () => void;
|
|
6
|
+
openThemeSelector: () => void;
|
|
7
|
+
toggleMarkdown: () => void;
|
|
8
|
+
clearApprovedPlan: () => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function handleUiSlashCommand(trimmed: string, actions: UiSlashCommandActions): Promise<boolean>;
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=submit-slash-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit-slash-commands.d.ts","sourceRoot":"","sources":["../../src/ui/submit-slash-commands.ts"],"names":[],"mappings":"AAAA,UAAU,qBAAqB;IAC7B,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,mBAAmB,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IACzC,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,iBAAiB,EAAE,MAAM,IAAI,CAAC;CAC/B;AAED,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,qBAAqB,GAC7B,OAAO,CAAC,OAAO,CAAC,CAqClB"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export async function handleUiSlashCommand(trimmed, actions) {
|
|
2
|
+
if (trimmed === "/model" || trimmed === "/m" || trimmed === "/models") {
|
|
3
|
+
actions.openModelSelector();
|
|
4
|
+
return true;
|
|
5
|
+
}
|
|
6
|
+
if (trimmed === "/compact" || trimmed === "/c") {
|
|
7
|
+
await actions.compactConversation();
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
if (trimmed === "/quit" || trimmed === "/q" || trimmed === "/exit") {
|
|
11
|
+
actions.quit();
|
|
12
|
+
return true;
|
|
13
|
+
}
|
|
14
|
+
if (trimmed === "/clear") {
|
|
15
|
+
actions.clearSession();
|
|
16
|
+
return true;
|
|
17
|
+
}
|
|
18
|
+
if (trimmed === "/theme" || trimmed === "/t") {
|
|
19
|
+
actions.openThemeSelector();
|
|
20
|
+
return true;
|
|
21
|
+
}
|
|
22
|
+
if (trimmed === "/markdown" || trimmed === "/md") {
|
|
23
|
+
actions.toggleMarkdown();
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
if (trimmed === "/clearplan") {
|
|
27
|
+
actions.clearApprovedPlan();
|
|
28
|
+
return true;
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=submit-slash-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"submit-slash-commands.js","sourceRoot":"","sources":["../../src/ui/submit-slash-commands.ts"],"names":[],"mappings":"AAUA,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,OAAe,EACf,OAA8B;IAE9B,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,SAAS,EAAE,CAAC;QACtE,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,UAAU,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAC/C,MAAM,OAAO,CAAC,mBAAmB,EAAE,CAAC;QACpC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,OAAO,IAAI,OAAO,KAAK,IAAI,IAAI,OAAO,KAAK,OAAO,EAAE,CAAC;QACnE,OAAO,CAAC,IAAI,EAAE,CAAC;QACf,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,QAAQ,EAAE,CAAC;QACzB,OAAO,CAAC,YAAY,EAAE,CAAC;QACvB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,QAAQ,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAC7C,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,WAAW,IAAI,OAAO,KAAK,KAAK,EAAE,CAAC;QACjD,OAAO,CAAC,cAAc,EAAE,CAAC;QACzB,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,OAAO,KAAK,YAAY,EAAE,CAAC;QAC7B,OAAO,CAAC,iBAAiB,EAAE,CAAC;QAC5B,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC"}
|