@qwen-code/qwen-code 0.19.7 → 0.19.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/bundled/qc-helper/docs/features/channels/overview.md +15 -8
  2. package/bundled/qc-helper/docs/features/channels/plugins.md +1 -0
  3. package/bundled/qc-helper/docs/features/hooks.md +36 -34
  4. package/bundled/qc-helper/docs/features/memory.md +1 -1
  5. package/bundled/qc-helper/docs/qwen-serve.md +17 -10
  6. package/bundled/review/SKILL.md +6 -2
  7. package/chunks/{MaxSizedBox-XY5LIO5O.js → MaxSizedBox-5DT2SD7B.js} +7 -7
  8. package/chunks/{StandaloneSessionPicker-APISIRJZ.js → StandaloneSessionPicker-EYRGH6PJ.js} +23 -21
  9. package/chunks/{acpAgent-MMOSC2YA.js → acpAgent-GRFTTRHW.js} +74 -69
  10. package/chunks/{agent-TKIBLLQT.js → agent-H2DGKS77.js} +4 -4
  11. package/chunks/{agent-headless-VLX4C7KX.js → agent-headless-KFMFIT6J.js} +4 -4
  12. package/chunks/{anthropicContentGenerator-AKYPSZIV.js → anthropicContentGenerator-CPF22MA7.js} +28 -1
  13. package/chunks/{bridge-BCU73DZO.js → bridge-NA3ZQQKJ.js} +11 -10
  14. package/chunks/{ca-HCMB2I54.js → ca-MKD32FQL.js} +26 -1
  15. package/chunks/{channel-worker-supervisor-CRCVYQIE.js → channel-worker-supervisor-NZQUOEFJ.js} +3 -3
  16. package/chunks/{chunk-B4U2M63D.js → chunk-27BHARDE.js} +8 -8
  17. package/chunks/{chunk-OWVIH4HY.js → chunk-2EM7ECZD.js} +251 -71
  18. package/chunks/{chunk-YEGT55NW.js → chunk-3GNOQZDC.js} +1562 -1025
  19. package/chunks/{chunk-G7ZG7CA6.js → chunk-3UP777ZS.js} +8 -7
  20. package/chunks/{chunk-VEB3NYSO.js → chunk-5MBO76SL.js} +5 -0
  21. package/chunks/{chunk-ALZ75L2X.js → chunk-6VK6FIMQ.js} +1 -1
  22. package/chunks/{chunk-SD4N3QJ2.js → chunk-A5JOJ77H.js} +35 -14
  23. package/chunks/{chunk-NZEGNV4V.js → chunk-AYNCLGTW.js} +5 -5
  24. package/chunks/{chunk-AJBEAUIS.js → chunk-BOBOCR5H.js} +4 -3
  25. package/chunks/chunk-BOBRZZKD.js +468 -0
  26. package/chunks/{chunk-GMOWQOQQ.js → chunk-BUZ6HGL4.js} +5 -5
  27. package/chunks/{chunk-PRDFOIZF.js → chunk-BVYU3ZTI.js} +2 -2
  28. package/chunks/{chunk-TBAZMRW3.js → chunk-CD6USWHZ.js} +1 -1
  29. package/chunks/{chunk-YDSYD7UI.js → chunk-CHB5SLZZ.js} +2 -2
  30. package/chunks/{chunk-FRFFNYUY.js → chunk-DCZWC4PF.js} +2 -2
  31. package/chunks/{chunk-XSAFNANZ.js → chunk-DHOLNQLC.js} +11 -11
  32. package/chunks/{chunk-MIG5SQNL.js → chunk-DICGXFAI.js} +1 -1
  33. package/chunks/{chunk-4ZJIPVPB.js → chunk-DIWVZ3VM.js} +8 -8
  34. package/chunks/{chunk-VQWAZSXN.js → chunk-E7EMCSUG.js} +1 -1
  35. package/chunks/{chunk-Q6OEPOOC.js → chunk-EEN2TKST.js} +1 -1
  36. package/chunks/{chunk-DNV4FSN5.js → chunk-FBET5XZ2.js} +6 -4
  37. package/chunks/{chunk-QZF5U5KA.js → chunk-FQNC62B2.js} +4 -4
  38. package/chunks/{chunk-B34OV7K2.js → chunk-GGQQA4JW.js} +13 -0
  39. package/chunks/chunk-GLE2YUPU.js +34 -0
  40. package/chunks/{chunk-X265R5C6.js → chunk-GN3F6PIU.js} +1 -1
  41. package/chunks/{chunk-FTFXDZYI.js → chunk-GSHQYYIV.js} +45 -9
  42. package/chunks/{chunk-MJI36HER.js → chunk-HDOH3QYE.js} +1 -1
  43. package/chunks/{chunk-CISB3IQF.js → chunk-I6WGFJJ3.js} +63 -4
  44. package/chunks/{chunk-2NPS2UDH.js → chunk-IBY3Q3HG.js} +390 -9
  45. package/chunks/{chunk-LEIJKM7Q.js → chunk-J7RCB6N5.js} +1 -1
  46. package/chunks/{chunk-4UCTWSTP.js → chunk-JCH35JB3.js} +1 -1
  47. package/chunks/{chunk-CNSF3WO5.js → chunk-JPALE3PA.js} +3 -3
  48. package/chunks/{chunk-P7I3D7FM.js → chunk-JRQ7EVGE.js} +1 -1
  49. package/chunks/{chunk-24XYI5EI.js → chunk-JZHIQJOE.js} +3 -3
  50. package/chunks/{chunk-7JGISHHZ.js → chunk-L46XKEGM.js} +14 -153
  51. package/chunks/{chunk-HJ3GX3Y3.js → chunk-L4AMBVQG.js} +9 -9
  52. package/chunks/{chunk-JF7DFPQ5.js → chunk-LAXNEOBG.js} +1 -1
  53. package/chunks/{chunk-STAZRKOT.js → chunk-M7S4GK5Z.js} +66 -445
  54. package/chunks/{chunk-4RQIB5UZ.js → chunk-O2YT7VB4.js} +0 -34
  55. package/chunks/{chunk-QAKFYMJI.js → chunk-O33TBKDC.js} +10 -10
  56. package/chunks/chunk-O7FIRWJV.js +168 -0
  57. package/chunks/{chunk-4KJ2BPIT.js → chunk-OACJLMLD.js} +2 -38
  58. package/chunks/{chunk-6BN7NZ5Z.js → chunk-ON3JA3RU.js} +2 -2
  59. package/chunks/{chunk-IUE7YWC3.js → chunk-OQXDAMKY.js} +3 -3
  60. package/chunks/{chunk-DGHJTO2K.js → chunk-P3XEEI3X.js} +1 -1
  61. package/chunks/{chunk-U4FRHCLA.js → chunk-PMFULMLX.js} +296 -81
  62. package/chunks/{chunk-XISQIIT7.js → chunk-PUVCVELY.js} +1 -1
  63. package/chunks/{chunk-PUQLHSQ2.js → chunk-RMLZAUWH.js} +4 -4
  64. package/chunks/{chunk-JD33UY7E.js → chunk-SQ2UATK7.js} +14 -8
  65. package/chunks/{chunk-4O344UEE.js → chunk-TI3BWD4D.js} +1 -1
  66. package/chunks/{chunk-AIY5UTFI.js → chunk-TSPB77TG.js} +57 -35
  67. package/chunks/{chunk-XPJH4PKR.js → chunk-UX6OTBVD.js} +1 -1
  68. package/chunks/{chunk-GD236YPV.js → chunk-UXEW557D.js} +1 -1
  69. package/chunks/chunk-V35MD7KN.js +13 -0
  70. package/chunks/{chunk-RYFZCUJO.js → chunk-VGGOPZUL.js} +6 -5
  71. package/chunks/{chunk-65CFHNSE.js → chunk-WF4FAXDL.js} +2 -2
  72. package/chunks/{chunk-ME3YSROJ.js → chunk-WHJQ3JUS.js} +20 -8
  73. package/chunks/{chunk-BWVQN2HV.js → chunk-WQTHLB5T.js} +3 -3
  74. package/chunks/chunk-XNXVCNAT.js +88 -0
  75. package/chunks/{chunk-TDGF35EN.js → chunk-XOHNA2S6.js} +1 -1
  76. package/chunks/{chunk-GL5TV7B5.js → chunk-XYR5RUA5.js} +14 -5
  77. package/chunks/{chunk-I4A4K72C.js → chunk-YDOXPLYL.js} +244 -47
  78. package/chunks/{chunk-AFOLR6YL.js → chunk-YHKAK72D.js} +11 -11
  79. package/chunks/{chunk-RFIL6REB.js → chunk-YKZIAK7C.js} +119 -29
  80. package/chunks/chunk-Z3I3QJK3.js +47 -0
  81. package/chunks/{chunk-ADZG46HR.js → chunk-ZE6E424U.js} +1 -1
  82. package/chunks/chunk-ZL5HN75Q.js +61 -0
  83. package/chunks/{computer-use-X4KUU3NM.js → computer-use-WMY3UOBX.js} +4 -4
  84. package/chunks/{contextCommand-LAYJZF7H.js → contextCommand-LXFZRP4L.js} +6 -6
  85. package/chunks/{daemon-F3I2RXP6.js → daemon-WPAENEBW.js} +48 -0
  86. package/chunks/{daemon-status-provider-XSAFKVDS.js → daemon-status-provider-GJRXY5EN.js} +15 -13
  87. package/chunks/{de-PLLFDERI.js → de-ZFPPQVSF.js} +26 -1
  88. package/chunks/{dist-IMFFBMAT.js → dist-BEXOZXLQ.js} +1 -1
  89. package/chunks/{dist-OT7G2WNM.js → dist-E6UANPIM.js} +1 -1
  90. package/chunks/{dist-FQ5WRJPL.js → dist-H2AEJCZ5.js} +2 -2
  91. package/chunks/{dist-YTRKAVUB.js → dist-O2IRTRPP.js} +1 -1
  92. package/chunks/{dist-573HNSVO.js → dist-SCFLLYMK.js} +1 -1
  93. package/chunks/{dist-PKFTNUHO.js → dist-Z34QPAQW.js} +1 -1
  94. package/chunks/{earlyInputCapture-AERYYGXE.js → earlyInputCapture-KNOYZ4MJ.js} +4 -4
  95. package/chunks/{edit-WZTZDGCI.js → edit-OTYWAXGP.js} +5 -5
  96. package/chunks/{en-GA2RMXY5.js → en-N4EPZAQI.js} +26 -1
  97. package/chunks/{enter-worktree-DEPXBJEL.js → enter-worktree-HNYBDVCX.js} +4 -4
  98. package/chunks/{enterPlanMode-JFGXZHHJ.js → enterPlanMode-CJCNGT63.js} +4 -4
  99. package/chunks/environment-ATFTYMLZ.js +88 -0
  100. package/chunks/{errors-GMZL4QV7.js → errors-A54HAADA.js} +6 -6
  101. package/chunks/{exit-worktree-Y7XBK3VV.js → exit-worktree-DUUKOE3X.js} +4 -4
  102. package/chunks/{exitPlanMode-WQQER65F.js → exitPlanMode-AMMSXOAJ.js} +4 -4
  103. package/chunks/{fast-path-W2U6XDNO.js → fast-path-OV6NIP3K.js} +12 -3
  104. package/chunks/{fast-path-settings-RCRXH2JG.js → fast-path-settings-7RIFI3PK.js} +3 -2
  105. package/chunks/{fr-GWNQG4XH.js → fr-5WWMY53B.js} +26 -1
  106. package/chunks/{gemini-T4WX6SRW.js → gemini-NQ3WWBKB.js} +431 -135
  107. package/chunks/{geminiContentGenerator-MKQACXEJ.js → geminiContentGenerator-CDUNEJQE.js} +1 -1
  108. package/chunks/{glob-4KKSHZDF.js → glob-ROV3YS4R.js} +4 -4
  109. package/chunks/{grep-GHRYXSLZ.js → grep-NRITKDCD.js} +4 -4
  110. package/chunks/{handleAutoUpdate-HN7ZOSXY.js → handleAutoUpdate-CEZJAARW.js} +6 -6
  111. package/chunks/{initializer-SRN3IM42.js → initializer-BRFJKRRX.js} +11 -9
  112. package/chunks/{ja-2HOTA47X.js → ja-CUHZOLEJ.js} +26 -1
  113. package/chunks/{list-INTVXUPA.js → list-KVHF7O4X.js} +13 -11
  114. package/chunks/{loadedSettingsAdapter-QVHHQPGM.js → loadedSettingsAdapter-LL5PSFKX.js} +11 -9
  115. package/chunks/{ls-L654WOAT.js → ls-7MFU2QYW.js} +1 -1
  116. package/chunks/{lsp-M35KE54Y.js → lsp-XHDTPTGV.js} +2 -4
  117. package/chunks/{mcp-7V4T46RG.js → mcp-3GCXRTOQ.js} +11 -9
  118. package/chunks/{monitor-464OY2UE.js → monitor-FL2ZO33W.js} +4 -4
  119. package/chunks/{nonInteractiveCli-LJEEODU2.js → nonInteractiveCli-PTQI3DV6.js} +44 -41
  120. package/chunks/{notebook-edit-BLJYCNDO.js → notebook-edit-6PULTHL5.js} +5 -5
  121. package/chunks/{openaiContentGenerator-PFF6HYB2.js → openaiContentGenerator-YE42PKCY.js} +3 -3
  122. package/chunks/{pidfile-LIBUENIV.js → pidfile-NZYSCFRK.js} +4 -4
  123. package/chunks/{pt-2THT3YHA.js → pt-OLYN42DS.js} +26 -1
  124. package/chunks/{qwenContentGenerator-SUUHZ6CR.js → qwenContentGenerator-NX2E7PB7.js} +5 -5
  125. package/chunks/{read-file-L7TBQVX7.js → read-file-33XGP5HF.js} +2 -2
  126. package/chunks/{record-artifact-PP3LKHTS.js → record-artifact-SQ2OKRJW.js} +3 -3
  127. package/chunks/{ripGrep-CKKX3GRB.js → ripGrep-QWZLGTAN.js} +4 -4
  128. package/chunks/{ru-Z67YJHBG.js → ru-LDM3GWVQ.js} +26 -1
  129. package/chunks/{run-qwen-serve-5OKADVLE.js → run-qwen-serve-JK2DL7PI.js} +596 -143
  130. package/chunks/{scheduler-ZRW3AIDU.js → scheduler-O4IGVZKK.js} +4 -4
  131. package/chunks/{send-message-OA6MV4EU.js → send-message-76GT3JMC.js} +1 -1
  132. package/chunks/{serve-36WS32W6.js → serve-JTMIGANH.js} +13 -10
  133. package/chunks/{server-M372UENX.js → server-SGNPKX2O.js} +667 -243
  134. package/chunks/{session-F5KSNP2N.js → session-5BNM25EZ.js} +45 -42
  135. package/chunks/{settings-WFLNS3WT.js → settings-3MI4XXP6.js} +20 -16
  136. package/chunks/{shell-DEDSWN56.js → shell-YJKBE67T.js} +4 -4
  137. package/chunks/{skill-A2TL2NPC.js → skill-I22QK5XS.js} +2 -2
  138. package/chunks/{spawnChannel-RQHUWTCL.js → spawnChannel-UNV6W4DU.js} +6 -6
  139. package/chunks/{src-XKZMNHXS.js → src-BBQSM46M.js} +8 -4
  140. package/chunks/{startInteractiveUI-REKSTOHU.js → startInteractiveUI-JII36UGN.js} +619 -288
  141. package/chunks/{task-create-RPFZNB4B.js → task-create-WCHTB435.js} +2 -2
  142. package/chunks/{task-update-5WUG5MVQ.js → task-update-XYWMHJGJ.js} +2 -2
  143. package/chunks/{team-create-TBQVWAG7.js → team-create-A7NUU5AQ.js} +4 -4
  144. package/chunks/{team-plan-approval-FZPGUSHJ.js → team-plan-approval-TOQRJ2KI.js} +4 -4
  145. package/chunks/{theme-manager-DQZVNSOC.js → theme-manager-WZ4RRMMB.js} +4 -4
  146. package/chunks/{tool-search-FDQ3SLNJ.js → tool-search-SZ4EFS2T.js} +3 -3
  147. package/chunks/total-session-admission-ULXJWXFV.js +72 -0
  148. package/chunks/{trustedFolders-Z475EIHL.js → trustedFolders-LAZZPZ3D.js} +5 -5
  149. package/chunks/{updateCheck-E2ZX7RL7.js → updateCheck-KONLM73X.js} +5 -5
  150. package/chunks/{validateNonInterActiveAuth-O4ECBHQL.js → validateNonInterActiveAuth-MPKSRCXD.js} +41 -38
  151. package/chunks/{version-CEDD6ZZR.js → version-NO2XSNNP.js} +1 -1
  152. package/chunks/{workflow-CQQ4J4I6.js → workflow-WO2H6NRI.js} +5 -5
  153. package/chunks/{workspace-providers-status-MVYXMYDG.js → workspace-providers-status-3W7E7DFW.js} +14 -11
  154. package/chunks/workspace-registry-SXJZNN3O.js +74 -0
  155. package/chunks/{workspace-service-OMBR6ZLG.js → workspace-service-CZRQZ4Q4.js} +17 -15
  156. package/chunks/{workspace-skills-status-IMMQ7CAY.js → workspace-skills-status-K7WFREPD.js} +12 -10
  157. package/chunks/{write-file-VWGY7AJP.js → write-file-PX2Z7IBE.js} +5 -5
  158. package/chunks/{zh-7XVVRTDH.js → zh-J4F6QWQV.js} +26 -1
  159. package/chunks/{zh-TW-DPH554OG.js → zh-TW-XVDWOLSW.js} +26 -1
  160. package/cli.js +11 -11
  161. package/locales/ca.js +30 -0
  162. package/locales/de.js +30 -0
  163. package/locales/en.js +30 -0
  164. package/locales/fr.js +30 -0
  165. package/locales/ja.js +30 -0
  166. package/locales/pt.js +30 -0
  167. package/locales/ru.js +30 -0
  168. package/locales/zh-TW.js +30 -0
  169. package/locales/zh.js +30 -0
  170. package/node_modules/@qwen-code/audio-capture/package.json +1 -1
  171. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
  172. package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
  173. package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
  174. package/package.json +3 -3
  175. package/web-shell/assets/{arc-C7hjaa7g.js → arc-BWyoJpY2.js} +1 -1
  176. package/web-shell/assets/{architectureDiagram-3BPJPVTR-pm9KtMZY.js → architectureDiagram-3BPJPVTR-BT0mGrz2.js} +1 -1
  177. package/web-shell/assets/{blockDiagram-GPEHLZMM-CApElKsU.js → blockDiagram-GPEHLZMM-BLgUWvyf.js} +1 -1
  178. package/web-shell/assets/{c4Diagram-AAUBKEIU-BeDe0-9N.js → c4Diagram-AAUBKEIU-DYx9M7oU.js} +1 -1
  179. package/web-shell/assets/channel-wmPUGHtg.js +1 -0
  180. package/web-shell/assets/{chunk-2J33WTMH-DJEkmLdl.js → chunk-2J33WTMH-CfMHWbuZ.js} +1 -1
  181. package/web-shell/assets/{chunk-4BX2VUAB-DXX8gdpe.js → chunk-4BX2VUAB-B1URoqEV.js} +1 -1
  182. package/web-shell/assets/{chunk-55IACEB6-DORmk1kQ.js → chunk-55IACEB6-DAIaM4QF.js} +1 -1
  183. package/web-shell/assets/{chunk-727SXJPM-DWmO4mCZ.js → chunk-727SXJPM-B2X34knw.js} +1 -1
  184. package/web-shell/assets/{chunk-AQP2D5EJ-C7LRaYw2.js → chunk-AQP2D5EJ-Cif-zLTQ.js} +1 -1
  185. package/web-shell/assets/{chunk-FMBD7UC4-CCdXgyC5.js → chunk-FMBD7UC4-H18WCXdY.js} +1 -1
  186. package/web-shell/assets/{chunk-ND2GUHAM-SyL_xvWc.js → chunk-ND2GUHAM-YFtetHi0.js} +1 -1
  187. package/web-shell/assets/{chunk-QZHKN3VN-BzOuCKxa.js → chunk-QZHKN3VN-By2hiH3r.js} +1 -1
  188. package/web-shell/assets/classDiagram-4FO5ZUOK-BA2ljEjW.js +1 -0
  189. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BA2ljEjW.js +1 -0
  190. package/web-shell/assets/{cose-bilkent-S5V4N54A-BMPWyDKc.js → cose-bilkent-S5V4N54A-VrcnnLZu.js} +1 -1
  191. package/web-shell/assets/{dagre-BM42HDAG-B_GnPWik.js → dagre-BM42HDAG-CGo-IaVV.js} +1 -1
  192. package/web-shell/assets/{diagram-2AECGRRQ-fJqMc3S_.js → diagram-2AECGRRQ-Dl4QjzIB.js} +1 -1
  193. package/web-shell/assets/{diagram-5GNKFQAL-ximV3O9D.js → diagram-5GNKFQAL-qMLmsO0u.js} +1 -1
  194. package/web-shell/assets/{diagram-KO2AKTUF-2vVyjzqw.js → diagram-KO2AKTUF-CHlmuxPI.js} +1 -1
  195. package/web-shell/assets/{diagram-LMA3HP47-Dckcx1sT.js → diagram-LMA3HP47-BUwU3GwT.js} +1 -1
  196. package/web-shell/assets/{diagram-OG6HWLK6-BAVv47ga.js → diagram-OG6HWLK6-HEhwPDUM.js} +1 -1
  197. package/web-shell/assets/{erDiagram-TEJ5UH35-Bn3nf5J0.js → erDiagram-TEJ5UH35-1n0llBmM.js} +1 -1
  198. package/web-shell/assets/{flowDiagram-I6XJVG4X-BIbGF9JT.js → flowDiagram-I6XJVG4X-BN74uMnt.js} +1 -1
  199. package/web-shell/assets/{ganttDiagram-6RSMTGT7-CDbhb3AH.js → ganttDiagram-6RSMTGT7-BoOq78i3.js} +1 -1
  200. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CbKG1a_w.js → gitGraphDiagram-PVQCEYII-CN8b00c8.js} +1 -1
  201. package/web-shell/assets/index-CNwoO1Cn.js +783 -0
  202. package/web-shell/assets/index-CWQ0z6kZ.css +5 -0
  203. package/web-shell/assets/{infoDiagram-5YYISTIA-DUFxTy8m.js → infoDiagram-5YYISTIA-CCurnIna.js} +1 -1
  204. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-D69hrBG8.js → ishikawaDiagram-YF4QCWOH-AwuRqdUP.js} +1 -1
  205. package/web-shell/assets/{journeyDiagram-JHISSGLW-DsvEw51Y.js → journeyDiagram-JHISSGLW-B7IICk-E.js} +1 -1
  206. package/web-shell/assets/{kanban-definition-UN3LZRKU-lFFjZEYd.js → kanban-definition-UN3LZRKU-BYF0OKhx.js} +1 -1
  207. package/web-shell/assets/{linear-Bo5bWzvo.js → linear-GWWguGfD.js} +1 -1
  208. package/web-shell/assets/{mermaid.core-C_HKMJx5.js → mermaid.core-JqtkxvCl.js} +5 -5
  209. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DlV-NUTs.js → mindmap-definition-RKZ34NQL-B0MmHsZ6.js} +1 -1
  210. package/web-shell/assets/{pieDiagram-4H26LBE5-B2e6FH2a.js → pieDiagram-4H26LBE5-DhImUZLQ.js} +1 -1
  211. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-D75kSk-b.js → quadrantDiagram-W4KKPZXB-DGeSC3DT.js} +1 -1
  212. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CQ6xakhM.js → requirementDiagram-4Y6WPE33-DkspY6Re.js} +1 -1
  213. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-J_XTKrcY.js → sankeyDiagram-5OEKKPKP-CaOofS2x.js} +1 -1
  214. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-D7jTcBtf.js → sequenceDiagram-3UESZ5HK-DFQ_kFnN.js} +1 -1
  215. package/web-shell/assets/{stateDiagram-AJRCARHV-CrlM_OT3.js → stateDiagram-AJRCARHV-D3snw0Tz.js} +1 -1
  216. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BbSm_9d0.js +1 -0
  217. package/web-shell/assets/{timeline-definition-PNZ67QCA-5oZi76Ef.js → timeline-definition-PNZ67QCA-l4zH8nLM.js} +1 -1
  218. package/web-shell/assets/{vennDiagram-CIIHVFJN-DO5YptPK.js → vennDiagram-CIIHVFJN-BnRlA98M.js} +1 -1
  219. package/web-shell/assets/{wardley-L42UT6IY-4t1eJDvM.js → wardley-L42UT6IY-BS0xUdmd.js} +1 -1
  220. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DKZc661S.js → wardleyDiagram-YWT4CUSO-DKGBUWyQ.js} +1 -1
  221. package/web-shell/assets/{xychartDiagram-2RQKCTM6-su9hp08G.js → xychartDiagram-2RQKCTM6-DVb2HuOB.js} +1 -1
  222. package/web-shell/index.html +2 -2
  223. package/web-shell/assets/channel-BNf1dW-j.js +0 -1
  224. package/web-shell/assets/classDiagram-4FO5ZUOK-uOIGlzgi.js +0 -1
  225. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-uOIGlzgi.js +0 -1
  226. package/web-shell/assets/index-CnE2ur2L.js +0 -779
  227. package/web-shell/assets/index-hSKXrlSE.css +0 -5
  228. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Bs4TK_84.js +0 -1
