@qwen-code/qwen-code 0.19.7 → 0.19.8
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/bundled/qc-helper/docs/features/channels/overview.md +15 -8
- package/bundled/qc-helper/docs/features/channels/plugins.md +1 -0
- package/bundled/qc-helper/docs/features/hooks.md +36 -34
- package/bundled/qc-helper/docs/features/memory.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +17 -10
- package/bundled/review/SKILL.md +6 -2
- package/chunks/{MaxSizedBox-XY5LIO5O.js → MaxSizedBox-5DT2SD7B.js} +7 -7
- package/chunks/{StandaloneSessionPicker-APISIRJZ.js → StandaloneSessionPicker-EYRGH6PJ.js} +23 -21
- package/chunks/{acpAgent-MMOSC2YA.js → acpAgent-GRFTTRHW.js} +74 -69
- package/chunks/{agent-TKIBLLQT.js → agent-H2DGKS77.js} +4 -4
- package/chunks/{agent-headless-VLX4C7KX.js → agent-headless-KFMFIT6J.js} +4 -4
- package/chunks/{anthropicContentGenerator-AKYPSZIV.js → anthropicContentGenerator-CPF22MA7.js} +28 -1
- package/chunks/{bridge-BCU73DZO.js → bridge-NA3ZQQKJ.js} +11 -10
- package/chunks/{ca-HCMB2I54.js → ca-MKD32FQL.js} +26 -1
- package/chunks/{channel-worker-supervisor-CRCVYQIE.js → channel-worker-supervisor-NZQUOEFJ.js} +3 -3
- package/chunks/{chunk-B4U2M63D.js → chunk-27BHARDE.js} +8 -8
- package/chunks/{chunk-OWVIH4HY.js → chunk-2EM7ECZD.js} +251 -71
- package/chunks/{chunk-YEGT55NW.js → chunk-3GNOQZDC.js} +1562 -1025
- package/chunks/{chunk-G7ZG7CA6.js → chunk-3UP777ZS.js} +8 -7
- package/chunks/{chunk-VEB3NYSO.js → chunk-5MBO76SL.js} +5 -0
- package/chunks/{chunk-ALZ75L2X.js → chunk-6VK6FIMQ.js} +1 -1
- package/chunks/{chunk-SD4N3QJ2.js → chunk-A5JOJ77H.js} +35 -14
- package/chunks/{chunk-NZEGNV4V.js → chunk-AYNCLGTW.js} +5 -5
- package/chunks/{chunk-AJBEAUIS.js → chunk-BOBOCR5H.js} +4 -3
- package/chunks/chunk-BOBRZZKD.js +468 -0
- package/chunks/{chunk-GMOWQOQQ.js → chunk-BUZ6HGL4.js} +5 -5
- package/chunks/{chunk-PRDFOIZF.js → chunk-BVYU3ZTI.js} +2 -2
- package/chunks/{chunk-TBAZMRW3.js → chunk-CD6USWHZ.js} +1 -1
- package/chunks/{chunk-YDSYD7UI.js → chunk-CHB5SLZZ.js} +2 -2
- package/chunks/{chunk-FRFFNYUY.js → chunk-DCZWC4PF.js} +2 -2
- package/chunks/{chunk-XSAFNANZ.js → chunk-DHOLNQLC.js} +11 -11
- package/chunks/{chunk-MIG5SQNL.js → chunk-DICGXFAI.js} +1 -1
- package/chunks/{chunk-4ZJIPVPB.js → chunk-DIWVZ3VM.js} +8 -8
- package/chunks/{chunk-VQWAZSXN.js → chunk-E7EMCSUG.js} +1 -1
- package/chunks/{chunk-Q6OEPOOC.js → chunk-EEN2TKST.js} +1 -1
- package/chunks/{chunk-DNV4FSN5.js → chunk-FBET5XZ2.js} +6 -4
- package/chunks/{chunk-QZF5U5KA.js → chunk-FQNC62B2.js} +4 -4
- package/chunks/{chunk-B34OV7K2.js → chunk-GGQQA4JW.js} +13 -0
- package/chunks/chunk-GLE2YUPU.js +34 -0
- package/chunks/{chunk-X265R5C6.js → chunk-GN3F6PIU.js} +1 -1
- package/chunks/{chunk-FTFXDZYI.js → chunk-GSHQYYIV.js} +45 -9
- package/chunks/{chunk-MJI36HER.js → chunk-HDOH3QYE.js} +1 -1
- package/chunks/{chunk-CISB3IQF.js → chunk-I6WGFJJ3.js} +63 -4
- package/chunks/{chunk-2NPS2UDH.js → chunk-IBY3Q3HG.js} +390 -9
- package/chunks/{chunk-LEIJKM7Q.js → chunk-J7RCB6N5.js} +1 -1
- package/chunks/{chunk-4UCTWSTP.js → chunk-JCH35JB3.js} +1 -1
- package/chunks/{chunk-CNSF3WO5.js → chunk-JPALE3PA.js} +3 -3
- package/chunks/{chunk-P7I3D7FM.js → chunk-JRQ7EVGE.js} +1 -1
- package/chunks/{chunk-24XYI5EI.js → chunk-JZHIQJOE.js} +3 -3
- package/chunks/{chunk-7JGISHHZ.js → chunk-L46XKEGM.js} +14 -153
- package/chunks/{chunk-HJ3GX3Y3.js → chunk-L4AMBVQG.js} +9 -9
- package/chunks/{chunk-JF7DFPQ5.js → chunk-LAXNEOBG.js} +1 -1
- package/chunks/{chunk-STAZRKOT.js → chunk-M7S4GK5Z.js} +66 -445
- package/chunks/{chunk-4RQIB5UZ.js → chunk-O2YT7VB4.js} +0 -34
- package/chunks/{chunk-QAKFYMJI.js → chunk-O33TBKDC.js} +10 -10
- package/chunks/chunk-O7FIRWJV.js +168 -0
- package/chunks/{chunk-4KJ2BPIT.js → chunk-OACJLMLD.js} +2 -38
- package/chunks/{chunk-6BN7NZ5Z.js → chunk-ON3JA3RU.js} +2 -2
- package/chunks/{chunk-IUE7YWC3.js → chunk-OQXDAMKY.js} +3 -3
- package/chunks/{chunk-DGHJTO2K.js → chunk-P3XEEI3X.js} +1 -1
- package/chunks/{chunk-U4FRHCLA.js → chunk-PMFULMLX.js} +296 -81
- package/chunks/{chunk-XISQIIT7.js → chunk-PUVCVELY.js} +1 -1
- package/chunks/{chunk-PUQLHSQ2.js → chunk-RMLZAUWH.js} +4 -4
- package/chunks/{chunk-JD33UY7E.js → chunk-SQ2UATK7.js} +14 -8
- package/chunks/{chunk-4O344UEE.js → chunk-TI3BWD4D.js} +1 -1
- package/chunks/{chunk-AIY5UTFI.js → chunk-TSPB77TG.js} +57 -35
- package/chunks/{chunk-XPJH4PKR.js → chunk-UX6OTBVD.js} +1 -1
- package/chunks/{chunk-GD236YPV.js → chunk-UXEW557D.js} +1 -1
- package/chunks/chunk-V35MD7KN.js +13 -0
- package/chunks/{chunk-RYFZCUJO.js → chunk-VGGOPZUL.js} +6 -5
- package/chunks/{chunk-65CFHNSE.js → chunk-WF4FAXDL.js} +2 -2
- package/chunks/{chunk-ME3YSROJ.js → chunk-WHJQ3JUS.js} +20 -8
- package/chunks/{chunk-BWVQN2HV.js → chunk-WQTHLB5T.js} +3 -3
- package/chunks/chunk-XNXVCNAT.js +88 -0
- package/chunks/{chunk-TDGF35EN.js → chunk-XOHNA2S6.js} +1 -1
- package/chunks/{chunk-GL5TV7B5.js → chunk-XYR5RUA5.js} +14 -5
- package/chunks/{chunk-I4A4K72C.js → chunk-YDOXPLYL.js} +244 -47
- package/chunks/{chunk-AFOLR6YL.js → chunk-YHKAK72D.js} +11 -11
- package/chunks/{chunk-RFIL6REB.js → chunk-YKZIAK7C.js} +119 -29
- package/chunks/chunk-Z3I3QJK3.js +47 -0
- package/chunks/{chunk-ADZG46HR.js → chunk-ZE6E424U.js} +1 -1
- package/chunks/chunk-ZL5HN75Q.js +61 -0
- package/chunks/{computer-use-X4KUU3NM.js → computer-use-WMY3UOBX.js} +4 -4
- package/chunks/{contextCommand-LAYJZF7H.js → contextCommand-LXFZRP4L.js} +6 -6
- package/chunks/{daemon-F3I2RXP6.js → daemon-WPAENEBW.js} +48 -0
- package/chunks/{daemon-status-provider-XSAFKVDS.js → daemon-status-provider-GJRXY5EN.js} +15 -13
- package/chunks/{de-PLLFDERI.js → de-ZFPPQVSF.js} +26 -1
- package/chunks/{dist-IMFFBMAT.js → dist-BEXOZXLQ.js} +1 -1
- package/chunks/{dist-OT7G2WNM.js → dist-E6UANPIM.js} +1 -1
- package/chunks/{dist-FQ5WRJPL.js → dist-H2AEJCZ5.js} +2 -2
- package/chunks/{dist-YTRKAVUB.js → dist-O2IRTRPP.js} +1 -1
- package/chunks/{dist-573HNSVO.js → dist-SCFLLYMK.js} +1 -1
- package/chunks/{dist-PKFTNUHO.js → dist-Z34QPAQW.js} +1 -1
- package/chunks/{earlyInputCapture-AERYYGXE.js → earlyInputCapture-KNOYZ4MJ.js} +4 -4
- package/chunks/{edit-WZTZDGCI.js → edit-OTYWAXGP.js} +5 -5
- package/chunks/{en-GA2RMXY5.js → en-N4EPZAQI.js} +26 -1
- package/chunks/{enter-worktree-DEPXBJEL.js → enter-worktree-HNYBDVCX.js} +4 -4
- package/chunks/{enterPlanMode-JFGXZHHJ.js → enterPlanMode-CJCNGT63.js} +4 -4
- package/chunks/environment-ATFTYMLZ.js +88 -0
- package/chunks/{errors-GMZL4QV7.js → errors-A54HAADA.js} +6 -6
- package/chunks/{exit-worktree-Y7XBK3VV.js → exit-worktree-DUUKOE3X.js} +4 -4
- package/chunks/{exitPlanMode-WQQER65F.js → exitPlanMode-AMMSXOAJ.js} +4 -4
- package/chunks/{fast-path-W2U6XDNO.js → fast-path-OV6NIP3K.js} +12 -3
- package/chunks/{fast-path-settings-RCRXH2JG.js → fast-path-settings-7RIFI3PK.js} +3 -2
- package/chunks/{fr-GWNQG4XH.js → fr-5WWMY53B.js} +26 -1
- package/chunks/{gemini-T4WX6SRW.js → gemini-NQ3WWBKB.js} +431 -135
- package/chunks/{geminiContentGenerator-MKQACXEJ.js → geminiContentGenerator-CDUNEJQE.js} +1 -1
- package/chunks/{glob-4KKSHZDF.js → glob-ROV3YS4R.js} +4 -4
- package/chunks/{grep-GHRYXSLZ.js → grep-NRITKDCD.js} +4 -4
- package/chunks/{handleAutoUpdate-HN7ZOSXY.js → handleAutoUpdate-CEZJAARW.js} +6 -6
- package/chunks/{initializer-SRN3IM42.js → initializer-BRFJKRRX.js} +11 -9
- package/chunks/{ja-2HOTA47X.js → ja-CUHZOLEJ.js} +26 -1
- package/chunks/{list-INTVXUPA.js → list-KVHF7O4X.js} +13 -11
- package/chunks/{loadedSettingsAdapter-QVHHQPGM.js → loadedSettingsAdapter-LL5PSFKX.js} +11 -9
- package/chunks/{ls-L654WOAT.js → ls-7MFU2QYW.js} +1 -1
- package/chunks/{lsp-M35KE54Y.js → lsp-XHDTPTGV.js} +2 -4
- package/chunks/{mcp-7V4T46RG.js → mcp-3GCXRTOQ.js} +11 -9
- package/chunks/{monitor-464OY2UE.js → monitor-FL2ZO33W.js} +4 -4
- package/chunks/{nonInteractiveCli-LJEEODU2.js → nonInteractiveCli-PTQI3DV6.js} +44 -41
- package/chunks/{notebook-edit-BLJYCNDO.js → notebook-edit-6PULTHL5.js} +5 -5
- package/chunks/{openaiContentGenerator-PFF6HYB2.js → openaiContentGenerator-YE42PKCY.js} +3 -3
- package/chunks/{pidfile-LIBUENIV.js → pidfile-NZYSCFRK.js} +4 -4
- package/chunks/{pt-2THT3YHA.js → pt-OLYN42DS.js} +26 -1
- package/chunks/{qwenContentGenerator-SUUHZ6CR.js → qwenContentGenerator-NX2E7PB7.js} +5 -5
- package/chunks/{read-file-L7TBQVX7.js → read-file-33XGP5HF.js} +2 -2
- package/chunks/{record-artifact-PP3LKHTS.js → record-artifact-SQ2OKRJW.js} +3 -3
- package/chunks/{ripGrep-CKKX3GRB.js → ripGrep-QWZLGTAN.js} +4 -4
- package/chunks/{ru-Z67YJHBG.js → ru-LDM3GWVQ.js} +26 -1
- package/chunks/{run-qwen-serve-5OKADVLE.js → run-qwen-serve-JK2DL7PI.js} +596 -143
- package/chunks/{scheduler-ZRW3AIDU.js → scheduler-O4IGVZKK.js} +4 -4
- package/chunks/{send-message-OA6MV4EU.js → send-message-76GT3JMC.js} +1 -1
- package/chunks/{serve-36WS32W6.js → serve-JTMIGANH.js} +13 -10
- package/chunks/{server-M372UENX.js → server-SGNPKX2O.js} +667 -243
- package/chunks/{session-F5KSNP2N.js → session-5BNM25EZ.js} +45 -42
- package/chunks/{settings-WFLNS3WT.js → settings-3MI4XXP6.js} +20 -16
- package/chunks/{shell-DEDSWN56.js → shell-YJKBE67T.js} +4 -4
- package/chunks/{skill-A2TL2NPC.js → skill-I22QK5XS.js} +2 -2
- package/chunks/{spawnChannel-RQHUWTCL.js → spawnChannel-UNV6W4DU.js} +6 -6
- package/chunks/{src-XKZMNHXS.js → src-BBQSM46M.js} +8 -4
- package/chunks/{startInteractiveUI-REKSTOHU.js → startInteractiveUI-JII36UGN.js} +619 -288
- package/chunks/{task-create-RPFZNB4B.js → task-create-WCHTB435.js} +2 -2
- package/chunks/{task-update-5WUG5MVQ.js → task-update-XYWMHJGJ.js} +2 -2
- package/chunks/{team-create-TBQVWAG7.js → team-create-A7NUU5AQ.js} +4 -4
- package/chunks/{team-plan-approval-FZPGUSHJ.js → team-plan-approval-TOQRJ2KI.js} +4 -4
- package/chunks/{theme-manager-DQZVNSOC.js → theme-manager-WZ4RRMMB.js} +4 -4
- package/chunks/{tool-search-FDQ3SLNJ.js → tool-search-SZ4EFS2T.js} +3 -3
- package/chunks/total-session-admission-ULXJWXFV.js +72 -0
- package/chunks/{trustedFolders-Z475EIHL.js → trustedFolders-LAZZPZ3D.js} +5 -5
- package/chunks/{updateCheck-E2ZX7RL7.js → updateCheck-KONLM73X.js} +5 -5
- package/chunks/{validateNonInterActiveAuth-O4ECBHQL.js → validateNonInterActiveAuth-MPKSRCXD.js} +41 -38
- package/chunks/{version-CEDD6ZZR.js → version-NO2XSNNP.js} +1 -1
- package/chunks/{workflow-CQQ4J4I6.js → workflow-WO2H6NRI.js} +5 -5
- package/chunks/{workspace-providers-status-MVYXMYDG.js → workspace-providers-status-3W7E7DFW.js} +14 -11
- package/chunks/workspace-registry-SXJZNN3O.js +74 -0
- package/chunks/{workspace-service-OMBR6ZLG.js → workspace-service-CZRQZ4Q4.js} +17 -15
- package/chunks/{workspace-skills-status-IMMQ7CAY.js → workspace-skills-status-K7WFREPD.js} +12 -10
- package/chunks/{write-file-VWGY7AJP.js → write-file-PX2Z7IBE.js} +5 -5
- package/chunks/{zh-7XVVRTDH.js → zh-J4F6QWQV.js} +26 -1
- package/chunks/{zh-TW-DPH554OG.js → zh-TW-XVDWOLSW.js} +26 -1
- package/cli.js +11 -11
- package/locales/ca.js +30 -0
- package/locales/de.js +30 -0
- package/locales/en.js +30 -0
- package/locales/fr.js +30 -0
- package/locales/ja.js +30 -0
- package/locales/pt.js +30 -0
- package/locales/ru.js +30 -0
- package/locales/zh-TW.js +30 -0
- package/locales/zh.js +30 -0
- package/node_modules/@qwen-code/audio-capture/package.json +1 -1
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-C7hjaa7g.js → arc-BWyoJpY2.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-pm9KtMZY.js → architectureDiagram-3BPJPVTR-BT0mGrz2.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CApElKsU.js → blockDiagram-GPEHLZMM-BLgUWvyf.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BeDe0-9N.js → c4Diagram-AAUBKEIU-DYx9M7oU.js} +1 -1
- package/web-shell/assets/channel-wmPUGHtg.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DJEkmLdl.js → chunk-2J33WTMH-CfMHWbuZ.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DXX8gdpe.js → chunk-4BX2VUAB-B1URoqEV.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DORmk1kQ.js → chunk-55IACEB6-DAIaM4QF.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DWmO4mCZ.js → chunk-727SXJPM-B2X34knw.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-C7LRaYw2.js → chunk-AQP2D5EJ-Cif-zLTQ.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CCdXgyC5.js → chunk-FMBD7UC4-H18WCXdY.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-SyL_xvWc.js → chunk-ND2GUHAM-YFtetHi0.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-BzOuCKxa.js → chunk-QZHKN3VN-By2hiH3r.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BA2ljEjW.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BA2ljEjW.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BMPWyDKc.js → cose-bilkent-S5V4N54A-VrcnnLZu.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-B_GnPWik.js → dagre-BM42HDAG-CGo-IaVV.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-fJqMc3S_.js → diagram-2AECGRRQ-Dl4QjzIB.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-ximV3O9D.js → diagram-5GNKFQAL-qMLmsO0u.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-2vVyjzqw.js → diagram-KO2AKTUF-CHlmuxPI.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-Dckcx1sT.js → diagram-LMA3HP47-BUwU3GwT.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-BAVv47ga.js → diagram-OG6HWLK6-HEhwPDUM.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-Bn3nf5J0.js → erDiagram-TEJ5UH35-1n0llBmM.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BIbGF9JT.js → flowDiagram-I6XJVG4X-BN74uMnt.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CDbhb3AH.js → ganttDiagram-6RSMTGT7-BoOq78i3.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CbKG1a_w.js → gitGraphDiagram-PVQCEYII-CN8b00c8.js} +1 -1
- package/web-shell/assets/index-CNwoO1Cn.js +783 -0
- package/web-shell/assets/index-CWQ0z6kZ.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DUFxTy8m.js → infoDiagram-5YYISTIA-CCurnIna.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-D69hrBG8.js → ishikawaDiagram-YF4QCWOH-AwuRqdUP.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-DsvEw51Y.js → journeyDiagram-JHISSGLW-B7IICk-E.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-lFFjZEYd.js → kanban-definition-UN3LZRKU-BYF0OKhx.js} +1 -1
- package/web-shell/assets/{linear-Bo5bWzvo.js → linear-GWWguGfD.js} +1 -1
- package/web-shell/assets/{mermaid.core-C_HKMJx5.js → mermaid.core-JqtkxvCl.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-DlV-NUTs.js → mindmap-definition-RKZ34NQL-B0MmHsZ6.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-B2e6FH2a.js → pieDiagram-4H26LBE5-DhImUZLQ.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-D75kSk-b.js → quadrantDiagram-W4KKPZXB-DGeSC3DT.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CQ6xakhM.js → requirementDiagram-4Y6WPE33-DkspY6Re.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-J_XTKrcY.js → sankeyDiagram-5OEKKPKP-CaOofS2x.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-D7jTcBtf.js → sequenceDiagram-3UESZ5HK-DFQ_kFnN.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-CrlM_OT3.js → stateDiagram-AJRCARHV-D3snw0Tz.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BbSm_9d0.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-5oZi76Ef.js → timeline-definition-PNZ67QCA-l4zH8nLM.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DO5YptPK.js → vennDiagram-CIIHVFJN-BnRlA98M.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-4t1eJDvM.js → wardley-L42UT6IY-BS0xUdmd.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DKZc661S.js → wardleyDiagram-YWT4CUSO-DKGBUWyQ.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-su9hp08G.js → xychartDiagram-2RQKCTM6-DVb2HuOB.js} +1 -1
- package/web-shell/index.html +2 -2
- package/web-shell/assets/channel-BNf1dW-j.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-uOIGlzgi.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-uOIGlzgi.js +0 -1
- package/web-shell/assets/index-CnE2ur2L.js +0 -779
- package/web-shell/assets/index-hSKXrlSE.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Bs4TK_84.js +0 -1
|
@@ -2,11 +2,9 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
startEarlyStartupPrefetches
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import {
|
|
7
|
-
RELAUNCH_EXIT_CODE
|
|
8
|
-
} from "./chunk-LEIJKM7Q.js";
|
|
5
|
+
} from "./chunk-A5JOJ77H.js";
|
|
9
6
|
import {
|
|
7
|
+
ExtensionRefreshState,
|
|
10
8
|
appEvents,
|
|
11
9
|
buildDisabledSkillNamesProvider,
|
|
12
10
|
isDebugMode,
|
|
@@ -15,57 +13,64 @@ import {
|
|
|
15
13
|
loadSandboxConfig,
|
|
16
14
|
parseArguments,
|
|
17
15
|
validateAuthMethod
|
|
18
|
-
} from "./chunk-
|
|
19
|
-
import
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-GL5TV7B5.js";
|
|
16
|
+
} from "./chunk-YDOXPLYL.js";
|
|
17
|
+
import {
|
|
18
|
+
RELAUNCH_EXIT_CODE
|
|
19
|
+
} from "./chunk-J7RCB6N5.js";
|
|
20
|
+
import "./chunk-XYR5RUA5.js";
|
|
24
21
|
import "./chunk-LGFAYIKX.js";
|
|
25
22
|
import "./chunk-54YZOP7P.js";
|
|
26
|
-
import "./chunk-4ZJIPVPB.js";
|
|
27
|
-
import "./chunk-E7KNELIZ.js";
|
|
28
23
|
import "./chunk-AHNXYU4O.js";
|
|
29
24
|
import "./chunk-RNBYOUGV.js";
|
|
30
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-WHJQ3JUS.js";
|
|
31
26
|
import {
|
|
32
27
|
getHeadlessYoloSafetyWarning
|
|
33
28
|
} from "./chunk-BJBWRCSK.js";
|
|
29
|
+
import "./chunk-AYNCLGTW.js";
|
|
30
|
+
import "./chunk-3GONHQOA.js";
|
|
31
|
+
import "./chunk-DCZWC4PF.js";
|
|
32
|
+
import "./chunk-CD6USWHZ.js";
|
|
33
|
+
import "./chunk-DIWVZ3VM.js";
|
|
34
|
+
import "./chunk-E7KNELIZ.js";
|
|
35
|
+
import "./chunk-3UP777ZS.js";
|
|
36
|
+
import "./chunk-GLE2YUPU.js";
|
|
37
|
+
import "./chunk-ER3BKOLB.js";
|
|
34
38
|
import {
|
|
35
39
|
assembleMcpServers,
|
|
36
40
|
getPendingGatedMcpServers,
|
|
37
41
|
getPromptableMcpServers
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-2NPS2UDH.js";
|
|
42
|
+
} from "./chunk-FQNC62B2.js";
|
|
40
43
|
import "./chunk-S6RLAIUR.js";
|
|
41
44
|
import "./chunk-MX2YXRER.js";
|
|
45
|
+
import "./chunk-IBY3Q3HG.js";
|
|
46
|
+
import "./chunk-VRDMOSQS.js";
|
|
42
47
|
import "./chunk-MZ7BABX3.js";
|
|
43
48
|
import {
|
|
44
|
-
SETTINGS_DIRECTORY_NAME,
|
|
45
49
|
createMinimalSettings,
|
|
46
50
|
getFlattenedSchema,
|
|
47
51
|
getSettingsWarnings,
|
|
48
52
|
getUserSettingsDir,
|
|
49
53
|
initializeLlmOutputLanguage,
|
|
50
|
-
loadSettings
|
|
51
|
-
|
|
52
|
-
} from "./chunk-STAZRKOT.js";
|
|
54
|
+
loadSettings
|
|
55
|
+
} from "./chunk-M7S4GK5Z.js";
|
|
53
56
|
import {
|
|
54
57
|
initializeI18n,
|
|
55
58
|
resolveLanguageSetting
|
|
56
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-O33TBKDC.js";
|
|
57
60
|
import "./chunk-TLRYABYP.js";
|
|
61
|
+
import {
|
|
62
|
+
SETTINGS_DIRECTORY_NAME,
|
|
63
|
+
preResolveHomeEnvOverrides
|
|
64
|
+
} from "./chunk-BOBRZZKD.js";
|
|
65
|
+
import "./chunk-O2YT7VB4.js";
|
|
58
66
|
import {
|
|
59
67
|
ENV_CORRUPTED_PATH,
|
|
60
68
|
ENV_WAS_RECOVERED
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-ER3BKOLB.js";
|
|
63
|
-
import "./chunk-G7ZG7CA6.js";
|
|
64
|
-
import "./chunk-VRDMOSQS.js";
|
|
69
|
+
} from "./chunk-Z3I3QJK3.js";
|
|
65
70
|
import "./chunk-3RW4AZJV.js";
|
|
66
|
-
import "./chunk-
|
|
71
|
+
import "./chunk-UXEW557D.js";
|
|
67
72
|
import "./chunk-43W4YSO6.js";
|
|
68
|
-
import "./chunk-
|
|
73
|
+
import "./chunk-DICGXFAI.js";
|
|
69
74
|
import {
|
|
70
75
|
writeStderrLine
|
|
71
76
|
} from "./chunk-Y6Z2O3WR.js";
|
|
@@ -87,7 +92,7 @@ import {
|
|
|
87
92
|
worktreeBranchForSlug,
|
|
88
93
|
writeWorktreeSession,
|
|
89
94
|
writeWorktreeSessionMarker
|
|
90
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-3GNOQZDC.js";
|
|
91
96
|
import "./chunk-5P5XGNYH.js";
|
|
92
97
|
import "./chunk-SKAZWEV5.js";
|
|
93
98
|
import "./chunk-K5PGHDBN.js";
|
|
@@ -102,7 +107,7 @@ import "./chunk-FV7425LN.js";
|
|
|
102
107
|
import "./chunk-MLZQVCF3.js";
|
|
103
108
|
import "./chunk-LQ7TMOCE.js";
|
|
104
109
|
import "./chunk-E5A7LHNN.js";
|
|
105
|
-
import "./chunk-
|
|
110
|
+
import "./chunk-5MBO76SL.js";
|
|
106
111
|
import "./chunk-GO6LNQXT.js";
|
|
107
112
|
import "./chunk-NQKLOAVJ.js";
|
|
108
113
|
import "./chunk-WMPVYQ4P.js";
|
|
@@ -112,12 +117,12 @@ import {
|
|
|
112
117
|
getMCPServerStatus,
|
|
113
118
|
logUserPrompt,
|
|
114
119
|
uiTelemetryService
|
|
115
|
-
} from "./chunk-
|
|
120
|
+
} from "./chunk-BUZ6HGL4.js";
|
|
116
121
|
import "./chunk-E6US47KI.js";
|
|
117
122
|
import "./chunk-UWCTAVOD.js";
|
|
118
123
|
import "./chunk-OFEVLU4C.js";
|
|
119
124
|
import "./chunk-OMX7CUOE.js";
|
|
120
|
-
import "./chunk-
|
|
125
|
+
import "./chunk-OACJLMLD.js";
|
|
121
126
|
import "./chunk-SUAKHHK7.js";
|
|
122
127
|
import "./chunk-FEJ2FZ3U.js";
|
|
123
128
|
import {
|
|
@@ -145,11 +150,6 @@ import {
|
|
|
145
150
|
isDebugLoggingDegraded,
|
|
146
151
|
isSubpath
|
|
147
152
|
} from "./chunk-22MNNNXE.js";
|
|
148
|
-
import {
|
|
149
|
-
cleanupCheckpoints,
|
|
150
|
-
registerCleanup,
|
|
151
|
-
runExitCleanup
|
|
152
|
-
} from "./chunk-4UCTWSTP.js";
|
|
153
153
|
import {
|
|
154
154
|
finalizeStartupProfile,
|
|
155
155
|
isStartupProfilerEnabled,
|
|
@@ -158,6 +158,11 @@ import {
|
|
|
158
158
|
setInteractiveMode
|
|
159
159
|
} from "./chunk-ITOGNELQ.js";
|
|
160
160
|
import "./chunk-FXGLL2HL.js";
|
|
161
|
+
import {
|
|
162
|
+
cleanupCheckpoints,
|
|
163
|
+
registerCleanup,
|
|
164
|
+
runExitCleanup
|
|
165
|
+
} from "./chunk-JCH35JB3.js";
|
|
161
166
|
import "./chunk-ZERZSAZL.js";
|
|
162
167
|
import "./chunk-QN5NZ3UQ.js";
|
|
163
168
|
import "./chunk-BR4QREVK.js";
|
|
@@ -174,7 +179,7 @@ import {
|
|
|
174
179
|
init_esbuild_shims();
|
|
175
180
|
import dns from "node:dns";
|
|
176
181
|
import os4 from "node:os";
|
|
177
|
-
import
|
|
182
|
+
import path8 from "node:path";
|
|
178
183
|
import v8 from "node:v8";
|
|
179
184
|
|
|
180
185
|
// packages/cli/src/config/settingsWatcher.ts
|
|
@@ -828,10 +833,280 @@ function sortJsonValue(value) {
|
|
|
828
833
|
}
|
|
829
834
|
__name(sortJsonValue, "sortJsonValue");
|
|
830
835
|
|
|
831
|
-
// packages/cli/src/
|
|
836
|
+
// packages/cli/src/config/extension-file-watcher.ts
|
|
832
837
|
init_esbuild_shims();
|
|
838
|
+
import * as fs3 from "node:fs";
|
|
833
839
|
import * as path3 from "node:path";
|
|
834
|
-
var debugLogger4 = createDebugLogger("
|
|
840
|
+
var debugLogger4 = createDebugLogger("EXTENSION_FILE_WATCHER");
|
|
841
|
+
var TOP_LEVEL_FILES = /* @__PURE__ */ new Set(["extension-enablement.json"]);
|
|
842
|
+
var EXTENSION_FILES = /* @__PURE__ */ new Set([
|
|
843
|
+
"qwen-extension.json",
|
|
844
|
+
".qwen-extension-install.json"
|
|
845
|
+
]);
|
|
846
|
+
var AUTO_REFRESH_DIRS = /* @__PURE__ */ new Set(["commands", "skills", "agents"]);
|
|
847
|
+
var STALE_DIRS = /* @__PURE__ */ new Set(["hooks"]);
|
|
848
|
+
var ExtensionFileWatcher = class {
|
|
849
|
+
constructor(config, extensionsDir = Storage.getUserExtensionsDir(), refreshState = new ExtensionRefreshState()) {
|
|
850
|
+
this.config = config;
|
|
851
|
+
this.extensionsDir = extensionsDir;
|
|
852
|
+
this.refreshState = refreshState;
|
|
853
|
+
}
|
|
854
|
+
static {
|
|
855
|
+
__name(this, "ExtensionFileWatcher");
|
|
856
|
+
}
|
|
857
|
+
watcher;
|
|
858
|
+
bootstrapWatcher;
|
|
859
|
+
mutationListenerDisposer;
|
|
860
|
+
mutationSuppressionEnds = /* @__PURE__ */ new Map();
|
|
861
|
+
staleFiles = /* @__PURE__ */ new Set();
|
|
862
|
+
watching = false;
|
|
863
|
+
watchGeneration = 0;
|
|
864
|
+
startWatching() {
|
|
865
|
+
this.stopWatching();
|
|
866
|
+
this.watching = true;
|
|
867
|
+
const generation = ++this.watchGeneration;
|
|
868
|
+
this.subscribeExtensionManagerMutations();
|
|
869
|
+
this.staleFiles = this.getStaleFiles();
|
|
870
|
+
const roots = this.getWatchRoots();
|
|
871
|
+
if (roots.length > 0) {
|
|
872
|
+
this.watcher = watch(roots, {
|
|
873
|
+
ignoreInitial: true,
|
|
874
|
+
followSymlinks: false,
|
|
875
|
+
awaitWriteFinish: {
|
|
876
|
+
stabilityThreshold: 200,
|
|
877
|
+
pollInterval: 50
|
|
878
|
+
},
|
|
879
|
+
ignored: /* @__PURE__ */ __name((filePath) => this.isIgnored(filePath), "ignored")
|
|
880
|
+
}).on("all", (event, changedPath) => {
|
|
881
|
+
if (generation !== this.watchGeneration) return;
|
|
882
|
+
const resolvedPath = path3.resolve(changedPath);
|
|
883
|
+
const action = this.getRefreshAction(
|
|
884
|
+
event,
|
|
885
|
+
resolvedPath
|
|
886
|
+
);
|
|
887
|
+
let marked = false;
|
|
888
|
+
if (action === "auto") {
|
|
889
|
+
marked = this.refreshState.markExtensionContentChanged(
|
|
890
|
+
"extension content files changed"
|
|
891
|
+
);
|
|
892
|
+
} else if (action === "stale") {
|
|
893
|
+
marked = this.refreshState.markExtensionsChanged(
|
|
894
|
+
"extension files changed"
|
|
895
|
+
);
|
|
896
|
+
}
|
|
897
|
+
debugLogger4.debug("Extension file event classified", {
|
|
898
|
+
event,
|
|
899
|
+
path: resolvedPath,
|
|
900
|
+
action,
|
|
901
|
+
marked
|
|
902
|
+
});
|
|
903
|
+
}).on("error", (error) => {
|
|
904
|
+
debugLogger4.warn("Extension file watcher error:", error);
|
|
905
|
+
});
|
|
906
|
+
}
|
|
907
|
+
if (!fs3.existsSync(this.extensionsDir)) {
|
|
908
|
+
this.watchExtensionsParent();
|
|
909
|
+
}
|
|
910
|
+
}
|
|
911
|
+
stopWatching() {
|
|
912
|
+
const watcher = this.watcher;
|
|
913
|
+
const bootstrapWatcher = this.bootstrapWatcher;
|
|
914
|
+
this.watcher = void 0;
|
|
915
|
+
this.bootstrapWatcher = void 0;
|
|
916
|
+
this.watching = false;
|
|
917
|
+
this.watchGeneration++;
|
|
918
|
+
this.mutationListenerDisposer?.();
|
|
919
|
+
this.mutationListenerDisposer = void 0;
|
|
920
|
+
this.endPendingMutationSuppressions();
|
|
921
|
+
watcher?.close().catch((error) => {
|
|
922
|
+
debugLogger4.warn("Extension file watcher close error:", error);
|
|
923
|
+
});
|
|
924
|
+
bootstrapWatcher?.close().catch((error) => {
|
|
925
|
+
debugLogger4.warn("Extension bootstrap watcher close error:", error);
|
|
926
|
+
});
|
|
927
|
+
}
|
|
928
|
+
restartWatching() {
|
|
929
|
+
this.startWatching();
|
|
930
|
+
}
|
|
931
|
+
getWatchRoots() {
|
|
932
|
+
const roots = /* @__PURE__ */ new Set();
|
|
933
|
+
if (fs3.existsSync(this.extensionsDir)) {
|
|
934
|
+
roots.add(this.extensionsDir);
|
|
935
|
+
}
|
|
936
|
+
for (const extension of this.config.getActiveExtensions()) {
|
|
937
|
+
if (extension.installMetadata?.type === "link") {
|
|
938
|
+
const rawSource = extension.installMetadata.source;
|
|
939
|
+
const source = rawSource ? path3.resolve(rawSource) : void 0;
|
|
940
|
+
if (source && fs3.existsSync(source)) {
|
|
941
|
+
roots.add(source);
|
|
942
|
+
}
|
|
943
|
+
}
|
|
944
|
+
}
|
|
945
|
+
return [...roots];
|
|
946
|
+
}
|
|
947
|
+
getStaleFiles() {
|
|
948
|
+
const files = /* @__PURE__ */ new Set();
|
|
949
|
+
for (const extension of this.config.getActiveExtensions()) {
|
|
950
|
+
for (const filePath of extension.contextFiles) {
|
|
951
|
+
files.add(path3.resolve(filePath));
|
|
952
|
+
}
|
|
953
|
+
const configured = extension.config.contextFileName;
|
|
954
|
+
const names = configured === void 0 ? ["QWEN.md"] : Array.isArray(configured) ? configured : [configured];
|
|
955
|
+
for (const name of names) {
|
|
956
|
+
files.add(path3.resolve(extension.path, name));
|
|
957
|
+
}
|
|
958
|
+
this.addManifestFileReference(
|
|
959
|
+
files,
|
|
960
|
+
extension.path,
|
|
961
|
+
extension.config.hooks
|
|
962
|
+
);
|
|
963
|
+
this.addManifestFileReference(
|
|
964
|
+
files,
|
|
965
|
+
extension.path,
|
|
966
|
+
extension.config.lspServers
|
|
967
|
+
);
|
|
968
|
+
}
|
|
969
|
+
return files;
|
|
970
|
+
}
|
|
971
|
+
addManifestFileReference(files, extensionPath, value) {
|
|
972
|
+
if (typeof value !== "string") return;
|
|
973
|
+
files.add(
|
|
974
|
+
path3.isAbsolute(value) ? path3.resolve(value) : path3.resolve(extensionPath, value)
|
|
975
|
+
);
|
|
976
|
+
}
|
|
977
|
+
watchExtensionsParent() {
|
|
978
|
+
this.closeBootstrapWatcher();
|
|
979
|
+
const parentDir = path3.dirname(this.extensionsDir);
|
|
980
|
+
const dirBasename = path3.basename(this.extensionsDir);
|
|
981
|
+
const generation = this.watchGeneration;
|
|
982
|
+
this.bootstrapWatcher = watch(parentDir, {
|
|
983
|
+
ignoreInitial: true,
|
|
984
|
+
followSymlinks: false,
|
|
985
|
+
depth: 0,
|
|
986
|
+
ignored: /* @__PURE__ */ __name((filePath) => filePath !== parentDir && path3.basename(filePath) !== dirBasename, "ignored")
|
|
987
|
+
}).on("all", (_event, changedPath) => {
|
|
988
|
+
if (generation !== this.watchGeneration) return;
|
|
989
|
+
if (path3.basename(changedPath) !== dirBasename) return;
|
|
990
|
+
if (!fs3.existsSync(this.extensionsDir)) return;
|
|
991
|
+
this.refreshState.markExtensionsChanged("extension directory created");
|
|
992
|
+
queueMicrotask(() => {
|
|
993
|
+
if (this.watching) {
|
|
994
|
+
this.restartWatching();
|
|
995
|
+
}
|
|
996
|
+
});
|
|
997
|
+
}).on("error", (error) => {
|
|
998
|
+
debugLogger4.warn("Extension bootstrap watcher error:", error);
|
|
999
|
+
});
|
|
1000
|
+
}
|
|
1001
|
+
getRefreshAction(event, changedPath) {
|
|
1002
|
+
if (this.staleFiles.has(changedPath)) {
|
|
1003
|
+
return "stale";
|
|
1004
|
+
}
|
|
1005
|
+
if (changedPath === path3.resolve(this.extensionsDir)) {
|
|
1006
|
+
if (event === "unlinkDir") {
|
|
1007
|
+
this.watchExtensionsParent();
|
|
1008
|
+
return "stale";
|
|
1009
|
+
}
|
|
1010
|
+
return false;
|
|
1011
|
+
}
|
|
1012
|
+
if (isSubpath(this.extensionsDir, changedPath)) {
|
|
1013
|
+
return this.getUserExtensionRefreshAction(event, changedPath);
|
|
1014
|
+
}
|
|
1015
|
+
return this.getLinkedExtensionRefreshAction(changedPath);
|
|
1016
|
+
}
|
|
1017
|
+
getUserExtensionRefreshAction(event, changedPath) {
|
|
1018
|
+
const relative2 = path3.relative(this.extensionsDir, changedPath);
|
|
1019
|
+
const parts = relative2.split(path3.sep).filter(Boolean);
|
|
1020
|
+
if (parts.length === 1) {
|
|
1021
|
+
if (TOP_LEVEL_FILES.has(parts[0])) return "stale";
|
|
1022
|
+
if (event === "addDir" || event === "unlinkDir") return "stale";
|
|
1023
|
+
return false;
|
|
1024
|
+
}
|
|
1025
|
+
if (!fs3.existsSync(
|
|
1026
|
+
path3.join(this.extensionsDir, parts[0], "qwen-extension.json")
|
|
1027
|
+
)) {
|
|
1028
|
+
return "stale";
|
|
1029
|
+
}
|
|
1030
|
+
const runtimePath = parts.slice(1);
|
|
1031
|
+
return this.getRuntimePathRefreshAction(runtimePath);
|
|
1032
|
+
}
|
|
1033
|
+
getLinkedExtensionRefreshAction(changedPath) {
|
|
1034
|
+
for (const extension of this.config.getActiveExtensions()) {
|
|
1035
|
+
if (extension.installMetadata?.type !== "link") continue;
|
|
1036
|
+
const rawSource = extension.installMetadata.source;
|
|
1037
|
+
const source = rawSource ? path3.resolve(rawSource) : void 0;
|
|
1038
|
+
if (!source || !isSubpath(source, changedPath)) continue;
|
|
1039
|
+
const relative2 = path3.relative(source, changedPath);
|
|
1040
|
+
const parts = relative2.split(path3.sep).filter(Boolean);
|
|
1041
|
+
return parts.length === 0 ? "stale" : this.getRuntimePathRefreshAction(parts);
|
|
1042
|
+
}
|
|
1043
|
+
return false;
|
|
1044
|
+
}
|
|
1045
|
+
getRuntimePathRefreshAction(parts) {
|
|
1046
|
+
if (EXTENSION_FILES.has(parts[0]) || STALE_DIRS.has(parts[0])) {
|
|
1047
|
+
return "stale";
|
|
1048
|
+
}
|
|
1049
|
+
if (AUTO_REFRESH_DIRS.has(parts[0])) {
|
|
1050
|
+
return "auto";
|
|
1051
|
+
}
|
|
1052
|
+
return false;
|
|
1053
|
+
}
|
|
1054
|
+
isIgnored(filePath) {
|
|
1055
|
+
const normalized = filePath.replace(/\\/g, "/");
|
|
1056
|
+
const searchablePath = `/${normalized}/`;
|
|
1057
|
+
if (searchablePath.includes("/node_modules/") || searchablePath.includes("/.git/")) {
|
|
1058
|
+
return true;
|
|
1059
|
+
}
|
|
1060
|
+
const basename4 = normalized.split("/").pop() ?? "";
|
|
1061
|
+
return basename4 === ".DS_Store" || basename4.endsWith("~") || basename4.endsWith(".swp") || basename4.endsWith(".tmp");
|
|
1062
|
+
}
|
|
1063
|
+
subscribeExtensionManagerMutations() {
|
|
1064
|
+
const manager = this.config.getExtensionManager();
|
|
1065
|
+
this.mutationListenerDisposer = manager.addMutationListener(
|
|
1066
|
+
(event) => {
|
|
1067
|
+
if (event.phase === "start") {
|
|
1068
|
+
this.mutationSuppressionEnds.set(
|
|
1069
|
+
event.id,
|
|
1070
|
+
this.refreshState.beginSuppression(
|
|
1071
|
+
() => this.restartAfterMutation()
|
|
1072
|
+
)
|
|
1073
|
+
);
|
|
1074
|
+
return;
|
|
1075
|
+
}
|
|
1076
|
+
const endSuppression = this.mutationSuppressionEnds.get(event.id);
|
|
1077
|
+
if (!endSuppression) {
|
|
1078
|
+
return;
|
|
1079
|
+
}
|
|
1080
|
+
this.mutationSuppressionEnds.delete(event.id);
|
|
1081
|
+
endSuppression();
|
|
1082
|
+
}
|
|
1083
|
+
);
|
|
1084
|
+
}
|
|
1085
|
+
endPendingMutationSuppressions() {
|
|
1086
|
+
const endSuppressions = [...this.mutationSuppressionEnds.values()];
|
|
1087
|
+
this.mutationSuppressionEnds.clear();
|
|
1088
|
+
for (const endSuppression of endSuppressions) {
|
|
1089
|
+
endSuppression();
|
|
1090
|
+
}
|
|
1091
|
+
}
|
|
1092
|
+
restartAfterMutation() {
|
|
1093
|
+
if (this.watching) {
|
|
1094
|
+
this.restartWatching();
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
closeBootstrapWatcher() {
|
|
1098
|
+
const bootstrapWatcher = this.bootstrapWatcher;
|
|
1099
|
+
this.bootstrapWatcher = void 0;
|
|
1100
|
+
bootstrapWatcher?.close().catch((error) => {
|
|
1101
|
+
debugLogger4.warn("Extension bootstrap watcher close error:", error);
|
|
1102
|
+
});
|
|
1103
|
+
}
|
|
1104
|
+
};
|
|
1105
|
+
|
|
1106
|
+
// packages/cli/src/startup/worktreeStartup.ts
|
|
1107
|
+
init_esbuild_shims();
|
|
1108
|
+
import * as path4 from "node:path";
|
|
1109
|
+
var debugLogger5 = createDebugLogger("WORKTREE_STARTUP");
|
|
835
1110
|
var DETACHED_HEAD = "HEAD";
|
|
836
1111
|
async function setupStartupWorktree(rawInput, options) {
|
|
837
1112
|
if (rawInput === void 0) return null;
|
|
@@ -858,7 +1133,7 @@ async function setupStartupWorktree(rawInput, options) {
|
|
|
858
1133
|
error: `--worktree: ${launchCwd} is not a git repository. Run \`git init\` first or relaunch from inside one.`
|
|
859
1134
|
};
|
|
860
1135
|
}
|
|
861
|
-
const repoRoot =
|
|
1136
|
+
const repoRoot = path4.resolve(rawRepoRoot);
|
|
862
1137
|
const service = repoRoot === launchCwd ? probe : new GitWorktreeService(repoRoot);
|
|
863
1138
|
const prNumber = GitWorktreeService.parsePRReference(trimmed);
|
|
864
1139
|
const isPullRequest = prNumber !== null;
|
|
@@ -894,7 +1169,7 @@ async function setupStartupWorktree(rawInput, options) {
|
|
|
894
1169
|
error: `--worktree: ${expectedWorktreePath} is already a git worktree, but its branch is ${registered.branch} (expected ${expectedBranch}). Refusing to re-attach. Resolve the conflict manually (e.g. \`git worktree remove ${expectedWorktreePath}\`).`
|
|
895
1170
|
};
|
|
896
1171
|
}
|
|
897
|
-
const worktreePath2 =
|
|
1172
|
+
const worktreePath2 = path4.resolve(expectedWorktreePath);
|
|
898
1173
|
try {
|
|
899
1174
|
process.chdir(worktreePath2);
|
|
900
1175
|
} catch (error) {
|
|
@@ -903,7 +1178,7 @@ async function setupStartupWorktree(rawInput, options) {
|
|
|
903
1178
|
error: `--worktree: failed to chdir into ${worktreePath2} (${error instanceof Error ? error.message : String(error)}).`
|
|
904
1179
|
};
|
|
905
1180
|
}
|
|
906
|
-
|
|
1181
|
+
debugLogger5.debug(
|
|
907
1182
|
`setupStartupWorktree: re-attached to existing worktree at ${worktreePath2} (branch=${registered.branch})`
|
|
908
1183
|
);
|
|
909
1184
|
return {
|
|
@@ -944,7 +1219,7 @@ async function setupStartupWorktree(rawInput, options) {
|
|
|
944
1219
|
error: `--worktree: ${result.error ?? "failed to create worktree."}`
|
|
945
1220
|
};
|
|
946
1221
|
}
|
|
947
|
-
const worktreePath =
|
|
1222
|
+
const worktreePath = path4.resolve(result.worktree.path);
|
|
948
1223
|
try {
|
|
949
1224
|
process.chdir(worktreePath);
|
|
950
1225
|
} catch (error) {
|
|
@@ -981,7 +1256,7 @@ async function persistStartupWorktreeSidecar(config, context) {
|
|
|
981
1256
|
try {
|
|
982
1257
|
previous = await readWorktreeSession(sidecarPath);
|
|
983
1258
|
} catch (error) {
|
|
984
|
-
|
|
1259
|
+
debugLogger5.warn(
|
|
985
1260
|
`persistStartupWorktreeSidecar: failed to read existing sidecar at ${sidecarPath} \u2014 treating as "no previous worktree" and proceeding: ${error}`
|
|
986
1261
|
);
|
|
987
1262
|
previous = null;
|
|
@@ -1000,7 +1275,7 @@ async function persistStartupWorktreeSidecar(config, context) {
|
|
|
1000
1275
|
context.repoRoot,
|
|
1001
1276
|
context.worktreePath
|
|
1002
1277
|
]).catch((error) => {
|
|
1003
|
-
|
|
1278
|
+
debugLogger5.warn(
|
|
1004
1279
|
`persistStartupWorktreeSidecar: failed to check owner runtime ${owner}: ${error}`
|
|
1005
1280
|
);
|
|
1006
1281
|
return true;
|
|
@@ -1054,7 +1329,7 @@ function takeUtf8Prefix(value, maxBytes) {
|
|
|
1054
1329
|
__name(takeUtf8Prefix, "takeUtf8Prefix");
|
|
1055
1330
|
async function readStdin() {
|
|
1056
1331
|
const MAX_STDIN_SIZE = 8 * 1024 * 1024;
|
|
1057
|
-
return new Promise((
|
|
1332
|
+
return new Promise((resolve3, reject) => {
|
|
1058
1333
|
let data = "";
|
|
1059
1334
|
let totalSize = 0;
|
|
1060
1335
|
let settled = false;
|
|
@@ -1091,7 +1366,7 @@ async function readStdin() {
|
|
|
1091
1366
|
if (settled) return;
|
|
1092
1367
|
settled = true;
|
|
1093
1368
|
cleanup();
|
|
1094
|
-
|
|
1369
|
+
resolve3(data);
|
|
1095
1370
|
}, "finish");
|
|
1096
1371
|
const onEnd = /* @__PURE__ */ __name(() => {
|
|
1097
1372
|
finish();
|
|
@@ -1163,11 +1438,11 @@ async function relaunchAppInChildProcess(additionalNodeArgs, additionalScriptArg
|
|
|
1163
1438
|
child.kill();
|
|
1164
1439
|
throw err;
|
|
1165
1440
|
}
|
|
1166
|
-
return new Promise((
|
|
1441
|
+
return new Promise((resolve3, reject) => {
|
|
1167
1442
|
child.on("error", reject);
|
|
1168
1443
|
child.on("close", (code) => {
|
|
1169
1444
|
process.stdin.resume();
|
|
1170
|
-
|
|
1445
|
+
resolve3(code ?? 1);
|
|
1171
1446
|
});
|
|
1172
1447
|
});
|
|
1173
1448
|
}, "runner");
|
|
@@ -1180,8 +1455,8 @@ init_esbuild_shims();
|
|
|
1180
1455
|
var import_shell_quote = __toESM(require_shell_quote(), 1);
|
|
1181
1456
|
import { exec, execSync, spawn as spawn2 } from "node:child_process";
|
|
1182
1457
|
import os2 from "node:os";
|
|
1183
|
-
import
|
|
1184
|
-
import
|
|
1458
|
+
import path6 from "node:path";
|
|
1459
|
+
import fs4 from "node:fs";
|
|
1185
1460
|
import { promisify } from "node:util";
|
|
1186
1461
|
import { randomBytes } from "node:crypto";
|
|
1187
1462
|
|
|
@@ -1201,10 +1476,10 @@ __name(parseSandboxImageName, "parseSandboxImageName");
|
|
|
1201
1476
|
|
|
1202
1477
|
// packages/cli/src/utils/sandbox-path.ts
|
|
1203
1478
|
init_esbuild_shims();
|
|
1204
|
-
import
|
|
1479
|
+
import path5 from "node:path";
|
|
1205
1480
|
function isContainerPathWithinWorkdir(containerWorkdir, containerPath) {
|
|
1206
1481
|
const normalize = /* @__PURE__ */ __name((value) => {
|
|
1207
|
-
const normalized =
|
|
1482
|
+
const normalized = path5.posix.normalize(value.replace(/\\/g, "/")).replace(/\/+$/, "").toLowerCase();
|
|
1208
1483
|
return normalized || "/";
|
|
1209
1484
|
}, "normalize");
|
|
1210
1485
|
const normalizedWorkdir = normalize(containerWorkdir);
|
|
@@ -1248,10 +1523,10 @@ function getContainerPath(hostPath) {
|
|
|
1248
1523
|
}
|
|
1249
1524
|
__name(getContainerPath, "getContainerPath");
|
|
1250
1525
|
function ensureDirectoryAndGetRealPath(dir) {
|
|
1251
|
-
if (!
|
|
1252
|
-
|
|
1526
|
+
if (!fs4.existsSync(dir)) {
|
|
1527
|
+
fs4.mkdirSync(dir, { recursive: true });
|
|
1253
1528
|
}
|
|
1254
|
-
return
|
|
1529
|
+
return fs4.realpathSync(dir);
|
|
1255
1530
|
}
|
|
1256
1531
|
__name(ensureDirectoryAndGetRealPath, "ensureDirectoryAndGetRealPath");
|
|
1257
1532
|
var LOCAL_DEV_SANDBOX_IMAGE_NAME = "qwen-code-sandbox";
|
|
@@ -1267,9 +1542,9 @@ var BUILTIN_SEATBELT_PROFILES = [
|
|
|
1267
1542
|
];
|
|
1268
1543
|
function resolveSeatbeltProfileFile(profile, importMetaUrl = import.meta.url) {
|
|
1269
1544
|
if (!BUILTIN_SEATBELT_PROFILES.includes(profile)) {
|
|
1270
|
-
return
|
|
1545
|
+
return path6.join(SETTINGS_DIRECTORY_NAME, `sandbox-macos-${profile}.sb`);
|
|
1271
1546
|
}
|
|
1272
|
-
return
|
|
1547
|
+
return path6.join(
|
|
1273
1548
|
resolveBundleDir(importMetaUrl),
|
|
1274
1549
|
`sandbox-macos-${profile}.sb`
|
|
1275
1550
|
);
|
|
@@ -1332,11 +1607,11 @@ function entrypoint(workdir, cliArgs) {
|
|
|
1332
1607
|
if (pythonPathSuffix) {
|
|
1333
1608
|
shellCmds.push(`export PYTHONPATH="$PYTHONPATH${pythonPathSuffix}";`);
|
|
1334
1609
|
}
|
|
1335
|
-
const projectSandboxBashrc =
|
|
1610
|
+
const projectSandboxBashrc = path6.join(
|
|
1336
1611
|
SETTINGS_DIRECTORY_NAME,
|
|
1337
1612
|
"sandbox.bashrc"
|
|
1338
1613
|
);
|
|
1339
|
-
if (
|
|
1614
|
+
if (fs4.existsSync(projectSandboxBashrc)) {
|
|
1340
1615
|
shellCmds.push(`source ${getContainerPath(projectSandboxBashrc)};`);
|
|
1341
1616
|
}
|
|
1342
1617
|
ports().forEach(
|
|
@@ -1359,7 +1634,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1359
1634
|
}
|
|
1360
1635
|
const profile = process.env["SEATBELT_PROFILE"] ??= "permissive-open";
|
|
1361
1636
|
const profileFile = resolveSeatbeltProfileFile(profile);
|
|
1362
|
-
if (!
|
|
1637
|
+
if (!fs4.existsSync(profileFile)) {
|
|
1363
1638
|
throw new FatalSandboxError(
|
|
1364
1639
|
`Missing macos seatbelt profile file '${profileFile}'`
|
|
1365
1640
|
);
|
|
@@ -1371,30 +1646,30 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1371
1646
|
].join(" ");
|
|
1372
1647
|
const qwenDir = Storage.getGlobalQwenDir();
|
|
1373
1648
|
const runtimeDir = Storage.getRuntimeBaseDir();
|
|
1374
|
-
|
|
1375
|
-
|
|
1649
|
+
fs4.mkdirSync(qwenDir, { recursive: true });
|
|
1650
|
+
fs4.mkdirSync(runtimeDir, { recursive: true });
|
|
1376
1651
|
const args2 = [
|
|
1377
1652
|
"-D",
|
|
1378
|
-
`TARGET_DIR=${
|
|
1653
|
+
`TARGET_DIR=${fs4.realpathSync(process.cwd())}`,
|
|
1379
1654
|
"-D",
|
|
1380
|
-
`TMP_DIR=${
|
|
1655
|
+
`TMP_DIR=${fs4.realpathSync(os2.tmpdir())}`,
|
|
1381
1656
|
"-D",
|
|
1382
|
-
`HOME_DIR=${
|
|
1657
|
+
`HOME_DIR=${fs4.realpathSync(os2.homedir())}`,
|
|
1383
1658
|
"-D",
|
|
1384
|
-
`CACHE_DIR=${
|
|
1659
|
+
`CACHE_DIR=${fs4.realpathSync(execSync(`getconf DARWIN_USER_CACHE_DIR`).toString().trim())}`,
|
|
1385
1660
|
"-D",
|
|
1386
|
-
`QWEN_DIR=${
|
|
1661
|
+
`QWEN_DIR=${fs4.realpathSync(qwenDir)}`,
|
|
1387
1662
|
"-D",
|
|
1388
|
-
`RUNTIME_DIR=${
|
|
1663
|
+
`RUNTIME_DIR=${fs4.realpathSync(runtimeDir)}`
|
|
1389
1664
|
];
|
|
1390
1665
|
const MAX_INCLUDE_DIRS = 5;
|
|
1391
|
-
const targetDir =
|
|
1666
|
+
const targetDir = fs4.realpathSync(cliConfig?.getTargetDir() || "");
|
|
1392
1667
|
const includedDirs = [];
|
|
1393
1668
|
if (cliConfig) {
|
|
1394
1669
|
const workspaceContext = cliConfig.getWorkspaceContext();
|
|
1395
1670
|
const directories = workspaceContext.getDirectories();
|
|
1396
1671
|
for (const dir of directories) {
|
|
1397
|
-
const realDir =
|
|
1672
|
+
const realDir = fs4.realpathSync(dir);
|
|
1398
1673
|
if (realDir !== targetDir) {
|
|
1399
1674
|
includedDirs.push(realDir);
|
|
1400
1675
|
}
|
|
@@ -1467,23 +1742,23 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1467
1742
|
sandboxProcess2 = spawn2(config.command, args2, {
|
|
1468
1743
|
stdio: "inherit"
|
|
1469
1744
|
});
|
|
1470
|
-
return new Promise((
|
|
1745
|
+
return new Promise((resolve3, reject) => {
|
|
1471
1746
|
sandboxProcess2?.on("error", reject);
|
|
1472
1747
|
sandboxProcess2?.on("close", (code) => {
|
|
1473
1748
|
process.stdin.resume();
|
|
1474
|
-
|
|
1749
|
+
resolve3(code ?? 1);
|
|
1475
1750
|
});
|
|
1476
1751
|
});
|
|
1477
1752
|
}
|
|
1478
1753
|
writeStderrLine(`hopping into sandbox (command: ${config.command}) ...`);
|
|
1479
|
-
const gcPath =
|
|
1480
|
-
const projectSandboxDockerfile =
|
|
1754
|
+
const gcPath = fs4.realpathSync(process.argv[1]);
|
|
1755
|
+
const projectSandboxDockerfile = path6.join(
|
|
1481
1756
|
SETTINGS_DIRECTORY_NAME,
|
|
1482
1757
|
"sandbox.Dockerfile"
|
|
1483
1758
|
);
|
|
1484
|
-
const isCustomProjectSandbox =
|
|
1759
|
+
const isCustomProjectSandbox = fs4.existsSync(projectSandboxDockerfile);
|
|
1485
1760
|
const image = config.image;
|
|
1486
|
-
const workdir =
|
|
1761
|
+
const workdir = path6.resolve(process.cwd());
|
|
1487
1762
|
const containerWorkdir = getContainerPath(workdir);
|
|
1488
1763
|
if (process.env["BUILD_SANDBOX"]) {
|
|
1489
1764
|
if (!gcPath.includes("qwen-code/packages/")) {
|
|
@@ -1494,13 +1769,13 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1494
1769
|
writeStderrLine("building sandbox ...");
|
|
1495
1770
|
const gcRoot = gcPath.split("/packages/")[0];
|
|
1496
1771
|
let buildArgs = "";
|
|
1497
|
-
const projectSandboxDockerfile2 =
|
|
1772
|
+
const projectSandboxDockerfile2 = path6.join(
|
|
1498
1773
|
SETTINGS_DIRECTORY_NAME,
|
|
1499
1774
|
"sandbox.Dockerfile"
|
|
1500
1775
|
);
|
|
1501
1776
|
if (isCustomProjectSandbox) {
|
|
1502
1777
|
writeStderrLine(`using ${projectSandboxDockerfile2} for sandbox`);
|
|
1503
|
-
buildArgs += `-f ${
|
|
1778
|
+
buildArgs += `-f ${path6.resolve(projectSandboxDockerfile2)} -i ${image}`;
|
|
1504
1779
|
}
|
|
1505
1780
|
execSync(
|
|
1506
1781
|
`cd ${gcRoot} && node scripts/build_sandbox.js -s ${buildArgs}`,
|
|
@@ -1576,8 +1851,8 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1576
1851
|
args.push("--env", `QWEN_RUNTIME_DIR=${runtimeBaseDirContainerPath}`);
|
|
1577
1852
|
}
|
|
1578
1853
|
args.push("--volume", `${os2.tmpdir()}:${getContainerPath(os2.tmpdir())}`);
|
|
1579
|
-
const gcloudConfigDir =
|
|
1580
|
-
if (
|
|
1854
|
+
const gcloudConfigDir = path6.join(os2.homedir(), ".config", "gcloud");
|
|
1855
|
+
if (fs4.existsSync(gcloudConfigDir)) {
|
|
1581
1856
|
args.push(
|
|
1582
1857
|
"--volume",
|
|
1583
1858
|
`${gcloudConfigDir}:${getContainerPath(gcloudConfigDir)}:ro`
|
|
@@ -1585,7 +1860,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1585
1860
|
}
|
|
1586
1861
|
if (process.env["GOOGLE_APPLICATION_CREDENTIALS"]) {
|
|
1587
1862
|
const adcFile = process.env["GOOGLE_APPLICATION_CREDENTIALS"];
|
|
1588
|
-
if (
|
|
1863
|
+
if (fs4.existsSync(adcFile)) {
|
|
1589
1864
|
args.push("--volume", `${adcFile}:${getContainerPath(adcFile)}:ro`);
|
|
1590
1865
|
args.push(
|
|
1591
1866
|
"--env",
|
|
@@ -1598,12 +1873,12 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1598
1873
|
if (mount.trim()) {
|
|
1599
1874
|
const { from, to, opts } = parseSandboxMountSpec(mount);
|
|
1600
1875
|
mount = `${from}:${to}:${opts}`;
|
|
1601
|
-
if (!
|
|
1876
|
+
if (!path6.isAbsolute(from)) {
|
|
1602
1877
|
throw new FatalSandboxError(
|
|
1603
1878
|
`Path '${from}' listed in SANDBOX_MOUNTS must be absolute`
|
|
1604
1879
|
);
|
|
1605
1880
|
}
|
|
1606
|
-
if (!
|
|
1881
|
+
if (!fs4.existsSync(from)) {
|
|
1607
1882
|
throw new FatalSandboxError(
|
|
1608
1883
|
`Missing mount path '${from}' listed in SANDBOX_MOUNTS`
|
|
1609
1884
|
);
|
|
@@ -1749,12 +2024,12 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1749
2024
|
getContainerPath(workdir),
|
|
1750
2025
|
getContainerPath(virtualEnv)
|
|
1751
2026
|
)) {
|
|
1752
|
-
const sandboxVenvPath =
|
|
2027
|
+
const sandboxVenvPath = path6.resolve(
|
|
1753
2028
|
SETTINGS_DIRECTORY_NAME,
|
|
1754
2029
|
"sandbox.venv"
|
|
1755
2030
|
);
|
|
1756
|
-
if (!
|
|
1757
|
-
|
|
2031
|
+
if (!fs4.existsSync(sandboxVenvPath)) {
|
|
2032
|
+
fs4.mkdirSync(sandboxVenvPath, { recursive: true });
|
|
1758
2033
|
}
|
|
1759
2034
|
args.push("--volume", `${sandboxVenvPath}:${getContainerPath(virtualEnv)}`);
|
|
1760
2035
|
args.push("--env", `VIRTUAL_ENV=${getContainerPath(virtualEnv)}`);
|
|
@@ -1783,8 +2058,8 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1783
2058
|
}
|
|
1784
2059
|
args.push("--env", `SANDBOX=${containerName}`);
|
|
1785
2060
|
if (config.command === "podman") {
|
|
1786
|
-
const emptyAuthFilePath =
|
|
1787
|
-
|
|
2061
|
+
const emptyAuthFilePath = path6.join(os2.tmpdir(), "empty_auth.json");
|
|
2062
|
+
fs4.writeFileSync(emptyAuthFilePath, "{}", "utf-8");
|
|
1788
2063
|
args.push("--authfile", emptyAuthFilePath);
|
|
1789
2064
|
}
|
|
1790
2065
|
let userFlag = "";
|
|
@@ -1855,7 +2130,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1855
2130
|
sandboxProcess = spawn2(config.command, args, {
|
|
1856
2131
|
stdio: "inherit"
|
|
1857
2132
|
});
|
|
1858
|
-
return new Promise((
|
|
2133
|
+
return new Promise((resolve3, reject) => {
|
|
1859
2134
|
sandboxProcess.on("error", (err) => {
|
|
1860
2135
|
writeStderrLine(`Sandbox process error: ${err}`);
|
|
1861
2136
|
reject(err);
|
|
@@ -1867,13 +2142,13 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1867
2142
|
`Sandbox process exited with code: ${code}, signal: ${signal}`
|
|
1868
2143
|
);
|
|
1869
2144
|
}
|
|
1870
|
-
|
|
2145
|
+
resolve3(code ?? 1);
|
|
1871
2146
|
});
|
|
1872
2147
|
});
|
|
1873
2148
|
}
|
|
1874
2149
|
__name(start_sandbox, "start_sandbox");
|
|
1875
2150
|
async function imageExists(sandbox, image) {
|
|
1876
|
-
return new Promise((
|
|
2151
|
+
return new Promise((resolve3) => {
|
|
1877
2152
|
const args = ["images", "-q", image];
|
|
1878
2153
|
const checkProcess = spawn2(sandbox, args);
|
|
1879
2154
|
let stdoutData = "";
|
|
@@ -1886,17 +2161,17 @@ async function imageExists(sandbox, image) {
|
|
|
1886
2161
|
writeStderrLine(
|
|
1887
2162
|
`Failed to start '${sandbox}' command for image check: ${err.message}`
|
|
1888
2163
|
);
|
|
1889
|
-
|
|
2164
|
+
resolve3(false);
|
|
1890
2165
|
});
|
|
1891
2166
|
checkProcess.on("close", () => {
|
|
1892
|
-
|
|
2167
|
+
resolve3(stdoutData.trim() !== "");
|
|
1893
2168
|
});
|
|
1894
2169
|
});
|
|
1895
2170
|
}
|
|
1896
2171
|
__name(imageExists, "imageExists");
|
|
1897
2172
|
async function pullImage(sandbox, image) {
|
|
1898
2173
|
writeStderrLine(`Attempting to pull image ${image} using ${sandbox}...`);
|
|
1899
|
-
return new Promise((
|
|
2174
|
+
return new Promise((resolve3) => {
|
|
1900
2175
|
const args = ["pull", image];
|
|
1901
2176
|
const pullProcess = spawn2(sandbox, args, { stdio: "pipe" });
|
|
1902
2177
|
let stderrData = "";
|
|
@@ -1912,13 +2187,13 @@ async function pullImage(sandbox, image) {
|
|
|
1912
2187
|
`Failed to start '${sandbox} pull ${image}' command: ${err.message}`
|
|
1913
2188
|
);
|
|
1914
2189
|
cleanup();
|
|
1915
|
-
|
|
2190
|
+
resolve3(false);
|
|
1916
2191
|
}, "onError");
|
|
1917
2192
|
const onClose = /* @__PURE__ */ __name((code) => {
|
|
1918
2193
|
if (code === 0) {
|
|
1919
2194
|
writeStderrLine(`Successfully pulled image ${image}.`);
|
|
1920
2195
|
cleanup();
|
|
1921
|
-
|
|
2196
|
+
resolve3(true);
|
|
1922
2197
|
} else {
|
|
1923
2198
|
writeStderrLine(
|
|
1924
2199
|
`Failed to pull image ${image}. '${sandbox} pull ${image}' exited with code ${code}.`
|
|
@@ -1926,7 +2201,7 @@ async function pullImage(sandbox, image) {
|
|
|
1926
2201
|
if (stderrData.trim()) {
|
|
1927
2202
|
}
|
|
1928
2203
|
cleanup();
|
|
1929
|
-
|
|
2204
|
+
resolve3(false);
|
|
1930
2205
|
}
|
|
1931
2206
|
}, "onClose");
|
|
1932
2207
|
const cleanup = /* @__PURE__ */ __name(() => {
|
|
@@ -1983,17 +2258,17 @@ __name(ensureSandboxImageIsPresent, "ensureSandboxImageIsPresent");
|
|
|
1983
2258
|
|
|
1984
2259
|
// packages/cli/src/utils/startupWarnings.ts
|
|
1985
2260
|
init_esbuild_shims();
|
|
1986
|
-
import
|
|
2261
|
+
import fs5 from "node:fs/promises";
|
|
1987
2262
|
import os3 from "node:os";
|
|
1988
2263
|
import { join as pathJoin } from "node:path";
|
|
1989
2264
|
var warningsFilePath = pathJoin(os3.tmpdir(), "qwen-code-warnings.txt");
|
|
1990
2265
|
async function getStartupWarnings() {
|
|
1991
2266
|
try {
|
|
1992
|
-
await
|
|
1993
|
-
const warningsContent = await
|
|
2267
|
+
await fs5.access(warningsFilePath);
|
|
2268
|
+
const warningsContent = await fs5.readFile(warningsFilePath, "utf-8");
|
|
1994
2269
|
const warnings = warningsContent.split("\n").filter((line) => line.trim() !== "");
|
|
1995
2270
|
try {
|
|
1996
|
-
await
|
|
2271
|
+
await fs5.unlink(warningsFilePath);
|
|
1997
2272
|
} catch {
|
|
1998
2273
|
warnings.push("Warning: Could not delete temporary warnings file.");
|
|
1999
2274
|
}
|
|
@@ -2009,15 +2284,15 @@ __name(getStartupWarnings, "getStartupWarnings");
|
|
|
2009
2284
|
|
|
2010
2285
|
// packages/cli/src/utils/userStartupWarnings.ts
|
|
2011
2286
|
init_esbuild_shims();
|
|
2012
|
-
import
|
|
2013
|
-
import
|
|
2287
|
+
import fs6 from "node:fs/promises";
|
|
2288
|
+
import path7 from "node:path";
|
|
2014
2289
|
var rootDirectoryCheck = {
|
|
2015
2290
|
id: "root-directory",
|
|
2016
2291
|
check: /* @__PURE__ */ __name(async (options) => {
|
|
2017
2292
|
try {
|
|
2018
|
-
const workspaceRealPath = await
|
|
2293
|
+
const workspaceRealPath = await fs6.realpath(options.workspaceRoot);
|
|
2019
2294
|
const errorMessage = "Warning: You are running Qwen Code in the root directory. Your entire folder structure will be used for context. It is strongly recommended to run in a project-specific directory.";
|
|
2020
|
-
if (
|
|
2295
|
+
if (path7.dirname(workspaceRealPath) === workspaceRealPath) {
|
|
2021
2296
|
return errorMessage;
|
|
2022
2297
|
}
|
|
2023
2298
|
return null;
|
|
@@ -2090,7 +2365,7 @@ function initializeWarningHandler() {
|
|
|
2090
2365
|
__name(initializeWarningHandler, "initializeWarningHandler");
|
|
2091
2366
|
|
|
2092
2367
|
// packages/cli/src/gemini.tsx
|
|
2093
|
-
var
|
|
2368
|
+
var debugLogger6 = createDebugLogger("STARTUP");
|
|
2094
2369
|
function clearCorruptionEnvVars() {
|
|
2095
2370
|
delete process.env[ENV_CORRUPTED_PATH];
|
|
2096
2371
|
delete process.env[ENV_WAS_RECOVERED];
|
|
@@ -2169,7 +2444,7 @@ function installInteractiveSignalHandlers(wasRaw) {
|
|
|
2169
2444
|
}
|
|
2170
2445
|
cleanupStarted = true;
|
|
2171
2446
|
void runExitCleanup().catch((error) => {
|
|
2172
|
-
|
|
2447
|
+
debugLogger6.error(`Error during ${signal} cleanup:`, error);
|
|
2173
2448
|
}).finally(() => {
|
|
2174
2449
|
process.exit(getSignalExitCode(signal));
|
|
2175
2450
|
});
|
|
@@ -2224,7 +2499,7 @@ async function main() {
|
|
|
2224
2499
|
await initializeI18n(
|
|
2225
2500
|
resolveLanguageSetting(settings.merged.general?.language)
|
|
2226
2501
|
);
|
|
2227
|
-
const { handleList: handleListExtensions } = await import("./list-
|
|
2502
|
+
const { handleList: handleListExtensions } = await import("./list-KVHF7O4X.js");
|
|
2228
2503
|
await handleListExtensions();
|
|
2229
2504
|
process.exit(0);
|
|
2230
2505
|
}
|
|
@@ -2238,7 +2513,7 @@ async function main() {
|
|
|
2238
2513
|
dns.setDefaultResultOrder(
|
|
2239
2514
|
validateDnsResolutionOrder(settings.merged.advanced?.dnsResolutionOrder)
|
|
2240
2515
|
);
|
|
2241
|
-
const { themeManager, AUTO_THEME_NAME } = await import("./theme-manager-
|
|
2516
|
+
const { themeManager, AUTO_THEME_NAME } = await import("./theme-manager-WZ4RRMMB.js");
|
|
2242
2517
|
themeManager.loadCustomThemes(settings.merged.ui?.customThemes);
|
|
2243
2518
|
const configuredTheme = settings.merged.ui?.theme;
|
|
2244
2519
|
if (configuredTheme && configuredTheme !== AUTO_THEME_NAME) {
|
|
@@ -2340,7 +2615,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2340
2615
|
const resolveIfPath = /* @__PURE__ */ __name((v) => {
|
|
2341
2616
|
if (typeof v !== "string" || v.length === 0) return v;
|
|
2342
2617
|
if (looksLikeInlineJson(v)) return v;
|
|
2343
|
-
return
|
|
2618
|
+
return path8.resolve(launchCwdForPaths, v);
|
|
2344
2619
|
}, "resolveIfPath");
|
|
2345
2620
|
argv.mcpConfig = resolveIfPath(argv.mcpConfig);
|
|
2346
2621
|
argv.openaiLoggingDir = resolveIfPath(argv.openaiLoggingDir);
|
|
@@ -2349,15 +2624,15 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2349
2624
|
argv.telemetryOutfile = resolveIfPath(argv.telemetryOutfile);
|
|
2350
2625
|
if (Array.isArray(argv.includeDirectories)) {
|
|
2351
2626
|
argv.includeDirectories = argv.includeDirectories.map(
|
|
2352
|
-
(d) => typeof d === "string" && d.length > 0 ?
|
|
2627
|
+
(d) => typeof d === "string" && d.length > 0 ? path8.resolve(launchCwdForPaths, d) : d
|
|
2353
2628
|
);
|
|
2354
2629
|
}
|
|
2355
2630
|
if (typeof argv.jsonSchema === "string") {
|
|
2356
2631
|
const trimmedSchema = argv.jsonSchema.trim();
|
|
2357
2632
|
if (trimmedSchema.startsWith("@")) {
|
|
2358
2633
|
const rel = trimmedSchema.slice(1);
|
|
2359
|
-
if (rel.length > 0 && !
|
|
2360
|
-
argv.jsonSchema = "@" +
|
|
2634
|
+
if (rel.length > 0 && !path8.isAbsolute(rel)) {
|
|
2635
|
+
argv.jsonSchema = "@" + path8.resolve(launchCwdForPaths, rel);
|
|
2361
2636
|
}
|
|
2362
2637
|
}
|
|
2363
2638
|
}
|
|
@@ -2388,7 +2663,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2388
2663
|
);
|
|
2389
2664
|
let resolvedSessionId;
|
|
2390
2665
|
if (argv.resume === "") {
|
|
2391
|
-
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-
|
|
2666
|
+
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-EYRGH6PJ.js");
|
|
2392
2667
|
resolvedSessionId = await showResumeSessionPicker();
|
|
2393
2668
|
} else if (!isValidSessionId(argv.resume)) {
|
|
2394
2669
|
const sessionService = new SessionService(process.cwd());
|
|
@@ -2399,7 +2674,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2399
2674
|
writeStderrLine(
|
|
2400
2675
|
`Multiple sessions found with title "${argv.resume}". Please select one:`
|
|
2401
2676
|
);
|
|
2402
|
-
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-
|
|
2677
|
+
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-EYRGH6PJ.js");
|
|
2403
2678
|
resolvedSessionId = await showResumeSessionPicker(
|
|
2404
2679
|
process.cwd(),
|
|
2405
2680
|
matches
|
|
@@ -2449,6 +2724,23 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2449
2724
|
registerCleanup(disposeMcpHotReload);
|
|
2450
2725
|
}
|
|
2451
2726
|
registerLspHotReload(config, registerCleanup);
|
|
2727
|
+
const extensionRefreshState = new ExtensionRefreshState();
|
|
2728
|
+
const extensionFileWatcher = isBareMode(argv.bare) || config.isSafeMode() ? void 0 : new ExtensionFileWatcher(config, void 0, extensionRefreshState);
|
|
2729
|
+
extensionFileWatcher?.startWatching();
|
|
2730
|
+
if (extensionFileWatcher) {
|
|
2731
|
+
const restartExtensionWatcher = /* @__PURE__ */ __name(() => extensionFileWatcher.restartWatching(), "restartExtensionWatcher");
|
|
2732
|
+
extensionRefreshState.on(
|
|
2733
|
+
"extensions-reloaded" /* ExtensionsReloaded */,
|
|
2734
|
+
restartExtensionWatcher
|
|
2735
|
+
);
|
|
2736
|
+
registerCleanup(() => {
|
|
2737
|
+
extensionRefreshState.off(
|
|
2738
|
+
"extensions-reloaded" /* ExtensionsReloaded */,
|
|
2739
|
+
restartExtensionWatcher
|
|
2740
|
+
);
|
|
2741
|
+
extensionFileWatcher.stopWatching();
|
|
2742
|
+
});
|
|
2743
|
+
}
|
|
2452
2744
|
if (startupWorktreeContext) {
|
|
2453
2745
|
config.setPendingStartupWorktreeNotice(
|
|
2454
2746
|
buildStartupWorktreeNotice(startupWorktreeContext)
|
|
@@ -2470,7 +2762,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2470
2762
|
)
|
|
2471
2763
|
);
|
|
2472
2764
|
} catch (error) {
|
|
2473
|
-
|
|
2765
|
+
debugLogger6.warn(
|
|
2474
2766
|
`--worktree sidecar persist failed (non-fatal, notice preserved): ${error instanceof Error ? error.message : String(error)}`
|
|
2475
2767
|
);
|
|
2476
2768
|
}
|
|
@@ -2501,7 +2793,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2501
2793
|
registerCleanup(installInteractiveSignalHandlers(wasRaw));
|
|
2502
2794
|
}
|
|
2503
2795
|
if (config.isInteractive() && !wasRaw && process.stdin.isTTY) {
|
|
2504
|
-
const { startEarlyInputCapture, stopAndGetCapturedInput } = await import("./earlyInputCapture-
|
|
2796
|
+
const { startEarlyInputCapture, stopAndGetCapturedInput } = await import("./earlyInputCapture-KNOYZ4MJ.js");
|
|
2505
2797
|
const { detectAndEnableKittyProtocol } = await import("./kittyProtocolDetector-OJRCJLIU.js");
|
|
2506
2798
|
process.stdin.setRawMode(true);
|
|
2507
2799
|
startEarlyInputCapture();
|
|
@@ -2509,16 +2801,16 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2509
2801
|
kittyProtocolDetectionComplete = detectAndEnableKittyProtocol();
|
|
2510
2802
|
if (!configuredTheme || configuredTheme === AUTO_THEME_NAME) {
|
|
2511
2803
|
themeAutoDetectionComplete = themeManager.resolveAutoThemeAsync().catch((err) => {
|
|
2512
|
-
|
|
2804
|
+
debugLogger6.warn("Async theme auto-detection failed:", err);
|
|
2513
2805
|
});
|
|
2514
2806
|
}
|
|
2515
2807
|
}
|
|
2516
2808
|
if (config.isInteractive()) {
|
|
2517
|
-
const { setMaxSizedBoxDebugging } = await import("./MaxSizedBox-
|
|
2809
|
+
const { setMaxSizedBoxDebugging } = await import("./MaxSizedBox-5DT2SD7B.js");
|
|
2518
2810
|
setMaxSizedBoxDebugging(isDebugMode3);
|
|
2519
2811
|
}
|
|
2520
2812
|
const inputFormat = process.stdin.isTTY ? "text" /* TEXT */ : typeof config.getInputFormat === "function" ? config.getInputFormat() : "text" /* TEXT */;
|
|
2521
|
-
const { initializeApp } = await import("./initializer-
|
|
2813
|
+
const { initializeApp } = await import("./initializer-BRFJKRRX.js");
|
|
2522
2814
|
let input = config.getQuestion();
|
|
2523
2815
|
const hasRemoteInput = Boolean(config.getInputFile?.());
|
|
2524
2816
|
const deferIdeConnection = config.isInteractive() && !config.getExperimentalZedIntegration() && !input && !hasRemoteInput;
|
|
@@ -2527,7 +2819,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2527
2819
|
});
|
|
2528
2820
|
profileCheckpoint("after_initialize_app");
|
|
2529
2821
|
if (config.getExperimentalZedIntegration()) {
|
|
2530
|
-
const { runAcpAgent } = await import("./acpAgent-
|
|
2822
|
+
const { runAcpAgent } = await import("./acpAgent-GRFTTRHW.js");
|
|
2531
2823
|
await runAcpAgent(config, settings, argv);
|
|
2532
2824
|
await runExitCleanup();
|
|
2533
2825
|
process.exit(0);
|
|
@@ -2566,7 +2858,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2566
2858
|
setInteractiveMode(true);
|
|
2567
2859
|
await kittyProtocolDetectionComplete;
|
|
2568
2860
|
await themeAutoDetectionComplete;
|
|
2569
|
-
const { startInteractiveUI } = await import("./startInteractiveUI-
|
|
2861
|
+
const { startInteractiveUI } = await import("./startInteractiveUI-JII36UGN.js");
|
|
2570
2862
|
await startInteractiveUI(
|
|
2571
2863
|
config,
|
|
2572
2864
|
settings,
|
|
@@ -2574,7 +2866,8 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2574
2866
|
process.cwd(),
|
|
2575
2867
|
initializationResult,
|
|
2576
2868
|
{
|
|
2577
|
-
postRenderConnectIde: deferIdeConnection
|
|
2869
|
+
postRenderConnectIde: deferIdeConnection,
|
|
2870
|
+
extensionRefreshState
|
|
2578
2871
|
}
|
|
2579
2872
|
);
|
|
2580
2873
|
clearCorruptionEnvVars();
|
|
@@ -2622,7 +2915,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2622
2915
|
${input}`;
|
|
2623
2916
|
}
|
|
2624
2917
|
}
|
|
2625
|
-
const { validateNonInteractiveAuth } = await import("./validateNonInterActiveAuth-
|
|
2918
|
+
const { validateNonInteractiveAuth } = await import("./validateNonInterActiveAuth-MPKSRCXD.js");
|
|
2626
2919
|
const nonInteractiveConfig = await validateNonInteractiveAuth(
|
|
2627
2920
|
settings.merged.security?.auth?.useExternal,
|
|
2628
2921
|
config,
|
|
@@ -2631,7 +2924,7 @@ ${input}`;
|
|
|
2631
2924
|
const prompt_id = createNonInteractivePromptId(config.getSessionId());
|
|
2632
2925
|
if (inputFormat === "stream-json" /* STREAM_JSON */) {
|
|
2633
2926
|
const trimmedInput = (input ?? "").trim();
|
|
2634
|
-
const { runNonInteractiveStreamJson } = await import("./session-
|
|
2927
|
+
const { runNonInteractiveStreamJson } = await import("./session-5BNM25EZ.js");
|
|
2635
2928
|
await runNonInteractiveStreamJson(
|
|
2636
2929
|
nonInteractiveConfig,
|
|
2637
2930
|
trimmedInput.length > 0 ? trimmedInput : "",
|
|
@@ -2654,8 +2947,8 @@ ${input}`;
|
|
|
2654
2947
|
auth_type: config.getContentGeneratorConfig()?.authType,
|
|
2655
2948
|
prompt_length: input.length
|
|
2656
2949
|
});
|
|
2657
|
-
|
|
2658
|
-
const { runNonInteractive } = await import("./nonInteractiveCli-
|
|
2950
|
+
debugLogger6.debug(`Session ID: ${config.getSessionId()}`);
|
|
2951
|
+
const { runNonInteractive } = await import("./nonInteractiveCli-PTQI3DV6.js");
|
|
2659
2952
|
const exitCode = await runNonInteractive(
|
|
2660
2953
|
nonInteractiveConfig,
|
|
2661
2954
|
settings,
|
|
@@ -2672,28 +2965,31 @@ function createNonInteractivePromptId(sessionId) {
|
|
|
2672
2965
|
}
|
|
2673
2966
|
__name(createNonInteractivePromptId, "createNonInteractivePromptId");
|
|
2674
2967
|
function registerLspHotReload(config, registerCleanup2) {
|
|
2675
|
-
|
|
2968
|
+
const lspClient = config.getLspClient?.();
|
|
2969
|
+
const runtimeConfig = config;
|
|
2970
|
+
const reinitializeLsp = runtimeConfig.reinitializeLsp;
|
|
2971
|
+
if (config.isLspEnabled?.() !== true || !lspClient?.reinitialize || !reinitializeLsp) {
|
|
2676
2972
|
return;
|
|
2677
2973
|
}
|
|
2678
2974
|
const lspConfigWatcher = new LspConfigWatcher(config.getProjectRoot());
|
|
2679
|
-
|
|
2975
|
+
debugLogger6.info(
|
|
2680
2976
|
`Registering LSP config hot reload watcher for ${config.getProjectRoot()}`
|
|
2681
2977
|
);
|
|
2682
2978
|
lspConfigWatcher.startWatching(async (event) => {
|
|
2683
2979
|
if (event.changeType === "invalid") {
|
|
2684
|
-
|
|
2980
|
+
debugLogger6.warn(`Invalid LSP config file ${event.path}: ${event.error}`);
|
|
2685
2981
|
appEvents.emit("log-error" /* LogError */, event.error);
|
|
2686
2982
|
return;
|
|
2687
2983
|
}
|
|
2688
|
-
|
|
2984
|
+
debugLogger6.info(
|
|
2689
2985
|
`Reloading LSP server settings: changeType=${event.changeType}, path=${event.path}`
|
|
2690
2986
|
);
|
|
2691
2987
|
let errorReported = false;
|
|
2692
2988
|
try {
|
|
2693
|
-
const result = await
|
|
2989
|
+
const result = await reinitializeLsp();
|
|
2694
2990
|
if (result) {
|
|
2695
2991
|
const failedServers = getRuntimeReloadFailedNames(result.reconcile);
|
|
2696
|
-
|
|
2992
|
+
debugLogger6.info(
|
|
2697
2993
|
`Reloaded LSP server settings: added=${formatRuntimeReloadNames(
|
|
2698
2994
|
result.reconcile.added
|
|
2699
2995
|
)}, removed=${formatRuntimeReloadNames(
|
|
@@ -2725,13 +3021,13 @@ function registerLspHotReload(config, registerCleanup2) {
|
|
|
2725
3021
|
throw new Error(message);
|
|
2726
3022
|
}
|
|
2727
3023
|
} else {
|
|
2728
|
-
|
|
3024
|
+
debugLogger6.info(
|
|
2729
3025
|
"Skipped LSP server settings reload because LSP is disabled or no client is available"
|
|
2730
3026
|
);
|
|
2731
3027
|
}
|
|
2732
3028
|
appEvents.emit("lsp-status-changed" /* LspStatusChanged */);
|
|
2733
3029
|
} catch (error) {
|
|
2734
|
-
|
|
3030
|
+
debugLogger6.warn("Failed to reload LSP server settings:", error);
|
|
2735
3031
|
if (!errorReported) {
|
|
2736
3032
|
const message = error instanceof Error ? `Failed to reload LSP server settings: ${error.message}. Some LSP servers may have been partially updated. Run with --debug for details.` : "Failed to reload LSP server settings; some LSP servers may have been partially updated. Run with --debug for details.";
|
|
2737
3033
|
appEvents.emit("log-error" /* LogError */, message);
|