@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,35 @@
|
|
|
1
|
+
import type { CompletedItem } from "./app-items.js";
|
|
2
|
+
/**
|
|
3
|
+
* Cheap, deterministic estimate of how many terminal rows a block of text
|
|
4
|
+
* occupies once wrapped to `width`. Biased high (uses display width and counts
|
|
5
|
+
* at least one row per source line) so the live-area clamp never UNDER-counts
|
|
6
|
+
* and lets the frame overflow past the terminal height.
|
|
7
|
+
*/
|
|
8
|
+
export declare function estimateWrappedRows(text: string, columns: number): number;
|
|
9
|
+
/**
|
|
10
|
+
* Estimate the total rendered height (in terminal rows) of the live area:
|
|
11
|
+
* every live item plus the in-flight streaming block. Each text block is
|
|
12
|
+
* individually capped at `perItemBudget` because AssistantMessage/Markdown
|
|
13
|
+
* truncate to that height, but their SUM is what can overflow the terminal —
|
|
14
|
+
* which is exactly what this measures.
|
|
15
|
+
*/
|
|
16
|
+
export declare function estimateLiveAreaRows({ liveItems, streamingText, columns, perItemBudget, }: {
|
|
17
|
+
liveItems: readonly CompletedItem[];
|
|
18
|
+
streamingText: string;
|
|
19
|
+
columns: number;
|
|
20
|
+
perItemBudget: number;
|
|
21
|
+
}): number;
|
|
22
|
+
/**
|
|
23
|
+
* Decide whether the live area must be hard-clamped to `liveAreaBudget` rows.
|
|
24
|
+
* Returns the clamp height when the estimated content would overflow the
|
|
25
|
+
* budget (so the bottom-anchored container clips the oldest rows and keeps the
|
|
26
|
+
* Ink-rendered frame strictly below the terminal height), or `undefined` when
|
|
27
|
+
* the content fits and the area should stay compact (no reserved blank rows).
|
|
28
|
+
*/
|
|
29
|
+
export declare function getLiveAreaClampRows({ liveItems, streamingText, columns, liveAreaBudget, }: {
|
|
30
|
+
liveItems: readonly CompletedItem[];
|
|
31
|
+
streamingText: string;
|
|
32
|
+
columns: number;
|
|
33
|
+
liveAreaBudget: number;
|
|
34
|
+
}): number | undefined;
|
|
35
|
+
//# sourceMappingURL=live-area-height.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-area-height.d.ts","sourceRoot":"","sources":["../../src/ui/live-area-height.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAYpD;;;;;GAKG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,CAKzE;AAWD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,aAAa,EACb,OAAO,EACP,aAAa,GACd,EAAE;IACD,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,aAAa,EAAE,MAAM,CAAC;CACvB,GAAG,MAAM,CAyBT;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,SAAS,EACT,aAAa,EACb,OAAO,EACP,cAAc,GACf,EAAE;IACD,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;IACpC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,MAAM,GAAG,SAAS,CAQrB"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import stringWidth from "string-width";
|
|
2
|
+
import { isPanelReplacedToolItem } from "./app-items.js";
|
|
3
|
+
/**
|
|
4
|
+
* Width the assistant/streaming markdown body wraps to, mirroring
|
|
5
|
+
* AssistantMessage's content box: columns - RESPONSE_LEFT_PADDING(1) -
|
|
6
|
+
* PREFIX_WIDTH(2) - RESPONSE_RIGHT_GUARD(1).
|
|
7
|
+
*/
|
|
8
|
+
function bodyWidth(columns) {
|
|
9
|
+
return Math.max(10, columns - 4);
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Cheap, deterministic estimate of how many terminal rows a block of text
|
|
13
|
+
* occupies once wrapped to `width`. Biased high (uses display width and counts
|
|
14
|
+
* at least one row per source line) so the live-area clamp never UNDER-counts
|
|
15
|
+
* and lets the frame overflow past the terminal height.
|
|
16
|
+
*/
|
|
17
|
+
export function estimateWrappedRows(text, columns) {
|
|
18
|
+
const width = bodyWidth(columns);
|
|
19
|
+
return text
|
|
20
|
+
.split("\n")
|
|
21
|
+
.reduce((rows, line) => rows + Math.max(1, Math.ceil(stringWidth(line) / width)), 0);
|
|
22
|
+
}
|
|
23
|
+
const THINKING_HEADER_ROWS = 2;
|
|
24
|
+
// Per-block decoration not captured by the wrapped body: the top-spacing margin
|
|
25
|
+
// plus the response prefix line allowance.
|
|
26
|
+
const BLOCK_OVERHEAD_ROWS = 1;
|
|
27
|
+
// Conservative allowance for non-text live rows (tool headers, step markers,
|
|
28
|
+
// info/error lines). These are normally flushed to scrollback quickly, but
|
|
29
|
+
// estimate generously while they linger so the clamp engages early.
|
|
30
|
+
const NON_TEXT_ROW_ESTIMATE = 3;
|
|
31
|
+
/**
|
|
32
|
+
* Estimate the total rendered height (in terminal rows) of the live area:
|
|
33
|
+
* every live item plus the in-flight streaming block. Each text block is
|
|
34
|
+
* individually capped at `perItemBudget` because AssistantMessage/Markdown
|
|
35
|
+
* truncate to that height, but their SUM is what can overflow the terminal —
|
|
36
|
+
* which is exactly what this measures.
|
|
37
|
+
*/
|
|
38
|
+
export function estimateLiveAreaRows({ liveItems, streamingText, columns, perItemBudget, }) {
|
|
39
|
+
let rows = 0;
|
|
40
|
+
for (const item of liveItems) {
|
|
41
|
+
if (item.kind === "assistant") {
|
|
42
|
+
const textRows = item.text.trim().length > 0 ? estimateWrappedRows(item.text, columns) : 0;
|
|
43
|
+
const thinkingRows = item.thinking ? THINKING_HEADER_ROWS : 0;
|
|
44
|
+
rows += Math.min(textRows, perItemBudget) + thinkingRows + BLOCK_OVERHEAD_ROWS;
|
|
45
|
+
}
|
|
46
|
+
else if (item.kind === "tombstone" ||
|
|
47
|
+
item.kind === "banner" ||
|
|
48
|
+
isPanelReplacedToolItem(item)) {
|
|
49
|
+
// Tool rows render in the pinned LiveToolPanel, not the live area — they
|
|
50
|
+
// contribute zero rows here.
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
rows += NON_TEXT_ROW_ESTIMATE;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const trimmedStreaming = streamingText.trim();
|
|
58
|
+
if (trimmedStreaming.length > 0) {
|
|
59
|
+
rows +=
|
|
60
|
+
Math.min(estimateWrappedRows(streamingText, columns), perItemBudget) + BLOCK_OVERHEAD_ROWS;
|
|
61
|
+
}
|
|
62
|
+
return rows;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Decide whether the live area must be hard-clamped to `liveAreaBudget` rows.
|
|
66
|
+
* Returns the clamp height when the estimated content would overflow the
|
|
67
|
+
* budget (so the bottom-anchored container clips the oldest rows and keeps the
|
|
68
|
+
* Ink-rendered frame strictly below the terminal height), or `undefined` when
|
|
69
|
+
* the content fits and the area should stay compact (no reserved blank rows).
|
|
70
|
+
*/
|
|
71
|
+
export function getLiveAreaClampRows({ liveItems, streamingText, columns, liveAreaBudget, }) {
|
|
72
|
+
const estimated = estimateLiveAreaRows({
|
|
73
|
+
liveItems,
|
|
74
|
+
streamingText,
|
|
75
|
+
columns,
|
|
76
|
+
perItemBudget: liveAreaBudget,
|
|
77
|
+
});
|
|
78
|
+
return estimated > liveAreaBudget ? liveAreaBudget : undefined;
|
|
79
|
+
}
|
|
80
|
+
//# sourceMappingURL=live-area-height.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-area-height.js","sourceRoot":"","sources":["../../src/ui/live-area-height.ts"],"names":[],"mappings":"AAAA,O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AAY,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;YAC9D,IAAI,IAAI,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,aAAa,CAAC,GAAG,YAAY,GAAG,mBAAmB,CAAC;QACjF,CAAC;aAAM,IACL,IAAI,CAAC,IAAI,KAAK,WAAW;YACzB,IAAI,CAAC,IAAI,KAAK,QAAQ;YACtB,uBAAuB,CAAC,IAAI,CAAC,EAC7B,CAAC;YACD,yEAAyE;YACzE,6BAA6B;YAC7B,SAAS;QACX,CAAC;aAAM,CAAC;YACN,IAAI,IAAI,qBAAqB,CAAC;QAChC,CAAC;IACH,CAAC;IACD,MAAM,gBAAgB,GAAG,aAAa,CAAC,IAAI,EAAE,CAAC;IAC9C,IAAI,gBAAgB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAChC,IAAI;YACF,IAAI,CAAC,GAAG,CAAC,mBAAmB,CAAC,aAAa,EAAE,OAAO,CAAC,EAAE,aAAa,CAAC,GAAG,mBAAmB,CAAC;IAC/F,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,SAAS,EACT,aAAa,EACb,OAAO,EACP,cAAc,GAMf;IACC,MAAM,SAAS,GAAG,oBAAoB,CAAC;QACrC,SAAS;QACT,aAAa;QACb,OAAO;QACP,aAAa,EAAE,cAAc;KAC9B,CAAC,CAAC;IACH,OAAO,SAAS,GAAG,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;AACjE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-area-height.test.d.ts","sourceRoot":"","sources":["../../src/ui/live-area-height.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { estimateWrappedRows, estimateLiveAreaRows, getLiveAreaClampRows, } from "./live-area-height.js";
|
|
3
|
+
const COLUMNS = 80;
|
|
4
|
+
function assistant(id, lines) {
|
|
5
|
+
return {
|
|
6
|
+
kind: "assistant",
|
|
7
|
+
id,
|
|
8
|
+
text: Array.from({ length: lines }, (_, i) => `line ${i + 1}`).join("\n"),
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
describe("estimateWrappedRows", () => {
|
|
12
|
+
it("counts one row per short source line", () => {
|
|
13
|
+
expect(estimateWrappedRows("a\nb\nc", COLUMNS)).toBe(3);
|
|
14
|
+
});
|
|
15
|
+
it("counts wrapped rows for lines wider than the body width", () => {
|
|
16
|
+
// body width = columns - 4 = 76; a 200-char line wraps to ceil(200/76) = 3.
|
|
17
|
+
expect(estimateWrappedRows("x".repeat(200), COLUMNS)).toBe(3);
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
describe("estimateLiveAreaRows", () => {
|
|
21
|
+
it("sums per-block heights, capping each block at the per-item budget", () => {
|
|
22
|
+
const rows = estimateLiveAreaRows({
|
|
23
|
+
liveItems: [assistant("a1", 40), assistant("a2", 40)],
|
|
24
|
+
streamingText: "",
|
|
25
|
+
columns: COLUMNS,
|
|
26
|
+
perItemBudget: 18,
|
|
27
|
+
});
|
|
28
|
+
// Each block capped at 18 + 1 overhead => 2 * 19 = 38.
|
|
29
|
+
expect(rows).toBe(38);
|
|
30
|
+
});
|
|
31
|
+
it("includes the in-flight streaming block", () => {
|
|
32
|
+
const rows = estimateLiveAreaRows({
|
|
33
|
+
liveItems: [],
|
|
34
|
+
streamingText: Array.from({ length: 40 }, (_, i) => `s ${i}`).join("\n"),
|
|
35
|
+
columns: COLUMNS,
|
|
36
|
+
perItemBudget: 18,
|
|
37
|
+
});
|
|
38
|
+
expect(rows).toBe(19);
|
|
39
|
+
});
|
|
40
|
+
});
|
|
41
|
+
describe("getLiveAreaClampRows", () => {
|
|
42
|
+
it("clamps to the budget when stacked blocks would overflow it", () => {
|
|
43
|
+
expect(getLiveAreaClampRows({
|
|
44
|
+
liveItems: [assistant("a1", 40), assistant("a2", 40)],
|
|
45
|
+
streamingText: "",
|
|
46
|
+
columns: COLUMNS,
|
|
47
|
+
liveAreaBudget: 18,
|
|
48
|
+
})).toBe(18);
|
|
49
|
+
});
|
|
50
|
+
it("stays compact (no clamp) when content fits the budget", () => {
|
|
51
|
+
expect(getLiveAreaClampRows({
|
|
52
|
+
liveItems: [assistant("a1", 3)],
|
|
53
|
+
streamingText: "",
|
|
54
|
+
columns: COLUMNS,
|
|
55
|
+
liveAreaBudget: 18,
|
|
56
|
+
})).toBeUndefined();
|
|
57
|
+
});
|
|
58
|
+
it("stays compact when the live area is empty", () => {
|
|
59
|
+
expect(getLiveAreaClampRows({
|
|
60
|
+
liveItems: [],
|
|
61
|
+
streamingText: "",
|
|
62
|
+
columns: COLUMNS,
|
|
63
|
+
liveAreaBudget: 18,
|
|
64
|
+
})).toBeUndefined();
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
//# sourceMappingURL=live-area-height.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-area-height.test.js","sourceRoot":"","sources":["../../src/ui/live-area-height.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,mBAAmB,EACnB,oBAAoB,EACpB,oBAAoB,GACrB,MAAM,uBAAuB,CAAC;AAG/B,MAAM,OAAO,GAAG,EAAE,CAAC;AAEnB,SAAS,SAAS,CAAC,EAAU,EAAE,KAAa;IAC1C,OAAO;QACL,IAAI,EAAE,WAAW;QACjB,EAAE;QACF,IAAI,EAAE,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,IAAI,CA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,aAAa,EAAE,EAAE;SAClB,CAAC,CAAC;QACH,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,sBAAsB,EAAE,GAAG,EAAE;IACpC,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QACpE,MAAM,CACJ,oBAAoB,CAAC;YACnB,SAAS,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,SAAS,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;YACrD,aAAa,EAAE,EAAE;YACjB,OAAO,EAAE,OAAO;YAChB,cAAc,EAAE,EAAE;SACnB,CAAC,CACH,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;IACb,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,uDAAuD,EAAE,GAAG,EAAE;QAC/D,MAAM,CACJ,oBAAoB,CAAC;YACnB,SAAS,EAAE,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC;YAC/B,aAAa,EAAE,EAAE;YACjB,OAAO,EAAE,OAAO;YAChB,cAAc,EAAE,EAAE;SACnB,CAAC,CACH,CAAC,aAAa,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2CAA2C,EAAE,GAAG,EAAE;QACnD,MAAM,CACJ,oBAAoB,CAAC;YACnB,SAAS,EAAE,EAAE;YACb,aAAa,EAAE,EAAE;YACjB,OAAO,EAAE,OAAO;YAChB,cAAc,EAAE,EAAE;SACnB,CAAC,CACH,CAAC,aAAa,EAAE,CAAC;IACpB,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-frame-height.test.d.ts","sourceRoot":"","sources":["../../src/ui/live-frame-height.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { renderToString } from "ink";
|
|
4
|
+
import { describe, expect, it } from "vitest";
|
|
5
|
+
import { renderTranscriptItem } from "./transcript/TranscriptRenderer.js";
|
|
6
|
+
import { getChatControlsLayoutDecision, MIN_LIVE_AREA_ROWS } from "./layout-decisions.js";
|
|
7
|
+
import { TerminalSizeProvider } from "./hooks/useTerminalSize.js";
|
|
8
|
+
import { useTheme } from "./theme/theme.js";
|
|
9
|
+
function stripAnsi(value) {
|
|
10
|
+
return value.replace(new RegExp(String.raw `\u001B\[[0-?]*[ -/]*[@-~]`, "g"), "");
|
|
11
|
+
}
|
|
12
|
+
const noFooterStatus = {
|
|
13
|
+
hasBackgroundTasks: false,
|
|
14
|
+
hasUpdateNotice: false,
|
|
15
|
+
stack: false,
|
|
16
|
+
compactBackgroundTasks: false,
|
|
17
|
+
};
|
|
18
|
+
const ROWS = 24;
|
|
19
|
+
const COLUMNS = 60;
|
|
20
|
+
// Worst case for the live-frame jump: the agent has just gone idle, so the
|
|
21
|
+
// activity/status row disappears and the controls shrink — which grows the live
|
|
22
|
+
// area to nearly fill the screen right as the finalized assistant row renders.
|
|
23
|
+
const idleControlsRows = getChatControlsLayoutDecision({
|
|
24
|
+
rows: ROWS,
|
|
25
|
+
columns: COLUMNS,
|
|
26
|
+
agentRunning: false,
|
|
27
|
+
activityVisible: false,
|
|
28
|
+
doneStatusVisible: false,
|
|
29
|
+
stallStatusVisible: false,
|
|
30
|
+
exitPending: false,
|
|
31
|
+
footerStatusLayout: noFooterStatus,
|
|
32
|
+
taskBarExpanded: false,
|
|
33
|
+
footerFitsOnOneLine: true,
|
|
34
|
+
liveToolPanelRows: 0,
|
|
35
|
+
}).controlsRows;
|
|
36
|
+
// Mirror useChatLayoutMeasurements: rows - controlsRows - 2 (the widened cushion).
|
|
37
|
+
const measuredLiveAreaRows = Math.max(MIN_LIVE_AREA_ROWS, ROWS - idleControlsRows - 2);
|
|
38
|
+
// A previous tool boundary forces the assistant transcript item's top margin.
|
|
39
|
+
const previousToolGroup = {
|
|
40
|
+
kind: "tool_group",
|
|
41
|
+
id: "tool-group-1",
|
|
42
|
+
tools: [],
|
|
43
|
+
};
|
|
44
|
+
function ThemedTranscriptItem({ item }) {
|
|
45
|
+
const theme = useTheme();
|
|
46
|
+
const items = [previousToolGroup, item];
|
|
47
|
+
return (_jsx(_Fragment, { children: renderTranscriptItem({
|
|
48
|
+
item,
|
|
49
|
+
index: 1,
|
|
50
|
+
items,
|
|
51
|
+
version: "0.0.0-test",
|
|
52
|
+
currentModel: "test-model",
|
|
53
|
+
currentProvider: "anthropic",
|
|
54
|
+
displayedCwd: "/tmp",
|
|
55
|
+
columns: COLUMNS,
|
|
56
|
+
theme,
|
|
57
|
+
renderMarkdown: true,
|
|
58
|
+
measuredLiveAreaRows,
|
|
59
|
+
}) }));
|
|
60
|
+
}
|
|
61
|
+
function renderFrameLineCount(item) {
|
|
62
|
+
const output = renderToString(_jsx(TerminalSizeProvider, { children: _jsx(ThemedTranscriptItem, { item: item }) }), { columns: COLUMNS });
|
|
63
|
+
return stripAnsi(output).split("\n").filter(Boolean).length;
|
|
64
|
+
}
|
|
65
|
+
describe("live frame height", () => {
|
|
66
|
+
it("keeps a tall finalized assistant frame (with thinking) below terminal height", () => {
|
|
67
|
+
const text = Array.from({ length: ROWS * 3 }, (_, index) => `final line ${index + 1}`).join("\n");
|
|
68
|
+
const item = {
|
|
69
|
+
kind: "assistant",
|
|
70
|
+
id: "assistant-tall-thinking",
|
|
71
|
+
text,
|
|
72
|
+
thinking: "internal reasoning that collapses to a header",
|
|
73
|
+
thinkingMs: 1200,
|
|
74
|
+
};
|
|
75
|
+
const lines = renderFrameLineCount(item);
|
|
76
|
+
// Adding back the controls must never reach the terminal height, or Ink
|
|
77
|
+
// enters its fullscreen clearTerminal path and snaps the controls to the top.
|
|
78
|
+
expect(lines + idleControlsRows).toBeLessThanOrEqual(ROWS - 1);
|
|
79
|
+
});
|
|
80
|
+
it("keeps a tall finalized assistant frame (no thinking) below terminal height", () => {
|
|
81
|
+
const text = Array.from({ length: ROWS * 3 }, (_, index) => `final line ${index + 1}`).join("\n");
|
|
82
|
+
const item = {
|
|
83
|
+
kind: "assistant",
|
|
84
|
+
id: "assistant-tall-plain",
|
|
85
|
+
text,
|
|
86
|
+
};
|
|
87
|
+
const lines = renderFrameLineCount(item);
|
|
88
|
+
expect(lines + idleControlsRows).toBeLessThanOrEqual(ROWS - 1);
|
|
89
|
+
});
|
|
90
|
+
it("reserves identical controls and live-area rows idle vs running (constant footer)", () => {
|
|
91
|
+
const baseInputs = {
|
|
92
|
+
rows: ROWS,
|
|
93
|
+
columns: COLUMNS,
|
|
94
|
+
doneStatusVisible: false,
|
|
95
|
+
stallStatusVisible: false,
|
|
96
|
+
exitPending: false,
|
|
97
|
+
footerStatusLayout: noFooterStatus,
|
|
98
|
+
taskBarExpanded: false,
|
|
99
|
+
footerFitsOnOneLine: true,
|
|
100
|
+
liveToolPanelRows: 0,
|
|
101
|
+
};
|
|
102
|
+
const idle = getChatControlsLayoutDecision({
|
|
103
|
+
...baseInputs,
|
|
104
|
+
agentRunning: false,
|
|
105
|
+
activityVisible: false,
|
|
106
|
+
});
|
|
107
|
+
const running = getChatControlsLayoutDecision({
|
|
108
|
+
...baseInputs,
|
|
109
|
+
agentRunning: true,
|
|
110
|
+
activityVisible: true,
|
|
111
|
+
});
|
|
112
|
+
expect(idle.controlsRows).toBe(running.controlsRows);
|
|
113
|
+
expect(idle.liveAreaRows).toBe(running.liveAreaRows);
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
//# sourceMappingURL=live-frame-height.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"live-frame-height.test.js","sourceRoot":"","sources":["../../src/ui/live-frame-height.test.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE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E,KAAK;YACnB,eAAe,EAAE,KAAK;SACvB,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,6BAA6B,CAAC;YAC5C,GAAG,UAAU;YACb,YAAY,EAAE,IAAI;YAClB,eAAe,EAAE,IAAI;SACtB,CAAC,CAAC;QAEH,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QACrD,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;IACvD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -40,8 +40,8 @@ export declare function trimFlushedItems<T extends FlushableItem>(items: T[]): T
|
|
|
40
40
|
* All previous items are guaranteed complete — tool calls from this turn
|
|
41
41
|
* finished before `turn_end` fired, and `onTurnText` fires inside `turn_end`.
|
|
42
42
|
*
|
|
43
|
-
* Returns the items to flush to history.
|
|
44
|
-
*
|
|
43
|
+
* Returns the items to flush to history. Callers should keep the live area
|
|
44
|
+
* bounded and avoid re-rendering finalized long text through Ink.
|
|
45
45
|
*/
|
|
46
46
|
export declare function flushOnTurnText<T extends FlushableItem>(liveItems: T[]): T[];
|
|
47
47
|
export declare function flushOverflow<T extends FlushableItem>(liveItems: T[]): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-item-flush.d.ts","sourceRoot":"","sources":["../../src/ui/live-item-flush.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,iDAAiD;AACjD,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,MAAM,CAAC;AAUrC;;;GAGG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAG/C;AAQD;;;;;;;;GAQG;A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AAC,EAAE,EACd,UAAU,EAAE,MAAM,GACjB;IAAE,OAAO,EAAE,CAAC,EAAE,CAAC;IAAC,SAAS,EAAE,CAAC,EAAE,CAAA;CAAE,CAuBlC"}
|
|
@@ -105,8 +105,8 @@ export function trimFlushedItems(items) {
|
|
|
105
105
|
* All previous items are guaranteed complete — tool calls from this turn
|
|
106
106
|
* finished before `turn_end` fired, and `onTurnText` fires inside `turn_end`.
|
|
107
107
|
*
|
|
108
|
-
* Returns the items to flush to history.
|
|
109
|
-
*
|
|
108
|
+
* Returns the items to flush to history. Callers should keep the live area
|
|
109
|
+
* bounded and avoid re-rendering finalized long text through Ink.
|
|
110
110
|
*/
|
|
111
111
|
export function flushOnTurnText(liveItems) {
|
|
112
112
|
return liveItems;
|
|
@@ -145,7 +145,8 @@ export function flushOverflow(liveItems) {
|
|
|
145
145
|
if (splitAt === 0) {
|
|
146
146
|
return { flushed: [], remaining: liveItems };
|
|
147
147
|
}
|
|
148
|
-
|
|
148
|
+
const candidates = liveItems.slice(0, splitAt);
|
|
149
|
+
return { flushed: candidates, remaining: liveItems.slice(splitAt) };
|
|
149
150
|
}
|
|
150
151
|
/**
|
|
151
152
|
* Called when `onTurnEnd` fires with a tool_use stop reason (LLM responded
|
|
@@ -166,6 +167,9 @@ export function flushOnTurnEnd(liveItems, stopReason) {
|
|
|
166
167
|
if (hasPendingToolStart || liveItems.length === 0) {
|
|
167
168
|
return { flushed: [], remaining: liveItems };
|
|
168
169
|
}
|
|
169
|
-
return {
|
|
170
|
+
return {
|
|
171
|
+
flushed: liveItems,
|
|
172
|
+
remaining: [],
|
|
173
|
+
};
|
|
170
174
|
}
|
|
171
175
|
//# sourceMappingURL=live-item-flush.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live-item-flush.js","sourceRoot":"","sources":["../../src/ui/live-item-flush.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAQH;;;;GAIG;AACH,MAAM,CAAC,MAAM,iBAAiB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AE,CAAC;IAC/C,CAAC;IAED,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;IAC/C,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,SAAS,CAAC,KAAK,CAAC,OAAO,CAAC,EAAE,CAAC;AACtE,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAC5B,SAAc,EACd,UAAkB;IAElB,IAAI,UAAU,KAAK,UAAU,EAAE,CAAC;QAC9B,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IAC/C,CAAC;IAED,MAAM,mBAAmB,GAAG,SAAS,CAAC,IAAI,CACxC,CAAC,IAAI,EAAE,EAAE,CACP,IAAI,CAAC,IAAI,KAAK,YAAY;QAC1B,IAAI,CAAC,IAAI,KAAK,mBAAmB;QACjC,CAAC,IAAI,CAAC,IAAI,KAAK,YAAY;YACzB,CAAE,IAAmD,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CACrE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,KAAK,SAAS,CAC9B,CAAC,CACP,CAAC;IAEF,IAAI,mBAAmB,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAClD,OAAO,EAAE,OAAO,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,CAAC;IAC/C,CAAC;IAED,OAAO;QACL,OAAO,EAAE,SAAS;QAClB,SAAS,EAAE,EAAE;KACd,CAAC;AACJ,CAAC"}
|
package/dist/ui/login.js
CHANGED
|
@@ -30,7 +30,7 @@ let _gradient = DEFAULT_GRADIENT;
|
|
|
30
30
|
let _primary = DEFAULT_PRIMARY;
|
|
31
31
|
let _accent = DEFAULT_ACCENT;
|
|
32
32
|
const PROVIDERS = [
|
|
33
|
-
{ label: "Anthropic", value: "anthropic", description: "Claude Opus 4.
|
|
33
|
+
{ label: "Anthropic", value: "anthropic", description: "Claude Opus 4.8, Sonnet 4.6, Haiku 4.5" },
|
|
34
34
|
{ label: "OpenAI", value: "openai", description: "GPT-5.5, GPT-5.5 Pro, GPT-5.4, GPT-5.3 Codex" },
|
|
35
35
|
{ label: "Gemini", value: "gemini", description: "Gemini 3.1 Flash Lite Preview" },
|
|
36
36
|
{ label: "Moonshot", value: "moonshot", description: "Kimi K2.6" },
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"long-prompt-regression-harness.test.d.ts","sourceRoot":"","sources":["../../src/ui/long-prompt-regression-harness.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Box, Static, Text, render } from "ink";
|
|
4
|
+
import { describe, expect, it } from "vitest";
|
|
5
|
+
import { UserMessage } from "./components/UserMessage.js";
|
|
6
|
+
import { getScrollStabilizationDecision, getStaticHistoryKey, hasParagraphBreakLiveUserMessage, isTallLiveUserMessage, } from "./App.js";
|
|
7
|
+
function renderHarnessItem(item) {
|
|
8
|
+
if (item.kind === "banner")
|
|
9
|
+
return _jsx(Text, { children: "GG CODER BANNER" });
|
|
10
|
+
if (item.kind === "user")
|
|
11
|
+
return _jsx(UserMessage, { text: item.text });
|
|
12
|
+
return _jsx(Text, { children: item.text });
|
|
13
|
+
}
|
|
14
|
+
function LongPromptHarness({ history, liveItems, resizeKey, staticRenderProbe, }) {
|
|
15
|
+
const hasTallLiveUserMessage = liveItems.some((item) => item.kind === "user" && isTallLiveUserMessage(item.text, 24));
|
|
16
|
+
const hasParagraphBreakUserMessage = liveItems.some((item) => item.kind === "user" && hasParagraphBreakLiveUserMessage(item.text));
|
|
17
|
+
const scrollStabilizationDecision = getScrollStabilizationDecision({
|
|
18
|
+
isUserScrolled: false,
|
|
19
|
+
hasNewOutput: liveItems.length > 0,
|
|
20
|
+
hasTallLiveUserMessage,
|
|
21
|
+
hasParagraphBreakLiveUserMessage: hasParagraphBreakUserMessage,
|
|
22
|
+
});
|
|
23
|
+
const staticHistoryKey = scrollStabilizationDecision.preserveStatic
|
|
24
|
+
? getStaticHistoryKey({ resizeKey: 0 })
|
|
25
|
+
: getStaticHistoryKey({ resizeKey });
|
|
26
|
+
return (_jsxs(Box, { flexDirection: "column", width: 80, children: [_jsx(Static, { items: history, children: (item) => {
|
|
27
|
+
staticRenderProbe?.(item);
|
|
28
|
+
return _jsx(Box, { children: renderHarnessItem(item) }, item.id);
|
|
29
|
+
} }, staticHistoryKey), _jsx(Box, { flexDirection: "column", children: liveItems.map((item) => (_jsx(Box, { children: renderHarnessItem(item) }, item.id))) })] }));
|
|
30
|
+
}
|
|
31
|
+
function stripAnsi(value) {
|
|
32
|
+
return value.replace(new RegExp(String.raw `\u001B\[[0-?]*[ -/]*[@-~]`, "g"), "");
|
|
33
|
+
}
|
|
34
|
+
function count(value, needle) {
|
|
35
|
+
return value.split(needle).length - 1;
|
|
36
|
+
}
|
|
37
|
+
function splitDebugFrames(output) {
|
|
38
|
+
return stripAnsi(output)
|
|
39
|
+
.split(/\n\s*\n/)
|
|
40
|
+
.map((frame) => frame.trim())
|
|
41
|
+
.filter(Boolean);
|
|
42
|
+
}
|
|
43
|
+
const tallPrompt = Array.from({ length: 18 }, (_, i) => `LONG_PROMPT_LINE_${String(i + 1).padStart(2, "0")}`).join("\n");
|
|
44
|
+
const paragraphBreakPrompt = "This\n\nIs\n\nA\n\nTest...";
|
|
45
|
+
describe("long prompt regression harness", () => {
|
|
46
|
+
it("reproduces paragraph-break prompt scrollback instability before assistant output", () => {
|
|
47
|
+
expect(isTallLiveUserMessage(paragraphBreakPrompt, 24)).toBe(false);
|
|
48
|
+
expect(hasParagraphBreakLiveUserMessage(paragraphBreakPrompt)).toBe(true);
|
|
49
|
+
const history = [{ kind: "banner", id: "banner" }];
|
|
50
|
+
const liveSubmittedPrompt = {
|
|
51
|
+
kind: "user",
|
|
52
|
+
id: "submitted-paragraph-breaks",
|
|
53
|
+
text: paragraphBreakPrompt,
|
|
54
|
+
};
|
|
55
|
+
let output = "";
|
|
56
|
+
const staticRenders = [];
|
|
57
|
+
const stdout = {
|
|
58
|
+
columns: 80,
|
|
59
|
+
rows: 24,
|
|
60
|
+
write(chunk) {
|
|
61
|
+
output += chunk;
|
|
62
|
+
return true;
|
|
63
|
+
},
|
|
64
|
+
on() { },
|
|
65
|
+
off() { },
|
|
66
|
+
};
|
|
67
|
+
const { rerender, unmount } = render(_jsx(LongPromptHarness, { history: history, liveItems: [liveSubmittedPrompt], resizeKey: 0, staticRenderProbe: (item) => staticRenders.push(item.id) }), { stdout, columns: 80, rows: 24, debug: true });
|
|
68
|
+
// Model immediate post-submit terminal churn before any assistant output: a resize/remount
|
|
69
|
+
// during a short paragraph-break live prompt must not replay Static or duplicate the prompt.
|
|
70
|
+
rerender(_jsx(LongPromptHarness, { history: history, liveItems: [liveSubmittedPrompt], resizeKey: 1, staticRenderProbe: (item) => staticRenders.push(item.id) }));
|
|
71
|
+
const frames = splitDebugFrames(output);
|
|
72
|
+
const scrollback = stripAnsi(output);
|
|
73
|
+
const lastFullScreenFrame = [...frames].reverse().find((frame) => frame.includes("GG CODER BANNER")) ?? "";
|
|
74
|
+
const lastPromptFrame = [...frames].reverse().find((frame) => frame.includes("> This")) ?? "";
|
|
75
|
+
expect(staticRenders).toEqual(["banner"]);
|
|
76
|
+
expect(lastFullScreenFrame).toContain("GG CODER BANNER");
|
|
77
|
+
expect(lastPromptFrame).toContain("> This");
|
|
78
|
+
expect(scrollback).toContain("> This ⏎ Is ⏎ A ⏎ Test...");
|
|
79
|
+
unmount();
|
|
80
|
+
});
|
|
81
|
+
it("captures a tall submitted prompt through live updates/remount/resize without clipping or duplication", () => {
|
|
82
|
+
expect(isTallLiveUserMessage(tallPrompt, 24)).toBe(true);
|
|
83
|
+
const history = [{ kind: "banner", id: "banner" }];
|
|
84
|
+
const liveSubmittedPrompt = { kind: "user", id: "submitted", text: tallPrompt };
|
|
85
|
+
let output = "";
|
|
86
|
+
const stdout = {
|
|
87
|
+
columns: 80,
|
|
88
|
+
rows: 24,
|
|
89
|
+
write(chunk) {
|
|
90
|
+
output += chunk;
|
|
91
|
+
return true;
|
|
92
|
+
},
|
|
93
|
+
on() { },
|
|
94
|
+
off() { },
|
|
95
|
+
};
|
|
96
|
+
const instance = render(_jsx(LongPromptHarness, { history: history, liveItems: [liveSubmittedPrompt], resizeKey: 0 }), { stdout, columns: 80, rows: 24, debug: true });
|
|
97
|
+
const { rerender, unmount } = instance;
|
|
98
|
+
rerender(_jsx(LongPromptHarness, { history: history, liveItems: [
|
|
99
|
+
liveSubmittedPrompt,
|
|
100
|
+
{ kind: "assistant", id: "agent-1", text: "agent live update 1" },
|
|
101
|
+
], resizeKey: 0 }));
|
|
102
|
+
rerender(_jsx(LongPromptHarness, { history: history, liveItems: [
|
|
103
|
+
liveSubmittedPrompt,
|
|
104
|
+
{ kind: "assistant", id: "agent-2", text: "agent live update 2 after remount" },
|
|
105
|
+
], resizeKey: 1 }));
|
|
106
|
+
const frames = stripAnsi(output).split("GG CODER BANNER");
|
|
107
|
+
const frame = `GG CODER BANNER${frames.at(-1) ?? ""}`;
|
|
108
|
+
expect(count(frame, "GG CODER BANNER")).toBe(1);
|
|
109
|
+
expect(count(frame, "> LONG_PROMPT_LINE_01")).toBe(1);
|
|
110
|
+
expect(count(frame, "LONG_PROMPT_LINE_02")).toBe(1);
|
|
111
|
+
expect(count(frame, "LONG_PROMPT_LINE_18")).toBe(1);
|
|
112
|
+
expect(frame).toContain("agent live update 2 after remount");
|
|
113
|
+
unmount();
|
|
114
|
+
});
|
|
115
|
+
it("observes duplicate scrollback frames when a tall prompt is followed by live output and Static remounts", () => {
|
|
116
|
+
const history = [{ kind: "banner", id: "banner" }];
|
|
117
|
+
const liveSubmittedPrompt = { kind: "user", id: "submitted", text: tallPrompt };
|
|
118
|
+
let output = "";
|
|
119
|
+
const stdout = {
|
|
120
|
+
columns: 80,
|
|
121
|
+
rows: 24,
|
|
122
|
+
write(chunk) {
|
|
123
|
+
output += chunk;
|
|
124
|
+
return true;
|
|
125
|
+
},
|
|
126
|
+
on() { },
|
|
127
|
+
off() { },
|
|
128
|
+
};
|
|
129
|
+
const { rerender, unmount } = render(_jsx(LongPromptHarness, { history: history, liveItems: [liveSubmittedPrompt], resizeKey: 0 }), { stdout, columns: 80, rows: 24, debug: true });
|
|
130
|
+
rerender(_jsx(LongPromptHarness, { history: history, liveItems: [
|
|
131
|
+
liveSubmittedPrompt,
|
|
132
|
+
{ kind: "assistant", id: "agent-1", text: "agent live update before resize" },
|
|
133
|
+
], resizeKey: 0 }));
|
|
134
|
+
rerender(_jsx(LongPromptHarness, { history: history, liveItems: [
|
|
135
|
+
liveSubmittedPrompt,
|
|
136
|
+
{ kind: "assistant", id: "agent-2", text: "agent live update after resize" },
|
|
137
|
+
], resizeKey: 1 }));
|
|
138
|
+
const frames = splitDebugFrames(output);
|
|
139
|
+
const lastFrame = frames.at(-1) ?? "";
|
|
140
|
+
const lastFullScreenFrame = [...frames].reverse().find((frame) => frame.includes("GG CODER BANNER")) ?? "";
|
|
141
|
+
expect(lastFullScreenFrame).toContain("GG CODER BANNER");
|
|
142
|
+
expect(lastFullScreenFrame).toContain("> LONG_PROMPT_LINE_01");
|
|
143
|
+
expect(lastFullScreenFrame).toContain("LONG_PROMPT_LINE_18");
|
|
144
|
+
expect(lastFrame).toContain("> LONG_PROMPT_LINE_01");
|
|
145
|
+
unmount();
|
|
146
|
+
});
|
|
147
|
+
it("keeps Static history keyed stable when tall-message/user-scroll stabilization is active", () => {
|
|
148
|
+
const tallDecision = getScrollStabilizationDecision({
|
|
149
|
+
isUserScrolled: false,
|
|
150
|
+
hasNewOutput: true,
|
|
151
|
+
hasTallLiveUserMessage: true,
|
|
152
|
+
});
|
|
153
|
+
const scrolledDecision = getScrollStabilizationDecision({
|
|
154
|
+
isUserScrolled: true,
|
|
155
|
+
hasNewOutput: true,
|
|
156
|
+
hasTallLiveUserMessage: false,
|
|
157
|
+
});
|
|
158
|
+
const paragraphBreakDecision = getScrollStabilizationDecision({
|
|
159
|
+
isUserScrolled: false,
|
|
160
|
+
hasNewOutput: true,
|
|
161
|
+
hasTallLiveUserMessage: false,
|
|
162
|
+
hasParagraphBreakLiveUserMessage: true,
|
|
163
|
+
});
|
|
164
|
+
expect(tallDecision).toEqual({ preserveStatic: true, autoFollow: false });
|
|
165
|
+
expect(scrolledDecision).toEqual({ preserveStatic: true, autoFollow: false });
|
|
166
|
+
expect(paragraphBreakDecision).toEqual({ preserveStatic: true, autoFollow: true });
|
|
167
|
+
expect(getStaticHistoryKey({ resizeKey: 7 })).toBe(getStaticHistoryKey({ resizeKey: 7 }));
|
|
168
|
+
});
|
|
169
|
+
it("does not replay Static history while live tall-prompt output changes without resize", () => {
|
|
170
|
+
const staticRenders = [];
|
|
171
|
+
const history = [
|
|
172
|
+
{ kind: "banner", id: "banner" },
|
|
173
|
+
{ kind: "assistant", id: "history-1", text: "already flushed history" },
|
|
174
|
+
];
|
|
175
|
+
const liveSubmittedPrompt = { kind: "user", id: "submitted", text: tallPrompt };
|
|
176
|
+
const stdout = {
|
|
177
|
+
columns: 80,
|
|
178
|
+
rows: 24,
|
|
179
|
+
write() {
|
|
180
|
+
return true;
|
|
181
|
+
},
|
|
182
|
+
on() { },
|
|
183
|
+
off() { },
|
|
184
|
+
};
|
|
185
|
+
const { rerender, unmount } = render(_jsx(LongPromptHarness, { history: history, liveItems: [liveSubmittedPrompt], resizeKey: 5, staticRenderProbe: (item) => staticRenders.push(item.id) }), { stdout, columns: 80, rows: 24, debug: true });
|
|
186
|
+
expect(staticRenders).toEqual(["banner", "history-1"]);
|
|
187
|
+
rerender(_jsx(LongPromptHarness, { history: history, liveItems: [
|
|
188
|
+
liveSubmittedPrompt,
|
|
189
|
+
{ kind: "assistant", id: "agent", text: "new live output" },
|
|
190
|
+
], resizeKey: 5, staticRenderProbe: (item) => staticRenders.push(item.id) }));
|
|
191
|
+
expect(staticRenders).toEqual(["banner", "history-1"]);
|
|
192
|
+
unmount();
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
//# sourceMappingURL=long-prompt-regression-harness.test.js.map
|