@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,538 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Copyright 2025 Google LLC
|
|
4
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Converts common LaTeX-style syntax in model output into terminal-friendly
|
|
8
|
+
* Unicode (and lightweight markdown where appropriate).
|
|
9
|
+
*
|
|
10
|
+
* Terminals cannot natively render LaTeX, but model responses — especially for
|
|
11
|
+
* math, CS, and algorithms — frequently include constructs like `$\{P_0,
|
|
12
|
+
* \dots, P_n\}$` or `$\to$`. Left as-is, the raw backslash commands show up
|
|
13
|
+
* verbatim and make the output look broken.
|
|
14
|
+
*
|
|
15
|
+
* This function is a conservative, lossy post-processor that handles the
|
|
16
|
+
* common cases and leaves anything it does not recognise untouched, so that
|
|
17
|
+
* legitimate backslash content (e.g. Windows paths, regex examples) is not
|
|
18
|
+
* mangled.
|
|
19
|
+
*
|
|
20
|
+
* See issue #25656.
|
|
21
|
+
*/
|
|
22
|
+
// Greek letters, lower and upper case, plus the common "var" variants.
|
|
23
|
+
const GREEK_LETTERS = Object.freeze({
|
|
24
|
+
alpha: "α",
|
|
25
|
+
beta: "β",
|
|
26
|
+
gamma: "γ",
|
|
27
|
+
delta: "δ",
|
|
28
|
+
epsilon: "ε",
|
|
29
|
+
zeta: "ζ",
|
|
30
|
+
eta: "η",
|
|
31
|
+
theta: "θ",
|
|
32
|
+
iota: "ι",
|
|
33
|
+
kappa: "κ",
|
|
34
|
+
lambda: "λ",
|
|
35
|
+
mu: "μ",
|
|
36
|
+
nu: "ν",
|
|
37
|
+
xi: "ξ",
|
|
38
|
+
omicron: "ο",
|
|
39
|
+
pi: "π",
|
|
40
|
+
rho: "ρ",
|
|
41
|
+
sigma: "σ",
|
|
42
|
+
tau: "τ",
|
|
43
|
+
upsilon: "υ",
|
|
44
|
+
phi: "φ",
|
|
45
|
+
chi: "χ",
|
|
46
|
+
psi: "ψ",
|
|
47
|
+
omega: "ω",
|
|
48
|
+
Alpha: "Α",
|
|
49
|
+
Beta: "Β",
|
|
50
|
+
Gamma: "Γ",
|
|
51
|
+
Delta: "Δ",
|
|
52
|
+
Epsilon: "Ε",
|
|
53
|
+
Zeta: "Ζ",
|
|
54
|
+
Eta: "Η",
|
|
55
|
+
Theta: "Θ",
|
|
56
|
+
Iota: "Ι",
|
|
57
|
+
Kappa: "Κ",
|
|
58
|
+
Lambda: "Λ",
|
|
59
|
+
Mu: "Μ",
|
|
60
|
+
Nu: "Ν",
|
|
61
|
+
Xi: "Ξ",
|
|
62
|
+
Omicron: "Ο",
|
|
63
|
+
Pi: "Π",
|
|
64
|
+
Rho: "Ρ",
|
|
65
|
+
Sigma: "Σ",
|
|
66
|
+
Tau: "Τ",
|
|
67
|
+
Upsilon: "Υ",
|
|
68
|
+
Phi: "Φ",
|
|
69
|
+
Chi: "Χ",
|
|
70
|
+
Psi: "Ψ",
|
|
71
|
+
Omega: "Ω",
|
|
72
|
+
varepsilon: "ε",
|
|
73
|
+
vartheta: "ϑ",
|
|
74
|
+
varphi: "φ",
|
|
75
|
+
varrho: "ϱ",
|
|
76
|
+
varsigma: "ς",
|
|
77
|
+
varpi: "ϖ",
|
|
78
|
+
});
|
|
79
|
+
// Named LaTeX commands → Unicode. Covers arrows, relations, set theory,
|
|
80
|
+
// logic, large operators, and a handful of common decorations. Anything not
|
|
81
|
+
// listed here is deliberately left untouched.
|
|
82
|
+
const LATEX_COMMANDS = Object.freeze({
|
|
83
|
+
// Arrows
|
|
84
|
+
to: "→",
|
|
85
|
+
rightarrow: "→",
|
|
86
|
+
Rightarrow: "⇒",
|
|
87
|
+
leftarrow: "←",
|
|
88
|
+
Leftarrow: "⇐",
|
|
89
|
+
leftrightarrow: "↔",
|
|
90
|
+
Leftrightarrow: "⇔",
|
|
91
|
+
mapsto: "↦",
|
|
92
|
+
longrightarrow: "⟶",
|
|
93
|
+
longleftarrow: "⟵",
|
|
94
|
+
longleftrightarrow: "⟷",
|
|
95
|
+
uparrow: "↑",
|
|
96
|
+
downarrow: "↓",
|
|
97
|
+
Uparrow: "⇑",
|
|
98
|
+
Downarrow: "⇓",
|
|
99
|
+
hookrightarrow: "↪",
|
|
100
|
+
hookleftarrow: "↩",
|
|
101
|
+
// Ellipses
|
|
102
|
+
dots: "…",
|
|
103
|
+
ldots: "…",
|
|
104
|
+
cdots: "⋯",
|
|
105
|
+
vdots: "⋮",
|
|
106
|
+
ddots: "⋱",
|
|
107
|
+
// Arithmetic / comparison
|
|
108
|
+
times: "×",
|
|
109
|
+
cdot: "·",
|
|
110
|
+
div: "÷",
|
|
111
|
+
pm: "±",
|
|
112
|
+
mp: "∓",
|
|
113
|
+
ast: "∗",
|
|
114
|
+
leq: "≤",
|
|
115
|
+
le: "≤",
|
|
116
|
+
geq: "≥",
|
|
117
|
+
ge: "≥",
|
|
118
|
+
neq: "≠",
|
|
119
|
+
ne: "≠",
|
|
120
|
+
ll: "≪",
|
|
121
|
+
gg: "≫",
|
|
122
|
+
approx: "≈",
|
|
123
|
+
equiv: "≡",
|
|
124
|
+
sim: "∼",
|
|
125
|
+
simeq: "≃",
|
|
126
|
+
cong: "≅",
|
|
127
|
+
propto: "∝",
|
|
128
|
+
// Set theory
|
|
129
|
+
in: "∈",
|
|
130
|
+
notin: "∉",
|
|
131
|
+
ni: "∋",
|
|
132
|
+
subset: "⊂",
|
|
133
|
+
supset: "⊃",
|
|
134
|
+
subseteq: "⊆",
|
|
135
|
+
supseteq: "⊇",
|
|
136
|
+
cup: "∪",
|
|
137
|
+
cap: "∩",
|
|
138
|
+
setminus: "∖",
|
|
139
|
+
emptyset: "∅",
|
|
140
|
+
varnothing: "∅",
|
|
141
|
+
// Logic
|
|
142
|
+
forall: "∀",
|
|
143
|
+
exists: "∃",
|
|
144
|
+
nexists: "∄",
|
|
145
|
+
neg: "¬",
|
|
146
|
+
lnot: "¬",
|
|
147
|
+
land: "∧",
|
|
148
|
+
wedge: "∧",
|
|
149
|
+
lor: "∨",
|
|
150
|
+
vee: "∨",
|
|
151
|
+
oplus: "⊕",
|
|
152
|
+
otimes: "⊗",
|
|
153
|
+
implies: "⟹",
|
|
154
|
+
iff: "⟺",
|
|
155
|
+
// Large operators
|
|
156
|
+
sum: "∑",
|
|
157
|
+
prod: "∏",
|
|
158
|
+
coprod: "∐",
|
|
159
|
+
int: "∫",
|
|
160
|
+
iint: "∬",
|
|
161
|
+
iiint: "∭",
|
|
162
|
+
oint: "∮",
|
|
163
|
+
// Calculus
|
|
164
|
+
partial: "∂",
|
|
165
|
+
nabla: "∇",
|
|
166
|
+
infty: "∞",
|
|
167
|
+
// Misc letters / constants
|
|
168
|
+
ell: "ℓ",
|
|
169
|
+
hbar: "ℏ",
|
|
170
|
+
Re: "ℜ",
|
|
171
|
+
Im: "ℑ",
|
|
172
|
+
aleph: "ℵ",
|
|
173
|
+
beth: "ℶ",
|
|
174
|
+
// Brackets / delimiters
|
|
175
|
+
lbrace: "{",
|
|
176
|
+
rbrace: "}",
|
|
177
|
+
lbrack: "[",
|
|
178
|
+
rbrack: "]",
|
|
179
|
+
langle: "⟨",
|
|
180
|
+
rangle: "⟩",
|
|
181
|
+
lceil: "⌈",
|
|
182
|
+
rceil: "⌉",
|
|
183
|
+
lfloor: "⌊",
|
|
184
|
+
rfloor: "⌋",
|
|
185
|
+
// Geometry / misc
|
|
186
|
+
perp: "⊥",
|
|
187
|
+
parallel: "∥",
|
|
188
|
+
angle: "∠",
|
|
189
|
+
triangle: "△",
|
|
190
|
+
square: "□",
|
|
191
|
+
circ: "∘",
|
|
192
|
+
bullet: "•",
|
|
193
|
+
star: "⋆",
|
|
194
|
+
prime: "′",
|
|
195
|
+
dag: "†",
|
|
196
|
+
ddag: "‡",
|
|
197
|
+
therefore: "∴",
|
|
198
|
+
because: "∵",
|
|
199
|
+
top: "⊤",
|
|
200
|
+
bot: "⊥",
|
|
201
|
+
// Operator names (`\log`, `\sin`, …) render in LaTeX as upright text. In a
|
|
202
|
+
// terminal the closest equivalent is the lowercase word itself.
|
|
203
|
+
log: "log",
|
|
204
|
+
ln: "ln",
|
|
205
|
+
lg: "lg",
|
|
206
|
+
exp: "exp",
|
|
207
|
+
sin: "sin",
|
|
208
|
+
cos: "cos",
|
|
209
|
+
tan: "tan",
|
|
210
|
+
cot: "cot",
|
|
211
|
+
sec: "sec",
|
|
212
|
+
csc: "csc",
|
|
213
|
+
arcsin: "arcsin",
|
|
214
|
+
arccos: "arccos",
|
|
215
|
+
arctan: "arctan",
|
|
216
|
+
sinh: "sinh",
|
|
217
|
+
cosh: "cosh",
|
|
218
|
+
tanh: "tanh",
|
|
219
|
+
max: "max",
|
|
220
|
+
min: "min",
|
|
221
|
+
sup: "sup",
|
|
222
|
+
inf: "inf",
|
|
223
|
+
lim: "lim",
|
|
224
|
+
limsup: "lim sup",
|
|
225
|
+
liminf: "lim inf",
|
|
226
|
+
arg: "arg",
|
|
227
|
+
det: "det",
|
|
228
|
+
dim: "dim",
|
|
229
|
+
ker: "ker",
|
|
230
|
+
gcd: "gcd",
|
|
231
|
+
deg: "deg",
|
|
232
|
+
hom: "hom",
|
|
233
|
+
mod: "mod",
|
|
234
|
+
bmod: "mod",
|
|
235
|
+
pmod: "mod",
|
|
236
|
+
// Whitespace commands — render as visible space so layout is roughly right.
|
|
237
|
+
quad: " ",
|
|
238
|
+
qquad: " ",
|
|
239
|
+
// These are all "thin-space" style commands in LaTeX; render as a single
|
|
240
|
+
// space so the surrounding tokens don't jam together.
|
|
241
|
+
",": " ",
|
|
242
|
+
";": " ",
|
|
243
|
+
":": " ",
|
|
244
|
+
"!": "",
|
|
245
|
+
});
|
|
246
|
+
// Unicode subscript mappings (digits, operators, and the common letters that
|
|
247
|
+
// have full-height subscript glyphs in Unicode).
|
|
248
|
+
const SUBSCRIPT_MAP = Object.freeze({
|
|
249
|
+
"0": "₀",
|
|
250
|
+
"1": "₁",
|
|
251
|
+
"2": "₂",
|
|
252
|
+
"3": "₃",
|
|
253
|
+
"4": "₄",
|
|
254
|
+
"5": "₅",
|
|
255
|
+
"6": "₆",
|
|
256
|
+
"7": "₇",
|
|
257
|
+
"8": "₈",
|
|
258
|
+
"9": "₉",
|
|
259
|
+
"+": "₊",
|
|
260
|
+
"-": "₋",
|
|
261
|
+
"=": "₌",
|
|
262
|
+
"(": "₍",
|
|
263
|
+
")": "₎",
|
|
264
|
+
a: "ₐ",
|
|
265
|
+
e: "ₑ",
|
|
266
|
+
h: "ₕ",
|
|
267
|
+
i: "ᵢ",
|
|
268
|
+
j: "ⱼ",
|
|
269
|
+
k: "ₖ",
|
|
270
|
+
l: "ₗ",
|
|
271
|
+
m: "ₘ",
|
|
272
|
+
n: "ₙ",
|
|
273
|
+
o: "ₒ",
|
|
274
|
+
p: "ₚ",
|
|
275
|
+
r: "ᵣ",
|
|
276
|
+
s: "ₛ",
|
|
277
|
+
t: "ₜ",
|
|
278
|
+
u: "ᵤ",
|
|
279
|
+
v: "ᵥ",
|
|
280
|
+
x: "ₓ",
|
|
281
|
+
});
|
|
282
|
+
// Unicode superscript mappings. A superset of subscripts — most letters have
|
|
283
|
+
// superscript glyphs.
|
|
284
|
+
const SUPERSCRIPT_MAP = Object.freeze({
|
|
285
|
+
"0": "⁰",
|
|
286
|
+
"1": "¹",
|
|
287
|
+
"2": "²",
|
|
288
|
+
"3": "³",
|
|
289
|
+
"4": "⁴",
|
|
290
|
+
"5": "⁵",
|
|
291
|
+
"6": "⁶",
|
|
292
|
+
"7": "⁷",
|
|
293
|
+
"8": "⁸",
|
|
294
|
+
"9": "⁹",
|
|
295
|
+
"+": "⁺",
|
|
296
|
+
"-": "⁻",
|
|
297
|
+
"=": "⁼",
|
|
298
|
+
"(": "⁽",
|
|
299
|
+
")": "⁾",
|
|
300
|
+
a: "ᵃ",
|
|
301
|
+
b: "ᵇ",
|
|
302
|
+
c: "ᶜ",
|
|
303
|
+
d: "ᵈ",
|
|
304
|
+
e: "ᵉ",
|
|
305
|
+
f: "ᶠ",
|
|
306
|
+
g: "ᵍ",
|
|
307
|
+
h: "ʰ",
|
|
308
|
+
i: "ⁱ",
|
|
309
|
+
j: "ʲ",
|
|
310
|
+
k: "ᵏ",
|
|
311
|
+
l: "ˡ",
|
|
312
|
+
m: "ᵐ",
|
|
313
|
+
n: "ⁿ",
|
|
314
|
+
o: "ᵒ",
|
|
315
|
+
p: "ᵖ",
|
|
316
|
+
r: "ʳ",
|
|
317
|
+
s: "ˢ",
|
|
318
|
+
t: "ᵗ",
|
|
319
|
+
u: "ᵘ",
|
|
320
|
+
v: "ᵛ",
|
|
321
|
+
w: "ʷ",
|
|
322
|
+
x: "ˣ",
|
|
323
|
+
y: "ʸ",
|
|
324
|
+
z: "ᶻ",
|
|
325
|
+
});
|
|
326
|
+
/**
|
|
327
|
+
* Strips `$...$` and `$$...$$` math delimiters when the inner content looks
|
|
328
|
+
* like math, applying the full set of math-mode conversions (including
|
|
329
|
+
* sub/superscripts) to the inner text. The goal is to handle model output
|
|
330
|
+
* without eating dollar signs that appear in ordinary prose (prices,
|
|
331
|
+
* shell examples, etc.).
|
|
332
|
+
*
|
|
333
|
+
* A pair of `$...$` is treated as math when the inner text either:
|
|
334
|
+
* - contains a LaTeX marker (`\command`, `_`, `^`), or
|
|
335
|
+
* - is a single letter, possibly with whitespace padding (e.g. `$x$`,
|
|
336
|
+
* `$ n $`). Shell-style variables like `$USER` are LEFT intact because
|
|
337
|
+
* multi-letter all-caps sequences look much more like shell vars than
|
|
338
|
+
* math in practice.
|
|
339
|
+
*
|
|
340
|
+
* A currency expression like `$5.99` (single `$`) never matches the pair
|
|
341
|
+
* regex. `From $5 to $10` matches `$5 to $` as a pair but the inner text is
|
|
342
|
+
* neither mathy nor a single variable, so it is left intact.
|
|
343
|
+
*/
|
|
344
|
+
function stripMathDelimiters(text) {
|
|
345
|
+
// Display math first, greedy-safe with non-dollar inner class.
|
|
346
|
+
let out = text.replace(/\$\$([^$]+)\$\$/g, (_, inner) => applyMathModeConversions(inner));
|
|
347
|
+
// Inline math: lazy, single-line to avoid eating across paragraphs.
|
|
348
|
+
out = out.replace(/\$([^$\n]+?)\$/g, (match, inner) => {
|
|
349
|
+
const hasLatexMarkers = /\\[A-Za-z]|[\\_^]/.test(inner);
|
|
350
|
+
const isSingleVariable = /^\s*[A-Za-z]\s*$/.test(inner);
|
|
351
|
+
if (hasLatexMarkers || isSingleVariable) {
|
|
352
|
+
return applyMathModeConversions(inner);
|
|
353
|
+
}
|
|
354
|
+
return match;
|
|
355
|
+
});
|
|
356
|
+
return out;
|
|
357
|
+
}
|
|
358
|
+
/**
|
|
359
|
+
* Converts `\textbf{..}`, `\textit{..}`, `\emph{..}`, `\text{..}`,
|
|
360
|
+
* `\mathrm{..}`, `\mathbf{..}`, `\mathit{..}`, `\mathsf{..}`, `\mathtt{..}`,
|
|
361
|
+
* and `\operatorname{..}` into markdown-equivalent wrappers or plain text so
|
|
362
|
+
* the regular inline parser picks them up downstream.
|
|
363
|
+
*
|
|
364
|
+
* Only handles a single level of nesting (no inner braces) — this keeps the
|
|
365
|
+
* regex bounded and avoids catastrophic backtracking on adversarial input.
|
|
366
|
+
*/
|
|
367
|
+
function convertTextFormatting(text) {
|
|
368
|
+
let out = text;
|
|
369
|
+
out = out.replace(/\\(?:textbf|mathbf)\{([^{}]*)\}/g, (_, inner) => `**${inner}**`);
|
|
370
|
+
out = out.replace(/\\(?:textit|emph|mathit)\{([^{}]*)\}/g, (_, inner) => `*${inner}*`);
|
|
371
|
+
out = out.replace(/\\(?:text|mathrm|mathsf|mathtt|mathbb|mathcal|mathfrak|operatorname)\{([^{}]*)\}/g, (_, inner) => inner);
|
|
372
|
+
return out;
|
|
373
|
+
}
|
|
374
|
+
/**
|
|
375
|
+
* Handles `\frac{a}{b}` → `(a)/(b)` and `\sqrt{x}` → `√(x)`.
|
|
376
|
+
* Only a single level of braces is supported.
|
|
377
|
+
*/
|
|
378
|
+
function convertFractionsAndRoots(text) {
|
|
379
|
+
let out = text;
|
|
380
|
+
out = out.replace(/\\frac\{([^{}]*)\}\{([^{}]*)\}/g, (_, num, den) => `(${num})/(${den})`);
|
|
381
|
+
out = out.replace(/\\sqrt\[([^\]]*)\]\{([^{}]*)\}/g, (_, index, radicand) => `${index}√(${radicand})`);
|
|
382
|
+
out = out.replace(/\\sqrt\{([^{}]*)\}/g, (_, radicand) => `√(${radicand})`);
|
|
383
|
+
return out;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Converts escaped single-character specials (`\{` → `{`, `\_` → `_`, etc.).
|
|
387
|
+
* Runs before command lookup so `\{` is not misread as a command named `{`.
|
|
388
|
+
*/
|
|
389
|
+
function convertEscapedSpecials(text) {
|
|
390
|
+
// The set is intentionally narrow: only characters that have meaning in
|
|
391
|
+
// LaTeX and also appear unescaped in plain text. We do not unescape `\\`
|
|
392
|
+
// (line break) here — it is handled separately.
|
|
393
|
+
let out = text.replace(/\\([{}[\]_%&#$|])/g, (_, ch) => ch);
|
|
394
|
+
// `\ ` (backslash + space) is LaTeX for a non-breaking space; just keep it
|
|
395
|
+
// as a regular space so words do not collide.
|
|
396
|
+
out = out.replace(/\\ /g, " ");
|
|
397
|
+
return out;
|
|
398
|
+
}
|
|
399
|
+
/**
|
|
400
|
+
* Converts named commands (alphabetic control sequences) to Unicode. Anything
|
|
401
|
+
* not in the tables is left as-is so unrelated backslash content
|
|
402
|
+
* (e.g. Windows paths) is not disturbed.
|
|
403
|
+
*/
|
|
404
|
+
function convertNamedCommands(text) {
|
|
405
|
+
return text.replace(/\\([A-Za-z]+)(?![A-Za-z])/g, (match, name) => GREEK_LETTERS[name] ?? LATEX_COMMANDS[name] ?? match);
|
|
406
|
+
}
|
|
407
|
+
/**
|
|
408
|
+
* Converts the short-form punctuation commands `\,`, `\;`, `\:`, `\!` used
|
|
409
|
+
* for spacing in LaTeX. These are handled separately from alphabetic commands
|
|
410
|
+
* because the regex for the latter only matches letters.
|
|
411
|
+
*/
|
|
412
|
+
function convertPunctuationCommands(text) {
|
|
413
|
+
// `\,`, `\;`, `\:` all render as a single space; `\!` is a negative space
|
|
414
|
+
// and is stripped.
|
|
415
|
+
return text.replace(/\\([,;:!])/g, (_, ch) => {
|
|
416
|
+
switch (ch) {
|
|
417
|
+
case ",":
|
|
418
|
+
case ";":
|
|
419
|
+
case ":":
|
|
420
|
+
return " ";
|
|
421
|
+
case "!":
|
|
422
|
+
return "";
|
|
423
|
+
default:
|
|
424
|
+
return ch;
|
|
425
|
+
}
|
|
426
|
+
});
|
|
427
|
+
}
|
|
428
|
+
/**
|
|
429
|
+
* Converts the `\\` line-break command (used inside math environments and
|
|
430
|
+
* tables) to a literal newline. Must run after `\` specials but before any
|
|
431
|
+
* other regex that might see a lingering backslash.
|
|
432
|
+
*/
|
|
433
|
+
function convertLineBreaks(text) {
|
|
434
|
+
return text.replace(/\\\\/g, "\n");
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Converts subscripts and superscripts to Unicode where every character in
|
|
438
|
+
* the operand maps. If any character has no mapping the whole operand is
|
|
439
|
+
* left alone, to avoid "half-converted" output that looks worse than no
|
|
440
|
+
* conversion.
|
|
441
|
+
*/
|
|
442
|
+
function convertSubSuperScripts(text) {
|
|
443
|
+
// Braced form first: x_{...}, x^{...}. We only support BMP characters (the
|
|
444
|
+
// mapping tables are ASCII-only), so iterating with `Array.from` over code
|
|
445
|
+
// units is safe and keeps the lint rule against splitting strings happy.
|
|
446
|
+
const charsOf = (s) => Array.from(s);
|
|
447
|
+
let out = text.replace(/_\{([^{}]+)\}/g, (match, inner) => {
|
|
448
|
+
const chars = charsOf(inner);
|
|
449
|
+
if (chars.every((c) => SUBSCRIPT_MAP[c] !== undefined)) {
|
|
450
|
+
return chars.map((c) => SUBSCRIPT_MAP[c]).join("");
|
|
451
|
+
}
|
|
452
|
+
return match;
|
|
453
|
+
});
|
|
454
|
+
out = out.replace(/\^\{([^{}]+)\}/g, (match, inner) => {
|
|
455
|
+
const chars = charsOf(inner);
|
|
456
|
+
if (chars.every((c) => SUPERSCRIPT_MAP[c] !== undefined)) {
|
|
457
|
+
return chars.map((c) => SUPERSCRIPT_MAP[c]).join("");
|
|
458
|
+
}
|
|
459
|
+
return match;
|
|
460
|
+
});
|
|
461
|
+
// Single-character form: x_0, x^2. Only convert when the character actually
|
|
462
|
+
// has a mapping — leaves `file_name` and `foo^bar` alone.
|
|
463
|
+
out = out.replace(/([A-Za-z0-9)\]])_([A-Za-z0-9+\-=()])/g, (match, base, c) => {
|
|
464
|
+
const sub = SUBSCRIPT_MAP[c];
|
|
465
|
+
return sub ? `${base}${sub}` : match;
|
|
466
|
+
});
|
|
467
|
+
out = out.replace(/([A-Za-z0-9)\]])\^([A-Za-z0-9+\-=()])/g, (match, base, c) => {
|
|
468
|
+
const sup = SUPERSCRIPT_MAP[c];
|
|
469
|
+
return sup ? `${base}${sup}` : match;
|
|
470
|
+
});
|
|
471
|
+
return out;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Applies the full set of conversions that make sense inside a LaTeX math
|
|
475
|
+
* region (i.e. text that was originally wrapped in `$...$`). This includes
|
|
476
|
+
* sub/superscripts, which are NOT safe to apply to arbitrary prose because
|
|
477
|
+
* they would mangle identifiers like `file_name`.
|
|
478
|
+
*/
|
|
479
|
+
function applyMathModeConversions(text) {
|
|
480
|
+
let out = text;
|
|
481
|
+
out = convertTextFormatting(out);
|
|
482
|
+
out = convertFractionsAndRoots(out);
|
|
483
|
+
out = convertEscapedSpecials(out);
|
|
484
|
+
out = convertLineBreaks(out);
|
|
485
|
+
out = convertNamedCommands(out);
|
|
486
|
+
out = convertPunctuationCommands(out);
|
|
487
|
+
out = convertSubSuperScripts(out);
|
|
488
|
+
return out;
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
* Applies conversions that are safe to run on arbitrary prose — anything
|
|
492
|
+
* keyed off explicit LaTeX tokens like `\alpha`, `\textbf{...}`, `\to`. Does
|
|
493
|
+
* NOT touch standalone `_` or `^` so identifiers and snake_case names are
|
|
494
|
+
* preserved.
|
|
495
|
+
*/
|
|
496
|
+
function applyProseConversions(text) {
|
|
497
|
+
let out = text;
|
|
498
|
+
out = convertTextFormatting(out);
|
|
499
|
+
out = convertFractionsAndRoots(out);
|
|
500
|
+
out = convertEscapedSpecials(out);
|
|
501
|
+
// Deliberately NOT running convertLineBreaks here: outside math delimiters
|
|
502
|
+
// `\\` is far more likely to be a Windows UNC path (`\\server\share`) or an
|
|
503
|
+
// escaped backslash in code-like prose than a LaTeX line break. Legitimate
|
|
504
|
+
// LaTeX line breaks belong inside `$...$` or `$$...$$` and are handled by
|
|
505
|
+
// applyMathModeConversions. See PR #25802 review.
|
|
506
|
+
out = convertNamedCommands(out);
|
|
507
|
+
out = convertPunctuationCommands(out);
|
|
508
|
+
return out;
|
|
509
|
+
}
|
|
510
|
+
/**
|
|
511
|
+
* Top-level entry point. Two-phase conversion:
|
|
512
|
+
*
|
|
513
|
+
* 1. Strip `$...$` / `$$...$$` math regions, applying math-mode conversions
|
|
514
|
+
* (including sub/superscripts) to the inner text. The heuristic for
|
|
515
|
+
* "this dollar pair is math" runs against the ORIGINAL input so that
|
|
516
|
+
* model-authored LaTeX is recognised before any tokens are rewritten.
|
|
517
|
+
*
|
|
518
|
+
* 2. Run prose-safe conversions over the remaining text, catching
|
|
519
|
+
* unwrapped LaTeX tokens (`\alpha`, `\to`, `\textbf{...}`) that the
|
|
520
|
+
* model emitted outside math delimiters.
|
|
521
|
+
*
|
|
522
|
+
* Short-circuits on input that has no LaTeX markers at all (`\` or `$`) so
|
|
523
|
+
* the hot rendering path stays cheap for ordinary prose.
|
|
524
|
+
*/
|
|
525
|
+
export function convertLatexToUnicode(input) {
|
|
526
|
+
if (!input)
|
|
527
|
+
return input;
|
|
528
|
+
// Fast path: if there's no backslash and no dollar sign, there's nothing to
|
|
529
|
+
// convert. This keeps the hot rendering path inexpensive for ordinary text.
|
|
530
|
+
if (input.indexOf("\\") === -1 && input.indexOf("$") === -1) {
|
|
531
|
+
return input;
|
|
532
|
+
}
|
|
533
|
+
let text = input;
|
|
534
|
+
text = stripMathDelimiters(text);
|
|
535
|
+
text = applyProseConversions(text);
|
|
536
|
+
return text;
|
|
537
|
+
}
|
|
538
|
+
//# sourceMappingURL=latex-to-unicode.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"latex-to-unicode.js","sourceRoot":"","sources":["../../../src/ui/utils/latex-to-unicode.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;;;;;;;;;;;;;;GAeG;AAEH,uEAAuE;AACvE,MAAM,aAAa,GAAqC,MAAM,CAAC,MAAM,CAAC;IACpE,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,GAAG;IACZ,IAAI,EAAE,GAAG;IACT,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,MAAM,EAAE,GAAG;IACX,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,EAAE,EAAE,GAAG;IACP,OAAO,EAAE,GAAG;IACZ,EAAE,EAAE,GAAG;IACP,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;IACV,GAAG,EAAE,GAAG;IACR,OAAO,EAAE,GAAG;IACZ,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,GAAG,EAAE,GAAG;IACR,KAAK,EAAE,GAAG;IACV,KAAK,EAAE,GAAG;IACV,IAAI,EAAE,GAAG;IACT,KAAK,EAAE,GAAG;IACV,KAAK,EAAE,GAAG;IACV,OAAO,EAAE,GAAG;IACZ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GAAG,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAC;IAClC,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;GAKG;AACH,SAAS,qBAAqB,CAAC,IAAY;IACzC,IAAI,GAAG,GAAG,IAAI,CAAC;IACf,GAAG,GAAG,qBAAqB,CAAC,GAAG,CAAC,CAAC;IACjC,GAAG,GAAG,wBAAwB,CAAC,GAAG,CAAC,CAAC;IACpC,GAAG,GAAG,sBAAsB,CAAC,GAAG,CAAC,CAAC;IAClC,2EAA2E;IAC3E,4EAA4E;IAC5E,2EAA2E;IAC3E,0EAA0E;IAC1E,kDAAkD;IAClD,GAAG,GAAG,oBAAoB,CAAC,GAAG,CAAC,CAAC;IAChC,GAAG,GAAG,0BAA0B,CAAC,GAAG,CAAC,CAAC;IACtC,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,IAAI,CAAC,KAAK;QAAE,OAAO,KAAK,CAAC;IACzB,4EAA4E;IAC5E,4EAA4E;IAC5E,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,IAAI,KAAK,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC;QAC5D,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,IAAI,GAAG,KAAK,CAAC;IACjB,IAAI,GAAG,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACjC,IAAI,GAAG,qBAAqB,CAAC,IAAI,CAAC,CAAC;IACnC,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Theme } from "../theme/theme.js";
|
|
2
|
+
export declare function renderInlineMarkdownToAnsi(rawText: string, theme: Theme, defaultColor?: string): string;
|
|
3
|
+
export declare function wrapAnsiMarkdownLine(text: string, width: number): string[];
|
|
4
|
+
export declare function renderMarkdownCodeBlockToAnsi({ content, language, maxWidth, theme, hideLineNumbers, }: {
|
|
5
|
+
content: readonly string[];
|
|
6
|
+
language?: string | null;
|
|
7
|
+
maxWidth: number;
|
|
8
|
+
theme: Theme;
|
|
9
|
+
hideLineNumbers?: boolean;
|
|
10
|
+
}): string[];
|
|
11
|
+
export interface RenderMarkdownToAnsiOptions {
|
|
12
|
+
text: string;
|
|
13
|
+
theme: Theme;
|
|
14
|
+
width: number;
|
|
15
|
+
isPending?: boolean;
|
|
16
|
+
availableTerminalHeight?: number;
|
|
17
|
+
renderMarkdown?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export declare function renderMarkdownToAnsiLines({ text, theme, width, isPending, availableTerminalHeight, renderMarkdown, }: RenderMarkdownToAnsiOptions): string[];
|
|
20
|
+
//# sourceMappingURL=markdown-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"markdown-renderer.d.ts","sourceRoot":"","sources":["../../../src/ui/utils/markdown-renderer.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AA2B/C,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,KAAK,EACZ,YAAY,CAAC,EAAE,MAAM,GACpB,MAAM,CAsER;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAE1E;AAwED,wBAAgB,6BAA6B,CAAC,EAC5C,OAAO,EACP,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,eAAuB,GACxB,EAAE;IACD,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,GAAG,MAAM,EAAE,CASX;AAED,MAAM,WAAW,2BAA2B;IAC1C,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,KAAK,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,yBAAyB,CAAC,EACxC,IAAI,EACJ,KAAK,EACL,KAAK,EACL,SAAiB,EACjB,uBAAuB,EACvB,cAAqB,GACtB,EAAE,2BAA2B,GAAG,MAAM,EAAE,CAkLxC"}
|