@humain/humain-code 0.4.17 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +260 -1
- package/dist/bundle/agent-monitor.js +1 -1
- package/dist/bundle/chunks/anthropic-messages-ZP5KUK52.js +67 -0
- package/dist/bundle/chunks/anthropic.js +2 -2
- package/dist/bundle/chunks/azure-openai-responses-QJFYQ3DF.js +15 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +152 -200
- package/dist/bundle/chunks/{chunk-4XU7TDAL.js → chunk-2GCMACT4.js} +48 -46
- package/dist/bundle/chunks/{chunk-DUSJT2W4.js → chunk-476XBL3W.js} +3 -3
- package/dist/bundle/chunks/{chunk-4NFYTS4C.js → chunk-5C4VL2AR.js} +4 -4
- package/dist/bundle/chunks/{chunk-QEF72EIZ.js → chunk-A6B2QMA7.js} +40 -96
- package/dist/bundle/chunks/{chunk-AOL6QG6L.js → chunk-A6YBWW4T.js} +1405 -1311
- package/dist/bundle/chunks/{chunk-ZRGFX6T6.js → chunk-CN3Q5UNB.js} +387 -309
- package/dist/bundle/chunks/{chunk-TJG52LZB.js → chunk-DR37WKFZ.js} +9 -8
- package/dist/bundle/chunks/chunk-DU6POZ7E.js +10 -0
- package/dist/bundle/chunks/{chunk-X6OTEVGA.js → chunk-FO2NYB6O.js} +626 -619
- package/dist/bundle/chunks/{chunk-RXOCQRBG.js → chunk-GEISZXXH.js} +1 -1
- package/dist/bundle/chunks/{chunk-OKALNPTJ.js → chunk-HIZWUSPN.js} +24 -24
- package/dist/bundle/chunks/{chunk-MVYV6MJY.js → chunk-HT5YN3LX.js} +1 -1
- package/dist/bundle/chunks/chunk-IDU5BNNI.js +15 -0
- package/dist/bundle/chunks/{chunk-TIFFHHW6.js → chunk-JCXXRCP6.js} +5 -5
- package/dist/bundle/chunks/{chunk-QYCOHSI7.js → chunk-KKCMWB63.js} +8 -7
- package/dist/bundle/chunks/{chunk-SCBU5WOP.js → chunk-M74U5X4S.js} +30 -23
- package/dist/bundle/chunks/{chunk-AWCJWXGD.js → chunk-MIJHJNNQ.js} +3 -2
- package/dist/bundle/chunks/{chunk-Y26OS23T.js → chunk-N7CQ3UV3.js} +4 -4
- package/dist/bundle/chunks/{chunk-XQZG5HPT.js → chunk-O4DO5RWS.js} +11 -6
- package/dist/bundle/chunks/chunk-OR25QDSS.js +365 -0
- package/dist/bundle/chunks/{chunk-7PRU6YW3.js → chunk-OZNC2W4B.js} +306 -286
- package/dist/bundle/chunks/{chunk-Z33NNMNB.js → chunk-PH7UP57J.js} +1 -1
- package/dist/bundle/chunks/{chunk-FHVNUUBF.js → chunk-PS7DGA7B.js} +1 -1
- package/dist/bundle/chunks/chunk-Q3SFYT2X.js +1965 -0
- package/dist/bundle/chunks/chunk-QW6PTCAB.js +10 -0
- package/dist/bundle/chunks/{chunk-5CDES42D.js → chunk-QWXPGBAG.js} +1 -1
- package/dist/bundle/chunks/{chunk-NCQ6WAQK.js → chunk-ROZV2IYD.js} +1 -1
- package/dist/bundle/chunks/{chunk-PTP2ZHFQ.js → chunk-RTXDU3AA.js} +148 -122
- package/dist/bundle/chunks/{chunk-36Q5UVQL.js → chunk-T3HXWZG4.js} +2 -2
- package/dist/bundle/chunks/{chunk-FZUJXM6D.js → chunk-UDB6NI4G.js} +309 -240
- package/dist/bundle/chunks/chunk-UTNHGOFS.js +88 -0
- package/dist/bundle/chunks/{chunk-H2FY3PEV.js → chunk-V62QBESW.js} +4 -3
- package/dist/bundle/chunks/{chunk-LG2PJ6JN.js → chunk-XA7CJAYH.js} +4 -3
- package/dist/bundle/chunks/chunk-XQX7S3GM.js +7 -0
- package/dist/bundle/chunks/chunk-YFOLLX5D.js +23 -0
- package/dist/bundle/chunks/{chunk-YRCLNWFV.js → chunk-ZI7TK7HM.js} +1 -1
- package/dist/bundle/chunks/{chunk-V76YPIMT.js → chunk-ZR4GF4WU.js} +21 -15
- package/dist/bundle/chunks/{cli-SRI4UOSL.js → cli-VXU7OWFU.js} +1 -1
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-T7TPP7SQ.js +4 -0
- package/dist/bundle/chunks/codemode-worker.js +27 -27
- package/dist/bundle/chunks/compat-S2IBVV6V.js +13 -0
- package/dist/bundle/chunks/{dist-D7M52E3X.js → dist-645GFIWH.js} +452 -448
- package/dist/bundle/chunks/{dist-XVXV2CL4.js → dist-IBUWEKEE.js} +3 -3
- package/dist/bundle/chunks/dist-YFMJEHPH.js +8 -0
- package/dist/bundle/chunks/{dist-cjs-AXBW3N4F.js → dist-cjs-HTASUQXQ.js} +82 -80
- package/dist/bundle/chunks/{easter-egg-3d-4SUPLBUF.js → easter-egg-3d-YOPLCOVW.js} +2 -2
- package/dist/bundle/chunks/{esm-NCUV2DF7.js → esm-R6HJ4QEG.js} +5 -5
- package/dist/bundle/chunks/{event-streams-NXFTZDSF.js → event-streams-BR2IL6C5.js} +1 -1
- package/dist/bundle/chunks/{execute-NTO3U76E.js → execute-2JXEKQ2X.js} +17 -8
- package/dist/bundle/chunks/{extract-BKBHK4AK.js → extract-OTCGZGTL.js} +50 -47
- package/dist/bundle/chunks/github-copilot.js +42 -40
- package/dist/bundle/chunks/google-generative-ai-HVPCGIZ6.js +21 -0
- package/dist/bundle/chunks/google-vertex-UM5MAALA.js +25 -0
- package/dist/bundle/chunks/host-ZHEL5XQW.js +2 -0
- package/dist/bundle/chunks/{https-proxy-agent-7CAXVAFH.js → https-proxy-agent-JQICCRPH.js} +1 -1
- package/dist/bundle/chunks/{llama-cpp-classify-AGCW7HYN.js → llama-cpp-classify-B3G57LVR.js} +5 -5
- package/dist/bundle/chunks/{mistral-conversations-G3GN6CMT.js → mistral-conversations-AH72RLXK.js} +11 -11
- package/dist/bundle/chunks/{node-ELWNZC34.js → node-SJPZTR4K.js} +6 -6
- package/dist/bundle/chunks/{node-DZCAT4Q6.js → node-VSA4ZN7D.js} +1 -1
- package/dist/bundle/chunks/openai-chatgpt.js +2 -2
- package/dist/bundle/chunks/{openai-codex-responses-FJFDAWHI.js → openai-codex-responses-L366637C.js} +48 -47
- package/dist/bundle/chunks/openai-codex.js +2 -2
- package/dist/bundle/chunks/openai-completions-ZP62QXJX.js +83 -0
- package/dist/bundle/chunks/{openai-decisions-HESOHYZB.js → openai-decisions-WOWUC65P.js} +1 -1
- package/dist/bundle/chunks/openai-responses-DXUGSUTN.js +26 -0
- package/dist/bundle/chunks/openrouter-images-5K47HDAT.js +8 -0
- package/dist/bundle/chunks/openrouter.js +2 -2
- package/dist/bundle/chunks/{pi-messages-SAOV3JNW.js → pi-messages-MOQQDZBK.js} +5 -4
- package/dist/bundle/chunks/radius.js +2 -2
- package/dist/bundle/chunks/{runtime-VGSK3QCM.js → runtime-5VFZTMWL.js} +1 -1
- package/dist/bundle/chunks/typesafe-system-one-43OCHGKP.js +3 -0
- package/dist/bundle/chunks/{undici-N4LWJ3S3.js → undici-EK3EUI2E.js} +1 -1
- package/dist/bundle/chunks/virtual-modules-GU6AW5ZK.js +5 -0
- package/dist/bundle/cli-runtime.js +3 -3
- package/dist/bundle/flow/package.json +4 -4
- package/dist/bundle/index.js +6 -6
- package/dist/bundle/rpc-entry.js +3 -3
- package/dist/cli/args.d.ts +6 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +11 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/coordination/adapter/tool.d.ts.map +1 -1
- package/dist/coordination/adapter/tool.js +3 -1
- package/dist/coordination/adapter/tool.js.map +1 -1
- package/dist/coordination/broker/broker.d.ts +6 -2
- package/dist/coordination/broker/broker.d.ts.map +1 -1
- package/dist/coordination/broker/broker.js +20 -8
- package/dist/coordination/broker/broker.js.map +1 -1
- package/dist/coordination/client/client.d.ts.map +1 -1
- package/dist/coordination/client/client.js +4 -2
- package/dist/coordination/client/client.js.map +1 -1
- package/dist/coordination/transport/discovery.d.ts +10 -3
- package/dist/coordination/transport/discovery.d.ts.map +1 -1
- package/dist/coordination/transport/discovery.js +18 -5
- package/dist/coordination/transport/discovery.js.map +1 -1
- package/dist/core/agent-session.d.ts +35 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +163 -40
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/anthropic-subscription-usage.d.ts +47 -0
- package/dist/core/anthropic-subscription-usage.d.ts.map +1 -0
- package/dist/core/anthropic-subscription-usage.js +170 -0
- package/dist/core/anthropic-subscription-usage.js.map +1 -0
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +7 -1
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/client-identity.d.ts +13 -0
- package/dist/core/client-identity.d.ts.map +1 -0
- package/dist/core/client-identity.js +25 -0
- package/dist/core/client-identity.js.map +1 -0
- package/dist/core/codex-usage.d.ts +37 -1
- package/dist/core/codex-usage.d.ts.map +1 -1
- package/dist/core/codex-usage.js +104 -11
- package/dist/core/codex-usage.js.map +1 -1
- package/dist/core/compaction/branch-summarization.d.ts.map +1 -1
- package/dist/core/compaction/branch-summarization.js +1 -2
- package/dist/core/compaction/branch-summarization.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +2 -2
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +20 -15
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/export-html/index.d.ts.map +1 -1
- package/dist/core/export-html/index.js +2 -0
- package/dist/core/export-html/index.js.map +1 -1
- package/dist/core/export-html/template.html +1 -0
- package/dist/core/export-html/template.js +2 -1
- package/dist/core/export-html/vendor/marked-cjk-friendly.min.js +6 -0
- package/dist/core/export-html/vendor/marked.min.js +30 -29
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +3 -0
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +14 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +86 -2
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/virtual-modules.d.ts.map +1 -1
- package/dist/core/extensions/virtual-modules.js +3 -0
- package/dist/core/extensions/virtual-modules.js.map +1 -1
- package/dist/core/model-config.d.ts +920 -0
- package/dist/core/model-config.d.ts.map +1 -1
- package/dist/core/model-config.js +48 -24
- package/dist/core/model-config.js.map +1 -1
- package/dist/core/model-registry.d.ts +18 -0
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +20 -0
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +14 -6
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/model-runtime.d.ts +9 -0
- package/dist/core/model-runtime.d.ts.map +1 -1
- package/dist/core/model-runtime.js +99 -12
- package/dist/core/model-runtime.js.map +1 -1
- package/dist/core/output-guard.d.ts +13 -1
- package/dist/core/output-guard.d.ts.map +1 -1
- package/dist/core/output-guard.js +101 -11
- package/dist/core/output-guard.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 +7 -3
- 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 -2
- package/dist/core/remote-catalog-provider.js.map +1 -1
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +8 -9
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-manager.d.ts +4 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +242 -26
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts +6 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +93 -1
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +3 -1
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/ls.d.ts.map +1 -1
- package/dist/core/tools/ls.js +37 -12
- package/dist/core/tools/ls.js.map +1 -1
- package/dist/extensions/codemode/execute.d.ts.map +1 -1
- package/dist/extensions/codemode/execute.js +102 -24
- package/dist/extensions/codemode/execute.js.map +1 -1
- package/dist/extensions/index.d.ts.map +1 -1
- package/dist/extensions/index.js +3 -1
- package/dist/extensions/index.js.map +1 -1
- package/dist/extensions/mcp/config.d.ts.map +1 -1
- package/dist/extensions/mcp/config.js +3 -2
- package/dist/extensions/mcp/config.js.map +1 -1
- package/dist/extensions/usage/index.d.ts +15 -0
- package/dist/extensions/usage/index.d.ts.map +1 -0
- package/dist/extensions/usage/index.js +110 -0
- package/dist/extensions/usage/index.js.map +1 -0
- package/dist/extensions/usage/overview.d.ts +90 -0
- package/dist/extensions/usage/overview.d.ts.map +1 -0
- package/dist/extensions/usage/overview.js +215 -0
- package/dist/extensions/usage/overview.js.map +1 -0
- package/dist/extensions/usage/popup.d.ts +21 -0
- package/dist/extensions/usage/popup.d.ts.map +1 -0
- package/dist/extensions/usage/popup.js +98 -0
- package/dist/extensions/usage/popup.js.map +1 -0
- package/dist/humain/bedrock-provider/vendor/index.bundle.mjs +21 -2
- package/dist/humain/bundled-extension-names.d.ts +6 -0
- package/dist/humain/bundled-extension-names.d.ts.map +1 -0
- package/dist/humain/bundled-extension-names.js +9 -0
- package/dist/humain/bundled-extension-names.js.map +1 -0
- package/dist/humain/index.d.ts +2 -2
- package/dist/humain/index.d.ts.map +1 -1
- package/dist/humain/index.js +3 -2
- package/dist/humain/index.js.map +1 -1
- package/dist/humain/web-access/vendor/anysearch.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/anysearch.js +3 -3
- package/dist/humain/web-access/vendor/anysearch.js.map +1 -1
- package/dist/humain/web-access/vendor/bocha.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/bocha.js +3 -3
- package/dist/humain/web-access/vendor/bocha.js.map +1 -1
- package/dist/humain/web-access/vendor/brightdata-unlocker.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/brightdata-unlocker.js +2 -2
- package/dist/humain/web-access/vendor/brightdata-unlocker.js.map +1 -1
- package/dist/humain/web-access/vendor/brightdata.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/brightdata.js +3 -3
- package/dist/humain/web-access/vendor/brightdata.js.map +1 -1
- package/dist/humain/web-access/vendor/ceramic.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/ceramic.js +2 -2
- package/dist/humain/web-access/vendor/ceramic.js.map +1 -1
- package/dist/humain/web-access/vendor/curator-page.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/curator-page.js +3 -1
- package/dist/humain/web-access/vendor/curator-page.js.map +1 -1
- package/dist/humain/web-access/vendor/curator-server.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/curator-server.js +2 -0
- package/dist/humain/web-access/vendor/curator-server.js.map +1 -1
- package/dist/humain/web-access/vendor/deepseek.d.ts +11 -1
- package/dist/humain/web-access/vendor/deepseek.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/deepseek.js +170 -5
- package/dist/humain/web-access/vendor/deepseek.js.map +1 -1
- package/dist/humain/web-access/vendor/extract.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/extract.js +63 -6
- package/dist/humain/web-access/vendor/extract.js.map +1 -1
- package/dist/humain/web-access/vendor/gemini-search.d.ts +5 -3
- package/dist/humain/web-access/vendor/gemini-search.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/gemini-search.js +33 -7
- package/dist/humain/web-access/vendor/gemini-search.js.map +1 -1
- package/dist/humain/web-access/vendor/index.d.ts +1 -0
- package/dist/humain/web-access/vendor/index.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/index.js +18 -3
- package/dist/humain/web-access/vendor/index.js.map +1 -1
- package/dist/humain/web-access/vendor/jina-search.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/jina-search.js +6 -4
- package/dist/humain/web-access/vendor/jina-search.js.map +1 -1
- package/dist/humain/web-access/vendor/kagi.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/kagi.js +4 -4
- package/dist/humain/web-access/vendor/kagi.js.map +1 -1
- package/dist/humain/web-access/vendor/keenable.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/keenable.js +2 -2
- package/dist/humain/web-access/vendor/keenable.js.map +1 -1
- package/dist/humain/web-access/vendor/linkup.d.ts +6 -0
- package/dist/humain/web-access/vendor/linkup.d.ts.map +1 -0
- package/dist/humain/web-access/vendor/linkup.js +167 -0
- package/dist/humain/web-access/vendor/linkup.js.map +1 -0
- package/dist/humain/web-access/vendor/mistral-search.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/mistral-search.js +3 -3
- package/dist/humain/web-access/vendor/mistral-search.js.map +1 -1
- package/dist/humain/web-access/vendor/ollama.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/ollama.js +4 -4
- package/dist/humain/web-access/vendor/ollama.js.map +1 -1
- package/dist/humain/web-access/vendor/parallel.js +6 -7
- package/dist/humain/web-access/vendor/parallel.js.map +1 -1
- package/dist/humain/web-access/vendor/perplexity.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/perplexity.js +4 -3
- package/dist/humain/web-access/vendor/perplexity.js.map +1 -1
- package/dist/humain/web-access/vendor/querit.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/querit.js +3 -3
- package/dist/humain/web-access/vendor/querit.js.map +1 -1
- package/dist/humain/web-access/vendor/search1api.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/search1api.js +3 -3
- package/dist/humain/web-access/vendor/search1api.js.map +1 -1
- package/dist/humain/web-access/vendor/searchinfinity.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/searchinfinity.js +3 -3
- package/dist/humain/web-access/vendor/searchinfinity.js.map +1 -1
- package/dist/humain/web-access/vendor/serpapi.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/serpapi.js +6 -5
- package/dist/humain/web-access/vendor/serpapi.js.map +1 -1
- package/dist/humain/web-access/vendor/serpbase.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/serpbase.js +4 -4
- package/dist/humain/web-access/vendor/serpbase.js.map +1 -1
- package/dist/humain/web-access/vendor/serpdive.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/serpdive.js +3 -3
- package/dist/humain/web-access/vendor/serpdive.js.map +1 -1
- package/dist/humain/web-access/vendor/serper.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/serper.js +5 -4
- package/dist/humain/web-access/vendor/serper.js.map +1 -1
- package/dist/humain/web-access/vendor/serply.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/serply.js +2 -2
- package/dist/humain/web-access/vendor/serply.js.map +1 -1
- package/dist/humain/web-access/vendor/utils.d.ts +3 -1
- package/dist/humain/web-access/vendor/utils.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/utils.js +27 -2
- package/dist/humain/web-access/vendor/utils.js.map +1 -1
- package/dist/humain/web-access/vendor/valyu.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/valyu.js +3 -3
- package/dist/humain/web-access/vendor/valyu.js.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-core.d.ts +2 -0
- package/dist/humain/web-access/vendor/web-tool-core.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/web-tool-core.js +3 -0
- package/dist/humain/web-access/vendor/web-tool-core.js.map +1 -1
- package/dist/humain/web-access/vendor/xai-search.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/xai-search.js +51 -8
- package/dist/humain/web-access/vendor/xai-search.js.map +1 -1
- package/dist/humain/web-access/vendor/xcrawl.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/xcrawl.js +3 -3
- package/dist/humain/web-access/vendor/xcrawl.js.map +1 -1
- package/dist/humain/web-access/vendor/you.d.ts.map +1 -1
- package/dist/humain/web-access/vendor/you.js +2 -2
- package/dist/humain/web-access/vendor/you.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +15 -2
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/assistant-message.d.ts +14 -2
- package/dist/modes/interactive/components/assistant-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/assistant-message.js +62 -7
- package/dist/modes/interactive/components/assistant-message.js.map +1 -1
- package/dist/modes/interactive/components/config-selector.js +1 -1
- package/dist/modes/interactive/components/config-selector.js.map +1 -1
- package/dist/modes/interactive/components/custom-editor.d.ts +2 -0
- package/dist/modes/interactive/components/custom-editor.d.ts.map +1 -1
- package/dist/modes/interactive/components/custom-editor.js +6 -1
- package/dist/modes/interactive/components/custom-editor.js.map +1 -1
- package/dist/modes/interactive/components/easter-egg-3d.js +1 -1
- package/dist/modes/interactive/components/easter-egg-3d.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +10 -2
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +141 -66
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/mermaid.d.ts.map +1 -1
- package/dist/modes/interactive/components/mermaid.js +16 -3
- package/dist/modes/interactive/components/mermaid.js.map +1 -1
- package/dist/modes/interactive/components/model-selector.js +1 -1
- package/dist/modes/interactive/components/model-selector.js.map +1 -1
- package/dist/modes/interactive/components/themed-text.d.ts.map +1 -1
- package/dist/modes/interactive/components/themed-text.js +3 -2
- package/dist/modes/interactive/components/themed-text.js.map +1 -1
- package/dist/modes/interactive/components/tool-execution.d.ts.map +1 -1
- package/dist/modes/interactive/components/tool-execution.js +17 -6
- package/dist/modes/interactive/components/tool-execution.js.map +1 -1
- package/dist/modes/interactive/components/user-message.d.ts.map +1 -1
- package/dist/modes/interactive/components/user-message.js +3 -2
- package/dist/modes/interactive/components/user-message.js.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.d.ts.map +1 -1
- package/dist/modes/interactive/components/visual-truncate.js +4 -2
- package/dist/modes/interactive/components/visual-truncate.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +13 -17
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +90 -122
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +2 -5
- 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 +2 -3
- 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 +2 -1
- package/dist/package-manager-cli.js.map +1 -1
- package/dist/utils/child-process.d.ts.map +1 -1
- package/dist/utils/child-process.js +3 -2
- package/dist/utils/child-process.js.map +1 -1
- package/dist/utils/clipboard-command.d.ts.map +1 -1
- package/dist/utils/clipboard-command.js +3 -0
- package/dist/utils/clipboard-command.js.map +1 -1
- package/dist/utils/pi-user-agent.d.ts +1 -0
- package/dist/utils/pi-user-agent.d.ts.map +1 -1
- package/dist/utils/pi-user-agent.js +3 -2
- package/dist/utils/pi-user-agent.js.map +1 -1
- package/dist/utils/shell.d.ts.map +1 -1
- package/dist/utils/shell.js +45 -13
- package/dist/utils/shell.js.map +1 -1
- package/dist/utils/tools-manager.d.ts.map +1 -1
- package/dist/utils/tools-manager.js +4 -3
- package/dist/utils/tools-manager.js.map +1 -1
- package/docs/codemode.md +2 -2
- package/docs/compaction.md +3 -3
- package/docs/coordination.md +1 -1
- package/docs/custom-provider.md +53 -1
- package/docs/docs.json +4 -0
- package/docs/environment-variables.md +2 -0
- package/docs/extensions.md +133 -10
- package/docs/models-configuration.md +197 -0
- package/docs/models.md +21 -5
- package/docs/settings.md +1 -1
- package/docs/slash-commands.md +10 -0
- package/docs/tui.md +70 -0
- package/docs/windows.md +16 -2
- package/examples/extensions/custom-provider-anthropic/package.json +2 -2
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/examples/plugins/pi-example-plugin/package.json +2 -2
- package/npm-shrinkwrap.json +243 -219
- package/package.json +21 -20
- package/schemas/models.schema.json +84 -30
- package/src/coordination/UPSTREAM.md +36 -3
- package/src/coordination/upstream.json +3 -3
- package/src/humain/web-access/UPSTREAM.md +72 -1
- package/src/humain/web-access/upstream.json +5 -4
- package/dist/bundle/chunks/anthropic-messages-TSNY5MWH.js +0 -67
- package/dist/bundle/chunks/azure-openai-responses-Z4DCXO2G.js +0 -15
- package/dist/bundle/chunks/chunk-5K5RFXXO.js +0 -74
- package/dist/bundle/chunks/chunk-65U7MPF4.js +0 -1790
- package/dist/bundle/chunks/chunk-PY7SOXCA.js +0 -10
- package/dist/bundle/chunks/chunk-UGJAAWNC.js +0 -7
- package/dist/bundle/chunks/chunk-UGXYG7HN.js +0 -22
- package/dist/bundle/chunks/chunk-VEYTRNQC.js +0 -5
- package/dist/bundle/chunks/chunk-W2QRCQBX.js +0 -165
- package/dist/bundle/chunks/chunk-X3O5MCKJ.js +0 -7
- package/dist/bundle/chunks/cloudflare-workers-ai-system-one-MUJQ6LT2.js +0 -4
- package/dist/bundle/chunks/compat-ARQPWKBQ.js +0 -13
- package/dist/bundle/chunks/dist-LKDZAEUQ.js +0 -7
- package/dist/bundle/chunks/google-generative-ai-SJ4JO2MY.js +0 -21
- package/dist/bundle/chunks/google-vertex-KNLNNDET.js +0 -25
- package/dist/bundle/chunks/host-63SNKK5Y.js +0 -2
- package/dist/bundle/chunks/openai-completions-IC7WRLTI.js +0 -82
- package/dist/bundle/chunks/openai-responses-XXCYDFSM.js +0 -24
- package/dist/bundle/chunks/openrouter-images-DT2HMZNO.js +0 -8
- package/dist/bundle/chunks/typesafe-system-one-HCMGHK6A.js +0 -2
- package/dist/bundle/chunks/virtual-modules-LP2ULVLW.js +0 -5
- package/dist/core/provider-attribution.d.ts +0 -4
- package/dist/core/provider-attribution.d.ts.map +0 -1
- package/dist/core/provider-attribution.js +0 -85
- package/dist/core/provider-attribution.js.map +0 -1
|
@@ -118,11 +118,7 @@ export declare class InteractiveMode {
|
|
|
118
118
|
/** The `/bug` hint is shown at most once per session so error output stays readable. */
|
|
119
119
|
private bugReportHintShown;
|
|
120
120
|
private installChangeWarningShown;
|
|
121
|
-
private
|
|
122
|
-
/** Resolves the open extension selector's promise; hiding the selector settles it so callers never hang. */
|
|
123
|
-
private extensionSelectorSettle;
|
|
124
|
-
private extensionInput;
|
|
125
|
-
private extensionEditor;
|
|
121
|
+
private extensionDialogs;
|
|
126
122
|
private extensionTerminalInputSubscriptions;
|
|
127
123
|
private extensionWidgetsAbove;
|
|
128
124
|
private extensionWidgetsBelow;
|
|
@@ -272,13 +268,21 @@ export declare class InteractiveMode {
|
|
|
272
268
|
private createProjectTrustContext;
|
|
273
269
|
private createExtensionUIContext;
|
|
274
270
|
/**
|
|
275
|
-
* Show
|
|
271
|
+
* Show an extension dialog in the editor slot.
|
|
272
|
+
* Dialogs form a stack: a new dialog hides the visible one, and closing the visible dialog shows
|
|
273
|
+
* the previous one again. Every dialog stays answerable, so no dialog promise is left pending,
|
|
274
|
+
* and dialogs opened from inside another dialog (for example a confirm from a custom component) work.
|
|
276
275
|
*/
|
|
277
|
-
private
|
|
276
|
+
private pushExtensionDialog;
|
|
277
|
+
/** Close every extension dialog and settle its pending promise, then show the editor. */
|
|
278
|
+
private closeExtensionDialogs;
|
|
279
|
+
/** Remove an extension dialog. If it was visible, show the previous dialog or the editor. */
|
|
280
|
+
private removeExtensionDialog;
|
|
281
|
+
private showTopExtensionDialog;
|
|
278
282
|
/**
|
|
279
|
-
*
|
|
283
|
+
* Show a selector for extensions.
|
|
280
284
|
*/
|
|
281
|
-
private
|
|
285
|
+
private showExtensionSelector;
|
|
282
286
|
/**
|
|
283
287
|
* Show a confirmation dialog for extensions.
|
|
284
288
|
*/
|
|
@@ -288,18 +292,10 @@ export declare class InteractiveMode {
|
|
|
288
292
|
* Show a text input for extensions.
|
|
289
293
|
*/
|
|
290
294
|
private showExtensionInput;
|
|
291
|
-
/**
|
|
292
|
-
* Hide the extension input.
|
|
293
|
-
*/
|
|
294
|
-
private hideExtensionInput;
|
|
295
295
|
/**
|
|
296
296
|
* Show a multi-line editor for extensions (with Ctrl+G support).
|
|
297
297
|
*/
|
|
298
298
|
private showExtensionEditor;
|
|
299
|
-
/**
|
|
300
|
-
* Hide the extension editor.
|
|
301
|
-
*/
|
|
302
|
-
private hideExtensionEditor;
|
|
303
299
|
/**
|
|
304
300
|
* Set a custom editor component from an extension.
|
|
305
301
|
* Pass undefined to restore the default editor.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interactive-mode.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode.ts"],"names":[],"mappings":"AACA;;;GAGG;AAQH,OAAO,EAEN,KAAK,YAAY,EAKjB,MAAM,8BAA8B,CAAC;AAetC,OAAO,EAaN,KAAK,QAAQ,EAOb,MAAM,wBAAwB,CAAC;AAiBhC,OAAO,EAAE,KAAK,mBAAmB,EAAkC,MAAM,qCAAqC,CAAC;AAC/G,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,sCAAsC,CAAC;AA2C1F,OAAO,EAEN,cAAc,EAGd,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAuCpF,OAAO,EAAwB,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AA6E1F,OAAO,EAAE,oBAAoB,EAAE,6BAA6B,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"interactive-mode.d.ts","sourceRoot":"","sources":["../../../src/modes/interactive/interactive-mode.ts"],"names":[],"mappings":"AACA;;;GAGG;AAQH,OAAO,EAEN,KAAK,YAAY,EAKjB,MAAM,8BAA8B,CAAC;AAetC,OAAO,EAaN,KAAK,QAAQ,EAOb,MAAM,wB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Bolt (MIT, Copyright (c) 2026 OpenSec (Pi-Bolt)),
|
|
1
|
+
// Derived from Pi-Bolt (MIT, Copyright (c) 2026 OpenSec (Pi-Bolt)), commits d82b859e, c6f24dd9; modified for HUMAIN Code CLI.
|
|
2
2
|
/**
|
|
3
3
|
* Interactive mode for the coding agent.
|
|
4
4
|
* Handles TUI rendering and user interaction, delegating business logic to AgentSession.
|
|
@@ -334,11 +334,10 @@ export class InteractiveMode {
|
|
|
334
334
|
bugReportHintShown = false;
|
|
335
335
|
installChangeWarningShown = false;
|
|
336
336
|
// Extension UI state
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
extensionEditor = undefined;
|
|
337
|
+
// Extension dialogs shown in the editor slot (select, confirm, input, editor, inline custom).
|
|
338
|
+
// The last entry is visible; see pushExtensionDialog().
|
|
339
|
+
// `cancel` settles the dialog's pending promise when it is closed without an answer, so callers never hang.
|
|
340
|
+
extensionDialogs = [];
|
|
342
341
|
extensionTerminalInputSubscriptions = new Set();
|
|
343
342
|
// Extension widgets (components rendered above/below the editor)
|
|
344
343
|
extensionWidgetsAbove = new Map();
|
|
@@ -1945,14 +1944,8 @@ export class InteractiveMode {
|
|
|
1945
1944
|
resetExtensionUI() {
|
|
1946
1945
|
// Release first: aborting resolves pending account dialogs before their UI is hidden.
|
|
1947
1946
|
this.releaseFlowAccountsHost();
|
|
1948
|
-
if (this.
|
|
1949
|
-
this.
|
|
1950
|
-
}
|
|
1951
|
-
if (this.extensionInput) {
|
|
1952
|
-
this.hideExtensionInput();
|
|
1953
|
-
}
|
|
1954
|
-
if (this.extensionEditor) {
|
|
1955
|
-
this.hideExtensionEditor();
|
|
1947
|
+
if (this.extensionDialogs.length > 0) {
|
|
1948
|
+
this.closeExtensionDialogs();
|
|
1956
1949
|
}
|
|
1957
1950
|
this.ui.hideOverlay();
|
|
1958
1951
|
this.clearExtensionTerminalInputListeners();
|
|
@@ -2162,6 +2155,45 @@ export class InteractiveMode {
|
|
|
2162
2155
|
setToolsExpanded: (expanded) => this.setToolsExpanded(expanded),
|
|
2163
2156
|
};
|
|
2164
2157
|
}
|
|
2158
|
+
/**
|
|
2159
|
+
* Show an extension dialog in the editor slot.
|
|
2160
|
+
* Dialogs form a stack: a new dialog hides the visible one, and closing the visible dialog shows
|
|
2161
|
+
* the previous one again. Every dialog stays answerable, so no dialog promise is left pending,
|
|
2162
|
+
* and dialogs opened from inside another dialog (for example a confirm from a custom component) work.
|
|
2163
|
+
*/
|
|
2164
|
+
pushExtensionDialog(component, blocked, cancel) {
|
|
2165
|
+
this.disposeActiveSelector();
|
|
2166
|
+
this.extensionDialogs.push({ component, blocked, cancel });
|
|
2167
|
+
this.showTopExtensionDialog();
|
|
2168
|
+
}
|
|
2169
|
+
/** Close every extension dialog and settle its pending promise, then show the editor. */
|
|
2170
|
+
closeExtensionDialogs() {
|
|
2171
|
+
const dialogs = this.extensionDialogs;
|
|
2172
|
+
this.extensionDialogs = [];
|
|
2173
|
+
for (const dialog of dialogs) {
|
|
2174
|
+
dialog.component.dispose?.();
|
|
2175
|
+
dialog.cancel?.();
|
|
2176
|
+
}
|
|
2177
|
+
this.showTopExtensionDialog();
|
|
2178
|
+
}
|
|
2179
|
+
/** Remove an extension dialog. If it was visible, show the previous dialog or the editor. */
|
|
2180
|
+
removeExtensionDialog(component) {
|
|
2181
|
+
const index = this.extensionDialogs.findIndex((dialog) => dialog.component === component);
|
|
2182
|
+
if (index === -1)
|
|
2183
|
+
return;
|
|
2184
|
+
this.extensionDialogs.splice(index, 1);
|
|
2185
|
+
if (index === this.extensionDialogs.length)
|
|
2186
|
+
this.showTopExtensionDialog();
|
|
2187
|
+
}
|
|
2188
|
+
showTopExtensionDialog() {
|
|
2189
|
+
const top = this.extensionDialogs.at(-1);
|
|
2190
|
+
const component = top?.component ?? this.editor;
|
|
2191
|
+
this.editorContainer.clear();
|
|
2192
|
+
this.editorContainer.addChild(component);
|
|
2193
|
+
this.ui.setFocus(component);
|
|
2194
|
+
this.programStatus.setBlocked("extension-dialog", top?.blocked);
|
|
2195
|
+
this.ui.requestRender();
|
|
2196
|
+
}
|
|
2165
2197
|
/**
|
|
2166
2198
|
* Show a selector for extensions.
|
|
2167
2199
|
*/
|
|
@@ -2171,48 +2203,18 @@ export class InteractiveMode {
|
|
|
2171
2203
|
resolve(undefined);
|
|
2172
2204
|
return;
|
|
2173
2205
|
}
|
|
2174
|
-
const
|
|
2175
|
-
this.hideExtensionSelector();
|
|
2176
|
-
resolve(undefined);
|
|
2177
|
-
};
|
|
2178
|
-
opts?.signal?.addEventListener("abort", onAbort, { once: true });
|
|
2179
|
-
this.extensionSelectorSettle = () => {
|
|
2180
|
-
opts?.signal?.removeEventListener("abort", onAbort);
|
|
2181
|
-
resolve(undefined);
|
|
2182
|
-
};
|
|
2183
|
-
this.extensionSelector = new ExtensionSelectorComponent(title, options, (option) => {
|
|
2206
|
+
const finish = (option) => {
|
|
2184
2207
|
opts?.signal?.removeEventListener("abort", onAbort);
|
|
2208
|
+
selector.dispose();
|
|
2209
|
+
this.removeExtensionDialog(selector);
|
|
2185
2210
|
resolve(option);
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
}, { tui: this.ui, timeout: opts?.timeout, onToggleToolsExpanded: () => this.toggleToolOutputExpansion() });
|
|
2192
|
-
this.disposeActiveSelector();
|
|
2193
|
-
this.editorContainer.clear();
|
|
2194
|
-
this.editorContainer.addChild(this.extensionSelector);
|
|
2195
|
-
this.ui.setFocus(this.extensionSelector);
|
|
2196
|
-
// Extension dialogs share the editor slot: opening one replaces the status of a displaced one.
|
|
2197
|
-
this.programStatus.setBlocked("extension-dialog", blocked);
|
|
2198
|
-
this.ui.requestRender();
|
|
2211
|
+
};
|
|
2212
|
+
const onAbort = () => finish(undefined);
|
|
2213
|
+
opts?.signal?.addEventListener("abort", onAbort, { once: true });
|
|
2214
|
+
const selector = new ExtensionSelectorComponent(title, options, (option) => finish(option), () => finish(undefined), { tui: this.ui, timeout: opts?.timeout, onToggleToolsExpanded: () => this.toggleToolOutputExpansion() });
|
|
2215
|
+
this.pushExtensionDialog(selector, blocked, onAbort);
|
|
2199
2216
|
});
|
|
2200
2217
|
}
|
|
2201
|
-
/**
|
|
2202
|
-
* Hide the extension selector.
|
|
2203
|
-
*/
|
|
2204
|
-
hideExtensionSelector() {
|
|
2205
|
-
const settle = this.extensionSelectorSettle;
|
|
2206
|
-
this.extensionSelectorSettle = undefined;
|
|
2207
|
-
settle?.();
|
|
2208
|
-
this.extensionSelector?.dispose();
|
|
2209
|
-
this.editorContainer.clear();
|
|
2210
|
-
this.editorContainer.addChild(this.editor);
|
|
2211
|
-
this.extensionSelector = undefined;
|
|
2212
|
-
this.programStatus.setBlocked("extension-dialog", undefined);
|
|
2213
|
-
this.ui.setFocus(this.editor);
|
|
2214
|
-
this.ui.requestRender();
|
|
2215
|
-
}
|
|
2216
2218
|
/**
|
|
2217
2219
|
* Show a confirmation dialog for extensions.
|
|
2218
2220
|
*/
|
|
@@ -2236,71 +2238,31 @@ export class InteractiveMode {
|
|
|
2236
2238
|
resolve(undefined);
|
|
2237
2239
|
return;
|
|
2238
2240
|
}
|
|
2239
|
-
const
|
|
2240
|
-
this.hideExtensionInput();
|
|
2241
|
-
resolve(undefined);
|
|
2242
|
-
};
|
|
2243
|
-
opts?.signal?.addEventListener("abort", onAbort, { once: true });
|
|
2244
|
-
this.extensionInput = new ExtensionInputComponent(title, placeholder, (value) => {
|
|
2241
|
+
const finish = (value) => {
|
|
2245
2242
|
opts?.signal?.removeEventListener("abort", onAbort);
|
|
2246
|
-
|
|
2243
|
+
input.dispose();
|
|
2244
|
+
this.removeExtensionDialog(input);
|
|
2247
2245
|
resolve(value);
|
|
2248
|
-
}
|
|
2249
|
-
|
|
2250
|
-
|
|
2251
|
-
|
|
2252
|
-
|
|
2253
|
-
this.disposeActiveSelector();
|
|
2254
|
-
this.editorContainer.clear();
|
|
2255
|
-
this.editorContainer.addChild(this.extensionInput);
|
|
2256
|
-
this.ui.setFocus(this.extensionInput);
|
|
2257
|
-
this.programStatus.setBlocked("extension-dialog", { kind: "question", message: title });
|
|
2258
|
-
this.ui.requestRender();
|
|
2246
|
+
};
|
|
2247
|
+
const onAbort = () => finish(undefined);
|
|
2248
|
+
opts?.signal?.addEventListener("abort", onAbort, { once: true });
|
|
2249
|
+
const input = new ExtensionInputComponent(title, placeholder, (value) => finish(value), () => finish(undefined), { tui: this.ui, timeout: opts?.timeout });
|
|
2250
|
+
this.pushExtensionDialog(input, { kind: "question", message: title }, onAbort);
|
|
2259
2251
|
});
|
|
2260
2252
|
}
|
|
2261
|
-
/**
|
|
2262
|
-
* Hide the extension input.
|
|
2263
|
-
*/
|
|
2264
|
-
hideExtensionInput() {
|
|
2265
|
-
this.extensionInput?.dispose();
|
|
2266
|
-
this.editorContainer.clear();
|
|
2267
|
-
this.editorContainer.addChild(this.editor);
|
|
2268
|
-
this.extensionInput = undefined;
|
|
2269
|
-
this.programStatus.setBlocked("extension-dialog", undefined);
|
|
2270
|
-
this.ui.setFocus(this.editor);
|
|
2271
|
-
this.ui.requestRender();
|
|
2272
|
-
}
|
|
2273
2253
|
/**
|
|
2274
2254
|
* Show a multi-line editor for extensions (with Ctrl+G support).
|
|
2275
2255
|
*/
|
|
2276
2256
|
showExtensionEditor(title, prefill) {
|
|
2277
2257
|
return new Promise((resolve) => {
|
|
2278
|
-
|
|
2279
|
-
this.
|
|
2258
|
+
const finish = (value) => {
|
|
2259
|
+
this.removeExtensionDialog(editor);
|
|
2280
2260
|
resolve(value);
|
|
2281
|
-
}
|
|
2282
|
-
|
|
2283
|
-
|
|
2284
|
-
}, undefined, this.settingsManager.getExternalEditorCommand());
|
|
2285
|
-
this.disposeActiveSelector();
|
|
2286
|
-
this.editorContainer.clear();
|
|
2287
|
-
this.editorContainer.addChild(this.extensionEditor);
|
|
2288
|
-
this.ui.setFocus(this.extensionEditor);
|
|
2289
|
-
this.programStatus.setBlocked("extension-dialog", { kind: "question", message: title });
|
|
2290
|
-
this.ui.requestRender();
|
|
2261
|
+
};
|
|
2262
|
+
const editor = new ExtensionEditorComponent(this.ui, this.keybindings, title, prefill, (value) => finish(value), () => finish(undefined), undefined, this.settingsManager.getExternalEditorCommand());
|
|
2263
|
+
this.pushExtensionDialog(editor, { kind: "question", message: title }, () => finish(undefined));
|
|
2291
2264
|
});
|
|
2292
2265
|
}
|
|
2293
|
-
/**
|
|
2294
|
-
* Hide the extension editor.
|
|
2295
|
-
*/
|
|
2296
|
-
hideExtensionEditor() {
|
|
2297
|
-
this.editorContainer.clear();
|
|
2298
|
-
this.editorContainer.addChild(this.editor);
|
|
2299
|
-
this.extensionEditor = undefined;
|
|
2300
|
-
this.programStatus.setBlocked("extension-dialog", undefined);
|
|
2301
|
-
this.ui.setFocus(this.editor);
|
|
2302
|
-
this.ui.requestRender();
|
|
2303
|
-
}
|
|
2304
2266
|
/**
|
|
2305
2267
|
* Set a custom editor component from an extension.
|
|
2306
2268
|
* Pass undefined to restore the default editor.
|
|
@@ -2391,17 +2353,16 @@ export class InteractiveMode {
|
|
|
2391
2353
|
async showExtensionCustom(factory, options) {
|
|
2392
2354
|
const savedText = this.editor.getText();
|
|
2393
2355
|
const isOverlay = options?.overlay ?? false;
|
|
2394
|
-
const restoreEditor = () => {
|
|
2395
|
-
this.editorContainer.clear();
|
|
2396
|
-
this.editorContainer.addChild(this.editor);
|
|
2397
|
-
this.editor.setText(savedText);
|
|
2398
|
-
this.ui.setFocus(this.editor);
|
|
2399
|
-
this.ui.requestRender();
|
|
2400
|
-
};
|
|
2401
2356
|
return new Promise((resolve, reject) => {
|
|
2402
2357
|
let component;
|
|
2403
2358
|
let overlayHandle;
|
|
2404
2359
|
let closed = false;
|
|
2360
|
+
const restoreEditor = () => {
|
|
2361
|
+
if (component)
|
|
2362
|
+
this.removeExtensionDialog(component);
|
|
2363
|
+
this.editor.setText(savedText);
|
|
2364
|
+
this.ui.requestRender();
|
|
2365
|
+
};
|
|
2405
2366
|
const close = (result) => {
|
|
2406
2367
|
if (closed)
|
|
2407
2368
|
return;
|
|
@@ -2435,19 +2396,15 @@ export class InteractiveMode {
|
|
|
2435
2396
|
return opts;
|
|
2436
2397
|
}
|
|
2437
2398
|
// Fallback: use component's width property if available
|
|
2438
|
-
const w =
|
|
2399
|
+
const w = c.width;
|
|
2439
2400
|
return w ? { width: w } : undefined;
|
|
2440
2401
|
};
|
|
2441
|
-
overlayHandle = this.ui.showOverlay(
|
|
2402
|
+
overlayHandle = this.ui.showOverlay(c, resolveOptions());
|
|
2442
2403
|
// Expose handle to caller for visibility control
|
|
2443
2404
|
options?.onHandle?.(overlayHandle);
|
|
2444
2405
|
}
|
|
2445
2406
|
else {
|
|
2446
|
-
this.
|
|
2447
|
-
this.editorContainer.clear();
|
|
2448
|
-
this.editorContainer.addChild(component);
|
|
2449
|
-
this.ui.setFocus(component);
|
|
2450
|
-
this.ui.requestRender();
|
|
2407
|
+
this.pushExtensionDialog(c);
|
|
2451
2408
|
}
|
|
2452
2409
|
})
|
|
2453
2410
|
.catch((err) => {
|
|
@@ -3061,7 +3018,14 @@ export class InteractiveMode {
|
|
|
3061
3018
|
this.maybeShowInstallChangeWarning();
|
|
3062
3019
|
const component = this.pendingTools.get(event.toolCallId);
|
|
3063
3020
|
if (component) {
|
|
3064
|
-
component
|
|
3021
|
+
// Only what the component draws: the result's structuredContent can hold up to 1 MiB of bash output
|
|
3022
|
+
// (2 MiB as a JavaScript string), which the component would keep for the rest of the session.
|
|
3023
|
+
component.updateResult({
|
|
3024
|
+
content: event.result.content,
|
|
3025
|
+
details: event.result.details,
|
|
3026
|
+
isError: event.isError,
|
|
3027
|
+
durationMs: event.durationMs,
|
|
3028
|
+
});
|
|
3065
3029
|
this.pendingTools.delete(event.toolCallId);
|
|
3066
3030
|
this.ui.requestRender();
|
|
3067
3031
|
}
|
|
@@ -5272,8 +5236,12 @@ export class InteractiveMode {
|
|
|
5272
5236
|
}
|
|
5273
5237
|
finally {
|
|
5274
5238
|
this.activeFlowAccountsSignal = undefined;
|
|
5275
|
-
if (signal.aborted
|
|
5276
|
-
|
|
5239
|
+
if (signal.aborted) {
|
|
5240
|
+
// Dialogs opened without the signal (for example by a provider login) are closed here.
|
|
5241
|
+
const top = this.extensionDialogs.at(-1);
|
|
5242
|
+
if (top?.component instanceof ExtensionSelectorComponent)
|
|
5243
|
+
top.cancel?.();
|
|
5244
|
+
}
|
|
5277
5245
|
}
|
|
5278
5246
|
}
|
|
5279
5247
|
async showFlowProviderList(signal) {
|