@prestyj/cli 4.3.210 → 4.3.238
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,139 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { Text, renderToString } from "ink";
|
|
4
|
+
import { describe, expect, it } from "vitest";
|
|
5
|
+
import stripAnsi from "strip-ansi";
|
|
6
|
+
import { ChatControls, ChatLayout } from "./components/ChatLayout.js";
|
|
7
|
+
import { ChatLivePane } from "./components/ChatLivePane.js";
|
|
8
|
+
import { TerminalSizeProvider } from "./hooks/useTerminalSize.js";
|
|
9
|
+
import { renderTranscriptItem } from "./transcript/TranscriptRenderer.js";
|
|
10
|
+
import { loadTheme, ThemeContext } from "./theme/theme.js";
|
|
11
|
+
const COLUMNS = 80;
|
|
12
|
+
const ROWS = 24;
|
|
13
|
+
const CONTROLS_ROWS = 6;
|
|
14
|
+
const LIVE_ROWS = ROWS - CONTROLS_ROWS - 1;
|
|
15
|
+
const theme = loadTheme("dark");
|
|
16
|
+
function rawLines(value) {
|
|
17
|
+
return stripAnsi(value).replace(/\r/g, "\n").split("\n");
|
|
18
|
+
}
|
|
19
|
+
function trimTrailingEmptyLines(lines) {
|
|
20
|
+
const next = [...lines];
|
|
21
|
+
while (next.at(-1) === "")
|
|
22
|
+
next.pop();
|
|
23
|
+
return next;
|
|
24
|
+
}
|
|
25
|
+
function visibleLines(value) {
|
|
26
|
+
return trimTrailingEmptyLines(rawLines(value));
|
|
27
|
+
}
|
|
28
|
+
function countLineContaining(lines, needle) {
|
|
29
|
+
return lines.filter((line) => line.includes(needle)).length;
|
|
30
|
+
}
|
|
31
|
+
function SimulatedControls({ done }) {
|
|
32
|
+
return (_jsxs(ChatControls, { controlsRef: () => { }, children: [_jsx(Text, { children: done ? "SIM_DONE_STATUS" : "SIM_ACTIVITY_STATUS" }), _jsx(Text, { children: "SIM_INPUT_TOP" }), _jsx(Text, { children: "SIM_INPUT_BODY" }), _jsx(Text, { children: "SIM_INPUT_BOTTOM" }), _jsx(Text, { children: "SIM_FOOTER" }), _jsx(Text, { children: "SIM_ACTIVITY_BAR" })] }));
|
|
33
|
+
}
|
|
34
|
+
function SimulatedTui({ liveItems, streamingText = "", done, }) {
|
|
35
|
+
const renderItem = (item, index, items) => renderTranscriptItem({
|
|
36
|
+
item,
|
|
37
|
+
index,
|
|
38
|
+
items,
|
|
39
|
+
version: "sim",
|
|
40
|
+
currentModel: "sim-model",
|
|
41
|
+
currentProvider: "anthropic",
|
|
42
|
+
displayedCwd: "/tmp/sim-project",
|
|
43
|
+
columns: COLUMNS,
|
|
44
|
+
theme,
|
|
45
|
+
renderMarkdown: true,
|
|
46
|
+
measuredLiveAreaRows: LIVE_ROWS,
|
|
47
|
+
});
|
|
48
|
+
return (_jsx(ThemeContext.Provider, { value: theme, children: _jsx(TerminalSizeProvider, { children: _jsxs(ChatLayout, { columns: COLUMNS, children: [_jsx(ChatLivePane, { liveItems: liveItems, renderItem: renderItem, isRunning: !done, visibleStreamingText: streamingText, streamingThinking: "", thinkingMs: 0, reserveStreamingSpacing: false, renderMarkdown: true, measuredLiveAreaRows: LIVE_ROWS, assistantMarginTop: 0, streamingContinuation: false }), _jsx(SimulatedControls, { done: done })] }) }) }));
|
|
49
|
+
}
|
|
50
|
+
function renderSimulationFrame(props) {
|
|
51
|
+
const originalColumns = process.stdout.columns;
|
|
52
|
+
const originalRows = process.stdout.rows;
|
|
53
|
+
process.stdout.columns = COLUMNS;
|
|
54
|
+
process.stdout.rows = ROWS;
|
|
55
|
+
try {
|
|
56
|
+
return visibleLines(renderToString(_jsx(SimulatedTui, { ...props }), { columns: COLUMNS }));
|
|
57
|
+
}
|
|
58
|
+
finally {
|
|
59
|
+
process.stdout.columns = originalColumns;
|
|
60
|
+
process.stdout.rows = originalRows;
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
const longPrompt = Array.from({ length: 28 }, (_, index) => {
|
|
64
|
+
return `SIM_LONG_PROMPT_LINE_${String(index + 1).padStart(2, "0")}`;
|
|
65
|
+
}).join("\n");
|
|
66
|
+
const longAssistant = Array.from({ length: 40 }, (_, index) => {
|
|
67
|
+
return `SIM_ASSISTANT_LINE_${String(index + 1).padStart(2, "0")}`;
|
|
68
|
+
}).join("\n");
|
|
69
|
+
describe("TUI simulation", () => {
|
|
70
|
+
it("keeps compact transcript order and only clamps overflowing active output", () => {
|
|
71
|
+
const running = renderSimulationFrame({
|
|
72
|
+
liveItems: [{ kind: "assistant", id: "assistant-running", text: longAssistant }],
|
|
73
|
+
streamingText: "",
|
|
74
|
+
});
|
|
75
|
+
const done = renderSimulationFrame({ liveItems: [], done: true });
|
|
76
|
+
expect(running).toHaveLength(ROWS - 1);
|
|
77
|
+
expect(done).toHaveLength(CONTROLS_ROWS);
|
|
78
|
+
expect(countLineContaining(running, "SIM_ASSISTANT_LINE_")).toBeGreaterThan(0);
|
|
79
|
+
expect(done.some((line) => line.includes("EZ Coder"))).toBe(false);
|
|
80
|
+
expect(running.slice(-6)).toEqual([
|
|
81
|
+
"SIM_ACTIVITY_STATUS",
|
|
82
|
+
"SIM_INPUT_TOP",
|
|
83
|
+
"SIM_INPUT_BODY",
|
|
84
|
+
"SIM_INPUT_BOTTOM",
|
|
85
|
+
"SIM_FOOTER",
|
|
86
|
+
"SIM_ACTIVITY_BAR",
|
|
87
|
+
]);
|
|
88
|
+
expect(done.slice(-6)).toEqual([
|
|
89
|
+
"SIM_DONE_STATUS",
|
|
90
|
+
"SIM_INPUT_TOP",
|
|
91
|
+
"SIM_INPUT_BODY",
|
|
92
|
+
"SIM_INPUT_BOTTOM",
|
|
93
|
+
"SIM_FOOTER",
|
|
94
|
+
"SIM_ACTIVITY_BAR",
|
|
95
|
+
]);
|
|
96
|
+
});
|
|
97
|
+
it("bottom-clips large prompt/output blocks without duplicating visible chat rows", () => {
|
|
98
|
+
const frame = renderSimulationFrame({
|
|
99
|
+
liveItems: [
|
|
100
|
+
{ kind: "user", id: "long-user", text: longPrompt },
|
|
101
|
+
{ kind: "assistant", id: "long-assistant", text: longAssistant },
|
|
102
|
+
],
|
|
103
|
+
streamingText: "SIM_STREAMING_TAIL",
|
|
104
|
+
});
|
|
105
|
+
expect(frame).toHaveLength(ROWS - 1);
|
|
106
|
+
expect(countLineContaining(frame, "SIM_LONG_PROMPT_LINE_01")).toBeLessThanOrEqual(1);
|
|
107
|
+
expect(countLineContaining(frame, "SIM_ASSISTANT_LINE_40")).toBeLessThanOrEqual(1);
|
|
108
|
+
expect(countLineContaining(frame, "SIM_STREAMING_TAIL")).toBeLessThanOrEqual(1);
|
|
109
|
+
expect(frame.slice(-2)).toEqual(["SIM_FOOTER", "SIM_ACTIVITY_BAR"]);
|
|
110
|
+
});
|
|
111
|
+
it("keeps message/tool spacing stable in the simulated live frame", () => {
|
|
112
|
+
const frame = renderSimulationFrame({
|
|
113
|
+
liveItems: [
|
|
114
|
+
{ kind: "assistant", id: "assistant-intro", text: "I’ll inspect the renderer first." },
|
|
115
|
+
{
|
|
116
|
+
kind: "tool_group",
|
|
117
|
+
id: "tool-group",
|
|
118
|
+
tools: [
|
|
119
|
+
{
|
|
120
|
+
toolCallId: "read-1",
|
|
121
|
+
name: "read",
|
|
122
|
+
args: { file_path: "src/ui/App.tsx" },
|
|
123
|
+
status: "done",
|
|
124
|
+
result: "ok",
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
},
|
|
128
|
+
{ kind: "assistant", id: "assistant-next", text: "Now I’ll patch the layout." },
|
|
129
|
+
],
|
|
130
|
+
});
|
|
131
|
+
const compact = frame.filter((line) => line.length > 0);
|
|
132
|
+
expect(compact).toContain(" ⏺ I’ll inspect the renderer first.");
|
|
133
|
+
// Tool rows now render in the pinned LiveToolPanel, not the transcript.
|
|
134
|
+
expect(compact.some((line) => line.includes("Read") && line.includes("App.tsx"))).toBe(false);
|
|
135
|
+
expect(compact).toContain(" ⏺ Now I’ll patch the layout.");
|
|
136
|
+
expect(countLineContaining(frame, "Now I’ll patch the layout.")).toBe(1);
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
//# sourceMappingURL=tui-simulation.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui-simulation.test.js","sourceRoot":"","sources":["../../src/ui/tui-simulation.test.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,KAAK,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE3D,MAAM,OAAO,GAAG,EAAE,CAAC;AACnB,MAAM,IAAI,GAAG,EAAE,CAAC;AAChB,MAAM,aAAa,GAAG,CAAC,CAAC;AACxB,MAAM,SAAS,GAAG,IAAI,GAAG,aAAa,GAAG,CAAC,CAAC;AAC3C,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC;AAEhC,SAAS,QAAQ,CAAC,KAAa;IAC7B,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC3D,CAAC;AAED,S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@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui-terminal-recorder.test.d.ts","sourceRoot":"","sources":["../../src/ui/tui-terminal-recorder.test.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import React from "react";
|
|
5
|
+
import { render } from "ink";
|
|
6
|
+
import { describe, expect, it } from "vitest";
|
|
7
|
+
import stripAnsi from "strip-ansi";
|
|
8
|
+
import { ChatControls, ChatLayout } from "./components/ChatLayout.js";
|
|
9
|
+
import { ChatLivePane } from "./components/ChatLivePane.js";
|
|
10
|
+
import { TerminalSizeProvider } from "./hooks/useTerminalSize.js";
|
|
11
|
+
import { renderTranscriptItem } from "./transcript/TranscriptRenderer.js";
|
|
12
|
+
import { loadTheme, ThemeContext } from "./theme/theme.js";
|
|
13
|
+
import { createTerminalHistoryPrinter } from "./terminal-history.js";
|
|
14
|
+
import { Text, useStdout } from "ink";
|
|
15
|
+
import { useEffect, useRef, useState } from "react";
|
|
16
|
+
import { useTranscriptHistory } from "./hooks/useTranscriptHistory.js";
|
|
17
|
+
import { ScreenRecorder, makeRecordingStdout } from "./testing/screen-recorder.js";
|
|
18
|
+
const COLUMNS = 80;
|
|
19
|
+
const ROWS = 24;
|
|
20
|
+
const CONTROLS_ROWS = 6;
|
|
21
|
+
const LIVE_ROWS = ROWS - CONTROLS_ROWS - 2;
|
|
22
|
+
const theme = loadTheme("dark");
|
|
23
|
+
const terminalContext = {
|
|
24
|
+
theme,
|
|
25
|
+
columns: COLUMNS,
|
|
26
|
+
version: "sim",
|
|
27
|
+
model: "sim-model",
|
|
28
|
+
provider: "anthropic",
|
|
29
|
+
cwd: "/tmp/sim-project",
|
|
30
|
+
};
|
|
31
|
+
function SimulatedControls({ label }) {
|
|
32
|
+
return (_jsxs(ChatControls, { controlsRef: () => { }, children: [_jsx(Text, { children: label }), _jsx(Text, { children: "SIM_INPUT_TOP" }), _jsx(Text, { children: "SIM_INPUT_BODY" }), _jsx(Text, { children: "SIM_INPUT_BOTTOM" }), _jsx(Text, { children: "SIM_FOOTER" }), _jsx(Text, { children: "SIM_ACTIVITY_BAR" })] }));
|
|
33
|
+
}
|
|
34
|
+
function SimulatedTui({ liveItems, streamingText = "", controlsLabel, }) {
|
|
35
|
+
const renderItem = (item, index, items) => renderTranscriptItem({
|
|
36
|
+
item,
|
|
37
|
+
index,
|
|
38
|
+
items,
|
|
39
|
+
version: "sim",
|
|
40
|
+
currentModel: "sim-model",
|
|
41
|
+
currentProvider: "anthropic",
|
|
42
|
+
displayedCwd: "/tmp/sim-project",
|
|
43
|
+
columns: COLUMNS,
|
|
44
|
+
theme,
|
|
45
|
+
renderMarkdown: true,
|
|
46
|
+
measuredLiveAreaRows: LIVE_ROWS,
|
|
47
|
+
});
|
|
48
|
+
return (_jsx(ThemeContext.Provider, { value: theme, children: _jsx(TerminalSizeProvider, { children: _jsxs(ChatLayout, { columns: COLUMNS, children: [_jsx(ChatLivePane, { liveItems: liveItems, renderItem: renderItem, isRunning: controlsLabel !== "SIM_DONE_STATUS", visibleStreamingText: streamingText, streamingThinking: "", thinkingMs: 0, reserveStreamingSpacing: false, renderMarkdown: true, measuredLiveAreaRows: LIVE_ROWS, assistantMarginTop: 0, streamingContinuation: false }), _jsx(SimulatedControls, { label: controlsLabel })] }) }) }));
|
|
49
|
+
}
|
|
50
|
+
function StatefulSimulatedTui({ initialLiveItems, streamingText = "", controlsLabel, flushItems, }) {
|
|
51
|
+
const { write: writeStdout } = useStdout();
|
|
52
|
+
const [history, setHistory] = useState([]);
|
|
53
|
+
const [liveItems, setLiveItems] = useState(initialLiveItems);
|
|
54
|
+
const flushedRef = useRef(false);
|
|
55
|
+
const { queueFlush } = useTranscriptHistory({
|
|
56
|
+
terminalHistoryPrinter: createTerminalHistoryPrinter(),
|
|
57
|
+
terminalHistoryContext: terminalContext,
|
|
58
|
+
writeStdout,
|
|
59
|
+
sessionPathRef: { current: undefined },
|
|
60
|
+
sessionManagerRef: { current: null },
|
|
61
|
+
history,
|
|
62
|
+
setHistory,
|
|
63
|
+
setLiveItems,
|
|
64
|
+
});
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (!flushItems || flushedRef.current)
|
|
67
|
+
return;
|
|
68
|
+
flushedRef.current = true;
|
|
69
|
+
queueFlush(flushItems);
|
|
70
|
+
}, [flushItems, queueFlush]);
|
|
71
|
+
return (_jsx(SimulatedTui, { liveItems: liveItems, streamingText: streamingText, controlsLabel: controlsLabel }));
|
|
72
|
+
}
|
|
73
|
+
function makeStdout(recorder) {
|
|
74
|
+
return makeRecordingStdout(recorder);
|
|
75
|
+
}
|
|
76
|
+
function normalizedViewport(recorder) {
|
|
77
|
+
return recorder.viewportLines().map((line) => stripAnsi(line));
|
|
78
|
+
}
|
|
79
|
+
function formatFrame(label, lines) {
|
|
80
|
+
const body = lines
|
|
81
|
+
.map((line, index) => `${String(index + 1).padStart(2, "0")}│${line}`)
|
|
82
|
+
.join("\n");
|
|
83
|
+
return `\n=== ${label} ===\n${body}\n`;
|
|
84
|
+
}
|
|
85
|
+
function maybeWriteFrames(frames) {
|
|
86
|
+
if (process.env.GG_TUI_RECORD !== "1")
|
|
87
|
+
return;
|
|
88
|
+
const outPath = path.join(process.cwd(), ".ezcoder", "tui-terminal-recorder.txt");
|
|
89
|
+
fs.mkdirSync(path.dirname(outPath), { recursive: true });
|
|
90
|
+
fs.writeFileSync(outPath, frames.map((frame) => formatFrame(frame.label, frame.lines)).join("\n"));
|
|
91
|
+
}
|
|
92
|
+
const longAssistant = Array.from({ length: 40 }, (_, index) => {
|
|
93
|
+
return `SIM_ASSISTANT_LINE_${String(index + 1).padStart(2, "0")}`;
|
|
94
|
+
}).join("\n");
|
|
95
|
+
async function nextRender() {
|
|
96
|
+
await new Promise((resolve) => setTimeout(resolve, 45));
|
|
97
|
+
}
|
|
98
|
+
describe("TUI terminal recorder", () => {
|
|
99
|
+
it("keeps the final assistant response live on normal done instead of flush-scrolling under controls", async () => {
|
|
100
|
+
const recorder = new ScreenRecorder({ columns: COLUMNS, rows: ROWS });
|
|
101
|
+
const stdout = makeStdout(recorder);
|
|
102
|
+
const frames = [];
|
|
103
|
+
const capture = (label) => frames.push({ label, lines: normalizedViewport(recorder) });
|
|
104
|
+
const mounted = render(_jsx(StatefulSimulatedTui, { initialLiveItems: [{ kind: "assistant", id: "assistant-live", text: longAssistant }], controlsLabel: "SIM_ACTIVITY_STATUS" }), { stdout, columns: COLUMNS, rows: ROWS, patchConsole: false, maxFps: 1000 });
|
|
105
|
+
await nextRender();
|
|
106
|
+
capture("hook active assistant before flush");
|
|
107
|
+
mounted.rerender(_jsx(StatefulSimulatedTui, { initialLiveItems: [{ kind: "assistant", id: "assistant-live", text: longAssistant }], controlsLabel: "SIM_DONE_STATUS" }));
|
|
108
|
+
await nextRender();
|
|
109
|
+
await nextRender();
|
|
110
|
+
capture("hook done after flush");
|
|
111
|
+
const viewport = normalizedViewport(recorder);
|
|
112
|
+
mounted.unmount();
|
|
113
|
+
maybeWriteFrames(frames);
|
|
114
|
+
const activeFrame = frames.find((frame) => frame.label === "hook active assistant before flush")?.lines ?? [];
|
|
115
|
+
const doneFrame = frames.find((frame) => frame.label === "hook done after flush")?.lines ?? [];
|
|
116
|
+
const activeStatusSlot = activeFrame.findIndex((line) => line.includes("SIM_ACTIVITY_STATUS"));
|
|
117
|
+
const doneStatusSlot = doneFrame.findIndex((line) => line.includes("SIM_DONE_STATUS"));
|
|
118
|
+
expect(doneStatusSlot).toBe(activeStatusSlot);
|
|
119
|
+
expect(doneFrame.some((line) => line.includes("SIM_ASSISTANT_LINE_40"))).toBe(true);
|
|
120
|
+
const doneIndex = viewport.findIndex((line) => line.includes("SIM_DONE_STATUS"));
|
|
121
|
+
const footerIndex = viewport.findIndex((line) => line.includes("SIM_FOOTER"));
|
|
122
|
+
expect(doneIndex).toBeGreaterThanOrEqual(0);
|
|
123
|
+
expect(footerIndex).toBeGreaterThan(doneIndex);
|
|
124
|
+
expect(viewport.slice(doneIndex, footerIndex + 2)).toEqual([
|
|
125
|
+
"SIM_DONE_STATUS",
|
|
126
|
+
"SIM_INPUT_TOP",
|
|
127
|
+
"SIM_INPUT_BODY",
|
|
128
|
+
"SIM_INPUT_BOTTOM",
|
|
129
|
+
"SIM_FOOTER",
|
|
130
|
+
"SIM_ACTIVITY_BAR",
|
|
131
|
+
]);
|
|
132
|
+
});
|
|
133
|
+
});
|
|
134
|
+
//# sourceMappingURL=tui-terminal-recorder.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tui-terminal-recorder.test.js","sourceRoot":"","sources":["../../src/ui/tui-terminal-recorder.test.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,SAAS,MAAM,YAAY,CAAC;AAEnC,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uBAAuB,CAAC;AAErE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,KAAK,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EA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IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACvF,MAAM,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;QAC9C,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QAEpF,MAAM,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAC,CAAC;QACjF,MAAM,WAAW,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,CAAC;QAC9E,MAAM,CAAC,SAAS,CAAC,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC;QAC5C,MAAM,CAAC,WAAW,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;QAC/C,MAAM,CAAC,QAAQ,CAAC,KAAK,CAAC,SAAS,EAAE,WAAW,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC;YACzD,iBAAiB;YACjB,eAAe;YACf,gBAAgB;YAChB,kBAAkB;YAClB,YAAY;YACZ,kBAAkB;SACnB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface AssistantStreamSplit {
|
|
2
|
+
flushedText: string;
|
|
3
|
+
remainingText: string;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Decide how much of the in-flight assistant text can be flushed to terminal
|
|
7
|
+
* scrollback while streaming, keeping the trailing in-progress block live.
|
|
8
|
+
*
|
|
9
|
+
* Flushing progressively (instead of dumping the whole response at the end)
|
|
10
|
+
* keeps the live region small so it never has to scroll the full response into
|
|
11
|
+
* scrollback in one shot — that single large write is what makes the TUI
|
|
12
|
+
* "jump up" when the agent finishes.
|
|
13
|
+
*
|
|
14
|
+
* Splits ONLY at paragraph boundaries (blank lines) that sit OUTSIDE code
|
|
15
|
+
* fences, and never trims interior whitespace, so each flushed chunk is a
|
|
16
|
+
* self-contained set of Markdown blocks that renders identically whether shown
|
|
17
|
+
* alone in history or as part of the whole response. (An earlier version split
|
|
18
|
+
* mid-sentence and trimmed whitespace, which broke live/history parity.)
|
|
19
|
+
*
|
|
20
|
+
* Guarantees `flushedText + remainingText === text`.
|
|
21
|
+
*/
|
|
22
|
+
export declare function splitAssistantStreamingText(text: string): AssistantStreamSplit;
|
|
23
|
+
//# sourceMappingURL=assistant-stream-split.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-stream-split.d.ts","sourceRoot":"","sources":["../../../src/ui/utils/assistant-stream-split.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;CACvB;AAOD;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,2BAA2B,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAe9E"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
function isInsideCodeFence(text) {
|
|
2
|
+
const fenceMatches = text.match(/^\s*(`{3,}|~{3,})/gm);
|
|
3
|
+
return (fenceMatches?.length ?? 0) % 2 === 1;
|
|
4
|
+
}
|
|
5
|
+
/**
|
|
6
|
+
* Decide how much of the in-flight assistant text can be flushed to terminal
|
|
7
|
+
* scrollback while streaming, keeping the trailing in-progress block live.
|
|
8
|
+
*
|
|
9
|
+
* Flushing progressively (instead of dumping the whole response at the end)
|
|
10
|
+
* keeps the live region small so it never has to scroll the full response into
|
|
11
|
+
* scrollback in one shot — that single large write is what makes the TUI
|
|
12
|
+
* "jump up" when the agent finishes.
|
|
13
|
+
*
|
|
14
|
+
* Splits ONLY at paragraph boundaries (blank lines) that sit OUTSIDE code
|
|
15
|
+
* fences, and never trims interior whitespace, so each flushed chunk is a
|
|
16
|
+
* self-contained set of Markdown blocks that renders identically whether shown
|
|
17
|
+
* alone in history or as part of the whole response. (An earlier version split
|
|
18
|
+
* mid-sentence and trimmed whitespace, which broke live/history parity.)
|
|
19
|
+
*
|
|
20
|
+
* Guarantees `flushedText + remainingText === text`.
|
|
21
|
+
*/
|
|
22
|
+
export function splitAssistantStreamingText(text) {
|
|
23
|
+
const boundary = /\n[ \t]*\n/g;
|
|
24
|
+
let best = -1;
|
|
25
|
+
let match;
|
|
26
|
+
while ((match = boundary.exec(text)) !== null) {
|
|
27
|
+
const boundaryEnd = match.index + match[0].length;
|
|
28
|
+
// Keep the trailing block live until it too ends in a blank line.
|
|
29
|
+
if (boundaryEnd >= text.length)
|
|
30
|
+
break;
|
|
31
|
+
// Never split inside an open code fence — the chunk would render as broken
|
|
32
|
+
// Markdown (unterminated fence) in history.
|
|
33
|
+
if (isInsideCodeFence(text.slice(0, boundaryEnd)))
|
|
34
|
+
continue;
|
|
35
|
+
best = boundaryEnd;
|
|
36
|
+
}
|
|
37
|
+
if (best <= 0)
|
|
38
|
+
return { flushedText: "", remainingText: text };
|
|
39
|
+
return { flushedText: text.slice(0, best), remainingText: text.slice(best) };
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=assistant-stream-split.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-stream-split.js","sourceRoot":"","sources":["../../../src/ui/utils/assistant-stream-split.ts"],"names":[],"mappings":"AAKA,SAAS,iBAAiB,CAAC,IAAY;IACrC,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC;IACvD,OAAO,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/C,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,UAAU,2BAA2B,CAAC,IAAY;IACtD,MAAM,QAAQ,GAAG,aAAa,CAAC;IAC/B,IAAI,IAAI,GAAG,CAAC,CAAC,CAAC;IACd,IAAI,KAA6B,CAAC;IAClC,OAAO,CAAC,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;QAC9C,MAAM,WAAW,GAAG,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;QAClD,kEAAkE;QAClE,IAAI,WAAW,IAAI,IAAI,CAAC,MAAM;YAAE,MAAM;QACtC,2EAA2E;QAC3E,4CAA4C;QAC5C,IAAI,iBAAiB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,WAAW,CAAC,CAAC;YAAE,SAAS;QAC5D,IAAI,GAAG,WAAW,CAAC;IACrB,CAAC;IACD,IAAI,IAAI,IAAI,CAAC;QAAE,OAAO,EAAE,WAAW,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC;IAC/D,OAAO,EAAE,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-stream-split.test.d.ts","sourceRoot":"","sources":["../../../src/ui/utils/assistant-stream-split.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { describe, expect, it } from "vitest";
|
|
2
|
+
import { splitAssistantStreamingText } from "./assistant-stream-split.js";
|
|
3
|
+
describe("splitAssistantStreamingText", () => {
|
|
4
|
+
it("keeps single-block text live (nothing to flush yet)", () => {
|
|
5
|
+
const cases = [
|
|
6
|
+
"Dr. Jones keeps a notebook full of odd theories and coffee stains.",
|
|
7
|
+
"1. Dr. Jones keeps a spare notebook.\n2. Dr. Jones believes every mystery deserves coffee.",
|
|
8
|
+
"- Dr. Jones once labeled an entire filing cabinet important.\n- Dr. Jones explains with metaphors.",
|
|
9
|
+
];
|
|
10
|
+
for (const text of cases) {
|
|
11
|
+
expect(splitAssistantStreamingText(text)).toEqual({ flushedText: "", remainingText: text });
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
it("flushes completed paragraphs and keeps the trailing block live", () => {
|
|
15
|
+
const text = "Paragraph one.\n\nParagraph two.\n\nParagraph three in progress";
|
|
16
|
+
const { flushedText, remainingText } = splitAssistantStreamingText(text);
|
|
17
|
+
expect(flushedText).toBe("Paragraph one.\n\nParagraph two.\n\n");
|
|
18
|
+
expect(remainingText).toBe("Paragraph three in progress");
|
|
19
|
+
});
|
|
20
|
+
it("is lossless: flushedText + remainingText === text", () => {
|
|
21
|
+
const text = "A.\n\nB.\n\nC still going";
|
|
22
|
+
const { flushedText, remainingText } = splitAssistantStreamingText(text);
|
|
23
|
+
expect(flushedText + remainingText).toBe(text);
|
|
24
|
+
});
|
|
25
|
+
it("never splits at a blank line inside an open code fence", () => {
|
|
26
|
+
// The blank line between the two consts is inside an unterminated fence and
|
|
27
|
+
// must not be a split point; only the paragraph break before the fence is.
|
|
28
|
+
const text = "Here is code:\n\n```ts\nconst one = 1;\n\nconst two = 2;";
|
|
29
|
+
const { flushedText, remainingText } = splitAssistantStreamingText(text);
|
|
30
|
+
expect(flushedText).toBe("Here is code:\n\n");
|
|
31
|
+
expect(remainingText).toBe("```ts\nconst one = 1;\n\nconst two = 2;");
|
|
32
|
+
});
|
|
33
|
+
it("flushes past a closed code fence", () => {
|
|
34
|
+
const text = "Intro.\n\n```ts\nconst x = 1;\n```\n\nTrailing in progress";
|
|
35
|
+
const { flushedText, remainingText } = splitAssistantStreamingText(text);
|
|
36
|
+
expect(flushedText).toBe("Intro.\n\n```ts\nconst x = 1;\n```\n\n");
|
|
37
|
+
expect(remainingText).toBe("Trailing in progress");
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=assistant-stream-split.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"assistant-stream-split.test.js","sourceRoot":"","sources":["../../../src/ui/utils/assistant-stream-split.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAE1E,QAAQ,CAAC,6BAA6B,EAAE,GAAG,EAAE;IAC3C,EAAE,CAAC,qDAAqD,EAAE,GAAG,EAAE;QAC7D,MAAM,KAAK,GAAG;YACZ,oEAAoE;YACpE,4FAA4F;YAC5F,oGAAoG;SACrG,CAAC;QACF,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,CAAC,2BAA2B,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,WAAW,EAAE,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9F,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gEAAgE,EAAE,GAAG,EAAE;QACxE,MAAM,IAAI,GAAG,iEAAiE,CAAC;QAC/E,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACzE,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;QACjE,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;IAC5D,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;QAC3D,MAAM,IAAI,GAAG,2BAA2B,CAAC;QACzC,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACzE,MAAM,CAAC,WAAW,GAAG,aAAa,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,wDAAwD,EAAE,GAAG,EAAE;QAChE,4EAA4E;QAC5E,2EAA2E;QAC3E,MAAM,IAAI,GAAG,0DAA0D,CAAC;QACxE,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACzE,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;QAC9C,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,yCAAyC,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,kCAAkC,EAAE,GAAG,EAAE;QAC1C,MAAM,IAAI,GAAG,4DAA4D,CAAC;QAC1E,MAAM,EAAE,WAAW,EAAE,aAAa,EAAE,GAAG,2BAA2B,CAAC,IAAI,CAAC,CAAC;QACzE,MAAM,CAAC,WAAW,CAAC,CAAC,IAAI,CAAC,wCAAwC,CAAC,CAAC;QACnE,MAAM,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Top-level entry point. Two-phase conversion:
|
|
8
|
+
*
|
|
9
|
+
* 1. Strip `$...$` / `$$...$$` math regions, applying math-mode conversions
|
|
10
|
+
* (including sub/superscripts) to the inner text. The heuristic for
|
|
11
|
+
* "this dollar pair is math" runs against the ORIGINAL input so that
|
|
12
|
+
* model-authored LaTeX is recognised before any tokens are rewritten.
|
|
13
|
+
*
|
|
14
|
+
* 2. Run prose-safe conversions over the remaining text, catching
|
|
15
|
+
* unwrapped LaTeX tokens (`\alpha`, `\to`, `\textbf{...}`) that the
|
|
16
|
+
* model emitted outside math delimiters.
|
|
17
|
+
*
|
|
18
|
+
* Short-circuits on input that has no LaTeX markers at all (`\` or `$`) so
|
|
19
|
+
* the hot rendering path stays cheap for ordinary prose.
|
|
20
|
+
*/
|
|
21
|
+
export declare function convertLatexToUnicode(input: string): string;
|
|
22
|
+
//# sourceMappingURL=latex-to-unicode.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latex-to-unicode.d.ts","sourceRoot":"","sources":["../../../src/ui/utils/latex-to-unicode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqiBH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAY3D"}
|