@astralyn/pi 1.0.5 → 1.2.0
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 +79 -0
- package/dist/bundle/chunks/anthropic-messages-NVP5OPIM.js +6 -0
- package/dist/bundle/chunks/anthropic.js +1 -1
- package/dist/bundle/chunks/{azure-openai-responses-LDW4FGAQ.js → azure-openai-responses-IBTOZ5MH.js} +1 -1
- package/dist/bundle/chunks/bedrock-converse-stream.js +2 -2
- package/dist/bundle/chunks/chunk-4XZYHGVN.js +11 -0
- package/dist/bundle/chunks/{chunk-GIG5IHES.js → chunk-5KJH3GGH.js} +1 -1
- package/dist/bundle/chunks/chunk-6VYRLG5F.js +2 -0
- package/dist/bundle/chunks/{chunk-UCXU7KLO.js → chunk-7HJ6CHUB.js} +1 -1
- package/dist/bundle/chunks/chunk-7UBIBLPN.js +2 -0
- package/dist/bundle/chunks/{chunk-IE3Z7ESB.js → chunk-A5HU4TE6.js} +418 -362
- package/dist/bundle/chunks/{chunk-HDHRZ7GT.js → chunk-B2UOWO4A.js} +1 -1
- package/dist/bundle/chunks/chunk-J75WV3FL.js +2 -0
- package/dist/bundle/chunks/{chunk-A6ALEEY5.js → chunk-LHSPN2IO.js} +1 -1
- package/dist/bundle/chunks/chunk-Q74S7ILH.js +2 -0
- package/dist/bundle/chunks/chunk-QDDSFJ35.js +2 -0
- package/dist/bundle/chunks/{chunk-IFELM7MW.js → chunk-UQECUCUH.js} +1 -1
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-HGOVFZDC.js +2 -0
- package/dist/bundle/chunks/codemode-worker.js +18 -10
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-S5A5IBU4.js → google-generative-ai-M44TSMAN.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-UBRQFDB4.js → google-vertex-3C4OWLFX.js} +1 -1
- package/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-R7DQLTQN.js → llama-cpp-classify-H3IZDR5O.js} +2 -2
- package/dist/bundle/chunks/mistral-conversations-I5PL4VCZ.js +5 -0
- package/dist/bundle/chunks/openai-chatgpt.js +1 -1
- package/dist/bundle/chunks/openai-codex-responses-O5EUDL54.js +10 -0
- package/dist/bundle/chunks/openai-codex.js +1 -1
- package/dist/bundle/chunks/{openai-completions-H4VMO7AU.js → openai-completions-X3SSG5BQ.js} +1 -1
- package/dist/bundle/chunks/openai-decisions-TVCDIPZX.js +5 -0
- package/dist/bundle/chunks/{openai-responses-G4PGNM2H.js → openai-responses-NYPNKVDV.js} +1 -1
- package/dist/bundle/chunks/{openrouter-images-YP3YVB54.js → openrouter-images-TDLJV5N4.js} +1 -1
- package/dist/bundle/chunks/{pi-messages-HZZ7GEEW.js → pi-messages-ZXNERWJG.js} +1 -1
- package/dist/bundle/chunks/typesafe-system-one-LWPJYTJP.js +2 -0
- package/dist/bundle/chunks/{virtual-modules-46MSJGKO.js → virtual-modules-OZTPKGU7.js} +1 -1
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +13 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/core/agent-session.d.ts +26 -7
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +190 -183
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +20 -13
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +40 -45
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/bug-report.d.ts +9 -1
- package/dist/core/bug-report.d.ts.map +1 -1
- package/dist/core/compaction/utils.d.ts +6 -0
- package/dist/core/compaction/utils.d.ts.map +1 -1
- package/dist/core/compaction/utils.js +7 -8
- package/dist/core/compaction/utils.js.map +1 -1
- package/dist/core/context-snapshot.d.ts +4 -1
- package/dist/core/context-snapshot.d.ts.map +1 -1
- package/dist/core/context-snapshot.js +45 -0
- package/dist/core/context-snapshot.js.map +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +2 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- 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/runner.d.ts +4 -2
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +2 -3
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +42 -7
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/key-id-schema.d.ts +6 -0
- package/dist/core/key-id-schema.d.ts.map +1 -0
- package/dist/core/key-id-schema.js +16 -0
- package/dist/core/key-id-schema.js.map +1 -0
- package/dist/core/keybinding-registry.d.ts +4 -3
- package/dist/core/keybinding-registry.d.ts.map +1 -1
- package/dist/core/keybinding-registry.js +4 -3
- package/dist/core/keybinding-registry.js.map +1 -1
- package/dist/core/keybindings-schema.d.ts +4 -0
- package/dist/core/keybindings-schema.d.ts.map +1 -0
- package/dist/core/keybindings-schema.js +16 -0
- package/dist/core/keybindings-schema.js.map +1 -0
- package/dist/core/keybindings.d.ts +258 -81
- package/dist/core/keybindings.d.ts.map +1 -1
- package/dist/core/keybindings.js +27 -24
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/model-config.d.ts +713 -180
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +18 -179
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +13 -7
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/nested-tool-calls.d.ts +1 -0
- package/dist/core/nested-tool-calls.d.ts.map +1 -1
- package/dist/core/nested-tool-calls.js +1 -0
- package/dist/core/nested-tool-calls.js.map +1 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +3 -3
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/project-trust.d.ts.map +1 -1
- package/dist/core/project-trust.js +2 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts +12 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +82 -24
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +7 -2
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts +4 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +17 -5
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +65 -0
- package/dist/core/settings-defaults.d.ts.map +1 -0
- package/dist/core/settings-defaults.js +66 -0
- package/dist/core/settings-defaults.js.map +1 -0
- package/dist/core/settings-manager.d.ts +15 -147
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +85 -57
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +231 -0
- package/dist/core/settings-schema.d.ts.map +1 -0
- package/dist/core/settings-schema.js +294 -0
- package/dist/core/settings-schema.js.map +1 -0
- package/dist/core/tasks/session.d.ts +9 -0
- package/dist/core/tasks/session.d.ts.map +1 -1
- package/dist/core/tasks/session.js +21 -0
- package/dist/core/tasks/session.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts +18 -0
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +46 -0
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts.map +1 -1
- package/dist/core/tools/renderers/bash.js +21 -45
- package/dist/core/tools/renderers/bash.js.map +1 -1
- package/dist/core/tools/renderers/edit.js +1 -1
- package/dist/core/tools/renderers/edit.js.map +1 -1
- package/dist/extensions/btw/keybindings.d.ts +2 -2
- package/dist/extensions/btw/keybindings.d.ts.map +1 -1
- package/dist/extensions/btw/keybindings.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +115 -40
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/codemode/index.d.ts.map +1 -1
- package/dist/extensions/codemode/index.js +3 -7
- package/dist/extensions/codemode/index.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts +2 -2
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +9 -3
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +6 -12
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +46 -34
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/index.js +2 -2
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/list-keybindings.d.ts +2 -2
- package/dist/extensions/list-keybindings.d.ts.map +1 -1
- package/dist/extensions/list-keybindings.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +34 -11
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/mcp/cli.js +22 -31
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +187 -95
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +5 -3
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +36 -10
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/resources.d.ts +0 -6
- package/dist/extensions/mcp/resources.d.ts.map +1 -1
- package/dist/extensions/mcp/resources.js +1 -1
- package/dist/extensions/mcp/resources.js.map +1 -1
- package/dist/extensions/mcp/runtime.d.ts +3 -6
- package/dist/extensions/mcp/runtime.d.ts.map +1 -1
- package/dist/extensions/mcp/runtime.js +4 -39
- package/dist/extensions/mcp/runtime.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +2 -3
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +62 -6
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/extensions/mcp/ui.d.ts +3 -3
- package/dist/extensions/mcp/ui.d.ts.map +1 -1
- package/dist/extensions/mcp/ui.js +10 -2
- package/dist/extensions/mcp/ui.js.map +1 -1
- package/dist/extensions/provider/keybindings.d.ts +2 -2
- package/dist/extensions/provider/keybindings.d.ts.map +1 -1
- package/dist/extensions/provider/keybindings.js.map +1 -1
- package/dist/extensions/search/code-search.d.ts +27 -0
- package/dist/extensions/search/code-search.d.ts.map +1 -0
- package/dist/extensions/search/code-search.js +120 -0
- package/dist/extensions/search/code-search.js.map +1 -0
- package/dist/extensions/search/command.d.ts +5 -0
- package/dist/extensions/search/command.d.ts.map +1 -0
- package/dist/extensions/search/command.js +69 -0
- package/dist/extensions/search/command.js.map +1 -0
- package/dist/extensions/search/credential.d.ts +25 -0
- package/dist/extensions/search/credential.d.ts.map +1 -0
- package/dist/extensions/search/credential.js +117 -0
- package/dist/extensions/search/credential.js.map +1 -0
- package/dist/extensions/search/devin.d.ts +34 -0
- package/dist/extensions/search/devin.d.ts.map +1 -0
- package/dist/extensions/search/devin.js +210 -0
- package/dist/extensions/search/devin.js.map +1 -0
- package/dist/extensions/search/index.d.ts +5 -0
- package/dist/extensions/search/index.d.ts.map +1 -0
- package/dist/extensions/search/index.js +113 -0
- package/dist/extensions/search/index.js.map +1 -0
- package/dist/extensions/search/panel.d.ts +53 -0
- package/dist/extensions/search/panel.d.ts.map +1 -0
- package/dist/extensions/search/panel.js +157 -0
- package/dist/extensions/search/panel.js.map +1 -0
- package/dist/extensions/search/prompt.d.ts +14 -0
- package/dist/extensions/search/prompt.d.ts.map +1 -0
- package/dist/extensions/search/prompt.js +221 -0
- package/dist/extensions/search/prompt.js.map +1 -0
- package/dist/extensions/search/render.d.ts +28 -0
- package/dist/extensions/search/render.d.ts.map +1 -0
- package/dist/extensions/search/render.js +86 -0
- package/dist/extensions/search/render.js.map +1 -0
- package/dist/extensions/search/workspace.d.ts +39 -0
- package/dist/extensions/search/workspace.d.ts.map +1 -0
- package/dist/extensions/search/workspace.js +363 -0
- package/dist/extensions/search/workspace.js.map +1 -0
- package/dist/extensions/tool-search/index.d.ts.map +1 -1
- package/dist/extensions/tool-search/index.js +1 -6
- package/dist/extensions/tool-search/index.js.map +1 -1
- package/dist/extensions/tool-search/tool.d.ts +0 -2
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +2 -4
- package/dist/extensions/tool-search/tool.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.js +3 -3
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +5 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +14 -14
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +2 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +5 -2
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +2 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +5 -2
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts +3 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +7 -2
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +1 -0
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +4 -3
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +2 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +5 -2
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +2 -2
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +2 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +63 -64
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/program-status-reporter.d.ts +34 -0
- package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -0
- package/dist/modes/interactive/program-status-reporter.js +107 -0
- package/dist/modes/interactive/program-status-reporter.js.map +1 -0
- package/dist/modes/interactive/tasks/host-hooks.d.ts +14 -0
- package/dist/modes/interactive/tasks/host-hooks.d.ts.map +1 -0
- package/dist/modes/interactive/tasks/host-hooks.js +31 -0
- package/dist/modes/interactive/tasks/host-hooks.js.map +1 -0
- package/dist/modes/interactive/theme/dark.json +1 -1
- package/dist/modes/interactive/theme/light.json +1 -1
- package/dist/modes/interactive/theme/theme-schema.d.ts +28 -0
- package/dist/modes/interactive/theme/theme-schema.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-schema.js +105 -0
- package/dist/modes/interactive/theme/theme-schema.js.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts +257 -0
- package/dist/modes/interactive/theme/theme-tokens.d.ts.map +1 -0
- package/dist/modes/interactive/theme/theme-tokens.js +94 -0
- package/dist/modes/interactive/theme/theme-tokens.js.map +1 -0
- package/dist/modes/interactive/theme/theme.d.ts +13 -16
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +23 -31
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/interactive/tool-view/tool-execution.d.ts +5 -0
- package/dist/modes/interactive/tool-view/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/tool-view/tool-execution.js +7 -0
- package/dist/modes/interactive/tool-view/tool-execution.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +4 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +24 -0
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/ansi.d.ts +8 -0
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js +30 -11
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/clipboard.d.ts.map +1 -1
- package/dist/utils/clipboard.js +18 -12
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts +12 -0
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +5 -0
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/image-resize-worker.js +3 -2
- package/dist/utils/image-resize-worker.js.map +1 -1
- package/dist/utils/image-resize.d.ts.map +1 -1
- package/dist/utils/image-resize.js +9 -10
- package/dist/utils/image-resize.js.map +1 -1
- package/docs/bundled/README.md +1 -1
- package/docs/bundled/extensions/provider.md +1 -1
- package/docs/bundled/extensions/question.md +1 -1
- package/docs/bundled/extensions/search.md +51 -0
- package/docs/bundled/extensions/statusline.md +15 -41
- package/docs/codemode.md +24 -4
- package/docs/compaction.md +2 -2
- package/docs/docs.json +0 -4
- package/docs/environment-variables.md +3 -1
- package/docs/extensions.md +15 -5
- package/docs/json.md +2 -2
- package/docs/keybindings.md +1 -0
- package/docs/llama-cpp.md +8 -1
- package/docs/mcp.md +1 -1
- package/docs/models.md +5 -1
- package/docs/providers.md +33 -0
- package/docs/rpc.md +6 -3
- package/docs/session-format.md +1 -0
- package/docs/settings.md +5 -5
- package/docs/terminal-setup.md +14 -0
- package/docs/themes.md +4 -2
- package/docs/tui.md +1 -1
- package/docs/usage.md +7 -3
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/dynamic-resources/dynamic.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/overlay-test.ts +2 -2
- package/examples/extensions/plan-mode/index.ts +6 -2
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +54 -102
- package/package.json +10 -20
- package/schemas/keybindings.schema.json +453 -0
- package/schemas/models.schema.json +1157 -0
- package/schemas/settings.schema.json +782 -0
- package/schemas/theme.schema.json +365 -0
- package/dist/bundle/chunks/anthropic-messages-YIOJIMVL.js +0 -6
- package/dist/bundle/chunks/chunk-57XI7YJH.js +0 -2
- package/dist/bundle/chunks/chunk-JI4WGISU.js +0 -2
- package/dist/bundle/chunks/chunk-TCQ4HHQD.js +0 -2
- package/dist/bundle/chunks/chunk-TXJO4AJ7.js +0 -11
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-OWU5SM6J.js +0 -2
- package/dist/bundle/chunks/mistral-conversations-A2N5FSOV.js +0 -5
- package/dist/bundle/chunks/openai-codex-responses-Q6JHCWLE.js +0 -10
- package/dist/bundle/chunks/typesafe-system-one-KYKKNU3E.js +0 -2
- package/dist/extensions/web-search/auth.d.ts +0 -12
- package/dist/extensions/web-search/auth.d.ts.map +0 -1
- package/dist/extensions/web-search/auth.js +0 -90
- package/dist/extensions/web-search/auth.js.map +0 -1
- package/dist/extensions/web-search/constants.d.ts +0 -13
- package/dist/extensions/web-search/constants.d.ts.map +0 -1
- package/dist/extensions/web-search/constants.js +0 -26
- package/dist/extensions/web-search/constants.js.map +0 -1
- package/dist/extensions/web-search/execute.d.ts +0 -9
- package/dist/extensions/web-search/execute.d.ts.map +0 -1
- package/dist/extensions/web-search/execute.js +0 -96
- package/dist/extensions/web-search/execute.js.map +0 -1
- package/dist/extensions/web-search/format.d.ts +0 -21
- package/dist/extensions/web-search/format.d.ts.map +0 -1
- package/dist/extensions/web-search/format.js +0 -117
- package/dist/extensions/web-search/format.js.map +0 -1
- package/dist/extensions/web-search/index.d.ts +0 -6
- package/dist/extensions/web-search/index.d.ts.map +0 -1
- package/dist/extensions/web-search/index.js +0 -50
- package/dist/extensions/web-search/index.js.map +0 -1
- package/dist/extensions/web-search/providers/deepseek.d.ts +0 -13
- package/dist/extensions/web-search/providers/deepseek.d.ts.map +0 -1
- package/dist/extensions/web-search/providers/deepseek.js +0 -110
- package/dist/extensions/web-search/providers/deepseek.js.map +0 -1
- package/dist/extensions/web-search/providers/http.d.ts +0 -4
- package/dist/extensions/web-search/providers/http.d.ts.map +0 -1
- package/dist/extensions/web-search/providers/http.js +0 -42
- package/dist/extensions/web-search/providers/http.js.map +0 -1
- package/dist/extensions/web-search/providers/minimax.d.ts +0 -12
- package/dist/extensions/web-search/providers/minimax.d.ts.map +0 -1
- package/dist/extensions/web-search/providers/minimax.js +0 -61
- package/dist/extensions/web-search/providers/minimax.js.map +0 -1
- package/dist/extensions/web-search/render.d.ts +0 -15
- package/dist/extensions/web-search/render.d.ts.map +0 -1
- package/dist/extensions/web-search/render.js +0 -142
- package/dist/extensions/web-search/render.js.map +0 -1
- package/dist/extensions/web-search/results.d.ts +0 -35
- package/dist/extensions/web-search/results.d.ts.map +0 -1
- package/dist/extensions/web-search/results.js +0 -167
- package/dist/extensions/web-search/results.js.map +0 -1
- package/dist/extensions/web-search/schema.d.ts +0 -10
- package/dist/extensions/web-search/schema.d.ts.map +0 -1
- package/dist/extensions/web-search/schema.js +0 -36
- package/dist/extensions/web-search/schema.js.map +0 -1
- package/dist/extensions/web-search/types.d.ts +0 -51
- package/dist/extensions/web-search/types.d.ts.map +0 -1
- package/dist/extensions/web-search/types.js +0 -5
- package/dist/extensions/web-search/types.js.map +0 -1
- package/dist/modes/interactive/theme/theme-json.d.ts +0 -85
- package/dist/modes/interactive/theme/theme-json.d.ts.map +0 -1
- package/dist/modes/interactive/theme/theme-json.js +0 -132
- package/dist/modes/interactive/theme/theme-json.js.map +0 -1
- package/dist/modes/interactive/theme/theme-schema.json +0 -361
- package/docs/bundled/extensions/web-search.md +0 -46
- package/examples/plugins/pi-example-plugin/README.md +0 -38
- package/examples/plugins/pi-example-plugin/package.json +0 -10
- package/examples/plugins/pi-example-plugin/src/contract.ts +0 -13
- package/examples/plugins/pi-example-plugin/src/session.ts +0 -24
- package/examples/plugins/pi-example-plugin/src/tui.ts +0 -31
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { confirmStopBranchTasks, hotkeysTaskSection } from "./tasks/host-hooks.js";
|
|
1
2
|
import { bindTasksUI } from "./tasks/index.js";
|
|
2
|
-
import { cleanTaskText, firstCommandLine } from "./tasks/text.js";
|
|
3
3
|
/**
|
|
4
4
|
* Interactive mode for the coding agent.
|
|
5
5
|
* Handles TUI rendering and user interaction, delegating business logic to AgentSession.
|
|
@@ -22,7 +22,7 @@ import { findExtensionStackMatches, recordCrash, takeUnnotifiedCrash } from "../
|
|
|
22
22
|
import { DEFAULT_THINKING_LEVEL, THINKING_LEVEL_OPTIONS } from "../../core/defaults.js";
|
|
23
23
|
import { FooterDataProvider } from "../../core/footer-data-provider.js";
|
|
24
24
|
import { configureHttpDispatcher, formatHttpIdleTimeoutMs } from "../../core/http-dispatcher.js";
|
|
25
|
-
import {
|
|
25
|
+
import { KeybindingsManager } from "../../core/keybindings.js";
|
|
26
26
|
import { createCompactionSummaryMessage, createCustomMessage } from "../../core/messages.js";
|
|
27
27
|
import { defaultModelPerProvider, findExactModelReferenceMatch, resolveModelScopeFromModels, } from "../../core/model-resolver.js";
|
|
28
28
|
import { CredentialSynchronizationError } from "../../core/model-runtime.js";
|
|
@@ -86,6 +86,7 @@ import { InteractiveEditorHost } from "./editor-host.js";
|
|
|
86
86
|
import { editInExternalEditor } from "./external-editor.js";
|
|
87
87
|
import { refreshModelCatalogs } from "./model-catalog-refresh.js";
|
|
88
88
|
import { getModelSearchText } from "./model-search.js";
|
|
89
|
+
import { ProgramStatusReporter } from "./program-status-reporter.js";
|
|
89
90
|
import { shareSession } from "./session-share.js";
|
|
90
91
|
import { getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getThemeByName, onThemeChange, SYSTEM_THEME_NAME, setRegisteredThemes, stopThemeWatcher, Theme, theme, } from "./theme/theme.js";
|
|
91
92
|
import { InteractiveThemeController } from "./theme/theme-controller.js";
|
|
@@ -93,7 +94,7 @@ import { disposeChatRows, PendingToolMap, ToolChatContainer } from "./tool-view/
|
|
|
93
94
|
import { ToolExecutionComponent } from "./tool-view/tool-execution.js";
|
|
94
95
|
import { createInteractiveTui, createInteractiveTuiReference } from "./tui-renderer.js";
|
|
95
96
|
export { createInteractiveTui, createInteractiveTuiReference } from "./tui-renderer.js";
|
|
96
|
-
function
|
|
97
|
+
function isEmbeddedStatus(editor) {
|
|
97
98
|
return ("embedWorkingStatus" in editor &&
|
|
98
99
|
editor.embedWorkingStatus === true &&
|
|
99
100
|
"setWorkingStatusIndicator" in editor &&
|
|
@@ -131,22 +132,6 @@ function isCompactionCostNotice(item) {
|
|
|
131
132
|
function isUsageSessionEntry(item) {
|
|
132
133
|
return "type" in item && item.type === "usage";
|
|
133
134
|
}
|
|
134
|
-
/**
|
|
135
|
-
* Task rows for `/hotkeys`. Task keybindings act outside the editor, so they never showed up in
|
|
136
|
-
* the editor-driven sections; labels come from KEYBINDINGS so the table cannot drift from the
|
|
137
|
-
* binding registry.
|
|
138
|
-
*/
|
|
139
|
-
function hotkeysTaskSection(display) {
|
|
140
|
-
const detach = KEYBINDINGS["app.tasks.detach"];
|
|
141
|
-
const detachSelected = KEYBINDINGS["app.tasks.detachSelected"];
|
|
142
|
-
return `
|
|
143
|
-
**Tasks**
|
|
144
|
-
| Key | Action |
|
|
145
|
-
|-----|--------|
|
|
146
|
-
| \`${display("app.tasks.detach")}\` | ${detach.description} |
|
|
147
|
-
| \`${display("app.tasks.detachSelected")}\` | ${detachSelected.description} (while /tasks is open) |
|
|
148
|
-
`;
|
|
149
|
-
}
|
|
150
135
|
// EIO: tty reads/ioctls from an orphaned background process group, or writes after hangup.
|
|
151
136
|
// ENOTTY: the tty was revoked (macOS) and stdin is no longer a terminal.
|
|
152
137
|
const DEAD_TERMINAL_ERROR_CODES = new Set(["EIO", "EPIPE", "ENOTCONN", "ENOTTY"]);
|
|
@@ -326,6 +311,8 @@ export class InteractiveMode {
|
|
|
326
311
|
this.compactionQueuedMessages = [];
|
|
327
312
|
// Shutdown state
|
|
328
313
|
this.shutdownRequested = false;
|
|
314
|
+
/** Reports working, blocked, done, and error states to terminals that support OSC 7501. */
|
|
315
|
+
this.programStatus = new ProgramStatusReporter(() => this.ui.terminal, () => this.sessionManager.getSessionName());
|
|
329
316
|
/** The `/bug` hint is shown at most once per session so error output stays readable. */
|
|
330
317
|
this.bugReportHintShown = false;
|
|
331
318
|
this.installChangeWarningShown = false;
|
|
@@ -700,6 +687,7 @@ export class InteractiveMode {
|
|
|
700
687
|
// Start the UI before initializing extensions so session_start handlers can use interactive dialogs
|
|
701
688
|
this.ui.start();
|
|
702
689
|
this.isInitialized = true;
|
|
690
|
+
this.programStatus.report();
|
|
703
691
|
this.ensurePngTranscoder();
|
|
704
692
|
this.themeController.applyFromSettings();
|
|
705
693
|
// The header and startup notices bake theme colors into their text, so build them once the terminal
|
|
@@ -1588,6 +1576,7 @@ export class InteractiveMode {
|
|
|
1588
1576
|
const session = this.session;
|
|
1589
1577
|
this.unsubscribe?.();
|
|
1590
1578
|
this.unsubscribe = undefined;
|
|
1579
|
+
this.programStatus.reset();
|
|
1591
1580
|
this.applyRuntimeSettings();
|
|
1592
1581
|
if (options.renderBeforeBind) {
|
|
1593
1582
|
this.renderCurrentSessionState();
|
|
@@ -1737,7 +1726,7 @@ export class InteractiveMode {
|
|
|
1737
1726
|
}
|
|
1738
1727
|
setEditorWorkingStatusIndicator(indicator) {
|
|
1739
1728
|
this.defaultEditor.setWorkingStatusIndicator(undefined);
|
|
1740
|
-
if (!
|
|
1729
|
+
if (!isEmbeddedStatus(this.editor))
|
|
1741
1730
|
return false;
|
|
1742
1731
|
this.editor.setWorkingStatusIndicator(indicator);
|
|
1743
1732
|
return true;
|
|
@@ -1773,7 +1762,7 @@ export class InteractiveMode {
|
|
|
1773
1762
|
}
|
|
1774
1763
|
}
|
|
1775
1764
|
showWorkingStatusIndicator() {
|
|
1776
|
-
const colorFn =
|
|
1765
|
+
const colorFn = isEmbeddedStatus(this.editor)
|
|
1777
1766
|
? (text) => (this.editor.borderColor ?? theme.getThinkingBorderColor(this.session.thinkingLevel || "off"))(text)
|
|
1778
1767
|
: undefined;
|
|
1779
1768
|
this.showStatusIndicator(new WorkingStatusIndicator(this.ui, this.workingMessage ?? this.defaultWorkingMessage, this.workingIndicatorOptions, colorFn));
|
|
@@ -2070,7 +2059,7 @@ export class InteractiveMode {
|
|
|
2070
2059
|
/**
|
|
2071
2060
|
* Show a selector for extensions.
|
|
2072
2061
|
*/
|
|
2073
|
-
showExtensionSelector(title, options, opts) {
|
|
2062
|
+
showExtensionSelector(title, options, opts, blocked = { kind: "question", message: title }) {
|
|
2074
2063
|
return new Promise((resolve) => {
|
|
2075
2064
|
if (opts?.signal?.aborted) {
|
|
2076
2065
|
resolve(undefined);
|
|
@@ -2099,6 +2088,8 @@ export class InteractiveMode {
|
|
|
2099
2088
|
this.editorContainer.clear();
|
|
2100
2089
|
this.editorContainer.addChild(this.extensionSelector);
|
|
2101
2090
|
this.ui.setFocus(this.extensionSelector);
|
|
2091
|
+
// Extension dialogs share the editor slot: opening one replaces the status of a displaced one.
|
|
2092
|
+
this.programStatus.setBlocked("extension-dialog", blocked);
|
|
2102
2093
|
this.ui.requestRender();
|
|
2103
2094
|
});
|
|
2104
2095
|
}
|
|
@@ -2110,6 +2101,7 @@ export class InteractiveMode {
|
|
|
2110
2101
|
this.editorContainer.clear();
|
|
2111
2102
|
this.editorContainer.addChild(this.editor);
|
|
2112
2103
|
this.extensionSelector = undefined;
|
|
2104
|
+
this.programStatus.setBlocked("extension-dialog", undefined);
|
|
2113
2105
|
this.ui.setFocus(this.editor);
|
|
2114
2106
|
this.ui.requestRender();
|
|
2115
2107
|
}
|
|
@@ -2119,7 +2111,7 @@ export class InteractiveMode {
|
|
|
2119
2111
|
async showExtensionConfirm(title, message, opts) {
|
|
2120
2112
|
// The message is context, not a heading: render it as the selector's
|
|
2121
2113
|
// description instead of folding it into the accent-bold title.
|
|
2122
|
-
const result = await this.showExtensionSelector(title, ["Yes", "No"], { ...opts, description: message });
|
|
2114
|
+
const result = await this.showExtensionSelector(title, ["Yes", "No"], { ...opts, description: message }, { kind: "permission", message: title });
|
|
2123
2115
|
return result === "Yes";
|
|
2124
2116
|
}
|
|
2125
2117
|
async promptForMissingSessionCwd(error) {
|
|
@@ -2153,6 +2145,7 @@ export class InteractiveMode {
|
|
|
2153
2145
|
this.editorContainer.clear();
|
|
2154
2146
|
this.editorContainer.addChild(this.extensionInput);
|
|
2155
2147
|
this.ui.setFocus(this.extensionInput);
|
|
2148
|
+
this.programStatus.setBlocked("extension-dialog", { kind: "question", message: title });
|
|
2156
2149
|
this.ui.requestRender();
|
|
2157
2150
|
});
|
|
2158
2151
|
}
|
|
@@ -2164,6 +2157,7 @@ export class InteractiveMode {
|
|
|
2164
2157
|
this.editorContainer.clear();
|
|
2165
2158
|
this.editorContainer.addChild(this.editor);
|
|
2166
2159
|
this.extensionInput = undefined;
|
|
2160
|
+
this.programStatus.setBlocked("extension-dialog", undefined);
|
|
2167
2161
|
this.ui.setFocus(this.editor);
|
|
2168
2162
|
this.ui.requestRender();
|
|
2169
2163
|
}
|
|
@@ -2183,6 +2177,7 @@ export class InteractiveMode {
|
|
|
2183
2177
|
this.editorContainer.clear();
|
|
2184
2178
|
this.editorContainer.addChild(this.extensionEditor);
|
|
2185
2179
|
this.ui.setFocus(this.extensionEditor);
|
|
2180
|
+
this.programStatus.setBlocked("extension-dialog", { kind: "question", message: title });
|
|
2186
2181
|
this.ui.requestRender();
|
|
2187
2182
|
});
|
|
2188
2183
|
}
|
|
@@ -2193,6 +2188,7 @@ export class InteractiveMode {
|
|
|
2193
2188
|
this.editorContainer.clear();
|
|
2194
2189
|
this.editorContainer.addChild(this.editor);
|
|
2195
2190
|
this.extensionEditor = undefined;
|
|
2191
|
+
this.programStatus.setBlocked("extension-dialog", undefined);
|
|
2196
2192
|
this.ui.setFocus(this.editor);
|
|
2197
2193
|
this.ui.requestRender();
|
|
2198
2194
|
}
|
|
@@ -2712,6 +2708,7 @@ export class InteractiveMode {
|
|
|
2712
2708
|
await this.init();
|
|
2713
2709
|
}
|
|
2714
2710
|
this.footer.invalidate();
|
|
2711
|
+
this.programStatus.handleEvent(event);
|
|
2715
2712
|
switch (event.type) {
|
|
2716
2713
|
case "agent_start":
|
|
2717
2714
|
this.pendingTools.clear();
|
|
@@ -2817,6 +2814,7 @@ export class InteractiveMode {
|
|
|
2817
2814
|
const component = new ToolExecutionComponent(content.name, content.id, content.arguments, {
|
|
2818
2815
|
showImages: this.settingsManager.getShowImages(),
|
|
2819
2816
|
imageWidthCells: this.settingsManager.getImageWidthCells(),
|
|
2817
|
+
outputPad: this.outputPad,
|
|
2820
2818
|
}, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
|
|
2821
2819
|
component.setExpanded(this.toolOutputExpanded);
|
|
2822
2820
|
this.chatContainer.addChild(component);
|
|
@@ -2887,6 +2885,7 @@ export class InteractiveMode {
|
|
|
2887
2885
|
component = new ToolExecutionComponent(event.toolName, event.toolCallId, event.args, {
|
|
2888
2886
|
showImages: this.settingsManager.getShowImages(),
|
|
2889
2887
|
imageWidthCells: this.settingsManager.getImageWidthCells(),
|
|
2888
|
+
outputPad: this.outputPad,
|
|
2890
2889
|
}, this.getRegisteredToolDefinition(event.toolName), this.ui, this.sessionManager.getCwd());
|
|
2891
2890
|
component.setExpanded(this.toolOutputExpanded);
|
|
2892
2891
|
this.chatContainer.addChild(component);
|
|
@@ -2909,7 +2908,7 @@ export class InteractiveMode {
|
|
|
2909
2908
|
this.maybeShowInstallChangeWarning();
|
|
2910
2909
|
const component = this.pendingTools.get(event.toolCallId);
|
|
2911
2910
|
if (component) {
|
|
2912
|
-
component.updateResult({ ...event.result, isError: event.isError });
|
|
2911
|
+
component.updateResult({ ...event.result, isError: event.isError, durationMs: event.durationMs });
|
|
2913
2912
|
this.pendingTools.delete(event.toolCallId);
|
|
2914
2913
|
this.ui.requestRender();
|
|
2915
2914
|
}
|
|
@@ -2940,7 +2939,10 @@ export class InteractiveMode {
|
|
|
2940
2939
|
this.defaultEditor.onEscape = () => {
|
|
2941
2940
|
this.session.abortCompaction();
|
|
2942
2941
|
};
|
|
2943
|
-
|
|
2942
|
+
const colorFn = isEmbeddedStatus(this.editor)
|
|
2943
|
+
? (text) => (this.editor.borderColor ?? theme.getThinkingBorderColor(this.session.thinkingLevel || "off"))(text)
|
|
2944
|
+
: undefined;
|
|
2945
|
+
this.showStatusIndicator(new CompactionStatusIndicator(this.ui, event.reason, colorFn));
|
|
2944
2946
|
this.ui.requestRender();
|
|
2945
2947
|
break;
|
|
2946
2948
|
}
|
|
@@ -3029,7 +3031,10 @@ export class InteractiveMode {
|
|
|
3029
3031
|
this.showStatusIndicator(new BranchSummaryStatusIndicator(this.ui));
|
|
3030
3032
|
}
|
|
3031
3033
|
else {
|
|
3032
|
-
|
|
3034
|
+
const colorFn = isEmbeddedStatus(this.editor)
|
|
3035
|
+
? (text) => (this.editor.borderColor ?? theme.getThinkingBorderColor(this.session.thinkingLevel || "off"))(text)
|
|
3036
|
+
: undefined;
|
|
3037
|
+
this.showStatusIndicator(new CompactionStatusIndicator(this.ui, event.reason, colorFn));
|
|
3033
3038
|
}
|
|
3034
3039
|
this.ui.requestRender();
|
|
3035
3040
|
break;
|
|
@@ -3093,7 +3098,7 @@ export class InteractiveMode {
|
|
|
3093
3098
|
if (!renderer) {
|
|
3094
3099
|
return;
|
|
3095
3100
|
}
|
|
3096
|
-
const component = new CustomEntryComponent(entry, renderer);
|
|
3101
|
+
const component = new CustomEntryComponent(entry, renderer, this.outputPad);
|
|
3097
3102
|
component.setExpanded(this.toolOutputExpanded);
|
|
3098
3103
|
if (!component.hasContent()) {
|
|
3099
3104
|
return;
|
|
@@ -3110,7 +3115,7 @@ export class InteractiveMode {
|
|
|
3110
3115
|
addMessageToChat(message, options) {
|
|
3111
3116
|
switch (message.role) {
|
|
3112
3117
|
case "bashExecution": {
|
|
3113
|
-
const component = new BashExecutionComponent(message.command, this.ui, message.excludeFromContext);
|
|
3118
|
+
const component = new BashExecutionComponent(message.command, this.ui, message.excludeFromContext, this.outputPad);
|
|
3114
3119
|
if (message.output) {
|
|
3115
3120
|
component.appendOutput(message.output);
|
|
3116
3121
|
}
|
|
@@ -3129,14 +3134,14 @@ export class InteractiveMode {
|
|
|
3129
3134
|
}
|
|
3130
3135
|
case "compactionSummary": {
|
|
3131
3136
|
this.chatContainer.addChild(new Spacer(1));
|
|
3132
|
-
const component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings());
|
|
3137
|
+
const component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad);
|
|
3133
3138
|
component.setExpanded(this.toolOutputExpanded);
|
|
3134
3139
|
this.chatContainer.addChild(component);
|
|
3135
3140
|
break;
|
|
3136
3141
|
}
|
|
3137
3142
|
case "branchSummary": {
|
|
3138
3143
|
this.chatContainer.addChild(new Spacer(1));
|
|
3139
|
-
const component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings());
|
|
3144
|
+
const component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad);
|
|
3140
3145
|
component.setExpanded(this.toolOutputExpanded);
|
|
3141
3146
|
this.chatContainer.addChild(component);
|
|
3142
3147
|
break;
|
|
@@ -3152,7 +3157,7 @@ export class InteractiveMode {
|
|
|
3152
3157
|
const skillBlock = parseSkillBlock(textContent);
|
|
3153
3158
|
if (skillBlock) {
|
|
3154
3159
|
// Render skill block (collapsible)
|
|
3155
|
-
const component = new SkillInvocationMessageComponent(skillBlock, this.getMarkdownThemeWithSettings());
|
|
3160
|
+
const component = new SkillInvocationMessageComponent(skillBlock, this.getMarkdownThemeWithSettings(), this.outputPad);
|
|
3156
3161
|
component.setExpanded(this.toolOutputExpanded);
|
|
3157
3162
|
this.chatContainer.addChild(component);
|
|
3158
3163
|
// Render user message separately if present
|
|
@@ -3221,6 +3226,7 @@ export class InteractiveMode {
|
|
|
3221
3226
|
const component = new ToolExecutionComponent(content.name, content.id, content.arguments, {
|
|
3222
3227
|
showImages: this.settingsManager.getShowImages(),
|
|
3223
3228
|
imageWidthCells: this.settingsManager.getImageWidthCells(),
|
|
3229
|
+
outputPad: this.outputPad,
|
|
3224
3230
|
}, this.getRegisteredToolDefinition(content.name), this.ui, this.sessionManager.getCwd());
|
|
3225
3231
|
component.setExpanded(this.toolOutputExpanded);
|
|
3226
3232
|
this.chatContainer.addChild(component);
|
|
@@ -3274,6 +3280,9 @@ export class InteractiveMode {
|
|
|
3274
3280
|
* @param options.populateHistory Add user messages to editor history
|
|
3275
3281
|
*/
|
|
3276
3282
|
renderSessionEntries(entries, options = {}) {
|
|
3283
|
+
// Selection coordinates point into the transcript being replaced (#9311).
|
|
3284
|
+
if (this.renderer instanceof TuiAltScreen)
|
|
3285
|
+
this.renderer.resetTextSelection();
|
|
3277
3286
|
const items = entries.flatMap((entry) => {
|
|
3278
3287
|
if (entry.type === "custom" || (entry.type === "usage" && entry.kind === "cache_warm")) {
|
|
3279
3288
|
return [entry];
|
|
@@ -4170,21 +4179,14 @@ export class InteractiveMode {
|
|
|
4170
4179
|
onOutputPadChange: (padding) => {
|
|
4171
4180
|
this.settingsManager.setOutputPad(padding);
|
|
4172
4181
|
this.outputPad = padding;
|
|
4173
|
-
|
|
4174
|
-
for (const child of
|
|
4175
|
-
if (child
|
|
4176
|
-
child instanceof CustomMessageComponent ||
|
|
4177
|
-
child instanceof UserMessageComponent) {
|
|
4182
|
+
for (const container of [this.chatContainer, this.pendingMessagesContainer]) {
|
|
4183
|
+
for (const child of container.children) {
|
|
4184
|
+
if ("setOutputPad" in child && typeof child.setOutputPad === "function") {
|
|
4178
4185
|
child.setOutputPad(padding);
|
|
4179
4186
|
}
|
|
4180
4187
|
}
|
|
4181
|
-
if (this.streamingComponent) {
|
|
4182
|
-
this.streamingComponent.setOutputPad(padding);
|
|
4183
|
-
}
|
|
4184
|
-
this.ui.requestRender();
|
|
4185
|
-
return;
|
|
4186
4188
|
}
|
|
4187
|
-
this.
|
|
4189
|
+
this.ui.requestRender();
|
|
4188
4190
|
},
|
|
4189
4191
|
onAutocompleteMaxVisibleChange: (maxVisible) => {
|
|
4190
4192
|
this.settingsManager.setAutocompleteMaxVisible(maxVisible);
|
|
@@ -4619,19 +4621,10 @@ export class InteractiveMode {
|
|
|
4619
4621
|
}
|
|
4620
4622
|
// Ask about summarization
|
|
4621
4623
|
done(); // Close selector first
|
|
4622
|
-
// Results are saved on their launch branch, so leaving it stops its running tasks.
|
|
4623
4624
|
const stopped = this.session.tasksStoppedByTreeNavigation(entryId);
|
|
4624
|
-
if (stopped
|
|
4625
|
-
|
|
4626
|
-
|
|
4627
|
-
.map((task) => ` ${cleanTaskText(firstCommandLine(task.command ?? task.title))}`);
|
|
4628
|
-
if (stopped.length > shown.length)
|
|
4629
|
-
shown.push(` …and ${stopped.length - shown.length} more`);
|
|
4630
|
-
const confirmed = await this.showExtensionConfirm(`Stop ${stopped.length} running task${stopped.length === 1 ? "" : "s"}?`, `They were started on the branch you are leaving and will be cancelled:\n${shown.join("\n")}`);
|
|
4631
|
-
if (!confirmed) {
|
|
4632
|
-
this.showTreeSelector(entryId);
|
|
4633
|
-
return;
|
|
4634
|
-
}
|
|
4625
|
+
if (!(await confirmStopBranchTasks(stopped, (title, message) => this.showExtensionConfirm(title, message)))) {
|
|
4626
|
+
this.showTreeSelector(entryId);
|
|
4627
|
+
return;
|
|
4635
4628
|
}
|
|
4636
4629
|
// Loop until user makes a complete choice or cancels to tree
|
|
4637
4630
|
let wantsSummary = false;
|
|
@@ -5161,7 +5154,7 @@ export class InteractiveMode {
|
|
|
5161
5154
|
this.ui.requestRender();
|
|
5162
5155
|
};
|
|
5163
5156
|
try {
|
|
5164
|
-
await this.loginProvider(dialog, providerId, "api_key");
|
|
5157
|
+
await this.loginProvider(dialog, providerId, providerName, "api_key");
|
|
5165
5158
|
restoreEditor();
|
|
5166
5159
|
await this.completeProviderAuthentication(providerId, providerName, "api_key", previousModel);
|
|
5167
5160
|
}
|
|
@@ -5249,12 +5242,18 @@ export class InteractiveMode {
|
|
|
5249
5242
|
dialog.showProgress(event.message);
|
|
5250
5243
|
}
|
|
5251
5244
|
}
|
|
5252
|
-
async loginProvider(dialog, providerId, method) {
|
|
5253
|
-
|
|
5254
|
-
|
|
5255
|
-
|
|
5256
|
-
|
|
5257
|
-
|
|
5245
|
+
async loginProvider(dialog, providerId, providerName, method) {
|
|
5246
|
+
this.programStatus.setBlocked("login", { kind: "auth", message: `Log in to ${providerName}` });
|
|
5247
|
+
try {
|
|
5248
|
+
await this.session.modelRuntime.login(providerId, method, {
|
|
5249
|
+
signal: dialog.signal,
|
|
5250
|
+
prompt: (prompt) => this.showAuthPrompt(dialog, prompt, providerId),
|
|
5251
|
+
notify: (event) => this.notifyAuthDialog(dialog, event),
|
|
5252
|
+
}, { getDeviceId: () => this.settingsManager.getOrCreateDeviceId() });
|
|
5253
|
+
}
|
|
5254
|
+
finally {
|
|
5255
|
+
this.programStatus.setBlocked("login", undefined);
|
|
5256
|
+
}
|
|
5258
5257
|
}
|
|
5259
5258
|
async showLoginDialog(providerId, providerName, onBack) {
|
|
5260
5259
|
const previousModel = this.session.model;
|
|
@@ -5270,7 +5269,7 @@ export class InteractiveMode {
|
|
|
5270
5269
|
this.ui.requestRender();
|
|
5271
5270
|
};
|
|
5272
5271
|
try {
|
|
5273
|
-
await this.loginProvider(dialog, providerId, "oauth");
|
|
5272
|
+
await this.loginProvider(dialog, providerId, providerName, "oauth");
|
|
5274
5273
|
restoreEditor();
|
|
5275
5274
|
await this.completeProviderAuthentication(providerId, providerName, "oauth", previousModel);
|
|
5276
5275
|
if (providerId === RADIUS_PROVIDER_ID)
|
|
@@ -5861,7 +5860,7 @@ export class InteractiveMode {
|
|
|
5861
5860
|
if (eventResult?.result) {
|
|
5862
5861
|
const result = eventResult.result;
|
|
5863
5862
|
// Create UI component for display
|
|
5864
|
-
this.bashComponent = new BashExecutionComponent(command, this.ui, excludeFromContext);
|
|
5863
|
+
this.bashComponent = new BashExecutionComponent(command, this.ui, excludeFromContext, this.outputPad);
|
|
5865
5864
|
if (this.session.isStreaming) {
|
|
5866
5865
|
this.pendingMessagesContainer.addChild(this.bashComponent);
|
|
5867
5866
|
this.pendingBashComponents.push(this.bashComponent);
|
|
@@ -5882,7 +5881,7 @@ export class InteractiveMode {
|
|
|
5882
5881
|
}
|
|
5883
5882
|
// Normal execution path (possibly with custom operations)
|
|
5884
5883
|
const isDeferred = this.session.isStreaming;
|
|
5885
|
-
this.bashComponent = new BashExecutionComponent(command, this.ui, excludeFromContext);
|
|
5884
|
+
this.bashComponent = new BashExecutionComponent(command, this.ui, excludeFromContext, this.outputPad);
|
|
5886
5885
|
if (isDeferred) {
|
|
5887
5886
|
// Show in pending area when agent is streaming
|
|
5888
5887
|
this.pendingMessagesContainer.addChild(this.bashComponent);
|