@draht/coding-agent 2026.10.31-1 → 2026.11.5-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 +131 -0
- package/dist/bundle/chunks/anthropic-messages-UJZ4SGHU.js +6 -0
- package/dist/bundle/chunks/azure-openai-responses-NCMJPZVJ.js +2 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +8 -5
- package/dist/bundle/chunks/{chunk-IGO52ZOY.js → chunk-3BJ462DN.js} +2 -2
- package/dist/bundle/chunks/chunk-5OXIAQP5.js +2 -0
- package/dist/bundle/chunks/chunk-6M3D4XVD.js +2 -0
- package/dist/bundle/chunks/chunk-AOCWORXE.js +2 -0
- package/dist/bundle/chunks/chunk-BK5LXGIH.js +2 -0
- package/dist/bundle/chunks/chunk-CA23BDNK.js +2 -0
- package/dist/bundle/chunks/chunk-DWOGGNWY.js +18 -0
- package/dist/bundle/chunks/{chunk-7ATV4EYW.js → chunk-EOXOMUKR.js} +1 -1
- package/dist/bundle/chunks/chunk-F5TDVH26.js +159 -0
- package/dist/bundle/chunks/chunk-HJ3PS7QP.js +4 -0
- package/dist/bundle/chunks/chunk-ITKDPD4D.js +12 -0
- package/dist/bundle/chunks/chunk-KFREX3FS.js +10 -0
- package/dist/bundle/chunks/{chunk-E4VZJRJ2.js → chunk-P7O36UDU.js} +2 -2
- package/dist/bundle/chunks/chunk-PMINB7UH.js +1401 -0
- package/dist/bundle/chunks/chunk-PZKD35UB.js +2 -0
- package/dist/bundle/chunks/{chunk-CPFKZX4B.js → chunk-Q2QKCYPU.js} +1 -1
- package/dist/bundle/chunks/chunk-QBUTRTYN.js +2 -0
- package/dist/bundle/chunks/chunk-SUVMF4W5.js +2 -0
- package/dist/bundle/chunks/chunk-UFACUBF2.js +16 -0
- package/dist/bundle/chunks/chunk-VXO6B72D.js +9 -0
- package/dist/bundle/chunks/{chunk-PMDUR6B5.js → chunk-WXASQQBZ.js} +2 -2
- package/dist/bundle/chunks/chunk-Y3NLUJYO.js +2 -0
- package/dist/bundle/chunks/chunk-Y7QE2R34.js +2 -0
- package/dist/bundle/chunks/chunk-YD5VPPI4.js +30 -0
- package/dist/bundle/chunks/chunk-YWRWN7ZB.js +82 -0
- package/dist/bundle/chunks/{cli-HTUB6WOG.js → cli-4SUT6MJ6.js} +10 -10
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-BJVMNETD.js +2 -0
- package/dist/bundle/chunks/{execute-UUPNZJJG.js → execute-ZI7T2SUH.js} +1 -1
- package/dist/bundle/chunks/github-copilot.js +1 -1
- package/dist/bundle/chunks/{google-generative-ai-A2277FHU.js → google-generative-ai-N5IPPKQY.js} +1 -1
- package/dist/bundle/chunks/{google-vertex-2KSVQZQN.js → google-vertex-A4BKUE4H.js} +1 -1
- package/dist/bundle/chunks/image-resize-worker.js +1 -1
- package/dist/bundle/chunks/kimi-coding.js +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-Y3DUSEM2.js → llama-cpp-classify-L4URPZ4F.js} +1 -1
- package/dist/bundle/chunks/meta.js +1 -1
- package/dist/bundle/chunks/mistral-conversations-CK2BS74V.js +5 -0
- package/dist/bundle/chunks/openai-codex-responses-XGVNKP4D.js +10 -0
- package/dist/bundle/chunks/openai-completions-72XZO4Q3.js +7 -0
- package/dist/bundle/chunks/{openai-decisions-JRN6M2KB.js → openai-decisions-P5OCXLLD.js} +1 -1
- package/dist/bundle/chunks/openai-responses-RGLZ4E3Q.js +4 -0
- package/dist/bundle/chunks/{openrouter-images-2XTVCXIC.js → openrouter-images-LSBWMZDK.js} +1 -1
- package/dist/bundle/chunks/pi-messages-CL4MEVNS.js +8 -0
- package/dist/bundle/chunks/radius.js +1 -1
- package/dist/bundle/chunks/{runtime-IB3XQ7E3.js → runtime-F4362CZF.js} +1 -1
- package/dist/bundle/chunks/{runtime-LB35PK4J.js → runtime-FJYRBK3O.js} +1 -1
- package/dist/bundle/chunks/settings-manager-T6G6KKY3.js +2 -0
- package/dist/bundle/chunks/typesafe-system-one-BFYS6AEA.js +2 -0
- package/dist/bundle/chunks/virtual-modules-BPZIVXNK.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 +8 -7
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/config-selector.d.ts.map +1 -1
- package/dist/cli/config-selector.js +3 -1
- package/dist/cli/config-selector.js.map +1 -1
- package/dist/config.d.ts +10 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +24 -5
- package/dist/config.js.map +1 -1
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +4 -3
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +16 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +104 -30
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/ai-schemas.d.ts +166 -0
- package/dist/core/ai-schemas.d.ts.map +1 -0
- package/dist/core/ai-schemas.js +21 -0
- package/dist/core/ai-schemas.js.map +1 -0
- package/dist/core/auth-storage.d.ts.map +1 -1
- package/dist/core/auth-storage.js +3 -2
- 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 +3 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/bug-report.d.ts +4 -4
- package/dist/core/cache-warmer.d.ts.map +1 -1
- package/dist/core/cache-warmer.js +2 -0
- package/dist/core/cache-warmer.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts +4 -2
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +16 -4
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/exec.d.ts +9 -1
- package/dist/core/exec.d.ts.map +1 -1
- package/dist/core/exec.js +104 -60
- package/dist/core/exec.js.map +1 -1
- package/dist/core/export-html/template.css +9 -0
- package/dist/core/export-html/template.js +165 -45
- package/dist/core/export-html/tool-renderer.d.ts.map +1 -1
- package/dist/core/export-html/tool-renderer.js +3 -0
- package/dist/core/export-html/tool-renderer.js.map +1 -1
- package/dist/core/extensions/ai-extension-view.d.ts +19 -0
- package/dist/core/extensions/ai-extension-view.d.ts.map +1 -0
- package/dist/core/extensions/ai-extension-view.js +22 -0
- package/dist/core/extensions/ai-extension-view.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 +15 -9
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +9 -1
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +55 -11
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/virtual-modules.js +6 -5
- package/dist/core/extensions/virtual-modules.js.map +1 -1
- package/dist/core/keybindings.d.ts +2 -2
- package/dist/core/keybindings.js +1 -1
- package/dist/core/keybindings.js.map +1 -1
- package/dist/core/mcp-servers.d.ts +21 -38
- package/dist/core/mcp-servers.d.ts.map +1 -1
- package/dist/core/mcp-servers.js +58 -134
- package/dist/core/mcp-servers.js.map +1 -1
- package/dist/core/model-config.d.ts +1717 -1990
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +2 -3
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +16 -9
- 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 +4 -4
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/package-manager.d.ts +24 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +215 -52
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/pi-manifest.d.ts +1 -0
- package/dist/core/pi-manifest.d.ts.map +1 -1
- package/dist/core/pi-manifest.js +3 -0
- package/dist/core/pi-manifest.js.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 +2 -1
- package/dist/core/provider-composer.d.ts.map +1 -1
- package/dist/core/provider-composer.js +8 -4
- package/dist/core/provider-composer.js.map +1 -1
- package/dist/core/resource-loader.d.ts +4 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +38 -23
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -1
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +7 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +32 -13
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +2 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +11 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/settings-schema.d.ts +4 -2
- package/dist/core/settings-schema.d.ts.map +1 -1
- package/dist/core/settings-schema.js +8 -1
- package/dist/core/settings-schema.js.map +1 -1
- package/dist/core/skills.d.ts.map +1 -1
- package/dist/core/skills.js +6 -15
- package/dist/core/skills.js.map +1 -1
- package/dist/core/slash-commands.js +2 -2
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/core/source-info.d.ts +9 -0
- package/dist/core/source-info.d.ts.map +1 -1
- package/dist/core/source-info.js +14 -0
- package/dist/core/source-info.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +5 -6
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/edit.d.ts +3 -3
- package/dist/core/tools/edit.d.ts.map +1 -1
- package/dist/core/tools/edit.js +2 -4
- package/dist/core/tools/edit.js.map +1 -1
- package/dist/core/tools/find.d.ts +2 -2
- package/dist/core/tools/find.d.ts.map +1 -1
- package/dist/core/tools/find.js +41 -25
- package/dist/core/tools/find.js.map +1 -1
- package/dist/core/tools/grep.d.ts +4 -5
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +73 -70
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts +2 -2
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +2 -1
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/core/tools/read.d.ts +2 -2
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/core/tools/render-utils.d.ts.map +1 -1
- package/dist/core/tools/render-utils.js +2 -7
- package/dist/core/tools/render-utils.js.map +1 -1
- package/dist/core/tools/renderers/write.d.ts.map +1 -1
- package/dist/core/tools/renderers/write.js +19 -19
- package/dist/core/tools/renderers/write.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts +11 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/tools/truncate.d.ts +0 -14
- package/dist/core/tools/truncate.d.ts.map +1 -1
- package/dist/core/tools/truncate.js +0 -29
- package/dist/core/tools/truncate.js.map +1 -1
- package/dist/core/tools/write.d.ts +2 -2
- package/dist/core/tools/write.d.ts.map +1 -1
- package/dist/core/tools/write.js.map +1 -1
- package/dist/core/trust-manager.d.ts.map +1 -1
- package/dist/core/trust-manager.js +15 -8
- package/dist/core/trust-manager.js.map +1 -1
- package/dist/core/usage-totals.d.ts.map +1 -1
- package/dist/core/usage-totals.js +2 -0
- package/dist/core/usage-totals.js.map +1 -1
- package/dist/extensions/codemode/renderer.d.ts.map +1 -1
- package/dist/extensions/codemode/renderer.js +6 -2
- package/dist/extensions/codemode/renderer.js.map +1 -1
- package/dist/extensions/codemode/tool.d.ts +2 -1
- package/dist/extensions/codemode/tool.d.ts.map +1 -1
- package/dist/extensions/codemode/tool.js +33 -8
- package/dist/extensions/codemode/tool.js.map +1 -1
- package/dist/extensions/llama/client.d.ts +2 -0
- package/dist/extensions/llama/client.d.ts.map +1 -1
- package/dist/extensions/llama/client.js +23 -2
- package/dist/extensions/llama/client.js.map +1 -1
- package/dist/extensions/llama/ui.d.ts.map +1 -1
- package/dist/extensions/llama/ui.js +16 -4
- package/dist/extensions/llama/ui.js.map +1 -1
- package/dist/extensions/mcp/cli.d.ts +2 -0
- package/dist/extensions/mcp/cli.d.ts.map +1 -1
- package/dist/extensions/mcp/cli.js +72 -15
- package/dist/extensions/mcp/cli.js.map +1 -1
- package/dist/extensions/mcp/config.d.ts.map +1 -1
- package/dist/extensions/mcp/config.js +4 -7
- package/dist/extensions/mcp/config.js.map +1 -1
- package/dist/extensions/mcp/index.d.ts.map +1 -1
- package/dist/extensions/mcp/index.js +2 -2
- package/dist/extensions/mcp/index.js.map +1 -1
- package/dist/extensions/mcp/oauth.d.ts +13 -50
- package/dist/extensions/mcp/oauth.d.ts.map +1 -1
- package/dist/extensions/mcp/oauth.js +53 -319
- package/dist/extensions/mcp/oauth.js.map +1 -1
- package/dist/extensions/mcp/resources.d.ts +1 -1
- package/dist/extensions/mcp/resources.d.ts.map +1 -1
- package/dist/extensions/mcp/resources.js +4 -3
- package/dist/extensions/mcp/resources.js.map +1 -1
- package/dist/extensions/mcp/runtime.d.ts +4 -3
- package/dist/extensions/mcp/runtime.d.ts.map +1 -1
- package/dist/extensions/mcp/runtime.js +4 -3
- package/dist/extensions/mcp/runtime.js.map +1 -1
- package/dist/extensions/mcp/tools.d.ts +2 -23
- package/dist/extensions/mcp/tools.d.ts.map +1 -1
- package/dist/extensions/mcp/tools.js +6 -58
- package/dist/extensions/mcp/tools.js.map +1 -1
- package/dist/extensions/mcp/ui.d.ts +1 -0
- package/dist/extensions/mcp/ui.d.ts.map +1 -1
- package/dist/extensions/mcp/ui.js +33 -24
- package/dist/extensions/mcp/ui.js.map +1 -1
- package/dist/extensions/tool-search/tool.d.ts +21 -6
- package/dist/extensions/tool-search/tool.d.ts.map +1 -1
- package/dist/extensions/tool-search/tool.js +104 -36
- package/dist/extensions/tool-search/tool.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +16 -8
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +4 -1
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +44 -20
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts +5 -1
- package/dist/modes/interactive/components/branch-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/branch-summary-message.js +12 -4
- package/dist/modes/interactive/components/branch-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts +5 -1
- package/dist/modes/interactive/components/compaction-summary-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/compaction-summary-message.js +12 -4
- package/dist/modes/interactive/components/compaction-summary-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +4 -18
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +7 -0
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/custom-entry.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-entry.js +2 -1
- package/dist/modes/interactive/components/custom-entry.js.map +1 -1
- package/dist/modes/interactive/components/custom-message.d.ts +5 -2
- package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-message.js +12 -4
- package/dist/modes/interactive/components/custom-message.js.map +1 -1
- package/dist/modes/interactive/components/diff.d.ts.map +1 -1
- package/dist/modes/interactive/components/diff.js +11 -5
- package/dist/modes/interactive/components/diff.js.map +1 -1
- package/dist/modes/interactive/components/extension-editor.d.ts +2 -0
- package/dist/modes/interactive/components/extension-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-editor.js +4 -0
- package/dist/modes/interactive/components/extension-editor.js.map +1 -1
- package/dist/modes/interactive/components/extension-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/extension-selector.js +9 -1
- package/dist/modes/interactive/components/extension-selector.js.map +1 -1
- package/dist/modes/interactive/components/login-dialog.d.ts +5 -0
- package/dist/modes/interactive/components/login-dialog.d.ts.map +1 -1
- package/dist/modes/interactive/components/login-dialog.js +104 -10
- package/dist/modes/interactive/components/login-dialog.js.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts +2 -1
- package/dist/modes/interactive/components/markdown-transform.d.ts.map +1 -1
- package/dist/modes/interactive/components/markdown-transform.js +3 -2
- package/dist/modes/interactive/components/markdown-transform.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts +2 -1
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
- package/dist/modes/interactive/components/mermaid.js +25 -20
- package/dist/modes/interactive/components/mermaid.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.d.ts +1 -0
- package/dist/modes/interactive/components/model-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +17 -6
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.d.ts +1 -0
- package/dist/modes/interactive/components/oauth-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/oauth-selector.js +13 -4
- package/dist/modes/interactive/components/oauth-selector.js.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.d.ts +1 -0
- package/dist/modes/interactive/components/scoped-models-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/scoped-models-selector.js +14 -3
- package/dist/modes/interactive/components/scoped-models-selector.js.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.d.ts +4 -0
- package/dist/modes/interactive/components/session-selector-search.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector-search.js +86 -22
- package/dist/modes/interactive/components/session-selector-search.js.map +1 -1
- package/dist/modes/interactive/components/session-selector.d.ts +2 -1
- package/dist/modes/interactive/components/session-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/session-selector.js +20 -27
- package/dist/modes/interactive/components/session-selector.js.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-submenu.js +2 -0
- package/dist/modes/interactive/components/settings-submenu.js.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts +5 -1
- package/dist/modes/interactive/components/skill-invocation-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/skill-invocation-message.js +12 -4
- package/dist/modes/interactive/components/skill-invocation-message.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts +6 -0
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +14 -2
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/tree-selector.d.ts +2 -0
- package/dist/modes/interactive/components/tree-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/tree-selector.js +24 -16
- package/dist/modes/interactive/components/tree-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.d.ts +1 -0
- package/dist/modes/interactive/components/user-message-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message-selector.js +9 -1
- package/dist/modes/interactive/components/user-message-selector.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts +3 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +6 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/external-editor.d.ts +1 -0
- package/dist/modes/interactive/external-editor.d.ts.map +1 -1
- package/dist/modes/interactive/external-editor.js +16 -4
- package/dist/modes/interactive/external-editor.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +7 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +179 -53
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/model-search.d.ts +10 -0
- package/dist/modes/interactive/model-search.d.ts.map +1 -1
- package/dist/modes/interactive/model-search.js +21 -0
- package/dist/modes/interactive/model-search.js.map +1 -1
- package/dist/modes/interactive/theme/theme.d.ts +10 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +35 -23
- 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 +19 -10
- package/dist/modes/print-mode.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +53 -23
- 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 +78 -9
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/ansi.d.ts.map +1 -1
- package/dist/utils/ansi.js +5 -2
- package/dist/utils/ansi.js.map +1 -1
- package/dist/utils/changelog.d.ts +2 -2
- package/dist/utils/changelog.d.ts.map +1 -1
- package/dist/utils/changelog.js +15 -2
- package/dist/utils/changelog.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts.map +1 -1
- package/dist/utils/clipboard-command.js +4 -0
- package/dist/utils/clipboard-command.js.map +1 -1
- package/dist/utils/git.d.ts +1 -1
- package/dist/utils/git.d.ts.map +1 -1
- package/dist/utils/git.js.map +1 -1
- package/dist/utils/image-resize-core.d.ts.map +1 -1
- package/dist/utils/image-resize-core.js +5 -3
- package/dist/utils/image-resize-core.js.map +1 -1
- package/dist/utils/open-browser.d.ts.map +1 -1
- package/dist/utils/open-browser.js +4 -1
- package/dist/utils/open-browser.js.map +1 -1
- package/dist/utils/paths.d.ts +17 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +42 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +14 -0
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/syntax-highlight.d.ts +5 -0
- package/dist/utils/syntax-highlight.d.ts.map +1 -1
- package/dist/utils/syntax-highlight.js +7 -0
- package/dist/utils/syntax-highlight.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +30 -35
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/cli.md +22 -10
- package/docs/custom-provider.md +2 -0
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +3201 -233
- package/docs/keybindings.md +2 -2
- package/docs/llama-cpp.md +23 -15
- package/docs/message-types.md +1 -1
- package/docs/models-configuration.md +17 -4
- package/docs/models.md +9 -4
- package/docs/packages.md +24 -0
- package/docs/providers.md +1 -1
- package/docs/rpc.md +3 -1
- package/docs/sessions.md +11 -3
- package/docs/settings.md +5 -4
- package/docs/slash-commands.md +3 -2
- package/docs/terminal-setup.md +3 -1
- package/docs/tmux.md +6 -0
- package/docs/tui.md +2 -0
- package/docs/windows.md +27 -0
- package/eval/drahtbank/isolated-tools.ts +0 -1
- package/examples/extensions/antigravity-image-gen.ts +1 -1
- package/examples/extensions/custom-provider-anthropic/index.ts +27 -31
- package/examples/extensions/debug-provider.ts +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/plan-mode/index.ts +23 -13
- package/examples/extensions/plan-mode/utils.ts +42 -16
- package/examples/extensions/preset.ts +2 -0
- package/examples/extensions/reload-runtime.ts +17 -5
- package/examples/extensions/sandbox/package-lock.json +15 -41
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/index.ts +388 -171
- package/examples/extensions/todo.ts +7 -0
- package/examples/extensions/tools.ts +2 -0
- package/examples/tsconfig.json +188 -0
- package/package.json +15 -16
- package/schemas/models.schema.json +85 -39
- package/schemas/settings.schema.json +17 -0
- package/dist/bundle/chunks/anthropic-messages-CZYDBUW7.js +0 -6
- package/dist/bundle/chunks/azure-openai-responses-UKM4K3L6.js +0 -2
- package/dist/bundle/chunks/chunk-2TZWVGCR.js +0 -2
- package/dist/bundle/chunks/chunk-76YNMQ57.js +0 -2
- package/dist/bundle/chunks/chunk-AS6DCLAM.js +0 -1428
- package/dist/bundle/chunks/chunk-BL72B6LV.js +0 -82
- package/dist/bundle/chunks/chunk-C2XCXA6V.js +0 -2
- package/dist/bundle/chunks/chunk-CLKG6K6Z.js +0 -7
- package/dist/bundle/chunks/chunk-FOYIPAAD.js +0 -6
- package/dist/bundle/chunks/chunk-FXCTQRNN.js +0 -2
- package/dist/bundle/chunks/chunk-H5BLLINF.js +0 -11
- package/dist/bundle/chunks/chunk-IT4RIOZD.js +0 -2
- package/dist/bundle/chunks/chunk-N3FZGIII.js +0 -16
- package/dist/bundle/chunks/chunk-OCUU7HYF.js +0 -2
- package/dist/bundle/chunks/chunk-QMN7OD6G.js +0 -2
- package/dist/bundle/chunks/chunk-UCJ7FLSO.js +0 -166
- package/dist/bundle/chunks/chunk-WFHH5SX6.js +0 -4
- package/dist/bundle/chunks/chunk-WYWBXNDO.js +0 -6
- package/dist/bundle/chunks/chunk-XOGEYN4Q.js +0 -2
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-V37VPUK4.js +0 -2
- package/dist/bundle/chunks/mistral-conversations-R2NJADHS.js +0 -5
- package/dist/bundle/chunks/openai-codex-responses-KJZDJELP.js +0 -10
- package/dist/bundle/chunks/openai-completions-RTWADJBP.js +0 -7
- package/dist/bundle/chunks/openai-responses-B7ASLN2Z.js +0 -4
- package/dist/bundle/chunks/pi-messages-7TX4RC24.js +0 -8
- package/dist/bundle/chunks/settings-manager-YNY5F4RU.js +0 -2
- package/dist/bundle/chunks/typesafe-system-one-7BNMQFXE.js +0 -2
- package/dist/bundle/chunks/virtual-modules-OFCQ5AEG.js +0 -2
|
@@ -33,6 +33,7 @@ import { formatMissingSessionCwdPrompt, MissingSessionCwdError } from "../../cor
|
|
|
33
33
|
import { SessionManager, sessionEntryToContextMessages, } from "../../core/session-manager.js";
|
|
34
34
|
import { BUILTIN_SLASH_COMMANDS } from "../../core/slash-commands.js";
|
|
35
35
|
import { boundedSafeText } from "../../core/socket-server/safe-text.js";
|
|
36
|
+
import { getSourcePackageKey } from "../../core/source-info.js";
|
|
36
37
|
import { withBuiltInRenderers } from "../../core/tools/renderers/index.js";
|
|
37
38
|
import { hasTrustRequiringProjectResources, ProjectTrustStore } from "../../core/trust-manager.js";
|
|
38
39
|
import { getUsageCostBreakdown } from "../../core/usage-totals.js";
|
|
@@ -43,9 +44,10 @@ import { extensionForImageMimeType, readClipboardImage } from "../../utils/clipb
|
|
|
43
44
|
import { parseGitUrl } from "../../utils/git.js";
|
|
44
45
|
import { ensurePngTranscoder } from "../../utils/image-convert.js";
|
|
45
46
|
import { sendTerminalNotification } from "../../utils/notify.js";
|
|
46
|
-
import { getCwdRelativePath } from "../../utils/paths.js";
|
|
47
|
+
import { getCwdRelativePath, shortenHomePath } from "../../utils/paths.js";
|
|
47
48
|
import { killTrackedDetachedChildren } from "../../utils/shell.js";
|
|
48
49
|
import { loadAllHighlightLanguages } from "../../utils/syntax-highlight.js";
|
|
50
|
+
import { stripBom } from "../../utils/text.js";
|
|
49
51
|
import { ensureTool } from "../../utils/tools-manager.js";
|
|
50
52
|
import { checkForNewPiVersion } from "../../utils/version-check.js";
|
|
51
53
|
import { reportBug } from "./bug-report.js";
|
|
@@ -67,6 +69,7 @@ import { boundDialogText, ExtensionSelectorComponent, MAX_DETAIL_ROWS } from "./
|
|
|
67
69
|
import { FooterComponent, formatTokens } from "./components/footer.js";
|
|
68
70
|
import { formatKeyText, keyDisplayText, keyHint, keyText, rawKeyHint } from "./components/keybinding-hints.js";
|
|
69
71
|
import { LoginDialogComponent } from "./components/login-dialog.js";
|
|
72
|
+
import { createMarkdownTransform } from "./components/markdown-transform.js";
|
|
70
73
|
import { createMermaidMarkdownTransformer } from "./components/mermaid.js";
|
|
71
74
|
import { ModelSelectorComponent } from "./components/model-selector.js";
|
|
72
75
|
import { formatAuthSelectorProviderStatus, formatAuthSelectorProviderType, OAuthSelectorComponent, } from "./components/oauth-selector.js";
|
|
@@ -266,6 +269,7 @@ export class InteractiveMode {
|
|
|
266
269
|
lastSigintTime = 0;
|
|
267
270
|
lastEscapeTime = 0;
|
|
268
271
|
changelogMarkdown = undefined;
|
|
272
|
+
extensionChangelogUpdates = [];
|
|
269
273
|
startupNoticesShown = false;
|
|
270
274
|
anthropicSubscriptionWarningShown = false;
|
|
271
275
|
// Status line tracking (for mutating immediately-sequential status updates)
|
|
@@ -567,24 +571,44 @@ export class InteractiveMode {
|
|
|
567
571
|
return;
|
|
568
572
|
}
|
|
569
573
|
this.startupNoticesShown = true;
|
|
570
|
-
if (!this.changelogMarkdown) {
|
|
574
|
+
if (!this.changelogMarkdown && this.extensionChangelogUpdates.length === 0) {
|
|
571
575
|
return;
|
|
572
576
|
}
|
|
573
577
|
if (this.chatContainer.children.length > 0) {
|
|
574
578
|
this.chatContainer.addChild(new Spacer(1));
|
|
575
579
|
}
|
|
576
580
|
this.chatContainer.addChild(new DynamicBorder());
|
|
577
|
-
if (this.
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
581
|
+
if (this.changelogMarkdown) {
|
|
582
|
+
if (this.settingsManager.getCollapseChangelog()) {
|
|
583
|
+
const versionMatch = this.changelogMarkdown.match(/##\s+\[?(\d+\.\d+\.\d+)\]?/);
|
|
584
|
+
const latestVersion = versionMatch ? versionMatch[1] : this.version;
|
|
585
|
+
const condensedText = `Updated to v${latestVersion}. Use ${theme.bold("/changelog")} to view full changelog.`;
|
|
586
|
+
this.chatContainer.addChild(new Text(condensedText, 1, 0));
|
|
587
|
+
}
|
|
588
|
+
else {
|
|
589
|
+
this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "What's New")), 1, 0));
|
|
590
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
591
|
+
this.chatContainer.addChild(this.createChangelogMarkdown(this.changelogMarkdown.trim(), 1, 0));
|
|
592
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
593
|
+
}
|
|
582
594
|
}
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
this.
|
|
595
|
+
if (this.extensionChangelogUpdates.length > 0) {
|
|
596
|
+
if (this.changelogMarkdown) {
|
|
597
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
598
|
+
}
|
|
599
|
+
if (this.settingsManager.getCollapseChangelog()) {
|
|
600
|
+
const condensedText = this.extensionChangelogUpdates
|
|
601
|
+
.map((update) => `Updated ${update.name} to v${update.version}.`)
|
|
602
|
+
.join("\n");
|
|
603
|
+
this.chatContainer.addChild(new Text(condensedText, 1, 0));
|
|
604
|
+
}
|
|
605
|
+
else {
|
|
606
|
+
this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "Extension Updates")), 1, 0));
|
|
607
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
608
|
+
const markdown = this.extensionChangelogUpdates.map((update) => update.markdown).join("\n\n");
|
|
609
|
+
this.chatContainer.addChild(this.createChangelogMarkdown(markdown, 1, 0));
|
|
610
|
+
this.chatContainer.addChild(new Spacer(1));
|
|
611
|
+
}
|
|
588
612
|
}
|
|
589
613
|
this.chatContainer.addChild(new DynamicBorder());
|
|
590
614
|
}
|
|
@@ -661,20 +685,15 @@ export class InteractiveMode {
|
|
|
661
685
|
if (this.isInitialized)
|
|
662
686
|
return;
|
|
663
687
|
this.registerSignalHandlers();
|
|
664
|
-
// Load
|
|
688
|
+
// Load changelogs (only show new entries, skip for resumed sessions)
|
|
665
689
|
this.changelogMarkdown = this.getChangelogForDisplay();
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
.
|
|
673
|
-
const cycleKeys = this.keybindings.getKeys("app.model.cycleForward");
|
|
674
|
-
const cycleHint = cycleKeys.length > 0
|
|
675
|
-
? theme.fg("muted", ` (${formatKeyText(cycleKeys.join("/"), { capitalize: true })} to cycle)`)
|
|
676
|
-
: "";
|
|
677
|
-
console.log(theme.fg("dim", `Model scope: ${modelList}${cycleHint}`));
|
|
690
|
+
this.extensionChangelogUpdates = this.getExtensionChangelogUpdates();
|
|
691
|
+
// Fullscreen renders on the alternate screen, so text printed to stdout here would stay in the shell
|
|
692
|
+
// after exit. Fullscreen shows the notice in the header instead (#11508).
|
|
693
|
+
if (this.renderer.mode !== "fullscreen") {
|
|
694
|
+
const modelScopeNotice = this.getModelScopeNotice();
|
|
695
|
+
if (modelScopeNotice)
|
|
696
|
+
console.log(modelScopeNotice);
|
|
678
697
|
}
|
|
679
698
|
// Keep one component tree and remount it when changing renderers.
|
|
680
699
|
this.renderWidgets(); // Initialize with default spacer
|
|
@@ -781,6 +800,8 @@ export class InteractiveMode {
|
|
|
781
800
|
this.builtInHeader = new Text("", 0, 0);
|
|
782
801
|
this.headerContainer.addChild(this.builtInHeader);
|
|
783
802
|
}
|
|
803
|
+
if (this.renderer.mode === "fullscreen")
|
|
804
|
+
this.showFullscreenModelScopeNotice();
|
|
784
805
|
this.ui.requestRender();
|
|
785
806
|
// Ensure fd and rg are available after mounting the TUI (downloads if missing, adds to PATH via getBinDir)
|
|
786
807
|
// so slow downloads do not make startup appear frozen.
|
|
@@ -1010,12 +1031,74 @@ export class InteractiveMode {
|
|
|
1010
1031
|
return undefined;
|
|
1011
1032
|
}
|
|
1012
1033
|
const newEntries = getNewEntries(entries, lastVersion);
|
|
1034
|
+
if (!newEntries) {
|
|
1035
|
+
// Unreadable saved version: show nothing and record the current one so later updates compare again
|
|
1036
|
+
this.settingsManager.setLastChangelogVersion(VERSION);
|
|
1037
|
+
return undefined;
|
|
1038
|
+
}
|
|
1013
1039
|
if (newEntries.length > 0) {
|
|
1014
1040
|
this.settingsManager.setLastChangelogVersion(VERSION);
|
|
1015
1041
|
return newEntries.map((e) => normalizeChangelogLinks(e.content, e)).join("\n\n");
|
|
1016
1042
|
}
|
|
1017
1043
|
return undefined;
|
|
1018
1044
|
}
|
|
1045
|
+
getExtensionChangelogUpdates() {
|
|
1046
|
+
// Skip changelog for resumed/continued sessions (already have messages)
|
|
1047
|
+
if (this.session.state.messages.length > 0) {
|
|
1048
|
+
return [];
|
|
1049
|
+
}
|
|
1050
|
+
const seenKeys = new Set();
|
|
1051
|
+
const updates = [];
|
|
1052
|
+
for (const { sourceInfo } of this.session.resourceLoader.getExtensions().extensions) {
|
|
1053
|
+
if (sourceInfo.origin !== "package" || !sourceInfo.baseDir || !sourceInfo.changelogPath) {
|
|
1054
|
+
continue;
|
|
1055
|
+
}
|
|
1056
|
+
const key = getSourcePackageKey(sourceInfo);
|
|
1057
|
+
if (seenKeys.has(key)) {
|
|
1058
|
+
continue;
|
|
1059
|
+
}
|
|
1060
|
+
seenKeys.add(key);
|
|
1061
|
+
const pkg = this.readPackageJson(sourceInfo.baseDir);
|
|
1062
|
+
if (!pkg?.version) {
|
|
1063
|
+
continue;
|
|
1064
|
+
}
|
|
1065
|
+
const lastVersion = this.settingsManager.getExtensionChangelogVersion(key);
|
|
1066
|
+
if (!lastVersion) {
|
|
1067
|
+
// Fresh install - record the version, don't show changelog
|
|
1068
|
+
this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
|
|
1069
|
+
continue;
|
|
1070
|
+
}
|
|
1071
|
+
const newEntries = getNewEntries(parseChangelog(sourceInfo.changelogPath), lastVersion);
|
|
1072
|
+
if (!newEntries) {
|
|
1073
|
+
// Unreadable saved version: show nothing and record the current one so later updates compare again
|
|
1074
|
+
this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
|
|
1075
|
+
continue;
|
|
1076
|
+
}
|
|
1077
|
+
if (newEntries.length > 0) {
|
|
1078
|
+
this.settingsManager.setExtensionChangelogVersion(key, pkg.version);
|
|
1079
|
+
const name = pkg.name || sourceInfo.source;
|
|
1080
|
+
// Prefix each "## [x.y.z]" heading with the package name so entries render like draht's own.
|
|
1081
|
+
const markdown = newEntries
|
|
1082
|
+
.map((entry) => entry.content.replace(/^##\s+/, `## ${name} `))
|
|
1083
|
+
.join("\n\n")
|
|
1084
|
+
.trim();
|
|
1085
|
+
updates.push({ name, version: pkg.version, markdown });
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
return updates;
|
|
1089
|
+
}
|
|
1090
|
+
readPackageJson(packageRoot) {
|
|
1091
|
+
try {
|
|
1092
|
+
const pkg = JSON.parse(stripBom(fs.readFileSync(path.join(packageRoot, "package.json"), "utf-8")));
|
|
1093
|
+
return {
|
|
1094
|
+
name: typeof pkg.name === "string" ? pkg.name : undefined,
|
|
1095
|
+
version: typeof pkg.version === "string" ? pkg.version : undefined,
|
|
1096
|
+
};
|
|
1097
|
+
}
|
|
1098
|
+
catch {
|
|
1099
|
+
return undefined;
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1019
1102
|
getMarkdownThemeWithSettings() {
|
|
1020
1103
|
return {
|
|
1021
1104
|
...getMarkdownTheme(),
|
|
@@ -1026,13 +1109,7 @@ export class InteractiveMode {
|
|
|
1026
1109
|
// Extension System
|
|
1027
1110
|
// =========================================================================
|
|
1028
1111
|
formatDisplayPath(p) {
|
|
1029
|
-
|
|
1030
|
-
let result = p;
|
|
1031
|
-
// Replace home directory with ~
|
|
1032
|
-
if (result.startsWith(home)) {
|
|
1033
|
-
result = `~${result.slice(home.length)}`;
|
|
1034
|
-
}
|
|
1035
|
-
return result;
|
|
1112
|
+
return shortenHomePath(p);
|
|
1036
1113
|
}
|
|
1037
1114
|
formatExtensionDisplayPath(path) {
|
|
1038
1115
|
let result = this.formatDisplayPath(path);
|
|
@@ -1056,6 +1133,27 @@ export class InteractiveMode {
|
|
|
1056
1133
|
return this.options.verbose === true || this.settingsManager.getQuietStartup() !== true;
|
|
1057
1134
|
}
|
|
1058
1135
|
/** Startup details (model scope, loaded resources). Hidden by quietStartup: true or "header". */
|
|
1136
|
+
getModelScopeNotice() {
|
|
1137
|
+
if (this.session.scopedModels.length === 0 || !this.shouldShowStartupDetails())
|
|
1138
|
+
return undefined;
|
|
1139
|
+
const modelList = this.session.scopedModels
|
|
1140
|
+
.map((sm) => {
|
|
1141
|
+
const thinkingStr = sm.thinkingLevel ? `:${sm.thinkingLevel}` : "";
|
|
1142
|
+
return `${sm.model.id}${thinkingStr}`;
|
|
1143
|
+
})
|
|
1144
|
+
.join(", ");
|
|
1145
|
+
const cycleKeys = this.keybindings.getKeys("app.model.cycleForward");
|
|
1146
|
+
const cycleHint = cycleKeys.length > 0
|
|
1147
|
+
? theme.fg("muted", ` (${formatKeyText(cycleKeys.join("/"), { capitalize: true })} to cycle)`)
|
|
1148
|
+
: "";
|
|
1149
|
+
return theme.fg("dim", `Model scope: ${modelList}${cycleHint}`);
|
|
1150
|
+
}
|
|
1151
|
+
showFullscreenModelScopeNotice() {
|
|
1152
|
+
if (!this.getModelScopeNotice())
|
|
1153
|
+
return;
|
|
1154
|
+
this.headerContainer.addChild(new ThemedText(() => this.getModelScopeNotice() ?? "", 1, 0));
|
|
1155
|
+
this.headerContainer.addChild(new Spacer(1));
|
|
1156
|
+
}
|
|
1059
1157
|
shouldShowStartupDetails() {
|
|
1060
1158
|
return this.options.verbose === true || this.settingsManager.getQuietStartup() === false;
|
|
1061
1159
|
}
|
|
@@ -1426,7 +1524,7 @@ export class InteractiveMode {
|
|
|
1426
1524
|
const skillDiagnostics = skillsResult.diagnostics;
|
|
1427
1525
|
if (skillDiagnostics.length > 0) {
|
|
1428
1526
|
const warningLines = () => this.formatDiagnostics(skillDiagnostics, sourceInfos);
|
|
1429
|
-
this.loadedResourcesContainer.addChild(new ThemedText(() => `${theme.fg("warning", "[Skill
|
|
1527
|
+
this.loadedResourcesContainer.addChild(new ThemedText(() => `${theme.fg("warning", "[Skill warnings]")}\n${warningLines()}`, 0, 0));
|
|
1430
1528
|
this.loadedResourcesContainer.addChild(new Spacer(1));
|
|
1431
1529
|
}
|
|
1432
1530
|
const promptDiagnostics = promptsResult.diagnostics;
|
|
@@ -1703,6 +1801,12 @@ export class InteractiveMode {
|
|
|
1703
1801
|
getMarkdownTransformers() {
|
|
1704
1802
|
return [this.mermaidMarkdownTransformer, ...this.session.extensionRunner.getMarkdownTransformers()];
|
|
1705
1803
|
}
|
|
1804
|
+
/** Markdown of a changelog or release note that runs the Markdown transformers of the `changelog` type. */
|
|
1805
|
+
createChangelogMarkdown(markdown, paddingX, paddingY, defaultTextStyle) {
|
|
1806
|
+
return new Markdown(markdown, paddingX, paddingY, this.getMarkdownThemeWithSettings(), defaultTextStyle, {
|
|
1807
|
+
transform: createMarkdownTransform("changelog", () => false, this.getMarkdownTransformers()),
|
|
1808
|
+
});
|
|
1809
|
+
}
|
|
1706
1810
|
/**
|
|
1707
1811
|
* Set up keyboard shortcuts registered by extensions.
|
|
1708
1812
|
*/
|
|
@@ -2352,9 +2456,13 @@ export class InteractiveMode {
|
|
|
2352
2456
|
setCustomEditorComponent(factory) {
|
|
2353
2457
|
this.editorComponentFactory = factory;
|
|
2354
2458
|
// Save text from current editor before switching
|
|
2355
|
-
const currentText = this.editor.getText();
|
|
2356
|
-
|
|
2357
|
-
this.
|
|
2459
|
+
const currentText = this.editor.getExpandedText?.() ?? this.editor.getText();
|
|
2460
|
+
// An open extension dialog keeps the editor slot; the new editor is shown when the last dialog closes.
|
|
2461
|
+
const dialogOpen = this.extensionDialogs.length > 0;
|
|
2462
|
+
if (!dialogOpen) {
|
|
2463
|
+
this.disposeActiveSelector();
|
|
2464
|
+
this.editorContainer.clear();
|
|
2465
|
+
}
|
|
2358
2466
|
if (factory) {
|
|
2359
2467
|
// Create the custom editor with tui, theme, and keybindings
|
|
2360
2468
|
const newEditor = factory(this.ui, getEditorTheme(), this.keybindings);
|
|
@@ -2405,7 +2513,8 @@ export class InteractiveMode {
|
|
|
2405
2513
|
this.defaultEditor.setText(currentText);
|
|
2406
2514
|
this.editor = this.defaultEditor;
|
|
2407
2515
|
}
|
|
2408
|
-
|
|
2516
|
+
if (!dialogOpen)
|
|
2517
|
+
this.editorContainer.addChild(this.editor);
|
|
2409
2518
|
if (this.activeStatusIndicator) {
|
|
2410
2519
|
this.statusContainer.clear();
|
|
2411
2520
|
this.activeWorkingIndicatorEmbedded = this.setEditorWorkingStatusIndicator(this.activeStatusIndicator);
|
|
@@ -2413,7 +2522,8 @@ export class InteractiveMode {
|
|
|
2413
2522
|
this.statusContainer.addChild(this.activeStatusIndicator);
|
|
2414
2523
|
}
|
|
2415
2524
|
}
|
|
2416
|
-
|
|
2525
|
+
if (!dialogOpen)
|
|
2526
|
+
this.ui.setFocus(this.editor);
|
|
2417
2527
|
this.ui.requestRender();
|
|
2418
2528
|
}
|
|
2419
2529
|
/**
|
|
@@ -2432,7 +2542,7 @@ export class InteractiveMode {
|
|
|
2432
2542
|
}
|
|
2433
2543
|
/** Show a custom component with keyboard focus. Overlay mode renders on top of existing content. */
|
|
2434
2544
|
async showExtensionCustom(factory, options) {
|
|
2435
|
-
const savedText = this.editor.getText();
|
|
2545
|
+
const savedText = this.editor.getExpandedText?.() ?? this.editor.getText();
|
|
2436
2546
|
const isOverlay = options?.overlay ?? false;
|
|
2437
2547
|
return new Promise((resolve, reject) => {
|
|
2438
2548
|
let component;
|
|
@@ -2488,7 +2598,7 @@ export class InteractiveMode {
|
|
|
2488
2598
|
this.pushExtensionDialog({
|
|
2489
2599
|
component: c,
|
|
2490
2600
|
kind: "custom",
|
|
2491
|
-
blocked:
|
|
2601
|
+
blocked: options?.blocked,
|
|
2492
2602
|
// A custom component has no neutral answer, so a reset rejects rather than strand the caller.
|
|
2493
2603
|
failClosed: () => {
|
|
2494
2604
|
if (closed)
|
|
@@ -3307,7 +3417,7 @@ export class InteractiveMode {
|
|
|
3307
3417
|
case "custom": {
|
|
3308
3418
|
if (message.display) {
|
|
3309
3419
|
const renderer = this.session.extensionRunner.getMessageRenderer(message.customType);
|
|
3310
|
-
const component = new CustomMessageComponent(message, renderer, this.getMarkdownThemeWithSettings(), this.outputPad);
|
|
3420
|
+
const component = new CustomMessageComponent(message, renderer, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
|
|
3311
3421
|
component.setExpanded(this.toolOutputExpanded);
|
|
3312
3422
|
this.chatContainer.addChild(component);
|
|
3313
3423
|
}
|
|
@@ -3315,14 +3425,14 @@ export class InteractiveMode {
|
|
|
3315
3425
|
}
|
|
3316
3426
|
case "compactionSummary": {
|
|
3317
3427
|
this.chatContainer.addChild(new Spacer(1));
|
|
3318
|
-
const component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad);
|
|
3428
|
+
const component = new CompactionSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
|
|
3319
3429
|
component.setExpanded(this.toolOutputExpanded);
|
|
3320
3430
|
this.chatContainer.addChild(component);
|
|
3321
3431
|
break;
|
|
3322
3432
|
}
|
|
3323
3433
|
case "branchSummary": {
|
|
3324
3434
|
this.chatContainer.addChild(new Spacer(1));
|
|
3325
|
-
const component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad);
|
|
3435
|
+
const component = new BranchSummaryMessageComponent(message, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
|
|
3326
3436
|
component.setExpanded(this.toolOutputExpanded);
|
|
3327
3437
|
this.chatContainer.addChild(component);
|
|
3328
3438
|
break;
|
|
@@ -3338,18 +3448,18 @@ export class InteractiveMode {
|
|
|
3338
3448
|
const skillBlock = parseSkillBlock(textContent);
|
|
3339
3449
|
if (skillBlock) {
|
|
3340
3450
|
// Render skill block (collapsible)
|
|
3341
|
-
const component = new SkillInvocationMessageComponent(skillBlock, this.getMarkdownThemeWithSettings(), this.outputPad);
|
|
3451
|
+
const component = new SkillInvocationMessageComponent(skillBlock, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
|
|
3342
3452
|
component.setExpanded(this.toolOutputExpanded);
|
|
3343
3453
|
this.chatContainer.addChild(component);
|
|
3344
3454
|
// Render user message separately if present
|
|
3345
3455
|
if (skillBlock.userMessage) {
|
|
3346
3456
|
this.chatContainer.addChild(new Spacer(1));
|
|
3347
|
-
const userComponent = new UserMessageComponent(skillBlock.userMessage, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers());
|
|
3457
|
+
const userComponent = new UserMessageComponent(skillBlock.userMessage, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
|
|
3348
3458
|
this.chatContainer.addChild(userComponent);
|
|
3349
3459
|
}
|
|
3350
3460
|
}
|
|
3351
3461
|
else {
|
|
3352
|
-
const userComponent = new UserMessageComponent(textContent, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers());
|
|
3462
|
+
const userComponent = new UserMessageComponent(textContent, this.getMarkdownThemeWithSettings(), this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
|
|
3353
3463
|
this.chatContainer.addChild(userComponent);
|
|
3354
3464
|
}
|
|
3355
3465
|
if (options?.populateHistory) {
|
|
@@ -3359,7 +3469,7 @@ export class InteractiveMode {
|
|
|
3359
3469
|
break;
|
|
3360
3470
|
}
|
|
3361
3471
|
case "assistant": {
|
|
3362
|
-
const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.getMarkdownTransformers());
|
|
3472
|
+
const assistantComponent = new AssistantMessageComponent(message, this.hideThinkingBlock, this.getMarkdownThemeWithSettings(), this.hiddenThinkingLabel, this.outputPad, this.getMarkdownTransformers(), options?.messageId, options?.timestamp);
|
|
3363
3473
|
this.chatContainer.addChild(assistantComponent);
|
|
3364
3474
|
break;
|
|
3365
3475
|
}
|
|
@@ -3372,7 +3482,7 @@ export class InteractiveMode {
|
|
|
3372
3482
|
}
|
|
3373
3483
|
}
|
|
3374
3484
|
}
|
|
3375
|
-
renderSessionItems(items, options = {}) {
|
|
3485
|
+
renderSessionItems(items, messageMeta, options = {}) {
|
|
3376
3486
|
this.pendingTools.clear();
|
|
3377
3487
|
const renderedPendingTools = new Map();
|
|
3378
3488
|
// Cache misses are not persisted, unlike successful cache-warming usage.
|
|
@@ -3400,7 +3510,11 @@ export class InteractiveMode {
|
|
|
3400
3510
|
const message = item;
|
|
3401
3511
|
// Assistant messages need special handling for tool calls
|
|
3402
3512
|
if (message.role === "assistant") {
|
|
3403
|
-
|
|
3513
|
+
const meta = messageMeta?.get(message);
|
|
3514
|
+
this.addMessageToChat(message, {
|
|
3515
|
+
messageId: meta?.id,
|
|
3516
|
+
timestamp: meta?.timestamp,
|
|
3517
|
+
});
|
|
3404
3518
|
// Render tool call components
|
|
3405
3519
|
for (const content of message.content) {
|
|
3406
3520
|
if (content.type === "toolCall") {
|
|
@@ -3446,7 +3560,12 @@ export class InteractiveMode {
|
|
|
3446
3560
|
}
|
|
3447
3561
|
else {
|
|
3448
3562
|
// All other messages use standard rendering
|
|
3449
|
-
|
|
3563
|
+
const meta = messageMeta?.get(message);
|
|
3564
|
+
this.addMessageToChat(message, {
|
|
3565
|
+
...options,
|
|
3566
|
+
messageId: meta?.id,
|
|
3567
|
+
timestamp: meta?.timestamp,
|
|
3568
|
+
});
|
|
3450
3569
|
}
|
|
3451
3570
|
}
|
|
3452
3571
|
for (const [toolCallId, component] of renderedPendingTools) {
|
|
@@ -3464,17 +3583,21 @@ export class InteractiveMode {
|
|
|
3464
3583
|
// Selection coordinates point into the transcript being replaced (#9311).
|
|
3465
3584
|
if (this.renderer instanceof TuiAltScreen)
|
|
3466
3585
|
this.renderer.resetTextSelection();
|
|
3586
|
+
const messageMeta = new Map();
|
|
3467
3587
|
const items = entries.flatMap((entry) => {
|
|
3468
3588
|
if (entry.type === "custom" || (entry.type === "usage" && entry.kind === "cache_warm")) {
|
|
3469
3589
|
return [entry];
|
|
3470
3590
|
}
|
|
3471
3591
|
const messages = sessionEntryToContextMessages(entry);
|
|
3592
|
+
for (const msg of messages) {
|
|
3593
|
+
messageMeta.set(msg, { id: entry.id, timestamp: entry.timestamp });
|
|
3594
|
+
}
|
|
3472
3595
|
if ((entry.type === "compaction" || entry.type === "branch_summary") && entry.usage && messages.length > 0) {
|
|
3473
3596
|
return [...messages, { type: "compaction_cost", kind: entry.type, usage: entry.usage }];
|
|
3474
3597
|
}
|
|
3475
3598
|
return messages;
|
|
3476
3599
|
});
|
|
3477
|
-
this.renderSessionItems(items, options);
|
|
3600
|
+
this.renderSessionItems(items, messageMeta, options);
|
|
3478
3601
|
}
|
|
3479
3602
|
addCacheWarmingUsage(entry) {
|
|
3480
3603
|
if (!this.settingsManager.getShowCacheMissNotices())
|
|
@@ -3973,6 +4096,9 @@ export class InteractiveMode {
|
|
|
3973
4096
|
if (result.status === "complete") {
|
|
3974
4097
|
this.editor.setText(result.content);
|
|
3975
4098
|
}
|
|
4099
|
+
else {
|
|
4100
|
+
this.showStatus(result.message);
|
|
4101
|
+
}
|
|
3976
4102
|
}
|
|
3977
4103
|
finally {
|
|
3978
4104
|
this.ui.start();
|
|
@@ -4086,7 +4212,7 @@ export class InteractiveMode {
|
|
|
4086
4212
|
return 0;
|
|
4087
4213
|
}
|
|
4088
4214
|
const queuedText = allQueued.join("\n\n");
|
|
4089
|
-
const currentText = options?.currentText ?? this.editor.getText();
|
|
4215
|
+
const currentText = options?.currentText ?? this.editor.getExpandedText?.() ?? this.editor.getText();
|
|
4090
4216
|
const combinedText = [queuedText, currentText].filter((t) => t.trim()).join("\n\n");
|
|
4091
4217
|
this.editor.setText(combinedText);
|
|
4092
4218
|
this.updatePendingMessagesDisplay();
|
|
@@ -6000,7 +6126,7 @@ export class InteractiveMode {
|
|
|
6000
6126
|
this.chatContainer.addChild(new DynamicBorder());
|
|
6001
6127
|
this.chatContainer.addChild(new ThemedText(() => theme.bold(theme.fg("accent", "What's New")), 1, 0));
|
|
6002
6128
|
this.chatContainer.addChild(new Spacer(1));
|
|
6003
|
-
this.chatContainer.addChild(
|
|
6129
|
+
this.chatContainer.addChild(this.createChangelogMarkdown(changelogMarkdown, 1, 1));
|
|
6004
6130
|
this.chatContainer.addChild(new DynamicBorder());
|
|
6005
6131
|
this.ui.requestRender();
|
|
6006
6132
|
}
|