@qwen-code/qwen-code 0.19.6 → 0.19.7-nightly.20260708.394c1a289
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/configuration/model-providers.md +5 -1
- package/bundled/qc-helper/docs/configuration/settings.md +33 -1
- package/bundled/qc-helper/docs/features/channels/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +41 -31
- package/bundled/qc-helper/docs/features/channels/wecom.md +111 -0
- package/bundled/qc-helper/docs/features/code-review.md +16 -6
- package/bundled/qc-helper/docs/features/commands.md +1 -1
- package/bundled/qc-helper/docs/features/hooks.md +6 -0
- package/bundled/qc-helper/docs/features/skills.md +5 -3
- package/bundled/qc-helper/docs/integration-github-action.md +1 -1
- package/bundled/review/DESIGN.md +50 -18
- package/bundled/review/SKILL.md +102 -12
- package/chunks/{MaxSizedBox-SK7CUWZQ.js → MaxSizedBox-XS37LWTD.js} +31 -29
- package/chunks/{StandaloneSessionPicker-G44HGSAP.js → StandaloneSessionPicker-LPALJTKN.js} +44 -41
- package/chunks/{acpAgent-PKCTYWJV.js → acpAgent-4VE3FGJX.js} +769 -366
- package/chunks/{agent-IYMHUXWB.js → agent-CCHERW6L.js} +24 -24
- package/chunks/{agent-headless-L2DAW6I5.js → agent-headless-55N6UBUU.js} +24 -24
- package/chunks/{anthropicContentGenerator-H5ZOEENQ.js → anthropicContentGenerator-AKYPSZIV.js} +7 -7
- package/chunks/{artifact-tool-SLYPWG3C.js → artifact-tool-D233YJFH.js} +27 -8
- package/chunks/{askUserQuestion-OKPTECON.js → askUserQuestion-MKL5ZTMC.js} +2 -2
- package/chunks/{bridge-DF3IJQ5V.js → bridge-U6HXOHE7.js} +34 -32
- package/chunks/{channel-worker-supervisor-JUYQ5Z4R.js → channel-worker-supervisor-CRCVYQIE.js} +1 -1
- package/chunks/{chunk-AVQDCKNF.js → chunk-22MNNNXE.js} +4 -0
- package/chunks/chunk-2DYY5XUZ.js +8223 -0
- package/chunks/chunk-2FHWCKWA.js +262 -0
- package/chunks/{chunk-6BEOH4KK.js → chunk-2NPS2UDH.js} +767 -122
- package/chunks/{chunk-N2IJLN2L.js → chunk-2SWMCXVR.js} +13 -5
- package/chunks/{chunk-OBVBTAX5.js → chunk-2YELHTUE.js} +2 -2
- package/chunks/chunk-332PWN27.js +19 -0
- package/chunks/{chunk-CLQPBI4H.js → chunk-3B26UVCX.js} +132 -26
- package/chunks/{chunk-HCFSKO6K.js → chunk-3QDZDAJG.js} +1 -1
- package/chunks/{chunk-G7OQ3RFJ.js → chunk-42XGFRJS.js} +3 -3
- package/chunks/{chunk-SL2P3JUA.js → chunk-43W4YSO6.js} +1 -12
- package/chunks/{chunk-JA5KWZTJ.js → chunk-44NROQYV.js} +5 -3
- package/chunks/{chunk-BOAWGUY6.js → chunk-4AFOWB47.js} +121 -49
- package/chunks/{chunk-MOUXUCXQ.js → chunk-4KJ2BPIT.js} +1 -1
- package/chunks/{chunk-YTWX5TT2.js → chunk-5FL2K3ZB.js} +1 -1
- package/chunks/{chunk-UNXGEDX2.js → chunk-5OSSOBZC.js} +133 -25
- package/chunks/{chunk-JN2VJ33O.js → chunk-7I4MGFBN.js} +966 -121
- package/chunks/{chunk-T42ACHFI.js → chunk-7LTB54MK.js} +1 -1
- package/chunks/chunk-A2X3KLC3.js +3807 -0
- package/chunks/{chunk-EWALXUAD.js → chunk-AGHU5VRK.js} +8 -0
- package/chunks/{chunk-GLPV75ES.js → chunk-AHNJGLFV.js} +2 -2
- package/chunks/{chunk-IUSKVKH5.js → chunk-AXTPFMRS.js} +1 -1
- package/chunks/{chunk-T22H4V4R.js → chunk-B34OV7K2.js} +1 -1
- package/chunks/{chunk-FZ5NVRVK.js → chunk-B5FOCTEZ.js} +3 -3
- package/chunks/{chunk-3UC7ZC43.js → chunk-B6WUEODT.js} +7 -7
- package/chunks/{chunk-MJKEQSZI.js → chunk-BGL43SJ3.js} +1 -1
- package/chunks/{chunk-OAYOHSGP.js → chunk-BHRU4SDF.js} +4 -4
- package/chunks/{chunk-YPCPZSZB.js → chunk-CCGOFQV3.js} +56 -4
- package/chunks/{chunk-FDY3XOTM.js → chunk-CR5IU2RX.js} +4 -4
- package/chunks/{chunk-LWGLBVWA.js → chunk-CSOTA7KX.js} +1 -1
- package/chunks/{chunk-AGZF43UV.js → chunk-E7HM76PR.js} +7153 -4406
- package/chunks/{chunk-NIOPRZNN.js → chunk-E7KNELIZ.js} +1 -1
- package/chunks/{chunk-YSU33ACT.js → chunk-ELMPRVCB.js} +5 -13
- package/chunks/{chunk-SEZC2725.js → chunk-ER3BKOLB.js} +13 -0
- package/chunks/{chunk-3VJ7MT3N.js → chunk-EXPMGZZV.js} +14 -3
- package/chunks/{chunk-DBF3HTLT.js → chunk-FB2ULV4M.js} +4 -4
- package/chunks/{chunk-RZORUN6X.js → chunk-FEJ2FZ3U.js} +1 -1
- package/chunks/chunk-FK77ILF5.js +2477 -0
- package/chunks/{chunk-DMSNJDWG.js → chunk-FV7425LN.js} +38 -3
- package/chunks/{chunk-ALX6BUYW.js → chunk-G7ZG7CA6.js} +186 -27
- package/chunks/{chunk-2INJBYLJ.js → chunk-GIY6JTTC.js} +6 -6
- package/chunks/{chunk-D5KISTLW.js → chunk-H6EMK6QK.js} +1 -1
- package/chunks/{chunk-KYTQOCDE.js → chunk-HW4N45EE.js} +17 -46
- package/chunks/{chunk-VXGPYF7U.js → chunk-IFEWJXFS.js} +1 -1
- package/chunks/chunk-II73RK2S.js +158 -0
- package/chunks/{chunk-TENOUWY2.js → chunk-IJRL2S3D.js} +3 -3
- package/chunks/{chunk-GQBRGBLS.js → chunk-J43WPR6U.js} +9 -9
- package/chunks/{chunk-SRNPMG7J.js → chunk-JYOWO2F7.js} +16 -10
- package/chunks/{chunk-57NRQM3P.js → chunk-K34DD7FH.js} +2 -2
- package/chunks/{chunk-O2RJARYU.js → chunk-KKWO4IX2.js} +1409 -4088
- package/chunks/{chunk-SOT7OMGL.js → chunk-KT3SI3CQ.js} +2 -2
- package/chunks/{chunk-NUK2PFSU.js → chunk-L7IWK7JY.js} +1 -1
- package/chunks/{chunk-MHQKYQDS.js → chunk-LC4SMGYY.js} +158 -3
- package/chunks/chunk-LGFAYIKX.js +115 -0
- package/chunks/{chunk-MBWLP5OT.js → chunk-LKXDC3AW.js} +162 -40
- package/chunks/{chunk-7Z6UEJA4.js → chunk-ME344634.js} +5 -2
- package/chunks/{chunk-V6NH3CUC.js → chunk-MOQOAH7N.js} +3 -3
- package/chunks/{chunk-FPHA7WIZ.js → chunk-MYZWWRVW.js} +3 -3
- package/chunks/{chunk-YHTNWGRR.js → chunk-MZ7BABX3.js} +1 -1
- package/chunks/chunk-N74BA4VP.js +949 -0
- package/chunks/{chunk-B236XPGF.js → chunk-NQKLOAVJ.js} +29 -2
- package/chunks/{chunk-LXFCHX4X.js → chunk-OU6FPTJZ.js} +312 -25
- package/chunks/{chunk-HTWHAN44.js → chunk-PC4ZXHU2.js} +1 -1
- package/chunks/{chunk-3X76L4UF.js → chunk-PLGONYEL.js} +5 -5
- package/chunks/{chunk-WXUDZHOJ.js → chunk-PVXPDMGP.js} +10 -2
- package/chunks/{chunk-ZO5EA3XJ.js → chunk-QCSLZO6J.js} +1 -1
- package/chunks/{chunk-CEYA7K7C.js → chunk-QHT5USLK.js} +62 -12
- package/chunks/{chunk-NPQWQYU6.js → chunk-QYNNN7BK.js} +1 -1
- package/chunks/{chunk-N4YJQTRL.js → chunk-RFIL6REB.js} +71 -2
- package/chunks/{chunk-KSPVDFE4.js → chunk-SAIILPQ3.js} +0 -3
- package/chunks/{chunk-OIFSBXSP.js → chunk-SJHAUELE.js} +3 -3
- package/chunks/{chunk-BZHLWC6T.js → chunk-SUAKHHK7.js} +2 -2
- package/chunks/{chunk-QOKV6AO4.js → chunk-T2EJHSE3.js} +184 -147
- package/chunks/{chunk-ZI4MGBB5.js → chunk-TBAZMRW3.js} +1 -1
- package/chunks/{chunk-6QVRLKTZ.js → chunk-TBLJNMI7.js} +7 -7
- package/chunks/{chunk-J6ABRKAB.js → chunk-TDGF35EN.js} +2 -2
- package/chunks/chunk-TEYGKLIZ.js +167 -0
- package/chunks/{chunk-TOAUDIS7.js → chunk-TLWA7TPR.js} +6 -2
- package/chunks/chunk-UIDXQNMV.js +13 -0
- package/chunks/{chunk-MX7CTJHR.js → chunk-UZCT5OLN.js} +9 -9
- package/chunks/{chunk-LM3YCCZJ.js → chunk-VEB3NYSO.js} +1 -1
- package/chunks/{chunk-UTL7KABL.js → chunk-VQJ64BIQ.js} +7 -7
- package/chunks/{chunk-C2QKQZEQ.js → chunk-VTCPREC7.js} +3 -3
- package/chunks/{chunk-5ES5YPED.js → chunk-VZ7HY3YU.js} +1 -1
- package/chunks/{chunk-QOMAHFYI.js → chunk-W7EEOR7D.js} +3 -3
- package/chunks/{chunk-NVFJSIAX.js → chunk-WMPVYQ4P.js} +1 -1
- package/chunks/{chunk-V5VTULL5.js → chunk-X265R5C6.js} +3 -3
- package/chunks/{chunk-LKWAVAB5.js → chunk-X2XNQQJI.js} +2 -2
- package/chunks/{chunk-MJKMIQMK.js → chunk-X3YGAX7V.js} +1 -1
- package/chunks/{chunk-5WQF27GW.js → chunk-XQ2GVLNJ.js} +1 -1
- package/chunks/chunk-XUSONNJ4.js +28 -0
- package/chunks/{chunk-DXXNMPJH.js → chunk-YMWIKAEE.js} +460 -93
- package/chunks/{chunk-A34EPIUV.js → chunk-YYU6H66M.js} +18 -15
- package/chunks/{chunk-XH7H6YG4.js → chunk-ZK5EI6NR.js} +4 -107
- package/chunks/{computer-use-5S3NVXRA.js → computer-use-4CTF6WS3.js} +24 -24
- package/chunks/{contextCommand-DPBALZFK.js → contextCommand-Z3XWQCY6.js} +28 -27
- package/chunks/{cron-create-7JYUDTUY.js → cron-create-JSXEIPVS.js} +4 -4
- package/chunks/{cron-delete-YPULQQAK.js → cron-delete-OIFVEPGU.js} +4 -4
- package/chunks/{cron-list-HJIW5MHP.js → cron-list-D4ZX4IOE.js} +11 -7
- package/chunks/{daemon-7XYW4BC3.js → daemon-F3I2RXP6.js} +208 -63
- package/chunks/daemon-status-provider-6A4QCG6Q.js +74 -0
- package/chunks/dist-573HNSVO.js +3217 -0
- package/chunks/{dist-ABQ7VWRR.js → dist-FQ5WRJPL.js} +2 -2
- package/chunks/{dist-JPSVN367.js → dist-IMFFBMAT.js} +6 -3792
- package/chunks/{dist-BV56HW3W.js → dist-OT7G2WNM.js} +250 -1
- package/chunks/{dist-AW5ZYMUI.js → dist-PKFTNUHO.js} +10 -11
- package/chunks/{dist-AAO65DPC.js → dist-YTRKAVUB.js} +1 -1
- package/chunks/{earlyInputCapture-GGPV4IFT.js → earlyInputCapture-7O47HW62.js} +25 -25
- package/chunks/{edit-HJ7ISN4C.js → edit-E32KWLF2.js} +25 -25
- package/chunks/{en-XR3S5VWY.js → en-GA2RMXY5.js} +6 -1
- package/chunks/{enter-worktree-2BQT675D.js → enter-worktree-ZKFFMHUD.js} +24 -24
- package/chunks/{enterPlanMode-SJXHJ3WD.js → enterPlanMode-HLDC6NGX.js} +24 -24
- package/chunks/{errors-EVGER4AZ.js → errors-MTIDDXX7.js} +26 -26
- package/chunks/{exit-worktree-RPDDOSPM.js → exit-worktree-YHY72XA2.js} +24 -24
- package/chunks/{exitPlanMode-BQEROAJ7.js → exitPlanMode-JNXKBZ2C.js} +24 -24
- package/chunks/{fast-path-FX2ICJ2O.js → fast-path-DVAGBROV.js} +5 -2
- package/chunks/{fr-MBMNQSQ6.js → fr-GWNQG4XH.js} +4 -0
- package/chunks/{gemini-EHUXCOUI.js → gemini-2TMHJVRC.js} +444 -256
- package/chunks/{geminiContentGenerator-YDUUKAM2.js → geminiContentGenerator-WCH4GWD3.js} +4 -4
- package/chunks/{glob-3VIGV2DL.js → glob-I6Y4AGKO.js} +52 -28
- package/chunks/{grep-4D3S4NUC.js → grep-3P2J3LU5.js} +24 -24
- package/chunks/handleAutoUpdate-4IVRMRG4.js +65 -0
- package/chunks/{initializer-QZTZSSLW.js → initializer-DVNCPVTC.js} +31 -29
- package/chunks/{ja-HFV5QCHR.js → ja-2HOTA47X.js} +4 -0
- package/chunks/{keychain-token-storage-GPAKRDKQ.js → keychain-token-storage-UJV5XP4Z.js} +2 -2
- package/chunks/{list-WQ24EAMK.js → list-4D6QK2KZ.js} +30 -30
- package/chunks/{loadedSettingsAdapter-XV74KOSR.js → loadedSettingsAdapter-GNGELH6Q.js} +28 -28
- package/chunks/{loop-wakeup-34YK7T7O.js → loop-wakeup-OHWEMFP5.js} +5 -5
- package/chunks/{ls-MPD5OJUX.js → ls-L654WOAT.js} +4 -4
- package/chunks/{lsp-72PWTDW7.js → lsp-M35KE54Y.js} +2 -2
- package/chunks/{mcp-CO3MKM7N.js → mcp-2IL72YJP.js} +28 -28
- package/chunks/{monitor-GB56T65A.js → monitor-BLVCZAVX.js} +32 -27
- package/chunks/nonInteractiveCli-UD3V7UOO.js +116 -0
- package/chunks/{notebook-edit-VMXAAE3R.js → notebook-edit-5TVMWIWY.js} +25 -25
- package/chunks/{openaiContentGenerator-GM77FLII.js → openaiContentGenerator-5LJ5A7YY.js} +12 -12
- package/chunks/{pidfile-HFXSHR64.js → pidfile-AN5JQJ2T.js} +25 -25
- package/chunks/{qwenContentGenerator-QSCXQIKJ.js → qwenContentGenerator-E2JSB4FJ.js} +26 -26
- package/chunks/{qwenOAuth2-LWLA6MQG.js → qwenOAuth2-ZV7YLMND.js} +5 -5
- package/chunks/{read-file-SVH6CGQY.js → read-file-N5DEFUDU.js} +8 -8
- package/chunks/{read-mcp-resource-OWOBJY72.js → read-mcp-resource-CNQHBSJM.js} +2 -2
- package/chunks/{record-artifact-URK3YUDJ.js → record-artifact-PP3LKHTS.js} +2 -2
- package/chunks/{ripGrep-JD5O2FLX.js → ripGrep-BLJHTHKE.js} +24 -24
- package/chunks/{run-qwen-serve-FADLRJUN.js → run-qwen-serve-4JDO64RN.js} +785 -35
- package/chunks/{scheduler-Q65SB7DJ.js → scheduler-FQR4XA7J.js} +24 -24
- package/chunks/{send-message-L7OLQEKH.js → send-message-OA6MV4EU.js} +3 -3
- package/chunks/{serve-6ZXAMQ4M.js → serve-ZOCFC7YM.js} +29 -29
- package/chunks/{server-WKDQA6XR.js → server-GEOYEPYT.js} +2504 -439
- package/chunks/{session-STWOX7RA.js → session-NJCONHGX.js} +66 -61
- package/chunks/{settings-LC4CCWQQ.js → settings-QBGGXANI.js} +27 -27
- package/chunks/{shell-FEG3RLPW.js → shell-2DVPSEKT.js} +24 -24
- package/chunks/{skill-XTXAMDAP.js → skill-HIPXUHV7.js} +24 -12
- package/chunks/{spawnChannel-B6JJPBPV.js → spawnChannel-3JYXY52G.js} +27 -27
- package/chunks/{src-HITDGVRM.js → src-NLEX4CUC.js} +91 -36
- package/chunks/{startInteractiveUI-IT423PW4.js → startInteractiveUI-TYGZIU27.js} +6213 -14273
- package/chunks/{syntheticOutput-J3MLCQAR.js → syntheticOutput-F7LSDCAR.js} +3 -3
- package/chunks/{task-create-ELEBZ7H2.js → task-create-RPFZNB4B.js} +7 -7
- package/chunks/{task-list-IEUZLF3Y.js → task-list-TGGJX7EA.js} +5 -5
- package/chunks/{task-stop-QEZW3UDY.js → task-stop-W7NGTMYQ.js} +2 -2
- package/chunks/{task-update-DW36J5P5.js → task-update-5WUG5MVQ.js} +7 -7
- package/chunks/{team-create-DAG6SNHZ.js → team-create-MGX57SZJ.js} +24 -24
- package/chunks/{team-delete-SVITIMBO.js → team-delete-UHQQ2QQX.js} +5 -5
- package/chunks/{team-plan-approval-DRDY5OPC.js → team-plan-approval-BO2N7J3E.js} +24 -24
- package/chunks/{theme-manager-N67EZC6B.js → theme-manager-WU7LOA64.js} +25 -25
- package/chunks/{todoWrite-SFFQHZYY.js → todoWrite-C4ZAMSR3.js} +4 -4
- package/chunks/{tool-search-CMDJ5HGM.js → tool-search-CLBKVEVK.js} +11 -28
- package/chunks/{trustedFolders-JD4QX6UJ.js → trustedFolders-GAQM2GHB.js} +25 -25
- package/chunks/updateCheck-RIK2YIQE.js +65 -0
- package/chunks/{validateNonInterActiveAuth-ADDCGZ6A.js → validateNonInterActiveAuth-NS3GBIJZ.js} +61 -56
- package/chunks/{version-VAONYVE5.js → version-B3RSLP54.js} +2 -1
- package/chunks/{web-fetch-SXAXJHIO.js → web-fetch-UYGMOHW4.js} +5 -5
- package/chunks/{workflow-DG2BR42M.js → workflow-7APPIGND.js} +25 -25
- package/chunks/{workspace-providers-status-XGW5OZTD.js → workspace-providers-status-SC67GLMY.js} +30 -30
- package/chunks/{workspace-service-GX3GGZLU.js → workspace-service-ZJHF22WA.js} +35 -35
- package/chunks/{workspace-skills-status-LFK5WV2V.js → workspace-skills-status-NJEK6P6Y.js} +29 -29
- package/chunks/{write-file-UR7FXWOU.js → write-file-R6Z3VLRY.js} +25 -25
- package/chunks/{zh-FSVJTXA4.js → zh-7XVVRTDH.js} +6 -1
- package/chunks/{zh-TW-66MG4LWL.js → zh-TW-DPH554OG.js} +6 -1
- package/cli.js +19 -11
- package/locales/en.js +9 -2
- package/locales/fr.js +6 -0
- package/locales/ja.js +6 -0
- package/locales/zh-TW.js +9 -2
- package/locales/zh.js +9 -2
- 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-CUpe0ibu.js → arc-C7hjaa7g.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-JvyrY_mK.js → architectureDiagram-3BPJPVTR-pm9KtMZY.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-CK3Y_vom.js → blockDiagram-GPEHLZMM-CApElKsU.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DprSnyrf.js → c4Diagram-AAUBKEIU-BeDe0-9N.js} +1 -1
- package/web-shell/assets/channel-BNf1dW-j.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DJtRJPmu.js → chunk-2J33WTMH-DJEkmLdl.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-ON6Q2-BG.js → chunk-4BX2VUAB-DXX8gdpe.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-c60ou5HZ.js → chunk-55IACEB6-DORmk1kQ.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-BamtPKxx.js → chunk-727SXJPM-DWmO4mCZ.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-CsVgpu-T.js → chunk-AQP2D5EJ-C7LRaYw2.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-vZrpjAx4.js → chunk-FMBD7UC4-CCdXgyC5.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-qxyNOd5t.js → chunk-ND2GUHAM-SyL_xvWc.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-BvTJSM_S.js → chunk-QZHKN3VN-BzOuCKxa.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-uOIGlzgi.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-uOIGlzgi.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-1tXB4pju.js → cose-bilkent-S5V4N54A-BMPWyDKc.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DglBzme8.js → dagre-BM42HDAG-B_GnPWik.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-DEJpqsWz.js → diagram-2AECGRRQ-fJqMc3S_.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-CsQ1NrMG.js → diagram-5GNKFQAL-ximV3O9D.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-Z-3codAi.js → diagram-KO2AKTUF-2vVyjzqw.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-mBuPTA2i.js → diagram-LMA3HP47-Dckcx1sT.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-tcA3K3s9.js → diagram-OG6HWLK6-BAVv47ga.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-D9bXFRyZ.js → erDiagram-TEJ5UH35-Bn3nf5J0.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-Ck0Py04s.js → flowDiagram-I6XJVG4X-BIbGF9JT.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-rOevCekE.js → ganttDiagram-6RSMTGT7-CDbhb3AH.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CoPQaLj0.js → gitGraphDiagram-PVQCEYII-CbKG1a_w.js} +1 -1
- package/web-shell/assets/index-CnE2ur2L.js +779 -0
- package/web-shell/assets/index-hSKXrlSE.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-a77CUKoI.js → infoDiagram-5YYISTIA-DUFxTy8m.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DlLgUAO-.js → ishikawaDiagram-YF4QCWOH-D69hrBG8.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-BXR5kVAZ.js → journeyDiagram-JHISSGLW-DsvEw51Y.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-h5CoHZg7.js → kanban-definition-UN3LZRKU-lFFjZEYd.js} +1 -1
- package/web-shell/assets/{linear-BkaREbyD.js → linear-Bo5bWzvo.js} +1 -1
- package/web-shell/assets/{mermaid.core-Bkagz0ng.js → mermaid.core-C_HKMJx5.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-D7EMKR_5.js → mindmap-definition-RKZ34NQL-DlV-NUTs.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-DAmPOjsL.js → pieDiagram-4H26LBE5-B2e6FH2a.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-e4WFQkQu.js → quadrantDiagram-W4KKPZXB-D75kSk-b.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-v1zo7OiV.js → requirementDiagram-4Y6WPE33-CQ6xakhM.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Bstm4aW_.js → sankeyDiagram-5OEKKPKP-J_XTKrcY.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DzcZy6xN.js → sequenceDiagram-3UESZ5HK-D7jTcBtf.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-BEJH6YbH.js → stateDiagram-AJRCARHV-CrlM_OT3.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Bs4TK_84.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-TI1wH-Pm.js → timeline-definition-PNZ67QCA-5oZi76Ef.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-YaH8VDMS.js → vennDiagram-CIIHVFJN-DO5YptPK.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-B80co7OP.js → wardley-L42UT6IY-4t1eJDvM.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-4fHNDEMl.js → wardleyDiagram-YWT4CUSO-DKZc661S.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DT3q4Z3J.js → xychartDiagram-2RQKCTM6-su9hp08G.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-L7QPM2YD.js +0 -481
- package/chunks/daemon-status-provider-2EWTHT7Y.js +0 -73
- package/chunks/nonInteractiveCli-HNZRIM5I.js +0 -111
- package/web-shell/assets/channel-BAxQ2-aZ.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-Cvd_xhZI.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cvd_xhZI.js +0 -1
- package/web-shell/assets/index-Cr7MYW6T.css +0 -5
- package/web-shell/assets/index-DCHPAUp3.js +0 -730
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BopifCBI.js +0 -1
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
startEarlyStartupPrefetches
|
|
5
|
+
} from "./chunk-2FHWCKWA.js";
|
|
6
|
+
import {
|
|
7
|
+
RELAUNCH_EXIT_CODE
|
|
8
|
+
} from "./chunk-AXTPFMRS.js";
|
|
3
9
|
import {
|
|
4
10
|
appEvents,
|
|
5
11
|
buildDisabledSkillNamesProvider,
|
|
@@ -9,23 +15,19 @@ import {
|
|
|
9
15
|
loadSandboxConfig,
|
|
10
16
|
parseArguments,
|
|
11
17
|
validateAuthMethod
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import
|
|
14
|
-
RELAUNCH_EXIT_CODE
|
|
15
|
-
} from "./chunk-IUSKVKH5.js";
|
|
16
|
-
import "./chunk-3X76L4UF.js";
|
|
18
|
+
} from "./chunk-YMWIKAEE.js";
|
|
19
|
+
import "./chunk-PLGONYEL.js";
|
|
17
20
|
import "./chunk-3GONHQOA.js";
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-NIOPRZNN.js";
|
|
21
|
+
import "./chunk-SJHAUELE.js";
|
|
22
|
+
import "./chunk-TBAZMRW3.js";
|
|
23
|
+
import "./chunk-ZK5EI6NR.js";
|
|
24
|
+
import "./chunk-LGFAYIKX.js";
|
|
25
|
+
import "./chunk-54YZOP7P.js";
|
|
26
|
+
import "./chunk-KT3SI3CQ.js";
|
|
27
|
+
import "./chunk-E7KNELIZ.js";
|
|
26
28
|
import "./chunk-AHNXYU4O.js";
|
|
27
29
|
import "./chunk-RNBYOUGV.js";
|
|
28
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-2SWMCXVR.js";
|
|
29
31
|
import {
|
|
30
32
|
getHeadlessYoloSafetyWarning
|
|
31
33
|
} from "./chunk-BJBWRCSK.js";
|
|
@@ -33,11 +35,11 @@ import {
|
|
|
33
35
|
assembleMcpServers,
|
|
34
36
|
getPendingGatedMcpServers,
|
|
35
37
|
getPromptableMcpServers
|
|
36
|
-
} from "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-GIY6JTTC.js";
|
|
39
|
+
import "./chunk-2NPS2UDH.js";
|
|
38
40
|
import "./chunk-S6RLAIUR.js";
|
|
39
41
|
import "./chunk-MX2YXRER.js";
|
|
40
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-MZ7BABX3.js";
|
|
41
43
|
import {
|
|
42
44
|
SETTINGS_DIRECTORY_NAME,
|
|
43
45
|
createMinimalSettings,
|
|
@@ -47,22 +49,23 @@ import {
|
|
|
47
49
|
initializeLlmOutputLanguage,
|
|
48
50
|
loadSettings,
|
|
49
51
|
preResolveHomeEnvOverrides
|
|
50
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-QHT5USLK.js";
|
|
51
53
|
import {
|
|
52
54
|
initializeI18n,
|
|
53
55
|
resolveLanguageSetting
|
|
54
|
-
} from "./chunk-
|
|
56
|
+
} from "./chunk-TBLJNMI7.js";
|
|
55
57
|
import "./chunk-TLRYABYP.js";
|
|
56
58
|
import {
|
|
57
59
|
ENV_CORRUPTED_PATH,
|
|
58
60
|
ENV_WAS_RECOVERED
|
|
59
61
|
} from "./chunk-4RQIB5UZ.js";
|
|
60
|
-
import "./chunk-
|
|
61
|
-
import "./chunk-
|
|
62
|
+
import "./chunk-ER3BKOLB.js";
|
|
63
|
+
import "./chunk-G7ZG7CA6.js";
|
|
62
64
|
import "./chunk-VRDMOSQS.js";
|
|
63
65
|
import "./chunk-3RW4AZJV.js";
|
|
64
|
-
import "./chunk-
|
|
65
|
-
import "./chunk-
|
|
66
|
+
import "./chunk-XUSONNJ4.js";
|
|
67
|
+
import "./chunk-43W4YSO6.js";
|
|
68
|
+
import "./chunk-MOQOAH7N.js";
|
|
66
69
|
import {
|
|
67
70
|
writeStderrLine
|
|
68
71
|
} from "./chunk-Y6Z2O3WR.js";
|
|
@@ -72,7 +75,6 @@ import {
|
|
|
72
75
|
QWEN_CODE_SIMPLE_ENV_VAR,
|
|
73
76
|
SessionService,
|
|
74
77
|
canUseRipgrep,
|
|
75
|
-
getAllProviderBaseUrls,
|
|
76
78
|
isBareMode,
|
|
77
79
|
isSessionRuntimeActive,
|
|
78
80
|
persistSessionUsage,
|
|
@@ -85,60 +87,56 @@ import {
|
|
|
85
87
|
worktreeBranchForSlug,
|
|
86
88
|
writeWorktreeSession,
|
|
87
89
|
writeWorktreeSessionMarker
|
|
88
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-E7HM76PR.js";
|
|
89
91
|
import "./chunk-5P5XGNYH.js";
|
|
90
92
|
import "./chunk-SKAZWEV5.js";
|
|
91
93
|
import "./chunk-K5PGHDBN.js";
|
|
92
|
-
import "./chunk-
|
|
93
|
-
import "./chunk-
|
|
94
|
-
import "./chunk-
|
|
95
|
-
import "./chunk-
|
|
96
|
-
import "./chunk-
|
|
94
|
+
import "./chunk-3B26UVCX.js";
|
|
95
|
+
import "./chunk-W7EEOR7D.js";
|
|
96
|
+
import "./chunk-42XGFRJS.js";
|
|
97
|
+
import "./chunk-X2XNQQJI.js";
|
|
98
|
+
import "./chunk-VZ7HY3YU.js";
|
|
97
99
|
import "./chunk-2MPVVENX.js";
|
|
98
100
|
import "./chunk-ZTQ26VBE.js";
|
|
99
|
-
import "./chunk-
|
|
101
|
+
import "./chunk-FV7425LN.js";
|
|
100
102
|
import "./chunk-MLZQVCF3.js";
|
|
101
103
|
import "./chunk-LQ7TMOCE.js";
|
|
102
104
|
import "./chunk-E5A7LHNN.js";
|
|
103
|
-
import "./chunk-
|
|
105
|
+
import "./chunk-VEB3NYSO.js";
|
|
104
106
|
import "./chunk-GO6LNQXT.js";
|
|
105
|
-
import "./chunk-
|
|
106
|
-
import "./chunk-
|
|
107
|
-
import "./chunk-
|
|
108
|
-
import "./chunk-
|
|
107
|
+
import "./chunk-NQKLOAVJ.js";
|
|
108
|
+
import "./chunk-WMPVYQ4P.js";
|
|
109
|
+
import "./chunk-TLWA7TPR.js";
|
|
110
|
+
import "./chunk-QYNNN7BK.js";
|
|
109
111
|
import {
|
|
110
112
|
getMCPServerStatus,
|
|
111
113
|
logUserPrompt,
|
|
112
114
|
uiTelemetryService
|
|
113
|
-
} from "./chunk-
|
|
115
|
+
} from "./chunk-7I4MGFBN.js";
|
|
114
116
|
import "./chunk-E6US47KI.js";
|
|
115
117
|
import "./chunk-UWCTAVOD.js";
|
|
116
118
|
import "./chunk-OFEVLU4C.js";
|
|
117
119
|
import "./chunk-OMX7CUOE.js";
|
|
118
|
-
import "./chunk-
|
|
119
|
-
import "./chunk-
|
|
120
|
-
import "./chunk-
|
|
120
|
+
import "./chunk-4KJ2BPIT.js";
|
|
121
|
+
import "./chunk-SUAKHHK7.js";
|
|
122
|
+
import "./chunk-FEJ2FZ3U.js";
|
|
121
123
|
import {
|
|
122
124
|
require_fast_deep_equal
|
|
123
|
-
} from "./chunk-
|
|
124
|
-
import "./chunk-
|
|
125
|
-
import "./chunk-
|
|
125
|
+
} from "./chunk-X3YGAX7V.js";
|
|
126
|
+
import "./chunk-IJRL2S3D.js";
|
|
127
|
+
import "./chunk-AHNJGLFV.js";
|
|
126
128
|
import "./chunk-22IFUCVR.js";
|
|
127
|
-
import "./chunk-
|
|
129
|
+
import "./chunk-7LTB54MK.js";
|
|
128
130
|
import "./chunk-SIUQ3YYX.js";
|
|
129
|
-
import "./chunk-
|
|
130
|
-
import "./chunk-
|
|
131
|
+
import "./chunk-HW4N45EE.js";
|
|
132
|
+
import "./chunk-CCGOFQV3.js";
|
|
131
133
|
import "./chunk-IRJWHZWU.js";
|
|
132
134
|
import "./chunk-SYCJMSIJ.js";
|
|
133
135
|
import "./chunk-55ZMG67I.js";
|
|
134
136
|
import "./chunk-H6BD2ELD.js";
|
|
135
137
|
import "./chunk-5IFG2VC4.js";
|
|
136
138
|
import "./chunk-64WXLC72.js";
|
|
137
|
-
import
|
|
138
|
-
detectRuntime,
|
|
139
|
-
getOrCreateSharedDispatcher,
|
|
140
|
-
redactProxyCredentials
|
|
141
|
-
} from "./chunk-D5KISTLW.js";
|
|
139
|
+
import "./chunk-H6EMK6QK.js";
|
|
142
140
|
import {
|
|
143
141
|
FatalSandboxError,
|
|
144
142
|
Storage,
|
|
@@ -146,12 +144,12 @@ import {
|
|
|
146
144
|
getErrorMessage,
|
|
147
145
|
isDebugLoggingDegraded,
|
|
148
146
|
isSubpath
|
|
149
|
-
} from "./chunk-
|
|
147
|
+
} from "./chunk-22MNNNXE.js";
|
|
150
148
|
import {
|
|
151
149
|
cleanupCheckpoints,
|
|
152
150
|
registerCleanup,
|
|
153
151
|
runExitCleanup
|
|
154
|
-
} from "./chunk-
|
|
152
|
+
} from "./chunk-QCSLZO6J.js";
|
|
155
153
|
import {
|
|
156
154
|
finalizeStartupProfile,
|
|
157
155
|
isStartupProfilerEnabled,
|
|
@@ -176,7 +174,7 @@ import {
|
|
|
176
174
|
init_esbuild_shims();
|
|
177
175
|
import dns from "node:dns";
|
|
178
176
|
import os4 from "node:os";
|
|
179
|
-
import
|
|
177
|
+
import path7 from "node:path";
|
|
180
178
|
import v8 from "node:v8";
|
|
181
179
|
|
|
182
180
|
// packages/cli/src/config/settingsWatcher.ts
|
|
@@ -600,10 +598,240 @@ function registerMcpHotReload(watcher, settings, config, topTierMcpServers) {
|
|
|
600
598
|
}
|
|
601
599
|
__name(registerMcpHotReload, "registerMcpHotReload");
|
|
602
600
|
|
|
603
|
-
// packages/cli/src/
|
|
601
|
+
// packages/cli/src/config/lsp-config-watcher.ts
|
|
604
602
|
init_esbuild_shims();
|
|
603
|
+
import * as fs2 from "node:fs";
|
|
605
604
|
import * as path2 from "node:path";
|
|
606
|
-
var debugLogger3 = createDebugLogger("
|
|
605
|
+
var debugLogger3 = createDebugLogger("LSP_CONFIG_WATCHER");
|
|
606
|
+
var LspConfigWatcher = class _LspConfigWatcher {
|
|
607
|
+
constructor(workspaceRoot) {
|
|
608
|
+
this.workspaceRoot = workspaceRoot;
|
|
609
|
+
this.configPath = path2.join(workspaceRoot, ".lsp.json");
|
|
610
|
+
this.lastSnapshot = this.readSnapshot();
|
|
611
|
+
}
|
|
612
|
+
static {
|
|
613
|
+
__name(this, "LspConfigWatcher");
|
|
614
|
+
}
|
|
615
|
+
watcher;
|
|
616
|
+
listener;
|
|
617
|
+
refreshTimer = null;
|
|
618
|
+
activeDrain;
|
|
619
|
+
processing = false;
|
|
620
|
+
pending = false;
|
|
621
|
+
started = false;
|
|
622
|
+
lastSnapshot;
|
|
623
|
+
configPath;
|
|
624
|
+
static DEBOUNCE_MS = 300;
|
|
625
|
+
static LISTENER_TIMEOUT_MS = 3e4;
|
|
626
|
+
startWatching(listener) {
|
|
627
|
+
if (this.started) return;
|
|
628
|
+
debugLogger3.info(`Starting LSP config watcher for ${this.configPath}`);
|
|
629
|
+
try {
|
|
630
|
+
const watcher = watch(this.workspaceRoot, {
|
|
631
|
+
ignoreInitial: true,
|
|
632
|
+
depth: 0
|
|
633
|
+
}).on("all", (_event, changedPath) => {
|
|
634
|
+
if (path2.basename(changedPath) !== ".lsp.json") return;
|
|
635
|
+
this.scheduleRefresh();
|
|
636
|
+
}).on("error", (error) => {
|
|
637
|
+
debugLogger3.warn(
|
|
638
|
+
`LSP config watcher error for ${this.workspaceRoot}:`,
|
|
639
|
+
error
|
|
640
|
+
);
|
|
641
|
+
});
|
|
642
|
+
this.watcher = watcher;
|
|
643
|
+
this.listener = listener;
|
|
644
|
+
this.started = true;
|
|
645
|
+
} catch (error) {
|
|
646
|
+
this.watcher = void 0;
|
|
647
|
+
this.listener = void 0;
|
|
648
|
+
this.started = false;
|
|
649
|
+
debugLogger3.warn(
|
|
650
|
+
`Failed to start LSP config watcher for ${this.workspaceRoot}:`,
|
|
651
|
+
error
|
|
652
|
+
);
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
async stopWatching() {
|
|
656
|
+
if (!this.started) return;
|
|
657
|
+
this.started = false;
|
|
658
|
+
debugLogger3.info(`Stopping LSP config watcher for ${this.configPath}`);
|
|
659
|
+
if (this.refreshTimer) {
|
|
660
|
+
clearTimeout(this.refreshTimer);
|
|
661
|
+
this.refreshTimer = null;
|
|
662
|
+
}
|
|
663
|
+
this.pending = false;
|
|
664
|
+
await this.activeDrain;
|
|
665
|
+
this.listener = void 0;
|
|
666
|
+
try {
|
|
667
|
+
await this.watcher?.close();
|
|
668
|
+
} catch (error) {
|
|
669
|
+
debugLogger3.warn("LSP config watcher close error:", error);
|
|
670
|
+
}
|
|
671
|
+
this.watcher = void 0;
|
|
672
|
+
}
|
|
673
|
+
scheduleRefresh() {
|
|
674
|
+
if (!this.started) return;
|
|
675
|
+
this.pending = true;
|
|
676
|
+
if (this.refreshTimer) clearTimeout(this.refreshTimer);
|
|
677
|
+
this.refreshTimer = setTimeout(() => {
|
|
678
|
+
this.refreshTimer = null;
|
|
679
|
+
if (this.processing) return;
|
|
680
|
+
const activeDrain = this.drainPendingChange().catch((error) => {
|
|
681
|
+
debugLogger3.warn("LSP config watcher refresh error:", error);
|
|
682
|
+
});
|
|
683
|
+
this.activeDrain = activeDrain;
|
|
684
|
+
void activeDrain.finally(() => {
|
|
685
|
+
if (this.activeDrain === activeDrain) {
|
|
686
|
+
this.activeDrain = void 0;
|
|
687
|
+
}
|
|
688
|
+
});
|
|
689
|
+
}, _LspConfigWatcher.DEBOUNCE_MS);
|
|
690
|
+
if (typeof this.refreshTimer === "object" && this.refreshTimer !== null && "unref" in this.refreshTimer) {
|
|
691
|
+
this.refreshTimer.unref();
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
/** Drains debounced changes one at a time while preserving a trailing update. */
|
|
695
|
+
async drainPendingChange() {
|
|
696
|
+
if (this.processing) return;
|
|
697
|
+
this.processing = true;
|
|
698
|
+
try {
|
|
699
|
+
while (this.pending) {
|
|
700
|
+
this.pending = false;
|
|
701
|
+
await this.handleChange();
|
|
702
|
+
}
|
|
703
|
+
} finally {
|
|
704
|
+
this.processing = false;
|
|
705
|
+
}
|
|
706
|
+
}
|
|
707
|
+
/**
|
|
708
|
+
* Compares the previous and current semantic snapshots.
|
|
709
|
+
*
|
|
710
|
+
* Invalid JSON emits an `invalid` event for user feedback but does not report
|
|
711
|
+
* a runtime config change; the caller must keep the existing LSP state.
|
|
712
|
+
*/
|
|
713
|
+
async handleChange() {
|
|
714
|
+
const before = this.lastSnapshot;
|
|
715
|
+
const after = this.readSnapshot();
|
|
716
|
+
if (after.exists && after.canonical === void 0) {
|
|
717
|
+
debugLogger3.warn(
|
|
718
|
+
`Invalid .lsp.json; keeping existing LSP runtime state.`
|
|
719
|
+
);
|
|
720
|
+
const notified2 = await this.notifyListener({
|
|
721
|
+
path: this.configPath,
|
|
722
|
+
changeType: "invalid",
|
|
723
|
+
error: after.error ?? "Invalid JSON in .lsp.json; existing LSP runtime state is unchanged."
|
|
724
|
+
});
|
|
725
|
+
if (notified2) {
|
|
726
|
+
this.lastSnapshot = after;
|
|
727
|
+
}
|
|
728
|
+
return;
|
|
729
|
+
}
|
|
730
|
+
const changed = before.exists !== after.exists || before.canonical !== after.canonical;
|
|
731
|
+
if (!changed) {
|
|
732
|
+
this.lastSnapshot = after;
|
|
733
|
+
return;
|
|
734
|
+
}
|
|
735
|
+
const event = {
|
|
736
|
+
path: this.configPath,
|
|
737
|
+
changeType: !before.exists && after.exists ? "created" : before.exists && !after.exists ? "deleted" : "modified"
|
|
738
|
+
};
|
|
739
|
+
debugLogger3.info(`LSP config changed: ${event.changeType} ${event.path}`);
|
|
740
|
+
const notified = await this.notifyListener(event);
|
|
741
|
+
if (notified) {
|
|
742
|
+
this.lastSnapshot = after;
|
|
743
|
+
}
|
|
744
|
+
}
|
|
745
|
+
/**
|
|
746
|
+
* Reads `.lsp.json` as a single operation. ENOENT is treated as deletion so a
|
|
747
|
+
* file removed during a filesystem race still reconciles servers to empty.
|
|
748
|
+
*/
|
|
749
|
+
readSnapshot() {
|
|
750
|
+
let raw;
|
|
751
|
+
try {
|
|
752
|
+
raw = fs2.readFileSync(this.configPath, "utf-8");
|
|
753
|
+
} catch (error) {
|
|
754
|
+
if (error.code === "ENOENT") {
|
|
755
|
+
return { exists: false };
|
|
756
|
+
}
|
|
757
|
+
debugLogger3.warn("Failed to read .lsp.json:", error);
|
|
758
|
+
return {
|
|
759
|
+
exists: true,
|
|
760
|
+
error: "Failed to read .lsp.json; existing LSP runtime state is unchanged."
|
|
761
|
+
};
|
|
762
|
+
}
|
|
763
|
+
try {
|
|
764
|
+
const parsed = JSON.parse(raw);
|
|
765
|
+
return { exists: true, canonical: canonicalize(parsed) };
|
|
766
|
+
} catch (error) {
|
|
767
|
+
debugLogger3.warn("Failed to parse .lsp.json:", error);
|
|
768
|
+
return {
|
|
769
|
+
exists: true,
|
|
770
|
+
error: "Invalid JSON in .lsp.json; existing LSP runtime state is unchanged."
|
|
771
|
+
};
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
/**
|
|
775
|
+
* Runs the listener with timeout isolation so a hung reload cannot stall CLI.
|
|
776
|
+
*
|
|
777
|
+
* Returns whether the listener completed successfully; callers use this to
|
|
778
|
+
* decide whether the semantic snapshot can advance or should be retried.
|
|
779
|
+
*/
|
|
780
|
+
async notifyListener(event) {
|
|
781
|
+
if (!this.listener) return true;
|
|
782
|
+
const TIMEOUT_MS = _LspConfigWatcher.LISTENER_TIMEOUT_MS;
|
|
783
|
+
let timerId;
|
|
784
|
+
const timeoutPromise = new Promise((_, reject) => {
|
|
785
|
+
timerId = setTimeout(
|
|
786
|
+
() => reject(
|
|
787
|
+
new Error(
|
|
788
|
+
`LSP config change listener timeout after ${TIMEOUT_MS}ms`
|
|
789
|
+
)
|
|
790
|
+
),
|
|
791
|
+
TIMEOUT_MS
|
|
792
|
+
);
|
|
793
|
+
if (typeof timerId === "object" && timerId !== null && "unref" in timerId) {
|
|
794
|
+
timerId.unref();
|
|
795
|
+
}
|
|
796
|
+
});
|
|
797
|
+
const listenerPromise = Promise.resolve().then(
|
|
798
|
+
() => this.listener?.(event)
|
|
799
|
+
);
|
|
800
|
+
try {
|
|
801
|
+
await Promise.race([listenerPromise, timeoutPromise]);
|
|
802
|
+
return true;
|
|
803
|
+
} catch (error) {
|
|
804
|
+
debugLogger3.warn("LSP config change listener error:", error);
|
|
805
|
+
return false;
|
|
806
|
+
} finally {
|
|
807
|
+
if (timerId !== void 0) clearTimeout(timerId);
|
|
808
|
+
void listenerPromise.catch(() => void 0);
|
|
809
|
+
}
|
|
810
|
+
}
|
|
811
|
+
};
|
|
812
|
+
function canonicalize(value) {
|
|
813
|
+
return JSON.stringify(sortJsonValue(value));
|
|
814
|
+
}
|
|
815
|
+
__name(canonicalize, "canonicalize");
|
|
816
|
+
function sortJsonValue(value) {
|
|
817
|
+
if (Array.isArray(value)) {
|
|
818
|
+
return value.map(sortJsonValue);
|
|
819
|
+
}
|
|
820
|
+
if (value && typeof value === "object") {
|
|
821
|
+
const sorted = /* @__PURE__ */ Object.create(null);
|
|
822
|
+
for (const key of Object.keys(value).sort()) {
|
|
823
|
+
sorted[key] = sortJsonValue(value[key]);
|
|
824
|
+
}
|
|
825
|
+
return sorted;
|
|
826
|
+
}
|
|
827
|
+
return value;
|
|
828
|
+
}
|
|
829
|
+
__name(sortJsonValue, "sortJsonValue");
|
|
830
|
+
|
|
831
|
+
// packages/cli/src/startup/worktreeStartup.ts
|
|
832
|
+
init_esbuild_shims();
|
|
833
|
+
import * as path3 from "node:path";
|
|
834
|
+
var debugLogger4 = createDebugLogger("WORKTREE_STARTUP");
|
|
607
835
|
var DETACHED_HEAD = "HEAD";
|
|
608
836
|
async function setupStartupWorktree(rawInput, options) {
|
|
609
837
|
if (rawInput === void 0) return null;
|
|
@@ -630,7 +858,7 @@ async function setupStartupWorktree(rawInput, options) {
|
|
|
630
858
|
error: `--worktree: ${launchCwd} is not a git repository. Run \`git init\` first or relaunch from inside one.`
|
|
631
859
|
};
|
|
632
860
|
}
|
|
633
|
-
const repoRoot =
|
|
861
|
+
const repoRoot = path3.resolve(rawRepoRoot);
|
|
634
862
|
const service = repoRoot === launchCwd ? probe : new GitWorktreeService(repoRoot);
|
|
635
863
|
const prNumber = GitWorktreeService.parsePRReference(trimmed);
|
|
636
864
|
const isPullRequest = prNumber !== null;
|
|
@@ -666,7 +894,7 @@ async function setupStartupWorktree(rawInput, options) {
|
|
|
666
894
|
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}\`).`
|
|
667
895
|
};
|
|
668
896
|
}
|
|
669
|
-
const worktreePath2 =
|
|
897
|
+
const worktreePath2 = path3.resolve(expectedWorktreePath);
|
|
670
898
|
try {
|
|
671
899
|
process.chdir(worktreePath2);
|
|
672
900
|
} catch (error) {
|
|
@@ -675,7 +903,7 @@ async function setupStartupWorktree(rawInput, options) {
|
|
|
675
903
|
error: `--worktree: failed to chdir into ${worktreePath2} (${error instanceof Error ? error.message : String(error)}).`
|
|
676
904
|
};
|
|
677
905
|
}
|
|
678
|
-
|
|
906
|
+
debugLogger4.debug(
|
|
679
907
|
`setupStartupWorktree: re-attached to existing worktree at ${worktreePath2} (branch=${registered.branch})`
|
|
680
908
|
);
|
|
681
909
|
return {
|
|
@@ -716,7 +944,7 @@ async function setupStartupWorktree(rawInput, options) {
|
|
|
716
944
|
error: `--worktree: ${result.error ?? "failed to create worktree."}`
|
|
717
945
|
};
|
|
718
946
|
}
|
|
719
|
-
const worktreePath =
|
|
947
|
+
const worktreePath = path3.resolve(result.worktree.path);
|
|
720
948
|
try {
|
|
721
949
|
process.chdir(worktreePath);
|
|
722
950
|
} catch (error) {
|
|
@@ -753,7 +981,7 @@ async function persistStartupWorktreeSidecar(config, context) {
|
|
|
753
981
|
try {
|
|
754
982
|
previous = await readWorktreeSession(sidecarPath);
|
|
755
983
|
} catch (error) {
|
|
756
|
-
|
|
984
|
+
debugLogger4.warn(
|
|
757
985
|
`persistStartupWorktreeSidecar: failed to read existing sidecar at ${sidecarPath} \u2014 treating as "no previous worktree" and proceeding: ${error}`
|
|
758
986
|
);
|
|
759
987
|
previous = null;
|
|
@@ -772,7 +1000,7 @@ async function persistStartupWorktreeSidecar(config, context) {
|
|
|
772
1000
|
context.repoRoot,
|
|
773
1001
|
context.worktreePath
|
|
774
1002
|
]).catch((error) => {
|
|
775
|
-
|
|
1003
|
+
debugLogger4.warn(
|
|
776
1004
|
`persistStartupWorktreeSidecar: failed to check owner runtime ${owner}: ${error}`
|
|
777
1005
|
);
|
|
778
1006
|
return true;
|
|
@@ -952,8 +1180,8 @@ init_esbuild_shims();
|
|
|
952
1180
|
var import_shell_quote = __toESM(require_shell_quote(), 1);
|
|
953
1181
|
import { exec, execSync, spawn as spawn2 } from "node:child_process";
|
|
954
1182
|
import os2 from "node:os";
|
|
955
|
-
import
|
|
956
|
-
import
|
|
1183
|
+
import path5 from "node:path";
|
|
1184
|
+
import fs3 from "node:fs";
|
|
957
1185
|
import { promisify } from "node:util";
|
|
958
1186
|
import { randomBytes } from "node:crypto";
|
|
959
1187
|
|
|
@@ -973,10 +1201,10 @@ __name(parseSandboxImageName, "parseSandboxImageName");
|
|
|
973
1201
|
|
|
974
1202
|
// packages/cli/src/utils/sandbox-path.ts
|
|
975
1203
|
init_esbuild_shims();
|
|
976
|
-
import
|
|
1204
|
+
import path4 from "node:path";
|
|
977
1205
|
function isContainerPathWithinWorkdir(containerWorkdir, containerPath) {
|
|
978
1206
|
const normalize = /* @__PURE__ */ __name((value) => {
|
|
979
|
-
const normalized =
|
|
1207
|
+
const normalized = path4.posix.normalize(value.replace(/\\/g, "/")).replace(/\/+$/, "").toLowerCase();
|
|
980
1208
|
return normalized || "/";
|
|
981
1209
|
}, "normalize");
|
|
982
1210
|
const normalizedWorkdir = normalize(containerWorkdir);
|
|
@@ -1020,10 +1248,10 @@ function getContainerPath(hostPath) {
|
|
|
1020
1248
|
}
|
|
1021
1249
|
__name(getContainerPath, "getContainerPath");
|
|
1022
1250
|
function ensureDirectoryAndGetRealPath(dir) {
|
|
1023
|
-
if (!
|
|
1024
|
-
|
|
1251
|
+
if (!fs3.existsSync(dir)) {
|
|
1252
|
+
fs3.mkdirSync(dir, { recursive: true });
|
|
1025
1253
|
}
|
|
1026
|
-
return
|
|
1254
|
+
return fs3.realpathSync(dir);
|
|
1027
1255
|
}
|
|
1028
1256
|
__name(ensureDirectoryAndGetRealPath, "ensureDirectoryAndGetRealPath");
|
|
1029
1257
|
var LOCAL_DEV_SANDBOX_IMAGE_NAME = "qwen-code-sandbox";
|
|
@@ -1039,9 +1267,9 @@ var BUILTIN_SEATBELT_PROFILES = [
|
|
|
1039
1267
|
];
|
|
1040
1268
|
function resolveSeatbeltProfileFile(profile, importMetaUrl = import.meta.url) {
|
|
1041
1269
|
if (!BUILTIN_SEATBELT_PROFILES.includes(profile)) {
|
|
1042
|
-
return
|
|
1270
|
+
return path5.join(SETTINGS_DIRECTORY_NAME, `sandbox-macos-${profile}.sb`);
|
|
1043
1271
|
}
|
|
1044
|
-
return
|
|
1272
|
+
return path5.join(
|
|
1045
1273
|
resolveBundleDir(importMetaUrl),
|
|
1046
1274
|
`sandbox-macos-${profile}.sb`
|
|
1047
1275
|
);
|
|
@@ -1104,11 +1332,11 @@ function entrypoint(workdir, cliArgs) {
|
|
|
1104
1332
|
if (pythonPathSuffix) {
|
|
1105
1333
|
shellCmds.push(`export PYTHONPATH="$PYTHONPATH${pythonPathSuffix}";`);
|
|
1106
1334
|
}
|
|
1107
|
-
const projectSandboxBashrc =
|
|
1335
|
+
const projectSandboxBashrc = path5.join(
|
|
1108
1336
|
SETTINGS_DIRECTORY_NAME,
|
|
1109
1337
|
"sandbox.bashrc"
|
|
1110
1338
|
);
|
|
1111
|
-
if (
|
|
1339
|
+
if (fs3.existsSync(projectSandboxBashrc)) {
|
|
1112
1340
|
shellCmds.push(`source ${getContainerPath(projectSandboxBashrc)};`);
|
|
1113
1341
|
}
|
|
1114
1342
|
ports().forEach(
|
|
@@ -1131,7 +1359,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1131
1359
|
}
|
|
1132
1360
|
const profile = process.env["SEATBELT_PROFILE"] ??= "permissive-open";
|
|
1133
1361
|
const profileFile = resolveSeatbeltProfileFile(profile);
|
|
1134
|
-
if (!
|
|
1362
|
+
if (!fs3.existsSync(profileFile)) {
|
|
1135
1363
|
throw new FatalSandboxError(
|
|
1136
1364
|
`Missing macos seatbelt profile file '${profileFile}'`
|
|
1137
1365
|
);
|
|
@@ -1143,30 +1371,30 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1143
1371
|
].join(" ");
|
|
1144
1372
|
const qwenDir = Storage.getGlobalQwenDir();
|
|
1145
1373
|
const runtimeDir = Storage.getRuntimeBaseDir();
|
|
1146
|
-
|
|
1147
|
-
|
|
1374
|
+
fs3.mkdirSync(qwenDir, { recursive: true });
|
|
1375
|
+
fs3.mkdirSync(runtimeDir, { recursive: true });
|
|
1148
1376
|
const args2 = [
|
|
1149
1377
|
"-D",
|
|
1150
|
-
`TARGET_DIR=${
|
|
1378
|
+
`TARGET_DIR=${fs3.realpathSync(process.cwd())}`,
|
|
1151
1379
|
"-D",
|
|
1152
|
-
`TMP_DIR=${
|
|
1380
|
+
`TMP_DIR=${fs3.realpathSync(os2.tmpdir())}`,
|
|
1153
1381
|
"-D",
|
|
1154
|
-
`HOME_DIR=${
|
|
1382
|
+
`HOME_DIR=${fs3.realpathSync(os2.homedir())}`,
|
|
1155
1383
|
"-D",
|
|
1156
|
-
`CACHE_DIR=${
|
|
1384
|
+
`CACHE_DIR=${fs3.realpathSync(execSync(`getconf DARWIN_USER_CACHE_DIR`).toString().trim())}`,
|
|
1157
1385
|
"-D",
|
|
1158
|
-
`QWEN_DIR=${
|
|
1386
|
+
`QWEN_DIR=${fs3.realpathSync(qwenDir)}`,
|
|
1159
1387
|
"-D",
|
|
1160
|
-
`RUNTIME_DIR=${
|
|
1388
|
+
`RUNTIME_DIR=${fs3.realpathSync(runtimeDir)}`
|
|
1161
1389
|
];
|
|
1162
1390
|
const MAX_INCLUDE_DIRS = 5;
|
|
1163
|
-
const targetDir =
|
|
1391
|
+
const targetDir = fs3.realpathSync(cliConfig?.getTargetDir() || "");
|
|
1164
1392
|
const includedDirs = [];
|
|
1165
1393
|
if (cliConfig) {
|
|
1166
1394
|
const workspaceContext = cliConfig.getWorkspaceContext();
|
|
1167
1395
|
const directories = workspaceContext.getDirectories();
|
|
1168
1396
|
for (const dir of directories) {
|
|
1169
|
-
const realDir =
|
|
1397
|
+
const realDir = fs3.realpathSync(dir);
|
|
1170
1398
|
if (realDir !== targetDir) {
|
|
1171
1399
|
includedDirs.push(realDir);
|
|
1172
1400
|
}
|
|
@@ -1248,14 +1476,14 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1248
1476
|
});
|
|
1249
1477
|
}
|
|
1250
1478
|
writeStderrLine(`hopping into sandbox (command: ${config.command}) ...`);
|
|
1251
|
-
const gcPath =
|
|
1252
|
-
const projectSandboxDockerfile =
|
|
1479
|
+
const gcPath = fs3.realpathSync(process.argv[1]);
|
|
1480
|
+
const projectSandboxDockerfile = path5.join(
|
|
1253
1481
|
SETTINGS_DIRECTORY_NAME,
|
|
1254
1482
|
"sandbox.Dockerfile"
|
|
1255
1483
|
);
|
|
1256
|
-
const isCustomProjectSandbox =
|
|
1484
|
+
const isCustomProjectSandbox = fs3.existsSync(projectSandboxDockerfile);
|
|
1257
1485
|
const image = config.image;
|
|
1258
|
-
const workdir =
|
|
1486
|
+
const workdir = path5.resolve(process.cwd());
|
|
1259
1487
|
const containerWorkdir = getContainerPath(workdir);
|
|
1260
1488
|
if (process.env["BUILD_SANDBOX"]) {
|
|
1261
1489
|
if (!gcPath.includes("qwen-code/packages/")) {
|
|
@@ -1266,13 +1494,13 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1266
1494
|
writeStderrLine("building sandbox ...");
|
|
1267
1495
|
const gcRoot = gcPath.split("/packages/")[0];
|
|
1268
1496
|
let buildArgs = "";
|
|
1269
|
-
const projectSandboxDockerfile2 =
|
|
1497
|
+
const projectSandboxDockerfile2 = path5.join(
|
|
1270
1498
|
SETTINGS_DIRECTORY_NAME,
|
|
1271
1499
|
"sandbox.Dockerfile"
|
|
1272
1500
|
);
|
|
1273
1501
|
if (isCustomProjectSandbox) {
|
|
1274
1502
|
writeStderrLine(`using ${projectSandboxDockerfile2} for sandbox`);
|
|
1275
|
-
buildArgs += `-f ${
|
|
1503
|
+
buildArgs += `-f ${path5.resolve(projectSandboxDockerfile2)} -i ${image}`;
|
|
1276
1504
|
}
|
|
1277
1505
|
execSync(
|
|
1278
1506
|
`cd ${gcRoot} && node scripts/build_sandbox.js -s ${buildArgs}`,
|
|
@@ -1348,8 +1576,8 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1348
1576
|
args.push("--env", `QWEN_RUNTIME_DIR=${runtimeBaseDirContainerPath}`);
|
|
1349
1577
|
}
|
|
1350
1578
|
args.push("--volume", `${os2.tmpdir()}:${getContainerPath(os2.tmpdir())}`);
|
|
1351
|
-
const gcloudConfigDir =
|
|
1352
|
-
if (
|
|
1579
|
+
const gcloudConfigDir = path5.join(os2.homedir(), ".config", "gcloud");
|
|
1580
|
+
if (fs3.existsSync(gcloudConfigDir)) {
|
|
1353
1581
|
args.push(
|
|
1354
1582
|
"--volume",
|
|
1355
1583
|
`${gcloudConfigDir}:${getContainerPath(gcloudConfigDir)}:ro`
|
|
@@ -1357,7 +1585,7 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1357
1585
|
}
|
|
1358
1586
|
if (process.env["GOOGLE_APPLICATION_CREDENTIALS"]) {
|
|
1359
1587
|
const adcFile = process.env["GOOGLE_APPLICATION_CREDENTIALS"];
|
|
1360
|
-
if (
|
|
1588
|
+
if (fs3.existsSync(adcFile)) {
|
|
1361
1589
|
args.push("--volume", `${adcFile}:${getContainerPath(adcFile)}:ro`);
|
|
1362
1590
|
args.push(
|
|
1363
1591
|
"--env",
|
|
@@ -1370,12 +1598,12 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1370
1598
|
if (mount.trim()) {
|
|
1371
1599
|
const { from, to, opts } = parseSandboxMountSpec(mount);
|
|
1372
1600
|
mount = `${from}:${to}:${opts}`;
|
|
1373
|
-
if (!
|
|
1601
|
+
if (!path5.isAbsolute(from)) {
|
|
1374
1602
|
throw new FatalSandboxError(
|
|
1375
1603
|
`Path '${from}' listed in SANDBOX_MOUNTS must be absolute`
|
|
1376
1604
|
);
|
|
1377
1605
|
}
|
|
1378
|
-
if (!
|
|
1606
|
+
if (!fs3.existsSync(from)) {
|
|
1379
1607
|
throw new FatalSandboxError(
|
|
1380
1608
|
`Missing mount path '${from}' listed in SANDBOX_MOUNTS`
|
|
1381
1609
|
);
|
|
@@ -1521,12 +1749,12 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1521
1749
|
getContainerPath(workdir),
|
|
1522
1750
|
getContainerPath(virtualEnv)
|
|
1523
1751
|
)) {
|
|
1524
|
-
const sandboxVenvPath =
|
|
1752
|
+
const sandboxVenvPath = path5.resolve(
|
|
1525
1753
|
SETTINGS_DIRECTORY_NAME,
|
|
1526
1754
|
"sandbox.venv"
|
|
1527
1755
|
);
|
|
1528
|
-
if (!
|
|
1529
|
-
|
|
1756
|
+
if (!fs3.existsSync(sandboxVenvPath)) {
|
|
1757
|
+
fs3.mkdirSync(sandboxVenvPath, { recursive: true });
|
|
1530
1758
|
}
|
|
1531
1759
|
args.push("--volume", `${sandboxVenvPath}:${getContainerPath(virtualEnv)}`);
|
|
1532
1760
|
args.push("--env", `VIRTUAL_ENV=${getContainerPath(virtualEnv)}`);
|
|
@@ -1555,8 +1783,8 @@ async function start_sandbox(config, nodeArgs = [], cliConfig, cliArgs = []) {
|
|
|
1555
1783
|
}
|
|
1556
1784
|
args.push("--env", `SANDBOX=${containerName}`);
|
|
1557
1785
|
if (config.command === "podman") {
|
|
1558
|
-
const emptyAuthFilePath =
|
|
1559
|
-
|
|
1786
|
+
const emptyAuthFilePath = path5.join(os2.tmpdir(), "empty_auth.json");
|
|
1787
|
+
fs3.writeFileSync(emptyAuthFilePath, "{}", "utf-8");
|
|
1560
1788
|
args.push("--authfile", emptyAuthFilePath);
|
|
1561
1789
|
}
|
|
1562
1790
|
let userFlag = "";
|
|
@@ -1755,17 +1983,17 @@ __name(ensureSandboxImageIsPresent, "ensureSandboxImageIsPresent");
|
|
|
1755
1983
|
|
|
1756
1984
|
// packages/cli/src/utils/startupWarnings.ts
|
|
1757
1985
|
init_esbuild_shims();
|
|
1758
|
-
import
|
|
1986
|
+
import fs4 from "node:fs/promises";
|
|
1759
1987
|
import os3 from "node:os";
|
|
1760
1988
|
import { join as pathJoin } from "node:path";
|
|
1761
1989
|
var warningsFilePath = pathJoin(os3.tmpdir(), "qwen-code-warnings.txt");
|
|
1762
1990
|
async function getStartupWarnings() {
|
|
1763
1991
|
try {
|
|
1764
|
-
await
|
|
1765
|
-
const warningsContent = await
|
|
1992
|
+
await fs4.access(warningsFilePath);
|
|
1993
|
+
const warningsContent = await fs4.readFile(warningsFilePath, "utf-8");
|
|
1766
1994
|
const warnings = warningsContent.split("\n").filter((line) => line.trim() !== "");
|
|
1767
1995
|
try {
|
|
1768
|
-
await
|
|
1996
|
+
await fs4.unlink(warningsFilePath);
|
|
1769
1997
|
} catch {
|
|
1770
1998
|
warnings.push("Warning: Could not delete temporary warnings file.");
|
|
1771
1999
|
}
|
|
@@ -1781,15 +2009,15 @@ __name(getStartupWarnings, "getStartupWarnings");
|
|
|
1781
2009
|
|
|
1782
2010
|
// packages/cli/src/utils/userStartupWarnings.ts
|
|
1783
2011
|
init_esbuild_shims();
|
|
1784
|
-
import
|
|
1785
|
-
import
|
|
2012
|
+
import fs5 from "node:fs/promises";
|
|
2013
|
+
import path6 from "node:path";
|
|
1786
2014
|
var rootDirectoryCheck = {
|
|
1787
2015
|
id: "root-directory",
|
|
1788
2016
|
check: /* @__PURE__ */ __name(async (options) => {
|
|
1789
2017
|
try {
|
|
1790
|
-
const workspaceRealPath = await
|
|
2018
|
+
const workspaceRealPath = await fs5.realpath(options.workspaceRoot);
|
|
1791
2019
|
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.";
|
|
1792
|
-
if (
|
|
2020
|
+
if (path6.dirname(workspaceRealPath) === workspaceRealPath) {
|
|
1793
2021
|
return errorMessage;
|
|
1794
2022
|
}
|
|
1795
2023
|
return null;
|
|
@@ -1861,114 +2089,6 @@ function initializeWarningHandler() {
|
|
|
1861
2089
|
}
|
|
1862
2090
|
__name(initializeWarningHandler, "initializeWarningHandler");
|
|
1863
2091
|
|
|
1864
|
-
// packages/cli/src/utils/apiPreconnect.ts
|
|
1865
|
-
init_esbuild_shims();
|
|
1866
|
-
var import_undici = __toESM(require_undici(), 1);
|
|
1867
|
-
var debugLogger4 = createDebugLogger("PRECONNECT");
|
|
1868
|
-
var preconnectFired = false;
|
|
1869
|
-
var DEFAULT_BASE_URLS = {
|
|
1870
|
-
openai: "https://api.openai.com",
|
|
1871
|
-
"qwen-oauth": "https://coding.dashscope.aliyuncs.com",
|
|
1872
|
-
anthropic: "https://api.anthropic.com",
|
|
1873
|
-
dashscope: "https://dashscope.aliyuncs.com"
|
|
1874
|
-
};
|
|
1875
|
-
var ALL_DEFAULT_URLS = [
|
|
1876
|
-
...Object.values(DEFAULT_BASE_URLS),
|
|
1877
|
-
...getAllProviderBaseUrls()
|
|
1878
|
-
];
|
|
1879
|
-
function shouldSkipPreconnect() {
|
|
1880
|
-
if (process.env["NODE_EXTRA_CA_CERTS"]) {
|
|
1881
|
-
debugLogger4.debug("Skipping preconnect: custom CA certificate configured");
|
|
1882
|
-
return true;
|
|
1883
|
-
}
|
|
1884
|
-
return false;
|
|
1885
|
-
}
|
|
1886
|
-
__name(shouldSkipPreconnect, "shouldSkipPreconnect");
|
|
1887
|
-
function isInSandboxMode() {
|
|
1888
|
-
return process.env["SANDBOX"] !== void 0;
|
|
1889
|
-
}
|
|
1890
|
-
__name(isInSandboxMode, "isInSandboxMode");
|
|
1891
|
-
function isDefaultBaseUrl(baseUrl) {
|
|
1892
|
-
const normalizedInput = baseUrl.toLowerCase().replace(/^https?:\/\//, "").replace(/\/+$/, "");
|
|
1893
|
-
return ALL_DEFAULT_URLS.some((defaultUrl) => {
|
|
1894
|
-
const normalizedDefault = defaultUrl.toLowerCase().replace(/^https?:\/\//, "").replace(/\/+$/, "");
|
|
1895
|
-
return normalizedInput === normalizedDefault || normalizedInput.startsWith(normalizedDefault + "/");
|
|
1896
|
-
});
|
|
1897
|
-
}
|
|
1898
|
-
__name(isDefaultBaseUrl, "isDefaultBaseUrl");
|
|
1899
|
-
function getPreconnectTargetUrl(authType, resolvedBaseUrl) {
|
|
1900
|
-
if (resolvedBaseUrl && /^https?:\/\//i.test(resolvedBaseUrl)) {
|
|
1901
|
-
if (isDefaultBaseUrl(resolvedBaseUrl)) {
|
|
1902
|
-
return resolvedBaseUrl;
|
|
1903
|
-
}
|
|
1904
|
-
debugLogger4.debug(
|
|
1905
|
-
"Skipping preconnect: resolved baseUrl is not a default URL"
|
|
1906
|
-
);
|
|
1907
|
-
return void 0;
|
|
1908
|
-
}
|
|
1909
|
-
if (authType && DEFAULT_BASE_URLS[authType]) {
|
|
1910
|
-
return DEFAULT_BASE_URLS[authType];
|
|
1911
|
-
}
|
|
1912
|
-
return void 0;
|
|
1913
|
-
}
|
|
1914
|
-
__name(getPreconnectTargetUrl, "getPreconnectTargetUrl");
|
|
1915
|
-
function preconnectApi(authType, options = {}) {
|
|
1916
|
-
if (preconnectFired) {
|
|
1917
|
-
return;
|
|
1918
|
-
}
|
|
1919
|
-
if (process.env["QWEN_CODE_DISABLE_PRECONNECT"] === "1") {
|
|
1920
|
-
debugLogger4.debug("Preconnect disabled by environment variable");
|
|
1921
|
-
preconnectFired = true;
|
|
1922
|
-
return;
|
|
1923
|
-
}
|
|
1924
|
-
if (isInSandboxMode()) {
|
|
1925
|
-
debugLogger4.debug("Skipping preconnect: sandbox mode detected");
|
|
1926
|
-
preconnectFired = true;
|
|
1927
|
-
return;
|
|
1928
|
-
}
|
|
1929
|
-
if (shouldSkipPreconnect()) {
|
|
1930
|
-
preconnectFired = true;
|
|
1931
|
-
return;
|
|
1932
|
-
}
|
|
1933
|
-
if (detectRuntime() !== "node") {
|
|
1934
|
-
debugLogger4.debug("Skipping preconnect: unsupported runtime");
|
|
1935
|
-
preconnectFired = true;
|
|
1936
|
-
return;
|
|
1937
|
-
}
|
|
1938
|
-
if (!options.proxy) {
|
|
1939
|
-
debugLogger4.debug("Skipping preconnect dispatcher: no proxy configured");
|
|
1940
|
-
return;
|
|
1941
|
-
}
|
|
1942
|
-
const proxy = options.proxy;
|
|
1943
|
-
const targetUrl = getPreconnectTargetUrl(authType, options.resolvedBaseUrl);
|
|
1944
|
-
if (!targetUrl) {
|
|
1945
|
-
debugLogger4.debug("No target URL for preconnect");
|
|
1946
|
-
return;
|
|
1947
|
-
}
|
|
1948
|
-
preconnectFired = true;
|
|
1949
|
-
debugLogger4.debug(`Preconnecting to: ${targetUrl}`);
|
|
1950
|
-
try {
|
|
1951
|
-
const dispatcher = getOrCreateSharedDispatcher(proxy);
|
|
1952
|
-
(0, import_undici.fetch)(targetUrl, {
|
|
1953
|
-
method: "HEAD",
|
|
1954
|
-
signal: AbortSignal.timeout(5e3),
|
|
1955
|
-
headers: {
|
|
1956
|
-
"User-Agent": "QwenCode-Preconnect/1.0"
|
|
1957
|
-
},
|
|
1958
|
-
dispatcher
|
|
1959
|
-
}).then(() => {
|
|
1960
|
-
debugLogger4.debug("Preconnect completed");
|
|
1961
|
-
}).catch((error) => {
|
|
1962
|
-
const redactedError = redactProxyCredentials(String(error));
|
|
1963
|
-
debugLogger4.debug(`Preconnect failed (ignored): ${redactedError}`);
|
|
1964
|
-
});
|
|
1965
|
-
} catch (error) {
|
|
1966
|
-
const redactedError = redactProxyCredentials(String(error));
|
|
1967
|
-
debugLogger4.debug(`Preconnect failed (ignored): ${redactedError}`);
|
|
1968
|
-
}
|
|
1969
|
-
}
|
|
1970
|
-
__name(preconnectApi, "preconnectApi");
|
|
1971
|
-
|
|
1972
2092
|
// packages/cli/src/gemini.tsx
|
|
1973
2093
|
var debugLogger5 = createDebugLogger("STARTUP");
|
|
1974
2094
|
function clearCorruptionEnvVars() {
|
|
@@ -2104,7 +2224,7 @@ async function main() {
|
|
|
2104
2224
|
await initializeI18n(
|
|
2105
2225
|
resolveLanguageSetting(settings.merged.general?.language)
|
|
2106
2226
|
);
|
|
2107
|
-
const { handleList: handleListExtensions } = await import("./list-
|
|
2227
|
+
const { handleList: handleListExtensions } = await import("./list-4D6QK2KZ.js");
|
|
2108
2228
|
await handleListExtensions();
|
|
2109
2229
|
process.exit(0);
|
|
2110
2230
|
}
|
|
@@ -2118,7 +2238,7 @@ async function main() {
|
|
|
2118
2238
|
dns.setDefaultResultOrder(
|
|
2119
2239
|
validateDnsResolutionOrder(settings.merged.advanced?.dnsResolutionOrder)
|
|
2120
2240
|
);
|
|
2121
|
-
const { themeManager, AUTO_THEME_NAME } = await import("./theme-manager-
|
|
2241
|
+
const { themeManager, AUTO_THEME_NAME } = await import("./theme-manager-WU7LOA64.js");
|
|
2122
2242
|
themeManager.loadCustomThemes(settings.merged.ui?.customThemes);
|
|
2123
2243
|
const configuredTheme = settings.merged.ui?.theme;
|
|
2124
2244
|
if (configuredTheme && configuredTheme !== AUTO_THEME_NAME) {
|
|
@@ -2220,7 +2340,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2220
2340
|
const resolveIfPath = /* @__PURE__ */ __name((v) => {
|
|
2221
2341
|
if (typeof v !== "string" || v.length === 0) return v;
|
|
2222
2342
|
if (looksLikeInlineJson(v)) return v;
|
|
2223
|
-
return
|
|
2343
|
+
return path7.resolve(launchCwdForPaths, v);
|
|
2224
2344
|
}, "resolveIfPath");
|
|
2225
2345
|
argv.mcpConfig = resolveIfPath(argv.mcpConfig);
|
|
2226
2346
|
argv.openaiLoggingDir = resolveIfPath(argv.openaiLoggingDir);
|
|
@@ -2229,15 +2349,15 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2229
2349
|
argv.telemetryOutfile = resolveIfPath(argv.telemetryOutfile);
|
|
2230
2350
|
if (Array.isArray(argv.includeDirectories)) {
|
|
2231
2351
|
argv.includeDirectories = argv.includeDirectories.map(
|
|
2232
|
-
(d) => typeof d === "string" && d.length > 0 ?
|
|
2352
|
+
(d) => typeof d === "string" && d.length > 0 ? path7.resolve(launchCwdForPaths, d) : d
|
|
2233
2353
|
);
|
|
2234
2354
|
}
|
|
2235
2355
|
if (typeof argv.jsonSchema === "string") {
|
|
2236
2356
|
const trimmedSchema = argv.jsonSchema.trim();
|
|
2237
2357
|
if (trimmedSchema.startsWith("@")) {
|
|
2238
2358
|
const rel = trimmedSchema.slice(1);
|
|
2239
|
-
if (rel.length > 0 && !
|
|
2240
|
-
argv.jsonSchema = "@" +
|
|
2359
|
+
if (rel.length > 0 && !path7.isAbsolute(rel)) {
|
|
2360
|
+
argv.jsonSchema = "@" + path7.resolve(launchCwdForPaths, rel);
|
|
2241
2361
|
}
|
|
2242
2362
|
}
|
|
2243
2363
|
}
|
|
@@ -2268,7 +2388,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2268
2388
|
);
|
|
2269
2389
|
let resolvedSessionId;
|
|
2270
2390
|
if (argv.resume === "") {
|
|
2271
|
-
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-
|
|
2391
|
+
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-LPALJTKN.js");
|
|
2272
2392
|
resolvedSessionId = await showResumeSessionPicker();
|
|
2273
2393
|
} else if (!isValidSessionId(argv.resume)) {
|
|
2274
2394
|
const sessionService = new SessionService(process.cwd());
|
|
@@ -2279,7 +2399,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2279
2399
|
writeStderrLine(
|
|
2280
2400
|
`Multiple sessions found with title "${argv.resume}". Please select one:`
|
|
2281
2401
|
);
|
|
2282
|
-
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-
|
|
2402
|
+
const { showResumeSessionPicker } = await import("./StandaloneSessionPicker-LPALJTKN.js");
|
|
2283
2403
|
resolvedSessionId = await showResumeSessionPicker(
|
|
2284
2404
|
process.cwd(),
|
|
2285
2405
|
matches
|
|
@@ -2328,6 +2448,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2328
2448
|
);
|
|
2329
2449
|
registerCleanup(disposeMcpHotReload);
|
|
2330
2450
|
}
|
|
2451
|
+
registerLspHotReload(config, registerCleanup);
|
|
2331
2452
|
if (startupWorktreeContext) {
|
|
2332
2453
|
config.setPendingStartupWorktreeNotice(
|
|
2333
2454
|
buildStartupWorktreeNotice(startupWorktreeContext)
|
|
@@ -2372,17 +2493,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2372
2493
|
}
|
|
2373
2494
|
});
|
|
2374
2495
|
registerCleanup(() => config.shutdown());
|
|
2375
|
-
|
|
2376
|
-
const modelsConfig = config.getModelsConfig();
|
|
2377
|
-
const authType = modelsConfig.getCurrentAuthType();
|
|
2378
|
-
const resolvedBaseUrl = modelsConfig.getGenerationConfig().baseUrl;
|
|
2379
|
-
const proxy = config.getProxy();
|
|
2380
|
-
preconnectApi(authType, { resolvedBaseUrl, proxy });
|
|
2381
|
-
} catch (error) {
|
|
2382
|
-
debugLogger5.debug(
|
|
2383
|
-
`Preconnect skipped due to error getting authType: ${error}`
|
|
2384
|
-
);
|
|
2385
|
-
}
|
|
2496
|
+
startEarlyStartupPrefetches(config);
|
|
2386
2497
|
const wasRaw = process.stdin.isRaw;
|
|
2387
2498
|
let kittyProtocolDetectionComplete;
|
|
2388
2499
|
let themeAutoDetectionComplete;
|
|
@@ -2390,7 +2501,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2390
2501
|
registerCleanup(installInteractiveSignalHandlers(wasRaw));
|
|
2391
2502
|
}
|
|
2392
2503
|
if (config.isInteractive() && !wasRaw && process.stdin.isTTY) {
|
|
2393
|
-
const { startEarlyInputCapture, stopAndGetCapturedInput } = await import("./earlyInputCapture-
|
|
2504
|
+
const { startEarlyInputCapture, stopAndGetCapturedInput } = await import("./earlyInputCapture-7O47HW62.js");
|
|
2394
2505
|
const { detectAndEnableKittyProtocol } = await import("./kittyProtocolDetector-OJRCJLIU.js");
|
|
2395
2506
|
process.stdin.setRawMode(true);
|
|
2396
2507
|
startEarlyInputCapture();
|
|
@@ -2403,25 +2514,24 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2403
2514
|
}
|
|
2404
2515
|
}
|
|
2405
2516
|
if (config.isInteractive()) {
|
|
2406
|
-
const { setMaxSizedBoxDebugging } = await import("./MaxSizedBox-
|
|
2517
|
+
const { setMaxSizedBoxDebugging } = await import("./MaxSizedBox-XS37LWTD.js");
|
|
2407
2518
|
setMaxSizedBoxDebugging(isDebugMode3);
|
|
2408
2519
|
}
|
|
2409
2520
|
const inputFormat = process.stdin.isTTY ? "text" /* TEXT */ : typeof config.getInputFormat === "function" ? config.getInputFormat() : "text" /* TEXT */;
|
|
2410
|
-
const { initializeApp } = await import("./initializer-
|
|
2411
|
-
|
|
2521
|
+
const { initializeApp } = await import("./initializer-DVNCPVTC.js");
|
|
2522
|
+
let input = config.getQuestion();
|
|
2523
|
+
const hasRemoteInput = Boolean(config.getInputFile?.());
|
|
2524
|
+
const deferIdeConnection = config.isInteractive() && !config.getExperimentalZedIntegration() && !input && !hasRemoteInput;
|
|
2525
|
+
const initializationResult = await initializeApp(config, settings, {
|
|
2526
|
+
deferIdeConnection
|
|
2527
|
+
});
|
|
2412
2528
|
profileCheckpoint("after_initialize_app");
|
|
2413
2529
|
if (config.getExperimentalZedIntegration()) {
|
|
2414
|
-
const { runAcpAgent } = await import("./acpAgent-
|
|
2530
|
+
const { runAcpAgent } = await import("./acpAgent-4VE3FGJX.js");
|
|
2415
2531
|
await runAcpAgent(config, settings, argv);
|
|
2416
2532
|
await runExitCleanup();
|
|
2417
2533
|
process.exit(0);
|
|
2418
2534
|
}
|
|
2419
|
-
if (config.isInteractive()) {
|
|
2420
|
-
void import("./scheduler-Q65SB7DJ.js").then((m) => m.startBackgroundHousekeeping(config, settings)).catch((err) => {
|
|
2421
|
-
debugLogger5.warn("failed to start background housekeeping:", err);
|
|
2422
|
-
});
|
|
2423
|
-
}
|
|
2424
|
-
let input = config.getQuestion();
|
|
2425
2535
|
const startupWarnings = [
|
|
2426
2536
|
.../* @__PURE__ */ new Set([
|
|
2427
2537
|
...config.isSafeMode() ? [
|
|
@@ -2456,13 +2566,16 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2456
2566
|
setInteractiveMode(true);
|
|
2457
2567
|
await kittyProtocolDetectionComplete;
|
|
2458
2568
|
await themeAutoDetectionComplete;
|
|
2459
|
-
const { startInteractiveUI } = await import("./startInteractiveUI-
|
|
2569
|
+
const { startInteractiveUI } = await import("./startInteractiveUI-TYGZIU27.js");
|
|
2460
2570
|
await startInteractiveUI(
|
|
2461
2571
|
config,
|
|
2462
2572
|
settings,
|
|
2463
2573
|
startupWarnings,
|
|
2464
2574
|
process.cwd(),
|
|
2465
|
-
initializationResult
|
|
2575
|
+
initializationResult,
|
|
2576
|
+
{
|
|
2577
|
+
postRenderConnectIde: deferIdeConnection
|
|
2578
|
+
}
|
|
2466
2579
|
);
|
|
2467
2580
|
clearCorruptionEnvVars();
|
|
2468
2581
|
return;
|
|
@@ -2509,7 +2622,7 @@ ${finalArgs[promptIndex + 1]}`;
|
|
|
2509
2622
|
${input}`;
|
|
2510
2623
|
}
|
|
2511
2624
|
}
|
|
2512
|
-
const { validateNonInteractiveAuth } = await import("./validateNonInterActiveAuth-
|
|
2625
|
+
const { validateNonInteractiveAuth } = await import("./validateNonInterActiveAuth-NS3GBIJZ.js");
|
|
2513
2626
|
const nonInteractiveConfig = await validateNonInteractiveAuth(
|
|
2514
2627
|
settings.merged.security?.auth?.useExternal,
|
|
2515
2628
|
config,
|
|
@@ -2518,7 +2631,7 @@ ${input}`;
|
|
|
2518
2631
|
const prompt_id = createNonInteractivePromptId(config.getSessionId());
|
|
2519
2632
|
if (inputFormat === "stream-json" /* STREAM_JSON */) {
|
|
2520
2633
|
const trimmedInput = (input ?? "").trim();
|
|
2521
|
-
const { runNonInteractiveStreamJson } = await import("./session-
|
|
2634
|
+
const { runNonInteractiveStreamJson } = await import("./session-NJCONHGX.js");
|
|
2522
2635
|
await runNonInteractiveStreamJson(
|
|
2523
2636
|
nonInteractiveConfig,
|
|
2524
2637
|
trimmedInput.length > 0 ? trimmedInput : "",
|
|
@@ -2542,7 +2655,7 @@ ${input}`;
|
|
|
2542
2655
|
prompt_length: input.length
|
|
2543
2656
|
});
|
|
2544
2657
|
debugLogger5.debug(`Session ID: ${config.getSessionId()}`);
|
|
2545
|
-
const { runNonInteractive } = await import("./nonInteractiveCli-
|
|
2658
|
+
const { runNonInteractive } = await import("./nonInteractiveCli-UD3V7UOO.js");
|
|
2546
2659
|
const exitCode = await runNonInteractive(
|
|
2547
2660
|
nonInteractiveConfig,
|
|
2548
2661
|
settings,
|
|
@@ -2558,9 +2671,89 @@ function createNonInteractivePromptId(sessionId) {
|
|
|
2558
2671
|
return `${sessionId}########0`;
|
|
2559
2672
|
}
|
|
2560
2673
|
__name(createNonInteractivePromptId, "createNonInteractivePromptId");
|
|
2674
|
+
function registerLspHotReload(config, registerCleanup2) {
|
|
2675
|
+
if (config.isLspEnabled?.() !== true || !config.getLspClient?.()?.reinitialize) {
|
|
2676
|
+
return;
|
|
2677
|
+
}
|
|
2678
|
+
const lspConfigWatcher = new LspConfigWatcher(config.getProjectRoot());
|
|
2679
|
+
debugLogger5.info(
|
|
2680
|
+
`Registering LSP config hot reload watcher for ${config.getProjectRoot()}`
|
|
2681
|
+
);
|
|
2682
|
+
lspConfigWatcher.startWatching(async (event) => {
|
|
2683
|
+
if (event.changeType === "invalid") {
|
|
2684
|
+
debugLogger5.warn(`Invalid LSP config file ${event.path}: ${event.error}`);
|
|
2685
|
+
appEvents.emit("log-error" /* LogError */, event.error);
|
|
2686
|
+
return;
|
|
2687
|
+
}
|
|
2688
|
+
debugLogger5.info(
|
|
2689
|
+
`Reloading LSP server settings: changeType=${event.changeType}, path=${event.path}`
|
|
2690
|
+
);
|
|
2691
|
+
let errorReported = false;
|
|
2692
|
+
try {
|
|
2693
|
+
const result = await config.reinitializeLsp();
|
|
2694
|
+
if (result) {
|
|
2695
|
+
const failedServers = getRuntimeReloadFailedNames(result.reconcile);
|
|
2696
|
+
debugLogger5.info(
|
|
2697
|
+
`Reloaded LSP server settings: added=${formatRuntimeReloadNames(
|
|
2698
|
+
result.reconcile.added
|
|
2699
|
+
)}, removed=${formatRuntimeReloadNames(
|
|
2700
|
+
result.reconcile.removed
|
|
2701
|
+
)}, restarted=${formatRuntimeReloadNames(
|
|
2702
|
+
result.reconcile.restarted
|
|
2703
|
+
)}, unchanged=${formatRuntimeReloadNames(
|
|
2704
|
+
result.reconcile.unchanged
|
|
2705
|
+
)}, failed=${formatRuntimeReloadNames(
|
|
2706
|
+
failedServers
|
|
2707
|
+
)}, skipped=${formatRuntimeReloadNames(
|
|
2708
|
+
result.skipped.map((server) => server.name)
|
|
2709
|
+
)}`
|
|
2710
|
+
);
|
|
2711
|
+
if (failedServers.length > 0) {
|
|
2712
|
+
appEvents.emit("lsp-status-changed" /* LspStatusChanged */);
|
|
2713
|
+
const changedServers = [
|
|
2714
|
+
...result.reconcile.added,
|
|
2715
|
+
...result.reconcile.removed,
|
|
2716
|
+
...result.reconcile.restarted
|
|
2717
|
+
];
|
|
2718
|
+
const message = `LSP reload partially completed: changed=${formatRuntimeReloadNames(
|
|
2719
|
+
changedServers
|
|
2720
|
+
)}, failed=${formatRuntimeReloadNames(
|
|
2721
|
+
failedServers
|
|
2722
|
+
)}. Run with --debug for details.`;
|
|
2723
|
+
appEvents.emit("log-error" /* LogError */, message);
|
|
2724
|
+
errorReported = true;
|
|
2725
|
+
throw new Error(message);
|
|
2726
|
+
}
|
|
2727
|
+
} else {
|
|
2728
|
+
debugLogger5.info(
|
|
2729
|
+
"Skipped LSP server settings reload because LSP is disabled or no client is available"
|
|
2730
|
+
);
|
|
2731
|
+
}
|
|
2732
|
+
appEvents.emit("lsp-status-changed" /* LspStatusChanged */);
|
|
2733
|
+
} catch (error) {
|
|
2734
|
+
debugLogger5.warn("Failed to reload LSP server settings:", error);
|
|
2735
|
+
if (!errorReported) {
|
|
2736
|
+
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
|
+
appEvents.emit("log-error" /* LogError */, message);
|
|
2738
|
+
}
|
|
2739
|
+
throw error;
|
|
2740
|
+
}
|
|
2741
|
+
});
|
|
2742
|
+
registerCleanup2(() => lspConfigWatcher.stopWatching());
|
|
2743
|
+
}
|
|
2744
|
+
__name(registerLspHotReload, "registerLspHotReload");
|
|
2745
|
+
function formatRuntimeReloadNames(names) {
|
|
2746
|
+
return names.length === 0 ? "<none>" : names.join(",");
|
|
2747
|
+
}
|
|
2748
|
+
__name(formatRuntimeReloadNames, "formatRuntimeReloadNames");
|
|
2749
|
+
function getRuntimeReloadFailedNames(reconcile) {
|
|
2750
|
+
return reconcile.failed ?? [];
|
|
2751
|
+
}
|
|
2752
|
+
__name(getRuntimeReloadFailedNames, "getRuntimeReloadFailedNames");
|
|
2561
2753
|
export {
|
|
2562
2754
|
createNonInteractivePromptId,
|
|
2563
2755
|
main,
|
|
2756
|
+
registerLspHotReload,
|
|
2564
2757
|
setupUnhandledRejectionHandler,
|
|
2565
2758
|
validateDnsResolutionOrder
|
|
2566
2759
|
};
|
|
@@ -2574,8 +2767,3 @@ export {
|
|
|
2574
2767
|
* Copyright 2025 Google LLC
|
|
2575
2768
|
* SPDX-License-Identifier: Apache-2.0
|
|
2576
2769
|
*/
|
|
2577
|
-
/**
|
|
2578
|
-
* @license
|
|
2579
|
-
* Copyright 2026 Qwen Team
|
|
2580
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
2581
|
-
*/
|