@qwen-code/qwen-code 0.19.7 → 0.19.8-nightly.20260710.205430235

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.
Files changed (292) hide show
  1. package/bundled/qc-helper/SKILL.md +1 -0
  2. package/bundled/qc-helper/docs/configuration/auth.md +40 -55
  3. package/bundled/qc-helper/docs/configuration/model-providers.md +224 -218
  4. package/bundled/qc-helper/docs/configuration/settings.md +43 -36
  5. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  6. package/bundled/qc-helper/docs/features/channels/overview.md +20 -12
  7. package/bundled/qc-helper/docs/features/channels/plugins.md +1 -0
  8. package/bundled/qc-helper/docs/features/code-review.md +2 -1
  9. package/bundled/qc-helper/docs/features/commands.md +39 -38
  10. package/bundled/qc-helper/docs/features/computer-use.md +77 -0
  11. package/bundled/qc-helper/docs/features/hooks.md +36 -34
  12. package/bundled/qc-helper/docs/features/memory.md +1 -1
  13. package/bundled/qc-helper/docs/features/tool-use-summaries.md +19 -23
  14. package/bundled/qc-helper/docs/qwen-serve.md +22 -12
  15. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
  16. package/bundled/review/DESIGN.md +14 -13
  17. package/bundled/review/SKILL.md +38 -61
  18. package/chunks/{MaxSizedBox-XY5LIO5O.js → MaxSizedBox-LOFYQFYJ.js} +13 -14
  19. package/chunks/{StandaloneSessionPicker-APISIRJZ.js → StandaloneSessionPicker-U5OQBGEB.js} +31 -29
  20. package/chunks/{acpAgent-MMOSC2YA.js → acpAgent-SDIFRIED.js} +637 -131
  21. package/chunks/{agent-TKIBLLQT.js → agent-JIBBVHNQ.js} +10 -10
  22. package/chunks/{agent-headless-VLX4C7KX.js → agent-headless-6LGZYJYU.js} +10 -10
  23. package/chunks/{anthropicContentGenerator-AKYPSZIV.js → anthropicContentGenerator-55REPTTF.js} +30 -3
  24. package/chunks/{artifact-tool-D233YJFH.js → artifact-tool-EIN46DPM.js} +1 -1
  25. package/chunks/{askUserQuestion-MKL5ZTMC.js → askUserQuestion-6YX6ZRX7.js} +1 -1
  26. package/chunks/{bridge-BCU73DZO.js → bridge-HVPFYNM4.js} +17 -16
  27. package/chunks/{ca-HCMB2I54.js → ca-MULEGDVS.js} +89 -5
  28. package/chunks/{channel-worker-supervisor-CRCVYQIE.js → channel-worker-supervisor-OPXXT4JK.js} +20 -3
  29. package/chunks/{chunk-DGHJTO2K.js → chunk-2AF26HVM.js} +31 -2
  30. package/chunks/{chunk-3B26UVCX.js → chunk-2GUVUHJY.js} +6 -4
  31. package/chunks/{chunk-FV7425LN.js → chunk-2SZOMGOR.js} +4 -1
  32. package/chunks/{chunk-CNSF3WO5.js → chunk-32KS5XSX.js} +3 -3
  33. package/chunks/{chunk-4UCTWSTP.js → chunk-34UUM3IN.js} +1 -1
  34. package/chunks/{chunk-G7ZG7CA6.js → chunk-3UP777ZS.js} +8 -7
  35. package/chunks/{chunk-MIG5SQNL.js → chunk-4CSVIZLT.js} +4 -4
  36. package/chunks/{chunk-GD236YPV.js → chunk-4ONWIT5C.js} +1 -1
  37. package/chunks/{chunk-4ZJIPVPB.js → chunk-4XK7TNBP.js} +8 -8
  38. package/chunks/{chunk-I4A4K72C.js → chunk-5F2H3PXG.js} +446 -232
  39. package/chunks/chunk-5HOF2K5U.js +19 -0
  40. package/chunks/{chunk-GMOWQOQQ.js → chunk-5ZVIYNLN.js} +228 -36
  41. package/chunks/chunk-6O6Z2I5Q.js +292 -0
  42. package/chunks/{chunk-RYFZCUJO.js → chunk-6QKT5VNZ.js} +14 -6
  43. package/chunks/{chunk-SD4N3QJ2.js → chunk-6ZPSVWLF.js} +61 -17
  44. package/chunks/{chunk-X265R5C6.js → chunk-7YGSDQ5J.js} +2 -2
  45. package/chunks/{chunk-PRDFOIZF.js → chunk-A6KEUFJO.js} +32 -5
  46. package/chunks/{chunk-OWVIH4HY.js → chunk-B5OAMPJ5.js} +389 -87
  47. package/chunks/{chunk-ME3YSROJ.js → chunk-CV2AT2WJ.js} +22 -10
  48. package/chunks/{chunk-U4FRHCLA.js → chunk-DDKUYKHA.js} +1912 -201
  49. package/chunks/{chunk-YDSYD7UI.js → chunk-E3SA2LY4.js} +2 -2
  50. package/chunks/{chunk-6IAWPIQ6.js → chunk-EDM5O3SX.js} +2 -2
  51. package/chunks/{chunk-CISB3IQF.js → chunk-FONJQQWI.js} +65 -6
  52. package/chunks/{chunk-FRFFNYUY.js → chunk-G3WIMNL4.js} +3 -3
  53. package/chunks/{chunk-B34OV7K2.js → chunk-GGQQA4JW.js} +13 -0
  54. package/chunks/chunk-GLE2YUPU.js +34 -0
  55. package/chunks/{chunk-MJI36HER.js → chunk-GOTMC3BX.js} +1 -1
  56. package/chunks/{chunk-RFIL6REB.js → chunk-GRB4QSBD.js} +168 -31
  57. package/chunks/chunk-GVVY7GSP.js +38 -0
  58. package/chunks/{chunk-7JGISHHZ.js → chunk-HDEUQRAR.js} +14 -156
  59. package/chunks/{chunk-NZEGNV4V.js → chunk-HPRI22FZ.js} +6 -6
  60. package/chunks/{chunk-STAZRKOT.js → chunk-I34IHZFJ.js} +117 -459
  61. package/chunks/{chunk-JF7DFPQ5.js → chunk-I3MBKL6Z.js} +12 -2
  62. package/chunks/{chunk-DNV4FSN5.js → chunk-I5XN6KDI.js} +21 -4
  63. package/chunks/{chunk-VZ7HY3YU.js → chunk-IAMRWMFU.js} +1 -1
  64. package/chunks/{chunk-44NROQYV.js → chunk-JOQMY62N.js} +1 -1
  65. package/chunks/{chunk-VQWAZSXN.js → chunk-JW4IKIZ2.js} +57 -35
  66. package/chunks/{chunk-SAIILPQ3.js → chunk-KJMYXFUR.js} +3 -1
  67. package/chunks/{chunk-AFOLR6YL.js → chunk-KQ6MKCFE.js} +102 -16
  68. package/chunks/{chunk-X3YGAX7V.js → chunk-KS2FRTYI.js} +2 -0
  69. package/chunks/{chunk-IUE7YWC3.js → chunk-LE7EF36E.js} +7 -7
  70. package/chunks/{chunk-B4U2M63D.js → chunk-LRY7HD3Q.js} +2101 -11
  71. package/chunks/{chunk-PUQLHSQ2.js → chunk-ME7E6WZB.js} +6 -8
  72. package/chunks/{chunk-LEIJKM7Q.js → chunk-MEK7ZRJ3.js} +1 -1
  73. package/chunks/{chunk-AJBEAUIS.js → chunk-MG2TNCRX.js} +4 -3
  74. package/chunks/{chunk-GL5TV7B5.js → chunk-MSMQURDV.js} +21 -5
  75. package/chunks/{chunk-6BN7NZ5Z.js → chunk-NXDJLKKX.js} +4 -6
  76. package/chunks/{chunk-FEJ2FZ3U.js → chunk-NY2ZOFMM.js} +1 -1
  77. package/chunks/{chunk-QZF5U5KA.js → chunk-NY5BE643.js} +8 -8
  78. package/chunks/{chunk-4RQIB5UZ.js → chunk-O2YT7VB4.js} +0 -34
  79. package/chunks/{chunk-4KJ2BPIT.js → chunk-OACJLMLD.js} +2 -38
  80. package/chunks/chunk-PCWSPWXZ.js +168 -0
  81. package/chunks/{chunk-XPJH4PKR.js → chunk-PJ74K3DH.js} +1 -1
  82. package/chunks/{chunk-FTFXDZYI.js → chunk-PW7VWRLX.js} +45 -29
  83. package/chunks/chunk-R3SLDK6Y.js +468 -0
  84. package/chunks/{chunk-4O344UEE.js → chunk-SDJOZOYY.js} +38 -18
  85. package/chunks/{chunk-ALZ75L2X.js → chunk-SMYIBRAA.js} +412 -376
  86. package/chunks/{chunk-CCGOFQV3.js → chunk-SS5P6JM6.js} +6 -5
  87. package/chunks/{chunk-AIY5UTFI.js → chunk-T3XHYGMG.js} +925 -2872
  88. package/chunks/{chunk-Q6OEPOOC.js → chunk-TB6GWNV4.js} +1 -1
  89. package/chunks/{chunk-24XYI5EI.js → chunk-TERKDCOZ.js} +3 -3
  90. package/chunks/chunk-TVO5C767.js +159 -0
  91. package/chunks/{chunk-TBAZMRW3.js → chunk-TVW53EK7.js} +1 -1
  92. package/chunks/chunk-TX5QZYK6.js +296 -0
  93. package/chunks/{chunk-JD33UY7E.js → chunk-TZRVTPJ6.js} +15 -9
  94. package/chunks/{chunk-65CFHNSE.js → chunk-UAFB2DNB.js} +59 -59
  95. package/chunks/{chunk-QAKFYMJI.js → chunk-UOXLB2LY.js} +152 -17
  96. package/chunks/chunk-V35MD7KN.js +13 -0
  97. package/chunks/{chunk-XSAFNANZ.js → chunk-VWDJHVXM.js} +12 -12
  98. package/chunks/{chunk-XISQIIT7.js → chunk-W77ZLCSX.js} +1 -1
  99. package/chunks/{chunk-BWVQN2HV.js → chunk-WTEIUA2V.js} +4 -4
  100. package/chunks/{chunk-TDGF35EN.js → chunk-XOHNA2S6.js} +1 -1
  101. package/chunks/{chunk-HJ3GX3Y3.js → chunk-XZVUZSDG.js} +25 -11
  102. package/chunks/{chunk-ADZG46HR.js → chunk-YHGCTQG3.js} +1 -1
  103. package/chunks/{chunk-2NPS2UDH.js → chunk-YUNPEB3Q.js} +478 -43
  104. package/chunks/chunk-Z3I3QJK3.js +47 -0
  105. package/chunks/{chunk-P7I3D7FM.js → chunk-Z466FBSA.js} +1 -1
  106. package/chunks/{chunk-YEGT55NW.js → chunk-ZDAZSR2O.js} +3009 -1220
  107. package/chunks/{chunk-VEB3NYSO.js → chunk-ZJQBTFJ6.js} +6 -1
  108. package/chunks/chunk-ZL5HN75Q.js +61 -0
  109. package/chunks/{computer-use-X4KUU3NM.js → computer-use-IW5XBECT.js} +10 -10
  110. package/chunks/{contextCommand-LAYJZF7H.js → contextCommand-4QPLK2SH.js} +14 -14
  111. package/chunks/create-sub-session-7JK3EYWA.js +212 -0
  112. package/chunks/create-sub-session-EVYZYAE3.js +364 -0
  113. package/chunks/{cron-create-JSXEIPVS.js → cron-create-2CCO2PW6.js} +2 -2
  114. package/chunks/{cron-delete-OIFVEPGU.js → cron-delete-ETVTP5IV.js} +2 -2
  115. package/chunks/{cron-list-D4ZX4IOE.js → cron-list-FS3KWOY5.js} +2 -2
  116. package/chunks/{daemon-F3I2RXP6.js → daemon-NNUYIBWA.js} +461 -0
  117. package/chunks/{daemon-status-provider-XSAFKVDS.js → daemon-status-provider-3EPG6BXX.js} +21 -19
  118. package/chunks/{de-PLLFDERI.js → de-QRG6J2CM.js} +89 -5
  119. package/chunks/{dist-YTRKAVUB.js → dist-3EIIFOJV.js} +1 -1
  120. package/chunks/{dist-PKFTNUHO.js → dist-7F5GWZDZ.js} +2 -1
  121. package/chunks/{dist-FQ5WRJPL.js → dist-CBJ7OJ5R.js} +2 -2
  122. package/chunks/{dist-OT7G2WNM.js → dist-LIFJ2YAI.js} +1 -1
  123. package/chunks/{dist-573HNSVO.js → dist-OKXOQ63L.js} +2 -1
  124. package/chunks/{dist-IMFFBMAT.js → dist-SU5LY5R4.js} +3 -1
  125. package/chunks/{earlyInputCapture-AERYYGXE.js → earlyInputCapture-HP5XAS7A.js} +10 -10
  126. package/chunks/{edit-WZTZDGCI.js → edit-MDICC6KH.js} +11 -11
  127. package/chunks/{en-GA2RMXY5.js → en-HF3KFWZG.js} +91 -5
  128. package/chunks/{enter-worktree-DEPXBJEL.js → enter-worktree-JWTRNEN4.js} +10 -10
  129. package/chunks/{enterPlanMode-JFGXZHHJ.js → enterPlanMode-GMRZMTBQ.js} +10 -10
  130. package/chunks/environment-2CJAFOFN.js +88 -0
  131. package/chunks/{errors-GMZL4QV7.js → errors-UZOVFD2U.js} +13 -13
  132. package/chunks/{exit-worktree-Y7XBK3VV.js → exit-worktree-QQGEG343.js} +10 -10
  133. package/chunks/{exitPlanMode-WQQER65F.js → exitPlanMode-YK2JVAAB.js} +10 -10
  134. package/chunks/{fast-path-W2U6XDNO.js → fast-path-6SD4JNQW.js} +12 -3
  135. package/chunks/{fast-path-settings-RCRXH2JG.js → fast-path-settings-RAQGCIT7.js} +3 -2
  136. package/chunks/{fr-GWNQG4XH.js → fr-RSCO6HHD.js} +89 -5
  137. package/chunks/{gemini-T4WX6SRW.js → gemini-TFQXPUZB.js} +436 -140
  138. package/chunks/{geminiContentGenerator-MKQACXEJ.js → geminiContentGenerator-LJ2BNXHX.js} +1 -1
  139. package/chunks/{glob-4KKSHZDF.js → glob-3IJ6JR5W.js} +10 -10
  140. package/chunks/{grep-GHRYXSLZ.js → grep-UFZ2RFQZ.js} +10 -10
  141. package/chunks/{handleAutoUpdate-HN7ZOSXY.js → handleAutoUpdate-TEZC5ZIR.js} +17 -13
  142. package/chunks/i18n-5QEODTJV.js +84 -0
  143. package/chunks/{initializer-SRN3IM42.js → initializer-222MPCLQ.js} +18 -16
  144. package/chunks/installationInfo-OZ62OHZ2.js +65 -0
  145. package/chunks/{ja-2HOTA47X.js → ja-RRFGG2DC.js} +89 -5
  146. package/chunks/{list-INTVXUPA.js → list-BN5VBIIE.js} +20 -18
  147. package/chunks/{loadedSettingsAdapter-QVHHQPGM.js → loadedSettingsAdapter-EHTUJRFB.js} +18 -16
  148. package/chunks/{loop-wakeup-OHWEMFP5.js → loop-wakeup-SR2KWT4B.js} +3 -3
  149. package/chunks/{ls-L654WOAT.js → ls-RUBQK5Q2.js} +2 -2
  150. package/chunks/{lsp-M35KE54Y.js → lsp-DUTVY2ZA.js} +3 -5
  151. package/chunks/{mcp-7V4T46RG.js → mcp-OPGHD26Y.js} +18 -16
  152. package/chunks/{monitor-464OY2UE.js → monitor-WXBDVYYV.js} +10 -10
  153. package/chunks/{nonInteractiveCli-LJEEODU2.js → nonInteractiveCli-CWIBGJ4U.js} +54 -49
  154. package/chunks/{notebook-edit-BLJYCNDO.js → notebook-edit-T7P7M73F.js} +11 -11
  155. package/chunks/{openaiContentGenerator-PFF6HYB2.js → openaiContentGenerator-OES264C3.js} +7 -7
  156. package/chunks/{pidfile-LIBUENIV.js → pidfile-LJ3NLS2P.js} +10 -10
  157. package/chunks/{pt-2THT3YHA.js → pt-D4CG46JM.js} +89 -5
  158. package/chunks/{qwenContentGenerator-SUUHZ6CR.js → qwenContentGenerator-QJ67LAJ5.js} +12 -12
  159. package/chunks/{read-file-L7TBQVX7.js → read-file-KZD7TLU7.js} +5 -5
  160. package/chunks/{read-mcp-resource-CNQHBSJM.js → read-mcp-resource-Q56IMYOH.js} +1 -1
  161. package/chunks/{record-artifact-PP3LKHTS.js → record-artifact-GZ5D5HZX.js} +4 -4
  162. package/chunks/{ripGrep-CKKX3GRB.js → ripGrep-KUJLX75U.js} +10 -10
  163. package/chunks/{ru-Z67YJHBG.js → ru-O2QUEL22.js} +89 -5
  164. package/chunks/{run-qwen-serve-5OKADVLE.js → run-qwen-serve-M52KVRGI.js} +664 -153
  165. package/chunks/{scheduler-ZRW3AIDU.js → scheduler-FFATTAYZ.js} +10 -10
  166. package/chunks/{send-message-OA6MV4EU.js → send-message-HAGK3VTV.js} +2 -2
  167. package/chunks/{serve-36WS32W6.js → serve-B5S32524.js} +21 -18
  168. package/chunks/{server-M372UENX.js → server-6HK5FJMR.js} +3301 -665
  169. package/chunks/{session-F5KSNP2N.js → session-3WB76VTQ.js} +55 -50
  170. package/chunks/{settings-WFLNS3WT.js → settings-W3IX7NHK.js} +27 -23
  171. package/chunks/{shell-DEDSWN56.js → shell-HZIU2ZG7.js} +10 -10
  172. package/chunks/{skill-A2TL2NPC.js → skill-34OUFB65.js} +5 -5
  173. package/chunks/{spawnChannel-RQHUWTCL.js → spawnChannel-FTZJ3I5O.js} +12 -12
  174. package/chunks/{src-XKZMNHXS.js → src-NELBIIGI.js} +48 -10
  175. package/chunks/standalone-update-LICI2VSK.js +79 -0
  176. package/chunks/{startInteractiveUI-REKSTOHU.js → startInteractiveUI-LZEV5YI2.js} +2203 -1764
  177. package/chunks/stdioHelpers-CA7MG65Z.js +14 -0
  178. package/chunks/{syntheticOutput-F7LSDCAR.js → syntheticOutput-XFFJVCGV.js} +2 -2
  179. package/chunks/{task-create-RPFZNB4B.js → task-create-VINUSVBF.js} +3 -3
  180. package/chunks/{task-list-TGGJX7EA.js → task-list-YZ2AWQEG.js} +1 -1
  181. package/chunks/{task-stop-W7NGTMYQ.js → task-stop-PEXPKUW3.js} +1 -1
  182. package/chunks/{task-update-5WUG5MVQ.js → task-update-BHIX57YH.js} +3 -3
  183. package/chunks/{team-create-TBQVWAG7.js → team-create-2JS2OYSF.js} +10 -10
  184. package/chunks/{team-delete-UHQQ2QQX.js → team-delete-2OHXSBVS.js} +1 -1
  185. package/chunks/{team-plan-approval-FZPGUSHJ.js → team-plan-approval-PHLGYUY7.js} +10 -10
  186. package/chunks/{theme-manager-DQZVNSOC.js → theme-manager-UYXLX37P.js} +10 -10
  187. package/chunks/{todoWrite-C4ZAMSR3.js → todoWrite-7Q4ELT4F.js} +1 -1
  188. package/chunks/{tool-search-FDQ3SLNJ.js → tool-search-2MWA3GWE.js} +6 -6
  189. package/chunks/total-session-admission-PRZK35X4.js +72 -0
  190. package/chunks/{trustedFolders-Z475EIHL.js → trustedFolders-IT4JBNPG.js} +12 -12
  191. package/chunks/{updateCheck-E2ZX7RL7.js → updateCheck-X3ZWDO3Z.js} +17 -13
  192. package/chunks/updateEventEmitter-NXWTRHXY.js +10 -0
  193. package/chunks/{validateNonInterActiveAuth-O4ECBHQL.js → validateNonInterActiveAuth-IAOL7CM3.js} +51 -45
  194. package/chunks/{version-CEDD6ZZR.js → version-25QF6A5H.js} +1 -1
  195. package/chunks/{web-fetch-UYGMOHW4.js → web-fetch-I7FOWHGA.js} +2 -2
  196. package/chunks/{workflow-CQQ4J4I6.js → workflow-LZZ5U3IT.js} +11 -11
  197. package/chunks/{workspace-providers-status-MVYXMYDG.js → workspace-providers-status-7DTOAWEL.js} +21 -18
  198. package/chunks/workspace-registry-BBIPESIZ.js +76 -0
  199. package/chunks/{workspace-service-OMBR6ZLG.js → workspace-service-SY3P3FUY.js} +25 -23
  200. package/chunks/{workspace-skills-status-IMMQ7CAY.js → workspace-skills-status-GTT2A4WN.js} +20 -18
  201. package/chunks/{write-file-VWGY7AJP.js → write-file-M6IHNW3V.js} +11 -11
  202. package/chunks/{zh-7XVVRTDH.js → zh-K2EH6BDD.js} +91 -5
  203. package/chunks/{zh-TW-DPH554OG.js → zh-TW-4GPXJ7ZY.js} +91 -5
  204. package/cli.js +13 -12
  205. package/locales/ca.js +115 -7
  206. package/locales/de.js +114 -7
  207. package/locales/en.js +118 -7
  208. package/locales/fr.js +115 -7
  209. package/locales/ja.js +116 -6
  210. package/locales/pt.js +114 -7
  211. package/locales/ru.js +114 -7
  212. package/locales/zh-TW.js +114 -6
  213. package/locales/zh.js +114 -6
  214. package/package.json +3 -6
  215. package/web-shell/assets/{arc-C7hjaa7g.js → arc-G3HZaqaL.js} +1 -1
  216. package/web-shell/assets/{architectureDiagram-3BPJPVTR-pm9KtMZY.js → architectureDiagram-3BPJPVTR-DhBrwwch.js} +1 -1
  217. package/web-shell/assets/{blockDiagram-GPEHLZMM-CApElKsU.js → blockDiagram-GPEHLZMM-16JbbF0N.js} +1 -1
  218. package/web-shell/assets/{c4Diagram-AAUBKEIU-BeDe0-9N.js → c4Diagram-AAUBKEIU-DQ3-pKgc.js} +1 -1
  219. package/web-shell/assets/channel-CX7ZHuuL.js +1 -0
  220. package/web-shell/assets/{chunk-2J33WTMH-DJEkmLdl.js → chunk-2J33WTMH-ERCn30sp.js} +1 -1
  221. package/web-shell/assets/{chunk-4BX2VUAB-DXX8gdpe.js → chunk-4BX2VUAB-DTysfbFi.js} +1 -1
  222. package/web-shell/assets/{chunk-55IACEB6-DORmk1kQ.js → chunk-55IACEB6-BFGrbTBi.js} +1 -1
  223. package/web-shell/assets/{chunk-727SXJPM-DWmO4mCZ.js → chunk-727SXJPM-DCX4Oar-.js} +1 -1
  224. package/web-shell/assets/{chunk-AQP2D5EJ-C7LRaYw2.js → chunk-AQP2D5EJ-CgT6sBr3.js} +1 -1
  225. package/web-shell/assets/{chunk-FMBD7UC4-CCdXgyC5.js → chunk-FMBD7UC4-C1Uuk1KV.js} +1 -1
  226. package/web-shell/assets/{chunk-ND2GUHAM-SyL_xvWc.js → chunk-ND2GUHAM-DajgESiu.js} +1 -1
  227. package/web-shell/assets/{chunk-QZHKN3VN-BzOuCKxa.js → chunk-QZHKN3VN-DLJSvy9X.js} +1 -1
  228. package/web-shell/assets/classDiagram-4FO5ZUOK-B-oT3UI8.js +1 -0
  229. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B-oT3UI8.js +1 -0
  230. package/web-shell/assets/{cose-bilkent-S5V4N54A-BMPWyDKc.js → cose-bilkent-S5V4N54A-CH3w3qs7.js} +1 -1
  231. package/web-shell/assets/{dagre-BM42HDAG-B_GnPWik.js → dagre-BM42HDAG-BloXan9B.js} +1 -1
  232. package/web-shell/assets/{diagram-2AECGRRQ-fJqMc3S_.js → diagram-2AECGRRQ-BbZiGcmK.js} +1 -1
  233. package/web-shell/assets/{diagram-5GNKFQAL-ximV3O9D.js → diagram-5GNKFQAL-GQlYvLJv.js} +1 -1
  234. package/web-shell/assets/{diagram-KO2AKTUF-2vVyjzqw.js → diagram-KO2AKTUF-CtIBvVq3.js} +1 -1
  235. package/web-shell/assets/{diagram-LMA3HP47-Dckcx1sT.js → diagram-LMA3HP47-D5TBo9a2.js} +1 -1
  236. package/web-shell/assets/{diagram-OG6HWLK6-BAVv47ga.js → diagram-OG6HWLK6-N0gQhw6R.js} +1 -1
  237. package/web-shell/assets/{erDiagram-TEJ5UH35-Bn3nf5J0.js → erDiagram-TEJ5UH35-zab9vDj3.js} +1 -1
  238. package/web-shell/assets/{flowDiagram-I6XJVG4X-BIbGF9JT.js → flowDiagram-I6XJVG4X-BnnjtWJa.js} +1 -1
  239. package/web-shell/assets/{ganttDiagram-6RSMTGT7-CDbhb3AH.js → ganttDiagram-6RSMTGT7-2T0SQU4f.js} +1 -1
  240. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CbKG1a_w.js → gitGraphDiagram-PVQCEYII-DAD6_que.js} +1 -1
  241. package/web-shell/assets/index-XLkWfLja.css +5 -0
  242. package/web-shell/assets/index-srlTR1Jg.js +786 -0
  243. package/web-shell/assets/{infoDiagram-5YYISTIA-DUFxTy8m.js → infoDiagram-5YYISTIA-C-j8d0xO.js} +1 -1
  244. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-D69hrBG8.js → ishikawaDiagram-YF4QCWOH-D97bAKoT.js} +1 -1
  245. package/web-shell/assets/{journeyDiagram-JHISSGLW-DsvEw51Y.js → journeyDiagram-JHISSGLW-BJAHfJmm.js} +1 -1
  246. package/web-shell/assets/{kanban-definition-UN3LZRKU-lFFjZEYd.js → kanban-definition-UN3LZRKU-CZgR5aac.js} +1 -1
  247. package/web-shell/assets/{linear-Bo5bWzvo.js → linear-DOd4kYhA.js} +1 -1
  248. package/web-shell/assets/{mermaid.core-C_HKMJx5.js → mermaid.core-BBaplnXA.js} +5 -5
  249. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DlV-NUTs.js → mindmap-definition-RKZ34NQL-IhBF_BR5.js} +1 -1
  250. package/web-shell/assets/{pieDiagram-4H26LBE5-B2e6FH2a.js → pieDiagram-4H26LBE5-B4R4sYyH.js} +1 -1
  251. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-D75kSk-b.js → quadrantDiagram-W4KKPZXB-DKd1SJ61.js} +1 -1
  252. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CQ6xakhM.js → requirementDiagram-4Y6WPE33-Cw96V0Xb.js} +1 -1
  253. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-J_XTKrcY.js → sankeyDiagram-5OEKKPKP-C6ne_yWi.js} +1 -1
  254. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-D7jTcBtf.js → sequenceDiagram-3UESZ5HK-CCyp4PDp.js} +1 -1
  255. package/web-shell/assets/{stateDiagram-AJRCARHV-CrlM_OT3.js → stateDiagram-AJRCARHV-DHvIqTmx.js} +1 -1
  256. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DvFhmpwA.js +1 -0
  257. package/web-shell/assets/{timeline-definition-PNZ67QCA-5oZi76Ef.js → timeline-definition-PNZ67QCA-amb3n9zH.js} +1 -1
  258. package/web-shell/assets/{vennDiagram-CIIHVFJN-DO5YptPK.js → vennDiagram-CIIHVFJN-Abf2qRFJ.js} +1 -1
  259. package/web-shell/assets/{wardley-L42UT6IY-4t1eJDvM.js → wardley-L42UT6IY-BBlOp1av.js} +1 -1
  260. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DKZc661S.js → wardleyDiagram-YWT4CUSO-gE_sZ0Ak.js} +1 -1
  261. package/web-shell/assets/{xychartDiagram-2RQKCTM6-su9hp08G.js → xychartDiagram-2RQKCTM6-BwOni53i.js} +1 -1
  262. package/web-shell/index.html +16 -4
  263. package/chunks/chunk-6SHO7WFF.js +0 -79
  264. package/chunks/chunk-IFEWJXFS.js +0 -37
  265. package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +0 -35
  266. package/node_modules/@qwen-code/audio-capture/dist/index.js +0 -48
  267. package/node_modules/@qwen-code/audio-capture/dist/index.js.map +0 -1
  268. package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +0 -7
  269. package/node_modules/@qwen-code/audio-capture/dist/platform.js +0 -18
  270. package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +0 -1
  271. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +0 -21
  272. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +0 -58
  273. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +0 -5
  274. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +0 -84
  275. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +0 -19
  276. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +0 -6
  277. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +0 -207
  278. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +0 -7
  279. package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +0 -43
  280. package/node_modules/@qwen-code/audio-capture/package.json +0 -30
  281. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  282. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  283. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
  284. package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
  285. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  286. package/web-shell/assets/channel-BNf1dW-j.js +0 -1
  287. package/web-shell/assets/classDiagram-4FO5ZUOK-uOIGlzgi.js +0 -1
  288. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-uOIGlzgi.js +0 -1
  289. package/web-shell/assets/index-CnE2ur2L.js +0 -779
  290. package/web-shell/assets/index-hSKXrlSE.css +0 -5
  291. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Bs4TK_84.js +0 -1
  292. /package/chunks/{chunk-Y6Z2O3WR.js → chunk-JM7BYJO5.js} +0 -0
