@qwen-code/qwen-code 0.18.2 → 0.18.3-nightly.20260621.6b2f800ab
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/README.md +64 -492
- package/bundled/loop/SKILL.md +53 -26
- package/bundled/loop/SKILL.test.ts +67 -0
- package/bundled/qc-helper/docs/configuration/auth.md +7 -6
- package/bundled/qc-helper/docs/configuration/model-providers.md +16 -2
- package/bundled/qc-helper/docs/configuration/settings.md +51 -44
- package/bundled/qc-helper/docs/extension/introduction.md +38 -0
- package/bundled/qc-helper/docs/features/approval-mode.md +2 -0
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +4 -4
- package/bundled/qc-helper/docs/features/channels/qqbot.md +179 -0
- package/bundled/qc-helper/docs/features/commands.md +49 -0
- package/bundled/qc-helper/docs/features/followup-suggestions.md +10 -6
- package/bundled/qc-helper/docs/features/hooks.md +6 -3
- package/bundled/qc-helper/docs/features/status-line.md +4 -2
- package/bundled/qc-helper/docs/qwen-serve.md +9 -4
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +11 -5
- package/bundled/qc-helper/docs/support/troubleshooting.md +5 -0
- package/chunks/{agent-P5U6QLWL.js → agent-66UJLGYF.js} +24 -23
- package/chunks/{agent-headless-24356DC7.js → agent-headless-XWKLG7OO.js} +24 -23
- package/chunks/{anthropicContentGenerator-KLBHYGH6.js → anthropicContentGenerator-5S4OMMNL.js} +9 -7
- package/chunks/{askUserQuestion-QPZXR3UO.js → askUserQuestion-WHVYL2S2.js} +2 -2
- package/chunks/{ca-RK4QPLIX.js → ca-K6MD665I.js} +42 -2
- package/chunks/{chunk-WPTCDQN6.js → chunk-26ZYKTYZ.js} +2 -2
- package/chunks/{chunk-O4PICXES.js → chunk-2MPVVENX.js} +14 -6
- package/chunks/{chunk-VIEIRAK3.js → chunk-2O3NAOJG.js} +4 -2
- package/chunks/{chunk-NNIYWQIS.js → chunk-42HGOMED.js} +2 -1
- package/chunks/{chunk-B4ZF2KSI.js → chunk-AE6RQU6F.js} +2 -2
- package/chunks/{chunk-FIQECJTQ.js → chunk-ATLUHLZE.js} +1 -1
- package/chunks/{chunk-BJ5HQ23U.js → chunk-C6MI2ASN.js} +9 -10
- package/chunks/{chunk-LYRSMKLS.js → chunk-CTHZVIMD.js} +2 -2
- package/chunks/{chunk-MN5RAXVB.js → chunk-CX3SGIPK.js} +18 -6
- package/chunks/{chunk-IQHSD7K5.js → chunk-FH4P6RQA.js} +1 -1
- package/chunks/{chunk-LYSND7KR.js → chunk-G4BUMVEY.js} +12 -2
- package/chunks/{chunk-YJDVHAGL.js → chunk-GBN55AWZ.js} +2 -2
- package/chunks/{chunk-ZNUMXPNK.js → chunk-GOMVJKBL.js} +7 -3
- package/chunks/{chunk-NGDXHX3A.js → chunk-GRVAP37P.js} +63 -11
- package/chunks/{chunk-CPVI5J2L.js → chunk-ID533GA3.js} +1 -1
- package/chunks/{chunk-VU6A2OBJ.js → chunk-JXQ23SNT.js} +217 -219
- package/chunks/{chunk-ZMIBJS45.js → chunk-KGV3F6UF.js} +1 -1
- package/chunks/{chunk-SFRV6BGY.js → chunk-LF6BKGZT.js} +3 -3
- package/chunks/{chunk-LXYWINWF.js → chunk-LTN3VYMZ.js} +1 -1
- package/chunks/{chunk-IDYDPBBN.js → chunk-MSJ2MXJ6.js} +3 -3
- package/chunks/{chunk-25FFAMED.js → chunk-NLCTUNOS.js} +1048 -295
- package/chunks/{chunk-JZEKEWO5.js → chunk-TOSAOARP.js} +6 -6
- package/chunks/{chunk-M7OBURJM.js → chunk-VIA5MAE5.js} +24 -12
- package/chunks/{chunk-RTTAC5VW.js → chunk-VKILGMZQ.js} +1 -1
- package/chunks/{chunk-QFJ67S5R.js → chunk-VN7FXOAW.js} +732 -617
- package/chunks/{chunk-HA2UEYZP.js → chunk-WE6TNQJU.js} +13 -6
- package/chunks/chunk-XGU3ETVO.js +1026 -0
- package/chunks/{chunk-ZOFNJQNJ.js → chunk-XU7BKR3B.js} +3 -3
- package/chunks/{chunk-QP4R5FTG.js → chunk-Z7XXFPGP.js} +4 -3
- package/chunks/{chunk-TW522KN6.js → chunk-ZTQ26VBE.js} +13 -6
- package/chunks/{chunk-EQ5NHJBY.js → chunk-ZV5QED4A.js} +109573 -106663
- package/chunks/{computer-use-EGW2I2HZ.js → computer-use-5AHVGVR3.js} +26 -24
- package/chunks/contextCommand-PTDKJROT.js +54 -0
- package/chunks/{cron-create-DQKRQMCP.js → cron-create-THNDTYXU.js} +6 -6
- package/chunks/{cron-delete-DOFPHFTI.js → cron-delete-BS5H6TFJ.js} +6 -6
- package/chunks/{cron-list-RCVOO3CB.js → cron-list-7OBVHT7K.js} +24 -10
- package/chunks/{de-FGPM4KW5.js → de-K2F3T3TR.js} +41 -1
- package/chunks/{dist-2UCAYOX7.js → dist-BD27IA3L.js} +16 -5
- package/chunks/{dist-UH7CYT7F.js → dist-DZ6AJDX4.js} +52 -11
- package/chunks/{dist-KF43SZZV.js → dist-GKRNVFBH.js} +5 -1
- package/chunks/{dist-33LHH26D.js → dist-KIYB7DQW.js} +1 -1
- package/chunks/dist-QFFZWACU.js +2136 -0
- package/chunks/{edit-FJSOCDO2.js → edit-ADXZN3M7.js} +26 -27
- package/chunks/{en-VP6XPGEC.js → en-KGSAKBJP.js} +232 -0
- package/chunks/{enter-worktree-X6MVFDLR.js → enter-worktree-F5SJSHNH.js} +24 -23
- package/chunks/{enterPlanMode-MZAEQZH3.js → enterPlanMode-MCQ4HWPP.js} +52 -28
- package/chunks/{exit-worktree-RM2UPOYQ.js → exit-worktree-26AFS3YQ.js} +191 -41
- package/chunks/{exitPlanMode-7BVY3CWJ.js → exitPlanMode-UOPIPSEA.js} +85 -46
- package/chunks/{fr-ATYBVCLT.js → fr-2CAQEOK6.js} +41 -1
- package/chunks/{geminiContentGenerator-A6JHLUHK.js → geminiContentGenerator-RJA7BIHQ.js} +4 -4
- package/chunks/{glob-L3AZLCV6.js → glob-AWTDID4C.js} +26 -24
- package/chunks/{grep-SNCPCXIP.js → grep-QJ5TEMYZ.js} +96 -43
- package/chunks/{ja-W2QEA2OI.js → ja-QWL7V6OJ.js} +41 -1
- package/chunks/{keychain-token-storage-QSTRHKKL.js → keychain-token-storage-YHXIWXIB.js} +2 -2
- package/chunks/loop-wakeup-SSBWZ64K.js +167 -0
- package/chunks/{ls-TRD77UTS.js → ls-YPFUHZRQ.js} +3 -3
- package/chunks/{lsp-2VFWQPZS.js → lsp-FD6DNVAF.js} +2 -2
- package/chunks/{monitor-TS6WL6DN.js → monitor-SQYLCQAK.js} +24 -23
- package/chunks/{notebook-edit-26RNH24J.js → notebook-edit-7RR3ABQ5.js} +25 -26
- package/chunks/{openaiContentGenerator-7CA63X5G.js → openaiContentGenerator-2CHXJZ4A.js} +14 -11
- package/chunks/{pt-ZKEWJFBW.js → pt-2SPOLMAY.js} +41 -1
- package/chunks/{qwenContentGenerator-4WJTJXFZ.js → qwenContentGenerator-ZXEKDN2J.js} +27 -26
- package/chunks/{qwenOAuth2-KK433U33.js → qwenOAuth2-WZ54YZ4J.js} +4 -4
- package/chunks/{read-file-EUIHK6HD.js → read-file-AZAKLZFP.js} +9 -8
- package/chunks/{ripGrep-7J5B22W2.js → ripGrep-T5PS4VWB.js} +24 -23
- package/chunks/{ru-VEKTPJ74.js → ru-35IVJTEH.js} +41 -1
- package/chunks/{scheduler-J3OUGTTS.js → scheduler-VZ5KYSX6.js} +24 -23
- package/chunks/{send-message-QZOC5GA2.js → send-message-FWFTX62Q.js} +2 -2
- package/chunks/{serve-VF4ZNUJP.js → serve-RN6CHKG3.js} +1308 -291
- package/chunks/{shell-G6XCJAG3.js → shell-ANALFMWT.js} +24 -23
- package/chunks/{skill-7OVC6JIH.js → skill-JIKQTL4U.js} +11 -10
- package/chunks/{src-XV5MLRND.js → src-EMRXVZY7.js} +159 -59
- package/chunks/{syntheticOutput-WJSUK4SZ.js → syntheticOutput-JY5NEDTV.js} +3 -3
- package/chunks/{task-create-GGSC27HO.js → task-create-IGILDV25.js} +7 -7
- package/chunks/{task-list-EDHHHSK4.js → task-list-KBEJVAAG.js} +6 -6
- package/chunks/{task-stop-WR5PDVZY.js → task-stop-WFTMQ6AC.js} +2 -2
- package/chunks/{task-update-UR7NUHBV.js → task-update-UIVX7ZEV.js} +7 -7
- package/chunks/{team-create-JXSC7ROC.js → team-create-BVKQF4WK.js} +26 -25
- package/chunks/{team-delete-FC33URJK.js → team-delete-LPOXDPVB.js} +6 -6
- package/chunks/{todoWrite-GO2ME7ZV.js → todoWrite-R4RIJKOD.js} +4 -4
- package/chunks/{tool-search-YRWSWA2H.js → tool-search-E4VYDNQO.js} +9 -8
- package/chunks/{web-fetch-NLLATYIL.js → web-fetch-JU7SS6KE.js} +5 -5
- package/chunks/{workflow-ZN3DYFMU.js → workflow-VDPJJYAF.js} +242 -39
- package/chunks/{write-file-355M4V7Z.js → write-file-NCN66V2C.js} +26 -27
- package/chunks/{zh-TW-6YFNCKTA.js → zh-TW-BSG6BUWK.js} +232 -2
- package/chunks/{zh-OIXDDQHB.js → zh-X4KM6MTW.js} +233 -0
- package/cli.js +11094 -5768
- package/examples/agent/agents/diary.md +1 -1
- package/examples/mcp-server/qwen-extension.json +8 -1
- package/examples/starter/agents/diary.md +1 -1
- package/locales/ca.js +67 -2
- package/locales/de.js +68 -2
- package/locales/en.js +304 -0
- package/locales/fr.js +69 -2
- package/locales/ja.js +65 -2
- package/locales/pt.js +67 -2
- package/locales/ru.js +68 -2
- package/locales/zh-TW.js +288 -2
- package/locales/zh.js +288 -0
- package/package.json +4 -3
- package/web-shell/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2 +0 -0
- package/web-shell/assets/KaTeX_AMS-Regular-DMm9YOAa.woff +0 -0
- package/web-shell/assets/KaTeX_AMS-Regular-DRggAlZN.ttf +0 -0
- package/web-shell/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf +0 -0
- package/web-shell/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff +0 -0
- package/web-shell/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2 +0 -0
- package/web-shell/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff +0 -0
- package/web-shell/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2 +0 -0
- package/web-shell/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf +0 -0
- package/web-shell/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf +0 -0
- package/web-shell/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff +0 -0
- package/web-shell/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2 +0 -0
- package/web-shell/assets/KaTeX_Fraktur-Regular-CB_wures.ttf +0 -0
- package/web-shell/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2 +0 -0
- package/web-shell/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff +0 -0
- package/web-shell/assets/KaTeX_Main-Bold-Cx986IdX.woff2 +0 -0
- package/web-shell/assets/KaTeX_Main-Bold-Jm3AIy58.woff +0 -0
- package/web-shell/assets/KaTeX_Main-Bold-waoOVXN0.ttf +0 -0
- package/web-shell/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2 +0 -0
- package/web-shell/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf +0 -0
- package/web-shell/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff +0 -0
- package/web-shell/assets/KaTeX_Main-Italic-3WenGoN9.ttf +0 -0
- package/web-shell/assets/KaTeX_Main-Italic-BMLOBm91.woff +0 -0
- package/web-shell/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2 +0 -0
- package/web-shell/assets/KaTeX_Main-Regular-B22Nviop.woff2 +0 -0
- package/web-shell/assets/KaTeX_Main-Regular-Dr94JaBh.woff +0 -0
- package/web-shell/assets/KaTeX_Main-Regular-ypZvNtVU.ttf +0 -0
- package/web-shell/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf +0 -0
- package/web-shell/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2 +0 -0
- package/web-shell/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff +0 -0
- package/web-shell/assets/KaTeX_Math-Italic-DA0__PXp.woff +0 -0
- package/web-shell/assets/KaTeX_Math-Italic-flOr_0UB.ttf +0 -0
- package/web-shell/assets/KaTeX_Math-Italic-t53AETM-.woff2 +0 -0
- package/web-shell/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf +0 -0
- package/web-shell/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2 +0 -0
- package/web-shell/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff +0 -0
- package/web-shell/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2 +0 -0
- package/web-shell/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff +0 -0
- package/web-shell/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf +0 -0
- package/web-shell/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf +0 -0
- package/web-shell/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff +0 -0
- package/web-shell/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2 +0 -0
- package/web-shell/assets/KaTeX_Script-Regular-C5JkGWo-.ttf +0 -0
- package/web-shell/assets/KaTeX_Script-Regular-D3wIWfF6.woff2 +0 -0
- package/web-shell/assets/KaTeX_Script-Regular-D5yQViql.woff +0 -0
- package/web-shell/assets/KaTeX_Size1-Regular-C195tn64.woff +0 -0
- package/web-shell/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf +0 -0
- package/web-shell/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2 +0 -0
- package/web-shell/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf +0 -0
- package/web-shell/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2 +0 -0
- package/web-shell/assets/KaTeX_Size2-Regular-oD1tc_U0.woff +0 -0
- package/web-shell/assets/KaTeX_Size3-Regular-CTq5MqoE.woff +0 -0
- package/web-shell/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf +0 -0
- package/web-shell/assets/KaTeX_Size4-Regular-BF-4gkZK.woff +0 -0
- package/web-shell/assets/KaTeX_Size4-Regular-DWFBv043.ttf +0 -0
- package/web-shell/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2 +0 -0
- package/web-shell/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff +0 -0
- package/web-shell/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2 +0 -0
- package/web-shell/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf +0 -0
- package/web-shell/assets/abap-DsBKuouk.js +1 -0
- package/web-shell/assets/actionscript-3-D_z4Izcz.js +1 -0
- package/web-shell/assets/ada-727ZlQH0.js +1 -0
- package/web-shell/assets/andromeeda-C3khCPGq.js +1 -0
- package/web-shell/assets/angular-html-LfdN0zeE.js +1 -0
- package/web-shell/assets/angular-ts-CKsD7JZE.js +1 -0
- package/web-shell/assets/apache-Dn00JSTd.js +1 -0
- package/web-shell/assets/apex-COJ4H7py.js +1 -0
- package/web-shell/assets/apl-BBq3IX1j.js +1 -0
- package/web-shell/assets/applescript-Bu5BbsvL.js +1 -0
- package/web-shell/assets/ara-7O62HKoU.js +1 -0
- package/web-shell/assets/arc-CRFN10gD.js +1 -0
- package/web-shell/assets/architectureDiagram-3BPJPVTR-IRlu1CpH.js +36 -0
- package/web-shell/assets/asciidoc-BPT9niGB.js +1 -0
- package/web-shell/assets/asm-Dhn9LcZ4.js +1 -0
- package/web-shell/assets/astro-CqkE3fuf.js +1 -0
- package/web-shell/assets/aurora-x-D-2ljcwZ.js +1 -0
- package/web-shell/assets/awk-eg146-Ew.js +1 -0
- package/web-shell/assets/ayu-dark-Cv9koXgw.js +1 -0
- package/web-shell/assets/ballerina-Du268qiB.js +1 -0
- package/web-shell/assets/bat-fje9CFhw.js +1 -0
- package/web-shell/assets/beancount-BwXTMy5W.js +1 -0
- package/web-shell/assets/berry-3xVqZejG.js +1 -0
- package/web-shell/assets/bibtex-xW4inM5L.js +1 -0
- package/web-shell/assets/bicep-DHo0CJ0O.js +1 -0
- package/web-shell/assets/blade-a8OxSdnT.js +1 -0
- package/web-shell/assets/blockDiagram-GPEHLZMM-htIZ6iw8.js +132 -0
- package/web-shell/assets/bsl-Dgyn0ogV.js +1 -0
- package/web-shell/assets/c-C3t2pwGQ.js +1 -0
- package/web-shell/assets/c4Diagram-AAUBKEIU-A2GoRq3O.js +10 -0
- package/web-shell/assets/cadence-DNquZEk8.js +1 -0
- package/web-shell/assets/cairo--RitsXJZ.js +1 -0
- package/web-shell/assets/catppuccin-frappe-CD_QflpE.js +1 -0
- package/web-shell/assets/catppuccin-latte-DRW-0cLl.js +1 -0
- package/web-shell/assets/catppuccin-macchiato-C-_shW-Y.js +1 -0
- package/web-shell/assets/catppuccin-mocha-LGGdnPYs.js +1 -0
- package/web-shell/assets/channel-WwImfsc7.js +1 -0
- package/web-shell/assets/chunk-2J33WTMH-CdP2AC6u.js +1 -0
- package/web-shell/assets/chunk-4BX2VUAB-DrA07nW2.js +1 -0
- package/web-shell/assets/chunk-55IACEB6-CFGnVU2f.js +1 -0
- package/web-shell/assets/chunk-727SXJPM-BTMkq3Tk.js +206 -0
- package/web-shell/assets/chunk-AQP2D5EJ-C9sYg04Z.js +231 -0
- package/web-shell/assets/chunk-FMBD7UC4-Cag-cj6I.js +15 -0
- package/web-shell/assets/chunk-ND2GUHAM-CDSTFoR7.js +1 -0
- package/web-shell/assets/chunk-QZHKN3VN-CN9Z6oOs.js +1 -0
- package/web-shell/assets/clarity-BHOwM8T6.js +1 -0
- package/web-shell/assets/classDiagram-4FO5ZUOK-CJKQYFeJ.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CJKQYFeJ.js +1 -0
- package/web-shell/assets/clojure-DxSadP1t.js +1 -0
- package/web-shell/assets/cmake-DbXoA79R.js +1 -0
- package/web-shell/assets/cobol-PTqiYgYu.js +1 -0
- package/web-shell/assets/codeowners-Bp6g37R7.js +1 -0
- package/web-shell/assets/codeql-sacFqUAJ.js +1 -0
- package/web-shell/assets/coffee-dyiR41kL.js +1 -0
- package/web-shell/assets/common-lisp-C7gG9l05.js +1 -0
- package/web-shell/assets/coq-Dsg_Bt_b.js +1 -0
- package/web-shell/assets/cose-bilkent-S5V4N54A-DuN9j8Du.js +1 -0
- package/web-shell/assets/cpp-BksuvNSY.js +1 -0
- package/web-shell/assets/crystal-DtDmRg-F.js +1 -0
- package/web-shell/assets/csharp-D9R-vmeu.js +1 -0
- package/web-shell/assets/css-BPhBrDlE.js +1 -0
- package/web-shell/assets/csv-B0qRVHPH.js +1 -0
- package/web-shell/assets/cue-DtFQj3wx.js +1 -0
- package/web-shell/assets/cypher-m2LEI-9-.js +1 -0
- package/web-shell/assets/cytoscape.esm-CUqq0XTU.js +331 -0
- package/web-shell/assets/d-BoXegm-a.js +1 -0
- package/web-shell/assets/dagre-BM42HDAG-ByCWe45f.js +4 -0
- package/web-shell/assets/dark-plus-C3mMm8J8.js +1 -0
- package/web-shell/assets/dart-B9wLZaAG.js +1 -0
- package/web-shell/assets/dax-ClGRhx96.js +1 -0
- package/web-shell/assets/defaultLocale-DX6XiGOO.js +1 -0
- package/web-shell/assets/desktop-DEIpsLCJ.js +1 -0
- package/web-shell/assets/diagram-2AECGRRQ-eWyU_pKZ.js +43 -0
- package/web-shell/assets/diagram-5GNKFQAL-0Bfu3Fq5.js +10 -0
- package/web-shell/assets/diagram-KO2AKTUF-B6KBKkQP.js +3 -0
- package/web-shell/assets/diagram-LMA3HP47-TToDmeA_.js +24 -0
- package/web-shell/assets/diagram-OG6HWLK6-CQCkC2Yx.js +24 -0
- package/web-shell/assets/diff-BgYniUM_.js +1 -0
- package/web-shell/assets/docker-COcR7UxN.js +1 -0
- package/web-shell/assets/dotenv-BjQB5zDj.js +1 -0
- package/web-shell/assets/dracula-BzJJZx-M.js +1 -0
- package/web-shell/assets/dracula-soft-BXkSAIEj.js +1 -0
- package/web-shell/assets/dream-maker-C-nORZOA.js +1 -0
- package/web-shell/assets/edge-D5gP-w-T.js +1 -0
- package/web-shell/assets/elixir-CLiX3zqd.js +1 -0
- package/web-shell/assets/elm-CmHSxxaM.js +1 -0
- package/web-shell/assets/emacs-lisp-BX77sIaO.js +1 -0
- package/web-shell/assets/erDiagram-TEJ5UH35-Cm9ls1iB.js +85 -0
- package/web-shell/assets/erb-BYTLMnw6.js +1 -0
- package/web-shell/assets/erlang-B-DoSBHF.js +1 -0
- package/web-shell/assets/everforest-dark-BgDCqdQA.js +1 -0
- package/web-shell/assets/everforest-light-C8M2exoo.js +1 -0
- package/web-shell/assets/fennel-bCA53EVm.js +1 -0
- package/web-shell/assets/fish-w-ucz2PV.js +1 -0
- package/web-shell/assets/flowDiagram-I6XJVG4X-Dyoz80Pv.js +162 -0
- package/web-shell/assets/fluent-Dayu4EKP.js +1 -0
- package/web-shell/assets/fortran-fixed-form-TqA4NnZg.js +1 -0
- package/web-shell/assets/fortran-free-form-DKXYxT9g.js +1 -0
- package/web-shell/assets/fsharp-XplgxFYe.js +1 -0
- package/web-shell/assets/ganttDiagram-6RSMTGT7-Cfut9yaU.js +292 -0
- package/web-shell/assets/gdresource-BHYsBjWJ.js +1 -0
- package/web-shell/assets/gdscript-DfxzS6Rs.js +1 -0
- package/web-shell/assets/gdshader-SKMF96pI.js +1 -0
- package/web-shell/assets/genie-ajMbGru0.js +1 -0
- package/web-shell/assets/gherkin--30QC5Em.js +1 -0
- package/web-shell/assets/git-commit-i4q6IMui.js +1 -0
- package/web-shell/assets/git-rebase-B-v9cOL2.js +1 -0
- package/web-shell/assets/gitGraphDiagram-PVQCEYII-BCuJdlfD.js +106 -0
- package/web-shell/assets/github-dark-DHJKELXO.js +1 -0
- package/web-shell/assets/github-dark-default-Cuk6v7N8.js +1 -0
- package/web-shell/assets/github-dark-dimmed-DH5Ifo-i.js +1 -0
- package/web-shell/assets/github-dark-high-contrast-E3gJ1_iC.js +1 -0
- package/web-shell/assets/github-light-DAi9KRSo.js +1 -0
- package/web-shell/assets/github-light-default-D7oLnXFd.js +1 -0
- package/web-shell/assets/github-light-high-contrast-BfjtVDDH.js +1 -0
- package/web-shell/assets/gleam-B430Bg39.js +1 -0
- package/web-shell/assets/glimmer-js-D-cwc0-E.js +1 -0
- package/web-shell/assets/glimmer-ts-pgjy16dm.js +1 -0
- package/web-shell/assets/glsl-DBO2IWDn.js +1 -0
- package/web-shell/assets/gnuplot-CM8KxXT1.js +1 -0
- package/web-shell/assets/go-B1SYOhNW.js +1 -0
- package/web-shell/assets/graph-qsFoMdT2.js +1 -0
- package/web-shell/assets/graphql-cDcHW_If.js +1 -0
- package/web-shell/assets/groovy-DkBy-JyN.js +1 -0
- package/web-shell/assets/hack-D1yCygmZ.js +1 -0
- package/web-shell/assets/haml-B2EZWmdv.js +1 -0
- package/web-shell/assets/handlebars-BQGss363.js +1 -0
- package/web-shell/assets/haskell-BILxekzW.js +1 -0
- package/web-shell/assets/haxe-C5wWYbrZ.js +1 -0
- package/web-shell/assets/hcl-HzYwdGDm.js +1 -0
- package/web-shell/assets/hjson-T-Tgc4AT.js +1 -0
- package/web-shell/assets/hlsl-ifBTmRxC.js +1 -0
- package/web-shell/assets/houston-DnULxvSX.js +1 -0
- package/web-shell/assets/html-C2L_23MC.js +1 -0
- package/web-shell/assets/html-derivative-CSfWNPLT.js +1 -0
- package/web-shell/assets/http-FRrOvY1W.js +1 -0
- package/web-shell/assets/hxml-TIA70rKU.js +1 -0
- package/web-shell/assets/hy-BMj5Y0dO.js +1 -0
- package/web-shell/assets/imba-bv_oIlVt.js +1 -0
- package/web-shell/assets/index-BDZiTAkl.css +1 -0
- package/web-shell/assets/index-DaebdpHq.js +516 -0
- package/web-shell/assets/infoDiagram-5YYISTIA-CXKxF2VL.js +2 -0
- package/web-shell/assets/ini-BjABl1g7.js +1 -0
- package/web-shell/assets/init-Gi6I4Gst.js +1 -0
- package/web-shell/assets/ishikawaDiagram-YF4QCWOH-DE7HWSU8.js +70 -0
- package/web-shell/assets/java-xI-RfyKK.js +1 -0
- package/web-shell/assets/javascript-ySlJ1b_l.js +1 -0
- package/web-shell/assets/jinja-DGy0s7-h.js +1 -0
- package/web-shell/assets/jison-BqZprYcd.js +1 -0
- package/web-shell/assets/journeyDiagram-JHISSGLW-D__YUfds.js +139 -0
- package/web-shell/assets/json-BQoSv7ci.js +1 -0
- package/web-shell/assets/json5-w8dY5SsB.js +1 -0
- package/web-shell/assets/jsonc-TU54ms6u.js +1 -0
- package/web-shell/assets/jsonl-DREVFZK8.js +1 -0
- package/web-shell/assets/jsonnet-BfivnA6A.js +1 -0
- package/web-shell/assets/jssm-P4WzXJd0.js +1 -0
- package/web-shell/assets/jsx-BAng5TT0.js +1 -0
- package/web-shell/assets/julia-BBuGR-5E.js +1 -0
- package/web-shell/assets/kanagawa-dragon-CkXjmgJE.js +1 -0
- package/web-shell/assets/kanagawa-lotus-CfQXZHmo.js +1 -0
- package/web-shell/assets/kanagawa-wave-DWedfzmr.js +1 -0
- package/web-shell/assets/kanban-definition-UN3LZRKU-D82R169M.js +89 -0
- package/web-shell/assets/kotlin-B5lbUyaz.js +1 -0
- package/web-shell/assets/kusto-mebxcVVE.js +1 -0
- package/web-shell/assets/laserwave-DUszq2jm.js +1 -0
- package/web-shell/assets/latex-C-cWTeAZ.js +1 -0
- package/web-shell/assets/layout-CNYaLpI5.js +1 -0
- package/web-shell/assets/lean-XBlWyCtg.js +1 -0
- package/web-shell/assets/less-BfCpw3nA.js +1 -0
- package/web-shell/assets/light-plus-B7mTdjB0.js +1 -0
- package/web-shell/assets/linear-DpyMbKqT.js +1 -0
- package/web-shell/assets/liquid-D3W5UaiH.js +1 -0
- package/web-shell/assets/log-Cc5clBb7.js +1 -0
- package/web-shell/assets/logo-IuBKFhSY.js +1 -0
- package/web-shell/assets/lua-CvWAzNxB.js +1 -0
- package/web-shell/assets/luau-Du5NY7AG.js +1 -0
- package/web-shell/assets/make-Bvotw-X0.js +1 -0
- package/web-shell/assets/markdown-UIAJJxZW.js +1 -0
- package/web-shell/assets/marko-z0MBrx5-.js +1 -0
- package/web-shell/assets/material-theme-D5KoaKCx.js +1 -0
- package/web-shell/assets/material-theme-darker-BfHTSMKl.js +1 -0
- package/web-shell/assets/material-theme-lighter-B0m2ddpp.js +1 -0
- package/web-shell/assets/material-theme-ocean-CyktbL80.js +1 -0
- package/web-shell/assets/material-theme-palenight-Csfq5Kiy.js +1 -0
- package/web-shell/assets/matlab-D9-PGadD.js +1 -0
- package/web-shell/assets/mdc-DB_EDNY_.js +1 -0
- package/web-shell/assets/mdx-sdHcTMYB.js +1 -0
- package/web-shell/assets/mermaid-Ci6OQyBP.js +1 -0
- package/web-shell/assets/mermaid.core-D1KEFDhn.js +309 -0
- package/web-shell/assets/min-dark-CafNBF8u.js +1 -0
- package/web-shell/assets/min-light-CTRr51gU.js +1 -0
- package/web-shell/assets/mindmap-definition-RKZ34NQL-BwVUFGFE.js +96 -0
- package/web-shell/assets/mipsasm-BC5c_5Pe.js +1 -0
- package/web-shell/assets/mojo-Tz6hzZYG.js +1 -0
- package/web-shell/assets/monokai-D4h5O-jR.js +1 -0
- package/web-shell/assets/move-DB_GagMm.js +1 -0
- package/web-shell/assets/narrat-DLbgOhZU.js +1 -0
- package/web-shell/assets/nextflow-B0XVJmRM.js +1 -0
- package/web-shell/assets/nginx-D_VnBJ67.js +1 -0
- package/web-shell/assets/night-owl-C39BiMTA.js +1 -0
- package/web-shell/assets/nim-ZlGxZxc3.js +1 -0
- package/web-shell/assets/nix-shcSOmrb.js +1 -0
- package/web-shell/assets/nord-Ddv68eIx.js +1 -0
- package/web-shell/assets/nushell-D4Tzg5kh.js +1 -0
- package/web-shell/assets/objective-c-Deuh7S70.js +1 -0
- package/web-shell/assets/objective-cpp-BUEGK8hf.js +1 -0
- package/web-shell/assets/ocaml-BNioltXt.js +1 -0
- package/web-shell/assets/one-dark-pro-GBQ2dnAY.js +1 -0
- package/web-shell/assets/one-light-PoHY5YXO.js +1 -0
- package/web-shell/assets/ordinal-Cboi1Yqb.js +1 -0
- package/web-shell/assets/pascal-JqZropPD.js +1 -0
- package/web-shell/assets/perl-CHQXSrWU.js +1 -0
- package/web-shell/assets/php-B5ebYQev.js +1 -0
- package/web-shell/assets/pieDiagram-4H26LBE5-BO_qoEGx.js +30 -0
- package/web-shell/assets/plastic-3e1v2bzS.js +1 -0
- package/web-shell/assets/plsql-LKU2TuZ1.js +1 -0
- package/web-shell/assets/po-BFLt1xDp.js +1 -0
- package/web-shell/assets/poimandres-CS3Unz2-.js +1 -0
- package/web-shell/assets/polar-DKykz6zU.js +1 -0
- package/web-shell/assets/postcss-B3ZDOciz.js +1 -0
- package/web-shell/assets/powerquery-CSHBycmS.js +1 -0
- package/web-shell/assets/powershell-BIEUsx6d.js +1 -0
- package/web-shell/assets/prisma-B48N-Iqd.js +1 -0
- package/web-shell/assets/prolog-BY-TUvya.js +1 -0
- package/web-shell/assets/proto-zocC4JxJ.js +1 -0
- package/web-shell/assets/pug-CM9l7STV.js +1 -0
- package/web-shell/assets/puppet-Cza_XSSt.js +1 -0
- package/web-shell/assets/purescript-Bg-kzb6g.js +1 -0
- package/web-shell/assets/python-DhUJRlN_.js +1 -0
- package/web-shell/assets/qml-D8XfuvdV.js +1 -0
- package/web-shell/assets/qmldir-C8lEn-DE.js +1 -0
- package/web-shell/assets/qss-DhMKtDLN.js +1 -0
- package/web-shell/assets/quadrantDiagram-W4KKPZXB-Cx0ZaWPo.js +7 -0
- package/web-shell/assets/r-CwjWoCRV.js +1 -0
- package/web-shell/assets/racket-CzouJOBO.js +1 -0
- package/web-shell/assets/raku-B1bQXN8T.js +1 -0
- package/web-shell/assets/razor-CNLDkMZG.js +1 -0
- package/web-shell/assets/red-bN70gL4F.js +1 -0
- package/web-shell/assets/reg-5LuOXUq_.js +1 -0
- package/web-shell/assets/regexp-DWJ3fJO_.js +1 -0
- package/web-shell/assets/rel-DJlmqQ1C.js +1 -0
- package/web-shell/assets/requirementDiagram-4Y6WPE33-BJPXejOA.js +84 -0
- package/web-shell/assets/riscv-QhoSD0DR.js +1 -0
- package/web-shell/assets/rose-pine-CmCqftbK.js +1 -0
- package/web-shell/assets/rose-pine-dawn-Ds-gbosJ.js +1 -0
- package/web-shell/assets/rose-pine-moon-CjDtw9vr.js +1 -0
- package/web-shell/assets/rst-4NLicBqY.js +1 -0
- package/web-shell/assets/ruby-DeZ3UC14.js +1 -0
- package/web-shell/assets/rust-Be6lgOlo.js +1 -0
- package/web-shell/assets/sankeyDiagram-5OEKKPKP-C1xeIL9i.js +40 -0
- package/web-shell/assets/sas-BmTFh92c.js +1 -0
- package/web-shell/assets/sass-BJ4Li9vH.js +1 -0
- package/web-shell/assets/scala-DQVVAn-B.js +1 -0
- package/web-shell/assets/scheme-BJGe-b2p.js +1 -0
- package/web-shell/assets/scss-C31hgJw-.js +1 -0
- package/web-shell/assets/sdbl-BLhTXw86.js +1 -0
- package/web-shell/assets/sequenceDiagram-3UESZ5HK-CSYKQUjf.js +162 -0
- package/web-shell/assets/shaderlab-B7qAK45m.js +1 -0
- package/web-shell/assets/shellscript-atvbtKCR.js +1 -0
- package/web-shell/assets/shellsession-C_rIy8kc.js +1 -0
- package/web-shell/assets/slack-dark-BthQWCQV.js +1 -0
- package/web-shell/assets/slack-ochin-DqwNpetd.js +1 -0
- package/web-shell/assets/smalltalk-DkLiglaE.js +1 -0
- package/web-shell/assets/snazzy-light-Bw305WKR.js +1 -0
- package/web-shell/assets/solarized-dark-DXbdFlpD.js +1 -0
- package/web-shell/assets/solarized-light-L9t79GZl.js +1 -0
- package/web-shell/assets/solidity-C1w2a3ep.js +1 -0
- package/web-shell/assets/soy-C-lX7w71.js +1 -0
- package/web-shell/assets/sparql-bYkjHRlG.js +1 -0
- package/web-shell/assets/splunk-Cf8iN4DR.js +1 -0
- package/web-shell/assets/sql-COK4E0Yg.js +1 -0
- package/web-shell/assets/ssh-config-BknIz3MU.js +1 -0
- package/web-shell/assets/stata-DorPZHa4.js +1 -0
- package/web-shell/assets/stateDiagram-AJRCARHV-d9hiHlAW.js +1 -0
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DgReoybQ.js +1 -0
- package/web-shell/assets/stylus-BeQkCIfX.js +1 -0
- package/web-shell/assets/svelte-MSaWC3Je.js +1 -0
- package/web-shell/assets/swift-BSxZ-RaX.js +1 -0
- package/web-shell/assets/synthwave-84-CbfX1IO0.js +1 -0
- package/web-shell/assets/system-verilog-C7L56vO4.js +1 -0
- package/web-shell/assets/systemd-CUnW07Te.js +1 -0
- package/web-shell/assets/talonscript-C1XDQQGZ.js +1 -0
- package/web-shell/assets/tasl-CQjiPCtT.js +1 -0
- package/web-shell/assets/tcl-DQ1-QYvQ.js +1 -0
- package/web-shell/assets/templ-dwX3ZSMB.js +1 -0
- package/web-shell/assets/terraform-BbSNqyBO.js +1 -0
- package/web-shell/assets/tex-rYs2v40G.js +1 -0
- package/web-shell/assets/timeline-definition-PNZ67QCA-BhCBkq8k.js +120 -0
- package/web-shell/assets/tokyo-night-DBQeEorK.js +1 -0
- package/web-shell/assets/toml-CB2ApiWb.js +1 -0
- package/web-shell/assets/ts-tags-CipyTH0X.js +1 -0
- package/web-shell/assets/tsv-B_m7g4N7.js +1 -0
- package/web-shell/assets/tsx-B6W0miNI.js +1 -0
- package/web-shell/assets/turtle-BMR_PYu6.js +1 -0
- package/web-shell/assets/twig-NC5TFiHP.js +1 -0
- package/web-shell/assets/typescript-Dj6nwHGl.js +1 -0
- package/web-shell/assets/typespec-BpWG_bgh.js +1 -0
- package/web-shell/assets/typst-BVUVsWT6.js +1 -0
- package/web-shell/assets/v-CAQ2eGtk.js +1 -0
- package/web-shell/assets/vala-BFOHcciG.js +1 -0
- package/web-shell/assets/vb-CdO5JTpU.js +1 -0
- package/web-shell/assets/vennDiagram-CIIHVFJN-DPPFWp_y.js +34 -0
- package/web-shell/assets/verilog-CJaU5se_.js +1 -0
- package/web-shell/assets/vesper-BEBZ7ncR.js +1 -0
- package/web-shell/assets/vhdl-DYoNaHQp.js +1 -0
- package/web-shell/assets/viml-m4uW47V2.js +1 -0
- package/web-shell/assets/vitesse-black-Bkuqu6BP.js +1 -0
- package/web-shell/assets/vitesse-dark-D0r3Knsf.js +1 -0
- package/web-shell/assets/vitesse-light-CVO1_9PV.js +1 -0
- package/web-shell/assets/vue-BuYVFjOK.js +1 -0
- package/web-shell/assets/vue-html-xdeiXROB.js +1 -0
- package/web-shell/assets/vyper-nyqBNV6O.js +1 -0
- package/web-shell/assets/wardley-L42UT6IY-CcOUIgXY.js +173 -0
- package/web-shell/assets/wardleyDiagram-YWT4CUSO-p7oR5X7r.js +78 -0
- package/web-shell/assets/wasm-C6j12Q_x.js +1 -0
- package/web-shell/assets/wasm-CG6Dc4jp.js +1 -0
- package/web-shell/assets/wenyan-7A4Fjokl.js +1 -0
- package/web-shell/assets/wgsl-CB0Krxn9.js +1 -0
- package/web-shell/assets/wikitext-DCE3LsBG.js +1 -0
- package/web-shell/assets/wolfram-C3FkfJm5.js +1 -0
- package/web-shell/assets/xml-e3z08dGr.js +1 -0
- package/web-shell/assets/xsl-Dd0NUgwM.js +1 -0
- package/web-shell/assets/xychartDiagram-2RQKCTM6-Dfr7-SEy.js +7 -0
- package/web-shell/assets/yaml-CVw76BM1.js +1 -0
- package/web-shell/assets/zenscript-HnGAYVZD.js +1 -0
- package/web-shell/assets/zig-BVz_zdnA.js +1 -0
- package/web-shell/index.html +23 -0
- package/chunks/chunk-C64WAJOC.js +0 -117
- package/chunks/contextCommand-HI2X2Y7I.js +0 -53
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
RequestTokenizer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-CX3SGIPK.js";
|
|
6
6
|
import {
|
|
7
7
|
OpenAIContentConverter,
|
|
8
8
|
TaggedThinkingParser,
|
|
9
9
|
openaiRequestCaptureContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-NLCTUNOS.js";
|
|
11
11
|
import {
|
|
12
12
|
createChildAbortController
|
|
13
13
|
} from "./chunk-64WXLC72.js";
|
|
14
14
|
import {
|
|
15
15
|
buildRuntimeFetchOptions,
|
|
16
16
|
redactProxyError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-42HGOMED.js";
|
|
18
18
|
import {
|
|
19
19
|
CAPPED_DEFAULT_MAX_TOKENS,
|
|
20
20
|
DASHSCOPE_PROXY_BASE_URL,
|
|
@@ -22,17 +22,18 @@ import {
|
|
|
22
22
|
DEFAULT_MAX_RETRIES,
|
|
23
23
|
DEFAULT_TIMEOUT,
|
|
24
24
|
hasExplicitOutputLimit,
|
|
25
|
+
parsePositiveIntegerEnvValue,
|
|
25
26
|
runtimeDiagnostics,
|
|
26
27
|
safeJsonParse,
|
|
27
28
|
tokenLimit
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-G4BUMVEY.js";
|
|
29
30
|
import {
|
|
30
31
|
GenerateContentResponse
|
|
31
32
|
} from "./chunk-55ZMG67I.js";
|
|
32
33
|
import {
|
|
33
34
|
createDebugLogger,
|
|
34
35
|
isAbortError
|
|
35
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-WE6TNQJU.js";
|
|
36
37
|
import {
|
|
37
38
|
init_esbuild_shims
|
|
38
39
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -7025,9 +7026,10 @@ var DefaultOpenAICompatibleProvider = class {
|
|
|
7025
7026
|
effectiveMaxTokens = userMaxTokens;
|
|
7026
7027
|
}
|
|
7027
7028
|
} else {
|
|
7028
|
-
const
|
|
7029
|
-
|
|
7030
|
-
|
|
7029
|
+
const envMaxTokens = parsePositiveIntegerEnvValue(
|
|
7030
|
+
process.env["QWEN_CODE_MAX_OUTPUT_TOKENS"]
|
|
7031
|
+
);
|
|
7032
|
+
if (envMaxTokens !== void 0) {
|
|
7031
7033
|
effectiveMaxTokens = isKnownModel ? Math.min(envMaxTokens, modelLimit) : envMaxTokens;
|
|
7032
7034
|
} else {
|
|
7033
7035
|
effectiveMaxTokens = Math.min(modelLimit, CAPPED_DEFAULT_MAX_TOKENS);
|
|
@@ -7049,7 +7051,14 @@ var ModelScopeOpenAICompatibleProvider = class extends DefaultOpenAICompatiblePr
|
|
|
7049
7051
|
* Checks if the configuration is for ModelScope.
|
|
7050
7052
|
*/
|
|
7051
7053
|
static isModelScopeProvider(config) {
|
|
7052
|
-
|
|
7054
|
+
const baseUrl = config.baseUrl ?? "";
|
|
7055
|
+
if (!baseUrl) return false;
|
|
7056
|
+
try {
|
|
7057
|
+
const hostname = new URL(baseUrl).hostname.toLowerCase();
|
|
7058
|
+
return hostname === "modelscope.cn" || hostname.endsWith(".modelscope.cn");
|
|
7059
|
+
} catch {
|
|
7060
|
+
return false;
|
|
7061
|
+
}
|
|
7053
7062
|
}
|
|
7054
7063
|
/**
|
|
7055
7064
|
* ModelScope does not support `stream_options` when `stream` is false.
|
|
@@ -7469,8 +7478,14 @@ var OpenRouterOpenAICompatibleProvider = class extends DefaultOpenAICompatiblePr
|
|
|
7469
7478
|
super(contentGeneratorConfig, cliConfig);
|
|
7470
7479
|
}
|
|
7471
7480
|
static isOpenRouterProvider(contentGeneratorConfig) {
|
|
7472
|
-
const baseURL = contentGeneratorConfig.baseUrl
|
|
7473
|
-
|
|
7481
|
+
const baseURL = contentGeneratorConfig.baseUrl ?? "";
|
|
7482
|
+
if (!baseURL) return false;
|
|
7483
|
+
try {
|
|
7484
|
+
const hostname = new URL(baseURL).hostname.toLowerCase();
|
|
7485
|
+
return hostname === "openrouter.ai" || hostname.endsWith(".openrouter.ai");
|
|
7486
|
+
} catch {
|
|
7487
|
+
return false;
|
|
7488
|
+
}
|
|
7474
7489
|
}
|
|
7475
7490
|
buildHeaders() {
|
|
7476
7491
|
const baseHeaders = super.buildHeaders();
|
|
@@ -7482,6 +7497,35 @@ var OpenRouterOpenAICompatibleProvider = class extends DefaultOpenAICompatiblePr
|
|
|
7482
7497
|
}
|
|
7483
7498
|
};
|
|
7484
7499
|
|
|
7500
|
+
// packages/core/src/core/openaiContentGenerator/provider/requesty.ts
|
|
7501
|
+
init_esbuild_shims();
|
|
7502
|
+
var RequestyOpenAICompatibleProvider = class extends DefaultOpenAICompatibleProvider {
|
|
7503
|
+
static {
|
|
7504
|
+
__name(this, "RequestyOpenAICompatibleProvider");
|
|
7505
|
+
}
|
|
7506
|
+
constructor(contentGeneratorConfig, cliConfig) {
|
|
7507
|
+
super(contentGeneratorConfig, cliConfig);
|
|
7508
|
+
}
|
|
7509
|
+
static isRequestyProvider(contentGeneratorConfig) {
|
|
7510
|
+
const baseURL = contentGeneratorConfig.baseUrl || "";
|
|
7511
|
+
if (!baseURL) return false;
|
|
7512
|
+
try {
|
|
7513
|
+
const host = new URL(baseURL).hostname.toLowerCase();
|
|
7514
|
+
return host === "router.requesty.ai" || host.endsWith(".requesty.ai");
|
|
7515
|
+
} catch {
|
|
7516
|
+
return false;
|
|
7517
|
+
}
|
|
7518
|
+
}
|
|
7519
|
+
buildHeaders() {
|
|
7520
|
+
const baseHeaders = super.buildHeaders();
|
|
7521
|
+
return {
|
|
7522
|
+
...baseHeaders,
|
|
7523
|
+
"HTTP-Referer": "https://github.com/QwenLM/qwen-code.git",
|
|
7524
|
+
"X-Title": "Qwen Code"
|
|
7525
|
+
};
|
|
7526
|
+
}
|
|
7527
|
+
};
|
|
7528
|
+
|
|
7485
7529
|
// packages/core/src/core/openaiContentGenerator/provider/minimax.ts
|
|
7486
7530
|
init_esbuild_shims();
|
|
7487
7531
|
var MINIMAX_KNOWN_HOSTS = ["api.minimaxi.com", "api.minimax.io"];
|
|
@@ -8279,6 +8323,7 @@ var ContentGenerationPipeline = class {
|
|
|
8279
8323
|
// message is spec-compliant and safe for permissive providers too.
|
|
8280
8324
|
// Opt out via generationConfig.splitToolMedia = false.
|
|
8281
8325
|
true,
|
|
8326
|
+
toolResultContentFormat: providerOverrides.toolResultContentFormat ?? this.contentGeneratorConfig.toolResultContentFormat ?? "parts",
|
|
8282
8327
|
...toolCallParser ? { toolCallParser } : {},
|
|
8283
8328
|
...responseParsingOptions ? { responseParsingOptions } : {},
|
|
8284
8329
|
...taggedThinkingParser ? { taggedThinkingParser } : {}
|
|
@@ -8479,6 +8524,12 @@ function determineProvider(contentGeneratorConfig, cliConfig) {
|
|
|
8479
8524
|
cliConfig
|
|
8480
8525
|
);
|
|
8481
8526
|
}
|
|
8527
|
+
if (RequestyOpenAICompatibleProvider.isRequestyProvider(config)) {
|
|
8528
|
+
return new RequestyOpenAICompatibleProvider(
|
|
8529
|
+
contentGeneratorConfig,
|
|
8530
|
+
cliConfig
|
|
8531
|
+
);
|
|
8532
|
+
}
|
|
8482
8533
|
if (ModelScopeOpenAICompatibleProvider.isModelScopeProvider(config)) {
|
|
8483
8534
|
return new ModelScopeOpenAICompatibleProvider(
|
|
8484
8535
|
contentGeneratorConfig,
|
|
@@ -8505,6 +8556,7 @@ export {
|
|
|
8505
8556
|
DashScopeOpenAICompatibleProvider,
|
|
8506
8557
|
DeepSeekOpenAICompatibleProvider,
|
|
8507
8558
|
OpenRouterOpenAICompatibleProvider,
|
|
8559
|
+
RequestyOpenAICompatibleProvider,
|
|
8508
8560
|
MiniMaxOpenAICompatibleProvider,
|
|
8509
8561
|
MistralOpenAICompatibleProvider,
|
|
8510
8562
|
MiMoOpenAICompatibleProvider,
|
|
@@ -12,6 +12,223 @@ import {
|
|
|
12
12
|
__name
|
|
13
13
|
} from "./chunk-J2S4EL5Y.js";
|
|
14
14
|
|
|
15
|
+
// packages/channels/base/dist/paths.js
|
|
16
|
+
init_esbuild_shims();
|
|
17
|
+
import * as path from "node:path";
|
|
18
|
+
import * as os from "node:os";
|
|
19
|
+
function resolvePath(dir) {
|
|
20
|
+
let resolved = dir;
|
|
21
|
+
if (resolved === "~" || resolved.startsWith("~/") || resolved.startsWith("~\\")) {
|
|
22
|
+
const relativeSegments = resolved === "~" ? [] : resolved.slice(2).split(/[/\\]+/).filter(Boolean);
|
|
23
|
+
resolved = path.join(os.homedir(), ...relativeSegments);
|
|
24
|
+
}
|
|
25
|
+
if (!path.isAbsolute(resolved)) {
|
|
26
|
+
resolved = path.resolve(resolved);
|
|
27
|
+
}
|
|
28
|
+
return resolved;
|
|
29
|
+
}
|
|
30
|
+
__name(resolvePath, "resolvePath");
|
|
31
|
+
function getGlobalQwenDir() {
|
|
32
|
+
const envDir = process.env["QWEN_HOME"];
|
|
33
|
+
if (envDir) {
|
|
34
|
+
return resolvePath(envDir);
|
|
35
|
+
}
|
|
36
|
+
const homeDir = os.homedir();
|
|
37
|
+
return homeDir ? path.join(homeDir, ".qwen") : path.join(os.tmpdir(), ".qwen");
|
|
38
|
+
}
|
|
39
|
+
__name(getGlobalQwenDir, "getGlobalQwenDir");
|
|
40
|
+
|
|
41
|
+
// packages/channels/base/dist/SessionRouter.js
|
|
42
|
+
init_esbuild_shims();
|
|
43
|
+
import { existsSync, readFileSync, writeFileSync, unlinkSync } from "node:fs";
|
|
44
|
+
var SessionRouter = class {
|
|
45
|
+
static {
|
|
46
|
+
__name(this, "SessionRouter");
|
|
47
|
+
}
|
|
48
|
+
toSession = /* @__PURE__ */ new Map();
|
|
49
|
+
// routing key → session ID
|
|
50
|
+
toTarget = /* @__PURE__ */ new Map();
|
|
51
|
+
// session ID → target
|
|
52
|
+
toCwd = /* @__PURE__ */ new Map();
|
|
53
|
+
// session ID → cwd
|
|
54
|
+
bridge;
|
|
55
|
+
defaultCwd;
|
|
56
|
+
defaultScope;
|
|
57
|
+
channelScopes = /* @__PURE__ */ new Map();
|
|
58
|
+
persistPath;
|
|
59
|
+
constructor(bridge, defaultCwd, scope = "user", persistPath) {
|
|
60
|
+
this.bridge = bridge;
|
|
61
|
+
this.defaultCwd = defaultCwd;
|
|
62
|
+
this.defaultScope = scope;
|
|
63
|
+
this.persistPath = persistPath;
|
|
64
|
+
}
|
|
65
|
+
/** Replace the bridge instance (used after crash recovery restart). */
|
|
66
|
+
setBridge(bridge) {
|
|
67
|
+
this.bridge = bridge;
|
|
68
|
+
}
|
|
69
|
+
/** Set scope override for a specific channel. */
|
|
70
|
+
setChannelScope(channelName, scope) {
|
|
71
|
+
this.channelScopes.set(channelName, scope);
|
|
72
|
+
}
|
|
73
|
+
routingKey(channelName, senderId, chatId, threadId) {
|
|
74
|
+
const scope = this.channelScopes.get(channelName) || this.defaultScope;
|
|
75
|
+
switch (scope) {
|
|
76
|
+
case "thread":
|
|
77
|
+
return `${channelName}:${threadId || chatId}`;
|
|
78
|
+
case "single":
|
|
79
|
+
return `${channelName}:__single__`;
|
|
80
|
+
case "user":
|
|
81
|
+
default:
|
|
82
|
+
return `${channelName}:${senderId}:${chatId}`;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Sender-scoped key prefix for by-sender (no chatId) scans. The trailing
|
|
87
|
+
* ':' delimiter ensures a sender id matches as a whole segment — without it
|
|
88
|
+
* sender "bob" would also match another sender "bobby"
|
|
89
|
+
* (key `${channelName}:bobby:${chatId}`).
|
|
90
|
+
*/
|
|
91
|
+
senderPrefix(channelName, senderId) {
|
|
92
|
+
return `${channelName}:${senderId}:`;
|
|
93
|
+
}
|
|
94
|
+
async resolve(channelName, senderId, chatId, threadId, cwd) {
|
|
95
|
+
const key = this.routingKey(channelName, senderId, chatId, threadId);
|
|
96
|
+
const existing = this.toSession.get(key);
|
|
97
|
+
if (existing) {
|
|
98
|
+
return existing;
|
|
99
|
+
}
|
|
100
|
+
const sessionCwd = cwd || this.defaultCwd;
|
|
101
|
+
const sessionId = await this.bridge.newSession(sessionCwd);
|
|
102
|
+
this.toSession.set(key, sessionId);
|
|
103
|
+
this.toTarget.set(sessionId, { channelName, senderId, chatId, threadId });
|
|
104
|
+
this.toCwd.set(sessionId, sessionCwd);
|
|
105
|
+
this.persist();
|
|
106
|
+
return sessionId;
|
|
107
|
+
}
|
|
108
|
+
getTarget(sessionId) {
|
|
109
|
+
return this.toTarget.get(sessionId);
|
|
110
|
+
}
|
|
111
|
+
hasSession(channelName, senderId, chatId) {
|
|
112
|
+
if (chatId) {
|
|
113
|
+
return this.toSession.has(this.routingKey(channelName, senderId, chatId));
|
|
114
|
+
}
|
|
115
|
+
const prefix = this.senderPrefix(channelName, senderId);
|
|
116
|
+
for (const k of this.toSession.keys()) {
|
|
117
|
+
if (k.startsWith(prefix))
|
|
118
|
+
return true;
|
|
119
|
+
}
|
|
120
|
+
return false;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Remove session(s) for the given sender. Returns the removed session IDs.
|
|
124
|
+
*/
|
|
125
|
+
removeSession(channelName, senderId, chatId) {
|
|
126
|
+
const removedIds = [];
|
|
127
|
+
if (chatId) {
|
|
128
|
+
const key = this.routingKey(channelName, senderId, chatId);
|
|
129
|
+
const sessionId = this.deleteByKey(key);
|
|
130
|
+
if (sessionId)
|
|
131
|
+
removedIds.push(sessionId);
|
|
132
|
+
} else {
|
|
133
|
+
const prefix = this.senderPrefix(channelName, senderId);
|
|
134
|
+
for (const k of [...this.toSession.keys()]) {
|
|
135
|
+
if (k.startsWith(prefix)) {
|
|
136
|
+
const sessionId = this.deleteByKey(k);
|
|
137
|
+
if (sessionId)
|
|
138
|
+
removedIds.push(sessionId);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (removedIds.length > 0)
|
|
143
|
+
this.persist();
|
|
144
|
+
return removedIds;
|
|
145
|
+
}
|
|
146
|
+
deleteByKey(key) {
|
|
147
|
+
const sessionId = this.toSession.get(key);
|
|
148
|
+
if (!sessionId)
|
|
149
|
+
return null;
|
|
150
|
+
this.toSession.delete(key);
|
|
151
|
+
this.toTarget.delete(sessionId);
|
|
152
|
+
this.toCwd.delete(sessionId);
|
|
153
|
+
return sessionId;
|
|
154
|
+
}
|
|
155
|
+
/** Get all session entries for crash recovery. */
|
|
156
|
+
getAll() {
|
|
157
|
+
const entries = [];
|
|
158
|
+
for (const [key, sessionId] of this.toSession) {
|
|
159
|
+
const target = this.toTarget.get(sessionId);
|
|
160
|
+
if (target) {
|
|
161
|
+
entries.push({ key, sessionId, target });
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
return entries;
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Restore session mappings from a previous bridge.
|
|
168
|
+
* Called after bridge restart — attempts loadSession for each saved mapping.
|
|
169
|
+
* Failed loads are silently dropped (new session on next message).
|
|
170
|
+
*/
|
|
171
|
+
async restoreSessions() {
|
|
172
|
+
if (!this.persistPath || !existsSync(this.persistPath)) {
|
|
173
|
+
return { restored: 0, failed: 0 };
|
|
174
|
+
}
|
|
175
|
+
let entries;
|
|
176
|
+
try {
|
|
177
|
+
entries = JSON.parse(readFileSync(this.persistPath, "utf-8"));
|
|
178
|
+
} catch {
|
|
179
|
+
return { restored: 0, failed: 0 };
|
|
180
|
+
}
|
|
181
|
+
let restored = 0;
|
|
182
|
+
let failed = 0;
|
|
183
|
+
for (const [key, entry] of Object.entries(entries)) {
|
|
184
|
+
try {
|
|
185
|
+
const sessionId = await this.bridge.loadSession(entry.sessionId, entry.cwd);
|
|
186
|
+
this.toSession.set(key, sessionId);
|
|
187
|
+
this.toTarget.set(sessionId, entry.target);
|
|
188
|
+
this.toCwd.set(sessionId, entry.cwd);
|
|
189
|
+
restored++;
|
|
190
|
+
} catch {
|
|
191
|
+
failed++;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (failed > 0) {
|
|
195
|
+
this.persist();
|
|
196
|
+
}
|
|
197
|
+
return { restored, failed };
|
|
198
|
+
}
|
|
199
|
+
/** Clear in-memory state and delete persist file. Used on clean shutdown. */
|
|
200
|
+
clearAll() {
|
|
201
|
+
this.toSession.clear();
|
|
202
|
+
this.toTarget.clear();
|
|
203
|
+
this.toCwd.clear();
|
|
204
|
+
if (this.persistPath && existsSync(this.persistPath)) {
|
|
205
|
+
try {
|
|
206
|
+
unlinkSync(this.persistPath);
|
|
207
|
+
} catch {
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
persist() {
|
|
212
|
+
if (!this.persistPath)
|
|
213
|
+
return;
|
|
214
|
+
const data = {};
|
|
215
|
+
for (const [key, sessionId] of this.toSession) {
|
|
216
|
+
const target = this.toTarget.get(sessionId);
|
|
217
|
+
if (target) {
|
|
218
|
+
data[key] = {
|
|
219
|
+
sessionId,
|
|
220
|
+
target,
|
|
221
|
+
cwd: this.toCwd.get(sessionId) || this.defaultCwd
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
try {
|
|
226
|
+
writeFileSync(this.persistPath, JSON.stringify(data, null, 2), "utf-8");
|
|
227
|
+
} catch {
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
};
|
|
231
|
+
|
|
15
232
|
// packages/channels/base/dist/ChannelBase.js
|
|
16
233
|
init_esbuild_shims();
|
|
17
234
|
|
|
@@ -200,34 +417,6 @@ init_esbuild_shims();
|
|
|
200
417
|
import * as crypto from "node:crypto";
|
|
201
418
|
import * as fs from "node:fs";
|
|
202
419
|
import * as path2 from "node:path";
|
|
203
|
-
|
|
204
|
-
// packages/channels/base/dist/paths.js
|
|
205
|
-
init_esbuild_shims();
|
|
206
|
-
import * as path from "node:path";
|
|
207
|
-
import * as os from "node:os";
|
|
208
|
-
function resolvePath(dir) {
|
|
209
|
-
let resolved = dir;
|
|
210
|
-
if (resolved === "~" || resolved.startsWith("~/") || resolved.startsWith("~\\")) {
|
|
211
|
-
const relativeSegments = resolved === "~" ? [] : resolved.slice(2).split(/[/\\]+/).filter(Boolean);
|
|
212
|
-
resolved = path.join(os.homedir(), ...relativeSegments);
|
|
213
|
-
}
|
|
214
|
-
if (!path.isAbsolute(resolved)) {
|
|
215
|
-
resolved = path.resolve(resolved);
|
|
216
|
-
}
|
|
217
|
-
return resolved;
|
|
218
|
-
}
|
|
219
|
-
__name(resolvePath, "resolvePath");
|
|
220
|
-
function getGlobalQwenDir() {
|
|
221
|
-
const envDir = process.env["QWEN_HOME"];
|
|
222
|
-
if (envDir) {
|
|
223
|
-
return resolvePath(envDir);
|
|
224
|
-
}
|
|
225
|
-
const homeDir = os.homedir();
|
|
226
|
-
return homeDir ? path.join(homeDir, ".qwen") : path.join(os.tmpdir(), ".qwen");
|
|
227
|
-
}
|
|
228
|
-
__name(getGlobalQwenDir, "getGlobalQwenDir");
|
|
229
|
-
|
|
230
|
-
// packages/channels/base/dist/PairingStore.js
|
|
231
420
|
var SAFE_ALPHABET = "ABCDEFGHJKLMNPQRSTUVWXYZ23456789";
|
|
232
421
|
var CODE_LENGTH = 8;
|
|
233
422
|
var EXPIRY_MS = 60 * 60 * 1e3;
|
|
@@ -336,197 +525,6 @@ function generateCode() {
|
|
|
336
525
|
}
|
|
337
526
|
__name(generateCode, "generateCode");
|
|
338
527
|
|
|
339
|
-
// packages/channels/base/dist/SessionRouter.js
|
|
340
|
-
init_esbuild_shims();
|
|
341
|
-
import { existsSync as existsSync2, readFileSync as readFileSync2, writeFileSync as writeFileSync2, unlinkSync } from "node:fs";
|
|
342
|
-
var SessionRouter = class {
|
|
343
|
-
static {
|
|
344
|
-
__name(this, "SessionRouter");
|
|
345
|
-
}
|
|
346
|
-
toSession = /* @__PURE__ */ new Map();
|
|
347
|
-
// routing key → session ID
|
|
348
|
-
toTarget = /* @__PURE__ */ new Map();
|
|
349
|
-
// session ID → target
|
|
350
|
-
toCwd = /* @__PURE__ */ new Map();
|
|
351
|
-
// session ID → cwd
|
|
352
|
-
bridge;
|
|
353
|
-
defaultCwd;
|
|
354
|
-
defaultScope;
|
|
355
|
-
channelScopes = /* @__PURE__ */ new Map();
|
|
356
|
-
persistPath;
|
|
357
|
-
constructor(bridge, defaultCwd, scope = "user", persistPath) {
|
|
358
|
-
this.bridge = bridge;
|
|
359
|
-
this.defaultCwd = defaultCwd;
|
|
360
|
-
this.defaultScope = scope;
|
|
361
|
-
this.persistPath = persistPath;
|
|
362
|
-
}
|
|
363
|
-
/** Replace the bridge instance (used after crash recovery restart). */
|
|
364
|
-
setBridge(bridge) {
|
|
365
|
-
this.bridge = bridge;
|
|
366
|
-
}
|
|
367
|
-
/** Set scope override for a specific channel. */
|
|
368
|
-
setChannelScope(channelName, scope) {
|
|
369
|
-
this.channelScopes.set(channelName, scope);
|
|
370
|
-
}
|
|
371
|
-
routingKey(channelName, senderId, chatId, threadId) {
|
|
372
|
-
const scope = this.channelScopes.get(channelName) || this.defaultScope;
|
|
373
|
-
switch (scope) {
|
|
374
|
-
case "thread":
|
|
375
|
-
return `${channelName}:${threadId || chatId}`;
|
|
376
|
-
case "single":
|
|
377
|
-
return `${channelName}:__single__`;
|
|
378
|
-
case "user":
|
|
379
|
-
default:
|
|
380
|
-
return `${channelName}:${senderId}:${chatId}`;
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
/**
|
|
384
|
-
* Sender-scoped key prefix for by-sender (no chatId) scans. The trailing
|
|
385
|
-
* ':' delimiter ensures a sender id matches as a whole segment — without it
|
|
386
|
-
* sender "bob" would also match another sender "bobby"
|
|
387
|
-
* (key `${channelName}:bobby:${chatId}`).
|
|
388
|
-
*/
|
|
389
|
-
senderPrefix(channelName, senderId) {
|
|
390
|
-
return `${channelName}:${senderId}:`;
|
|
391
|
-
}
|
|
392
|
-
async resolve(channelName, senderId, chatId, threadId, cwd) {
|
|
393
|
-
const key = this.routingKey(channelName, senderId, chatId, threadId);
|
|
394
|
-
const existing = this.toSession.get(key);
|
|
395
|
-
if (existing) {
|
|
396
|
-
return existing;
|
|
397
|
-
}
|
|
398
|
-
const sessionCwd = cwd || this.defaultCwd;
|
|
399
|
-
const sessionId = await this.bridge.newSession(sessionCwd);
|
|
400
|
-
this.toSession.set(key, sessionId);
|
|
401
|
-
this.toTarget.set(sessionId, { channelName, senderId, chatId, threadId });
|
|
402
|
-
this.toCwd.set(sessionId, sessionCwd);
|
|
403
|
-
this.persist();
|
|
404
|
-
return sessionId;
|
|
405
|
-
}
|
|
406
|
-
getTarget(sessionId) {
|
|
407
|
-
return this.toTarget.get(sessionId);
|
|
408
|
-
}
|
|
409
|
-
hasSession(channelName, senderId, chatId) {
|
|
410
|
-
if (chatId) {
|
|
411
|
-
return this.toSession.has(this.routingKey(channelName, senderId, chatId));
|
|
412
|
-
}
|
|
413
|
-
const prefix = this.senderPrefix(channelName, senderId);
|
|
414
|
-
for (const k of this.toSession.keys()) {
|
|
415
|
-
if (k.startsWith(prefix))
|
|
416
|
-
return true;
|
|
417
|
-
}
|
|
418
|
-
return false;
|
|
419
|
-
}
|
|
420
|
-
/**
|
|
421
|
-
* Remove session(s) for the given sender. Returns the removed session IDs.
|
|
422
|
-
*/
|
|
423
|
-
removeSession(channelName, senderId, chatId) {
|
|
424
|
-
const removedIds = [];
|
|
425
|
-
if (chatId) {
|
|
426
|
-
const key = this.routingKey(channelName, senderId, chatId);
|
|
427
|
-
const sessionId = this.deleteByKey(key);
|
|
428
|
-
if (sessionId)
|
|
429
|
-
removedIds.push(sessionId);
|
|
430
|
-
} else {
|
|
431
|
-
const prefix = this.senderPrefix(channelName, senderId);
|
|
432
|
-
for (const k of [...this.toSession.keys()]) {
|
|
433
|
-
if (k.startsWith(prefix)) {
|
|
434
|
-
const sessionId = this.deleteByKey(k);
|
|
435
|
-
if (sessionId)
|
|
436
|
-
removedIds.push(sessionId);
|
|
437
|
-
}
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
if (removedIds.length > 0)
|
|
441
|
-
this.persist();
|
|
442
|
-
return removedIds;
|
|
443
|
-
}
|
|
444
|
-
deleteByKey(key) {
|
|
445
|
-
const sessionId = this.toSession.get(key);
|
|
446
|
-
if (!sessionId)
|
|
447
|
-
return null;
|
|
448
|
-
this.toSession.delete(key);
|
|
449
|
-
this.toTarget.delete(sessionId);
|
|
450
|
-
this.toCwd.delete(sessionId);
|
|
451
|
-
return sessionId;
|
|
452
|
-
}
|
|
453
|
-
/** Get all session entries for crash recovery. */
|
|
454
|
-
getAll() {
|
|
455
|
-
const entries = [];
|
|
456
|
-
for (const [key, sessionId] of this.toSession) {
|
|
457
|
-
const target = this.toTarget.get(sessionId);
|
|
458
|
-
if (target) {
|
|
459
|
-
entries.push({ key, sessionId, target });
|
|
460
|
-
}
|
|
461
|
-
}
|
|
462
|
-
return entries;
|
|
463
|
-
}
|
|
464
|
-
/**
|
|
465
|
-
* Restore session mappings from a previous bridge.
|
|
466
|
-
* Called after bridge restart — attempts loadSession for each saved mapping.
|
|
467
|
-
* Failed loads are silently dropped (new session on next message).
|
|
468
|
-
*/
|
|
469
|
-
async restoreSessions() {
|
|
470
|
-
if (!this.persistPath || !existsSync2(this.persistPath)) {
|
|
471
|
-
return { restored: 0, failed: 0 };
|
|
472
|
-
}
|
|
473
|
-
let entries;
|
|
474
|
-
try {
|
|
475
|
-
entries = JSON.parse(readFileSync2(this.persistPath, "utf-8"));
|
|
476
|
-
} catch {
|
|
477
|
-
return { restored: 0, failed: 0 };
|
|
478
|
-
}
|
|
479
|
-
let restored = 0;
|
|
480
|
-
let failed = 0;
|
|
481
|
-
for (const [key, entry] of Object.entries(entries)) {
|
|
482
|
-
try {
|
|
483
|
-
const sessionId = await this.bridge.loadSession(entry.sessionId, entry.cwd);
|
|
484
|
-
this.toSession.set(key, sessionId);
|
|
485
|
-
this.toTarget.set(sessionId, entry.target);
|
|
486
|
-
this.toCwd.set(sessionId, entry.cwd);
|
|
487
|
-
restored++;
|
|
488
|
-
} catch {
|
|
489
|
-
failed++;
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
if (failed > 0) {
|
|
493
|
-
this.persist();
|
|
494
|
-
}
|
|
495
|
-
return { restored, failed };
|
|
496
|
-
}
|
|
497
|
-
/** Clear in-memory state and delete persist file. Used on clean shutdown. */
|
|
498
|
-
clearAll() {
|
|
499
|
-
this.toSession.clear();
|
|
500
|
-
this.toTarget.clear();
|
|
501
|
-
this.toCwd.clear();
|
|
502
|
-
if (this.persistPath && existsSync2(this.persistPath)) {
|
|
503
|
-
try {
|
|
504
|
-
unlinkSync(this.persistPath);
|
|
505
|
-
} catch {
|
|
506
|
-
}
|
|
507
|
-
}
|
|
508
|
-
}
|
|
509
|
-
persist() {
|
|
510
|
-
if (!this.persistPath)
|
|
511
|
-
return;
|
|
512
|
-
const data = {};
|
|
513
|
-
for (const [key, sessionId] of this.toSession) {
|
|
514
|
-
const target = this.toTarget.get(sessionId);
|
|
515
|
-
if (target) {
|
|
516
|
-
data[key] = {
|
|
517
|
-
sessionId,
|
|
518
|
-
target,
|
|
519
|
-
cwd: this.toCwd.get(sessionId) || this.defaultCwd
|
|
520
|
-
};
|
|
521
|
-
}
|
|
522
|
-
}
|
|
523
|
-
try {
|
|
524
|
-
writeFileSync2(this.persistPath, JSON.stringify(data, null, 2), "utf-8");
|
|
525
|
-
} catch {
|
|
526
|
-
}
|
|
527
|
-
}
|
|
528
|
-
};
|
|
529
|
-
|
|
530
528
|
// packages/channels/base/dist/ChannelBase.js
|
|
531
529
|
var ChannelBase = class {
|
|
532
530
|
static {
|
|
@@ -3,17 +3,17 @@
|
|
|
3
3
|
import {
|
|
4
4
|
getInboxesDir,
|
|
5
5
|
require_proper_lockfile
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-26ZYKTYZ.js";
|
|
7
7
|
import {
|
|
8
8
|
Mutex
|
|
9
9
|
} from "./chunk-OMX7CUOE.js";
|
|
10
10
|
import {
|
|
11
11
|
atomicWriteJSON
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-LTN3VYMZ.js";
|
|
13
13
|
import {
|
|
14
14
|
createDebugLogger,
|
|
15
15
|
isNodeError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-WE6TNQJU.js";
|
|
17
17
|
import {
|
|
18
18
|
init_esbuild_shims
|
|
19
19
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -2,17 +2,17 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
formatFetchErrorForUser
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-ATLUHLZE.js";
|
|
6
6
|
import {
|
|
7
7
|
combineAbortSignals
|
|
8
8
|
} from "./chunk-64WXLC72.js";
|
|
9
9
|
import {
|
|
10
10
|
atomicWriteFile
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LTN3VYMZ.js";
|
|
12
12
|
import {
|
|
13
13
|
Storage,
|
|
14
14
|
createDebugLogger
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WE6TNQJU.js";
|
|
16
16
|
import {
|
|
17
17
|
init_esbuild_shims
|
|
18
18
|
} from "./chunk-A4BMJM77.js";
|