@code-yeongyu/senpi 2026.8.18 → 2026.8.19
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/CHANGELOG.md +118 -0
- package/dist/cli/args.d.ts +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +4 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-session-services.d.ts +4 -1
- package/dist/core/agent-session-services.d.ts.map +1 -1
- package/dist/core/agent-session-services.js +1 -0
- package/dist/core/agent-session-services.js.map +1 -1
- package/dist/core/agent-session.d.ts +49 -25
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +376 -76
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +3 -0
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +20 -3
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +182 -52
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/cursor-exec-bridge-session.d.ts +12 -1
- package/dist/core/cursor-exec-bridge-session.d.ts.map +1 -1
- package/dist/core/cursor-exec-bridge-session.js +17 -4
- package/dist/core/cursor-exec-bridge-session.js.map +1 -1
- package/dist/core/cursor-exec-bridge.d.ts +2 -2
- package/dist/core/cursor-exec-bridge.d.ts.map +1 -1
- package/dist/core/cursor-exec-bridge.js +29 -20
- package/dist/core/cursor-exec-bridge.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable.d.ts +2 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable.js +15 -6
- package/dist/core/extensions/builtin/claude-sdk-oauth/executable.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.d.ts +3 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.js +18 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/index.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.d.ts +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js +7 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/oauth-login.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts +4 -3
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.js +2 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding-store.d.ts +29 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding-store.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding-store.js +112 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding-store.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts +37 -23
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js +119 -33
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-binding.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js +20 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts +3 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js +32 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js +78 -11
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-registry-wiring.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-restored-admission.d.ts +8 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-restored-admission.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-restored-admission.js +11 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-restored-admission.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js +17 -55
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-stream.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts +13 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js +18 -5
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-sync.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.d.ts +11 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.js +48 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.d.ts +8 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.js +18 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/settings.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts +7 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js +10 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/guardrails.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.d.ts +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.js +29 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/index.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js +30 -24
- package/dist/core/extensions/builtin/cursor-cli-oauth/models.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/native-bootstrap.d.ts +14 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/native-bootstrap.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/native-bootstrap.js +58 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/native-bootstrap.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.d.ts +12 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js +20 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/oauth-login.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.d.ts +11 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.js +6 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/settings.js.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-model.d.ts +3 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-model.d.ts.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-model.js +5 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/spawn-model.js.map +1 -0
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.d.ts.map +1 -1
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js +11 -4
- package/dist/core/extensions/builtin/cursor-cli-oauth/stream.js.map +1 -1
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.d.ts +8 -0
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.js +10 -0
- package/dist/core/extensions/builtin/goal/direct-input-lifecycle.js.map +1 -1
- package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/index.js +21 -3
- package/dist/core/extensions/builtin/goal/index.js.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts +9 -0
- package/dist/core/extensions/builtin/goal/monitor-continuation.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/monitor-continuation.js +16 -0
- package/dist/core/extensions/builtin/goal/monitor-continuation.js.map +1 -1
- package/dist/core/extensions/builtin/goal/reload-reengagement.d.ts +30 -0
- package/dist/core/extensions/builtin/goal/reload-reengagement.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/reload-reengagement.js +36 -0
- package/dist/core/extensions/builtin/goal/reload-reengagement.js.map +1 -0
- package/dist/core/extensions/builtin/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/index.js +2 -0
- package/dist/core/extensions/builtin/index.js.map +1 -1
- package/dist/core/extensions/builtin/loop/command-registration.d.ts +7 -0
- package/dist/core/extensions/builtin/loop/command-registration.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/command-registration.js +13 -0
- package/dist/core/extensions/builtin/loop/command-registration.js.map +1 -0
- package/dist/core/extensions/builtin/loop/command.d.ts +41 -0
- package/dist/core/extensions/builtin/loop/command.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/command.js +281 -0
- package/dist/core/extensions/builtin/loop/command.js.map +1 -0
- package/dist/core/extensions/builtin/loop/cron-planner.d.ts +23 -0
- package/dist/core/extensions/builtin/loop/cron-planner.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/cron-planner.js +88 -0
- package/dist/core/extensions/builtin/loop/cron-planner.js.map +1 -0
- package/dist/core/extensions/builtin/loop/index.d.ts +134 -0
- package/dist/core/extensions/builtin/loop/index.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/index.js +742 -0
- package/dist/core/extensions/builtin/loop/index.js.map +1 -0
- package/dist/core/extensions/builtin/loop/loopfile.d.ts +40 -0
- package/dist/core/extensions/builtin/loop/loopfile.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/loopfile.js +102 -0
- package/dist/core/extensions/builtin/loop/loopfile.js.map +1 -0
- package/dist/core/extensions/builtin/loop/parse.d.ts +45 -0
- package/dist/core/extensions/builtin/loop/parse.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/parse.js +92 -0
- package/dist/core/extensions/builtin/loop/parse.js.map +1 -0
- package/dist/core/extensions/builtin/loop/scheduler.d.ts +225 -0
- package/dist/core/extensions/builtin/loop/scheduler.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/scheduler.js +708 -0
- package/dist/core/extensions/builtin/loop/scheduler.js.map +1 -0
- package/dist/core/extensions/builtin/loop/status.d.ts +24 -0
- package/dist/core/extensions/builtin/loop/status.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/status.js +113 -0
- package/dist/core/extensions/builtin/loop/status.js.map +1 -0
- package/dist/core/extensions/builtin/loop/store.d.ts +49 -0
- package/dist/core/extensions/builtin/loop/store.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/store.js +424 -0
- package/dist/core/extensions/builtin/loop/store.js.map +1 -0
- package/dist/core/extensions/builtin/loop/tick-prompt.d.ts +64 -0
- package/dist/core/extensions/builtin/loop/tick-prompt.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/tick-prompt.js +183 -0
- package/dist/core/extensions/builtin/loop/tick-prompt.js.map +1 -0
- package/dist/core/extensions/builtin/loop/tools.d.ts +122 -0
- package/dist/core/extensions/builtin/loop/tools.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/tools.js +155 -0
- package/dist/core/extensions/builtin/loop/tools.js.map +1 -0
- package/dist/core/extensions/builtin/loop/types.d.ts +206 -0
- package/dist/core/extensions/builtin/loop/types.d.ts.map +1 -0
- package/dist/core/extensions/builtin/loop/types.js +37 -0
- package/dist/core/extensions/builtin/loop/types.js.map +1 -0
- package/dist/core/extensions/index.d.ts +1 -1
- package/dist/core/extensions/index.d.ts.map +1 -1
- package/dist/core/extensions/index.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +10 -5
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +30 -3
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +5 -10
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/model-registry.d.ts +2 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +4 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts +15 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +137 -43
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +7 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +17 -0
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +8 -4
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/provider-composer.d.ts +8 -0
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/provider-timeout-retry.d.ts.map +1 -1
- package/dist/core/provider-timeout-retry.js +29 -1
- package/dist/core/provider-timeout-retry.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +2 -1
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/retry-fallback/chains.d.ts +1 -0
- package/dist/core/retry-fallback/chains.d.ts.map +1 -1
- package/dist/core/retry-fallback/chains.js +3 -0
- package/dist/core/retry-fallback/chains.js.map +1 -1
- package/dist/core/retry-fallback/controller.d.ts +2 -0
- package/dist/core/retry-fallback/controller.d.ts.map +1 -1
- package/dist/core/retry-fallback/controller.js.map +1 -1
- package/dist/core/retry-fallback/expansion.d.ts +8 -0
- package/dist/core/retry-fallback/expansion.d.ts.map +1 -1
- package/dist/core/retry-fallback/expansion.js +2 -0
- package/dist/core/retry-fallback/expansion.js.map +1 -1
- package/dist/core/sdk.d.ts +5 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +47 -12
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +5 -2
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +15 -6
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +1 -1
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +14 -3
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +51 -33
- package/dist/core/skills.js.map +1 -1
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +17 -2
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/extensions/llama/index.d.ts.map +1 -1
- package/dist/extensions/llama/index.js +2 -0
- package/dist/extensions/llama/index.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +6 -6
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts +4 -0
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +10 -4
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +1 -1
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/editor-paste-transfer.d.ts +10 -1
- package/dist/modes/interactive/editor-paste-transfer.d.ts.map +1 -1
- package/dist/modes/interactive/editor-paste-transfer.js +27 -2
- package/dist/modes/interactive/editor-paste-transfer.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +69 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +435 -63
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/tips/catalog/dag-tips.d.ts +7 -0
- package/dist/modes/interactive/tips/catalog/dag-tips.d.ts.map +1 -0
- package/dist/modes/interactive/tips/catalog/dag-tips.js +57 -0
- package/dist/modes/interactive/tips/catalog/dag-tips.js.map +1 -0
- package/dist/modes/interactive/tips/catalog/memory-tips.d.ts +7 -0
- package/dist/modes/interactive/tips/catalog/memory-tips.d.ts.map +1 -0
- package/dist/modes/interactive/tips/catalog/memory-tips.js +100 -0
- package/dist/modes/interactive/tips/catalog/memory-tips.js.map +1 -0
- package/dist/modes/interactive/tips/registry.d.ts.map +1 -1
- package/dist/modes/interactive/tips/registry.js +4 -0
- package/dist/modes/interactive/tips/registry.js.map +1 -1
- package/dist/utils/management-http.d.ts +5 -3
- package/dist/utils/management-http.d.ts.map +1 -1
- package/dist/utils/management-http.js +14 -10
- package/dist/utils/management-http.js.map +1 -1
- package/docs/compaction.md +17 -0
- package/docs/custom-provider.md +5 -2
- package/docs/extensions.md +11 -2
- package/docs/llama-cpp.md +2 -0
- package/docs/models.md +8 -2
- package/docs/providers.md +9 -6
- package/docs/settings.md +22 -2
- package/docs/skills.md +4 -3
- package/examples/extensions/border-status-editor.ts +1 -1
- package/examples/extensions/git-checkpoint.ts +2 -2
- package/examples/extensions/notify.ts +3 -1
- package/examples/extensions/subagent/index.ts +6 -1
- package/examples/extensions/titlebar-spinner.ts +1 -1
- package/examples/rpc-extension-ui.ts +1 -1
- package/examples/sdk/06-extensions.ts +1 -1
- package/examples/sdk/README.md +1 -1
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-string-parser/LICENSE +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-string-parser/README.md +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-string-parser/lib/index.d.ts +41 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-string-parser/lib/index.js +287 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-string-parser/lib/index.js.map +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-string-parser/package.json +31 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-validator-identifier/LICENSE +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-validator-identifier/README.md +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-validator-identifier/lib/identifier-browser.js +63 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-validator-identifier/lib/identifier-browser.js.map +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-validator-identifier/lib/identifier.js +61 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-validator-identifier/lib/identifier.js.map +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-validator-identifier/lib/index.d.ts +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-validator-identifier/lib/index.js +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-validator-identifier/lib/index.js.map +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/helper-validator-identifier/package.json +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/parser/LICENSE +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/parser/README.md +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/parser/bin/babel-parser.js +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/parser/lib/index.d.ts +1035 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/parser/lib/index.js +14276 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/parser/lib/index.js.map +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/parser/package.json +57 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/parser/typings/babel-parser.d.ts +624 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/types/LICENSE +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/types/README.md +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/types/lib/index-legacy.d.ts +2743 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/types/lib/index.d.ts +3643 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/types/lib/index.js +11178 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/types/lib/index.js.flow +2596 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/types/lib/index.js.map +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/@babel/types/package.json +38 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/compile/code.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/compile/code.mjs +65 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/compile/compile.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/compile/compile.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/compile/index.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/compile/index.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/compile/validator.d.mts +35 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/compile/validator.mjs +91 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/error/errors.d.mts +208 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/error/errors.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/error/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/error/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/_idna.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/_idna.mjs +246 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/_puny.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/_puny.mjs +77 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/_registry.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/_registry.mjs +96 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/date.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/date.mjs +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/date_time.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/date_time.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/duration.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/duration.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/email.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/email.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/format.d.mts +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/format.mjs +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/hostname.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/hostname.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/idn_email.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/idn_email.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/idn_hostname.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/idn_hostname.mjs +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/index.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/index.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/ipv4.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/ipv4.mjs +38 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/ipv6.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/ipv6.mjs +67 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/iri.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/iri.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/iri_reference.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/iri_reference.mjs +60 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/json_pointer.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/json_pointer.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/json_pointer_uri_fragment.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/json_pointer_uri_fragment.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/regex.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/regex.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/relative_json_pointer.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/relative_json_pointer.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/time.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/time.mjs +27 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/uri.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/uri.mjs +135 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/uri_reference.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/uri_reference.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/uri_template.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/uri_template.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/url.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/url.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/uuid.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/format/uuid.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/emit.d.mts +56 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/emit.mjs +193 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/globals.d.mts +35 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/globals.mjs +90 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/guard.d.mts +71 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/guard.mjs +233 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/index.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/index.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/native.d.mts +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/native.mjs +60 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/string.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/guard/string.mjs +176 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/index.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/index.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/build.d.mts +39 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/build.mjs +118 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/check.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/check.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/compile.d.mts +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/compile.mjs +46 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_context.d.mts +35 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_context.mjs +129 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_exact_optional.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_exact_optional.mjs +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_externals.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_externals.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_functions.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_functions.mjs +65 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_reducer.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_reducer.mjs +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_refine.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_refine.mjs +29 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_stack.d.mts +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_stack.mjs +107 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_unique.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/_unique.mjs +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/additionalItems.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/additionalItems.mjs +60 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/additionalProperties.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/additionalProperties.mjs +110 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/allOf.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/allOf.mjs +47 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/anyOf.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/anyOf.mjs +52 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/boolean.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/boolean.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/const.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/const.mjs +30 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/contains.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/contains.mjs +54 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/dependencies.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/dependencies.mjs +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/dependentRequired.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/dependentRequired.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/dependentSchemas.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/dependentSchemas.mjs +38 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/dynamicRef.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/dynamicRef.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/enum.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/enum.mjs +33 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/exclusiveMaximum.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/exclusiveMaximum.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/exclusiveMinimum.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/exclusiveMinimum.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/format.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/format.mjs +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/if.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/if.mjs +47 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/index.d.mts +48 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/index.mjs +54 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/items.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/items.mjs +88 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/maxContains.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/maxContains.mjs +42 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/maxItems.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/maxItems.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/maxLength.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/maxLength.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/maxProperties.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/maxProperties.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/maximum.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/maximum.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/minContains.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/minContains.mjs +51 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/minItems.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/minItems.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/minLength.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/minLength.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/minProperties.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/minProperties.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/minimum.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/minimum.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/multipleOf.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/multipleOf.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/not.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/not.mjs +39 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/oneOf.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/oneOf.mjs +59 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/pattern.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/pattern.mjs +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/patternProperties.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/patternProperties.mjs +44 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/prefixItems.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/prefixItems.mjs +35 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/properties.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/properties.mjs +75 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/propertyNames.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/propertyNames.mjs +39 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/recursiveRef.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/recursiveRef.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/ref.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/ref.mjs +52 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/required.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/required.mjs +32 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/schema.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/schema.mjs +347 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/type.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/type.mjs +70 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/unevaluatedItems.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/unevaluatedItems.mjs +51 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/unevaluatedProperties.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/unevaluatedProperties.mjs +51 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/uniqueItems.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/engine/uniqueItems.mjs +51 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/errors.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/errors.mjs +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/index.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/index.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/parse.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/parse.mjs +27 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/pointer/index.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/pointer/index.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/pointer/pointer.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/pointer/pointer.mjs +106 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/pointer/pointer_get.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/pointer/pointer_get.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/resolve/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/resolve/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/resolve/ref.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/resolve/ref.mjs +146 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/resolve/resolve.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/resolve/resolve.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/schema.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/schema.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/_canonical.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/_canonical.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/_comparer.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/_comparer.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/_elements.d.mts +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/_elements.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/additionalProperties.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/additionalProperties.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/allOf.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/allOf.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/anyOf.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/anyOf.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/const.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/const.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/enum.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/enum.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/if.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/if.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/items.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/items.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/oneOf.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/oneOf.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/patternProperties.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/patternProperties.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/prefixItems.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/prefixItems.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/properties.d.mts +32 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/properties.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/ref.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/ref.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/required.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/required.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/schema.d.mts +56 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/schema.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/static.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/static.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/type.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/type.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/unevaluatedProperties.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/static/unevaluatedProperties.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/_refine.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/_refine.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/additionalItems.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/additionalItems.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/additionalProperties.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/additionalProperties.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/allOf.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/allOf.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/anchor.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/anchor.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/anyOf.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/anyOf.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/const.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/const.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/contains.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/contains.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/contentEncoding.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/contentEncoding.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/contentMediaType.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/contentMediaType.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/default.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/default.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/defs.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/defs.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/dependencies.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/dependencies.mjs +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/dependentRequired.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/dependentRequired.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/dependentSchemas.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/dependentSchemas.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/dynamicAnchor.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/dynamicAnchor.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/dynamicRef.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/dynamicRef.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/else.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/else.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/enum.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/enum.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/exclusiveMaximum.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/exclusiveMaximum.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/exclusiveMinimum.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/exclusiveMinimum.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/format.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/format.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/id.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/id.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/if.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/if.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/index.d.mts +53 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/index.mjs +59 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/items.d.mts +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/items.mjs +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/maxContains.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/maxContains.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/maxItems.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/maxItems.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/maxLength.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/maxLength.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/maxProperties.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/maxProperties.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/maximum.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/maximum.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/minContains.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/minContains.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/minItems.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/minItems.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/minLength.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/minLength.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/minProperties.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/minProperties.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/minimum.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/minimum.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/multipleOf.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/multipleOf.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/not.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/not.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/oneOf.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/oneOf.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/pattern.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/pattern.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/patternProperties.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/patternProperties.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/prefixItems.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/prefixItems.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/properties.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/properties.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/propertyNames.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/propertyNames.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/recursiveAnchor.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/recursiveAnchor.mjs +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/recursiveRef.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/recursiveRef.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/ref.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/ref.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/required.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/required.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/schema.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/schema.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/then.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/then.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/type.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/type.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/unevaluatedItems.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/unevaluatedItems.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/unevaluatedProperties.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/unevaluatedProperties.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/uniqueItems.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/schema/types/uniqueItems.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/arguments/arguments.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/arguments/arguments.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/arguments/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/arguments/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/environment/environment.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/environment/environment.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/environment/evaluate.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/environment/evaluate.mjs +37 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/environment/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/environment/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/hashing/hash.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/hashing/hash.mjs +232 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/hashing/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/hashing/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/index.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/index.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/_config.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/_config.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/_locale.d.mts +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/_locale.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ar_001.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ar_001.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/bn_BD.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/bn_BD.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/cs_CZ.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/cs_CZ.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/de_DE.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/de_DE.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/el_GR.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/el_GR.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/en_US.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/en_US.mjs +39 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/es_419.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/es_419.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/es_AR.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/es_AR.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/es_ES.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/es_ES.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/es_MX.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/es_MX.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/fa_IR.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/fa_IR.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/fil_PH.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/fil_PH.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/fr_CA.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/fr_CA.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/fr_FR.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/fr_FR.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ha_NG.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ha_NG.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/hi_IN.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/hi_IN.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/hu_HU.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/hu_HU.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/id_ID.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/id_ID.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/it_IT.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/it_IT.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ja_JP.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ja_JP.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ko_KR.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ko_KR.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ms_MY.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ms_MY.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/nl_NL.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/nl_NL.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/pl_PL.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/pl_PL.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/pt_BR.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/pt_BR.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/pt_PT.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/pt_PT.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ro_RO.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ro_RO.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ru_RU.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ru_RU.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/sv_SE.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/sv_SE.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/sw_TZ.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/sw_TZ.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/th_TH.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/th_TH.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/tr_TR.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/tr_TR.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/uk_UA.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/uk_UA.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ur_PK.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/ur_PK.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/vi_VN.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/vi_VN.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/yo_NG.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/yo_NG.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/zh_Hans.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/zh_Hans.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/zh_Hant.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/locale/zh_Hant.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/assign.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/assign.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/clone.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/clone.mjs +110 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/create.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/create.mjs +30 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/discard.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/discard.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/memory.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/memory.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/metrics.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/metrics.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/update.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/memory/update.mjs +32 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/settings/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/settings/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/settings/settings.d.mts +71 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/settings/settings.mjs +34 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/system.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/system.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/unreachable/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/unreachable/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/unreachable/unreachable.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/system/unreachable/unreachable.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_add_immutable.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_add_immutable.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_add_optional.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_add_optional.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_add_readonly.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_add_readonly.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_remove_immutable.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_remove_immutable.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_remove_optional.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_remove_optional.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_remove_readonly.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/_remove_readonly.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/capitalize.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/capitalize.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/conditional.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/conditional.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/constructor_parameters.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/constructor_parameters.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/evaluate.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/evaluate.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/exclude.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/exclude.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/extract.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/extract.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/index.d.mts +30 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/index.mjs +30 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/indexed.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/indexed.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/instance_type.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/instance_type.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/interface.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/interface.mjs +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/keyof.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/keyof.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/lowercase.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/lowercase.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/mapped.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/mapped.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/module.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/module.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/non_nullable.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/non_nullable.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/omit.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/omit.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/parameters.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/parameters.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/partial.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/partial.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/pick.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/pick.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/readonly_object.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/readonly_object.mjs +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/required.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/required.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/return_type.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/return_type.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/uncapitalize.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/uncapitalize.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/uppercase.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/uppercase.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/with.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/action/with.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/call/distribute_arguments.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/call/distribute_arguments.mjs +53 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/call/instantiate.d.mts +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/call/instantiate.mjs +49 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/call/resolve_arguments.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/call/resolve_arguments.mjs +33 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/call/resolve_target.d.mts +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/call/resolve_target.mjs +27 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/conditional/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/conditional/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/conditional/instantiate.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/conditional/instantiate.mjs +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/constructor_parameters/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/constructor_parameters/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/constructor_parameters/instantiate.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/candidates.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/candidates.mjs +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/check.d.mts +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/check.mjs +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/dependencies.d.mts +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/dependencies.mjs +47 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/extends.d.mts +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/extends.mjs +47 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/index.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/index.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/instantiate.d.mts +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/instantiate.mjs +31 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/target.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/cyclic/target.mjs +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/enum/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/enum/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/enum/typescript_enum_to_enum_values.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/broaden.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/broaden.mjs +43 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/compare.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/compare.mjs +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/composite.d.mts +34 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/composite.mjs +67 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/distribute.d.mts +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/distribute.mjs +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/evaluate.d.mts +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/evaluate.mjs +53 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/flatten.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/flatten.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/index.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/index.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/instantiate.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/instantiate.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/narrow.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/evaluate/narrow.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/exclude/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/exclude/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/exclude/instantiate.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/exclude/instantiate.mjs +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/exclude/operation.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/exclude/operation.mjs +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/extract/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/extract/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/extract/instantiate.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/extract/instantiate.mjs +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/extract/operation.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/extract/operation.mjs +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/helpers/index.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/helpers/index.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/helpers/keys.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/helpers/keys.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/helpers/keys_to_indexer.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/helpers/union.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/helpers/union.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/immutable/instantiate_add.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/immutable/instantiate_add.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/immutable/instantiate_remove.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/immutable/instantiate_remove.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/index.d.mts +31 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/index.mjs +37 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_cyclic.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_cyclic.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_dependent.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_dependent.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_enum.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_enum.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_intersect.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_intersect.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_literal.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_literal.mjs +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_template_literal.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_template_literal.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_type.d.mts +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_type.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_union.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/from_union.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/to_indexable.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/to_indexable.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexable/to_indexable_keys.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/array_indexer.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/array_indexer.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/from_array.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/from_array.mjs +35 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/from_object.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/from_object.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/from_tuple.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/from_tuple.mjs +35 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/from_type.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/from_type.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/instantiate.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/indexed/instantiate.mjs +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/instance_type/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/instance_type/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/instance_type/instantiate.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/instance_type/instantiate.mjs +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/instantiate.d.mts +178 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/instantiate.mjs +158 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/interface/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/interface/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/interface/instantiate.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/interface/instantiate.mjs +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/from_literal.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/from_literal.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/from_template_literal.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/from_type.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/from_type.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/from_union.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/from_union.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/instantiate.d.mts +38 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/instantiate.mjs +52 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/mapping.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/intrinsics/mapping.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_any.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_any.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_array.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_array.mjs +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_object.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_object.mjs +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_record.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_record.mjs +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_tuple.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_tuple.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_type.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/from_type.mjs +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/instantiate.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/keyof/instantiate.mjs +29 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/mapped/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/mapped/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/mapped/instantiate.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/mapped/instantiate.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/mapped/mapped_operation.d.mts +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/mapped/mapped_operation.mjs +42 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/mapped/mapped_variants.d.mts +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/mapped/mapped_variants.mjs +39 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/module/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/module/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/module/instantiate.d.mts +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/module/instantiate.mjs +36 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/non_nullable/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/non_nullable/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/non_nullable/instantiate.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/non_nullable/instantiate.mjs +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/collapse.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/collapse.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_cyclic.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_cyclic.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_dependent.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_dependent.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_intersect.d.mts +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_intersect.mjs +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_object.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_object.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_tuple.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_tuple.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_type.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_type.mjs +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_union.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/from_union.mjs +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/object/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/omit/from_type.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/omit/from_type.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/omit/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/omit/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/omit/instantiate.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/omit/instantiate.mjs +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/optional/instantiate_add.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/optional/instantiate_add.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/optional/instantiate_remove.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/optional/instantiate_remove.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/parameters/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/parameters/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/parameters/instantiate.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/parameters/instantiate.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_cyclic.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_cyclic.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_dependent.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_dependent.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_intersect.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_intersect.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_object.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_object.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_type.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_type.mjs +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_union.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/from_union.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/instantiate.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/partial/instantiate.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/patterns/index.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/patterns/index.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/patterns/pattern.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/patterns/pattern.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/patterns/template.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/patterns/template.mjs +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/pick/from_type.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/pick/from_type.mjs +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/pick/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/pick/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/pick/instantiate.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/pick/instantiate.mjs +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/priority/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/priority/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/priority/priority.d.mts +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/priority/priority.mjs +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly/instantiate_add.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly/instantiate_add.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly/instantiate_remove.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly/instantiate_remove.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_array.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_array.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_cyclic.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_dependent.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_dependent.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_intersect.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_intersect.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_object.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_object.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_tuple.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_tuple.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_type.d.mts +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_type.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_union.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/from_union.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/instantiate.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/readonly_object/instantiate.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key.d.mts +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key.mjs +40 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_any.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_any.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_boolean.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_boolean.mjs +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_enum.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_enum.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_integer.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_integer.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_intersect.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_intersect.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_literal.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_literal.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_number.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_number.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_string.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_string.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_template_literal.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_template_literal.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_union.d.mts +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/from_key_union.mjs +39 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/instantiate.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/instantiate.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/record_create.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/record/record_create.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/ref/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/ref/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/ref/instantiate.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/ref/instantiate.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_cyclic.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_cyclic.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_dependent.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_dependent.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_intersect.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_intersect.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_object.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_object.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_type.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_type.mjs +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_union.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/from_union.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/instantiate.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/required/instantiate.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/rest/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/rest/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/rest/spread.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/rest/spread.mjs +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/return_type/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/return_type/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/return_type/instantiate.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/return_type/instantiate.mjs +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/create.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/create.mjs +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/decode.d.mts +30 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/decode.mjs +81 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/encode.d.mts +33 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/encode.mjs +81 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/index.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/index.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/instantiate.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/instantiate.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/is_finite.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/is_finite.mjs +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/is_pattern.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/is_pattern.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/static.d.mts +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/template_literal/static.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/this/expand_this.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/this/expand_this.mjs +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/tuple/to_object.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/tuple/to_object.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/with/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/with/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/with/instantiate.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/engine/with/instantiate.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/any.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/any.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/array.d.mts +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/array.mjs +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/bigint.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/bigint.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/boolean.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/boolean.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/constructor.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/constructor.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/dependent.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/dependent.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/enum.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/enum.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/extends.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/extends.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/extends_left.d.mts +53 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/extends_left.mjs +80 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/extends_right.d.mts +27 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/extends_right.mjs +49 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/function.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/function.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/index.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/index.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/inference.d.mts +34 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/inference.mjs +62 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/integer.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/integer.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/intersect.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/intersect.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/literal.d.mts +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/literal.mjs +44 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/never.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/never.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/null.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/null.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/number.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/number.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/object.d.mts +32 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/object.mjs +109 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/parameters.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/parameters.mjs +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/record.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/record.mjs +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/result.d.mts +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/result.mjs +36 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/return_type.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/return_type.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/string.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/string.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/symbol.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/symbol.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/template_literal.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/template_literal.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/tuple.d.mts +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/tuple.mjs +61 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/undefined.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/undefined.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/union.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/union.mjs +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/unknown.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/unknown.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/void.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/extends/void.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/index.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/index.mjs +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/mapping.d.mts +353 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/mapping.mjs +535 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/parser.d.mts +262 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/parser.mjs +136 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/script.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/script.mjs +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/bigint.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/bigint.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/const.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/const.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/ident.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/ident.mjs +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/index.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/index.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/integer.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/integer.mjs +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/char.d.mts +75 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/char.mjs +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/guard.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/guard.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/many.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/many.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/match.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/match.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/optional.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/optional.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/take.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/take.mjs +30 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/trim.d.mts +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/internal/trim.mjs +34 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/number.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/number.mjs +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/rest.d.mts +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/rest.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/span.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/span.mjs +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/string.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/string.mjs +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/unsigned_integer.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/unsigned_integer.mjs +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/unsigned_number.d.mts +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/unsigned_number.mjs +38 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/until.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/until.mjs +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/until_1.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/script/token/until_1.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/_codec.d.mts +30 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/_codec.mjs +60 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/_immutable.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/_immutable.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/_optional.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/_optional.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/_readonly.d.mts +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/_readonly.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/_refine.d.mts +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/_refine.mjs +36 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/any.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/any.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/array.d.mts +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/array.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/bigint.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/bigint.mjs +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/boolean.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/boolean.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/call.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/call.mjs +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/constructor.d.mts +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/constructor.mjs +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/cyclic.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/cyclic.mjs +29 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/deferred.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/deferred.mjs +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/dependent.d.mts +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/dependent.mjs +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/enum.d.mts +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/enum.mjs +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/function.d.mts +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/function.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/generic.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/generic.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/identifier.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/identifier.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/index.d.mts +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/index.mjs +51 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/infer.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/infer.mjs +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/integer.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/integer.mjs +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/intersect.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/intersect.mjs +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/literal.d.mts +31 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/literal.mjs +62 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/never.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/never.mjs +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/null.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/null.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/number.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/number.mjs +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/object.d.mts +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/object.mjs +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/parameter.d.mts +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/parameter.mjs +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/properties.d.mts +43 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/properties.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/record.d.mts +52 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/record.mjs +66 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/ref.d.mts +19 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/ref.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/rest.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/rest.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/schema.d.mts +176 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/schema.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/static.d.mts +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/static.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/string.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/string.mjs +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/symbol.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/symbol.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/template_literal.d.mts +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/template_literal.mjs +37 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/this.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/this.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/tuple.d.mts +38 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/tuple.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/undefined.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/undefined.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/union.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/union.mjs +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/unknown.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/unknown.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/unsafe.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/unsafe.mjs +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/void.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/type/types/void.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/typebox.d.mts +69 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/typebox.mjs +85 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/assert/assert.d.mts +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/assert/assert.mjs +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/assert/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/assert/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/check/check.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/check/check.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/check/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/check/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/additional.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/additional.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/clean.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/clean.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_array.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_array.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_cyclic.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_cyclic.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_intersect.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_intersect.mjs +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_object.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_object.mjs +31 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_record.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_record.mjs +32 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_ref.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_ref.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_tuple.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_tuple.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_type.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_type.mjs +21 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_union.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/from_union.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clean/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clone/clone.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clone/clone.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clone/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/clone/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/callback.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/callback.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/decode.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/decode.mjs +52 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/encode.d.mts +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/encode.mjs +52 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_array.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_array.mjs +35 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_cyclic.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_cyclic.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_intersect.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_intersect.mjs +58 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_object.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_object.mjs +42 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_record.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_record.mjs +39 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_ref.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_ref.mjs +31 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_tuple.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_tuple.mjs +32 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_type.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_type.mjs +22 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_union.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/from_union.mjs +39 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/has.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/has.mjs +93 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/index.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/codec/index.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/convert.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/convert.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_additional.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_additional.mjs +18 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_array.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_array.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_bigint.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_bigint.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_boolean.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_boolean.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_cyclic.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_cyclic.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_enum.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_enum.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_integer.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_integer.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_intersect.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_intersect.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_literal.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_literal.mjs +44 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_null.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_null.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_number.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_number.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_object.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_object.mjs +28 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_record.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_record.mjs +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_ref.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_ref.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_string.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_string.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_template_literal.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_template_literal.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_tuple.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_tuple.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_type.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_type.mjs +43 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_undefined.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_undefined.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_union.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_union.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_void.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/from_void.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_array.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_array.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_bigint.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_bigint.mjs +45 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_boolean.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_boolean.mjs +41 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_null.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_null.mjs +44 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_number.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_number.mjs +44 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_result.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_result.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_string.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_string.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_undefined.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/convert/try/try_undefined.mjs +44 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/create.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/create.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/error.d.mts +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/error.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_array.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_array.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_bigint.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_bigint.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_boolean.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_boolean.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_constructor.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_constructor.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_cyclic.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_cyclic.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_default.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_default.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_enum.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_enum.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_function.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_function.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_integer.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_integer.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_intersect.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_intersect.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_literal.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_literal.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_never.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_never.mjs +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_null.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_null.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_number.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_number.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_object.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_object.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_record.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_record.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_ref.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_ref.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_string.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_string.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_symbol.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_symbol.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_template_literal.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_template_literal.mjs +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_tuple.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_tuple.mjs +5 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_type.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_type.mjs +61 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_undefined.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_undefined.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_union.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_union.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_void.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/from_void.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/index.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/create/index.mjs +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/default.d.mts +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/default.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_array.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_array.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_cyclic.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_cyclic.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_default.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_default.mjs +13 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_intersect.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_intersect.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_object.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_object.mjs +32 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_record.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_record.mjs +26 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_ref.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_ref.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_tuple.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_tuple.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_type.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_type.mjs +25 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_union.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/from_union.mjs +14 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/default/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/delta/diff.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/delta/diff.mjs +135 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/delta/edit.d.mts +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/delta/edit.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/delta/index.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/delta/index.mjs +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/delta/patch.d.mts +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/delta/patch.mjs +42 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/equal/equal.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/equal/equal.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/equal/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/equal/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/errors/errors.d.mts +16 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/errors/errors.mjs +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/errors/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/errors/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/hash/hash.d.mts +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/hash/hash.mjs +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/hash/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/hash/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/index.d.mts +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/index.mjs +29 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/parse/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/parse/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/parse/parse.d.mts +11 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/parse/parse.mjs +47 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/pipeline/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/pipeline/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/pipeline/pipeline.d.mts +10 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/pipeline/pipeline.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/pointer/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/pointer/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/error.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/error.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_array.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_array.mjs +39 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_enum.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_enum.mjs +6 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_intersect.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_intersect.mjs +8 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_object.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_object.mjs +33 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_record.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_record.mjs +33 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_ref.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_ref.mjs +9 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_template_literal.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_template_literal.mjs +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_tuple.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_tuple.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_type.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_type.mjs +88 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_union.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_union.mjs +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_unknown.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/from_unknown.mjs +12 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/index.d.mts +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/index.mjs +1 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/repair.d.mts +17 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/repair/repair.mjs +20 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/shared/index.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/shared/index.mjs +4 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/shared/optional_undefined.d.mts +2 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/shared/optional_undefined.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/shared/union_priority_sort.d.mts +7 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/shared/union_priority_sort.mjs +72 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/shared/union_score_select.d.mts +3 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/shared/union_score_select.mjs +51 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/value.d.mts +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/build/value/value.mjs +15 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/license +23 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/package.json +87 -0
- package/node_modules/@code-yeongyu/senpi-codemode/node_modules/typebox/readme.md +363 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@code-yeongyu/senpi-codemode/src/tool/render.ts +11 -5
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts +3 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +57 -18
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts +7 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js +12 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts +3 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js +13 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/skills.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +14 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js +1 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/proxy.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts +9 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -3
- package/node_modules/@earendil-works/pi-ai/README.md +5 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts +7 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +21 -4
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +7 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +39 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts +22 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/gen/agent_pb.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/reasoning-params.d.ts +20 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/reasoning-params.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/reasoning-params.js +26 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/reasoning-params.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.d.ts +7 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +5 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +82 -12
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +14 -11
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts +5 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +16 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +13 -10
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +4 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +4 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +45 -29
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +8 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/pi-messages.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js +18 -9
- package/node_modules/@earendil-works/pi-ai/dist/api/simple-options.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.d.ts +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.js +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/device-code.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js +22 -9
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/github-copilot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/catalog-grouping.d.ts +25 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/catalog-grouping.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/catalog-grouping.js +134 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/catalog-grouping.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/cursor-variant-aliases.json +1893 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/model-capabilities.d.ts +47 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/model-capabilities.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/model-capabilities.js +208 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/model-capabilities.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.d.ts +21 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.js +83 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.d.ts +8 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js +76 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/store-migration.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts +5 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/index.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts +13 -0
- package/node_modules/@earendil-works/pi-ai/dist/model.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/model.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts +6 -0
- package/node_modules/@earendil-works/pi-ai/dist/models.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js +9 -1
- package/node_modules/@earendil-works/pi-ai/dist/models.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js +40 -11
- package/node_modules/@earendil-works/pi-ai/dist/providers/cursor.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-individual.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.d.ts +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.js +1 -5
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/tool-resolver.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/tool-resolver.js +21 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/protocols/anthropic-xml/tool-resolver.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-message-snapshot.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-message-snapshot.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/recovery-message-snapshot.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts +45 -4
- package/node_modules/@earendil-works/pi-ai/dist/types.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/types.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js +7 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/pi-user-agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/prompt-cache-ttl.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +2 -3
- package/node_modules/@earendil-works/pi-pty/dist/loader.d.ts +6 -0
- package/node_modules/@earendil-works/pi-pty/dist/loader.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/loader.js +11 -0
- package/node_modules/@earendil-works/pi-pty/dist/loader.js.map +1 -1
- package/node_modules/@earendil-works/pi-pty/dist/quarantine.d.ts +15 -0
- package/node_modules/@earendil-works/pi-pty/dist/quarantine.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-pty/dist/quarantine.js +27 -0
- package/node_modules/@earendil-works/pi-pty/dist/quarantine.js.map +1 -0
- package/node_modules/@earendil-works/pi-pty/package.json +1 -1
- package/node_modules/@earendil-works/pi-telemetry/package.json +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts +73 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +173 -17
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js +5 -4
- package/node_modules/@earendil-works/pi-tui/dist/components/text.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts +69 -0
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/editor-component.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/image-markers.d.ts +46 -0
- package/node_modules/@earendil-works/pi-tui/dist/image-markers.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/image-markers.js +130 -0
- package/node_modules/@earendil-works/pi-tui/dist/image-markers.js.map +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts +1 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/index.js +2 -0
- package/node_modules/@earendil-works/pi-tui/dist/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/paste-markers.d.ts +3 -0
- package/node_modules/@earendil-works/pi-tui/dist/paste-markers.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/paste-markers.js +23 -7
- package/node_modules/@earendil-works/pi-tui/dist/paste-markers.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js +5 -1
- package/node_modules/@earendil-works/pi-tui/dist/tui-alt-screen.js.map +1 -1
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/package.json +7 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-mode.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAiBlC,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC;AACrD,OAAO,EACN,4BAA4B,EAE5B,SAAS,EACT,WAAW,EACX,eAAe,EACf,SAAS,EAET,QAAQ,EACR,UAAU,EACV,sBAAsB,EACtB,eAAe,EACf,MAAM,EACN,qBAAqB,EACrB,cAAc,EACd,IAAI,EACJ,aAAa,EAEb,YAAY,EACZ,aAAa,EACb,YAAY,GACZ,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AACjD,OAAO,EACN,QAAQ,EACR,SAAS,EACT,KAAK,EACL,eAAe,EACf,eAAe,EACf,eAAe,EACf,WAAW,EACX,WAAW,EACX,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,OAAO,GACP,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAA6C,eAAe,EAAE,MAAM,6BAA6B,CAAC;AACzG,OAAO,EAA4B,8BAA8B,EAAE,MAAM,qCAAqC,CAAC;AAC/G,OAAO,EAAE,qBAAqB,EAAE,MAAM,8BAA8B,CAAC;AACrE,OAAO,EAAE,QA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C,oBAAoB,IAAI,IAAI,CAAC,eAAe,CAAC,uBAAuB,EAAE,CAAC,CAAC;YACjG,CAAC;oBAAS,CAAC;gBACV,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;gBAC3B,wBAAwB,EAAE,CAAC;YAC5B,CAAC;QACF,CAAC;aAAM,CAAC;YACP,wBAAwB,EAAE,CAAC;QAC5B,CAAC;QACD,IAAI,CAAC,wBAAwB,EAAE,CAAC;IACjC,CAAC","sourcesContent":["/**\n * Interactive mode for the coding agent.\n * Handles TUI rendering and user interaction, delegating business logic to AgentSession.\n */\n\nimport * as crypto from \"node:crypto\";\nimport * as fs from \"node:fs\";\nimport * as os from \"node:os\";\nimport * as path from \"node:path\";\nimport type { AgentMessage, ThinkingLevel } from \"@earendil-works/pi-agent-core\";\nimport type { AuthEvent, AuthPrompt } from \"@earendil-works/pi-ai\";\nimport type { AssistantMessage, ImageContent, Message, Model, TextContent } from \"@earendil-works/pi-ai/compat\";\nimport type {\n\tAutocompleteItem,\n\tAutocompleteProvider,\n\tEditorComponent,\n\tKeybinding,\n\tKeyId,\n\tMarkdownTheme,\n\tOverlayHandle,\n\tOverlayOptions,\n\tSlashCommand,\n\tTerminal,\n\tTuiMainScreenRenderState,\n} from \"@earendil-works/pi-tui\";\nimport * as TuiLayouts from \"@earendil-works/pi-tui\";\nimport {\n\tCombinedAutocompleteProvider,\n\ttype Component,\n\tContainer,\n\tfuzzyFilter,\n\tgetCapabilities,\n\thyperlink,\n\ttype LoaderIndicatorOptions,\n\tMarkdown,\n\tmatchesKey,\n\touterKittyGraphicsMode,\n\tProcessTerminal,\n\tSpacer,\n\tsanitizeTerminalLabel,\n\tsetKeybindings,\n\tText,\n\tTruncatedText,\n\ttype TUI,\n\tTuiAltScreen,\n\tTuiMainScreen,\n\tvisibleWidth,\n} from \"@earendil-works/pi-tui\";\nimport chalk from \"chalk\";\nimport { spawn, spawnSync } from \"child_process\";\nimport {\n\tAPP_NAME,\n\tAPP_TITLE,\n\tBRAND,\n\tCONFIG_DIR_NAME,\n\tDISPLAY_VERSION,\n\texpandTildePath,\n\tgetAgentDir,\n\tgetAuthPath,\n\tgetDebugLogPath,\n\tgetDocsPath,\n\tgetShareViewerUrl,\n\tVERSION,\n} from \"../../config.ts\";\nimport { type AgentSession, type AgentSessionEvent, parseSkillBlock } from \"../../core/agent-session.ts\";\nimport { type AgentSessionRuntime, SessionImportFileNotFoundError } from \"../../core/agent-session-runtime.ts\";\nimport { isApiKeyLoginProvider } from \"../../core/auth-providers.ts\";\nimport { envValue } from \"../../core/brand.ts\";\nimport {\n\tCACHE_TTL_MS,\n\ttype CacheMiss,\n\tcollectCacheMisses,\n\tcomputeCacheWaste,\n\tdetectCacheMiss,\n} from \"../../core/cache-stats.ts\";\nimport type {\n\tAutocompleteProviderFactory,\n\tEditorFactory,\n\tExtensionCommandContext,\n\tExtensionContext,\n\tExtensionRunner,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tMarkdownTransformer,\n\tProjectTrustContext,\n\tWorkingIndicatorOptions,\n} from \"../../core/extensions/index.ts\";\nimport { buildNoticeBox, type NoticeSpec } from \"../../core/extensions/notice/index.ts\";\nimport { FooterDataProvider, type ReadonlyFooterDataProvider } from \"../../core/footer-data-provider.ts\";\nimport { appendHiddenTuiStdout } from \"../../core/hidden-stdout-log.ts\";\nimport { buildHighReasoningWarning } from \"../../core/high-reasoning-warning.ts\";\nimport { configureHttpDispatcher, formatHttpIdleTimeoutMs } from \"../../core/http-dispatcher.ts\";\nimport { type AppKeybinding, KeybindingsManager } from \"../../core/keybindings.ts\";\nimport { createCompactionSummaryMessage } from \"../../core/messages.ts\";\nimport {\n\tdefaultModelPerProvider,\n\tfindExactModelReferenceMatch,\n\ttype PatternResolution,\n\tresolveModelScope,\n\tresolveModelScopeFromModels,\n\tresolveModelScopeWithDiagnostics,\n\ttype ScopedModel,\n} from \"../../core/model-resolver.ts\";\nimport { CredentialSynchronizationError } from \"../../core/model-runtime.ts\";\nimport type { ResourceDiagnostic } from \"../../core/resource-loader.ts\";\nimport { formatMissingSessionCwdPrompt, MissingSessionCwdError } from \"../../core/session-cwd.ts\";\nimport { createSessionLogger, type SessionLogger } from \"../../core/session-log.ts\";\nimport { type SessionEntry, SessionManager, sessionEntryToContextMessages } from \"../../core/session-manager.ts\";\nimport type { FullscreenExitOutput, TuiMode } from \"../../core/settings-manager.ts\";\nimport { BUILTIN_SLASH_COMMANDS } from \"../../core/slash-commands.ts\";\nimport type { SourceInfo } from \"../../core/source-info.ts\";\nimport { isInstallTelemetryEnabled } from \"../../core/telemetry.ts\";\nimport { formatTimings, time } from \"../../core/timings.ts\";\nimport type { TruncationResult } from \"../../core/tools/truncate.ts\";\nimport { hasTrustRequiringProjectResources, ProjectTrustStore } from \"../../core/trust-manager.ts\";\nimport { getUsageCostBreakdown } from \"../../core/usage-totals.ts\";\nimport {\n\tconsumeEarlyInspectorVmImportRecoveries,\n\tINSPECTOR_VM_IMPORT_WARNING,\n\tisRecoverableInspectorVmImportError,\n} from \"../../inspector-policy.ts\";\nimport { getChangelogPath, getNewEntries, normalizeChangelogLinks, parseChangelog } from \"../../utils/changelog.ts\";\nimport { copyToClipboard, readClipboardText } from \"../../utils/clipboard.ts\";\nimport { extensionForImageMimeType, readClipboardImage } from \"../../utils/clipboard-image.ts\";\nimport { parseGitUrl } from \"../../utils/git.ts\";\nimport { openBrowser } from \"../../utils/open-browser.ts\";\nimport { getCwdRelativePath } from \"../../utils/paths.ts\";\nimport { getPiUserAgent } from \"../../utils/pi-user-agent.ts\";\nimport { killTrackedDetachedChildren } from \"../../utils/shell.ts\";\nimport { ensureTool, type ToolStatus } from \"../../utils/tools-manager.ts\";\nimport { checkForNewPiVersion, getReleaseChangelogUrl } from \"../../utils/version-check.ts\";\nimport { abortedErrorLabel } from \"./aborted-error-label.ts\";\nimport {\n\ttype CompactionQueuedMessage,\n\ttransferCompactionQueue,\n\twaitForPromptDisposition,\n} from \"./compaction-queue-transfer.ts\";\nimport { ArminComponent } from \"./components/armin.ts\";\nimport { AssistantMessageComponent } from \"./components/assistant-message.ts\";\nimport { BashExecutionComponent } from \"./components/bash-execution.ts\";\nimport { BorderedLoader } from \"./components/bordered-loader.ts\";\nimport { BranchSummaryMessageComponent } from \"./components/branch-summary-message.ts\";\nimport { CompactionSummaryMessageComponent } from \"./components/compaction-summary-message.ts\";\nimport { ContinuityNoticeTracker } from \"./components/continuity-notice.ts\";\nimport { CustomEditor } from \"./components/custom-editor.ts\";\nimport { CustomEntryComponent } from \"./components/custom-entry.ts\";\nimport { CustomMessageComponent } from \"./components/custom-message.ts\";\nimport { DaxnutsComponent } from \"./components/daxnuts.ts\";\nimport { DynamicBorder } from \"./components/dynamic-border.ts\";\nimport { EarendilAnnouncementComponent } from \"./components/earendil-announcement.ts\";\nimport { ExtensionEditorComponent } from \"./components/extension-editor.ts\";\nimport { ExtensionInputComponent } from \"./components/extension-input.ts\";\nimport { ExtensionSelectorComponent } from \"./components/extension-selector.ts\";\nimport { FavoriteModelsSelectorComponent } from \"./components/favorite-models-selector.ts\";\nimport { FooterComponent, formatTokens } from \"./components/footer.ts\";\nimport { formatKeyText, keyDisplayText, keyHint, keyText, rawKeyHint } from \"./components/keybinding-hints.ts\";\nimport { LoginDialogComponent } from \"./components/login-dialog.ts\";\nimport { createMermaidMarkdownTransformer } from \"./components/mermaid.ts\";\nimport {\n\ttype FavoriteModelIds,\n\tgetModelFullId,\n\tmergeFavoritePatternsForPersist,\n} from \"./components/model-favorites.ts\";\nimport { ModelSelectorComponent } from \"./components/model-selector.ts\";\nimport {\n\ttype AuthSelectorProvider,\n\tformatAuthSelectorProviderType,\n\tOAuthSelectorComponent,\n} from \"./components/oauth-selector.ts\";\nimport { ScopedModelsSelectorComponent } from \"./components/scoped-models-selector.ts\";\nimport { SessionSelectorComponent } from \"./components/session-selector.ts\";\nimport { SettingsSelectorComponent } from \"./components/settings-selector.ts\";\nimport { classifyEditorInput, ShortcutOverlay, shouldShowShortcutOverlay } from \"./components/shortcut-overlay.ts\";\nimport { SkillInvocationMessageComponent } from \"./components/skill-invocation-message.ts\";\nimport {\n\tBranchSummaryStatusIndicator,\n\tCompactionStatusIndicator,\n\tIdleStatus,\n\tRetryStatusIndicator,\n\ttype StatusIndicator,\n\tWorkingStatusIndicator,\n} from \"./components/status-indicator.ts\";\nimport { ToolExecutionComponent } from \"./components/tool-execution.ts\";\nimport { TreeSelectorComponent } from \"./components/tree-selector.ts\";\nimport { TrustSelectorComponent } from \"./components/trust-selector.ts\";\nimport { UserMessageComponent } from \"./components/user-message.ts\";\nimport { UserMessageSelectorComponent } from \"./components/user-message-selector.ts\";\nimport { expandEditorSubmission, expandSubmittedText, transferEditorContent } from \"./editor-paste-transfer.ts\";\nimport { formatExtensionErrorHeadline, sanitizeTuiErrorMessage } from \"./extension-error-format.ts\";\nimport { editFileInExternalEditor, editInExternalEditor } from \"./external-editor.ts\";\nimport { GrokChrome, type InteractiveChrome, type InteractiveFooter } from \"./grok/chrome.ts\";\nimport { restoreInteractiveStderr, takeOverInteractiveStderr } from \"./interactive-stderr-guard.ts\";\nimport { applyKeybindingsFileEdit, seedKeybindingsFile } from \"./keybindings-command.ts\";\nimport { refreshModelCatalogs } from \"./model-catalog-refresh.ts\";\nimport { getModelSearchText } from \"./model-search.ts\";\nimport { isRiskyMainModel, RISKY_MAIN_MODEL_WARNING } from \"./risky-main-model-warning.ts\";\nimport { DEFAULT_SMOOTH_FPS, StreamingRevealController } from \"./streaming-reveal.ts\";\nimport {\n\tgetAvailableThemes,\n\tgetAvailableThemesWithPaths,\n\tgetEditorTheme,\n\tgetMarkdownTheme,\n\tgetThemeByName,\n\tonThemeChange,\n\tsetRegisteredThemes,\n\tstopThemeWatcher,\n\tTheme,\n\ttype ThemeColor,\n\ttheme,\n} from \"./theme/theme.ts\";\nimport { InteractiveThemeController } from \"./theme/theme-controller.ts\";\nimport { buildFavoriteCycleStatusMessage } from \"./tips/favorite-messages.ts\";\nimport { recordTipShown } from \"./tips/history-writer.ts\";\nimport { TIP_DEFINITIONS } from \"./tips/registry.ts\";\nimport { appendStartupHeader } from \"./tips/startup-header.ts\";\nimport { resolveStartupTipLine } from \"./tips/startup-tip.ts\";\nimport { resolveWorkingTipLine, WorkingTipCache, type WorkingTipLine } from \"./tips/working-tip.ts\";\nimport { buildTmuxSetupWarning } from \"./tmux-setup.ts\";\nimport { ToolArgsRevealController } from \"./tool-args-reveal.ts\";\nimport { readToolProgress } from \"./tool-progress.ts\";\nimport { ToolResultRevealController } from \"./tool-result-reveal.ts\";\nimport {\n\tblendWorkingStatusShimmerRgbColor,\n\tformatActiveToolWorkingLabel,\n\tformatToolHookStatusMessageFrame,\n\tformatWorkingStatusMessageFrame,\n\tlargeSessionWorkingStatusInterval,\n\tsanitizeWorkingStatusPlainText,\n\ttype WorkingStatusRgbColor,\n} from \"./working-status.ts\";\n\n/** Interface for components that can be expanded/collapsed */\ninterface Expandable {\n\tsetExpanded(expanded: boolean): void;\n}\n\nfunction isExpandable(obj: unknown): obj is Expandable {\n\treturn typeof obj === \"object\" && obj !== null && \"setExpanded\" in obj && typeof obj.setExpanded === \"function\";\n}\n\nclass ExpandableText extends Text implements Expandable {\n\tprivate readonly getCollapsedText: () => string;\n\tprivate readonly getExpandedText: () => string;\n\n\tconstructor(\n\t\tgetCollapsedText: () => string,\n\t\tgetExpandedText: () => string,\n\t\texpanded = false,\n\t\tpaddingX = 0,\n\t\tpaddingY = 0,\n\t) {\n\t\tsuper(expanded ? getExpandedText() : getCollapsedText(), paddingX, paddingY);\n\t\tthis.getCollapsedText = getCollapsedText;\n\t\tthis.getExpandedText = getExpandedText;\n\t}\n\n\tsetExpanded(expanded: boolean): void {\n\t\tthis.setText(expanded ? this.getExpandedText() : this.getCollapsedText());\n\t}\n}\n\ntype ToolExecutionStartEvent = Extract<AgentSessionEvent, { type: \"tool_execution_start\" }>;\ntype ToolExecutionEndEvent = Extract<AgentSessionEvent, { type: \"tool_execution_end\" }>;\ntype ToolHookStatusStartEvent = Extract<AgentSessionEvent, { type: \"tool_hook_status\"; phase: \"start\" }>;\ntype ToolHookStatusEvent = Extract<AgentSessionEvent, { type: \"tool_hook_status\" }>;\n\ntype PendingZeroDelayRetryIndicator = {\n\tfallbackApplied: boolean;\n};\n\nexport function shouldShowRetryIndicator(delayMs: number, fallbackApplied: boolean): boolean {\n\treturn delayMs !== 0 || !fallbackApplied;\n}\n\nfunction getStreamingToolCallPartialJson(content: unknown): string | undefined {\n\tif (typeof content !== \"object\" || content === null || !(\"partialJson\" in content)) return undefined;\n\treturn typeof content.partialJson === \"string\" ? content.partialJson : undefined;\n}\n\nfunction formatToolHookTerminalTitle(event: ToolHookStatusStartEvent): string {\n\tconst hookName = sanitizeWorkingStatusPlainText(event.hookName) || \"hook\";\n\tconst statusMessage = sanitizeWorkingStatusPlainText(event.statusMessage);\n\treturn `${APP_TITLE} - ${hookName}: ${statusMessage}`;\n}\n\ntype RenderSessionItem = AgentMessage | Extract<SessionEntry, { type: \"custom\" }>;\n\nfunction isCustomSessionEntry(item: RenderSessionItem): item is Extract<SessionEntry, { type: \"custom\" }> {\n\treturn \"type\" in item && item.type === \"custom\";\n}\n\nconst DEAD_TERMINAL_ERROR_CODES = new Set([\"EIO\", \"EPIPE\", \"ENOTCONN\"]);\nconst DEFAULT_WORKING_STATUS_REFRESH_INTERVAL_MS = 600;\nconst DEFAULT_WORKING_STATUS_MESSAGE_ANIMATION_INTERVAL_MS = 32;\nconst LARGE_SESSION_WORKING_STATUS_REFRESH_INTERVAL_MS = 60_000;\nconst LARGE_SESSION_WORKING_STATUS_MESSAGE_INTERVAL_MS = 1_000;\nconst FALLBACK_STATUS_KEY = \"fallback\";\nconst RGB_FOREGROUND_PATTERN = /\\x1b\\[38;2;(\\d+);(\\d+);(\\d+)m/;\n\nconst DARK_DEFAULT_WORKING_TEXT_RGB: WorkingStatusRgbColor = { r: 229, g: 229, b: 231 };\nconst LIGHT_DEFAULT_WORKING_TEXT_RGB: WorkingStatusRgbColor = { r: 17, g: 17, b: 17 };\nconst DARK_DEFAULT_WORKING_BASE_RGB: WorkingStatusRgbColor = { r: 102, g: 102, b: 102 };\nconst LIGHT_DEFAULT_WORKING_BASE_RGB: WorkingStatusRgbColor = { r: 118, g: 118, b: 118 };\n\nfunction parseAnsiRgbForeground(ansi: string): WorkingStatusRgbColor | undefined {\n\tconst match = RGB_FOREGROUND_PATTERN.exec(ansi);\n\tconst red = match?.[1];\n\tconst green = match?.[2];\n\tconst blue = match?.[3];\n\tif (red === undefined || green === undefined || blue === undefined) {\n\t\treturn undefined;\n\t}\n\treturn {\n\t\tr: Number.parseInt(red, 10),\n\t\tg: Number.parseInt(green, 10),\n\t\tb: Number.parseInt(blue, 10),\n\t};\n}\n\nfunction isWorkingLightTheme(): boolean {\n\treturn theme.name?.toLowerCase().includes(\"light\") ?? false;\n}\n\nfunction formatWorkingStatusShimmerText(text: string, intensity: number): string {\n\tif (theme.getColorMode() !== \"truecolor\") {\n\t\tif (intensity < 0.2) {\n\t\t\treturn theme.fg(\"dim\", text);\n\t\t}\n\t\tif (intensity < 0.6) {\n\t\t\treturn theme.fg(\"text\", text);\n\t\t}\n\t\treturn theme.bold(theme.fg(\"text\", text));\n\t}\n\n\tconst lightTheme = isWorkingLightTheme();\n\tconst highlight =\n\t\tparseAnsiRgbForeground(theme.getFgAnsi(\"dim\")) ??\n\t\t(lightTheme ? LIGHT_DEFAULT_WORKING_BASE_RGB : DARK_DEFAULT_WORKING_BASE_RGB);\n\tconst base =\n\t\tparseAnsiRgbForeground(theme.getFgAnsi(\"text\")) ??\n\t\t(lightTheme ? LIGHT_DEFAULT_WORKING_TEXT_RGB : DARK_DEFAULT_WORKING_TEXT_RGB);\n\tconst color = blendWorkingStatusShimmerRgbColor(highlight, base, intensity * 0.9);\n\treturn `\\x1b[1m\\x1b[38;2;${color.r};${color.g};${color.b}m${text}\\x1b[39m\\x1b[22m`;\n}\n\nfunction isDeadTerminalError(error: unknown): boolean {\n\tif (!error || typeof error !== \"object\" || !(\"code\" in error)) {\n\t\treturn false;\n\t}\n\tconst code = (error as NodeJS.ErrnoException).code;\n\treturn code !== undefined && DEAD_TERMINAL_ERROR_CODES.has(code);\n}\n\nconst ANTHROPIC_SUBSCRIPTION_AUTH_WARNING =\n\t\"Anthropic subscription auth is active. Third-party harness usage draws from extra usage and is billed per token, not your Claude plan limits. Manage extra usage at https://claude.ai/settings/usage. Disable this warning in /settings.\";\n\nfunction isAnthropicSubscriptionAuthKey(apiKey: string | undefined): boolean {\n\treturn typeof apiKey === \"string\" && apiKey.startsWith(\"sk-ant-oat\");\n}\n\nfunction isUnknownModel(model: Model<any> | undefined): boolean {\n\treturn !!model && model.provider === \"unknown\" && model.id === \"unknown\" && model.api === \"unknown\";\n}\n\nfunction quoteIfNeeded(value: string): string {\n\tif (value.length > 0 && !/[^a-zA-Z0-9_\\-./~:@]/.test(value)) {\n\t\treturn value;\n\t}\n\treturn `'${value.replace(/'/g, `'\\\\''`)}'`;\n}\n\nexport function formatResumeCommand(sessionManager: SessionManager): string | undefined {\n\tif (!process.stdout.isTTY) return undefined;\n\tif (!sessionManager.isPersisted()) return undefined;\n\n\tconst sessionFile = sessionManager.getSessionFile();\n\tif (!sessionFile || !fs.existsSync(sessionFile)) return undefined;\n\n\tconst args = [APP_NAME];\n\tif (!sessionManager.usesDefaultSessionDir()) {\n\t\targs.push(\"--session-dir\", quoteIfNeeded(sessionManager.getSessionDir()));\n\t}\n\targs.push(\"--session\", sessionManager.getSessionId());\n\treturn args.join(\" \");\n}\n\nfunction hasDefaultModelProvider(providerId: string): providerId is keyof typeof defaultModelPerProvider {\n\treturn providerId in defaultModelPerProvider;\n}\n\n// isApiKeyLoginProvider now lives in core/auth-providers.ts so RPC clients and\n// the classic selectors share ONE source of truth. Re-exported here to keep the\n// existing public import (test/oauth-selector.test.ts) working, and used\n// locally by getLoginProviderOptions below.\nexport { isApiKeyLoginProvider };\n\ntype LoginProviderCompletionOption = {\n\tid: string;\n\tname: string;\n\tauthTypes: AuthSelectorProvider[\"authType\"][];\n};\n\nconst AUTH_TYPE_ORDER = { oauth: 0, api_key: 1 } satisfies Record<AuthSelectorProvider[\"authType\"], number>;\n\nfunction createFuzzyAutocompleteItems<T>(\n\titems: T[],\n\tprefix: string,\n\tgetSearchText: (item: T) => string,\n\ttoAutocompleteItem: (item: T) => AutocompleteItem,\n): AutocompleteItem[] | null {\n\tconst filtered = fuzzyFilter(items, prefix, getSearchText);\n\tif (filtered.length === 0) return null;\n\treturn filtered.map(toAutocompleteItem);\n}\n\nfunction getLoginProviderCompletionOptions(\n\tproviderOptions: readonly AuthSelectorProvider[],\n): LoginProviderCompletionOption[] {\n\tconst byId = new Map<string, LoginProviderCompletionOption>();\n\tfor (const provider of providerOptions) {\n\t\tconst existing = byId.get(provider.id);\n\t\tif (existing) {\n\t\t\tif (!existing.authTypes.includes(provider.authType)) {\n\t\t\t\texisting.authTypes.push(provider.authType);\n\t\t\t\texisting.authTypes.sort((a, b) => AUTH_TYPE_ORDER[a] - AUTH_TYPE_ORDER[b]);\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tbyId.set(provider.id, {\n\t\t\tid: provider.id,\n\t\t\tname: provider.name,\n\t\t\tauthTypes: [provider.authType],\n\t\t});\n\t}\n\treturn Array.from(byId.values()).sort((a, b) => a.name.localeCompare(b.name));\n}\n\nfunction getLoginProviderSearchText(provider: LoginProviderCompletionOption): string {\n\tconst authTypes = provider.authTypes\n\t\t.map((authType) => `${authType} ${formatAuthSelectorProviderType(authType)}`)\n\t\t.join(\" \");\n\treturn `${provider.id} ${provider.name} ${authTypes}`;\n}\n\nfunction formatLoginProviderCompletionDescription(provider: LoginProviderCompletionOption): string {\n\tconst authTypes = provider.authTypes.map(formatAuthSelectorProviderType).join(\"/\");\n\treturn provider.name === provider.id ? authTypes : `${provider.name} · ${authTypes}`;\n}\n\n/**\n * Options for InteractiveMode initialization.\n */\nexport interface InteractiveModeOptions {\n\t/** Renderer mode for the interactive terminal. */\n\tuiMode?: TuiMode;\n\t/** Providers that were migrated to auth.json (shows warning) */\n\tmigratedProviders?: string[];\n\t/** Warning message if session model couldn't be restored */\n\tmodelFallbackMessage?: string;\n\t/** Cwd to trust after reload if it gained a .pi directory during this implicitly trusted session. */\n\tautoTrustOnReloadCwd?: string;\n\t/** Initial message to send on startup (can include @file content) */\n\tinitialMessage?: string;\n\t/** Images to attach to the initial message */\n\tinitialImages?: ImageContent[];\n\tinitialTitlePrompt?: string;\n\t/** Additional messages to send after the initial message */\n\tinitialMessages?: string[];\n\t/** Force verbose startup (overrides quietStartup setting) */\n\tverbose?: boolean;\n\t/** Select an experimental interactive chrome. */\n\tchrome?: InteractiveChrome | \"grok\";\n\t/** TUI layout mode. */\n\ttuiMode?: TuiMode;\n\t/** Initial interactive theme setting for this invocation. */\n\tinitialThemeSetting?: string;\n}\n\ninterface InteractiveTuiOptions {\n\ttuiMode: TuiMode;\n\tshowHardwareCursor: boolean;\n\tlogDirectory: string;\n\tterminal?: Terminal;\n\tonRightClickPaste?: () => void;\n}\n\n/** Composition root for selecting the interactive terminal renderer. */\nexport function createInteractiveTui(options: InteractiveTuiOptions): TuiMainScreen | TuiAltScreen {\n\tconst terminal = options.terminal ?? new ProcessTerminal({ onExternalStdoutWrite: appendHiddenTuiStdout });\n\tif (options.tuiMode === \"fullscreen\") {\n\t\tconst styleSearchMatch = (text: string) => theme.bg(\"searchMatchBg\", theme.fg(\"searchMatchText\", text));\n\t\treturn new TuiAltScreen(terminal, options.showHardwareCursor, options.logDirectory, {\n\t\t\tsearchMatchStyle: (text) => theme.underline(styleSearchMatch(text)),\n\t\t\tsearchCurrentMatchStyle: (text) => theme.bold(theme.inverse(styleSearchMatch(text))),\n\t\t\topenUrl: openBrowser,\n\t\t\tonRightClickPaste: options.onRightClickPaste,\n\t\t\tcopySelection: async (text) => {\n\t\t\t\ttry {\n\t\t\t\t\tawait copyToClipboard(text);\n\t\t\t\t\treturn true;\n\t\t\t\t} catch {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}\n\treturn new TuiMainScreen(terminal, options.showHardwareCursor, options.logDirectory);\n}\n\n/** Stable reference for components while InteractiveMode replaces the active renderer. */\nexport function createInteractiveTuiReference(getTui: () => TUI): TUI {\n\treturn new Proxy({} as TUI, {\n\t\tget: (_target, property) => {\n\t\t\tconst tui = getTui();\n\t\t\tconst value = Reflect.get(tui, property, tui);\n\t\t\tif (typeof value !== \"function\") return value;\n\t\t\tlet methodTui = tui;\n\t\t\tlet method = value;\n\t\t\treturn (...args: unknown[]) => {\n\t\t\t\tconst currentTui = getTui();\n\t\t\t\tif (currentTui !== methodTui) {\n\t\t\t\t\tconst currentMethod = Reflect.get(currentTui, property, currentTui);\n\t\t\t\t\tif (typeof currentMethod !== \"function\") {\n\t\t\t\t\t\tthrow new TypeError(`TUI property ${String(property)} is not callable`);\n\t\t\t\t\t}\n\t\t\t\t\tmethodTui = currentTui;\n\t\t\t\t\tmethod = currentMethod;\n\t\t\t\t}\n\t\t\t\treturn Reflect.apply(method, methodTui, args);\n\t\t\t};\n\t\t},\n\t\tset: (_target, property, value) => {\n\t\t\tconst tui = getTui();\n\t\t\treturn Reflect.set(tui, property, value, tui);\n\t\t},\n\t\thas: (_target, property) => Reflect.has(getTui(), property),\n\t\tgetPrototypeOf: () => Reflect.getPrototypeOf(getTui()),\n\t});\n}\n\nexport class InteractiveMode {\n\tprivate static restoreCompactionEscapeOverride(host: InteractiveMode): void {\n\t\tif (!host.compactionEscapeOverrideActive) return;\n\t\thost.defaultEditor.onEscape = host.autoCompactionEscapeHandler;\n\t\thost.autoCompactionEscapeHandler = undefined;\n\t\thost.compactionEscapeOverrideActive = false;\n\t}\n\n\tprivate runtimeHost: AgentSessionRuntime;\n\tprivate options: InteractiveModeOptions;\n\tprivate chrome: InteractiveChrome | undefined;\n\tprivate renderer: TuiMainScreen | TuiAltScreen;\n\tprivate ui: TUI;\n\tprivate mainScreenRenderState: TuiMainScreenRenderState | undefined;\n\tprivate loadedResourcesContainer: Container;\n\tprivate chatContainer: Container;\n\tprivate documentContainer: Container;\n\tprivate transcriptScrollView: TuiLayouts.ScrollView | undefined;\n\tprivate fullscreenLayoutRoot: Component | undefined;\n\tprivate pendingMessagesContainer: Container;\n\tprivate statusContainer: Container;\n\tprivate readonly sessionShownTipIds = new Set<string>();\n\tprivate shortcutOverlay: ShortcutOverlay | undefined;\n\tprivate lastEditorText = \"\";\n\tprivate lastInputWasPaste = false;\n\tprivate sessionLogger: SessionLogger | undefined;\n\tprivate readonly continuityNotices = new ContinuityNoticeTracker();\n\tprivate readonly turnWorkingTip = new WorkingTipCache();\n\tprivate hookStatusContainer: Container;\n\tprivate defaultEditor: CustomEditor;\n\tprivate editor: EditorComponent;\n\tprivate editorComponentFactory: EditorFactory | undefined;\n\tprivate autocompleteProvider: AutocompleteProvider | undefined;\n\tprivate autocompleteProviderWrappers: AutocompleteProviderFactory[] = [];\n\tprivate fdPath: string | undefined;\n\tprivate editorContainer: Container;\n\tprivate footer: InteractiveFooter;\n\tprivate activeSelectorToken?: object;\n\tprivate activeSelectorDispose?: () => void;\n\tprivate footerContainer: Container;\n\tprivate footerDataProvider: FooterDataProvider;\n\t// Stored so the same manager can be injected into custom editors, selectors, and extension UI.\n\tprivate keybindings: KeybindingsManager;\n\tprivate version: string;\n\tprivate isInitialized = false;\n\tprivate onInputCallback?: (text: string) => void;\n\tprivate pendingUserInputs: string[] = [];\n\tprivate activeStatusIndicator: StatusIndicator | undefined = undefined;\n\tprivate readonly idleStatus = new IdleStatus();\n\tprivate workingMessage: string | undefined = undefined;\n\tprivate workingVisible = true;\n\tprivate workingIndicatorOptions: WorkingIndicatorOptions | undefined = undefined;\n\tprivate workingStartedAt: number | undefined = undefined;\n\tprivate readonly defaultWorkingMessage = \"Working\";\n\tprivate readonly defaultHiddenThinkingLabel = \"Thinking...\";\n\tprivate hiddenThinkingLabel = this.defaultHiddenThinkingLabel;\n\tprivate activeToolExecutions = new Map<string, string>();\n\tprivate activeToolExecutionTerminalTitle: string | undefined = undefined;\n\tprivate workingMessageBeforeActiveTool: string | undefined = undefined;\n\tprivate activeToolHooks = new Map<string, ToolHookStatusStartEvent>();\n\tprivate hookStatusIntervalId: NodeJS.Timeout | undefined = undefined;\n\tprivate activeToolTerminalTitle: string | undefined = undefined;\n\tprivate extensionTerminalTitle: string | undefined = undefined;\n\n\tprivate lastSigintTime = 0;\n\tprivate lastEscapeTime = 0;\n\tprivate changelogMarkdown: string | undefined = undefined;\n\tprivate startupNoticesShown = false;\n\tprivate anthropicSubscriptionWarningShown = false;\n\n\t// Status line tracking (for mutating immediately-sequential status updates)\n\tprivate lastStatusSpacer: Spacer | undefined = undefined;\n\tprivate lastStatusText: Text | undefined = undefined;\n\tprivate managedToolStatusStarted = false;\n\n\t// Streaming message tracking\n\tprivate streamingComponent: AssistantMessageComponent | undefined = undefined;\n\tprivate streamingMessage: AssistantMessage | undefined = undefined;\n\tprivate readonly streamingReveal: StreamingRevealController;\n\tprivate readonly toolArgsReveal: ToolArgsRevealController;\n\tprivate readonly toolResultReveal: ToolResultRevealController;\n\n\t// Tool execution tracking: toolCallId -> component\n\tprivate pendingTools = new Map<string, ToolExecutionComponent>();\n\tprivate requestStreamingRender(): void {\n\t\tthis.ui.requestRender();\n\t}\n\tprivate applySmoothStreamingRenderFps(): void {\n\t\tconst fps = this.settingsManager.getSmoothStreaming()\n\t\t\t? this.settingsManager.getSmoothStreamingFps()\n\t\t\t: DEFAULT_SMOOTH_FPS;\n\t\tthis.ui.setMaxRenderFps(fps);\n\t}\n\n\t// Tool output expansion state\n\tprivate toolOutputExpanded = false;\n\n\t// Thinking block visibility state\n\tprivate hideThinkingBlock = false;\n\tprivate outputPad = 1;\n\tprivate readonly mermaidMarkdownTransformer: MarkdownTransformer = createMermaidMarkdownTransformer({\n\t\tgetMode: () => this.settingsManager.getMermaidRenderingMode(),\n\t\ttheme,\n\t});\n\n\t// Skill commands: command name -> skill file path\n\tprivate skillCommands = new Map<string, string>();\n\n\t// Agent subscription unsubscribe function\n\tprivate unsubscribe?: () => void;\n\tprivate signalCleanupHandlers: Array<() => void> = [];\n\n\t// Track if editor is in bash mode (text starts with !)\n\tprivate isBashMode = false;\n\n\t// Track current bash execution component\n\tprivate bashComponent: BashExecutionComponent | undefined = undefined;\n\n\t// Track pending bash components (shown in pending area, moved to chat on submit)\n\tprivate pendingBashComponents: BashExecutionComponent[] = [];\n\n\t// Auto-compaction state\n\tprivate autoCompactionEscapeHandler?: () => void;\n\tprivate compactionEscapeOverrideActive = false;\n\tprivate autoCompactionProgressText = \"\";\n\n\t// Auto-retry state\n\tprivate retryEscapeHandler?: () => void;\n\tprivate fallbackAppliedBeforeRetryStart = false;\n\tprivate pendingZeroDelayRetryIndicator: PendingZeroDelayRetryIndicator | undefined = undefined;\n\n\t// Messages queued while compaction is running\n\tprivate compactionQueuedMessages: CompactionQueuedMessage[] = [];\n\tprivate compactionInFlightMessages: CompactionQueuedMessage[] = [];\n\tprivate compactionTransferAbortControllers = new Map<CompactionQueuedMessage, AbortController>();\n\tprivate compactionQueueFlushTail: Promise<void> | undefined;\n\tprivate compactionQueueGeneration = 0;\n\n\t// Shutdown state\n\tprivate shutdownRequested = false;\n\n\t// Extension UI state\n\tprivate extensionSelector: ExtensionSelectorComponent | undefined = undefined;\n\tprivate extensionInput: ExtensionInputComponent | undefined = undefined;\n\tprivate extensionEditor: ExtensionEditorComponent | undefined = undefined;\n\tprivate extensionTerminalInputSubscriptions = new Set<{\n\t\thandler: (data: string) => { consume?: boolean; data?: string } | undefined;\n\t\tunsubscribe: () => void;\n\t}>();\n\n\t// Extension widgets (components rendered above/below the editor)\n\tprivate extensionWidgetsAbove = new Map<string, Component & { dispose?(): void }>();\n\tprivate extensionWidgetsBelow = new Map<string, Component & { dispose?(): void }>();\n\tprivate widgetContainerAbove!: Container;\n\tprivate widgetContainerBelow!: Container;\n\n\t// Custom footer from extension (undefined = use built-in footer)\n\tprivate customFooter: (Component & { dispose?(): void }) | undefined = undefined;\n\n\t// Header container that holds the built-in or custom header\n\tprivate headerContainer: Container;\n\n\t// Built-in header (logo + keybinding hints + changelog)\n\tprivate builtInHeader: Component | undefined = undefined;\n\n\t// Custom header from extension (undefined = use built-in header)\n\tprivate customHeader: (Component & { dispose?(): void }) | undefined = undefined;\n\n\tprivate readonly onRightClickPaste = (): void => {\n\t\tvoid this.handleRightClickPaste();\n\t};\n\tprivate autoTrustOnReloadCwd: string | undefined;\n\tprivate themeController: InteractiveThemeController;\n\n\t// Convenience accessors\n\tprivate get session(): AgentSession {\n\t\treturn this.runtimeHost.session;\n\t}\n\tprivate get sessionManager() {\n\t\treturn this.session.sessionManager;\n\t}\n\tprivate get settingsManager() {\n\t\treturn this.session.settingsManager;\n\t}\n\n\tconstructor(runtimeHost: AgentSessionRuntime, options: InteractiveModeOptions = {}) {\n\t\tthis.runtimeHost = runtimeHost;\n\t\tconst tuiMode = options.tuiMode ?? this.settingsManager.getTuiMode();\n\t\tthis.options = { ...options, tuiMode };\n\t\tthis.chrome = options.chrome === \"grok\" ? new GrokChrome() : options.chrome;\n\t\tthis.autoTrustOnReloadCwd = options.autoTrustOnReloadCwd;\n\t\tthis.runtimeHost.setBeforeSessionInvalidate(() => {\n\t\t\tInteractiveMode.restoreCompactionEscapeOverride(this);\n\t\t\tthis.resetExtensionUI();\n\t\t});\n\t\tthis.runtimeHost.setRebindSession(async () => {\n\t\t\tawait this.rebindCurrentSession({ renderBeforeBind: true });\n\t\t\tawait this.themeController.applyFromSettings();\n\t\t});\n\t\tthis.version = DISPLAY_VERSION;\n\t\tthis.renderer = createInteractiveTui({\n\t\t\ttuiMode,\n\t\t\tshowHardwareCursor: this.settingsManager.getShowHardwareCursor(),\n\t\t\tlogDirectory: getAgentDir(),\n\t\t\tonRightClickPaste: this.onRightClickPaste,\n\t\t});\n\t\tthis.ui = createInteractiveTuiReference(() => this.renderer);\n\t\tthis.streamingReveal = new StreamingRevealController({\n\t\t\tgetSmoothStreaming: () => this.settingsManager.getSmoothStreaming(),\n\t\t\tgetSmoothStreamingFps: () => this.settingsManager.getSmoothStreamingFps(),\n\t\t\tgetHideThinkingBlock: () => this.hideThinkingBlock,\n\t\t\trequestRender: () => this.ui.requestRender(),\n\t\t});\n\t\tthis.toolArgsReveal = new ToolArgsRevealController({\n\t\t\tgetSmoothStreaming: () => this.settingsManager.getSmoothStreaming(),\n\t\t\tgetSmoothStreamingFps: () => this.settingsManager.getSmoothStreamingFps(),\n\t\t\trequestRender: () => this.ui.requestRender(),\n\t\t});\n\t\tthis.toolResultReveal = new ToolResultRevealController({\n\t\t\tgetSmoothStreaming: () => this.settingsManager.getSmoothStreaming(),\n\t\t\tgetSmoothStreamingFps: () => this.settingsManager.getSmoothStreamingFps(),\n\t\t\trequestRender: () => this.ui.requestRender(),\n\t\t});\n\t\tthis.applySmoothStreamingRenderFps();\n\t\tthis.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());\n\t\tthis.headerContainer = new Container();\n\t\tthis.loadedResourcesContainer = new Container();\n\t\tthis.chatContainer = new Container();\n\t\tthis.documentContainer = new Container();\n\t\tthis.documentContainer.addChild(this.headerContainer);\n\t\tthis.documentContainer.addChild(this.loadedResourcesContainer);\n\t\tthis.documentContainer.addChild(this.chatContainer);\n\t\tthis.pendingMessagesContainer = new Container();\n\t\tthis.statusContainer = new Container();\n\t\tthis.hookStatusContainer = new Container();\n\t\tthis.widgetContainerAbove = new Container();\n\t\tthis.widgetContainerBelow = new Container();\n\t\tthis.keybindings = KeybindingsManager.create();\n\t\tsetKeybindings(this.keybindings);\n\t\tconst editorPaddingX = this.settingsManager.getEditorPaddingX();\n\t\tconst autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();\n\t\tif (this.chrome) {\n\t\t\tthis.defaultEditor = this.chrome.createBaseEditor({\n\t\t\t\tui: this.ui,\n\t\t\t\tkeybindings: this.keybindings,\n\t\t\t\teditorOptions: { paddingX: editorPaddingX, autocompleteMaxVisible },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.defaultEditor = new CustomEditor(this.ui, getEditorTheme(), this.keybindings, {\n\t\t\t\tpaddingX: editorPaddingX,\n\t\t\t\tautocompleteMaxVisible,\n\t\t\t});\n\t\t}\n\t\tthis.editor = this.defaultEditor;\n\t\tthis.editorContainer = new Container();\n\t\tthis.editorContainer.addChild(this.editor as Component);\n\t\tthis.footerDataProvider = new FooterDataProvider(this.sessionManager.getCwd());\n\t\tthis.footer = this.chrome\n\t\t\t? this.chrome.createFooter(this.session, this.footerDataProvider)\n\t\t\t: new FooterComponent(this.session, this.footerDataProvider);\n\t\tthis.footer.setAutoCompactEnabled(this.session.autoCompactionEnabled);\n\t\tthis.footerContainer = new Container();\n\t\tthis.footerContainer.addChild(this.footer);\n\n\t\t// Load hide thinking block setting\n\t\tthis.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();\n\t\tthis.outputPad = this.settingsManager.getOutputPad();\n\n\t\t// Register themes from resource loader and initialize\n\t\tsetRegisteredThemes(this.session.resourceLoader.getThemes().themes);\n\t\tthis.themeController = new InteractiveThemeController(this.ui, {\n\t\t\tgetSettingsManager: () => this.settingsManager,\n\t\t\tshowError: (message) => this.showError(message),\n\t\t\tonChanged: () => this.updateEditorBorderColor(),\n\t\t\tinitialThemeSetting: options.initialThemeSetting,\n\t\t});\n\t}\n\n\tprivate getAutocompleteSourceTag(sourceInfo?: SourceInfo): string | undefined {\n\t\tif (!sourceInfo) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst scopePrefix = sourceInfo.scope === \"user\" ? \"u\" : sourceInfo.scope === \"project\" ? \"p\" : \"t\";\n\t\tconst source = sourceInfo.source.trim();\n\n\t\tif (source === \"auto\" || source === \"local\" || source === \"cli\") {\n\t\t\treturn scopePrefix;\n\t\t}\n\n\t\tif (source.startsWith(\"npm:\")) {\n\t\t\treturn `${scopePrefix}:${source}`;\n\t\t}\n\n\t\tconst gitSource = parseGitUrl(source);\n\t\tif (gitSource) {\n\t\t\tconst ref = gitSource.ref ? `@${gitSource.ref}` : \"\";\n\t\t\treturn `${scopePrefix}:git:${gitSource.host}/${gitSource.path}${ref}`;\n\t\t}\n\n\t\treturn scopePrefix;\n\t}\n\n\tprivate prefixAutocompleteDescription(description: string | undefined, sourceInfo?: SourceInfo): string | undefined {\n\t\tconst sourceTag = this.getAutocompleteSourceTag(sourceInfo);\n\t\tif (!sourceTag) {\n\t\t\treturn description;\n\t\t}\n\t\treturn description ? `[${sourceTag}] ${description}` : `[${sourceTag}]`;\n\t}\n\n\tprivate getBuiltInCommandConflictDiagnostics(extensionRunner: ExtensionRunner): ResourceDiagnostic[] {\n\t\tconst builtinNames = new Set(BUILTIN_SLASH_COMMANDS.map((command) => command.name));\n\t\treturn extensionRunner\n\t\t\t.getRegisteredCommands()\n\t\t\t.filter((command) => builtinNames.has(command.name))\n\t\t\t.map((command) => ({\n\t\t\t\ttype: \"warning\" as const,\n\t\t\t\tmessage:\n\t\t\t\t\tcommand.invocationName === command.name\n\t\t\t\t\t\t? `Extension command '/${command.name}' conflicts with built-in interactive command. Skipping in autocomplete.`\n\t\t\t\t\t\t: `Extension command '/${command.name}' conflicts with built-in interactive command. Available as '/${command.invocationName}'.`,\n\t\t\t\tpath: command.sourceInfo.path,\n\t\t\t}));\n\t}\n\n\tprivate createBaseAutocompleteProvider(): AutocompleteProvider {\n\t\t// Define commands for autocomplete\n\t\tconst slashCommands: SlashCommand[] = BUILTIN_SLASH_COMMANDS.map((command) => ({\n\t\t\tname: command.name,\n\t\t\tdescription: command.description,\n\t\t\t...(command.argumentHint && { argumentHint: command.argumentHint }),\n\t\t}));\n\n\t\tconst modelCommand = slashCommands.find((command) => command.name === \"model\");\n\t\tif (modelCommand) {\n\t\t\tmodelCommand.getArgumentCompletions = (prefix: string): AutocompleteItem[] | null => {\n\t\t\t\tconst models =\n\t\t\t\t\tthis.session.scopedModels.length > 0\n\t\t\t\t\t\t? this.session.scopedModels.map((s) => s.model)\n\t\t\t\t\t\t: this.session.modelRuntime.getAvailableSnapshot();\n\n\t\t\t\tif (models.length === 0) return null;\n\n\t\t\t\t// Create items with provider/id format\n\t\t\t\tconst items = models.map((m) => ({\n\t\t\t\t\tid: m.id,\n\t\t\t\t\tprovider: m.provider,\n\t\t\t\t\tname: m.name,\n\t\t\t\t\tlabel: `${m.provider}/${m.id}`,\n\t\t\t\t}));\n\n\t\t\t\treturn createFuzzyAutocompleteItems(items, prefix, getModelSearchText, (item) => ({\n\t\t\t\t\tvalue: item.label,\n\t\t\t\t\tlabel: item.id,\n\t\t\t\t\tdescription: item.provider,\n\t\t\t\t}));\n\t\t\t};\n\t\t}\n\n\t\tconst loginCommand = slashCommands.find((command) => command.name === \"login\");\n\t\tif (loginCommand) {\n\t\t\tloginCommand.getArgumentCompletions = (prefix: string): AutocompleteItem[] | null => {\n\t\t\t\tconst providers = getLoginProviderCompletionOptions(this.getLoginProviderOptions());\n\t\t\t\treturn createFuzzyAutocompleteItems(providers, prefix, getLoginProviderSearchText, (provider) => ({\n\t\t\t\t\tvalue: provider.id,\n\t\t\t\t\tlabel: provider.id,\n\t\t\t\t\tdescription: formatLoginProviderCompletionDescription(provider),\n\t\t\t\t}));\n\t\t\t};\n\t\t}\n\n\t\t// Convert prompt templates to SlashCommand format for autocomplete\n\t\tconst templateCommands: SlashCommand[] = this.session.promptTemplates.map((cmd) => ({\n\t\t\tname: cmd.name,\n\t\t\tdescription: this.prefixAutocompleteDescription(cmd.description, cmd.sourceInfo),\n\t\t\t...(cmd.argumentHint && { argumentHint: cmd.argumentHint }),\n\t\t}));\n\n\t\t// Convert extension commands to SlashCommand format\n\t\tconst builtinCommandNames = new Set(slashCommands.map((c) => c.name));\n\t\tconst extensionCommands: SlashCommand[] = this.session.extensionRunner\n\t\t\t.getRegisteredCommands()\n\t\t\t.filter((cmd) => !builtinCommandNames.has(cmd.name))\n\t\t\t.map((cmd) => ({\n\t\t\t\tname: cmd.invocationName,\n\t\t\t\tdescription: this.prefixAutocompleteDescription(cmd.description, cmd.sourceInfo),\n\t\t\t\tgetArgumentCompletions: cmd.getArgumentCompletions,\n\t\t\t}));\n\n\t\t// Build skill commands from session.skills (if enabled)\n\t\tthis.skillCommands.clear();\n\t\tconst skillCommandList: SlashCommand[] = [];\n\t\tif (this.settingsManager.getEnableSkillCommands()) {\n\t\t\tfor (const skill of this.session.resourceLoader.getSkills().skills) {\n\t\t\t\tconst commandName = `skill:${skill.name}`;\n\t\t\t\tthis.skillCommands.set(commandName, skill.filePath);\n\t\t\t\tskillCommandList.push({\n\t\t\t\t\tname: commandName,\n\t\t\t\t\tdescription: this.prefixAutocompleteDescription(skill.description, skill.sourceInfo),\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn new CombinedAutocompleteProvider(\n\t\t\t[...slashCommands, ...templateCommands, ...extensionCommands, ...skillCommandList],\n\t\t\tthis.sessionManager.getCwd(),\n\t\t\tthis.fdPath,\n\t\t);\n\t}\n\n\tprivate setupAutocompleteProvider(): void {\n\t\tlet provider = this.createBaseAutocompleteProvider();\n\t\tconst triggerCharacters: string[] = [];\n\t\tfor (const wrapProvider of this.autocompleteProviderWrappers) {\n\t\t\tprovider = wrapProvider(provider);\n\t\t\ttriggerCharacters.push(...(provider.triggerCharacters ?? []));\n\t\t}\n\t\tif (triggerCharacters.length > 0) {\n\t\t\tprovider.triggerCharacters = [...new Set(triggerCharacters)];\n\t\t}\n\n\t\tthis.autocompleteProvider = provider;\n\t\tthis.defaultEditor.setAutocompleteProvider(provider);\n\t\tif (this.editor !== this.defaultEditor) {\n\t\t\tthis.editor.setAutocompleteProvider?.(provider);\n\t\t}\n\t}\n\n\tprivate showStartupNoticesIfNeeded(): void {\n\t\tif (this.startupNoticesShown) {\n\t\t\treturn;\n\t\t}\n\t\tthis.startupNoticesShown = true;\n\n\t\tif (!this.changelogMarkdown) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.chatContainer.children.length > 0) {\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t}\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t\tif (this.settingsManager.getCollapseChangelog()) {\n\t\t\tconst versionMatch = this.changelogMarkdown.match(/##\\s+\\[?(\\d+\\.\\d+\\.\\d+)\\]?/);\n\t\t\tconst latestVersion = versionMatch ? versionMatch[1] : this.version;\n\t\t\tconst condensedText = `Updated to v${latestVersion}. Use ${theme.bold(\"/changelog\")} to view full changelog.`;\n\t\t\tthis.chatContainer.addChild(new Text(condensedText, 1, 0));\n\t\t} else {\n\t\t\tthis.chatContainer.addChild(new Text(theme.bold(theme.fg(\"accent\", \"What's New\")), 1, 0));\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\tthis.chatContainer.addChild(\n\t\t\t\tnew Markdown(this.changelogMarkdown.trim(), 1, 0, this.getMarkdownThemeWithSettings()),\n\t\t\t);\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t}\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t}\n\n\tprivate mountInteractiveTui(tui: TuiMainScreen | TuiAltScreen, components: readonly Component[]): void {\n\t\tfor (const component of components) tui.addChild(component);\n\t\tif (TuiLayouts.isViewportTUI(tui)) {\n\t\t\tif (!this.fullscreenLayoutRoot) throw new Error(\"Fullscreen layout is not initialized\");\n\t\t\ttui.setLayoutRoot(this.fullscreenLayoutRoot);\n\t\t}\n\t}\n\n\tprivate stopInteractiveTui(fullscreenExitOutput: FullscreenExitOutput): void {\n\t\tif (this.renderer.mode === \"fullscreen\" && fullscreenExitOutput === \"transcript\") {\n\t\t\twhile (this.renderer.hasOverlayEntries) this.renderer.hideOverlay();\n\t\t\tthis.switchTuiMode(\"regular\", false, false);\n\t\t\tthis.renderer.renderNow();\n\t\t}\n\t\tthis.ui.stop({ preserveScreen: this.renderer.mode === \"fullscreen\" });\n\t}\n\n\tprivate switchTuiMode(mode: TuiMode, restoreProgress = true, startRenderer = true): boolean {\n\t\tconst previousUi = this.renderer;\n\t\tif (mode === previousUi.mode) return true;\n\t\tif (previousUi.hasOverlayEntries) return false;\n\n\t\tconst components = [...previousUi.children];\n\t\tconst focus = previousUi.getFocusedComponent();\n\t\tconst terminal = previousUi.terminal;\n\t\tconst showHardwareCursor = previousUi.getShowHardwareCursor();\n\t\tconst clearOnShrink = previousUi.getClearOnShrink();\n\t\tconst onDebug = previousUi.onDebug;\n\t\tif (previousUi instanceof TuiMainScreen) {\n\t\t\tthis.mainScreenRenderState = previousUi.captureRenderState();\n\t\t}\n\n\t\tpreviousUi.stop({ preserveScreen: true });\n\t\tpreviousUi.setFocus(null);\n\t\tpreviousUi.clear();\n\t\tif (TuiLayouts.isViewportTUI(previousUi)) previousUi.setLayoutRoot(undefined);\n\n\t\tconst nextUi = createInteractiveTui({\n\t\t\ttuiMode: mode,\n\t\t\tshowHardwareCursor,\n\t\t\tlogDirectory: getAgentDir(),\n\t\t\tterminal,\n\t\t\tonRightClickPaste: this.onRightClickPaste,\n\t\t});\n\t\tnextUi.setClearOnShrink(clearOnShrink);\n\t\tnextUi.onDebug = onDebug;\n\t\tif (nextUi instanceof TuiMainScreen && this.mainScreenRenderState) {\n\t\t\tnextUi.restoreRenderState(this.mainScreenRenderState);\n\t\t}\n\t\tthis.renderer = nextUi;\n\t\tthis.options.tuiMode = mode;\n\t\tthis.mountInteractiveTui(nextUi, components);\n\t\tnextUi.invalidate();\n\t\tnextUi.setFocus(focus);\n\t\tif (!startRenderer) return true;\n\t\tnextUi.start();\n\t\tthis.themeController.rebindTui();\n\t\tthis.rebindExtensionTerminalInputListeners();\n\t\tif (\n\t\t\trestoreProgress &&\n\t\t\tthis.settingsManager.getShowTerminalProgress() &&\n\t\t\t(this.session.isStreaming || this.session.isCompacting)\n\t\t) {\n\t\t\tterminal.setProgress(true);\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync init(): Promise<void> {\n\t\tif (this.isInitialized) return;\n\n\t\tthis.registerSignalHandlers();\n\n\t\t// Load changelog (only show new entries, skip for resumed sessions)\n\t\tthis.changelogMarkdown = this.getChangelogForDisplay();\n\n\t\tif (this.session.scopedModels.length > 0 && (this.options.verbose || !this.settingsManager.getQuietStartup())) {\n\t\t\tconst modelList = this.session.scopedModels\n\t\t\t\t.map((sm) => {\n\t\t\t\t\tconst thinkingStr = sm.thinkingLevel ? `:${sm.thinkingLevel}` : \"\";\n\t\t\t\t\treturn `${sm.model.id}${thinkingStr}`;\n\t\t\t\t})\n\t\t\t\t.join(\", \");\n\t\t\tconst cycleKeys = this.keybindings.getKeys(\"app.model.cycleForward\");\n\t\t\tconst cycleHint =\n\t\t\t\tcycleKeys.length > 0\n\t\t\t\t\t? theme.fg(\"muted\", ` (${formatKeyText(cycleKeys.join(\"/\"), { capitalize: true })} to cycle)`)\n\t\t\t\t\t: \"\";\n\t\t\tconsole.log(theme.fg(\"dim\", `Model scope: ${modelList}${cycleHint}`));\n\t\t}\n\n\t\t// Keep one component tree and remount it when changing renderers.\n\t\tthis.renderWidgets(); // Initialize with default spacer\n\t\tthis.transcriptScrollView = new TuiLayouts.ScrollView(this.documentContainer, {\n\t\t\tfollow: \"end\",\n\t\t\tprimary: true,\n\t\t\toverscroll: \"chain\",\n\t\t\tscrollbar: this.settingsManager.getFullscreenScrollbar(),\n\t\t\tscrollbarStyle: (text) => theme.bg(\"scrollbarThumb\", text),\n\t\t});\n\t\tconst dock = new TuiLayouts.VStack([\n\t\t\t{ component: this.pendingMessagesContainer, shrink: 1, minSize: 0 },\n\t\t\t{ component: this.statusContainer, shrink: 1, minSize: 0 },\n\t\t\t{ component: this.hookStatusContainer, shrink: 1, minSize: 0 },\n\t\t\t{ component: this.widgetContainerAbove, shrink: 1, minSize: 0 },\n\t\t\t{ component: this.editorContainer, shrink: 1, minSize: 3 },\n\t\t\t{ component: this.widgetContainerBelow, shrink: 1, minSize: 0 },\n\t\t\t{ component: this.footerContainer, shrink: 1, minSize: 1 },\n\t\t]);\n\t\tthis.fullscreenLayoutRoot = new TuiLayouts.VStack([\n\t\t\t{ component: this.transcriptScrollView, basis: 0, grow: 1, shrink: 1, minSize: 1 },\n\t\t\t{ component: dock, basis: \"auto\", grow: 0, shrink: 1, minSize: 1 },\n\t\t]);\n\t\tconst rootComponents = [\n\t\t\tthis.documentContainer,\n\t\t\tthis.pendingMessagesContainer,\n\t\t\tthis.statusContainer,\n\t\t\tthis.hookStatusContainer,\n\t\t\tthis.widgetContainerAbove,\n\t\t\tthis.editorContainer,\n\t\t\tthis.widgetContainerBelow,\n\t\t\tthis.footerContainer,\n\t\t];\n\t\tif (this.chrome) {\n\t\t\tfor (const component of this.chrome.arrangeRoot(rootComponents, this.ui)) this.renderer.addChild(component);\n\t\t} else {\n\t\t\tthis.mountInteractiveTui(this.renderer, rootComponents);\n\t\t}\n\t\t// Accept text while startup completes, but only enable interrupt, exit, and submission feedback.\n\t\t// Renderer-only lifecycle hosts may mount the chrome tree without constructing the base editor.\n\t\tif (this.defaultEditor) {\n\t\t\tthis.defaultEditor.onAction(\"app.clear\", () => this.handleCtrlC());\n\t\t\tthis.defaultEditor.onCtrlD = () => this.handleCtrlD();\n\t\t\tthis.defaultEditor.onSubmit = (text) => this.handleStartupSubmit(text);\n\t\t}\n\t\tthis.ui.setFocus(this.editor);\n\n\t\t// Start the UI before initializing extensions so session_start handlers can use interactive dialogs\n\t\ttry {\n\t\t\ttakeOverInteractiveStderr();\n\t\t\tthis.ui.start();\n\t\t} catch (error) {\n\t\t\trestoreInteractiveStderr();\n\t\t\tthrow error;\n\t\t}\n\t\tthis.isInitialized = true;\n\n\t\tawait this.themeController.applyFromSettings();\n\n\t\t// Add header with keybindings from config (unless silenced)\n\t\tif (this.chrome) {\n\t\t\tthis.builtInHeader = this.chrome.createWelcomeContent(APP_NAME, this.version);\n\t\t\tthis.headerContainer.addChild(new Spacer(1));\n\t\t\tthis.headerContainer.addChild(this.builtInHeader);\n\t\t\tthis.headerContainer.addChild(new Spacer(1));\n\t\t} else if (this.options.verbose || !this.settingsManager.getQuietStartup()) {\n\t\t\tconst logo = theme.bold(theme.fg(\"accent\", APP_NAME)) + theme.fg(\"dim\", ` v${this.version}`);\n\n\t\t\t// Build startup instructions using keybinding hint helpers\n\t\t\tconst hint = (keybinding: AppKeybinding, description: string) => keyHint(keybinding, description);\n\n\t\t\tconst expandedInstructions = [\n\t\t\t\thint(\"app.interrupt\", \"to interrupt\"),\n\t\t\t\thint(\"app.clear\", \"to clear\"),\n\t\t\t\trawKeyHint(`${keyText(\"app.clear\")} twice`, \"to exit\"),\n\t\t\t\thint(\"app.exit\", \"to exit (empty)\"),\n\t\t\t\thint(\"app.suspend\", \"to suspend\"),\n\t\t\t\tkeyHint(\"tui.editor.deleteToLineEnd\", \"to delete to end\"),\n\t\t\t\thint(\"app.thinking.cycle\", \"to cycle thinking level\"),\n\t\t\t\trawKeyHint(`${keyText(\"app.model.cycleForward\")}/${keyText(\"app.model.cycleBackward\")}`, \"to cycle models\"),\n\t\t\t\thint(\"app.model.select\", \"to select model\"),\n\t\t\t\thint(\"app.tools.expand\", \"to expand tools\"),\n\t\t\t\thint(\"app.thinking.toggle\", \"to expand thinking\"),\n\t\t\t\thint(\"app.editor.external\", \"for external editor\"),\n\t\t\t\trawKeyHint(\"/\", \"for commands\"),\n\t\t\t\trawKeyHint(\"!\", \"to run bash\"),\n\t\t\t\trawKeyHint(\"!!\", \"to run bash (no context)\"),\n\t\t\t\thint(\"app.message.followUp\", \"to queue follow-up\"),\n\t\t\t\thint(\"app.message.dequeue\", \"to edit all queued messages\"),\n\t\t\t\thint(\"app.clipboard.pasteImage\", \"to paste image (with text fallback)\"),\n\t\t\t\trawKeyHint(\"drop files\", \"to attach\"),\n\t\t\t].join(\"\\n\");\n\t\t\tconst compactInstructions = [\n\t\t\t\thint(\"app.interrupt\", \"interrupt\"),\n\t\t\t\trawKeyHint(`${keyText(\"app.clear\")}/${keyText(\"app.exit\")}`, \"clear/exit\"),\n\t\t\t\trawKeyHint(\"/\", \"commands\"),\n\t\t\t\trawKeyHint(\"!\", \"bash\"),\n\t\t\t\thint(\"app.tools.expand\", \"more\"),\n\t\t\t].join(theme.fg(\"muted\", \" · \"));\n\t\t\tconst compactOnboarding = theme.fg(\n\t\t\t\t\"dim\",\n\t\t\t\t`Press ${keyText(\"app.tools.expand\")} to show full startup help and loaded resources.`,\n\t\t\t);\n\t\t\tconst startupTip = resolveStartupTipLine({\n\t\t\t\ttipsEnabled: this.settingsManager.getTipsEnabled(),\n\t\t\t\tquietStartup: this.settingsManager.getQuietStartup(),\n\t\t\t\thistory: this.settingsManager.getTipsHistory(),\n\t\t\t\tnow: Date.now(),\n\t\t\t\tdefinitions: TIP_DEFINITIONS,\n\t\t\t\tkeys: keyText,\n\t\t\t\thasCommand: (command) => this.hasRegisteredCommand(command),\n\t\t\t});\n\t\t\tif (startupTip) {\n\t\t\t\tthis.recordShownTip(startupTip.tipId);\n\t\t\t}\n\t\t\tconst tipLine = startupTip ? theme.fg(\"dim\", startupTip.line) : undefined;\n\t\t\tconst onboarding = theme.fg(\n\t\t\t\t\"dim\",\n\t\t\t\t`Pi can explain its own features and look up its docs. Ask it how to use or extend Pi.`,\n\t\t\t);\n\t\t\tthis.builtInHeader = new ExpandableText(\n\t\t\t\t() => `${logo}\\n${compactInstructions}\\n${compactOnboarding}\\n\\n${onboarding}`,\n\t\t\t\t() => `${logo}\\n${expandedInstructions}\\n\\n${onboarding}`,\n\t\t\t\tthis.getStartupExpansionState(),\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t);\n\n\t\t\tappendStartupHeader(this.headerContainer, this.builtInHeader, tipLine);\n\t\t} else {\n\t\t\t// Minimal header when silenced\n\t\t\tthis.builtInHeader = new Text(\"\", 0, 0);\n\t\t\tthis.headerContainer.addChild(this.builtInHeader);\n\t\t}\n\t\tthis.ui.requestRender();\n\n\t\t// Ensure fd and rg are available after mounting the TUI (downloads if missing, adds to PATH via getBinDir)\n\t\t// so slow downloads do not make startup appear frozen.\n\t\t// Both are needed: fd for autocomplete, rg for grep tool and bash commands.\n\t\tconst [fdPath] = await Promise.all([\n\t\t\tensureTool(\"fd\", (status) => this.showManagedToolStatus(status)),\n\t\t\tensureTool(\"rg\", (status) => this.showManagedToolStatus(status)),\n\t\t]);\n\t\tthis.fdPath = fdPath;\n\n\t\t// Enable the remaining input handlers only after managed-tool setup completes.\n\t\tthis.setupKeyHandlers();\n\t\tthis.setupEditorSubmitHandler();\n\t\tthis.ui.requestRender();\n\n\t\t// Initialize extensions first so resources are shown before messages\n\t\tawait this.rebindCurrentSession();\n\n\t\t// Render initial messages AFTER showing loaded resources\n\t\tthis.renderInitialMessages();\n\n\t\t// Set up theme file watcher\n\t\tonThemeChange(() => {\n\t\t\tthis.ui.invalidate();\n\t\t\tthis.updateEditorBorderColor();\n\t\t\tthis.ui.requestRender();\n\t\t});\n\n\t\t// Set up git branch watcher (uses provider instead of footer)\n\t\tthis.footerDataProvider.onBranchChange(() => {\n\t\t\tthis.ui.requestRender();\n\t\t});\n\n\t\t// Initialize available provider count for footer display\n\t\tthis.updateAvailableProviderCount();\n\t}\n\n\t/**\n\t * Update terminal title with session name and cwd.\n\t */\n\tprivate getNormalTerminalTitle(): string {\n\t\tconst cwdBasename = path.basename(this.sessionManager.getCwd());\n\t\tconst sessionName = this.sessionManager.getSessionName();\n\t\tif (sessionName) {\n\t\t\treturn `${APP_TITLE} - ${sessionName} - ${cwdBasename}`;\n\t\t}\n\t\treturn `${APP_TITLE} - ${cwdBasename}`;\n\t}\n\n\tprivate applyTerminalTitle(): void {\n\t\tthis.ui.terminal.setTitle(\n\t\t\tthis.activeToolTerminalTitle ??\n\t\t\t\tthis.activeToolExecutionTerminalTitle ??\n\t\t\t\tthis.extensionTerminalTitle ??\n\t\t\t\tthis.getNormalTerminalTitle(),\n\t\t);\n\t}\n\n\tprivate updateTerminalTitle(): void {\n\t\tthis.applyTerminalTitle();\n\t}\n\n\t/**\n\t * Run the interactive mode. This is the main entry point.\n\t * Initializes the UI, shows warnings, processes initial messages, and starts the interactive loop.\n\t */\n\tasync run(): Promise<void> {\n\t\tawait this.init();\n\n\t\tif (!envValue(\"OFFLINE\")) {\n\t\t\tconst controller = new AbortController();\n\t\t\tconst timeout = setTimeout(() => controller.abort(), 15_000);\n\t\t\tvoid refreshModelCatalogs(this.session.modelRuntime, controller.signal)\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.updateAvailableProviderCount();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t})\n\t\t\t\t.catch(() => {})\n\t\t\t\t.finally(() => clearTimeout(timeout));\n\t\t}\n\n\t\t// Start version check asynchronously\n\t\tcheckForNewPiVersion(this.version).then((newVersion) => {\n\t\t\tif (newVersion) {\n\t\t\t\tthis.showNewVersionNotification(newVersion.version);\n\t\t\t}\n\t\t});\n\n\t\t// Start package update check asynchronously\n\t\tthis.checkForPackageUpdates()\n\t\t\t.then((updates) => {\n\t\t\t\tif (updates.length > 0) {\n\t\t\t\t\tthis.showPackageUpdateNotification(updates);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.finally(() => {\n\t\t\t\t// On Windows, npm can overwrite the shared console title while checking\n\t\t\t\t// extension package versions. Restore Pi's title after the startup check.\n\t\t\t\tif (process.platform === \"win32\" && this.isInitialized) {\n\t\t\t\t\tthis.updateTerminalTitle();\n\t\t\t\t}\n\t\t\t});\n\n\t\t// Check tmux setup asynchronously\n\t\tthis.checkTmuxSetup().then((warning) => {\n\t\t\tif (warning) {\n\t\t\t\tthis.showWarning(warning);\n\t\t\t}\n\t\t});\n\n\t\t// Show startup warnings\n\t\tconst {\n\t\t\tmigratedProviders,\n\t\t\tmodelFallbackMessage,\n\t\t\tinitialMessage,\n\t\t\tinitialImages,\n\t\t\tinitialMessages,\n\t\t\tinitialTitlePrompt,\n\t\t} = this.options;\n\n\t\tif (migratedProviders && migratedProviders.length > 0) {\n\t\t\tthis.showWarning(`Migrated credentials to auth.json: ${migratedProviders.join(\", \")}`);\n\t\t}\n\n\t\tconst modelsJsonError = this.session.modelRuntime.getError();\n\t\tif (modelsJsonError) {\n\t\t\tthis.showError(`models.json error: ${modelsJsonError}`);\n\t\t}\n\n\t\tif (modelFallbackMessage) {\n\t\t\tthis.showWarning(modelFallbackMessage);\n\t\t}\n\n\t\tfor (const warning of this.session.fallbackValidationWarnings) {\n\t\t\tthis.showWarning(warning);\n\t\t}\n\n\t\tthis.showRiskyMainModelWarning(this.session.model);\n\t\tvoid this.maybeWarnAboutAnthropicSubscriptionAuth();\n\n\t\t// Process initial messages\n\t\tif (initialMessage) {\n\t\t\ttry {\n\t\t\t\tawait this.session.prompt(initialMessage, {\n\t\t\t\t\timages: initialImages,\n\t\t\t\t\tsessionTitlePrompt: initialTitlePrompt ?? false,\n\t\t\t\t});\n\t\t\t} catch (error: unknown) {\n\t\t\t\tconst errorMessage = error instanceof Error ? error.message : \"Unknown error occurred\";\n\t\t\t\tthis.showError(errorMessage);\n\t\t\t}\n\t\t}\n\n\t\tif (initialMessages) {\n\t\t\tfor (const message of initialMessages) {\n\t\t\t\ttry {\n\t\t\t\t\tawait this.session.prompt(message);\n\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\tconst errorMessage = error instanceof Error ? error.message : \"Unknown error occurred\";\n\t\t\t\t\tthis.showError(errorMessage);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Main interactive loop\n\t\twhile (true) {\n\t\t\tconst userInput = await this.getUserInput();\n\t\t\ttry {\n\t\t\t\tawait this.session.prompt(userInput, { streamingBehavior: \"steer\" });\n\t\t\t} catch (error: unknown) {\n\t\t\t\tconst errorMessage = error instanceof Error ? error.message : \"Unknown error occurred\";\n\t\t\t\tthis.showError(errorMessage);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async checkForPackageUpdates(): Promise<string[]> {\n\t\treturn [];\n\t}\n\n\tprivate async checkTmuxSetup(): Promise<string | undefined> {\n\t\tif (!process.env.TMUX) return undefined;\n\n\t\tconst runTmux = (args: string[]): Promise<string | undefined> => {\n\t\t\treturn new Promise((resolve) => {\n\t\t\t\tconst proc = spawn(\"tmux\", args, {\n\t\t\t\t\tstdio: [\"ignore\", \"pipe\", \"ignore\"],\n\t\t\t\t});\n\t\t\t\tlet stdout = \"\";\n\t\t\t\tconst timer = setTimeout(() => {\n\t\t\t\t\tproc.kill();\n\t\t\t\t\tresolve(undefined);\n\t\t\t\t}, 2000);\n\n\t\t\t\tproc.stdout?.on(\"data\", (data) => {\n\t\t\t\t\tstdout += data.toString();\n\t\t\t\t});\n\t\t\t\tproc.on(\"error\", () => {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t\tresolve(undefined);\n\t\t\t\t});\n\t\t\t\tproc.on(\"close\", (code) => {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t\tresolve(code === 0 ? stdout.trim() : undefined);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\n\t\tconst [extendedKeys, extendedKeysFormat, clientTermname, allowPassthrough, focusEvents, version] =\n\t\t\tawait Promise.all([\n\t\t\t\trunTmux([\"show\", \"-gv\", \"extended-keys\"]),\n\t\t\t\trunTmux([\"show\", \"-gv\", \"extended-keys-format\"]),\n\t\t\t\trunTmux([\"display-message\", \"-p\", \"#{client_termname}\"]),\n\t\t\t\trunTmux([\"show\", \"-gv\", \"allow-passthrough\"]),\n\t\t\t\trunTmux([\"show\", \"-gv\", \"focus-events\"]),\n\t\t\t\trunTmux([\"display-message\", \"-p\", \"#{version}\"]),\n\t\t\t]);\n\n\t\t// If we couldn't query tmux (timeout, sandbox, etc.), don't warn\n\t\tif (extendedKeys === undefined) return undefined;\n\n\t\treturn buildTmuxSetupWarning({\n\t\t\textendedKeys,\n\t\t\textendedKeysFormat,\n\t\t\timagesEnabled: getCapabilities().tmuxPassthrough === true,\n\t\t\touterKittyCapable: outerKittyGraphicsMode(clientTermname ?? \"\") !== null,\n\t\t\tallowPassthrough,\n\t\t\tfocusEvents,\n\t\t\tversion,\n\t\t});\n\t}\n\n\t/**\n\t * Get changelog entries to display on startup.\n\t * Only shows new entries since last seen version, skips for resumed sessions.\n\t */\n\tprivate getChangelogForDisplay(): string | undefined {\n\t\t// Skip changelog for resumed/continued sessions (already have messages)\n\t\tif (this.session.state.messages.length > 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst lastVersion = this.settingsManager.getLastChangelogVersion();\n\t\tconst changelogPath = getChangelogPath();\n\t\tconst entries = parseChangelog(changelogPath);\n\n\t\tif (!lastVersion) {\n\t\t\t// Fresh install - record the version, send telemetry, don't show changelog\n\t\t\tthis.settingsManager.setLastChangelogVersion(VERSION);\n\t\t\tthis.reportInstallTelemetry(VERSION);\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst newEntries = getNewEntries(entries, lastVersion);\n\t\tif (newEntries.length > 0) {\n\t\t\tthis.settingsManager.setLastChangelogVersion(VERSION);\n\t\t\tthis.reportInstallTelemetry(VERSION);\n\t\t\treturn newEntries.map((e) => normalizeChangelogLinks(e.content, e)).join(\"\\n\\n\");\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate reportInstallTelemetry(version: string): void {\n\t\tif (envValue(\"OFFLINE\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!isInstallTelemetryEnabled(this.settingsManager)) {\n\t\t\treturn;\n\t\t}\n\n\t\tvoid fetch(`https://pi.dev/api/report-install?version=${encodeURIComponent(version)}`, {\n\t\t\theaders: {\n\t\t\t\t\"User-Agent\": getPiUserAgent(version),\n\t\t\t},\n\t\t\tsignal: AbortSignal.timeout(5000),\n\t\t})\n\t\t\t.then(() => undefined)\n\t\t\t.catch(() => undefined);\n\t}\n\n\tprivate getMarkdownThemeWithSettings(): MarkdownTheme {\n\t\treturn {\n\t\t\t...getMarkdownTheme(),\n\t\t\tcodeBlockIndent: this.settingsManager.getCodeBlockIndent(),\n\t\t};\n\t}\n\n\t// =========================================================================\n\t// Extension System\n\t// =========================================================================\n\n\tprivate getBuiltinExtensionDisplayName(extensionId: string): string {\n\t\treturn extensionId === \"todowrite\" ? \"todo\" : extensionId;\n\t}\n\n\tprivate getBuiltinExtensionNameFromPath(p: string): string | undefined {\n\t\tconst builtinMatch = p.match(/^<builtin:([^>]+)>$/);\n\t\tif (!builtinMatch) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn this.getBuiltinExtensionDisplayName(builtinMatch[1]);\n\t}\n\n\tprivate formatDisplayPath(p: string): string {\n\t\tconst builtinName = this.getBuiltinExtensionNameFromPath(p);\n\t\tif (builtinName) {\n\t\t\treturn `builtin/${builtinName}`;\n\t\t}\n\n\t\tconst home = os.homedir();\n\t\tlet result = p;\n\n\t\t// Replace home directory with ~\n\t\tif (result.startsWith(home)) {\n\t\t\tresult = `~${result.slice(home.length)}`;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate formatExtensionDisplayPath(path: string): string {\n\t\tlet result = this.formatDisplayPath(path);\n\t\tresult = result.replace(/\\/index\\.ts$/, \"\").replace(/\\/index\\.js$/, \"\");\n\t\treturn result;\n\t}\n\n\tprivate formatContextPath(p: string): string {\n\t\tconst cwd = path.resolve(this.sessionManager.getCwd());\n\t\tconst absolutePath = path.isAbsolute(p) ? path.resolve(p) : path.resolve(cwd, p);\n\t\tconst relativePath = getCwdRelativePath(absolutePath, cwd);\n\t\tif (relativePath !== undefined) {\n\t\t\treturn relativePath;\n\t\t}\n\n\t\treturn this.formatDisplayPath(absolutePath);\n\t}\n\n\tprivate getStartupExpansionState(): boolean {\n\t\treturn this.options.verbose || this.toolOutputExpanded;\n\t}\n\n\tprivate async handleKeybindingsCommand(): Promise<void> {\n\t\tconst configPath = path.join(getAgentDir(), \"keybindings.json\");\n\t\tconst editorCommand = process.env.VISUAL || process.env.EDITOR;\n\t\tif (!editorCommand) {\n\t\t\tthis.showError(`Set $EDITOR or $VISUAL to edit ${configPath}.`);\n\t\t\treturn;\n\t\t}\n\n\t\tconst seeded = seedKeybindingsFile(configPath, this.keybindings);\n\t\tconst edit = await editFileInExternalEditor({ command: editorCommand, path: configPath });\n\t\tif (edit.status === \"launch-failed\") {\n\t\t\t// The editor never ran, so a file we just seeded carries no user content.\n\t\t\tif (seeded) fs.rmSync(configPath, { force: true });\n\t\t\tthis.showError(`Could not open ${configPath} with \"${editorCommand}\".`);\n\t\t\treturn;\n\t\t}\n\t\tif (edit.status === \"exited\") {\n\t\t\t// The editor ran and may have written the file; keep whatever is on disk.\n\t\t\tthis.showError(`\"${editorCommand}\" exited with code ${edit.code}; keybindings were not reloaded.`);\n\t\t\treturn;\n\t\t}\n\n\t\tconst applied = applyKeybindingsFileEdit(configPath, this.keybindings);\n\t\tif (applied.status === \"invalid\") {\n\t\t\tthis.showError(`Keybindings not reloaded - ${configPath} is not valid JSON: ${applied.message}`);\n\t\t\treturn;\n\t\t}\n\t\tthis.showStatus(\"Keybindings reloaded\");\n\t}\n\n\tprivate updateShortcutOverlay(nextText: string): void {\n\t\tconst previousText = this.lastEditorText;\n\t\tthis.lastEditorText = nextText;\n\t\tconst inputKind = classifyEditorInput(previousText, nextText, this.lastInputWasPaste);\n\t\tthis.lastInputWasPaste = false;\n\n\t\tif (shouldShowShortcutOverlay(previousText, nextText, inputKind)) {\n\t\t\tif (!this.shortcutOverlay) {\n\t\t\t\tthis.shortcutOverlay = new ShortcutOverlay();\n\t\t\t\tthis.headerContainer.addChild(this.shortcutOverlay);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis.hideShortcutOverlay();\n\t}\n\n\tprivate hideShortcutOverlay(): void {\n\t\tif (!this.shortcutOverlay) return;\n\t\tthis.headerContainer.removeChild(this.shortcutOverlay);\n\t\tthis.shortcutOverlay = undefined;\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate recordShownTip(tipId: string): void {\n\t\tthis.sessionShownTipIds.add(tipId);\n\t\tconst next = recordTipShown(this.settingsManager.getTipsHistory(), tipId, Date.now());\n\t\tthis.settingsManager.setTipShown(tipId, next[tipId] ?? Date.now());\n\t}\n\n\t/**\n\t * Get a short path relative to the package root for display.\n\t */\n\tprivate getShortPath(fullPath: string, sourceInfo?: SourceInfo): string {\n\t\tconst normalizedFullPath = fullPath.replace(/\\\\/g, \"/\");\n\t\tconst baseDir = sourceInfo?.baseDir;\n\t\tif (baseDir && this.isPackageSource(sourceInfo)) {\n\t\t\tconst normalizedBaseDir = baseDir.replace(/\\\\/g, \"/\");\n\t\t\tconst npmRootMatch = normalizedBaseDir.match(/^(.*\\/node_modules)\\/(@?[^/]+(?:\\/[^/]+)?)$/);\n\t\t\t// If fullPath is under the same node_modules root as baseDir, preserve that relative topology.\n\t\t\tif (npmRootMatch?.[1] && normalizedFullPath.startsWith(`${npmRootMatch[1]}/`)) {\n\t\t\t\treturn path.posix.relative(normalizedBaseDir, normalizedFullPath);\n\t\t\t}\n\n\t\t\tconst relativePath = path.relative(path.resolve(baseDir), path.resolve(fullPath));\n\t\t\tif (\n\t\t\t\trelativePath &&\n\t\t\t\trelativePath !== \".\" &&\n\t\t\t\t!relativePath.startsWith(\"..\") &&\n\t\t\t\t!relativePath.startsWith(`..${path.sep}`) &&\n\t\t\t\t!path.isAbsolute(relativePath)\n\t\t\t) {\n\t\t\t\treturn relativePath.replace(/\\\\/g, \"/\");\n\t\t\t}\n\t\t}\n\n\t\tconst source = sourceInfo?.source ?? \"\";\n\t\tconst npmMatch = normalizedFullPath.match(/node_modules\\/(@?[^/]+(?:\\/[^/]+)?)\\/(.*)/);\n\t\tif (npmMatch && source.startsWith(\"npm:\")) {\n\t\t\treturn npmMatch[2];\n\t\t}\n\n\t\tconst gitMatch = normalizedFullPath.match(/git\\/[^/]+\\/[^/]+\\/(.*)/);\n\t\tif (gitMatch && source.startsWith(\"git:\")) {\n\t\t\treturn gitMatch[1];\n\t\t}\n\n\t\treturn this.formatDisplayPath(fullPath);\n\t}\n\n\tprivate getCompactPathLabel(resourcePath: string, sourceInfo?: SourceInfo): string {\n\t\tconst shortPath = this.getShortPath(resourcePath, sourceInfo);\n\t\tconst normalizedPath = shortPath.replace(/\\\\/g, \"/\");\n\t\tconst segments = normalizedPath.split(\"/\").filter((segment) => segment.length > 0 && segment !== \"~\");\n\t\tif (segments.length > 0) {\n\t\t\treturn segments[segments.length - 1]!;\n\t\t}\n\t\treturn shortPath;\n\t}\n\n\tprivate getCompactPackageSourceLabel(sourceInfo?: SourceInfo): string {\n\t\tconst source = sourceInfo?.source ?? \"\";\n\t\tif (source.startsWith(\"npm:\")) {\n\t\t\treturn source.slice(\"npm:\".length) || source;\n\t\t}\n\n\t\tconst gitSource = parseGitUrl(source);\n\t\tif (gitSource) {\n\t\t\treturn gitSource.path || source;\n\t\t}\n\n\t\treturn source;\n\t}\n\n\tprivate getCompactExtensionLabel(resourcePath: string, sourceInfo?: SourceInfo): string {\n\t\tif (!this.isPackageSource(sourceInfo)) {\n\t\t\treturn this.getCompactPathLabel(resourcePath, sourceInfo);\n\t\t}\n\n\t\tconst sourceLabel = this.getCompactPackageSourceLabel(sourceInfo);\n\t\tif (!sourceLabel) {\n\t\t\treturn this.getCompactPathLabel(resourcePath, sourceInfo);\n\t\t}\n\n\t\tconst shortPath = this.getShortPath(resourcePath, sourceInfo).replace(/\\\\/g, \"/\");\n\t\tconst packagePath = shortPath.startsWith(\"extensions/\") ? shortPath.slice(\"extensions/\".length) : shortPath;\n\t\tconst parsedPath = path.posix.parse(packagePath);\n\n\t\tif (parsedPath.name === \"index\") {\n\t\t\treturn !parsedPath.dir || parsedPath.dir === \".\" ? sourceLabel : `${sourceLabel}:${parsedPath.dir}`;\n\t\t}\n\n\t\treturn `${sourceLabel}:${packagePath}`;\n\t}\n\n\tprivate getCompactDisplayPathSegments(resourcePath: string): string[] {\n\t\treturn this.formatDisplayPath(resourcePath)\n\t\t\t.replace(/\\\\/g, \"/\")\n\t\t\t.split(\"/\")\n\t\t\t.filter((segment) => segment.length > 0 && segment !== \"~\");\n\t}\n\n\tprivate getCompactNonPackageExtensionLabel(\n\t\tresourcePath: string,\n\t\tindex: number,\n\t\tallPaths: Array<{ path: string; segments: string[] }>,\n\t): string {\n\t\tconst segments = allPaths[index]?.segments;\n\t\tif (!segments || segments.length === 0) {\n\t\t\treturn this.getCompactPathLabel(resourcePath);\n\t\t}\n\n\t\tfor (let segmentCount = 1; segmentCount <= segments.length; segmentCount += 1) {\n\t\t\tconst candidate = segments.slice(-segmentCount).join(\"/\");\n\t\t\tconst isUnique = allPaths.every((item, itemIndex) => {\n\t\t\t\tif (itemIndex === index) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn item.segments.slice(-segmentCount).join(\"/\") !== candidate;\n\t\t\t});\n\n\t\t\tif (isUnique) {\n\t\t\t\treturn candidate;\n\t\t\t}\n\t\t}\n\n\t\treturn segments.join(\"/\");\n\t}\n\n\tprivate getCompactExtensionLabels(extensions: Array<{ path: string; sourceInfo?: SourceInfo }>): string[] {\n\t\tconst nonPackageExtensions = extensions\n\t\t\t.map((extension) => {\n\t\t\t\tconst segments = this.getCompactDisplayPathSegments(extension.path);\n\t\t\t\tconst lastSegment = segments[segments.length - 1];\n\t\t\t\tif (segments.length > 1 && (lastSegment === \"index.ts\" || lastSegment === \"index.js\")) {\n\t\t\t\t\tsegments.pop();\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tpath: extension.path,\n\t\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t\t\tsegments,\n\t\t\t\t};\n\t\t\t})\n\t\t\t.filter((extension) => !this.isPackageSource(extension.sourceInfo));\n\n\t\treturn extensions.map((extension) => {\n\t\t\tif (this.isPackageSource(extension.sourceInfo)) {\n\t\t\t\treturn this.getCompactExtensionLabel(extension.path, extension.sourceInfo);\n\t\t\t}\n\n\t\t\tconst nonPackageIndex = nonPackageExtensions.findIndex((item) => item.path === extension.path);\n\t\t\tif (nonPackageIndex === -1) {\n\t\t\t\treturn this.getCompactPathLabel(extension.path, extension.sourceInfo);\n\t\t\t}\n\n\t\t\treturn this.getCompactNonPackageExtensionLabel(extension.path, nonPackageIndex, nonPackageExtensions);\n\t\t});\n\t}\n\n\tprivate getDisplaySourceInfo(sourceInfo?: SourceInfo): {\n\t\tlabel: string;\n\t\tscopeLabel?: string;\n\t\tcolor: \"accent\" | \"muted\";\n\t} {\n\t\tconst source = sourceInfo?.source ?? \"local\";\n\t\tconst scope = sourceInfo?.scope ?? \"project\";\n\t\tif (source === \"local\") {\n\t\t\tif (scope === \"user\") {\n\t\t\t\treturn { label: \"user\", color: \"muted\" };\n\t\t\t}\n\t\t\tif (scope === \"project\") {\n\t\t\t\treturn { label: \"project\", color: \"muted\" };\n\t\t\t}\n\t\t\tif (scope === \"temporary\") {\n\t\t\t\treturn { label: \"path\", scopeLabel: \"temp\", color: \"muted\" };\n\t\t\t}\n\t\t\treturn { label: \"path\", color: \"muted\" };\n\t\t}\n\n\t\tif (source === \"cli\") {\n\t\t\treturn { label: \"path\", scopeLabel: scope === \"temporary\" ? \"temp\" : undefined, color: \"muted\" };\n\t\t}\n\n\t\tconst scopeLabel =\n\t\t\tscope === \"user\" ? \"user\" : scope === \"project\" ? \"project\" : scope === \"temporary\" ? \"temp\" : undefined;\n\t\treturn { label: source, scopeLabel, color: \"accent\" };\n\t}\n\n\tprivate getScopeGroup(sourceInfo?: SourceInfo): \"user\" | \"project\" | \"path\" {\n\t\tconst source = sourceInfo?.source ?? \"local\";\n\t\tconst scope = sourceInfo?.scope ?? \"project\";\n\t\tif (source === \"cli\" || scope === \"temporary\") return \"path\";\n\t\tif (scope === \"user\") return \"user\";\n\t\tif (scope === \"project\") return \"project\";\n\t\treturn \"path\";\n\t}\n\n\tprivate isPackageSource(sourceInfo?: SourceInfo): boolean {\n\t\tconst source = sourceInfo?.source ?? \"\";\n\t\treturn source.startsWith(\"npm:\") || source.startsWith(\"git:\");\n\t}\n\n\tprivate buildScopeGroups(items: Array<{ path: string; sourceInfo?: SourceInfo }>): Array<{\n\t\tscope: \"user\" | \"project\" | \"path\";\n\t\tpaths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\tpackages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n\t}> {\n\t\tconst groups: Record<\n\t\t\t\"user\" | \"project\" | \"path\",\n\t\t\t{\n\t\t\t\tscope: \"user\" | \"project\" | \"path\";\n\t\t\t\tpaths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\t\tpackages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n\t\t\t}\n\t\t> = {\n\t\t\tuser: { scope: \"user\", paths: [], packages: new Map() },\n\t\t\tproject: { scope: \"project\", paths: [], packages: new Map() },\n\t\t\tpath: { scope: \"path\", paths: [], packages: new Map() },\n\t\t};\n\n\t\tfor (const item of items) {\n\t\t\tconst groupKey = this.getScopeGroup(item.sourceInfo);\n\t\t\tconst group = groups[groupKey];\n\t\t\tconst source = item.sourceInfo?.source ?? \"local\";\n\n\t\t\tif (this.isPackageSource(item.sourceInfo)) {\n\t\t\t\tconst list = group.packages.get(source) ?? [];\n\t\t\t\tlist.push(item);\n\t\t\t\tgroup.packages.set(source, list);\n\t\t\t} else {\n\t\t\t\tgroup.paths.push(item);\n\t\t\t}\n\t\t}\n\n\t\treturn [groups.project, groups.user, groups.path].filter(\n\t\t\t(group) => group.paths.length > 0 || group.packages.size > 0,\n\t\t);\n\t}\n\n\tprivate formatScopeGroups(\n\t\tgroups: Array<{\n\t\t\tscope: \"user\" | \"project\" | \"path\";\n\t\t\tpaths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\tpackages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n\t\t}>,\n\t\toptions: {\n\t\t\tformatPath: (item: { path: string; sourceInfo?: SourceInfo }) => string;\n\t\t\tformatPackagePath: (item: { path: string; sourceInfo?: SourceInfo }, source: string) => string;\n\t\t},\n\t): string {\n\t\tconst lines: string[] = [];\n\n\t\tfor (const group of groups) {\n\t\t\tlines.push(` ${theme.fg(\"accent\", group.scope)}`);\n\n\t\t\tconst sortedPaths = [...group.paths].sort((a, b) => a.path.localeCompare(b.path));\n\t\t\tfor (const item of sortedPaths) {\n\t\t\t\tlines.push(theme.fg(\"dim\", ` ${options.formatPath(item)}`));\n\t\t\t}\n\n\t\t\tconst sortedPackages = Array.from(group.packages.entries()).sort(([a], [b]) => a.localeCompare(b));\n\t\t\tfor (const [source, items] of sortedPackages) {\n\t\t\t\tlines.push(` ${theme.fg(\"mdLink\", source)}`);\n\t\t\t\tconst sortedPackagePaths = [...items].sort((a, b) => a.path.localeCompare(b.path));\n\t\t\t\tfor (const item of sortedPackagePaths) {\n\t\t\t\t\tlines.push(theme.fg(\"dim\", ` ${options.formatPackagePath(item, source)}`));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn lines.join(\"\\n\");\n\t}\n\n\tprivate findSourceInfoForPath(p: string, sourceInfos: Map<string, SourceInfo>): SourceInfo | undefined {\n\t\tconst exact = sourceInfos.get(p);\n\t\tif (exact) return exact;\n\n\t\tlet current = p;\n\t\twhile (current.includes(\"/\")) {\n\t\t\tcurrent = current.substring(0, current.lastIndexOf(\"/\"));\n\t\t\tconst parent = sourceInfos.get(current);\n\t\t\tif (parent) return parent;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate formatPathWithSource(p: string, sourceInfo?: SourceInfo): string {\n\t\tif (sourceInfo) {\n\t\t\tconst shortPath = this.getShortPath(p, sourceInfo);\n\t\t\tconst { label, scopeLabel } = this.getDisplaySourceInfo(sourceInfo);\n\t\t\tconst labelText = scopeLabel ? `${label} (${scopeLabel})` : label;\n\t\t\treturn `${labelText} ${shortPath}`;\n\t\t}\n\t\treturn this.formatDisplayPath(p);\n\t}\n\n\tprivate formatDiagnostics(diagnostics: readonly ResourceDiagnostic[], sourceInfos: Map<string, SourceInfo>): string {\n\t\tconst lines: string[] = [];\n\n\t\t// Group collision diagnostics by name\n\t\tconst collisions = new Map<string, ResourceDiagnostic[]>();\n\t\tconst otherDiagnostics: ResourceDiagnostic[] = [];\n\n\t\tfor (const d of diagnostics) {\n\t\t\tif (d.type === \"collision\" && d.collision) {\n\t\t\t\tconst list = collisions.get(d.collision.name) ?? [];\n\t\t\t\tlist.push(d);\n\t\t\t\tcollisions.set(d.collision.name, list);\n\t\t\t} else {\n\t\t\t\totherDiagnostics.push(d);\n\t\t\t}\n\t\t}\n\n\t\t// Format collision diagnostics grouped by name\n\t\tfor (const [name, collisionList] of collisions) {\n\t\t\tconst first = collisionList[0]?.collision;\n\t\t\tif (!first) continue;\n\t\t\tlines.push(theme.fg(\"warning\", ` \"${name}\" collision:`));\n\t\t\tlines.push(\n\t\t\t\ttheme.fg(\n\t\t\t\t\t\"dim\",\n\t\t\t\t\t` ${theme.fg(\"success\", \"✓\")} ${this.formatPathWithSource(first.winnerPath, this.findSourceInfoForPath(first.winnerPath, sourceInfos))}`,\n\t\t\t\t),\n\t\t\t);\n\t\t\tfor (const d of collisionList) {\n\t\t\t\tif (d.collision) {\n\t\t\t\t\tlines.push(\n\t\t\t\t\t\ttheme.fg(\n\t\t\t\t\t\t\t\"dim\",\n\t\t\t\t\t\t\t` ${theme.fg(\"warning\", \"✗\")} ${this.formatPathWithSource(d.collision.loserPath, this.findSourceInfoForPath(d.collision.loserPath, sourceInfos))} (skipped)`,\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const d of otherDiagnostics) {\n\t\t\tif (d.path) {\n\t\t\t\tconst formattedPath = this.formatPathWithSource(d.path, this.findSourceInfoForPath(d.path, sourceInfos));\n\t\t\t\tlines.push(theme.fg(d.type === \"error\" ? \"error\" : \"warning\", ` ${formattedPath}`));\n\t\t\t\tlines.push(theme.fg(d.type === \"error\" ? \"error\" : \"warning\", ` ${d.message}`));\n\t\t\t} else {\n\t\t\t\tlines.push(theme.fg(d.type === \"error\" ? \"error\" : \"warning\", ` ${d.message}`));\n\t\t\t}\n\t\t}\n\n\t\treturn lines.join(\"\\n\");\n\t}\n\n\tprivate showLoadedResources(options?: {\n\t\textensions?: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\tforce?: boolean;\n\t\tshowDiagnosticsWhenQuiet?: boolean;\n\t}): void {\n\t\t// Resource rendering is idempotent; chat clears no longer clear this separate container.\n\t\tthis.loadedResourcesContainer.clear();\n\n\t\tconst showListing = options?.force || this.options.verbose || !this.settingsManager.getQuietStartup();\n\t\tconst showDiagnostics = showListing || options?.showDiagnosticsWhenQuiet === true;\n\t\tif (!showListing && !showDiagnostics) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst sectionHeader = (name: string, color: ThemeColor = \"mdHeading\") => theme.fg(color, `[${name}]`);\n\t\tconst formatCompactList = (items: string[], options?: { sort?: boolean }): string => {\n\t\t\tconst labels = items.map((item) => item.trim()).filter((item) => item.length > 0);\n\t\t\tif (options?.sort !== false) {\n\t\t\t\tlabels.sort((a, b) => a.localeCompare(b));\n\t\t\t}\n\t\t\treturn theme.fg(\"dim\", ` ${labels.join(\", \")}`);\n\t\t};\n\t\tconst addLoadedSection = (\n\t\t\tname: string,\n\t\t\tcollapsedBody: string,\n\t\t\texpandedBody = collapsedBody,\n\t\t\tcolor: ThemeColor = \"mdHeading\",\n\t\t): void => {\n\t\t\tconst section = new ExpandableText(\n\t\t\t\t() => `${sectionHeader(name, color)}\\n${collapsedBody}`,\n\t\t\t\t() => `${sectionHeader(name, color)}\\n${expandedBody}`,\n\t\t\t\tthis.getStartupExpansionState(),\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t);\n\t\t\tthis.loadedResourcesContainer.addChild(section);\n\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t};\n\n\t\tconst skillsResult = this.session.resourceLoader.getSkills();\n\t\tconst promptsResult = this.session.resourceLoader.getPrompts();\n\t\tconst themesResult = this.session.resourceLoader.getThemes();\n\t\tconst extensions =\n\t\t\toptions?.extensions ??\n\t\t\tthis.session.resourceLoader\n\t\t\t\t.getExtensions()\n\t\t\t\t.extensions.filter((extension) => !extension.hidden)\n\t\t\t\t.map((extension) => ({\n\t\t\t\t\tpath: extension.path,\n\t\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t\t}));\n\t\tconst sourceInfos = new Map<string, SourceInfo>();\n\t\tfor (const extension of extensions) {\n\t\t\tif (extension.sourceInfo) {\n\t\t\t\tsourceInfos.set(extension.path, extension.sourceInfo);\n\t\t\t}\n\t\t}\n\t\tfor (const skill of skillsResult.skills) {\n\t\t\tif (skill.sourceInfo) {\n\t\t\t\tsourceInfos.set(skill.filePath, skill.sourceInfo);\n\t\t\t}\n\t\t}\n\t\tfor (const prompt of promptsResult.prompts) {\n\t\t\tif (prompt.sourceInfo) {\n\t\t\t\tsourceInfos.set(prompt.filePath, prompt.sourceInfo);\n\t\t\t}\n\t\t}\n\t\tfor (const loadedTheme of themesResult.themes) {\n\t\t\tif (loadedTheme.sourcePath && loadedTheme.sourceInfo) {\n\t\t\t\tsourceInfos.set(loadedTheme.sourcePath, loadedTheme.sourceInfo);\n\t\t\t}\n\t\t}\n\n\t\tif (showListing) {\n\t\t\tconst systemPromptSource = this.session.resourceLoader.getSystemPromptSource();\n\t\t\tconst contextFiles = [\n\t\t\t\t...(systemPromptSource ? [systemPromptSource] : []),\n\t\t\t\t...this.session.resourceLoader.getAppendSystemPromptSources(),\n\t\t\t\t...this.session.resourceLoader.getAgentsFiles().agentsFiles,\n\t\t\t];\n\t\t\tif (contextFiles.length > 0) {\n\t\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t\t\tconst contextList = contextFiles\n\t\t\t\t\t.map((f) => theme.fg(\"dim\", ` ${this.formatDisplayPath(f.path)}`))\n\t\t\t\t\t.join(\"\\n\");\n\t\t\t\tconst contextCompactList = formatCompactList(\n\t\t\t\t\tcontextFiles.map((contextFile) => this.formatContextPath(contextFile.path)),\n\t\t\t\t\t{ sort: false },\n\t\t\t\t);\n\t\t\t\taddLoadedSection(\"Context\", contextCompactList, contextList);\n\t\t\t}\n\n\t\t\tconst skills = skillsResult.skills;\n\t\t\tif (skills.length > 0) {\n\t\t\t\tconst groups = this.buildScopeGroups(\n\t\t\t\t\tskills.map((skill) => ({ path: skill.filePath, sourceInfo: skill.sourceInfo })),\n\t\t\t\t);\n\t\t\t\tconst skillList = this.formatScopeGroups(groups, {\n\t\t\t\t\tformatPath: (item) => this.formatDisplayPath(item.path),\n\t\t\t\t\tformatPackagePath: (item) => this.getShortPath(item.path, item.sourceInfo),\n\t\t\t\t});\n\t\t\t\tconst skillCompactList = formatCompactList(skills.map((skill) => skill.name));\n\t\t\t\taddLoadedSection(\"Skills\", skillCompactList, skillList);\n\t\t\t}\n\n\t\t\tconst templates = this.session.promptTemplates;\n\t\t\tif (templates.length > 0) {\n\t\t\t\tconst groups = this.buildScopeGroups(\n\t\t\t\t\ttemplates.map((template) => ({ path: template.filePath, sourceInfo: template.sourceInfo })),\n\t\t\t\t);\n\t\t\t\tconst templateByPath = new Map(templates.map((t) => [t.filePath, t]));\n\t\t\t\tconst templateList = this.formatScopeGroups(groups, {\n\t\t\t\t\tformatPath: (item) => {\n\t\t\t\t\t\tconst template = templateByPath.get(item.path);\n\t\t\t\t\t\treturn template ? `/${template.name}` : this.formatDisplayPath(item.path);\n\t\t\t\t\t},\n\t\t\t\t\tformatPackagePath: (item) => {\n\t\t\t\t\t\tconst template = templateByPath.get(item.path);\n\t\t\t\t\t\treturn template ? `/${template.name}` : this.formatDisplayPath(item.path);\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\tconst promptCompactList = formatCompactList(templates.map((template) => `/${template.name}`));\n\t\t\t\taddLoadedSection(\"Prompts\", promptCompactList, templateList);\n\t\t\t}\n\n\t\t\tif (extensions.length > 0) {\n\t\t\t\tconst groups = this.buildScopeGroups(extensions);\n\t\t\t\tconst extList = this.formatScopeGroups(groups, {\n\t\t\t\t\tformatPath: (item) => this.formatExtensionDisplayPath(item.path),\n\t\t\t\t\tformatPackagePath: (item) =>\n\t\t\t\t\t\tthis.formatExtensionDisplayPath(this.getShortPath(item.path, item.sourceInfo)),\n\t\t\t\t});\n\t\t\t\tconst extensionCompactList = formatCompactList(this.getCompactExtensionLabels(extensions));\n\t\t\t\taddLoadedSection(\"Extensions\", extensionCompactList, extList, \"mdHeading\");\n\t\t\t}\n\n\t\t\t// Show loaded themes (excluding built-in)\n\t\t\tconst loadedThemes = themesResult.themes;\n\t\t\tconst customThemes = loadedThemes.filter((t) => t.sourcePath);\n\t\t\tif (customThemes.length > 0) {\n\t\t\t\tconst groups = this.buildScopeGroups(\n\t\t\t\t\tcustomThemes.map((loadedTheme) => ({\n\t\t\t\t\t\tpath: loadedTheme.sourcePath!,\n\t\t\t\t\t\tsourceInfo: loadedTheme.sourceInfo,\n\t\t\t\t\t})),\n\t\t\t\t);\n\t\t\t\tconst themeList = this.formatScopeGroups(groups, {\n\t\t\t\t\tformatPath: (item) => this.formatDisplayPath(item.path),\n\t\t\t\t\tformatPackagePath: (item) => this.getShortPath(item.path, item.sourceInfo),\n\t\t\t\t});\n\t\t\t\tconst themeCompactList = formatCompactList(\n\t\t\t\t\tcustomThemes.map(\n\t\t\t\t\t\t(loadedTheme) =>\n\t\t\t\t\t\t\tloadedTheme.name ?? this.getCompactPathLabel(loadedTheme.sourcePath!, loadedTheme.sourceInfo),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\taddLoadedSection(\"Themes\", themeCompactList, themeList);\n\t\t\t}\n\t\t}\n\n\t\tif (showDiagnostics) {\n\t\t\tconst skillDiagnostics = skillsResult.diagnostics;\n\t\t\tif (skillDiagnostics.length > 0) {\n\t\t\t\tconst warningLines = this.formatDiagnostics(skillDiagnostics, sourceInfos);\n\t\t\t\tthis.loadedResourcesContainer.addChild(\n\t\t\t\t\tnew Text(`${theme.fg(\"warning\", \"[Skill conflicts]\")}\\n${warningLines}`, 0, 0),\n\t\t\t\t);\n\t\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t\t}\n\n\t\t\tconst promptDiagnostics = promptsResult.diagnostics;\n\t\t\tif (promptDiagnostics.length > 0) {\n\t\t\t\tconst warningLines = this.formatDiagnostics(promptDiagnostics, sourceInfos);\n\t\t\t\tthis.loadedResourcesContainer.addChild(\n\t\t\t\t\tnew Text(`${theme.fg(\"warning\", \"[Prompt conflicts]\")}\\n${warningLines}`, 0, 0),\n\t\t\t\t);\n\t\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t\t}\n\n\t\t\tconst extensionDiagnostics: ResourceDiagnostic[] = [];\n\t\t\tconst extensionErrors = this.session.resourceLoader.getExtensions().errors;\n\t\t\tif (extensionErrors.length > 0) {\n\t\t\t\tfor (const error of extensionErrors) {\n\t\t\t\t\textensionDiagnostics.push({ type: \"error\", message: error.error, path: error.path });\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst commandDiagnostics = this.session.extensionRunner.getCommandDiagnostics();\n\t\t\textensionDiagnostics.push(...commandDiagnostics);\n\t\t\textensionDiagnostics.push(...this.getBuiltInCommandConflictDiagnostics(this.session.extensionRunner));\n\n\t\t\tconst shortcutDiagnostics = this.session.extensionRunner.getShortcutDiagnostics();\n\t\t\textensionDiagnostics.push(...shortcutDiagnostics);\n\n\t\t\tif (extensionDiagnostics.length > 0) {\n\t\t\t\tconst warningLines = this.formatDiagnostics(extensionDiagnostics, sourceInfos);\n\t\t\t\tthis.loadedResourcesContainer.addChild(\n\t\t\t\t\tnew Text(`${theme.fg(\"warning\", \"[Extension issues]\")}\\n${warningLines}`, 0, 0),\n\t\t\t\t);\n\t\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t\t}\n\n\t\t\tconst themeDiagnostics = themesResult.diagnostics;\n\t\t\tif (themeDiagnostics.length > 0) {\n\t\t\t\tconst warningLines = this.formatDiagnostics(themeDiagnostics, sourceInfos);\n\t\t\t\tthis.loadedResourcesContainer.addChild(\n\t\t\t\t\tnew Text(`${theme.fg(\"warning\", \"[Theme conflicts]\")}\\n${warningLines}`, 0, 0),\n\t\t\t\t);\n\t\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Initialize the extension system with TUI-based UI context.\n\t */\n\tprivate async bindCurrentSessionExtensions(): Promise<void> {\n\t\tconst uiContext = this.createExtensionUIContext();\n\t\tawait this.session.bindExtensions({\n\t\t\tuiContext,\n\t\t\tmode: \"tui\",\n\t\t\tabortHandler: () => {\n\t\t\t\tthis.restoreQueuedMessagesToEditor({ abort: true });\n\t\t\t},\n\t\t\tcommandContextActions: {\n\t\t\t\twaitForIdle: () => this.session.waitForIdle(),\n\t\t\t\tnewSession: async (options) => {\n\t\t\t\t\tthis.clearStatusIndicator();\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn await this.runtimeHost.newSession(options);\n\t\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\t\treturn this.handleFatalRuntimeError(\"Failed to create session\", error);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfork: async (entryId, options) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = await this.runtimeHost.fork(entryId, options);\n\t\t\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\t\t\tthis.editor.setText(result.selectedText ?? \"\");\n\t\t\t\t\t\t\tthis.showStatus(\"Forked to new session\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\t\treturn this.handleFatalRuntimeError(\"Failed to fork session\", error);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tnavigateTree: async (targetId, options) => {\n\t\t\t\t\tconst result = await this.session.navigateTree(targetId, {\n\t\t\t\t\t\tsummarize: options?.summarize,\n\t\t\t\t\t\tcustomInstructions: options?.customInstructions,\n\t\t\t\t\t\treplaceInstructions: options?.replaceInstructions,\n\t\t\t\t\t\tlabel: options?.label,\n\t\t\t\t\t});\n\t\t\t\t\tif (result.cancelled) {\n\t\t\t\t\t\treturn { cancelled: true };\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.chatContainer.clear();\n\t\t\t\t\tthis.renderInitialMessages();\n\t\t\t\t\tif (result.editorText && !this.editor.getText().trim()) {\n\t\t\t\t\t\tthis.editor.setText(result.editorText);\n\t\t\t\t\t}\n\t\t\t\t\tthis.showStatus(\"Navigated to selected point\");\n\t\t\t\t\tvoid this.flushCompactionQueue({ willRetry: false });\n\t\t\t\t\treturn { cancelled: false };\n\t\t\t\t},\n\t\t\t\tswitchSession: async (sessionPath, options) => {\n\t\t\t\t\treturn this.handleResumeSession(sessionPath, options);\n\t\t\t\t},\n\t\t\t\treload: async () => {\n\t\t\t\t\tawait this.handleReloadCommand();\n\t\t\t\t},\n\t\t\t},\n\t\t\tshutdownHandler: () => {\n\t\t\t\tthis.shutdownRequested = true;\n\t\t\t\tif (this.session.isIdle) {\n\t\t\t\t\tvoid this.shutdown();\n\t\t\t\t}\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\tthis.showExtensionError(error);\n\t\t\t},\n\t\t});\n\n\t\tsetRegisteredThemes(this.session.resourceLoader.getThemes().themes);\n\t\tthis.setupAutocompleteProvider();\n\n\t\tconst extensionRunner = this.session.extensionRunner;\n\t\tthis.setupExtensionShortcuts(extensionRunner);\n\t\tthis.showLoadedResources({ force: false, showDiagnosticsWhenQuiet: true });\n\t\tthis.showStartupNoticesIfNeeded();\n\t}\n\n\tprivate applyFullscreenScrollbarSetting(): void {\n\t\tthis.transcriptScrollView?.setScrollbar(this.settingsManager.getFullscreenScrollbar());\n\t}\n\n\tprivate applyRuntimeSettings(): void {\n\t\tconfigureHttpDispatcher(this.settingsManager.getHttpIdleTimeoutMs());\n\t\tthis.applyFullscreenScrollbarSetting();\n\t\tthis.footer.setSession(this.session);\n\t\tthis.footer.setAutoCompactEnabled(this.session.autoCompactionEnabled);\n\t\tthis.footerDataProvider.setCwd(this.sessionManager.getCwd());\n\t\tthis.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();\n\t\tthis.outputPad = this.settingsManager.getOutputPad();\n\t\tthis.applySmoothStreamingRenderFps();\n\t\tthis.ui.setShowHardwareCursor(this.settingsManager.getShowHardwareCursor());\n\t\tconst clearOnShrink = this.settingsManager.getClearOnShrink();\n\t\tthis.ui.setClearOnShrink(clearOnShrink);\n\t\tif (!clearOnShrink && !this.activeStatusIndicator) {\n\t\t\tthis.statusContainer.clear();\n\t\t}\n\t\tconst editorPaddingX = this.settingsManager.getEditorPaddingX();\n\t\tconst autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();\n\t\tthis.defaultEditor.setPaddingX(editorPaddingX);\n\t\tthis.defaultEditor.setAutocompleteMaxVisible(autocompleteMaxVisible);\n\t\tif (this.editor !== this.defaultEditor) {\n\t\t\tthis.editor.setPaddingX?.(editorPaddingX);\n\t\t\tthis.editor.setAutocompleteMaxVisible?.(autocompleteMaxVisible);\n\t\t}\n\t}\n\n\tprivate async rebindCurrentSession(options: { renderBeforeBind?: boolean } = {}): Promise<void> {\n\t\tInteractiveMode.restoreCompactionEscapeOverride(this);\n\t\tconst session = this.session;\n\t\tthis.unsubscribe?.();\n\t\tthis.unsubscribe = undefined;\n\t\tthis.applyRuntimeSettings();\n\n\t\tif (options.renderBeforeBind) {\n\t\t\tthis.renderCurrentSessionState();\n\t\t\tthis.subscribeToAgent();\n\t\t}\n\n\t\tawait this.bindCurrentSessionExtensions();\n\n\t\tif (this.session !== session) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.renderBeforeBind) {\n\t\t\tthis.subscribeToAgent();\n\t\t}\n\t\tthis.updateAvailableProviderCount();\n\t\tthis.updateEditorBorderColor();\n\t\tthis.updateTerminalTitle();\n\t}\n\n\tprivate async handleFatalRuntimeError(prefix: string, error: unknown): Promise<never> {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tthis.showError(`${prefix}: ${message}`);\n\t\tstopThemeWatcher();\n\t\tthis.stop(\"transcript\");\n\t\tprocess.exit(1);\n\t}\n\n\tprivate renderCurrentSessionState(): void {\n\t\tthis.loadedResourcesContainer.clear();\n\t\tthis.chatContainer.clear();\n\t\tthis.pendingMessagesContainer.clear();\n\t\tfor (const controller of this.compactionTransferAbortControllers.values()) controller.abort();\n\t\tthis.compactionQueueGeneration += 1;\n\t\tthis.compactionQueueFlushTail = undefined;\n\t\tthis.compactionQueuedMessages = [];\n\t\tthis.compactionInFlightMessages = [];\n\t\tthis.compactionTransferAbortControllers.clear();\n\t\tthis.streamingReveal.stop();\n\t\tthis.toolResultReveal.stop();\n\t\tthis.streamingComponent = undefined;\n\t\tthis.streamingMessage = undefined;\n\t\tthis.clearPendingTools();\n\t\tthis.clearToolHookStatuses();\n\t\tthis.renderInitialMessages();\n\t}\n\n\t/**\n\t * Get a registered tool definition by name (for custom rendering).\n\t */\n\tprivate getRegisteredToolDefinition(toolName: string) {\n\t\treturn this.session.getToolDefinition(toolName);\n\t}\n\n\tprivate getMarkdownTransformers(): MarkdownTransformer[] {\n\t\treturn [this.mermaidMarkdownTransformer, ...this.session.extensionRunner.getMarkdownTransformers()];\n\t}\n\n\t/**\n\t * Set up keyboard shortcuts registered by extensions.\n\t */\n\tprivate setupExtensionShortcuts(extensionRunner: ExtensionRunner): void {\n\t\tconst shortcuts = extensionRunner.getShortcuts(this.keybindings.getEffectiveConfig());\n\t\tif (shortcuts.size === 0) return;\n\n\t\t// Create a context for shortcut handlers\n\t\tconst createContext = (): ExtensionContext => ({\n\t\t\tui: this.createExtensionUIContext(),\n\t\t\tmode: \"tui\",\n\t\t\thasUI: true,\n\t\t\tcwd: this.sessionManager.getCwd(),\n\t\t\tagentDir: this.session.agentDir,\n\t\t\tsessionManager: this.sessionManager,\n\t\t\tmodelRegistry: extensionRunner.getModelRegistry(),\n\t\t\tmodel: this.session.model,\n\t\t\tserviceTier: this.session.serviceTier,\n\t\t\tscopedModels: this.session.scopedModels,\n\t\t\tthinkingLevel: this.session.thinkingLevel,\n\t\t\tisIdle: () => this.session.isIdle,\n\t\t\tisProjectTrusted: () => this.settingsManager.isProjectTrusted(),\n\t\t\tsignal: this.session.agent.signal,\n\t\t\tabort: () => this.session.abort(),\n\t\t\thasPendingMessages: () => this.session.pendingMessageCount > 0,\n\t\t\trequestReload: () => this.handleReloadCommand(),\n\t\t\tisCompacting: () => this.session.isCompacting,\n\t\t\tshutdown: () => {\n\t\t\t\tthis.shutdownRequested = true;\n\t\t\t},\n\t\t\tgetContextUsage: () => this.session.getContextUsage(),\n\t\t\tgetCompactionSettings: () => this.settingsManager.getCompactionSettings(),\n\t\t\tgetPromptCacheSafeWaitSeconds: () => this.session.resolvePromptCacheSafeWaitSeconds(),\n\t\t\tgetPromptCacheGoalBackstopMaxSeconds: () => this.settingsManager.getPromptCacheGoalBackstopMaxSeconds(),\n\t\t\tgetLookAtSettings: () => {\n\t\t\t\tconst global = this.settingsManager.getGlobalSettings().lookAt;\n\t\t\t\tconst project = this.settingsManager.getProjectSettings().lookAt;\n\t\t\t\treturn {\n\t\t\t\t\tenabled: project?.enabled ?? global?.enabled ?? true,\n\t\t\t\t\tmodels: project?.models ?? global?.models,\n\t\t\t\t};\n\t\t\t},\n\t\t\tgetImageSettings: () => ({\n\t\t\t\tautoResize: this.settingsManager.getImageAutoResize(),\n\t\t\t\tblockImages: this.settingsManager.getBlockImages(),\n\t\t\t}),\n\t\t\tsessionSettings: extensionRunner.createContext().sessionSettings,\n\t\t\tcompact: (options) => {\n\t\t\t\tvoid (async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = await this.session.compact(options?.customInstructions);\n\t\t\t\t\t\toptions?.onComplete?.(result);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst err = error instanceof Error ? error : new Error(String(error));\n\t\t\t\t\t\toptions?.onError?.(err);\n\t\t\t\t\t}\n\t\t\t\t})();\n\t\t\t},\n\t\t\tgetMessageRevision: () => this.session.getMessageRevision(),\n\t\t\tapplyCompaction: (precomputed, options) => this.session.applyCompaction(precomputed, options),\n\t\t\tgetSystemPrompt: () => this.session.systemPrompt,\n\t\t});\n\n\t\t// Set up the extension shortcut handler on the default editor\n\t\tthis.defaultEditor.onExtensionShortcut = (data: string) => {\n\t\t\tfor (const [shortcutStr, shortcut] of shortcuts) {\n\t\t\t\t// Cast to KeyId - extension shortcuts use the same format\n\t\t\t\tif (matchesKey(data, shortcutStr as KeyId)) {\n\t\t\t\t\t// Run handler async, don't block input\n\t\t\t\t\tPromise.resolve(shortcut.handler(createContext())).catch((err) => {\n\t\t\t\t\t\tthis.showError(`Shortcut handler error: ${err instanceof Error ? err.message : String(err)}`);\n\t\t\t\t\t});\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n\n\t/**\n\t * Set extension status text in the footer.\n\t */\n\tprivate setExtensionStatus(key: string, text: string | undefined): void {\n\t\tthis.footerDataProvider.setExtensionStatus(key, text);\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate startToolHookStatusTimer(): void {\n\t\tif (this.hookStatusIntervalId) {\n\t\t\treturn;\n\t\t}\n\t\tconst intervalMs = largeSessionWorkingStatusInterval(\n\t\t\tthis.sessionManager.getEntries().length,\n\t\t\tDEFAULT_WORKING_STATUS_MESSAGE_ANIMATION_INTERVAL_MS,\n\t\t\tLARGE_SESSION_WORKING_STATUS_MESSAGE_INTERVAL_MS,\n\t\t);\n\t\tthis.hookStatusIntervalId = setInterval(() => {\n\t\t\tthis.refreshToolHookStatuses();\n\t\t}, intervalMs);\n\t\tthis.hookStatusIntervalId.unref();\n\t}\n\n\tprivate stopToolHookStatusTimer(): void {\n\t\tif (this.hookStatusIntervalId) {\n\t\t\tclearInterval(this.hookStatusIntervalId);\n\t\t\tthis.hookStatusIntervalId = undefined;\n\t\t}\n\t}\n\n\tprivate refreshToolHookStatuses(): void {\n\t\tthis.hookStatusContainer.clear();\n\t\tif (this.activeToolHooks.size === 0) {\n\t\t\tthis.stopToolHookStatusTimer();\n\t\t\tthis.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\tconst now = Date.now();\n\t\tfor (const hook of this.activeToolHooks.values()) {\n\t\t\tconst elapsedMs = Math.max(0, now - hook.startedAt);\n\t\t\tconst elapsedSeconds = Math.floor(elapsedMs / 1000);\n\t\t\tthis.hookStatusContainer.addChild(\n\t\t\t\tnew Text(\n\t\t\t\t\tformatToolHookStatusMessageFrame(hook.hookName, hook.statusMessage, elapsedSeconds, elapsedMs, {\n\t\t\t\t\t\tbase: (text) => theme.fg(\"dim\", text),\n\t\t\t\t\t\tglow: (text) => theme.fg(\"text\", text),\n\t\t\t\t\t\thighlight: (text) => theme.bold(theme.fg(\"text\", text)),\n\t\t\t\t\t\tshimmer: formatWorkingStatusShimmerText,\n\t\t\t\t\t\tsuffix: (text) => theme.fg(\"dim\", text),\n\t\t\t\t\t}),\n\t\t\t\t\t1,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleToolHookStatusEvent(event: ToolHookStatusEvent): void {\n\t\tif (event.phase === \"start\") {\n\t\t\tthis.activeToolHooks.set(event.hookRunId, event);\n\t\t\tthis.activeToolTerminalTitle = formatToolHookTerminalTitle(event);\n\t\t\tif (this.ui.terminal) {\n\t\t\t\tthis.applyTerminalTitle();\n\t\t\t}\n\t\t\tthis.startToolHookStatusTimer();\n\t\t\tthis.refreshToolHookStatuses();\n\t\t\treturn;\n\t\t}\n\t\tif (event.phase === \"update\") {\n\t\t\tconst existing = this.activeToolHooks.get(event.hookRunId);\n\t\t\tif (!existing) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst updated = { ...existing, statusMessage: event.statusMessage };\n\t\t\tthis.activeToolHooks.set(event.hookRunId, updated);\n\t\t\tthis.activeToolTerminalTitle = formatToolHookTerminalTitle(updated);\n\t\t\tif (this.ui.terminal) {\n\t\t\t\tthis.applyTerminalTitle();\n\t\t\t}\n\t\t\tthis.refreshToolHookStatuses();\n\t\t\treturn;\n\t\t}\n\t\tthis.activeToolHooks.delete(event.hookRunId);\n\t\tconst nextHook = this.activeToolHooks.values().next().value;\n\t\tthis.activeToolTerminalTitle = nextHook ? formatToolHookTerminalTitle(nextHook) : undefined;\n\t\tif (this.ui.terminal) {\n\t\t\tthis.applyTerminalTitle();\n\t\t}\n\t\tthis.refreshToolHookStatuses();\n\t}\n\n\tprivate handleToolExecutionStart(event: ToolExecutionStartEvent): void {\n\t\tconst label = formatActiveToolWorkingLabel(event.toolName, event.args);\n\t\tif (this.activeToolExecutions.size === 0) {\n\t\t\tthis.workingMessageBeforeActiveTool = this.workingMessage;\n\t\t}\n\t\tthis.activeToolExecutions.set(event.toolCallId, label);\n\t\tthis.workingMessage = label;\n\t\tthis.activeToolExecutionTerminalTitle = `${APP_TITLE} - ${label}`;\n\t\tthis.refreshWorkingLoaderMessage();\n\t\tthis.applyTerminalTitle();\n\t}\n\n\tprivate handleToolExecutionEnd(event: ToolExecutionEndEvent): void {\n\t\tif (!this.activeToolExecutions.delete(event.toolCallId)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextExecution = this.activeToolExecutions.values().next();\n\t\tif (!nextExecution.done) {\n\t\t\tthis.workingMessage = nextExecution.value;\n\t\t\tthis.activeToolExecutionTerminalTitle = `${APP_TITLE} - ${nextExecution.value}`;\n\t\t} else {\n\t\t\tthis.workingMessage = this.workingMessageBeforeActiveTool;\n\t\t\tthis.workingMessageBeforeActiveTool = undefined;\n\t\t\tthis.activeToolExecutionTerminalTitle = undefined;\n\t\t}\n\t\tthis.refreshWorkingLoaderMessage();\n\t\tthis.applyTerminalTitle();\n\t}\n\n\tprivate stopChatToolAnimations(): void {\n\t\tfor (const child of this.chatContainer.children) {\n\t\t\tif (child instanceof ToolExecutionComponent) child.stopAnimation();\n\t\t}\n\t}\n\n\tprivate clearPendingTools(): void {\n\t\tthis.toolArgsReveal.flushAll();\n\t\tfor (const component of this.pendingTools.values()) {\n\t\t\tcomponent.stopAnimation();\n\t\t}\n\t\tthis.pendingTools.clear();\n\t}\n\n\tprivate clearActiveToolExecutionStatus(): void {\n\t\tif (\n\t\t\tthis.activeToolExecutions.size === 0 &&\n\t\t\tthis.activeToolExecutionTerminalTitle === undefined &&\n\t\t\tthis.workingMessageBeforeActiveTool === undefined\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tthis.activeToolExecutions.clear();\n\t\tthis.activeToolExecutionTerminalTitle = undefined;\n\t\tthis.workingMessage = this.workingMessageBeforeActiveTool;\n\t\tthis.workingMessageBeforeActiveTool = undefined;\n\t\tthis.refreshWorkingLoaderMessage();\n\t\tthis.applyTerminalTitle();\n\t}\n\n\tprivate clearToolHookStatuses(): void {\n\t\tthis.activeToolHooks.clear();\n\t\tthis.activeToolTerminalTitle = undefined;\n\t\tif (this.ui.terminal) {\n\t\t\tthis.applyTerminalTitle();\n\t\t}\n\t\tthis.hookStatusContainer.clear();\n\t\tthis.stopToolHookStatusTimer();\n\t}\n\n\tprivate getWorkingElapsedSeconds(): number {\n\t\tif (this.workingStartedAt === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, Math.floor((Date.now() - this.workingStartedAt) / 1000));\n\t}\n\n\tprivate getWorkingLoaderMessage(): string {\n\t\treturn this.workingMessage ?? this.defaultWorkingMessage;\n\t}\n\n\tprivate refreshWorkingLoaderMessage(): void {\n\t\tif (this.activeStatusIndicator?.kind === \"working\") {\n\t\t\tthis.activeStatusIndicator.setMessage(this.getWorkingLoaderMessage());\n\t\t\treturn;\n\t\t}\n\t\tconst legacyLoader = (this as { loadingAnimation?: { setMessage(message: string): void } }).loadingAnimation;\n\t\tlegacyLoader?.setMessage(this.getWorkingLoaderMessage());\n\t}\n\n\tprivate getWorkingIndicatorOptions(): LoaderIndicatorOptions {\n\t\tif (this.workingIndicatorOptions !== undefined) {\n\t\t\treturn this.workingIndicatorOptions;\n\t\t}\n\t\tconst sessionEntryCount = this.sessionManager.getEntries().length;\n\t\treturn {\n\t\t\tframes: theme.getColorMode() === \"truecolor\" ? [\"•\"] : [theme.fg(\"accent\", \"•\"), theme.fg(\"muted\", \"◦\")],\n\t\t\tintervalMs: largeSessionWorkingStatusInterval(\n\t\t\t\tsessionEntryCount,\n\t\t\t\tDEFAULT_WORKING_STATUS_REFRESH_INTERVAL_MS,\n\t\t\t\tLARGE_SESSION_WORKING_STATUS_REFRESH_INTERVAL_MS,\n\t\t\t),\n\t\t\tindicatorFormatter:\n\t\t\t\ttheme.getColorMode() === \"truecolor\"\n\t\t\t\t\t? (frame, elapsedMs) => formatWorkingStatusShimmerText(frame, elapsedMs)\n\t\t\t\t\t: undefined,\n\t\t\tmessageFormatter: (message, animationElapsedMs) =>\n\t\t\t\tformatWorkingStatusMessageFrame(\n\t\t\t\t\tmessage,\n\t\t\t\t\tthis.getWorkingElapsedSeconds(),\n\t\t\t\t\tkeyText(\"app.interrupt\"),\n\t\t\t\t\tanimationElapsedMs,\n\t\t\t\t\t{\n\t\t\t\t\t\tbase: (text) => theme.fg(\"dim\", text),\n\t\t\t\t\t\tglow: (text) => theme.fg(\"text\", text),\n\t\t\t\t\t\thighlight: (text) => theme.bold(theme.fg(\"text\", text)),\n\t\t\t\t\t\tshimmer: formatWorkingStatusShimmerText,\n\t\t\t\t\t\tsuffix: (text) => theme.fg(\"dim\", text),\n\t\t\t\t\t},\n\t\t\t\t),\n\t\t\tmessageIntervalMs: largeSessionWorkingStatusInterval(\n\t\t\t\tsessionEntryCount,\n\t\t\t\tDEFAULT_WORKING_STATUS_MESSAGE_ANIMATION_INTERVAL_MS,\n\t\t\t\tLARGE_SESSION_WORKING_STATUS_MESSAGE_INTERVAL_MS,\n\t\t\t),\n\t\t};\n\t}\n\n\tprivate showStatusIndicator(indicator: StatusIndicator): void {\n\t\tif (indicator.kind === \"working\") {\n\t\t\tthis.workingStartedAt = Date.now();\n\t\t}\n\t\tthis.activeStatusIndicator?.dispose();\n\t\tthis.activeStatusIndicator = indicator;\n\t\tthis.statusContainer.clear();\n\n\t\tconst workingTip = indicator.kind === \"working\" ? this.resolveTurnWorkingTip() : undefined;\n\t\tif (!workingTip) {\n\t\t\tthis.statusContainer.addChild(indicator);\n\t\t\treturn;\n\t\t}\n\n\t\tconst wrapper = new Container();\n\t\twrapper.addChild(indicator);\n\t\twrapper.addChild(new Text(theme.fg(\"dim\", workingTip.line), 1, 0));\n\t\tthis.statusContainer.addChild(wrapper);\n\t}\n\n\tprivate resolveTurnWorkingTip(): WorkingTipLine | undefined {\n\t\treturn this.turnWorkingTip.resolve(\n\t\t\t() =>\n\t\t\t\tresolveWorkingTipLine({\n\t\t\t\t\ttipsEnabled: this.settingsManager.getTipsEnabled(),\n\t\t\t\t\thistory: this.settingsManager.getTipsHistory(),\n\t\t\t\t\tsessionShownTipIds: this.sessionShownTipIds,\n\t\t\t\t\tnow: Date.now(),\n\t\t\t\t\tdefinitions: TIP_DEFINITIONS,\n\t\t\t\t\tkeys: keyText,\n\t\t\t\t\thasCommand: (command) => this.hasRegisteredCommand(command),\n\t\t\t\t}),\n\t\t\t(tip) => this.recordShownTip(tip.tipId),\n\t\t);\n\t}\n\n\tprivate updateWorkingIndicatorMessage(): void {\n\t\tif (this.activeStatusIndicator?.kind === \"working\") {\n\t\t\tthis.activeStatusIndicator.setMessage(this.workingMessage ?? this.defaultWorkingMessage);\n\t\t}\n\t}\n\n\tprivate clearStatusIndicator(kind?: StatusIndicator[\"kind\"]): void {\n\t\tif (kind && this.activeStatusIndicator?.kind !== kind) {\n\t\t\treturn;\n\t\t}\n\t\tconst hadActiveStatusIndicator = this.activeStatusIndicator !== undefined;\n\t\tconst isClearingWorking = this.activeStatusIndicator?.kind === \"working\";\n\t\tthis.activeStatusIndicator?.dispose();\n\t\tthis.activeStatusIndicator = undefined;\n\t\tif (isClearingWorking) {\n\t\t\tthis.workingStartedAt = undefined;\n\t\t}\n\t\tthis.statusContainer.clear();\n\t\tif (hadActiveStatusIndicator && this.options.tuiMode === \"regular\" && this.ui.getClearOnShrink()) {\n\t\t\tthis.statusContainer.addChild(this.idleStatus);\n\t\t}\n\t}\n\n\tprivate setWorkingVisible(visible: boolean): void {\n\t\tthis.workingVisible = visible;\n\t\tif (!visible) {\n\t\t\tthis.clearStatusIndicator(\"working\");\n\t\t\tthis.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tif (this.session.isStreaming && this.activeStatusIndicator?.kind !== \"working\") {\n\t\t\tthis.showStatusIndicator(\n\t\t\t\tthis.chrome\n\t\t\t\t\t? this.chrome.createWorkingIndicator(\n\t\t\t\t\t\t\tthis.ui,\n\t\t\t\t\t\t\tthis.workingMessage ?? this.defaultWorkingMessage,\n\t\t\t\t\t\t\tthis.getWorkingIndicatorOptions(),\n\t\t\t\t\t\t)\n\t\t\t\t\t: new WorkingStatusIndicator(\n\t\t\t\t\t\t\tthis.ui,\n\t\t\t\t\t\t\tthis.workingMessage ?? this.defaultWorkingMessage,\n\t\t\t\t\t\t\tthis.getWorkingIndicatorOptions(),\n\t\t\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate setWorkingIndicator(options?: WorkingIndicatorOptions): void {\n\t\tthis.workingIndicatorOptions = options;\n\t\tif (this.activeStatusIndicator?.kind === \"working\") {\n\t\t\tthis.activeStatusIndicator.setIndicator(this.getWorkingIndicatorOptions());\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate setHiddenThinkingLabel(label?: string): void {\n\t\tthis.hiddenThinkingLabel = label ?? this.defaultHiddenThinkingLabel;\n\t\tfor (const child of this.chatContainer.children) {\n\t\t\tif (child instanceof AssistantMessageComponent) {\n\t\t\t\tchild.setHiddenThinkingLabel(this.hiddenThinkingLabel);\n\t\t\t}\n\t\t}\n\t\tif (this.streamingComponent) {\n\t\t\tthis.streamingComponent.setHiddenThinkingLabel(this.hiddenThinkingLabel);\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Set an extension widget (string array or custom component).\n\t */\n\tprivate setExtensionWidget(\n\t\tkey: string,\n\t\tcontent: string[] | ((tui: TUI, thm: Theme) => Component & { dispose?(): void }) | undefined,\n\t\toptions?: ExtensionWidgetOptions,\n\t): void {\n\t\tconst placement = options?.placement ?? \"aboveEditor\";\n\t\tconst targetMap = placement === \"belowEditor\" ? this.extensionWidgetsBelow : this.extensionWidgetsAbove;\n\t\tconst otherMap = placement === \"belowEditor\" ? this.extensionWidgetsAbove : this.extensionWidgetsBelow;\n\t\tconst removeFrom = (map: Map<string, Component & { dispose?(): void }>) => {\n\t\t\tconst existing = map.get(key);\n\t\t\tif (existing?.dispose) existing.dispose();\n\t\t\tmap.delete(key);\n\t\t};\n\n\t\tremoveFrom(otherMap);\n\n\t\tif (content === undefined) {\n\t\t\tremoveFrom(targetMap);\n\t\t\tthis.renderWidgets();\n\t\t\treturn;\n\t\t}\n\n\t\tlet component: Component & { dispose?(): void };\n\n\t\tif (Array.isArray(content)) {\n\t\t\t// Wrap string array in a Container with Text components\n\t\t\tconst container = new Container();\n\t\t\tfor (const line of content.slice(0, InteractiveMode.MAX_WIDGET_LINES)) {\n\t\t\t\tcontainer.addChild(new Text(line, 1, 0));\n\t\t\t}\n\t\t\tif (content.length > InteractiveMode.MAX_WIDGET_LINES) {\n\t\t\t\tcontainer.addChild(new Text(theme.fg(\"muted\", \"... (widget truncated)\"), 1, 0));\n\t\t\t}\n\t\t\tcomponent = container;\n\t\t} else {\n\t\t\t// Factory function - create component\n\t\t\tcomponent = content(this.ui, theme);\n\t\t}\n\n\t\t// Map.set on an existing key keeps its insertion position, so a refreshing widget stays\n\t\t// put instead of moving past its neighbours and reshuffling the stacking order each paint.\n\t\tconst existing = targetMap.get(key);\n\t\tif (existing?.dispose) existing.dispose();\n\t\ttargetMap.set(key, component);\n\t\tthis.renderWidgets();\n\t}\n\n\tprivate clearExtensionWidgets(): void {\n\t\tfor (const widget of this.extensionWidgetsAbove.values()) {\n\t\t\twidget.dispose?.();\n\t\t}\n\t\tfor (const widget of this.extensionWidgetsBelow.values()) {\n\t\t\twidget.dispose?.();\n\t\t}\n\t\tthis.extensionWidgetsAbove.clear();\n\t\tthis.extensionWidgetsBelow.clear();\n\t\tthis.renderWidgets();\n\t}\n\n\tprivate resetExtensionUI(): void {\n\t\tif (this.extensionSelector) {\n\t\t\tthis.hideExtensionSelector();\n\t\t}\n\t\tif (this.extensionInput) {\n\t\t\tthis.hideExtensionInput();\n\t\t}\n\t\tif (this.extensionEditor) {\n\t\t\tthis.hideExtensionEditor();\n\t\t}\n\t\tthis.ui.hideOverlay();\n\t\tthis.clearExtensionTerminalInputListeners();\n\t\tthis.setExtensionFooter(undefined);\n\t\tthis.setExtensionHeader(undefined);\n\t\tthis.clearExtensionWidgets();\n\t\tthis.footerDataProvider.clearExtensionStatuses();\n\t\tthis.footer.invalidate();\n\t\tthis.autocompleteProviderWrappers = [];\n\t\tthis.setCustomEditorComponent(undefined);\n\t\tthis.setupAutocompleteProvider();\n\t\tthis.defaultEditor.onExtensionShortcut = undefined;\n\t\tthis.activeToolExecutions.clear();\n\t\tthis.activeToolExecutionTerminalTitle = undefined;\n\t\tthis.workingMessageBeforeActiveTool = undefined;\n\t\tthis.extensionTerminalTitle = undefined;\n\t\tthis.updateTerminalTitle();\n\t\tthis.workingMessage = undefined;\n\t\tthis.workingVisible = true;\n\t\tthis.setWorkingIndicator();\n\t\tthis.updateWorkingIndicatorMessage();\n\t\tthis.setHiddenThinkingLabel();\n\t\tthis.clearToolHookStatuses();\n\t}\n\n\t// Maximum total widget lines to prevent viewport overflow\n\tprivate static readonly MAX_WIDGET_LINES = 10;\n\n\t/**\n\t * Render all extension widgets to the widget container.\n\t */\n\tprivate renderWidgets(): void {\n\t\tif (!this.widgetContainerAbove || !this.widgetContainerBelow) return;\n\t\tthis.renderWidgetContainer(this.widgetContainerAbove, this.extensionWidgetsAbove, true, true);\n\t\tthis.renderWidgetContainer(this.widgetContainerBelow, this.extensionWidgetsBelow, false, false);\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate renderWidgetContainer(\n\t\tcontainer: Container,\n\t\twidgets: Map<string, Component & { dispose?(): void }>,\n\t\tspacerWhenEmpty: boolean,\n\t\tleadingSpacer: boolean,\n\t): void {\n\t\tcontainer.clear();\n\n\t\tif (widgets.size === 0) {\n\t\t\tif (spacerWhenEmpty) {\n\t\t\t\tcontainer.addChild(new Spacer(1));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (leadingSpacer) {\n\t\t\tcontainer.addChild(new Spacer(1));\n\t\t}\n\t\tfor (const component of widgets.values()) {\n\t\t\tcontainer.addChild(component);\n\t\t}\n\t}\n\n\t/**\n\t * Set a custom footer component, or restore the built-in footer.\n\t */\n\tprivate setExtensionFooter(\n\t\tfactory:\n\t\t\t| ((tui: TUI, thm: Theme, footerData: ReadonlyFooterDataProvider) => Component & { dispose?(): void })\n\t\t\t| undefined,\n\t): void {\n\t\t// Dispose existing custom footer\n\t\tif (this.customFooter?.dispose) {\n\t\t\tthis.customFooter.dispose();\n\t\t}\n\n\t\tthis.footerContainer.clear();\n\t\tif (factory) {\n\t\t\t// Create and add custom footer, passing the data provider\n\t\t\tthis.customFooter = factory(this.ui, theme, this.footerDataProvider);\n\t\t\tthis.footerContainer.addChild(this.customFooter);\n\t\t} else {\n\t\t\t// Restore built-in footer\n\t\t\tthis.customFooter = undefined;\n\t\t\tthis.footerContainer.addChild(this.footer);\n\t\t}\n\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Set a custom header component, or restore the built-in header.\n\t */\n\tprivate setExtensionHeader(factory: ((tui: TUI, thm: Theme) => Component & { dispose?(): void }) | undefined): void {\n\t\t// Header may not be initialized yet if called during early initialization\n\t\tif (!this.builtInHeader) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Dispose existing custom header\n\t\tif (this.customHeader?.dispose) {\n\t\t\tthis.customHeader.dispose();\n\t\t}\n\n\t\t// Find the index of the current header in the header container\n\t\tconst currentHeader = this.customHeader || this.builtInHeader;\n\t\tconst index = this.headerContainer.children.indexOf(currentHeader);\n\n\t\tif (factory) {\n\t\t\t// Create and add custom header\n\t\t\tthis.customHeader = factory(this.ui, theme);\n\t\t\tif (isExpandable(this.customHeader)) {\n\t\t\t\tthis.customHeader.setExpanded(this.toolOutputExpanded);\n\t\t\t}\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.headerContainer.children[index] = this.customHeader;\n\t\t\t} else {\n\t\t\t\t// If not found (e.g. builtInHeader was never added), add at the top\n\t\t\t\tthis.headerContainer.children.unshift(this.customHeader);\n\t\t\t}\n\t\t} else {\n\t\t\t// Restore built-in header\n\t\t\tthis.customHeader = undefined;\n\t\t\tif (isExpandable(this.builtInHeader)) {\n\t\t\t\tthis.builtInHeader.setExpanded(this.toolOutputExpanded);\n\t\t\t}\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.headerContainer.children[index] = this.builtInHeader;\n\t\t\t}\n\t\t}\n\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate addExtensionTerminalInputListener(\n\t\thandler: (data: string) => { consume?: boolean; data?: string } | undefined,\n\t): () => void {\n\t\tconst subscription = { handler, unsubscribe: this.ui.addInputListener(handler) };\n\t\tthis.extensionTerminalInputSubscriptions.add(subscription);\n\t\treturn () => {\n\t\t\tsubscription.unsubscribe();\n\t\t\tthis.extensionTerminalInputSubscriptions.delete(subscription);\n\t\t};\n\t}\n\n\tprivate rebindExtensionTerminalInputListeners(): void {\n\t\tfor (const subscription of this.extensionTerminalInputSubscriptions) {\n\t\t\tsubscription.unsubscribe();\n\t\t\tsubscription.unsubscribe = this.ui.addInputListener(subscription.handler);\n\t\t}\n\t}\n\n\tprivate clearExtensionTerminalInputListeners(): void {\n\t\tfor (const subscription of this.extensionTerminalInputSubscriptions) subscription.unsubscribe();\n\t\tthis.extensionTerminalInputSubscriptions.clear();\n\t}\n\n\t/**\n\t * Create the ExtensionUIContext for extensions.\n\t */\n\tprivate createProjectTrustContext(cwd: string): ProjectTrustContext {\n\t\tconst ui = this.createExtensionUIContext();\n\t\treturn {\n\t\t\tcwd,\n\t\t\tmode: \"tui\",\n\t\t\thasUI: true,\n\t\t\tui: {\n\t\t\t\tselect: ui.select,\n\t\t\t\tconfirm: ui.confirm,\n\t\t\t\tinput: ui.input,\n\t\t\t\tnotify: ui.notify,\n\t\t\t},\n\t\t};\n\t}\n\n\tprivate createExtensionUIContext(): ExtensionUIContext {\n\t\treturn {\n\t\t\tselect: (title, options, opts) => this.showExtensionSelector(title, options, opts),\n\t\t\tconfirm: (title, message, opts) => this.showExtensionConfirm(title, message, opts),\n\t\t\tinput: (title, placeholder, opts) => this.showExtensionInput(title, placeholder, opts),\n\t\t\tnotify: (message, type) => this.showExtensionNotify(message, type),\n\t\t\tonTerminalInput: (handler) => this.addExtensionTerminalInputListener(handler),\n\t\t\tsetStatus: (key, text) => this.setExtensionStatus(key, text),\n\t\t\tsetWorkingMessage: (message) => {\n\t\t\t\tthis.workingMessage = message;\n\t\t\t\tthis.updateWorkingIndicatorMessage();\n\t\t\t},\n\t\t\tsetWorkingVisible: (visible) => this.setWorkingVisible(visible),\n\t\t\tsetWorkingIndicator: (options) => this.setWorkingIndicator(options),\n\t\t\tsetHiddenThinkingLabel: (label) => this.setHiddenThinkingLabel(label),\n\t\t\tsetWidget: (\n\t\t\t\tkey: string,\n\t\t\t\tcontent: string[] | ((tui: TUI, thm: Theme) => Component & { dispose?(): void }) | undefined,\n\t\t\t\toptions?: ExtensionWidgetOptions,\n\t\t\t) => this.setExtensionWidget(key, content, options),\n\t\t\tsetFooter: (factory) => this.setExtensionFooter(factory),\n\t\t\tsetHeader: (factory) => this.setExtensionHeader(factory),\n\t\t\tsetTitle: (title) => {\n\t\t\t\tthis.extensionTerminalTitle = title;\n\t\t\t\tthis.applyTerminalTitle();\n\t\t\t},\n\t\t\tcustom: (factory, options) => this.showExtensionCustom(factory, options),\n\t\t\tpasteToEditor: (text) => this.editor.handleInput(`\\x1b[200~${text}\\x1b[201~`),\n\t\t\tsetEditorText: (text) => this.editor.setText(text),\n\t\t\tgetEditorText: () => this.getExpandedEditorText(),\n\t\t\teditor: (title, prefill) => this.showExtensionEditor(title, prefill),\n\t\t\taddAutocompleteProvider: (factory) => {\n\t\t\t\tthis.autocompleteProviderWrappers.push(factory);\n\t\t\t\tthis.setupAutocompleteProvider();\n\t\t\t},\n\t\t\tsetEditorComponent: (factory) => this.setCustomEditorComponent(factory),\n\t\t\tgetEditorComponent: () => this.editorComponentFactory,\n\t\t\tget theme() {\n\t\t\t\treturn theme;\n\t\t\t},\n\t\t\tgetAllThemes: () => getAvailableThemesWithPaths(),\n\t\t\tgetTheme: (name) => getThemeByName(name),\n\t\t\tsetTheme: (themeOrName) => {\n\t\t\t\tif (themeOrName instanceof Theme) {\n\t\t\t\t\treturn this.themeController.setThemeInstance(themeOrName);\n\t\t\t\t}\n\t\t\t\tconst result = this.themeController.setThemeName(themeOrName);\n\t\t\t\tif (result.success) {\n\t\t\t\t\tif (this.settingsManager.getTheme() !== themeOrName) {\n\t\t\t\t\t\tthis.settingsManager.setTheme(themeOrName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tgetToolsExpanded: () => this.toolOutputExpanded,\n\t\t\tsetToolsExpanded: (expanded) => this.setToolsExpanded(expanded),\n\t\t};\n\t}\n\n\t/**\n\t * Show a selector for extensions.\n\t */\n\tprivate showExtensionSelector(\n\t\ttitle: string,\n\t\toptions: string[],\n\t\topts?: ExtensionUIDialogOptions,\n\t): Promise<string | undefined> {\n\t\treturn new Promise((resolve) => {\n\t\t\tif (opts?.signal?.aborted) {\n\t\t\t\tresolve(undefined);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst onAbort = () => {\n\t\t\t\tthis.hideExtensionSelector();\n\t\t\t\tresolve(undefined);\n\t\t\t};\n\t\t\topts?.signal?.addEventListener(\"abort\", onAbort, { once: true });\n\n\t\t\tthis.extensionSelector = new ExtensionSelectorComponent(\n\t\t\t\ttitle,\n\t\t\t\toptions,\n\t\t\t\t(option) => {\n\t\t\t\t\topts?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tthis.hideExtensionSelector();\n\t\t\t\t\tresolve(option);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\topts?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tthis.hideExtensionSelector();\n\t\t\t\t\tresolve(undefined);\n\t\t\t\t},\n\t\t\t\t{ tui: this.ui, timeout: opts?.timeout, onToggleToolsExpanded: () => this.toggleToolOutputExpansion() },\n\t\t\t);\n\n\t\t\tthis.disposeActiveSelector();\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.extensionSelector);\n\t\t\tthis.ui.setFocus(this.extensionSelector);\n\t\t\tthis.ui.requestRender();\n\t\t});\n\t}\n\n\t/**\n\t * Hide the extension selector.\n\t */\n\tprivate hideExtensionSelector(): void {\n\t\tthis.extensionSelector?.dispose();\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(this.editor);\n\t\tthis.extensionSelector = undefined;\n\t\tthis.ui.setFocus(this.editor);\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Show a confirmation dialog for extensions.\n\t */\n\tprivate async showExtensionConfirm(\n\t\ttitle: string,\n\t\tmessage: string,\n\t\topts?: ExtensionUIDialogOptions,\n\t): Promise<boolean> {\n\t\tconst result = await this.showExtensionSelector(`${title}\\n${message}`, [\"Yes\", \"No\"], opts);\n\t\treturn result === \"Yes\";\n\t}\n\n\tprivate async promptForMissingSessionCwd(error: MissingSessionCwdError): Promise<string | undefined> {\n\t\tconst confirmed = await this.showExtensionConfirm(\n\t\t\t\"Session cwd not found\",\n\t\t\tformatMissingSessionCwdPrompt(error.issue),\n\t\t);\n\t\treturn confirmed ? error.issue.fallbackCwd : undefined;\n\t}\n\n\t/**\n\t * Show a text input for extensions.\n\t */\n\tprivate showExtensionInput(\n\t\ttitle: string,\n\t\tplaceholder?: string,\n\t\topts?: ExtensionUIDialogOptions,\n\t): Promise<string | undefined> {\n\t\treturn new Promise((resolve) => {\n\t\t\tif (opts?.signal?.aborted) {\n\t\t\t\tresolve(undefined);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst onAbort = () => {\n\t\t\t\tthis.hideExtensionInput();\n\t\t\t\tresolve(undefined);\n\t\t\t};\n\t\t\topts?.signal?.addEventListener(\"abort\", onAbort, { once: true });\n\n\t\t\tthis.extensionInput = new ExtensionInputComponent(\n\t\t\t\ttitle,\n\t\t\t\tplaceholder,\n\t\t\t\t(value) => {\n\t\t\t\t\topts?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tthis.hideExtensionInput();\n\t\t\t\t\tresolve(value);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\topts?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tthis.hideExtensionInput();\n\t\t\t\t\tresolve(undefined);\n\t\t\t\t},\n\t\t\t\t{ tui: this.ui, timeout: opts?.timeout },\n\t\t\t);\n\n\t\t\tthis.disposeActiveSelector();\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.extensionInput);\n\t\t\tthis.ui.setFocus(this.extensionInput);\n\t\t\tthis.ui.requestRender();\n\t\t});\n\t}\n\n\t/**\n\t * Hide the extension input.\n\t */\n\tprivate hideExtensionInput(): void {\n\t\tthis.extensionInput?.dispose();\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(this.editor);\n\t\tthis.extensionInput = undefined;\n\t\tthis.ui.setFocus(this.editor);\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Show a multi-line editor for extensions (with Ctrl+G support).\n\t */\n\tprivate showExtensionEditor(title: string, prefill?: string): Promise<string | undefined> {\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.extensionEditor = new ExtensionEditorComponent(\n\t\t\t\tthis.ui,\n\t\t\t\tthis.keybindings,\n\t\t\t\ttitle,\n\t\t\t\tprefill,\n\t\t\t\t(value) => {\n\t\t\t\t\tthis.hideExtensionEditor();\n\t\t\t\t\tresolve(value);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tthis.hideExtensionEditor();\n\t\t\t\t\tresolve(undefined);\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tthis.settingsManager.getExternalEditorCommand(),\n\t\t\t);\n\n\t\t\tthis.disposeActiveSelector();\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.extensionEditor);\n\t\t\tthis.ui.setFocus(this.extensionEditor);\n\t\t\tthis.ui.requestRender();\n\t\t});\n\t}\n\n\t/**\n\t * Hide the extension editor.\n\t */\n\tprivate hideExtensionEditor(): void {\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(this.editor);\n\t\tthis.extensionEditor = undefined;\n\t\tthis.ui.setFocus(this.editor);\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Full editor text with paste markers expanded. Prefers the editor's own\n\t * getExpandedText(); falls back to expanding from the paste snapshot when\n\t * only getPasteState() is implemented, then to the raw text (an editor\n\t * with neither capability never had expandable markers).\n\t */\n\tprivate getExpandedEditorText(): string {\n\t\treturn expandEditorSubmission(this.editor, this.editor.getText());\n\t}\n\n\t/**\n\t * Set a custom editor component from an extension.\n\t * Pass undefined to restore the default editor.\n\t */\n\tprivate setCustomEditorComponent(factory: EditorFactory | undefined): void {\n\t\tthis.editorComponentFactory = factory;\n\t\tif (!factory && this.editor === this.defaultEditor) return;\n\n\t\t// Save text from current editor before switching. Paste markers must not\n\t\t// be transferred as raw text alone: the destination editor instance has no\n\t\t// paste registry, so a bare marker would become dead literal text and the\n\t\t// pasted content would be silently lost on submit. When both editors\n\t\t// support the paste-state API, transfer the registry so markers stay\n\t\t// collapsed; otherwise fall back to the expanded text.\n\t\tthis.disposeActiveSelector();\n\t\tthis.editorContainer.clear();\n\n\t\tif (factory) {\n\t\t\t// Create the custom editor with tui, theme, and keybindings\n\t\t\tconst newEditor = factory(\n\t\t\t\tthis.ui,\n\t\t\t\tthis.chrome ? this.chrome.getEditorTheme() : getEditorTheme(),\n\t\t\t\tthis.keybindings,\n\t\t\t);\n\n\t\t\t// Wire up callbacks from the default editor\n\t\t\tnewEditor.onSubmit = (text) => {\n\t\t\t\tthis.defaultEditor.onSubmit?.(expandSubmittedText(newEditor, text));\n\t\t\t};\n\t\t\tnewEditor.onChange = this.defaultEditor.onChange;\n\n\t\t\t// Copy text (and any collapsed paste markers) from previous editor\n\t\t\ttransferEditorContent(this.editor, newEditor);\n\n\t\t\t// Copy appearance settings if supported\n\t\t\tif (newEditor.borderColor !== undefined) {\n\t\t\t\tnewEditor.borderColor = this.defaultEditor.borderColor;\n\t\t\t}\n\t\t\tif (newEditor.setPaddingX !== undefined) {\n\t\t\t\tnewEditor.setPaddingX(this.defaultEditor.getPaddingX());\n\t\t\t}\n\t\t\tif (newEditor.setAutocompleteMaxVisible !== undefined) {\n\t\t\t\tnewEditor.setAutocompleteMaxVisible(this.defaultEditor.getAutocompleteMaxVisible());\n\t\t\t}\n\n\t\t\t// Set autocomplete if supported\n\t\t\tif (newEditor.setAutocompleteProvider && this.autocompleteProvider) {\n\t\t\t\tnewEditor.setAutocompleteProvider(this.autocompleteProvider);\n\t\t\t}\n\n\t\t\t// If extending CustomEditor, copy app-level handlers\n\t\t\t// Use duck typing since instanceof fails across jiti module boundaries\n\t\t\ttype CustomEditorLike = typeof newEditor & {\n\t\t\t\tactionHandlers?: unknown;\n\t\t\t\tonEscape?: () => void;\n\t\t\t\tonCtrlD?: () => void;\n\t\t\t\tonUp?: () => void;\n\t\t\t\tonDown?: () => void;\n\t\t\t\tonPasteImage?: () => void;\n\t\t\t\tonExtensionShortcut?: (data: string) => boolean | undefined;\n\t\t\t};\n\t\t\tconst customEditor: CustomEditorLike = newEditor;\n\t\t\tif (\"actionHandlers\" in customEditor && customEditor.actionHandlers instanceof Map) {\n\t\t\t\tif (!customEditor.onEscape) {\n\t\t\t\t\tcustomEditor.onEscape = () => this.defaultEditor.onEscape?.();\n\t\t\t\t}\n\t\t\t\tif (!customEditor.onCtrlD) {\n\t\t\t\t\tcustomEditor.onCtrlD = () => this.defaultEditor.onCtrlD?.();\n\t\t\t\t}\n\t\t\t\tif (!customEditor.onPasteImage) {\n\t\t\t\t\tcustomEditor.onPasteImage = () => this.defaultEditor.onPasteImage?.();\n\t\t\t\t}\n\t\t\t\tif (!customEditor.onExtensionShortcut) {\n\t\t\t\t\tcustomEditor.onExtensionShortcut = (data: string) => this.defaultEditor.onExtensionShortcut?.(data);\n\t\t\t\t}\n\t\t\t\t// Copy action handlers (clear, suspend, model switching, etc.)\n\t\t\t\tfor (const [action, handler] of this.defaultEditor.actionHandlers) {\n\t\t\t\t\t(customEditor.actionHandlers as Map<string, () => void>).set(action, handler);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.editor = newEditor;\n\t\t} else {\n\t\t\t// Restore default editor with text from custom editor. Skip the\n\t\t\t// transfer when the default editor is already active (e.g.\n\t\t\t// resetExtensionUI() calls this unconditionally): there is no\n\t\t\t// hand-off, and a setText round-trip would be pure churn on the\n\t\t\t// user's draft.\n\t\t\tif (this.editor !== this.defaultEditor) {\n\t\t\t\ttransferEditorContent(this.editor, this.defaultEditor);\n\t\t\t}\n\t\t\tthis.editor = this.defaultEditor;\n\t\t}\n\n\t\tthis.editorContainer.addChild(this.editor as Component);\n\t\tthis.ui.setFocus(this.editor as Component);\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Show a notification for extensions.\n\t */\n\tprivate showExtensionNotify(message: string, type?: \"info\" | \"warning\" | \"error\"): void {\n\t\tif (type === \"error\") {\n\t\t\tthis.showError(message);\n\t\t} else if (type === \"warning\") {\n\t\t\tthis.showWarning(message);\n\t\t} else {\n\t\t\tthis.showStatus(message);\n\t\t}\n\t}\n\n\t/** Show a custom component with keyboard focus. Overlay mode renders on top of existing content. */\n\tprivate async showExtensionCustom<T>(\n\t\tfactory: (\n\t\t\ttui: TUI,\n\t\t\ttheme: Theme,\n\t\t\tkeybindings: KeybindingsManager,\n\t\t\tdone: (result: T) => void,\n\t\t) => (Component & { dispose?(): void }) | Promise<Component & { dispose?(): void }>,\n\t\toptions?: {\n\t\t\toverlay?: boolean;\n\t\t\toverlayOptions?: OverlayOptions | (() => OverlayOptions);\n\t\t\tonHandle?: (handle: OverlayHandle) => void;\n\t\t},\n\t): Promise<T> {\n\t\tconst savedText = this.editor.getText();\n\t\tconst isOverlay = options?.overlay ?? false;\n\n\t\tconst restoreEditor = () => {\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.editor.setText(savedText);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet component: Component & { dispose?(): void };\n\t\t\tlet closed = false;\n\n\t\t\tconst close = (result: T) => {\n\t\t\t\tif (closed) return;\n\t\t\t\tclosed = true;\n\t\t\t\tif (isOverlay) this.ui.hideOverlay();\n\t\t\t\telse restoreEditor();\n\t\t\t\t// Note: both branches above already call requestRender\n\t\t\t\tresolve(result);\n\t\t\t\ttry {\n\t\t\t\t\tcomponent?.dispose?.();\n\t\t\t\t} catch {\n\t\t\t\t\t/* ignore dispose errors */\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tPromise.resolve(factory(this.ui, theme, this.keybindings, close))\n\t\t\t\t.then((c) => {\n\t\t\t\t\tif (closed) return;\n\t\t\t\t\tcomponent = c;\n\t\t\t\t\tif (isOverlay) {\n\t\t\t\t\t\t// Resolve overlay options - can be static or dynamic function\n\t\t\t\t\t\tconst resolveOptions = (): OverlayOptions | undefined => {\n\t\t\t\t\t\t\tif (options?.overlayOptions) {\n\t\t\t\t\t\t\t\tconst opts =\n\t\t\t\t\t\t\t\t\ttypeof options.overlayOptions === \"function\"\n\t\t\t\t\t\t\t\t\t\t? options.overlayOptions()\n\t\t\t\t\t\t\t\t\t\t: options.overlayOptions;\n\t\t\t\t\t\t\t\treturn opts;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Fallback: use component's width property if available\n\t\t\t\t\t\t\tconst w = (component as { width?: number }).width;\n\t\t\t\t\t\t\treturn w ? { width: w } : undefined;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst overlayOptions = resolveOptions();\n\t\t\t\t\t\tconst handle = this.ui.showOverlay(component, overlayOptions);\n\t\t\t\t\t\t// Expose handle to caller for visibility control\n\t\t\t\t\t\toptions?.onHandle?.(handle);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.disposeActiveSelector();\n\t\t\t\t\t\tthis.editorContainer.clear();\n\t\t\t\t\t\tthis.editorContainer.addChild(component);\n\t\t\t\t\t\tthis.ui.setFocus(component);\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\tif (closed) return;\n\t\t\t\t\tif (!isOverlay) restoreEditor();\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Show an extension error in the UI.\n\t */\n\tprivate showExtensionError(error: {\n\t\treadonly extensionPath: string;\n\t\treadonly event?: string;\n\t\treadonly error: string;\n\t\treadonly stack?: string;\n\t}): void {\n\t\tconst errorMsg = formatExtensionErrorHeadline(error);\n\t\tconst errorText = new Text(theme.fg(\"error\", errorMsg), 1, 0);\n\t\tthis.chatContainer.addChild(errorText);\n\t\tif (error.stack) {\n\t\t\t// Show stack trace in dim color, indented\n\t\t\tconst stackLines = error.stack\n\t\t\t\t.split(\"\\n\")\n\t\t\t\t.slice(1) // Skip first line (duplicates error message)\n\t\t\t\t.map((line) => theme.fg(\"dim\", ` ${line.trim()}`))\n\t\t\t\t.join(\"\\n\");\n\t\t\tif (stackLines) {\n\t\t\t\tthis.chatContainer.addChild(new Text(stackLines, 1, 0));\n\t\t\t}\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\t// =========================================================================\n\t// Key Handlers\n\t// =========================================================================\n\n\tprivate setupKeyHandlers(): void {\n\t\t// Set up handlers on defaultEditor - they use this.editor for text access\n\t\t// so they work correctly regardless of which editor is active\n\t\tthis.defaultEditor.onEscape = () => {\n\t\t\tif (this.session.isStreaming || this.session.retryAttempt > 0) {\n\t\t\t\tvoid this.abortAndFireQueuedMessages();\n\t\t\t} else if (this.session.isBashRunning) {\n\t\t\t\tthis.session.abortBash();\n\t\t\t} else if (this.isBashMode) {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tthis.isBashMode = false;\n\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t} else if (!this.editor.getText().trim()) {\n\t\t\t\t// Double-escape with empty editor triggers /tree, /fork, or nothing based on setting\n\t\t\t\tconst action = this.settingsManager.getDoubleEscapeAction();\n\t\t\t\tif (action !== \"none\") {\n\t\t\t\t\tconst now = Date.now();\n\t\t\t\t\tif (now - this.lastEscapeTime < 500) {\n\t\t\t\t\t\tif (action === \"tree\") {\n\t\t\t\t\t\t\tthis.showTreeSelector();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.showUserMessageSelector();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.lastEscapeTime = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.lastEscapeTime = now;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Register app action handlers\n\t\tthis.defaultEditor.onAction(\"app.clear\", () => this.handleCtrlC());\n\t\tthis.defaultEditor.onCtrlD = () => this.handleCtrlD();\n\t\tthis.defaultEditor.onAction(\"app.suspend\", () => this.handleCtrlZ());\n\t\tthis.defaultEditor.onAction(\"app.thinking.cycle\", () => this.cycleThinkingLevel());\n\t\tthis.defaultEditor.onAction(\"app.model.cycleForward\", () => this.cycleModel(\"forward\"));\n\t\tthis.defaultEditor.onAction(\"app.model.cycleBackward\", () => this.cycleModel(\"backward\"));\n\n\t\t// Global debug handler on TUI (works regardless of focus)\n\t\tthis.ui.onDebug = () => this.handleDebugCommand();\n\t\tthis.defaultEditor.onAction(\"app.model.select\", () => this.showModelSelector());\n\t\tthis.defaultEditor.onAction(\"app.history.search\", async () => {\n\t\t\ttry {\n\t\t\t\tawait this.session.prompt(\"/history\");\n\t\t\t} catch (error) {\n\t\t\t\tthis.showError(`Failed to open history search: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\t}\n\t\t});\n\t\tthis.defaultEditor.onAction(\"app.tools.expand\", () => this.toggleToolOutputExpansion());\n\t\tthis.defaultEditor.onAction(\"app.thinking.toggle\", () => this.toggleThinkingBlockVisibility());\n\t\tthis.defaultEditor.onAction(\"app.editor.external\", () => void this.handleOpenExternalEditor());\n\t\tthis.defaultEditor.onAction(\"app.message.copy\", () => void this.handleCopyCommand({ flashConfirmation: true }));\n\t\tthis.defaultEditor.onAction(\"app.message.followUp\", () => this.handleFollowUp());\n\t\tthis.defaultEditor.onAction(\"app.message.dequeue\", () => this.handleDequeue());\n\t\tthis.defaultEditor.onAction(\"app.session.new\", () => this.handleClearCommand());\n\t\tthis.defaultEditor.onAction(\"app.session.tree\", () => this.showTreeSelector());\n\t\tthis.defaultEditor.onAction(\"app.session.fork\", () => this.showUserMessageSelector());\n\t\tthis.defaultEditor.onAction(\"app.session.resume\", () => this.showSessionSelector());\n\n\t\tthis.defaultEditor.onChange = (text: string) => {\n\t\t\tconst wasBashMode = this.isBashMode;\n\t\t\tthis.isBashMode = text.trimStart().startsWith(\"!\");\n\t\t\tif (wasBashMode !== this.isBashMode) {\n\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t}\n\t\t\tthis.updateShortcutOverlay(text);\n\t\t};\n\n\t\t// Handle clipboard paste (triggered on Ctrl+V). Images are attached by path;\n\t\t// otherwise, paste plain text from the system clipboard.\n\t\tthis.defaultEditor.onPasteImage = () => {\n\t\t\tthis.lastInputWasPaste = true;\n\t\t\tvoid this.handleClipboardPaste();\n\t\t};\n\n\t\tconst previousEscapeHandler = this.defaultEditor.onEscape;\n\t\tthis.defaultEditor.onEscape = () => {\n\t\t\tthis.hideShortcutOverlay();\n\t\t\tpreviousEscapeHandler?.();\n\t\t};\n\t}\n\n\tprivate async handleRightClickPaste(): Promise<void> {\n\t\tconst target = this.renderer.getFocusedComponent();\n\t\tconst handleInput = target?.handleInput;\n\t\tif (!target || !handleInput) return;\n\t\ttry {\n\t\t\tconst text = await readClipboardText();\n\t\t\tif (!text || this.renderer.getFocusedComponent() !== target) return;\n\t\t\thandleInput.call(target, `\\x1b[200~${text}\\x1b[201~`);\n\t\t\tthis.ui.requestRender();\n\t\t} catch {\n\t\t\t// Silently ignore clipboard errors (may not have permission, etc.)\n\t\t}\n\t}\n\n\tprivate async handleClipboardPaste(): Promise<void> {\n\t\ttry {\n\t\t\tconst image = await readClipboardImage();\n\t\t\tif (image) {\n\t\t\t\tconst tmpDir = os.tmpdir();\n\t\t\t\tconst ext = extensionForImageMimeType(image.mimeType) ?? \"png\";\n\t\t\t\tconst fileName = `pi-clipboard-${crypto.randomUUID()}.${ext}`;\n\t\t\t\tconst filePath = path.join(tmpDir, fileName);\n\t\t\t\tfs.writeFileSync(filePath, Buffer.from(image.bytes));\n\n\t\t\t\tthis.editor.insertTextAtCursor?.(filePath);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst text = await readClipboardText();\n\t\t\tif (text) {\n\t\t\t\tthis.editor.insertTextAtCursor?.(text);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\tthis.getSessionLogger().warn(\"clipboard_error\", { op: \"paste\", error: message });\n\t\t\tthis.showStatus(`Clipboard paste failed: ${sanitizeTuiErrorMessage(message)}`);\n\t\t}\n\t}\n\n\tprivate getSessionLogger(): SessionLogger {\n\t\tthis.sessionLogger ??= createSessionLogger(this.runtimeHost.services.agentDir);\n\t\treturn this.sessionLogger;\n\t}\n\n\tprivate handleStartupSubmit(text: string): void {\n\t\tthis.editor.setText(text);\n\t\tthis.showStatus(\"Startup is still in progress\");\n\t}\n\n\tprivate setupEditorSubmitHandler(): void {\n\t\tthis.defaultEditor.onSubmit = async (text: string) => {\n\t\t\tthis.hideShortcutOverlay();\n\t\t\tthis.lastEditorText = \"\";\n\t\t\ttext = text.trim();\n\t\t\tif (!text) return;\n\n\t\t\t// Handle commands\n\t\t\tif (text === \"/settings\") {\n\t\t\t\tthis.showSettingsSelector();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/favorite-models\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.showFavoriteModelsSelector();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/scoped-models\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tthis.showScopedModelsSelector();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/model\" || text.startsWith(\"/model \")) {\n\t\t\t\tconst searchTerm = text.startsWith(\"/model \") ? text.slice(7).trim() : undefined;\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleModelCommand(searchTerm);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/export\" || text.startsWith(\"/export \")) {\n\t\t\t\tawait this.handleExportCommand(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/import\" || text.startsWith(\"/import \")) {\n\t\t\t\tawait this.handleImportCommand(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/share\") {\n\t\t\t\tawait this.handleShareCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/copy\") {\n\t\t\t\tawait this.handleCopyCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/name\" || text.startsWith(\"/name \")) {\n\t\t\t\tthis.handleNameCommand(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/session\") {\n\t\t\t\tthis.handleSessionCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/changelog\") {\n\t\t\t\tthis.handleChangelogCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/keybindings\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleKeybindingsCommand();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/hotkeys\") {\n\t\t\t\tthis.handleHotkeysCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/fork\") {\n\t\t\t\tthis.showUserMessageSelector();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/clone\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleCloneCommand();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/tree\") {\n\t\t\t\tthis.showTreeSelector();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/trust\") {\n\t\t\t\tthis.showTrustSelector();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/login\" || text.startsWith(\"/login \")) {\n\t\t\t\tconst providerRef = text.startsWith(\"/login \") ? text.slice(7).trim() : undefined;\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleLoginCommand(providerRef);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/logout\") {\n\t\t\t\tthis.showOAuthSelector(\"logout\");\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/new\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleClearCommand();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/compact\" || text.startsWith(\"/compact \")) {\n\t\t\t\tconst customInstructions = text.startsWith(\"/compact \") ? text.slice(9).trim() : undefined;\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleCompactCommand(customInstructions);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/reload\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleReloadCommand();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/debug\") {\n\t\t\t\tthis.handleDebugCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/arminsayshi\") {\n\t\t\t\tthis.handleArminSaysHi();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/dementedelves\") {\n\t\t\t\tthis.handleDementedDelves();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/resume\") {\n\t\t\t\tthis.showSessionSelector();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/quit\" || text === \"/exit\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.shutdown();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.isExtensionCommand(text)) {\n\t\t\t\tthis.editor.addToHistory?.(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.session.prompt(text);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Handle bash command (! for normal, !! for excluded from context)\n\t\t\tif (text.startsWith(\"!\")) {\n\t\t\t\tconst isExcluded = text.startsWith(\"!!\");\n\t\t\t\tconst command = isExcluded ? text.slice(2).trim() : text.slice(1).trim();\n\t\t\t\tif (command) {\n\t\t\t\t\tif (this.session.isBashRunning) {\n\t\t\t\t\t\tthis.showWarning(\"A bash command is already running. Press Esc to cancel it first.\");\n\t\t\t\t\t\tthis.editor.setText(text);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.editor.addToHistory?.(text);\n\t\t\t\t\tawait this.handleBashCommand(command, isExcluded);\n\t\t\t\t\tthis.isBashMode = false;\n\t\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Queue non-command input during compaction.\n\t\t\t// Extension commands short-circuit at the isExtensionCommand branch above and\n\t\t\t// dispatch immediately inside AgentSession.prompt(), so the only text that\n\t\t\t// reaches this compaction branch is non-command user input, which is queued\n\t\t\t// for delivery after compaction settles.\n\t\t\t//\n\t\t\t// Note: the isExtensionCommand re-check below is already unreachable today\n\t\t\t// (the branch above returns first) and stays harmless after the\n\t\t\t// immediate-dispatch hoist in prompt().\n\t\t\tif (this.session.isCompacting) {\n\t\t\t\tif (this.isExtensionCommand(text)) {\n\t\t\t\t\tthis.editor.addToHistory?.(text);\n\t\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\t\tawait this.session.prompt(text);\n\t\t\t\t} else {\n\t\t\t\t\tthis.queueCompactionMessage(text, \"steer\");\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If streaming, use prompt() with steer behavior.\n\t\t\t// Extension commands are dispatched immediately by AgentSession.prompt()\n\t\t\t// (short-circuited at the isExtensionCommand branch above); the steer\n\t\t\t// behavior here applies only to ordinary text, prompt template expansion,\n\t\t\t// and queueing.\n\t\t\tif (this.session.isStreaming) {\n\t\t\t\tthis.editor.addToHistory?.(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.session.prompt(text, { streamingBehavior: \"steer\" });\n\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Normal message submission\n\t\t\t// First, move any pending bash components to chat\n\t\t\tthis.flushPendingBashComponents();\n\n\t\t\tif (this.onInputCallback) {\n\t\t\t\tthis.onInputCallback(text);\n\t\t\t} else {\n\t\t\t\tthis.pendingUserInputs.push(text);\n\t\t\t}\n\t\t\tthis.editor.addToHistory?.(text);\n\t\t};\n\t}\n\n\tprivate subscribeToAgent(): void {\n\t\tthis.unsubscribe = this.session.subscribe(async (event) => {\n\t\t\tawait this.handleEvent(event);\n\t\t});\n\t}\n\n\tprivate async handleEvent(event: AgentSessionEvent): Promise<void> {\n\t\tif (!this.isInitialized) {\n\t\t\tawait this.init();\n\t\t}\n\n\t\tthis.footer.invalidate();\n\n\t\tswitch (event.type) {\n\t\t\tcase \"agent_start\":\n\t\t\t\tthis.clearPendingTools();\n\t\t\t\tthis.clearActiveToolExecutionStatus();\n\t\t\t\tthis.clearToolHookStatuses();\n\t\t\t\t// Turn boundary: pick a fresh working tip next time the indicator shows.\n\t\t\t\tthis.turnWorkingTip.resetForNewTurn();\n\t\t\t\tif (this.settingsManager.getShowTerminalProgress()) {\n\t\t\t\t\tthis.ui.terminal.setProgress(true);\n\t\t\t\t}\n\t\t\t\t// Restore main escape handler if retry handler is still active\n\t\t\t\t// (retry success event fires later, but we need main handler now)\n\t\t\t\tif (this.retryEscapeHandler) {\n\t\t\t\t\tthis.defaultEditor.onEscape = this.retryEscapeHandler;\n\t\t\t\t\tthis.retryEscapeHandler = undefined;\n\t\t\t\t}\n\t\t\t\tif (this.workingVisible) {\n\t\t\t\t\tthis.showStatusIndicator(\n\t\t\t\t\t\tthis.chrome\n\t\t\t\t\t\t\t? this.chrome.createWorkingIndicator(\n\t\t\t\t\t\t\t\t\tthis.ui,\n\t\t\t\t\t\t\t\t\tthis.workingMessage ?? this.defaultWorkingMessage,\n\t\t\t\t\t\t\t\t\tthis.getWorkingIndicatorOptions(),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t: new WorkingStatusIndicator(\n\t\t\t\t\t\t\t\t\tthis.ui,\n\t\t\t\t\t\t\t\t\tthis.workingMessage ?? this.defaultWorkingMessage,\n\t\t\t\t\t\t\t\t\tthis.getWorkingIndicatorOptions(),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis.clearStatusIndicator();\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\n\t\t\tcase \"queue_update\":\n\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\n\t\t\tcase \"system_prompt_change\":\n\t\t\t\tthis.showStatus(\n\t\t\t\t\tevent.systemPromptName ? `System prompt: ${event.systemPromptName}` : \"System prompt changed\",\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase \"entry_appended\":\n\t\t\t\tif (event.entry.type === \"custom\") {\n\t\t\t\t\tthis.addCustomEntryToChat(event.entry);\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"session_info_changed\":\n\t\t\t\tthis.updateTerminalTitle();\n\t\t\t\tthis.footer.invalidate();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\n\t\t\tcase \"thinking_level_changed\":\n\t\t\t\tthis.footer.invalidate();\n\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t\tbreak;\n\n\t\t\tcase \"high_reasoning_warning\":\n\t\t\t\tthis.showHighReasoningWarning(event);\n\t\t\t\tbreak;\n\n\t\t\tcase \"settings_source_selected\":\n\t\t\t\tthis.showSettingsSourceSelected(event);\n\t\t\t\tbreak;\n\n\t\t\tcase \"message_start\":\n\t\t\t\tif (event.message.role === \"custom\") {\n\t\t\t\t\tthis.addMessageToChat(event.message);\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t} else if (event.message.role === \"user\") {\n\t\t\t\t\tthis.addMessageToChat(event.message);\n\t\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t} else if (event.message.role === \"assistant\") {\n\t\t\t\t\tthis.streamingComponent = new AssistantMessageComponent(\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tthis.hideThinkingBlock,\n\t\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\t\tthis.hiddenThinkingLabel,\n\t\t\t\t\t\tthis.outputPad,\n\t\t\t\t\t\tthis.getMarkdownTransformers(),\n\t\t\t\t\t);\n\t\t\t\t\tthis.streamingComponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\tthis.streamingMessage = event.message;\n\t\t\t\t\tthis.chatContainer.addChild(this.streamingComponent);\n\t\t\t\t\tthis.streamingReveal.begin(this.streamingComponent, this.streamingMessage);\n\t\t\t\t\tthis.requestStreamingRender();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"message_update\":\n\t\t\t\tif (this.streamingComponent && event.message.role === \"assistant\") {\n\t\t\t\t\tthis.streamingMessage = event.message;\n\t\t\t\t\tthis.streamingReveal.setTarget(this.streamingMessage);\n\n\t\t\t\t\tfor (const content of this.streamingMessage.content) {\n\t\t\t\t\t\tif (content.type === \"toolCall\") {\n\t\t\t\t\t\t\tlet component = this.pendingTools.get(content.id);\n\t\t\t\t\t\t\tif (!component) {\n\t\t\t\t\t\t\t\tcomponent = this.createToolExecutionComponent(content.name, content.id, content.arguments);\n\t\t\t\t\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\t\t\t\t\tthis.pendingTools.set(content.id, component);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst partialJson = getStreamingToolCallPartialJson(content);\n\t\t\t\t\t\t\tif (partialJson && this.settingsManager.getSmoothStreaming()) {\n\t\t\t\t\t\t\t\tthis.toolArgsReveal.update(content.id, component, partialJson);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.toolArgsReveal.finish(content.id);\n\t\t\t\t\t\t\t\tcomponent.updateArgs(content.arguments);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"message_end\":\n\t\t\t\tif (event.message.role === \"user\") break;\n\t\t\t\tif (this.streamingComponent && event.message.role === \"assistant\") {\n\t\t\t\t\tthis.streamingMessage = event.message;\n\t\t\t\t\tthis.streamingReveal.stop();\n\t\t\t\t\tfor (const content of this.streamingMessage.content) {\n\t\t\t\t\t\tif (content.type !== \"toolCall\") continue;\n\t\t\t\t\t\tconst component = this.pendingTools.get(content.id);\n\t\t\t\t\t\tif (component && !this.toolArgsReveal.flush(content.id, content.arguments)) {\n\t\t\t\t\t\t\tcomponent.updateArgs(content.arguments);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.toolArgsReveal.flushAll();\n\t\t\t\t\tlet errorMessage: string | undefined;\n\t\t\t\t\tif (this.streamingMessage.stopReason === \"aborted\") {\n\t\t\t\t\t\terrorMessage = abortedErrorLabel(undefined, this.session.retryAttempt);\n\t\t\t\t\t\tthis.streamingMessage.errorMessage = errorMessage;\n\t\t\t\t\t}\n\t\t\t\t\tthis.streamingComponent.updateContent(this.streamingMessage, false);\n\t\t\t\t\tthis.addContinuityNotice(this.streamingMessage);\n\n\t\t\t\t\tif (this.streamingMessage.stopReason === \"aborted\" || this.streamingMessage.stopReason === \"error\") {\n\t\t\t\t\t\tif (!errorMessage) {\n\t\t\t\t\t\t\terrorMessage = this.streamingMessage.errorMessage || \"Error\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (const [, component] of this.pendingTools.entries()) {\n\t\t\t\t\t\t\tcomponent.updateResult({\n\t\t\t\t\t\t\t\tcontent: [{ type: \"text\", text: errorMessage }],\n\t\t\t\t\t\t\t\tisError: true,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.clearPendingTools();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Args are now complete - trigger diff computation for edit tools\n\t\t\t\t\t\tfor (const [, component] of this.pendingTools.entries()) {\n\t\t\t\t\t\t\tcomponent.setArgsComplete();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.maybeShowCacheMissNotice(this.streamingMessage);\n\t\t\t\t\t}\n\t\t\t\t\tthis.streamingComponent = undefined;\n\t\t\t\t\tthis.streamingMessage = undefined;\n\t\t\t\t\tthis.footer.invalidate();\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\n\t\t\tcase \"bash_execution_update\":\n\t\t\t\t// The bash execution callback handles TUI output rendering.\n\t\t\t\tbreak;\n\n\t\t\tcase \"tool_execution_start\": {\n\t\t\t\tthis.handleToolExecutionStart(event);\n\t\t\t\tlet component = this.pendingTools.get(event.toolCallId);\n\t\t\t\tif (!component) {\n\t\t\t\t\tcomponent = this.createToolExecutionComponent(event.toolName, event.toolCallId, event.args);\n\t\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\t\tthis.pendingTools.set(event.toolCallId, component);\n\t\t\t\t}\n\t\t\t\tif (!this.toolArgsReveal.flush(event.toolCallId, event.args)) {\n\t\t\t\t\tcomponent.updateArgs(event.args);\n\t\t\t\t}\n\t\t\t\tcomponent.markExecutionStarted();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"tool_hook_status\":\n\t\t\t\tthis.handleToolHookStatusEvent(event);\n\t\t\t\tbreak;\n\n\t\t\tcase \"tool_execution_update\": {\n\t\t\t\tconst component = this.pendingTools.get(event.toolCallId);\n\t\t\t\tif (component) {\n\t\t\t\t\tif (!this.toolResultReveal.update(event.toolCallId, component, event.partialResult)) {\n\t\t\t\t\t\tcomponent.updateResult({ ...event.partialResult, isError: false }, true);\n\t\t\t\t\t}\n\t\t\t\t\tconst activity = readToolProgress(event.partialResult.details)?.activity;\n\t\t\t\t\tif (activity) {\n\t\t\t\t\t\tconst label = formatActiveToolWorkingLabel(event.toolName, { command: activity });\n\t\t\t\t\t\tthis.activeToolExecutions.set(event.toolCallId, label);\n\t\t\t\t\t\tthis.workingMessage = label;\n\t\t\t\t\t\tthis.activeToolExecutionTerminalTitle = `${APP_TITLE} - ${label}`;\n\t\t\t\t\t\tthis.refreshWorkingLoaderMessage();\n\t\t\t\t\t\tthis.applyTerminalTitle();\n\t\t\t\t\t}\n\t\t\t\t\tthis.requestStreamingRender();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"tool_execution_end\": {\n\t\t\t\tthis.handleToolExecutionEnd(event);\n\t\t\t\tthis.toolArgsReveal.finish(event.toolCallId);\n\t\t\t\tconst component = this.pendingTools.get(event.toolCallId);\n\t\t\t\tif (component) {\n\t\t\t\t\tthis.toolResultReveal.finish(event.toolCallId);\n\t\t\t\t\tcomponent.updateResult({ ...event.result, isError: event.isError });\n\t\t\t\t\tthis.pendingTools.delete(event.toolCallId);\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"agent_end\":\n\t\t\t\tif (this.settingsManager.getShowTerminalProgress()) {\n\t\t\t\t\tthis.ui.terminal.setProgress(false);\n\t\t\t\t}\n\t\t\t\tthis.clearStatusIndicator(\"working\");\n\t\t\t\tthis.clearActiveToolExecutionStatus();\n\t\t\t\tthis.clearToolHookStatuses();\n\t\t\t\tthis.streamingReveal.stop();\n\t\t\t\tthis.toolResultReveal.stop();\n\t\t\t\tif (this.streamingComponent) {\n\t\t\t\t\tthis.chatContainer.removeChild(this.streamingComponent);\n\t\t\t\t\tthis.streamingComponent = undefined;\n\t\t\t\t\tthis.streamingMessage = undefined;\n\t\t\t\t}\n\t\t\t\tthis.clearPendingTools();\n\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\n\t\t\tcase \"agent_settled\":\n\t\t\t\tawait this.checkShutdownRequested();\n\t\t\t\tbreak;\n\n\t\t\tcase \"continuation_error\":\n\t\t\t\tthis.showError(sanitizeTerminalLabel(event.errorMessage));\n\t\t\t\tbreak;\n\n\t\t\tcase \"compaction_start\": {\n\t\t\t\tif (this.settingsManager.getShowTerminalProgress()) {\n\t\t\t\t\tthis.ui.terminal.setProgress(true);\n\t\t\t\t}\n\t\t\t\t// Keep editor active; submissions are queued during compaction.\n\t\t\t\tif (!this.compactionEscapeOverrideActive) {\n\t\t\t\t\tthis.autoCompactionEscapeHandler = this.defaultEditor.onEscape;\n\t\t\t\t\tthis.compactionEscapeOverrideActive = true;\n\t\t\t\t}\n\t\t\t\tthis.defaultEditor.onEscape = () => {\n\t\t\t\t\tthis.session.abortCompaction();\n\t\t\t\t};\n\t\t\t\tconst indicator = new CompactionStatusIndicator(this.ui, event.reason);\n\t\t\t\tthis.activeStatusIndicator?.dispose();\n\t\t\t\tthis.activeStatusIndicator = indicator;\n\t\t\t\tthis.statusContainer.clear();\n\t\t\t\tthis.statusContainer.addChild(indicator);\n\t\t\t\tthis.autoCompactionProgressText = \"\";\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"compaction_progress\": {\n\t\t\t\tif (this.activeStatusIndicator?.kind !== \"compaction\") break;\n\t\t\t\tconst nextText =\n\t\t\t\t\tevent.text !== undefined ? event.text : `${this.autoCompactionProgressText}${event.delta ?? \"\"}`;\n\t\t\t\tif (!nextText) break;\n\t\t\t\tthis.autoCompactionProgressText = nextText;\n\t\t\t\tconst preview = nextText.length > 4_000 ? `...${nextText.slice(nextText.length - 4_000)}` : nextText;\n\t\t\t\tthis.activeStatusIndicator.setProgressText(sanitizeTerminalLabel(preview));\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"compaction_end\": {\n\t\t\t\tif (this.settingsManager.getShowTerminalProgress()) {\n\t\t\t\t\tthis.ui.terminal.setProgress(false);\n\t\t\t\t}\n\t\t\t\tInteractiveMode.restoreCompactionEscapeOverride(this);\n\t\t\t\tthis.clearStatusIndicator(\"compaction\");\n\t\t\t\tthis.autoCompactionProgressText = \"\";\n\t\t\t\tif (event.aborted) {\n\t\t\t\t\t// Prefer the extension-provided reason over the generic \"cancelled\"\n\t\t\t\t\t// label so per-turn-cap / circuit-breaker / provider-error cancels are\n\t\t\t\t\t// no longer indistinguishable from a user-triggered abort.\n\t\t\t\t\tconst cancelMessage = sanitizeTerminalLabel(event.errorMessage ?? \"Compaction cancelled\");\n\t\t\t\t\tif (event.reason === \"manual\") {\n\t\t\t\t\t\tthis.showError(cancelMessage);\n\t\t\t\t\t} else if (event.errorMessage) {\n\t\t\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\t\t\tthis.chatContainer.addChild(new Text(theme.fg(\"error\", cancelMessage), 1, 0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.showStatus(\"Auto-compaction cancelled\");\n\t\t\t\t\t}\n\t\t\t\t} else if (event.result) {\n\t\t\t\t\tthis.chatContainer.clear();\n\t\t\t\t\tthis.rebuildChatFromMessages();\n\t\t\t\t\tthis.addMessageToChat(\n\t\t\t\t\t\tcreateCompactionSummaryMessage(\n\t\t\t\t\t\t\tsanitizeTerminalLabel(event.result.summary),\n\t\t\t\t\t\t\tevent.result.tokensBefore,\n\t\t\t\t\t\t\tnew Date().toISOString(),\n\t\t\t\t\t\t\tevent.result.details,\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t\tthis.footer.invalidate();\n\t\t\t\t} else if (event.errorMessage) {\n\t\t\t\t\tconst errorMessage = sanitizeTerminalLabel(event.errorMessage);\n\t\t\t\t\tif (event.reason === \"manual\") {\n\t\t\t\t\t\tthis.showError(errorMessage);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.chatContainer.addChild(new Text(theme.fg(\"error\", errorMessage), 1, 0));\n\t\t\t\t\t}\n\t\t\t\t} else if (event.accepted === false) {\n\t\t\t\t\t// Exhaustive fallback per plan Section 1: compaction_end must never fall\n\t\t\t\t\t// through silently. Rejection events without an errorMessage still name\n\t\t\t\t\t// the rejectionCause so the user knows /compact did nothing on purpose.\n\t\t\t\t\tconst cause = event.rejectionCause ?? \"unknown\";\n\t\t\t\t\tconst message = `Compaction failed (no result); cause: ${cause}`;\n\t\t\t\t\tif (event.reason === \"manual\") {\n\t\t\t\t\t\tthis.showError(message);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\t\t\tthis.chatContainer.addChild(new Text(theme.fg(\"error\", message), 1, 0));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Every terminal compaction_end resolves the TUI compaction queue.\n\t\t\t\t// Accepted compactions deliver through prompt admission. Retryable\n\t\t\t\t// failures route through the native steer/followUp queues so submitted\n\t\t\t\t// input rides along with the retry instead of being silently parked\n\t\t\t\t// (field bug: messages typed during a failing compaction were held\n\t\t\t\t// forever and lost on session switch). Terminal failures hand the input\n\t\t\t\t// back to the editable composer: retrying delivery against the same\n\t\t\t\t// over-threshold context would just repeat the failure.\n\t\t\t\tconst compactionSucceeded = event.accepted === true || event.result !== undefined;\n\t\t\t\tif (compactionSucceeded) {\n\t\t\t\t\tvoid this.flushCompactionQueue({ willRetry: event.willRetry, deferAdmission: false });\n\t\t\t\t} else if (event.willRetry === true) {\n\t\t\t\t\tconst heldCount = this.compactionQueuedMessages.length;\n\t\t\t\t\tif (heldCount > 0) {\n\t\t\t\t\t\tconst failureCause =\n\t\t\t\t\t\t\tevent.errorMessage ?? event.rejectionCause ?? (event.aborted ? \"aborted\" : \"no-result\");\n\t\t\t\t\t\tthis.getSessionLogger().warn(\"compaction_queue_deferred\", {\n\t\t\t\t\t\t\tcount: heldCount,\n\t\t\t\t\t\t\tcause: failureCause,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.showStatus(\n\t\t\t\t\t\t\t`${heldCount} queued message${heldCount === 1 ? \"\" : \"s\"} will send with the next turn (compaction will retry)`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tvoid this.flushCompactionQueue({ willRetry: true, deferAdmission: true });\n\t\t\t\t} else {\n\t\t\t\t\tconst restoredCount = this.restoreQueuedMessagesToEditor();\n\t\t\t\t\tif (restoredCount > 0) {\n\t\t\t\t\t\tconst failureCause =\n\t\t\t\t\t\t\tevent.errorMessage ?? event.rejectionCause ?? (event.aborted ? \"aborted\" : \"no-result\");\n\t\t\t\t\t\tthis.getSessionLogger().warn(\"compaction_queue_restored\", {\n\t\t\t\t\t\t\trestored: restoredCount,\n\t\t\t\t\t\t\tcause: failureCause,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.showStatus(\n\t\t\t\t\t\t\t`${restoredCount} queued message${restoredCount === 1 ? \"\" : \"s\"} restored to the editor (compaction did not complete)`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"retry_fallback_applied\": {\n\t\t\t\tif (this.pendingZeroDelayRetryIndicator) {\n\t\t\t\t\tthis.pendingZeroDelayRetryIndicator.fallbackApplied = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis.fallbackAppliedBeforeRetryStart = true;\n\t\t\t\t}\n\t\t\t\tthis.showNoticeBox({\n\t\t\t\t\ttitle: `⇄ Model fallback · ${event.from} → ${event.to}`,\n\t\t\t\t\ttone: \"warning\",\n\t\t\t\t\twhy: `Retry switched models (${event.reason}); the turn continues on ${event.to}.`,\n\t\t\t\t});\n\t\t\t\tthis.setExtensionStatus(FALLBACK_STATUS_KEY, `fallback: ${event.to}`);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"retry_fallback_succeeded\":\n\t\t\t\tthis.showNoticeBox({\n\t\t\t\t\ttitle: `✓ Fallback model responded · ${event.model}`,\n\t\t\t\t\ttone: \"success\",\n\t\t\t\t\twhy: \"The fallback chain answered; the session stays on it until the revert policy fires.\",\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"retry_fallback_reverted\":\n\t\t\t\tthis.showNoticeBox({\n\t\t\t\t\ttitle: `⇄ Reverted to ${event.to}`,\n\t\t\t\t\ttone: \"accent\",\n\t\t\t\t\twhy: \"The original model is back after its cooldown lapsed.\",\n\t\t\t\t});\n\t\t\t\tthis.setExtensionStatus(FALLBACK_STATUS_KEY, undefined);\n\t\t\t\tbreak;\n\n\t\t\tcase \"retry_fallback_exhausted\":\n\t\t\t\tthis.showNoticeBox({\n\t\t\t\t\ttitle: `✕ Fallback chain exhausted · ${event.chainKey}`,\n\t\t\t\t\ttone: \"error\",\n\t\t\t\t\twhy: event.lastError,\n\t\t\t\t});\n\t\t\t\tthis.setExtensionStatus(FALLBACK_STATUS_KEY, undefined);\n\t\t\t\tbreak;\n\n\t\t\tcase \"server_fallback_aborted\":\n\t\t\t\tthis.showNoticeBox({\n\t\t\t\t\ttitle: `⚠ Server fallback aborted · ${event.from} → ${event.to}`,\n\t\t\t\t\ttone: \"warning\",\n\t\t\t\t\twhy: event.chainConfigured\n\t\t\t\t\t\t? \"Retrying on your configured fallback chain.\"\n\t\t\t\t\t\t: \"No fallback chain configured — set one with /fallback.\",\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"auto_retry_start\": {\n\t\t\t\t// During retry waits, isStreaming flips false between attempts. The main Esc handler\n\t\t\t\t// keys off both isStreaming and retryAttempt so we keep the same close-out path here;\n\t\t\t\t// no separate retry-only handler is installed (the prior one only called\n\t\t\t\t// session.abortRetry() and left queued steering messages stranded).\n\t\t\t\tthis.retryEscapeHandler = undefined;\n\t\t\t\tconst fallbackApplied = this.fallbackAppliedBeforeRetryStart;\n\t\t\t\tthis.fallbackAppliedBeforeRetryStart = false;\n\t\t\t\tif (event.delayMs === 0) {\n\t\t\t\t\tconst pending = { fallbackApplied };\n\t\t\t\t\tthis.pendingZeroDelayRetryIndicator = pending;\n\t\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\t\tif (this.pendingZeroDelayRetryIndicator !== pending) return;\n\t\t\t\t\t\tthis.pendingZeroDelayRetryIndicator = undefined;\n\t\t\t\t\t\tif (shouldShowRetryIndicator(event.delayMs, pending.fallbackApplied)) {\n\t\t\t\t\t\t\tthis.showRetryStatusIndicator(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.showRetryStatusIndicator(event);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"auto_retry_end\": {\n\t\t\t\tthis.pendingZeroDelayRetryIndicator = undefined;\n\t\t\t\tthis.fallbackAppliedBeforeRetryStart = false;\n\t\t\t\t// Restore escape handler\n\t\t\t\tif (this.retryEscapeHandler) {\n\t\t\t\t\tthis.defaultEditor.onEscape = this.retryEscapeHandler;\n\t\t\t\t\tthis.retryEscapeHandler = undefined;\n\t\t\t\t}\n\t\t\t\tthis.clearStatusIndicator(\"retry\");\n\t\t\t\t// Show error only on final failure (success shows normal response)\n\t\t\t\tif (!event.success) {\n\t\t\t\t\tthis.showError(`Retry failed after ${event.attempt} attempts: ${event.finalError || \"Unknown error\"}`);\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"summarization_retry_scheduled\": {\n\t\t\t\tthis.showError(event.errorMessage);\n\t\t\t\tthis.showStatusIndicator(\n\t\t\t\t\tnew RetryStatusIndicator(this.ui, event.attempt, event.maxAttempts, event.delayMs),\n\t\t\t\t);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"summarization_retry_attempt_start\": {\n\t\t\t\tthis.clearStatusIndicator(\"retry\");\n\t\t\t\tif (event.source === \"branchSummary\") {\n\t\t\t\t\tthis.showStatusIndicator(new BranchSummaryStatusIndicator(this.ui));\n\t\t\t\t} else {\n\t\t\t\t\tthis.showStatusIndicator(new CompactionStatusIndicator(this.ui, event.reason));\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"summarization_retry_finished\": {\n\t\t\t\tthis.clearStatusIndicator(\"retry\");\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"retry_probe_scheduled\": {\n\t\t\t\tconst secondsAway = Math.max(0, Math.round((event.atMs - Date.now()) / 1000));\n\t\t\t\tthis.showStatus(\n\t\t\t\t\t`Probing ${sanitizeTerminalLabel(event.selector)} at +${secondsAway}s (#${event.probeIndex})`,\n\t\t\t\t);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"retry_probe_result\": {\n\t\t\t\tif (event.ok) {\n\t\t\t\t\tthis.showStatus(`Recovered ${sanitizeTerminalLabel(event.selector)} - will restore on next turn`);\n\t\t\t\t} else if (event.errorMessage === \"auth-unavailable\") {\n\t\t\t\t\tthis.showStatus(\n\t\t\t\t\t\t`Probe for ${sanitizeTerminalLabel(event.selector)} skipped - auth unavailable, staying on fallback`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis.showStatus(`Probe for ${sanitizeTerminalLabel(event.selector)} failed - staying on fallback`);\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate showRetryStatusIndicator(event: Extract<AgentSessionEvent, { type: \"auto_retry_start\" }>): void {\n\t\tthis.showStatusIndicator(new RetryStatusIndicator(this.ui, event.attempt, event.maxAttempts, event.delayMs));\n\t\tthis.ui.requestRender();\n\t}\n\n\t/** Extract text content from a user message */\n\tprivate getUserMessageText(message: Message): string {\n\t\tif (message.role !== \"user\") return \"\";\n\t\tconst textBlocks: TextContent[] =\n\t\t\ttypeof message.content === \"string\"\n\t\t\t\t? [{ type: \"text\", text: message.content }]\n\t\t\t\t: message.content.filter((content): content is TextContent => content.type === \"text\");\n\t\treturn textBlocks.map((content) => content.text).join(\"\");\n\t}\n\n\t/** Show a managed-tool status update in the chat. */\n\tprivate showManagedToolStatus(status: ToolStatus): void {\n\t\tif (!this.managedToolStatusStarted) {\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\tthis.managedToolStatusStarted = true;\n\t\t}\n\t\tconst message = status.type === \"warning\" ? `Warning: ${status.message}` : status.message;\n\t\tconst color = status.type === \"warning\" ? \"warning\" : \"dim\";\n\t\tthis.chatContainer.addChild(new Text(theme.fg(color, message), 1, 0));\n\t\tthis.lastStatusSpacer = undefined;\n\t\tthis.lastStatusText = undefined;\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Show a status message in the chat.\n\t *\n\t * If multiple status messages are emitted back-to-back (without anything else being added to the chat),\n\t * we update the previous status line instead of appending new ones to avoid log spam.\n\t */\n\tprivate showStatus(message: string): void {\n\t\tconst children = this.chatContainer.children;\n\t\tconst last = children.length > 0 ? children[children.length - 1] : undefined;\n\t\tconst secondLast = children.length > 1 ? children[children.length - 2] : undefined;\n\n\t\tif (last && secondLast && last === this.lastStatusText && secondLast === this.lastStatusSpacer) {\n\t\t\tthis.lastStatusText.setText(theme.fg(\"dim\", message));\n\t\t\tthis.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\tconst spacer = new Spacer(1);\n\t\tconst text = new Text(theme.fg(\"dim\", message), 1, 0);\n\t\tthis.chatContainer.addChild(spacer);\n\t\tthis.chatContainer.addChild(text);\n\t\tthis.lastStatusSpacer = spacer;\n\t\tthis.lastStatusText = text;\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate addCustomEntryToChat(entry: Extract<SessionEntry, { type: \"custom\" }>): void {\n\t\tconst renderer = this.session.extensionRunner.getEntryRenderer(entry.customType);\n\t\tif (!renderer) {\n\t\t\treturn;\n\t\t}\n\t\tconst component = new CustomEntryComponent(entry, renderer);\n\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\tif (!component.hasContent()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.streamingComponent) {\n\t\t\tconst streamingIndex = this.chatContainer.children.indexOf(this.streamingComponent);\n\t\t\tif (streamingIndex >= 0) {\n\t\t\t\tthis.chatContainer.children.splice(streamingIndex, 0, component);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis.chatContainer.addChild(component);\n\t}\n\n\tprivate addMessageToChat(message: AgentMessage, options?: { populateHistory?: boolean }): void {\n\t\tswitch (message.role) {\n\t\t\tcase \"bashExecution\": {\n\t\t\t\tconst component = new BashExecutionComponent(message.command, this.ui, message.excludeFromContext);\n\t\t\t\tif (message.output) {\n\t\t\t\t\tcomponent.appendOutput(message.output);\n\t\t\t\t}\n\t\t\t\tcomponent.setComplete(\n\t\t\t\t\tmessage.exitCode,\n\t\t\t\t\tmessage.cancelled,\n\t\t\t\t\tmessage.truncated ? ({ truncated: true } as TruncationResult) : undefined,\n\t\t\t\t\tmessage.fullOutputPath,\n\t\t\t\t);\n\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"custom\": {\n\t\t\t\tif (message.display) {\n\t\t\t\t\tconst renderer = this.session.extensionRunner.getMessageRenderer(message.customType);\n\t\t\t\t\tconst component = new CustomMessageComponent(\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t\trenderer,\n\t\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\t\tthis.outputPad,\n\t\t\t\t\t);\n\t\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"compactionSummary\": {\n\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\tconst component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings());\n\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"branchSummary\": {\n\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\tconst component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings());\n\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"user\": {\n\t\t\t\tconst textContent = this.getUserMessageText(message);\n\t\t\t\tif (textContent) {\n\t\t\t\t\tif (this.chatContainer.children.length > 0) {\n\t\t\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\t\t}\n\t\t\t\t\tconst skillBlock = parseSkillBlock(textContent);\n\t\t\t\t\tif (skillBlock) {\n\t\t\t\t\t\t// Render skill block (collapsible)\n\t\t\t\t\t\tconst component = new SkillInvocationMessageComponent(\n\t\t\t\t\t\t\tskillBlock,\n\t\t\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\t\t\t// Render user message separately if present\n\t\t\t\t\t\tif (skillBlock.userMessage) {\n\t\t\t\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\t\t\t\tconst userComponent = new UserMessageComponent(\n\t\t\t\t\t\t\t\tskillBlock.userMessage,\n\t\t\t\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\t\t\t\tthis.outputPad,\n\t\t\t\t\t\t\t\tthis.getMarkdownTransformers(),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tthis.chatContainer.addChild(userComponent);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst userComponent = new UserMessageComponent(\n\t\t\t\t\t\t\ttextContent,\n\t\t\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\t\t\tthis.outputPad,\n\t\t\t\t\t\t\tthis.getMarkdownTransformers(),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.chatContainer.addChild(userComponent);\n\t\t\t\t\t}\n\t\t\t\t\tif (options?.populateHistory) {\n\t\t\t\t\t\tthis.editor.addToHistory?.(textContent);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"assistant\": {\n\t\t\t\tconst assistantComponent = new AssistantMessageComponent(\n\t\t\t\t\tmessage,\n\t\t\t\t\tthis.hideThinkingBlock,\n\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\tthis.hiddenThinkingLabel,\n\t\t\t\t\tthis.outputPad,\n\t\t\t\t\tthis.getMarkdownTransformers(),\n\t\t\t\t);\n\t\t\t\tassistantComponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\tthis.chatContainer.addChild(assistantComponent);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"toolResult\": {\n\t\t\t\t// Tool results are rendered inline with tool calls, handled separately\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tconst exhaustive: never = message;\n\t\t\t\tvoid exhaustive;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate createToolExecutionComponent(toolName: string, toolCallId: string, args: unknown): ToolExecutionComponent {\n\t\tif (this.chrome) {\n\t\t\treturn new ToolExecutionComponent(\n\t\t\t\ttoolName,\n\t\t\t\ttoolCallId,\n\t\t\t\targs,\n\t\t\t\t{\n\t\t\t\t\tshowImages: this.settingsManager.getShowImages(),\n\t\t\t\t\timageWidthCells: this.settingsManager.getImageWidthCells(),\n\t\t\t\t},\n\t\t\t\tthis.getRegisteredToolDefinition(toolName),\n\t\t\t\tthis.ui,\n\t\t\t\tthis.sessionManager.getCwd(),\n\t\t\t\tthis.chrome.toolPresentation,\n\t\t\t);\n\t\t}\n\t\treturn new ToolExecutionComponent(\n\t\t\ttoolName,\n\t\t\ttoolCallId,\n\t\t\targs,\n\t\t\t{\n\t\t\t\tshowImages: this.settingsManager.getShowImages(),\n\t\t\t\timageWidthCells: this.settingsManager.getImageWidthCells(),\n\t\t\t},\n\t\t\tthis.getRegisteredToolDefinition(toolName),\n\t\t\tthis.ui,\n\t\t\tthis.sessionManager.getCwd(),\n\t\t);\n\t}\n\n\tprivate renderSessionItems(\n\t\titems: readonly RenderSessionItem[],\n\t\toptions: { updateFooter?: boolean; populateHistory?: boolean } = {},\n\t): void {\n\t\tthis.clearPendingTools();\n\t\t// The rebuilt transcript re-derives continuity notices from persisted\n\t\t// messages, so the tracker's suppression state must not survive the\n\t\t// rebuild (or a session switch) — otherwise the first disabled notice\n\t\t// would silently disappear from the rebuilt transcript.\n\t\t// Optional-chained: renderSessionItems is exercised by tests with a\n\t\t// minimal `this` that has no tracker instance.\n\t\tthis.continuityNotices?.reset?.();\n\t\tconst renderedPendingTools = new Map<string, ToolExecutionComponent>();\n\t\t// Cache-miss notices are not persisted; re-derive them from the full entry\n\t\t// list and re-inject them after the assistant messages that paid for them.\n\t\tconst cacheMisses = this.settingsManager.getShowCacheMissNotices()\n\t\t\t? collectCacheMisses(this.sessionManager.getEntries(), this.session.modelRuntime)\n\t\t\t: new Map<AssistantMessage, CacheMiss>();\n\n\t\tif (options.updateFooter) {\n\t\t\tthis.footer.invalidate();\n\t\t\tthis.updateEditorBorderColor();\n\t\t}\n\n\t\tfor (const item of items) {\n\t\t\tif (isCustomSessionEntry(item)) {\n\t\t\t\tthis.addCustomEntryToChat(item);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst message = item;\n\t\t\t// Assistant messages need special handling for tool calls\n\t\t\tif (message.role === \"assistant\") {\n\t\t\t\tthis.addMessageToChat(message);\n\t\t\t\t// Render tool call components\n\t\t\t\tfor (const content of message.content) {\n\t\t\t\t\tif (content.type === \"toolCall\") {\n\t\t\t\t\t\tconst component = this.createToolExecutionComponent(content.name, content.id, content.arguments);\n\t\t\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\t\tthis.chatContainer.addChild(component);\n\n\t\t\t\t\t\tif (message.stopReason === \"aborted\" || message.stopReason === \"error\") {\n\t\t\t\t\t\t\tlet errorMessage: string;\n\t\t\t\t\t\t\tif (message.stopReason === \"aborted\") {\n\t\t\t\t\t\t\t\terrorMessage = abortedErrorLabel(message.errorMessage, this.session.retryAttempt);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\terrorMessage = message.errorMessage || \"Error\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcomponent.updateResult({ content: [{ type: \"text\", text: errorMessage }], isError: true });\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trenderedPendingTools.set(content.id, component);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (message.stopReason !== \"aborted\" && message.stopReason !== \"error\") {\n\t\t\t\t\tconst miss = cacheMisses.get(message);\n\t\t\t\t\tif (miss) this.addCacheMissNotice(miss);\n\t\t\t\t}\n\t\t\t\t// Continuity notices are not persisted either; re-inject them while\n\t\t\t\t// rendering persisted assistant messages the same way the live\n\t\t\t\t// streaming path does. Optional-chained for minimal-`this` tests.\n\t\t\t\tthis.addContinuityNotice?.(message);\n\t\t\t} else if (message.role === \"toolResult\") {\n\t\t\t\t// Match tool results to pending tool components\n\t\t\t\tconst component = renderedPendingTools.get(message.toolCallId);\n\t\t\t\tif (component) {\n\t\t\t\t\tcomponent.updateResult(message);\n\t\t\t\t\trenderedPendingTools.delete(message.toolCallId);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// All other messages use standard rendering\n\t\t\t\tthis.addMessageToChat(message, options);\n\t\t\t}\n\t\t}\n\n\t\tfor (const [toolCallId, component] of renderedPendingTools) {\n\t\t\tthis.pendingTools.set(toolCallId, component);\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Render session entries to chat. Used for initial load and rebuild after compaction.\n\t * @param entries Compaction-aware session entries to render\n\t * @param options.updateFooter Update footer state\n\t * @param options.populateHistory Add user messages to editor history\n\t */\n\tprivate renderSessionEntries(\n\t\tentries: SessionEntry[],\n\t\toptions: { updateFooter?: boolean; populateHistory?: boolean } = {},\n\t): void {\n\t\tconst items = entries.flatMap((entry): RenderSessionItem[] => {\n\t\t\tif (entry.type === \"custom\") {\n\t\t\t\treturn [entry];\n\t\t\t}\n\t\t\treturn sessionEntryToContextMessages(entry);\n\t\t});\n\t\tthis.renderSessionItems(items, options);\n\t}\n\n\t/**\n\t * Show a transcript notice when a completed assistant message paid for a\n\t * significant cache miss. Only states observable facts: the miss itself,\n\t * a model switch, or an idle gap past the cache TTL.\n\t */\n\t/** Muted single-line notice for degraded session continuity; healthy turns stay silent. */\n\tprivate addContinuityNotice(message: AssistantMessage): void {\n\t\tconst notice = this.continuityNotices.noticeFor(message);\n\t\tif (!notice) return;\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(notice, 1, 0));\n\t}\n\n\tprivate maybeShowCacheMissNotice(message: AssistantMessage): void {\n\t\tif (!this.settingsManager.getShowCacheMissNotices()) return;\n\n\t\t// Entries don't contain `message` yet: message_end fires before persistence.\n\t\tconst miss = detectCacheMiss(this.sessionManager.getEntries(), message, this.session.modelRuntime);\n\t\tif (miss) this.addCacheMissNotice(miss);\n\t}\n\n\tprivate addCacheMissNotice(miss: CacheMiss): void {\n\t\tif (miss.missedTokens < 20_000 && miss.missedCost < 0.1) return;\n\n\t\tconst cost = miss.missedCost >= 0.01 ? ` (~$${miss.missedCost.toFixed(2)})` : \"\";\n\t\tconst reBilled = `${formatTokens(miss.missedTokens)} tokens re-billed${cost}`;\n\t\tlet label = \"Cache miss\";\n\t\tif (miss.modelChanged) {\n\t\t\tlabel = \"Cache miss after model switch\";\n\t\t} else if (miss.idleMs >= CACHE_TTL_MS) {\n\t\t\tlabel = `Cache miss after ${Math.round(miss.idleMs / 60_000)}m idle`;\n\t\t}\n\t\tconst text = theme.fg(\"warning\", `${label}: ${reBilled}`);\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(text, 1, 0));\n\t}\n\n\trenderInitialMessages(): void {\n\t\tconst entries = this.sessionManager.buildContextEntries();\n\t\tthis.renderSessionEntries(entries, {\n\t\t\tupdateFooter: true,\n\t\t\tpopulateHistory: true,\n\t\t});\n\t\tthis.renderProjectTrustWarningIfNeeded();\n\n\t\t// Show compaction info if session was compacted\n\t\tconst compactionCount = this.sessionManager.countCompactions();\n\t\tif (compactionCount > 0) {\n\t\t\tconst times = compactionCount === 1 ? \"1 time\" : `${compactionCount} times`;\n\t\t\tthis.showStatus(`Session compacted ${times}`);\n\t\t}\n\t}\n\n\tprivate renderProjectTrustWarningIfNeeded(): void {\n\t\tif (this.settingsManager.isProjectTrusted() || !hasTrustRequiringProjectResources(this.sessionManager.getCwd())) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.chatContainer.children.length > 0) {\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t}\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(\n\t\t\t\ttheme.fg(\n\t\t\t\t\t\"warning\",\n\t\t\t\t\t`This project is not trusted. Project ${CONFIG_DIR_NAME} resources and packages are ignored. Use /trust to save a trust decision, then restart pi.`,\n\t\t\t\t),\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t}\n\n\tasync getUserInput(): Promise<string> {\n\t\tconst queuedInput = this.pendingUserInputs.shift();\n\t\tif (queuedInput !== undefined) {\n\t\t\treturn queuedInput;\n\t\t}\n\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.onInputCallback = (text: string) => {\n\t\t\t\tthis.onInputCallback = undefined;\n\t\t\t\tresolve(text);\n\t\t\t};\n\t\t});\n\t}\n\n\tprivate rebuildChatFromMessages(): void {\n\t\tthis.chatContainer.clear();\n\t\tthis.renderSessionEntries(this.sessionManager.buildContextEntries());\n\t}\n\n\t// =========================================================================\n\t// Key handlers\n\t// =========================================================================\n\n\tprivate handleCtrlC(): void {\n\t\tconst now = Date.now();\n\t\tif (now - this.lastSigintTime < 500) {\n\t\t\tvoid this.shutdown();\n\t\t} else {\n\t\t\tthis.clearEditor();\n\t\t\tthis.lastSigintTime = now;\n\t\t}\n\t}\n\n\tprivate handleCtrlD(): void {\n\t\t// Only called when editor is empty (enforced by CustomEditor)\n\t\tvoid this.shutdown();\n\t}\n\n\t/**\n\t * Gracefully shutdown the agent.\n\t * Stops the TUI before emitting shutdown events so extension UI cleanup cannot\n\t * repaint the final frame while the process is exiting.\n\t */\n\tprivate isShuttingDown = false;\n\n\tprivate async shutdown(options?: { fromSignal?: boolean }): Promise<void> {\n\t\tif (this.isShuttingDown) return;\n\t\tthis.isShuttingDown = true;\n\t\t// Keep signal handlers registered until terminal cleanup has completed.\n\t\t// `signal-exit` checks the listener list during the same SIGTERM/SIGHUP\n\t\t// dispatch and re-sends the signal if only its own listeners remain.\n\n\t\tif (options?.fromSignal) {\n\t\t\t// Signal-triggered shutdown (SIGTERM/SIGHUP). Emit extension cleanup\n\t\t\t// (session_shutdown) BEFORE touching the terminal. Extension teardown\n\t\t\t// such as removing sockets does not write to the tty, so it must not be\n\t\t\t// skipped if a later terminal-restore write fails on a dead or stalled\n\t\t\t// terminal. If the terminal is gone, the restore writes below emit EIO,\n\t\t\t// which the stdout/stderr error handler turns into emergencyTerminalExit;\n\t\t\t// the render loop is already idle, so this cannot hot-spin (see #4144).\n\t\t\tawait this.runtimeHost.dispose();\n\t\t\tthis.themeController.disableAutoSync();\n\t\t\tawait this.ui.terminal.drainInput(1000);\n\t\t\tthis.stop();\n\t\t\tprocess.exit(0);\n\t\t}\n\n\t\t// Interactive quit (Ctrl+D, Ctrl+C, /quit, extension shutdown()). Stop the\n\t\t// TUI before emitting shutdown events so extension UI cleanup cannot repaint\n\t\t// the final frame while the process is exiting.\n\t\t// Drain any in-flight Kitty key release events before stopping.\n\t\t// This prevents escape sequences from leaking to the parent shell over slow SSH.\n\t\tthis.themeController.disableAutoSync();\n\t\tawait this.ui.terminal.drainInput(1000);\n\n\t\tthis.stop();\n\t\tawait this.runtimeHost.dispose();\n\n\t\tconst resumeCommand = formatResumeCommand(this.sessionManager);\n\t\tif (resumeCommand) {\n\t\t\tprocess.stdout.write(`${chalk.dim(\"To resume this session:\")} ${resumeCommand}\\n`);\n\t\t}\n\n\t\tprocess.exit(0);\n\t}\n\n\tprivate emergencyTerminalExit(): never {\n\t\tthis.isShuttingDown = true;\n\t\tthis.unregisterSignalHandlers();\n\t\tkillTrackedDetachedChildren();\n\t\t// The terminal is gone. Do not run normal shutdown because TUI and\n\t\t// extension cleanup can write restore sequences and re-trigger EIO.\n\t\tprocess.exit(129);\n\t}\n\n\t/**\n\t * Last-resort handler for uncaught exceptions. The TUI puts stdin into raw\n\t * mode and hides the cursor; without this handler, an uncaught throw from\n\t * anywhere (e.g. an extension's async `ChildProcess.on(\"exit\")` callback)\n\t * tears down the process while leaving the terminal in raw mode with no\n\t * cursor, requiring `stty sane && reset` to recover.\n\t *\n\t * Unlike emergencyTerminalExit, the terminal is still alive here, so we\n\t * call ui.stop() to restore cooked mode, the cursor, and disable bracketed\n\t * paste / Kitty / modifyOtherKeys sequences.\n\t */\n\tprivate uncaughtCrash(error: Error, origin: \"uncaughtException\" | \"unhandledRejection\"): void {\n\t\tif (this.isShuttingDown) {\n\t\t\tprocess.exit(1);\n\t\t}\n\t\tif (isRecoverableInspectorVmImportError(error, origin)) {\n\t\t\tthis.showWarning(INSPECTOR_VM_IMPORT_WARNING);\n\t\t\treturn;\n\t\t}\n\t\tthis.isShuttingDown = true;\n\t\ttry {\n\t\t\tthis.unregisterSignalHandlers();\n\t\t} catch {}\n\t\ttry {\n\t\t\tkillTrackedDetachedChildren();\n\t\t} catch {}\n\t\ttry {\n\t\t\tthis.ui.stop();\n\t\t} catch {}\n\t\trestoreInteractiveStderr();\n\t\tconsole.error(`${APP_NAME} exiting due to uncaughtException:`);\n\t\tconsole.error(error);\n\t\tprocess.exit(1);\n\t}\n\n\t/**\n\t * Check if shutdown was requested and perform shutdown if so.\n\t */\n\tprivate async checkShutdownRequested(): Promise<void> {\n\t\tif (!this.shutdownRequested) return;\n\t\tawait this.shutdown();\n\t}\n\n\tprivate registerSignalHandlers(): void {\n\t\tthis.unregisterSignalHandlers();\n\n\t\tconst signals: NodeJS.Signals[] = [\"SIGTERM\"];\n\t\tif (process.platform !== \"win32\") {\n\t\t\tsignals.push(\"SIGHUP\");\n\t\t}\n\n\t\tfor (const signal of signals) {\n\t\t\tconst handler = () => {\n\t\t\t\t// SIGHUP no longer hard-exits: graceful shutdown emits session_shutdown\n\t\t\t\t// first, then attempts terminal restore. A genuinely dead terminal\n\t\t\t\t// surfaces as an EIO on the restore writes, which the stdout/stderr\n\t\t\t\t// error handler converts into emergencyTerminalExit (see #4144, #5080).\n\t\t\t\tkillTrackedDetachedChildren();\n\t\t\t\tvoid this.shutdown({ fromSignal: true });\n\t\t\t};\n\t\t\tprocess.prependListener(signal, handler);\n\t\t\tthis.signalCleanupHandlers.push(() => process.off(signal, handler));\n\t\t}\n\n\t\tconst terminalErrorHandler = (error: Error) => {\n\t\t\tif (isDeadTerminalError(error)) {\n\t\t\t\tthis.emergencyTerminalExit();\n\t\t\t}\n\t\t\tthrow error;\n\t\t};\n\t\tprocess.stdout.on(\"error\", terminalErrorHandler);\n\t\tprocess.stderr.on(\"error\", terminalErrorHandler);\n\t\tthis.signalCleanupHandlers.push(() => process.stdout.off(\"error\", terminalErrorHandler));\n\t\tthis.signalCleanupHandlers.push(() => process.stderr.off(\"error\", terminalErrorHandler));\n\n\t\t// Restore the terminal before the process dies on any uncaught throw.\n\t\t// Without this, an unhandled exception from extension code (or anywhere\n\t\t// in pi) leaves the terminal in raw mode with no cursor.\n\t\tconst uncaughtExceptionHandler = (error: Error, origin: \"uncaughtException\" | \"unhandledRejection\") =>\n\t\t\tthis.uncaughtCrash(error, origin);\n\t\tprocess.prependListener(\"uncaughtException\", uncaughtExceptionHandler);\n\t\tthis.signalCleanupHandlers.push(() => process.off(\"uncaughtException\", uncaughtExceptionHandler));\n\n\t\t// Surface Inspector rejections that the early bootstrap seam recovered before this\n\t\t// handler (and the TUI warning surface) existed.\n\t\tif (consumeEarlyInspectorVmImportRecoveries() > 0) {\n\t\t\tthis.showWarning(INSPECTOR_VM_IMPORT_WARNING);\n\t\t}\n\t}\n\n\tprivate unregisterSignalHandlers(): void {\n\t\tfor (const cleanup of this.signalCleanupHandlers) {\n\t\t\tcleanup();\n\t\t}\n\t\tthis.signalCleanupHandlers = [];\n\t}\n\n\tprivate handleCtrlZ(): void {\n\t\tif (process.platform === \"win32\") {\n\t\t\tthis.showStatus(\"Suspend to background is not supported on Windows\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Keep the event loop alive while suspended. Without this, stopping the TUI\n\t\t// can leave Node with no ref'ed handles, causing the process to exit on fg\n\t\t// before the SIGCONT handler gets a chance to restore the terminal.\n\t\tconst suspendKeepAlive = setInterval(() => {}, 2 ** 30);\n\n\t\t// Ignore SIGINT while suspended so Ctrl+C in the terminal does not\n\t\t// kill the backgrounded process. The handler is removed on resume.\n\t\tconst ignoreSigint = () => {};\n\t\tprocess.on(\"SIGINT\", ignoreSigint);\n\n\t\t// Set up handler to restore TUI when resumed\n\t\tprocess.once(\"SIGCONT\", () => {\n\t\t\tclearInterval(suspendKeepAlive);\n\t\t\tprocess.removeListener(\"SIGINT\", ignoreSigint);\n\t\t\ttakeOverInteractiveStderr();\n\t\t\tthis.ui.start();\n\t\t\tthis.ui.requestRender(true);\n\t\t});\n\n\t\ttry {\n\t\t\t// Stop the TUI (restore terminal to normal mode)\n\t\t\trestoreInteractiveStderr();\n\t\t\tthis.ui.stop();\n\n\t\t\t// Send SIGTSTP to process group (pid=0 means all processes in group)\n\t\t\tprocess.kill(0, \"SIGTSTP\");\n\t\t} catch (error) {\n\t\t\tclearInterval(suspendKeepAlive);\n\t\t\tprocess.removeListener(\"SIGINT\", ignoreSigint);\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tprivate async handleFollowUp(): Promise<void> {\n\t\tconst text = this.getExpandedEditorText().trim();\n\t\tif (!text) return;\n\n\t\t// Queue non-command input during compaction; dispatch extension commands.\n\t\t// This is the Alt+Enter path (bound directly to app.message.followUp), which\n\t\t// does NOT pass through onSubmit, so the isExtensionCommand check below is the\n\t\t// live dispatch point here: commands go straight to AgentSession.prompt(),\n\t\t// which runs them immediately even while compaction is active, while ordinary\n\t\t// text is queued for delivery after compaction settles.\n\t\tif (this.session.isCompacting) {\n\t\t\tif (this.isExtensionCommand(text)) {\n\t\t\t\tthis.editor.addToHistory?.(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.session.prompt(text);\n\t\t\t} else {\n\t\t\t\tthis.queueCompactionMessage(text, \"followUp\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Alt+Enter queues a follow-up message (waits until agent finishes).\n\t\t// Extension commands never reach this branch: the compaction branch above\n\t\t// dispatches them while compacting, and otherwise prompt() runs them\n\t\t// immediately. The followUp behavior here applies only to ordinary text,\n\t\t// prompt template expansion, and queueing.\n\t\tif (this.session.isStreaming) {\n\t\t\tthis.editor.addToHistory?.(text);\n\t\t\tthis.editor.setText(\"\");\n\t\t\tawait this.session.prompt(text, { streamingBehavior: \"followUp\" });\n\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\tthis.ui.requestRender();\n\t\t}\n\t\t// If not streaming, Alt+Enter acts like regular Enter (trigger onSubmit)\n\t\telse if (this.editor.onSubmit) {\n\t\t\tthis.editor.setText(\"\");\n\t\t\tthis.editor.onSubmit(text);\n\t\t}\n\t}\n\n\tprivate handleDequeue(): void {\n\t\tconst restored = this.restoreQueuedMessagesToEditor();\n\t\tif (restored === 0) {\n\t\t\tthis.showStatus(\"No queued messages to restore\");\n\t\t} else {\n\t\t\tthis.showStatus(`Restored ${restored} queued message${restored > 1 ? \"s\" : \"\"} to editor`);\n\t\t}\n\t}\n\n\tprivate updateEditorBorderColor(): void {\n\t\tif (this.chrome) {\n\t\t\tthis.editor.borderColor = this.chrome.getEditorBorderColor({\n\t\t\t\tisBashMode: this.isBashMode,\n\t\t\t\tthinkingLevel: this.session.thinkingLevel || \"off\",\n\t\t\t});\n\t\t} else if (this.isBashMode) {\n\t\t\tthis.editor.borderColor = theme.getBashModeBorderColor();\n\t\t} else {\n\t\t\tconst level = this.session.thinkingLevel || \"off\";\n\t\t\tthis.editor.borderColor = theme.getThinkingBorderColor(level);\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate cycleThinkingLevel(): void {\n\t\tconst newLevel = this.session.cycleThinkingLevel();\n\t\tif (newLevel === undefined) {\n\t\t\tthis.showStatus(\"Current model does not support thinking\");\n\t\t} else {\n\t\t\tthis.footer.invalidate();\n\t\t\tthis.updateEditorBorderColor();\n\t\t\tthis.showStatus(`Thinking level: ${newLevel}`);\n\t\t}\n\t}\n\n\tprivate async cycleModel(direction: \"forward\" | \"backward\"): Promise<void> {\n\t\ttry {\n\t\t\tconst result = await this.session.cycleModel(direction);\n\t\t\tif (result === undefined) {\n\t\t\t\tconst msg =\n\t\t\t\t\tthis.session.favoriteModels.length > 0\n\t\t\t\t\t\t? buildFavoriteCycleStatusMessage(\"single\")\n\t\t\t\t\t\t: buildFavoriteCycleStatusMessage(\"empty\");\n\t\t\t\tthis.showStatus(msg);\n\t\t\t} else {\n\t\t\t\tthis.footer.invalidate();\n\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t\tconst thinkingStr =\n\t\t\t\t\tresult.model.reasoning && result.thinkingLevel !== \"off\" ? ` (thinking: ${result.thinkingLevel})` : \"\";\n\t\t\t\tconst systemPromptStr = result.systemPromptChange?.systemPromptName\n\t\t\t\t\t? `, optimized system prompt applied: ${result.systemPromptChange.systemPromptName}`\n\t\t\t\t\t: \"\";\n\t\t\t\tthis.showStatus(`Switched to ${result.model.name || result.model.id}${thinkingStr}${systemPromptStr}`);\n\t\t\t\tthis.showRiskyMainModelWarning(result.model);\n\t\t\t\tvoid this.maybeWarnAboutAnthropicSubscriptionAuth(result.model);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\tprivate toggleToolOutputExpansion(): void {\n\t\tthis.setToolsExpanded(!this.toolOutputExpanded);\n\t}\n\n\tprivate setToolsExpanded(expanded: boolean): void {\n\t\tif (expanded === this.toolOutputExpanded) return;\n\n\t\tthis.toolOutputExpanded = expanded;\n\t\tconst activeHeader = this.customHeader ?? this.builtInHeader;\n\t\tif (isExpandable(activeHeader)) {\n\t\t\tactiveHeader.setExpanded(expanded);\n\t\t}\n\t\tfor (const container of [this.loadedResourcesContainer, this.chatContainer]) {\n\t\t\tfor (const child of container.children) {\n\t\t\t\tif (isExpandable(child)) {\n\t\t\t\t\tchild.setExpanded(expanded);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.showStatus(`Tool output: ${expanded ? \"expanded\" : \"collapsed\"}`);\n\t}\n\n\tprivate toggleThinkingBlockVisibility(): void {\n\t\tthis.hideThinkingBlock = !this.hideThinkingBlock;\n\t\tthis.settingsManager.setHideThinkingBlock(this.hideThinkingBlock);\n\n\t\t// Rebuild chat from session messages\n\t\tthis.chatContainer.clear();\n\t\tthis.rebuildChatFromMessages();\n\n\t\t// If streaming, re-add the streaming component with updated visibility and re-render\n\t\tif (this.streamingComponent && this.streamingMessage) {\n\t\t\tthis.streamingComponent.setHideThinkingBlock(this.hideThinkingBlock);\n\t\t\tthis.streamingReveal.resyncVisibility();\n\t\t\tthis.chatContainer.addChild(this.streamingComponent);\n\t\t}\n\n\t\tthis.showStatus(`Thinking blocks: ${this.hideThinkingBlock ? \"hidden\" : \"visible\"}`);\n\t}\n\n\tprivate async handleOpenExternalEditor(): Promise<void> {\n\t\tconst editorCmd = this.settingsManager.getExternalEditorCommand();\n\t\tconst content = this.getExpandedEditorText();\n\t\tthis.ui.stop();\n\t\trestoreInteractiveStderr();\n\t\ttry {\n\t\t\tconst result = await editInExternalEditor({\n\t\t\t\tcommand: editorCmd,\n\t\t\t\tcontent,\n\t\t\t});\n\t\t\tif (result.status === \"complete\") {\n\t\t\t\tthis.editor.setText(result.content);\n\t\t\t}\n\t\t} finally {\n\t\t\ttakeOverInteractiveStderr();\n\t\t\tthis.ui.start();\n\t\t\tthis.ui.requestRender(true);\n\t\t}\n\t}\n\n\t// =========================================================================\n\t// UI helpers\n\t// =========================================================================\n\n\tclearEditor(): void {\n\t\tthis.editor.setText(\"\");\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowError(errorMessage: string): void {\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(theme.fg(\"error\", `Error: ${sanitizeTuiErrorMessage(errorMessage)}`), 1, 0));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowNoticeBox(spec: NoticeSpec): void {\n\t\tconst sanitized: NoticeSpec = {\n\t\t\t...spec,\n\t\t\ttitle: sanitizeTuiErrorMessage(spec.title),\n\t\t\twhy: sanitizeTuiErrorMessage(spec.why),\n\t\t\t...(spec.extra === undefined\n\t\t\t\t? {}\n\t\t\t\t: { extra: spec.extra.map((line) => ({ ...line, text: sanitizeTuiErrorMessage(line.text) })) }),\n\t\t\t...(spec.expandedLine === undefined ? {} : { expandedLine: sanitizeTuiErrorMessage(spec.expandedLine) }),\n\t\t};\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(buildNoticeBox(sanitized, { expanded: this.toolOutputExpanded }, theme));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowWarning(warningMessage: string): void {\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(theme.fg(\"warning\", `Warning: ${warningMessage}`), 1, 0));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowNewVersionNotification(newVersion: string): void {\n\t\tconst action = theme.fg(\"accent\", BRAND?.update?.command ?? `${APP_NAME} update`);\n\t\tconst updateInstruction = theme.fg(\"muted\", `New version ${newVersion} is available. Run `) + action;\n\t\tconst changelogUrl = getReleaseChangelogUrl(newVersion);\n\t\tconst changelogLink = getCapabilities().hyperlinks\n\t\t\t? hyperlink(theme.fg(\"accent\", changelogUrl), changelogUrl)\n\t\t\t: theme.fg(\"accent\", changelogUrl);\n\t\tconst changelogLine = theme.fg(\"muted\", \"Changelog: \") + changelogLink;\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"warning\", text)));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(\n\t\t\t\t`${theme.bold(theme.fg(\"warning\", \"Update Available\"))}\\n${updateInstruction}\\n${changelogLine}`,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"warning\", text)));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowRiskyMainModelWarning(model: Model<any> | undefined): void {\n\t\tif (!model || !isRiskyMainModel(model)) return;\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"error\", text)));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(\n\t\t\t\t`${theme.bold(theme.fg(\"error\", \"Risky model warning\"))}\\n${theme.fg(\"error\", RISKY_MAIN_MODEL_WARNING)}`,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"error\", text)));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowSettingsSourceSelected(event: Extract<AgentSessionEvent, { type: \"settings_source_selected\" }>): void {\n\t\tthis.showStatus(`Settings: ${path.basename(event.path)} (${event.format.toUpperCase()})`);\n\t}\n\n\tshowHighReasoningWarning(event: { modelId: string; provider: string; thinkingLevel: ThinkingLevel }): void {\n\t\tconst { title, body } = buildHighReasoningWarning(\n\t\t\t{ id: event.modelId, provider: event.provider },\n\t\t\tevent.thinkingLevel,\n\t\t);\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"error\", text)));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(\n\t\t\t\t`${theme.bold(theme.fg(\"error\", title))}\\n${body.map((line) => theme.fg(\"error\", line)).join(\"\\n\")}`,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"error\", text)));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowPackageUpdateNotification(packages: string[]): void {\n\t\tconst action = theme.fg(\"accent\", `${APP_NAME} update --extensions`);\n\t\tconst updateInstruction = theme.fg(\"muted\", \"Package updates are available. Run \") + action;\n\t\tconst packageLines = packages.map((pkg) => `- ${pkg}`).join(\"\\n\");\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"warning\", text)));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(\n\t\t\t\t`${theme.bold(theme.fg(\"warning\", \"Package Updates Available\"))}\\n${updateInstruction}\\n${theme.fg(\"muted\", \"Packages:\")}\\n${packageLines}`,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"warning\", text)));\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Get all queued messages (read-only).\n\t * Combines session queue and compaction queue.\n\t */\n\tprivate getAllQueuedMessages(): { steering: string[]; followUp: string[] } {\n\t\treturn {\n\t\t\tsteering: [\n\t\t\t\t...this.session.getSteeringMessages(),\n\t\t\t\t...this.compactionInFlightMessages.filter((msg) => msg.mode === \"steer\").map((msg) => msg.text),\n\t\t\t\t...this.compactionQueuedMessages.filter((msg) => msg.mode === \"steer\").map((msg) => msg.text),\n\t\t\t],\n\t\t\tfollowUp: [\n\t\t\t\t...this.session.getFollowUpMessages(),\n\t\t\t\t...this.compactionInFlightMessages.filter((msg) => msg.mode === \"followUp\").map((msg) => msg.text),\n\t\t\t\t...this.compactionQueuedMessages.filter((msg) => msg.mode === \"followUp\").map((msg) => msg.text),\n\t\t\t],\n\t\t};\n\t}\n\n\t/**\n\t * Clear all queued messages and return their contents.\n\t * Clears both session queue and compaction queue.\n\t */\n\tprivate clearAllQueues(options: { abortWillFollow: boolean } = { abortWillFollow: false }): {\n\t\tsteering: string[];\n\t\tfollowUp: string[];\n\t\tordered: Array<{ text: string; mode: \"steer\" | \"followUp\"; enqueueOrder: number }>;\n\t} {\n\t\tconst clearedNative = this.session.clearQueue(options);\n\t\tconst { steering, followUp } = clearedNative;\n\t\tconst nativeMessages = clearedNative.ordered ?? [\n\t\t\t...steering.map((text, enqueueOrder) => ({ text, mode: \"steer\" as const, enqueueOrder })),\n\t\t\t...followUp.map((text, index) => ({\n\t\t\t\ttext,\n\t\t\t\tmode: \"followUp\" as const,\n\t\t\t\tenqueueOrder: steering.length + index,\n\t\t\t})),\n\t\t];\n\t\tconst compactionMessages = [...this.compactionInFlightMessages, ...this.compactionQueuedMessages];\n\t\tconst compactionSteering = compactionMessages.filter((msg) => msg.mode === \"steer\").map((msg) => msg.text);\n\t\tconst compactionFollowUp = compactionMessages.filter((msg) => msg.mode === \"followUp\").map((msg) => msg.text);\n\t\tfor (const controller of this.compactionTransferAbortControllers.values()) controller.abort();\n\t\tthis.compactionInFlightMessages = [];\n\t\tthis.compactionTransferAbortControllers.clear();\n\t\tthis.compactionQueuedMessages = [];\n\t\tconst fallbackOrder = nativeMessages.reduce((maximum, message) => Math.max(maximum, message.enqueueOrder), 0);\n\t\tconst ordered = [\n\t\t\t...nativeMessages,\n\t\t\t...compactionMessages.map((message, index) => ({\n\t\t\t\t...message,\n\t\t\t\tenqueueOrder: message.enqueueOrder ?? fallbackOrder + index + 1,\n\t\t\t})),\n\t\t].sort((a, b) => a.enqueueOrder - b.enqueueOrder);\n\t\tconst cleared = {\n\t\t\tsteering: [...steering, ...compactionSteering],\n\t\t\tfollowUp: [...followUp, ...compactionFollowUp],\n\t\t} as {\n\t\t\tsteering: string[];\n\t\t\tfollowUp: string[];\n\t\t\tordered: typeof ordered;\n\t\t};\n\t\tObject.defineProperty(cleared, \"ordered\", { value: ordered, enumerable: false });\n\t\treturn cleared;\n\t}\n\n\tprivate updatePendingMessagesDisplay(): void {\n\t\tthis.pendingMessagesContainer.clear();\n\t\tconst { steering: steeringMessages, followUp: followUpMessages } = this.getAllQueuedMessages();\n\t\tif (steeringMessages.length > 0 || followUpMessages.length > 0) {\n\t\t\tthis.pendingMessagesContainer.addChild(new Spacer(1));\n\t\t\tfor (const message of steeringMessages) {\n\t\t\t\tconst text = theme.fg(\"dim\", `Steering: ${message}`);\n\t\t\t\tthis.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));\n\t\t\t}\n\t\t\tfor (const message of followUpMessages) {\n\t\t\t\tconst text = theme.fg(\"dim\", `Follow-up: ${message}`);\n\t\t\t\tthis.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));\n\t\t\t}\n\t\t\tconst dequeueHint = this.getAppKeyDisplay(\"app.message.dequeue\");\n\t\t\tconst hintText = theme.fg(\"dim\", `↳ ${dequeueHint} to edit all queued messages`);\n\t\t\tthis.pendingMessagesContainer.addChild(new TruncatedText(hintText, 1, 0));\n\t\t}\n\t}\n\n\tprivate restoreQueuedMessagesToEditor(options?: { abort?: boolean; currentText?: string }): number {\n\t\tconst { steering, followUp, ordered } = this.clearAllQueues({ abortWillFollow: options?.abort === true });\n\t\tconst allQueued = ordered?.map((message) => message.text) ?? [...steering, ...followUp];\n\t\tif (allQueued.length === 0) {\n\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\tif (options?.abort) {\n\t\t\t\tvoid this.session.abort();\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\t\tconst queuedText = allQueued.join(\"\\n\\n\");\n\t\tconst currentText = options?.currentText ?? this.editor.getText();\n\t\tconst combinedText = [queuedText, currentText].filter((t) => t.trim()).join(\"\\n\\n\");\n\t\tthis.editor.setText(combinedText);\n\t\tthis.updatePendingMessagesDisplay();\n\t\tif (options?.abort) {\n\t\t\tvoid this.session.abort();\n\t\t}\n\t\treturn allQueued.length;\n\t}\n\n\t/**\n\t * User-abort path that drains the queue, aborts the active run (and any in-flight retry),\n\t * waits for settle, then restores queued messages to the editor.\n\t *\n\t * Behavior contract:\n\t * - clearAllQueues() is called synchronously so the pending-messages display empties immediately.\n\t * - `await session.abort()` ensures the previous run is fully idle before touching the draft.\n\t * - The helper never auto-prompts restored queue text; the user decides whether to send it.\n\t */\n\tprivate async abortAndFireQueuedMessages(): Promise<number> {\n\t\tconst { steering, followUp, ordered } = this.clearAllQueues({ abortWillFollow: true });\n\t\tconst allQueued = ordered?.map((message) => message.text) ?? [...steering, ...followUp];\n\t\tthis.updatePendingMessagesDisplay();\n\t\tawait this.session.abort();\n\n\t\tif (allQueued.length === 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst queuedText = allQueued.join(\"\\n\\n\");\n\t\tconst currentText = this.editor.getText();\n\t\tconst combinedText = [queuedText, currentText].filter((t) => t.trim()).join(\"\\n\\n\");\n\t\tthis.editor.setText(combinedText);\n\t\treturn allQueued.length;\n\t}\n\n\tprivate queueCompactionMessage(text: string, mode: \"steer\" | \"followUp\"): void {\n\t\tthis.compactionQueuedMessages.push({ text, mode, enqueueOrder: this.session.reserveQueuedInputOrder() });\n\t\tthis.getSessionLogger().debug(\"compaction_queue_enqueue\", { mode, count: this.compactionQueuedMessages.length });\n\t\tthis.editor.addToHistory?.(text);\n\t\tthis.editor.setText(\"\");\n\t\tthis.updatePendingMessagesDisplay();\n\t\tthis.showStatus(\"Queued message for after compaction\");\n\t}\n\n\tprivate hasRegisteredCommand(command: string): boolean {\n\t\treturn !!this.session.extensionRunner.getCommand(command);\n\t}\n\n\tprivate isExtensionCommand(text: string): boolean {\n\t\tif (!text.startsWith(\"/\")) return false;\n\n\t\tconst extensionRunner = this.session.extensionRunner;\n\n\t\tconst spaceIndex = text.indexOf(\" \");\n\t\tconst commandName = spaceIndex === -1 ? text.slice(1) : text.slice(1, spaceIndex);\n\t\treturn !!extensionRunner.getCommand(commandName);\n\t}\n\n\tprivate async flushCompactionQueue(options?: { willRetry?: boolean; deferAdmission?: boolean }): Promise<void> {\n\t\tconst session = this.session;\n\t\tconst generation = this.compactionQueueGeneration ?? 0;\n\t\tconst previousFlush = this.compactionQueueFlushTail;\n\t\tconst runTransfer = async (): Promise<void> => {\n\t\t\tif ((this.compactionQueueGeneration ?? 0) !== generation || this.session !== session) return;\n\t\t\tawait transferCompactionQueue(\n\t\t\t\t{\n\t\t\t\t\ttakeBatch: () => {\n\t\t\t\t\t\tconst batch = this.compactionQueuedMessages;\n\t\t\t\t\t\tthis.compactionQueuedMessages = [];\n\t\t\t\t\t\tthis.compactionInFlightMessages.push(...batch);\n\t\t\t\t\t\tfor (const message of batch) {\n\t\t\t\t\t\t\tthis.compactionTransferAbortControllers.set(message, new AbortController());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\t\t\treturn batch;\n\t\t\t\t\t},\n\t\t\t\t\tcommitAccepted: (message) => {\n\t\t\t\t\t\tconst index = this.compactionInFlightMessages.indexOf(message);\n\t\t\t\t\t\tif (index === -1) return false;\n\t\t\t\t\t\tthis.compactionInFlightMessages.splice(index, 1);\n\t\t\t\t\t\tthis.compactionTransferAbortControllers.delete(message);\n\t\t\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t},\n\t\t\t\t\trestoreUndelivered: (messages) => {\n\t\t\t\t\t\tconst restorable = messages.filter((message) => this.compactionInFlightMessages.includes(message));\n\t\t\t\t\t\tconst restorableSet = new Set(restorable);\n\t\t\t\t\t\tthis.compactionInFlightMessages = this.compactionInFlightMessages.filter(\n\t\t\t\t\t\t\t(message) => !restorableSet.has(message),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tfor (const message of restorable) this.compactionTransferAbortControllers.delete(message);\n\t\t\t\t\t\tthis.compactionQueuedMessages = [...restorable, ...this.compactionQueuedMessages];\n\t\t\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\t\t\treturn restorable.length;\n\t\t\t\t\t},\n\t\t\t\t\tisCommand: (message) => this.isExtensionCommand(message.text),\n\t\t\t\t\tdeliverCommand: (message) => session.prompt(message.text),\n\t\t\t\t\tdeliverFirstPrompt: (message) =>\n\t\t\t\t\t\twaitForPromptDisposition(\n\t\t\t\t\t\t\t(preflightResult, promptDisposition) =>\n\t\t\t\t\t\t\t\tsession.prompt(message.text, {\n\t\t\t\t\t\t\t\t\tstreamingBehavior: message.mode,\n\t\t\t\t\t\t\t\t\tpreflightResult,\n\t\t\t\t\t\t\t\t\tpromptDisposition,\n\t\t\t\t\t\t\t\t\tsignal: this.compactionTransferAbortControllers.get(message)?.signal,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t(error) => {\n\t\t\t\t\t\t\t\tif ((this.compactionQueueGeneration ?? 0) !== generation || this.session !== session) return;\n\t\t\t\t\t\t\t\tthis.showError(\n\t\t\t\t\t\t\t\t\t`Queued prompt failed after acceptance: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t),\n\t\t\t\t\tdeliverQueued: (message) => {\n\t\t\t\t\t\tif (message.enqueueOrder === undefined) {\n\t\t\t\t\t\t\treturn message.mode === \"followUp\" ? session.followUp(message.text) : session.steer(message.text);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn message.mode === \"followUp\"\n\t\t\t\t\t\t\t? session.followUp(message.text, undefined, { enqueueOrder: message.enqueueOrder })\n\t\t\t\t\t\t\t: session.steer(message.text, undefined, { enqueueOrder: message.enqueueOrder });\n\t\t\t\t\t},\n\t\t\t\t\treportFailure: (error, undeliveredCount) => {\n\t\t\t\t\t\tthis.showError(\n\t\t\t\t\t\t\t`Failed to send queued message${undeliveredCount === 1 ? \"\" : \"s\"}: ${\n\t\t\t\t\t\t\t\terror instanceof Error ? error.message : String(error)\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions,\n\t\t\t);\n\t\t\tthis.updatePendingMessagesDisplay();\n\t\t};\n\t\tconst currentFlush = previousFlush ? previousFlush.then(runTransfer, runTransfer) : runTransfer();\n\t\tconst settledFlush = currentFlush.catch(() => undefined);\n\t\tthis.compactionQueueFlushTail = settledFlush;\n\t\ttry {\n\t\t\tawait currentFlush;\n\t\t} finally {\n\t\t\tif (this.compactionQueueFlushTail === settledFlush) this.compactionQueueFlushTail = undefined;\n\t\t}\n\t}\n\n\t/** Move pending bash components from pending area to chat */\n\tprivate flushPendingBashComponents(): void {\n\t\tfor (const component of this.pendingBashComponents) {\n\t\t\tthis.pendingMessagesContainer.removeChild(component);\n\t\t\tthis.chatContainer.addChild(component);\n\t\t}\n\t\tthis.pendingBashComponents = [];\n\t}\n\n\t// =========================================================================\n\t// Selectors\n\t// =========================================================================\n\n\tprivate disposeActiveSelector(): void {\n\t\tconst dispose = this.activeSelectorDispose;\n\t\tthis.activeSelectorToken = undefined;\n\t\tthis.activeSelectorDispose = undefined;\n\t\tdispose?.();\n\t}\n\n\t/**\n\t * Shows a selector component in place of the editor.\n\t * @param create Factory that receives a `done` callback and returns the component and focus target\n\t */\n\tprivate showSelector(\n\t\tcreate: (done: () => void) => { component: Component; focus: Component; dispose?: () => void },\n\t): void {\n\t\tconst token = {};\n\t\tlet dispose: (() => void) | undefined;\n\t\tconst done = () => {\n\t\t\tdispose?.();\n\t\t\tif (this.activeSelectorToken !== token) return;\n\t\t\tthis.activeSelectorToken = undefined;\n\t\t\tthis.activeSelectorDispose = undefined;\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t};\n\t\tconst created = create(done);\n\t\tdispose = created.dispose;\n\t\tthis.disposeActiveSelector();\n\t\tthis.activeSelectorToken = token;\n\t\tthis.activeSelectorDispose = dispose;\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(created.component);\n\t\tthis.ui.setFocus(created.focus);\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate showSettingsSelector(): void {\n\t\tthis.showSelector((done) => {\n\t\t\tlet selector: SettingsSelectorComponent | undefined;\n\t\t\tselector = new SettingsSelectorComponent(\n\t\t\t\t{\n\t\t\t\t\tautoCompact: this.session.autoCompactionEnabled,\n\t\t\t\t\tshowImages: this.settingsManager.getShowImages(),\n\t\t\t\t\timageWidthCells: this.settingsManager.getImageWidthCells(),\n\t\t\t\t\tautoResizeImages: this.settingsManager.getImageAutoResize(),\n\t\t\t\t\tblockImages: this.settingsManager.getBlockImages(),\n\t\t\t\t\tenableSkillCommands: this.settingsManager.getEnableSkillCommands(),\n\t\t\t\t\tsteeringMode: this.session.steeringMode,\n\t\t\t\t\tfollowUpMode: this.session.followUpMode,\n\t\t\t\t\ttransport: this.settingsManager.getTransport(),\n\t\t\t\t\thttpIdleTimeoutMs: this.settingsManager.getHttpIdleTimeoutMs(),\n\t\t\t\t\tthinkingLevel: this.session.thinkingLevel,\n\t\t\t\t\tavailableThinkingLevels: this.session.getAvailableThinkingLevels(),\n\t\t\t\t\tcurrentTheme: this.themeController.getThemeSelection() || \"dark\",\n\t\t\t\t\tterminalTheme: this.themeController.getTerminalTheme(),\n\t\t\t\t\tavailableThemes: getAvailableThemes(),\n\t\t\t\t\thideThinkingBlock: this.hideThinkingBlock,\n\t\t\t\t\tsmoothStreaming: this.settingsManager.getSmoothStreaming(),\n\t\t\t\t\tsmoothStreamingFps: this.settingsManager.getSmoothStreamingFps(),\n\t\t\t\t\tmermaidRenderingMode: this.settingsManager.getMermaidRenderingMode(),\n\t\t\t\t\tcollapseChangelog: this.settingsManager.getCollapseChangelog(),\n\t\t\t\t\tenableInstallTelemetry: this.settingsManager.getEnableInstallTelemetry(),\n\t\t\t\t\tdoubleEscapeAction: this.settingsManager.getDoubleEscapeAction(),\n\t\t\t\t\ttreeFilterMode: this.settingsManager.getTreeFilterMode(),\n\t\t\t\t\tshowHardwareCursor: this.settingsManager.getShowHardwareCursor(),\n\t\t\t\t\tshowCacheMissNotices: this.settingsManager.getShowCacheMissNotices(),\n\t\t\t\t\tdefaultProjectTrust: this.settingsManager.getDefaultProjectTrust(),\n\t\t\t\t\teditorPaddingX: this.settingsManager.getEditorPaddingX(),\n\t\t\t\t\toutputPad: this.settingsManager.getOutputPad(),\n\t\t\t\t\tautocompleteMaxVisible: this.settingsManager.getAutocompleteMaxVisible(),\n\t\t\t\t\tquietStartup: this.settingsManager.getQuietStartup(),\n\t\t\t\t\tclearOnShrink: this.settingsManager.getClearOnShrink(),\n\t\t\t\t\tshowTerminalProgress: this.settingsManager.getShowTerminalProgress(),\n\t\t\t\t\ttuiMode: this.ui.mode,\n\t\t\t\t\tfullscreenExitOutput: this.settingsManager.getFullscreenExitOutput(),\n\t\t\t\t\tfullscreenScrollbar: this.settingsManager.getFullscreenScrollbar(),\n\t\t\t\t\twarnings: this.settingsManager.getWarnings(),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tonAutoCompactChange: (enabled) => {\n\t\t\t\t\t\tthis.session.setAutoCompactionEnabled(enabled);\n\t\t\t\t\t\tthis.footer.setAutoCompactEnabled(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonShowImagesChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setShowImages(enabled);\n\t\t\t\t\t\tfor (const child of this.chatContainer.children) {\n\t\t\t\t\t\t\tif (child instanceof ToolExecutionComponent) {\n\t\t\t\t\t\t\t\tchild.setShowImages(enabled);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonImageWidthCellsChange: (width) => {\n\t\t\t\t\t\tthis.settingsManager.setImageWidthCells(width);\n\t\t\t\t\t\tfor (const child of this.chatContainer.children) {\n\t\t\t\t\t\t\tif (child instanceof ToolExecutionComponent) {\n\t\t\t\t\t\t\t\tchild.setImageWidthCells(width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonAutoResizeImagesChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setImageAutoResize(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonBlockImagesChange: (blocked) => {\n\t\t\t\t\t\tthis.settingsManager.setBlockImages(blocked);\n\t\t\t\t\t},\n\t\t\t\t\tonEnableSkillCommandsChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setEnableSkillCommands(enabled);\n\t\t\t\t\t\tthis.setupAutocompleteProvider();\n\t\t\t\t\t},\n\t\t\t\t\tonSteeringModeChange: (mode) => {\n\t\t\t\t\t\tthis.session.setSteeringMode(mode);\n\t\t\t\t\t},\n\t\t\t\t\tonFollowUpModeChange: (mode) => {\n\t\t\t\t\t\tthis.session.setFollowUpMode(mode);\n\t\t\t\t\t},\n\t\t\t\t\tonTransportChange: (transport) => {\n\t\t\t\t\t\tthis.settingsManager.setTransport(transport);\n\t\t\t\t\t\tthis.session.agent.transport = transport;\n\t\t\t\t\t},\n\t\t\t\t\tonHttpIdleTimeoutMsChange: (timeoutMs) => {\n\t\t\t\t\t\tthis.settingsManager.setHttpIdleTimeoutMs(timeoutMs);\n\t\t\t\t\t\tconfigureHttpDispatcher(timeoutMs);\n\t\t\t\t\t\tthis.session.agent.timeoutMs = this.settingsManager.getAgentStreamIdleTimeoutMs();\n\t\t\t\t\t\tthis.session.agent.streamStartTimeoutMs = this.settingsManager.getAgentStreamStartTimeoutMs();\n\t\t\t\t\t\tthis.showStatus(`HTTP idle timeout: ${formatHttpIdleTimeoutMs(timeoutMs)}`);\n\t\t\t\t\t},\n\t\t\t\t\tonThinkingLevelChange: (level) => {\n\t\t\t\t\t\tthis.session.setThinkingLevel(level);\n\t\t\t\t\t\tthis.footer.invalidate();\n\t\t\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t\t\t},\n\t\t\t\t\tonThemeChange: (themeSetting) => {\n\t\t\t\t\t\tthis.settingsManager.setTheme(themeSetting);\n\t\t\t\t\t\tvoid this.themeController.setThemeSetting(themeSetting);\n\t\t\t\t\t},\n\t\t\t\t\tonThemePreview: (themeName) => this.themeController.preview(themeName),\n\t\t\t\t\tonHideThinkingBlockChange: (hidden) => {\n\t\t\t\t\t\tthis.hideThinkingBlock = hidden;\n\t\t\t\t\t\tthis.settingsManager.setHideThinkingBlock(hidden);\n\t\t\t\t\t\tfor (const child of this.chatContainer.children) {\n\t\t\t\t\t\t\tif (child instanceof AssistantMessageComponent) {\n\t\t\t\t\t\t\t\tchild.setHideThinkingBlock(hidden);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.chatContainer.clear();\n\t\t\t\t\t\tthis.rebuildChatFromMessages();\n\t\t\t\t\t\tif (this.streamingComponent && this.streamingMessage) {\n\t\t\t\t\t\t\tthis.streamingComponent.setHideThinkingBlock(hidden);\n\t\t\t\t\t\t\tthis.streamingReveal.resyncVisibility();\n\t\t\t\t\t\t\tthis.chatContainer.addChild(this.streamingComponent);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t\tonSmoothStreamingChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setSmoothStreaming(enabled);\n\t\t\t\t\t\tthis.applySmoothStreamingRenderFps();\n\t\t\t\t\t\tthis.toolArgsReveal.refresh();\n\t\t\t\t\t\tthis.toolResultReveal.refresh();\n\t\t\t\t\t\tif (this.streamingMessage) {\n\t\t\t\t\t\t\tthis.streamingReveal.setTarget(this.streamingMessage);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t\tonSmoothStreamingFpsChange: (fps) => {\n\t\t\t\t\t\tthis.settingsManager.setSmoothStreamingFps(fps);\n\t\t\t\t\t\tthis.toolArgsReveal.refresh();\n\t\t\t\t\t\tthis.toolResultReveal.refresh();\n\t\t\t\t\t\tif (this.settingsManager.getSmoothStreaming()) {\n\t\t\t\t\t\t\tthis.applySmoothStreamingRenderFps();\n\t\t\t\t\t\t\tif (this.streamingMessage) {\n\t\t\t\t\t\t\t\tthis.streamingReveal.setTarget(this.streamingMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonMermaidRenderingModeChange: (mode) => {\n\t\t\t\t\t\tthis.settingsManager.setMermaidRenderingMode(mode);\n\t\t\t\t\t\tthis.chatContainer.invalidate();\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t\tonShowCacheMissNoticesChange: (shown) => {\n\t\t\t\t\t\tthis.settingsManager.setShowCacheMissNotices(shown);\n\t\t\t\t\t\tthis.rebuildChatFromMessages();\n\t\t\t\t\t},\n\t\t\t\t\tonCollapseChangelogChange: (collapsed) => {\n\t\t\t\t\t\tthis.settingsManager.setCollapseChangelog(collapsed);\n\t\t\t\t\t},\n\t\t\t\t\tonEnableInstallTelemetryChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setEnableInstallTelemetry(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonQuietStartupChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setQuietStartup(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonDefaultProjectTrustChange: (defaultProjectTrust) => {\n\t\t\t\t\t\tthis.settingsManager.setDefaultProjectTrust(defaultProjectTrust);\n\t\t\t\t\t},\n\t\t\t\t\tonDoubleEscapeActionChange: (action) => {\n\t\t\t\t\t\tthis.settingsManager.setDoubleEscapeAction(action);\n\t\t\t\t\t},\n\t\t\t\t\tonTreeFilterModeChange: (mode) => {\n\t\t\t\t\t\tthis.settingsManager.setTreeFilterMode(mode);\n\t\t\t\t\t},\n\t\t\t\t\tonShowHardwareCursorChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setShowHardwareCursor(enabled);\n\t\t\t\t\t\tthis.ui.setShowHardwareCursor(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonEditorPaddingXChange: (padding) => {\n\t\t\t\t\t\tthis.settingsManager.setEditorPaddingX(padding);\n\t\t\t\t\t\tthis.defaultEditor.setPaddingX(padding);\n\t\t\t\t\t\tif (this.editor !== this.defaultEditor && this.editor.setPaddingX !== undefined) {\n\t\t\t\t\t\t\tthis.editor.setPaddingX(padding);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonOutputPadChange: (padding) => {\n\t\t\t\t\t\tthis.settingsManager.setOutputPad(padding);\n\t\t\t\t\t\tthis.outputPad = padding;\n\t\t\t\t\t\tif (this.streamingComponent || this.session.isStreaming) {\n\t\t\t\t\t\t\tfor (const child of this.chatContainer.children) {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tchild instanceof AssistantMessageComponent ||\n\t\t\t\t\t\t\t\t\tchild instanceof CustomMessageComponent ||\n\t\t\t\t\t\t\t\t\tchild instanceof UserMessageComponent\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tchild.setOutputPad(padding);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (this.streamingComponent) {\n\t\t\t\t\t\t\t\tthis.streamingComponent.setOutputPad(padding);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.rebuildChatFromMessages();\n\t\t\t\t\t},\n\t\t\t\t\tonAutocompleteMaxVisibleChange: (maxVisible) => {\n\t\t\t\t\t\tthis.settingsManager.setAutocompleteMaxVisible(maxVisible);\n\t\t\t\t\t\tthis.defaultEditor.setAutocompleteMaxVisible(maxVisible);\n\t\t\t\t\t\tif (this.editor !== this.defaultEditor && this.editor.setAutocompleteMaxVisible !== undefined) {\n\t\t\t\t\t\t\tthis.editor.setAutocompleteMaxVisible(maxVisible);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonClearOnShrinkChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setClearOnShrink(enabled);\n\t\t\t\t\t\tthis.ui.setClearOnShrink(enabled);\n\t\t\t\t\t\tif (!enabled && !this.activeStatusIndicator) {\n\t\t\t\t\t\t\tthis.statusContainer.clear();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonShowTerminalProgressChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setShowTerminalProgress(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonTuiModeChange: (mode) => {\n\t\t\t\t\t\tif (!this.switchTuiMode(mode)) {\n\t\t\t\t\t\t\tselector?.getSettingsList().updateValue(\"tui-mode\", this.ui.mode);\n\t\t\t\t\t\t\tthis.showStatus(\"Close active overlays before changing TUI mode\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.settingsManager.setTuiMode(mode);\n\t\t\t\t\t\tif (!this.activeStatusIndicator) this.statusContainer.clear();\n\t\t\t\t\t\tthis.showStatus(`TUI mode: ${mode}`);\n\t\t\t\t\t},\n\t\t\t\t\tonFullscreenExitOutputChange: (output) => {\n\t\t\t\t\t\tthis.settingsManager.setFullscreenExitOutput(output);\n\t\t\t\t\t},\n\t\t\t\t\tonFullscreenScrollbarChange: (mode) => {\n\t\t\t\t\t\tthis.settingsManager.setFullscreenScrollbar(mode);\n\t\t\t\t\t\tthis.applyFullscreenScrollbarSetting();\n\t\t\t\t\t},\n\t\t\t\t\tonWarningsChange: (warnings) => {\n\t\t\t\t\t\tthis.settingsManager.setWarnings(warnings);\n\t\t\t\t\t},\n\t\t\t\t\tonCancel: () => {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector.getSettingsList() };\n\t\t});\n\t}\n\n\tprivate async handleModelCommand(searchTerm?: string): Promise<void> {\n\t\tif (!searchTerm) {\n\t\t\tthis.showModelSelector();\n\t\t\treturn;\n\t\t}\n\n\t\tconst model = await this.findExactModelMatch(searchTerm);\n\t\tif (model) {\n\t\t\tawait this.selectModelFromUi(model);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.showModelSelector(searchTerm);\n\t}\n\n\tprivate async findExactModelMatch(searchTerm: string): Promise<Model<any> | undefined> {\n\t\tconst cachedModels =\n\t\t\tthis.session.scopedModels.length > 0\n\t\t\t\t? this.session.scopedModels.map((scoped) => scoped.model)\n\t\t\t\t: [...this.session.modelRuntime.getAvailableSnapshot()];\n\t\tconst cachedMatch = findExactModelReferenceMatch(searchTerm, cachedModels);\n\t\tif (cachedMatch || this.session.scopedModels.length > 0) return cachedMatch;\n\n\t\tthis.showStatus(\"Refreshing model catalogs…\");\n\t\tconst controller = new AbortController();\n\t\tlet timedOut = false;\n\t\tconst timeout = setTimeout(() => {\n\t\t\ttimedOut = true;\n\t\t\tcontroller.abort();\n\t\t}, 15_000);\n\t\ttry {\n\t\t\tconst result = await refreshModelCatalogs(this.session.modelRuntime, controller.signal);\n\t\t\tif (result.aborted && timedOut) {\n\t\t\t\tthis.showWarning(\"Model refresh timed out; searching cached models.\");\n\t\t\t} else if (result.errors.size > 0) {\n\t\t\t\tthis.showWarning(`Could not refresh ${[...result.errors.keys()].join(\", \")}; searching cached models.`);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.showWarning(\n\t\t\t\ttimedOut\n\t\t\t\t\t? \"Model refresh timed out; searching cached models.\"\n\t\t\t\t\t: `Could not refresh model catalogs: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t);\n\t\t} finally {\n\t\t\tclearTimeout(timeout);\n\t\t}\n\t\treturn findExactModelReferenceMatch(searchTerm, [...this.session.modelRuntime.getAvailableSnapshot()]);\n\t}\n\n\tprivate async selectModelFromUi(model: Model<any>, done?: () => void): Promise<void> {\n\t\ttry {\n\t\t\tconst systemPromptChange = await this.session.setModel(model);\n\t\t\tthis.footer.invalidate();\n\t\t\tthis.updateEditorBorderColor();\n\t\t\tdone?.();\n\t\t\tconst systemPromptStr = systemPromptChange?.systemPromptName\n\t\t\t\t? ` (optimized system prompt applied: ${systemPromptChange.systemPromptName})`\n\t\t\t\t: \"\";\n\t\t\tthis.showStatus(`Model: ${model.id}${systemPromptStr}`);\n\t\t\tthis.showRiskyMainModelWarning(model);\n\t\t\tvoid this.maybeWarnAboutAnthropicSubscriptionAuth(model);\n\t\t\tthis.checkDaxnutsEasterEgg(model);\n\t\t} catch (error) {\n\t\t\tdone?.();\n\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\tprivate async resolveFavoriteModelsForUi(\n\t\tpatterns: string[],\n\t\tcandidateModels: readonly Model<any>[],\n\t): Promise<ScopedModel[]> {\n\t\tconst candidateIds = new Set(candidateModels.map(getModelFullId));\n\t\tconst warnings: string[] = [];\n\t\tconst resolvedModels = await resolveModelScope(patterns, this.session.modelRuntime, {\n\t\t\tonWarning: (message) => warnings.push(message),\n\t\t});\n\t\tfor (const warning of warnings) {\n\t\t\tthis.showWarning(warning);\n\t\t}\n\t\treturn resolvedModels.filter((resolved) => candidateIds.has(getModelFullId(resolved.model)));\n\t}\n\n\tprivate async getFavoriteModelIdsForUi(candidateModels: readonly Model<any>[]): Promise<string[] | null> {\n\t\tconst candidateIds = new Set(candidateModels.map(getModelFullId));\n\t\tconst sessionFavoriteIds = this.session.favoriteModels\n\t\t\t.map((favorite) => getModelFullId(favorite.model))\n\t\t\t.filter((id) => candidateIds.has(id));\n\t\tif (sessionFavoriteIds.length > 0) return sessionFavoriteIds;\n\n\t\tconst patterns = this.settingsManager.getFavoriteModels() ?? [];\n\t\tif (patterns.length === 0) return [];\n\n\t\tconst favoriteModels = await this.resolveFavoriteModelsForUi(patterns, candidateModels);\n\t\treturn favoriteModels.map((favorite) => getModelFullId(favorite.model));\n\t}\n\n\tprivate async captureFavoritePatternSnapshot(): Promise<{\n\t\tstoredPatterns: string[];\n\t\tpatternResolutions: PatternResolution[];\n\t}> {\n\t\tconst storedPatterns = this.settingsManager.getFavoriteModels() ?? [];\n\t\tconst { patternResolutions } = await resolveModelScopeWithDiagnostics(storedPatterns, this.session.modelRuntime);\n\t\treturn { storedPatterns, patternResolutions };\n\t}\n\n\tprivate async applyFavoriteSelection(\n\t\tfavoriteIds: FavoriteModelIds,\n\t\tcandidateModels: readonly Model<any>[],\n\t\tpersist: boolean,\n\t\tpatternSnapshot: { storedPatterns: string[]; patternResolutions: PatternResolution[] },\n\t): Promise<void> {\n\t\tconst { storedPatterns, patternResolutions } = patternSnapshot;\n\t\tconst mergedPatterns = mergeFavoritePatternsForPersist({\n\t\t\tstoredPatterns,\n\t\t\tpatternResolutions,\n\t\t\tselectedIds: favoriteIds,\n\t\t\tcandidateIds: candidateModels.map(getModelFullId),\n\t\t});\n\n\t\tconst newFavoriteModels = mergedPatterns\n\t\t\t? await resolveModelScope(mergedPatterns, this.session.modelRuntime)\n\t\t\t: [];\n\t\tthis.session.setFavoriteModels(\n\t\t\tnewFavoriteModels.map((favorite) => ({\n\t\t\t\tmodel: favorite.model,\n\t\t\t\tthinkingLevel: favorite.thinkingLevel,\n\t\t\t\tserviceTier: favorite.serviceTier,\n\t\t\t})),\n\t\t);\n\t\tif (persist) this.settingsManager.setFavoriteModels(mergedPatterns);\n\t\tthis.ui.requestRender();\n\t}\n\n\t/** Update the footer's available provider count from the current snapshot without refreshing catalogs. */\n\tprivate updateAvailableProviderCount(): void {\n\t\tconst models =\n\t\t\tthis.session.scopedModels.length > 0\n\t\t\t\t? this.session.scopedModels.map((scoped) => scoped.model)\n\t\t\t\t: this.session.modelRuntime.getAvailableSnapshot();\n\t\tconst uniqueProviders = new Set(models.map((model) => model.provider));\n\t\tthis.footerDataProvider.setAvailableProviderCount(uniqueProviders.size);\n\t}\n\n\tprivate async maybeWarnAboutAnthropicSubscriptionAuth(\n\t\tmodel: Model<any> | undefined = this.session.model,\n\t): Promise<void> {\n\t\tif (this.settingsManager.getWarnings().anthropicExtraUsage === false) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.anthropicSubscriptionWarningShown) {\n\t\t\treturn;\n\t\t}\n\t\tif (model?.provider !== \"anthropic\") {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tif ((await this.session.modelRuntime.checkAuth(\"anthropic\"))?.type === \"oauth\") {\n\t\t\t\tthis.anthropicSubscriptionWarningShown = true;\n\t\t\t\tthis.showWarning(ANTHROPIC_SUBSCRIPTION_AUTH_WARNING);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst apiKey = (await this.session.modelRuntime.getAuth(model.provider))?.auth.apiKey;\n\t\t\tif (!isAnthropicSubscriptionAuthKey(apiKey)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.anthropicSubscriptionWarningShown = true;\n\t\t\tthis.showWarning(ANTHROPIC_SUBSCRIPTION_AUTH_WARNING);\n\t\t} catch {\n\t\t\t// Ignore auth lookup failures for warning-only checks.\n\t\t}\n\t}\n\n\tprivate maybeSaveImplicitProjectTrustAfterReload(): boolean {\n\t\tconst cwd = this.sessionManager.getCwd();\n\t\tif (this.autoTrustOnReloadCwd !== cwd) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!this.settingsManager.isProjectTrusted() || !hasTrustRequiringProjectResources(cwd)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst trustStore = new ProjectTrustStore(this.runtimeHost.services.agentDir);\n\t\ttry {\n\t\t\tif (trustStore.get(cwd) !== null) {\n\t\t\t\tthis.autoTrustOnReloadCwd = undefined;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttrustStore.set(cwd, true);\n\t\t\tthis.autoTrustOnReloadCwd = undefined;\n\t\t\treturn true;\n\t\t} catch (error) {\n\t\t\tthis.showWarning(\n\t\t\t\t`Could not save project trust after reload: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tprivate showTrustSelector(): void {\n\t\tconst cwd = this.sessionManager.getCwd();\n\t\tconst trustStore = new ProjectTrustStore(this.runtimeHost.services.agentDir);\n\t\tconst savedDecision = trustStore.getEntry(cwd);\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new TrustSelectorComponent({\n\t\t\t\tcwd,\n\t\t\t\tsavedDecision,\n\t\t\t\tprojectTrusted: this.settingsManager.isProjectTrusted(),\n\t\t\t\tonSelect: (selection) => {\n\t\t\t\t\ttrustStore.setMany(selection.updates);\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.showStatus(\n\t\t\t\t\t\t`Saved trust decision: ${selection.trusted ? \"trusted\" : \"untrusted\"}. Restart ${APP_NAME} for this to take effect.`,\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tonCancel: () => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate showModelSelector(initialSearchInput?: string): void {\n\t\tconst favoritePatternSnapshot = this.captureFavoritePatternSnapshot();\n\t\tthis.showSelector((done) => {\n\t\t\tconst favoriteModelIds = this.session.favoriteModels.map((favorite) => getModelFullId(favorite.model));\n\t\t\tconst selector = new ModelSelectorComponent(\n\t\t\t\tthis.ui,\n\t\t\t\tthis.session.model,\n\t\t\t\tthis.settingsManager,\n\t\t\t\tthis.session.modelRuntime,\n\t\t\t\tthis.session.scopedModels,\n\t\t\t\t(model) => {\n\t\t\t\t\tvoid this.selectModelFromUi(model, done);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t\tinitialSearchInput,\n\t\t\t\t{\n\t\t\t\t\tfavoriteModelIds,\n\t\t\t\t\tonFavoriteChange: async (favoriteIds, allModels) => {\n\t\t\t\t\t\tawait this.applyFavoriteSelection(favoriteIds, allModels, true, await favoritePatternSnapshot);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector, dispose: () => selector.dispose() };\n\t\t});\n\t}\n\n\tprivate async showFavoriteModelsSelector(): Promise<void> {\n\t\tconst allModels = [...this.session.modelRuntime.getAvailableSnapshot()];\n\n\t\tif (allModels.length === 0) {\n\t\t\tthis.showStatus(\"No models available\");\n\t\t\treturn;\n\t\t}\n\t\tconst currentFavoriteIds = await this.getFavoriteModelIdsForUi(allModels);\n\t\tconst favoritePatternSnapshot = await this.captureFavoritePatternSnapshot();\n\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new FavoriteModelsSelectorComponent(\n\t\t\t\t{\n\t\t\t\t\tallModels,\n\t\t\t\t\tfavoriteModelIds: currentFavoriteIds,\n\t\t\t\t\tcurrentModel: this.session.model,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tonChange: async (favoriteIds) => {\n\t\t\t\t\t\tawait this.applyFavoriteSelection(favoriteIds, allModels, false, favoritePatternSnapshot);\n\t\t\t\t\t},\n\t\t\t\t\tonPersist: (favoriteIds) => {\n\t\t\t\t\t\tvoid this.applyFavoriteSelection(favoriteIds, allModels, true, favoritePatternSnapshot).then(() => {\n\t\t\t\t\t\t\tthis.showStatus(\"Favorite models saved to settings\");\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t\tonSelect: (model) => {\n\t\t\t\t\t\tvoid this.selectModelFromUi(model, done);\n\t\t\t\t\t},\n\t\t\t\t\tonCancel: () => {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate showScopedModelsSelector(): void {\n\t\tlet availableModels = [...this.session.modelRuntime.getAvailableSnapshot()];\n\t\tlet availableModelIds = new Set(availableModels.map((model) => `${model.provider}/${model.id}`));\n\t\tconst configuredPatterns = this.settingsManager.getEnabledModels();\n\t\tconst sessionScopedModels = this.session.scopedModels;\n\t\tconst configuredEnabledIds = (models: readonly Model<any>[]): string[] | null => {\n\t\t\tif (!configuredPatterns?.length) return null;\n\t\t\tconst resolved = resolveModelScopeFromModels(configuredPatterns, models);\n\t\t\tconst ids = resolved.scopedModels.map((scoped) => `${scoped.model.provider}/${scoped.model.id}`);\n\t\t\tfor (const diagnostic of resolved.diagnostics) {\n\t\t\t\tif (diagnostic.code === \"no-match\" && !ids.includes(diagnostic.pattern)) ids.push(diagnostic.pattern);\n\t\t\t}\n\t\t\treturn ids;\n\t\t};\n\n\t\tlet currentEnabledIds =\n\t\t\tsessionScopedModels.length > 0\n\t\t\t\t? sessionScopedModels.map((scoped) => `${scoped.model.provider}/${scoped.model.id}`)\n\t\t\t\t: configuredEnabledIds(availableModels);\n\t\tlet selectionChanged = false;\n\n\t\tconst updateSessionModels = (enabledIds: string[] | null): void => {\n\t\t\tcurrentEnabledIds = enabledIds === null ? null : [...enabledIds];\n\t\t\tconst hasEnabledAvailableModel = enabledIds?.some((id) => availableModelIds.has(id)) ?? false;\n\t\t\tconst allAvailableModelsEnabled =\n\t\t\t\tenabledIds !== null && [...availableModelIds].every((id) => enabledIds.includes(id));\n\t\t\tif (enabledIds && hasEnabledAvailableModel && !allAvailableModelsEnabled) {\n\t\t\t\tconst newScopedModels = resolveModelScopeFromModels(enabledIds, availableModels).scopedModels;\n\t\t\t\tthis.session.setScopedModels(\n\t\t\t\t\tnewScopedModels.map((scoped) => ({\n\t\t\t\t\t\tmodel: scoped.model,\n\t\t\t\t\t\tthinkingLevel: scoped.thinkingLevel,\n\t\t\t\t\t})),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.session.setScopedModels([]);\n\t\t\t}\n\t\t\tthis.updateAvailableProviderCount();\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\tthis.showSelector((done) => {\n\t\t\tlet disposed = false;\n\t\t\tlet timedOut = false;\n\t\t\tconst controller = new AbortController();\n\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\ttimedOut = true;\n\t\t\t\tcontroller.abort();\n\t\t\t}, 15_000);\n\t\t\tconst selector = new ScopedModelsSelectorComponent(\n\t\t\t\t{\n\t\t\t\t\tallModels: availableModels,\n\t\t\t\t\tenabledModelIds: currentEnabledIds,\n\t\t\t\t\trefreshStatus: \"Refreshing model catalogs…\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tonChange: (enabledIds) => {\n\t\t\t\t\t\tselectionChanged = true;\n\t\t\t\t\t\tupdateSessionModels(enabledIds);\n\t\t\t\t\t},\n\t\t\t\t\tonPersist: (enabledIds) => {\n\t\t\t\t\t\tconst allEnabled =\n\t\t\t\t\t\t\tenabledIds !== null &&\n\t\t\t\t\t\t\tenabledIds.length === availableModels.length &&\n\t\t\t\t\t\t\tenabledIds.every((id) => availableModelIds.has(id));\n\t\t\t\t\t\tconst newPatterns = enabledIds === null || allEnabled ? undefined : enabledIds;\n\t\t\t\t\t\tthis.settingsManager.setEnabledModels(newPatterns ? [...newPatterns] : undefined);\n\t\t\t\t\t\tthis.showStatus(\"Model selection saved to settings\");\n\t\t\t\t\t},\n\t\t\t\t\tonCancel: () => {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\t\t\tvoid refreshModelCatalogs(this.session.modelRuntime, controller.signal)\n\t\t\t\t.then((result) => {\n\t\t\t\t\tif (disposed) return;\n\t\t\t\t\tavailableModels = [...this.session.modelRuntime.getAvailableSnapshot()];\n\t\t\t\t\tavailableModelIds = new Set(availableModels.map((model) => `${model.provider}/${model.id}`));\n\t\t\t\t\tif (!selectionChanged && sessionScopedModels.length === 0) {\n\t\t\t\t\t\tcurrentEnabledIds = configuredEnabledIds(availableModels);\n\t\t\t\t\t\tselector.updateModels(availableModels, currentEnabledIds);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselector.updateModels(availableModels);\n\t\t\t\t\t}\n\t\t\t\t\tif (currentEnabledIds !== null) updateSessionModels(currentEnabledIds);\n\t\t\t\t\tif (result.aborted && timedOut) {\n\t\t\t\t\t\tselector.setRefreshStatus(\"Model refresh timed out; showing cached models.\", \"warning\");\n\t\t\t\t\t} else if (result.errors.size > 0) {\n\t\t\t\t\t\tselector.setRefreshStatus(\n\t\t\t\t\t\t\t`Could not refresh ${[...result.errors.keys()].join(\", \")}; showing cached models.`,\n\t\t\t\t\t\t\t\"warning\",\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselector.setRefreshStatus(\"Model catalogs refreshed.\", \"success\");\n\t\t\t\t\t}\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t})\n\t\t\t\t.catch((error: unknown) => {\n\t\t\t\t\tif (disposed) return;\n\t\t\t\t\tselector.setRefreshStatus(\n\t\t\t\t\t\ttimedOut\n\t\t\t\t\t\t\t? \"Model refresh timed out; showing cached models.\"\n\t\t\t\t\t\t\t: `Could not refresh model catalogs: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t\"warning\",\n\t\t\t\t\t);\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t})\n\t\t\t\t.finally(() => clearTimeout(timeout));\n\t\t\treturn {\n\t\t\t\tcomponent: selector,\n\t\t\t\tfocus: selector,\n\t\t\t\tdispose: () => {\n\t\t\t\t\tdisposed = true;\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tcontroller.abort();\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\t}\n\n\tprivate showUserMessageSelector(): void {\n\t\tconst userMessages = this.session.getUserMessagesForForking();\n\n\t\tif (userMessages.length === 0) {\n\t\t\tthis.showStatus(\"No messages to fork from\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst initialSelectedId = userMessages[userMessages.length - 1]?.entryId;\n\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new UserMessageSelectorComponent(\n\t\t\t\tuserMessages.map((m) => ({ id: m.entryId, text: m.text })),\n\t\t\t\tasync (entryId) => {\n\t\t\t\t\tdone();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = await this.runtimeHost.fork(entryId);\n\t\t\t\t\t\tif (result.cancelled) {\n\t\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.editor.setText(result.selectedText ?? \"\");\n\t\t\t\t\t\tthis.showStatus(\"Forked to new session\");\n\t\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t\tinitialSelectedId,\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector.getMessageList() };\n\t\t});\n\t}\n\n\tprivate async handleCloneCommand(): Promise<void> {\n\t\tconst leafId = this.sessionManager.getLeafId();\n\t\tif (!leafId) {\n\t\t\tthis.showStatus(\"Nothing to clone yet\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst result = await this.runtimeHost.fork(leafId, { position: \"at\" });\n\t\t\tif (result.cancelled) {\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.editor.setText(\"\");\n\t\t\tthis.showStatus(\"Cloned to new session\");\n\t\t} catch (error: unknown) {\n\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\tprivate showTreeSelector(initialSelectedId?: string): void {\n\t\tconst tree = this.sessionManager.getTree();\n\t\tconst realLeafId = this.sessionManager.getLeafId();\n\t\tconst initialFilterMode = this.settingsManager.getTreeFilterMode();\n\n\t\tif (tree.length === 0) {\n\t\t\tthis.showStatus(\"No entries in session\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new TreeSelectorComponent(\n\t\t\t\ttree,\n\t\t\t\trealLeafId,\n\t\t\t\tthis.ui.terminal.rows,\n\t\t\t\tasync (entryId) => {\n\t\t\t\t\t// Selecting the current leaf is a no-op (already there)\n\t\t\t\t\tif (entryId === this.sessionManager.getLeafId()) {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t\tthis.showStatus(\"Already at this point\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Ask about summarization\n\t\t\t\t\tdone(); // Close selector first\n\n\t\t\t\t\t// Loop until user makes a complete choice or cancels to tree\n\t\t\t\t\tlet wantsSummary = false;\n\t\t\t\t\tlet customInstructions: string | undefined;\n\n\t\t\t\t\t// Check if we should skip the prompt (user preference to always default to no summary)\n\t\t\t\t\tif (!this.settingsManager.getBranchSummarySkipPrompt()) {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\tconst summaryChoice = await this.showExtensionSelector(\"Summarize branch?\", [\n\t\t\t\t\t\t\t\t\"No summary\",\n\t\t\t\t\t\t\t\t\"Summarize\",\n\t\t\t\t\t\t\t\t\"Summarize with custom prompt\",\n\t\t\t\t\t\t\t]);\n\n\t\t\t\t\t\t\tif (summaryChoice === undefined) {\n\t\t\t\t\t\t\t\t// User pressed escape - re-show tree selector with same selection\n\t\t\t\t\t\t\t\tthis.showTreeSelector(entryId);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\twantsSummary = summaryChoice !== \"No summary\";\n\n\t\t\t\t\t\t\tif (summaryChoice === \"Summarize with custom prompt\") {\n\t\t\t\t\t\t\t\tcustomInstructions = await this.showExtensionEditor(\"Custom summarization instructions\");\n\t\t\t\t\t\t\t\tif (customInstructions === undefined) {\n\t\t\t\t\t\t\t\t\t// User cancelled - loop back to summary selector\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// User made a complete choice\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// The user committed to navigating: stop the active response first.\n\t\t\t\t\tif (this.session.isStreaming) {\n\t\t\t\t\t\tthis.restoreQueuedMessagesToEditor();\n\t\t\t\t\t\tawait this.session.abort();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set up escape handler and status indicator if summarizing\n\t\t\t\t\tlet showingSummaryIndicator = false;\n\t\t\t\t\tconst originalOnEscape = this.defaultEditor.onEscape;\n\n\t\t\t\t\tif (wantsSummary) {\n\t\t\t\t\t\tthis.defaultEditor.onEscape = () => {\n\t\t\t\t\t\t\tthis.session.abortBranchSummary();\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\t\t\tthis.showStatusIndicator(new BranchSummaryStatusIndicator(this.ui));\n\t\t\t\t\t\tshowingSummaryIndicator = true;\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = await this.session.navigateTree(entryId, {\n\t\t\t\t\t\t\tsummarize: wantsSummary,\n\t\t\t\t\t\t\tcustomInstructions,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (result.aborted) {\n\t\t\t\t\t\t\t// Summarization aborted - re-show tree selector with same selection\n\t\t\t\t\t\t\tthis.showStatus(\"Branch summarization cancelled\");\n\t\t\t\t\t\t\tthis.showTreeSelector(entryId);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (result.cancelled) {\n\t\t\t\t\t\t\tthis.showStatus(\"Navigation cancelled\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Update UI\n\t\t\t\t\t\tthis.chatContainer.clear();\n\t\t\t\t\t\tthis.renderInitialMessages();\n\t\t\t\t\t\tif (result.editorText && !this.editor.getText().trim()) {\n\t\t\t\t\t\t\tthis.editor.setText(result.editorText);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.showStatus(\"Navigated to selected point\");\n\t\t\t\t\t\tvoid this.flushCompactionQueue({ willRetry: false });\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (showingSummaryIndicator) {\n\t\t\t\t\t\t\tthis.clearStatusIndicator(\"branchSummary\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.defaultEditor.onEscape = originalOnEscape;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t\t(entryId, label) => {\n\t\t\t\t\tthis.sessionManager.appendLabelChange(entryId, label);\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t\tinitialSelectedId,\n\t\t\t\tinitialFilterMode,\n\t\t\t);\n\t\t\tselector.onCopy = async (text) => {\n\t\t\t\tif (!text) {\n\t\t\t\t\tthis.showError(\"Selected entry has no text to copy\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tawait copyToClipboard(text);\n\t\t\t\t\tthis.showStatus(\"Copied selected message to clipboard\");\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate showSessionSelector(): void {\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new SessionSelectorComponent(\n\t\t\t\t(onProgress) =>\n\t\t\t\t\tSessionManager.list(this.sessionManager.getCwd(), this.sessionManager.getSessionDir(), onProgress),\n\t\t\t\t(onProgress) =>\n\t\t\t\t\tthis.sessionManager.usesDefaultSessionDir()\n\t\t\t\t\t\t? SessionManager.listAll(onProgress)\n\t\t\t\t\t\t: SessionManager.listAll(this.sessionManager.getSessionDir(), onProgress),\n\t\t\t\tasync (sessionPath) => {\n\t\t\t\t\tdone();\n\t\t\t\t\tawait this.handleResumeSession(sessionPath);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tvoid this.shutdown();\n\t\t\t\t},\n\t\t\t\t() => this.ui.requestRender(),\n\t\t\t\t{\n\t\t\t\t\trenameSession: async (sessionFilePath: string, nextName: string | undefined) => {\n\t\t\t\t\t\tconst next = (nextName ?? \"\").trim();\n\t\t\t\t\t\tif (!next) return;\n\t\t\t\t\t\tconst mgr = SessionManager.open(sessionFilePath);\n\t\t\t\t\t\tmgr.appendSessionInfo(next);\n\t\t\t\t\t},\n\t\t\t\t\tshowRenameHint: true,\n\t\t\t\t\tkeybindings: this.keybindings,\n\t\t\t\t},\n\n\t\t\t\tthis.sessionManager.getSessionFile(),\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate async handleResumeSession(\n\t\tsessionPath: string,\n\t\toptions?: Parameters<ExtensionCommandContext[\"switchSession\"]>[1],\n\t): Promise<{ cancelled: boolean }> {\n\t\tthis.clearStatusIndicator();\n\t\ttry {\n\t\t\tconst result = await this.runtimeHost.switchSession(sessionPath, {\n\t\t\t\twithSession: options?.withSession,\n\t\t\t\tprojectTrustContextFactory: (cwd) => this.createProjectTrustContext(cwd),\n\t\t\t});\n\t\t\tif (result.cancelled) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tthis.showStatus(\"Resumed session\");\n\t\t\treturn result;\n\t\t} catch (error: unknown) {\n\t\t\tif (error instanceof MissingSessionCwdError) {\n\t\t\t\tconst selectedCwd = await this.promptForMissingSessionCwd(error);\n\t\t\t\tif (!selectedCwd) {\n\t\t\t\t\tthis.showStatus(\"Resume cancelled\");\n\t\t\t\t\treturn { cancelled: true };\n\t\t\t\t}\n\t\t\t\tconst result = await this.runtimeHost.switchSession(sessionPath, {\n\t\t\t\t\tcwdOverride: selectedCwd,\n\t\t\t\t\twithSession: options?.withSession,\n\t\t\t\t\tprojectTrustContextFactory: (cwd) => this.createProjectTrustContext(cwd),\n\t\t\t\t});\n\t\t\t\tif (result.cancelled) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\tthis.showStatus(\"Resumed session in current cwd\");\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn this.handleFatalRuntimeError(\"Failed to resume session\", error);\n\t\t}\n\t}\n\n\tprivate getLoginProviderOptions(authType?: \"oauth\" | \"api_key\"): AuthSelectorProvider[] {\n\t\tconst options: AuthSelectorProvider[] = [];\n\t\tfor (const provider of this.session.modelRuntime.getProviders()) {\n\t\t\tconst authStatus = this.session.modelRuntime.getProviderAuthStatus(provider.id);\n\t\t\tconst status = authStatus.configured\n\t\t\t\t? {\n\t\t\t\t\t\ttype: this.session.modelRuntime.isUsingOAuth(provider.id) ? (\"oauth\" as const) : (\"api_key\" as const),\n\t\t\t\t\t\tsource: authStatus.label ?? authStatus.source,\n\t\t\t\t\t}\n\t\t\t\t: undefined;\n\t\t\tif ((!authType || authType === \"oauth\") && provider.auth.oauth) {\n\t\t\t\toptions.push({\n\t\t\t\t\tid: provider.id,\n\t\t\t\t\tname: provider.name,\n\t\t\t\t\tauthType: \"oauth\",\n\t\t\t\t\tmethod: provider.auth.oauth,\n\t\t\t\t\tstatus,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif ((!authType || authType === \"api_key\") && provider.auth.apiKey) {\n\t\t\t\toptions.push({\n\t\t\t\t\tid: provider.id,\n\t\t\t\t\tname: provider.name,\n\t\t\t\t\tauthType: \"api_key\",\n\t\t\t\t\tmethod: provider.auth.apiKey,\n\t\t\t\t\tstatus,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn options.sort((a, b) => a.name.localeCompare(b.name));\n\t}\n\n\tprivate async getLogoutProviderOptions(): Promise<AuthSelectorProvider[]> {\n\t\treturn (await this.session.modelRuntime.listCredentials({ signal: AbortSignal.timeout(15_000) }))\n\t\t\t.map(({ providerId, type }) => ({\n\t\t\t\tid: providerId,\n\t\t\t\tname: this.session.modelRuntime.getProvider(providerId)?.name ?? providerId,\n\t\t\t\tauthType: type,\n\t\t\t\tstatus: { type, source: \"stored credential\" },\n\t\t\t}))\n\t\t\t.sort((a, b) => a.name.localeCompare(b.name));\n\t}\n\n\tprivate findLoginProviderOptions(providerRef: string): AuthSelectorProvider[] {\n\t\tconst normalizedProviderRef = providerRef.trim().toLowerCase();\n\t\tif (!normalizedProviderRef) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn this.getLoginProviderOptions().filter(\n\t\t\t(provider) =>\n\t\t\t\tprovider.id.toLowerCase() === normalizedProviderRef ||\n\t\t\t\tprovider.name.toLowerCase() === normalizedProviderRef,\n\t\t);\n\t}\n\n\tprivate async handleLoginCommand(providerRef?: string): Promise<void> {\n\t\tif (!providerRef) {\n\t\t\tthis.showLoginAuthTypeSelector();\n\t\t\treturn;\n\t\t}\n\n\t\tconst providerOptions = this.findLoginProviderOptions(providerRef);\n\t\tif (providerOptions.length === 1) {\n\t\t\tawait this.startProviderLogin(providerOptions[0]!);\n\t\t\treturn;\n\t\t}\n\n\t\tif (providerOptions.length > 1) {\n\t\t\tconst providerIds = new Set(providerOptions.map((provider) => provider.id));\n\t\t\tif (providerIds.size === 1) {\n\t\t\t\tthis.showLoginAuthTypeSelector(providerOptions);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis.showLoginProviderSelector(undefined, providerRef);\n\t}\n\n\tprivate async startProviderLogin(providerOption: AuthSelectorProvider): Promise<void> {\n\t\tif (providerOption.authType === \"oauth\") {\n\t\t\tawait this.showLoginDialog(providerOption.id, providerOption.name);\n\t\t} else if (providerOption.method?.login) {\n\t\t\tawait this.showApiKeyLoginDialog(providerOption.id, providerOption.name);\n\t\t} else {\n\t\t\tthis.showAmbientAuthDialog(providerOption);\n\t\t}\n\t}\n\n\tprivate showLoginAuthTypeSelector(providerOptions?: AuthSelectorProvider[]): void {\n\t\tconst oauthProvider = providerOptions?.find((provider) => provider.authType === \"oauth\");\n\t\tconst oauthLoginLabel =\n\t\t\toauthProvider?.method && \"loginLabel\" in oauthProvider.method ? oauthProvider.method.loginLabel : undefined;\n\t\tconst subscriptionLabel = oauthLoginLabel ?? \"Sign in with an account\";\n\t\tconst apiKeyLabel = \"Sign in with an API key\";\n\t\tconst availableAuthTypes = providerOptions\n\t\t\t? new Set(providerOptions.map((provider) => provider.authType))\n\t\t\t: new Set<AuthSelectorProvider[\"authType\"]>([\"oauth\", \"api_key\"]);\n\t\tconst options: string[] = [];\n\t\tif (availableAuthTypes.has(\"oauth\")) {\n\t\t\toptions.push(subscriptionLabel);\n\t\t}\n\t\tif (availableAuthTypes.has(\"api_key\")) {\n\t\t\toptions.push(apiKeyLabel);\n\t\t}\n\n\t\tif (options.length === 0) {\n\t\t\tthis.showStatus(\"No login methods available.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (providerOptions && options.length === 1) {\n\t\t\tconst providerOption = providerOptions[0];\n\t\t\tif (providerOption) {\n\t\t\t\tvoid this.startProviderLogin(providerOption);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst title = providerOptions?.[0]\n\t\t\t? `Select authentication method for ${providerOptions[0].name}:`\n\t\t\t: \"Select authentication method:\";\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new ExtensionSelectorComponent(\n\t\t\t\ttitle,\n\t\t\t\toptions,\n\t\t\t\t(option) => {\n\t\t\t\t\tdone();\n\t\t\t\t\tconst authType = option === subscriptionLabel ? \"oauth\" : \"api_key\";\n\t\t\t\t\tif (providerOptions) {\n\t\t\t\t\t\tconst providerOption = providerOptions.find((provider) => provider.authType === authType);\n\t\t\t\t\t\tif (providerOption) {\n\t\t\t\t\t\t\tvoid this.startProviderLogin(providerOption);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.showLoginProviderSelector(authType);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate showLoginProviderSelector(authType?: AuthSelectorProvider[\"authType\"], initialSearchInput?: string): void {\n\t\tconst providerOptions = this.getLoginProviderOptions(authType);\n\t\tif (providerOptions.length === 0) {\n\t\t\tconst message =\n\t\t\t\tauthType === \"oauth\"\n\t\t\t\t\t? \"No subscription providers available.\"\n\t\t\t\t\t: authType === \"api_key\"\n\t\t\t\t\t\t? \"No API key providers available.\"\n\t\t\t\t\t\t: \"No login providers available.\";\n\t\t\tthis.showStatus(message);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new OAuthSelectorComponent(\n\t\t\t\t\"login\",\n\t\t\t\tproviderOptions,\n\t\t\t\tasync (providerId, selectedAuthType) => {\n\t\t\t\t\tdone();\n\n\t\t\t\t\tconst providerOption = providerOptions.find(\n\t\t\t\t\t\t(provider) => provider.id === providerId && provider.authType === selectedAuthType,\n\t\t\t\t\t);\n\t\t\t\t\tif (!providerOption) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tawait this.startProviderLogin(providerOption);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tif (authType) {\n\t\t\t\t\t\tthis.showLoginAuthTypeSelector();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tinitialSearchInput,\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate async showOAuthSelector(mode: \"login\" | \"logout\"): Promise<void> {\n\t\tif (mode === \"login\") {\n\t\t\tthis.showLoginAuthTypeSelector();\n\t\t\treturn;\n\t\t}\n\n\t\tlet providerOptions: AuthSelectorProvider[];\n\t\ttry {\n\t\t\tproviderOptions = await this.getLogoutProviderOptions();\n\t\t} catch (error) {\n\t\t\tthis.showError(`Could not read stored credentials: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\treturn;\n\t\t}\n\t\tif (providerOptions.length === 0) {\n\t\t\tthis.showStatus(\n\t\t\t\t\"No stored credentials to remove. /logout only removes credentials saved by /login; environment variables and models.json config are unchanged.\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new OAuthSelectorComponent(\n\t\t\t\tmode,\n\t\t\t\tproviderOptions,\n\t\t\t\tasync (providerId: string) => {\n\t\t\t\t\tdone();\n\n\t\t\t\t\tconst providerOption = providerOptions.find((provider) => provider.id === providerId);\n\t\t\t\t\tif (!providerOption) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait this.session.modelRuntime.logout(providerOption.id, {\n\t\t\t\t\t\t\tsignal: AbortSignal.timeout(15_000),\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.updateAvailableProviderCount();\n\t\t\t\t\t\tconst message =\n\t\t\t\t\t\t\tproviderOption.authType === \"oauth\"\n\t\t\t\t\t\t\t\t? `Logged out of ${providerOption.name}`\n\t\t\t\t\t\t\t\t: `Removed stored API key for ${providerOption.name}. Environment variables and models.json config are unchanged.`;\n\t\t\t\t\t\tthis.showStatus(message);\n\t\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\t\t\tthis.showError(\n\t\t\t\t\t\t\terror instanceof CredentialSynchronizationError\n\t\t\t\t\t\t\t\t? `Credentials removed for ${providerOption.name}, but local model state could not be synchronized: ${message}`\n\t\t\t\t\t\t\t\t: `Logout failed: ${message}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate async completeProviderAuthentication(\n\t\tproviderId: string,\n\t\tproviderName: string,\n\t\tauthType: \"oauth\" | \"api_key\",\n\t\tpreviousModel: Model<any> | undefined,\n\t): Promise<void> {\n\t\tconst actionLabel = authType === \"oauth\" ? `Logged in to ${providerName}` : `Saved API key for ${providerName}`;\n\n\t\tlet selectedModel: Model<any> | undefined;\n\t\tlet systemPromptName: string | undefined;\n\t\tlet selectionError: string | undefined;\n\t\tif (isUnknownModel(previousModel)) {\n\t\t\tconst availableModels = this.session.modelRuntime.getAvailableSnapshot();\n\t\t\tconst providerModels = availableModels.filter((model) => model.provider === providerId);\n\t\t\tif (!hasDefaultModelProvider(providerId)) {\n\t\t\t\tselectionError = `${actionLabel}, but no default model is configured for provider \"${providerId}\". Use /model to select a model.`;\n\t\t\t} else if (providerModels.length === 0) {\n\t\t\t\tselectionError = `${actionLabel}, but no models are available for that provider. Use /model to select a model.`;\n\t\t\t} else {\n\t\t\t\tconst defaultModelId = defaultModelPerProvider[providerId];\n\t\t\t\tselectedModel = providerModels.find((model) => model.id === defaultModelId);\n\t\t\t\tif (!selectedModel) {\n\t\t\t\t\tselectionError = `${actionLabel}, but its default model \"${defaultModelId}\" is not available. Use /model to select a model.`;\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsystemPromptName = (await this.session.setModel(selectedModel))?.systemPromptName;\n\t\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\t\tselectedModel = undefined;\n\t\t\t\t\t\tconst errorMessage = error instanceof Error ? error.message : String(error);\n\t\t\t\t\t\tselectionError = `${actionLabel}, but selecting its default model failed: ${errorMessage}. Use /model to select a model.`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.updateAvailableProviderCount();\n\t\tthis.footer.invalidate();\n\t\tthis.updateEditorBorderColor();\n\t\tif (selectedModel) {\n\t\t\tconst systemPromptStr = systemPromptName ? ` System prompt: ${systemPromptName}.` : \"\";\n\t\t\tthis.showStatus(\n\t\t\t\t`${actionLabel}. Selected ${selectedModel.id}.${systemPromptStr} Credentials saved to ${getAuthPath()}`,\n\t\t\t);\n\t\t\tthis.showRiskyMainModelWarning(selectedModel);\n\t\t\tvoid this.maybeWarnAboutAnthropicSubscriptionAuth(selectedModel);\n\t\t\tthis.checkDaxnutsEasterEgg(selectedModel);\n\t\t} else {\n\t\t\tthis.showStatus(`${actionLabel}. Credentials saved to ${getAuthPath()}`);\n\t\t\tif (selectionError) {\n\t\t\t\tthis.showError(selectionError);\n\t\t\t} else {\n\t\t\t\tvoid this.maybeWarnAboutAnthropicSubscriptionAuth();\n\t\t\t}\n\t\t}\n\n\t\tconst controller = new AbortController();\n\t\tconst timeout = setTimeout(() => controller.abort(), 15_000);\n\t\tvoid this.session.modelRuntime\n\t\t\t.refresh({ allowNetwork: true, providers: [providerId], signal: controller.signal })\n\t\t\t.then((result) => {\n\t\t\t\tif (result.aborted) {\n\t\t\t\t\tthis.showWarning(`${actionLabel}, but its model catalog refresh timed out; using cached models.`);\n\t\t\t\t} else if (result.errors.size > 0) {\n\t\t\t\t\tthis.showWarning(`${actionLabel}, but its model catalog could not be refreshed; using cached models.`);\n\t\t\t\t}\n\t\t\t\tthis.updateAvailableProviderCount();\n\t\t\t\tthis.footer.invalidate();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t})\n\t\t\t.catch((error: unknown) => {\n\t\t\t\tthis.showWarning(\n\t\t\t\t\t`${actionLabel}, but its model catalog could not be refreshed: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t);\n\t\t\t})\n\t\t\t.finally(() => clearTimeout(timeout));\n\t}\n\n\tprivate showAmbientAuthDialog(providerOption: AuthSelectorProvider): void {\n\t\tconst restoreEditor = () => {\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\tconst dialog = new LoginDialogComponent(\n\t\t\tthis.ui,\n\t\t\tproviderOption.id,\n\t\t\t() => restoreEditor(),\n\t\t\tproviderOption.name,\n\t\t\t`${providerOption.name} setup`,\n\t\t);\n\t\tdialog.showInfo(\n\t\t\t`${providerOption.method?.name ?? \"Authentication\"} is configured outside ${APP_NAME}.`,\n\t\t\t[],\n\t\t\ttrue,\n\t\t);\n\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(dialog);\n\t\tthis.ui.setFocus(dialog);\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate async showApiKeyLoginDialog(providerId: string, providerName: string): Promise<void> {\n\t\tconst previousModel = this.session.model;\n\n\t\tconst dialog = new LoginDialogComponent(\n\t\t\tthis.ui,\n\t\t\tproviderId,\n\t\t\t(_success, _message) => {\n\t\t\t\t// Completion handled below\n\t\t\t},\n\t\t\tproviderName,\n\t\t);\n\n\t\tif (providerId === \"amazon-bedrock\") {\n\t\t\tdialog.showDetails([\n\t\t\t\ttheme.fg(\"text\", \"You can also use an AWS profile, IAM keys, or role-based credentials.\"),\n\t\t\t\ttheme.fg(\"muted\", \"See:\"),\n\t\t\t\ttheme.fg(\"accent\", ` ${path.join(getDocsPath(), \"providers.md\")}`),\n\t\t\t]);\n\t\t}\n\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(dialog);\n\t\tthis.ui.setFocus(dialog);\n\t\tthis.ui.requestRender();\n\n\t\tconst restoreEditor = () => {\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\ttry {\n\t\t\tawait this.loginProvider(dialog, providerId, \"api_key\");\n\t\t\trestoreEditor();\n\t\t\tawait this.completeProviderAuthentication(providerId, providerName, \"api_key\", previousModel);\n\t\t} catch (error: unknown) {\n\t\t\trestoreEditor();\n\t\t\tconst errorMsg = error instanceof Error ? error.message : String(error);\n\t\t\tif (error instanceof CredentialSynchronizationError) {\n\t\t\t\tthis.showError(\n\t\t\t\t\t`Saved API key for ${providerName}, but local model state could not be synchronized: ${errorMsg}`,\n\t\t\t\t);\n\t\t\t} else if (errorMsg !== \"Login cancelled\") {\n\t\t\t\tthis.showError(`Failed to save API key for ${providerName}: ${errorMsg}`);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate showAuthSelect(\n\t\tdialog: LoginDialogComponent,\n\t\tprompt: Extract<AuthPrompt, { type: \"select\" }>,\n\t): Promise<string> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst restoreDialog = () => {\n\t\t\t\tthis.editorContainer.clear();\n\t\t\t\tthis.editorContainer.addChild(dialog);\n\t\t\t\tthis.ui.setFocus(dialog);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t};\n\t\t\tconst labels = prompt.options.map((option) => option.label);\n\t\t\tconst selector = new ExtensionSelectorComponent(\n\t\t\t\tprompt.message,\n\t\t\t\tlabels,\n\t\t\t\t(optionLabel) => {\n\t\t\t\t\trestoreDialog();\n\t\t\t\t\tconst id = prompt.options.find((option) => option.label === optionLabel)?.id;\n\t\t\t\t\tif (id) resolve(id);\n\t\t\t\t\telse reject(new Error(\"Login cancelled\"));\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\trestoreDialog();\n\t\t\t\t\treject(new Error(\"Login cancelled\"));\n\t\t\t\t},\n\t\t\t);\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(selector);\n\t\t\tthis.ui.setFocus(selector);\n\t\t\tthis.ui.requestRender();\n\t\t});\n\t}\n\n\tprivate async showAuthPrompt(dialog: LoginDialogComponent, prompt: AuthPrompt): Promise<string> {\n\t\tlet response: Promise<string>;\n\t\tif (prompt.type === \"select\") {\n\t\t\tresponse = this.showAuthSelect(dialog, prompt);\n\t\t} else if (prompt.type === \"manual_code\") {\n\t\t\tresponse = dialog.showManualInput(prompt.message);\n\t\t} else {\n\t\t\tresponse = dialog.showPrompt(prompt.message, prompt.placeholder);\n\t\t}\n\t\tif (!prompt.signal) return response;\n\t\tif (prompt.signal.aborted) throw new Error(\"Login cancelled\");\n\t\tconst signal = prompt.signal;\n\t\tlet onAbort: (() => void) | undefined;\n\t\tconst aborted = new Promise<string>((_resolve, reject) => {\n\t\t\tonAbort = () => reject(new Error(\"Login cancelled\"));\n\t\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t\t});\n\t\ttry {\n\t\t\treturn await Promise.race([response, aborted]);\n\t\t} finally {\n\t\t\tif (onAbort) signal.removeEventListener(\"abort\", onAbort);\n\t\t}\n\t}\n\n\tprivate notifyAuthDialog(dialog: LoginDialogComponent, event: AuthEvent): void {\n\t\tif (event.type === \"auth_url\") {\n\t\t\tdialog.showAuth(event.url, event.instructions);\n\t\t} else if (event.type === \"device_code\") {\n\t\t\tdialog.showDeviceCode(event);\n\t\t\tdialog.showWaiting(\"Waiting for authentication...\");\n\t\t} else if (event.type === \"info\") {\n\t\t\tdialog.showInfo(event.message, event.links);\n\t\t} else {\n\t\t\tdialog.showProgress(event.message);\n\t\t}\n\t}\n\n\tprivate async loginProvider(\n\t\tdialog: LoginDialogComponent,\n\t\tproviderId: string,\n\t\tmethod: \"api_key\" | \"oauth\",\n\t): Promise<void> {\n\t\tawait this.session.modelRuntime.login(providerId, method, {\n\t\t\tsignal: dialog.signal,\n\t\t\tprompt: (prompt) => this.showAuthPrompt(dialog, prompt),\n\t\t\tnotify: (event) => this.notifyAuthDialog(dialog, event),\n\t\t});\n\t}\n\n\tprivate async showLoginDialog(providerId: string, providerName: string): Promise<void> {\n\t\tconst previousModel = this.session.model;\n\t\tconst dialog = new LoginDialogComponent(this.ui, providerId, (_success, _message) => {}, providerName);\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(dialog);\n\t\tthis.ui.setFocus(dialog);\n\t\tthis.ui.requestRender();\n\n\t\tconst restoreEditor = () => {\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\ttry {\n\t\t\tawait this.loginProvider(dialog, providerId, \"oauth\");\n\t\t\trestoreEditor();\n\t\t\tawait this.completeProviderAuthentication(providerId, providerName, \"oauth\", previousModel);\n\t\t} catch (error: unknown) {\n\t\t\trestoreEditor();\n\t\t\tconst errorMsg = error instanceof Error ? error.message : String(error);\n\t\t\tif (error instanceof CredentialSynchronizationError) {\n\t\t\t\tthis.showError(\n\t\t\t\t\t`Logged in to ${providerName}, but local model state could not be synchronized: ${errorMsg}`,\n\t\t\t\t);\n\t\t\t} else if (errorMsg !== \"Login cancelled\") {\n\t\t\t\tthis.showError(`Failed to login to ${providerName}: ${errorMsg}`);\n\t\t\t}\n\t\t}\n\t}\n\n\t// =========================================================================\n\t// Command handlers\n\t// =========================================================================\n\n\tprivate async handleReloadCommand(): Promise<void> {\n\t\tif (this.session.isStreaming) {\n\t\t\tthis.showWarning(\"Wait for the current response to finish before reloading.\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.session.isCompacting) {\n\t\t\tthis.showWarning(\"Wait for compaction to finish before reloading.\");\n\t\t\treturn;\n\t\t}\n\t\t// Pre-check the extension veto (session_before_reload) so a blocked reload\n\t\t// warns without flashing the reload box or stealing editor focus. reload()\n\t\t// re-checks internally, so the race window below is still covered.\n\t\tconst veto = await this.session.checkReloadVeto();\n\t\tif (veto.cancelled) {\n\t\t\tthis.showWarning(veto.reason ?? \"Reload blocked by an extension.\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.resetExtensionUI();\n\n\t\tconst reloadBox = new Container();\n\t\tconst borderColor = (s: string) => theme.fg(\"border\", s);\n\t\treloadBox.addChild(new DynamicBorder(borderColor));\n\t\treloadBox.addChild(new Spacer(1));\n\t\treloadBox.addChild(\n\t\t\tnew Text(\n\t\t\t\ttheme.fg(\"muted\", \"Reloading keybindings, extensions, skills, prompts, themes, and context files...\"),\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t\treloadBox.addChild(new Spacer(1));\n\t\treloadBox.addChild(new DynamicBorder(borderColor));\n\n\t\tconst previousEditor = this.editor;\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(reloadBox);\n\t\tthis.ui.setFocus(reloadBox);\n\t\tthis.ui.requestRender(true);\n\t\tawait new Promise((resolve) => process.nextTick(resolve));\n\n\t\tconst dismissReloadBox = (editor: Component) => {\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(editor);\n\t\t\tthis.ui.setFocus(editor);\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\tlet chatRestoredBeforeSessionStart = false;\n\t\tlet reloadBoxDismissed = false;\n\t\tconst restoreChatBeforeSessionStart = () => {\n\t\t\tif (chatRestoredBeforeSessionStart) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();\n\t\t\tthis.outputPad = this.settingsManager.getOutputPad();\n\t\t\tthis.rebuildChatFromMessages();\n\t\t\ttime(\"chatRebuild\", \"reload\");\n\t\t\tchatRestoredBeforeSessionStart = true;\n\t\t};\n\n\t\ttry {\n\t\t\tconst reloadResult = await this.session.reload({ beforeSessionStart: restoreChatBeforeSessionStart });\n\t\t\tif (reloadResult.cancelled) {\n\t\t\t\tdismissReloadBox(previousEditor as Component);\n\t\t\t\treloadBoxDismissed = true;\n\t\t\t\tthis.showWarning(reloadResult.reason ?? \"Reload blocked by an extension.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trestoreChatBeforeSessionStart();\n\t\t\tthis.keybindings.reload();\n\t\t\tconst activeHeader = this.customHeader ?? this.builtInHeader;\n\t\t\tif (isExpandable(activeHeader)) {\n\t\t\t\tactiveHeader.setExpanded(this.toolOutputExpanded);\n\t\t\t}\n\t\t\tsetRegisteredThemes(this.session.resourceLoader.getThemes().themes);\n\t\t\tawait this.themeController.applyFromSettings();\n\t\t\tthis.applyRuntimeSettings();\n\t\t\tthis.setupAutocompleteProvider();\n\t\t\tconst runner = this.session.extensionRunner;\n\t\t\tthis.setupExtensionShortcuts(runner);\n\t\t\tthis.showLoadedResources({\n\t\t\t\tforce: false,\n\t\t\t\tshowDiagnosticsWhenQuiet: true,\n\t\t\t});\n\t\t\tconst savedImplicitProjectTrust = this.maybeSaveImplicitProjectTrustAfterReload();\n\t\t\tconst modelsJsonError = this.session.modelRuntime.getError();\n\t\t\tif (modelsJsonError) {\n\t\t\t\tthis.showError(`models.json error: ${modelsJsonError}`);\n\t\t\t}\n\t\t\tconst reloadedMessage = savedImplicitProjectTrust\n\t\t\t\t? \"Reloaded keybindings, extensions, skills, prompts, themes, and context files; saved project trust\"\n\t\t\t\t: \"Reloaded keybindings, extensions, skills, prompts, themes, and context files\";\n\t\t\tconst reloadTimings = formatTimings(\"reload\");\n\t\t\tthis.showStatus(\n\t\t\t\treloadTimings === undefined ? reloadedMessage : `${reloadedMessage} | reload timings: ${reloadTimings}`,\n\t\t\t);\n\t\t\tdismissReloadBox(this.editor as Component);\n\t\t\treloadBoxDismissed = true;\n\t\t} catch (error) {\n\t\t\tif (!reloadBoxDismissed) {\n\t\t\t\tdismissReloadBox(previousEditor as Component);\n\t\t\t}\n\t\t\tthis.showError(`Reload failed: ${error instanceof Error ? error.message : String(error)}`);\n\t\t}\n\t}\n\n\tprivate async handleExportCommand(text: string): Promise<void> {\n\t\tconst outputPath = this.getPathCommandArgument(text, \"/export\");\n\n\t\ttry {\n\t\t\tif (outputPath?.endsWith(\".jsonl\")) {\n\t\t\t\tconst filePath = this.session.exportToJsonl(outputPath);\n\t\t\t\tthis.showStatus(`Session exported to: ${filePath}`);\n\t\t\t} else {\n\t\t\t\tconst filePath = await this.session.exportToHtml(outputPath, {\n\t\t\t\t\tthemeName: theme.name,\n\t\t\t\t});\n\t\t\t\tthis.showStatus(`Session exported to: ${filePath}`);\n\t\t\t}\n\t\t} catch (error: unknown) {\n\t\t\tthis.showError(`Failed to export session: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t}\n\t}\n\n\tprivate getPathCommandArgument(text: string, command: \"/export\" | \"/import\"): string | undefined {\n\t\tif (text === command) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (!text.startsWith(`${command} `)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst argsString = text.slice(command.length + 1).trimStart();\n\t\tif (!argsString) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst firstChar = argsString[0];\n\t\tif (firstChar === '\"' || firstChar === \"'\") {\n\t\t\tconst closingQuoteIndex = argsString.indexOf(firstChar, 1);\n\t\t\tif (closingQuoteIndex < 0) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\treturn expandTildePath(argsString.slice(1, closingQuoteIndex));\n\t\t}\n\n\t\tconst firstWhitespaceIndex = argsString.search(/\\s/);\n\t\tif (firstWhitespaceIndex < 0) {\n\t\t\treturn expandTildePath(argsString);\n\t\t}\n\t\treturn expandTildePath(argsString.slice(0, firstWhitespaceIndex));\n\t}\n\n\tprivate async handleImportCommand(text: string): Promise<void> {\n\t\tconst inputPath = this.getPathCommandArgument(text, \"/import\");\n\t\tif (!inputPath) {\n\t\t\tthis.showError(\"Usage: /import <path.jsonl>\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst confirmed = await this.showExtensionConfirm(\"Import session\", `Replace current session with ${inputPath}?`);\n\t\tif (!confirmed) {\n\t\t\tthis.showStatus(\"Import cancelled\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tthis.clearStatusIndicator();\n\t\t\tconst result = await this.runtimeHost.importFromJsonl(inputPath);\n\t\t\tif (result.cancelled) {\n\t\t\t\tthis.showStatus(\"Import cancelled\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.showStatus(`Session imported from: ${inputPath}`);\n\t\t} catch (error: unknown) {\n\t\t\tif (error instanceof MissingSessionCwdError) {\n\t\t\t\tconst selectedCwd = await this.promptForMissingSessionCwd(error);\n\t\t\t\tif (!selectedCwd) {\n\t\t\t\t\tthis.showStatus(\"Import cancelled\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst result = await this.runtimeHost.importFromJsonl(inputPath, selectedCwd);\n\t\t\t\tif (result.cancelled) {\n\t\t\t\t\tthis.showStatus(\"Import cancelled\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.showStatus(`Session imported from: ${inputPath}`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (error instanceof SessionImportFileNotFoundError) {\n\t\t\t\tthis.showError(`Failed to import session: ${error.message}`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait this.handleFatalRuntimeError(\"Failed to import session\", error);\n\t\t}\n\t}\n\n\tprivate async handleShareCommand(): Promise<void> {\n\t\t// Check if gh is available and logged in\n\t\ttry {\n\t\t\tconst authResult = spawnSync(\"gh\", [\"auth\", \"status\"], { encoding: \"utf-8\" });\n\t\t\tif (authResult.status !== 0) {\n\t\t\t\tthis.showError(\"GitHub CLI is not logged in. Run 'gh auth login' first.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch {\n\t\t\tthis.showError(\"GitHub CLI (gh) is not installed. Install it from https://cli.github.com/\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Export to a temp file\n\t\tconst tmpFile = path.join(os.tmpdir(), \"session.html\");\n\t\ttry {\n\t\t\tawait this.session.exportToHtml(tmpFile, { themeName: theme.name });\n\t\t} catch (error: unknown) {\n\t\t\tthis.showError(`Failed to export session: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t\treturn;\n\t\t}\n\n\t\t// Show cancellable loader, replacing the editor\n\t\tconst loader = new BorderedLoader(this.ui, theme, \"Creating gist...\");\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(loader);\n\t\tthis.ui.setFocus(loader);\n\t\tthis.ui.requestRender();\n\n\t\tconst restoreEditor = () => {\n\t\t\tloader.dispose();\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t\ttry {\n\t\t\t\tfs.unlinkSync(tmpFile);\n\t\t\t} catch {\n\t\t\t\t// Ignore cleanup errors\n\t\t\t}\n\t\t};\n\n\t\t// Create a secret gist asynchronously\n\t\tlet proc: ReturnType<typeof spawn> | null = null;\n\n\t\tloader.onAbort = () => {\n\t\t\tproc?.kill();\n\t\t\trestoreEditor();\n\t\t\tthis.showStatus(\"Share cancelled\");\n\t\t};\n\n\t\ttry {\n\t\t\tconst result = await new Promise<{ stdout: string; stderr: string; code: number | null }>((resolve) => {\n\t\t\t\tproc = spawn(\"gh\", [\"gist\", \"create\", \"--public=false\", tmpFile]);\n\t\t\t\tlet stdout = \"\";\n\t\t\t\tlet stderr = \"\";\n\t\t\t\tproc.stdout?.on(\"data\", (data) => {\n\t\t\t\t\tstdout += data.toString();\n\t\t\t\t});\n\t\t\t\tproc.stderr?.on(\"data\", (data) => {\n\t\t\t\t\tstderr += data.toString();\n\t\t\t\t});\n\t\t\t\tproc.on(\"close\", (code) => resolve({ stdout, stderr, code }));\n\t\t\t});\n\n\t\t\tif (loader.signal.aborted) return;\n\n\t\t\trestoreEditor();\n\n\t\t\tif (result.code !== 0) {\n\t\t\t\tconst errorMsg = result.stderr?.trim() || \"Unknown error\";\n\t\t\t\tthis.showError(`Failed to create gist: ${errorMsg}`);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Extract gist ID from the URL returned by gh\n\t\t\t// gh returns something like: https://gist.github.com/username/GIST_ID\n\t\t\tconst gistUrl = result.stdout?.trim();\n\t\t\tconst gistId = gistUrl?.split(\"/\").pop();\n\t\t\tif (!gistId) {\n\t\t\t\tthis.showError(\"Failed to parse gist ID from gh output\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Create the preview URL\n\t\t\tconst previewUrl = getShareViewerUrl(gistId);\n\t\t\tthis.showStatus(`Share URL: ${previewUrl}\\nGist: ${gistUrl}`);\n\t\t} catch (error: unknown) {\n\t\t\tif (!loader.signal.aborted) {\n\t\t\t\trestoreEditor();\n\t\t\t\tthis.showError(`Failed to create gist: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async handleCopyCommand(options: { flashConfirmation?: boolean } = {}): Promise<void> {\n\t\tconst text = this.session.getLastAssistantText();\n\t\tif (!text) {\n\t\t\tthis.showError(\"No agent messages to copy yet.\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tawait copyToClipboard(text);\n\t\t\tif (options.flashConfirmation && this.ui instanceof TuiAltScreen) {\n\t\t\t\tthis.ui.flash(\"Copied!\");\n\t\t\t} else {\n\t\t\t\tthis.showStatus(\"Copied last agent message to clipboard\");\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\tprivate handleNameCommand(text: string): void {\n\t\tconst name = text.replace(/^\\/name\\s*/, \"\").trim();\n\t\tif (!name) {\n\t\t\tconst currentName = this.sessionManager.getSessionName();\n\t\t\tif (currentName) {\n\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\tthis.chatContainer.addChild(new Text(theme.fg(\"dim\", `Session name: ${currentName}`), 1, 0));\n\t\t\t} else {\n\t\t\t\tthis.showWarning(\"Usage: /name <name>\");\n\t\t\t}\n\t\t\tthis.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.session.setSessionName(name);\n\t\tconst sessionName = this.sessionManager.getSessionName();\n\t\tif (sessionName !== name) {\n\t\t\tthis.showWarning(`Session name was normalized from ${JSON.stringify(name)} to ${JSON.stringify(sessionName)}`);\n\t\t}\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(theme.fg(\"dim\", `Session name set: ${sessionName ?? name}`), 1, 0));\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleSessionCommand(): void {\n\t\tconst stats = this.session.getSessionStats();\n\t\tconst sessionName = this.sessionManager.getSessionName();\n\t\tconst entries = this.sessionManager.getEntries();\n\t\tconst cacheWaste = computeCacheWaste(entries, this.session.modelRuntime);\n\n\t\t// Cost/token totals per provider/model actually used (e.g. OpenRouter `auto`\n\t\t// resolves to a concrete responseModel). Usage without model attribution is\n\t\t// grouped separately so the breakdown reconciles with the session total.\n\t\tconst usageBreakdown = getUsageCostBreakdown(entries);\n\n\t\tlet info = `${theme.bold(\"Session Info\")}\\n\\n`;\n\t\tif (sessionName) {\n\t\t\tinfo += `${theme.fg(\"dim\", \"Name:\")} ${sessionName}\\n`;\n\t\t}\n\t\tinfo += `${theme.fg(\"dim\", \"File:\")} ${stats.sessionFile ?? \"In-memory\"}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"ID:\")} ${stats.sessionId}\\n\\n`;\n\t\tinfo += `${theme.bold(\"Messages\")}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"Total:\")} ${stats.totalMessages}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"User:\")} ${stats.userMessages}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"Assistant:\")} ${stats.assistantMessages}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"Tools:\")} ${stats.toolCalls} calls, ${stats.toolResults} results\\n\\n`;\n\t\tinfo += `${theme.bold(\"Tokens\")}\\n`;\n\t\t// \"Input\" is the full prompt volume. With cache activity, split it into\n\t\t// cached (served from cache) vs uncached (everything else) - the only\n\t\t// provider-independent split. Cache writes, where reported, are a detail\n\t\t// of the uncached portion.\n\t\tconst { input, cacheRead, cacheWrite } = stats.tokens;\n\t\tconst promptTokens = input + cacheRead + cacheWrite;\n\t\tinfo += `${theme.fg(\"dim\", \"Input:\")} ${promptTokens.toLocaleString()}\\n`;\n\t\tif (promptTokens > 0 && (cacheRead > 0 || cacheWrite > 0)) {\n\t\t\tconst hitRate = theme.fg(\"dim\", `(${((cacheRead / promptTokens) * 100).toFixed(1)}%)`);\n\t\t\tinfo += ` ${theme.fg(\"dim\", \"Cached:\")} ${cacheRead.toLocaleString()} ${hitRate}\\n`;\n\t\t\tconst written =\n\t\t\t\tcacheWrite > 0 ? ` ${theme.fg(\"dim\", `(${cacheWrite.toLocaleString()} written to cache)`)}` : \"\";\n\t\t\tinfo += ` ${theme.fg(\"dim\", \"Uncached:\")} ${(input + cacheWrite).toLocaleString()}${written}\\n`;\n\t\t}\n\t\tinfo += `${theme.fg(\"dim\", \"Output:\")} ${stats.tokens.output.toLocaleString()}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"Total:\")} ${stats.tokens.total.toLocaleString()}\\n`;\n\n\t\tif (stats.cost > 0 || cacheWaste.missedTokens > 0) {\n\t\t\tinfo += `\\n${theme.bold(\"Cost\")}\\n`;\n\t\t\tinfo += `${theme.fg(\"dim\", \"Total:\")} $${stats.cost.toFixed(3)}`;\n\t\t\tif (usageBreakdown.length > 1) {\n\t\t\t\tfor (const entry of usageBreakdown) {\n\t\t\t\t\tinfo += `\\n ${theme.fg(\"dim\", `${entry.key}:`)} $${entry.cost.toFixed(3)} ${theme.fg(\"dim\", `(${formatTokens(entry.tokens)} tokens)`)}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cacheWaste.missedTokens > 0) {\n\t\t\t\tconst missLabel = cacheWaste.missCount === 1 ? \"1 miss\" : `${cacheWaste.missCount} misses`;\n\t\t\t\tconst detail = `${cacheWaste.missedTokens.toLocaleString()} tokens, ${missLabel}`;\n\t\t\t\tinfo +=\n\t\t\t\t\tcacheWaste.missedCost >= 0.0001\n\t\t\t\t\t\t? `\\n${theme.fg(\"dim\", \"Cache Re-billed:\")} $${cacheWaste.missedCost.toFixed(3)} ${theme.fg(\"dim\", `(${detail})`)}`\n\t\t\t\t\t\t: `\\n${theme.fg(\"dim\", \"Cache Re-billed:\")} ${detail}`;\n\t\t\t}\n\t\t}\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(info, 1, 0));\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleChangelogCommand(): void {\n\t\tconst changelogPath = getChangelogPath();\n\t\tconst allEntries = parseChangelog(changelogPath);\n\n\t\tconst changelogMarkdown =\n\t\t\tallEntries.length > 0\n\t\t\t\t? allEntries\n\t\t\t\t\t\t.reverse()\n\t\t\t\t\t\t.map((e) => normalizeChangelogLinks(e.content, e))\n\t\t\t\t\t\t.join(\"\\n\\n\")\n\t\t\t\t: \"No changelog entries found.\";\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t\tthis.chatContainer.addChild(new Text(theme.bold(theme.fg(\"accent\", \"What's New\")), 1, 0));\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Markdown(changelogMarkdown, 1, 1, this.getMarkdownThemeWithSettings()));\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Get capitalized display string for an app keybinding action.\n\t */\n\tprivate getAppKeyDisplay(action: AppKeybinding): string {\n\t\treturn keyDisplayText(action);\n\t}\n\n\t/**\n\t * Get capitalized display string for an editor keybinding action.\n\t */\n\tprivate getEditorKeyDisplay(action: Keybinding): string {\n\t\treturn keyDisplayText(action);\n\t}\n\n\tprivate handleHotkeysCommand(): void {\n\t\t// Navigation keybindings\n\t\tconst cursorUp = this.getEditorKeyDisplay(\"tui.editor.cursorUp\");\n\t\tconst cursorDown = this.getEditorKeyDisplay(\"tui.editor.cursorDown\");\n\t\tconst cursorLeft = this.getEditorKeyDisplay(\"tui.editor.cursorLeft\");\n\t\tconst cursorRight = this.getEditorKeyDisplay(\"tui.editor.cursorRight\");\n\t\tconst cursorWordLeft = this.getEditorKeyDisplay(\"tui.editor.cursorWordLeft\");\n\t\tconst cursorWordRight = this.getEditorKeyDisplay(\"tui.editor.cursorWordRight\");\n\t\tconst cursorLineStart = this.getEditorKeyDisplay(\"tui.editor.cursorLineStart\");\n\t\tconst cursorLineEnd = this.getEditorKeyDisplay(\"tui.editor.cursorLineEnd\");\n\t\tconst jumpForward = this.getEditorKeyDisplay(\"tui.editor.jumpForward\");\n\t\tconst jumpBackward = this.getEditorKeyDisplay(\"tui.editor.jumpBackward\");\n\t\tconst pageUp = this.getEditorKeyDisplay(\"tui.editor.pageUp\");\n\t\tconst pageDown = this.getEditorKeyDisplay(\"tui.editor.pageDown\");\n\n\t\t// Editing keybindings\n\t\tconst submit = this.getEditorKeyDisplay(\"tui.input.submit\");\n\t\tconst newLine = this.getEditorKeyDisplay(\"tui.input.newLine\");\n\t\tconst deleteWordBackward = this.getEditorKeyDisplay(\"tui.editor.deleteWordBackward\");\n\t\tconst deleteWordForward = this.getEditorKeyDisplay(\"tui.editor.deleteWordForward\");\n\t\tconst deleteToLineStart = this.getEditorKeyDisplay(\"tui.editor.deleteToLineStart\");\n\t\tconst deleteToLineEnd = this.getEditorKeyDisplay(\"tui.editor.deleteToLineEnd\");\n\t\tconst yank = this.getEditorKeyDisplay(\"tui.editor.yank\");\n\t\tconst yankPop = this.getEditorKeyDisplay(\"tui.editor.yankPop\");\n\t\tconst undo = this.getEditorKeyDisplay(\"tui.editor.undo\");\n\t\tconst tab = this.getEditorKeyDisplay(\"tui.input.tab\");\n\n\t\t// App keybindings\n\t\tconst interrupt = this.getAppKeyDisplay(\"app.interrupt\");\n\t\tconst clear = this.getAppKeyDisplay(\"app.clear\");\n\t\tconst exit = this.getAppKeyDisplay(\"app.exit\");\n\t\tconst suspend = this.getAppKeyDisplay(\"app.suspend\");\n\t\tconst cycleThinkingLevel = this.getAppKeyDisplay(\"app.thinking.cycle\");\n\t\tconst cycleModelForward = this.getAppKeyDisplay(\"app.model.cycleForward\");\n\t\tconst selectModel = this.getAppKeyDisplay(\"app.model.select\");\n\t\tconst expandTools = this.getAppKeyDisplay(\"app.tools.expand\");\n\t\tconst toggleThinking = this.getAppKeyDisplay(\"app.thinking.toggle\");\n\t\tconst externalEditor = this.getAppKeyDisplay(\"app.editor.external\");\n\t\tconst cycleModelBackward = this.getAppKeyDisplay(\"app.model.cycleBackward\");\n\t\tconst copyMessage = this.getAppKeyDisplay(\"app.message.copy\");\n\t\tconst followUp = this.getAppKeyDisplay(\"app.message.followUp\");\n\t\tconst dequeue = this.getAppKeyDisplay(\"app.message.dequeue\");\n\t\tconst pasteImage = this.getAppKeyDisplay(\"app.clipboard.pasteImage\");\n\n\t\tlet hotkeys = `\n**Navigation**\n| Key | Action |\n|-----|--------|\n| \\`${cursorUp}\\` / \\`${cursorDown}\\` / \\`${cursorLeft}\\` / \\`${cursorRight}\\` | Move cursor / browse history |\n| \\`${cursorWordLeft}\\` / \\`${cursorWordRight}\\` | Move by word |\n| \\`${cursorLineStart}\\` | Start of line |\n| \\`${cursorLineEnd}\\` | End of line |\n| \\`${jumpForward}\\` | Jump forward to character |\n| \\`${jumpBackward}\\` | Jump backward to character |\n| \\`${pageUp}\\` / \\`${pageDown}\\` | Scroll by page |\n\n**Editing**\n| Key | Action |\n|-----|--------|\n| \\`${submit}\\` | Send message |\n| \\`${newLine}\\` | New line${process.platform === \"win32\" ? \" (Ctrl+Enter on Windows Terminal)\" : \"\"} |\n| \\`${deleteWordBackward}\\` | Delete word backwards |\n| \\`${deleteWordForward}\\` | Delete word forwards |\n| \\`${deleteToLineStart}\\` | Delete to start of line |\n| \\`${deleteToLineEnd}\\` | Delete to end of line |\n| \\`${yank}\\` | Paste the most-recently-deleted text |\n| \\`${yankPop}\\` | Cycle through the deleted text after pasting |\n| \\`${undo}\\` | Undo |\n\n**Other**\n| Key | Action |\n|-----|--------|\n| \\`${tab}\\` | Path completion / accept autocomplete |\n| \\`${interrupt}\\` | Cancel autocomplete / abort streaming |\n| \\`${clear}\\` | Clear editor (first) / exit (second) |\n| \\`${exit}\\` | Exit (when editor is empty) |\n| \\`${suspend}\\` | Suspend to background |\n| \\`${cycleThinkingLevel}\\` | Cycle thinking level |\n| \\`${cycleModelForward}\\` / \\`${cycleModelBackward}\\` | Cycle models |\n| \\`${selectModel}\\` | Open model selector |\n| \\`${expandTools}\\` | Toggle tool output expansion |\n| \\`${toggleThinking}\\` | Toggle thinking block visibility |\n| \\`${externalEditor}\\` | Edit message in external editor |\n| \\`${copyMessage}\\` | Copy last assistant message |\n| \\`${followUp}\\` | Queue follow-up message |\n| \\`${dequeue}\\` | Restore queued messages |\n| \\`${pasteImage}\\` | Paste image or text from clipboard |\n| \\`/\\` | Slash commands |\n| \\`!\\` | Run bash command |\n| \\`!!\\` | Run bash command (excluded from context) |\n`;\n\n\t\t// Add extension-registered shortcuts\n\t\tconst extensionRunner = this.session.extensionRunner;\n\t\tconst shortcuts = extensionRunner.getShortcuts(this.keybindings.getEffectiveConfig());\n\t\tif (shortcuts.size > 0) {\n\t\t\thotkeys += `\n**Extensions**\n| Key | Action |\n|-----|--------|\n`;\n\t\t\tfor (const [key, shortcut] of shortcuts) {\n\t\t\t\tconst description = shortcut.description ?? shortcut.extensionPath;\n\t\t\t\tconst keyDisplay = formatKeyText(key, { capitalize: true });\n\t\t\t\thotkeys += `| \\`${keyDisplay}\\` | ${description} |\\n`;\n\t\t\t}\n\t\t}\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t\tthis.chatContainer.addChild(new Text(theme.bold(theme.fg(\"accent\", \"Keyboard Shortcuts\")), 1, 0));\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Markdown(hotkeys.trim(), 1, 1, this.getMarkdownThemeWithSettings()));\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate async handleClearCommand(): Promise<void> {\n\t\tthis.clearStatusIndicator();\n\t\ttry {\n\t\t\tconst result = await this.runtimeHost.newSession();\n\t\t\tif (result.cancelled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\tthis.chatContainer.addChild(new Text(`${theme.fg(\"accent\", \"✓ New session started\")}`, 1, 1));\n\t\t\tthis.ui.requestRender();\n\t\t} catch (error: unknown) {\n\t\t\tawait this.handleFatalRuntimeError(\"Failed to create session\", error);\n\t\t}\n\t}\n\n\tprivate handleDebugCommand(): void {\n\t\tconst width = this.ui.terminal.columns;\n\t\tconst height = this.ui.terminal.rows;\n\t\tconst allLines = this.ui.render(width);\n\n\t\tconst debugLogPath = getDebugLogPath();\n\t\tconst debugData = [\n\t\t\t`Debug output at ${new Date().toISOString()}`,\n\t\t\t`Terminal: ${width}x${height}`,\n\t\t\t`Total lines: ${allLines.length}`,\n\t\t\t\"\",\n\t\t\t\"=== All rendered lines with visible widths ===\",\n\t\t\t...allLines.map((line, idx) => {\n\t\t\t\tconst vw = visibleWidth(line);\n\t\t\t\tconst escaped = JSON.stringify(line);\n\t\t\t\treturn `[${idx}] (w=${vw}) ${escaped}`;\n\t\t\t}),\n\t\t\t\"\",\n\t\t\t\"=== Agent messages (JSONL) ===\",\n\t\t\t...this.session.messages.map((msg) => JSON.stringify(msg)),\n\t\t\t\"\",\n\t\t].join(\"\\n\");\n\n\t\tfs.mkdirSync(path.dirname(debugLogPath), { recursive: true });\n\t\tfs.writeFileSync(debugLogPath, debugData);\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(`${theme.fg(\"accent\", \"✓ Debug log written\")}\\n${theme.fg(\"muted\", debugLogPath)}`, 1, 1),\n\t\t);\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleArminSaysHi(): void {\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new ArminComponent(this.ui));\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleDementedDelves(): void {\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new EarendilAnnouncementComponent());\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleDaxnuts(): void {\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DaxnutsComponent(this.ui));\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate checkDaxnutsEasterEgg(model: { provider: string; id: string }): void {\n\t\tif (model.provider === \"opencode\" && model.id.toLowerCase().includes(\"kimi-k2.5\")) {\n\t\t\tthis.handleDaxnuts();\n\t\t}\n\t}\n\n\tprivate async handleBashCommand(command: string, excludeFromContext = false): Promise<void> {\n\t\tconst extensionRunner = this.session.extensionRunner;\n\n\t\t// Emit user_bash event to let extensions intercept\n\t\tconst eventResult = await extensionRunner.emitUserBash({\n\t\t\ttype: \"user_bash\",\n\t\t\tcommand,\n\t\t\texcludeFromContext,\n\t\t\tcwd: this.sessionManager.getCwd(),\n\t\t});\n\n\t\t// If extension returned a full result, use it directly\n\t\tif (eventResult?.result) {\n\t\t\tconst result = eventResult.result;\n\n\t\t\t// Create UI component for display\n\t\t\tthis.bashComponent = new BashExecutionComponent(command, this.ui, excludeFromContext);\n\t\t\tif (this.session.isStreaming) {\n\t\t\t\tthis.pendingMessagesContainer.addChild(this.bashComponent);\n\t\t\t\tthis.pendingBashComponents.push(this.bashComponent);\n\t\t\t} else {\n\t\t\t\tthis.chatContainer.addChild(this.bashComponent);\n\t\t\t}\n\n\t\t\t// Show output and complete\n\t\t\tif (result.output) {\n\t\t\t\tthis.bashComponent.appendOutput(result.output);\n\t\t\t}\n\t\t\tthis.bashComponent.setComplete(\n\t\t\t\tresult.exitCode,\n\t\t\t\tresult.cancelled,\n\t\t\t\tresult.truncated ? ({ truncated: true, content: result.output } as TruncationResult) : undefined,\n\t\t\t\tresult.fullOutputPath,\n\t\t\t);\n\n\t\t\t// Record the result in session\n\t\t\tthis.session.recordBashResult(command, result, { excludeFromContext });\n\t\t\tthis.bashComponent = undefined;\n\t\t\tthis.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\t// Normal execution path (possibly with custom operations)\n\t\tconst isDeferred = this.session.isStreaming;\n\t\tthis.bashComponent = new BashExecutionComponent(command, this.ui, excludeFromContext);\n\n\t\tif (isDeferred) {\n\t\t\t// Show in pending area when agent is streaming\n\t\t\tthis.pendingMessagesContainer.addChild(this.bashComponent);\n\t\t\tthis.pendingBashComponents.push(this.bashComponent);\n\t\t} else {\n\t\t\t// Show in chat immediately when agent is idle\n\t\t\tthis.chatContainer.addChild(this.bashComponent);\n\t\t}\n\t\tthis.ui.requestRender();\n\n\t\ttry {\n\t\t\tconst result = await this.session.executeBash(\n\t\t\t\tcommand,\n\t\t\t\t(chunk) => {\n\t\t\t\t\tif (this.bashComponent) {\n\t\t\t\t\t\tthis.bashComponent.appendOutput(chunk);\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ excludeFromContext, operations: eventResult?.operations },\n\t\t\t);\n\n\t\t\tif (this.bashComponent) {\n\t\t\t\tthis.bashComponent.setComplete(\n\t\t\t\t\tresult.exitCode,\n\t\t\t\t\tresult.cancelled,\n\t\t\t\t\tresult.truncated ? ({ truncated: true, content: result.output } as TruncationResult) : undefined,\n\t\t\t\t\tresult.fullOutputPath,\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (this.bashComponent) {\n\t\t\t\tthis.bashComponent.setComplete(undefined, false);\n\t\t\t}\n\t\t\tthis.showError(`Bash command failed: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t}\n\n\t\tthis.bashComponent = undefined;\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate async handleCompactCommand(customInstructions?: string): Promise<void> {\n\t\tconst entries = this.sessionManager.getEntries();\n\t\tconst messageCount = entries.filter((e) => e.type === \"message\").length;\n\n\t\tif (messageCount < 2) {\n\t\t\tthis.showWarning(\"Nothing to compact (no messages yet)\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.clearStatusIndicator();\n\n\t\ttry {\n\t\t\tawait this.session.compact(customInstructions);\n\t\t} catch {\n\t\t\t// Ignore, will be emitted as an event\n\t\t}\n\t}\n\n\tstop(fullscreenExitOutput?: FullscreenExitOutput): void {\n\t\tInteractiveMode.restoreCompactionEscapeOverride(this);\n\t\tthis.streamingReveal.stop();\n\t\tthis.toolResultReveal.stop();\n\t\tthis.disposeActiveSelector();\n\t\tif (this.settingsManager.getShowTerminalProgress()) {\n\t\t\tthis.ui.terminal.setProgress(false);\n\t\t}\n\t\tthis.clearStatusIndicator();\n\t\tthis.clearPendingTools();\n\t\tthis.stopChatToolAnimations();\n\t\tthis.clearActiveToolExecutionStatus();\n\t\tthis.clearToolHookStatuses();\n\t\tthis.themeController.disableAutoSync();\n\t\tthis.clearExtensionTerminalInputListeners();\n\t\tthis.footer.dispose();\n\t\tthis.footerDataProvider.dispose();\n\t\tif (this.unsubscribe) {\n\t\t\tthis.unsubscribe();\n\t\t}\n\t\tif (this.isInitialized) {\n\t\t\ttry {\n\t\t\t\tthis.stopInteractiveTui(fullscreenExitOutput ?? this.settingsManager.getFullscreenExitOutput());\n\t\t\t} finally {\n\t\t\t\tthis.isInitialized = false;\n\t\t\t\trestoreInteractiveStderr();\n\t\t\t}\n\t\t} else {\n\t\t\trestoreInteractiveStderr();\n\t\t}\n\t\tthis.unregisterSignalHandlers();\n\t}\n}\n"]}
|
|
1
|
+
{"version":3,"file":"interactive-mode.js","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode.ts"],"names":[],"mapp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AK,CAAC;gBAC3B,wBAAwB,EAAE,CAAC;YAC5B,CAAC;QACF,CAAC;aAAM,CAAC;YACP,wBAAwB,EAAE,CAAC;QAC5B,CAAC;QACD,IAAI,CAAC,wBAAwB,EAAE,CAAC;IACjC,CAAC","sourcesContent":["/**\n * Interactive mode for the coding agent.\n * Handles TUI rendering and user interaction, delegating business logic to AgentSession.\n */\n\nimport * as fs from \"node:fs\";\nimport * as os from \"node:os\";\nimport * as path from \"node:path\";\nimport type { AgentMessage, ThinkingLevel } from \"@earendil-works/pi-agent-core\";\nimport type { AuthEvent, AuthPrompt } from \"@earendil-works/pi-ai\";\nimport type { AssistantMessage, ImageContent, Message, Model, TextContent, Usage } from \"@earendil-works/pi-ai/compat\";\nimport type {\n\tAutocompleteItem,\n\tAutocompleteProvider,\n\tEditorComponent,\n\tKeybinding,\n\tKeyId,\n\tMarkdownTheme,\n\tOverlayHandle,\n\tOverlayOptions,\n\tSlashCommand,\n\tTerminal,\n\tTuiMainScreenRenderState,\n} from \"@earendil-works/pi-tui\";\nimport * as TuiLayouts from \"@earendil-works/pi-tui\";\nimport {\n\tCombinedAutocompleteProvider,\n\ttype Component,\n\tContainer,\n\tfuzzyFilter,\n\tgetCapabilities,\n\thyperlink,\n\ttype LoaderIndicatorOptions,\n\tMarkdown,\n\tmatchesKey,\n\touterKittyGraphicsMode,\n\tProcessTerminal,\n\tSpacer,\n\tsanitizeTerminalLabel,\n\tsetKeybindings,\n\tText,\n\tTruncatedText,\n\ttype TUI,\n\tTuiAltScreen,\n\tTuiMainScreen,\n\tvisibleWidth,\n} from \"@earendil-works/pi-tui\";\nimport chalk from \"chalk\";\nimport { spawn, spawnSync } from \"child_process\";\nimport {\n\tAPP_NAME,\n\tAPP_TITLE,\n\tBRAND,\n\tCONFIG_DIR_NAME,\n\tDISPLAY_VERSION,\n\texpandTildePath,\n\tgetAgentDir,\n\tgetAuthPath,\n\tgetDebugLogPath,\n\tgetDocsPath,\n\tgetShareViewerUrl,\n\tVERSION,\n} from \"../../config.ts\";\nimport { type AgentSession, type AgentSessionEvent, parseSkillBlock } from \"../../core/agent-session.ts\";\nimport { type AgentSessionRuntime, SessionImportFileNotFoundError } from \"../../core/agent-session-runtime.ts\";\nimport { isApiKeyLoginProvider } from \"../../core/auth-providers.ts\";\nimport { envValue } from \"../../core/brand.ts\";\nimport {\n\tCACHE_TTL_MS,\n\ttype CacheMiss,\n\tcollectCacheMisses,\n\tcomputeCacheWaste,\n\tdetectCacheMiss,\n} from \"../../core/cache-stats.ts\";\nimport type {\n\tAutocompleteProviderFactory,\n\tEditorFactory,\n\tExtensionCommandContext,\n\tExtensionContext,\n\tExtensionRunner,\n\tExtensionUIContext,\n\tExtensionUIDialogOptions,\n\tExtensionWidgetOptions,\n\tMarkdownTransformer,\n\tProjectTrustContext,\n\tWorkingIndicatorOptions,\n} from \"../../core/extensions/index.ts\";\nimport { buildNoticeBox, type NoticeSpec } from \"../../core/extensions/notice/index.ts\";\nimport { FooterDataProvider, type ReadonlyFooterDataProvider } from \"../../core/footer-data-provider.ts\";\nimport { appendHiddenTuiStdout } from \"../../core/hidden-stdout-log.ts\";\nimport { buildHighReasoningWarning } from \"../../core/high-reasoning-warning.ts\";\nimport { configureHttpDispatcher, formatHttpIdleTimeoutMs } from \"../../core/http-dispatcher.ts\";\nimport { type AppKeybinding, KeybindingsManager } from \"../../core/keybindings.ts\";\nimport { createCompactionSummaryMessage } from \"../../core/messages.ts\";\nimport {\n\tdefaultModelPerProvider,\n\tfindExactModelReferenceMatch,\n\ttype PatternResolution,\n\tresolveModelScope,\n\tresolveModelScopeFromModels,\n\tresolveModelScopeWithDiagnostics,\n\ttype ScopedModel,\n} from \"../../core/model-resolver.ts\";\nimport { CredentialSynchronizationError } from \"../../core/model-runtime.ts\";\nimport type { ResourceDiagnostic } from \"../../core/resource-loader.ts\";\nimport { formatMissingSessionCwdPrompt, MissingSessionCwdError } from \"../../core/session-cwd.ts\";\nimport { createSessionLogger, type SessionLogger } from \"../../core/session-log.ts\";\nimport { type SessionEntry, SessionManager, sessionEntryToContextMessages } from \"../../core/session-manager.ts\";\nimport type { FullscreenExitOutput, TuiMode } from \"../../core/settings-manager.ts\";\nimport { BUILTIN_SLASH_COMMANDS } from \"../../core/slash-commands.ts\";\nimport type { SourceInfo } from \"../../core/source-info.ts\";\nimport { isInstallTelemetryEnabled } from \"../../core/telemetry.ts\";\nimport { formatTimings, time } from \"../../core/timings.ts\";\nimport type { TruncationResult } from \"../../core/tools/truncate.ts\";\nimport { hasTrustRequiringProjectResources, ProjectTrustStore } from \"../../core/trust-manager.ts\";\nimport { getUsageCostBreakdown } from \"../../core/usage-totals.ts\";\nimport {\n\tconsumeEarlyInspectorVmImportRecoveries,\n\tINSPECTOR_VM_IMPORT_WARNING,\n\tisRecoverableInspectorVmImportError,\n} from \"../../inspector-policy.ts\";\nimport { getChangelogPath, getNewEntries, normalizeChangelogLinks, parseChangelog } from \"../../utils/changelog.ts\";\nimport { copyToClipboard, readClipboardText } from \"../../utils/clipboard.ts\";\nimport { readClipboardImage } from \"../../utils/clipboard-image.ts\";\nimport { parseGitUrl } from \"../../utils/git.ts\";\nimport { processImage } from \"../../utils/image-process.ts\";\nimport { openBrowser } from \"../../utils/open-browser.ts\";\nimport { getCwdRelativePath } from \"../../utils/paths.ts\";\nimport { getPiUserAgent } from \"../../utils/pi-user-agent.ts\";\nimport { killTrackedDetachedChildren } from \"../../utils/shell.ts\";\nimport { ensureTool, type ToolStatus } from \"../../utils/tools-manager.ts\";\nimport { checkForNewPiVersion, getReleaseChangelogUrl } from \"../../utils/version-check.ts\";\nimport { abortedErrorLabel } from \"./aborted-error-label.ts\";\nimport {\n\ttype CompactionQueuedMessage,\n\ttransferCompactionQueue,\n\twaitForPromptDisposition,\n} from \"./compaction-queue-transfer.ts\";\nimport { ArminComponent } from \"./components/armin.ts\";\nimport { AssistantMessageComponent } from \"./components/assistant-message.ts\";\nimport { BashExecutionComponent } from \"./components/bash-execution.ts\";\nimport { BorderedLoader } from \"./components/bordered-loader.ts\";\nimport { BranchSummaryMessageComponent } from \"./components/branch-summary-message.ts\";\nimport { CompactionSummaryMessageComponent } from \"./components/compaction-summary-message.ts\";\nimport { ContinuityNoticeTracker } from \"./components/continuity-notice.ts\";\nimport { CustomEditor } from \"./components/custom-editor.ts\";\nimport { CustomEntryComponent } from \"./components/custom-entry.ts\";\nimport { CustomMessageComponent } from \"./components/custom-message.ts\";\nimport { DaxnutsComponent } from \"./components/daxnuts.ts\";\nimport { DynamicBorder } from \"./components/dynamic-border.ts\";\nimport { EarendilAnnouncementComponent } from \"./components/earendil-announcement.ts\";\nimport { ExtensionEditorComponent } from \"./components/extension-editor.ts\";\nimport { ExtensionInputComponent } from \"./components/extension-input.ts\";\nimport { ExtensionSelectorComponent } from \"./components/extension-selector.ts\";\nimport { FavoriteModelsSelectorComponent } from \"./components/favorite-models-selector.ts\";\nimport { FooterComponent, formatTokens } from \"./components/footer.ts\";\nimport { formatKeyText, keyDisplayText, keyHint, keyText, rawKeyHint } from \"./components/keybinding-hints.ts\";\nimport { LoginDialogComponent } from \"./components/login-dialog.ts\";\nimport { createMermaidMarkdownTransformer } from \"./components/mermaid.ts\";\nimport {\n\ttype FavoriteModelIds,\n\tgetModelFullId,\n\tmergeFavoritePatternsForPersist,\n} from \"./components/model-favorites.ts\";\nimport { ModelSelectorComponent } from \"./components/model-selector.ts\";\nimport {\n\ttype AuthSelectorProvider,\n\tformatAuthSelectorProviderType,\n\tOAuthSelectorComponent,\n} from \"./components/oauth-selector.ts\";\nimport { ScopedModelsSelectorComponent } from \"./components/scoped-models-selector.ts\";\nimport { SessionSelectorComponent } from \"./components/session-selector.ts\";\nimport { SettingsSelectorComponent } from \"./components/settings-selector.ts\";\nimport { classifyEditorInput, ShortcutOverlay, shouldShowShortcutOverlay } from \"./components/shortcut-overlay.ts\";\nimport { SkillInvocationMessageComponent } from \"./components/skill-invocation-message.ts\";\nimport {\n\tBranchSummaryStatusIndicator,\n\tCompactionStatusIndicator,\n\tIdleStatus,\n\tRetryStatusIndicator,\n\ttype StatusIndicator,\n\tWorkingStatusIndicator,\n} from \"./components/status-indicator.ts\";\nimport { ToolExecutionComponent } from \"./components/tool-execution.ts\";\nimport { TreeSelectorComponent } from \"./components/tree-selector.ts\";\nimport { TrustSelectorComponent } from \"./components/trust-selector.ts\";\nimport { UserMessageComponent } from \"./components/user-message.ts\";\nimport { UserMessageSelectorComponent } from \"./components/user-message-selector.ts\";\nimport { expandEditorSubmission, expandSubmittedText, transferEditorContent } from \"./editor-paste-transfer.ts\";\nimport { formatExtensionErrorHeadline, sanitizeTuiErrorMessage } from \"./extension-error-format.ts\";\nimport { editFileInExternalEditor, editInExternalEditor } from \"./external-editor.ts\";\nimport { GrokChrome, type InteractiveChrome, type InteractiveFooter } from \"./grok/chrome.ts\";\nimport { restoreInteractiveStderr, takeOverInteractiveStderr } from \"./interactive-stderr-guard.ts\";\nimport { applyKeybindingsFileEdit, seedKeybindingsFile } from \"./keybindings-command.ts\";\nimport { refreshModelCatalogs } from \"./model-catalog-refresh.ts\";\nimport { getModelSearchText } from \"./model-search.ts\";\nimport { isRiskyMainModel, RISKY_MAIN_MODEL_WARNING } from \"./risky-main-model-warning.ts\";\nimport { DEFAULT_SMOOTH_FPS, StreamingRevealController } from \"./streaming-reveal.ts\";\nimport {\n\tgetAvailableThemes,\n\tgetAvailableThemesWithPaths,\n\tgetEditorTheme,\n\tgetMarkdownTheme,\n\tgetThemeByName,\n\tonThemeChange,\n\tsetRegisteredThemes,\n\tstopThemeWatcher,\n\tTheme,\n\ttype ThemeColor,\n\ttheme,\n} from \"./theme/theme.ts\";\nimport { InteractiveThemeController } from \"./theme/theme-controller.ts\";\nimport { buildFavoriteCycleStatusMessage } from \"./tips/favorite-messages.ts\";\nimport { recordTipShown } from \"./tips/history-writer.ts\";\nimport { TIP_DEFINITIONS } from \"./tips/registry.ts\";\nimport { appendStartupHeader } from \"./tips/startup-header.ts\";\nimport { resolveStartupTipLine } from \"./tips/startup-tip.ts\";\nimport { resolveWorkingTipLine, WorkingTipCache, type WorkingTipLine } from \"./tips/working-tip.ts\";\nimport { buildTmuxSetupWarning } from \"./tmux-setup.ts\";\nimport { ToolArgsRevealController } from \"./tool-args-reveal.ts\";\nimport { readToolProgress } from \"./tool-progress.ts\";\nimport { ToolResultRevealController } from \"./tool-result-reveal.ts\";\nimport {\n\tblendWorkingStatusShimmerRgbColor,\n\tformatActiveToolWorkingLabel,\n\tformatToolHookStatusMessageFrame,\n\tformatWorkingStatusMessageFrame,\n\tlargeSessionWorkingStatusInterval,\n\tsanitizeWorkingStatusPlainText,\n\ttype WorkingStatusRgbColor,\n} from \"./working-status.ts\";\n\n/** Interface for components that can be expanded/collapsed */\ninterface Expandable {\n\tsetExpanded(expanded: boolean): void;\n}\n\nfunction llamaCppPostLoginGuidance(actionLabel: string, loadedModelCount: number): string {\n\treturn loadedModelCount === 0\n\t\t? `${actionLabel}. No llama.cpp models are loaded. Use /llama to load a model, then /model to select it.`\n\t\t: `${actionLabel}. Use /model to select a loaded llama.cpp model, or /llama to manage models.`;\n}\n\nfunction isExpandable(obj: unknown): obj is Expandable {\n\treturn typeof obj === \"object\" && obj !== null && \"setExpanded\" in obj && typeof obj.setExpanded === \"function\";\n}\n\nclass ExpandableText extends Text implements Expandable {\n\tprivate readonly getCollapsedText: () => string;\n\tprivate readonly getExpandedText: () => string;\n\n\tconstructor(\n\t\tgetCollapsedText: () => string,\n\t\tgetExpandedText: () => string,\n\t\texpanded = false,\n\t\tpaddingX = 0,\n\t\tpaddingY = 0,\n\t) {\n\t\tsuper(expanded ? getExpandedText() : getCollapsedText(), paddingX, paddingY);\n\t\tthis.getCollapsedText = getCollapsedText;\n\t\tthis.getExpandedText = getExpandedText;\n\t}\n\n\tsetExpanded(expanded: boolean): void {\n\t\tthis.setText(expanded ? this.getExpandedText() : this.getCollapsedText());\n\t}\n}\n\ntype ToolExecutionStartEvent = Extract<AgentSessionEvent, { type: \"tool_execution_start\" }>;\ntype ToolExecutionEndEvent = Extract<AgentSessionEvent, { type: \"tool_execution_end\" }>;\ntype ToolHookStatusStartEvent = Extract<AgentSessionEvent, { type: \"tool_hook_status\"; phase: \"start\" }>;\ntype ToolHookStatusEvent = Extract<AgentSessionEvent, { type: \"tool_hook_status\" }>;\n\ntype PendingZeroDelayRetryIndicator = {\n\tfallbackApplied: boolean;\n};\n\nexport function shouldShowRetryIndicator(delayMs: number, fallbackApplied: boolean): boolean {\n\treturn delayMs !== 0 || !fallbackApplied;\n}\n\nfunction getStreamingToolCallPartialJson(content: unknown): string | undefined {\n\tif (typeof content !== \"object\" || content === null || !(\"partialJson\" in content)) return undefined;\n\treturn typeof content.partialJson === \"string\" ? content.partialJson : undefined;\n}\n\nfunction formatToolHookTerminalTitle(event: ToolHookStatusStartEvent): string {\n\tconst hookName = sanitizeWorkingStatusPlainText(event.hookName) || \"hook\";\n\tconst statusMessage = sanitizeWorkingStatusPlainText(event.statusMessage);\n\treturn `${APP_TITLE} - ${hookName}: ${statusMessage}`;\n}\n\ntype CompactionCostNotice = {\n\ttype: \"compaction_cost\";\n\tkind: \"compaction\" | \"branch_summary\";\n\tusage: Usage;\n};\n\ntype RenderSessionItem = AgentMessage | Extract<SessionEntry, { type: \"custom\" }> | CompactionCostNotice;\n\nfunction isCustomSessionEntry(item: RenderSessionItem): item is Extract<SessionEntry, { type: \"custom\" }> {\n\treturn \"type\" in item && item.type === \"custom\";\n}\n\nfunction isCompactionCostNotice(item: RenderSessionItem): item is CompactionCostNotice {\n\treturn \"type\" in item && item.type === \"compaction_cost\";\n}\n\nconst DEAD_TERMINAL_ERROR_CODES = new Set([\"EIO\", \"EPIPE\", \"ENOTCONN\"]);\nconst DEFAULT_WORKING_STATUS_REFRESH_INTERVAL_MS = 600;\nconst DEFAULT_WORKING_STATUS_MESSAGE_ANIMATION_INTERVAL_MS = 32;\nconst LARGE_SESSION_WORKING_STATUS_REFRESH_INTERVAL_MS = 60_000;\nconst LARGE_SESSION_WORKING_STATUS_MESSAGE_INTERVAL_MS = 1_000;\nconst FALLBACK_STATUS_KEY = \"fallback\";\nconst RGB_FOREGROUND_PATTERN = /\\x1b\\[38;2;(\\d+);(\\d+);(\\d+)m/;\n\nconst DARK_DEFAULT_WORKING_TEXT_RGB: WorkingStatusRgbColor = {\n\tr: 229,\n\tg: 229,\n\tb: 231,\n};\nconst LIGHT_DEFAULT_WORKING_TEXT_RGB: WorkingStatusRgbColor = {\n\tr: 17,\n\tg: 17,\n\tb: 17,\n};\nconst DARK_DEFAULT_WORKING_BASE_RGB: WorkingStatusRgbColor = {\n\tr: 102,\n\tg: 102,\n\tb: 102,\n};\nconst LIGHT_DEFAULT_WORKING_BASE_RGB: WorkingStatusRgbColor = {\n\tr: 118,\n\tg: 118,\n\tb: 118,\n};\n\nfunction parseAnsiRgbForeground(ansi: string): WorkingStatusRgbColor | undefined {\n\tconst match = RGB_FOREGROUND_PATTERN.exec(ansi);\n\tconst red = match?.[1];\n\tconst green = match?.[2];\n\tconst blue = match?.[3];\n\tif (red === undefined || green === undefined || blue === undefined) {\n\t\treturn undefined;\n\t}\n\treturn {\n\t\tr: Number.parseInt(red, 10),\n\t\tg: Number.parseInt(green, 10),\n\t\tb: Number.parseInt(blue, 10),\n\t};\n}\n\nfunction isWorkingLightTheme(): boolean {\n\treturn theme.name?.toLowerCase().includes(\"light\") ?? false;\n}\n\nfunction formatWorkingStatusShimmerText(text: string, intensity: number): string {\n\tif (theme.getColorMode() !== \"truecolor\") {\n\t\tif (intensity < 0.2) {\n\t\t\treturn theme.fg(\"dim\", text);\n\t\t}\n\t\tif (intensity < 0.6) {\n\t\t\treturn theme.fg(\"text\", text);\n\t\t}\n\t\treturn theme.bold(theme.fg(\"text\", text));\n\t}\n\n\tconst lightTheme = isWorkingLightTheme();\n\tconst highlight =\n\t\tparseAnsiRgbForeground(theme.getFgAnsi(\"dim\")) ??\n\t\t(lightTheme ? LIGHT_DEFAULT_WORKING_BASE_RGB : DARK_DEFAULT_WORKING_BASE_RGB);\n\tconst base =\n\t\tparseAnsiRgbForeground(theme.getFgAnsi(\"text\")) ??\n\t\t(lightTheme ? LIGHT_DEFAULT_WORKING_TEXT_RGB : DARK_DEFAULT_WORKING_TEXT_RGB);\n\tconst color = blendWorkingStatusShimmerRgbColor(highlight, base, intensity * 0.9);\n\treturn `\\x1b[1m\\x1b[38;2;${color.r};${color.g};${color.b}m${text}\\x1b[39m\\x1b[22m`;\n}\n\nfunction isDeadTerminalError(error: unknown): boolean {\n\tif (!error || typeof error !== \"object\" || !(\"code\" in error)) {\n\t\treturn false;\n\t}\n\tconst code = (error as NodeJS.ErrnoException).code;\n\treturn code !== undefined && DEAD_TERMINAL_ERROR_CODES.has(code);\n}\n\nconst ANTHROPIC_SUBSCRIPTION_AUTH_WARNING =\n\t\"Anthropic subscription auth is active. Third-party harness usage draws from extra usage and is billed per token, not your Claude plan limits. Manage extra usage at https://claude.ai/settings/usage. Disable this warning in /settings.\";\n\nfunction isAnthropicSubscriptionAuthKey(apiKey: string | undefined): boolean {\n\treturn typeof apiKey === \"string\" && apiKey.startsWith(\"sk-ant-oat\");\n}\n\nfunction isUnknownModel(model: Model<any> | undefined): boolean {\n\treturn !!model && model.provider === \"unknown\" && model.id === \"unknown\" && model.api === \"unknown\";\n}\n\nfunction quoteIfNeeded(value: string): string {\n\tif (value.length > 0 && !/[^a-zA-Z0-9_\\-./~:@]/.test(value)) {\n\t\treturn value;\n\t}\n\treturn `'${value.replace(/'/g, `'\\\\''`)}'`;\n}\n\nexport function formatResumeCommand(sessionManager: SessionManager): string | undefined {\n\tif (!process.stdout.isTTY) return undefined;\n\tif (!sessionManager.isPersisted()) return undefined;\n\n\tconst sessionFile = sessionManager.getSessionFile();\n\tif (!sessionFile || !fs.existsSync(sessionFile)) return undefined;\n\n\tconst args = [APP_NAME];\n\tif (!sessionManager.usesDefaultSessionDir()) {\n\t\targs.push(\"--session-dir\", quoteIfNeeded(sessionManager.getSessionDir()));\n\t}\n\targs.push(\"--session\", sessionManager.getSessionId());\n\treturn args.join(\" \");\n}\n\nfunction hasDefaultModelProvider(providerId: string): providerId is keyof typeof defaultModelPerProvider {\n\treturn providerId in defaultModelPerProvider;\n}\n\n// isApiKeyLoginProvider now lives in core/auth-providers.ts so RPC clients and\n// the classic selectors share ONE source of truth. Re-exported here to keep the\n// existing public import (test/oauth-selector.test.ts) working, and used\n// locally by getLoginProviderOptions below.\nexport { isApiKeyLoginProvider };\n\ntype LoginProviderCompletionOption = {\n\tid: string;\n\tname: string;\n\tauthTypes: AuthSelectorProvider[\"authType\"][];\n};\n\nconst AUTH_TYPE_ORDER = { oauth: 0, api_key: 1 } satisfies Record<AuthSelectorProvider[\"authType\"], number>;\n\nfunction createFuzzyAutocompleteItems<T>(\n\titems: T[],\n\tprefix: string,\n\tgetSearchText: (item: T) => string,\n\ttoAutocompleteItem: (item: T) => AutocompleteItem,\n): AutocompleteItem[] | null {\n\tconst filtered = fuzzyFilter(items, prefix, getSearchText);\n\tif (filtered.length === 0) return null;\n\treturn filtered.map(toAutocompleteItem);\n}\n\nfunction getLoginProviderCompletionOptions(\n\tproviderOptions: readonly AuthSelectorProvider[],\n): LoginProviderCompletionOption[] {\n\tconst byId = new Map<string, LoginProviderCompletionOption>();\n\tfor (const provider of providerOptions) {\n\t\tconst existing = byId.get(provider.id);\n\t\tif (existing) {\n\t\t\tif (!existing.authTypes.includes(provider.authType)) {\n\t\t\t\texisting.authTypes.push(provider.authType);\n\t\t\t\texisting.authTypes.sort((a, b) => AUTH_TYPE_ORDER[a] - AUTH_TYPE_ORDER[b]);\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tbyId.set(provider.id, {\n\t\t\tid: provider.id,\n\t\t\tname: provider.name,\n\t\t\tauthTypes: [provider.authType],\n\t\t});\n\t}\n\treturn Array.from(byId.values()).sort((a, b) => a.name.localeCompare(b.name));\n}\n\nfunction getLoginProviderSearchText(provider: LoginProviderCompletionOption): string {\n\tconst authTypes = provider.authTypes\n\t\t.map((authType) => `${authType} ${formatAuthSelectorProviderType(authType)}`)\n\t\t.join(\" \");\n\treturn `${provider.id} ${provider.name} ${authTypes}`;\n}\n\nfunction formatLoginProviderCompletionDescription(provider: LoginProviderCompletionOption): string {\n\tconst authTypes = provider.authTypes.map(formatAuthSelectorProviderType).join(\"/\");\n\treturn provider.name === provider.id ? authTypes : `${provider.name} · ${authTypes}`;\n}\n\n/** A user submission: editor text plus the images resolved from its `[Image #N]` markers. */\ninterface InteractiveUserInput {\n\ttext: string;\n\timages?: ImageContent[];\n}\n\n/** Local copy of pi-tui's image-marker pattern so submission scanning never mutates a shared /g regex. */\nconst IMAGE_MARKER_PATTERN = /\\[Image #([1-9]\\d*)\\]/g;\n\n/**\n * The InteractiveMode collaborators {@link attachClipboardImage} needs. Passed\n * explicitly (rather than as `this`) so the paste handler stays a free function\n * on the prototype and remains callable with a minimal borrowed receiver.\n */\ninterface ClipboardImageDeps {\n\teditor: EditorComponent;\n\tpendingImages: Map<number, ImageContent>;\n\tsettings: { getBlockImages(): boolean; getImageAutoResize(): boolean };\n\t/** True while the compaction queue is active; the queue carries text only, so pasted images are dropped with a visible status. */\n\tisCompacting: () => boolean;\n\tshowStatus: (message: string) => void;\n\trequestRender: () => void;\n}\n\n/**\n * Attach a clipboard bitmap as an in-memory image behind an atomic\n * `[Image #N]` marker. Returns false when nothing was attached, so the caller\n * falls through to the plain-text clipboard path.\n *\n * The bytes deliberately never touch the filesystem: writing a temp file and\n * inserting its path as literal text (the previous behavior) shipped an\n * unreadable `/var/folders/.../pi-clipboard-<uuid>.png` string to the model and\n * attached no image at all.\n */\nasync function attachClipboardImage(\n\tdeps: ClipboardImageDeps,\n\timage: { bytes: Uint8Array; mimeType: string },\n): Promise<boolean> {\n\tif (deps.settings.getBlockImages()) {\n\t\t// Pinned behavior: nothing is attached and nothing is inserted, but the\n\t\t// paste is never a silent no-op - the user must learn why their screenshot\n\t\t// vanished, and which setting to flip.\n\t\tdeps.showStatus(\"Image paste blocked by the images.blockImages setting\");\n\t\treturn false;\n\t}\n\tif (!deps.editor.insertImageMarker) {\n\t\t// A marker-unaware editor cannot keep the marker atomic, and a dead literal\n\t\t// `[Image #N]` with a live payload behind it would misnumber every other\n\t\t// attachment at submit.\n\t\tdeps.showStatus(\"Image paste is not supported by the active editor\");\n\t\treturn false;\n\t}\n\tif (deps.isCompacting()) {\n\t\t// The compaction queue carries text only; an attachment queued behind\n\t\t// compaction would be silently lost at delivery, so drop it here with a\n\t\t// visible status. Consume the paste (true) - the clipboard holds a\n\t\t// bitmap, so the plain-text fallback has nothing useful to insert.\n\t\tdeps.showStatus(\n\t\t\t\"Image paste dropped: messages sent during compaction cannot carry images - paste again after compaction finishes\",\n\t\t);\n\t\treturn true;\n\t}\n\n\tconst processed = await processImage(image.bytes, image.mimeType, {\n\t\tautoResizeImages: deps.settings.getImageAutoResize(),\n\t});\n\tif (!processed.ok) {\n\t\tdeps.showStatus(processed.message);\n\t\treturn false;\n\t}\n\n\t// insertImageMarker fires onImageMarkersChanged (with the pre-renumber\n\t// ids) synchronously and only then returns the marker's FINAL canonical id,\n\t// whose slot the reconcile pass just vacated - so this write can neither\n\t// land in an orphaned map (reconcile mutates pendingImages in place) nor\n\t// overwrite a surviving payload (the new marker had no payload when the\n\t// reconcile ran, so nothing was keyed onto its slot).\n\tconst id = deps.editor.insertImageMarker();\n\tdeps.pendingImages.set(id, {\n\t\ttype: \"image\",\n\t\tdata: processed.data,\n\t\tmimeType: processed.mimeType,\n\t});\n\tdeps.requestRender();\n\treturn true;\n}\n\n/**\n * Options for InteractiveMode initialization.\n */\nexport interface InteractiveModeOptions {\n\t/** Renderer mode for the interactive terminal. */\n\tuiMode?: TuiMode;\n\t/** Providers that were migrated to auth.json (shows warning) */\n\tmigratedProviders?: string[];\n\t/** Warning message if session model couldn't be restored */\n\tmodelFallbackMessage?: string;\n\t/** Cwd to trust after reload if it gained a .pi directory during this implicitly trusted session. */\n\tautoTrustOnReloadCwd?: string;\n\t/** Initial message to send on startup (can include @file content) */\n\tinitialMessage?: string;\n\t/** Images to attach to the initial message */\n\tinitialImages?: ImageContent[];\n\tinitialTitlePrompt?: string;\n\t/** Additional messages to send after the initial message */\n\tinitialMessages?: string[];\n\t/** Force verbose startup (overrides quietStartup setting) */\n\tverbose?: boolean;\n\t/** Select an experimental interactive chrome. */\n\tchrome?: InteractiveChrome | \"grok\";\n\t/** TUI layout mode. */\n\ttuiMode?: TuiMode;\n\t/** Initial interactive theme setting for this invocation. */\n\tinitialThemeSetting?: string;\n}\n\ninterface InteractiveTuiOptions {\n\ttuiMode: TuiMode;\n\tshowHardwareCursor: boolean;\n\tlogDirectory: string;\n\tterminal?: Terminal;\n\tonRightClickPaste?: () => void;\n}\n\n/** Composition root for selecting the interactive terminal renderer. */\nexport function createInteractiveTui(options: InteractiveTuiOptions): TuiMainScreen | TuiAltScreen {\n\tconst terminal = options.terminal ?? new ProcessTerminal({ onExternalStdoutWrite: appendHiddenTuiStdout });\n\tif (options.tuiMode === \"fullscreen\") {\n\t\tconst styleSearchMatch = (text: string) => theme.bg(\"searchMatchBg\", theme.fg(\"searchMatchText\", text));\n\t\treturn new TuiAltScreen(terminal, options.showHardwareCursor, options.logDirectory, {\n\t\t\tsearchMatchStyle: (text) => theme.underline(styleSearchMatch(text)),\n\t\t\tsearchCurrentMatchStyle: (text) => theme.bold(theme.inverse(styleSearchMatch(text))),\n\t\t\topenUrl: openBrowser,\n\t\t\tonRightClickPaste: options.onRightClickPaste,\n\t\t\tcopySelection: async (text) => {\n\t\t\t\ttry {\n\t\t\t\t\tawait copyToClipboard(text);\n\t\t\t\t\treturn true;\n\t\t\t\t} catch {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t},\n\t\t});\n\t}\n\treturn new TuiMainScreen(terminal, options.showHardwareCursor, options.logDirectory);\n}\n\n/** Stable reference for components while InteractiveMode replaces the active renderer. */\nexport function createInteractiveTuiReference(getTui: () => TUI): TUI {\n\treturn new Proxy({} as TUI, {\n\t\tget: (_target, property) => {\n\t\t\tconst tui = getTui();\n\t\t\tconst value = Reflect.get(tui, property, tui);\n\t\t\tif (typeof value !== \"function\") return value;\n\t\t\tlet methodTui = tui;\n\t\t\tlet method = value;\n\t\t\treturn (...args: unknown[]) => {\n\t\t\t\tconst currentTui = getTui();\n\t\t\t\tif (currentTui !== methodTui) {\n\t\t\t\t\tconst currentMethod = Reflect.get(currentTui, property, currentTui);\n\t\t\t\t\tif (typeof currentMethod !== \"function\") {\n\t\t\t\t\t\tthrow new TypeError(`TUI property ${String(property)} is not callable`);\n\t\t\t\t\t}\n\t\t\t\t\tmethodTui = currentTui;\n\t\t\t\t\tmethod = currentMethod;\n\t\t\t\t}\n\t\t\t\treturn Reflect.apply(method, methodTui, args);\n\t\t\t};\n\t\t},\n\t\tset: (_target, property, value) => {\n\t\t\tconst tui = getTui();\n\t\t\treturn Reflect.set(tui, property, value, tui);\n\t\t},\n\t\thas: (_target, property) => Reflect.has(getTui(), property),\n\t\tgetPrototypeOf: () => Reflect.getPrototypeOf(getTui()),\n\t});\n}\n\nexport class InteractiveMode {\n\tprivate static restoreCompactionEscapeOverride(host: InteractiveMode): void {\n\t\tif (!host.compactionEscapeOverrideActive) return;\n\t\thost.defaultEditor.onEscape = host.autoCompactionEscapeHandler;\n\t\thost.autoCompactionEscapeHandler = undefined;\n\t\thost.compactionEscapeOverrideActive = false;\n\t}\n\n\tprivate runtimeHost: AgentSessionRuntime;\n\tprivate options: InteractiveModeOptions;\n\tprivate chrome: InteractiveChrome | undefined;\n\tprivate renderer: TuiMainScreen | TuiAltScreen;\n\tprivate ui: TUI;\n\tprivate mainScreenRenderState: TuiMainScreenRenderState | undefined;\n\tprivate loadedResourcesContainer: Container;\n\tprivate chatContainer: Container;\n\tprivate documentContainer: Container;\n\tprivate transcriptScrollView: TuiLayouts.ScrollView | undefined;\n\tprivate fullscreenLayoutRoot: Component | undefined;\n\tprivate pendingMessagesContainer: Container;\n\tprivate statusContainer: Container;\n\tprivate readonly sessionShownTipIds = new Set<string>();\n\tprivate shortcutOverlay: ShortcutOverlay | undefined;\n\tprivate lastEditorText = \"\";\n\tprivate lastInputWasPaste = false;\n\tprivate sessionLogger: SessionLogger | undefined;\n\tprivate readonly continuityNotices = new ContinuityNoticeTracker();\n\tprivate readonly turnWorkingTip = new WorkingTipCache();\n\tprivate hookStatusContainer: Container;\n\tprivate defaultEditor: CustomEditor;\n\tprivate editor: EditorComponent;\n\tprivate editorComponentFactory: EditorFactory | undefined;\n\tprivate autocompleteProvider: AutocompleteProvider | undefined;\n\tprivate autocompleteProviderWrappers: AutocompleteProviderFactory[] = [];\n\tprivate fdPath: string | undefined;\n\tprivate editorContainer: Container;\n\tprivate footer: InteractiveFooter;\n\tprivate activeSelectorToken?: object;\n\tprivate activeSelectorDispose?: () => void;\n\tprivate footerContainer: Container;\n\tprivate footerDataProvider: FooterDataProvider;\n\t// Stored so the same manager can be injected into custom editors, selectors, and extension UI.\n\tprivate keybindings: KeybindingsManager;\n\tprivate version: string;\n\tprivate isInitialized = false;\n\tprivate onInputCallback?: (input: InteractiveUserInput) => void;\n\tprivate pendingUserInputs: InteractiveUserInput[] = [];\n\t/**\n\t * Clipboard images pasted into the composer, keyed by their visible\n\t * `[Image #N]` marker number. The editor stores marker ids only, so these\n\t * bytes must live here (and survive an editor swap, which discards the\n\t * editor instance). Kept aligned with the displayed numbers by\n\t * {@link reconcilePendingImages}.\n\t */\n\tprivate pendingImages = new Map<number, ImageContent>();\n\t/**\n\t * Images pre-resolved by handleFollowUp's non-streaming branch, which hands\n\t * off through the public string-only `onSubmit(text)` API. Set BEFORE that\n\t * path's `setText(\"\")` (whose prune chain destroys pendingImages) and\n\t * captured-then-cleared UNCONDITIONALLY at the submit-handler entry: slash,\n\t * extension and bash submissions return before the consuming branch, and a\n\t * field cleared only after use would leak a stale image into a later\n\t * ordinary submission that never references it.\n\t */\n\tprivate preResolvedSubmissionImages?: ImageContent[];\n\tprivate activeStatusIndicator: StatusIndicator | undefined = undefined;\n\tprivate readonly idleStatus = new IdleStatus();\n\tprivate workingMessage: string | undefined = undefined;\n\tprivate workingVisible = true;\n\tprivate workingIndicatorOptions: WorkingIndicatorOptions | undefined = undefined;\n\tprivate workingStartedAt: number | undefined = undefined;\n\tprivate readonly defaultWorkingMessage = \"Working\";\n\tprivate readonly defaultHiddenThinkingLabel = \"Thinking...\";\n\tprivate hiddenThinkingLabel = this.defaultHiddenThinkingLabel;\n\tprivate activeToolExecutions = new Map<string, string>();\n\tprivate activeToolExecutionTerminalTitle: string | undefined = undefined;\n\tprivate workingMessageBeforeActiveTool: string | undefined = undefined;\n\tprivate activeToolHooks = new Map<string, ToolHookStatusStartEvent>();\n\tprivate hookStatusIntervalId: NodeJS.Timeout | undefined = undefined;\n\tprivate activeToolTerminalTitle: string | undefined = undefined;\n\tprivate extensionTerminalTitle: string | undefined = undefined;\n\n\tprivate lastSigintTime = 0;\n\tprivate lastEscapeTime = 0;\n\tprivate changelogMarkdown: string | undefined = undefined;\n\tprivate startupNoticesShown = false;\n\tprivate anthropicSubscriptionWarningShown = false;\n\n\t// Status line tracking (for mutating immediately-sequential status updates)\n\tprivate lastStatusSpacer: Spacer | undefined = undefined;\n\tprivate lastStatusText: Text | undefined = undefined;\n\tprivate managedToolStatusStarted = false;\n\n\t// Streaming message tracking\n\tprivate streamingComponent: AssistantMessageComponent | undefined = undefined;\n\tprivate streamingMessage: AssistantMessage | undefined = undefined;\n\tprivate readonly streamingReveal: StreamingRevealController;\n\tprivate readonly toolArgsReveal: ToolArgsRevealController;\n\tprivate readonly toolResultReveal: ToolResultRevealController;\n\n\t// Tool execution tracking: toolCallId -> component\n\tprivate pendingTools = new Map<string, ToolExecutionComponent>();\n\tprivate requestStreamingRender(): void {\n\t\tthis.ui.requestRender();\n\t}\n\tprivate applySmoothStreamingRenderFps(): void {\n\t\tconst fps = this.settingsManager.getSmoothStreaming()\n\t\t\t? this.settingsManager.getSmoothStreamingFps()\n\t\t\t: DEFAULT_SMOOTH_FPS;\n\t\tthis.ui.setMaxRenderFps(fps);\n\t}\n\n\t// Tool output expansion state\n\tprivate toolOutputExpanded = false;\n\n\t// Thinking block visibility state\n\tprivate hideThinkingBlock = false;\n\tprivate outputPad = 1;\n\tprivate readonly mermaidMarkdownTransformer: MarkdownTransformer = createMermaidMarkdownTransformer({\n\t\tgetMode: () => this.settingsManager.getMermaidRenderingMode(),\n\t\ttheme,\n\t});\n\n\t// Skill commands: command name -> skill file path\n\tprivate skillCommands = new Map<string, string>();\n\n\t// Agent subscription unsubscribe function\n\tprivate unsubscribe?: () => void;\n\tprivate signalCleanupHandlers: Array<() => void> = [];\n\n\t// Track if editor is in bash mode (text starts with !)\n\tprivate isBashMode = false;\n\n\t// Track current bash execution component\n\tprivate bashComponent: BashExecutionComponent | undefined = undefined;\n\n\t// Track pending bash components (shown in pending area, moved to chat on submit)\n\tprivate pendingBashComponents: BashExecutionComponent[] = [];\n\n\t// Auto-compaction state\n\tprivate autoCompactionEscapeHandler?: () => void;\n\tprivate compactionEscapeOverrideActive = false;\n\tprivate autoCompactionProgressText = \"\";\n\n\t// Auto-retry state\n\tprivate retryEscapeHandler?: () => void;\n\tprivate fallbackAppliedBeforeRetryStart = false;\n\tprivate pendingZeroDelayRetryIndicator: PendingZeroDelayRetryIndicator | undefined = undefined;\n\n\t// Messages queued while compaction is running\n\tprivate compactionQueuedMessages: CompactionQueuedMessage[] = [];\n\tprivate compactionInFlightMessages: CompactionQueuedMessage[] = [];\n\tprivate compactionTransferAbortControllers = new Map<CompactionQueuedMessage, AbortController>();\n\tprivate compactionQueueFlushTail: Promise<void> | undefined;\n\tprivate compactionQueueGeneration = 0;\n\n\t// Shutdown state\n\tprivate shutdownRequested = false;\n\n\t// Extension UI state\n\tprivate extensionSelector: ExtensionSelectorComponent | undefined = undefined;\n\tprivate extensionInput: ExtensionInputComponent | undefined = undefined;\n\tprivate extensionEditor: ExtensionEditorComponent | undefined = undefined;\n\tprivate extensionTerminalInputSubscriptions = new Set<{\n\t\thandler: (data: string) => { consume?: boolean; data?: string } | undefined;\n\t\tunsubscribe: () => void;\n\t}>();\n\n\t// Extension widgets (components rendered above/below the editor)\n\tprivate extensionWidgetsAbove = new Map<string, Component & { dispose?(): void }>();\n\tprivate extensionWidgetsBelow = new Map<string, Component & { dispose?(): void }>();\n\tprivate widgetContainerAbove!: Container;\n\tprivate widgetContainerBelow!: Container;\n\n\t// Custom footer from extension (undefined = use built-in footer)\n\tprivate customFooter: (Component & { dispose?(): void }) | undefined = undefined;\n\n\t// Header container that holds the built-in or custom header\n\tprivate headerContainer: Container;\n\n\t// Built-in header (logo + keybinding hints + changelog)\n\tprivate builtInHeader: Component | undefined = undefined;\n\n\t// Custom header from extension (undefined = use built-in header)\n\tprivate customHeader: (Component & { dispose?(): void }) | undefined = undefined;\n\n\tprivate readonly onRightClickPaste = (): void => {\n\t\tvoid this.handleRightClickPaste();\n\t};\n\tprivate autoTrustOnReloadCwd: string | undefined;\n\tprivate themeController: InteractiveThemeController;\n\n\t// Convenience accessors\n\tprivate get session(): AgentSession {\n\t\treturn this.runtimeHost.session;\n\t}\n\tprivate get sessionManager() {\n\t\treturn this.session.sessionManager;\n\t}\n\tprivate get settingsManager() {\n\t\treturn this.session.settingsManager;\n\t}\n\n\tconstructor(runtimeHost: AgentSessionRuntime, options: InteractiveModeOptions = {}) {\n\t\tthis.runtimeHost = runtimeHost;\n\t\tconst tuiMode = options.tuiMode ?? this.settingsManager.getTuiMode();\n\t\tthis.options = { ...options, tuiMode };\n\t\tthis.chrome = options.chrome === \"grok\" ? new GrokChrome() : options.chrome;\n\t\tthis.autoTrustOnReloadCwd = options.autoTrustOnReloadCwd;\n\t\tthis.runtimeHost.setBeforeSessionInvalidate(() => {\n\t\t\tInteractiveMode.restoreCompactionEscapeOverride(this);\n\t\t\tthis.resetExtensionUI();\n\t\t});\n\t\tthis.runtimeHost.setRebindSession(async () => {\n\t\t\tawait this.rebindCurrentSession({ renderBeforeBind: true });\n\t\t\tawait this.themeController.applyFromSettings();\n\t\t});\n\t\tthis.version = DISPLAY_VERSION;\n\t\tthis.renderer = createInteractiveTui({\n\t\t\ttuiMode,\n\t\t\tshowHardwareCursor: this.settingsManager.getShowHardwareCursor(),\n\t\t\tlogDirectory: getAgentDir(),\n\t\t\tonRightClickPaste: this.onRightClickPaste,\n\t\t});\n\t\tthis.ui = createInteractiveTuiReference(() => this.renderer);\n\t\tthis.streamingReveal = new StreamingRevealController({\n\t\t\tgetSmoothStreaming: () => this.settingsManager.getSmoothStreaming(),\n\t\t\tgetSmoothStreamingFps: () => this.settingsManager.getSmoothStreamingFps(),\n\t\t\tgetHideThinkingBlock: () => this.hideThinkingBlock,\n\t\t\trequestRender: () => this.ui.requestRender(),\n\t\t});\n\t\tthis.toolArgsReveal = new ToolArgsRevealController({\n\t\t\tgetSmoothStreaming: () => this.settingsManager.getSmoothStreaming(),\n\t\t\tgetSmoothStreamingFps: () => this.settingsManager.getSmoothStreamingFps(),\n\t\t\trequestRender: () => this.ui.requestRender(),\n\t\t});\n\t\tthis.toolResultReveal = new ToolResultRevealController({\n\t\t\tgetSmoothStreaming: () => this.settingsManager.getSmoothStreaming(),\n\t\t\tgetSmoothStreamingFps: () => this.settingsManager.getSmoothStreamingFps(),\n\t\t\trequestRender: () => this.ui.requestRender(),\n\t\t});\n\t\tthis.applySmoothStreamingRenderFps();\n\t\tthis.ui.setClearOnShrink(this.settingsManager.getClearOnShrink());\n\t\tthis.headerContainer = new Container();\n\t\tthis.loadedResourcesContainer = new Container();\n\t\tthis.chatContainer = new Container();\n\t\tthis.documentContainer = new Container();\n\t\tthis.documentContainer.addChild(this.headerContainer);\n\t\tthis.documentContainer.addChild(this.loadedResourcesContainer);\n\t\tthis.documentContainer.addChild(this.chatContainer);\n\t\tthis.pendingMessagesContainer = new Container();\n\t\tthis.statusContainer = new Container();\n\t\tthis.hookStatusContainer = new Container();\n\t\tthis.widgetContainerAbove = new Container();\n\t\tthis.widgetContainerBelow = new Container();\n\t\tthis.keybindings = KeybindingsManager.create();\n\t\tsetKeybindings(this.keybindings);\n\t\tconst editorPaddingX = this.settingsManager.getEditorPaddingX();\n\t\tconst autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();\n\t\tif (this.chrome) {\n\t\t\tthis.defaultEditor = this.chrome.createBaseEditor({\n\t\t\t\tui: this.ui,\n\t\t\t\tkeybindings: this.keybindings,\n\t\t\t\teditorOptions: { paddingX: editorPaddingX, autocompleteMaxVisible },\n\t\t\t});\n\t\t} else {\n\t\t\tthis.defaultEditor = new CustomEditor(this.ui, getEditorTheme(), this.keybindings, {\n\t\t\t\tpaddingX: editorPaddingX,\n\t\t\t\tautocompleteMaxVisible,\n\t\t\t});\n\t\t}\n\t\tthis.editor = this.defaultEditor;\n\t\tthis.editorContainer = new Container();\n\t\tthis.editorContainer.addChild(this.editor as Component);\n\t\tthis.footerDataProvider = new FooterDataProvider(this.sessionManager.getCwd());\n\t\tthis.footer = this.chrome\n\t\t\t? this.chrome.createFooter(this.session, this.footerDataProvider)\n\t\t\t: new FooterComponent(this.session, this.footerDataProvider);\n\t\tthis.footer.setAutoCompactEnabled(this.session.autoCompactionEnabled);\n\t\tthis.footerContainer = new Container();\n\t\tthis.footerContainer.addChild(this.footer);\n\n\t\t// Load hide thinking block setting\n\t\tthis.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();\n\t\tthis.outputPad = this.settingsManager.getOutputPad();\n\n\t\t// Register themes from resource loader and initialize\n\t\tsetRegisteredThemes(this.session.resourceLoader.getThemes().themes);\n\t\tthis.themeController = new InteractiveThemeController(this.ui, {\n\t\t\tgetSettingsManager: () => this.settingsManager,\n\t\t\tshowError: (message) => this.showError(message),\n\t\t\tonChanged: () => this.updateEditorBorderColor(),\n\t\t\tinitialThemeSetting: options.initialThemeSetting,\n\t\t});\n\t}\n\n\tprivate getAutocompleteSourceTag(sourceInfo?: SourceInfo): string | undefined {\n\t\tif (!sourceInfo) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst scopePrefix = sourceInfo.scope === \"user\" ? \"u\" : sourceInfo.scope === \"project\" ? \"p\" : \"t\";\n\t\tconst source = sourceInfo.source.trim();\n\n\t\tif (source === \"auto\" || source === \"local\" || source === \"cli\") {\n\t\t\treturn scopePrefix;\n\t\t}\n\n\t\tif (source.startsWith(\"npm:\")) {\n\t\t\treturn `${scopePrefix}:${source}`;\n\t\t}\n\n\t\tconst gitSource = parseGitUrl(source);\n\t\tif (gitSource) {\n\t\t\tconst ref = gitSource.ref ? `@${gitSource.ref}` : \"\";\n\t\t\treturn `${scopePrefix}:git:${gitSource.host}/${gitSource.path}${ref}`;\n\t\t}\n\n\t\treturn scopePrefix;\n\t}\n\n\tprivate prefixAutocompleteDescription(description: string | undefined, sourceInfo?: SourceInfo): string | undefined {\n\t\tconst sourceTag = this.getAutocompleteSourceTag(sourceInfo);\n\t\tif (!sourceTag) {\n\t\t\treturn description;\n\t\t}\n\t\treturn description ? `[${sourceTag}] ${description}` : `[${sourceTag}]`;\n\t}\n\n\tprivate getBuiltInCommandConflictDiagnostics(extensionRunner: ExtensionRunner): ResourceDiagnostic[] {\n\t\tconst builtinNames = new Set(BUILTIN_SLASH_COMMANDS.map((command) => command.name));\n\t\treturn extensionRunner\n\t\t\t.getRegisteredCommands()\n\t\t\t.filter((command) => builtinNames.has(command.name))\n\t\t\t.map((command) => ({\n\t\t\t\ttype: \"warning\" as const,\n\t\t\t\tmessage:\n\t\t\t\t\tcommand.invocationName === command.name\n\t\t\t\t\t\t? `Extension command '/${command.name}' conflicts with built-in interactive command. Skipping in autocomplete.`\n\t\t\t\t\t\t: `Extension command '/${command.name}' conflicts with built-in interactive command. Available as '/${command.invocationName}'.`,\n\t\t\t\tpath: command.sourceInfo.path,\n\t\t\t}));\n\t}\n\n\tprivate createBaseAutocompleteProvider(): AutocompleteProvider {\n\t\t// Define commands for autocomplete\n\t\tconst slashCommands: SlashCommand[] = BUILTIN_SLASH_COMMANDS.map((command) => ({\n\t\t\tname: command.name,\n\t\t\tdescription: command.description,\n\t\t\t...(command.argumentHint && { argumentHint: command.argumentHint }),\n\t\t}));\n\n\t\tconst modelCommand = slashCommands.find((command) => command.name === \"model\");\n\t\tif (modelCommand) {\n\t\t\tmodelCommand.getArgumentCompletions = (prefix: string): AutocompleteItem[] | null => {\n\t\t\t\tconst models =\n\t\t\t\t\tthis.session.scopedModels.length > 0\n\t\t\t\t\t\t? this.session.scopedModels.map((s) => s.model)\n\t\t\t\t\t\t: this.session.modelRuntime.getAvailableSnapshot();\n\n\t\t\t\tif (models.length === 0) return null;\n\n\t\t\t\t// Create items with provider/id format\n\t\t\t\tconst items = models.map((m) => ({\n\t\t\t\t\tid: m.id,\n\t\t\t\t\tprovider: m.provider,\n\t\t\t\t\tname: m.name,\n\t\t\t\t\tlabel: `${m.provider}/${m.id}`,\n\t\t\t\t}));\n\n\t\t\t\treturn createFuzzyAutocompleteItems(items, prefix, getModelSearchText, (item) => ({\n\t\t\t\t\tvalue: item.label,\n\t\t\t\t\tlabel: item.id,\n\t\t\t\t\tdescription: item.provider,\n\t\t\t\t}));\n\t\t\t};\n\t\t}\n\n\t\tconst loginCommand = slashCommands.find((command) => command.name === \"login\");\n\t\tif (loginCommand) {\n\t\t\tloginCommand.getArgumentCompletions = (prefix: string): AutocompleteItem[] | null => {\n\t\t\t\tconst providers = getLoginProviderCompletionOptions(this.getLoginProviderOptions());\n\t\t\t\treturn createFuzzyAutocompleteItems(providers, prefix, getLoginProviderSearchText, (provider) => ({\n\t\t\t\t\tvalue: provider.id,\n\t\t\t\t\tlabel: provider.id,\n\t\t\t\t\tdescription: formatLoginProviderCompletionDescription(provider),\n\t\t\t\t}));\n\t\t\t};\n\t\t}\n\n\t\t// Convert prompt templates to SlashCommand format for autocomplete\n\t\tconst templateCommands: SlashCommand[] = this.session.promptTemplates.map((cmd) => ({\n\t\t\tname: cmd.name,\n\t\t\tdescription: this.prefixAutocompleteDescription(cmd.description, cmd.sourceInfo),\n\t\t\t...(cmd.argumentHint && { argumentHint: cmd.argumentHint }),\n\t\t}));\n\n\t\t// Convert extension commands to SlashCommand format\n\t\tconst builtinCommandNames = new Set(slashCommands.map((c) => c.name));\n\t\tconst extensionCommands: SlashCommand[] = this.session.extensionRunner\n\t\t\t.getRegisteredCommands()\n\t\t\t.filter((cmd) => !builtinCommandNames.has(cmd.name))\n\t\t\t.map((cmd) => ({\n\t\t\t\tname: cmd.invocationName,\n\t\t\t\tdescription: this.prefixAutocompleteDescription(cmd.description, cmd.sourceInfo),\n\t\t\t\tgetArgumentCompletions: cmd.getArgumentCompletions,\n\t\t\t}));\n\n\t\t// Build skill commands from session.skills (if enabled)\n\t\tthis.skillCommands.clear();\n\t\tconst skillCommandList: SlashCommand[] = [];\n\t\tif (this.settingsManager.getEnableSkillCommands()) {\n\t\t\tfor (const skill of this.session.resourceLoader.getSkills().skills) {\n\t\t\t\tconst commandName = `skill:${skill.name}`;\n\t\t\t\tthis.skillCommands.set(commandName, skill.filePath);\n\t\t\t\tskillCommandList.push({\n\t\t\t\t\tname: commandName,\n\t\t\t\t\tdescription: this.prefixAutocompleteDescription(skill.description, skill.sourceInfo),\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\treturn new CombinedAutocompleteProvider(\n\t\t\t[...slashCommands, ...templateCommands, ...extensionCommands, ...skillCommandList],\n\t\t\tthis.sessionManager.getCwd(),\n\t\t\tthis.fdPath,\n\t\t);\n\t}\n\n\tprivate setupAutocompleteProvider(): void {\n\t\tlet provider = this.createBaseAutocompleteProvider();\n\t\tconst triggerCharacters: string[] = [];\n\t\tfor (const wrapProvider of this.autocompleteProviderWrappers) {\n\t\t\tprovider = wrapProvider(provider);\n\t\t\ttriggerCharacters.push(...(provider.triggerCharacters ?? []));\n\t\t}\n\t\tif (triggerCharacters.length > 0) {\n\t\t\tprovider.triggerCharacters = [...new Set(triggerCharacters)];\n\t\t}\n\n\t\tthis.autocompleteProvider = provider;\n\t\tthis.defaultEditor.setAutocompleteProvider(provider);\n\t\tif (this.editor !== this.defaultEditor) {\n\t\t\tthis.editor.setAutocompleteProvider?.(provider);\n\t\t}\n\t}\n\n\tprivate showStartupNoticesIfNeeded(): void {\n\t\tif (this.startupNoticesShown) {\n\t\t\treturn;\n\t\t}\n\t\tthis.startupNoticesShown = true;\n\n\t\tif (!this.changelogMarkdown) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.chatContainer.children.length > 0) {\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t}\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t\tif (this.settingsManager.getCollapseChangelog()) {\n\t\t\tconst versionMatch = this.changelogMarkdown.match(/##\\s+\\[?(\\d+\\.\\d+\\.\\d+)\\]?/);\n\t\t\tconst latestVersion = versionMatch ? versionMatch[1] : this.version;\n\t\t\tconst condensedText = `Updated to v${latestVersion}. Use ${theme.bold(\"/changelog\")} to view full changelog.`;\n\t\t\tthis.chatContainer.addChild(new Text(condensedText, 1, 0));\n\t\t} else {\n\t\t\tthis.chatContainer.addChild(new Text(theme.bold(theme.fg(\"accent\", \"What's New\")), 1, 0));\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\tthis.chatContainer.addChild(\n\t\t\t\tnew Markdown(this.changelogMarkdown.trim(), 1, 0, this.getMarkdownThemeWithSettings()),\n\t\t\t);\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t}\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t}\n\n\tprivate mountInteractiveTui(tui: TuiMainScreen | TuiAltScreen, components: readonly Component[]): void {\n\t\tfor (const component of components) tui.addChild(component);\n\t\tif (TuiLayouts.isViewportTUI(tui)) {\n\t\t\tif (!this.fullscreenLayoutRoot) throw new Error(\"Fullscreen layout is not initialized\");\n\t\t\ttui.setLayoutRoot(this.fullscreenLayoutRoot);\n\t\t}\n\t}\n\n\tprivate stopInteractiveTui(fullscreenExitOutput: FullscreenExitOutput): void {\n\t\tif (this.renderer.mode === \"fullscreen\" && fullscreenExitOutput === \"transcript\") {\n\t\t\twhile (this.renderer.hasOverlayEntries) this.renderer.hideOverlay();\n\t\t\tthis.switchTuiMode(\"regular\", false, false);\n\t\t\tthis.renderer.renderNow();\n\t\t}\n\t\tthis.ui.stop({ preserveScreen: this.renderer.mode === \"fullscreen\" });\n\t}\n\n\tprivate switchTuiMode(mode: TuiMode, restoreProgress = true, startRenderer = true): boolean {\n\t\tconst previousUi = this.renderer;\n\t\tif (mode === previousUi.mode) return true;\n\t\tif (previousUi.hasOverlayEntries) return false;\n\n\t\tconst components = [...previousUi.children];\n\t\tconst focus = previousUi.getFocusedComponent();\n\t\tconst terminal = previousUi.terminal;\n\t\tconst showHardwareCursor = previousUi.getShowHardwareCursor();\n\t\tconst clearOnShrink = previousUi.getClearOnShrink();\n\t\tconst onDebug = previousUi.onDebug;\n\t\tif (previousUi instanceof TuiMainScreen) {\n\t\t\tthis.mainScreenRenderState = previousUi.captureRenderState();\n\t\t}\n\n\t\tpreviousUi.stop({ preserveScreen: true });\n\t\tpreviousUi.setFocus(null);\n\t\tpreviousUi.clear();\n\t\tif (TuiLayouts.isViewportTUI(previousUi)) previousUi.setLayoutRoot(undefined);\n\n\t\tconst nextUi = createInteractiveTui({\n\t\t\ttuiMode: mode,\n\t\t\tshowHardwareCursor,\n\t\t\tlogDirectory: getAgentDir(),\n\t\t\tterminal,\n\t\t\tonRightClickPaste: this.onRightClickPaste,\n\t\t});\n\t\tnextUi.setClearOnShrink(clearOnShrink);\n\t\tnextUi.onDebug = onDebug;\n\t\tif (nextUi instanceof TuiMainScreen && this.mainScreenRenderState) {\n\t\t\tnextUi.restoreRenderState(this.mainScreenRenderState);\n\t\t}\n\t\tthis.renderer = nextUi;\n\t\tthis.options.tuiMode = mode;\n\t\tthis.mountInteractiveTui(nextUi, components);\n\t\tnextUi.invalidate();\n\t\tnextUi.setFocus(focus);\n\t\tif (!startRenderer) return true;\n\t\tnextUi.start();\n\t\tthis.themeController.rebindTui();\n\t\tthis.rebindExtensionTerminalInputListeners();\n\t\tif (\n\t\t\trestoreProgress &&\n\t\t\tthis.settingsManager.getShowTerminalProgress() &&\n\t\t\t(this.session.isStreaming || this.session.isCompacting)\n\t\t) {\n\t\t\tterminal.setProgress(true);\n\t\t}\n\t\treturn true;\n\t}\n\n\tasync init(): Promise<void> {\n\t\tif (this.isInitialized) return;\n\n\t\tthis.registerSignalHandlers();\n\n\t\t// Load changelog (only show new entries, skip for resumed sessions)\n\t\tthis.changelogMarkdown = this.getChangelogForDisplay();\n\n\t\tif (this.session.scopedModels.length > 0 && (this.options.verbose || !this.settingsManager.getQuietStartup())) {\n\t\t\tconst modelList = this.session.scopedModels\n\t\t\t\t.map((sm) => {\n\t\t\t\t\tconst thinkingStr = sm.thinkingLevel ? `:${sm.thinkingLevel}` : \"\";\n\t\t\t\t\treturn `${sm.model.id}${thinkingStr}`;\n\t\t\t\t})\n\t\t\t\t.join(\", \");\n\t\t\tconst cycleKeys = this.keybindings.getKeys(\"app.model.cycleForward\");\n\t\t\tconst cycleHint =\n\t\t\t\tcycleKeys.length > 0\n\t\t\t\t\t? theme.fg(\"muted\", ` (${formatKeyText(cycleKeys.join(\"/\"), { capitalize: true })} to cycle)`)\n\t\t\t\t\t: \"\";\n\t\t\tconsole.log(theme.fg(\"dim\", `Model scope: ${modelList}${cycleHint}`));\n\t\t}\n\n\t\t// Keep one component tree and remount it when changing renderers.\n\t\tthis.renderWidgets(); // Initialize with default spacer\n\t\tthis.transcriptScrollView = new TuiLayouts.ScrollView(this.documentContainer, {\n\t\t\tfollow: \"end\",\n\t\t\tprimary: true,\n\t\t\toverscroll: \"chain\",\n\t\t\tscrollbar: this.settingsManager.getFullscreenScrollbar(),\n\t\t\tscrollbarStyle: (text) => theme.bg(\"scrollbarThumb\", text),\n\t\t});\n\t\tconst dock = new TuiLayouts.VStack([\n\t\t\t{ component: this.pendingMessagesContainer, shrink: 1, minSize: 0 },\n\t\t\t{ component: this.statusContainer, shrink: 1, minSize: 0 },\n\t\t\t{ component: this.hookStatusContainer, shrink: 1, minSize: 0 },\n\t\t\t{ component: this.widgetContainerAbove, shrink: 1, minSize: 0 },\n\t\t\t{ component: this.editorContainer, shrink: 1, minSize: 3 },\n\t\t\t{ component: this.widgetContainerBelow, shrink: 1, minSize: 0 },\n\t\t\t{ component: this.footerContainer, shrink: 1, minSize: 1 },\n\t\t]);\n\t\tthis.fullscreenLayoutRoot = new TuiLayouts.VStack([\n\t\t\t{\n\t\t\t\tcomponent: this.transcriptScrollView,\n\t\t\t\tbasis: 0,\n\t\t\t\tgrow: 1,\n\t\t\t\tshrink: 1,\n\t\t\t\tminSize: 1,\n\t\t\t},\n\t\t\t{ component: dock, basis: \"auto\", grow: 0, shrink: 1, minSize: 1 },\n\t\t]);\n\t\tconst rootComponents = [\n\t\t\tthis.documentContainer,\n\t\t\tthis.pendingMessagesContainer,\n\t\t\tthis.statusContainer,\n\t\t\tthis.hookStatusContainer,\n\t\t\tthis.widgetContainerAbove,\n\t\t\tthis.editorContainer,\n\t\t\tthis.widgetContainerBelow,\n\t\t\tthis.footerContainer,\n\t\t];\n\t\tif (this.chrome) {\n\t\t\tfor (const component of this.chrome.arrangeRoot(rootComponents, this.ui)) this.renderer.addChild(component);\n\t\t} else {\n\t\t\tthis.mountInteractiveTui(this.renderer, rootComponents);\n\t\t}\n\t\t// Accept text while startup completes, but only enable interrupt, exit, and submission feedback.\n\t\t// Renderer-only lifecycle hosts may mount the chrome tree without constructing the base editor.\n\t\tif (this.defaultEditor) {\n\t\t\tthis.defaultEditor.onAction(\"app.clear\", () => this.handleCtrlC());\n\t\t\tthis.defaultEditor.onCtrlD = () => this.handleCtrlD();\n\t\t\tthis.defaultEditor.onSubmit = (text) => this.handleStartupSubmit(text);\n\t\t}\n\t\tthis.ui.setFocus(this.editor);\n\n\t\t// Start the UI before initializing extensions so session_start handlers can use interactive dialogs\n\t\ttry {\n\t\t\ttakeOverInteractiveStderr();\n\t\t\tthis.ui.start();\n\t\t} catch (error) {\n\t\t\trestoreInteractiveStderr();\n\t\t\tthrow error;\n\t\t}\n\t\tthis.isInitialized = true;\n\n\t\tawait this.themeController.applyFromSettings();\n\n\t\t// Add header with keybindings from config (unless silenced)\n\t\tif (this.chrome) {\n\t\t\tthis.builtInHeader = this.chrome.createWelcomeContent(APP_NAME, this.version);\n\t\t\tthis.headerContainer.addChild(new Spacer(1));\n\t\t\tthis.headerContainer.addChild(this.builtInHeader);\n\t\t\tthis.headerContainer.addChild(new Spacer(1));\n\t\t} else if (this.options.verbose || !this.settingsManager.getQuietStartup()) {\n\t\t\tconst logo = theme.bold(theme.fg(\"accent\", APP_NAME)) + theme.fg(\"dim\", ` v${this.version}`);\n\n\t\t\t// Build startup instructions using keybinding hint helpers\n\t\t\tconst hint = (keybinding: AppKeybinding, description: string) => keyHint(keybinding, description);\n\n\t\t\tconst expandedInstructions = [\n\t\t\t\thint(\"app.interrupt\", \"to interrupt\"),\n\t\t\t\thint(\"app.clear\", \"to clear\"),\n\t\t\t\trawKeyHint(`${keyText(\"app.clear\")} twice`, \"to exit\"),\n\t\t\t\thint(\"app.exit\", \"to exit (empty)\"),\n\t\t\t\thint(\"app.suspend\", \"to suspend\"),\n\t\t\t\tkeyHint(\"tui.editor.deleteToLineEnd\", \"to delete to end\"),\n\t\t\t\thint(\"app.thinking.cycle\", \"to cycle thinking level\"),\n\t\t\t\trawKeyHint(`${keyText(\"app.model.cycleForward\")}/${keyText(\"app.model.cycleBackward\")}`, \"to cycle models\"),\n\t\t\t\thint(\"app.model.select\", \"to select model\"),\n\t\t\t\thint(\"app.tools.expand\", \"to expand tools\"),\n\t\t\t\thint(\"app.thinking.toggle\", \"to expand thinking\"),\n\t\t\t\thint(\"app.editor.external\", \"for external editor\"),\n\t\t\t\trawKeyHint(\"/\", \"for commands\"),\n\t\t\t\trawKeyHint(\"!\", \"to run bash\"),\n\t\t\t\trawKeyHint(\"!!\", \"to run bash (no context)\"),\n\t\t\t\thint(\"app.message.followUp\", \"to queue follow-up\"),\n\t\t\t\thint(\"app.message.dequeue\", \"to edit all queued messages\"),\n\t\t\t\thint(\"app.clipboard.pasteImage\", \"to paste image (with text fallback)\"),\n\t\t\t\trawKeyHint(\"drop files\", \"to attach\"),\n\t\t\t].join(\"\\n\");\n\t\t\tconst compactInstructions = [\n\t\t\t\thint(\"app.interrupt\", \"interrupt\"),\n\t\t\t\trawKeyHint(`${keyText(\"app.clear\")}/${keyText(\"app.exit\")}`, \"clear/exit\"),\n\t\t\t\trawKeyHint(\"/\", \"commands\"),\n\t\t\t\trawKeyHint(\"!\", \"bash\"),\n\t\t\t\thint(\"app.tools.expand\", \"more\"),\n\t\t\t].join(theme.fg(\"muted\", \" · \"));\n\t\t\tconst compactOnboarding = theme.fg(\n\t\t\t\t\"dim\",\n\t\t\t\t`Press ${keyText(\"app.tools.expand\")} to show full startup help and loaded resources.`,\n\t\t\t);\n\t\t\tconst startupTip = resolveStartupTipLine({\n\t\t\t\ttipsEnabled: this.settingsManager.getTipsEnabled(),\n\t\t\t\tquietStartup: this.settingsManager.getQuietStartup(),\n\t\t\t\thistory: this.settingsManager.getTipsHistory(),\n\t\t\t\tnow: Date.now(),\n\t\t\t\tdefinitions: TIP_DEFINITIONS,\n\t\t\t\tkeys: keyText,\n\t\t\t\thasCommand: (command) => this.hasRegisteredCommand(command),\n\t\t\t});\n\t\t\tif (startupTip) {\n\t\t\t\tthis.recordShownTip(startupTip.tipId);\n\t\t\t}\n\t\t\tconst tipLine = startupTip ? theme.fg(\"dim\", startupTip.line) : undefined;\n\t\t\tconst onboarding = theme.fg(\n\t\t\t\t\"dim\",\n\t\t\t\t`Pi can explain its own features and look up its docs. Ask it how to use or extend Pi.`,\n\t\t\t);\n\t\t\tthis.builtInHeader = new ExpandableText(\n\t\t\t\t() => `${logo}\\n${compactInstructions}\\n${compactOnboarding}\\n\\n${onboarding}`,\n\t\t\t\t() => `${logo}\\n${expandedInstructions}\\n\\n${onboarding}`,\n\t\t\t\tthis.getStartupExpansionState(),\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t);\n\n\t\t\tappendStartupHeader(this.headerContainer, this.builtInHeader, tipLine);\n\t\t} else {\n\t\t\t// Minimal header when silenced\n\t\t\tthis.builtInHeader = new Text(\"\", 0, 0);\n\t\t\tthis.headerContainer.addChild(this.builtInHeader);\n\t\t}\n\t\tthis.ui.requestRender();\n\n\t\t// Ensure fd and rg are available after mounting the TUI (downloads if missing, adds to PATH via getBinDir)\n\t\t// so slow downloads do not make startup appear frozen.\n\t\t// Both are needed: fd for autocomplete, rg for grep tool and bash commands.\n\t\tconst [fdPath] = await Promise.all([\n\t\t\tensureTool(\"fd\", (status) => this.showManagedToolStatus(status)),\n\t\t\tensureTool(\"rg\", (status) => this.showManagedToolStatus(status)),\n\t\t]);\n\t\tthis.fdPath = fdPath;\n\n\t\t// Enable the remaining input handlers only after managed-tool setup completes.\n\t\tthis.setupKeyHandlers();\n\t\tthis.setupEditorSubmitHandler();\n\t\tthis.ui.requestRender();\n\n\t\t// Initialize extensions first so resources are shown before messages\n\t\tawait this.rebindCurrentSession();\n\n\t\t// Render initial messages AFTER showing loaded resources\n\t\tthis.renderInitialMessages();\n\n\t\t// Set up theme file watcher\n\t\tonThemeChange(() => {\n\t\t\tthis.ui.invalidate();\n\t\t\tthis.updateEditorBorderColor();\n\t\t\tthis.ui.requestRender();\n\t\t});\n\n\t\t// Set up git branch watcher (uses provider instead of footer)\n\t\tthis.footerDataProvider.onBranchChange(() => {\n\t\t\tthis.ui.requestRender();\n\t\t});\n\n\t\t// Initialize available provider count for footer display\n\t\tthis.updateAvailableProviderCount();\n\t}\n\n\t/**\n\t * Update terminal title with session name and cwd.\n\t */\n\tprivate getNormalTerminalTitle(): string {\n\t\tconst cwdBasename = path.basename(this.sessionManager.getCwd());\n\t\tconst sessionName = this.sessionManager.getSessionName();\n\t\tif (sessionName) {\n\t\t\treturn `${APP_TITLE} - ${sessionName} - ${cwdBasename}`;\n\t\t}\n\t\treturn `${APP_TITLE} - ${cwdBasename}`;\n\t}\n\n\tprivate applyTerminalTitle(): void {\n\t\tthis.ui.terminal.setTitle(\n\t\t\tthis.activeToolTerminalTitle ??\n\t\t\t\tthis.activeToolExecutionTerminalTitle ??\n\t\t\t\tthis.extensionTerminalTitle ??\n\t\t\t\tthis.getNormalTerminalTitle(),\n\t\t);\n\t}\n\n\tprivate updateTerminalTitle(): void {\n\t\tthis.applyTerminalTitle();\n\t}\n\n\t/**\n\t * Run the interactive mode. This is the main entry point.\n\t * Initializes the UI, shows warnings, processes initial messages, and starts the interactive loop.\n\t */\n\tasync run(): Promise<void> {\n\t\tawait this.init();\n\n\t\tif (!envValue(\"OFFLINE\")) {\n\t\t\tconst controller = new AbortController();\n\t\t\tconst timeout = setTimeout(() => controller.abort(), 15_000);\n\t\t\tvoid refreshModelCatalogs(this.session.modelRuntime, controller.signal)\n\t\t\t\t.then(() => {\n\t\t\t\t\tthis.updateAvailableProviderCount();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t})\n\t\t\t\t.catch(() => {})\n\t\t\t\t.finally(() => clearTimeout(timeout));\n\t\t}\n\n\t\t// Start version check asynchronously\n\t\tcheckForNewPiVersion(this.version).then((newVersion) => {\n\t\t\tif (newVersion) {\n\t\t\t\tthis.showNewVersionNotification(newVersion.version);\n\t\t\t}\n\t\t});\n\n\t\t// Start package update check asynchronously\n\t\tthis.checkForPackageUpdates()\n\t\t\t.then((updates) => {\n\t\t\t\tif (updates.length > 0) {\n\t\t\t\t\tthis.showPackageUpdateNotification(updates);\n\t\t\t\t}\n\t\t\t})\n\t\t\t.finally(() => {\n\t\t\t\t// On Windows, npm can overwrite the shared console title while checking\n\t\t\t\t// extension package versions. Restore Pi's title after the startup check.\n\t\t\t\tif (process.platform === \"win32\" && this.isInitialized) {\n\t\t\t\t\tthis.updateTerminalTitle();\n\t\t\t\t}\n\t\t\t});\n\n\t\t// Check tmux setup asynchronously\n\t\tthis.checkTmuxSetup().then((warning) => {\n\t\t\tif (warning) {\n\t\t\t\tthis.showWarning(warning);\n\t\t\t}\n\t\t});\n\n\t\t// Show startup warnings\n\t\tconst {\n\t\t\tmigratedProviders,\n\t\t\tmodelFallbackMessage,\n\t\t\tinitialMessage,\n\t\t\tinitialImages,\n\t\t\tinitialMessages,\n\t\t\tinitialTitlePrompt,\n\t\t} = this.options;\n\n\t\tif (migratedProviders && migratedProviders.length > 0) {\n\t\t\tthis.showWarning(`Migrated credentials to auth.json: ${migratedProviders.join(\", \")}`);\n\t\t}\n\n\t\tconst modelsJsonError = this.session.modelRuntime.getError();\n\t\tif (modelsJsonError) {\n\t\t\tthis.showError(`models.json error: ${modelsJsonError}`);\n\t\t}\n\n\t\tif (modelFallbackMessage) {\n\t\t\tthis.showWarning(modelFallbackMessage);\n\t\t}\n\n\t\tfor (const warning of this.session.fallbackValidationWarnings) {\n\t\t\tthis.showWarning(warning);\n\t\t}\n\n\t\tthis.showRiskyMainModelWarning(this.session.model);\n\t\tvoid this.maybeWarnAboutAnthropicSubscriptionAuth();\n\n\t\t// Process initial messages\n\t\tif (initialMessage) {\n\t\t\ttry {\n\t\t\t\tawait this.session.prompt(initialMessage, {\n\t\t\t\t\timages: initialImages,\n\t\t\t\t\tsessionTitlePrompt: initialTitlePrompt ?? false,\n\t\t\t\t});\n\t\t\t} catch (error: unknown) {\n\t\t\t\tconst errorMessage = error instanceof Error ? error.message : \"Unknown error occurred\";\n\t\t\t\tthis.showError(errorMessage);\n\t\t\t}\n\t\t}\n\n\t\tif (initialMessages) {\n\t\t\tfor (const message of initialMessages) {\n\t\t\t\ttry {\n\t\t\t\t\tawait this.session.prompt(message);\n\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\tconst errorMessage = error instanceof Error ? error.message : \"Unknown error occurred\";\n\t\t\t\t\tthis.showError(errorMessage);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Main interactive loop\n\t\twhile (true) {\n\t\t\tconst userInput = await this.getUserInput();\n\t\t\ttry {\n\t\t\t\tawait this.session.prompt(userInput.text, {\n\t\t\t\t\tstreamingBehavior: \"steer\",\n\t\t\t\t\t...(userInput.images ? { images: userInput.images } : {}),\n\t\t\t\t});\n\t\t\t} catch (error: unknown) {\n\t\t\t\tconst errorMessage = error instanceof Error ? error.message : \"Unknown error occurred\";\n\t\t\t\tthis.showError(errorMessage);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async checkForPackageUpdates(): Promise<string[]> {\n\t\treturn [];\n\t}\n\n\tprivate async checkTmuxSetup(): Promise<string | undefined> {\n\t\tif (!process.env.TMUX) return undefined;\n\n\t\tconst runTmux = (args: string[]): Promise<string | undefined> => {\n\t\t\treturn new Promise((resolve) => {\n\t\t\t\tconst proc = spawn(\"tmux\", args, {\n\t\t\t\t\tstdio: [\"ignore\", \"pipe\", \"ignore\"],\n\t\t\t\t});\n\t\t\t\tlet stdout = \"\";\n\t\t\t\tconst timer = setTimeout(() => {\n\t\t\t\t\tproc.kill();\n\t\t\t\t\tresolve(undefined);\n\t\t\t\t}, 2000);\n\n\t\t\t\tproc.stdout?.on(\"data\", (data) => {\n\t\t\t\t\tstdout += data.toString();\n\t\t\t\t});\n\t\t\t\tproc.on(\"error\", () => {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t\tresolve(undefined);\n\t\t\t\t});\n\t\t\t\tproc.on(\"close\", (code) => {\n\t\t\t\t\tclearTimeout(timer);\n\t\t\t\t\tresolve(code === 0 ? stdout.trim() : undefined);\n\t\t\t\t});\n\t\t\t});\n\t\t};\n\n\t\tconst [extendedKeys, extendedKeysFormat, clientTermname, allowPassthrough, focusEvents, version] =\n\t\t\tawait Promise.all([\n\t\t\t\trunTmux([\"show\", \"-gv\", \"extended-keys\"]),\n\t\t\t\trunTmux([\"show\", \"-gv\", \"extended-keys-format\"]),\n\t\t\t\trunTmux([\"display-message\", \"-p\", \"#{client_termname}\"]),\n\t\t\t\trunTmux([\"show\", \"-gv\", \"allow-passthrough\"]),\n\t\t\t\trunTmux([\"show\", \"-gv\", \"focus-events\"]),\n\t\t\t\trunTmux([\"display-message\", \"-p\", \"#{version}\"]),\n\t\t\t]);\n\n\t\t// If we couldn't query tmux (timeout, sandbox, etc.), don't warn\n\t\tif (extendedKeys === undefined) return undefined;\n\n\t\treturn buildTmuxSetupWarning({\n\t\t\textendedKeys,\n\t\t\textendedKeysFormat,\n\t\t\timagesEnabled: getCapabilities().tmuxPassthrough === true,\n\t\t\touterKittyCapable: outerKittyGraphicsMode(clientTermname ?? \"\") !== null,\n\t\t\tallowPassthrough,\n\t\t\tfocusEvents,\n\t\t\tversion,\n\t\t});\n\t}\n\n\t/**\n\t * Get changelog entries to display on startup.\n\t * Only shows new entries since last seen version, skips for resumed sessions.\n\t */\n\tprivate getChangelogForDisplay(): string | undefined {\n\t\t// Skip changelog for resumed/continued sessions (already have messages)\n\t\tif (this.session.state.messages.length > 0) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst lastVersion = this.settingsManager.getLastChangelogVersion();\n\t\tconst changelogPath = getChangelogPath();\n\t\tconst entries = parseChangelog(changelogPath);\n\n\t\tif (!lastVersion) {\n\t\t\t// Fresh install - record the version, send telemetry, don't show changelog\n\t\t\tthis.settingsManager.setLastChangelogVersion(VERSION);\n\t\t\tthis.reportInstallTelemetry(VERSION);\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst newEntries = getNewEntries(entries, lastVersion);\n\t\tif (newEntries.length > 0) {\n\t\t\tthis.settingsManager.setLastChangelogVersion(VERSION);\n\t\t\tthis.reportInstallTelemetry(VERSION);\n\t\t\treturn newEntries.map((e) => normalizeChangelogLinks(e.content, e)).join(\"\\n\\n\");\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate reportInstallTelemetry(version: string): void {\n\t\tif (envValue(\"OFFLINE\")) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!isInstallTelemetryEnabled(this.settingsManager)) {\n\t\t\treturn;\n\t\t}\n\n\t\tvoid fetch(`https://pi.dev/api/report-install?version=${encodeURIComponent(version)}`, {\n\t\t\theaders: {\n\t\t\t\t\"User-Agent\": getPiUserAgent(version),\n\t\t\t},\n\t\t\tsignal: AbortSignal.timeout(5000),\n\t\t})\n\t\t\t.then(() => undefined)\n\t\t\t.catch(() => undefined);\n\t}\n\n\tprivate getMarkdownThemeWithSettings(): MarkdownTheme {\n\t\treturn {\n\t\t\t...getMarkdownTheme(),\n\t\t\tcodeBlockIndent: this.settingsManager.getCodeBlockIndent(),\n\t\t};\n\t}\n\n\t// =========================================================================\n\t// Extension System\n\t// =========================================================================\n\n\tprivate getBuiltinExtensionDisplayName(extensionId: string): string {\n\t\treturn extensionId === \"todowrite\" ? \"todo\" : extensionId;\n\t}\n\n\tprivate getBuiltinExtensionNameFromPath(p: string): string | undefined {\n\t\tconst builtinMatch = p.match(/^<builtin:([^>]+)>$/);\n\t\tif (!builtinMatch) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn this.getBuiltinExtensionDisplayName(builtinMatch[1]);\n\t}\n\n\tprivate formatDisplayPath(p: string): string {\n\t\tconst builtinName = this.getBuiltinExtensionNameFromPath(p);\n\t\tif (builtinName) {\n\t\t\treturn `builtin/${builtinName}`;\n\t\t}\n\n\t\tconst home = os.homedir();\n\t\tlet result = p;\n\n\t\t// Replace home directory with ~\n\t\tif (result.startsWith(home)) {\n\t\t\tresult = `~${result.slice(home.length)}`;\n\t\t}\n\n\t\treturn result;\n\t}\n\n\tprivate formatExtensionDisplayPath(path: string): string {\n\t\tlet result = this.formatDisplayPath(path);\n\t\tresult = result.replace(/\\/index\\.ts$/, \"\").replace(/\\/index\\.js$/, \"\");\n\t\treturn result;\n\t}\n\n\tprivate formatContextPath(p: string): string {\n\t\tconst cwd = path.resolve(this.sessionManager.getCwd());\n\t\tconst absolutePath = path.isAbsolute(p) ? path.resolve(p) : path.resolve(cwd, p);\n\t\tconst relativePath = getCwdRelativePath(absolutePath, cwd);\n\t\tif (relativePath !== undefined) {\n\t\t\treturn relativePath;\n\t\t}\n\n\t\treturn this.formatDisplayPath(absolutePath);\n\t}\n\n\tprivate getStartupExpansionState(): boolean {\n\t\treturn this.options.verbose || this.toolOutputExpanded;\n\t}\n\n\tprivate async handleKeybindingsCommand(): Promise<void> {\n\t\tconst configPath = path.join(getAgentDir(), \"keybindings.json\");\n\t\tconst editorCommand = process.env.VISUAL || process.env.EDITOR;\n\t\tif (!editorCommand) {\n\t\t\tthis.showError(`Set $EDITOR or $VISUAL to edit ${configPath}.`);\n\t\t\treturn;\n\t\t}\n\n\t\tconst seeded = seedKeybindingsFile(configPath, this.keybindings);\n\t\tconst edit = await editFileInExternalEditor({\n\t\t\tcommand: editorCommand,\n\t\t\tpath: configPath,\n\t\t});\n\t\tif (edit.status === \"launch-failed\") {\n\t\t\t// The editor never ran, so a file we just seeded carries no user content.\n\t\t\tif (seeded) fs.rmSync(configPath, { force: true });\n\t\t\tthis.showError(`Could not open ${configPath} with \"${editorCommand}\".`);\n\t\t\treturn;\n\t\t}\n\t\tif (edit.status === \"exited\") {\n\t\t\t// The editor ran and may have written the file; keep whatever is on disk.\n\t\t\tthis.showError(`\"${editorCommand}\" exited with code ${edit.code}; keybindings were not reloaded.`);\n\t\t\treturn;\n\t\t}\n\n\t\tconst applied = applyKeybindingsFileEdit(configPath, this.keybindings);\n\t\tif (applied.status === \"invalid\") {\n\t\t\tthis.showError(`Keybindings not reloaded - ${configPath} is not valid JSON: ${applied.message}`);\n\t\t\treturn;\n\t\t}\n\t\tthis.showStatus(\"Keybindings reloaded\");\n\t}\n\n\tprivate updateShortcutOverlay(nextText: string): void {\n\t\tconst previousText = this.lastEditorText;\n\t\tthis.lastEditorText = nextText;\n\t\tconst inputKind = classifyEditorInput(previousText, nextText, this.lastInputWasPaste);\n\t\tthis.lastInputWasPaste = false;\n\n\t\tif (shouldShowShortcutOverlay(previousText, nextText, inputKind)) {\n\t\t\tif (!this.shortcutOverlay) {\n\t\t\t\tthis.shortcutOverlay = new ShortcutOverlay();\n\t\t\t\tthis.headerContainer.addChild(this.shortcutOverlay);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tthis.hideShortcutOverlay();\n\t}\n\n\tprivate hideShortcutOverlay(): void {\n\t\tif (!this.shortcutOverlay) return;\n\t\tthis.headerContainer.removeChild(this.shortcutOverlay);\n\t\tthis.shortcutOverlay = undefined;\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate recordShownTip(tipId: string): void {\n\t\tthis.sessionShownTipIds.add(tipId);\n\t\tconst next = recordTipShown(this.settingsManager.getTipsHistory(), tipId, Date.now());\n\t\tthis.settingsManager.setTipShown(tipId, next[tipId] ?? Date.now());\n\t}\n\n\t/**\n\t * Get a short path relative to the package root for display.\n\t */\n\tprivate getShortPath(fullPath: string, sourceInfo?: SourceInfo): string {\n\t\tconst normalizedFullPath = fullPath.replace(/\\\\/g, \"/\");\n\t\tconst baseDir = sourceInfo?.baseDir;\n\t\tif (baseDir && this.isPackageSource(sourceInfo)) {\n\t\t\tconst normalizedBaseDir = baseDir.replace(/\\\\/g, \"/\");\n\t\t\tconst npmRootMatch = normalizedBaseDir.match(/^(.*\\/node_modules)\\/(@?[^/]+(?:\\/[^/]+)?)$/);\n\t\t\t// If fullPath is under the same node_modules root as baseDir, preserve that relative topology.\n\t\t\tif (npmRootMatch?.[1] && normalizedFullPath.startsWith(`${npmRootMatch[1]}/`)) {\n\t\t\t\treturn path.posix.relative(normalizedBaseDir, normalizedFullPath);\n\t\t\t}\n\n\t\t\tconst relativePath = path.relative(path.resolve(baseDir), path.resolve(fullPath));\n\t\t\tif (\n\t\t\t\trelativePath &&\n\t\t\t\trelativePath !== \".\" &&\n\t\t\t\t!relativePath.startsWith(\"..\") &&\n\t\t\t\t!relativePath.startsWith(`..${path.sep}`) &&\n\t\t\t\t!path.isAbsolute(relativePath)\n\t\t\t) {\n\t\t\t\treturn relativePath.replace(/\\\\/g, \"/\");\n\t\t\t}\n\t\t}\n\n\t\tconst source = sourceInfo?.source ?? \"\";\n\t\tconst npmMatch = normalizedFullPath.match(/node_modules\\/(@?[^/]+(?:\\/[^/]+)?)\\/(.*)/);\n\t\tif (npmMatch && source.startsWith(\"npm:\")) {\n\t\t\treturn npmMatch[2];\n\t\t}\n\n\t\tconst gitMatch = normalizedFullPath.match(/git\\/[^/]+\\/[^/]+\\/(.*)/);\n\t\tif (gitMatch && source.startsWith(\"git:\")) {\n\t\t\treturn gitMatch[1];\n\t\t}\n\n\t\treturn this.formatDisplayPath(fullPath);\n\t}\n\n\tprivate getCompactPathLabel(resourcePath: string, sourceInfo?: SourceInfo): string {\n\t\tconst shortPath = this.getShortPath(resourcePath, sourceInfo);\n\t\tconst normalizedPath = shortPath.replace(/\\\\/g, \"/\");\n\t\tconst segments = normalizedPath.split(\"/\").filter((segment) => segment.length > 0 && segment !== \"~\");\n\t\tif (segments.length > 0) {\n\t\t\treturn segments[segments.length - 1]!;\n\t\t}\n\t\treturn shortPath;\n\t}\n\n\tprivate getCompactPackageSourceLabel(sourceInfo?: SourceInfo): string {\n\t\tconst source = sourceInfo?.source ?? \"\";\n\t\tif (source.startsWith(\"npm:\")) {\n\t\t\treturn source.slice(\"npm:\".length) || source;\n\t\t}\n\n\t\tconst gitSource = parseGitUrl(source);\n\t\tif (gitSource) {\n\t\t\treturn gitSource.path || source;\n\t\t}\n\n\t\treturn source;\n\t}\n\n\tprivate getCompactExtensionLabel(resourcePath: string, sourceInfo?: SourceInfo): string {\n\t\tif (!this.isPackageSource(sourceInfo)) {\n\t\t\treturn this.getCompactPathLabel(resourcePath, sourceInfo);\n\t\t}\n\n\t\tconst sourceLabel = this.getCompactPackageSourceLabel(sourceInfo);\n\t\tif (!sourceLabel) {\n\t\t\treturn this.getCompactPathLabel(resourcePath, sourceInfo);\n\t\t}\n\n\t\tconst shortPath = this.getShortPath(resourcePath, sourceInfo).replace(/\\\\/g, \"/\");\n\t\tconst packagePath = shortPath.startsWith(\"extensions/\") ? shortPath.slice(\"extensions/\".length) : shortPath;\n\t\tconst parsedPath = path.posix.parse(packagePath);\n\n\t\tif (parsedPath.name === \"index\") {\n\t\t\treturn !parsedPath.dir || parsedPath.dir === \".\" ? sourceLabel : `${sourceLabel}:${parsedPath.dir}`;\n\t\t}\n\n\t\treturn `${sourceLabel}:${packagePath}`;\n\t}\n\n\tprivate getCompactDisplayPathSegments(resourcePath: string): string[] {\n\t\treturn this.formatDisplayPath(resourcePath)\n\t\t\t.replace(/\\\\/g, \"/\")\n\t\t\t.split(\"/\")\n\t\t\t.filter((segment) => segment.length > 0 && segment !== \"~\");\n\t}\n\n\tprivate getCompactNonPackageExtensionLabel(\n\t\tresourcePath: string,\n\t\tindex: number,\n\t\tallPaths: Array<{ path: string; segments: string[] }>,\n\t): string {\n\t\tconst segments = allPaths[index]?.segments;\n\t\tif (!segments || segments.length === 0) {\n\t\t\treturn this.getCompactPathLabel(resourcePath);\n\t\t}\n\n\t\tfor (let segmentCount = 1; segmentCount <= segments.length; segmentCount += 1) {\n\t\t\tconst candidate = segments.slice(-segmentCount).join(\"/\");\n\t\t\tconst isUnique = allPaths.every((item, itemIndex) => {\n\t\t\t\tif (itemIndex === index) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn item.segments.slice(-segmentCount).join(\"/\") !== candidate;\n\t\t\t});\n\n\t\t\tif (isUnique) {\n\t\t\t\treturn candidate;\n\t\t\t}\n\t\t}\n\n\t\treturn segments.join(\"/\");\n\t}\n\n\tprivate getCompactExtensionLabels(extensions: Array<{ path: string; sourceInfo?: SourceInfo }>): string[] {\n\t\tconst nonPackageExtensions = extensions\n\t\t\t.map((extension) => {\n\t\t\t\tconst segments = this.getCompactDisplayPathSegments(extension.path);\n\t\t\t\tconst lastSegment = segments[segments.length - 1];\n\t\t\t\tif (segments.length > 1 && (lastSegment === \"index.ts\" || lastSegment === \"index.js\")) {\n\t\t\t\t\tsegments.pop();\n\t\t\t\t}\n\t\t\t\treturn {\n\t\t\t\t\tpath: extension.path,\n\t\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t\t\tsegments,\n\t\t\t\t};\n\t\t\t})\n\t\t\t.filter((extension) => !this.isPackageSource(extension.sourceInfo));\n\n\t\treturn extensions.map((extension) => {\n\t\t\tif (this.isPackageSource(extension.sourceInfo)) {\n\t\t\t\treturn this.getCompactExtensionLabel(extension.path, extension.sourceInfo);\n\t\t\t}\n\n\t\t\tconst nonPackageIndex = nonPackageExtensions.findIndex((item) => item.path === extension.path);\n\t\t\tif (nonPackageIndex === -1) {\n\t\t\t\treturn this.getCompactPathLabel(extension.path, extension.sourceInfo);\n\t\t\t}\n\n\t\t\treturn this.getCompactNonPackageExtensionLabel(extension.path, nonPackageIndex, nonPackageExtensions);\n\t\t});\n\t}\n\n\tprivate getDisplaySourceInfo(sourceInfo?: SourceInfo): {\n\t\tlabel: string;\n\t\tscopeLabel?: string;\n\t\tcolor: \"accent\" | \"muted\";\n\t} {\n\t\tconst source = sourceInfo?.source ?? \"local\";\n\t\tconst scope = sourceInfo?.scope ?? \"project\";\n\t\tif (source === \"local\") {\n\t\t\tif (scope === \"user\") {\n\t\t\t\treturn { label: \"user\", color: \"muted\" };\n\t\t\t}\n\t\t\tif (scope === \"project\") {\n\t\t\t\treturn { label: \"project\", color: \"muted\" };\n\t\t\t}\n\t\t\tif (scope === \"temporary\") {\n\t\t\t\treturn { label: \"path\", scopeLabel: \"temp\", color: \"muted\" };\n\t\t\t}\n\t\t\treturn { label: \"path\", color: \"muted\" };\n\t\t}\n\n\t\tif (source === \"cli\") {\n\t\t\treturn {\n\t\t\t\tlabel: \"path\",\n\t\t\t\tscopeLabel: scope === \"temporary\" ? \"temp\" : undefined,\n\t\t\t\tcolor: \"muted\",\n\t\t\t};\n\t\t}\n\n\t\tconst scopeLabel =\n\t\t\tscope === \"user\" ? \"user\" : scope === \"project\" ? \"project\" : scope === \"temporary\" ? \"temp\" : undefined;\n\t\treturn { label: source, scopeLabel, color: \"accent\" };\n\t}\n\n\tprivate getScopeGroup(sourceInfo?: SourceInfo): \"user\" | \"project\" | \"path\" {\n\t\tconst source = sourceInfo?.source ?? \"local\";\n\t\tconst scope = sourceInfo?.scope ?? \"project\";\n\t\tif (source === \"cli\" || scope === \"temporary\") return \"path\";\n\t\tif (scope === \"user\") return \"user\";\n\t\tif (scope === \"project\") return \"project\";\n\t\treturn \"path\";\n\t}\n\n\tprivate isPackageSource(sourceInfo?: SourceInfo): boolean {\n\t\tconst source = sourceInfo?.source ?? \"\";\n\t\treturn source.startsWith(\"npm:\") || source.startsWith(\"git:\");\n\t}\n\n\tprivate buildScopeGroups(items: Array<{ path: string; sourceInfo?: SourceInfo }>): Array<{\n\t\tscope: \"user\" | \"project\" | \"path\";\n\t\tpaths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\tpackages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n\t}> {\n\t\tconst groups: Record<\n\t\t\t\"user\" | \"project\" | \"path\",\n\t\t\t{\n\t\t\t\tscope: \"user\" | \"project\" | \"path\";\n\t\t\t\tpaths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\t\tpackages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n\t\t\t}\n\t\t> = {\n\t\t\tuser: { scope: \"user\", paths: [], packages: new Map() },\n\t\t\tproject: { scope: \"project\", paths: [], packages: new Map() },\n\t\t\tpath: { scope: \"path\", paths: [], packages: new Map() },\n\t\t};\n\n\t\tfor (const item of items) {\n\t\t\tconst groupKey = this.getScopeGroup(item.sourceInfo);\n\t\t\tconst group = groups[groupKey];\n\t\t\tconst source = item.sourceInfo?.source ?? \"local\";\n\n\t\t\tif (this.isPackageSource(item.sourceInfo)) {\n\t\t\t\tconst list = group.packages.get(source) ?? [];\n\t\t\t\tlist.push(item);\n\t\t\t\tgroup.packages.set(source, list);\n\t\t\t} else {\n\t\t\t\tgroup.paths.push(item);\n\t\t\t}\n\t\t}\n\n\t\treturn [groups.project, groups.user, groups.path].filter(\n\t\t\t(group) => group.paths.length > 0 || group.packages.size > 0,\n\t\t);\n\t}\n\n\tprivate formatScopeGroups(\n\t\tgroups: Array<{\n\t\t\tscope: \"user\" | \"project\" | \"path\";\n\t\t\tpaths: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\t\tpackages: Map<string, Array<{ path: string; sourceInfo?: SourceInfo }>>;\n\t\t}>,\n\t\toptions: {\n\t\t\tformatPath: (item: { path: string; sourceInfo?: SourceInfo }) => string;\n\t\t\tformatPackagePath: (item: { path: string; sourceInfo?: SourceInfo }, source: string) => string;\n\t\t},\n\t): string {\n\t\tconst lines: string[] = [];\n\n\t\tfor (const group of groups) {\n\t\t\tlines.push(` ${theme.fg(\"accent\", group.scope)}`);\n\n\t\t\tconst sortedPaths = [...group.paths].sort((a, b) => a.path.localeCompare(b.path));\n\t\t\tfor (const item of sortedPaths) {\n\t\t\t\tlines.push(theme.fg(\"dim\", ` ${options.formatPath(item)}`));\n\t\t\t}\n\n\t\t\tconst sortedPackages = Array.from(group.packages.entries()).sort(([a], [b]) => a.localeCompare(b));\n\t\t\tfor (const [source, items] of sortedPackages) {\n\t\t\t\tlines.push(` ${theme.fg(\"mdLink\", source)}`);\n\t\t\t\tconst sortedPackagePaths = [...items].sort((a, b) => a.path.localeCompare(b.path));\n\t\t\t\tfor (const item of sortedPackagePaths) {\n\t\t\t\t\tlines.push(theme.fg(\"dim\", ` ${options.formatPackagePath(item, source)}`));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn lines.join(\"\\n\");\n\t}\n\n\tprivate findSourceInfoForPath(p: string, sourceInfos: Map<string, SourceInfo>): SourceInfo | undefined {\n\t\tconst exact = sourceInfos.get(p);\n\t\tif (exact) return exact;\n\n\t\tlet current = p;\n\t\twhile (current.includes(\"/\")) {\n\t\t\tcurrent = current.substring(0, current.lastIndexOf(\"/\"));\n\t\t\tconst parent = sourceInfos.get(current);\n\t\t\tif (parent) return parent;\n\t\t}\n\n\t\treturn undefined;\n\t}\n\n\tprivate formatPathWithSource(p: string, sourceInfo?: SourceInfo): string {\n\t\tif (sourceInfo) {\n\t\t\tconst shortPath = this.getShortPath(p, sourceInfo);\n\t\t\tconst { label, scopeLabel } = this.getDisplaySourceInfo(sourceInfo);\n\t\t\tconst labelText = scopeLabel ? `${label} (${scopeLabel})` : label;\n\t\t\treturn `${labelText} ${shortPath}`;\n\t\t}\n\t\treturn this.formatDisplayPath(p);\n\t}\n\n\tprivate formatDiagnostics(diagnostics: readonly ResourceDiagnostic[], sourceInfos: Map<string, SourceInfo>): string {\n\t\tconst lines: string[] = [];\n\n\t\t// Group collision diagnostics by name\n\t\tconst collisions = new Map<string, ResourceDiagnostic[]>();\n\t\tconst otherDiagnostics: ResourceDiagnostic[] = [];\n\n\t\tfor (const d of diagnostics) {\n\t\t\tif (d.type === \"collision\" && d.collision) {\n\t\t\t\tconst list = collisions.get(d.collision.name) ?? [];\n\t\t\t\tlist.push(d);\n\t\t\t\tcollisions.set(d.collision.name, list);\n\t\t\t} else {\n\t\t\t\totherDiagnostics.push(d);\n\t\t\t}\n\t\t}\n\n\t\t// Format collision diagnostics grouped by name\n\t\tfor (const [name, collisionList] of collisions) {\n\t\t\tconst first = collisionList[0]?.collision;\n\t\t\tif (!first) continue;\n\t\t\tlines.push(theme.fg(\"warning\", ` \"${name}\" collision:`));\n\t\t\tlines.push(\n\t\t\t\ttheme.fg(\n\t\t\t\t\t\"dim\",\n\t\t\t\t\t` ${theme.fg(\"success\", \"✓\")} ${this.formatPathWithSource(first.winnerPath, this.findSourceInfoForPath(first.winnerPath, sourceInfos))}`,\n\t\t\t\t),\n\t\t\t);\n\t\t\tfor (const d of collisionList) {\n\t\t\t\tif (d.collision) {\n\t\t\t\t\tlines.push(\n\t\t\t\t\t\ttheme.fg(\n\t\t\t\t\t\t\t\"dim\",\n\t\t\t\t\t\t\t` ${theme.fg(\"warning\", \"✗\")} ${this.formatPathWithSource(d.collision.loserPath, this.findSourceInfoForPath(d.collision.loserPath, sourceInfos))} (skipped)`,\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (const d of otherDiagnostics) {\n\t\t\tif (d.path) {\n\t\t\t\tconst formattedPath = this.formatPathWithSource(d.path, this.findSourceInfoForPath(d.path, sourceInfos));\n\t\t\t\tlines.push(theme.fg(d.type === \"error\" ? \"error\" : \"warning\", ` ${formattedPath}`));\n\t\t\t\tlines.push(theme.fg(d.type === \"error\" ? \"error\" : \"warning\", ` ${d.message}`));\n\t\t\t} else {\n\t\t\t\tlines.push(theme.fg(d.type === \"error\" ? \"error\" : \"warning\", ` ${d.message}`));\n\t\t\t}\n\t\t}\n\n\t\treturn lines.join(\"\\n\");\n\t}\n\n\tprivate showLoadedResources(options?: {\n\t\textensions?: Array<{ path: string; sourceInfo?: SourceInfo }>;\n\t\tforce?: boolean;\n\t\tshowDiagnosticsWhenQuiet?: boolean;\n\t}): void {\n\t\t// Resource rendering is idempotent; chat clears no longer clear this separate container.\n\t\tthis.loadedResourcesContainer.clear();\n\n\t\tconst showListing = options?.force || this.options.verbose || !this.settingsManager.getQuietStartup();\n\t\tconst showDiagnostics = showListing || options?.showDiagnosticsWhenQuiet === true;\n\t\tif (!showListing && !showDiagnostics) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst sectionHeader = (name: string, color: ThemeColor = \"mdHeading\") => theme.fg(color, `[${name}]`);\n\t\tconst formatCompactList = (items: string[], options?: { sort?: boolean }): string => {\n\t\t\tconst labels = items.map((item) => item.trim()).filter((item) => item.length > 0);\n\t\t\tif (options?.sort !== false) {\n\t\t\t\tlabels.sort((a, b) => a.localeCompare(b));\n\t\t\t}\n\t\t\treturn theme.fg(\"dim\", ` ${labels.join(\", \")}`);\n\t\t};\n\t\tconst addLoadedSection = (\n\t\t\tname: string,\n\t\t\tcollapsedBody: string,\n\t\t\texpandedBody = collapsedBody,\n\t\t\tcolor: ThemeColor = \"mdHeading\",\n\t\t): void => {\n\t\t\tconst section = new ExpandableText(\n\t\t\t\t() => `${sectionHeader(name, color)}\\n${collapsedBody}`,\n\t\t\t\t() => `${sectionHeader(name, color)}\\n${expandedBody}`,\n\t\t\t\tthis.getStartupExpansionState(),\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t);\n\t\t\tthis.loadedResourcesContainer.addChild(section);\n\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t};\n\n\t\tconst skillsResult = this.session.resourceLoader.getSkills();\n\t\tconst promptsResult = this.session.resourceLoader.getPrompts();\n\t\tconst themesResult = this.session.resourceLoader.getThemes();\n\t\tconst extensions =\n\t\t\toptions?.extensions ??\n\t\t\tthis.session.resourceLoader\n\t\t\t\t.getExtensions()\n\t\t\t\t.extensions.filter((extension) => !extension.hidden)\n\t\t\t\t.map((extension) => ({\n\t\t\t\t\tpath: extension.path,\n\t\t\t\t\tsourceInfo: extension.sourceInfo,\n\t\t\t\t}));\n\t\tconst sourceInfos = new Map<string, SourceInfo>();\n\t\tfor (const extension of extensions) {\n\t\t\tif (extension.sourceInfo) {\n\t\t\t\tsourceInfos.set(extension.path, extension.sourceInfo);\n\t\t\t}\n\t\t}\n\t\tfor (const skill of skillsResult.skills) {\n\t\t\tif (skill.sourceInfo) {\n\t\t\t\tsourceInfos.set(skill.filePath, skill.sourceInfo);\n\t\t\t}\n\t\t}\n\t\tfor (const prompt of promptsResult.prompts) {\n\t\t\tif (prompt.sourceInfo) {\n\t\t\t\tsourceInfos.set(prompt.filePath, prompt.sourceInfo);\n\t\t\t}\n\t\t}\n\t\tfor (const loadedTheme of themesResult.themes) {\n\t\t\tif (loadedTheme.sourcePath && loadedTheme.sourceInfo) {\n\t\t\t\tsourceInfos.set(loadedTheme.sourcePath, loadedTheme.sourceInfo);\n\t\t\t}\n\t\t}\n\n\t\tif (showListing) {\n\t\t\tconst systemPromptSource = this.session.resourceLoader.getSystemPromptSource();\n\t\t\tconst contextFiles = [\n\t\t\t\t...(systemPromptSource ? [systemPromptSource] : []),\n\t\t\t\t...this.session.resourceLoader.getAppendSystemPromptSources(),\n\t\t\t\t...this.session.resourceLoader.getAgentsFiles().agentsFiles,\n\t\t\t];\n\t\t\tif (contextFiles.length > 0) {\n\t\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t\t\tconst contextList = contextFiles\n\t\t\t\t\t.map((f) => theme.fg(\"dim\", ` ${this.formatDisplayPath(f.path)}`))\n\t\t\t\t\t.join(\"\\n\");\n\t\t\t\tconst contextCompactList = formatCompactList(\n\t\t\t\t\tcontextFiles.map((contextFile) => this.formatContextPath(contextFile.path)),\n\t\t\t\t\t{ sort: false },\n\t\t\t\t);\n\t\t\t\taddLoadedSection(\"Context\", contextCompactList, contextList);\n\t\t\t}\n\n\t\t\tconst skills = skillsResult.skills;\n\t\t\tif (skills.length > 0) {\n\t\t\t\tconst groups = this.buildScopeGroups(\n\t\t\t\t\tskills.map((skill) => ({\n\t\t\t\t\t\tpath: skill.filePath,\n\t\t\t\t\t\tsourceInfo: skill.sourceInfo,\n\t\t\t\t\t})),\n\t\t\t\t);\n\t\t\t\tconst skillList = this.formatScopeGroups(groups, {\n\t\t\t\t\tformatPath: (item) => this.formatDisplayPath(item.path),\n\t\t\t\t\tformatPackagePath: (item) => this.getShortPath(item.path, item.sourceInfo),\n\t\t\t\t});\n\t\t\t\tconst skillCompactList = formatCompactList(skills.map((skill) => skill.name));\n\t\t\t\taddLoadedSection(\"Skills\", skillCompactList, skillList);\n\t\t\t}\n\n\t\t\tconst templates = this.session.promptTemplates;\n\t\t\tif (templates.length > 0) {\n\t\t\t\tconst groups = this.buildScopeGroups(\n\t\t\t\t\ttemplates.map((template) => ({\n\t\t\t\t\t\tpath: template.filePath,\n\t\t\t\t\t\tsourceInfo: template.sourceInfo,\n\t\t\t\t\t})),\n\t\t\t\t);\n\t\t\t\tconst templateByPath = new Map(templates.map((t) => [t.filePath, t]));\n\t\t\t\tconst templateList = this.formatScopeGroups(groups, {\n\t\t\t\t\tformatPath: (item) => {\n\t\t\t\t\t\tconst template = templateByPath.get(item.path);\n\t\t\t\t\t\treturn template ? `/${template.name}` : this.formatDisplayPath(item.path);\n\t\t\t\t\t},\n\t\t\t\t\tformatPackagePath: (item) => {\n\t\t\t\t\t\tconst template = templateByPath.get(item.path);\n\t\t\t\t\t\treturn template ? `/${template.name}` : this.formatDisplayPath(item.path);\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t\tconst promptCompactList = formatCompactList(templates.map((template) => `/${template.name}`));\n\t\t\t\taddLoadedSection(\"Prompts\", promptCompactList, templateList);\n\t\t\t}\n\n\t\t\tif (extensions.length > 0) {\n\t\t\t\tconst groups = this.buildScopeGroups(extensions);\n\t\t\t\tconst extList = this.formatScopeGroups(groups, {\n\t\t\t\t\tformatPath: (item) => this.formatExtensionDisplayPath(item.path),\n\t\t\t\t\tformatPackagePath: (item) =>\n\t\t\t\t\t\tthis.formatExtensionDisplayPath(this.getShortPath(item.path, item.sourceInfo)),\n\t\t\t\t});\n\t\t\t\tconst extensionCompactList = formatCompactList(this.getCompactExtensionLabels(extensions));\n\t\t\t\taddLoadedSection(\"Extensions\", extensionCompactList, extList, \"mdHeading\");\n\t\t\t}\n\n\t\t\t// Show loaded themes (excluding built-in)\n\t\t\tconst loadedThemes = themesResult.themes;\n\t\t\tconst customThemes = loadedThemes.filter((t) => t.sourcePath);\n\t\t\tif (customThemes.length > 0) {\n\t\t\t\tconst groups = this.buildScopeGroups(\n\t\t\t\t\tcustomThemes.map((loadedTheme) => ({\n\t\t\t\t\t\tpath: loadedTheme.sourcePath!,\n\t\t\t\t\t\tsourceInfo: loadedTheme.sourceInfo,\n\t\t\t\t\t})),\n\t\t\t\t);\n\t\t\t\tconst themeList = this.formatScopeGroups(groups, {\n\t\t\t\t\tformatPath: (item) => this.formatDisplayPath(item.path),\n\t\t\t\t\tformatPackagePath: (item) => this.getShortPath(item.path, item.sourceInfo),\n\t\t\t\t});\n\t\t\t\tconst themeCompactList = formatCompactList(\n\t\t\t\t\tcustomThemes.map(\n\t\t\t\t\t\t(loadedTheme) =>\n\t\t\t\t\t\t\tloadedTheme.name ?? this.getCompactPathLabel(loadedTheme.sourcePath!, loadedTheme.sourceInfo),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\taddLoadedSection(\"Themes\", themeCompactList, themeList);\n\t\t\t}\n\t\t}\n\n\t\tif (showDiagnostics) {\n\t\t\tconst skillDiagnostics = skillsResult.diagnostics;\n\t\t\tif (skillDiagnostics.length > 0) {\n\t\t\t\tconst warningLines = this.formatDiagnostics(skillDiagnostics, sourceInfos);\n\t\t\t\tthis.loadedResourcesContainer.addChild(\n\t\t\t\t\tnew Text(`${theme.fg(\"warning\", \"[Skill conflicts]\")}\\n${warningLines}`, 0, 0),\n\t\t\t\t);\n\t\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t\t}\n\n\t\t\tconst promptDiagnostics = promptsResult.diagnostics;\n\t\t\tif (promptDiagnostics.length > 0) {\n\t\t\t\tconst warningLines = this.formatDiagnostics(promptDiagnostics, sourceInfos);\n\t\t\t\tthis.loadedResourcesContainer.addChild(\n\t\t\t\t\tnew Text(`${theme.fg(\"warning\", \"[Prompt conflicts]\")}\\n${warningLines}`, 0, 0),\n\t\t\t\t);\n\t\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t\t}\n\n\t\t\tconst extensionDiagnostics: ResourceDiagnostic[] = [];\n\t\t\tconst extensionErrors = this.session.resourceLoader.getExtensions().errors;\n\t\t\tif (extensionErrors.length > 0) {\n\t\t\t\tfor (const error of extensionErrors) {\n\t\t\t\t\textensionDiagnostics.push({\n\t\t\t\t\t\ttype: \"error\",\n\t\t\t\t\t\tmessage: error.error,\n\t\t\t\t\t\tpath: error.path,\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tconst commandDiagnostics = this.session.extensionRunner.getCommandDiagnostics();\n\t\t\textensionDiagnostics.push(...commandDiagnostics);\n\t\t\textensionDiagnostics.push(...this.getBuiltInCommandConflictDiagnostics(this.session.extensionRunner));\n\n\t\t\tconst shortcutDiagnostics = this.session.extensionRunner.getShortcutDiagnostics();\n\t\t\textensionDiagnostics.push(...shortcutDiagnostics);\n\n\t\t\tif (extensionDiagnostics.length > 0) {\n\t\t\t\tconst warningLines = this.formatDiagnostics(extensionDiagnostics, sourceInfos);\n\t\t\t\tthis.loadedResourcesContainer.addChild(\n\t\t\t\t\tnew Text(`${theme.fg(\"warning\", \"[Extension issues]\")}\\n${warningLines}`, 0, 0),\n\t\t\t\t);\n\t\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t\t}\n\n\t\t\tconst themeDiagnostics = themesResult.diagnostics;\n\t\t\tif (themeDiagnostics.length > 0) {\n\t\t\t\tconst warningLines = this.formatDiagnostics(themeDiagnostics, sourceInfos);\n\t\t\t\tthis.loadedResourcesContainer.addChild(\n\t\t\t\t\tnew Text(`${theme.fg(\"warning\", \"[Theme conflicts]\")}\\n${warningLines}`, 0, 0),\n\t\t\t\t);\n\t\t\t\tthis.loadedResourcesContainer.addChild(new Spacer(1));\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Initialize the extension system with TUI-based UI context.\n\t */\n\tprivate async bindCurrentSessionExtensions(): Promise<void> {\n\t\tconst uiContext = this.createExtensionUIContext();\n\t\tawait this.session.bindExtensions({\n\t\t\tuiContext,\n\t\t\tmode: \"tui\",\n\t\t\tabortHandler: () => {\n\t\t\t\tthis.restoreQueuedMessagesToEditor({ abort: true });\n\t\t\t},\n\t\t\tcommandContextActions: {\n\t\t\t\twaitForIdle: () => this.session.waitForIdle(),\n\t\t\t\tnewSession: async (options) => {\n\t\t\t\t\tthis.clearStatusIndicator();\n\t\t\t\t\ttry {\n\t\t\t\t\t\treturn await this.runtimeHost.newSession(options);\n\t\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\t\treturn this.handleFatalRuntimeError(\"Failed to create session\", error);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tfork: async (entryId, options) => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = await this.runtimeHost.fork(entryId, options);\n\t\t\t\t\t\tif (!result.cancelled) {\n\t\t\t\t\t\t\tthis.editor.setText(result.selectedText ?? \"\");\n\t\t\t\t\t\t\tthis.showStatus(\"Forked to new session\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn { cancelled: result.cancelled };\n\t\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\t\treturn this.handleFatalRuntimeError(\"Failed to fork session\", error);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tnavigateTree: async (targetId, options) => {\n\t\t\t\t\tconst result = await this.session.navigateTree(targetId, {\n\t\t\t\t\t\tsummarize: options?.summarize,\n\t\t\t\t\t\tcustomInstructions: options?.customInstructions,\n\t\t\t\t\t\treplaceInstructions: options?.replaceInstructions,\n\t\t\t\t\t\tlabel: options?.label,\n\t\t\t\t\t});\n\t\t\t\t\tif (result.cancelled) {\n\t\t\t\t\t\treturn { cancelled: true };\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.chatContainer.clear();\n\t\t\t\t\tthis.renderInitialMessages();\n\t\t\t\t\tif (result.editorText && !this.editor.getText().trim()) {\n\t\t\t\t\t\tthis.editor.setText(result.editorText);\n\t\t\t\t\t}\n\t\t\t\t\tthis.showStatus(\"Navigated to selected point\");\n\t\t\t\t\tvoid this.flushCompactionQueue({ willRetry: false });\n\t\t\t\t\treturn { cancelled: false };\n\t\t\t\t},\n\t\t\t\tswitchSession: async (sessionPath, options) => {\n\t\t\t\t\treturn this.handleResumeSession(sessionPath, options);\n\t\t\t\t},\n\t\t\t\treload: async () => {\n\t\t\t\t\tawait this.handleReloadCommand();\n\t\t\t\t},\n\t\t\t},\n\t\t\tshutdownHandler: () => {\n\t\t\t\tthis.shutdownRequested = true;\n\t\t\t\tif (this.session.isIdle) {\n\t\t\t\t\tvoid this.shutdown();\n\t\t\t\t}\n\t\t\t},\n\t\t\tonError: (error) => {\n\t\t\t\tthis.showExtensionError(error);\n\t\t\t},\n\t\t});\n\n\t\tsetRegisteredThemes(this.session.resourceLoader.getThemes().themes);\n\t\tthis.setupAutocompleteProvider();\n\n\t\tconst extensionRunner = this.session.extensionRunner;\n\t\tthis.setupExtensionShortcuts(extensionRunner);\n\t\tthis.showLoadedResources({ force: false, showDiagnosticsWhenQuiet: true });\n\t\tthis.showStartupNoticesIfNeeded();\n\t}\n\n\tprivate applyFullscreenScrollbarSetting(): void {\n\t\tthis.transcriptScrollView?.setScrollbar(this.settingsManager.getFullscreenScrollbar());\n\t}\n\n\tprivate applyRuntimeSettings(): void {\n\t\tconfigureHttpDispatcher(this.settingsManager.getHttpIdleTimeoutMs());\n\t\tthis.applyFullscreenScrollbarSetting();\n\t\tthis.footer.setSession(this.session);\n\t\tthis.footer.setAutoCompactEnabled(this.session.autoCompactionEnabled);\n\t\tthis.footerDataProvider.setCwd(this.sessionManager.getCwd());\n\t\tthis.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();\n\t\tthis.outputPad = this.settingsManager.getOutputPad();\n\t\tthis.applySmoothStreamingRenderFps();\n\t\tthis.ui.setShowHardwareCursor(this.settingsManager.getShowHardwareCursor());\n\t\tconst clearOnShrink = this.settingsManager.getClearOnShrink();\n\t\tthis.ui.setClearOnShrink(clearOnShrink);\n\t\tif (!clearOnShrink && !this.activeStatusIndicator) {\n\t\t\tthis.statusContainer.clear();\n\t\t}\n\t\tconst editorPaddingX = this.settingsManager.getEditorPaddingX();\n\t\tconst autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();\n\t\tthis.defaultEditor.setPaddingX(editorPaddingX);\n\t\tthis.defaultEditor.setAutocompleteMaxVisible(autocompleteMaxVisible);\n\t\tif (this.editor !== this.defaultEditor) {\n\t\t\tthis.editor.setPaddingX?.(editorPaddingX);\n\t\t\tthis.editor.setAutocompleteMaxVisible?.(autocompleteMaxVisible);\n\t\t}\n\t}\n\n\tprivate async rebindCurrentSession(options: { renderBeforeBind?: boolean } = {}): Promise<void> {\n\t\tInteractiveMode.restoreCompactionEscapeOverride(this);\n\t\tconst session = this.session;\n\t\tthis.unsubscribe?.();\n\t\tthis.unsubscribe = undefined;\n\t\tthis.applyRuntimeSettings();\n\n\t\tif (options.renderBeforeBind) {\n\t\t\tthis.renderCurrentSessionState();\n\t\t\tthis.subscribeToAgent();\n\t\t}\n\n\t\tawait this.bindCurrentSessionExtensions();\n\n\t\tif (this.session !== session) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!options.renderBeforeBind) {\n\t\t\tthis.subscribeToAgent();\n\t\t}\n\t\tthis.updateAvailableProviderCount();\n\t\tthis.updateEditorBorderColor();\n\t\tthis.updateTerminalTitle();\n\t}\n\n\tprivate async handleFatalRuntimeError(prefix: string, error: unknown): Promise<never> {\n\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\tthis.showError(`${prefix}: ${message}`);\n\t\tstopThemeWatcher();\n\t\tthis.stop(\"transcript\");\n\t\tprocess.exit(1);\n\t}\n\n\tprivate renderCurrentSessionState(): void {\n\t\tthis.loadedResourcesContainer.clear();\n\t\tthis.chatContainer.clear();\n\t\tthis.pendingMessagesContainer.clear();\n\t\tfor (const controller of this.compactionTransferAbortControllers.values()) controller.abort();\n\t\tthis.compactionQueueGeneration += 1;\n\t\tthis.compactionQueueFlushTail = undefined;\n\t\tthis.compactionQueuedMessages = [];\n\t\tthis.compactionInFlightMessages = [];\n\t\tthis.compactionTransferAbortControllers.clear();\n\t\tthis.streamingReveal.stop();\n\t\tthis.toolResultReveal.stop();\n\t\tthis.streamingComponent = undefined;\n\t\tthis.streamingMessage = undefined;\n\t\tthis.clearPendingTools();\n\t\tthis.clearToolHookStatuses();\n\t\tthis.renderInitialMessages();\n\t}\n\n\t/**\n\t * Get a registered tool definition by name (for custom rendering).\n\t */\n\tprivate getRegisteredToolDefinition(toolName: string) {\n\t\treturn this.session.getToolDefinition(toolName);\n\t}\n\n\tprivate getMarkdownTransformers(): MarkdownTransformer[] {\n\t\treturn [this.mermaidMarkdownTransformer, ...this.session.extensionRunner.getMarkdownTransformers()];\n\t}\n\n\t/**\n\t * Set up keyboard shortcuts registered by extensions.\n\t */\n\tprivate setupExtensionShortcuts(extensionRunner: ExtensionRunner): void {\n\t\tconst shortcuts = extensionRunner.getShortcuts(this.keybindings.getEffectiveConfig());\n\t\tif (shortcuts.size === 0) return;\n\n\t\t// Create a context for shortcut handlers\n\t\tconst createContext = (): ExtensionContext => ({\n\t\t\tui: this.createExtensionUIContext(),\n\t\t\tmode: \"tui\",\n\t\t\thasUI: true,\n\t\t\tcwd: this.sessionManager.getCwd(),\n\t\t\tagentDir: this.session.agentDir,\n\t\t\tsessionManager: this.sessionManager,\n\t\t\tmodelRegistry: extensionRunner.getModelRegistry(),\n\t\t\tmodel: this.session.model,\n\t\t\tserviceTier: this.session.serviceTier,\n\t\t\tscopedModels: this.session.scopedModels,\n\t\t\tthinkingLevel: this.session.thinkingLevel,\n\t\t\tisIdle: () => this.session.isIdle,\n\t\t\tisProjectTrusted: () => this.settingsManager.isProjectTrusted(),\n\t\t\tsignal: this.session.agent.signal,\n\t\t\tabort: () => this.session.abort(),\n\t\t\thasPendingMessages: () => this.session.pendingMessageCount > 0,\n\t\t\trequestReload: () => this.handleReloadCommand(),\n\t\t\tisCompacting: () => this.session.isCompacting,\n\t\t\tshutdown: () => {\n\t\t\t\tthis.shutdownRequested = true;\n\t\t\t},\n\t\t\tgetContextUsage: () => this.session.getContextUsage(),\n\t\t\tgetCompactionSettings: () => this.settingsManager.getCompactionSettings(),\n\t\t\tgetPromptCacheSafeWaitSeconds: () => this.session.resolvePromptCacheSafeWaitSeconds(),\n\t\t\tgetPromptCacheGoalBackstopMaxSeconds: () => this.settingsManager.getPromptCacheGoalBackstopMaxSeconds(),\n\t\t\tgetLookAtSettings: () => {\n\t\t\t\tconst global = this.settingsManager.getGlobalSettings().lookAt;\n\t\t\t\tconst project = this.settingsManager.getProjectSettings().lookAt;\n\t\t\t\treturn {\n\t\t\t\t\tenabled: project?.enabled ?? global?.enabled ?? true,\n\t\t\t\t\tmodels: project?.models ?? global?.models,\n\t\t\t\t};\n\t\t\t},\n\t\t\tgetImageSettings: () => ({\n\t\t\t\tautoResize: this.settingsManager.getImageAutoResize(),\n\t\t\t\tblockImages: this.settingsManager.getBlockImages(),\n\t\t\t}),\n\t\t\tsessionSettings: extensionRunner.createContext().sessionSettings,\n\t\t\tcompact: (options) => {\n\t\t\t\tvoid (async () => {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = await this.session.compact(options?.customInstructions);\n\t\t\t\t\t\toptions?.onComplete?.(result);\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tconst err = error instanceof Error ? error : new Error(String(error));\n\t\t\t\t\t\toptions?.onError?.(err);\n\t\t\t\t\t}\n\t\t\t\t})();\n\t\t\t},\n\t\t\tgetMessageRevision: () => this.session.getMessageRevision(),\n\t\t\tapplyCompaction: (precomputed, options) => this.session.applyCompaction(precomputed, options),\n\t\t\tgetSystemPrompt: () => this.session.systemPrompt,\n\t\t});\n\n\t\t// Set up the extension shortcut handler on the default editor\n\t\tthis.defaultEditor.onExtensionShortcut = (data: string) => {\n\t\t\tfor (const [shortcutStr, shortcut] of shortcuts) {\n\t\t\t\t// Cast to KeyId - extension shortcuts use the same format\n\t\t\t\tif (matchesKey(data, shortcutStr as KeyId)) {\n\t\t\t\t\t// Run handler async, don't block input\n\t\t\t\t\tPromise.resolve(shortcut.handler(createContext())).catch((err) => {\n\t\t\t\t\t\tthis.showError(`Shortcut handler error: ${err instanceof Error ? err.message : String(err)}`);\n\t\t\t\t\t});\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t}\n\n\t/**\n\t * Set extension status text in the footer.\n\t */\n\tprivate setExtensionStatus(key: string, text: string | undefined): void {\n\t\tthis.footerDataProvider.setExtensionStatus(key, text);\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate startToolHookStatusTimer(): void {\n\t\tif (this.hookStatusIntervalId) {\n\t\t\treturn;\n\t\t}\n\t\tconst intervalMs = largeSessionWorkingStatusInterval(\n\t\t\tthis.sessionManager.getEntries().length,\n\t\t\tDEFAULT_WORKING_STATUS_MESSAGE_ANIMATION_INTERVAL_MS,\n\t\t\tLARGE_SESSION_WORKING_STATUS_MESSAGE_INTERVAL_MS,\n\t\t);\n\t\tthis.hookStatusIntervalId = setInterval(() => {\n\t\t\tthis.refreshToolHookStatuses();\n\t\t}, intervalMs);\n\t\tthis.hookStatusIntervalId.unref();\n\t}\n\n\tprivate stopToolHookStatusTimer(): void {\n\t\tif (this.hookStatusIntervalId) {\n\t\t\tclearInterval(this.hookStatusIntervalId);\n\t\t\tthis.hookStatusIntervalId = undefined;\n\t\t}\n\t}\n\n\tprivate refreshToolHookStatuses(): void {\n\t\tthis.hookStatusContainer.clear();\n\t\tif (this.activeToolHooks.size === 0) {\n\t\t\tthis.stopToolHookStatusTimer();\n\t\t\tthis.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\tconst now = Date.now();\n\t\tfor (const hook of this.activeToolHooks.values()) {\n\t\t\tconst elapsedMs = Math.max(0, now - hook.startedAt);\n\t\t\tconst elapsedSeconds = Math.floor(elapsedMs / 1000);\n\t\t\tthis.hookStatusContainer.addChild(\n\t\t\t\tnew Text(\n\t\t\t\t\tformatToolHookStatusMessageFrame(hook.hookName, hook.statusMessage, elapsedSeconds, elapsedMs, {\n\t\t\t\t\t\tbase: (text) => theme.fg(\"dim\", text),\n\t\t\t\t\t\tglow: (text) => theme.fg(\"text\", text),\n\t\t\t\t\t\thighlight: (text) => theme.bold(theme.fg(\"text\", text)),\n\t\t\t\t\t\tshimmer: formatWorkingStatusShimmerText,\n\t\t\t\t\t\tsuffix: (text) => theme.fg(\"dim\", text),\n\t\t\t\t\t}),\n\t\t\t\t\t1,\n\t\t\t\t\t0,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleToolHookStatusEvent(event: ToolHookStatusEvent): void {\n\t\tif (event.phase === \"start\") {\n\t\t\tthis.activeToolHooks.set(event.hookRunId, event);\n\t\t\tthis.activeToolTerminalTitle = formatToolHookTerminalTitle(event);\n\t\t\tif (this.ui.terminal) {\n\t\t\t\tthis.applyTerminalTitle();\n\t\t\t}\n\t\t\tthis.startToolHookStatusTimer();\n\t\t\tthis.refreshToolHookStatuses();\n\t\t\treturn;\n\t\t}\n\t\tif (event.phase === \"update\") {\n\t\t\tconst existing = this.activeToolHooks.get(event.hookRunId);\n\t\t\tif (!existing) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst updated = { ...existing, statusMessage: event.statusMessage };\n\t\t\tthis.activeToolHooks.set(event.hookRunId, updated);\n\t\t\tthis.activeToolTerminalTitle = formatToolHookTerminalTitle(updated);\n\t\t\tif (this.ui.terminal) {\n\t\t\t\tthis.applyTerminalTitle();\n\t\t\t}\n\t\t\tthis.refreshToolHookStatuses();\n\t\t\treturn;\n\t\t}\n\t\tthis.activeToolHooks.delete(event.hookRunId);\n\t\tconst nextHook = this.activeToolHooks.values().next().value;\n\t\tthis.activeToolTerminalTitle = nextHook ? formatToolHookTerminalTitle(nextHook) : undefined;\n\t\tif (this.ui.terminal) {\n\t\t\tthis.applyTerminalTitle();\n\t\t}\n\t\tthis.refreshToolHookStatuses();\n\t}\n\n\tprivate handleToolExecutionStart(event: ToolExecutionStartEvent): void {\n\t\tconst label = formatActiveToolWorkingLabel(event.toolName, event.args);\n\t\tif (this.activeToolExecutions.size === 0) {\n\t\t\tthis.workingMessageBeforeActiveTool = this.workingMessage;\n\t\t}\n\t\tthis.activeToolExecutions.set(event.toolCallId, label);\n\t\tthis.workingMessage = label;\n\t\tthis.activeToolExecutionTerminalTitle = `${APP_TITLE} - ${label}`;\n\t\tthis.refreshWorkingLoaderMessage();\n\t\tthis.applyTerminalTitle();\n\t}\n\n\tprivate handleToolExecutionEnd(event: ToolExecutionEndEvent): void {\n\t\tif (!this.activeToolExecutions.delete(event.toolCallId)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst nextExecution = this.activeToolExecutions.values().next();\n\t\tif (!nextExecution.done) {\n\t\t\tthis.workingMessage = nextExecution.value;\n\t\t\tthis.activeToolExecutionTerminalTitle = `${APP_TITLE} - ${nextExecution.value}`;\n\t\t} else {\n\t\t\tthis.workingMessage = this.workingMessageBeforeActiveTool;\n\t\t\tthis.workingMessageBeforeActiveTool = undefined;\n\t\t\tthis.activeToolExecutionTerminalTitle = undefined;\n\t\t}\n\t\tthis.refreshWorkingLoaderMessage();\n\t\tthis.applyTerminalTitle();\n\t}\n\n\tprivate stopChatToolAnimations(): void {\n\t\tfor (const child of this.chatContainer.children) {\n\t\t\tif (child instanceof ToolExecutionComponent) child.stopAnimation();\n\t\t}\n\t}\n\n\tprivate clearPendingTools(): void {\n\t\tthis.toolArgsReveal.flushAll();\n\t\tfor (const component of this.pendingTools.values()) {\n\t\t\tcomponent.stopAnimation();\n\t\t}\n\t\tthis.pendingTools.clear();\n\t}\n\n\tprivate clearActiveToolExecutionStatus(): void {\n\t\tif (\n\t\t\tthis.activeToolExecutions.size === 0 &&\n\t\t\tthis.activeToolExecutionTerminalTitle === undefined &&\n\t\t\tthis.workingMessageBeforeActiveTool === undefined\n\t\t) {\n\t\t\treturn;\n\t\t}\n\t\tthis.activeToolExecutions.clear();\n\t\tthis.activeToolExecutionTerminalTitle = undefined;\n\t\tthis.workingMessage = this.workingMessageBeforeActiveTool;\n\t\tthis.workingMessageBeforeActiveTool = undefined;\n\t\tthis.refreshWorkingLoaderMessage();\n\t\tthis.applyTerminalTitle();\n\t}\n\n\tprivate clearToolHookStatuses(): void {\n\t\tthis.activeToolHooks.clear();\n\t\tthis.activeToolTerminalTitle = undefined;\n\t\tif (this.ui.terminal) {\n\t\t\tthis.applyTerminalTitle();\n\t\t}\n\t\tthis.hookStatusContainer.clear();\n\t\tthis.stopToolHookStatusTimer();\n\t}\n\n\tprivate getWorkingElapsedSeconds(): number {\n\t\tif (this.workingStartedAt === undefined) {\n\t\t\treturn 0;\n\t\t}\n\t\treturn Math.max(0, Math.floor((Date.now() - this.workingStartedAt) / 1000));\n\t}\n\n\tprivate getWorkingLoaderMessage(): string {\n\t\treturn this.workingMessage ?? this.defaultWorkingMessage;\n\t}\n\n\tprivate refreshWorkingLoaderMessage(): void {\n\t\tif (this.activeStatusIndicator?.kind === \"working\") {\n\t\t\tthis.activeStatusIndicator.setMessage(this.getWorkingLoaderMessage());\n\t\t\treturn;\n\t\t}\n\t\tconst legacyLoader = (this as { loadingAnimation?: { setMessage(message: string): void } }).loadingAnimation;\n\t\tlegacyLoader?.setMessage(this.getWorkingLoaderMessage());\n\t}\n\n\tprivate getWorkingIndicatorOptions(): LoaderIndicatorOptions {\n\t\tif (this.workingIndicatorOptions !== undefined) {\n\t\t\treturn this.workingIndicatorOptions;\n\t\t}\n\t\tconst sessionEntryCount = this.sessionManager.getEntries().length;\n\t\treturn {\n\t\t\tframes: theme.getColorMode() === \"truecolor\" ? [\"•\"] : [theme.fg(\"accent\", \"•\"), theme.fg(\"muted\", \"◦\")],\n\t\t\tintervalMs: largeSessionWorkingStatusInterval(\n\t\t\t\tsessionEntryCount,\n\t\t\t\tDEFAULT_WORKING_STATUS_REFRESH_INTERVAL_MS,\n\t\t\t\tLARGE_SESSION_WORKING_STATUS_REFRESH_INTERVAL_MS,\n\t\t\t),\n\t\t\tindicatorFormatter:\n\t\t\t\ttheme.getColorMode() === \"truecolor\"\n\t\t\t\t\t? (frame, elapsedMs) => formatWorkingStatusShimmerText(frame, elapsedMs)\n\t\t\t\t\t: undefined,\n\t\t\tmessageFormatter: (message, animationElapsedMs) =>\n\t\t\t\tformatWorkingStatusMessageFrame(\n\t\t\t\t\tmessage,\n\t\t\t\t\tthis.getWorkingElapsedSeconds(),\n\t\t\t\t\tkeyText(\"app.interrupt\"),\n\t\t\t\t\tanimationElapsedMs,\n\t\t\t\t\t{\n\t\t\t\t\t\tbase: (text) => theme.fg(\"dim\", text),\n\t\t\t\t\t\tglow: (text) => theme.fg(\"text\", text),\n\t\t\t\t\t\thighlight: (text) => theme.bold(theme.fg(\"text\", text)),\n\t\t\t\t\t\tshimmer: formatWorkingStatusShimmerText,\n\t\t\t\t\t\tsuffix: (text) => theme.fg(\"dim\", text),\n\t\t\t\t\t},\n\t\t\t\t),\n\t\t\tmessageIntervalMs: largeSessionWorkingStatusInterval(\n\t\t\t\tsessionEntryCount,\n\t\t\t\tDEFAULT_WORKING_STATUS_MESSAGE_ANIMATION_INTERVAL_MS,\n\t\t\t\tLARGE_SESSION_WORKING_STATUS_MESSAGE_INTERVAL_MS,\n\t\t\t),\n\t\t};\n\t}\n\n\tprivate showStatusIndicator(indicator: StatusIndicator): void {\n\t\tif (indicator.kind === \"working\") {\n\t\t\tthis.workingStartedAt = Date.now();\n\t\t}\n\t\tthis.activeStatusIndicator?.dispose();\n\t\tthis.activeStatusIndicator = indicator;\n\t\tthis.statusContainer.clear();\n\n\t\tconst workingTip = indicator.kind === \"working\" ? this.resolveTurnWorkingTip() : undefined;\n\t\tif (!workingTip) {\n\t\t\tthis.statusContainer.addChild(indicator);\n\t\t\treturn;\n\t\t}\n\n\t\tconst wrapper = new Container();\n\t\twrapper.addChild(indicator);\n\t\twrapper.addChild(new Text(theme.fg(\"dim\", workingTip.line), 1, 0));\n\t\tthis.statusContainer.addChild(wrapper);\n\t}\n\n\tprivate resolveTurnWorkingTip(): WorkingTipLine | undefined {\n\t\treturn this.turnWorkingTip.resolve(\n\t\t\t() =>\n\t\t\t\tresolveWorkingTipLine({\n\t\t\t\t\ttipsEnabled: this.settingsManager.getTipsEnabled(),\n\t\t\t\t\thistory: this.settingsManager.getTipsHistory(),\n\t\t\t\t\tsessionShownTipIds: this.sessionShownTipIds,\n\t\t\t\t\tnow: Date.now(),\n\t\t\t\t\tdefinitions: TIP_DEFINITIONS,\n\t\t\t\t\tkeys: keyText,\n\t\t\t\t\thasCommand: (command) => this.hasRegisteredCommand(command),\n\t\t\t\t}),\n\t\t\t(tip) => this.recordShownTip(tip.tipId),\n\t\t);\n\t}\n\n\tprivate updateWorkingIndicatorMessage(): void {\n\t\tif (this.activeStatusIndicator?.kind === \"working\") {\n\t\t\tthis.activeStatusIndicator.setMessage(this.workingMessage ?? this.defaultWorkingMessage);\n\t\t}\n\t}\n\n\tprivate clearStatusIndicator(kind?: StatusIndicator[\"kind\"]): void {\n\t\tif (kind && this.activeStatusIndicator?.kind !== kind) {\n\t\t\treturn;\n\t\t}\n\t\tconst hadActiveStatusIndicator = this.activeStatusIndicator !== undefined;\n\t\tconst isClearingWorking = this.activeStatusIndicator?.kind === \"working\";\n\t\tthis.activeStatusIndicator?.dispose();\n\t\tthis.activeStatusIndicator = undefined;\n\t\tif (isClearingWorking) {\n\t\t\tthis.workingStartedAt = undefined;\n\t\t}\n\t\tthis.statusContainer.clear();\n\t\tif (hadActiveStatusIndicator && this.options.tuiMode === \"regular\" && this.ui.getClearOnShrink()) {\n\t\t\tthis.statusContainer.addChild(this.idleStatus);\n\t\t}\n\t}\n\n\tprivate setWorkingVisible(visible: boolean): void {\n\t\tthis.workingVisible = visible;\n\t\tif (!visible) {\n\t\t\tthis.clearStatusIndicator(\"working\");\n\t\t\tthis.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\t\tif (this.session.isStreaming && this.activeStatusIndicator?.kind !== \"working\") {\n\t\t\tthis.showStatusIndicator(\n\t\t\t\tthis.chrome\n\t\t\t\t\t? this.chrome.createWorkingIndicator(\n\t\t\t\t\t\t\tthis.ui,\n\t\t\t\t\t\t\tthis.workingMessage ?? this.defaultWorkingMessage,\n\t\t\t\t\t\t\tthis.getWorkingIndicatorOptions(),\n\t\t\t\t\t\t)\n\t\t\t\t\t: new WorkingStatusIndicator(\n\t\t\t\t\t\t\tthis.ui,\n\t\t\t\t\t\t\tthis.workingMessage ?? this.defaultWorkingMessage,\n\t\t\t\t\t\t\tthis.getWorkingIndicatorOptions(),\n\t\t\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate setWorkingIndicator(options?: WorkingIndicatorOptions): void {\n\t\tthis.workingIndicatorOptions = options;\n\t\tif (this.activeStatusIndicator?.kind === \"working\") {\n\t\t\tthis.activeStatusIndicator.setIndicator(this.getWorkingIndicatorOptions());\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate setHiddenThinkingLabel(label?: string): void {\n\t\tthis.hiddenThinkingLabel = label ?? this.defaultHiddenThinkingLabel;\n\t\tfor (const child of this.chatContainer.children) {\n\t\t\tif (child instanceof AssistantMessageComponent) {\n\t\t\t\tchild.setHiddenThinkingLabel(this.hiddenThinkingLabel);\n\t\t\t}\n\t\t}\n\t\tif (this.streamingComponent) {\n\t\t\tthis.streamingComponent.setHiddenThinkingLabel(this.hiddenThinkingLabel);\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Set an extension widget (string array or custom component).\n\t */\n\tprivate setExtensionWidget(\n\t\tkey: string,\n\t\tcontent: string[] | ((tui: TUI, thm: Theme) => Component & { dispose?(): void }) | undefined,\n\t\toptions?: ExtensionWidgetOptions,\n\t): void {\n\t\tconst placement = options?.placement ?? \"aboveEditor\";\n\t\tconst targetMap = placement === \"belowEditor\" ? this.extensionWidgetsBelow : this.extensionWidgetsAbove;\n\t\tconst otherMap = placement === \"belowEditor\" ? this.extensionWidgetsAbove : this.extensionWidgetsBelow;\n\t\tconst removeFrom = (map: Map<string, Component & { dispose?(): void }>) => {\n\t\t\tconst existing = map.get(key);\n\t\t\tif (existing?.dispose) existing.dispose();\n\t\t\tmap.delete(key);\n\t\t};\n\n\t\tremoveFrom(otherMap);\n\n\t\tif (content === undefined) {\n\t\t\tremoveFrom(targetMap);\n\t\t\tthis.renderWidgets();\n\t\t\treturn;\n\t\t}\n\n\t\tlet component: Component & { dispose?(): void };\n\n\t\tif (Array.isArray(content)) {\n\t\t\t// Wrap string array in a Container with Text components\n\t\t\tconst container = new Container();\n\t\t\tfor (const line of content.slice(0, InteractiveMode.MAX_WIDGET_LINES)) {\n\t\t\t\tcontainer.addChild(new Text(line, 1, 0));\n\t\t\t}\n\t\t\tif (content.length > InteractiveMode.MAX_WIDGET_LINES) {\n\t\t\t\tcontainer.addChild(new Text(theme.fg(\"muted\", \"... (widget truncated)\"), 1, 0));\n\t\t\t}\n\t\t\tcomponent = container;\n\t\t} else {\n\t\t\t// Factory function - create component\n\t\t\tcomponent = content(this.ui, theme);\n\t\t}\n\n\t\t// Map.set on an existing key keeps its insertion position, so a refreshing widget stays\n\t\t// put instead of moving past its neighbours and reshuffling the stacking order each paint.\n\t\tconst existing = targetMap.get(key);\n\t\tif (existing?.dispose) existing.dispose();\n\t\ttargetMap.set(key, component);\n\t\tthis.renderWidgets();\n\t}\n\n\tprivate clearExtensionWidgets(): void {\n\t\tfor (const widget of this.extensionWidgetsAbove.values()) {\n\t\t\twidget.dispose?.();\n\t\t}\n\t\tfor (const widget of this.extensionWidgetsBelow.values()) {\n\t\t\twidget.dispose?.();\n\t\t}\n\t\tthis.extensionWidgetsAbove.clear();\n\t\tthis.extensionWidgetsBelow.clear();\n\t\tthis.renderWidgets();\n\t}\n\n\tprivate resetExtensionUI(): void {\n\t\tif (this.extensionSelector) {\n\t\t\tthis.hideExtensionSelector();\n\t\t}\n\t\tif (this.extensionInput) {\n\t\t\tthis.hideExtensionInput();\n\t\t}\n\t\tif (this.extensionEditor) {\n\t\t\tthis.hideExtensionEditor();\n\t\t}\n\t\tthis.ui.hideOverlay();\n\t\tthis.clearExtensionTerminalInputListeners();\n\t\tthis.setExtensionFooter(undefined);\n\t\tthis.setExtensionHeader(undefined);\n\t\tthis.clearExtensionWidgets();\n\t\tthis.footerDataProvider.clearExtensionStatuses();\n\t\tthis.footer.invalidate();\n\t\tthis.autocompleteProviderWrappers = [];\n\t\tthis.setCustomEditorComponent(undefined);\n\t\tthis.setupAutocompleteProvider();\n\t\tthis.defaultEditor.onExtensionShortcut = undefined;\n\t\tthis.activeToolExecutions.clear();\n\t\tthis.activeToolExecutionTerminalTitle = undefined;\n\t\tthis.workingMessageBeforeActiveTool = undefined;\n\t\tthis.extensionTerminalTitle = undefined;\n\t\tthis.updateTerminalTitle();\n\t\tthis.workingMessage = undefined;\n\t\tthis.workingVisible = true;\n\t\tthis.setWorkingIndicator();\n\t\tthis.updateWorkingIndicatorMessage();\n\t\tthis.setHiddenThinkingLabel();\n\t\tthis.clearToolHookStatuses();\n\t}\n\n\t// Maximum total widget lines to prevent viewport overflow\n\tprivate static readonly MAX_WIDGET_LINES = 10;\n\n\t/**\n\t * Render all extension widgets to the widget container.\n\t */\n\tprivate renderWidgets(): void {\n\t\tif (!this.widgetContainerAbove || !this.widgetContainerBelow) return;\n\t\tthis.renderWidgetContainer(this.widgetContainerAbove, this.extensionWidgetsAbove, true, true);\n\t\tthis.renderWidgetContainer(this.widgetContainerBelow, this.extensionWidgetsBelow, false, false);\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate renderWidgetContainer(\n\t\tcontainer: Container,\n\t\twidgets: Map<string, Component & { dispose?(): void }>,\n\t\tspacerWhenEmpty: boolean,\n\t\tleadingSpacer: boolean,\n\t): void {\n\t\tcontainer.clear();\n\n\t\tif (widgets.size === 0) {\n\t\t\tif (spacerWhenEmpty) {\n\t\t\t\tcontainer.addChild(new Spacer(1));\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tif (leadingSpacer) {\n\t\t\tcontainer.addChild(new Spacer(1));\n\t\t}\n\t\tfor (const component of widgets.values()) {\n\t\t\tcontainer.addChild(component);\n\t\t}\n\t}\n\n\t/**\n\t * Set a custom footer component, or restore the built-in footer.\n\t */\n\tprivate setExtensionFooter(\n\t\tfactory:\n\t\t\t| ((tui: TUI, thm: Theme, footerData: ReadonlyFooterDataProvider) => Component & { dispose?(): void })\n\t\t\t| undefined,\n\t): void {\n\t\t// Dispose existing custom footer\n\t\tif (this.customFooter?.dispose) {\n\t\t\tthis.customFooter.dispose();\n\t\t}\n\n\t\tthis.footerContainer.clear();\n\t\tif (factory) {\n\t\t\t// Create and add custom footer, passing the data provider\n\t\t\tthis.customFooter = factory(this.ui, theme, this.footerDataProvider);\n\t\t\tthis.footerContainer.addChild(this.customFooter);\n\t\t} else {\n\t\t\t// Restore built-in footer\n\t\t\tthis.customFooter = undefined;\n\t\t\tthis.footerContainer.addChild(this.footer);\n\t\t}\n\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Set a custom header component, or restore the built-in header.\n\t */\n\tprivate setExtensionHeader(factory: ((tui: TUI, thm: Theme) => Component & { dispose?(): void }) | undefined): void {\n\t\t// Header may not be initialized yet if called during early initialization\n\t\tif (!this.builtInHeader) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Dispose existing custom header\n\t\tif (this.customHeader?.dispose) {\n\t\t\tthis.customHeader.dispose();\n\t\t}\n\n\t\t// Find the index of the current header in the header container\n\t\tconst currentHeader = this.customHeader || this.builtInHeader;\n\t\tconst index = this.headerContainer.children.indexOf(currentHeader);\n\n\t\tif (factory) {\n\t\t\t// Create and add custom header\n\t\t\tthis.customHeader = factory(this.ui, theme);\n\t\t\tif (isExpandable(this.customHeader)) {\n\t\t\t\tthis.customHeader.setExpanded(this.toolOutputExpanded);\n\t\t\t}\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.headerContainer.children[index] = this.customHeader;\n\t\t\t} else {\n\t\t\t\t// If not found (e.g. builtInHeader was never added), add at the top\n\t\t\t\tthis.headerContainer.children.unshift(this.customHeader);\n\t\t\t}\n\t\t} else {\n\t\t\t// Restore built-in header\n\t\t\tthis.customHeader = undefined;\n\t\t\tif (isExpandable(this.builtInHeader)) {\n\t\t\t\tthis.builtInHeader.setExpanded(this.toolOutputExpanded);\n\t\t\t}\n\t\t\tif (index !== -1) {\n\t\t\t\tthis.headerContainer.children[index] = this.builtInHeader;\n\t\t\t}\n\t\t}\n\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate addExtensionTerminalInputListener(\n\t\thandler: (data: string) => { consume?: boolean; data?: string } | undefined,\n\t): () => void {\n\t\tconst subscription = {\n\t\t\thandler,\n\t\t\tunsubscribe: this.ui.addInputListener(handler),\n\t\t};\n\t\tthis.extensionTerminalInputSubscriptions.add(subscription);\n\t\treturn () => {\n\t\t\tsubscription.unsubscribe();\n\t\t\tthis.extensionTerminalInputSubscriptions.delete(subscription);\n\t\t};\n\t}\n\n\tprivate rebindExtensionTerminalInputListeners(): void {\n\t\tfor (const subscription of this.extensionTerminalInputSubscriptions) {\n\t\t\tsubscription.unsubscribe();\n\t\t\tsubscription.unsubscribe = this.ui.addInputListener(subscription.handler);\n\t\t}\n\t}\n\n\tprivate clearExtensionTerminalInputListeners(): void {\n\t\tfor (const subscription of this.extensionTerminalInputSubscriptions) subscription.unsubscribe();\n\t\tthis.extensionTerminalInputSubscriptions.clear();\n\t}\n\n\t/**\n\t * Create the ExtensionUIContext for extensions.\n\t */\n\tprivate createProjectTrustContext(cwd: string): ProjectTrustContext {\n\t\tconst ui = this.createExtensionUIContext();\n\t\treturn {\n\t\t\tcwd,\n\t\t\tmode: \"tui\",\n\t\t\thasUI: true,\n\t\t\tui: {\n\t\t\t\tselect: ui.select,\n\t\t\t\tconfirm: ui.confirm,\n\t\t\t\tinput: ui.input,\n\t\t\t\tnotify: ui.notify,\n\t\t\t},\n\t\t};\n\t}\n\n\tprivate createExtensionUIContext(): ExtensionUIContext {\n\t\treturn {\n\t\t\tselect: (title, options, opts) => this.showExtensionSelector(title, options, opts),\n\t\t\tconfirm: (title, message, opts) => this.showExtensionConfirm(title, message, opts),\n\t\t\tinput: (title, placeholder, opts) => this.showExtensionInput(title, placeholder, opts),\n\t\t\tnotify: (message, type) => this.showExtensionNotify(message, type),\n\t\t\tonTerminalInput: (handler) => this.addExtensionTerminalInputListener(handler),\n\t\t\tsetStatus: (key, text) => this.setExtensionStatus(key, text),\n\t\t\tsetWorkingMessage: (message) => {\n\t\t\t\tthis.workingMessage = message;\n\t\t\t\tthis.updateWorkingIndicatorMessage();\n\t\t\t},\n\t\t\tsetWorkingVisible: (visible) => this.setWorkingVisible(visible),\n\t\t\tsetWorkingIndicator: (options) => this.setWorkingIndicator(options),\n\t\t\tsetHiddenThinkingLabel: (label) => this.setHiddenThinkingLabel(label),\n\t\t\tsetWidget: (\n\t\t\t\tkey: string,\n\t\t\t\tcontent: string[] | ((tui: TUI, thm: Theme) => Component & { dispose?(): void }) | undefined,\n\t\t\t\toptions?: ExtensionWidgetOptions,\n\t\t\t) => this.setExtensionWidget(key, content, options),\n\t\t\tsetFooter: (factory) => this.setExtensionFooter(factory),\n\t\t\tsetHeader: (factory) => this.setExtensionHeader(factory),\n\t\t\tsetTitle: (title) => {\n\t\t\t\tthis.extensionTerminalTitle = title;\n\t\t\t\tthis.applyTerminalTitle();\n\t\t\t},\n\t\t\tcustom: (factory, options) => this.showExtensionCustom(factory, options),\n\t\t\tpasteToEditor: (text) => this.editor.handleInput(`\\x1b[200~${text}\\x1b[201~`),\n\t\t\tsetEditorText: (text) => this.editor.setText(text),\n\t\t\tgetEditorText: () => this.getExpandedEditorText(),\n\t\t\teditor: (title, prefill) => this.showExtensionEditor(title, prefill),\n\t\t\taddAutocompleteProvider: (factory) => {\n\t\t\t\tthis.autocompleteProviderWrappers.push(factory);\n\t\t\t\tthis.setupAutocompleteProvider();\n\t\t\t},\n\t\t\tsetEditorComponent: (factory) => this.setCustomEditorComponent(factory),\n\t\t\tgetEditorComponent: () => this.editorComponentFactory,\n\t\t\tget theme() {\n\t\t\t\treturn theme;\n\t\t\t},\n\t\t\tgetAllThemes: () => getAvailableThemesWithPaths(),\n\t\t\tgetTheme: (name) => getThemeByName(name),\n\t\t\tsetTheme: (themeOrName) => {\n\t\t\t\tif (themeOrName instanceof Theme) {\n\t\t\t\t\treturn this.themeController.setThemeInstance(themeOrName);\n\t\t\t\t}\n\t\t\t\tconst result = this.themeController.setThemeName(themeOrName);\n\t\t\t\tif (result.success) {\n\t\t\t\t\tif (this.settingsManager.getTheme() !== themeOrName) {\n\t\t\t\t\t\tthis.settingsManager.setTheme(themeOrName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t},\n\t\t\tgetToolsExpanded: () => this.toolOutputExpanded,\n\t\t\tsetToolsExpanded: (expanded) => this.setToolsExpanded(expanded),\n\t\t};\n\t}\n\n\t/**\n\t * Show a selector for extensions.\n\t */\n\tprivate showExtensionSelector(\n\t\ttitle: string,\n\t\toptions: string[],\n\t\topts?: ExtensionUIDialogOptions,\n\t): Promise<string | undefined> {\n\t\treturn new Promise((resolve) => {\n\t\t\tif (opts?.signal?.aborted) {\n\t\t\t\tresolve(undefined);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst onAbort = () => {\n\t\t\t\tthis.hideExtensionSelector();\n\t\t\t\tresolve(undefined);\n\t\t\t};\n\t\t\topts?.signal?.addEventListener(\"abort\", onAbort, { once: true });\n\n\t\t\tthis.extensionSelector = new ExtensionSelectorComponent(\n\t\t\t\ttitle,\n\t\t\t\toptions,\n\t\t\t\t(option) => {\n\t\t\t\t\topts?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tthis.hideExtensionSelector();\n\t\t\t\t\tresolve(option);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\topts?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tthis.hideExtensionSelector();\n\t\t\t\t\tresolve(undefined);\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\ttui: this.ui,\n\t\t\t\t\ttimeout: opts?.timeout,\n\t\t\t\t\tonToggleToolsExpanded: () => this.toggleToolOutputExpansion(),\n\t\t\t\t},\n\t\t\t);\n\n\t\t\tthis.disposeActiveSelector();\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.extensionSelector);\n\t\t\tthis.ui.setFocus(this.extensionSelector);\n\t\t\tthis.ui.requestRender();\n\t\t});\n\t}\n\n\t/**\n\t * Hide the extension selector.\n\t */\n\tprivate hideExtensionSelector(): void {\n\t\tthis.extensionSelector?.dispose();\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(this.editor);\n\t\tthis.extensionSelector = undefined;\n\t\tthis.ui.setFocus(this.editor);\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Show a confirmation dialog for extensions.\n\t */\n\tprivate async showExtensionConfirm(\n\t\ttitle: string,\n\t\tmessage: string,\n\t\topts?: ExtensionUIDialogOptions,\n\t): Promise<boolean> {\n\t\tconst result = await this.showExtensionSelector(`${title}\\n${message}`, [\"Yes\", \"No\"], opts);\n\t\treturn result === \"Yes\";\n\t}\n\n\tprivate async promptForMissingSessionCwd(error: MissingSessionCwdError): Promise<string | undefined> {\n\t\tconst confirmed = await this.showExtensionConfirm(\n\t\t\t\"Session cwd not found\",\n\t\t\tformatMissingSessionCwdPrompt(error.issue),\n\t\t);\n\t\treturn confirmed ? error.issue.fallbackCwd : undefined;\n\t}\n\n\t/**\n\t * Show a text input for extensions.\n\t */\n\tprivate showExtensionInput(\n\t\ttitle: string,\n\t\tplaceholder?: string,\n\t\topts?: ExtensionUIDialogOptions,\n\t): Promise<string | undefined> {\n\t\treturn new Promise((resolve) => {\n\t\t\tif (opts?.signal?.aborted) {\n\t\t\t\tresolve(undefined);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tconst onAbort = () => {\n\t\t\t\tthis.hideExtensionInput();\n\t\t\t\tresolve(undefined);\n\t\t\t};\n\t\t\topts?.signal?.addEventListener(\"abort\", onAbort, { once: true });\n\n\t\t\tthis.extensionInput = new ExtensionInputComponent(\n\t\t\t\ttitle,\n\t\t\t\tplaceholder,\n\t\t\t\t(value) => {\n\t\t\t\t\topts?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tthis.hideExtensionInput();\n\t\t\t\t\tresolve(value);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\topts?.signal?.removeEventListener(\"abort\", onAbort);\n\t\t\t\t\tthis.hideExtensionInput();\n\t\t\t\t\tresolve(undefined);\n\t\t\t\t},\n\t\t\t\t{ tui: this.ui, timeout: opts?.timeout },\n\t\t\t);\n\n\t\t\tthis.disposeActiveSelector();\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.extensionInput);\n\t\t\tthis.ui.setFocus(this.extensionInput);\n\t\t\tthis.ui.requestRender();\n\t\t});\n\t}\n\n\t/**\n\t * Hide the extension input.\n\t */\n\tprivate hideExtensionInput(): void {\n\t\tthis.extensionInput?.dispose();\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(this.editor);\n\t\tthis.extensionInput = undefined;\n\t\tthis.ui.setFocus(this.editor);\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Show a multi-line editor for extensions (with Ctrl+G support).\n\t */\n\tprivate showExtensionEditor(title: string, prefill?: string): Promise<string | undefined> {\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.extensionEditor = new ExtensionEditorComponent(\n\t\t\t\tthis.ui,\n\t\t\t\tthis.keybindings,\n\t\t\t\ttitle,\n\t\t\t\tprefill,\n\t\t\t\t(value) => {\n\t\t\t\t\tthis.hideExtensionEditor();\n\t\t\t\t\tresolve(value);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tthis.hideExtensionEditor();\n\t\t\t\t\tresolve(undefined);\n\t\t\t\t},\n\t\t\t\tundefined,\n\t\t\t\tthis.settingsManager.getExternalEditorCommand(),\n\t\t\t);\n\n\t\t\tthis.disposeActiveSelector();\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.extensionEditor);\n\t\t\tthis.ui.setFocus(this.extensionEditor);\n\t\t\tthis.ui.requestRender();\n\t\t});\n\t}\n\n\t/**\n\t * Hide the extension editor.\n\t */\n\tprivate hideExtensionEditor(): void {\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(this.editor);\n\t\tthis.extensionEditor = undefined;\n\t\tthis.ui.setFocus(this.editor);\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Full editor text with paste markers expanded. Prefers the editor's own\n\t * getExpandedText(); falls back to expanding from the paste snapshot when\n\t * only getPasteState() is implemented, then to the raw text (an editor\n\t * with neither capability never had expandable markers).\n\t */\n\tprivate getExpandedEditorText(): string {\n\t\treturn expandEditorSubmission(this.editor, this.editor.getText());\n\t}\n\n\t/**\n\t * Set a custom editor component from an extension.\n\t * Pass undefined to restore the default editor.\n\t */\n\tprivate setCustomEditorComponent(factory: EditorFactory | undefined): void {\n\t\tthis.editorComponentFactory = factory;\n\t\tif (!factory && this.editor === this.defaultEditor) return;\n\n\t\t// Save text from current editor before switching. Paste markers must not\n\t\t// be transferred as raw text alone: the destination editor instance has no\n\t\t// paste registry, so a bare marker would become dead literal text and the\n\t\t// pasted content would be silently lost on submit. When both editors\n\t\t// support the paste-state API, transfer the registry so markers stay\n\t\t// collapsed; otherwise fall back to the expanded text.\n\t\tthis.disposeActiveSelector();\n\t\tthis.editorContainer.clear();\n\n\t\tif (factory) {\n\t\t\t// Create the custom editor with tui, theme, and keybindings\n\t\t\tconst newEditor = factory(\n\t\t\t\tthis.ui,\n\t\t\t\tthis.chrome ? this.chrome.getEditorTheme() : getEditorTheme(),\n\t\t\t\tthis.keybindings,\n\t\t\t);\n\n\t\t\t// Wire up callbacks from the default editor\n\t\t\tnewEditor.onSubmit = (text) => {\n\t\t\t\tthis.defaultEditor.onSubmit?.(expandSubmittedText(newEditor, text));\n\t\t\t};\n\t\t\tnewEditor.onChange = this.defaultEditor.onChange;\n\n\t\t\t// Copy text (and any collapsed paste/image markers) from previous editor.\n\t\t\t// Image payloads live on this instance, so they must be dropped when the\n\t\t\t// destination cannot own their markers.\n\t\t\tif (!transferEditorContent(this.editor, newEditor).imageMarkersTransferred) {\n\t\t\t\tthis.pendingImages.clear();\n\t\t\t}\n\t\t\tthis.subscribeImageMarkers(newEditor);\n\n\t\t\t// Copy appearance settings if supported\n\t\t\tif (newEditor.borderColor !== undefined) {\n\t\t\t\tnewEditor.borderColor = this.defaultEditor.borderColor;\n\t\t\t}\n\t\t\tif (newEditor.setPaddingX !== undefined) {\n\t\t\t\tnewEditor.setPaddingX(this.defaultEditor.getPaddingX());\n\t\t\t}\n\t\t\tif (newEditor.setAutocompleteMaxVisible !== undefined) {\n\t\t\t\tnewEditor.setAutocompleteMaxVisible(this.defaultEditor.getAutocompleteMaxVisible());\n\t\t\t}\n\n\t\t\t// Set autocomplete if supported\n\t\t\tif (newEditor.setAutocompleteProvider && this.autocompleteProvider) {\n\t\t\t\tnewEditor.setAutocompleteProvider(this.autocompleteProvider);\n\t\t\t}\n\n\t\t\t// If extending CustomEditor, copy app-level handlers\n\t\t\t// Use duck typing since instanceof fails across jiti module boundaries\n\t\t\ttype CustomEditorLike = typeof newEditor & {\n\t\t\t\tactionHandlers?: unknown;\n\t\t\t\tonEscape?: () => void;\n\t\t\t\tonCtrlD?: () => void;\n\t\t\t\tonUp?: () => void;\n\t\t\t\tonDown?: () => void;\n\t\t\t\tonPasteImage?: () => void;\n\t\t\t\tonExtensionShortcut?: (data: string) => boolean | undefined;\n\t\t\t};\n\t\t\tconst customEditor: CustomEditorLike = newEditor;\n\t\t\tif (\"actionHandlers\" in customEditor && customEditor.actionHandlers instanceof Map) {\n\t\t\t\tif (!customEditor.onEscape) {\n\t\t\t\t\tcustomEditor.onEscape = () => this.defaultEditor.onEscape?.();\n\t\t\t\t}\n\t\t\t\tif (!customEditor.onCtrlD) {\n\t\t\t\t\tcustomEditor.onCtrlD = () => this.defaultEditor.onCtrlD?.();\n\t\t\t\t}\n\t\t\t\tif (!customEditor.onPasteImage) {\n\t\t\t\t\tcustomEditor.onPasteImage = () => this.defaultEditor.onPasteImage?.();\n\t\t\t\t}\n\t\t\t\tif (!customEditor.onExtensionShortcut) {\n\t\t\t\t\tcustomEditor.onExtensionShortcut = (data: string) => this.defaultEditor.onExtensionShortcut?.(data);\n\t\t\t\t}\n\t\t\t\t// Copy action handlers (clear, suspend, model switching, etc.)\n\t\t\t\tfor (const [action, handler] of this.defaultEditor.actionHandlers) {\n\t\t\t\t\t(customEditor.actionHandlers as Map<string, () => void>).set(action, handler);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tthis.editor = newEditor;\n\t\t} else {\n\t\t\t// Restore default editor with text from custom editor. Skip the\n\t\t\t// transfer when the default editor is already active (e.g.\n\t\t\t// resetExtensionUI() calls this unconditionally): there is no\n\t\t\t// hand-off, and a setText round-trip would be pure churn on the\n\t\t\t// user's draft.\n\t\t\tif (this.editor !== this.defaultEditor) {\n\t\t\t\tif (!transferEditorContent(this.editor, this.defaultEditor).imageMarkersTransferred) {\n\t\t\t\t\tthis.pendingImages.clear();\n\t\t\t\t}\n\t\t\t\tthis.subscribeImageMarkers(this.defaultEditor);\n\t\t\t}\n\t\t\tthis.editor = this.defaultEditor;\n\t\t}\n\n\t\tthis.editorContainer.addChild(this.editor as Component);\n\t\tthis.ui.setFocus(this.editor as Component);\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Show a notification for extensions.\n\t */\n\tprivate showExtensionNotify(message: string, type?: \"info\" | \"warning\" | \"error\"): void {\n\t\tif (type === \"error\") {\n\t\t\tthis.showError(message);\n\t\t} else if (type === \"warning\") {\n\t\t\tthis.showWarning(message);\n\t\t} else {\n\t\t\tthis.showStatus(message);\n\t\t}\n\t}\n\n\t/** Show a custom component with keyboard focus. Overlay mode renders on top of existing content. */\n\tprivate async showExtensionCustom<T>(\n\t\tfactory: (\n\t\t\ttui: TUI,\n\t\t\ttheme: Theme,\n\t\t\tkeybindings: KeybindingsManager,\n\t\t\tdone: (result: T) => void,\n\t\t) => (Component & { dispose?(): void }) | Promise<Component & { dispose?(): void }>,\n\t\toptions?: {\n\t\t\toverlay?: boolean;\n\t\t\toverlayOptions?: OverlayOptions | (() => OverlayOptions);\n\t\t\tonHandle?: (handle: OverlayHandle) => void;\n\t\t},\n\t): Promise<T> {\n\t\tconst savedText = this.editor.getText();\n\t\tconst isOverlay = options?.overlay ?? false;\n\n\t\tconst restoreEditor = () => {\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.editor.setText(savedText);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tlet component: Component & { dispose?(): void };\n\t\t\tlet closed = false;\n\n\t\t\tconst close = (result: T) => {\n\t\t\t\tif (closed) return;\n\t\t\t\tclosed = true;\n\t\t\t\tif (isOverlay) this.ui.hideOverlay();\n\t\t\t\telse restoreEditor();\n\t\t\t\t// Note: both branches above already call requestRender\n\t\t\t\tresolve(result);\n\t\t\t\ttry {\n\t\t\t\t\tcomponent?.dispose?.();\n\t\t\t\t} catch {\n\t\t\t\t\t/* ignore dispose errors */\n\t\t\t\t}\n\t\t\t};\n\n\t\t\tPromise.resolve(factory(this.ui, theme, this.keybindings, close))\n\t\t\t\t.then((c) => {\n\t\t\t\t\tif (closed) return;\n\t\t\t\t\tcomponent = c;\n\t\t\t\t\tif (isOverlay) {\n\t\t\t\t\t\t// Resolve overlay options - can be static or dynamic function\n\t\t\t\t\t\tconst resolveOptions = (): OverlayOptions | undefined => {\n\t\t\t\t\t\t\tif (options?.overlayOptions) {\n\t\t\t\t\t\t\t\tconst opts =\n\t\t\t\t\t\t\t\t\ttypeof options.overlayOptions === \"function\"\n\t\t\t\t\t\t\t\t\t\t? options.overlayOptions()\n\t\t\t\t\t\t\t\t\t\t: options.overlayOptions;\n\t\t\t\t\t\t\t\treturn opts;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Fallback: use component's width property if available\n\t\t\t\t\t\t\tconst w = (component as { width?: number }).width;\n\t\t\t\t\t\t\treturn w ? { width: w } : undefined;\n\t\t\t\t\t\t};\n\t\t\t\t\t\tconst overlayOptions = resolveOptions();\n\t\t\t\t\t\tconst handle = this.ui.showOverlay(component, overlayOptions);\n\t\t\t\t\t\t// Expose handle to caller for visibility control\n\t\t\t\t\t\toptions?.onHandle?.(handle);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.disposeActiveSelector();\n\t\t\t\t\t\tthis.editorContainer.clear();\n\t\t\t\t\t\tthis.editorContainer.addChild(component);\n\t\t\t\t\t\tthis.ui.setFocus(component);\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\t.catch((err) => {\n\t\t\t\t\tif (closed) return;\n\t\t\t\t\tif (!isOverlay) restoreEditor();\n\t\t\t\t\treject(err);\n\t\t\t\t});\n\t\t});\n\t}\n\n\t/**\n\t * Show an extension error in the UI.\n\t */\n\tprivate showExtensionError(error: {\n\t\treadonly extensionPath: string;\n\t\treadonly event?: string;\n\t\treadonly error: string;\n\t\treadonly stack?: string;\n\t}): void {\n\t\tconst errorMsg = formatExtensionErrorHeadline(error);\n\t\tconst errorText = new Text(theme.fg(\"error\", errorMsg), 1, 0);\n\t\tthis.chatContainer.addChild(errorText);\n\t\tif (error.stack) {\n\t\t\t// Show stack trace in dim color, indented\n\t\t\tconst stackLines = error.stack\n\t\t\t\t.split(\"\\n\")\n\t\t\t\t.slice(1) // Skip first line (duplicates error message)\n\t\t\t\t.map((line) => theme.fg(\"dim\", ` ${line.trim()}`))\n\t\t\t\t.join(\"\\n\");\n\t\t\tif (stackLines) {\n\t\t\t\tthis.chatContainer.addChild(new Text(stackLines, 1, 0));\n\t\t\t}\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\t// =========================================================================\n\t// Key Handlers\n\t// =========================================================================\n\n\tprivate setupKeyHandlers(): void {\n\t\t// Set up handlers on defaultEditor - they use this.editor for text access\n\t\t// so they work correctly regardless of which editor is active\n\t\tthis.defaultEditor.onEscape = () => {\n\t\t\tif (this.session.isStreaming || this.session.retryAttempt > 0) {\n\t\t\t\tvoid this.abortAndFireQueuedMessages();\n\t\t\t} else if (this.session.isBashRunning) {\n\t\t\t\tthis.session.abortBash();\n\t\t\t} else if (this.isBashMode) {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tthis.isBashMode = false;\n\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t} else if (!this.editor.getText().trim()) {\n\t\t\t\t// Double-escape with empty editor triggers /tree, /fork, or nothing based on setting\n\t\t\t\tconst action = this.settingsManager.getDoubleEscapeAction();\n\t\t\t\tif (action !== \"none\") {\n\t\t\t\t\tconst now = Date.now();\n\t\t\t\t\tif (now - this.lastEscapeTime < 500) {\n\t\t\t\t\t\tif (action === \"tree\") {\n\t\t\t\t\t\t\tthis.showTreeSelector();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tthis.showUserMessageSelector();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.lastEscapeTime = 0;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.lastEscapeTime = now;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\t// Register app action handlers\n\t\tthis.defaultEditor.onAction(\"app.clear\", () => this.handleCtrlC());\n\t\tthis.defaultEditor.onCtrlD = () => this.handleCtrlD();\n\t\tthis.defaultEditor.onAction(\"app.suspend\", () => this.handleCtrlZ());\n\t\tthis.defaultEditor.onAction(\"app.thinking.cycle\", () => this.cycleThinkingLevel());\n\t\tthis.defaultEditor.onAction(\"app.model.cycleForward\", () => this.cycleModel(\"forward\"));\n\t\tthis.defaultEditor.onAction(\"app.model.cycleBackward\", () => this.cycleModel(\"backward\"));\n\n\t\t// Global debug handler on TUI (works regardless of focus)\n\t\tthis.ui.onDebug = () => this.handleDebugCommand();\n\t\tthis.defaultEditor.onAction(\"app.model.select\", () => this.showModelSelector());\n\t\tthis.defaultEditor.onAction(\"app.history.search\", async () => {\n\t\t\ttry {\n\t\t\t\tawait this.session.prompt(\"/history\");\n\t\t\t} catch (error) {\n\t\t\t\tthis.showError(`Failed to open history search: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\t}\n\t\t});\n\t\tthis.defaultEditor.onAction(\"app.tools.expand\", () => this.toggleToolOutputExpansion());\n\t\tthis.defaultEditor.onAction(\"app.thinking.toggle\", () => this.toggleThinkingBlockVisibility());\n\t\tthis.defaultEditor.onAction(\"app.editor.external\", () => void this.handleOpenExternalEditor());\n\t\tthis.defaultEditor.onAction(\"app.message.copy\", () => void this.handleCopyCommand({ flashConfirmation: true }));\n\t\tthis.defaultEditor.onAction(\"app.message.followUp\", () => this.handleFollowUp());\n\t\tthis.defaultEditor.onAction(\"app.message.dequeue\", () => this.handleDequeue());\n\t\tthis.defaultEditor.onAction(\"app.session.new\", () => this.handleClearCommand());\n\t\tthis.defaultEditor.onAction(\"app.session.tree\", () => this.showTreeSelector());\n\t\tthis.defaultEditor.onAction(\"app.session.fork\", () => this.showUserMessageSelector());\n\t\tthis.defaultEditor.onAction(\"app.session.resume\", () => this.showSessionSelector());\n\n\t\tthis.defaultEditor.onChange = (text: string) => {\n\t\t\tconst wasBashMode = this.isBashMode;\n\t\t\tthis.isBashMode = text.trimStart().startsWith(\"!\");\n\t\t\tif (wasBashMode !== this.isBashMode) {\n\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t}\n\t\t\tthis.updateShortcutOverlay(text);\n\t\t};\n\n\t\t// Keep pendingImages aligned with the markers the editor displays.\n\t\tthis.subscribeImageMarkers(this.defaultEditor);\n\n\t\t// Handle clipboard paste (triggered on Ctrl+V). Images are attached in\n\t\t// memory behind an atomic `[Image #N]` marker; otherwise, paste plain text\n\t\t// from the system clipboard.\n\t\tthis.defaultEditor.onPasteImage = () => {\n\t\t\tthis.lastInputWasPaste = true;\n\t\t\tvoid this.handleClipboardPaste();\n\t\t};\n\n\t\tconst previousEscapeHandler = this.defaultEditor.onEscape;\n\t\tthis.defaultEditor.onEscape = () => {\n\t\t\tthis.hideShortcutOverlay();\n\t\t\tpreviousEscapeHandler?.();\n\t\t};\n\t}\n\n\tprivate async handleRightClickPaste(): Promise<void> {\n\t\tconst target = this.renderer.getFocusedComponent();\n\t\tconst handleInput = target?.handleInput;\n\t\tif (!target || !handleInput) return;\n\t\ttry {\n\t\t\tconst text = await readClipboardText();\n\t\t\tif (!text || this.renderer.getFocusedComponent() !== target) return;\n\t\t\thandleInput.call(target, `\\x1b[200~${text}\\x1b[201~`);\n\t\t\tthis.ui.requestRender();\n\t\t} catch {\n\t\t\t// Silently ignore clipboard errors (may not have permission, etc.)\n\t\t}\n\t}\n\n\tprivate async handleClipboardPaste(): Promise<void> {\n\t\ttry {\n\t\t\tconst image = await readClipboardImage();\n\t\t\tconst attached =\n\t\t\t\timage &&\n\t\t\t\t(await attachClipboardImage(\n\t\t\t\t\t{\n\t\t\t\t\t\teditor: this.editor,\n\t\t\t\t\t\tpendingImages: this.pendingImages,\n\t\t\t\t\t\tsettings: this.settingsManager,\n\t\t\t\t\t\tisCompacting: () => (this.session as { isCompacting?: boolean } | undefined)?.isCompacting === true,\n\t\t\t\t\t\tshowStatus: (message) => this.showStatus(message),\n\t\t\t\t\t\trequestRender: () => this.ui.requestRender(),\n\t\t\t\t\t},\n\t\t\t\t\timage,\n\t\t\t\t));\n\t\t\tif (attached) return;\n\n\t\t\tconst text = await readClipboardText();\n\t\t\tif (text) {\n\t\t\t\tthis.editor.insertTextAtCursor?.(text);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\tthis.getSessionLogger().warn(\"clipboard_error\", {\n\t\t\t\top: \"paste\",\n\t\t\t\terror: message,\n\t\t\t});\n\t\t\tthis.showStatus(`Clipboard paste failed: ${sanitizeTuiErrorMessage(message)}`);\n\t\t}\n\t}\n\n\t/** Route an editor's image-marker changes into {@link reconcilePendingImages}. */\n\tprivate subscribeImageMarkers(editor: EditorComponent): void {\n\t\tif (!editor.insertImageMarker) return;\n\t\teditor.onImageMarkersChanged = (order) => this.reconcilePendingImages(order);\n\t\t// The editor's undo stack restores marker TEXT and registry ids, but the\n\t\t// payloads live HERE; mirror them into every undo snapshot so undo restores\n\t\t// both halves of the pairing. Without this, deleting a marker re-keys the\n\t\t// survivors onto its number and a later undo re-displays the deleted marker\n\t\t// with no (or the wrong) payload behind it.\n\t\teditor.snapshotAttachmentState = () => new Map(this.pendingImages);\n\t\teditor.restoreAttachmentState = (state) => {\n\t\t\tif (!(state instanceof Map)) return;\n\t\t\tthis.pendingImages.clear();\n\t\t\tfor (const [key, image] of state) {\n\t\t\t\tthis.pendingImages.set(key, image as ImageContent);\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Re-key {@link pendingImages} onto the marker numbers the editor now\n\t * displays. `order` lists the SURVIVING marker ids (pre-renumber, i.e. the\n\t * keys the payloads currently sit under) in text reading order, and the\n\t * editor keeps the visible numbers canonical 1..k in reading order, so a\n\t * payload's new key is its position in that list. Ids absent from `order`\n\t * are dropped; reported ids with no payload (a hand-typed marker) are skipped\n\t * without consuming anyone else's slot.\n\t *\n\t * The map is mutated IN PLACE, never replaced: handleClipboardPaste hands\n\t * this.pendingImages by reference into attachClipboardImage's deps, and a\n\t * fresh identity would orphan that reference - the second paste in a turn\n\t * then wrote into the dead map and silently destroyed its image.\n\t */\n\tprivate reconcilePendingImages(order: number[]): void {\n\t\tif (this.pendingImages.size === 0) return;\n\t\tconst reconciled = new Map<number, ImageContent>();\n\t\torder.forEach((id, index) => {\n\t\t\tconst image = this.pendingImages.get(id);\n\t\t\tif (image) reconciled.set(index + 1, image);\n\t\t});\n\t\tthis.pendingImages.clear();\n\t\tfor (const [key, image] of reconciled) {\n\t\t\tthis.pendingImages.set(key, image);\n\t\t}\n\t}\n\n\t/**\n\t * Resolve the `[Image #N]` markers in `submittedText` (in READING order)\n\t * into the image array submitted alongside it, then clear\n\t * {@link pendingImages}.\n\t *\n\t * Reads ONLY the submitted text plus pendingImages - never live editor\n\t * state: pi-tui's `Editor.submitValue()` resets the editor and clears its\n\t * registries BEFORE `onSubmit` fires. A marker with no pending payload (a\n\t * hand-typed `[Image #N]`, or the second half of a kill/yank duplicate) is\n\t * passed through untouched and consumes no slot; a payload-bearing\n\t * marker's FIRST occurrence wins. Slots are assigned 1..k in reading\n\t * order, so the Nth marker in the final text is `images[N-1]`.\n\t */\n\tprivate takeSubmissionImages(submittedText: string): ImageContent[] {\n\t\tconst images: ImageContent[] = [];\n\t\tconst consumed = new Set<number>();\n\t\tfor (const match of submittedText.matchAll(IMAGE_MARKER_PATTERN)) {\n\t\t\tconst id = Number.parseInt(match[1] ?? \"0\", 10);\n\t\t\tif (consumed.has(id)) continue;\n\t\t\tconsumed.add(id);\n\t\t\tconst image = this.pendingImages.get(id);\n\t\t\tif (image) images.push(image);\n\t\t}\n\t\tthis.pendingImages.clear();\n\t\treturn images;\n\t}\n\n\tprivate getSessionLogger(): SessionLogger {\n\t\tthis.sessionLogger ??= createSessionLogger(this.runtimeHost.services.agentDir);\n\t\treturn this.sessionLogger;\n\t}\n\n\tprivate handleStartupSubmit(text: string): void {\n\t\tthis.editor.setText(text);\n\t\tthis.showStatus(\"Startup is still in progress\");\n\t}\n\n\tprivate setupEditorSubmitHandler(): void {\n\t\tthis.defaultEditor.onSubmit = async (text: string) => {\n\t\t\t// Capture-then-clear BEFORE any branch: handleFollowUp's non-streaming\n\t\t\t// path pre-resolves images and hands off here, but slash / extension /\n\t\t\t// bash submissions return before the consuming branches below. Clearing\n\t\t\t// only after use would leak a stale array into a later ordinary\n\t\t\t// submission whose text never references it.\n\t\t\tconst preResolvedImages = this.preResolvedSubmissionImages;\n\t\t\tthis.preResolvedSubmissionImages = undefined;\n\n\t\t\tthis.hideShortcutOverlay();\n\t\t\tthis.lastEditorText = \"\";\n\t\t\ttext = text.trim();\n\t\t\tif (!text) return;\n\n\t\t\t// Handle commands\n\t\t\tif (text === \"/settings\") {\n\t\t\t\tthis.showSettingsSelector();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/favorite-models\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.showFavoriteModelsSelector();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/scoped-models\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tthis.showScopedModelsSelector();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/model\" || text.startsWith(\"/model \")) {\n\t\t\t\tconst searchTerm = text.startsWith(\"/model \") ? text.slice(7).trim() : undefined;\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleModelCommand(searchTerm);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/export\" || text.startsWith(\"/export \")) {\n\t\t\t\tawait this.handleExportCommand(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/import\" || text.startsWith(\"/import \")) {\n\t\t\t\tawait this.handleImportCommand(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/share\") {\n\t\t\t\tawait this.handleShareCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/copy\") {\n\t\t\t\tawait this.handleCopyCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/name\" || text.startsWith(\"/name \")) {\n\t\t\t\tthis.handleNameCommand(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/session\") {\n\t\t\t\tthis.handleSessionCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/changelog\") {\n\t\t\t\tthis.handleChangelogCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/keybindings\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleKeybindingsCommand();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/hotkeys\") {\n\t\t\t\tthis.handleHotkeysCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/fork\") {\n\t\t\t\tthis.showUserMessageSelector();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/clone\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleCloneCommand();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/tree\") {\n\t\t\t\tthis.showTreeSelector();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/trust\") {\n\t\t\t\tthis.showTrustSelector();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/login\" || text.startsWith(\"/login \")) {\n\t\t\t\tconst providerRef = text.startsWith(\"/login \") ? text.slice(7).trim() : undefined;\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleLoginCommand(providerRef);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/logout\") {\n\t\t\t\tthis.showOAuthSelector(\"logout\");\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/new\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleClearCommand();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/compact\" || text.startsWith(\"/compact \")) {\n\t\t\t\tconst customInstructions = text.startsWith(\"/compact \") ? text.slice(9).trim() : undefined;\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleCompactCommand(customInstructions);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/reload\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.handleReloadCommand();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/debug\") {\n\t\t\t\tthis.handleDebugCommand();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/arminsayshi\") {\n\t\t\t\tthis.handleArminSaysHi();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/dementedelves\") {\n\t\t\t\tthis.handleDementedDelves();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/resume\") {\n\t\t\t\tthis.showSessionSelector();\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (text === \"/quit\" || text === \"/exit\") {\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.shutdown();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (this.isExtensionCommand(text)) {\n\t\t\t\tthis.editor.addToHistory?.(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.session.prompt(text);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Handle bash command (! for normal, !! for excluded from context)\n\t\t\tif (text.startsWith(\"!\")) {\n\t\t\t\tconst isExcluded = text.startsWith(\"!!\");\n\t\t\t\tconst command = isExcluded ? text.slice(2).trim() : text.slice(1).trim();\n\t\t\t\tif (command) {\n\t\t\t\t\tif (this.session.isBashRunning) {\n\t\t\t\t\t\tthis.showWarning(\"A bash command is already running. Press Esc to cancel it first.\");\n\t\t\t\t\t\tthis.editor.setText(text);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.editor.addToHistory?.(text);\n\t\t\t\t\tawait this.handleBashCommand(command, isExcluded);\n\t\t\t\t\tthis.isBashMode = false;\n\t\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Queue non-command input during compaction.\n\t\t\t// Extension commands short-circuit at the isExtensionCommand branch above and\n\t\t\t// dispatch immediately inside AgentSession.prompt(), so the only text that\n\t\t\t// reaches this compaction branch is non-command user input, which is queued\n\t\t\t// for delivery after compaction settles.\n\t\t\t//\n\t\t\t// Note: the isExtensionCommand re-check below is already unreachable today\n\t\t\t// (the branch above returns first) and stays harmless after the\n\t\t\t// immediate-dispatch hoist in prompt().\n\t\t\tif (this.session.isCompacting) {\n\t\t\t\tif (this.isExtensionCommand(text)) {\n\t\t\t\t\tthis.editor.addToHistory?.(text);\n\t\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\t\tawait this.session.prompt(text);\n\t\t\t\t} else {\n\t\t\t\t\tthis.queueCompactionSubmission(text, \"steer\");\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// If streaming, use prompt() with steer behavior.\n\t\t\t// Extension commands are dispatched immediately by AgentSession.prompt()\n\t\t\t// (short-circuited at the isExtensionCommand branch above); the steer\n\t\t\t// behavior here applies only to ordinary text, prompt template expansion,\n\t\t\t// and queueing.\n\t\t\tif (this.session.isStreaming) {\n\t\t\t\t// Resolve BEFORE setText(\"\"): the editor's prune chain fires\n\t\t\t\t// onImageMarkersChanged([]) and destroys pendingImages.\n\t\t\t\tconst images = preResolvedImages ?? this.takeSubmissionImages(text);\n\t\t\t\tthis.editor.addToHistory?.(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.session.prompt(text, {\n\t\t\t\t\tstreamingBehavior: \"steer\",\n\t\t\t\t\t...(images.length > 0 ? { images } : {}),\n\t\t\t\t});\n\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Normal message submission\n\t\t\t// First, move any pending bash components to chat\n\t\t\tthis.flushPendingBashComponents();\n\n\t\t\tconst images = preResolvedImages ?? this.takeSubmissionImages(text);\n\t\t\tconst submission: InteractiveUserInput = images.length > 0 ? { text, images } : { text };\n\t\t\tif (this.onInputCallback) {\n\t\t\t\tthis.onInputCallback(submission);\n\t\t\t} else {\n\t\t\t\tthis.pendingUserInputs.push(submission);\n\t\t\t}\n\t\t\tthis.editor.addToHistory?.(text);\n\t\t};\n\t}\n\n\tprivate subscribeToAgent(): void {\n\t\tthis.unsubscribe = this.session.subscribe(async (event) => {\n\t\t\tawait this.handleEvent(event);\n\t\t});\n\t}\n\n\tprivate async handleEvent(event: AgentSessionEvent): Promise<void> {\n\t\tif (!this.isInitialized) {\n\t\t\tawait this.init();\n\t\t}\n\n\t\tthis.footer.invalidate();\n\n\t\tswitch (event.type) {\n\t\t\tcase \"agent_start\":\n\t\t\t\tthis.clearPendingTools();\n\t\t\t\tthis.clearActiveToolExecutionStatus();\n\t\t\t\tthis.clearToolHookStatuses();\n\t\t\t\t// Turn boundary: pick a fresh working tip next time the indicator shows.\n\t\t\t\tthis.turnWorkingTip.resetForNewTurn();\n\t\t\t\tif (this.settingsManager.getShowTerminalProgress()) {\n\t\t\t\t\tthis.ui.terminal.setProgress(true);\n\t\t\t\t}\n\t\t\t\t// Restore main escape handler if retry handler is still active\n\t\t\t\t// (retry success event fires later, but we need main handler now)\n\t\t\t\tif (this.retryEscapeHandler) {\n\t\t\t\t\tthis.defaultEditor.onEscape = this.retryEscapeHandler;\n\t\t\t\t\tthis.retryEscapeHandler = undefined;\n\t\t\t\t}\n\t\t\t\tif (this.workingVisible) {\n\t\t\t\t\tthis.showStatusIndicator(\n\t\t\t\t\t\tthis.chrome\n\t\t\t\t\t\t\t? this.chrome.createWorkingIndicator(\n\t\t\t\t\t\t\t\t\tthis.ui,\n\t\t\t\t\t\t\t\t\tthis.workingMessage ?? this.defaultWorkingMessage,\n\t\t\t\t\t\t\t\t\tthis.getWorkingIndicatorOptions(),\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t: new WorkingStatusIndicator(\n\t\t\t\t\t\t\t\t\tthis.ui,\n\t\t\t\t\t\t\t\t\tthis.workingMessage ?? this.defaultWorkingMessage,\n\t\t\t\t\t\t\t\t\tthis.getWorkingIndicatorOptions(),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis.clearStatusIndicator();\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\n\t\t\tcase \"queue_update\":\n\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\n\t\t\tcase \"system_prompt_change\":\n\t\t\t\tthis.showStatus(\n\t\t\t\t\tevent.systemPromptName ? `System prompt: ${event.systemPromptName}` : \"System prompt changed\",\n\t\t\t\t);\n\t\t\t\tbreak;\n\n\t\t\tcase \"entry_appended\":\n\t\t\t\tif (event.entry.type === \"custom\") {\n\t\t\t\t\tthis.addCustomEntryToChat(event.entry);\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"session_info_changed\":\n\t\t\t\tthis.updateTerminalTitle();\n\t\t\t\tthis.footer.invalidate();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\n\t\t\tcase \"thinking_level_changed\":\n\t\t\t\tthis.footer.invalidate();\n\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t\tbreak;\n\n\t\t\tcase \"high_reasoning_warning\":\n\t\t\t\tthis.showHighReasoningWarning(event);\n\t\t\t\tbreak;\n\n\t\t\tcase \"settings_source_selected\":\n\t\t\t\tthis.showSettingsSourceSelected(event);\n\t\t\t\tbreak;\n\n\t\t\tcase \"message_start\":\n\t\t\t\tif (event.message.role === \"custom\") {\n\t\t\t\t\tthis.addMessageToChat(event.message);\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t} else if (event.message.role === \"user\") {\n\t\t\t\t\tthis.addMessageToChat(event.message);\n\t\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t} else if (event.message.role === \"assistant\") {\n\t\t\t\t\tthis.streamingComponent = new AssistantMessageComponent(\n\t\t\t\t\t\tundefined,\n\t\t\t\t\t\tthis.hideThinkingBlock,\n\t\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\t\tthis.hiddenThinkingLabel,\n\t\t\t\t\t\tthis.outputPad,\n\t\t\t\t\t\tthis.getMarkdownTransformers(),\n\t\t\t\t\t);\n\t\t\t\t\tthis.streamingComponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\tthis.streamingMessage = event.message;\n\t\t\t\t\tthis.chatContainer.addChild(this.streamingComponent);\n\t\t\t\t\tthis.streamingReveal.begin(this.streamingComponent, this.streamingMessage);\n\t\t\t\t\tthis.requestStreamingRender();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"message_update\":\n\t\t\t\tif (this.streamingComponent && event.message.role === \"assistant\") {\n\t\t\t\t\tthis.streamingMessage = event.message;\n\t\t\t\t\tthis.streamingReveal.setTarget(this.streamingMessage);\n\n\t\t\t\t\tfor (const content of this.streamingMessage.content) {\n\t\t\t\t\t\tif (content.type === \"toolCall\") {\n\t\t\t\t\t\t\tlet component = this.pendingTools.get(content.id);\n\t\t\t\t\t\t\tif (!component) {\n\t\t\t\t\t\t\t\tcomponent = this.createToolExecutionComponent(content.name, content.id, content.arguments);\n\t\t\t\t\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\t\t\t\t\tthis.pendingTools.set(content.id, component);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst partialJson = getStreamingToolCallPartialJson(content);\n\t\t\t\t\t\t\tif (partialJson && this.settingsManager.getSmoothStreaming()) {\n\t\t\t\t\t\t\t\tthis.toolArgsReveal.update(content.id, component, partialJson);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tthis.toolArgsReveal.finish(content.id);\n\t\t\t\t\t\t\t\tcomponent.updateArgs(content.arguments);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t}\n\t\t\t\tbreak;\n\n\t\t\tcase \"message_end\":\n\t\t\t\tif (event.message.role === \"user\") break;\n\t\t\t\tif (this.streamingComponent && event.message.role === \"assistant\") {\n\t\t\t\t\tthis.streamingMessage = event.message;\n\t\t\t\t\tthis.streamingReveal.stop();\n\t\t\t\t\tfor (const content of this.streamingMessage.content) {\n\t\t\t\t\t\tif (content.type !== \"toolCall\") continue;\n\t\t\t\t\t\tconst component = this.pendingTools.get(content.id);\n\t\t\t\t\t\tif (component && !this.toolArgsReveal.flush(content.id, content.arguments)) {\n\t\t\t\t\t\t\tcomponent.updateArgs(content.arguments);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tthis.toolArgsReveal.flushAll();\n\t\t\t\t\tlet errorMessage: string | undefined;\n\t\t\t\t\tif (this.streamingMessage.stopReason === \"aborted\") {\n\t\t\t\t\t\terrorMessage = abortedErrorLabel(undefined, this.session.retryAttempt);\n\t\t\t\t\t\tthis.streamingMessage.errorMessage = errorMessage;\n\t\t\t\t\t}\n\t\t\t\t\tthis.streamingComponent.updateContent(this.streamingMessage, false);\n\t\t\t\t\tthis.addContinuityNotice(this.streamingMessage);\n\n\t\t\t\t\tif (this.streamingMessage.stopReason === \"aborted\" || this.streamingMessage.stopReason === \"error\") {\n\t\t\t\t\t\tif (!errorMessage) {\n\t\t\t\t\t\t\terrorMessage = this.streamingMessage.errorMessage || \"Error\";\n\t\t\t\t\t\t}\n\t\t\t\t\t\tfor (const [, component] of this.pendingTools.entries()) {\n\t\t\t\t\t\t\tcomponent.updateResult({\n\t\t\t\t\t\t\t\tcontent: [{ type: \"text\", text: errorMessage }],\n\t\t\t\t\t\t\t\tisError: true,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.clearPendingTools();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Args are now complete - trigger diff computation for edit tools\n\t\t\t\t\t\tfor (const [, component] of this.pendingTools.entries()) {\n\t\t\t\t\t\t\tcomponent.setArgsComplete();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.maybeShowCacheMissNotice(this.streamingMessage);\n\t\t\t\t\t}\n\t\t\t\t\tthis.streamingComponent = undefined;\n\t\t\t\t\tthis.streamingMessage = undefined;\n\t\t\t\t\tthis.footer.invalidate();\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\n\t\t\tcase \"bash_execution_update\":\n\t\t\t\t// The bash execution callback handles TUI output rendering.\n\t\t\t\tbreak;\n\n\t\t\tcase \"tool_execution_start\": {\n\t\t\t\tthis.handleToolExecutionStart(event);\n\t\t\t\tlet component = this.pendingTools.get(event.toolCallId);\n\t\t\t\tif (!component) {\n\t\t\t\t\tcomponent = this.createToolExecutionComponent(event.toolName, event.toolCallId, event.args);\n\t\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\t\tthis.pendingTools.set(event.toolCallId, component);\n\t\t\t\t}\n\t\t\t\tif (!this.toolArgsReveal.flush(event.toolCallId, event.args)) {\n\t\t\t\t\tcomponent.updateArgs(event.args);\n\t\t\t\t}\n\t\t\t\tcomponent.markExecutionStarted();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"tool_hook_status\":\n\t\t\t\tthis.handleToolHookStatusEvent(event);\n\t\t\t\tbreak;\n\n\t\t\tcase \"tool_execution_update\": {\n\t\t\t\tconst component = this.pendingTools.get(event.toolCallId);\n\t\t\t\tif (component) {\n\t\t\t\t\tif (!this.toolResultReveal.update(event.toolCallId, component, event.partialResult)) {\n\t\t\t\t\t\tcomponent.updateResult({ ...event.partialResult, isError: false }, true);\n\t\t\t\t\t}\n\t\t\t\t\tconst activity = readToolProgress(event.partialResult.details)?.activity;\n\t\t\t\t\tif (activity) {\n\t\t\t\t\t\tconst label = formatActiveToolWorkingLabel(event.toolName, {\n\t\t\t\t\t\t\tcommand: activity,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.activeToolExecutions.set(event.toolCallId, label);\n\t\t\t\t\t\tthis.workingMessage = label;\n\t\t\t\t\t\tthis.activeToolExecutionTerminalTitle = `${APP_TITLE} - ${label}`;\n\t\t\t\t\t\tthis.refreshWorkingLoaderMessage();\n\t\t\t\t\t\tthis.applyTerminalTitle();\n\t\t\t\t\t}\n\t\t\t\t\tthis.requestStreamingRender();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"tool_execution_end\": {\n\t\t\t\tthis.handleToolExecutionEnd(event);\n\t\t\t\tthis.toolArgsReveal.finish(event.toolCallId);\n\t\t\t\tconst component = this.pendingTools.get(event.toolCallId);\n\t\t\t\tif (component) {\n\t\t\t\t\tthis.toolResultReveal.finish(event.toolCallId);\n\t\t\t\t\tcomponent.updateResult({ ...event.result, isError: event.isError });\n\t\t\t\t\tthis.pendingTools.delete(event.toolCallId);\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"agent_end\":\n\t\t\t\tif (this.settingsManager.getShowTerminalProgress()) {\n\t\t\t\t\tthis.ui.terminal.setProgress(false);\n\t\t\t\t}\n\t\t\t\tthis.clearStatusIndicator(\"working\");\n\t\t\t\tthis.clearActiveToolExecutionStatus();\n\t\t\t\tthis.clearToolHookStatuses();\n\t\t\t\tthis.streamingReveal.stop();\n\t\t\t\tthis.toolResultReveal.stop();\n\t\t\t\tif (this.streamingComponent) {\n\t\t\t\t\tthis.chatContainer.removeChild(this.streamingComponent);\n\t\t\t\t\tthis.streamingComponent = undefined;\n\t\t\t\t\tthis.streamingMessage = undefined;\n\t\t\t\t}\n\t\t\t\tthis.clearPendingTools();\n\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\n\t\t\tcase \"agent_settled\":\n\t\t\t\tawait this.checkShutdownRequested();\n\t\t\t\tbreak;\n\n\t\t\tcase \"continuation_error\":\n\t\t\t\tthis.showError(sanitizeTerminalLabel(event.errorMessage));\n\t\t\t\tbreak;\n\n\t\t\tcase \"compaction_start\": {\n\t\t\t\tif (this.settingsManager.getShowTerminalProgress()) {\n\t\t\t\t\tthis.ui.terminal.setProgress(true);\n\t\t\t\t}\n\t\t\t\t// Keep editor active; submissions are queued during compaction.\n\t\t\t\tif (!this.compactionEscapeOverrideActive) {\n\t\t\t\t\tthis.autoCompactionEscapeHandler = this.defaultEditor.onEscape;\n\t\t\t\t\tthis.compactionEscapeOverrideActive = true;\n\t\t\t\t}\n\t\t\t\tthis.defaultEditor.onEscape = () => {\n\t\t\t\t\tthis.session.abortCompaction();\n\t\t\t\t};\n\t\t\t\tconst indicator = new CompactionStatusIndicator(this.ui, event.reason);\n\t\t\t\tthis.activeStatusIndicator?.dispose();\n\t\t\t\tthis.activeStatusIndicator = indicator;\n\t\t\t\tthis.statusContainer.clear();\n\t\t\t\tthis.statusContainer.addChild(indicator);\n\t\t\t\tthis.autoCompactionProgressText = \"\";\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"compaction_progress\": {\n\t\t\t\tif (this.activeStatusIndicator?.kind !== \"compaction\") break;\n\t\t\t\tconst nextText =\n\t\t\t\t\tevent.text !== undefined ? event.text : `${this.autoCompactionProgressText}${event.delta ?? \"\"}`;\n\t\t\t\tif (!nextText) break;\n\t\t\t\tthis.autoCompactionProgressText = nextText;\n\t\t\t\tconst preview = nextText.length > 4_000 ? `...${nextText.slice(nextText.length - 4_000)}` : nextText;\n\t\t\t\tthis.activeStatusIndicator.setProgressText(sanitizeTerminalLabel(preview));\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"compaction_end\": {\n\t\t\t\tif (this.settingsManager.getShowTerminalProgress()) {\n\t\t\t\t\tthis.ui.terminal.setProgress(false);\n\t\t\t\t}\n\t\t\t\tInteractiveMode.restoreCompactionEscapeOverride(this);\n\t\t\t\tthis.clearStatusIndicator(\"compaction\");\n\t\t\t\tthis.autoCompactionProgressText = \"\";\n\t\t\t\tif (event.aborted) {\n\t\t\t\t\t// Prefer the extension-provided reason over the generic \"cancelled\"\n\t\t\t\t\t// label so per-turn-cap / circuit-breaker / provider-error cancels are\n\t\t\t\t\t// no longer indistinguishable from a user-triggered abort.\n\t\t\t\t\tconst cancelMessage = sanitizeTerminalLabel(event.errorMessage ?? \"Compaction cancelled\");\n\t\t\t\t\tif (event.reason === \"manual\") {\n\t\t\t\t\t\tthis.showError(cancelMessage);\n\t\t\t\t\t} else if (event.errorMessage) {\n\t\t\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\t\t\tthis.chatContainer.addChild(new Text(theme.fg(\"error\", cancelMessage), 1, 0));\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.showStatus(\"Auto-compaction cancelled\");\n\t\t\t\t\t}\n\t\t\t\t} else if (event.result) {\n\t\t\t\t\t// Compaction event consumers in the fork are session-backed and do not\n\t\t\t\t\t// necessarily expose InteractiveMode's SessionManager convenience getter.\n\t\t\t\t\t// Keep the structural fallback for focused handler consumers while using\n\t\t\t\t\t// the session-owned manager on the real TUI path.\n\t\t\t\t\tconst sessionManager = this.session.sessionManager ?? this.sessionManager;\n\t\t\t\t\tconst entries = sessionManager.buildContextEntries();\n\t\t\t\t\tif (entries[0]?.type !== \"compaction\") {\n\t\t\t\t\t\tthrow new Error(\"Completed compaction is missing from the session context\");\n\t\t\t\t\t}\n\t\t\t\t\tthis.chatContainer.clear();\n\t\t\t\t\tconst summaryMessage = createCompactionSummaryMessage(\n\t\t\t\t\t\tsanitizeTerminalLabel(event.result.summary),\n\t\t\t\t\t\tevent.result.tokensBefore,\n\t\t\t\t\t\tnew Date().toISOString(),\n\t\t\t\t\t\tevent.result.details,\n\t\t\t\t\t);\n\t\t\t\t\tif (typeof this.renderSessionEntries === \"function\") {\n\t\t\t\t\t\t// The latest compaction is prepended for model context; append it below at its chronological position.\n\t\t\t\t\t\tthis.renderSessionEntries(entries.slice(1));\n\t\t\t\t\t\tthis.addMessageToChat(summaryMessage);\n\t\t\t\t\t\tif (event.result.usage) {\n\t\t\t\t\t\t\tthis.addCompactionCostNotice({\n\t\t\t\t\t\t\t\ttype: \"compaction_cost\",\n\t\t\t\t\t\t\t\tkind: \"compaction\",\n\t\t\t\t\t\t\t\tusage: event.result.usage,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Fork-owned compaction consumers expose the established rebuild helper,\n\t\t\t\t\t\t// not InteractiveMode's private entry renderer.\n\t\t\t\t\t\tthis.rebuildChatFromMessages();\n\t\t\t\t\t\tthis.addMessageToChat(summaryMessage);\n\t\t\t\t\t}\n\t\t\t\t\tthis.footer.invalidate();\n\t\t\t\t} else if (event.errorMessage) {\n\t\t\t\t\tconst errorMessage = sanitizeTerminalLabel(event.errorMessage);\n\t\t\t\t\tif (event.reason === \"manual\") {\n\t\t\t\t\t\tthis.showError(errorMessage);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.chatContainer.addChild(new Text(theme.fg(\"error\", errorMessage), 1, 0));\n\t\t\t\t\t}\n\t\t\t\t} else if (event.accepted === false) {\n\t\t\t\t\t// Exhaustive fallback per plan Section 1: compaction_end must never fall\n\t\t\t\t\t// through silently. Rejection events without an errorMessage still name\n\t\t\t\t\t// the rejectionCause so the user knows /compact did nothing on purpose.\n\t\t\t\t\tconst cause = event.rejectionCause ?? \"unknown\";\n\t\t\t\t\tconst message = `Compaction failed (no result); cause: ${cause}`;\n\t\t\t\t\tif (event.reason === \"manual\") {\n\t\t\t\t\t\tthis.showError(message);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\t\t\tthis.chatContainer.addChild(new Text(theme.fg(\"error\", message), 1, 0));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t// Every terminal compaction_end resolves the TUI compaction queue.\n\t\t\t\t// Accepted compactions deliver through prompt admission. Retryable\n\t\t\t\t// failures route through the native steer/followUp queues so submitted\n\t\t\t\t// input rides along with the retry instead of being silently parked\n\t\t\t\t// (field bug: messages typed during a failing compaction were held\n\t\t\t\t// forever and lost on session switch). Terminal failures hand the input\n\t\t\t\t// back to the editable composer: retrying delivery against the same\n\t\t\t\t// over-threshold context would just repeat the failure.\n\t\t\t\tconst compactionSucceeded = event.accepted === true || event.result !== undefined;\n\t\t\t\tif (compactionSucceeded) {\n\t\t\t\t\tvoid this.flushCompactionQueue({\n\t\t\t\t\t\twillRetry: event.willRetry,\n\t\t\t\t\t\tdeferAdmission: false,\n\t\t\t\t\t});\n\t\t\t\t} else if (event.willRetry === true) {\n\t\t\t\t\tconst heldCount = this.compactionQueuedMessages.length;\n\t\t\t\t\tif (heldCount > 0) {\n\t\t\t\t\t\tconst failureCause =\n\t\t\t\t\t\t\tevent.errorMessage ?? event.rejectionCause ?? (event.aborted ? \"aborted\" : \"no-result\");\n\t\t\t\t\t\tthis.getSessionLogger().warn(\"compaction_queue_deferred\", {\n\t\t\t\t\t\t\tcount: heldCount,\n\t\t\t\t\t\t\tcause: failureCause,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.showStatus(\n\t\t\t\t\t\t\t`${heldCount} queued message${heldCount === 1 ? \"\" : \"s\"} will send with the next turn (compaction will retry)`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t\tvoid this.flushCompactionQueue({\n\t\t\t\t\t\twillRetry: true,\n\t\t\t\t\t\tdeferAdmission: true,\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tconst restoredCount = this.restoreQueuedMessagesToEditor();\n\t\t\t\t\tif (restoredCount > 0) {\n\t\t\t\t\t\tconst failureCause =\n\t\t\t\t\t\t\tevent.errorMessage ?? event.rejectionCause ?? (event.aborted ? \"aborted\" : \"no-result\");\n\t\t\t\t\t\tthis.getSessionLogger().warn(\"compaction_queue_restored\", {\n\t\t\t\t\t\t\trestored: restoredCount,\n\t\t\t\t\t\t\tcause: failureCause,\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.showStatus(\n\t\t\t\t\t\t\t`${restoredCount} queued message${restoredCount === 1 ? \"\" : \"s\"} restored to the editor (compaction did not complete)`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"retry_fallback_applied\": {\n\t\t\t\tif (this.pendingZeroDelayRetryIndicator) {\n\t\t\t\t\tthis.pendingZeroDelayRetryIndicator.fallbackApplied = true;\n\t\t\t\t} else {\n\t\t\t\t\tthis.fallbackAppliedBeforeRetryStart = true;\n\t\t\t\t}\n\t\t\t\tthis.showNoticeBox({\n\t\t\t\t\ttitle: `⇄ Model fallback · ${event.from} → ${event.to}`,\n\t\t\t\t\ttone: \"warning\",\n\t\t\t\t\twhy: `Retry switched models (${event.reason}); the turn continues on ${event.to}.`,\n\t\t\t\t});\n\t\t\t\tthis.setExtensionStatus(FALLBACK_STATUS_KEY, `fallback: ${event.to}`);\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"retry_fallback_succeeded\":\n\t\t\t\tthis.showNoticeBox({\n\t\t\t\t\ttitle: `✓ Fallback model responded · ${event.model}`,\n\t\t\t\t\ttone: \"success\",\n\t\t\t\t\twhy: \"The fallback chain answered; the session stays on it until the revert policy fires.\",\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"retry_fallback_reverted\":\n\t\t\t\tthis.showNoticeBox({\n\t\t\t\t\ttitle: `⇄ Reverted to ${event.to}`,\n\t\t\t\t\ttone: \"accent\",\n\t\t\t\t\twhy: \"The original model is back after its cooldown lapsed.\",\n\t\t\t\t});\n\t\t\t\tthis.setExtensionStatus(FALLBACK_STATUS_KEY, undefined);\n\t\t\t\tbreak;\n\n\t\t\tcase \"retry_fallback_exhausted\":\n\t\t\t\tthis.showNoticeBox({\n\t\t\t\t\ttitle: `✕ Fallback chain exhausted · ${event.chainKey}`,\n\t\t\t\t\ttone: \"error\",\n\t\t\t\t\twhy: event.lastError,\n\t\t\t\t});\n\t\t\t\tthis.setExtensionStatus(FALLBACK_STATUS_KEY, undefined);\n\t\t\t\tbreak;\n\n\t\t\tcase \"server_fallback_aborted\":\n\t\t\t\tthis.showNoticeBox({\n\t\t\t\t\ttitle: `⚠ Server fallback aborted · ${event.from} → ${event.to}`,\n\t\t\t\t\ttone: \"warning\",\n\t\t\t\t\twhy: event.chainConfigured\n\t\t\t\t\t\t? \"Retrying on your configured fallback chain.\"\n\t\t\t\t\t\t: \"No fallback chain configured — set one with /fallback.\",\n\t\t\t\t});\n\t\t\t\tbreak;\n\n\t\t\tcase \"auto_retry_start\": {\n\t\t\t\t// During retry waits, isStreaming flips false between attempts. The main Esc handler\n\t\t\t\t// keys off both isStreaming and retryAttempt so we keep the same close-out path here;\n\t\t\t\t// no separate retry-only handler is installed (the prior one only called\n\t\t\t\t// session.abortRetry() and left queued steering messages stranded).\n\t\t\t\tthis.retryEscapeHandler = undefined;\n\t\t\t\tconst fallbackApplied = this.fallbackAppliedBeforeRetryStart;\n\t\t\t\tthis.fallbackAppliedBeforeRetryStart = false;\n\t\t\t\tif (event.delayMs === 0) {\n\t\t\t\t\tconst pending = { fallbackApplied };\n\t\t\t\t\tthis.pendingZeroDelayRetryIndicator = pending;\n\t\t\t\t\tqueueMicrotask(() => {\n\t\t\t\t\t\tif (this.pendingZeroDelayRetryIndicator !== pending) return;\n\t\t\t\t\t\tthis.pendingZeroDelayRetryIndicator = undefined;\n\t\t\t\t\t\tif (shouldShowRetryIndicator(event.delayMs, pending.fallbackApplied)) {\n\t\t\t\t\t\t\tthis.showRetryStatusIndicator(event);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tthis.showRetryStatusIndicator(event);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"auto_retry_end\": {\n\t\t\t\tthis.pendingZeroDelayRetryIndicator = undefined;\n\t\t\t\tthis.fallbackAppliedBeforeRetryStart = false;\n\t\t\t\t// Restore escape handler\n\t\t\t\tif (this.retryEscapeHandler) {\n\t\t\t\t\tthis.defaultEditor.onEscape = this.retryEscapeHandler;\n\t\t\t\t\tthis.retryEscapeHandler = undefined;\n\t\t\t\t}\n\t\t\t\tthis.clearStatusIndicator(\"retry\");\n\t\t\t\t// Show error only on final failure (success shows normal response)\n\t\t\t\tif (!event.success) {\n\t\t\t\t\tthis.showError(`Retry failed after ${event.attempt} attempts: ${event.finalError || \"Unknown error\"}`);\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"summarization_retry_scheduled\": {\n\t\t\t\tthis.showError(event.errorMessage);\n\t\t\t\tthis.showStatusIndicator(\n\t\t\t\t\tnew RetryStatusIndicator(this.ui, event.attempt, event.maxAttempts, event.delayMs),\n\t\t\t\t);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"summarization_retry_attempt_start\": {\n\t\t\t\tthis.clearStatusIndicator(\"retry\");\n\t\t\t\tif (event.source === \"branchSummary\") {\n\t\t\t\t\tthis.showStatusIndicator(new BranchSummaryStatusIndicator(this.ui));\n\t\t\t\t} else {\n\t\t\t\t\tthis.showStatusIndicator(new CompactionStatusIndicator(this.ui, event.reason));\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"summarization_retry_finished\": {\n\t\t\t\tthis.clearStatusIndicator(\"retry\");\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"retry_probe_scheduled\": {\n\t\t\t\tconst secondsAway = Math.max(0, Math.round((event.atMs - Date.now()) / 1000));\n\t\t\t\tthis.showStatus(\n\t\t\t\t\t`Probing ${sanitizeTerminalLabel(event.selector)} at +${secondsAway}s (#${event.probeIndex})`,\n\t\t\t\t);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tcase \"retry_probe_result\": {\n\t\t\t\tif (event.ok) {\n\t\t\t\t\tthis.showStatus(`Recovered ${sanitizeTerminalLabel(event.selector)} - will restore on next turn`);\n\t\t\t\t} else if (event.errorMessage === \"auth-unavailable\") {\n\t\t\t\t\tthis.showStatus(\n\t\t\t\t\t\t`Probe for ${sanitizeTerminalLabel(event.selector)} skipped - auth unavailable, staying on fallback`,\n\t\t\t\t\t);\n\t\t\t\t} else {\n\t\t\t\t\tthis.showStatus(`Probe for ${sanitizeTerminalLabel(event.selector)} failed - staying on fallback`);\n\t\t\t\t}\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate showRetryStatusIndicator(event: Extract<AgentSessionEvent, { type: \"auto_retry_start\" }>): void {\n\t\tthis.showStatusIndicator(new RetryStatusIndicator(this.ui, event.attempt, event.maxAttempts, event.delayMs));\n\t\tthis.ui.requestRender();\n\t}\n\n\t/** Extract text content from a user message */\n\tprivate getUserMessageText(message: Message): string {\n\t\tif (message.role !== \"user\") return \"\";\n\t\tconst textBlocks: TextContent[] =\n\t\t\ttypeof message.content === \"string\"\n\t\t\t\t? [{ type: \"text\", text: message.content }]\n\t\t\t\t: message.content.filter((content): content is TextContent => content.type === \"text\");\n\t\treturn textBlocks.map((content) => content.text).join(\"\");\n\t}\n\n\t/** Show a managed-tool status update in the chat. */\n\tprivate showManagedToolStatus(status: ToolStatus): void {\n\t\tif (!this.managedToolStatusStarted) {\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\tthis.managedToolStatusStarted = true;\n\t\t}\n\t\tconst message = status.type === \"warning\" ? `Warning: ${status.message}` : status.message;\n\t\tconst color = status.type === \"warning\" ? \"warning\" : \"dim\";\n\t\tthis.chatContainer.addChild(new Text(theme.fg(color, message), 1, 0));\n\t\tthis.lastStatusSpacer = undefined;\n\t\tthis.lastStatusText = undefined;\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Show a status message in the chat.\n\t *\n\t * If multiple status messages are emitted back-to-back (without anything else being added to the chat),\n\t * we update the previous status line instead of appending new ones to avoid log spam.\n\t */\n\tprivate showStatus(message: string): void {\n\t\tconst children = this.chatContainer.children;\n\t\tconst last = children.length > 0 ? children[children.length - 1] : undefined;\n\t\tconst secondLast = children.length > 1 ? children[children.length - 2] : undefined;\n\n\t\tif (last && secondLast && last === this.lastStatusText && secondLast === this.lastStatusSpacer) {\n\t\t\tthis.lastStatusText.setText(theme.fg(\"dim\", message));\n\t\t\tthis.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\tconst spacer = new Spacer(1);\n\t\tconst text = new Text(theme.fg(\"dim\", message), 1, 0);\n\t\tthis.chatContainer.addChild(spacer);\n\t\tthis.chatContainer.addChild(text);\n\t\tthis.lastStatusSpacer = spacer;\n\t\tthis.lastStatusText = text;\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate addCustomEntryToChat(entry: Extract<SessionEntry, { type: \"custom\" }>): void {\n\t\tconst renderer = this.session.extensionRunner.getEntryRenderer(entry.customType);\n\t\tif (!renderer) {\n\t\t\treturn;\n\t\t}\n\t\tconst component = new CustomEntryComponent(entry, renderer);\n\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\tif (!component.hasContent()) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.streamingComponent) {\n\t\t\tconst streamingIndex = this.chatContainer.children.indexOf(this.streamingComponent);\n\t\t\tif (streamingIndex >= 0) {\n\t\t\t\tthis.chatContainer.children.splice(streamingIndex, 0, component);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis.chatContainer.addChild(component);\n\t}\n\n\tprivate addMessageToChat(message: AgentMessage, options?: { populateHistory?: boolean }): void {\n\t\tswitch (message.role) {\n\t\t\tcase \"bashExecution\": {\n\t\t\t\tconst component = new BashExecutionComponent(message.command, this.ui, message.excludeFromContext);\n\t\t\t\tif (message.output) {\n\t\t\t\t\tcomponent.appendOutput(message.output);\n\t\t\t\t}\n\t\t\t\tcomponent.setComplete(\n\t\t\t\t\tmessage.exitCode,\n\t\t\t\t\tmessage.cancelled,\n\t\t\t\t\tmessage.truncated ? ({ truncated: true } as TruncationResult) : undefined,\n\t\t\t\t\tmessage.fullOutputPath,\n\t\t\t\t);\n\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"custom\": {\n\t\t\t\tif (message.display) {\n\t\t\t\t\tconst renderer = this.session.extensionRunner.getMessageRenderer(message.customType);\n\t\t\t\t\tconst component = new CustomMessageComponent(\n\t\t\t\t\t\tmessage,\n\t\t\t\t\t\trenderer,\n\t\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\t\tthis.outputPad,\n\t\t\t\t\t);\n\t\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"compactionSummary\": {\n\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\tconst component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings());\n\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"branchSummary\": {\n\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\tconst component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings());\n\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"user\": {\n\t\t\t\tconst textContent = this.getUserMessageText(message);\n\t\t\t\tif (textContent) {\n\t\t\t\t\tif (this.chatContainer.children.length > 0) {\n\t\t\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\t\t}\n\t\t\t\t\tconst skillBlock = parseSkillBlock(textContent);\n\t\t\t\t\tif (skillBlock) {\n\t\t\t\t\t\t// Render skill block (collapsible)\n\t\t\t\t\t\tconst component = new SkillInvocationMessageComponent(\n\t\t\t\t\t\t\tskillBlock,\n\t\t\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\t\tthis.chatContainer.addChild(component);\n\t\t\t\t\t\t// Render user message separately if present\n\t\t\t\t\t\tif (skillBlock.userMessage) {\n\t\t\t\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\t\t\t\tconst userComponent = new UserMessageComponent(\n\t\t\t\t\t\t\t\tskillBlock.userMessage,\n\t\t\t\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\t\t\t\tthis.outputPad,\n\t\t\t\t\t\t\t\tthis.getMarkdownTransformers(),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tthis.chatContainer.addChild(userComponent);\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tconst userComponent = new UserMessageComponent(\n\t\t\t\t\t\t\ttextContent,\n\t\t\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\t\t\tthis.outputPad,\n\t\t\t\t\t\t\tthis.getMarkdownTransformers(),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tthis.chatContainer.addChild(userComponent);\n\t\t\t\t\t}\n\t\t\t\t\tif (options?.populateHistory) {\n\t\t\t\t\t\tthis.editor.addToHistory?.(textContent);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"assistant\": {\n\t\t\t\tconst assistantComponent = new AssistantMessageComponent(\n\t\t\t\t\tmessage,\n\t\t\t\t\tthis.hideThinkingBlock,\n\t\t\t\t\tthis.getMarkdownThemeWithSettings(),\n\t\t\t\t\tthis.hiddenThinkingLabel,\n\t\t\t\t\tthis.outputPad,\n\t\t\t\t\tthis.getMarkdownTransformers(),\n\t\t\t\t);\n\t\t\t\tassistantComponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\tthis.chatContainer.addChild(assistantComponent);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tcase \"toolResult\": {\n\t\t\t\t// Tool results are rendered inline with tool calls, handled separately\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tdefault: {\n\t\t\t\tconst exhaustive: never = message;\n\t\t\t\tvoid exhaustive;\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate createToolExecutionComponent(toolName: string, toolCallId: string, args: unknown): ToolExecutionComponent {\n\t\tif (this.chrome) {\n\t\t\treturn new ToolExecutionComponent(\n\t\t\t\ttoolName,\n\t\t\t\ttoolCallId,\n\t\t\t\targs,\n\t\t\t\t{\n\t\t\t\t\tshowImages: this.settingsManager.getShowImages(),\n\t\t\t\t\timageWidthCells: this.settingsManager.getImageWidthCells(),\n\t\t\t\t},\n\t\t\t\tthis.getRegisteredToolDefinition(toolName),\n\t\t\t\tthis.ui,\n\t\t\t\tthis.sessionManager.getCwd(),\n\t\t\t\tthis.chrome.toolPresentation,\n\t\t\t);\n\t\t}\n\t\treturn new ToolExecutionComponent(\n\t\t\ttoolName,\n\t\t\ttoolCallId,\n\t\t\targs,\n\t\t\t{\n\t\t\t\tshowImages: this.settingsManager.getShowImages(),\n\t\t\t\timageWidthCells: this.settingsManager.getImageWidthCells(),\n\t\t\t},\n\t\t\tthis.getRegisteredToolDefinition(toolName),\n\t\t\tthis.ui,\n\t\t\tthis.sessionManager.getCwd(),\n\t\t);\n\t}\n\n\tprivate renderSessionItems(\n\t\titems: readonly RenderSessionItem[],\n\t\toptions: { updateFooter?: boolean; populateHistory?: boolean } = {},\n\t): void {\n\t\tthis.clearPendingTools();\n\t\t// The rebuilt transcript re-derives continuity notices from persisted\n\t\t// messages, so the tracker's suppression state must not survive the\n\t\t// rebuild (or a session switch) — otherwise the first disabled notice\n\t\t// would silently disappear from the rebuilt transcript.\n\t\t// Optional-chained: renderSessionItems is exercised by tests with a\n\t\t// minimal `this` that has no tracker instance.\n\t\tthis.continuityNotices?.reset?.();\n\t\tconst renderedPendingTools = new Map<string, ToolExecutionComponent>();\n\t\t// Cache-miss notices are not persisted; re-derive them from the full entry\n\t\t// list and re-inject them after the assistant messages that paid for them.\n\t\tconst cacheMisses = this.settingsManager.getShowCacheMissNotices()\n\t\t\t? collectCacheMisses(this.sessionManager.getEntries(), this.session.modelRuntime)\n\t\t\t: new Map<AssistantMessage, CacheMiss>();\n\n\t\tif (options.updateFooter) {\n\t\t\tthis.footer.invalidate();\n\t\t\tthis.updateEditorBorderColor();\n\t\t}\n\n\t\tfor (const item of items) {\n\t\t\tif (isCustomSessionEntry(item)) {\n\t\t\t\tthis.addCustomEntryToChat(item);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (isCompactionCostNotice(item)) {\n\t\t\t\tthis.addCompactionCostNotice(item);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tconst message = item;\n\t\t\t// Assistant messages need special handling for tool calls\n\t\t\tif (message.role === \"assistant\") {\n\t\t\t\tthis.addMessageToChat(message);\n\t\t\t\t// Render tool call components\n\t\t\t\tfor (const content of message.content) {\n\t\t\t\t\tif (content.type === \"toolCall\") {\n\t\t\t\t\t\tconst component = this.createToolExecutionComponent(content.name, content.id, content.arguments);\n\t\t\t\t\t\tcomponent.setExpanded(this.toolOutputExpanded);\n\t\t\t\t\t\tthis.chatContainer.addChild(component);\n\n\t\t\t\t\t\tif (message.stopReason === \"aborted\" || message.stopReason === \"error\") {\n\t\t\t\t\t\t\tlet errorMessage: string;\n\t\t\t\t\t\t\tif (message.stopReason === \"aborted\") {\n\t\t\t\t\t\t\t\terrorMessage = abortedErrorLabel(message.errorMessage, this.session.retryAttempt);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\terrorMessage = message.errorMessage || \"Error\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcomponent.updateResult({\n\t\t\t\t\t\t\t\tcontent: [{ type: \"text\", text: errorMessage }],\n\t\t\t\t\t\t\t\tisError: true,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\trenderedPendingTools.set(content.id, component);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (message.stopReason !== \"aborted\" && message.stopReason !== \"error\") {\n\t\t\t\t\tconst miss = cacheMisses.get(message);\n\t\t\t\t\tif (miss) this.addCacheMissNotice(miss);\n\t\t\t\t}\n\t\t\t\t// Continuity notices are not persisted either; re-inject them while\n\t\t\t\t// rendering persisted assistant messages the same way the live\n\t\t\t\t// streaming path does. Optional-chained for minimal-`this` tests.\n\t\t\t\tthis.addContinuityNotice?.(message);\n\t\t\t} else if (message.role === \"toolResult\") {\n\t\t\t\t// Match tool results to pending tool components\n\t\t\t\tconst component = renderedPendingTools.get(message.toolCallId);\n\t\t\t\tif (component) {\n\t\t\t\t\tcomponent.updateResult(message);\n\t\t\t\t\trenderedPendingTools.delete(message.toolCallId);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// All other messages use standard rendering\n\t\t\t\tthis.addMessageToChat(message, options);\n\t\t\t}\n\t\t}\n\n\t\tfor (const [toolCallId, component] of renderedPendingTools) {\n\t\t\tthis.pendingTools.set(toolCallId, component);\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Render session entries to chat. Used for initial load and rebuild after compaction.\n\t * @param entries Compaction-aware session entries to render\n\t * @param options.updateFooter Update footer state\n\t * @param options.populateHistory Add user messages to editor history\n\t */\n\tprivate renderSessionEntries(\n\t\tentries: SessionEntry[],\n\t\toptions: { updateFooter?: boolean; populateHistory?: boolean } = {},\n\t): void {\n\t\tconst items = entries.flatMap((entry): RenderSessionItem[] => {\n\t\t\tif (entry.type === \"custom\") {\n\t\t\t\treturn [entry];\n\t\t\t}\n\t\t\tconst messages = sessionEntryToContextMessages(entry);\n\t\t\tif ((entry.type === \"compaction\" || entry.type === \"branch_summary\") && entry.usage && messages.length > 0) {\n\t\t\t\treturn [...messages, { type: \"compaction_cost\", kind: entry.type, usage: entry.usage }];\n\t\t\t}\n\t\t\treturn messages;\n\t\t});\n\t\tthis.renderSessionItems(items, options);\n\t}\n\n\t/**\n\t * Render billing usage for a compaction or branch summary. The notice is derived\n\t * from persisted summary usage and is not stored as a separate session entry.\n\t */\n\tprivate addCompactionCostNotice(notice: CompactionCostNotice): void {\n\t\tif (!this.settingsManager.getShowCacheMissNotices()) return;\n\n\t\tconst { usage } = notice;\n\t\tconst tokens = usage.input + usage.output + usage.cacheRead + usage.cacheWrite;\n\t\tconst cost = usage.cost.total >= 0.01 ? ` (~$${usage.cost.total.toFixed(2)})` : \"\";\n\t\tconst label = notice.kind === \"compaction\" ? \"Compaction\" : \"Branch summary\";\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(theme.fg(\"warning\", `${label}: ${formatTokens(tokens)} tokens billed${cost}`), 1, 0),\n\t\t);\n\t}\n\n\t/**\n\t * Show a transcript notice when a completed assistant message paid for a\n\t * significant cache miss. Only states observable facts: the miss itself,\n\t * a model switch, or an idle gap past the cache TTL.\n\t */\n\t/** Muted single-line notice for degraded session continuity; healthy turns stay silent. */\n\tprivate addContinuityNotice(message: AssistantMessage): void {\n\t\tconst notice = this.continuityNotices.noticeFor(message);\n\t\tif (!notice) return;\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(notice, 1, 0));\n\t}\n\n\tprivate maybeShowCacheMissNotice(message: AssistantMessage): void {\n\t\tif (!this.settingsManager.getShowCacheMissNotices()) return;\n\n\t\t// Entries don't contain `message` yet: message_end fires before persistence.\n\t\tconst miss = detectCacheMiss(this.sessionManager.getEntries(), message, this.session.modelRuntime);\n\t\tif (miss) this.addCacheMissNotice(miss);\n\t}\n\n\tprivate addCacheMissNotice(miss: CacheMiss): void {\n\t\tif (miss.missedTokens < 20_000 && miss.missedCost < 0.1) return;\n\n\t\tconst cost = miss.missedCost >= 0.01 ? ` (~$${miss.missedCost.toFixed(2)})` : \"\";\n\t\tconst reBilled = `${formatTokens(miss.missedTokens)} tokens re-billed${cost}`;\n\t\tlet label = \"Cache miss\";\n\t\tif (miss.modelChanged) {\n\t\t\tlabel = \"Cache miss after model switch\";\n\t\t} else if (miss.idleMs >= CACHE_TTL_MS) {\n\t\t\tlabel = `Cache miss after ${Math.round(miss.idleMs / 60_000)}m idle`;\n\t\t}\n\t\tconst text = theme.fg(\"warning\", `${label}: ${reBilled}`);\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(text, 1, 0));\n\t}\n\n\trenderInitialMessages(): void {\n\t\tconst entries = this.sessionManager.buildContextEntries();\n\t\tthis.renderSessionEntries(entries, {\n\t\t\tupdateFooter: true,\n\t\t\tpopulateHistory: true,\n\t\t});\n\t\tthis.renderProjectTrustWarningIfNeeded();\n\n\t\t// Show compaction info if session was compacted\n\t\tconst compactionCount = this.sessionManager.countCompactions();\n\t\tif (compactionCount > 0) {\n\t\t\tconst times = compactionCount === 1 ? \"1 time\" : `${compactionCount} times`;\n\t\t\tthis.showStatus(`Session compacted ${times}`);\n\t\t}\n\t}\n\n\tprivate renderProjectTrustWarningIfNeeded(): void {\n\t\tif (this.settingsManager.isProjectTrusted() || !hasTrustRequiringProjectResources(this.sessionManager.getCwd())) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (this.chatContainer.children.length > 0) {\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t}\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(\n\t\t\t\ttheme.fg(\n\t\t\t\t\t\"warning\",\n\t\t\t\t\t`This project is not trusted. Project ${CONFIG_DIR_NAME} resources and packages are ignored. Use /trust to save a trust decision, then restart pi.`,\n\t\t\t\t),\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t}\n\n\tasync getUserInput(): Promise<InteractiveUserInput> {\n\t\tconst queuedInput = this.pendingUserInputs.shift();\n\t\tif (queuedInput !== undefined) {\n\t\t\treturn queuedInput;\n\t\t}\n\n\t\treturn new Promise((resolve) => {\n\t\t\tthis.onInputCallback = (input) => {\n\t\t\t\tthis.onInputCallback = undefined;\n\t\t\t\tresolve(input);\n\t\t\t};\n\t\t});\n\t}\n\n\tprivate rebuildChatFromMessages(): void {\n\t\tthis.chatContainer.clear();\n\t\tthis.renderSessionEntries(this.sessionManager.buildContextEntries());\n\t}\n\n\t// =========================================================================\n\t// Key handlers\n\t// =========================================================================\n\n\tprivate handleCtrlC(): void {\n\t\tconst now = Date.now();\n\t\tif (now - this.lastSigintTime < 500) {\n\t\t\tvoid this.shutdown();\n\t\t} else {\n\t\t\tthis.clearEditor();\n\t\t\tthis.lastSigintTime = now;\n\t\t}\n\t}\n\n\tprivate handleCtrlD(): void {\n\t\t// Only called when editor is empty (enforced by CustomEditor)\n\t\tvoid this.shutdown();\n\t}\n\n\t/**\n\t * Gracefully shutdown the agent.\n\t * Stops the TUI before emitting shutdown events so extension UI cleanup cannot\n\t * repaint the final frame while the process is exiting.\n\t */\n\tprivate isShuttingDown = false;\n\n\tprivate async shutdown(options?: { fromSignal?: boolean }): Promise<void> {\n\t\tif (this.isShuttingDown) return;\n\t\tthis.isShuttingDown = true;\n\t\t// Keep signal handlers registered until terminal cleanup has completed.\n\t\t// `signal-exit` checks the listener list during the same SIGTERM/SIGHUP\n\t\t// dispatch and re-sends the signal if only its own listeners remain.\n\n\t\tif (options?.fromSignal) {\n\t\t\t// Signal-triggered shutdown (SIGTERM/SIGHUP). Emit extension cleanup\n\t\t\t// (session_shutdown) BEFORE touching the terminal. Extension teardown\n\t\t\t// such as removing sockets does not write to the tty, so it must not be\n\t\t\t// skipped if a later terminal-restore write fails on a dead or stalled\n\t\t\t// terminal. If the terminal is gone, the restore writes below emit EIO,\n\t\t\t// which the stdout/stderr error handler turns into emergencyTerminalExit;\n\t\t\t// the render loop is already idle, so this cannot hot-spin (see #4144).\n\t\t\tawait this.runtimeHost.dispose();\n\t\t\tthis.themeController.disableAutoSync();\n\t\t\tawait this.ui.terminal.drainInput(1000);\n\t\t\tthis.stop();\n\t\t\tprocess.exit(0);\n\t\t}\n\n\t\t// Interactive quit (Ctrl+D, Ctrl+C, /quit, extension shutdown()). Stop the\n\t\t// TUI before emitting shutdown events so extension UI cleanup cannot repaint\n\t\t// the final frame while the process is exiting.\n\t\t// Drain any in-flight Kitty key release events before stopping.\n\t\t// This prevents escape sequences from leaking to the parent shell over slow SSH.\n\t\tthis.themeController.disableAutoSync();\n\t\tawait this.ui.terminal.drainInput(1000);\n\n\t\tthis.stop();\n\t\tawait this.runtimeHost.dispose();\n\n\t\tconst resumeCommand = formatResumeCommand(this.sessionManager);\n\t\tif (resumeCommand) {\n\t\t\tprocess.stdout.write(`${chalk.dim(\"To resume this session:\")} ${resumeCommand}\\n`);\n\t\t}\n\n\t\tprocess.exit(0);\n\t}\n\n\tprivate emergencyTerminalExit(): never {\n\t\tthis.isShuttingDown = true;\n\t\tthis.unregisterSignalHandlers();\n\t\tkillTrackedDetachedChildren();\n\t\t// The terminal is gone. Do not run normal shutdown because TUI and\n\t\t// extension cleanup can write restore sequences and re-trigger EIO.\n\t\tprocess.exit(129);\n\t}\n\n\t/**\n\t * Last-resort handler for uncaught exceptions. The TUI puts stdin into raw\n\t * mode and hides the cursor; without this handler, an uncaught throw from\n\t * anywhere (e.g. an extension's async `ChildProcess.on(\"exit\")` callback)\n\t * tears down the process while leaving the terminal in raw mode with no\n\t * cursor, requiring `stty sane && reset` to recover.\n\t *\n\t * Unlike emergencyTerminalExit, the terminal is still alive here, so we\n\t * call ui.stop() to restore cooked mode, the cursor, and disable bracketed\n\t * paste / Kitty / modifyOtherKeys sequences.\n\t */\n\tprivate uncaughtCrash(error: Error, origin: \"uncaughtException\" | \"unhandledRejection\"): void {\n\t\tif (this.isShuttingDown) {\n\t\t\tprocess.exit(1);\n\t\t}\n\t\tif (isRecoverableInspectorVmImportError(error, origin)) {\n\t\t\tthis.showWarning(INSPECTOR_VM_IMPORT_WARNING);\n\t\t\treturn;\n\t\t}\n\t\tthis.isShuttingDown = true;\n\t\ttry {\n\t\t\tthis.unregisterSignalHandlers();\n\t\t} catch {}\n\t\ttry {\n\t\t\tkillTrackedDetachedChildren();\n\t\t} catch {}\n\t\ttry {\n\t\t\tthis.ui.stop();\n\t\t} catch {}\n\t\trestoreInteractiveStderr();\n\t\tconsole.error(`${APP_NAME} exiting due to uncaughtException:`);\n\t\tconsole.error(error);\n\t\tprocess.exit(1);\n\t}\n\n\t/**\n\t * Check if shutdown was requested and perform shutdown if so.\n\t */\n\tprivate async checkShutdownRequested(): Promise<void> {\n\t\tif (!this.shutdownRequested) return;\n\t\tawait this.shutdown();\n\t}\n\n\tprivate registerSignalHandlers(): void {\n\t\tthis.unregisterSignalHandlers();\n\n\t\tconst signals: NodeJS.Signals[] = [\"SIGTERM\"];\n\t\tif (process.platform !== \"win32\") {\n\t\t\tsignals.push(\"SIGHUP\");\n\t\t}\n\n\t\tfor (const signal of signals) {\n\t\t\tconst handler = () => {\n\t\t\t\t// SIGHUP no longer hard-exits: graceful shutdown emits session_shutdown\n\t\t\t\t// first, then attempts terminal restore. A genuinely dead terminal\n\t\t\t\t// surfaces as an EIO on the restore writes, which the stdout/stderr\n\t\t\t\t// error handler converts into emergencyTerminalExit (see #4144, #5080).\n\t\t\t\tkillTrackedDetachedChildren();\n\t\t\t\tvoid this.shutdown({ fromSignal: true });\n\t\t\t};\n\t\t\tprocess.prependListener(signal, handler);\n\t\t\tthis.signalCleanupHandlers.push(() => process.off(signal, handler));\n\t\t}\n\n\t\tconst terminalErrorHandler = (error: Error) => {\n\t\t\tif (isDeadTerminalError(error)) {\n\t\t\t\tthis.emergencyTerminalExit();\n\t\t\t}\n\t\t\tthrow error;\n\t\t};\n\t\tprocess.stdout.on(\"error\", terminalErrorHandler);\n\t\tprocess.stderr.on(\"error\", terminalErrorHandler);\n\t\tthis.signalCleanupHandlers.push(() => process.stdout.off(\"error\", terminalErrorHandler));\n\t\tthis.signalCleanupHandlers.push(() => process.stderr.off(\"error\", terminalErrorHandler));\n\n\t\t// Restore the terminal before the process dies on any uncaught throw.\n\t\t// Without this, an unhandled exception from extension code (or anywhere\n\t\t// in pi) leaves the terminal in raw mode with no cursor.\n\t\tconst uncaughtExceptionHandler = (error: Error, origin: \"uncaughtException\" | \"unhandledRejection\") =>\n\t\t\tthis.uncaughtCrash(error, origin);\n\t\tprocess.prependListener(\"uncaughtException\", uncaughtExceptionHandler);\n\t\tthis.signalCleanupHandlers.push(() => process.off(\"uncaughtException\", uncaughtExceptionHandler));\n\n\t\t// Surface Inspector rejections that the early bootstrap seam recovered before this\n\t\t// handler (and the TUI warning surface) existed.\n\t\tif (consumeEarlyInspectorVmImportRecoveries() > 0) {\n\t\t\tthis.showWarning(INSPECTOR_VM_IMPORT_WARNING);\n\t\t}\n\t}\n\n\tprivate unregisterSignalHandlers(): void {\n\t\tfor (const cleanup of this.signalCleanupHandlers) {\n\t\t\tcleanup();\n\t\t}\n\t\tthis.signalCleanupHandlers = [];\n\t}\n\n\tprivate handleCtrlZ(): void {\n\t\tif (process.platform === \"win32\") {\n\t\t\tthis.showStatus(\"Suspend to background is not supported on Windows\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Keep the event loop alive while suspended. Without this, stopping the TUI\n\t\t// can leave Node with no ref'ed handles, causing the process to exit on fg\n\t\t// before the SIGCONT handler gets a chance to restore the terminal.\n\t\tconst suspendKeepAlive = setInterval(() => {}, 2 ** 30);\n\n\t\t// Ignore SIGINT while suspended so Ctrl+C in the terminal does not\n\t\t// kill the backgrounded process. The handler is removed on resume.\n\t\tconst ignoreSigint = () => {};\n\t\tprocess.on(\"SIGINT\", ignoreSigint);\n\n\t\t// Set up handler to restore TUI when resumed\n\t\tprocess.once(\"SIGCONT\", () => {\n\t\t\tclearInterval(suspendKeepAlive);\n\t\t\tprocess.removeListener(\"SIGINT\", ignoreSigint);\n\t\t\ttakeOverInteractiveStderr();\n\t\t\tthis.ui.start();\n\t\t\tthis.ui.requestRender(true);\n\t\t});\n\n\t\ttry {\n\t\t\t// Stop the TUI (restore terminal to normal mode)\n\t\t\trestoreInteractiveStderr();\n\t\t\tthis.ui.stop();\n\n\t\t\t// Send SIGTSTP to process group (pid=0 means all processes in group)\n\t\t\tprocess.kill(0, \"SIGTSTP\");\n\t\t} catch (error) {\n\t\t\tclearInterval(suspendKeepAlive);\n\t\t\tprocess.removeListener(\"SIGINT\", ignoreSigint);\n\t\t\tthrow error;\n\t\t}\n\t}\n\n\tprivate async handleFollowUp(): Promise<void> {\n\t\tconst text = this.getExpandedEditorText().trim();\n\t\tif (!text) return;\n\n\t\t// Queue non-command input during compaction; dispatch extension commands.\n\t\t// This is the Alt+Enter path (bound directly to app.message.followUp), which\n\t\t// does NOT pass through onSubmit, so the isExtensionCommand check below is the\n\t\t// live dispatch point here: commands go straight to AgentSession.prompt(),\n\t\t// which runs them immediately even while compaction is active, while ordinary\n\t\t// text is queued for delivery after compaction settles. Image attachments\n\t\t// are consumed and dropped VISIBLY inside queueCompactionSubmission - the\n\t\t// queue is text-only, so resolving them here and queueing the text with a\n\t\t// dead marker would lose the images without telling the user.\n\t\tif (this.session.isCompacting) {\n\t\t\tif (this.isExtensionCommand(text)) {\n\t\t\t\tthis.editor.addToHistory?.(text);\n\t\t\t\tthis.editor.setText(\"\");\n\t\t\t\tawait this.session.prompt(text);\n\t\t\t} else {\n\t\t\t\tthis.queueCompactionSubmission(text, \"followUp\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\t// Resolve attachments BEFORE any setText(\"\") below: the editor's prune\n\t\t// chain fires onImageMarkersChanged([]) and the reconciler destroys\n\t\t// pendingImages, so resolving after the clear would ship a literal\n\t\t// `[Image #N]` with no attachment behind it.\n\t\tconst images = this.takeSubmissionImages(text);\n\n\t\t// Alt+Enter queues a follow-up message (waits until agent finishes).\n\t\t// Extension commands never reach this branch: the compaction branch above\n\t\t// dispatches them while compacting, and otherwise prompt() runs them\n\t\t// immediately. The followUp behavior here applies only to ordinary text,\n\t\t// prompt template expansion, and queueing.\n\t\tif (this.session.isStreaming) {\n\t\t\tthis.editor.addToHistory?.(text);\n\t\t\tthis.editor.setText(\"\");\n\t\t\tawait this.session.prompt(text, {\n\t\t\t\tstreamingBehavior: \"followUp\",\n\t\t\t\t...(images.length > 0 ? { images } : {}),\n\t\t\t});\n\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\tthis.ui.requestRender();\n\t\t}\n\t\t// If not streaming, Alt+Enter acts like regular Enter (trigger onSubmit)\n\t\telse if (this.editor.onSubmit) {\n\t\t\t// The public `onSubmit(text: string)` API cannot be widened, so hand\n\t\t\t// the pre-resolved images over out-of-band; the submit handler\n\t\t\t// captures-and-clears the field at entry and delivers them through the\n\t\t\t// widened main-loop channel.\n\t\t\tthis.preResolvedSubmissionImages = images.length > 0 ? images : undefined;\n\t\t\tthis.editor.setText(\"\");\n\t\t\tthis.editor.onSubmit(text);\n\t\t}\n\t}\n\n\tprivate handleDequeue(): void {\n\t\tconst restored = this.restoreQueuedMessagesToEditor();\n\t\tif (restored === 0) {\n\t\t\tthis.showStatus(\"No queued messages to restore\");\n\t\t} else {\n\t\t\tthis.showStatus(`Restored ${restored} queued message${restored > 1 ? \"s\" : \"\"} to editor`);\n\t\t}\n\t}\n\n\tprivate updateEditorBorderColor(): void {\n\t\tif (this.chrome) {\n\t\t\tthis.editor.borderColor = this.chrome.getEditorBorderColor({\n\t\t\t\tisBashMode: this.isBashMode,\n\t\t\t\tthinkingLevel: this.session.thinkingLevel || \"off\",\n\t\t\t});\n\t\t} else if (this.isBashMode) {\n\t\t\tthis.editor.borderColor = theme.getBashModeBorderColor();\n\t\t} else {\n\t\t\tconst level = this.session.thinkingLevel || \"off\";\n\t\t\tthis.editor.borderColor = theme.getThinkingBorderColor(level);\n\t\t}\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate cycleThinkingLevel(): void {\n\t\tconst newLevel = this.session.cycleThinkingLevel();\n\t\tif (newLevel === undefined) {\n\t\t\tthis.showStatus(\"Current model does not support thinking\");\n\t\t} else {\n\t\t\tthis.footer.invalidate();\n\t\t\tthis.updateEditorBorderColor();\n\t\t\tthis.showStatus(`Thinking level: ${newLevel}`);\n\t\t}\n\t}\n\n\tprivate async cycleModel(direction: \"forward\" | \"backward\"): Promise<void> {\n\t\ttry {\n\t\t\tconst result = await this.session.cycleModel(direction);\n\t\t\tif (result === undefined) {\n\t\t\t\tconst msg =\n\t\t\t\t\tthis.session.favoriteModels.length > 0\n\t\t\t\t\t\t? buildFavoriteCycleStatusMessage(\"single\")\n\t\t\t\t\t\t: buildFavoriteCycleStatusMessage(\"empty\");\n\t\t\t\tthis.showStatus(msg);\n\t\t\t} else {\n\t\t\t\tthis.footer.invalidate();\n\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t\tconst thinkingStr =\n\t\t\t\t\tresult.model.reasoning && result.thinkingLevel !== \"off\" ? ` (thinking: ${result.thinkingLevel})` : \"\";\n\t\t\t\tconst systemPromptStr = result.systemPromptChange?.systemPromptName\n\t\t\t\t\t? `, optimized system prompt applied: ${result.systemPromptChange.systemPromptName}`\n\t\t\t\t\t: \"\";\n\t\t\t\tthis.showStatus(`Switched to ${result.model.name || result.model.id}${thinkingStr}${systemPromptStr}`);\n\t\t\t\tthis.showRiskyMainModelWarning(result.model);\n\t\t\t\tvoid this.maybeWarnAboutAnthropicSubscriptionAuth(result.model);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\tprivate toggleToolOutputExpansion(): void {\n\t\tthis.setToolsExpanded(!this.toolOutputExpanded);\n\t}\n\n\tprivate setToolsExpanded(expanded: boolean): void {\n\t\tif (expanded === this.toolOutputExpanded) return;\n\n\t\tthis.toolOutputExpanded = expanded;\n\t\tconst activeHeader = this.customHeader ?? this.builtInHeader;\n\t\tif (isExpandable(activeHeader)) {\n\t\t\tactiveHeader.setExpanded(expanded);\n\t\t}\n\t\tfor (const container of [this.loadedResourcesContainer, this.chatContainer]) {\n\t\t\tfor (const child of container.children) {\n\t\t\t\tif (isExpandable(child)) {\n\t\t\t\t\tchild.setExpanded(expanded);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.showStatus(`Tool output: ${expanded ? \"expanded\" : \"collapsed\"}`);\n\t}\n\n\tprivate toggleThinkingBlockVisibility(): void {\n\t\tthis.hideThinkingBlock = !this.hideThinkingBlock;\n\t\tthis.settingsManager.setHideThinkingBlock(this.hideThinkingBlock);\n\n\t\t// Rebuild chat from session messages\n\t\tthis.chatContainer.clear();\n\t\tthis.rebuildChatFromMessages();\n\n\t\t// If streaming, re-add the streaming component with updated visibility and re-render\n\t\tif (this.streamingComponent && this.streamingMessage) {\n\t\t\tthis.streamingComponent.setHideThinkingBlock(this.hideThinkingBlock);\n\t\t\tthis.streamingReveal.resyncVisibility();\n\t\t\tthis.chatContainer.addChild(this.streamingComponent);\n\t\t}\n\n\t\tthis.showStatus(`Thinking blocks: ${this.hideThinkingBlock ? \"hidden\" : \"visible\"}`);\n\t}\n\n\tprivate async handleOpenExternalEditor(): Promise<void> {\n\t\tconst editorCmd = this.settingsManager.getExternalEditorCommand();\n\t\tconst content = this.getExpandedEditorText();\n\t\tthis.ui.stop();\n\t\trestoreInteractiveStderr();\n\t\ttry {\n\t\t\tconst result = await editInExternalEditor({\n\t\t\t\tcommand: editorCmd,\n\t\t\t\tcontent,\n\t\t\t});\n\t\t\tif (result.status === \"complete\") {\n\t\t\t\tthis.editor.setText(result.content);\n\t\t\t}\n\t\t} finally {\n\t\t\ttakeOverInteractiveStderr();\n\t\t\tthis.ui.start();\n\t\t\tthis.ui.requestRender(true);\n\t\t}\n\t}\n\n\t// =========================================================================\n\t// UI helpers\n\t// =========================================================================\n\n\tclearEditor(): void {\n\t\tthis.editor.setText(\"\");\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowError(errorMessage: string): void {\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(theme.fg(\"error\", `Error: ${sanitizeTuiErrorMessage(errorMessage)}`), 1, 0));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowNoticeBox(spec: NoticeSpec): void {\n\t\tconst sanitized: NoticeSpec = {\n\t\t\t...spec,\n\t\t\ttitle: sanitizeTuiErrorMessage(spec.title),\n\t\t\twhy: sanitizeTuiErrorMessage(spec.why),\n\t\t\t...(spec.extra === undefined\n\t\t\t\t? {}\n\t\t\t\t: {\n\t\t\t\t\t\textra: spec.extra.map((line) => ({\n\t\t\t\t\t\t\t...line,\n\t\t\t\t\t\t\ttext: sanitizeTuiErrorMessage(line.text),\n\t\t\t\t\t\t})),\n\t\t\t\t\t}),\n\t\t\t...(spec.expandedLine === undefined ? {} : { expandedLine: sanitizeTuiErrorMessage(spec.expandedLine) }),\n\t\t};\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(buildNoticeBox(sanitized, { expanded: this.toolOutputExpanded }, theme));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowWarning(warningMessage: string): void {\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(theme.fg(\"warning\", `Warning: ${warningMessage}`), 1, 0));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowNewVersionNotification(newVersion: string): void {\n\t\tconst action = theme.fg(\"accent\", BRAND?.update?.command ?? `${APP_NAME} update`);\n\t\tconst updateInstruction = theme.fg(\"muted\", `New version ${newVersion} is available. Run `) + action;\n\t\tconst changelogUrl = getReleaseChangelogUrl(newVersion);\n\t\tconst changelogLink = getCapabilities().hyperlinks\n\t\t\t? hyperlink(theme.fg(\"accent\", changelogUrl), changelogUrl)\n\t\t\t: theme.fg(\"accent\", changelogUrl);\n\t\tconst changelogLine = theme.fg(\"muted\", \"Changelog: \") + changelogLink;\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"warning\", text)));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(\n\t\t\t\t`${theme.bold(theme.fg(\"warning\", \"Update Available\"))}\\n${updateInstruction}\\n${changelogLine}`,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"warning\", text)));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowRiskyMainModelWarning(model: Model<any> | undefined): void {\n\t\tif (!model || !isRiskyMainModel(model)) return;\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"error\", text)));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(\n\t\t\t\t`${theme.bold(theme.fg(\"error\", \"Risky model warning\"))}\\n${theme.fg(\"error\", RISKY_MAIN_MODEL_WARNING)}`,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"error\", text)));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowSettingsSourceSelected(event: Extract<AgentSessionEvent, { type: \"settings_source_selected\" }>): void {\n\t\tthis.showStatus(`Settings: ${path.basename(event.path)} (${event.format.toUpperCase()})`);\n\t}\n\n\tshowHighReasoningWarning(event: { modelId: string; provider: string; thinkingLevel: ThinkingLevel }): void {\n\t\tconst { title, body } = buildHighReasoningWarning(\n\t\t\t{ id: event.modelId, provider: event.provider },\n\t\t\tevent.thinkingLevel,\n\t\t);\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"error\", text)));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(\n\t\t\t\t`${theme.bold(theme.fg(\"error\", title))}\\n${body.map((line) => theme.fg(\"error\", line)).join(\"\\n\")}`,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"error\", text)));\n\t\tthis.ui.requestRender();\n\t}\n\n\tshowPackageUpdateNotification(packages: string[]): void {\n\t\tconst action = theme.fg(\"accent\", `${APP_NAME} update --extensions`);\n\t\tconst updateInstruction = theme.fg(\"muted\", \"Package updates are available. Run \") + action;\n\t\tconst packageLines = packages.map((pkg) => `- ${pkg}`).join(\"\\n\");\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"warning\", text)));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(\n\t\t\t\t`${theme.bold(theme.fg(\"warning\", \"Package Updates Available\"))}\\n${updateInstruction}\\n${theme.fg(\"muted\", \"Packages:\")}\\n${packageLines}`,\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t\tthis.chatContainer.addChild(new DynamicBorder((text) => theme.fg(\"warning\", text)));\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Get all queued messages (read-only).\n\t * Combines session queue and compaction queue.\n\t */\n\tprivate getAllQueuedMessages(): { steering: string[]; followUp: string[] } {\n\t\treturn {\n\t\t\tsteering: [\n\t\t\t\t...this.session.getSteeringMessages(),\n\t\t\t\t...this.compactionInFlightMessages.filter((msg) => msg.mode === \"steer\").map((msg) => msg.text),\n\t\t\t\t...this.compactionQueuedMessages.filter((msg) => msg.mode === \"steer\").map((msg) => msg.text),\n\t\t\t],\n\t\t\tfollowUp: [\n\t\t\t\t...this.session.getFollowUpMessages(),\n\t\t\t\t...this.compactionInFlightMessages.filter((msg) => msg.mode === \"followUp\").map((msg) => msg.text),\n\t\t\t\t...this.compactionQueuedMessages.filter((msg) => msg.mode === \"followUp\").map((msg) => msg.text),\n\t\t\t],\n\t\t};\n\t}\n\n\t/**\n\t * Clear all queued messages and return their contents.\n\t * Clears both session queue and compaction queue.\n\t */\n\tprivate clearAllQueues(options: { abortWillFollow: boolean } = { abortWillFollow: false }): {\n\t\tsteering: string[];\n\t\tfollowUp: string[];\n\t\tordered: Array<{\n\t\t\ttext: string;\n\t\t\tmode: \"steer\" | \"followUp\";\n\t\t\tenqueueOrder: number;\n\t\t}>;\n\t} {\n\t\tconst clearedNative = this.session.clearQueue(options);\n\t\tconst { steering, followUp } = clearedNative;\n\t\tconst nativeMessages = clearedNative.ordered ?? [\n\t\t\t...steering.map((text, enqueueOrder) => ({\n\t\t\t\ttext,\n\t\t\t\tmode: \"steer\" as const,\n\t\t\t\tenqueueOrder,\n\t\t\t})),\n\t\t\t...followUp.map((text, index) => ({\n\t\t\t\ttext,\n\t\t\t\tmode: \"followUp\" as const,\n\t\t\t\tenqueueOrder: steering.length + index,\n\t\t\t})),\n\t\t];\n\t\tconst compactionMessages = [...this.compactionInFlightMessages, ...this.compactionQueuedMessages];\n\t\tconst compactionSteering = compactionMessages.filter((msg) => msg.mode === \"steer\").map((msg) => msg.text);\n\t\tconst compactionFollowUp = compactionMessages.filter((msg) => msg.mode === \"followUp\").map((msg) => msg.text);\n\t\tfor (const controller of this.compactionTransferAbortControllers.values()) controller.abort();\n\t\tthis.compactionInFlightMessages = [];\n\t\tthis.compactionTransferAbortControllers.clear();\n\t\tthis.compactionQueuedMessages = [];\n\t\tconst fallbackOrder = nativeMessages.reduce((maximum, message) => Math.max(maximum, message.enqueueOrder), 0);\n\t\tconst ordered = [\n\t\t\t...nativeMessages,\n\t\t\t...compactionMessages.map((message, index) => ({\n\t\t\t\t...message,\n\t\t\t\tenqueueOrder: message.enqueueOrder ?? fallbackOrder + index + 1,\n\t\t\t})),\n\t\t].sort((a, b) => a.enqueueOrder - b.enqueueOrder);\n\t\tconst cleared = {\n\t\t\tsteering: [...steering, ...compactionSteering],\n\t\t\tfollowUp: [...followUp, ...compactionFollowUp],\n\t\t} as {\n\t\t\tsteering: string[];\n\t\t\tfollowUp: string[];\n\t\t\tordered: typeof ordered;\n\t\t};\n\t\tObject.defineProperty(cleared, \"ordered\", {\n\t\t\tvalue: ordered,\n\t\t\tenumerable: false,\n\t\t});\n\t\treturn cleared;\n\t}\n\n\tprivate updatePendingMessagesDisplay(): void {\n\t\tthis.pendingMessagesContainer.clear();\n\t\tconst { steering: steeringMessages, followUp: followUpMessages } = this.getAllQueuedMessages();\n\t\tif (steeringMessages.length > 0 || followUpMessages.length > 0) {\n\t\t\tthis.pendingMessagesContainer.addChild(new Spacer(1));\n\t\t\tfor (const message of steeringMessages) {\n\t\t\t\tconst text = theme.fg(\"dim\", `Steering: ${message}`);\n\t\t\t\tthis.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));\n\t\t\t}\n\t\t\tfor (const message of followUpMessages) {\n\t\t\t\tconst text = theme.fg(\"dim\", `Follow-up: ${message}`);\n\t\t\t\tthis.pendingMessagesContainer.addChild(new TruncatedText(text, 1, 0));\n\t\t\t}\n\t\t\tconst dequeueHint = this.getAppKeyDisplay(\"app.message.dequeue\");\n\t\t\tconst hintText = theme.fg(\"dim\", `↳ ${dequeueHint} to edit all queued messages`);\n\t\t\tthis.pendingMessagesContainer.addChild(new TruncatedText(hintText, 1, 0));\n\t\t}\n\t}\n\n\tprivate restoreQueuedMessagesToEditor(options?: { abort?: boolean; currentText?: string }): number {\n\t\tconst { steering, followUp, ordered } = this.clearAllQueues({\n\t\t\tabortWillFollow: options?.abort === true,\n\t\t});\n\t\tconst allQueued = ordered?.map((message) => message.text) ?? [...steering, ...followUp];\n\t\tif (allQueued.length === 0) {\n\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\tif (options?.abort) {\n\t\t\t\tvoid this.session.abort();\n\t\t\t}\n\t\t\treturn 0;\n\t\t}\n\t\tconst queuedText = allQueued.join(\"\\n\\n\");\n\t\tconst currentText = options?.currentText ?? this.editor.getText();\n\t\tconst combinedText = [queuedText, currentText].filter((t) => t.trim()).join(\"\\n\\n\");\n\t\tthis.editor.setText(combinedText);\n\t\tthis.updatePendingMessagesDisplay();\n\t\tif (options?.abort) {\n\t\t\tvoid this.session.abort();\n\t\t}\n\t\treturn allQueued.length;\n\t}\n\n\t/**\n\t * User-abort path that drains the queue, aborts the active run (and any in-flight retry),\n\t * waits for settle, then restores queued messages to the editor.\n\t *\n\t * Behavior contract:\n\t * - clearAllQueues() is called synchronously so the pending-messages display empties immediately.\n\t * - `await session.abort()` ensures the previous run is fully idle before touching the draft.\n\t * - The helper never auto-prompts restored queue text; the user decides whether to send it.\n\t */\n\tprivate async abortAndFireQueuedMessages(): Promise<number> {\n\t\tconst { steering, followUp, ordered } = this.clearAllQueues({\n\t\t\tabortWillFollow: true,\n\t\t});\n\t\tconst allQueued = ordered?.map((message) => message.text) ?? [...steering, ...followUp];\n\t\tthis.updatePendingMessagesDisplay();\n\t\tawait this.session.abort();\n\n\t\tif (allQueued.length === 0) {\n\t\t\treturn 0;\n\t\t}\n\n\t\tconst queuedText = allQueued.join(\"\\n\\n\");\n\t\tconst currentText = this.editor.getText();\n\t\tconst combinedText = [queuedText, currentText].filter((t) => t.trim()).join(\"\\n\\n\");\n\t\tthis.editor.setText(combinedText);\n\t\treturn allQueued.length;\n\t}\n\n\tprivate queueCompactionMessage(text: string, mode: \"steer\" | \"followUp\", droppedImageCount = 0): void {\n\t\tthis.compactionQueuedMessages.push({\n\t\t\ttext,\n\t\t\tmode,\n\t\t\tenqueueOrder: this.session.reserveQueuedInputOrder(),\n\t\t});\n\t\tthis.getSessionLogger().debug(\"compaction_queue_enqueue\", {\n\t\t\tmode,\n\t\t\tcount: this.compactionQueuedMessages.length,\n\t\t});\n\t\tthis.editor.addToHistory?.(text);\n\t\tthis.editor.setText(\"\");\n\t\tthis.updatePendingMessagesDisplay();\n\t\tthis.showStatus(\n\t\t\tdroppedImageCount > 0\n\t\t\t\t? `Queued message for after compaction; dropped ${droppedImageCount} image${droppedImageCount > 1 ? \"s\" : \"\"}: messages sent during compaction cannot carry images - paste again after compaction finishes`\n\t\t\t\t: \"Queued message for after compaction\",\n\t\t);\n\t}\n\n\t/**\n\t * Queue a user submission for delivery after compaction. The compaction\n\t * queue carries text only, so pasted attachments are dropped here -\n\t * VISIBLY, never silently, mirroring attachClipboardImage's paste-time\n\t * contract - and their `[Image #N]` markers are stripped, because a queued\n\t * literal marker has no payload behind it and would ship an unreadable\n\t * `[Image #N]` string to the model once the queue drains.\n\t */\n\tprivate queueCompactionSubmission(text: string, mode: \"steer\" | \"followUp\"): void {\n\t\tconst images = this.takeSubmissionImages(text);\n\t\tif (images.length === 0) {\n\t\t\tthis.queueCompactionMessage(text, mode);\n\t\t\treturn;\n\t\t}\n\t\tconst queued = text.replace(IMAGE_MARKER_PATTERN, \"\").trim();\n\t\tif (queued) {\n\t\t\tthis.queueCompactionMessage(queued, mode, images.length);\n\t\t\treturn;\n\t\t}\n\t\tthis.showStatus(\n\t\t\t`Dropped ${images.length} image${images.length > 1 ? \"s\" : \"\"}: messages sent during compaction cannot carry images - paste again after compaction finishes`,\n\t\t);\n\t}\n\n\tprivate hasRegisteredCommand(command: string): boolean {\n\t\treturn !!this.session.extensionRunner.getCommand(command);\n\t}\n\n\tprivate isExtensionCommand(text: string): boolean {\n\t\tif (!text.startsWith(\"/\")) return false;\n\n\t\tconst extensionRunner = this.session.extensionRunner;\n\n\t\tconst spaceIndex = text.indexOf(\" \");\n\t\tconst commandName = spaceIndex === -1 ? text.slice(1) : text.slice(1, spaceIndex);\n\t\treturn !!extensionRunner.getCommand(commandName);\n\t}\n\n\tprivate async flushCompactionQueue(options?: { willRetry?: boolean; deferAdmission?: boolean }): Promise<void> {\n\t\tconst session = this.session;\n\t\tconst generation = this.compactionQueueGeneration ?? 0;\n\t\tconst previousFlush = this.compactionQueueFlushTail;\n\t\tconst runTransfer = async (): Promise<void> => {\n\t\t\tif ((this.compactionQueueGeneration ?? 0) !== generation || this.session !== session) return;\n\t\t\tawait transferCompactionQueue(\n\t\t\t\t{\n\t\t\t\t\ttakeBatch: () => {\n\t\t\t\t\t\tconst batch = this.compactionQueuedMessages;\n\t\t\t\t\t\tthis.compactionQueuedMessages = [];\n\t\t\t\t\t\tthis.compactionInFlightMessages.push(...batch);\n\t\t\t\t\t\tfor (const message of batch) {\n\t\t\t\t\t\t\tthis.compactionTransferAbortControllers.set(message, new AbortController());\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\t\t\treturn batch;\n\t\t\t\t\t},\n\t\t\t\t\tcommitAccepted: (message) => {\n\t\t\t\t\t\tconst index = this.compactionInFlightMessages.indexOf(message);\n\t\t\t\t\t\tif (index === -1) return false;\n\t\t\t\t\t\tthis.compactionInFlightMessages.splice(index, 1);\n\t\t\t\t\t\tthis.compactionTransferAbortControllers.delete(message);\n\t\t\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t},\n\t\t\t\t\trestoreUndelivered: (messages) => {\n\t\t\t\t\t\tconst restorable = messages.filter((message) => this.compactionInFlightMessages.includes(message));\n\t\t\t\t\t\tconst restorableSet = new Set(restorable);\n\t\t\t\t\t\tthis.compactionInFlightMessages = this.compactionInFlightMessages.filter(\n\t\t\t\t\t\t\t(message) => !restorableSet.has(message),\n\t\t\t\t\t\t);\n\t\t\t\t\t\tfor (const message of restorable) this.compactionTransferAbortControllers.delete(message);\n\t\t\t\t\t\tthis.compactionQueuedMessages = [...restorable, ...this.compactionQueuedMessages];\n\t\t\t\t\t\tthis.updatePendingMessagesDisplay();\n\t\t\t\t\t\treturn restorable.length;\n\t\t\t\t\t},\n\t\t\t\t\tisCommand: (message) => this.isExtensionCommand(message.text),\n\t\t\t\t\tdeliverCommand: (message) => session.prompt(message.text),\n\t\t\t\t\tdeliverFirstPrompt: (message) =>\n\t\t\t\t\t\twaitForPromptDisposition(\n\t\t\t\t\t\t\t(preflightResult, promptDisposition) =>\n\t\t\t\t\t\t\t\tsession.prompt(message.text, {\n\t\t\t\t\t\t\t\t\tstreamingBehavior: message.mode,\n\t\t\t\t\t\t\t\t\tpreflightResult,\n\t\t\t\t\t\t\t\t\tpromptDisposition,\n\t\t\t\t\t\t\t\t\tsignal: this.compactionTransferAbortControllers.get(message)?.signal,\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t(error) => {\n\t\t\t\t\t\t\t\tif ((this.compactionQueueGeneration ?? 0) !== generation || this.session !== session) return;\n\t\t\t\t\t\t\t\tthis.showError(\n\t\t\t\t\t\t\t\t\t`Queued prompt failed after acceptance: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t),\n\t\t\t\t\tdeliverQueued: (message) => {\n\t\t\t\t\t\tif (message.enqueueOrder === undefined) {\n\t\t\t\t\t\t\treturn message.mode === \"followUp\" ? session.followUp(message.text) : session.steer(message.text);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn message.mode === \"followUp\"\n\t\t\t\t\t\t\t? session.followUp(message.text, undefined, {\n\t\t\t\t\t\t\t\t\tenqueueOrder: message.enqueueOrder,\n\t\t\t\t\t\t\t\t})\n\t\t\t\t\t\t\t: session.steer(message.text, undefined, {\n\t\t\t\t\t\t\t\t\tenqueueOrder: message.enqueueOrder,\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t\treportFailure: (error, undeliveredCount) => {\n\t\t\t\t\t\tthis.showError(\n\t\t\t\t\t\t\t`Failed to send queued message${undeliveredCount === 1 ? \"\" : \"s\"}: ${\n\t\t\t\t\t\t\t\terror instanceof Error ? error.message : String(error)\n\t\t\t\t\t\t\t}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\toptions,\n\t\t\t);\n\t\t\tthis.updatePendingMessagesDisplay();\n\t\t};\n\t\tconst currentFlush = previousFlush ? previousFlush.then(runTransfer, runTransfer) : runTransfer();\n\t\tconst settledFlush = currentFlush.catch(() => undefined);\n\t\tthis.compactionQueueFlushTail = settledFlush;\n\t\ttry {\n\t\t\tawait currentFlush;\n\t\t} finally {\n\t\t\tif (this.compactionQueueFlushTail === settledFlush) this.compactionQueueFlushTail = undefined;\n\t\t}\n\t}\n\n\t/** Move pending bash components from pending area to chat */\n\tprivate flushPendingBashComponents(): void {\n\t\tfor (const component of this.pendingBashComponents) {\n\t\t\tthis.pendingMessagesContainer.removeChild(component);\n\t\t\tthis.chatContainer.addChild(component);\n\t\t}\n\t\tthis.pendingBashComponents = [];\n\t}\n\n\t// =========================================================================\n\t// Selectors\n\t// =========================================================================\n\n\tprivate disposeActiveSelector(): void {\n\t\tconst dispose = this.activeSelectorDispose;\n\t\tthis.activeSelectorToken = undefined;\n\t\tthis.activeSelectorDispose = undefined;\n\t\tdispose?.();\n\t}\n\n\t/**\n\t * Shows a selector component in place of the editor.\n\t * @param create Factory that receives a `done` callback and returns the component and focus target\n\t */\n\tprivate showSelector(\n\t\tcreate: (done: () => void) => {\n\t\t\tcomponent: Component;\n\t\t\tfocus: Component;\n\t\t\tdispose?: () => void;\n\t\t},\n\t): void {\n\t\tconst token = {};\n\t\tlet dispose: (() => void) | undefined;\n\t\tconst done = () => {\n\t\t\tdispose?.();\n\t\t\tif (this.activeSelectorToken !== token) return;\n\t\t\tthis.activeSelectorToken = undefined;\n\t\t\tthis.activeSelectorDispose = undefined;\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t};\n\t\tconst created = create(done);\n\t\tdispose = created.dispose;\n\t\tthis.disposeActiveSelector();\n\t\tthis.activeSelectorToken = token;\n\t\tthis.activeSelectorDispose = dispose;\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(created.component);\n\t\tthis.ui.setFocus(created.focus);\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate showSettingsSelector(): void {\n\t\tthis.showSelector((done) => {\n\t\t\tlet selector: SettingsSelectorComponent | undefined;\n\t\t\tselector = new SettingsSelectorComponent(\n\t\t\t\t{\n\t\t\t\t\tautoCompact: this.session.autoCompactionEnabled,\n\t\t\t\t\tshowImages: this.settingsManager.getShowImages(),\n\t\t\t\t\timageWidthCells: this.settingsManager.getImageWidthCells(),\n\t\t\t\t\tautoResizeImages: this.settingsManager.getImageAutoResize(),\n\t\t\t\t\tblockImages: this.settingsManager.getBlockImages(),\n\t\t\t\t\tenableSkillCommands: this.settingsManager.getEnableSkillCommands(),\n\t\t\t\t\tsteeringMode: this.session.steeringMode,\n\t\t\t\t\tfollowUpMode: this.session.followUpMode,\n\t\t\t\t\ttransport: this.settingsManager.getTransport(),\n\t\t\t\t\thttpIdleTimeoutMs: this.settingsManager.getHttpIdleTimeoutMs(),\n\t\t\t\t\tthinkingLevel: this.session.thinkingLevel,\n\t\t\t\t\tavailableThinkingLevels: this.session.getAvailableThinkingLevels(),\n\t\t\t\t\tcurrentTheme: this.themeController.getThemeSelection() || \"dark\",\n\t\t\t\t\tterminalTheme: this.themeController.getTerminalTheme(),\n\t\t\t\t\tavailableThemes: getAvailableThemes(),\n\t\t\t\t\thideThinkingBlock: this.hideThinkingBlock,\n\t\t\t\t\tsmoothStreaming: this.settingsManager.getSmoothStreaming(),\n\t\t\t\t\tsmoothStreamingFps: this.settingsManager.getSmoothStreamingFps(),\n\t\t\t\t\tmermaidRenderingMode: this.settingsManager.getMermaidRenderingMode(),\n\t\t\t\t\tcollapseChangelog: this.settingsManager.getCollapseChangelog(),\n\t\t\t\t\tenableInstallTelemetry: this.settingsManager.getEnableInstallTelemetry(),\n\t\t\t\t\tdoubleEscapeAction: this.settingsManager.getDoubleEscapeAction(),\n\t\t\t\t\ttreeFilterMode: this.settingsManager.getTreeFilterMode(),\n\t\t\t\t\tshowHardwareCursor: this.settingsManager.getShowHardwareCursor(),\n\t\t\t\t\tshowCacheMissNotices: this.settingsManager.getShowCacheMissNotices(),\n\t\t\t\t\tdefaultProjectTrust: this.settingsManager.getDefaultProjectTrust(),\n\t\t\t\t\teditorPaddingX: this.settingsManager.getEditorPaddingX(),\n\t\t\t\t\toutputPad: this.settingsManager.getOutputPad(),\n\t\t\t\t\tautocompleteMaxVisible: this.settingsManager.getAutocompleteMaxVisible(),\n\t\t\t\t\tquietStartup: this.settingsManager.getQuietStartup(),\n\t\t\t\t\tclearOnShrink: this.settingsManager.getClearOnShrink(),\n\t\t\t\t\tshowTerminalProgress: this.settingsManager.getShowTerminalProgress(),\n\t\t\t\t\ttuiMode: this.ui.mode,\n\t\t\t\t\tfullscreenExitOutput: this.settingsManager.getFullscreenExitOutput(),\n\t\t\t\t\tfullscreenScrollbar: this.settingsManager.getFullscreenScrollbar(),\n\t\t\t\t\twarnings: this.settingsManager.getWarnings(),\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tonAutoCompactChange: (enabled) => {\n\t\t\t\t\t\tthis.session.setAutoCompactionEnabled(enabled);\n\t\t\t\t\t\tthis.footer.setAutoCompactEnabled(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonShowImagesChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setShowImages(enabled);\n\t\t\t\t\t\tfor (const child of this.chatContainer.children) {\n\t\t\t\t\t\t\tif (child instanceof ToolExecutionComponent) {\n\t\t\t\t\t\t\t\tchild.setShowImages(enabled);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonImageWidthCellsChange: (width) => {\n\t\t\t\t\t\tthis.settingsManager.setImageWidthCells(width);\n\t\t\t\t\t\tfor (const child of this.chatContainer.children) {\n\t\t\t\t\t\t\tif (child instanceof ToolExecutionComponent) {\n\t\t\t\t\t\t\t\tchild.setImageWidthCells(width);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonAutoResizeImagesChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setImageAutoResize(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonBlockImagesChange: (blocked) => {\n\t\t\t\t\t\tthis.settingsManager.setBlockImages(blocked);\n\t\t\t\t\t},\n\t\t\t\t\tonEnableSkillCommandsChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setEnableSkillCommands(enabled);\n\t\t\t\t\t\tthis.setupAutocompleteProvider();\n\t\t\t\t\t},\n\t\t\t\t\tonSteeringModeChange: (mode) => {\n\t\t\t\t\t\tthis.session.setSteeringMode(mode);\n\t\t\t\t\t},\n\t\t\t\t\tonFollowUpModeChange: (mode) => {\n\t\t\t\t\t\tthis.session.setFollowUpMode(mode);\n\t\t\t\t\t},\n\t\t\t\t\tonTransportChange: (transport) => {\n\t\t\t\t\t\tthis.settingsManager.setTransport(transport);\n\t\t\t\t\t\tthis.session.agent.transport = transport;\n\t\t\t\t\t},\n\t\t\t\t\tonHttpIdleTimeoutMsChange: (timeoutMs) => {\n\t\t\t\t\t\tthis.settingsManager.setHttpIdleTimeoutMs(timeoutMs);\n\t\t\t\t\t\tconfigureHttpDispatcher(timeoutMs);\n\t\t\t\t\t\tthis.session.agent.timeoutMs = this.settingsManager.getAgentStreamIdleTimeoutMs();\n\t\t\t\t\t\tthis.session.agent.streamStartTimeoutMs = this.settingsManager.getAgentStreamStartTimeoutMs();\n\t\t\t\t\t\tthis.showStatus(`HTTP idle timeout: ${formatHttpIdleTimeoutMs(timeoutMs)}`);\n\t\t\t\t\t},\n\t\t\t\t\tonThinkingLevelChange: (level) => {\n\t\t\t\t\t\tthis.session.setThinkingLevel(level);\n\t\t\t\t\t\tthis.footer.invalidate();\n\t\t\t\t\t\tthis.updateEditorBorderColor();\n\t\t\t\t\t},\n\t\t\t\t\tonThemeChange: (themeSetting) => {\n\t\t\t\t\t\tthis.settingsManager.setTheme(themeSetting);\n\t\t\t\t\t\tvoid this.themeController.setThemeSetting(themeSetting);\n\t\t\t\t\t},\n\t\t\t\t\tonThemePreview: (themeName) => this.themeController.preview(themeName),\n\t\t\t\t\tonHideThinkingBlockChange: (hidden) => {\n\t\t\t\t\t\tthis.hideThinkingBlock = hidden;\n\t\t\t\t\t\tthis.settingsManager.setHideThinkingBlock(hidden);\n\t\t\t\t\t\tfor (const child of this.chatContainer.children) {\n\t\t\t\t\t\t\tif (child instanceof AssistantMessageComponent) {\n\t\t\t\t\t\t\t\tchild.setHideThinkingBlock(hidden);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.chatContainer.clear();\n\t\t\t\t\t\tthis.rebuildChatFromMessages();\n\t\t\t\t\t\tif (this.streamingComponent && this.streamingMessage) {\n\t\t\t\t\t\t\tthis.streamingComponent.setHideThinkingBlock(hidden);\n\t\t\t\t\t\t\tthis.streamingReveal.resyncVisibility();\n\t\t\t\t\t\t\tthis.chatContainer.addChild(this.streamingComponent);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t\tonSmoothStreamingChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setSmoothStreaming(enabled);\n\t\t\t\t\t\tthis.applySmoothStreamingRenderFps();\n\t\t\t\t\t\tthis.toolArgsReveal.refresh();\n\t\t\t\t\t\tthis.toolResultReveal.refresh();\n\t\t\t\t\t\tif (this.streamingMessage) {\n\t\t\t\t\t\t\tthis.streamingReveal.setTarget(this.streamingMessage);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t\tonSmoothStreamingFpsChange: (fps) => {\n\t\t\t\t\t\tthis.settingsManager.setSmoothStreamingFps(fps);\n\t\t\t\t\t\tthis.toolArgsReveal.refresh();\n\t\t\t\t\t\tthis.toolResultReveal.refresh();\n\t\t\t\t\t\tif (this.settingsManager.getSmoothStreaming()) {\n\t\t\t\t\t\t\tthis.applySmoothStreamingRenderFps();\n\t\t\t\t\t\t\tif (this.streamingMessage) {\n\t\t\t\t\t\t\t\tthis.streamingReveal.setTarget(this.streamingMessage);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonMermaidRenderingModeChange: (mode) => {\n\t\t\t\t\t\tthis.settingsManager.setMermaidRenderingMode(mode);\n\t\t\t\t\t\tthis.chatContainer.invalidate();\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t\tonShowCacheMissNoticesChange: (shown) => {\n\t\t\t\t\t\tthis.settingsManager.setShowCacheMissNotices(shown);\n\t\t\t\t\t\tthis.rebuildChatFromMessages();\n\t\t\t\t\t},\n\t\t\t\t\tonCollapseChangelogChange: (collapsed) => {\n\t\t\t\t\t\tthis.settingsManager.setCollapseChangelog(collapsed);\n\t\t\t\t\t},\n\t\t\t\t\tonEnableInstallTelemetryChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setEnableInstallTelemetry(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonQuietStartupChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setQuietStartup(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonDefaultProjectTrustChange: (defaultProjectTrust) => {\n\t\t\t\t\t\tthis.settingsManager.setDefaultProjectTrust(defaultProjectTrust);\n\t\t\t\t\t},\n\t\t\t\t\tonDoubleEscapeActionChange: (action) => {\n\t\t\t\t\t\tthis.settingsManager.setDoubleEscapeAction(action);\n\t\t\t\t\t},\n\t\t\t\t\tonTreeFilterModeChange: (mode) => {\n\t\t\t\t\t\tthis.settingsManager.setTreeFilterMode(mode);\n\t\t\t\t\t},\n\t\t\t\t\tonShowHardwareCursorChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setShowHardwareCursor(enabled);\n\t\t\t\t\t\tthis.ui.setShowHardwareCursor(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonEditorPaddingXChange: (padding) => {\n\t\t\t\t\t\tthis.settingsManager.setEditorPaddingX(padding);\n\t\t\t\t\t\tthis.defaultEditor.setPaddingX(padding);\n\t\t\t\t\t\tif (this.editor !== this.defaultEditor && this.editor.setPaddingX !== undefined) {\n\t\t\t\t\t\t\tthis.editor.setPaddingX(padding);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonOutputPadChange: (padding) => {\n\t\t\t\t\t\tthis.settingsManager.setOutputPad(padding);\n\t\t\t\t\t\tthis.outputPad = padding;\n\t\t\t\t\t\tif (this.streamingComponent || this.session.isStreaming) {\n\t\t\t\t\t\t\tfor (const child of this.chatContainer.children) {\n\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\tchild instanceof AssistantMessageComponent ||\n\t\t\t\t\t\t\t\t\tchild instanceof CustomMessageComponent ||\n\t\t\t\t\t\t\t\t\tchild instanceof UserMessageComponent\n\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\tchild.setOutputPad(padding);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (this.streamingComponent) {\n\t\t\t\t\t\t\t\tthis.streamingComponent.setOutputPad(padding);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.rebuildChatFromMessages();\n\t\t\t\t\t},\n\t\t\t\t\tonAutocompleteMaxVisibleChange: (maxVisible) => {\n\t\t\t\t\t\tthis.settingsManager.setAutocompleteMaxVisible(maxVisible);\n\t\t\t\t\t\tthis.defaultEditor.setAutocompleteMaxVisible(maxVisible);\n\t\t\t\t\t\tif (this.editor !== this.defaultEditor && this.editor.setAutocompleteMaxVisible !== undefined) {\n\t\t\t\t\t\t\tthis.editor.setAutocompleteMaxVisible(maxVisible);\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonClearOnShrinkChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setClearOnShrink(enabled);\n\t\t\t\t\t\tthis.ui.setClearOnShrink(enabled);\n\t\t\t\t\t\tif (!enabled && !this.activeStatusIndicator) {\n\t\t\t\t\t\t\tthis.statusContainer.clear();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t\tonShowTerminalProgressChange: (enabled) => {\n\t\t\t\t\t\tthis.settingsManager.setShowTerminalProgress(enabled);\n\t\t\t\t\t},\n\t\t\t\t\tonTuiModeChange: (mode) => {\n\t\t\t\t\t\tif (!this.switchTuiMode(mode)) {\n\t\t\t\t\t\t\tselector?.getSettingsList().updateValue(\"tui-mode\", this.ui.mode);\n\t\t\t\t\t\t\tthis.showStatus(\"Close active overlays before changing TUI mode\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.settingsManager.setTuiMode(mode);\n\t\t\t\t\t\tif (!this.activeStatusIndicator) this.statusContainer.clear();\n\t\t\t\t\t\tthis.showStatus(`TUI mode: ${mode}`);\n\t\t\t\t\t},\n\t\t\t\t\tonFullscreenExitOutputChange: (output) => {\n\t\t\t\t\t\tthis.settingsManager.setFullscreenExitOutput(output);\n\t\t\t\t\t},\n\t\t\t\t\tonFullscreenScrollbarChange: (mode) => {\n\t\t\t\t\t\tthis.settingsManager.setFullscreenScrollbar(mode);\n\t\t\t\t\t\tthis.applyFullscreenScrollbarSetting();\n\t\t\t\t\t},\n\t\t\t\t\tonWarningsChange: (warnings) => {\n\t\t\t\t\t\tthis.settingsManager.setWarnings(warnings);\n\t\t\t\t\t},\n\t\t\t\t\tonCancel: () => {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector.getSettingsList() };\n\t\t});\n\t}\n\n\tprivate async handleModelCommand(searchTerm?: string): Promise<void> {\n\t\tif (!searchTerm) {\n\t\t\tthis.showModelSelector();\n\t\t\treturn;\n\t\t}\n\n\t\tconst model = await this.findExactModelMatch(searchTerm);\n\t\tif (model) {\n\t\t\tawait this.selectModelFromUi(model);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.showModelSelector(searchTerm);\n\t}\n\n\tprivate async findExactModelMatch(searchTerm: string): Promise<Model<any> | undefined> {\n\t\tconst cachedModels =\n\t\t\tthis.session.scopedModels.length > 0\n\t\t\t\t? this.session.scopedModels.map((scoped) => scoped.model)\n\t\t\t\t: [...this.session.modelRuntime.getAvailableSnapshot()];\n\t\tconst cachedMatch = findExactModelReferenceMatch(searchTerm, cachedModels);\n\t\tif (cachedMatch || this.session.scopedModels.length > 0) return cachedMatch;\n\n\t\tthis.showStatus(\"Refreshing model catalogs…\");\n\t\tconst controller = new AbortController();\n\t\tlet timedOut = false;\n\t\tconst timeout = setTimeout(() => {\n\t\t\ttimedOut = true;\n\t\t\tcontroller.abort();\n\t\t}, 15_000);\n\t\ttry {\n\t\t\tconst result = await refreshModelCatalogs(this.session.modelRuntime, controller.signal);\n\t\t\tif (result.aborted && timedOut) {\n\t\t\t\tthis.showWarning(\"Model refresh timed out; searching cached models.\");\n\t\t\t} else if (result.errors.size > 0) {\n\t\t\t\tthis.showWarning(`Could not refresh ${[...result.errors.keys()].join(\", \")}; searching cached models.`);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.showWarning(\n\t\t\t\ttimedOut\n\t\t\t\t\t? \"Model refresh timed out; searching cached models.\"\n\t\t\t\t\t: `Could not refresh model catalogs: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t);\n\t\t} finally {\n\t\t\tclearTimeout(timeout);\n\t\t}\n\t\treturn findExactModelReferenceMatch(searchTerm, [...this.session.modelRuntime.getAvailableSnapshot()]);\n\t}\n\n\tprivate async selectModelFromUi(model: Model<any>, done?: () => void): Promise<void> {\n\t\ttry {\n\t\t\tconst systemPromptChange = await this.session.setModel(model);\n\t\t\tthis.footer.invalidate();\n\t\t\tthis.updateEditorBorderColor();\n\t\t\tdone?.();\n\t\t\tconst systemPromptStr = systemPromptChange?.systemPromptName\n\t\t\t\t? ` (optimized system prompt applied: ${systemPromptChange.systemPromptName})`\n\t\t\t\t: \"\";\n\t\t\tthis.showStatus(`Model: ${model.id}${systemPromptStr}`);\n\t\t\tthis.showRiskyMainModelWarning(model);\n\t\t\tvoid this.maybeWarnAboutAnthropicSubscriptionAuth(model);\n\t\t\tthis.checkDaxnutsEasterEgg(model);\n\t\t} catch (error) {\n\t\t\tdone?.();\n\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\tprivate async resolveFavoriteModelsForUi(\n\t\tpatterns: string[],\n\t\tcandidateModels: readonly Model<any>[],\n\t): Promise<ScopedModel[]> {\n\t\tconst candidateIds = new Set(candidateModels.map(getModelFullId));\n\t\tconst warnings: string[] = [];\n\t\tconst resolvedModels = await resolveModelScope(patterns, this.session.modelRuntime, {\n\t\t\tonWarning: (message) => warnings.push(message),\n\t\t});\n\t\tfor (const warning of warnings) {\n\t\t\tthis.showWarning(warning);\n\t\t}\n\t\treturn resolvedModels.filter((resolved) => candidateIds.has(getModelFullId(resolved.model)));\n\t}\n\n\tprivate async getFavoriteModelIdsForUi(candidateModels: readonly Model<any>[]): Promise<string[] | null> {\n\t\tconst candidateIds = new Set(candidateModels.map(getModelFullId));\n\t\tconst sessionFavoriteIds = this.session.favoriteModels\n\t\t\t.map((favorite) => getModelFullId(favorite.model))\n\t\t\t.filter((id) => candidateIds.has(id));\n\t\tif (sessionFavoriteIds.length > 0) return sessionFavoriteIds;\n\n\t\tconst patterns = this.settingsManager.getFavoriteModels() ?? [];\n\t\tif (patterns.length === 0) return [];\n\n\t\tconst favoriteModels = await this.resolveFavoriteModelsForUi(patterns, candidateModels);\n\t\treturn favoriteModels.map((favorite) => getModelFullId(favorite.model));\n\t}\n\n\tprivate async captureFavoritePatternSnapshot(): Promise<{\n\t\tstoredPatterns: string[];\n\t\tpatternResolutions: PatternResolution[];\n\t}> {\n\t\tconst storedPatterns = this.settingsManager.getFavoriteModels() ?? [];\n\t\tconst { patternResolutions } = await resolveModelScopeWithDiagnostics(storedPatterns, this.session.modelRuntime);\n\t\treturn { storedPatterns, patternResolutions };\n\t}\n\n\tprivate async applyFavoriteSelection(\n\t\tfavoriteIds: FavoriteModelIds,\n\t\tcandidateModels: readonly Model<any>[],\n\t\tpersist: boolean,\n\t\tpatternSnapshot: {\n\t\t\tstoredPatterns: string[];\n\t\t\tpatternResolutions: PatternResolution[];\n\t\t},\n\t): Promise<void> {\n\t\tconst { storedPatterns, patternResolutions } = patternSnapshot;\n\t\tconst mergedPatterns = mergeFavoritePatternsForPersist({\n\t\t\tstoredPatterns,\n\t\t\tpatternResolutions,\n\t\t\tselectedIds: favoriteIds,\n\t\t\tcandidateIds: candidateModels.map(getModelFullId),\n\t\t});\n\n\t\tconst newFavoriteModels = mergedPatterns\n\t\t\t? await resolveModelScope(mergedPatterns, this.session.modelRuntime)\n\t\t\t: [];\n\t\tthis.session.setFavoriteModels(\n\t\t\tnewFavoriteModels.map((favorite) => ({\n\t\t\t\tmodel: favorite.model,\n\t\t\t\tthinkingLevel: favorite.thinkingLevel,\n\t\t\t\tserviceTier: favorite.serviceTier,\n\t\t\t})),\n\t\t);\n\t\tif (persist) this.settingsManager.setFavoriteModels(mergedPatterns);\n\t\tthis.ui.requestRender();\n\t}\n\n\t/** Update the footer's available provider count from the current snapshot without refreshing catalogs. */\n\tprivate updateAvailableProviderCount(): void {\n\t\tconst models =\n\t\t\tthis.session.scopedModels.length > 0\n\t\t\t\t? this.session.scopedModels.map((scoped) => scoped.model)\n\t\t\t\t: this.session.modelRuntime.getAvailableSnapshot();\n\t\tconst uniqueProviders = new Set(models.map((model) => model.provider));\n\t\tthis.footerDataProvider.setAvailableProviderCount(uniqueProviders.size);\n\t}\n\n\tprivate async maybeWarnAboutAnthropicSubscriptionAuth(\n\t\tmodel: Model<any> | undefined = this.session.model,\n\t): Promise<void> {\n\t\tif (this.settingsManager.getWarnings().anthropicExtraUsage === false) {\n\t\t\treturn;\n\t\t}\n\t\tif (this.anthropicSubscriptionWarningShown) {\n\t\t\treturn;\n\t\t}\n\t\tif (model?.provider !== \"anthropic\") {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tif ((await this.session.modelRuntime.checkAuth(\"anthropic\"))?.type === \"oauth\") {\n\t\t\t\tthis.anthropicSubscriptionWarningShown = true;\n\t\t\t\tthis.showWarning(ANTHROPIC_SUBSCRIPTION_AUTH_WARNING);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconst apiKey = (await this.session.modelRuntime.getAuth(model.provider))?.auth.apiKey;\n\t\t\tif (!isAnthropicSubscriptionAuthKey(apiKey)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.anthropicSubscriptionWarningShown = true;\n\t\t\tthis.showWarning(ANTHROPIC_SUBSCRIPTION_AUTH_WARNING);\n\t\t} catch {\n\t\t\t// Ignore auth lookup failures for warning-only checks.\n\t\t}\n\t}\n\n\tprivate maybeSaveImplicitProjectTrustAfterReload(): boolean {\n\t\tconst cwd = this.sessionManager.getCwd();\n\t\tif (this.autoTrustOnReloadCwd !== cwd) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!this.settingsManager.isProjectTrusted() || !hasTrustRequiringProjectResources(cwd)) {\n\t\t\treturn false;\n\t\t}\n\n\t\tconst trustStore = new ProjectTrustStore(this.runtimeHost.services.agentDir);\n\t\ttry {\n\t\t\tif (trustStore.get(cwd) !== null) {\n\t\t\t\tthis.autoTrustOnReloadCwd = undefined;\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\ttrustStore.set(cwd, true);\n\t\t\tthis.autoTrustOnReloadCwd = undefined;\n\t\t\treturn true;\n\t\t} catch (error) {\n\t\t\tthis.showWarning(\n\t\t\t\t`Could not save project trust after reload: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t);\n\t\t\treturn false;\n\t\t}\n\t}\n\n\tprivate showTrustSelector(): void {\n\t\tconst cwd = this.sessionManager.getCwd();\n\t\tconst trustStore = new ProjectTrustStore(this.runtimeHost.services.agentDir);\n\t\tconst savedDecision = trustStore.getEntry(cwd);\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new TrustSelectorComponent({\n\t\t\t\tcwd,\n\t\t\t\tsavedDecision,\n\t\t\t\tprojectTrusted: this.settingsManager.isProjectTrusted(),\n\t\t\t\tonSelect: (selection) => {\n\t\t\t\t\ttrustStore.setMany(selection.updates);\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.showStatus(\n\t\t\t\t\t\t`Saved trust decision: ${selection.trusted ? \"trusted\" : \"untrusted\"}. Restart ${APP_NAME} for this to take effect.`,\n\t\t\t\t\t);\n\t\t\t\t},\n\t\t\t\tonCancel: () => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t});\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate showModelSelector(initialSearchInput?: string): void {\n\t\tconst favoritePatternSnapshot = this.captureFavoritePatternSnapshot();\n\t\tthis.showSelector((done) => {\n\t\t\tconst favoriteModelIds = this.session.favoriteModels.map((favorite) => getModelFullId(favorite.model));\n\t\t\tconst selector = new ModelSelectorComponent(\n\t\t\t\tthis.ui,\n\t\t\t\tthis.session.model,\n\t\t\t\tthis.settingsManager,\n\t\t\t\tthis.session.modelRuntime,\n\t\t\t\tthis.session.scopedModels,\n\t\t\t\t(model) => {\n\t\t\t\t\tvoid this.selectModelFromUi(model, done);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t\tinitialSearchInput,\n\t\t\t\t{\n\t\t\t\t\tfavoriteModelIds,\n\t\t\t\t\tonFavoriteChange: async (favoriteIds, allModels) => {\n\t\t\t\t\t\tawait this.applyFavoriteSelection(favoriteIds, allModels, true, await favoritePatternSnapshot);\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tcomponent: selector,\n\t\t\t\tfocus: selector,\n\t\t\t\tdispose: () => selector.dispose(),\n\t\t\t};\n\t\t});\n\t}\n\n\tprivate async showFavoriteModelsSelector(): Promise<void> {\n\t\tconst allModels = [...this.session.modelRuntime.getAvailableSnapshot()];\n\n\t\tif (allModels.length === 0) {\n\t\t\tthis.showStatus(\"No models available\");\n\t\t\treturn;\n\t\t}\n\t\tconst currentFavoriteIds = await this.getFavoriteModelIdsForUi(allModels);\n\t\tconst favoritePatternSnapshot = await this.captureFavoritePatternSnapshot();\n\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new FavoriteModelsSelectorComponent(\n\t\t\t\t{\n\t\t\t\t\tallModels,\n\t\t\t\t\tfavoriteModelIds: currentFavoriteIds,\n\t\t\t\t\tcurrentModel: this.session.model,\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tonChange: async (favoriteIds) => {\n\t\t\t\t\t\tawait this.applyFavoriteSelection(favoriteIds, allModels, false, favoritePatternSnapshot);\n\t\t\t\t\t},\n\t\t\t\t\tonPersist: (favoriteIds) => {\n\t\t\t\t\t\tvoid this.applyFavoriteSelection(favoriteIds, allModels, true, favoritePatternSnapshot).then(() => {\n\t\t\t\t\t\t\tthis.showStatus(\"Favorite models saved to settings\");\n\t\t\t\t\t\t});\n\t\t\t\t\t},\n\t\t\t\t\tonSelect: (model) => {\n\t\t\t\t\t\tvoid this.selectModelFromUi(model, done);\n\t\t\t\t\t},\n\t\t\t\t\tonCancel: () => {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate showScopedModelsSelector(): void {\n\t\tlet availableModels = [...this.session.modelRuntime.getAvailableSnapshot()];\n\t\tlet availableModelIds = new Set(availableModels.map((model) => `${model.provider}/${model.id}`));\n\t\tconst configuredPatterns = this.settingsManager.getEnabledModels();\n\t\tconst sessionScopedModels = this.session.scopedModels;\n\t\tconst configuredEnabledIds = (models: readonly Model<any>[]): string[] | null => {\n\t\t\tif (!configuredPatterns?.length) return null;\n\t\t\tconst resolved = resolveModelScopeFromModels(configuredPatterns, models);\n\t\t\tconst ids = resolved.scopedModels.map((scoped) => `${scoped.model.provider}/${scoped.model.id}`);\n\t\t\tfor (const diagnostic of resolved.diagnostics) {\n\t\t\t\tif (diagnostic.code === \"no-match\" && !ids.includes(diagnostic.pattern)) ids.push(diagnostic.pattern);\n\t\t\t}\n\t\t\treturn ids;\n\t\t};\n\n\t\tlet currentEnabledIds =\n\t\t\tsessionScopedModels.length > 0\n\t\t\t\t? sessionScopedModels.map((scoped) => `${scoped.model.provider}/${scoped.model.id}`)\n\t\t\t\t: configuredEnabledIds(availableModels);\n\t\tlet selectionChanged = false;\n\n\t\tconst updateSessionModels = (enabledIds: string[] | null): void => {\n\t\t\tcurrentEnabledIds = enabledIds === null ? null : [...enabledIds];\n\t\t\tconst hasEnabledAvailableModel = enabledIds?.some((id) => availableModelIds.has(id)) ?? false;\n\t\t\tconst allAvailableModelsEnabled =\n\t\t\t\tenabledIds !== null && [...availableModelIds].every((id) => enabledIds.includes(id));\n\t\t\tif (enabledIds && hasEnabledAvailableModel && !allAvailableModelsEnabled) {\n\t\t\t\tconst newScopedModels = resolveModelScopeFromModels(enabledIds, availableModels).scopedModels;\n\t\t\t\tthis.session.setScopedModels(\n\t\t\t\t\tnewScopedModels.map((scoped) => ({\n\t\t\t\t\t\tmodel: scoped.model,\n\t\t\t\t\t\tthinkingLevel: scoped.thinkingLevel,\n\t\t\t\t\t})),\n\t\t\t\t);\n\t\t\t} else {\n\t\t\t\tthis.session.setScopedModels([]);\n\t\t\t}\n\t\t\tthis.updateAvailableProviderCount();\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\tthis.showSelector((done) => {\n\t\t\tlet disposed = false;\n\t\t\tlet timedOut = false;\n\t\t\tconst controller = new AbortController();\n\t\t\tconst timeout = setTimeout(() => {\n\t\t\t\ttimedOut = true;\n\t\t\t\tcontroller.abort();\n\t\t\t}, 15_000);\n\t\t\tconst selector = new ScopedModelsSelectorComponent(\n\t\t\t\t{\n\t\t\t\t\tallModels: availableModels,\n\t\t\t\t\tenabledModelIds: currentEnabledIds,\n\t\t\t\t\trefreshStatus: \"Refreshing model catalogs…\",\n\t\t\t\t},\n\t\t\t\t{\n\t\t\t\t\tonChange: (enabledIds) => {\n\t\t\t\t\t\tselectionChanged = true;\n\t\t\t\t\t\tupdateSessionModels(enabledIds);\n\t\t\t\t\t},\n\t\t\t\t\tonPersist: (enabledIds) => {\n\t\t\t\t\t\tconst allEnabled =\n\t\t\t\t\t\t\tenabledIds !== null &&\n\t\t\t\t\t\t\tenabledIds.length === availableModels.length &&\n\t\t\t\t\t\t\tenabledIds.every((id) => availableModelIds.has(id));\n\t\t\t\t\t\tconst newPatterns = enabledIds === null || allEnabled ? undefined : enabledIds;\n\t\t\t\t\t\tthis.settingsManager.setEnabledModels(newPatterns ? [...newPatterns] : undefined);\n\t\t\t\t\t\tthis.showStatus(\"Model selection saved to settings\");\n\t\t\t\t\t},\n\t\t\t\t\tonCancel: () => {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t);\n\t\t\tvoid refreshModelCatalogs(this.session.modelRuntime, controller.signal)\n\t\t\t\t.then((result) => {\n\t\t\t\t\tif (disposed) return;\n\t\t\t\t\tavailableModels = [...this.session.modelRuntime.getAvailableSnapshot()];\n\t\t\t\t\tavailableModelIds = new Set(availableModels.map((model) => `${model.provider}/${model.id}`));\n\t\t\t\t\tif (!selectionChanged && sessionScopedModels.length === 0) {\n\t\t\t\t\t\tcurrentEnabledIds = configuredEnabledIds(availableModels);\n\t\t\t\t\t\tselector.updateModels(availableModels, currentEnabledIds);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselector.updateModels(availableModels);\n\t\t\t\t\t}\n\t\t\t\t\tif (currentEnabledIds !== null) updateSessionModels(currentEnabledIds);\n\t\t\t\t\tif (result.aborted && timedOut) {\n\t\t\t\t\t\tselector.setRefreshStatus(\"Model refresh timed out; showing cached models.\", \"warning\");\n\t\t\t\t\t} else if (result.errors.size > 0) {\n\t\t\t\t\t\tselector.setRefreshStatus(\n\t\t\t\t\t\t\t`Could not refresh ${[...result.errors.keys()].join(\", \")}; showing cached models.`,\n\t\t\t\t\t\t\t\"warning\",\n\t\t\t\t\t\t);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tselector.setRefreshStatus(\"Model catalogs refreshed.\", \"success\");\n\t\t\t\t\t}\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t})\n\t\t\t\t.catch((error: unknown) => {\n\t\t\t\t\tif (disposed) return;\n\t\t\t\t\tselector.setRefreshStatus(\n\t\t\t\t\t\ttimedOut\n\t\t\t\t\t\t\t? \"Model refresh timed out; showing cached models.\"\n\t\t\t\t\t\t\t: `Could not refresh model catalogs: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t\t\t\"warning\",\n\t\t\t\t\t);\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t})\n\t\t\t\t.finally(() => clearTimeout(timeout));\n\t\t\treturn {\n\t\t\t\tcomponent: selector,\n\t\t\t\tfocus: selector,\n\t\t\t\tdispose: () => {\n\t\t\t\t\tdisposed = true;\n\t\t\t\t\tclearTimeout(timeout);\n\t\t\t\t\tcontroller.abort();\n\t\t\t\t},\n\t\t\t};\n\t\t});\n\t}\n\n\tprivate showUserMessageSelector(): void {\n\t\tconst userMessages = this.session.getUserMessagesForForking();\n\n\t\tif (userMessages.length === 0) {\n\t\t\tthis.showStatus(\"No messages to fork from\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst initialSelectedId = userMessages[userMessages.length - 1]?.entryId;\n\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new UserMessageSelectorComponent(\n\t\t\t\tuserMessages.map((m) => ({ id: m.entryId, text: m.text })),\n\t\t\t\tasync (entryId) => {\n\t\t\t\t\tdone();\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = await this.runtimeHost.fork(entryId);\n\t\t\t\t\t\tif (result.cancelled) {\n\t\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tthis.editor.setText(result.selectedText ?? \"\");\n\t\t\t\t\t\tthis.showStatus(\"Forked to new session\");\n\t\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t\tinitialSelectedId,\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector.getMessageList() };\n\t\t});\n\t}\n\n\tprivate async handleCloneCommand(): Promise<void> {\n\t\tconst leafId = this.sessionManager.getLeafId();\n\t\tif (!leafId) {\n\t\t\tthis.showStatus(\"Nothing to clone yet\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tconst result = await this.runtimeHost.fork(leafId, { position: \"at\" });\n\t\t\tif (result.cancelled) {\n\t\t\t\tthis.ui.requestRender();\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tthis.editor.setText(\"\");\n\t\t\tthis.showStatus(\"Cloned to new session\");\n\t\t} catch (error: unknown) {\n\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\tprivate showTreeSelector(initialSelectedId?: string): void {\n\t\tconst tree = this.sessionManager.getTree();\n\t\tconst realLeafId = this.sessionManager.getLeafId();\n\t\tconst initialFilterMode = this.settingsManager.getTreeFilterMode();\n\n\t\tif (tree.length === 0) {\n\t\t\tthis.showStatus(\"No entries in session\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new TreeSelectorComponent(\n\t\t\t\ttree,\n\t\t\t\trealLeafId,\n\t\t\t\tthis.ui.terminal.rows,\n\t\t\t\tasync (entryId) => {\n\t\t\t\t\t// Selecting the current leaf is a no-op (already there)\n\t\t\t\t\tif (entryId === this.sessionManager.getLeafId()) {\n\t\t\t\t\t\tdone();\n\t\t\t\t\t\tthis.showStatus(\"Already at this point\");\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Ask about summarization\n\t\t\t\t\tdone(); // Close selector first\n\n\t\t\t\t\t// Loop until user makes a complete choice or cancels to tree\n\t\t\t\t\tlet wantsSummary = false;\n\t\t\t\t\tlet customInstructions: string | undefined;\n\n\t\t\t\t\t// Check if we should skip the prompt (user preference to always default to no summary)\n\t\t\t\t\tif (!this.settingsManager.getBranchSummarySkipPrompt()) {\n\t\t\t\t\t\twhile (true) {\n\t\t\t\t\t\t\tconst summaryChoice = await this.showExtensionSelector(\"Summarize branch?\", [\n\t\t\t\t\t\t\t\t\"No summary\",\n\t\t\t\t\t\t\t\t\"Summarize\",\n\t\t\t\t\t\t\t\t\"Summarize with custom prompt\",\n\t\t\t\t\t\t\t]);\n\n\t\t\t\t\t\t\tif (summaryChoice === undefined) {\n\t\t\t\t\t\t\t\t// User pressed escape - re-show tree selector with same selection\n\t\t\t\t\t\t\t\tthis.showTreeSelector(entryId);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\twantsSummary = summaryChoice !== \"No summary\";\n\n\t\t\t\t\t\t\tif (summaryChoice === \"Summarize with custom prompt\") {\n\t\t\t\t\t\t\t\tcustomInstructions = await this.showExtensionEditor(\"Custom summarization instructions\");\n\t\t\t\t\t\t\t\tif (customInstructions === undefined) {\n\t\t\t\t\t\t\t\t\t// User cancelled - loop back to summary selector\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// User made a complete choice\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// The user committed to navigating: stop the active response first.\n\t\t\t\t\tif (this.session.isStreaming) {\n\t\t\t\t\t\tthis.restoreQueuedMessagesToEditor();\n\t\t\t\t\t\tawait this.session.abort();\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set up escape handler and status indicator if summarizing\n\t\t\t\t\tlet showingSummaryIndicator = false;\n\t\t\t\t\tconst originalOnEscape = this.defaultEditor.onEscape;\n\n\t\t\t\t\tif (wantsSummary) {\n\t\t\t\t\t\tthis.defaultEditor.onEscape = () => {\n\t\t\t\t\t\t\tthis.session.abortBranchSummary();\n\t\t\t\t\t\t};\n\t\t\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\t\t\tthis.showStatusIndicator(new BranchSummaryStatusIndicator(this.ui));\n\t\t\t\t\t\tshowingSummaryIndicator = true;\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tconst result = await this.session.navigateTree(entryId, {\n\t\t\t\t\t\t\tsummarize: wantsSummary,\n\t\t\t\t\t\t\tcustomInstructions,\n\t\t\t\t\t\t});\n\n\t\t\t\t\t\tif (result.aborted) {\n\t\t\t\t\t\t\t// Summarization aborted - re-show tree selector with same selection\n\t\t\t\t\t\t\tthis.showStatus(\"Branch summarization cancelled\");\n\t\t\t\t\t\t\tthis.showTreeSelector(entryId);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (result.cancelled) {\n\t\t\t\t\t\t\tthis.showStatus(\"Navigation cancelled\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Update UI\n\t\t\t\t\t\tthis.chatContainer.clear();\n\t\t\t\t\t\tthis.renderInitialMessages();\n\t\t\t\t\t\tif (result.editorText && !this.editor.getText().trim()) {\n\t\t\t\t\t\t\tthis.editor.setText(result.editorText);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.showStatus(\"Navigated to selected point\");\n\t\t\t\t\t\tvoid this.flushCompactionQueue({ willRetry: false });\n\t\t\t\t\t} catch (error) {\n\t\t\t\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t\t\t\t} finally {\n\t\t\t\t\t\tif (showingSummaryIndicator) {\n\t\t\t\t\t\t\tthis.clearStatusIndicator(\"branchSummary\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tthis.defaultEditor.onEscape = originalOnEscape;\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t\t(entryId, label) => {\n\t\t\t\t\tthis.sessionManager.appendLabelChange(entryId, label);\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t\tinitialSelectedId,\n\t\t\t\tinitialFilterMode,\n\t\t\t);\n\t\t\tselector.onCopy = async (text) => {\n\t\t\t\tif (!text) {\n\t\t\t\t\tthis.showError(\"Selected entry has no text to copy\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tawait copyToClipboard(text);\n\t\t\t\t\tthis.showStatus(\"Copied selected message to clipboard\");\n\t\t\t\t} catch (error) {\n\t\t\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate showSessionSelector(): void {\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new SessionSelectorComponent(\n\t\t\t\t(onProgress) =>\n\t\t\t\t\tSessionManager.list(this.sessionManager.getCwd(), this.sessionManager.getSessionDir(), onProgress),\n\t\t\t\t(onProgress) =>\n\t\t\t\t\tthis.sessionManager.usesDefaultSessionDir()\n\t\t\t\t\t\t? SessionManager.listAll(onProgress)\n\t\t\t\t\t\t: SessionManager.listAll(this.sessionManager.getSessionDir(), onProgress),\n\t\t\t\tasync (sessionPath) => {\n\t\t\t\t\tdone();\n\t\t\t\t\tawait this.handleResumeSession(sessionPath);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tvoid this.shutdown();\n\t\t\t\t},\n\t\t\t\t() => this.ui.requestRender(),\n\t\t\t\t{\n\t\t\t\t\trenameSession: async (sessionFilePath: string, nextName: string | undefined) => {\n\t\t\t\t\t\tconst next = (nextName ?? \"\").trim();\n\t\t\t\t\t\tif (!next) return;\n\t\t\t\t\t\tconst mgr = SessionManager.open(sessionFilePath);\n\t\t\t\t\t\tmgr.appendSessionInfo(next);\n\t\t\t\t\t},\n\t\t\t\t\tshowRenameHint: true,\n\t\t\t\t\tkeybindings: this.keybindings,\n\t\t\t\t},\n\n\t\t\t\tthis.sessionManager.getSessionFile(),\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate async handleResumeSession(\n\t\tsessionPath: string,\n\t\toptions?: Parameters<ExtensionCommandContext[\"switchSession\"]>[1],\n\t): Promise<{ cancelled: boolean }> {\n\t\tthis.clearStatusIndicator();\n\t\ttry {\n\t\t\tconst result = await this.runtimeHost.switchSession(sessionPath, {\n\t\t\t\twithSession: options?.withSession,\n\t\t\t\tprojectTrustContextFactory: (cwd) => this.createProjectTrustContext(cwd),\n\t\t\t});\n\t\t\tif (result.cancelled) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\tthis.showStatus(\"Resumed session\");\n\t\t\treturn result;\n\t\t} catch (error: unknown) {\n\t\t\tif (error instanceof MissingSessionCwdError) {\n\t\t\t\tconst selectedCwd = await this.promptForMissingSessionCwd(error);\n\t\t\t\tif (!selectedCwd) {\n\t\t\t\t\tthis.showStatus(\"Resume cancelled\");\n\t\t\t\t\treturn { cancelled: true };\n\t\t\t\t}\n\t\t\t\tconst result = await this.runtimeHost.switchSession(sessionPath, {\n\t\t\t\t\tcwdOverride: selectedCwd,\n\t\t\t\t\twithSession: options?.withSession,\n\t\t\t\t\tprojectTrustContextFactory: (cwd) => this.createProjectTrustContext(cwd),\n\t\t\t\t});\n\t\t\t\tif (result.cancelled) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\t\t\t\tthis.showStatus(\"Resumed session in current cwd\");\n\t\t\t\treturn result;\n\t\t\t}\n\t\t\treturn this.handleFatalRuntimeError(\"Failed to resume session\", error);\n\t\t}\n\t}\n\n\tprivate getLoginProviderOptions(authType?: \"oauth\" | \"api_key\"): AuthSelectorProvider[] {\n\t\tconst options: AuthSelectorProvider[] = [];\n\t\tfor (const provider of this.session.modelRuntime.getProviders()) {\n\t\t\tconst authStatus = this.session.modelRuntime.getProviderAuthStatus(provider.id);\n\t\t\tconst status = authStatus.configured\n\t\t\t\t? {\n\t\t\t\t\t\ttype: this.session.modelRuntime.isUsingOAuth(provider.id) ? (\"oauth\" as const) : (\"api_key\" as const),\n\t\t\t\t\t\tsource: authStatus.label ?? authStatus.source,\n\t\t\t\t\t}\n\t\t\t\t: undefined;\n\t\t\tif ((!authType || authType === \"oauth\") && provider.auth.oauth) {\n\t\t\t\toptions.push({\n\t\t\t\t\tid: provider.id,\n\t\t\t\t\tname: provider.name,\n\t\t\t\t\tauthType: \"oauth\",\n\t\t\t\t\tmethod: provider.auth.oauth,\n\t\t\t\t\tstatus,\n\t\t\t\t});\n\t\t\t}\n\t\t\tif ((!authType || authType === \"api_key\") && provider.auth.apiKey) {\n\t\t\t\toptions.push({\n\t\t\t\t\tid: provider.id,\n\t\t\t\t\tname: provider.name,\n\t\t\t\t\tauthType: \"api_key\",\n\t\t\t\t\tmethod: provider.auth.apiKey,\n\t\t\t\t\tstatus,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn options.sort((a, b) => a.name.localeCompare(b.name));\n\t}\n\n\tprivate async getLogoutProviderOptions(): Promise<AuthSelectorProvider[]> {\n\t\treturn (\n\t\t\tawait this.session.modelRuntime.listCredentials({\n\t\t\t\tsignal: AbortSignal.timeout(15_000),\n\t\t\t})\n\t\t)\n\t\t\t.map(({ providerId, type }) => ({\n\t\t\t\tid: providerId,\n\t\t\t\tname: this.session.modelRuntime.getProvider(providerId)?.name ?? providerId,\n\t\t\t\tauthType: type,\n\t\t\t\tstatus: { type, source: \"stored credential\" },\n\t\t\t}))\n\t\t\t.sort((a, b) => a.name.localeCompare(b.name));\n\t}\n\n\tprivate findLoginProviderOptions(providerRef: string): AuthSelectorProvider[] {\n\t\tconst normalizedProviderRef = providerRef.trim().toLowerCase();\n\t\tif (!normalizedProviderRef) {\n\t\t\treturn [];\n\t\t}\n\n\t\treturn this.getLoginProviderOptions().filter(\n\t\t\t(provider) =>\n\t\t\t\tprovider.id.toLowerCase() === normalizedProviderRef ||\n\t\t\t\tprovider.name.toLowerCase() === normalizedProviderRef,\n\t\t);\n\t}\n\n\tprivate async handleLoginCommand(providerRef?: string): Promise<void> {\n\t\tif (!providerRef) {\n\t\t\tthis.showLoginAuthTypeSelector();\n\t\t\treturn;\n\t\t}\n\n\t\tconst providerOptions = this.findLoginProviderOptions(providerRef);\n\t\tif (providerOptions.length === 1) {\n\t\t\tawait this.startProviderLogin(providerOptions[0]!);\n\t\t\treturn;\n\t\t}\n\n\t\tif (providerOptions.length > 1) {\n\t\t\tconst providerIds = new Set(providerOptions.map((provider) => provider.id));\n\t\t\tif (providerIds.size === 1) {\n\t\t\t\tthis.showLoginAuthTypeSelector(providerOptions);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tthis.showLoginProviderSelector(undefined, providerRef);\n\t}\n\n\tprivate async startProviderLogin(providerOption: AuthSelectorProvider): Promise<void> {\n\t\tif (providerOption.authType === \"oauth\") {\n\t\t\tawait this.showLoginDialog(providerOption.id, providerOption.name);\n\t\t} else if (providerOption.method?.login) {\n\t\t\tawait this.showApiKeyLoginDialog(providerOption.id, providerOption.name);\n\t\t} else {\n\t\t\tthis.showAmbientAuthDialog(providerOption);\n\t\t}\n\t}\n\n\tprivate showLoginAuthTypeSelector(providerOptions?: AuthSelectorProvider[]): void {\n\t\tconst oauthProvider = providerOptions?.find((provider) => provider.authType === \"oauth\");\n\t\tconst oauthLoginLabel =\n\t\t\toauthProvider?.method && \"loginLabel\" in oauthProvider.method ? oauthProvider.method.loginLabel : undefined;\n\t\tconst subscriptionLabel = oauthLoginLabel ?? \"Sign in with an account\";\n\t\tconst apiKeyLabel = \"Sign in with an API key\";\n\t\tconst availableAuthTypes = providerOptions\n\t\t\t? new Set(providerOptions.map((provider) => provider.authType))\n\t\t\t: new Set<AuthSelectorProvider[\"authType\"]>([\"oauth\", \"api_key\"]);\n\t\tconst options: string[] = [];\n\t\tif (availableAuthTypes.has(\"oauth\")) {\n\t\t\toptions.push(subscriptionLabel);\n\t\t}\n\t\tif (availableAuthTypes.has(\"api_key\")) {\n\t\t\toptions.push(apiKeyLabel);\n\t\t}\n\n\t\tif (options.length === 0) {\n\t\t\tthis.showStatus(\"No login methods available.\");\n\t\t\treturn;\n\t\t}\n\n\t\tif (providerOptions && options.length === 1) {\n\t\t\tconst providerOption = providerOptions[0];\n\t\t\tif (providerOption) {\n\t\t\t\tvoid this.startProviderLogin(providerOption);\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tconst title = providerOptions?.[0]\n\t\t\t? `Select authentication method for ${providerOptions[0].name}:`\n\t\t\t: \"Select authentication method:\";\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new ExtensionSelectorComponent(\n\t\t\t\ttitle,\n\t\t\t\toptions,\n\t\t\t\t(option) => {\n\t\t\t\t\tdone();\n\t\t\t\t\tconst authType = option === subscriptionLabel ? \"oauth\" : \"api_key\";\n\t\t\t\t\tif (providerOptions) {\n\t\t\t\t\t\tconst providerOption = providerOptions.find((provider) => provider.authType === authType);\n\t\t\t\t\t\tif (providerOption) {\n\t\t\t\t\t\t\tvoid this.startProviderLogin(providerOption);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tthis.showLoginProviderSelector(authType);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate showLoginProviderSelector(authType?: AuthSelectorProvider[\"authType\"], initialSearchInput?: string): void {\n\t\tconst providerOptions = this.getLoginProviderOptions(authType);\n\t\tif (providerOptions.length === 0) {\n\t\t\tconst message =\n\t\t\t\tauthType === \"oauth\"\n\t\t\t\t\t? \"No subscription providers available.\"\n\t\t\t\t\t: authType === \"api_key\"\n\t\t\t\t\t\t? \"No API key providers available.\"\n\t\t\t\t\t\t: \"No login providers available.\";\n\t\t\tthis.showStatus(message);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new OAuthSelectorComponent(\n\t\t\t\t\"login\",\n\t\t\t\tproviderOptions,\n\t\t\t\tasync (providerId, selectedAuthType) => {\n\t\t\t\t\tdone();\n\n\t\t\t\t\tconst providerOption = providerOptions.find(\n\t\t\t\t\t\t(provider) => provider.id === providerId && provider.authType === selectedAuthType,\n\t\t\t\t\t);\n\t\t\t\t\tif (!providerOption) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tawait this.startProviderLogin(providerOption);\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tif (authType) {\n\t\t\t\t\t\tthis.showLoginAuthTypeSelector();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\tinitialSearchInput,\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate async showOAuthSelector(mode: \"login\" | \"logout\"): Promise<void> {\n\t\tif (mode === \"login\") {\n\t\t\tthis.showLoginAuthTypeSelector();\n\t\t\treturn;\n\t\t}\n\n\t\tlet providerOptions: AuthSelectorProvider[];\n\t\ttry {\n\t\t\tproviderOptions = await this.getLogoutProviderOptions();\n\t\t} catch (error) {\n\t\t\tthis.showError(`Could not read stored credentials: ${error instanceof Error ? error.message : String(error)}`);\n\t\t\treturn;\n\t\t}\n\t\tif (providerOptions.length === 0) {\n\t\t\tthis.showStatus(\n\t\t\t\t\"No stored credentials to remove. /logout only removes credentials saved by /login; environment variables and models.json config are unchanged.\",\n\t\t\t);\n\t\t\treturn;\n\t\t}\n\n\t\tthis.showSelector((done) => {\n\t\t\tconst selector = new OAuthSelectorComponent(\n\t\t\t\tmode,\n\t\t\t\tproviderOptions,\n\t\t\t\tasync (providerId: string) => {\n\t\t\t\t\tdone();\n\n\t\t\t\t\tconst providerOption = providerOptions.find((provider) => provider.id === providerId);\n\t\t\t\t\tif (!providerOption) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tawait this.session.modelRuntime.logout(providerOption.id, {\n\t\t\t\t\t\t\tsignal: AbortSignal.timeout(15_000),\n\t\t\t\t\t\t});\n\t\t\t\t\t\tthis.updateAvailableProviderCount();\n\t\t\t\t\t\tconst message =\n\t\t\t\t\t\t\tproviderOption.authType === \"oauth\"\n\t\t\t\t\t\t\t\t? `Logged out of ${providerOption.name}`\n\t\t\t\t\t\t\t\t: `Removed stored API key for ${providerOption.name}. Environment variables and models.json config are unchanged.`;\n\t\t\t\t\t\tthis.showStatus(message);\n\t\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\t\t\t\tthis.showError(\n\t\t\t\t\t\t\terror instanceof CredentialSynchronizationError\n\t\t\t\t\t\t\t\t? `Credentials removed for ${providerOption.name}, but local model state could not be synchronized: ${message}`\n\t\t\t\t\t\t\t\t: `Logout failed: ${message}`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\tdone();\n\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t},\n\t\t\t);\n\t\t\treturn { component: selector, focus: selector };\n\t\t});\n\t}\n\n\tprivate async completeProviderAuthentication(\n\t\tproviderId: string,\n\t\tproviderName: string,\n\t\tauthType: \"oauth\" | \"api_key\",\n\t\tpreviousModel: Model<any> | undefined,\n\t): Promise<void> {\n\t\tconst actionLabel = authType === \"oauth\" ? `Logged in to ${providerName}` : `Saved API key for ${providerName}`;\n\n\t\tlet selectedModel: Model<any> | undefined;\n\t\tlet systemPromptName: string | undefined;\n\t\tlet selectionError: string | undefined;\n\t\tif (isUnknownModel(previousModel)) {\n\t\t\tconst availableModels = this.session.modelRuntime.getAvailableSnapshot();\n\t\t\tconst providerModels = availableModels.filter((model) => model.provider === providerId);\n\t\t\t// Matches LLAMA_PROVIDER_ID from extensions/llama/provider.ts; kept inline to avoid coupling interactive mode to the built-in extension.\n\t\t\tif (providerId === \"llama.cpp\") {\n\t\t\t\tselectionError = llamaCppPostLoginGuidance(actionLabel, providerModels.length);\n\t\t\t} else if (!hasDefaultModelProvider(providerId)) {\n\t\t\t\tselectionError = `${actionLabel}, but no default model is configured for provider \"${providerId}\". Use /model to select a model.`;\n\t\t\t} else if (providerModels.length === 0) {\n\t\t\t\tselectionError = `${actionLabel}, but no models are available for that provider. Use /model to select a model.`;\n\t\t\t} else {\n\t\t\t\tconst defaultModelId = defaultModelPerProvider[providerId];\n\t\t\t\tselectedModel = providerModels.find((model) => model.id === defaultModelId);\n\t\t\t\tif (!selectedModel) {\n\t\t\t\t\tselectionError = `${actionLabel}, but its default model \"${defaultModelId}\" is not available. Use /model to select a model.`;\n\t\t\t\t} else {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tsystemPromptName = (await this.session.setModel(selectedModel))?.systemPromptName;\n\t\t\t\t\t} catch (error: unknown) {\n\t\t\t\t\t\tselectedModel = undefined;\n\t\t\t\t\t\tconst errorMessage = error instanceof Error ? error.message : String(error);\n\t\t\t\t\t\tselectionError = `${actionLabel}, but selecting its default model failed: ${errorMessage}. Use /model to select a model.`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.updateAvailableProviderCount();\n\t\tthis.footer.invalidate();\n\t\tthis.updateEditorBorderColor();\n\t\tif (selectedModel) {\n\t\t\tconst systemPromptStr = systemPromptName ? ` System prompt: ${systemPromptName}.` : \"\";\n\t\t\tthis.showStatus(\n\t\t\t\t`${actionLabel}. Selected ${selectedModel.id}.${systemPromptStr} Credentials saved to ${getAuthPath()}`,\n\t\t\t);\n\t\t\tthis.showRiskyMainModelWarning(selectedModel);\n\t\t\tvoid this.maybeWarnAboutAnthropicSubscriptionAuth(selectedModel);\n\t\t\tthis.checkDaxnutsEasterEgg(selectedModel);\n\t\t} else {\n\t\t\tthis.showStatus(`${actionLabel}. Credentials saved to ${getAuthPath()}`);\n\t\t\tif (selectionError) {\n\t\t\t\tthis.showError(selectionError);\n\t\t\t} else {\n\t\t\t\tvoid this.maybeWarnAboutAnthropicSubscriptionAuth();\n\t\t\t}\n\t\t}\n\n\t\tconst controller = new AbortController();\n\t\tconst timeout = setTimeout(() => controller.abort(), 15_000);\n\t\tconst refreshProviders = providerId === \"cursor\" ? [providerId, \"cursor-cli-oauth\"] : [providerId];\n\t\tvoid this.session.modelRuntime\n\t\t\t.refresh({\n\t\t\t\tallowNetwork: true,\n\t\t\t\tproviders: refreshProviders,\n\t\t\t\tsignal: controller.signal,\n\t\t\t})\n\t\t\t.then((result) => {\n\t\t\t\tif (result.aborted) {\n\t\t\t\t\tthis.showWarning(`${actionLabel}, but its model catalog refresh timed out; using cached models.`);\n\t\t\t\t} else if (result.errors.size > 0) {\n\t\t\t\t\tthis.showWarning(`${actionLabel}, but its model catalog could not be refreshed; using cached models.`);\n\t\t\t\t}\n\t\t\t\tthis.updateAvailableProviderCount();\n\t\t\t\tthis.footer.invalidate();\n\t\t\t\tthis.ui.requestRender();\n\t\t\t})\n\t\t\t.catch((error: unknown) => {\n\t\t\t\tthis.showWarning(\n\t\t\t\t\t`${actionLabel}, but its model catalog could not be refreshed: ${error instanceof Error ? error.message : String(error)}`,\n\t\t\t\t);\n\t\t\t})\n\t\t\t.finally(() => clearTimeout(timeout));\n\t}\n\n\tprivate showAmbientAuthDialog(providerOption: AuthSelectorProvider): void {\n\t\tconst restoreEditor = () => {\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\tconst dialog = new LoginDialogComponent(\n\t\t\tthis.ui,\n\t\t\tproviderOption.id,\n\t\t\t() => restoreEditor(),\n\t\t\tproviderOption.name,\n\t\t\t`${providerOption.name} setup`,\n\t\t);\n\t\tdialog.showInfo(\n\t\t\t`${providerOption.method?.name ?? \"Authentication\"} is configured outside ${APP_NAME}.`,\n\t\t\t[],\n\t\t\ttrue,\n\t\t);\n\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(dialog);\n\t\tthis.ui.setFocus(dialog);\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate async showApiKeyLoginDialog(providerId: string, providerName: string): Promise<void> {\n\t\tconst previousModel = this.session.model;\n\n\t\tconst dialog = new LoginDialogComponent(\n\t\t\tthis.ui,\n\t\t\tproviderId,\n\t\t\t(_success, _message) => {\n\t\t\t\t// Completion handled below\n\t\t\t},\n\t\t\tproviderName,\n\t\t);\n\n\t\tif (providerId === \"amazon-bedrock\") {\n\t\t\tdialog.showDetails([\n\t\t\t\ttheme.fg(\"text\", \"You can also use an AWS profile, IAM keys, or role-based credentials.\"),\n\t\t\t\ttheme.fg(\"muted\", \"See:\"),\n\t\t\t\ttheme.fg(\"accent\", ` ${path.join(getDocsPath(), \"providers.md\")}`),\n\t\t\t]);\n\t\t}\n\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(dialog);\n\t\tthis.ui.setFocus(dialog);\n\t\tthis.ui.requestRender();\n\n\t\tconst restoreEditor = () => {\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\ttry {\n\t\t\tawait this.loginProvider(dialog, providerId, \"api_key\");\n\t\t\trestoreEditor();\n\t\t\tawait this.completeProviderAuthentication(providerId, providerName, \"api_key\", previousModel);\n\t\t} catch (error: unknown) {\n\t\t\trestoreEditor();\n\t\t\tconst errorMsg = error instanceof Error ? error.message : String(error);\n\t\t\tif (error instanceof CredentialSynchronizationError) {\n\t\t\t\tthis.showError(\n\t\t\t\t\t`Saved API key for ${providerName}, but local model state could not be synchronized: ${errorMsg}`,\n\t\t\t\t);\n\t\t\t} else if (errorMsg !== \"Login cancelled\") {\n\t\t\t\tthis.showError(`Failed to save API key for ${providerName}: ${errorMsg}`);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate showAuthSelect(\n\t\tdialog: LoginDialogComponent,\n\t\tprompt: Extract<AuthPrompt, { type: \"select\" }>,\n\t): Promise<string> {\n\t\treturn new Promise((resolve, reject) => {\n\t\t\tconst restoreDialog = () => {\n\t\t\t\tthis.editorContainer.clear();\n\t\t\t\tthis.editorContainer.addChild(dialog);\n\t\t\t\tthis.ui.setFocus(dialog);\n\t\t\t\tthis.ui.requestRender();\n\t\t\t};\n\t\t\tconst labels = prompt.options.map((option) => option.label);\n\t\t\tconst selector = new ExtensionSelectorComponent(\n\t\t\t\tprompt.message,\n\t\t\t\tlabels,\n\t\t\t\t(optionLabel) => {\n\t\t\t\t\trestoreDialog();\n\t\t\t\t\tconst id = prompt.options.find((option) => option.label === optionLabel)?.id;\n\t\t\t\t\tif (id) resolve(id);\n\t\t\t\t\telse reject(new Error(\"Login cancelled\"));\n\t\t\t\t},\n\t\t\t\t() => {\n\t\t\t\t\trestoreDialog();\n\t\t\t\t\treject(new Error(\"Login cancelled\"));\n\t\t\t\t},\n\t\t\t);\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(selector);\n\t\t\tthis.ui.setFocus(selector);\n\t\t\tthis.ui.requestRender();\n\t\t});\n\t}\n\n\tprivate async showAuthPrompt(dialog: LoginDialogComponent, prompt: AuthPrompt): Promise<string> {\n\t\tlet response: Promise<string>;\n\t\tif (prompt.type === \"select\") {\n\t\t\tresponse = this.showAuthSelect(dialog, prompt);\n\t\t} else if (prompt.type === \"manual_code\") {\n\t\t\tresponse = dialog.showManualInput(prompt.message);\n\t\t} else {\n\t\t\tresponse = dialog.showPrompt(prompt.message, prompt.placeholder);\n\t\t}\n\t\tif (!prompt.signal) return response;\n\t\tif (prompt.signal.aborted) throw new Error(\"Login cancelled\");\n\t\tconst signal = prompt.signal;\n\t\tlet onAbort: (() => void) | undefined;\n\t\tconst aborted = new Promise<string>((_resolve, reject) => {\n\t\t\tonAbort = () => reject(new Error(\"Login cancelled\"));\n\t\t\tsignal.addEventListener(\"abort\", onAbort, { once: true });\n\t\t});\n\t\ttry {\n\t\t\treturn await Promise.race([response, aborted]);\n\t\t} finally {\n\t\t\tif (onAbort) signal.removeEventListener(\"abort\", onAbort);\n\t\t}\n\t}\n\n\tprivate notifyAuthDialog(dialog: LoginDialogComponent, event: AuthEvent): void {\n\t\tif (event.type === \"auth_url\") {\n\t\t\tdialog.showAuth(event.url, event.instructions);\n\t\t} else if (event.type === \"device_code\") {\n\t\t\tdialog.showDeviceCode(event);\n\t\t\tdialog.showWaiting(\"Waiting for authentication...\");\n\t\t} else if (event.type === \"info\") {\n\t\t\tdialog.showInfo(event.message, event.links);\n\t\t} else {\n\t\t\tdialog.showProgress(event.message);\n\t\t}\n\t}\n\n\tprivate async loginProvider(\n\t\tdialog: LoginDialogComponent,\n\t\tproviderId: string,\n\t\tmethod: \"api_key\" | \"oauth\",\n\t): Promise<void> {\n\t\tawait this.session.modelRuntime.login(providerId, method, {\n\t\t\tsignal: dialog.signal,\n\t\t\tprompt: (prompt) => this.showAuthPrompt(dialog, prompt),\n\t\t\tnotify: (event) => this.notifyAuthDialog(dialog, event),\n\t\t});\n\t}\n\n\tprivate async showLoginDialog(providerId: string, providerName: string): Promise<void> {\n\t\tconst previousModel = this.session.model;\n\t\tconst dialog = new LoginDialogComponent(this.ui, providerId, (_success, _message) => {}, providerName);\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(dialog);\n\t\tthis.ui.setFocus(dialog);\n\t\tthis.ui.requestRender();\n\n\t\tconst restoreEditor = () => {\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\ttry {\n\t\t\tawait this.loginProvider(dialog, providerId, \"oauth\");\n\t\t\trestoreEditor();\n\t\t\tawait this.completeProviderAuthentication(providerId, providerName, \"oauth\", previousModel);\n\t\t} catch (error: unknown) {\n\t\t\trestoreEditor();\n\t\t\tconst errorMsg = error instanceof Error ? error.message : String(error);\n\t\t\tif (error instanceof CredentialSynchronizationError) {\n\t\t\t\tthis.showError(\n\t\t\t\t\t`Logged in to ${providerName}, but local model state could not be synchronized: ${errorMsg}`,\n\t\t\t\t);\n\t\t\t} else if (errorMsg !== \"Login cancelled\") {\n\t\t\t\tthis.showError(`Failed to login to ${providerName}: ${errorMsg}`);\n\t\t\t}\n\t\t}\n\t}\n\n\t// =========================================================================\n\t// Command handlers\n\t// =========================================================================\n\n\tprivate async handleReloadCommand(): Promise<void> {\n\t\tif (this.session.isStreaming) {\n\t\t\tthis.showWarning(\"Wait for the current response to finish before reloading.\");\n\t\t\treturn;\n\t\t}\n\t\tif (this.session.isCompacting) {\n\t\t\tthis.showWarning(\"Wait for compaction to finish before reloading.\");\n\t\t\treturn;\n\t\t}\n\t\t// Pre-check the extension veto (session_before_reload) so a blocked reload\n\t\t// warns without flashing the reload box or stealing editor focus. reload()\n\t\t// re-checks internally, so the race window below is still covered.\n\t\tconst veto = await this.session.checkReloadVeto();\n\t\tif (veto.cancelled) {\n\t\t\tthis.showWarning(veto.reason ?? \"Reload blocked by an extension.\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.resetExtensionUI();\n\n\t\tconst reloadBox = new Container();\n\t\tconst borderColor = (s: string) => theme.fg(\"border\", s);\n\t\treloadBox.addChild(new DynamicBorder(borderColor));\n\t\treloadBox.addChild(new Spacer(1));\n\t\treloadBox.addChild(\n\t\t\tnew Text(\n\t\t\t\ttheme.fg(\"muted\", \"Reloading keybindings, extensions, skills, prompts, themes, and context files...\"),\n\t\t\t\t1,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t\treloadBox.addChild(new Spacer(1));\n\t\treloadBox.addChild(new DynamicBorder(borderColor));\n\n\t\tconst previousEditor = this.editor;\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(reloadBox);\n\t\tthis.ui.setFocus(reloadBox);\n\t\tthis.ui.requestRender(true);\n\t\tawait new Promise((resolve) => process.nextTick(resolve));\n\n\t\tconst dismissReloadBox = (editor: Component) => {\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(editor);\n\t\t\tthis.ui.setFocus(editor);\n\t\t\tthis.ui.requestRender();\n\t\t};\n\n\t\tlet chatRestoredBeforeSessionStart = false;\n\t\tlet reloadBoxDismissed = false;\n\t\tconst restoreChatBeforeSessionStart = () => {\n\t\t\tif (chatRestoredBeforeSessionStart) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.hideThinkingBlock = this.settingsManager.getHideThinkingBlock();\n\t\t\tthis.outputPad = this.settingsManager.getOutputPad();\n\t\t\tthis.rebuildChatFromMessages();\n\t\t\ttime(\"chatRebuild\", \"reload\");\n\t\t\tchatRestoredBeforeSessionStart = true;\n\t\t};\n\n\t\ttry {\n\t\t\tconst reloadResult = await this.session.reload({\n\t\t\t\tbeforeSessionStart: restoreChatBeforeSessionStart,\n\t\t\t});\n\t\t\tif (reloadResult.cancelled) {\n\t\t\t\tdismissReloadBox(previousEditor as Component);\n\t\t\t\treloadBoxDismissed = true;\n\t\t\t\tthis.showWarning(reloadResult.reason ?? \"Reload blocked by an extension.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\trestoreChatBeforeSessionStart();\n\t\t\tthis.keybindings.reload();\n\t\t\tconst activeHeader = this.customHeader ?? this.builtInHeader;\n\t\t\tif (isExpandable(activeHeader)) {\n\t\t\t\tactiveHeader.setExpanded(this.toolOutputExpanded);\n\t\t\t}\n\t\t\tsetRegisteredThemes(this.session.resourceLoader.getThemes().themes);\n\t\t\tawait this.themeController.applyFromSettings();\n\t\t\tthis.applyRuntimeSettings();\n\t\t\tthis.setupAutocompleteProvider();\n\t\t\tconst runner = this.session.extensionRunner;\n\t\t\tthis.setupExtensionShortcuts(runner);\n\t\t\tthis.showLoadedResources({\n\t\t\t\tforce: false,\n\t\t\t\tshowDiagnosticsWhenQuiet: true,\n\t\t\t});\n\t\t\tconst savedImplicitProjectTrust = this.maybeSaveImplicitProjectTrustAfterReload();\n\t\t\tconst modelsJsonError = this.session.modelRuntime.getError();\n\t\t\tif (modelsJsonError) {\n\t\t\t\tthis.showError(`models.json error: ${modelsJsonError}`);\n\t\t\t}\n\t\t\tconst reloadedMessage = savedImplicitProjectTrust\n\t\t\t\t? \"Reloaded keybindings, extensions, skills, prompts, themes, and context files; saved project trust\"\n\t\t\t\t: \"Reloaded keybindings, extensions, skills, prompts, themes, and context files\";\n\t\t\tconst reloadTimings = formatTimings(\"reload\");\n\t\t\tthis.showStatus(\n\t\t\t\treloadTimings === undefined ? reloadedMessage : `${reloadedMessage} | reload timings: ${reloadTimings}`,\n\t\t\t);\n\t\t\tdismissReloadBox(this.editor as Component);\n\t\t\treloadBoxDismissed = true;\n\t\t} catch (error) {\n\t\t\tif (!reloadBoxDismissed) {\n\t\t\t\tdismissReloadBox(previousEditor as Component);\n\t\t\t}\n\t\t\tthis.showError(`Reload failed: ${error instanceof Error ? error.message : String(error)}`);\n\t\t}\n\t}\n\n\tprivate async handleExportCommand(text: string): Promise<void> {\n\t\tconst outputPath = this.getPathCommandArgument(text, \"/export\");\n\n\t\ttry {\n\t\t\tif (outputPath?.endsWith(\".jsonl\")) {\n\t\t\t\tconst filePath = this.session.exportToJsonl(outputPath);\n\t\t\t\tthis.showStatus(`Session exported to: ${filePath}`);\n\t\t\t} else {\n\t\t\t\tconst filePath = await this.session.exportToHtml(outputPath, {\n\t\t\t\t\tthemeName: theme.name,\n\t\t\t\t});\n\t\t\t\tthis.showStatus(`Session exported to: ${filePath}`);\n\t\t\t}\n\t\t} catch (error: unknown) {\n\t\t\tthis.showError(`Failed to export session: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t}\n\t}\n\n\tprivate getPathCommandArgument(text: string, command: \"/export\" | \"/import\"): string | undefined {\n\t\tif (text === command) {\n\t\t\treturn undefined;\n\t\t}\n\t\tif (!text.startsWith(`${command} `)) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst argsString = text.slice(command.length + 1).trimStart();\n\t\tif (!argsString) {\n\t\t\treturn undefined;\n\t\t}\n\n\t\tconst firstChar = argsString[0];\n\t\tif (firstChar === '\"' || firstChar === \"'\") {\n\t\t\tconst closingQuoteIndex = argsString.indexOf(firstChar, 1);\n\t\t\tif (closingQuoteIndex < 0) {\n\t\t\t\treturn undefined;\n\t\t\t}\n\t\t\treturn expandTildePath(argsString.slice(1, closingQuoteIndex));\n\t\t}\n\n\t\tconst firstWhitespaceIndex = argsString.search(/\\s/);\n\t\tif (firstWhitespaceIndex < 0) {\n\t\t\treturn expandTildePath(argsString);\n\t\t}\n\t\treturn expandTildePath(argsString.slice(0, firstWhitespaceIndex));\n\t}\n\n\tprivate async handleImportCommand(text: string): Promise<void> {\n\t\tconst inputPath = this.getPathCommandArgument(text, \"/import\");\n\t\tif (!inputPath) {\n\t\t\tthis.showError(\"Usage: /import <path.jsonl>\");\n\t\t\treturn;\n\t\t}\n\n\t\tconst confirmed = await this.showExtensionConfirm(\"Import session\", `Replace current session with ${inputPath}?`);\n\t\tif (!confirmed) {\n\t\t\tthis.showStatus(\"Import cancelled\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tthis.clearStatusIndicator();\n\t\t\tconst result = await this.runtimeHost.importFromJsonl(inputPath);\n\t\t\tif (result.cancelled) {\n\t\t\t\tthis.showStatus(\"Import cancelled\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.showStatus(`Session imported from: ${inputPath}`);\n\t\t} catch (error: unknown) {\n\t\t\tif (error instanceof MissingSessionCwdError) {\n\t\t\t\tconst selectedCwd = await this.promptForMissingSessionCwd(error);\n\t\t\t\tif (!selectedCwd) {\n\t\t\t\t\tthis.showStatus(\"Import cancelled\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst result = await this.runtimeHost.importFromJsonl(inputPath, selectedCwd);\n\t\t\t\tif (result.cancelled) {\n\t\t\t\t\tthis.showStatus(\"Import cancelled\");\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tthis.showStatus(`Session imported from: ${inputPath}`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif (error instanceof SessionImportFileNotFoundError) {\n\t\t\t\tthis.showError(`Failed to import session: ${error.message}`);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tawait this.handleFatalRuntimeError(\"Failed to import session\", error);\n\t\t}\n\t}\n\n\tprivate async handleShareCommand(): Promise<void> {\n\t\t// Check if gh is available and logged in\n\t\ttry {\n\t\t\tconst authResult = spawnSync(\"gh\", [\"auth\", \"status\"], {\n\t\t\t\tencoding: \"utf-8\",\n\t\t\t});\n\t\t\tif (authResult.status !== 0) {\n\t\t\t\tthis.showError(\"GitHub CLI is not logged in. Run 'gh auth login' first.\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch {\n\t\t\tthis.showError(\"GitHub CLI (gh) is not installed. Install it from https://cli.github.com/\");\n\t\t\treturn;\n\t\t}\n\n\t\t// Export to a temp file\n\t\tconst tmpFile = path.join(os.tmpdir(), \"session.html\");\n\t\ttry {\n\t\t\tawait this.session.exportToHtml(tmpFile, { themeName: theme.name });\n\t\t} catch (error: unknown) {\n\t\t\tthis.showError(`Failed to export session: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t\treturn;\n\t\t}\n\n\t\t// Show cancellable loader, replacing the editor\n\t\tconst loader = new BorderedLoader(this.ui, theme, \"Creating gist...\");\n\t\tthis.editorContainer.clear();\n\t\tthis.editorContainer.addChild(loader);\n\t\tthis.ui.setFocus(loader);\n\t\tthis.ui.requestRender();\n\n\t\tconst restoreEditor = () => {\n\t\t\tloader.dispose();\n\t\t\tthis.editorContainer.clear();\n\t\t\tthis.editorContainer.addChild(this.editor);\n\t\t\tthis.ui.setFocus(this.editor);\n\t\t\ttry {\n\t\t\t\tfs.unlinkSync(tmpFile);\n\t\t\t} catch {\n\t\t\t\t// Ignore cleanup errors\n\t\t\t}\n\t\t};\n\n\t\t// Create a secret gist asynchronously\n\t\tlet proc: ReturnType<typeof spawn> | null = null;\n\n\t\tloader.onAbort = () => {\n\t\t\tproc?.kill();\n\t\t\trestoreEditor();\n\t\t\tthis.showStatus(\"Share cancelled\");\n\t\t};\n\n\t\ttry {\n\t\t\tconst result = await new Promise<{\n\t\t\t\tstdout: string;\n\t\t\t\tstderr: string;\n\t\t\t\tcode: number | null;\n\t\t\t}>((resolve) => {\n\t\t\t\tproc = spawn(\"gh\", [\"gist\", \"create\", \"--public=false\", tmpFile]);\n\t\t\t\tlet stdout = \"\";\n\t\t\t\tlet stderr = \"\";\n\t\t\t\tproc.stdout?.on(\"data\", (data) => {\n\t\t\t\t\tstdout += data.toString();\n\t\t\t\t});\n\t\t\t\tproc.stderr?.on(\"data\", (data) => {\n\t\t\t\t\tstderr += data.toString();\n\t\t\t\t});\n\t\t\t\tproc.on(\"close\", (code) => resolve({ stdout, stderr, code }));\n\t\t\t});\n\n\t\t\tif (loader.signal.aborted) return;\n\n\t\t\trestoreEditor();\n\n\t\t\tif (result.code !== 0) {\n\t\t\t\tconst errorMsg = result.stderr?.trim() || \"Unknown error\";\n\t\t\t\tthis.showError(`Failed to create gist: ${errorMsg}`);\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Extract gist ID from the URL returned by gh\n\t\t\t// gh returns something like: https://gist.github.com/username/GIST_ID\n\t\t\tconst gistUrl = result.stdout?.trim();\n\t\t\tconst gistId = gistUrl?.split(\"/\").pop();\n\t\t\tif (!gistId) {\n\t\t\t\tthis.showError(\"Failed to parse gist ID from gh output\");\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// Create the preview URL\n\t\t\tconst previewUrl = getShareViewerUrl(gistId);\n\t\t\tthis.showStatus(`Share URL: ${previewUrl}\\nGist: ${gistUrl}`);\n\t\t} catch (error: unknown) {\n\t\t\tif (!loader.signal.aborted) {\n\t\t\t\trestoreEditor();\n\t\t\t\tthis.showError(`Failed to create gist: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t\t}\n\t\t}\n\t}\n\n\tprivate async handleCopyCommand(options: { flashConfirmation?: boolean } = {}): Promise<void> {\n\t\tconst text = this.session.getLastAssistantText();\n\t\tif (!text) {\n\t\t\tthis.showError(\"No agent messages to copy yet.\");\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tawait copyToClipboard(text);\n\t\t\tif (options.flashConfirmation && this.ui instanceof TuiAltScreen) {\n\t\t\t\tthis.ui.flash(\"Copied!\");\n\t\t\t} else {\n\t\t\t\tthis.showStatus(\"Copied last agent message to clipboard\");\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tthis.showError(error instanceof Error ? error.message : String(error));\n\t\t}\n\t}\n\n\tprivate handleNameCommand(text: string): void {\n\t\tconst name = text.replace(/^\\/name\\s*/, \"\").trim();\n\t\tif (!name) {\n\t\t\tconst currentName = this.sessionManager.getSessionName();\n\t\t\tif (currentName) {\n\t\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\t\tthis.chatContainer.addChild(new Text(theme.fg(\"dim\", `Session name: ${currentName}`), 1, 0));\n\t\t\t} else {\n\t\t\t\tthis.showWarning(\"Usage: /name <name>\");\n\t\t\t}\n\t\t\tthis.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\tthis.session.setSessionName(name);\n\t\tconst sessionName = this.sessionManager.getSessionName();\n\t\tif (sessionName !== name) {\n\t\t\tthis.showWarning(`Session name was normalized from ${JSON.stringify(name)} to ${JSON.stringify(sessionName)}`);\n\t\t}\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(theme.fg(\"dim\", `Session name set: ${sessionName ?? name}`), 1, 0));\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleSessionCommand(): void {\n\t\tconst stats = this.session.getSessionStats();\n\t\tconst sessionName = this.sessionManager.getSessionName();\n\t\tconst entries = this.sessionManager.getEntries();\n\t\tconst cacheWaste = computeCacheWaste(entries, this.session.modelRuntime);\n\n\t\t// Cost/token totals per provider/model actually used (e.g. OpenRouter `auto`\n\t\t// resolves to a concrete responseModel). Usage without model attribution is\n\t\t// grouped separately so the breakdown reconciles with the session total.\n\t\tconst usageBreakdown = getUsageCostBreakdown(entries);\n\n\t\tlet info = `${theme.bold(\"Session Info\")}\\n\\n`;\n\t\tif (sessionName) {\n\t\t\tinfo += `${theme.fg(\"dim\", \"Name:\")} ${sessionName}\\n`;\n\t\t}\n\t\tinfo += `${theme.fg(\"dim\", \"File:\")} ${stats.sessionFile ?? \"In-memory\"}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"ID:\")} ${stats.sessionId}\\n\\n`;\n\t\tinfo += `${theme.bold(\"Messages\")}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"Total:\")} ${stats.totalMessages}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"User:\")} ${stats.userMessages}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"Assistant:\")} ${stats.assistantMessages}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"Tools:\")} ${stats.toolCalls} calls, ${stats.toolResults} results\\n\\n`;\n\t\tinfo += `${theme.bold(\"Tokens\")}\\n`;\n\t\t// \"Input\" is the full prompt volume. With cache activity, split it into\n\t\t// cached (served from cache) vs uncached (everything else) - the only\n\t\t// provider-independent split. Cache writes, where reported, are a detail\n\t\t// of the uncached portion.\n\t\tconst { input, cacheRead, cacheWrite } = stats.tokens;\n\t\tconst promptTokens = input + cacheRead + cacheWrite;\n\t\tinfo += `${theme.fg(\"dim\", \"Input:\")} ${promptTokens.toLocaleString()}\\n`;\n\t\tif (promptTokens > 0 && (cacheRead > 0 || cacheWrite > 0)) {\n\t\t\tconst hitRate = theme.fg(\"dim\", `(${((cacheRead / promptTokens) * 100).toFixed(1)}%)`);\n\t\t\tinfo += ` ${theme.fg(\"dim\", \"Cached:\")} ${cacheRead.toLocaleString()} ${hitRate}\\n`;\n\t\t\tconst written =\n\t\t\t\tcacheWrite > 0 ? ` ${theme.fg(\"dim\", `(${cacheWrite.toLocaleString()} written to cache)`)}` : \"\";\n\t\t\tinfo += ` ${theme.fg(\"dim\", \"Uncached:\")} ${(input + cacheWrite).toLocaleString()}${written}\\n`;\n\t\t}\n\t\tinfo += `${theme.fg(\"dim\", \"Output:\")} ${stats.tokens.output.toLocaleString()}\\n`;\n\t\tinfo += `${theme.fg(\"dim\", \"Total:\")} ${stats.tokens.total.toLocaleString()}\\n`;\n\n\t\tif (stats.cost > 0 || cacheWaste.missedTokens > 0) {\n\t\t\tinfo += `\\n${theme.bold(\"Cost\")}\\n`;\n\t\t\tinfo += `${theme.fg(\"dim\", \"Total:\")} $${stats.cost.toFixed(3)}`;\n\t\t\tif (usageBreakdown.length > 1) {\n\t\t\t\tfor (const entry of usageBreakdown) {\n\t\t\t\t\tinfo += `\\n ${theme.fg(\"dim\", `${entry.key}:`)} $${entry.cost.toFixed(3)} ${theme.fg(\"dim\", `(${formatTokens(entry.tokens)} tokens)`)}`;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (cacheWaste.missedTokens > 0) {\n\t\t\t\tconst missLabel = cacheWaste.missCount === 1 ? \"1 miss\" : `${cacheWaste.missCount} misses`;\n\t\t\t\tconst detail = `${cacheWaste.missedTokens.toLocaleString()} tokens, ${missLabel}`;\n\t\t\t\tinfo +=\n\t\t\t\t\tcacheWaste.missedCost >= 0.0001\n\t\t\t\t\t\t? `\\n${theme.fg(\"dim\", \"Cache Re-billed:\")} $${cacheWaste.missedCost.toFixed(3)} ${theme.fg(\"dim\", `(${detail})`)}`\n\t\t\t\t\t\t: `\\n${theme.fg(\"dim\", \"Cache Re-billed:\")} ${detail}`;\n\t\t\t}\n\t\t}\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Text(info, 1, 0));\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleChangelogCommand(): void {\n\t\tconst changelogPath = getChangelogPath();\n\t\tconst allEntries = parseChangelog(changelogPath);\n\n\t\tconst changelogMarkdown =\n\t\t\tallEntries.length > 0\n\t\t\t\t? allEntries\n\t\t\t\t\t\t.reverse()\n\t\t\t\t\t\t.map((e) => normalizeChangelogLinks(e.content, e))\n\t\t\t\t\t\t.join(\"\\n\\n\")\n\t\t\t\t: \"No changelog entries found.\";\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t\tthis.chatContainer.addChild(new Text(theme.bold(theme.fg(\"accent\", \"What's New\")), 1, 0));\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Markdown(changelogMarkdown, 1, 1, this.getMarkdownThemeWithSettings()));\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t\tthis.ui.requestRender();\n\t}\n\n\t/**\n\t * Get capitalized display string for an app keybinding action.\n\t */\n\tprivate getAppKeyDisplay(action: AppKeybinding): string {\n\t\treturn keyDisplayText(action);\n\t}\n\n\t/**\n\t * Get capitalized display string for an editor keybinding action.\n\t */\n\tprivate getEditorKeyDisplay(action: Keybinding): string {\n\t\treturn keyDisplayText(action);\n\t}\n\n\tprivate handleHotkeysCommand(): void {\n\t\t// Navigation keybindings\n\t\tconst cursorUp = this.getEditorKeyDisplay(\"tui.editor.cursorUp\");\n\t\tconst cursorDown = this.getEditorKeyDisplay(\"tui.editor.cursorDown\");\n\t\tconst cursorLeft = this.getEditorKeyDisplay(\"tui.editor.cursorLeft\");\n\t\tconst cursorRight = this.getEditorKeyDisplay(\"tui.editor.cursorRight\");\n\t\tconst cursorWordLeft = this.getEditorKeyDisplay(\"tui.editor.cursorWordLeft\");\n\t\tconst cursorWordRight = this.getEditorKeyDisplay(\"tui.editor.cursorWordRight\");\n\t\tconst cursorLineStart = this.getEditorKeyDisplay(\"tui.editor.cursorLineStart\");\n\t\tconst cursorLineEnd = this.getEditorKeyDisplay(\"tui.editor.cursorLineEnd\");\n\t\tconst jumpForward = this.getEditorKeyDisplay(\"tui.editor.jumpForward\");\n\t\tconst jumpBackward = this.getEditorKeyDisplay(\"tui.editor.jumpBackward\");\n\t\tconst pageUp = this.getEditorKeyDisplay(\"tui.editor.pageUp\");\n\t\tconst pageDown = this.getEditorKeyDisplay(\"tui.editor.pageDown\");\n\n\t\t// Editing keybindings\n\t\tconst submit = this.getEditorKeyDisplay(\"tui.input.submit\");\n\t\tconst newLine = this.getEditorKeyDisplay(\"tui.input.newLine\");\n\t\tconst deleteWordBackward = this.getEditorKeyDisplay(\"tui.editor.deleteWordBackward\");\n\t\tconst deleteWordForward = this.getEditorKeyDisplay(\"tui.editor.deleteWordForward\");\n\t\tconst deleteToLineStart = this.getEditorKeyDisplay(\"tui.editor.deleteToLineStart\");\n\t\tconst deleteToLineEnd = this.getEditorKeyDisplay(\"tui.editor.deleteToLineEnd\");\n\t\tconst yank = this.getEditorKeyDisplay(\"tui.editor.yank\");\n\t\tconst yankPop = this.getEditorKeyDisplay(\"tui.editor.yankPop\");\n\t\tconst undo = this.getEditorKeyDisplay(\"tui.editor.undo\");\n\t\tconst tab = this.getEditorKeyDisplay(\"tui.input.tab\");\n\n\t\t// App keybindings\n\t\tconst interrupt = this.getAppKeyDisplay(\"app.interrupt\");\n\t\tconst clear = this.getAppKeyDisplay(\"app.clear\");\n\t\tconst exit = this.getAppKeyDisplay(\"app.exit\");\n\t\tconst suspend = this.getAppKeyDisplay(\"app.suspend\");\n\t\tconst cycleThinkingLevel = this.getAppKeyDisplay(\"app.thinking.cycle\");\n\t\tconst cycleModelForward = this.getAppKeyDisplay(\"app.model.cycleForward\");\n\t\tconst selectModel = this.getAppKeyDisplay(\"app.model.select\");\n\t\tconst expandTools = this.getAppKeyDisplay(\"app.tools.expand\");\n\t\tconst toggleThinking = this.getAppKeyDisplay(\"app.thinking.toggle\");\n\t\tconst externalEditor = this.getAppKeyDisplay(\"app.editor.external\");\n\t\tconst cycleModelBackward = this.getAppKeyDisplay(\"app.model.cycleBackward\");\n\t\tconst copyMessage = this.getAppKeyDisplay(\"app.message.copy\");\n\t\tconst followUp = this.getAppKeyDisplay(\"app.message.followUp\");\n\t\tconst dequeue = this.getAppKeyDisplay(\"app.message.dequeue\");\n\t\tconst pasteImage = this.getAppKeyDisplay(\"app.clipboard.pasteImage\");\n\n\t\tlet hotkeys = `\n**Navigation**\n| Key | Action |\n|-----|--------|\n| \\`${cursorUp}\\` / \\`${cursorDown}\\` / \\`${cursorLeft}\\` / \\`${cursorRight}\\` | Move cursor / browse history |\n| \\`${cursorWordLeft}\\` / \\`${cursorWordRight}\\` | Move by word |\n| \\`${cursorLineStart}\\` | Start of line |\n| \\`${cursorLineEnd}\\` | End of line |\n| \\`${jumpForward}\\` | Jump forward to character |\n| \\`${jumpBackward}\\` | Jump backward to character |\n| \\`${pageUp}\\` / \\`${pageDown}\\` | Scroll by page |\n\n**Editing**\n| Key | Action |\n|-----|--------|\n| \\`${submit}\\` | Send message |\n| \\`${newLine}\\` | New line${process.platform === \"win32\" ? \" (Ctrl+Enter on Windows Terminal)\" : \"\"} |\n| \\`${deleteWordBackward}\\` | Delete word backwards |\n| \\`${deleteWordForward}\\` | Delete word forwards |\n| \\`${deleteToLineStart}\\` | Delete to start of line |\n| \\`${deleteToLineEnd}\\` | Delete to end of line |\n| \\`${yank}\\` | Paste the most-recently-deleted text |\n| \\`${yankPop}\\` | Cycle through the deleted text after pasting |\n| \\`${undo}\\` | Undo |\n\n**Other**\n| Key | Action |\n|-----|--------|\n| \\`${tab}\\` | Path completion / accept autocomplete |\n| \\`${interrupt}\\` | Cancel autocomplete / abort streaming |\n| \\`${clear}\\` | Clear editor (first) / exit (second) |\n| \\`${exit}\\` | Exit (when editor is empty) |\n| \\`${suspend}\\` | Suspend to background |\n| \\`${cycleThinkingLevel}\\` | Cycle thinking level |\n| \\`${cycleModelForward}\\` / \\`${cycleModelBackward}\\` | Cycle models |\n| \\`${selectModel}\\` | Open model selector |\n| \\`${expandTools}\\` | Toggle tool output expansion |\n| \\`${toggleThinking}\\` | Toggle thinking block visibility |\n| \\`${externalEditor}\\` | Edit message in external editor |\n| \\`${copyMessage}\\` | Copy last assistant message |\n| \\`${followUp}\\` | Queue follow-up message |\n| \\`${dequeue}\\` | Restore queued messages |\n| \\`${pasteImage}\\` | Paste image or text from clipboard |\n| \\`/\\` | Slash commands |\n| \\`!\\` | Run bash command |\n| \\`!!\\` | Run bash command (excluded from context) |\n`;\n\n\t\t// Add extension-registered shortcuts\n\t\tconst extensionRunner = this.session.extensionRunner;\n\t\tconst shortcuts = extensionRunner.getShortcuts(this.keybindings.getEffectiveConfig());\n\t\tif (shortcuts.size > 0) {\n\t\t\thotkeys += `\n**Extensions**\n| Key | Action |\n|-----|--------|\n`;\n\t\t\tfor (const [key, shortcut] of shortcuts) {\n\t\t\t\tconst description = shortcut.description ?? shortcut.extensionPath;\n\t\t\t\tconst keyDisplay = formatKeyText(key, { capitalize: true });\n\t\t\t\thotkeys += `| \\`${keyDisplay}\\` | ${description} |\\n`;\n\t\t\t}\n\t\t}\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t\tthis.chatContainer.addChild(new Text(theme.bold(theme.fg(\"accent\", \"Keyboard Shortcuts\")), 1, 0));\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new Markdown(hotkeys.trim(), 1, 1, this.getMarkdownThemeWithSettings()));\n\t\tthis.chatContainer.addChild(new DynamicBorder());\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate async handleClearCommand(): Promise<void> {\n\t\tthis.clearStatusIndicator();\n\t\ttry {\n\t\t\tconst result = await this.runtimeHost.newSession();\n\t\t\tif (result.cancelled) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\t\tthis.chatContainer.addChild(new Text(`${theme.fg(\"accent\", \"✓ New session started\")}`, 1, 1));\n\t\t\tthis.ui.requestRender();\n\t\t} catch (error: unknown) {\n\t\t\tawait this.handleFatalRuntimeError(\"Failed to create session\", error);\n\t\t}\n\t}\n\n\tprivate handleDebugCommand(): void {\n\t\tconst width = this.ui.terminal.columns;\n\t\tconst height = this.ui.terminal.rows;\n\t\tconst allLines = this.ui.render(width);\n\n\t\tconst debugLogPath = getDebugLogPath();\n\t\tconst debugData = [\n\t\t\t`Debug output at ${new Date().toISOString()}`,\n\t\t\t`Terminal: ${width}x${height}`,\n\t\t\t`Total lines: ${allLines.length}`,\n\t\t\t\"\",\n\t\t\t\"=== All rendered lines with visible widths ===\",\n\t\t\t...allLines.map((line, idx) => {\n\t\t\t\tconst vw = visibleWidth(line);\n\t\t\t\tconst escaped = JSON.stringify(line);\n\t\t\t\treturn `[${idx}] (w=${vw}) ${escaped}`;\n\t\t\t}),\n\t\t\t\"\",\n\t\t\t\"=== Agent messages (JSONL) ===\",\n\t\t\t...this.session.messages.map((msg) => JSON.stringify(msg)),\n\t\t\t\"\",\n\t\t].join(\"\\n\");\n\n\t\tfs.mkdirSync(path.dirname(debugLogPath), { recursive: true });\n\t\tfs.writeFileSync(debugLogPath, debugData);\n\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(\n\t\t\tnew Text(`${theme.fg(\"accent\", \"✓ Debug log written\")}\\n${theme.fg(\"muted\", debugLogPath)}`, 1, 1),\n\t\t);\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleArminSaysHi(): void {\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new ArminComponent(this.ui));\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleDementedDelves(): void {\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new EarendilAnnouncementComponent());\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate handleDaxnuts(): void {\n\t\tthis.chatContainer.addChild(new Spacer(1));\n\t\tthis.chatContainer.addChild(new DaxnutsComponent(this.ui));\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate checkDaxnutsEasterEgg(model: { provider: string; id: string }): void {\n\t\tif (model.provider === \"opencode\" && model.id.toLowerCase().includes(\"kimi-k2.5\")) {\n\t\t\tthis.handleDaxnuts();\n\t\t}\n\t}\n\n\tprivate async handleBashCommand(command: string, excludeFromContext = false): Promise<void> {\n\t\tconst extensionRunner = this.session.extensionRunner;\n\n\t\t// Emit user_bash event to let extensions intercept\n\t\tconst eventResult = await extensionRunner.emitUserBash({\n\t\t\ttype: \"user_bash\",\n\t\t\tcommand,\n\t\t\texcludeFromContext,\n\t\t\tcwd: this.sessionManager.getCwd(),\n\t\t});\n\n\t\t// If extension returned a full result, use it directly\n\t\tif (eventResult?.result) {\n\t\t\tconst result = eventResult.result;\n\n\t\t\t// Create UI component for display\n\t\t\tthis.bashComponent = new BashExecutionComponent(command, this.ui, excludeFromContext);\n\t\t\tif (this.session.isStreaming) {\n\t\t\t\tthis.pendingMessagesContainer.addChild(this.bashComponent);\n\t\t\t\tthis.pendingBashComponents.push(this.bashComponent);\n\t\t\t} else {\n\t\t\t\tthis.chatContainer.addChild(this.bashComponent);\n\t\t\t}\n\n\t\t\t// Show output and complete\n\t\t\tif (result.output) {\n\t\t\t\tthis.bashComponent.appendOutput(result.output);\n\t\t\t}\n\t\t\tthis.bashComponent.setComplete(\n\t\t\t\tresult.exitCode,\n\t\t\t\tresult.cancelled,\n\t\t\t\tresult.truncated ? ({ truncated: true, content: result.output } as TruncationResult) : undefined,\n\t\t\t\tresult.fullOutputPath,\n\t\t\t);\n\n\t\t\t// Record the result in session\n\t\t\tthis.session.recordBashResult(command, result, { excludeFromContext });\n\t\t\tthis.bashComponent = undefined;\n\t\t\tthis.ui.requestRender();\n\t\t\treturn;\n\t\t}\n\n\t\t// Normal execution path (possibly with custom operations)\n\t\tconst isDeferred = this.session.isStreaming;\n\t\tthis.bashComponent = new BashExecutionComponent(command, this.ui, excludeFromContext);\n\n\t\tif (isDeferred) {\n\t\t\t// Show in pending area when agent is streaming\n\t\t\tthis.pendingMessagesContainer.addChild(this.bashComponent);\n\t\t\tthis.pendingBashComponents.push(this.bashComponent);\n\t\t} else {\n\t\t\t// Show in chat immediately when agent is idle\n\t\t\tthis.chatContainer.addChild(this.bashComponent);\n\t\t}\n\t\tthis.ui.requestRender();\n\n\t\ttry {\n\t\t\tconst result = await this.session.executeBash(\n\t\t\t\tcommand,\n\t\t\t\t(chunk) => {\n\t\t\t\t\tif (this.bashComponent) {\n\t\t\t\t\t\tthis.bashComponent.appendOutput(chunk);\n\t\t\t\t\t\tthis.ui.requestRender();\n\t\t\t\t\t}\n\t\t\t\t},\n\t\t\t\t{ excludeFromContext, operations: eventResult?.operations },\n\t\t\t);\n\n\t\t\tif (this.bashComponent) {\n\t\t\t\tthis.bashComponent.setComplete(\n\t\t\t\t\tresult.exitCode,\n\t\t\t\t\tresult.cancelled,\n\t\t\t\t\tresult.truncated ? ({ truncated: true, content: result.output } as TruncationResult) : undefined,\n\t\t\t\t\tresult.fullOutputPath,\n\t\t\t\t);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tif (this.bashComponent) {\n\t\t\t\tthis.bashComponent.setComplete(undefined, false);\n\t\t\t}\n\t\t\tthis.showError(`Bash command failed: ${error instanceof Error ? error.message : \"Unknown error\"}`);\n\t\t}\n\n\t\tthis.bashComponent = undefined;\n\t\tthis.ui.requestRender();\n\t}\n\n\tprivate async handleCompactCommand(customInstructions?: string): Promise<void> {\n\t\tconst entries = this.sessionManager.getEntries();\n\t\tconst messageCount = entries.filter((e) => e.type === \"message\").length;\n\n\t\tif (messageCount < 2) {\n\t\t\tthis.showWarning(\"Nothing to compact (no messages yet)\");\n\t\t\treturn;\n\t\t}\n\n\t\tthis.clearStatusIndicator();\n\n\t\ttry {\n\t\t\tawait this.session.compact(customInstructions);\n\t\t} catch {\n\t\t\t// Ignore, will be emitted as an event\n\t\t}\n\t}\n\n\tstop(fullscreenExitOutput?: FullscreenExitOutput): void {\n\t\tInteractiveMode.restoreCompactionEscapeOverride(this);\n\t\tthis.streamingReveal.stop();\n\t\tthis.toolResultReveal.stop();\n\t\tthis.disposeActiveSelector();\n\t\tif (this.settingsManager.getShowTerminalProgress()) {\n\t\t\tthis.ui.terminal.setProgress(false);\n\t\t}\n\t\tthis.clearStatusIndicator();\n\t\tthis.clearPendingTools();\n\t\tthis.stopChatToolAnimations();\n\t\tthis.clearActiveToolExecutionStatus();\n\t\tthis.clearToolHookStatuses();\n\t\tthis.themeController.disableAutoSync();\n\t\tthis.clearExtensionTerminalInputListeners();\n\t\tthis.footer.dispose();\n\t\tthis.footerDataProvider.dispose();\n\t\tif (this.unsubscribe) {\n\t\t\tthis.unsubscribe();\n\t\t}\n\t\tif (this.isInitialized) {\n\t\t\ttry {\n\t\t\t\tthis.stopInteractiveTui(fullscreenExitOutput ?? this.settingsManager.getFullscreenExitOutput());\n\t\t\t} finally {\n\t\t\t\tthis.isInitialized = false;\n\t\t\t\trestoreInteractiveStderr();\n\t\t\t}\n\t\t} else {\n\t\t\trestoreInteractiveStderr();\n\t\t}\n\t\tthis.unregisterSignalHandlers();\n\t}\n}\n"]}
|