@qwen-code/qwen-code 0.18.3 → 0.18.4
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/settings.md +25 -18
- package/bundled/qc-helper/docs/extension/introduction.md +38 -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-IBLZKOHM.js → agent-LYTC56HT.js} +24 -23
- package/chunks/{agent-headless-U3A2AQWP.js → agent-headless-FPUP5WHP.js} +24 -23
- package/chunks/{anthropicContentGenerator-KLBHYGH6.js → anthropicContentGenerator-OLOGBVLP.js} +4 -4
- package/chunks/{askUserQuestion-QPZXR3UO.js → askUserQuestion-ANRVSBIJ.js} +2 -2
- package/chunks/{ca-RK4QPLIX.js → ca-K6MD665I.js} +42 -2
- package/chunks/chunk-2ES3D3TW.js +1026 -0
- package/chunks/{chunk-O4PICXES.js → chunk-2MPVVENX.js} +14 -6
- package/chunks/{chunk-OY2G3EH4.js → chunk-32SSXBMG.js} +131009 -128408
- package/chunks/{chunk-BJ5HQ23U.js → chunk-4HMWGHPP.js} +9 -10
- package/chunks/{chunk-SFRV6BGY.js → chunk-4TW2JM5Q.js} +3 -3
- package/chunks/{chunk-C63NLV2Y.js → chunk-5RVEAAD2.js} +6 -6
- package/chunks/{chunk-K3CCX4PX.js → chunk-6Z2MVJIJ.js} +1046 -293
- package/chunks/{chunk-ZOFNJQNJ.js → chunk-7GX7XYZU.js} +3 -3
- package/chunks/{chunk-VIEIRAK3.js → chunk-7OCZ77KA.js} +4 -2
- package/chunks/{chunk-RTTAC5VW.js → chunk-AQDPHFDZ.js} +1 -1
- package/chunks/{chunk-IDYDPBBN.js → chunk-DZCZZPCY.js} +3 -3
- package/chunks/{chunk-ZMIBJS45.js → chunk-E5SRTXRG.js} +1 -1
- package/chunks/{chunk-FIQECJTQ.js → chunk-F6FP3URI.js} +1 -1
- package/chunks/{chunk-IQHSD7K5.js → chunk-FPZF3BNV.js} +1 -1
- package/chunks/{chunk-O2HKIE5I.js → chunk-GBTJHKQ6.js} +732 -617
- package/chunks/{chunk-NNIYWQIS.js → chunk-HU3RKEK2.js} +2 -1
- package/chunks/{chunk-HA2UEYZP.js → chunk-IKOWINH4.js} +7 -4
- package/chunks/{chunk-MN5RAXVB.js → chunk-IUEQOXOI.js} +18 -6
- package/chunks/{chunk-CPVI5J2L.js → chunk-JIJBNW4A.js} +1 -1
- package/chunks/{chunk-ZNUMXPNK.js → chunk-JJHY7NAD.js} +7 -3
- package/chunks/{chunk-YJDVHAGL.js → chunk-JN6FVOPP.js} +2 -2
- package/chunks/{chunk-VU6A2OBJ.js → chunk-JXQ23SNT.js} +217 -219
- package/chunks/{chunk-MSS4XTSL.js → chunk-LXUQBWQA.js} +6 -5
- package/chunks/{chunk-WPTCDQN6.js → chunk-M5VYHAHT.js} +2 -2
- package/chunks/{chunk-LXYWINWF.js → chunk-N5QHMPZU.js} +1 -1
- package/chunks/{chunk-LYSND7KR.js → chunk-PTGKSUUJ.js} +2 -2
- package/chunks/{chunk-MRULXYE3.js → chunk-SZWDOOGV.js} +24 -12
- package/chunks/{chunk-LYRSMKLS.js → chunk-VWPDSQZY.js} +2 -2
- package/chunks/{chunk-B4ZF2KSI.js → chunk-WWU2KUSR.js} +2 -2
- package/chunks/{chunk-QP4R5FTG.js → chunk-Z7XXFPGP.js} +4 -3
- package/chunks/{chunk-TW522KN6.js → chunk-ZTQ26VBE.js} +13 -6
- package/chunks/{computer-use-OEMCNYX5.js → computer-use-P4WQBATW.js} +24 -23
- package/chunks/contextCommand-POQ6GYN3.js +54 -0
- package/chunks/{cron-create-DQKRQMCP.js → cron-create-OKGQO6GX.js} +6 -6
- package/chunks/{cron-delete-DOFPHFTI.js → cron-delete-DTJP7L6O.js} +6 -6
- package/chunks/{cron-list-RCVOO3CB.js → cron-list-VKZUASFG.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-33LHH26D.js → dist-KIYB7DQW.js} +1 -1
- package/chunks/{dist-UH7CYT7F.js → dist-OLC6NBSB.js} +51 -10
- package/chunks/dist-QFFZWACU.js +2136 -0
- package/chunks/{dist-KF43SZZV.js → dist-QUSDBLAK.js} +1 -1
- package/chunks/{edit-HOHKMDP6.js → edit-CS7DSS4Z.js} +26 -27
- package/chunks/{en-VP6XPGEC.js → en-KGSAKBJP.js} +232 -0
- package/chunks/{enter-worktree-O2DGTKFY.js → enter-worktree-PA4HPHJK.js} +24 -23
- package/chunks/{enterPlanMode-FYHJD6AH.js → enterPlanMode-SFE5AFKZ.js} +47 -23
- package/chunks/{exit-worktree-TVTAKFIV.js → exit-worktree-FR3AZTC6.js} +191 -41
- package/chunks/{exitPlanMode-DL7XTFEC.js → exitPlanMode-AHOUO44D.js} +81 -43
- package/chunks/{fr-ATYBVCLT.js → fr-2CAQEOK6.js} +41 -1
- package/chunks/{geminiContentGenerator-2LLKQOJZ.js → geminiContentGenerator-AXCVDKGI.js} +4 -4
- package/chunks/{glob-DUCIKJZE.js → glob-BQPAW3IW.js} +26 -24
- package/chunks/{grep-A7CW7MHE.js → grep-2F7BL5TQ.js} +96 -43
- package/chunks/{ja-W2QEA2OI.js → ja-QWL7V6OJ.js} +41 -1
- package/chunks/{keychain-token-storage-QSTRHKKL.js → keychain-token-storage-ALKQXYJQ.js} +2 -2
- package/chunks/loop-wakeup-RX6YIUSG.js +167 -0
- package/chunks/{ls-TRD77UTS.js → ls-6PLNWHMU.js} +3 -3
- package/chunks/{lsp-2VFWQPZS.js → lsp-3HFQU4OF.js} +2 -2
- package/chunks/{monitor-PPSG4MWE.js → monitor-YTTMDFW2.js} +24 -23
- package/chunks/{notebook-edit-OQBMXIAC.js → notebook-edit-7TNZMTBR.js} +25 -26
- package/chunks/{openaiContentGenerator-JAHIGA7U.js → openaiContentGenerator-JA6YXXPI.js} +12 -11
- package/chunks/{pt-ZKEWJFBW.js → pt-2SPOLMAY.js} +41 -1
- package/chunks/{qwenContentGenerator-H357UGVE.js → qwenContentGenerator-NBOVGW7B.js} +26 -25
- package/chunks/{qwenOAuth2-KK433U33.js → qwenOAuth2-XWC5SU63.js} +4 -4
- package/chunks/{read-file-TQSF7AVG.js → read-file-RUBU3KUA.js} +9 -8
- package/chunks/{ripGrep-AI43PPZP.js → ripGrep-TPFC7KZF.js} +24 -23
- package/chunks/{ru-VEKTPJ74.js → ru-35IVJTEH.js} +41 -1
- package/chunks/{scheduler-R6AQPP7V.js → scheduler-NTVF45LR.js} +24 -23
- package/chunks/{send-message-QZOC5GA2.js → send-message-IIT3SHA7.js} +2 -2
- package/chunks/{serve-TH2BJ5XR.js → serve-J6VG37OX.js} +1249 -279
- package/chunks/{shell-C7AFLMP5.js → shell-EQQEHEFI.js} +24 -23
- package/chunks/{skill-RKVBRTPA.js → skill-QWRWJCQJ.js} +11 -10
- package/chunks/{src-IW53XETC.js → src-LNADIG5P.js} +137 -59
- package/chunks/{syntheticOutput-WJSUK4SZ.js → syntheticOutput-H67FYXU7.js} +3 -3
- package/chunks/{task-create-GGSC27HO.js → task-create-OVXHSHAI.js} +7 -7
- package/chunks/{task-list-EDHHHSK4.js → task-list-QUUCQJ3U.js} +6 -6
- package/chunks/{task-stop-WR5PDVZY.js → task-stop-WA5DMTKK.js} +2 -2
- package/chunks/{task-update-UR7NUHBV.js → task-update-PC5427TI.js} +7 -7
- package/chunks/{team-create-6F44EH3O.js → team-create-TXWQL777.js} +26 -25
- package/chunks/{team-delete-FC33URJK.js → team-delete-ZTEMYRJ3.js} +6 -6
- package/chunks/{todoWrite-GO2ME7ZV.js → todoWrite-J6L6ELD6.js} +4 -4
- package/chunks/{tool-search-WGNAYT43.js → tool-search-JAVM7ABF.js} +9 -8
- package/chunks/{web-fetch-NLLATYIL.js → web-fetch-6XLPPTP7.js} +5 -5
- package/chunks/{workflow-L5J5VGY4.js → workflow-7LN3L6KK.js} +242 -39
- package/chunks/{write-file-2FKBW3XN.js → write-file-DAKE7YKB.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 +10735 -5708
- 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-Y4PRJOJM.js +0 -53
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createDebugLogger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IKOWINH4.js";
|
|
6
6
|
import {
|
|
7
7
|
init_esbuild_shims
|
|
8
8
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -19349,6 +19349,7 @@ var TextTokenizer = class {
|
|
|
19349
19349
|
init_esbuild_shims();
|
|
19350
19350
|
var SUPPORTED_IMAGE_MIME_TYPES = [
|
|
19351
19351
|
"image/bmp",
|
|
19352
|
+
"image/gif",
|
|
19352
19353
|
"image/jpeg",
|
|
19353
19354
|
"image/jpg",
|
|
19354
19355
|
// Alternative MIME type for JPEG
|
|
@@ -219,12 +219,15 @@ var UNESCAPE_REGEX = (() => {
|
|
|
219
219
|
const inner = SHELL_SPECIAL_CHARS.source.slice(1, -1);
|
|
220
220
|
return new RegExp(`\\\\([${inner}])`, "g");
|
|
221
221
|
})();
|
|
222
|
-
function tildeifyPath(
|
|
222
|
+
function tildeifyPath(filePath) {
|
|
223
223
|
const homeDir = os.homedir();
|
|
224
|
-
if (
|
|
225
|
-
return
|
|
224
|
+
if (filePath === homeDir) {
|
|
225
|
+
return "~";
|
|
226
226
|
}
|
|
227
|
-
|
|
227
|
+
if (filePath.startsWith(`${homeDir}${path.sep}`)) {
|
|
228
|
+
return filePath.replace(homeDir, "~");
|
|
229
|
+
}
|
|
230
|
+
return filePath;
|
|
228
231
|
}
|
|
229
232
|
__name(tildeifyPath, "tildeifyPath");
|
|
230
233
|
function expandHomeDir(p) {
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import {
|
|
4
4
|
TextTokenizer,
|
|
5
5
|
isSupportedImageMimeType
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-HU3RKEK2.js";
|
|
7
7
|
import {
|
|
8
8
|
createDebugLogger
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-IKOWINH4.js";
|
|
10
10
|
import {
|
|
11
11
|
init_esbuild_shims
|
|
12
12
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -158,7 +158,7 @@ var ImageTokenizer = class _ImageTokenizer {
|
|
|
158
158
|
* Supports VP8, VP8L, and VP8X formats
|
|
159
159
|
*/
|
|
160
160
|
extractWebpDimensions(buffer) {
|
|
161
|
-
if (buffer.length <
|
|
161
|
+
if (buffer.length < 16) {
|
|
162
162
|
throw new Error("Invalid WebP: too short");
|
|
163
163
|
}
|
|
164
164
|
const riffSignature = buffer.subarray(0, 4).toString("ascii");
|
|
@@ -168,17 +168,29 @@ var ImageTokenizer = class _ImageTokenizer {
|
|
|
168
168
|
}
|
|
169
169
|
const format = buffer.subarray(12, 16).toString("ascii");
|
|
170
170
|
if (format === "VP8 ") {
|
|
171
|
+
if (buffer.length < 30) {
|
|
172
|
+
throw new Error("Invalid VP8 WebP: too short");
|
|
173
|
+
}
|
|
171
174
|
const width = buffer.readUInt16LE(26) & 16383;
|
|
172
175
|
const height = buffer.readUInt16LE(28) & 16383;
|
|
173
176
|
return { width, height };
|
|
174
177
|
} else if (format === "VP8L") {
|
|
178
|
+
if (buffer.length < 25) {
|
|
179
|
+
throw new Error("Invalid VP8L WebP: too short");
|
|
180
|
+
}
|
|
181
|
+
if (buffer[20] !== 47) {
|
|
182
|
+
throw new Error("Invalid VP8L WebP signature");
|
|
183
|
+
}
|
|
175
184
|
const bits = buffer.readUInt32LE(21);
|
|
176
185
|
const width = (bits & 16383) + 1;
|
|
177
186
|
const height = (bits >> 14 & 16383) + 1;
|
|
178
187
|
return { width, height };
|
|
179
188
|
} else if (format === "VP8X") {
|
|
180
|
-
|
|
181
|
-
|
|
189
|
+
if (buffer.length < 30) {
|
|
190
|
+
throw new Error("Invalid VP8X WebP: too short");
|
|
191
|
+
}
|
|
192
|
+
const width = buffer.readUIntLE(24, 3) + 1;
|
|
193
|
+
const height = buffer.readUIntLE(27, 3) + 1;
|
|
182
194
|
return { width, height };
|
|
183
195
|
}
|
|
184
196
|
throw new Error("Unsupported WebP format");
|
|
@@ -273,7 +285,7 @@ var ImageTokenizer = class _ImageTokenizer {
|
|
|
273
285
|
throw new Error("Invalid BMP signature");
|
|
274
286
|
}
|
|
275
287
|
const width = buffer.readUInt32LE(18);
|
|
276
|
-
const height = buffer.
|
|
288
|
+
const height = buffer.readInt32LE(22);
|
|
277
289
|
return { width, height: Math.abs(height) };
|
|
278
290
|
}
|
|
279
291
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createDebugLogger
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IKOWINH4.js";
|
|
6
6
|
import {
|
|
7
7
|
init_esbuild_shims
|
|
8
8
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -15438,6 +15438,7 @@ var ToolNames = {
|
|
|
15438
15438
|
CRON_CREATE: "cron_create",
|
|
15439
15439
|
CRON_LIST: "cron_list",
|
|
15440
15440
|
CRON_DELETE: "cron_delete",
|
|
15441
|
+
LOOP_WAKEUP: "loop_wakeup",
|
|
15441
15442
|
TASK_STOP: "task_stop",
|
|
15442
15443
|
TASK_CREATE: "task_create",
|
|
15443
15444
|
TASK_UPDATE: "task_update",
|
|
@@ -15466,7 +15467,7 @@ var ToolDisplayNames = {
|
|
|
15466
15467
|
GREP: "Grep",
|
|
15467
15468
|
GLOB: "Glob",
|
|
15468
15469
|
SHELL: "Shell",
|
|
15469
|
-
TODO_WRITE: "
|
|
15470
|
+
TODO_WRITE: "TodoList",
|
|
15470
15471
|
MEMORY: "SaveMemory",
|
|
15471
15472
|
AGENT: "Agent",
|
|
15472
15473
|
SKILL: "Skill",
|
|
@@ -15479,6 +15480,7 @@ var ToolDisplayNames = {
|
|
|
15479
15480
|
CRON_CREATE: "CronCreate",
|
|
15480
15481
|
CRON_LIST: "CronList",
|
|
15481
15482
|
CRON_DELETE: "CronDelete",
|
|
15483
|
+
LOOP_WAKEUP: "LoopWakeup",
|
|
15482
15484
|
TASK_STOP: "TaskStop",
|
|
15483
15485
|
TASK_CREATE: "TaskCreate",
|
|
15484
15486
|
TASK_UPDATE: "TaskUpdate",
|
|
@@ -15510,8 +15512,10 @@ var ToolDisplayNamesMigration = {
|
|
|
15510
15512
|
// Old display name for Glob
|
|
15511
15513
|
ReadFolder: ToolDisplayNames.LS,
|
|
15512
15514
|
// Old display name for ListFiles
|
|
15513
|
-
Task: ToolDisplayNames.AGENT
|
|
15515
|
+
Task: ToolDisplayNames.AGENT,
|
|
15514
15516
|
// Old display name for Agent (renamed from Task)
|
|
15517
|
+
TodoWrite: ToolDisplayNames.TODO_WRITE
|
|
15518
|
+
// Old display name for TodoList (renamed from TodoWrite)
|
|
15515
15519
|
};
|
|
15516
15520
|
|
|
15517
15521
|
export {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createTask
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-7GX7XYZU.js";
|
|
6
6
|
import {
|
|
7
7
|
resolveActiveTeamName
|
|
8
8
|
} from "./chunk-LD2XBG6Z.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
BaseToolInvocation,
|
|
12
12
|
ToolDisplayNames,
|
|
13
13
|
ToolNames
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-JJHY7NAD.js";
|
|
15
15
|
import {
|
|
16
16
|
init_esbuild_shims
|
|
17
17
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -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 {
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
RequestTokenizer
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IUEQOXOI.js";
|
|
6
6
|
import {
|
|
7
7
|
OpenAIContentConverter,
|
|
8
8
|
TaggedThinkingParser,
|
|
9
9
|
openaiRequestCaptureContext
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-6Z2MVJIJ.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-HU3RKEK2.js";
|
|
18
18
|
import {
|
|
19
19
|
CAPPED_DEFAULT_MAX_TOKENS,
|
|
20
20
|
DASHSCOPE_PROXY_BASE_URL,
|
|
@@ -25,14 +25,14 @@ import {
|
|
|
25
25
|
runtimeDiagnostics,
|
|
26
26
|
safeJsonParse,
|
|
27
27
|
tokenLimit
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-PTGKSUUJ.js";
|
|
29
29
|
import {
|
|
30
30
|
GenerateContentResponse
|
|
31
31
|
} from "./chunk-55ZMG67I.js";
|
|
32
32
|
import {
|
|
33
33
|
createDebugLogger,
|
|
34
34
|
isAbortError
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-IKOWINH4.js";
|
|
36
36
|
import {
|
|
37
37
|
init_esbuild_shims
|
|
38
38
|
} from "./chunk-A4BMJM77.js";
|
|
@@ -8279,6 +8279,7 @@ var ContentGenerationPipeline = class {
|
|
|
8279
8279
|
// message is spec-compliant and safe for permissive providers too.
|
|
8280
8280
|
// Opt out via generationConfig.splitToolMedia = false.
|
|
8281
8281
|
true,
|
|
8282
|
+
toolResultContentFormat: providerOverrides.toolResultContentFormat ?? this.contentGeneratorConfig.toolResultContentFormat ?? "parts",
|
|
8282
8283
|
...toolCallParser ? { toolCallParser } : {},
|
|
8283
8284
|
...responseParsingOptions ? { responseParsingOptions } : {},
|
|
8284
8285
|
...taggedThinkingParser ? { taggedThinkingParser } : {}
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
} from "./chunk-LD2XBG6Z.js";
|
|
11
11
|
import {
|
|
12
12
|
atomicWriteJSON
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-N5QHMPZU.js";
|
|
14
14
|
import {
|
|
15
15
|
Storage,
|
|
16
16
|
isNodeError
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-IKOWINH4.js";
|
|
18
18
|
import {
|
|
19
19
|
init_esbuild_shims
|
|
20
20
|
} from "./chunk-A4BMJM77.js";
|