@@ -0,0 +1,468 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ DEFAULT_EXCLUDED_ENV_VARS,
5
+ HOME_ENV_BOOTSTRAP_KEYS,
6
+ PROJECT_ENV_HARDCODED_EXCLUSIONS
7
+ } from "./chunk-Z3I3QJK3.js";
8
+ import {
9
+ isWorkspaceTrusted
10
+ } from "./chunk-4CSVIZLT.js";
11
+ import {
12
+ require_main
13
+ } from "./chunk-SKAZWEV5.js";
14
+ import {
15
+ QWEN_DIR,
16
+ Storage,
17
+ getErrorMessage
18
+ } from "./chunk-22MNNNXE.js";
19
+ import {
20
+ init_esbuild_shims
21
+ } from "./chunk-A4BMJM77.js";
22
+ import {
23
+ __name,
24
+ __toESM
25
+ } from "./chunk-J2S4EL5Y.js";
26
+
27
+ // packages/cli/src/config/environment.ts
28
+ init_esbuild_shims();
29
+ var dotenv = __toESM(require_main(), 1);
30
+ import * as fs from "node:fs";
31
+ import * as path from "node:path";
32
+ import * as os from "node:os";
33
+ var SETTINGS_DIRECTORY_NAME = QWEN_DIR;
34
+ var RELOAD_EXCLUDED_KEYS = /* @__PURE__ */ new Set([
35
+ ...PROJECT_ENV_HARDCODED_EXCLUSIONS,
36
+ "QWEN_SERVER_TOKEN",
37
+ "QWEN_CLI_ENTRY",
38
+ "NODE_OPTIONS",
39
+ "NODE_PATH",
40
+ "NODE_TLS_REJECT_UNAUTHORIZED",
41
+ "LD_PRELOAD",
42
+ "LD_AUDIT",
43
+ "LD_LIBRARY_PATH",
44
+ "DYLD_INSERT_LIBRARIES",
45
+ "DYLD_LIBRARY_PATH",
46
+ "BASH_ENV",
47
+ "ENV",
48
+ "PATH",
49
+ "HOME",
50
+ "TMPDIR",
51
+ "TMP",
52
+ "TEMP"
53
+ ]);
54
+ var dotEnvSourcedKeys = /* @__PURE__ */ new Set();
55
+ var settingsEnvSourcedKeys = /* @__PURE__ */ new Set();
56
+ var lastReloadSnapshot = /* @__PURE__ */ new Map();
57
+ var lastReloadSnapshotSeeded = false;
58
+ function getUserLevelEnvPaths() {
59
+ const homeDir = os.homedir();
60
+ const globalQwenDir = Storage.getGlobalQwenDir();
61
+ const paths = /* @__PURE__ */ new Set([
62
+ path.normalize(path.join(homeDir, ".env")),
63
+ path.normalize(path.join(globalQwenDir, ".env"))
64
+ ]);
65
+ const legacyQwenEnv = path.normalize(path.join(homeDir, QWEN_DIR, ".env"));
66
+ paths.add(legacyQwenEnv);
67
+ return paths;
68
+ }
69
+ __name(getUserLevelEnvPaths, "getUserLevelEnvPaths");
70
+ var homeEnvBootstrapped = false;
71
+ function preResolveHomeEnvOverrides() {
72
+ if (homeEnvBootstrapped) {
73
+ return;
74
+ }
75
+ homeEnvBootstrapped = true;
76
+ if (HOME_ENV_BOOTSTRAP_KEYS.every((key) => process.env[key])) {
77
+ return;
78
+ }
79
+ const initialQwenHome = process.env["QWEN_HOME"];
80
+ const initialQwenDir = Storage.getGlobalQwenDir();
81
+ const candidates = [path.join(initialQwenDir, ".env")];
82
+ if (!initialQwenHome) {
83
+ candidates.push(path.join(path.dirname(initialQwenDir), ".env"));
84
+ }
85
+ for (const candidate of candidates) {
86
+ readHomeEnvInto(candidate);
87
+ }
88
+ const discoveredQwenHome = process.env["QWEN_HOME"];
89
+ if (discoveredQwenHome && discoveredQwenHome !== initialQwenHome) {
90
+ const discoveredDir = Storage.getGlobalQwenDir();
91
+ if (discoveredDir !== initialQwenDir) {
92
+ readHomeEnvInto(path.join(discoveredDir, ".env"));
93
+ }
94
+ }
95
+ }
96
+ __name(preResolveHomeEnvOverrides, "preResolveHomeEnvOverrides");
97
+ function readHomeEnvInto(file) {
98
+ if (!fs.existsSync(file)) {
99
+ return;
100
+ }
101
+ try {
102
+ const parsed = dotenv.parse(fs.readFileSync(file, "utf-8"));
103
+ for (const key of PROJECT_ENV_HARDCODED_EXCLUSIONS) {
104
+ if (parsed[key] && !Object.hasOwn(process.env, key)) {
105
+ process.env[key] = parsed[key];
106
+ }
107
+ }
108
+ } catch (_e) {
109
+ }
110
+ }
111
+ __name(readHomeEnvInto, "readHomeEnvInto");
112
+ function resetHomeEnvBootstrapForTesting() {
113
+ homeEnvBootstrapped = false;
114
+ }
115
+ __name(resetHomeEnvBootstrapForTesting, "resetHomeEnvBootstrapForTesting");
116
+ function resetEnvironmentTrackingForTesting() {
117
+ dotEnvSourcedKeys.clear();
118
+ settingsEnvSourcedKeys.clear();
119
+ lastReloadSnapshot.clear();
120
+ lastReloadSnapshotSeeded = false;
121
+ }
122
+ __name(resetEnvironmentTrackingForTesting, "resetEnvironmentTrackingForTesting");
123
+ function getHomeEnvFallbackVars(onReadError) {
124
+ const globalQwenDir = Storage.getGlobalQwenDir();
125
+ const candidates = [path.join(globalQwenDir, ".env")];
126
+ if (!process.env["QWEN_HOME"]) {
127
+ candidates.push(path.join(path.dirname(globalQwenDir), ".env"));
128
+ }
129
+ const result = {};
130
+ for (const candidate of candidates) {
131
+ if (!fs.existsSync(candidate)) {
132
+ continue;
133
+ }
134
+ try {
135
+ const parsed = dotenv.parse(fs.readFileSync(candidate, "utf-8"));
136
+ for (const key in parsed) {
137
+ if (Object.hasOwn(parsed, key) && !Object.hasOwn(process.env, key)) {
138
+ result[key] ??= parsed[key];
139
+ }
140
+ }
141
+ } catch (e) {
142
+ onReadError?.(
143
+ `Failed to read home .env candidate ${candidate}: ${getErrorMessage(e)}`
144
+ );
145
+ }
146
+ }
147
+ return result;
148
+ }
149
+ __name(getHomeEnvFallbackVars, "getHomeEnvFallbackVars");
150
+ function findEnvFiles(settings, startDir, userLevelPaths = getUserLevelEnvPaths()) {
151
+ const homeDir = os.homedir();
152
+ let realStartDir = path.resolve(startDir);
153
+ try {
154
+ realStartDir = fs.realpathSync(realStartDir);
155
+ } catch {
156
+ }
157
+ const isTrusted = isWorkspaceTrusted(
158
+ settings,
159
+ void 0,
160
+ realStartDir
161
+ ).isTrusted;
162
+ const globalQwenDir = Storage.getGlobalQwenDir();
163
+ const legacyQwenDir = path.normalize(path.join(homeDir, QWEN_DIR));
164
+ const hasCustomConfigDir = path.normalize(globalQwenDir) !== legacyQwenDir;
165
+ const found = [];
166
+ const seen = /* @__PURE__ */ new Set();
167
+ const canUseEnvFile = /* @__PURE__ */ __name((filePath) => isTrusted !== false || userLevelPaths.has(path.normalize(filePath)), "canUseEnvFile");
168
+ const pushCandidate = /* @__PURE__ */ __name((filePath) => {
169
+ const normalized = path.normalize(filePath);
170
+ if (!seen.has(normalized) && fs.existsSync(filePath) && canUseEnvFile(filePath)) {
171
+ seen.add(normalized);
172
+ found.push(filePath);
173
+ return true;
174
+ }
175
+ return false;
176
+ }, "pushCandidate");
177
+ const pushHomeCandidates = /* @__PURE__ */ __name(() => {
178
+ const candidates = [path.join(globalQwenDir, ".env")];
179
+ if (hasCustomConfigDir) {
180
+ candidates.push(path.join(legacyQwenDir, ".env"));
181
+ }
182
+ candidates.push(path.join(homeDir, ".env"));
183
+ for (const candidate of candidates) {
184
+ pushCandidate(candidate);
185
+ }
186
+ }, "pushHomeCandidates");
187
+ let currentDir = realStartDir;
188
+ let visitedHomeDir = false;
189
+ while (true) {
190
+ if (currentDir === homeDir) {
191
+ visitedHomeDir = true;
192
+ pushHomeCandidates();
193
+ return found;
194
+ } else {
195
+ const geminiEnvPath = path.join(currentDir, QWEN_DIR, ".env");
196
+ if (pushCandidate(geminiEnvPath)) {
197
+ pushHomeCandidates();
198
+ return found;
199
+ }
200
+ const envPath = path.join(currentDir, ".env");
201
+ if (pushCandidate(envPath)) {
202
+ pushHomeCandidates();
203
+ return found;
204
+ }
205
+ }
206
+ const parentDir = path.dirname(currentDir);
207
+ if (parentDir === currentDir || !parentDir) {
208
+ if (!visitedHomeDir) {
209
+ pushHomeCandidates();
210
+ }
211
+ return found;
212
+ }
213
+ currentDir = parentDir;
214
+ }
215
+ }
216
+ __name(findEnvFiles, "findEnvFiles");
217
+ function setUpCloudShellEnvironment(envFilePath) {
218
+ if (envFilePath && fs.existsSync(envFilePath)) {
219
+ const envFileContent = fs.readFileSync(envFilePath);
220
+ const parsedEnv = dotenv.parse(envFileContent);
221
+ if (parsedEnv["GOOGLE_CLOUD_PROJECT"]) {
222
+ process.env["GOOGLE_CLOUD_PROJECT"] = parsedEnv["GOOGLE_CLOUD_PROJECT"];
223
+ } else {
224
+ process.env["GOOGLE_CLOUD_PROJECT"] = "cloudshell-gca";
225
+ }
226
+ } else {
227
+ process.env["GOOGLE_CLOUD_PROJECT"] = "cloudshell-gca";
228
+ }
229
+ }
230
+ __name(setUpCloudShellEnvironment, "setUpCloudShellEnvironment");
231
+ function setUpCloudShellEnvironmentInEnv(env, envFiles) {
232
+ for (const envFile of envFiles) {
233
+ if (envFile.parsedEnv["GOOGLE_CLOUD_PROJECT"]) {
234
+ env["GOOGLE_CLOUD_PROJECT"] = envFile.parsedEnv["GOOGLE_CLOUD_PROJECT"];
235
+ return;
236
+ }
237
+ }
238
+ env["GOOGLE_CLOUD_PROJECT"] = "cloudshell-gca";
239
+ }
240
+ __name(setUpCloudShellEnvironmentInEnv, "setUpCloudShellEnvironmentInEnv");
241
+ function parseEnvFiles(envFilePaths, userLevelPaths) {
242
+ const files = [];
243
+ const readFailures = [];
244
+ for (const envFilePath of envFilePaths) {
245
+ try {
246
+ const envFileContent = fs.readFileSync(envFilePath, "utf-8");
247
+ const parsedEnv = dotenv.parse(envFileContent);
248
+ const normalizedEnvFilePath = path.normalize(envFilePath);
249
+ const isHomeScopedEnvFile = userLevelPaths.has(normalizedEnvFilePath);
250
+ const isQwenScopedEnvFile = isHomeScopedEnvFile || path.basename(path.dirname(normalizedEnvFilePath)) === QWEN_DIR;
251
+ files.push({
252
+ parsedEnv,
253
+ isHomeScopedEnvFile,
254
+ isQwenScopedEnvFile
255
+ });
256
+ } catch (err) {
257
+ readFailures.push({
258
+ path: envFilePath,
259
+ error: getErrorMessage(err)
260
+ });
261
+ }
262
+ }
263
+ return { files, readFailed: readFailures.length > 0, readFailures };
264
+ }
265
+ __name(parseEnvFiles, "parseEnvFiles");
266
+ function canApplyParsedEnvKey(envFile, key, excludedVars, options = {}) {
267
+ if (!Object.hasOwn(envFile.parsedEnv, key)) return false;
268
+ if (options.reload && RELOAD_EXCLUDED_KEYS.has(key)) return false;
269
+ if (!envFile.isHomeScopedEnvFile && PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) {
270
+ return false;
271
+ }
272
+ return envFile.isQwenScopedEnvFile || !excludedVars.includes(key);
273
+ }
274
+ __name(canApplyParsedEnvKey, "canApplyParsedEnvKey");
275
+ function isEffectivelyUnset(env, key) {
276
+ const existingValue = env[key];
277
+ return !Object.hasOwn(env, key) || existingValue === "";
278
+ }
279
+ __name(isEffectivelyUnset, "isEffectivelyUnset");
280
+ function setRuntimeEnvIfUnset(env, key, value) {
281
+ if (isEffectivelyUnset(env, key)) {
282
+ env[key] = value;
283
+ }
284
+ }
285
+ __name(setRuntimeEnvIfUnset, "setRuntimeEnvIfUnset");
286
+ function buildRuntimeEnvironment(settings, startDir = process.cwd(), baseEnv = process.env) {
287
+ const userLevelPaths = getUserLevelEnvPaths();
288
+ const envFilePaths = findEnvFiles(settings, startDir, userLevelPaths);
289
+ const parsedEnvFiles = parseEnvFiles(envFilePaths, userLevelPaths);
290
+ const effectiveEnv = { ...baseEnv };
291
+ if (baseEnv["CLOUD_SHELL"] === "true") {
292
+ setUpCloudShellEnvironmentInEnv(effectiveEnv, parsedEnvFiles.files);
293
+ }
294
+ for (const envFile of parsedEnvFiles.files) {
295
+ const excludedVars = settings?.advanced?.excludedEnvVars || DEFAULT_EXCLUDED_ENV_VARS;
296
+ for (const key in envFile.parsedEnv) {
297
+ if (!canApplyParsedEnvKey(envFile, key, excludedVars, { reload: true })) {
298
+ continue;
299
+ }
300
+ setRuntimeEnvIfUnset(effectiveEnv, key, envFile.parsedEnv[key]);
301
+ }
302
+ }
303
+ if (settings.env) {
304
+ const excludedVars = settings?.advanced?.excludedEnvVars || DEFAULT_EXCLUDED_ENV_VARS;
305
+ for (const [key, value] of Object.entries(settings.env)) {
306
+ if (RELOAD_EXCLUDED_KEYS.has(key)) continue;
307
+ if (PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) continue;
308
+ if (excludedVars.includes(key)) continue;
309
+ if (typeof value !== "string") continue;
310
+ setRuntimeEnvIfUnset(effectiveEnv, key, value);
311
+ }
312
+ }
313
+ const overlayKeys = Object.keys(effectiveEnv).filter((key) => effectiveEnv[key] !== baseEnv[key]).sort();
314
+ return {
315
+ effectiveEnv: Object.freeze({ ...effectiveEnv }),
316
+ overlayKeys: Object.freeze(overlayKeys),
317
+ envFilePaths: Object.freeze([...envFilePaths]),
318
+ envFileReadFailed: parsedEnvFiles.readFailed,
319
+ envFileReadFailures: Object.freeze([...parsedEnvFiles.readFailures])
320
+ };
321
+ }
322
+ __name(buildRuntimeEnvironment, "buildRuntimeEnvironment");
323
+ function loadEnvironment(settings, startDir = process.cwd()) {
324
+ const userLevelPaths = getUserLevelEnvPaths();
325
+ const envFilePaths = findEnvFiles(settings, startDir, userLevelPaths);
326
+ const parsedEnvFiles = parseEnvFiles(envFilePaths, userLevelPaths);
327
+ if (process.env["CLOUD_SHELL"] === "true") {
328
+ setUpCloudShellEnvironmentInEnv(process.env, parsedEnvFiles.files);
329
+ }
330
+ for (const envFile of parsedEnvFiles.files) {
331
+ const excludedVars = settings?.advanced?.excludedEnvVars || DEFAULT_EXCLUDED_ENV_VARS;
332
+ for (const key in envFile.parsedEnv) {
333
+ if (!canApplyParsedEnvKey(envFile, key, excludedVars)) continue;
334
+ const existingValue = process.env[key];
335
+ const isEffectivelyUnset2 = !Object.hasOwn(process.env, key) || existingValue === "";
336
+ if (isEffectivelyUnset2) {
337
+ process.env[key] = envFile.parsedEnv[key];
338
+ dotEnvSourcedKeys.add(key);
339
+ }
340
+ if (!lastReloadSnapshotSeeded && !lastReloadSnapshot.has(key)) {
341
+ lastReloadSnapshot.set(key, envFile.parsedEnv[key]);
342
+ }
343
+ }
344
+ }
345
+ if (settings.env) {
346
+ for (const [key, value] of Object.entries(settings.env)) {
347
+ if (RELOAD_EXCLUDED_KEYS.has(key)) {
348
+ continue;
349
+ }
350
+ if (PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) {
351
+ continue;
352
+ }
353
+ const existingValue = process.env[key];
354
+ const isEffectivelyUnset2 = !Object.hasOwn(process.env, key) || existingValue === "";
355
+ if (isEffectivelyUnset2 && typeof value === "string") {
356
+ process.env[key] = value;
357
+ settingsEnvSourcedKeys.add(key);
358
+ }
359
+ if (!lastReloadSnapshotSeeded && typeof value === "string" && !lastReloadSnapshot.has(key)) {
360
+ lastReloadSnapshot.set(key, value);
361
+ }
362
+ }
363
+ }
364
+ lastReloadSnapshotSeeded = true;
365
+ }
366
+ __name(loadEnvironment, "loadEnvironment");
367
+ function reloadEnvironment(settings, workspaceCwd) {
368
+ const userLevelPaths = getUserLevelEnvPaths();
369
+ const envFilePaths = findEnvFiles(settings, workspaceCwd, userLevelPaths);
370
+ const parsedEnvFiles = parseEnvFiles(envFilePaths, userLevelPaths);
371
+ if (process.env["CLOUD_SHELL"] === "true") {
372
+ setUpCloudShellEnvironmentInEnv(process.env, parsedEnvFiles.files);
373
+ }
374
+ const dotEnvReadFailed = parsedEnvFiles.readFailed;
375
+ const newDotEnvKeys = /* @__PURE__ */ new Map();
376
+ const newSettingsEnvKeys = /* @__PURE__ */ new Map();
377
+ for (const envFile of parsedEnvFiles.files) {
378
+ const excludedVars = settings?.advanced?.excludedEnvVars || DEFAULT_EXCLUDED_ENV_VARS;
379
+ for (const key in envFile.parsedEnv) {
380
+ if (!canApplyParsedEnvKey(envFile, key, excludedVars, { reload: true })) {
381
+ continue;
382
+ }
383
+ if (!newDotEnvKeys.has(key)) {
384
+ newDotEnvKeys.set(key, envFile.parsedEnv[key]);
385
+ }
386
+ }
387
+ }
388
+ if (settings.env) {
389
+ for (const [key, value] of Object.entries(settings.env)) {
390
+ if (RELOAD_EXCLUDED_KEYS.has(key)) continue;
391
+ if (PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) continue;
392
+ if (typeof value !== "string") continue;
393
+ const dotEnvValue = newDotEnvKeys.get(key);
394
+ if (dotEnvValue !== void 0 && dotEnvValue !== "") continue;
395
+ if (dotEnvReadFailed && lastReloadSnapshot.has(key)) continue;
396
+ newSettingsEnvKeys.set(key, value);
397
+ }
398
+ }
399
+ const allNewKeys = /* @__PURE__ */ new Set([
400
+ ...newDotEnvKeys.keys(),
401
+ ...newSettingsEnvKeys.keys()
402
+ ]);
403
+ const updatedKeys = [];
404
+ const removedKeys = [];
405
+ if (!dotEnvReadFailed) {
406
+ const previouslyKnown = /* @__PURE__ */ new Set([
407
+ ...lastReloadSnapshot.keys(),
408
+ ...dotEnvSourcedKeys,
409
+ ...settingsEnvSourcedKeys
410
+ ]);
411
+ for (const key of previouslyKnown) {
412
+ if (!allNewKeys.has(key) && !RELOAD_EXCLUDED_KEYS.has(key)) {
413
+ delete process.env[key];
414
+ removedKeys.push(key);
415
+ }
416
+ }
417
+ }
418
+ for (const [key, value] of newDotEnvKeys) {
419
+ if (value === "" && newSettingsEnvKeys.has(key)) continue;
420
+ if (process.env[key] !== value) {
421
+ updatedKeys.push(key);
422
+ }
423
+ process.env[key] = value;
424
+ }
425
+ for (const [key, value] of newSettingsEnvKeys) {
426
+ if (process.env[key] !== value) {
427
+ updatedKeys.push(key);
428
+ }
429
+ process.env[key] = value;
430
+ }
431
+ if (!dotEnvReadFailed) {
432
+ dotEnvSourcedKeys.clear();
433
+ for (const key of newDotEnvKeys.keys()) {
434
+ dotEnvSourcedKeys.add(key);
435
+ }
436
+ lastReloadSnapshot.clear();
437
+ for (const [key, value] of newDotEnvKeys) {
438
+ lastReloadSnapshot.set(key, value);
439
+ }
440
+ for (const [key, value] of newSettingsEnvKeys) {
441
+ lastReloadSnapshot.set(key, value);
442
+ }
443
+ }
444
+ settingsEnvSourcedKeys.clear();
445
+ for (const key of newSettingsEnvKeys.keys()) {
446
+ settingsEnvSourcedKeys.add(key);
447
+ }
448
+ return { updatedKeys, removedKeys };
449
+ }
450
+ __name(reloadEnvironment, "reloadEnvironment");
451
+
452
+ export {
453
+ SETTINGS_DIRECTORY_NAME,
454
+ preResolveHomeEnvOverrides,
455
+ resetHomeEnvBootstrapForTesting,
456
+ resetEnvironmentTrackingForTesting,
457
+ getHomeEnvFallbackVars,
458
+ findEnvFiles,
459
+ setUpCloudShellEnvironment,
460
+ buildRuntimeEnvironment,
461
+ loadEnvironment,
462
+ reloadEnvironment
463
+ };
464
+ /**
465
+ * @license
466
+ * Copyright 2025 Qwen Team
467
+ * SPDX-License-Identifier: Apache-2.0
468
+ */
@@ -2,8 +2,20 @@
2
2
  "use strict";