@@ -6,18 +6,18 @@ import {
6
6
  getLanguageNameFromLocale,
7
7
  getLanguageSettingsOptions,
8
8
  t
9
- } from "./chunk-QAKFYMJI.js";
9
+ } from "./chunk-O33TBKDC.js";
10
10
  import {
11
11
  DEFAULT_DARK_THEME_NAME,
12
12
  DEFAULT_LIGHT_THEME_NAME
13
13
  } from "./chunk-TLRYABYP.js";
14
+ import {
15
+ getHomeEnvFallbackVars,
16
+ loadEnvironment,
17
+ preResolveHomeEnvOverrides
18
+ } from "./chunk-BOBRZZKD.js";
14
19
  import {
15
20
  CONSOLIDATED_DISABLE_KEYS,
16
- DEFAULT_EXCLUDED_ENV_VARS,
17
- ENV_CORRUPTED_PATH,
18
- ENV_WAS_RECOVERED,
19
- HOME_ENV_BOOTSTRAP_KEYS,
20
- PROJECT_ENV_HARDCODED_EXCLUSIONS,
21
21
  V1_INDICATOR_KEYS,
22
22
  V1_TO_V2_MIGRATION_MAP,
23
23
  V1_TO_V2_PRESERVE_DISABLE_MAP,
@@ -25,11 +25,15 @@ import {
25
25
  getSystemDefaultsPath,
26
26
  getSystemSettingsPath,
27
27
  resolveEnvVarsInObject
28
- } from "./chunk-4RQIB5UZ.js";
28
+ } from "./chunk-O2YT7VB4.js";
29
+ import {
30
+ ENV_CORRUPTED_PATH,
31
+ ENV_WAS_RECOVERED
32
+ } from "./chunk-Z3I3QJK3.js";
29
33
  import {
30
34
  isWorkspaceTrusted,
31
35
  updateSettingsFilePreservingFormat
32
- } from "./chunk-MIG5SQNL.js";
36
+ } from "./chunk-DICGXFAI.js";
33
37
  import {
34
38
  require_strip_json_comments
35
39
  } from "./chunk-QYUE6W3T.js";
