pi-namespace-patch 1.5.2-namespace.1 → 1.6.1-namespace.1
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 +147 -0
- package/README.md +5 -5
- package/dist/bundle/chunks/anthropic-messages-NVZIQUC2.js +3 -0
- package/dist/bundle/chunks/azure-openai-responses-NLMT4M2I.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +5 -5
- package/dist/bundle/chunks/{chunk-AUUCDC7R.js → chunk-254Q5KJY.js} +2 -2
- package/dist/bundle/chunks/chunk-2BKJ4UF2.js +6 -0
- package/dist/bundle/chunks/{chunk-RKNK4Y6L.js → chunk-5QZEKD66.js} +1 -1
- package/dist/bundle/chunks/chunk-ASV47SSA.js +2 -0
- package/dist/bundle/chunks/chunk-DPMEYYP2.js +20 -0
- package/dist/bundle/chunks/chunk-DQUOASJG.js +2 -0
- package/dist/bundle/chunks/{chunk-4UNPP53I.js → chunk-ESCXDUHA.js} +2 -2
- package/dist/bundle/chunks/chunk-FZUFSFVS.js +44 -0
- package/dist/bundle/chunks/{chunk-FF6XOTWB.js → chunk-GH2VPQ2P.js} +14 -12
- package/dist/bundle/chunks/{chunk-WL4TUXY7.js → chunk-HID5BUPP.js} +1 -1
- package/dist/bundle/chunks/chunk-HRA5GXRL.js +9 -0
- package/dist/bundle/chunks/{chunk-ITPADMEB.js → chunk-HXTNJVK4.js} +104 -106
- package/dist/bundle/chunks/chunk-INODY4DR.js +2 -0
- package/dist/bundle/chunks/chunk-JIUMJLB6.js +16 -0
- package/dist/bundle/chunks/chunk-LWG2CUTI.js +31 -0
- package/dist/bundle/chunks/{chunk-VKJQ6CME.js → chunk-O5MXS5TI.js} +1 -1
- package/dist/bundle/chunks/chunk-OVXT2WQH.js +2 -0
- package/dist/bundle/chunks/chunk-QQT7J23Q.js +30 -0
- package/dist/bundle/chunks/{chunk-BT5GUSNR.js → chunk-S6XQ4444.js} +1 -1
- package/dist/bundle/chunks/chunk-TRIUHDLU.js +2 -0
- package/dist/bundle/chunks/{chunk-FMPAMX2W.js → chunk-VUZTGLGT.js} +1 -1
- package/dist/bundle/chunks/chunk-WLFBMTZ5.js +14 -0
- package/dist/bundle/chunks/{cli-CJJQRPM4.js → cli-IFNPONCI.js} +1 -1
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-K5LZ2XIM.js +2 -0
- package/dist/bundle/chunks/{easter-egg-3d-GEVPKQF6.js → easter-egg-3d-JQSUSCKG.js} +1 -1
- package/dist/bundle/chunks/{execute-L2EEDV3L.js → execute-GM225T4M.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/google-generative-ai-JMDVNM52.js +2 -0
- package/dist/bundle/chunks/google-vertex-RO3RU6D4.js +2 -0
- package/dist/bundle/chunks/{llama-cpp-classify-EJXCQRUQ.js → llama-cpp-classify-V63YXBKJ.js} +2 -2
- package/dist/bundle/chunks/mistral-conversations-5QQ525XP.js +4 -0
- package/dist/bundle/chunks/openai-codex-responses-3OSG4LCA.js +2 -0
- package/dist/bundle/chunks/{openai-completions-HRZOSLBO.js → openai-completions-CDC7XEM5.js} +2 -2
- package/dist/bundle/chunks/{openai-decisions-F66BDLOM.js → openai-decisions-QKZUXNGS.js} +1 -1
- package/dist/bundle/chunks/openai-responses-3TUDNSSR.js +4 -0
- package/dist/bundle/chunks/openrouter-images-WOQ26ANM.js +2 -0
- package/dist/bundle/chunks/pi-decision-DNF2KAXD.js +2 -0
- package/dist/bundle/chunks/pi-messages-PQC5SMWL.js +2 -0
- package/dist/bundle/chunks/{runtime-J5ZSBGTX.js → runtime-T6TR2GDO.js} +1 -1
- package/dist/bundle/chunks/typesafe-system-one-Z5B3PAXZ.js +2 -0
- package/dist/bundle/chunks/virtual-modules-SNXUCAHU.js +2 -0
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +4 -2
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +9 -6
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/cli/project-trust.d.ts.map +1 -1
- package/dist/cli/project-trust.js +6 -6
- package/dist/cli/project-trust.js.map +1 -1
- package/dist/cli/session-picker.d.ts.map +1 -1
- package/dist/cli/session-picker.js +9 -6
- package/dist/cli/session-picker.js.map +1 -1
- package/dist/cli/startup-ui.d.ts +3 -2
- package/dist/cli/startup-ui.d.ts.map +1 -1
- package/dist/cli/startup-ui.js +21 -23
- package/dist/cli/startup-ui.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts +11 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +19 -0
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +6 -3
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +22 -13
- 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 +7 -1
- package/dist/core/auth-storage.js.map +1 -1
- package/dist/core/bash-executor.d.ts +3 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +24 -13
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/exec.d.ts +1 -0
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +4 -1
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/ansi-to-html.d.ts +6 -1
- package/dist/core/export-html/ansi-to-html.d.ts.map +1 -1
- package/dist/core/export-html/ansi-to-html.js +57 -20
- package/dist/core/export-html/ansi-to-html.js.map +1 -1
- package/dist/core/export-html/template.js +1 -1
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +2 -3
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +18 -1
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +7 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +14 -1
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/messages.d.ts +4 -0
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +10 -2
- package/dist/core/messages.js.map +1 -1
- package/dist/core/model-resolver.d.ts +0 -8
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +4 -68
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +6 -2
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts +16 -0
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +45 -2
- 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 +1 -1
- package/dist/core/project-trust.js.map +1 -1
- package/dist/core/provider-composer.d.ts +1 -0
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/remote-catalog-provider.d.ts.map +1 -1
- package/dist/core/remote-catalog-provider.js +7 -0
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/resolve-config-value.d.ts +2 -0
- package/dist/core/resolve-config-value.d.ts.map +1 -1
- package/dist/core/resolve-config-value.js +4 -0
- package/dist/core/resolve-config-value.js.map +1 -1
- package/dist/core/resource-loader.d.ts +5 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +2 -0
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +55 -42
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-defaults.d.ts +6 -1
- package/dist/core/settings-defaults.d.ts.map +1 -1
- package/dist/core/settings-defaults.js +6 -1
- package/dist/core/settings-defaults.js.map +1 -1
- package/dist/core/settings-manager.d.ts +6 -4
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +23 -8
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +16 -2
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +23 -4
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/tools/bash.d.ts +3 -0
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +24 -9
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +27 -16
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.js +1 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/output-accumulator.d.ts +16 -4
- package/dist/core/tools/output-accumulator.d.ts.map +1 -1
- package/dist/core/tools/output-accumulator.js +47 -38
- package/dist/core/tools/output-accumulator.js.map +1 -1
- package/dist/core/tools/read.d.ts +5 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +10 -15
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/renderers/bash.d.ts.map +1 -1
- package/dist/core/tools/renderers/bash.js +9 -3
- package/dist/core/tools/renderers/bash.js.map +1 -1
- package/dist/core/tools/renderers/read.d.ts.map +1 -1
- package/dist/core/tools/renderers/read.js +6 -2
- package/dist/core/tools/renderers/read.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +1 -1
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +11 -5
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +3 -13
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/provider.d.ts +1 -1
- package/dist/extensions/llama/provider.d.ts.map +1 -1
- package/dist/extensions/llama/provider.js +6 -4
- package/dist/extensions/llama/provider.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +4 -7
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/resources.d.ts.map +1 -1
- package/dist/extensions/mcp/resources.js +3 -3
- package/dist/extensions/mcp/resources.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +1 -9
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +8 -124
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +40 -17
- package/dist/main.js.map +1 -1
- package/dist/modes/diagnostics-stderr.d.ts +4 -0
- package/dist/modes/diagnostics-stderr.d.ts.map +1 -0
- package/dist/modes/diagnostics-stderr.js +11 -0
- package/dist/modes/diagnostics-stderr.js.map +1 -0
- package/dist/modes/interactive/components/assistant-message.d.ts +2 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +9 -3
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/bash-execution.d.ts +2 -1
- package/dist/modes/interactive/components/bash-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/bash-execution.js +6 -3
- package/dist/modes/interactive/components/bash-execution.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +5 -2
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.d.ts +3 -5
- package/dist/modes/interactive/components/first-time-setup.d.ts.map +1 -1
- package/dist/modes/interactive/components/first-time-setup.js +15 -45
- package/dist/modes/interactive/components/first-time-setup.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
- package/dist/modes/interactive/components/mermaid.js +13 -4
- package/dist/modes/interactive/components/mermaid.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +5 -2
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +14 -2
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +17 -12
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/radius-login-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/radius-login-selector.js +2 -1
- package/dist/modes/interactive/components/radius-login-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +9 -1
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +8 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +41 -9
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +3 -3
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +56 -35
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.js +5 -1
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -1
- package/dist/modes/interactive/components/themed-text.js.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/thinking-selector.js +5 -1
- package/dist/modes/interactive/components/thinking-selector.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +3 -1
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +2 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +9 -3
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts +2 -2
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +13 -3
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +116 -70
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/program-status-reporter.d.ts +2 -0
- package/dist/modes/interactive/program-status-reporter.d.ts.map +1 -1
- package/dist/modes/interactive/program-status-reporter.js +4 -0
- package/dist/modes/interactive/program-status-reporter.js.map +1 -1
- package/dist/modes/interactive/session-share.d.ts.map +1 -1
- package/dist/modes/interactive/session-share.js +11 -1
- package/dist/modes/interactive/session-share.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +1 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +17 -17
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/jsonl.d.ts.map +1 -1
- package/dist/modes/rpc/jsonl.js +13 -13
- package/dist/modes/rpc/jsonl.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +19 -27
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/package-manager-cli.d.ts.map +1 -1
- package/dist/package-manager-cli.js +24 -2
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +3 -2
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/clipboard.js +1 -1
- package/dist/utils/clipboard.js.map +1 -1
- package/dist/utils/flush-stdout.d.ts +8 -0
- package/dist/utils/flush-stdout.d.ts.map +1 -0
- package/dist/utils/flush-stdout.js +23 -0
- package/dist/utils/flush-stdout.js.map +1 -0
- package/dist/utils/output-files.d.ts +20 -4
- package/dist/utils/output-files.d.ts.map +1 -1
- package/dist/utils/output-files.js +37 -2
- package/dist/utils/output-files.js.map +1 -1
- package/dist/utils/shell.d.ts +2 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +56 -7
- package/dist/utils/shell.js.map +1 -1
- package/docs/cli.md +1 -1
- package/docs/codemode.md +6 -4
- package/docs/extensions.md +18 -8
- package/docs/llama-cpp.md +3 -3
- package/docs/message-types.md +1 -0
- package/docs/models-configuration.md +14 -5
- package/docs/models.md +28 -10
- package/docs/nvidia-rtx-llama-cpp.md +5 -5
- package/docs/providers.md +7 -5
- package/docs/rpc-commands.md +2 -2
- package/docs/settings.md +4 -1
- package/docs/shell-aliases.md +1 -1
- package/docs/tui.md +2 -0
- package/docs/windows.md +2 -1
- package/examples/extensions/gondolin/index.ts +4 -7
- package/examples/extensions/subagent/index.ts +3 -2
- package/examples/rpc-extension-ui.ts +8 -7
- package/package.json +8 -8
- package/schemas/models.schema.json +4 -4
- package/schemas/settings.schema.json +30 -5
- package/dist/bundle/chunks/anthropic-messages-CA3HHOL3.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-76TWS6DT.js +0 -2
- package/dist/bundle/chunks/chunk-4KSTFUIK.js +0 -19
- package/dist/bundle/chunks/chunk-BAC3QPNW.js +0 -9
- package/dist/bundle/chunks/chunk-CF5GWZHW.js +0 -31
- package/dist/bundle/chunks/chunk-GFUN2N5K.js +0 -2
- package/dist/bundle/chunks/chunk-IQUU5XIT.js +0 -2
- package/dist/bundle/chunks/chunk-PMRZO46Y.js +0 -2
- package/dist/bundle/chunks/chunk-QN4TOIZN.js +0 -16
- package/dist/bundle/chunks/chunk-V7SLUK6A.js +0 -44
- package/dist/bundle/chunks/chunk-WU5T6NR4.js +0 -30
- package/dist/bundle/chunks/chunk-Y55SJART.js +0 -13
- package/dist/bundle/chunks/chunk-ZBIZYD6W.js +0 -2
- package/dist/bundle/chunks/chunk-ZGYS4UTC.js +0 -2
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-U4J7D646.js +0 -2
- package/dist/bundle/chunks/google-generative-ai-D5B6W47J.js +0 -2
- package/dist/bundle/chunks/google-vertex-U4H5YDEW.js +0 -2
- package/dist/bundle/chunks/mistral-conversations-S277EKLB.js +0 -5
- package/dist/bundle/chunks/openai-codex-responses-TEQRB65N.js +0 -10
- package/dist/bundle/chunks/openai-responses-BAKFWTGE.js +0 -4
- package/dist/bundle/chunks/openrouter-images-VXF5TVIK.js +0 -2
- package/dist/bundle/chunks/pi-messages-UBJKNDRN.js +0 -8
- package/dist/bundle/chunks/typesafe-system-one-56TEMIHL.js +0 -2
- package/dist/bundle/chunks/virtual-modules-PXSRIPHJ.js +0 -2
- package/dist/utils/deprecation.d.ts +0 -4
- package/dist/utils/deprecation.d.ts.map +0 -1
- package/dist/utils/deprecation.js +0 -13
- package/dist/utils/deprecation.js.map +0 -1
|
@@ -41,6 +41,7 @@ import { addMcpServerConfig } from "../../extensions/mcp/config.js";
|
|
|
41
41
|
import { getChangelogPath, getNewEntries, normalizeChangelogLinks, parseChangelog } from "../../utils/changelog.js";
|
|
42
42
|
import { copyToClipboard, readClipboardFilePaths, readClipboardText } from "../../utils/clipboard.js";
|
|
43
43
|
import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipboard-image.js";
|
|
44
|
+
import { flushStdout } from "../../utils/flush-stdout.js";
|
|
44
45
|
import { parseGitUrl } from "../../utils/git.js";
|
|
45
46
|
import { ensurePngTranscoder } from "../../utils/image-convert.js";
|
|
46
47
|
import { getCwdRelativePath, shortenHomePath } from "../../utils/paths.js";
|
|
@@ -90,7 +91,7 @@ import { UserMessageSelectorComponent } from "./components/user-message-selector
|
|
|
90
91
|
import { editInExternalEditor } from "./external-editor.js";
|
|
91
92
|
import { refreshModelCatalogs } from "./model-catalog-refresh.js";
|
|
92
93
|
import { getModelSearchText } from "./model-search.js";
|
|
93
|
-
import { ProgramStatusReporter } from "./program-status-reporter.js";
|
|
94
|
+
import { dialogBlockedStatus, ProgramStatusReporter } from "./program-status-reporter.js";
|
|
94
95
|
import { shareSession } from "./session-share.js";
|
|
95
96
|
import { getAvailableThemes, getAvailableThemesWithPaths, getEditorTheme, getMarkdownTheme, getThemeByName, onThemeChange, SYSTEM_THEME_NAME, setRegisteredThemes, stopThemeWatcher, Theme, theme, } from "./theme/theme.js";
|
|
96
97
|
import { InteractiveThemeController } from "./theme/theme-controller.js";
|
|
@@ -238,6 +239,41 @@ function formatLoginProviderCompletionDescription(provider) {
|
|
|
238
239
|
.join("/");
|
|
239
240
|
return provider.name === provider.id ? authTypes : `${provider.name} · ${authTypes}`;
|
|
240
241
|
}
|
|
242
|
+
/** Assistant diagnostics that list reasoning a provider withheld from the model, by diagnostic type. */
|
|
243
|
+
const REASONING_DROP_DIAGNOSTICS = new Map([
|
|
244
|
+
[
|
|
245
|
+
"anthropic_input_transformations",
|
|
246
|
+
{ provider: "Anthropic", droppedType: "thinking_dropped", noun: ["thinking block", "thinking blocks"] },
|
|
247
|
+
],
|
|
248
|
+
[
|
|
249
|
+
"openai_input_transformations",
|
|
250
|
+
{ provider: "OpenAI", droppedType: "reasoning", noun: ["reasoning item", "reasoning items"] },
|
|
251
|
+
],
|
|
252
|
+
]);
|
|
253
|
+
/** Count the reasoning blocks a provider reported as withheld from the request that produced `message`. */
|
|
254
|
+
function getDroppedReasoning(message) {
|
|
255
|
+
for (const diagnostic of message.diagnostics ?? []) {
|
|
256
|
+
const kind = REASONING_DROP_DIAGNOSTICS.get(diagnostic.type);
|
|
257
|
+
if (!kind)
|
|
258
|
+
continue;
|
|
259
|
+
// Session data: diagnostics details are untyped JSON.
|
|
260
|
+
const transformations = diagnostic.details?.transformations;
|
|
261
|
+
if (!Array.isArray(transformations))
|
|
262
|
+
continue;
|
|
263
|
+
const dropped = transformations.filter((transformation) => typeof transformation === "object" &&
|
|
264
|
+
transformation !== null &&
|
|
265
|
+
transformation.type === kind.droppedType);
|
|
266
|
+
if (dropped.length === 0)
|
|
267
|
+
continue;
|
|
268
|
+
const reasons = new Set();
|
|
269
|
+
for (const transformation of dropped) {
|
|
270
|
+
if (typeof transformation.reason === "string")
|
|
271
|
+
reasons.add(transformation.reason);
|
|
272
|
+
}
|
|
273
|
+
return { diagnostic: kind, count: dropped.length, reasons: [...reasons] };
|
|
274
|
+
}
|
|
275
|
+
return undefined;
|
|
276
|
+
}
|
|
241
277
|
export class InteractiveMode {
|
|
242
278
|
runtimeHost;
|
|
243
279
|
renderer;
|
|
@@ -385,6 +421,7 @@ export class InteractiveMode {
|
|
|
385
421
|
this.runtimeHost.setRebindSession(async () => {
|
|
386
422
|
await this.rebindCurrentSession({ renderBeforeBind: true });
|
|
387
423
|
this.themeController.applyFromSettings();
|
|
424
|
+
this.showRuntimeDiagnostics(this.runtimeHost.takeUnreportedDiagnostics());
|
|
388
425
|
});
|
|
389
426
|
this.version = VERSION;
|
|
390
427
|
this.renderer = createInteractiveTui({
|
|
@@ -679,6 +716,7 @@ export class InteractiveMode {
|
|
|
679
716
|
});
|
|
680
717
|
nextUi.setClearOnShrink(clearOnShrink);
|
|
681
718
|
nextUi.onDebug = onDebug;
|
|
719
|
+
nextUi.setSuspendSignalHandler(() => this.handleCtrlZ());
|
|
682
720
|
if (nextUi instanceof TuiMainScreen && this.mainScreenRenderState) {
|
|
683
721
|
nextUi.restoreRenderState(this.mainScreenRenderState);
|
|
684
722
|
}
|
|
@@ -743,6 +781,8 @@ export class InteractiveMode {
|
|
|
743
781
|
this.defaultEditor.onCtrlD = () => this.handleCtrlD();
|
|
744
782
|
this.defaultEditor.onSubmit = (text) => this.handleStartupSubmit(text);
|
|
745
783
|
this.ui.setFocus(this.editor);
|
|
784
|
+
// An external SIGTSTP (kill -TSTP) restores the terminal like Ctrl+Z (#12272).
|
|
785
|
+
this.ui.setSuspendSignalHandler(() => this.handleCtrlZ());
|
|
746
786
|
// Start the UI before initializing extensions so session_start handlers can use interactive dialogs
|
|
747
787
|
this.ui.start();
|
|
748
788
|
this.isInitialized = true;
|
|
@@ -906,17 +946,7 @@ export class InteractiveMode {
|
|
|
906
946
|
});
|
|
907
947
|
// Show startup warnings
|
|
908
948
|
const { migratedProviders, startupDiagnostics, modelFallbackMessage, initialMessage, initialImages, initialMessages, } = this.options;
|
|
909
|
-
|
|
910
|
-
if (diagnostic.type === "error") {
|
|
911
|
-
this.showError(diagnostic.message);
|
|
912
|
-
}
|
|
913
|
-
else if (diagnostic.type === "warning") {
|
|
914
|
-
this.showWarning(diagnostic.message);
|
|
915
|
-
}
|
|
916
|
-
else {
|
|
917
|
-
this.showStatus(diagnostic.message);
|
|
918
|
-
}
|
|
919
|
-
}
|
|
949
|
+
this.showRuntimeDiagnostics(startupDiagnostics ?? []);
|
|
920
950
|
if (migratedProviders && migratedProviders.length > 0) {
|
|
921
951
|
this.showWarning(`Migrated credentials to auth.json: ${migratedProviders.join(", ")}`);
|
|
922
952
|
}
|
|
@@ -1705,6 +1735,19 @@ export class InteractiveMode {
|
|
|
1705
1735
|
this.editor.setAutocompleteMaxVisible?.(autocompleteMaxVisible);
|
|
1706
1736
|
}
|
|
1707
1737
|
}
|
|
1738
|
+
showRuntimeDiagnostics(diagnostics) {
|
|
1739
|
+
for (const diagnostic of diagnostics) {
|
|
1740
|
+
if (diagnostic.type === "error") {
|
|
1741
|
+
this.showError(diagnostic.message);
|
|
1742
|
+
}
|
|
1743
|
+
else if (diagnostic.type === "warning") {
|
|
1744
|
+
this.showWarning(diagnostic.message);
|
|
1745
|
+
}
|
|
1746
|
+
else {
|
|
1747
|
+
this.showStatus(diagnostic.message);
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1708
1751
|
async rebindCurrentSession(options = {}) {
|
|
1709
1752
|
const session = this.session;
|
|
1710
1753
|
this.unsubscribe?.();
|
|
@@ -1739,6 +1782,7 @@ export class InteractiveMode {
|
|
|
1739
1782
|
}
|
|
1740
1783
|
stopThemeWatcher();
|
|
1741
1784
|
this.stop("transcript");
|
|
1785
|
+
await flushStdout();
|
|
1742
1786
|
process.exit(1);
|
|
1743
1787
|
}
|
|
1744
1788
|
getCrashExtensionHint(error) {
|
|
@@ -2200,8 +2244,14 @@ export class InteractiveMode {
|
|
|
2200
2244
|
setHeader: (factory) => this.setExtensionHeader(factory),
|
|
2201
2245
|
setTitle: (title) => this.ui.terminal.setTitle(title),
|
|
2202
2246
|
custom: (factory, options) => this.showExtensionCustom(factory, options),
|
|
2203
|
-
pasteToEditor: (text) =>
|
|
2204
|
-
|
|
2247
|
+
pasteToEditor: (text) => {
|
|
2248
|
+
this.editor.handleInput(`\x1b[200~${text}\x1b[201~`);
|
|
2249
|
+
this.ui.requestRender();
|
|
2250
|
+
},
|
|
2251
|
+
setEditorText: (text) => {
|
|
2252
|
+
this.editor.setText(text);
|
|
2253
|
+
this.ui.requestRender();
|
|
2254
|
+
},
|
|
2205
2255
|
getEditorText: () => this.editor.getExpandedText?.() ?? this.editor.getText(),
|
|
2206
2256
|
editor: (title, prefill) => this.showExtensionEditor(title, prefill),
|
|
2207
2257
|
addAutocompleteProvider: (factory) => {
|
|
@@ -2263,7 +2313,7 @@ export class InteractiveMode {
|
|
|
2263
2313
|
/**
|
|
2264
2314
|
* Show a selector for extensions.
|
|
2265
2315
|
*/
|
|
2266
|
-
showExtensionSelector(title, options, opts
|
|
2316
|
+
showExtensionSelector(title, options, opts) {
|
|
2267
2317
|
return new Promise((resolve) => {
|
|
2268
2318
|
if (opts?.signal?.aborted) {
|
|
2269
2319
|
resolve(undefined);
|
|
@@ -2278,16 +2328,16 @@ export class InteractiveMode {
|
|
|
2278
2328
|
const onAbort = () => finish(undefined);
|
|
2279
2329
|
opts?.signal?.addEventListener("abort", onAbort, { once: true });
|
|
2280
2330
|
const selector = new ExtensionSelectorComponent(title, options, (option) => finish(option), () => finish(undefined), { tui: this.ui, timeout: opts?.timeout, onToggleToolsExpanded: () => this.toggleToolOutputExpansion() });
|
|
2281
|
-
this.pushExtensionDialog(selector,
|
|
2331
|
+
this.pushExtensionDialog(selector, dialogBlockedStatus(opts?.blockedKind ?? "question", title));
|
|
2282
2332
|
});
|
|
2283
2333
|
}
|
|
2284
2334
|
/**
|
|
2285
2335
|
* Show a confirmation dialog for extensions.
|
|
2286
2336
|
*/
|
|
2287
2337
|
async showExtensionConfirm(title, message, opts) {
|
|
2288
|
-
const result = await this.showExtensionSelector(`${title}\n${message}`, ["Yes", "No"],
|
|
2289
|
-
|
|
2290
|
-
|
|
2338
|
+
const result = await this.showExtensionSelector(`${title}\n${message}`, ["Yes", "No"], {
|
|
2339
|
+
...opts,
|
|
2340
|
+
blockedKind: opts?.blockedKind ?? "permission",
|
|
2291
2341
|
});
|
|
2292
2342
|
return result === "Yes";
|
|
2293
2343
|
}
|
|
@@ -2314,7 +2364,7 @@ export class InteractiveMode {
|
|
|
2314
2364
|
const onAbort = () => finish(undefined);
|
|
2315
2365
|
opts?.signal?.addEventListener("abort", onAbort, { once: true });
|
|
2316
2366
|
const input = new ExtensionInputComponent(title, placeholder, (value) => finish(value), () => finish(undefined), { tui: this.ui, timeout: opts?.timeout });
|
|
2317
|
-
this.pushExtensionDialog(input,
|
|
2367
|
+
this.pushExtensionDialog(input, dialogBlockedStatus(opts?.blockedKind ?? "question", title));
|
|
2318
2368
|
});
|
|
2319
2369
|
}
|
|
2320
2370
|
/**
|
|
@@ -2327,7 +2377,7 @@ export class InteractiveMode {
|
|
|
2327
2377
|
resolve(value);
|
|
2328
2378
|
};
|
|
2329
2379
|
const editor = new ExtensionEditorComponent(this.ui, this.keybindings, title, prefill, (value) => finish(value), () => finish(undefined), undefined, this.settingsManager.getExternalEditorCommand());
|
|
2330
|
-
this.pushExtensionDialog(editor,
|
|
2380
|
+
this.pushExtensionDialog(editor, dialogBlockedStatus("question", title));
|
|
2331
2381
|
});
|
|
2332
2382
|
}
|
|
2333
2383
|
/**
|
|
@@ -3275,7 +3325,8 @@ export class InteractiveMode {
|
|
|
3275
3325
|
if (message.output) {
|
|
3276
3326
|
component.appendOutput(message.output);
|
|
3277
3327
|
}
|
|
3278
|
-
component.setComplete(message.exitCode, message.cancelled, message.truncated ? { truncated: true } : undefined, message.fullOutputPath);
|
|
3328
|
+
component.setComplete(message.exitCode, message.cancelled, message.truncated ? { truncated: true } : undefined, message.fullOutputPath, message.fullOutputError);
|
|
3329
|
+
component.setExpanded(this.toolOutputExpanded);
|
|
3279
3330
|
this.chatContainer.addChild(component);
|
|
3280
3331
|
break;
|
|
3281
3332
|
}
|
|
@@ -3352,7 +3403,7 @@ export class InteractiveMode {
|
|
|
3352
3403
|
const renderedPendingTools = new Map();
|
|
3353
3404
|
// Cache misses are not persisted, unlike successful cache-warming usage.
|
|
3354
3405
|
// Re-derive them and inject them after the assistant messages that paid for them.
|
|
3355
|
-
const cacheMisses = this.settingsManager.
|
|
3406
|
+
const cacheMisses = this.settingsManager.getNotices().cacheMisses
|
|
3356
3407
|
? collectCacheMisses(this.sessionManager.getEntries(), this.session.modelRuntime)
|
|
3357
3408
|
: new Map();
|
|
3358
3409
|
if (options.updateFooter) {
|
|
@@ -3465,7 +3516,7 @@ export class InteractiveMode {
|
|
|
3465
3516
|
this.renderSessionItems(items, messageMeta, options);
|
|
3466
3517
|
}
|
|
3467
3518
|
addCacheWarmingUsage(entry) {
|
|
3468
|
-
if (!this.settingsManager.
|
|
3519
|
+
if (!this.settingsManager.getNotices().cacheWarming)
|
|
3469
3520
|
return;
|
|
3470
3521
|
// Back-to-back warms collapse into one line with the cumulative cost.
|
|
3471
3522
|
const previous = this.cacheWarmingNotice;
|
|
@@ -3485,7 +3536,7 @@ export class InteractiveMode {
|
|
|
3485
3536
|
* from persisted summary usage and is not stored as a separate session entry.
|
|
3486
3537
|
*/
|
|
3487
3538
|
addCompactionCostNotice(notice) {
|
|
3488
|
-
if (!this.settingsManager.
|
|
3539
|
+
if (!this.settingsManager.getNotices().compactionCosts)
|
|
3489
3540
|
return;
|
|
3490
3541
|
const { usage } = notice;
|
|
3491
3542
|
const tokens = usage.input + usage.output + usage.cacheRead + usage.cacheWrite;
|
|
@@ -3494,42 +3545,30 @@ export class InteractiveMode {
|
|
|
3494
3545
|
this.chatContainer.addChild(new Spacer(1));
|
|
3495
3546
|
this.chatContainer.addChild(new ThemedText(() => theme.fg("warning", `${label}: ${formatTokens(tokens)} tokens billed${cost}`), 1, 0));
|
|
3496
3547
|
}
|
|
3497
|
-
static countDroppedThinkingBlocks(message) {
|
|
3498
|
-
let count = 0;
|
|
3499
|
-
for (const diagnostic of message.diagnostics ?? []) {
|
|
3500
|
-
if (diagnostic.type !== "anthropic_input_transformations")
|
|
3501
|
-
continue;
|
|
3502
|
-
const transformations = diagnostic.details?.transformations;
|
|
3503
|
-
if (!Array.isArray(transformations))
|
|
3504
|
-
continue;
|
|
3505
|
-
count += transformations.filter((transformation) => typeof transformation === "object" &&
|
|
3506
|
-
transformation !== null &&
|
|
3507
|
-
transformation.type === "thinking_dropped").length;
|
|
3508
|
-
}
|
|
3509
|
-
return count;
|
|
3510
|
-
}
|
|
3511
3548
|
maybeShowThinkingDropNotice(message) {
|
|
3512
|
-
if (!this.settingsManager.
|
|
3549
|
+
if (!this.settingsManager.getNotices().reasoningDrops)
|
|
3513
3550
|
return;
|
|
3514
|
-
const
|
|
3515
|
-
if (
|
|
3551
|
+
const dropped = getDroppedReasoning(message);
|
|
3552
|
+
if (!dropped)
|
|
3516
3553
|
return;
|
|
3517
|
-
|
|
3518
|
-
//
|
|
3519
|
-
// so the branch's last assistant message is the previous response.
|
|
3554
|
+
// Providers report a withheld block again on every later request that replays it, so only
|
|
3555
|
+
// a count above the previous response's means new losses. message_end reaches the UI before
|
|
3556
|
+
// the current message is persisted, so the branch's last assistant message is the previous response.
|
|
3520
3557
|
const branch = this.sessionManager.getBranch();
|
|
3521
3558
|
for (let i = branch.length - 1; i >= 0; i--) {
|
|
3522
3559
|
const entry = branch[i];
|
|
3523
3560
|
if (entry.type === "message" && entry.message.role === "assistant") {
|
|
3524
|
-
|
|
3561
|
+
const previous = getDroppedReasoning(entry.message);
|
|
3562
|
+
if (previous?.diagnostic === dropped.diagnostic && dropped.count <= previous.count)
|
|
3563
|
+
return;
|
|
3525
3564
|
break;
|
|
3526
3565
|
}
|
|
3527
3566
|
}
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
const
|
|
3567
|
+
const { provider, noun: nouns } = dropped.diagnostic;
|
|
3568
|
+
const noun = nouns[dropped.count === 1 ? 0 : 1];
|
|
3569
|
+
const reasons = dropped.reasons.length > 0 ? `: ${dropped.reasons.join(", ")}` : "";
|
|
3531
3570
|
this.chatContainer.addChild(new Spacer(1));
|
|
3532
|
-
this.chatContainer.addChild(new ThemedText(() => theme.fg("warning",
|
|
3571
|
+
this.chatContainer.addChild(new ThemedText(() => theme.fg("warning", `${provider} dropped ${dropped.count} ${noun}${reasons} (details in session)`), 1, 0));
|
|
3533
3572
|
}
|
|
3534
3573
|
/**
|
|
3535
3574
|
* Show a transcript notice when a completed assistant message paid for a
|
|
@@ -3537,7 +3576,7 @@ export class InteractiveMode {
|
|
|
3537
3576
|
* a model switch, or an idle gap past the cache TTL.
|
|
3538
3577
|
*/
|
|
3539
3578
|
maybeShowCacheMissNotice(message) {
|
|
3540
|
-
if (!this.settingsManager.
|
|
3579
|
+
if (!this.settingsManager.getNotices().cacheMisses)
|
|
3541
3580
|
return;
|
|
3542
3581
|
// Entries don't contain `message` yet: message_end fires before persistence.
|
|
3543
3582
|
const miss = detectCacheMiss(this.sessionManager.getEntries(), message, this.session.modelRuntime);
|
|
@@ -3641,6 +3680,8 @@ export class InteractiveMode {
|
|
|
3641
3680
|
this.themeController.disableAutoSync();
|
|
3642
3681
|
await this.ui.terminal.drainInput(1000);
|
|
3643
3682
|
this.stop();
|
|
3683
|
+
await flushStdout();
|
|
3684
|
+
killTrackedDetachedChildren();
|
|
3644
3685
|
process.exit(0);
|
|
3645
3686
|
}
|
|
3646
3687
|
// Interactive quit (Ctrl+D, Ctrl+C, /quit, extension shutdown()). Stop the
|
|
@@ -3654,8 +3695,13 @@ export class InteractiveMode {
|
|
|
3654
3695
|
await this.runtimeHost.dispose();
|
|
3655
3696
|
const resumeCommand = formatResumeCommand(this.sessionManager);
|
|
3656
3697
|
if (resumeCommand) {
|
|
3657
|
-
|
|
3698
|
+
// Own line so the command can be selected with a triple-click (#12237).
|
|
3699
|
+
process.stdout.write(`${chalk.dim("To resume this session:")}\n${resumeCommand}\n`);
|
|
3658
3700
|
}
|
|
3701
|
+
await flushStdout();
|
|
3702
|
+
// dispose() only starts killing a running `!` command, which on Windows loses the race with
|
|
3703
|
+
// exit. After the last await, so it also catches a shell spawned after the abort.
|
|
3704
|
+
killTrackedDetachedChildren();
|
|
3659
3705
|
process.exit(0);
|
|
3660
3706
|
}
|
|
3661
3707
|
emergencyTerminalExit() {
|
|
@@ -3718,10 +3764,7 @@ export class InteractiveMode {
|
|
|
3718
3764
|
}
|
|
3719
3765
|
registerSignalHandlers() {
|
|
3720
3766
|
this.unregisterSignalHandlers();
|
|
3721
|
-
const signals = ["SIGTERM"];
|
|
3722
|
-
if (process.platform !== "win32") {
|
|
3723
|
-
signals.push("SIGHUP");
|
|
3724
|
-
}
|
|
3767
|
+
const signals = ["SIGTERM", "SIGHUP"];
|
|
3725
3768
|
for (const signal of signals) {
|
|
3726
3769
|
const handler = () => {
|
|
3727
3770
|
// SIGHUP no longer hard-exits: graceful shutdown emits session_shutdown
|
|
@@ -4220,7 +4263,6 @@ export class InteractiveMode {
|
|
|
4220
4263
|
doubleEscapeAction: this.settingsManager.getDoubleEscapeAction(),
|
|
4221
4264
|
treeFilterMode: this.settingsManager.getTreeFilterMode(),
|
|
4222
4265
|
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
|
4223
|
-
showCacheMissNotices: this.settingsManager.getShowCacheMissNotices(),
|
|
4224
4266
|
defaultProjectTrust: this.settingsManager.getDefaultProjectTrust(),
|
|
4225
4267
|
editorPaddingX: this.settingsManager.getEditorPaddingX(),
|
|
4226
4268
|
outputPad: this.settingsManager.getOutputPad(),
|
|
@@ -4234,6 +4276,7 @@ export class InteractiveMode {
|
|
|
4234
4276
|
fullscreenCopyOnSelect: this.settingsManager.getFullscreenCopyOnSelect(),
|
|
4235
4277
|
fullscreenWheelScrollLines: this.settingsManager.getFullscreenWheelScrollLines(),
|
|
4236
4278
|
warnings: this.settingsManager.getWarnings(),
|
|
4279
|
+
notices: this.settingsManager.getNotices(),
|
|
4237
4280
|
}, {
|
|
4238
4281
|
onAutoCompactChange: (enabled) => {
|
|
4239
4282
|
this.session.setAutoCompactionEnabled(enabled);
|
|
@@ -4323,10 +4366,6 @@ export class InteractiveMode {
|
|
|
4323
4366
|
this.chatContainer.invalidate();
|
|
4324
4367
|
this.ui.requestRender();
|
|
4325
4368
|
},
|
|
4326
|
-
onShowCacheMissNoticesChange: (shown) => {
|
|
4327
|
-
this.settingsManager.setShowCacheMissNotices(shown);
|
|
4328
|
-
this.rebuildChatFromMessages();
|
|
4329
|
-
},
|
|
4330
4369
|
onCollapseChangelogChange: (collapsed) => {
|
|
4331
4370
|
this.settingsManager.setCollapseChangelog(collapsed);
|
|
4332
4371
|
},
|
|
@@ -4416,6 +4455,11 @@ export class InteractiveMode {
|
|
|
4416
4455
|
onWarningsChange: (warnings) => {
|
|
4417
4456
|
this.settingsManager.setWarnings(warnings);
|
|
4418
4457
|
},
|
|
4458
|
+
onNoticeChange: (key, shown) => {
|
|
4459
|
+
this.settingsManager.setNotice(key, shown);
|
|
4460
|
+
// Cache miss, cache warming and compaction notices are derived when the transcript renders.
|
|
4461
|
+
this.rebuildChatFromMessages();
|
|
4462
|
+
},
|
|
4419
4463
|
onCancel: () => {
|
|
4420
4464
|
done();
|
|
4421
4465
|
this.ui.requestRender();
|
|
@@ -4989,12 +5033,14 @@ export class InteractiveMode {
|
|
|
4989
5033
|
const options = [];
|
|
4990
5034
|
for (const provider of this.session.modelRuntime.getProviders()) {
|
|
4991
5035
|
const authStatus = this.session.modelRuntime.getProviderAuthStatus(provider.id);
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
|
|
4995
|
-
|
|
4996
|
-
|
|
4997
|
-
|
|
5036
|
+
let status;
|
|
5037
|
+
if (authStatus.configured) {
|
|
5038
|
+
const type = this.session.modelRuntime.isUsingOAuth(provider.id) ? "oauth" : "api_key";
|
|
5039
|
+
status = { kind: "configured", type, source: authStatus.label ?? authStatus.source };
|
|
5040
|
+
}
|
|
5041
|
+
else if (authStatus.source === "stored") {
|
|
5042
|
+
status = { kind: "unresolved" };
|
|
5043
|
+
}
|
|
4998
5044
|
const subscription = provider.auth.oauth?.isSubscription === true;
|
|
4999
5045
|
if ((!authType || authType === "oauth") && provider.auth.oauth) {
|
|
5000
5046
|
options.push({
|
|
@@ -5028,7 +5074,7 @@ export class InteractiveMode {
|
|
|
5028
5074
|
id: providerId,
|
|
5029
5075
|
name: provider?.name ?? providerId,
|
|
5030
5076
|
authType: type,
|
|
5031
|
-
status: { type, source: "stored credential" },
|
|
5077
|
+
status: { kind: "configured", type, source: "stored credential" },
|
|
5032
5078
|
subscription: provider?.auth.oauth?.isSubscription === true,
|
|
5033
5079
|
};
|
|
5034
5080
|
})
|
|
@@ -6045,7 +6091,7 @@ export class InteractiveMode {
|
|
|
6045
6091
|
if (result.output) {
|
|
6046
6092
|
this.bashComponent.appendOutput(result.output);
|
|
6047
6093
|
}
|
|
6048
|
-
this.bashComponent.setComplete(result.exitCode, result.cancelled, result.truncated ? { truncated: true, content: result.output } : undefined, result.fullOutputPath);
|
|
6094
|
+
this.bashComponent.setComplete(result.exitCode, result.cancelled, result.truncated ? { truncated: true, content: result.output } : undefined, result.fullOutputPath, result.fullOutputError);
|
|
6049
6095
|
// Record the result in session
|
|
6050
6096
|
this.session.recordBashResult(command, result, { excludeFromContext });
|
|
6051
6097
|
this.bashComponent = undefined;
|
|
@@ -6074,7 +6120,7 @@ export class InteractiveMode {
|
|
|
6074
6120
|
}
|
|
6075
6121
|
}, { excludeFromContext, operations: eventResult?.operations });
|
|
6076
6122
|
if (this.bashComponent) {
|
|
6077
|
-
this.bashComponent.setComplete(result.exitCode, result.cancelled, result.truncated ? { truncated: true, content: result.output } : undefined, result.fullOutputPath);
|
|
6123
|
+
this.bashComponent.setComplete(result.exitCode, result.cancelled, result.truncated ? { truncated: true, content: result.output } : undefined, result.fullOutputPath, result.fullOutputError);
|
|
6078
6124
|
}
|
|
6079
6125
|
}
|
|
6080
6126
|
catch (error) {
|