3
3
  import {
4
4
  getInstallationInfo,
5
+ resolveUpdateCommand
6
+ } from "./chunk-TX5QZYK6.js";
7
+ import {
5
8
  performStandaloneUpdate
6
- } from "./chunk-ALZ75L2X.js";
9
+ } from "./chunk-SMYIBRAA.js";
10
+ import {
11
+ updateEventEmitter
12
+ } from "./chunk-5HOF2K5U.js";
13
+ import {
14
+ t
15
+ } from "./chunk-UOXLB2LY.js";
16
+ import {
17
+ createDebugLogger
18
+ } from "./chunk-22MNNNXE.js";
7
19
  import {
8
20
  init_esbuild_shims
9
21
  } from "./chunk-A4BMJM77.js";
@@ -14,11 +26,6 @@ import {
14
26
  // packages/cli/src/utils/handleAutoUpdate.ts
15
27
  init_esbuild_shims();
16
28
 
17
- // packages/cli/src/utils/updateEventEmitter.ts
18
- init_esbuild_shims();
19
- import { EventEmitter } from "node:events";
20
- var updateEventEmitter = new EventEmitter();
21
-
22
29
  // packages/cli/src/utils/spawnWrapper.ts
23
30
  init_esbuild_shims();
24
31
  import { spawn } from "node:child_process";
@@ -26,6 +33,7 @@ var spawnWrapper = spawn;
26
33
 
27
34
  // packages/cli/src/utils/handleAutoUpdate.ts
28
35
  import os from "node:os";
36
+ var debugLogger = createDebugLogger("AUTO_UPDATE");
29
37
  var UPDATE_SUCCESS_MESSAGE = "Update successful! Please restart Qwen Code to use the new version. Switching model providers before restarting may not work correctly.";
30
38
  var UPDATE_FAILED_MESSAGE = "Automatic update failed. Please try updating manually.";
31
39
  function handleAutoUpdate(info, settings, projectRoot, spawnFn = spawnWrapper) {
@@ -47,11 +55,18 @@ ${installationInfo.updateMessage}`;
47
55
  });
48
56
  if (installationInfo.isStandalone && installationInfo.standaloneDir && isAutoUpdateEnabled) {
49
57
  performStandaloneUpdate(installationInfo.standaloneDir, info.update.latest).then((result) => {
50
- const message = result === "deferred" ? "Update downloaded. It will be applied after you exit this session." : "Update successful! The new version will be used on your next run.";
58
+ const message = result === "deferred" ? t(
59
+ "Update downloaded. It will be applied after you exit this session."
60
+ ) : t(
61
+ "Update successful! The new version will be used on your next run."
62
+ );
51
63
  updateEventEmitter.emit("update-success", { message });
52
64
  }).catch((err) => {
53
65
  updateEventEmitter.emit("update-failed", {
54
- message: `Automatic update failed: ${err.message}. Re-run the installer to update manually.`
66
+ message: t(
67
+ "Automatic update failed: {{error}}. Re-run the installer to update manually.",
68
+ { error: err.message }
69
+ )
55
70
  });
56
71
  });
57
72
  return;
@@ -59,15 +74,16 @@ ${installationInfo.updateMessage}`;
59
74
  if (!installationInfo.updateCommand || !isAutoUpdateEnabled) {
60
75
  return;
61
76
  }
62
- const isNightly = info.update.latest.includes("nightly");
63
- const updateCommand = installationInfo.updateCommand.replace(
64
- "@latest",
65
- isNightly ? "@nightly" : `@${info.update.latest}`
77
+ const updateCommand = resolveUpdateCommand(
78
+ installationInfo.updateCommand,
79
+ info.update.latest
66
80
  );
67
81
  const isWindows = os.platform() === "win32";
68
82
  const shell = isWindows ? "cmd.exe" : "bash";
69
83
  const shellArgs = isWindows ? ["/c", updateCommand] : ["-c", updateCommand];
70
- const updateProcess = spawnFn(shell, shellArgs, { stdio: "pipe" });
84
+ const updateProcess = spawnFn(shell, shellArgs, {
85
+ stdio: ["pipe", "ignore", "pipe"]
86
+ });
71
87
  let errorOutput = "";
72
88
  updateProcess.stderr.on("data", (data) => {
73
89
  errorOutput += data.toString();
@@ -75,17 +91,21 @@ ${installationInfo.updateMessage}`;
75
91
  updateProcess.on("close", (code) => {
76
92
  if (code === 0) {
77
93
  updateEventEmitter.emit("update-success", {
78
- message: UPDATE_SUCCESS_MESSAGE
94
+ message: t(UPDATE_SUCCESS_MESSAGE)
79
95
  });
80
96
  } else {
97
+ debugLogger.warn(
98
+ `Automatic update command failed: ${updateCommand}; stderr: ${errorOutput.trim()}`
99
+ );
81
100
  updateEventEmitter.emit("update-failed", {
82
- message: `${UPDATE_FAILED_MESSAGE} (command: ${updateCommand}, stderr: ${errorOutput.trim()})`
101
+ message: t(UPDATE_FAILED_MESSAGE)
83
102
  });
84
103
  }
85
104
  });
86
105
  updateProcess.on("error", (err) => {
106
+ debugLogger.warn("Automatic update command failed to start:", err);
87
107
  updateEventEmitter.emit("update-failed", {
88
- message: `${UPDATE_FAILED_MESSAGE} (error: ${err.message})`
108
+ message: t(UPDATE_FAILED_MESSAGE)
89
109
  });
90
110
  });
91
111
  return updateProcess;
@@ -118,7 +138,7 @@ function setUpdateHandler(addItem, setUpdateInfo, isIdleRef = { current: true })
118
138
  setUpdateInfo(null);
119
139
  addItemOrDefer({
120
140
  type: "error" /* ERROR */,
121
- text: data?.message ?? UPDATE_FAILED_MESSAGE
141
+ text: data?.message ?? t(UPDATE_FAILED_MESSAGE)
122
142
  });
123
143
  }, "handleUpdateFailed");
124
144
  const handleUpdateSuccess = /* @__PURE__ */ __name((data) => {
@@ -126,7 +146,7 @@ function setUpdateHandler(addItem, setUpdateInfo, isIdleRef = { current: true })
126
146
  setUpdateInfo(null);
127
147
  addItemOrDefer({
128
148
  type: "info" /* INFO */,
129
- text: data?.message ?? UPDATE_SUCCESS_MESSAGE
149
+ text: data?.message ?? t(UPDATE_SUCCESS_MESSAGE)
130
150
  });
131
151
  }, "handleUpdateSuccess");
132
152
  const handleUpdateInfo = /* @__PURE__ */ __name((data) => {