@@ -42,20 +46,16 @@ import {
42
46
  DEFAULT_TRUNCATE_TOOL_OUTPUT_LINES,
43
47
  DEFAULT_TRUNCATE_TOOL_OUTPUT_THRESHOLD,
44
48
  stripRuntimeSnapshotPrefix
45
- } from "./chunk-YEGT55NW.js";
46
- import {
47
- require_main
48
- } from "./chunk-SKAZWEV5.js";
49
+ } from "./chunk-3GNOQZDC.js";
49
50
  import {
50
51
  DEFAULT_QWEN_CUSTOM_IGNORE_FILE_NAMES
51
52
  } from "./chunk-TLWA7TPR.js";
52
53
  import {
53
54
  DEFAULT_SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH,
54
55
  SENSITIVE_SPAN_ATTRIBUTE_MAX_LENGTH_LIMIT
55
- } from "./chunk-GMOWQOQQ.js";
56
+ } from "./chunk-BUZ6HGL4.js";
56
57
  import {
57
58
  FatalConfigError,
58
- QWEN_DIR,
59
59
  Storage,
60
60
  createDebugLogger,
61
61
  getErrorMessage
@@ -70,10 +70,10 @@ import {
70
70
 
71
71
  // packages/cli/src/config/settings.ts
72
72
  init_esbuild_shims();
73
- import * as fs4 from "node:fs";
74
- import * as path3 from "node:path";
75
- import { homedir as homedir2 } from "node:os";
76
- import process2 from "node:process";
73
+ import * as fs3 from "node:fs";
74
+ import * as path2 from "node:path";
75
+ import { homedir } from "node:os";
76
+ import process from "node:process";
77
77
  var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
78
78
 
79
79
  // packages/cli/src/config/modelProvidersScope.ts
@@ -3047,8 +3047,8 @@ function getDefaultValue(key) {
3047
3047
  return getFlattenedSchema()[key]?.default;
3048
3048
  }
3049
3049
  __name(getDefaultValue, "getDefaultValue");
3050
- function getNestedValue(obj, path4) {
3051
- const [first, ...rest] = path4;
3050
+ function getNestedValue(obj, path3) {
3051
+ const [first, ...rest] = path3;
3052
3052
  if (!first || !(first in obj)) {
3053
3053
  return void 0;
3054
3054
  }
@@ -3062,8 +3062,8 @@ function getNestedValue(obj, path4) {
3062
3062
  return void 0;
3063
3063
  }
3064
3064
  __name(getNestedValue, "getNestedValue");
3065
- function getNestedProperty(obj, path4) {
3066
- return getNestedValue(obj, path4.split("."));
3065
+ function getNestedProperty(obj, path3) {
3066
+ return getNestedValue(obj, path3.split("."));
3067
3067
  }
3068
3068
  __name(getNestedProperty, "getNestedProperty");
3069
3069
  function getEffectiveValue(key, settings, mergedSettings) {
@@ -3071,12 +3071,12 @@ function getEffectiveValue(key, settings, mergedSettings) {
3071
3071
  if (!definition) {
3072
3072
  return void 0;
3073
3073
  }
3074
- const path4 = key.split(".");
3075
- let value = getNestedValue(settings, path4);
3074
+ const path3 = key.split(".");
3075
+ let value = getNestedValue(settings, path3);
3076
3076
  if (value !== void 0) {
3077
3077
  return value;
3078
3078
  }
3079
- value = getNestedValue(mergedSettings, path4);
3079
+ value = getNestedValue(mergedSettings, path3);
3080
3080
  if (value !== void 0) {
3081
3081
  return value;
3082
3082
  }
@@ -3162,8 +3162,8 @@ function getDialogSettingKeys() {
3162
3162
  }
3163
3163
  __name(getDialogSettingKeys, "getDialogSettingKeys");
3164
3164
  function settingExistsInScope(key, scopeSettings) {
3165
- const path4 = key.split(".");
3166
- const value = getNestedValue(scopeSettings, path4);
3165
+ const path3 = key.split(".");
3166
+ const value = getNestedValue(scopeSettings, path3);
3167
3167
  return value !== void 0;
3168
3168
  }
3169
3169
  __name(settingExistsInScope, "settingExistsInScope");
@@ -3176,8 +3176,8 @@ function pathHasUnsafeSegment(keys) {
3176
3176
  return false;
3177
3177
  }
3178
3178
  __name(pathHasUnsafeSegment, "pathHasUnsafeSegment");
3179
- function setNestedPropertyForce(obj, path4, value) {
3180
- const keys = path4.split(".");
3179
+ function setNestedPropertyForce(obj, path3, value) {
3180
+ const keys = path3.split(".");
3181
3181
  if (pathHasUnsafeSegment(keys)) return;
3182
3182
  const lastKey = keys.pop();
3183
3183
  if (!lastKey) return;
@@ -3191,8 +3191,8 @@ function setNestedPropertyForce(obj, path4, value) {
3191
3191
  current[lastKey] = value;
3192
3192
  }
3193
3193
  __name(setNestedPropertyForce, "setNestedPropertyForce");
3194
- function setNestedPropertySafe(obj, path4, value) {
3195
- const keys = path4.split(".");
3194
+ function setNestedPropertySafe(obj, path3, value) {
3195
+ const keys = path3.split(".");
3196
3196
  if (pathHasUnsafeSegment(keys)) return;
3197
3197
  const lastKey = keys.pop();
3198
3198
  if (!lastKey) return;
@@ -3211,8 +3211,8 @@ function setNestedPropertySafe(obj, path4, value) {
3211
3211
  current[lastKey] = value;
3212
3212
  }
3213
3213
  __name(setNestedPropertySafe, "setNestedPropertySafe");
3214
- function deleteNestedPropertySafe(obj, path4) {
3215
- const keys = path4.split(".");
3214
+ function deleteNestedPropertySafe(obj, path3) {
3215
+ const keys = path3.split(".");
3216
3216
  const lastKey = keys.pop();
3217
3217
  if (!lastKey) return;
3218
3218
  let current = obj;
@@ -3244,10 +3244,10 @@ function getRestartRequiredFromModified(modifiedSettings) {
3244
3244
  __name(getRestartRequiredFromModified, "getRestartRequiredFromModified");
3245
3245
  function saveModifiedSettings(modifiedSettings, pendingSettings, loadedSettings, scope) {
3246
3246
  modifiedSettings.forEach((settingKey) => {
3247
- const path4 = settingKey.split(".");
3247
+ const path3 = settingKey.split(".");
3248
3248
  const value = getNestedValue(
3249
3249
  pendingSettings,
3250
- path4
3250
+ path3
3251
3251
  );
3252
3252
  const existsInOriginalFile = settingExistsInScope(
3253
3253
  settingKey,
@@ -3349,12 +3349,12 @@ function isPlainObject(item) {
3349
3349
  return !!item && typeof item === "object" && !Array.isArray(item);
3350
3350
  }
3351
3351
  __name(isPlainObject, "isPlainObject");
3352
- function mergeRecursively(target, source, getMergeStrategyForPath2, path4 = []) {
3352
+ function mergeRecursively(target, source, getMergeStrategyForPath2, path3 = []) {
3353
3353
  for (const key of Object.keys(source)) {
3354
3354
  if (key === "__proto__" || key === "constructor" || key === "prototype") {
3355
3355
  continue;
3356
3356
  }
3357
- const newPath = [...path4, key];
3357
+ const newPath = [...path3, key];
3358
3358
  const srcValue = source[key];
3359
3359
  const objValue = target[key];
3360
3360
  const mergeStrategy = getMergeStrategyForPath2(newPath);
@@ -3950,382 +3950,12 @@ function needsMigration(settings) {
3950
3950
  }
3951
3951
  __name(needsMigration, "needsMigration");
3952
3952
 
3953
- // packages/cli/src/config/environment.ts
3954
- init_esbuild_shims();
3955
- var dotenv = __toESM(require_main(), 1);
3956
- import * as fs3 from "node:fs";
3957
- import * as path2 from "node:path";
3958
- import * as os from "node:os";
3959
- var SETTINGS_DIRECTORY_NAME = QWEN_DIR;
3960
- var RELOAD_EXCLUDED_KEYS = /* @__PURE__ */ new Set([
3961
- ...PROJECT_ENV_HARDCODED_EXCLUSIONS,
3962
- "QWEN_SERVER_TOKEN",
3963
- "QWEN_CLI_ENTRY",
3964
- "NODE_OPTIONS",
3965
- "NODE_PATH",
3966
- "NODE_TLS_REJECT_UNAUTHORIZED",
3967
- "LD_PRELOAD",
3968
- "LD_AUDIT",
3969
- "LD_LIBRARY_PATH",
3970
- "DYLD_INSERT_LIBRARIES",
3971
- "DYLD_LIBRARY_PATH",
3972
- "BASH_ENV",
3973
- "ENV",
3974
- "PATH",
3975
- "HOME",
3976
- "TMPDIR",
3977
- "TMP",
3978
- "TEMP"
3979
- ]);
3980
- var dotEnvSourcedKeys = /* @__PURE__ */ new Set();
3981
- var settingsEnvSourcedKeys = /* @__PURE__ */ new Set();
3982
- var lastReloadSnapshot = /* @__PURE__ */ new Map();
3983
- var lastReloadSnapshotSeeded = false;
3984
- function getUserLevelEnvPaths() {
3985
- const homeDir = os.homedir();
3986
- const globalQwenDir = Storage.getGlobalQwenDir();
3987
- const paths = /* @__PURE__ */ new Set([
3988
- path2.normalize(path2.join(homeDir, ".env")),
3989
- path2.normalize(path2.join(globalQwenDir, ".env"))
3990
- ]);
3991
- const legacyQwenEnv = path2.normalize(path2.join(homeDir, QWEN_DIR, ".env"));
3992
- paths.add(legacyQwenEnv);
3993
- return paths;
3994
- }
3995
- __name(getUserLevelEnvPaths, "getUserLevelEnvPaths");
3996
- var homeEnvBootstrapped = false;
3997
- function preResolveHomeEnvOverrides() {
3998
- if (homeEnvBootstrapped) {
3999
- return;
4000
- }
4001
- homeEnvBootstrapped = true;
4002
- if (HOME_ENV_BOOTSTRAP_KEYS.every((key) => process.env[key])) {
4003
- return;
4004
- }
4005
- const initialQwenHome = process.env["QWEN_HOME"];
4006
- const initialQwenDir = Storage.getGlobalQwenDir();
4007
- const candidates = [path2.join(initialQwenDir, ".env")];
4008
- if (!initialQwenHome) {
4009
- candidates.push(path2.join(path2.dirname(initialQwenDir), ".env"));
4010
- }
4011
- for (const candidate of candidates) {
4012
- readHomeEnvInto(candidate);
4013
- }
4014
- const discoveredQwenHome = process.env["QWEN_HOME"];
4015
- if (discoveredQwenHome && discoveredQwenHome !== initialQwenHome) {
4016
- const discoveredDir = Storage.getGlobalQwenDir();
4017
- if (discoveredDir !== initialQwenDir) {
4018
- readHomeEnvInto(path2.join(discoveredDir, ".env"));
4019
- }
4020
- }
4021
- }
4022
- __name(preResolveHomeEnvOverrides, "preResolveHomeEnvOverrides");
4023
- function readHomeEnvInto(file) {
4024
- if (!fs3.existsSync(file)) {
4025
- return;
4026
- }
4027
- try {
4028
- const parsed = dotenv.parse(fs3.readFileSync(file, "utf-8"));
4029
- for (const key of PROJECT_ENV_HARDCODED_EXCLUSIONS) {
4030
- if (parsed[key] && !Object.hasOwn(process.env, key)) {
4031
- process.env[key] = parsed[key];
4032
- }
4033
- }
4034
- } catch (_e) {
4035
- }
4036
- }
4037
- __name(readHomeEnvInto, "readHomeEnvInto");
4038
- function resetHomeEnvBootstrapForTesting() {
4039
- homeEnvBootstrapped = false;
4040
- }
4041
- __name(resetHomeEnvBootstrapForTesting, "resetHomeEnvBootstrapForTesting");
4042
- function resetEnvironmentTrackingForTesting() {
4043
- dotEnvSourcedKeys.clear();
4044
- settingsEnvSourcedKeys.clear();
4045
- lastReloadSnapshot.clear();
4046
- lastReloadSnapshotSeeded = false;
4047
- }
4048
- __name(resetEnvironmentTrackingForTesting, "resetEnvironmentTrackingForTesting");
4049
- function getHomeEnvFallbackVars(onReadError) {
4050
- const globalQwenDir = Storage.getGlobalQwenDir();
4051
- const candidates = [path2.join(globalQwenDir, ".env")];
4052
- if (!process.env["QWEN_HOME"]) {
4053
- candidates.push(path2.join(path2.dirname(globalQwenDir), ".env"));
4054
- }
4055
- const result = {};
4056
- for (const candidate of candidates) {
4057
- if (!fs3.existsSync(candidate)) {
4058
- continue;
4059
- }
4060
- try {
4061
- const parsed = dotenv.parse(fs3.readFileSync(candidate, "utf-8"));
4062
- for (const key in parsed) {
4063
- if (Object.hasOwn(parsed, key) && !Object.hasOwn(process.env, key)) {
4064
- result[key] ??= parsed[key];
4065
- }
4066
- }
4067
- } catch (e) {
4068
- onReadError?.(
4069
- `Failed to read home .env candidate ${candidate}: ${getErrorMessage(e)}`
4070
- );
4071
- }
4072
- }
4073
- return result;
4074
- }
4075
- __name(getHomeEnvFallbackVars, "getHomeEnvFallbackVars");
4076
- function findEnvFiles(settings, startDir, userLevelPaths = getUserLevelEnvPaths()) {
4077
- const homeDir = os.homedir();
4078
- let realStartDir = path2.resolve(startDir);
4079
- try {
4080
- realStartDir = fs3.realpathSync(realStartDir);
4081
- } catch {
4082
- }
4083
- const isTrusted = isWorkspaceTrusted(
4084
- settings,
4085
- void 0,
4086
- realStartDir
4087
- ).isTrusted;
4088
- const globalQwenDir = Storage.getGlobalQwenDir();
4089
- const legacyQwenDir = path2.normalize(path2.join(homeDir, QWEN_DIR));
4090
- const hasCustomConfigDir = path2.normalize(globalQwenDir) !== legacyQwenDir;
4091
- const found = [];
4092
- const seen = /* @__PURE__ */ new Set();
4093
- const canUseEnvFile = /* @__PURE__ */ __name((filePath) => isTrusted !== false || userLevelPaths.has(path2.normalize(filePath)), "canUseEnvFile");
4094
- const pushCandidate = /* @__PURE__ */ __name((filePath) => {
4095
- const normalized = path2.normalize(filePath);
4096
- if (!seen.has(normalized) && fs3.existsSync(filePath) && canUseEnvFile(filePath)) {
4097
- seen.add(normalized);
4098
- found.push(filePath);
4099
- return true;
4100
- }
4101
- return false;
4102
- }, "pushCandidate");
4103
- const pushHomeCandidates = /* @__PURE__ */ __name(() => {
4104
- const candidates = [path2.join(globalQwenDir, ".env")];
4105
- if (hasCustomConfigDir) {
4106
- candidates.push(path2.join(legacyQwenDir, ".env"));
4107
- }
4108
- candidates.push(path2.join(homeDir, ".env"));
4109
- for (const candidate of candidates) {
4110
- pushCandidate(candidate);
4111
- }
4112
- }, "pushHomeCandidates");
4113
- let currentDir = realStartDir;
4114
- let visitedHomeDir = false;
4115
- while (true) {
4116
- if (currentDir === homeDir) {
4117
- visitedHomeDir = true;
4118
- pushHomeCandidates();
4119
- return found;
4120
- } else {
4121
- const geminiEnvPath = path2.join(currentDir, QWEN_DIR, ".env");
4122
- if (pushCandidate(geminiEnvPath)) {
4123
- pushHomeCandidates();
4124
- return found;
4125
- }
4126
- const envPath = path2.join(currentDir, ".env");
4127
- if (pushCandidate(envPath)) {
4128
- pushHomeCandidates();
4129
- return found;
4130
- }
4131
- }
4132
- const parentDir = path2.dirname(currentDir);
4133
- if (parentDir === currentDir || !parentDir) {
4134
- if (!visitedHomeDir) {
4135
- pushHomeCandidates();
4136
- }
4137
- return found;
4138
- }
4139
- currentDir = parentDir;
4140
- }
4141
- }
4142
- __name(findEnvFiles, "findEnvFiles");
4143
- function setUpCloudShellEnvironment(envFilePath) {
4144
- if (envFilePath && fs3.existsSync(envFilePath)) {
4145
- const envFileContent = fs3.readFileSync(envFilePath);
4146
- const parsedEnv = dotenv.parse(envFileContent);
4147
- if (parsedEnv["GOOGLE_CLOUD_PROJECT"]) {
4148
- process.env["GOOGLE_CLOUD_PROJECT"] = parsedEnv["GOOGLE_CLOUD_PROJECT"];
4149
- } else {
4150
- process.env["GOOGLE_CLOUD_PROJECT"] = "cloudshell-gca";
4151
- }
4152
- } else {
4153
- process.env["GOOGLE_CLOUD_PROJECT"] = "cloudshell-gca";
4154
- }
4155
- }
4156
- __name(setUpCloudShellEnvironment, "setUpCloudShellEnvironment");
4157
- function setUpCloudShellEnvironmentFromFiles(envFilePaths) {
4158
- for (const envFilePath of envFilePaths) {
4159
- if (!fs3.existsSync(envFilePath)) {
4160
- continue;
4161
- }
4162
- const envFileContent = fs3.readFileSync(envFilePath);
4163
- const parsedEnv = dotenv.parse(envFileContent);
4164
- if (parsedEnv["GOOGLE_CLOUD_PROJECT"]) {
4165
- process.env["GOOGLE_CLOUD_PROJECT"] = parsedEnv["GOOGLE_CLOUD_PROJECT"];
4166
- return;
4167
- }
4168
- }
4169
- process.env["GOOGLE_CLOUD_PROJECT"] = "cloudshell-gca";
4170
- }
4171
- __name(setUpCloudShellEnvironmentFromFiles, "setUpCloudShellEnvironmentFromFiles");
4172
- function loadEnvironment(settings, startDir = process.cwd()) {
4173
- const userLevelPaths = getUserLevelEnvPaths();
4174
- const envFilePaths = findEnvFiles(settings, startDir, userLevelPaths);
4175
- if (process.env["CLOUD_SHELL"] === "true") {
4176
- setUpCloudShellEnvironmentFromFiles(envFilePaths);
4177
- }
4178
- for (const envFilePath of envFilePaths) {
4179
- try {
4180
- const envFileContent = fs3.readFileSync(envFilePath, "utf-8");
4181
- const parsedEnv = dotenv.parse(envFileContent);
4182
- const excludedVars = settings?.advanced?.excludedEnvVars || DEFAULT_EXCLUDED_ENV_VARS;
4183
- const normalizedEnvFilePath = path2.normalize(envFilePath);
4184
- const isHomeScopedEnvFile = userLevelPaths.has(normalizedEnvFilePath);
4185
- const isQwenScopedEnvFile = isHomeScopedEnvFile || path2.basename(path2.dirname(normalizedEnvFilePath)) === QWEN_DIR;
4186
- for (const key in parsedEnv) {
4187
- if (Object.hasOwn(parsedEnv, key)) {
4188
- if (!isHomeScopedEnvFile && PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) {
4189
- continue;
4190
- }
4191
- if (!isQwenScopedEnvFile && excludedVars.includes(key)) {
4192
- continue;
4193
- }
4194
- const existingValue = process.env[key];
4195
- const isEffectivelyUnset = !Object.hasOwn(process.env, key) || existingValue === "";
4196
- if (isEffectivelyUnset) {
4197
- process.env[key] = parsedEnv[key];
4198
- dotEnvSourcedKeys.add(key);
4199
- }
4200
- if (!lastReloadSnapshotSeeded && !lastReloadSnapshot.has(key)) {
4201
- lastReloadSnapshot.set(key, parsedEnv[key]);
4202
- }
4203
- }
4204
- }
4205
- } catch (_e) {
4206
- }
4207
- }
4208
- if (settings.env) {
4209
- for (const [key, value] of Object.entries(settings.env)) {
4210
- if (PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) {
4211
- continue;
4212
- }
4213
- const existingValue = process.env[key];
4214
- const isEffectivelyUnset = !Object.hasOwn(process.env, key) || existingValue === "";
4215
- if (isEffectivelyUnset && typeof value === "string") {
4216
- process.env[key] = value;
4217
- settingsEnvSourcedKeys.add(key);
4218
- }
4219
- if (!lastReloadSnapshotSeeded && typeof value === "string" && !lastReloadSnapshot.has(key)) {
4220
- lastReloadSnapshot.set(key, value);
4221
- }
4222
- }
4223
- }
4224
- lastReloadSnapshotSeeded = true;
4225
- }
4226
- __name(loadEnvironment, "loadEnvironment");
4227
- function reloadEnvironment(settings, workspaceCwd) {
4228
- const userLevelPaths = getUserLevelEnvPaths();
4229
- const envFilePaths = findEnvFiles(settings, workspaceCwd, userLevelPaths);
4230
- if (process.env["CLOUD_SHELL"] === "true") {
4231
- setUpCloudShellEnvironmentFromFiles(envFilePaths);
4232
- }
4233
- let dotEnvReadFailed = false;
4234
- const newDotEnvKeys = /* @__PURE__ */ new Map();
4235
- const newSettingsEnvKeys = /* @__PURE__ */ new Map();
4236
- for (const envFilePath of envFilePaths) {
4237
- try {
4238
- const envFileContent = fs3.readFileSync(envFilePath, "utf-8");
4239
- const parsedEnv = dotenv.parse(envFileContent);
4240
- const excludedVars = settings?.advanced?.excludedEnvVars || DEFAULT_EXCLUDED_ENV_VARS;
4241
- const normalizedEnvFilePath = path2.normalize(envFilePath);
4242
- const isHomeScopedEnvFile = userLevelPaths.has(normalizedEnvFilePath);
4243
- const isQwenScopedEnvFile = isHomeScopedEnvFile || path2.basename(path2.dirname(normalizedEnvFilePath)) === QWEN_DIR;
4244
- for (const key in parsedEnv) {
4245
- if (!Object.hasOwn(parsedEnv, key)) continue;
4246
- if (RELOAD_EXCLUDED_KEYS.has(key)) continue;
4247
- if (!isHomeScopedEnvFile && PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) {
4248
- continue;
4249
- }
4250
- if (!isQwenScopedEnvFile && excludedVars.includes(key)) continue;
4251
- if (!newDotEnvKeys.has(key)) {
4252
- newDotEnvKeys.set(key, parsedEnv[key]);
4253
- }
4254
- }
4255
- } catch {
4256
- dotEnvReadFailed = true;
4257
- }
4258
- }
4259
- if (settings.env) {
4260
- for (const [key, value] of Object.entries(settings.env)) {
4261
- if (RELOAD_EXCLUDED_KEYS.has(key)) continue;
4262
- if (PROJECT_ENV_HARDCODED_EXCLUSIONS.includes(key)) continue;
4263
- if (typeof value !== "string") continue;
4264
- const dotEnvValue = newDotEnvKeys.get(key);
4265
- if (dotEnvValue !== void 0 && dotEnvValue !== "") continue;
4266
- if (dotEnvReadFailed && lastReloadSnapshot.has(key)) continue;
4267
- newSettingsEnvKeys.set(key, value);
4268
- }
4269
- }
4270
- const allNewKeys = /* @__PURE__ */ new Set([
4271
- ...newDotEnvKeys.keys(),
4272
- ...newSettingsEnvKeys.keys()
4273
- ]);
4274
- const updatedKeys = [];
4275
- const removedKeys = [];
4276
- if (!dotEnvReadFailed) {
4277
- const previouslyKnown = /* @__PURE__ */ new Set([
4278
- ...lastReloadSnapshot.keys(),
4279
- ...dotEnvSourcedKeys,
4280
- ...settingsEnvSourcedKeys
4281
- ]);
4282
- for (const key of previouslyKnown) {
4283
- if (!allNewKeys.has(key) && !RELOAD_EXCLUDED_KEYS.has(key)) {
4284
- delete process.env[key];
4285
- removedKeys.push(key);
4286
- }
4287
- }
4288
- }
4289
- for (const [key, value] of newDotEnvKeys) {
4290
- if (value === "" && newSettingsEnvKeys.has(key)) continue;
4291
- if (process.env[key] !== value) {
4292
- updatedKeys.push(key);
4293
- }
4294
- process.env[key] = value;
4295
- }
4296
- for (const [key, value] of newSettingsEnvKeys) {
4297
- if (process.env[key] !== value) {
4298
- updatedKeys.push(key);
4299
- }
4300
- process.env[key] = value;
4301
- }
4302
- if (!dotEnvReadFailed) {
4303
- dotEnvSourcedKeys.clear();
4304
- for (const key of newDotEnvKeys.keys()) {
4305
- dotEnvSourcedKeys.add(key);
4306
- }
4307
- lastReloadSnapshot.clear();
4308
- for (const [key, value] of newDotEnvKeys) {
4309
- lastReloadSnapshot.set(key, value);
4310
- }
4311
- for (const [key, value] of newSettingsEnvKeys) {
4312
- lastReloadSnapshot.set(key, value);
4313
- }
4314
- }
4315
- settingsEnvSourcedKeys.clear();
4316
- for (const key of newSettingsEnvKeys.keys()) {
4317
- settingsEnvSourcedKeys.add(key);
4318
- }
4319
- return { updatedKeys, removedKeys };
4320
- }
4321
- __name(reloadEnvironment, "reloadEnvironment");
4322
-
4323
3953
  // packages/cli/src/config/settings.ts
4324
3954
  var debugLogger2 = createDebugLogger("SETTINGS");
4325
- function getMergeStrategyForPath(path4) {
3955
+ function getMergeStrategyForPath(path3) {
4326
3956
  let current = void 0;
4327
3957
  let currentSchema = getSettingsSchema();
4328
- for (const key of path4) {
3958
+ for (const key of path3) {
4329
3959
  if (!currentSchema || !currentSchema[key]) {
4330
3960
  return void 0;
4331
3961
  }
@@ -4340,7 +3970,7 @@ function getUserSettingsPath() {
4340
3970
  }
4341
3971
  __name(getUserSettingsPath, "getUserSettingsPath");
4342
3972
  function getUserSettingsDir() {
4343
- return path3.dirname(getUserSettingsPath());
3973
+ return path2.dirname(getUserSettingsPath());
4344
3974
  }
4345
3975
  __name(getUserSettingsDir, "getUserSettingsDir");
4346
3976
  var SETTINGS_VERSION = 4;
@@ -4602,14 +4232,14 @@ var LoadedSettings = class {
4602
4232
  reloadScopeFromDisk(scope) {
4603
4233
  const file = this.forScope(scope);
4604
4234
  try {
4605
- if (!fs4.existsSync(file.path)) {
4235
+ if (!fs3.existsSync(file.path)) {
4606
4236
  file.settings = {};
4607
4237
  file.originalSettings = {};
4608
4238
  file.rawJson = void 0;
4609
4239
  this._merged = this.computeMergedSettings();
4610
4240
  return;
4611
4241
  }
4612
- const content = fs4.readFileSync(file.path, "utf-8");
4242
+ const content = fs3.readFileSync(file.path, "utf-8");
4613
4243
  const parsed = JSON.parse((0, import_strip_json_comments.default)(content));
4614
4244
  if (parsed && typeof parsed === "object" && !Array.isArray(parsed)) {
4615
4245
  const resolved = resolveEnvVarsInObject(
@@ -4666,33 +4296,33 @@ function createMinimalSettings() {
4666
4296
  }
4667
4297
  __name(createMinimalSettings, "createMinimalSettings");
4668
4298
  function detectQwenHomeRedirectWithoutMigration(activeUserSettingsPath) {
4669
- if (!process2.env["QWEN_HOME"]) {
4299
+ if (!process.env["QWEN_HOME"]) {
4670
4300
  return null;
4671
4301
  }
4672
4302
  const activeQwenDir = Storage.getGlobalQwenDir();
4673
- const savedQwenHome = process2.env["QWEN_HOME"];
4674
- delete process2.env["QWEN_HOME"];
4303
+ const savedQwenHome = process.env["QWEN_HOME"];
4304
+ delete process.env["QWEN_HOME"];
4675
4305
  let legacyQwenDir;
4676
4306
  try {
4677
4307
  legacyQwenDir = Storage.getGlobalQwenDir();
4678
4308
  } finally {
4679
- process2.env["QWEN_HOME"] = savedQwenHome;
4309
+ process.env["QWEN_HOME"] = savedQwenHome;
4680
4310
  }
4681
- if (path3.resolve(activeQwenDir) === path3.resolve(legacyQwenDir)) {
4311
+ if (path2.resolve(activeQwenDir) === path2.resolve(legacyQwenDir)) {
4682
4312
  return null;
4683
4313
  }
4684
- if (fs4.existsSync(activeUserSettingsPath)) {
4314
+ if (fs3.existsSync(activeUserSettingsPath)) {
4685
4315
  return null;
4686
4316
  }
4687
- const legacyUserSettings = path3.join(legacyQwenDir, "settings.json");
4688
- if (!fs4.existsSync(legacyUserSettings)) {
4317
+ const legacyUserSettings = path2.join(legacyQwenDir, "settings.json");
4318
+ if (!fs3.existsSync(legacyUserSettings)) {
4689
4319
  return null;
4690
4320
  }
4691
4321
  return `QWEN_HOME points to "${activeQwenDir}" but no settings.json was found there. Existing config remains at "${legacyQwenDir}" \u2014 OAuth tokens, settings, memory, extensions, and skills are not auto-migrated. Copy them manually if you want them to apply at the new location.`;
4692
4322
  }
4693
4323
  __name(detectQwenHomeRedirectWithoutMigration, "detectQwenHomeRedirectWithoutMigration");
4694
4324
  var CORRUPTED_SUFFIX = ".corrupted";
4695
- function loadSettings(workspaceDir = process2.cwd(), consumeCorruptionEnvVars = true) {
4325
+ function loadSettings(workspaceDir = process.cwd(), consumeCorruptionEnvVars = true) {
4696
4326
  const opts = typeof consumeCorruptionEnvVars === "object" ? consumeCorruptionEnvVars : { consumeCorruptionEnvVars };
4697
4327
  preResolveHomeEnvOverrides();
4698
4328
  const userSettingsPath = getUserSettingsPath();
@@ -4705,21 +4335,21 @@ function loadSettings(workspaceDir = process2.cwd(), consumeCorruptionEnvVars =
4705
4335
  const systemSettingsPath = getSystemSettingsPath();
4706
4336
  const systemDefaultsPath = getSystemDefaultsPath();
4707
4337
  const migratedInMemorScopes = /* @__PURE__ */ new Set();
4708
- const resolvedWorkspaceDir = path3.resolve(workspaceDir);
4709
- const resolvedHomeDir = path3.resolve(homedir2());
4338
+ const resolvedWorkspaceDir = path2.resolve(workspaceDir);
4339
+ const resolvedHomeDir = path2.resolve(homedir());
4710
4340
  let realWorkspaceDir = resolvedWorkspaceDir;
4711
4341
  try {
4712
- realWorkspaceDir = fs4.realpathSync(resolvedWorkspaceDir);
4342
+ realWorkspaceDir = fs3.realpathSync(resolvedWorkspaceDir);
4713
4343
  } catch (_e) {
4714
4344
  }
4715
- const realHomeDir = fs4.realpathSync(resolvedHomeDir);
4345
+ const realHomeDir = fs3.realpathSync(resolvedHomeDir);
4716
4346
  const workspaceSettingsPath = new Storage(
4717
4347
  workspaceDir
4718
4348
  ).getWorkspaceSettingsPath();
4719
4349
  const loadAndMigrate = /* @__PURE__ */ __name((filePath, scope) => {
4720
4350
  try {
4721
- if (fs4.existsSync(filePath)) {
4722
- const content = fs4.readFileSync(filePath, "utf-8");
4351
+ if (fs3.existsSync(filePath)) {
4352
+ const content = fs3.readFileSync(filePath, "utf-8");
4723
4353
  let rawSettings;
4724
4354
  const corruptedPath = `${filePath}${CORRUPTED_SUFFIX}`;
4725
4355
  let corruptedSaved = false;
@@ -4731,7 +4361,7 @@ function loadSettings(workspaceDir = process2.cwd(), consumeCorruptionEnvVars =
4731
4361
  `Settings file ${filePath} has invalid JSON (${getErrorMessage(parseError)}). Resetting to empty settings.`
4732
4362
  );
4733
4363
  try {
4734
- fs4.copyFileSync(filePath, corruptedPath);
4364
+ fs3.copyFileSync(filePath, corruptedPath);
4735
4365
  corruptedSaved = true;
4736
4366
  } catch (copyError) {
4737
4367
  debugLogger2.warn(
@@ -4743,7 +4373,7 @@ function loadSettings(workspaceDir = process2.cwd(), consumeCorruptionEnvVars =
4743
4373
  debugLogger2.warn(warningMsg);
4744
4374
  if (corruptedSaved) {
4745
4375
  try {
4746
- fs4.writeFileSync(filePath, "{}", "utf-8");
4376
+ fs3.writeFileSync(filePath, "{}", "utf-8");
4747
4377
  } catch {
4748
4378
  }
4749
4379
  }
@@ -4755,12 +4385,12 @@ function loadSettings(workspaceDir = process2.cwd(), consumeCorruptionEnvVars =
4755
4385
  };
4756
4386
  }
4757
4387
  }
4758
- const envCorruptedPath = process2.env[ENV_CORRUPTED_PATH];
4388
+ const envCorruptedPath = process.env[ENV_CORRUPTED_PATH];
4759
4389
  if ((opts.consumeCorruptionEnvVars ?? true) && envCorruptedPath && envCorruptedPath === corruptedPath && scope === "User" /* User */) {
4760
4390
  corruptedSaved = true;
4761
- recoveredFromEnvVar = process2.env[ENV_WAS_RECOVERED] === "1";
4762
- delete process2.env[ENV_CORRUPTED_PATH];
4763
- delete process2.env[ENV_WAS_RECOVERED];
4391
+ recoveredFromEnvVar = process.env[ENV_WAS_RECOVERED] === "1";
4392
+ delete process.env[ENV_CORRUPTED_PATH];
4393
+ delete process.env[ENV_WAS_RECOVERED];
4764
4394
  }
4765
4395
  if (typeof rawSettings !== "object" || rawSettings === null || Array.isArray(rawSettings)) {
4766
4396
  settingsErrors.push({
@@ -4955,9 +4585,9 @@ function createSettingsUpdate(key, value) {
4955
4585
  __name(createSettingsUpdate, "createSettingsUpdate");
4956
4586
  function saveSettings(settingsFile, updates = settingsFile.originalSettings, replacePath = [], opts = {}) {
4957
4587
  try {
4958
- const dirPath = path3.dirname(settingsFile.path);
4959
- if (!fs4.existsSync(dirPath)) {
4960
- fs4.mkdirSync(dirPath, { recursive: true });
4588
+ const dirPath = path2.dirname(settingsFile.path);
4589
+ if (!fs3.existsSync(dirPath)) {
4590
+ fs3.mkdirSync(dirPath, { recursive: true });
4961
4591
  }
4962
4592
  const written = updateSettingsFilePreservingFormat(
4963
4593
  settingsFile.path,
@@ -5010,15 +4640,6 @@ export {
5010
4640
  backupSettingsFile,
5011
4641
  restoreSettingsFromBackup,
5012
4642
  cleanupSettingsBackup,
5013
- SETTINGS_DIRECTORY_NAME,
5014
- preResolveHomeEnvOverrides,
5015
- resetHomeEnvBootstrapForTesting,
5016
- resetEnvironmentTrackingForTesting,
5017
- getHomeEnvFallbackVars,
5018
- findEnvFiles,
5019
- setUpCloudShellEnvironment,
5020
- loadEnvironment,
5021
- reloadEnvironment,
5022
4643
  getUserSettingsPath,
5023
4644
  getUserSettingsDir,
5024
4645
  SETTINGS_VERSION,