@qwen-code/qwen-code 0.27.2-preview.0 → 0.27.2

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 (302) hide show
  1. package/chunks/{MaxSizedBox-XGJBXFET.js → MaxSizedBox-QRQEXRXW.js} +1 -1
  2. package/chunks/{StandaloneSessionPicker-BNFJWFLQ.js → StandaloneSessionPicker-X274Q6BX.js} +1 -1
  3. package/chunks/{acp-subagent-executor-P5FBYPD5.js → acp-subagent-executor-YIFQD4LJ.js} +1 -1
  4. package/chunks/{acpAgent-J6G57ZCE.js → acpAgent-NW4XNW7P.js} +3 -3
  5. package/chunks/{advisor-3O63GFOM.js → advisor-W7KCVPBR.js} +1 -1
  6. package/chunks/{agent-ALZEISY2.js → agent-FGDWPNXW.js} +1 -1
  7. package/chunks/{agent-headless-XAKKB6OT.js → agent-headless-7KA3VVAB.js} +1 -1
  8. package/chunks/{agent-host-client-DIV2XAL5.js → agent-host-client-YZJLSOLB.js} +1 -1
  9. package/chunks/{agent-host-connections-ZQUMCO2F.js → agent-host-connections-5JGDPG3L.js} +1 -1
  10. package/chunks/{anthropicContentGenerator-ZE7TAQPO.js → anthropicContentGenerator-QUXJVJ3I.js} +1 -1
  11. package/chunks/{autofix-pr-RZ4PWQ46.js → autofix-pr-UDRPJC7L.js} +1 -1
  12. package/chunks/{batch-AIMBHUMX.js → batch-GCEHGR5P.js} +1 -1
  13. package/chunks/{bridge-A3RRGPEI.js → bridge-JY2JXNVV.js} +1 -1
  14. package/chunks/{channel-settings-store-P3KM5GTN.js → channel-settings-store-EX6ZU6R3.js} +1 -1
  15. package/chunks/{chunk-P22U5UQR.js → chunk-27MJJU2I.js} +1 -1
  16. package/chunks/{chunk-RYRMDOIX.js → chunk-2LDABIAY.js} +3 -3
  17. package/chunks/{chunk-MYPEVUKI.js → chunk-2QZDPMIH.js} +1 -1
  18. package/chunks/{chunk-TW2REHPX.js → chunk-2SGTJMSU.js} +1 -1
  19. package/chunks/{chunk-NCW3NPS5.js → chunk-3BHXPXCC.js} +1 -1
  20. package/chunks/{chunk-XUB4JKSR.js → chunk-3NR3JBMA.js} +6 -6
  21. package/chunks/{chunk-NRJOUWP4.js → chunk-3QCFMVI6.js} +1 -1
  22. package/chunks/{chunk-EGMV4S6D.js → chunk-3YOERSU5.js} +1 -1
  23. package/chunks/{chunk-WXKD4L4A.js → chunk-4NIUXYUF.js} +1 -1
  24. package/chunks/{chunk-YHC27L5W.js → chunk-5FS5OQHO.js} +1 -1
  25. package/chunks/{chunk-L76RFQKW.js → chunk-5MGG2BGT.js} +1 -1
  26. package/chunks/{chunk-HHDQ5JAA.js → chunk-66LFVQJP.js} +1 -1
  27. package/chunks/{chunk-RJPELYUW.js → chunk-6KU7LHBT.js} +1 -1
  28. package/chunks/{chunk-SKU5J7Q7.js → chunk-6O7CARPF.js} +1 -1
  29. package/chunks/{chunk-CPOFE42B.js → chunk-6Z3TBTUS.js} +1 -1
  30. package/chunks/{chunk-HRRQHZQE.js → chunk-73TSS7KS.js} +1 -1
  31. package/chunks/{chunk-BSGONILH.js → chunk-776L3HAN.js} +1 -1
  32. package/chunks/{chunk-MZNZYCAC.js → chunk-7BL2OTHX.js} +1 -1
  33. package/chunks/{chunk-5DPLJQUC.js → chunk-7GYFDPEP.js} +1 -1
  34. package/chunks/{chunk-OD44AOSX.js → chunk-7KGCNYE4.js} +1 -1
  35. package/chunks/{chunk-4JLLFT6S.js → chunk-7SX547WS.js} +1 -1
  36. package/chunks/{chunk-5Q6POUDM.js → chunk-7VIES3RW.js} +1 -1
  37. package/chunks/{chunk-NMK72ZA4.js → chunk-ABEBQNYK.js} +1 -1
  38. package/chunks/{chunk-QZ5JBF3E.js → chunk-AD7JBW6R.js} +2 -2
  39. package/chunks/{chunk-E6XRNALG.js → chunk-AEX3XSTE.js} +1 -1
  40. package/chunks/{chunk-B7CYUTAO.js → chunk-AKDODQCI.js} +1 -1
  41. package/chunks/{chunk-EEARSY3D.js → chunk-B3I5LFFK.js} +1 -1
  42. package/chunks/{chunk-YSGVX6LT.js → chunk-B5Y56PDI.js} +1 -1
  43. package/chunks/{chunk-MEFN5DY3.js → chunk-BEBKKJP3.js} +1 -1
  44. package/chunks/{chunk-GYCGVZ32.js → chunk-BFPP7X4E.js} +1 -1
  45. package/chunks/{chunk-GNWPYWGQ.js → chunk-BY5GX6DQ.js} +1 -1
  46. package/chunks/{chunk-6W5ZZSQF.js → chunk-CUX3C6QV.js} +1 -1
  47. package/chunks/{chunk-HXYHIEMH.js → chunk-CXPRHT3E.js} +1 -1
  48. package/chunks/{chunk-53CWA7N2.js → chunk-D5H5GARR.js} +1 -1
  49. package/chunks/{chunk-DV67DRNT.js → chunk-DLY7QJ5Y.js} +1 -1
  50. package/chunks/{chunk-SFDOJ2FF.js → chunk-DN4QKOFL.js} +1 -1
  51. package/chunks/{chunk-VOAIDOUV.js → chunk-DP4YE24V.js} +1 -1
  52. package/chunks/{chunk-D2X6A5FH.js → chunk-DQLI7HH7.js} +1 -1
  53. package/chunks/{chunk-ET7ADS4X.js → chunk-DS2FKATN.js} +1 -1
  54. package/chunks/{chunk-FRSSRLIO.js → chunk-E6EW43WZ.js} +1 -1
  55. package/chunks/{chunk-F4AWT5LV.js → chunk-EEBFFC76.js} +1 -1
  56. package/chunks/{chunk-B7PJ5TNK.js → chunk-EGKUF5NS.js} +2 -2
  57. package/chunks/{chunk-B2YLVSQE.js → chunk-ERMAKXS3.js} +2 -2
  58. package/chunks/{chunk-PEZZTKPM.js → chunk-FB73O3E5.js} +1 -1
  59. package/chunks/{chunk-36DBNBTF.js → chunk-FEIUMWFA.js} +1 -1
  60. package/chunks/{chunk-YE3LA3U4.js → chunk-FWJKQA2H.js} +1 -1
  61. package/chunks/{chunk-VDNPMX5W.js → chunk-FZQJOSHD.js} +1 -1
  62. package/chunks/{chunk-YYSMMFK7.js → chunk-GNI5J2ON.js} +1 -1
  63. package/chunks/{chunk-6OCKLRQC.js → chunk-H3VGRICV.js} +1 -1
  64. package/chunks/{chunk-OSLFWRV2.js → chunk-HRTWLOGK.js} +1 -1
  65. package/chunks/{chunk-XZYQKCTU.js → chunk-IGIZ6AZE.js} +1 -1
  66. package/chunks/{chunk-RIBVEHUG.js → chunk-IHB7CDQ2.js} +1 -1
  67. package/chunks/{chunk-LO6OFMFC.js → chunk-IHEGGZBE.js} +1 -1
  68. package/chunks/{chunk-N5S6SIRO.js → chunk-IMTHBYJP.js} +1 -1
  69. package/chunks/{chunk-I5F24CVP.js → chunk-IP3K5SRR.js} +1 -1
  70. package/chunks/{chunk-2FYWJVGW.js → chunk-ISA4MFNT.js} +1 -1
  71. package/chunks/{chunk-GV3E2RHX.js → chunk-JGF3ND5D.js} +1 -1
  72. package/chunks/{chunk-ASQ7BSJ4.js → chunk-JJ4UPR4A.js} +1 -1
  73. package/chunks/{chunk-HOCNE2LO.js → chunk-JTUWFGEB.js} +1 -1
  74. package/chunks/{chunk-FDQFJFO5.js → chunk-KAN5KUJD.js} +1 -1
  75. package/chunks/{chunk-K7GCWWTI.js → chunk-KU4F6SSJ.js} +2 -2
  76. package/chunks/{chunk-QDQQFQB4.js → chunk-LBAINHIN.js} +1 -1
  77. package/chunks/{chunk-BAPIZCC7.js → chunk-LTJLPYFS.js} +1 -1
  78. package/chunks/{chunk-ZOUMCSDW.js → chunk-MSNPEQ2I.js} +1 -1
  79. package/chunks/{chunk-MPDGSR2S.js → chunk-N3YWQWSR.js} +5 -5
  80. package/chunks/{chunk-VEVQB4CI.js → chunk-NDTPBVER.js} +1 -1
  81. package/chunks/{chunk-L4WG2XDS.js → chunk-NJ77L3GS.js} +1 -1
  82. package/chunks/{chunk-U2DX235N.js → chunk-NL62UQDW.js} +1 -1
  83. package/chunks/{chunk-QASJXL5B.js → chunk-NYXR2655.js} +1 -1
  84. package/chunks/{chunk-5SPQ5V35.js → chunk-OEPXWKZL.js} +1 -1
  85. package/chunks/{chunk-EOR7AP7Z.js → chunk-OIKWJN7E.js} +1 -1
  86. package/chunks/{chunk-BT7V3O75.js → chunk-OIQKVWR7.js} +1 -1
  87. package/chunks/{chunk-ESXBBANA.js → chunk-OPBSEVFC.js} +1 -1
  88. package/chunks/{chunk-NW3H676V.js → chunk-P5RBFVMP.js} +1 -1
  89. package/chunks/{chunk-F7KVMGGZ.js → chunk-QD4KNY2J.js} +1 -1
  90. package/chunks/{chunk-2ZE6CAZV.js → chunk-RSLBGXPB.js} +1 -1
  91. package/chunks/{chunk-3R7NEEW7.js → chunk-S542WTV7.js} +1 -1
  92. package/chunks/{chunk-KXAZ2Z5M.js → chunk-SEK234IM.js} +1 -1
  93. package/chunks/{chunk-5DPXLL3H.js → chunk-TM6IVXAM.js} +1 -1
  94. package/chunks/{chunk-KMJLEAS3.js → chunk-TPTV6HPU.js} +1 -1
  95. package/chunks/{chunk-DCUBMMWG.js → chunk-TQ6FKWSC.js} +1 -1
  96. package/chunks/{chunk-JK2S74SA.js → chunk-TUBHG6EI.js} +1 -1
  97. package/chunks/{chunk-FMZ5U7J5.js → chunk-UBPC3F32.js} +1 -1
  98. package/chunks/{chunk-XB7DJWOJ.js → chunk-UG5B4UOQ.js} +6 -6
  99. package/chunks/{chunk-36S57YYW.js → chunk-UGWTN5IK.js} +1 -1
  100. package/chunks/{chunk-SK2DTYBZ.js → chunk-URMRX2MG.js} +1 -1
  101. package/chunks/{chunk-VB4DB57C.js → chunk-UY6J5CHF.js} +1 -1
  102. package/chunks/{chunk-STQ3TEZW.js → chunk-VSTQT667.js} +2 -2
  103. package/chunks/{chunk-SGUUOXLH.js → chunk-WDO33SWR.js} +1 -1
  104. package/chunks/{chunk-IVXR5JO2.js → chunk-WFJHBU7B.js} +1 -1
  105. package/chunks/{chunk-BINJRUHZ.js → chunk-XSRHGC5R.js} +1 -1
  106. package/chunks/{chunk-HN7EGFIP.js → chunk-XVF3FMTM.js} +1 -1
  107. package/chunks/{chunk-C5X6K67T.js → chunk-XYRNYCRQ.js} +1 -1
  108. package/chunks/{chunk-HZOPWFFL.js → chunk-YAMLF3SM.js} +1 -1
  109. package/chunks/{chunk-CMW64XU2.js → chunk-ZEZCRRQC.js} +1 -1
  110. package/chunks/{chunk-J5W6P7QD.js → chunk-ZF56DRDP.js} +1 -1
  111. package/chunks/{chunk-LHIEE3A2.js → chunk-ZSPOFXP3.js} +1 -1
  112. package/chunks/{chunk-Q6CXEN4H.js → chunk-ZZXAOGUV.js} +1 -1
  113. package/chunks/{codex-subagent-executor-HB3MUCY4.js → codex-subagent-executor-7RAVQBYA.js} +1 -1
  114. package/chunks/{config-utils-F7OF5UR2.js → config-utils-JFD4RJK3.js} +1 -1
  115. package/chunks/{contextCommand-Y3KO2FY6.js → contextCommand-U6CD3CW7.js} +1 -1
  116. package/chunks/{core-runtime-D7DAA5NY.js → core-runtime-ORCZRJ4O.js} +1 -1
  117. package/chunks/{create-sub-session-2HTWYAP4.js → create-sub-session-57WMU2AE.js} +1 -1
  118. package/chunks/{cron-create-Y5I6E2X4.js → cron-create-V466MOUE.js} +1 -1
  119. package/chunks/{daemon-git-worktree-guard-UOBMXOUC.js → daemon-git-worktree-guard-ATD77XOF.js} +1 -1
  120. package/chunks/{daemon-status-provider-L2225KDS.js → daemon-status-provider-5FVRNMAZ.js} +1 -1
  121. package/chunks/{daemon-trust-policy-5D52N5GL.js → daemon-trust-policy-6YRQV4ZM.js} +1 -1
  122. package/chunks/{daemon-trust-policy-monitor-RUE25K7A.js → daemon-trust-policy-monitor-QRUOWZQP.js} +1 -1
  123. package/chunks/{deferred-core-runtime-6BO5DI5B.js → deferred-core-runtime-TXIXMDDH.js} +1 -1
  124. package/chunks/{edit-B6DKSK3O.js → edit-FNXBINJ3.js} +1 -1
  125. package/chunks/{enterPlanMode-WVJ3XC3P.js → enterPlanMode-YMLAOTTS.js} +1 -1
  126. package/chunks/{environment-7WMACN3E.js → environment-RFNJLRF7.js} +1 -1
  127. package/chunks/{errors-BN73QF2O.js → errors-NHGSZ2BV.js} +1 -1
  128. package/chunks/{execution-tool-IGDH3MQT.js → execution-tool-L2BF6ZKP.js} +1 -1
  129. package/chunks/{execution-worker-WWP3JZGV.js → execution-worker-F5B2BI2W.js} +1 -1
  130. package/chunks/{exitPlanMode-7WHKOTS7.js → exitPlanMode-ZZVBF5V4.js} +1 -1
  131. package/chunks/{fast-path-B37HGFQO.js → fast-path-TOJYOAD3.js} +1 -1
  132. package/chunks/{glob-ZRXU5G5X.js → glob-SYPMYU4V.js} +1 -1
  133. package/chunks/{goal-tools-DQ5IZXCM.js → goal-tools-NOXNXZFR.js} +1 -1
  134. package/chunks/{handleAutoUpdate-FD7QAG2R.js → handleAutoUpdate-RS6Y2IWS.js} +1 -1
  135. package/chunks/{i18n-TI3ZCEHR.js → i18n-WWZD25J5.js} +1 -1
  136. package/chunks/{initializer-SB7P3LRU.js → initializer-YGR4YXAM.js} +1 -1
  137. package/chunks/{installationInfo-B337C7R4.js → installationInfo-EPURVILN.js} +1 -1
  138. package/chunks/{interactive-mod-session-OWRMETPP.js → interactive-mod-session-2VSTTHPA.js} +1 -1
  139. package/chunks/{list-2QKQIEOB.js → list-6JAKVRMZ.js} +1 -1
  140. package/chunks/{llm-GQ76E4DL.js → llm-V272EOVL.js} +4 -4
  141. package/chunks/{llm-content-generator-2A23HFLD.js → llm-content-generator-EXMC3NYS.js} +1 -1
  142. package/chunks/{loadedSettingsAdapter-RGQOA5BG.js → loadedSettingsAdapter-T6W2CKFA.js} +1 -1
  143. package/chunks/{local-OEBLERSJ.js → local-NUBKA3T2.js} +1 -1
  144. package/chunks/{local-execution-environment-FT5J4SUH.js → local-execution-environment-WO62QDKJ.js} +1 -1
  145. package/chunks/{loggingContentGenerator-WC23RZYM.js → loggingContentGenerator-KHRN6S3S.js} +1 -1
  146. package/chunks/{loop-wakeup-GIIIDUNG.js → loop-wakeup-TTAZMOYH.js} +1 -1
  147. package/chunks/{manage-memory-E2OAR2RV.js → manage-memory-BKA7QM4N.js} +1 -1
  148. package/chunks/{managed-execution-engine-CYYNVVP5.js → managed-execution-engine-32BLALNC.js} +1 -1
  149. package/chunks/{managed-local-serve-TUVNNY7K.js → managed-local-serve-UTJFLZI6.js} +1 -1
  150. package/chunks/{managed-npm-update-IDRZ32UK.js → managed-npm-update-XPIRAQ47.js} +1 -1
  151. package/chunks/{managed-runtime-attestation-worker-HON7TGY2.js → managed-runtime-attestation-worker-DDU4HUGS.js} +1 -1
  152. package/chunks/{managed-runtime-bootstrap-OMLX5CTV.js → managed-runtime-bootstrap-7TTCLDQJ.js} +1 -1
  153. package/chunks/{managed-runtime-session-worker-J3P7WMDW.js → managed-runtime-session-worker-WBYLRXU3.js} +1 -1
  154. package/chunks/{managed-runtime-ssh-worker-LPFPOBTL.js → managed-runtime-ssh-worker-X2U2OK2E.js} +1 -1
  155. package/chunks/{managed-session-authority-I5OHOM7N.js → managed-session-authority-U76OGS6U.js} +1 -1
  156. package/chunks/{mcp-CGDIDRDI.js → mcp-UROGTJ3U.js} +1 -1
  157. package/chunks/{memory-VKXOH5UM.js → memory-M4OF6FV7.js} +1 -1
  158. package/chunks/{model-call-collection-ZTYFDFBB.js → model-call-collection-TW6Q7SXP.js} +1 -1
  159. package/chunks/{model-configuration-EXLM4SD3.js → model-configuration-4PJUBAYR.js} +1 -1
  160. package/chunks/{modelConfigUtils-XDMB6XPY.js → modelConfigUtils-ARMBTDAK.js} +1 -1
  161. package/chunks/{monitor-LKKCC6MQ.js → monitor-URMSEGAJ.js} +1 -1
  162. package/chunks/{nonInteractiveCli-J3Z3IZIF.js → nonInteractiveCli-YHOC5KZF.js} +1 -1
  163. package/chunks/{nonInteractiveToolExecutor-UQTMGYN2.js → nonInteractiveToolExecutor-DM5IGBP7.js} +1 -1
  164. package/chunks/{notebook-edit-JFD2KDI6.js → notebook-edit-3YSG73BK.js} +1 -1
  165. package/chunks/{omni-CI5JTMPR.js → omni-J6YYWKII.js} +1 -1
  166. package/chunks/{openaiContentGenerator-YZOV2TQX.js → openaiContentGenerator-UIFSPMTE.js} +1 -1
  167. package/chunks/{openaiResponsesContentGenerator-AHL7V6TE.js → openaiResponsesContentGenerator-U6Q536RZ.js} +1 -1
  168. package/chunks/{pidfile-ULOUTG67.js → pidfile-WCZE5ONH.js} +1 -1
  169. package/chunks/{processUtils-XX62FVFO.js → processUtils-3CDEN2GV.js} +1 -1
  170. package/chunks/{prompt-terminal-ledger-L6CWXBAW.js → prompt-terminal-ledger-VAQC6TC3.js} +1 -1
  171. package/chunks/{qwenContentGenerator-ZDXJW7EM.js → qwenContentGenerator-RWBGMON6.js} +1 -1
  172. package/chunks/{reactive-degrade-4OJ7XKSJ.js → reactive-degrade-GOTSVZKO.js} +1 -1
  173. package/chunks/{read-file-H6I32UZS.js → read-file-WNNTTHL5.js} +1 -1
  174. package/chunks/{resumeHistoryUtils-CTRMXPKQ.js → resumeHistoryUtils-UAGV4TC3.js} +1 -1
  175. package/chunks/{review-7SV2M7EL.js → review-JETUJT7N.js} +1 -1
  176. package/chunks/{ripGrep-Y2TGCQH5.js → ripGrep-OJNMOYPD.js} +1 -1
  177. package/chunks/{run-qwen-serve-6SWKYY6I.js → run-qwen-serve-BVNSBOLL.js} +1 -1
  178. package/chunks/{runtime-ITZIIC6D.js → runtime-CERVMTEG.js} +1 -1
  179. package/chunks/{sandboxConfig-FF2YF3RY.js → sandboxConfig-ZHW3GTMH.js} +1 -1
  180. package/chunks/{scheduled-tasks-WWPWNM3Y.js → scheduled-tasks-AAB5OESY.js} +1 -1
  181. package/chunks/{scheduler-ELSUH4GZ.js → scheduler-4ZZA357S.js} +1 -1
  182. package/chunks/{search-memory-465ZSHKG.js → search-memory-USJ3D7WQ.js} +1 -1
  183. package/chunks/{send-message-M5JFT3VH.js → send-message-QE2YZZ6M.js} +1 -1
  184. package/chunks/{serve-VTR7PTK2.js → serve-SX2PK3OZ.js} +1 -1
  185. package/chunks/{server-5NHPPEPR.js → server-OGTIIX65.js} +3 -3
  186. package/chunks/{session-HZLRQKEB.js → session-DXORIQDK.js} +1 -1
  187. package/chunks/{session-attachments-root-LS5Q4OT3.js → session-attachments-root-VHH2OZF6.js} +1 -1
  188. package/chunks/{session-execution-engine-selector-GS4LJPUU.js → session-execution-engine-selector-5WKZ6WXX.js} +1 -1
  189. package/chunks/{session-pr-refresh-FKYCCTWD.js → session-pr-refresh-MHXNT44I.js} +1 -1
  190. package/chunks/{sessionService-XUBKN4CM.js → sessionService-QDDGXOB7.js} +1 -1
  191. package/chunks/{settings-BFTTGWJN.js → settings-W3ALYJZM.js} +1 -1
  192. package/chunks/{shell-YEUMIQVE.js → shell-YROF2KXZ.js} +1 -1
  193. package/chunks/{skill-2MJ7S5SK.js → skill-CBEQAUIQ.js} +1 -1
  194. package/chunks/{skill-settings-DP7A2GMB.js → skill-settings-YRN4SHJO.js} +1 -1
  195. package/chunks/{spawnChannel-3IZ7S6U7.js → spawnChannel-M7Q6URLT.js} +1 -1
  196. package/chunks/{standalone-update-NAI3OI3P.js → standalone-update-WIRHMWE6.js} +1 -1
  197. package/chunks/{start-opentui-ui-D6ETKJSG.js → start-opentui-ui-OLHWNKCY.js} +1 -1
  198. package/chunks/{startInteractiveUI-FR5ZT72L.js → startInteractiveUI-KCHCIQWO.js} +1 -1
  199. package/chunks/{subscription-content-generator-JHU5YG2L.js → subscription-content-generator-YQLQKG6S.js} +1 -1
  200. package/chunks/{team-create-ZW3NXJ2M.js → team-create-I432CHIX.js} +1 -1
  201. package/chunks/{team-plan-approval-GPFOKUEV.js → team-plan-approval-APMPMLXS.js} +1 -1
  202. package/chunks/{terminal-image-renderer-WTEEKRMJ.js → terminal-image-renderer-3BNICGAX.js} +1 -1
  203. package/chunks/{theme-manager-STF74SF2.js → theme-manager-6KY7Q4ZR.js} +1 -1
  204. package/chunks/{tool-call-TVX5UHRJ.js → tool-call-QGOVXOVJ.js} +1 -1
  205. package/chunks/{tool-result-media-QALAETZ4.js → tool-result-media-LRSYJOND.js} +1 -1
  206. package/chunks/{tool-search-ZGJEYTBI.js → tool-search-HXP25AWV.js} +1 -1
  207. package/chunks/{total-session-admission-BOYLCRYA.js → total-session-admission-ISTRHUQ7.js} +1 -1
  208. package/chunks/{trustedFolders-65OZWLQO.js → trustedFolders-5BXMWMYB.js} +1 -1
  209. package/chunks/{update-relaunch-4LJ3SY6L.js → update-relaunch-NYGYYLSC.js} +1 -1
  210. package/chunks/{updateCheck-2QOAKEIH.js → updateCheck-UBLS3LUD.js} +1 -1
  211. package/chunks/{upload-config-5N7UDWC6.js → upload-config-Y372LVXX.js} +1 -1
  212. package/chunks/{useAutoAcceptIndicator-V37CGGMF.js → useAutoAcceptIndicator-RXZJRU74.js} +1 -1
  213. package/chunks/{validateNonInterActiveAuth-6ZTVWZ6W.js → validateNonInterActiveAuth-2GJ4ICJ3.js} +1 -1
  214. package/chunks/{version-EO3VIRH6.js → version-XRSNVEB2.js} +1 -1
  215. package/chunks/{web-fetch-B6LNZ2YK.js → web-fetch-B4VFVGWW.js} +1 -1
  216. package/chunks/{web-search-VIPZWUJX.js → web-search-3DSQWMAV.js} +1 -1
  217. package/chunks/{workflow-W5QEAOGN.js → workflow-RCCH5FPV.js} +1 -1
  218. package/chunks/{workflow-ancestor-trust-VE7B4RD2.js → workflow-ancestor-trust-N3QYH3OL.js} +1 -1
  219. package/chunks/{workspace-agents-D32D3K5S.js → workspace-agents-KEV4VBZD.js} +1 -1
  220. package/chunks/{workspace-providers-status-BOH7RJPV.js → workspace-providers-status-HW4VI4T7.js} +1 -1
  221. package/chunks/{workspace-recovery-worker-53GJWYJ5.js → workspace-recovery-worker-C3SSJ64A.js} +1 -1
  222. package/chunks/{workspace-registration-store-BMX2NT45.js → workspace-registration-store-K7VEBHIU.js} +1 -1
  223. package/chunks/{workspace-registry-SS2NKLEL.js → workspace-registry-C5ZPYT4P.js} +1 -1
  224. package/chunks/{workspace-runtime-coordinator-7ZKVLJDC.js → workspace-runtime-coordinator-ALWOLW3N.js} +1 -1
  225. package/chunks/{workspace-service-GIUD3D25.js → workspace-service-TNZJAC7M.js} +1 -1
  226. package/chunks/{workspace-skills-status-36A76TDX.js → workspace-skills-status-TI763F5M.js} +1 -1
  227. package/chunks/{workspace-trust-reconciler-VKKSY2AR.js → workspace-trust-reconciler-6UQ7HSUG.js} +1 -1
  228. package/chunks/{write-file-43JOGU55.js → write-file-2XXEHBZR.js} +1 -1
  229. package/chunks/{zoom-image-USUXATDM.js → zoom-image-P3E3V6PQ.js} +1 -1
  230. package/cli.js +2 -2
  231. package/execution-worker.js +1 -1
  232. package/export-transcript-document.js +1 -1
  233. package/package.json +3 -3
  234. package/web-shell/assets/{PierreFilePreview-Dx075_VT.js → PierreFilePreview-DtTOu9VE.js} +1 -1
  235. package/web-shell/assets/{SpreadsheetPreview-l2R-Y1o6.js → SpreadsheetPreview-C21imJIX.js} +1 -1
  236. package/web-shell/assets/{WorkspaceFileBrowser-CGi_eR1a.js → WorkspaceFileBrowser-DIWHfhtl.js} +1 -1
  237. package/web-shell/assets/{abnfDiagram-VCTEODGH-DZPHyWbH.js → abnfDiagram-VCTEODGH-qffA9juk.js} +1 -1
  238. package/web-shell/assets/{agents-route-Bp0Yjhm4.js → agents-route-4f6fKJaY.js} +1 -1
  239. package/web-shell/assets/{arc-BAS_Ct0z.js → arc-BOZg4dn0.js} +1 -1
  240. package/web-shell/assets/{architectureDiagram-5GKGNRK7-C5a7ooE1.js → architectureDiagram-5GKGNRK7-BOYWC6dJ.js} +1 -1
  241. package/web-shell/assets/{blockDiagram-NRAW4CY4-D-Wzzi9Z.js → blockDiagram-NRAW4CY4-CiN_IMJ7.js} +1 -1
  242. package/web-shell/assets/{c4Diagram-UCG6FXSJ-BiYnmYkI.js → c4Diagram-UCG6FXSJ-WYLA0JW0.js} +1 -1
  243. package/web-shell/assets/channel-DtcoR96T.js +1 -0
  244. package/web-shell/assets/{chunk-2Q5K7J3B-DHi3a_yf.js → chunk-2Q5K7J3B-BZUPB745.js} +1 -1
  245. package/web-shell/assets/{chunk-5VM5RSS4-DKgiHWPM.js → chunk-5VM5RSS4-BHfjsu8x.js} +1 -1
  246. package/web-shell/assets/{chunk-F27PBJKO-qvFMzdl_.js → chunk-F27PBJKO-DHtQsOyA.js} +1 -1
  247. package/web-shell/assets/{chunk-G27WJ6UU-C9Apl4Df.js → chunk-G27WJ6UU-DvEX_QHY.js} +1 -1
  248. package/web-shell/assets/{chunk-JWPE2WC7-ManrSgDL.js → chunk-JWPE2WC7-CwQJmw1a.js} +1 -1
  249. package/web-shell/assets/{chunk-LCL6LL3I-DNZqkjQu.js → chunk-LCL6LL3I-Cv7bRuRV.js} +1 -1
  250. package/web-shell/assets/{chunk-POPQ4Y6H-CxineRE8.js → chunk-POPQ4Y6H-zGw4PzDB.js} +1 -1
  251. package/web-shell/assets/{chunk-SVP7TREG-BzmCQ6Bh.js → chunk-SVP7TREG-DZMGVnJg.js} +1 -1
  252. package/web-shell/assets/{chunk-XXDRQBXY-Dm6Ascgd.js → chunk-XXDRQBXY-Dg5_qrTq.js} +1 -1
  253. package/web-shell/assets/classDiagram-DTDB5LWJ-CBq-DXYQ.js +1 -0
  254. package/web-shell/assets/classDiagram-v2-JRS7N3AN-CBq-DXYQ.js +1 -0
  255. package/web-shell/assets/{cose-bilkent-JH36ORCC-Cs-vIewG.js → cose-bilkent-JH36ORCC-D07aXZdD.js} +1 -1
  256. package/web-shell/assets/{cynefin-OW5HDTMX-CrxyzLrG.js → cynefin-OW5HDTMX-B4txjD0l.js} +1 -1
  257. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-Bf7RdtX4.js → cynefinDiagram-5FMLGOSQ-zFtLauJ6.js} +1 -1
  258. package/web-shell/assets/{dagre-3AP2YEHR-jN7qDhRR.js → dagre-3AP2YEHR-CKZj9zbB.js} +1 -1
  259. package/web-shell/assets/{diagram-S7CK7UJ4-KcNQ38Ue.js → diagram-S7CK7UJ4-DIsLTku6.js} +1 -1
  260. package/web-shell/assets/{diagram-UQ7AKVKN-9VmCS0SV.js → diagram-UQ7AKVKN-60CC00CO.js} +1 -1
  261. package/web-shell/assets/{diagram-VSXAHHWV-D-MA8NCD.js → diagram-VSXAHHWV-BCfHqY7L.js} +1 -1
  262. package/web-shell/assets/{diagram-VX7I27RA-323tLIBS.js → diagram-VX7I27RA-BbTOx9qC.js} +1 -1
  263. package/web-shell/assets/{diagram-Z3DM3KII-C547h61H.js → diagram-Z3DM3KII-DLjgnodz.js} +1 -1
  264. package/web-shell/assets/{docx-preview-DHO0seXT.js → docx-preview-CfGqg6IJ.js} +1 -1
  265. package/web-shell/assets/{ebnfDiagram-PWID7BFC-DfB8wLF5.js → ebnfDiagram-PWID7BFC-Cf1IQbGo.js} +1 -1
  266. package/web-shell/assets/{erDiagram-SSCWMZ5O-tzqYkCjp.js → erDiagram-SSCWMZ5O-BTVNpu1y.js} +1 -1
  267. package/web-shell/assets/{flowDiagram-A5DVABFB-Dsw6uHjD.js → flowDiagram-A5DVABFB-BC404IkJ.js} +1 -1
  268. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-D1SaF3O0.js → ganttDiagram-EL5Y4UJY-BHP58V1Y.js} +1 -1
  269. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-D0EzECMT.js → gitGraphDiagram-WWUBYQGX-s1PkjMd4.js} +1 -1
  270. package/web-shell/assets/{index-ob2Iut7D.js → index-DZnv4pXI.js} +6 -6
  271. package/web-shell/assets/{index-C-YHF5xI.js → index-YpdTDWts.js} +1 -1
  272. package/web-shell/assets/{infoDiagram-RXCK75RN-6NnYMmcC.js → infoDiagram-RXCK75RN-DDaQbbGu.js} +1 -1
  273. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-BnxsfuuS.js → ishikawaDiagram-5VMMS53U-FpQWCzWS.js} +1 -1
  274. package/web-shell/assets/{journeyDiagram-EYS64GPL-DduswigY.js → journeyDiagram-EYS64GPL-CC5YG1zk.js} +1 -1
  275. package/web-shell/assets/{kanban-definition-3QL26DDD-D0trNRAQ.js → kanban-definition-3QL26DDD-CsitCmSH.js} +1 -1
  276. package/web-shell/assets/{layout-nP-pCdd_.js → layout-DR8LNzXS.js} +1 -1
  277. package/web-shell/assets/{linear-DCw4lqG9.js → linear-Dt61H2xY.js} +1 -1
  278. package/web-shell/assets/{mermaid.core-DYjTp4Sk.js → mermaid.core-C3SdL30W.js} +6 -6
  279. package/web-shell/assets/{mindmap-definition-FBJOCRG2-BK9iSa2V.js → mindmap-definition-FBJOCRG2-BjxTLs9R.js} +1 -1
  280. package/web-shell/assets/{pegDiagram-XKGWAZYB-Dg0TQ1Ty.js → pegDiagram-XKGWAZYB-eBurSwq6.js} +1 -1
  281. package/web-shell/assets/{pieDiagram-E7YTZNPT-DKeqeVkg.js → pieDiagram-E7YTZNPT-BFWkbtZz.js} +1 -1
  282. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-C4zBeQXd.js → quadrantDiagram-AXDQQJYC-SThzXP6T.js} +1 -1
  283. package/web-shell/assets/{railroadDiagram-O6MQD6OU-jDnAGU3z.js → railroadDiagram-O6MQD6OU-D73YId-T.js} +1 -1
  284. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-D0sIdHq4.js → requirementDiagram-EFPCY7ZU-YecInWjM.js} +1 -1
  285. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-BFz_QzXx.js → sankeyDiagram-P5KCCOFB-D4Gl35cC.js} +1 -1
  286. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-DhDmjiCT.js → sequenceDiagram-WJ2MYXX4-C1JdJSRH.js} +1 -1
  287. package/web-shell/assets/{sizeCapture-X5ZJPWSS-D8Ov3K_0.js → sizeCapture-X5ZJPWSS-D3mHX34v.js} +1 -1
  288. package/web-shell/assets/{stateDiagram-HBIQ2CUA-Bb4f1ILo.js → stateDiagram-HBIQ2CUA-BR05d7ll.js} +1 -1
  289. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BBhqVmOU.js +1 -0
  290. package/web-shell/assets/{swimlanes-XN3QIQJK-CQyilPoS.js → swimlanes-XN3QIQJK-CENq9EQ7.js} +1 -1
  291. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DI8ON7to.js +8 -0
  292. package/web-shell/assets/{timeline-definition-24CTP7MA-B_CntdLT.js → timeline-definition-24CTP7MA-DFhKdLgc.js} +1 -1
  293. package/web-shell/assets/{vennDiagram-4TSXK5OY-BbuHkADM.js → vennDiagram-4TSXK5OY-C-p5h-ue.js} +1 -1
  294. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-0mNKcB-T.js → wardleyDiagram-VM6X3IG4-BCWSjHZH.js} +1 -1
  295. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-BL-rMOQs.js → xychartDiagram-S5SC5T6Z-DBvE_Y0y.js} +1 -1
  296. package/web-shell/index.html +1 -1
  297. package/web-shell/sw.js +1 -1
  298. package/web-shell/assets/channel-B31dxYCL.js +0 -1
  299. package/web-shell/assets/classDiagram-DTDB5LWJ-CxU_Ty2M.js +0 -1
  300. package/web-shell/assets/classDiagram-v2-JRS7N3AN-CxU_Ty2M.js +0 -1
  301. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-xbht8Czs.js +0 -1
  302. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Dz34bASJ.js +0 -8
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{sanitizeFilenameForDisplay,truncateToWidth}from"./chunk-64CA3W6G.js";import{t}from"./chunk-HRRQHZQE.js";import{isCompressionFailureStatus}from"./chunk-XUB4JKSR.js";import{fetchGitDiff}from"./chunk-B4ZATWBT.js";import{skillRestrictionNames}from"./chunk-CV2UAEZA.js";import{findProviderByCredentials,resolveMetadataKey}from"./chunk-N3AKLLXG.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();var formatRelativeTime=__name(timestamp=>{const now=Date.now();const diffMs=now-timestamp;const seconds=Math.floor(diffMs/1e3);const minutes=Math.floor(seconds/60);const hours=Math.floor(minutes/60);const days=Math.floor(hours/24);const weeks=Math.floor(days/7);const months=Math.floor(days/30);if(months>0){return months===1?"1 month ago":`${months} months ago`}if(weeks>0){return weeks===1?"1 week ago":`${weeks} weeks ago`}if(days>0){return days===1?"1 day ago":`${days} days ago`}if(hours>0){return hours===1?"1 hour ago":`${hours} hours ago`}if(minutes>0){return minutes===1?"1 minute ago":`${minutes} minutes ago`}return"just now"},"formatRelativeTime");var formatClockTime=__name(timestamp=>`[${new Date(timestamp).toLocaleTimeString("en-US",{hour12:false,hour:"2-digit",minute:"2-digit",second:"2-digit"})}]`,"formatClockTime");var formatTokenCount=__name(count=>{if(count<1e3){return`${count}`}if(count<1e4){return`${(count/1e3).toFixed(1)}k`}return`${Math.floor(count/1e3)}k`},"formatTokenCount");var formatPercentageUsed=__name(percentage=>{if(percentage>1){return">100"}return(percentage*100).toFixed(1)},"formatPercentageUsed");var contextUsageLabel=__name(terminalWidth=>terminalWidth<100?t("% used"):t("% context used"),"contextUsageLabel");var formatDuration=__name((milliseconds,options)=>{if(milliseconds<=0){return"0s"}if(milliseconds<1e3){return`${Math.round(milliseconds)}ms`}const totalSeconds=milliseconds/1e3;if(totalSeconds<60){const formatted=totalSeconds.toFixed(1);if(parseFloat(formatted)>=60){return"1m"}if(options?.hideTrailingZeros&&formatted.endsWith(".0")){return`${formatted.slice(0,-2)}s`}return`${formatted}s`}const hours=Math.floor(totalSeconds/3600);const minutes=Math.floor(totalSeconds%3600/60);const seconds=Math.floor(totalSeconds%60);const parts=[];if(hours>0){parts.push(`${hours}h`)}if(minutes>0){parts.push(`${minutes}m`)}if(seconds>0){parts.push(`${seconds}s`)}if(parts.length===0){if(hours>0)return`${hours}h`;if(minutes>0)return`${minutes}m`;return`${seconds}s`}return parts.join(" ")},"formatDuration");init_esbuild_shims();var formatCompressionTokenCount=__name((count,isEstimated)=>isEstimated?`~${count}`:String(count),"formatCompressionTokenCount");function getCompressionStatusText({isPending,originalTokenCount,newTokenCount,compressionStatus,originalTokenCountIsEstimated,newTokenCountIsEstimated}){if(isPending){return t("Compressing chat history")}const originalTokens=originalTokenCount??0;const newTokens=newTokenCount??0;switch(compressionStatus){case 1:return t("Chat history compressed from {{originalTokens}} to {{newTokens}} tokens.",{originalTokens:formatCompressionTokenCount(originalTokens,originalTokenCountIsEstimated),newTokens:formatCompressionTokenCount(newTokens,newTokenCountIsEstimated)});case 2:if(originalTokens<5e4){return t("Compression was not beneficial for this history size.")}return t("Chat history compression did not reduce size. This may indicate issues with the compression prompt.");case 3:return t("Could not compress chat history due to a token counting error.");case 4:return t("Could not compress chat history because the compression summary was empty.");case 6:return t("Could not compress chat history because the compression summary was truncated.");case 7:return t("Could not compress chat history due to an API error.");case 5:return"Nothing to compress.";default:return""}}__name(getCompressionStatusText,"getCompressionStatusText");function getCompressionFailureStatusText(options){if(!isCompressionFailureStatus(options.compressionStatus)){return t("Failed to compress chat history.")}return getCompressionStatusText({...options,isPending:false})||t("Failed to compress chat history.")}__name(getCompressionFailureStatusText,"getCompressionFailureStatusText");init_esbuild_shims();function getSystemInfoFields(info){const fields=[];addField(fields,t("Qwen Code"),formatCliVersion(info));addField(fields,t("Runtime"),formatRuntime(info));addField(fields,t("IDE Client"),info.ideClient);addField(fields,"LSP",info.lspStatus??"");addField(fields,t("OS"),formatOs(info));addField(fields,t("Auth"),formatAuth(info));addField(fields,t("Base URL"),formatBaseUrl(info));addField(fields,t("Model"),info.modelVersion);addField(fields,t("Fast Model"),info.fastModel||info.modelVersion);addField(fields,t("Session ID"),info.sessionId);addField(fields,t("Sandbox"),info.sandboxEnv);addField(fields,t("Proxy"),formatProxy(info.proxy));addField(fields,t("Memory Usage"),info.memoryUsage);return fields}__name(getSystemInfoFields,"getSystemInfoFields");function addField(fields,label,value){if(value){fields.push({label,value})}}__name(addField,"addField");function formatCliVersion(info){if(!info.cliVersion){return""}if(!info.gitCommit){return info.cliVersion}return`${info.cliVersion} (${info.gitCommit})`}__name(formatCliVersion,"formatCliVersion");function formatRuntime(info){if(!info.nodeVersion&&!info.npmVersion){return""}const node=info.nodeVersion?`Node.js ${info.nodeVersion}`:"";const npm=info.npmVersion?`npm ${info.npmVersion}`:"";return joinParts([node,npm]," / ")}__name(formatRuntime,"formatRuntime");function formatOs(info){return joinParts([info.osPlatform,info.osArch,formatOsRelease(info.osRelease)]," ").trim()}__name(formatOs,"formatOs");function formatOsRelease(release){if(!release){return""}return`(${release})`}__name(formatOsRelease,"formatOsRelease");function formatAuth(info){if(!info.selectedAuthType){return""}if(info.selectedAuthType==="qwen-subscription"){return"Qwen Subscription"}const managedProvider=findProviderByCredentials(info.baseUrl,info.apiKeyEnvKey);if(managedProvider&&resolveMetadataKey(managedProvider)){return t(managedProvider.label)}if(info.selectedAuthType.startsWith("oauth")||info.selectedAuthType==="qwen-oauth"){return"Qwen OAuth"}return`API Key - ${info.selectedAuthType}`}__name(formatAuth,"formatAuth");function formatBaseUrl(info){if(!info.selectedAuthType||!info.baseUrl){return""}if(info.selectedAuthType.startsWith("oauth")||info.selectedAuthType==="qwen-oauth"){return""}return info.baseUrl}__name(formatBaseUrl,"formatBaseUrl");function formatProxy(proxy){if(!proxy){return"no proxy"}return redactProxy(proxy)}__name(formatProxy,"formatProxy");function redactProxy(proxy){try{const url=new URL(proxy);if(url.username||url.password){url.username=url.username?"***":"";url.password=url.password?"***":""}return url.toString()}catch{return proxy.replace(/\/\/[^/]*@/,"//***@")}}__name(redactProxy,"redactProxy");function joinParts(parts,separator){return parts.filter(part=>part).join(separator)}__name(joinParts,"joinParts");init_esbuild_shims();function outputTokensPerSecond(outputTokens,durationMs){return outputTokens>0&&durationMs>0?outputTokens/(durationMs/1e3):void 0}__name(outputTokensPerSecond,"outputTokensPerSecond");function computeGenerationRates(generation){const last=generation?.last;return{lastTps:last?outputTokensPerSecond(last.outputTokens,last.ttftMs+last.generationDurationMs):void 0,averageTtft:generation&&generation.timedRequests>0?generation.totalTtftMs/generation.timedRequests:void 0,sessionTps:generation?outputTokensPerSecond(generation.totalOutputSpeedTokens,generation.totalOutputSpeedDurationMs):void 0}}__name(computeGenerationRates,"computeGenerationRates");function calculateErrorRate(metrics){if(metrics.api.totalRequests===0){return 0}return metrics.api.totalErrors/metrics.api.totalRequests*100}__name(calculateErrorRate,"calculateErrorRate");function calculateAverageLatency(metrics){if(metrics.api.totalRequests===0){return 0}return metrics.api.totalLatencyMs/metrics.api.totalRequests}__name(calculateAverageLatency,"calculateAverageLatency");function calculateCacheHitRate(metrics){if(metrics.tokens.prompt===0){return 0}return metrics.tokens.cached/metrics.tokens.prompt*100}__name(calculateCacheHitRate,"calculateCacheHitRate");var computeSessionStats=__name(metrics=>{const{models,tools,files}=metrics;const totalApiTime=Object.values(models).reduce((acc,model)=>acc+model.api.totalLatencyMs,0);const totalToolTime=tools.totalDurationMs;const agentActiveTime=totalApiTime+totalToolTime;const apiTimePercent=agentActiveTime>0?totalApiTime/agentActiveTime*100:0;const toolTimePercent=agentActiveTime>0?totalToolTime/agentActiveTime*100:0;const totalCachedTokens=Object.values(models).reduce((acc,model)=>acc+model.tokens.cached,0);const totalPromptTokens=Object.values(models).reduce((acc,model)=>acc+model.tokens.prompt,0);const cacheEfficiency=totalPromptTokens>0?totalCachedTokens/totalPromptTokens*100:0;const totalDecisions=tools.totalDecisions.accept+tools.totalDecisions.reject+tools.totalDecisions.modify;const successRate=tools.totalCalls>0?tools.totalSuccess/tools.totalCalls*100:0;const agreementRate=totalDecisions>0?tools.totalDecisions.accept/totalDecisions*100:0;return{totalApiTime,totalToolTime,agentActiveTime,apiTimePercent,toolTimePercent,cacheEfficiency,totalDecisions,successRate,agreementRate,totalCachedTokens,totalPromptTokens,totalLinesAdded:files.totalLinesAdded,totalLinesRemoved:files.totalLinesRemoved}},"computeSessionStats");init_esbuild_shims();function calculateCost(args){const{inputTokens,outputTokens,pricing}=args;if(!pricing)return null;if(pricing.inputPerMillionTokens==null&&pricing.outputPerMillionTokens==null){return null}if(inputTokens<=0&&outputTokens<=0){return null}const inputCost=pricing.inputPerMillionTokens!=null?inputTokens/1e6*pricing.inputPerMillionTokens:0;const outputCost=pricing.outputPerMillionTokens!=null?outputTokens/1e6*pricing.outputPerMillionTokens:0;return inputCost+outputCost}__name(calculateCost,"calculateCost");function billableOutputTokens(tokens){const{prompt,candidates,thoughts,total}=tokens;const derived=total-prompt;if(derived>=candidates&&derived<=candidates+thoughts){return derived}return candidates+thoughts}__name(billableOutputTokens,"billableOutputTokens");init_esbuild_shims();function commandRestrictionNames(cmd){const names=cmd.skillDetail?skillRestrictionNames(cmd.skillDetail):[cmd.name.trim().toLowerCase()];return[...names,...cmd.workflowName?[cmd.workflowName.trim().toLowerCase()]:[],...(cmd.altNames??[]).map(name=>name.trim().toLowerCase())]}__name(commandRestrictionNames,"commandRestrictionNames");function getEffectiveSupportedModes(cmd){if(cmd.supportedModes!==void 0){return cmd.supportedModes}switch(cmd.kind){case"built-in":return["interactive"];case"file":case"skill":case"mcp-prompt":return["interactive","non_interactive","acp"];default:return["interactive"]}}__name(getEffectiveSupportedModes,"getEffectiveSupportedModes");function filterCommandsForMode(commands,mode){return commands.filter(cmd=>getEffectiveSupportedModes(cmd).includes(mode))}__name(filterCommandsForMode,"filterCommandsForMode");init_esbuild_shims();function extensionOwnerLabel(owner){return`${t("Extension:")} ${owner.displayName||owner.name||"unknown"}`}__name(extensionOwnerLabel,"extensionOwnerLabel");var MAX_EXTENSION_OWNER_LABEL_WIDTH=35;function getCommandSourceBadge(command){switch(command.source){case"bundled-skill":return"[Skill]";case"skill-dir-command":if(command.sourceDetail==="user"){return"[User]"}if(command.sourceDetail==="project"){return"[Project]"}return"[Custom]";case"plugin-command":if(command.sourceDetail!=="extension"){return"[Plugin]"}return command.sourceLabel?`[${truncateToWidth(command.sourceLabel,MAX_EXTENSION_OWNER_LABEL_WIDTH)}]`:"[Extension]";case"mcp-prompt":return"[MCP]";case"workflow-command":return command.sourceDetail==="extension"&&command.sourceLabel?`[${truncateToWidth(command.sourceLabel,MAX_EXTENSION_OWNER_LABEL_WIDTH)}]`:null;case"builtin-command":default:return null}}__name(getCommandSourceBadge,"getCommandSourceBadge");function getCommandSourceGroup(command){switch(command.source){case"builtin-command":return{key:"built-in",title:"Built-in Commands",order:0};case"bundled-skill":return{key:"bundled-skill",title:"Bundled Skills",order:1};case"skill-dir-command":return{key:"custom",title:"Custom Commands",order:2};case"plugin-command":return{key:"plugin",title:"Plugin Commands",order:3};case"mcp-prompt":return{key:"mcp",title:"MCP Commands",order:4};default:return{key:"other",title:"Other Commands",order:5}}}__name(getCommandSourceGroup,"getCommandSourceGroup");function formatSupportedModes(command){const modes=getEffectiveSupportedModes(command);const hasInteractive=modes.includes("interactive");const hasNonInteractive=modes.includes("non_interactive");const hasAcp=modes.includes("acp");if(hasInteractive&&hasNonInteractive&&hasAcp){return"[all]"}if(!hasInteractive&&hasNonInteractive&&hasAcp){return"[headless]"}if(hasInteractive&&!hasNonInteractive&&!hasAcp){return"[interactive]"}return modes.map(mode=>{switch(mode){case"interactive":return"[i]";case"non_interactive":return"[ni]";case"acp":return"[acp]";default:return`[${mode}]`}}).join(" ")}__name(formatSupportedModes,"formatSupportedModes");function getCommandDisplayName(command,options={}){const prefix=options.prefix??"";const baseLabel=`${prefix}${command.name}`;if(options.matchedAlias){return`${baseLabel} (alias: ${options.matchedAlias})`}if(options.includeAliases===false){return baseLabel}const altNames=command.altNames?.filter(Boolean);if(!altNames||altNames.length===0){return baseLabel}return`${baseLabel} (${altNames.join(", ")})`}__name(getCommandDisplayName,"getCommandDisplayName");function getCommandSubcommandNames(command){return command.subCommands?.filter(subCommand=>!subCommand.hidden).map(subCommand=>subCommand.name)??[]}__name(getCommandSubcommandNames,"getCommandSubcommandNames");init_esbuild_shims();function levelLabel(level){switch(level){case"project":return t("Project");case"user":return t("User");case"extension":return t("Extension");case"bundled":return t("Bundled");default:{const _exhaustive=level;return _exhaustive}}}__name(levelLabel,"levelLabel");function skillOriginLabel(skill){if(skill.level==="extension"){return`(${extensionOwnerLabel({name:skill.extensionName,displayName:skill.extensionDisplayName})})`}return`(${levelLabel(skill.level)})`}__name(skillOriginLabel,"skillOriginLabel");init_esbuild_shims();async function diffAction(context){const{config}=context.services;if(!config){return{type:"message",messageType:"error",content:t("Configuration not available.")}}if(config.getShellExecutionSandbox?.()){return{type:"message",messageType:"error",content:"Diff preview unavailable in tool sandbox. Run git diff through the Shell tool."}}if(context.executionMode==="interactive"){return{type:"dialog",dialog:"diff"}}const cwd=config.getWorkingDir()||config.getProjectRoot();if(!cwd){return{type:"message",messageType:"error",content:t("Could not determine current working directory.")}}let result;try{result=await fetchGitDiff(cwd)}catch(error){return{type:"message",messageType:"error",content:`${t("Failed to compute git diff stats")}: ${error instanceof Error?error.message:String(error)}`}}if(!result){return{type:"message",messageType:"info",content:t("No diff available. Either this is not a git repository, HEAD is missing, or a merge/rebase/cherry-pick/revert is in progress.")}}if(result.stats.filesCount===0){return{type:"message",messageType:"info",content:t("Clean working tree \u2014 no changes against HEAD.")}}const model=buildDiffRenderModel(result);return{type:"message",messageType:"info",content:renderDiffModelText(model)}}__name(diffAction,"diffAction");function buildDiffRenderModel(result){const rows=[];for(const[filename,s]of result.perFileStats){rows.push(toRow(filename,s))}const hiddenCount=Math.max(0,result.stats.filesCount-rows.length);return{filesCount:result.stats.filesCount,linesAdded:result.stats.linesAdded,linesRemoved:result.stats.linesRemoved,rows,hiddenCount}}__name(buildDiffRenderModel,"buildDiffRenderModel");function toRow(filename,s){if(s.isBinary){return{filename,oldPath:s.oldPath,isBinary:true,isUntracked:Boolean(s.isUntracked),isDeleted:Boolean(s.isDeleted),truncated:false}}return{filename,oldPath:s.oldPath,added:s.added,removed:s.isUntracked?0:s.removed,isBinary:false,isUntracked:Boolean(s.isUntracked),isDeleted:Boolean(s.isDeleted),truncated:Boolean(s.truncated)}}__name(toRow,"toRow");function computeDiffColumnWidths(rows){let maxAdded=0;let maxRemoved=0;for(const r of rows){if(r.isBinary)continue;if((r.added??0)>maxAdded)maxAdded=r.added??0;if((r.removed??0)>maxRemoved)maxRemoved=r.removed??0}const addWidth=String(maxAdded).length;const remWidth=String(maxRemoved).length;const statColumnWidth=1+addWidth+1+1+remWidth;return{addWidth,remWidth,statColumnWidth}}__name(computeDiffColumnWidths,"computeDiffColumnWidths");function renderDiffModelText(model){const{filesCount,linesAdded,linesRemoved,rows,hiddenCount}=model;const header=filesCount===1?t("{{count}} file changed, +{{added}} / -{{removed}}",{count:String(filesCount),added:String(linesAdded),removed:String(linesRemoved)}):t("{{count}} files changed, +{{added}} / -{{removed}}",{count:String(filesCount),added:String(linesAdded),removed:String(linesRemoved)});const lines=formatRowsText(rows);const capNote=hiddenCount>0&&rows.length>0?`
3
+ import{sanitizeFilenameForDisplay,truncateToWidth}from"./chunk-64CA3W6G.js";import{t}from"./chunk-73TSS7KS.js";import{isCompressionFailureStatus}from"./chunk-3NR3JBMA.js";import{fetchGitDiff}from"./chunk-B4ZATWBT.js";import{skillRestrictionNames}from"./chunk-CV2UAEZA.js";import{findProviderByCredentials,resolveMetadataKey}from"./chunk-N3AKLLXG.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();var formatRelativeTime=__name(timestamp=>{const now=Date.now();const diffMs=now-timestamp;const seconds=Math.floor(diffMs/1e3);const minutes=Math.floor(seconds/60);const hours=Math.floor(minutes/60);const days=Math.floor(hours/24);const weeks=Math.floor(days/7);const months=Math.floor(days/30);if(months>0){return months===1?"1 month ago":`${months} months ago`}if(weeks>0){return weeks===1?"1 week ago":`${weeks} weeks ago`}if(days>0){return days===1?"1 day ago":`${days} days ago`}if(hours>0){return hours===1?"1 hour ago":`${hours} hours ago`}if(minutes>0){return minutes===1?"1 minute ago":`${minutes} minutes ago`}return"just now"},"formatRelativeTime");var formatClockTime=__name(timestamp=>`[${new Date(timestamp).toLocaleTimeString("en-US",{hour12:false,hour:"2-digit",minute:"2-digit",second:"2-digit"})}]`,"formatClockTime");var formatTokenCount=__name(count=>{if(count<1e3){return`${count}`}if(count<1e4){return`${(count/1e3).toFixed(1)}k`}return`${Math.floor(count/1e3)}k`},"formatTokenCount");var formatPercentageUsed=__name(percentage=>{if(percentage>1){return">100"}return(percentage*100).toFixed(1)},"formatPercentageUsed");var contextUsageLabel=__name(terminalWidth=>terminalWidth<100?t("% used"):t("% context used"),"contextUsageLabel");var formatDuration=__name((milliseconds,options)=>{if(milliseconds<=0){return"0s"}if(milliseconds<1e3){return`${Math.round(milliseconds)}ms`}const totalSeconds=milliseconds/1e3;if(totalSeconds<60){const formatted=totalSeconds.toFixed(1);if(parseFloat(formatted)>=60){return"1m"}if(options?.hideTrailingZeros&&formatted.endsWith(".0")){return`${formatted.slice(0,-2)}s`}return`${formatted}s`}const hours=Math.floor(totalSeconds/3600);const minutes=Math.floor(totalSeconds%3600/60);const seconds=Math.floor(totalSeconds%60);const parts=[];if(hours>0){parts.push(`${hours}h`)}if(minutes>0){parts.push(`${minutes}m`)}if(seconds>0){parts.push(`${seconds}s`)}if(parts.length===0){if(hours>0)return`${hours}h`;if(minutes>0)return`${minutes}m`;return`${seconds}s`}return parts.join(" ")},"formatDuration");init_esbuild_shims();var formatCompressionTokenCount=__name((count,isEstimated)=>isEstimated?`~${count}`:String(count),"formatCompressionTokenCount");function getCompressionStatusText({isPending,originalTokenCount,newTokenCount,compressionStatus,originalTokenCountIsEstimated,newTokenCountIsEstimated}){if(isPending){return t("Compressing chat history")}const originalTokens=originalTokenCount??0;const newTokens=newTokenCount??0;switch(compressionStatus){case 1:return t("Chat history compressed from {{originalTokens}} to {{newTokens}} tokens.",{originalTokens:formatCompressionTokenCount(originalTokens,originalTokenCountIsEstimated),newTokens:formatCompressionTokenCount(newTokens,newTokenCountIsEstimated)});case 2:if(originalTokens<5e4){return t("Compression was not beneficial for this history size.")}return t("Chat history compression did not reduce size. This may indicate issues with the compression prompt.");case 3:return t("Could not compress chat history due to a token counting error.");case 4:return t("Could not compress chat history because the compression summary was empty.");case 6:return t("Could not compress chat history because the compression summary was truncated.");case 7:return t("Could not compress chat history due to an API error.");case 5:return"Nothing to compress.";default:return""}}__name(getCompressionStatusText,"getCompressionStatusText");function getCompressionFailureStatusText(options){if(!isCompressionFailureStatus(options.compressionStatus)){return t("Failed to compress chat history.")}return getCompressionStatusText({...options,isPending:false})||t("Failed to compress chat history.")}__name(getCompressionFailureStatusText,"getCompressionFailureStatusText");init_esbuild_shims();function getSystemInfoFields(info){const fields=[];addField(fields,t("Qwen Code"),formatCliVersion(info));addField(fields,t("Runtime"),formatRuntime(info));addField(fields,t("IDE Client"),info.ideClient);addField(fields,"LSP",info.lspStatus??"");addField(fields,t("OS"),formatOs(info));addField(fields,t("Auth"),formatAuth(info));addField(fields,t("Base URL"),formatBaseUrl(info));addField(fields,t("Model"),info.modelVersion);addField(fields,t("Fast Model"),info.fastModel||info.modelVersion);addField(fields,t("Session ID"),info.sessionId);addField(fields,t("Sandbox"),info.sandboxEnv);addField(fields,t("Proxy"),formatProxy(info.proxy));addField(fields,t("Memory Usage"),info.memoryUsage);return fields}__name(getSystemInfoFields,"getSystemInfoFields");function addField(fields,label,value){if(value){fields.push({label,value})}}__name(addField,"addField");function formatCliVersion(info){if(!info.cliVersion){return""}if(!info.gitCommit){return info.cliVersion}return`${info.cliVersion} (${info.gitCommit})`}__name(formatCliVersion,"formatCliVersion");function formatRuntime(info){if(!info.nodeVersion&&!info.npmVersion){return""}const node=info.nodeVersion?`Node.js ${info.nodeVersion}`:"";const npm=info.npmVersion?`npm ${info.npmVersion}`:"";return joinParts([node,npm]," / ")}__name(formatRuntime,"formatRuntime");function formatOs(info){return joinParts([info.osPlatform,info.osArch,formatOsRelease(info.osRelease)]," ").trim()}__name(formatOs,"formatOs");function formatOsRelease(release){if(!release){return""}return`(${release})`}__name(formatOsRelease,"formatOsRelease");function formatAuth(info){if(!info.selectedAuthType){return""}if(info.selectedAuthType==="qwen-subscription"){return"Qwen Subscription"}const managedProvider=findProviderByCredentials(info.baseUrl,info.apiKeyEnvKey);if(managedProvider&&resolveMetadataKey(managedProvider)){return t(managedProvider.label)}if(info.selectedAuthType.startsWith("oauth")||info.selectedAuthType==="qwen-oauth"){return"Qwen OAuth"}return`API Key - ${info.selectedAuthType}`}__name(formatAuth,"formatAuth");function formatBaseUrl(info){if(!info.selectedAuthType||!info.baseUrl){return""}if(info.selectedAuthType.startsWith("oauth")||info.selectedAuthType==="qwen-oauth"){return""}return info.baseUrl}__name(formatBaseUrl,"formatBaseUrl");function formatProxy(proxy){if(!proxy){return"no proxy"}return redactProxy(proxy)}__name(formatProxy,"formatProxy");function redactProxy(proxy){try{const url=new URL(proxy);if(url.username||url.password){url.username=url.username?"***":"";url.password=url.password?"***":""}return url.toString()}catch{return proxy.replace(/\/\/[^/]*@/,"//***@")}}__name(redactProxy,"redactProxy");function joinParts(parts,separator){return parts.filter(part=>part).join(separator)}__name(joinParts,"joinParts");init_esbuild_shims();function outputTokensPerSecond(outputTokens,durationMs){return outputTokens>0&&durationMs>0?outputTokens/(durationMs/1e3):void 0}__name(outputTokensPerSecond,"outputTokensPerSecond");function computeGenerationRates(generation){const last=generation?.last;return{lastTps:last?outputTokensPerSecond(last.outputTokens,last.ttftMs+last.generationDurationMs):void 0,averageTtft:generation&&generation.timedRequests>0?generation.totalTtftMs/generation.timedRequests:void 0,sessionTps:generation?outputTokensPerSecond(generation.totalOutputSpeedTokens,generation.totalOutputSpeedDurationMs):void 0}}__name(computeGenerationRates,"computeGenerationRates");function calculateErrorRate(metrics){if(metrics.api.totalRequests===0){return 0}return metrics.api.totalErrors/metrics.api.totalRequests*100}__name(calculateErrorRate,"calculateErrorRate");function calculateAverageLatency(metrics){if(metrics.api.totalRequests===0){return 0}return metrics.api.totalLatencyMs/metrics.api.totalRequests}__name(calculateAverageLatency,"calculateAverageLatency");function calculateCacheHitRate(metrics){if(metrics.tokens.prompt===0){return 0}return metrics.tokens.cached/metrics.tokens.prompt*100}__name(calculateCacheHitRate,"calculateCacheHitRate");var computeSessionStats=__name(metrics=>{const{models,tools,files}=metrics;const totalApiTime=Object.values(models).reduce((acc,model)=>acc+model.api.totalLatencyMs,0);const totalToolTime=tools.totalDurationMs;const agentActiveTime=totalApiTime+totalToolTime;const apiTimePercent=agentActiveTime>0?totalApiTime/agentActiveTime*100:0;const toolTimePercent=agentActiveTime>0?totalToolTime/agentActiveTime*100:0;const totalCachedTokens=Object.values(models).reduce((acc,model)=>acc+model.tokens.cached,0);const totalPromptTokens=Object.values(models).reduce((acc,model)=>acc+model.tokens.prompt,0);const cacheEfficiency=totalPromptTokens>0?totalCachedTokens/totalPromptTokens*100:0;const totalDecisions=tools.totalDecisions.accept+tools.totalDecisions.reject+tools.totalDecisions.modify;const successRate=tools.totalCalls>0?tools.totalSuccess/tools.totalCalls*100:0;const agreementRate=totalDecisions>0?tools.totalDecisions.accept/totalDecisions*100:0;return{totalApiTime,totalToolTime,agentActiveTime,apiTimePercent,toolTimePercent,cacheEfficiency,totalDecisions,successRate,agreementRate,totalCachedTokens,totalPromptTokens,totalLinesAdded:files.totalLinesAdded,totalLinesRemoved:files.totalLinesRemoved}},"computeSessionStats");init_esbuild_shims();function calculateCost(args){const{inputTokens,outputTokens,pricing}=args;if(!pricing)return null;if(pricing.inputPerMillionTokens==null&&pricing.outputPerMillionTokens==null){return null}if(inputTokens<=0&&outputTokens<=0){return null}const inputCost=pricing.inputPerMillionTokens!=null?inputTokens/1e6*pricing.inputPerMillionTokens:0;const outputCost=pricing.outputPerMillionTokens!=null?outputTokens/1e6*pricing.outputPerMillionTokens:0;return inputCost+outputCost}__name(calculateCost,"calculateCost");function billableOutputTokens(tokens){const{prompt,candidates,thoughts,total}=tokens;const derived=total-prompt;if(derived>=candidates&&derived<=candidates+thoughts){return derived}return candidates+thoughts}__name(billableOutputTokens,"billableOutputTokens");init_esbuild_shims();function commandRestrictionNames(cmd){const names=cmd.skillDetail?skillRestrictionNames(cmd.skillDetail):[cmd.name.trim().toLowerCase()];return[...names,...cmd.workflowName?[cmd.workflowName.trim().toLowerCase()]:[],...(cmd.altNames??[]).map(name=>name.trim().toLowerCase())]}__name(commandRestrictionNames,"commandRestrictionNames");function getEffectiveSupportedModes(cmd){if(cmd.supportedModes!==void 0){return cmd.supportedModes}switch(cmd.kind){case"built-in":return["interactive"];case"file":case"skill":case"mcp-prompt":return["interactive","non_interactive","acp"];default:return["interactive"]}}__name(getEffectiveSupportedModes,"getEffectiveSupportedModes");function filterCommandsForMode(commands,mode){return commands.filter(cmd=>getEffectiveSupportedModes(cmd).includes(mode))}__name(filterCommandsForMode,"filterCommandsForMode");init_esbuild_shims();function extensionOwnerLabel(owner){return`${t("Extension:")} ${owner.displayName||owner.name||"unknown"}`}__name(extensionOwnerLabel,"extensionOwnerLabel");var MAX_EXTENSION_OWNER_LABEL_WIDTH=35;function getCommandSourceBadge(command){switch(command.source){case"bundled-skill":return"[Skill]";case"skill-dir-command":if(command.sourceDetail==="user"){return"[User]"}if(command.sourceDetail==="project"){return"[Project]"}return"[Custom]";case"plugin-command":if(command.sourceDetail!=="extension"){return"[Plugin]"}return command.sourceLabel?`[${truncateToWidth(command.sourceLabel,MAX_EXTENSION_OWNER_LABEL_WIDTH)}]`:"[Extension]";case"mcp-prompt":return"[MCP]";case"workflow-command":return command.sourceDetail==="extension"&&command.sourceLabel?`[${truncateToWidth(command.sourceLabel,MAX_EXTENSION_OWNER_LABEL_WIDTH)}]`:null;case"builtin-command":default:return null}}__name(getCommandSourceBadge,"getCommandSourceBadge");function getCommandSourceGroup(command){switch(command.source){case"builtin-command":return{key:"built-in",title:"Built-in Commands",order:0};case"bundled-skill":return{key:"bundled-skill",title:"Bundled Skills",order:1};case"skill-dir-command":return{key:"custom",title:"Custom Commands",order:2};case"plugin-command":return{key:"plugin",title:"Plugin Commands",order:3};case"mcp-prompt":return{key:"mcp",title:"MCP Commands",order:4};default:return{key:"other",title:"Other Commands",order:5}}}__name(getCommandSourceGroup,"getCommandSourceGroup");function formatSupportedModes(command){const modes=getEffectiveSupportedModes(command);const hasInteractive=modes.includes("interactive");const hasNonInteractive=modes.includes("non_interactive");const hasAcp=modes.includes("acp");if(hasInteractive&&hasNonInteractive&&hasAcp){return"[all]"}if(!hasInteractive&&hasNonInteractive&&hasAcp){return"[headless]"}if(hasInteractive&&!hasNonInteractive&&!hasAcp){return"[interactive]"}return modes.map(mode=>{switch(mode){case"interactive":return"[i]";case"non_interactive":return"[ni]";case"acp":return"[acp]";default:return`[${mode}]`}}).join(" ")}__name(formatSupportedModes,"formatSupportedModes");function getCommandDisplayName(command,options={}){const prefix=options.prefix??"";const baseLabel=`${prefix}${command.name}`;if(options.matchedAlias){return`${baseLabel} (alias: ${options.matchedAlias})`}if(options.includeAliases===false){return baseLabel}const altNames=command.altNames?.filter(Boolean);if(!altNames||altNames.length===0){return baseLabel}return`${baseLabel} (${altNames.join(", ")})`}__name(getCommandDisplayName,"getCommandDisplayName");function getCommandSubcommandNames(command){return command.subCommands?.filter(subCommand=>!subCommand.hidden).map(subCommand=>subCommand.name)??[]}__name(getCommandSubcommandNames,"getCommandSubcommandNames");init_esbuild_shims();function levelLabel(level){switch(level){case"project":return t("Project");case"user":return t("User");case"extension":return t("Extension");case"bundled":return t("Bundled");default:{const _exhaustive=level;return _exhaustive}}}__name(levelLabel,"levelLabel");function skillOriginLabel(skill){if(skill.level==="extension"){return`(${extensionOwnerLabel({name:skill.extensionName,displayName:skill.extensionDisplayName})})`}return`(${levelLabel(skill.level)})`}__name(skillOriginLabel,"skillOriginLabel");init_esbuild_shims();async function diffAction(context){const{config}=context.services;if(!config){return{type:"message",messageType:"error",content:t("Configuration not available.")}}if(config.getShellExecutionSandbox?.()){return{type:"message",messageType:"error",content:"Diff preview unavailable in tool sandbox. Run git diff through the Shell tool."}}if(context.executionMode==="interactive"){return{type:"dialog",dialog:"diff"}}const cwd=config.getWorkingDir()||config.getProjectRoot();if(!cwd){return{type:"message",messageType:"error",content:t("Could not determine current working directory.")}}let result;try{result=await fetchGitDiff(cwd)}catch(error){return{type:"message",messageType:"error",content:`${t("Failed to compute git diff stats")}: ${error instanceof Error?error.message:String(error)}`}}if(!result){return{type:"message",messageType:"info",content:t("No diff available. Either this is not a git repository, HEAD is missing, or a merge/rebase/cherry-pick/revert is in progress.")}}if(result.stats.filesCount===0){return{type:"message",messageType:"info",content:t("Clean working tree \u2014 no changes against HEAD.")}}const model=buildDiffRenderModel(result);return{type:"message",messageType:"info",content:renderDiffModelText(model)}}__name(diffAction,"diffAction");function buildDiffRenderModel(result){const rows=[];for(const[filename,s]of result.perFileStats){rows.push(toRow(filename,s))}const hiddenCount=Math.max(0,result.stats.filesCount-rows.length);return{filesCount:result.stats.filesCount,linesAdded:result.stats.linesAdded,linesRemoved:result.stats.linesRemoved,rows,hiddenCount}}__name(buildDiffRenderModel,"buildDiffRenderModel");function toRow(filename,s){if(s.isBinary){return{filename,oldPath:s.oldPath,isBinary:true,isUntracked:Boolean(s.isUntracked),isDeleted:Boolean(s.isDeleted),truncated:false}}return{filename,oldPath:s.oldPath,added:s.added,removed:s.isUntracked?0:s.removed,isBinary:false,isUntracked:Boolean(s.isUntracked),isDeleted:Boolean(s.isDeleted),truncated:Boolean(s.truncated)}}__name(toRow,"toRow");function computeDiffColumnWidths(rows){let maxAdded=0;let maxRemoved=0;for(const r of rows){if(r.isBinary)continue;if((r.added??0)>maxAdded)maxAdded=r.added??0;if((r.removed??0)>maxRemoved)maxRemoved=r.removed??0}const addWidth=String(maxAdded).length;const remWidth=String(maxRemoved).length;const statColumnWidth=1+addWidth+1+1+remWidth;return{addWidth,remWidth,statColumnWidth}}__name(computeDiffColumnWidths,"computeDiffColumnWidths");function renderDiffModelText(model){const{filesCount,linesAdded,linesRemoved,rows,hiddenCount}=model;const header=filesCount===1?t("{{count}} file changed, +{{added}} / -{{removed}}",{count:String(filesCount),added:String(linesAdded),removed:String(linesRemoved)}):t("{{count}} files changed, +{{added}} / -{{removed}}",{count:String(filesCount),added:String(linesAdded),removed:String(linesRemoved)});const lines=formatRowsText(rows);const capNote=hiddenCount>0&&rows.length>0?`
4
4
  ${t("\u2026and {{hidden}} more (showing first {{shown}})",{hidden:String(hiddenCount),shown:String(rows.length)})}`:"";return lines.length>0?`${header}
5
5
  ${lines.join("\n")}${capNote}`:header}__name(renderDiffModelText,"renderDiffModelText");function formatRowsText(rows){if(rows.length===0)return[];const{addWidth,remWidth,statColumnWidth}=computeDiffColumnWidths(rows);const out=[];for(const r of rows){const safeName=sanitizeFilenameForDisplay(r.filename);const displayName=r.oldPath?`${sanitizeFilenameForDisplay(r.oldPath)} \u2192 ${safeName}`:safeName;if(r.isBinary){const suffix2=r.isUntracked?` ${t("(binary, new)")}`:r.isDeleted?` ${t("(binary, deleted)")}`:` ${t("(binary)")}`;out.push(` ${padMarker("~",statColumnWidth)} ${displayName}${suffix2}`);continue}const added=`+${String(r.added??0).padStart(addWidth)}`;const removed=`-${String(r.removed??0).padStart(remWidth)}`;let suffix="";if(r.isUntracked){suffix=r.truncated?` ${t("(new, partial)")}`:` ${t("(new)")}`}else if(r.isDeleted){suffix=` ${t("(deleted)")}`}out.push(` ${added} ${removed} ${displayName}${suffix}`)}return out}__name(formatRowsText,"formatRowsText");function padMarker(marker,width){if(marker.length>=width)return marker;return`${marker}${" ".repeat(width-marker.length)}`}__name(padMarker,"padMarker");var diffCommand={name:"diff",get description(){return t("Show working-tree change stats versus HEAD")},kind:"built-in",supportedModes:["interactive","non_interactive","acp"],action:diffAction};init_esbuild_shims();var INLINE_MATH_MAX_CHARS=1024;var INLINE_CODE_SPAN_PATTERN_SOURCE=String.raw`(?<!\`)(?<inlineCodeFence>\`+)(?!\`).+?(?<!\`)\k<inlineCodeFence>(?!\`)`;var INLINE_CODE_SPAN_RE=new RegExp(INLINE_CODE_SPAN_PATTERN_SOURCE,"g");function isEscapedAt(text,index){let slashCount=0;for(let cursor=index-1;cursor>=0&&text[cursor]==="\\";cursor-=1){slashCount+=1}return slashCount%2===1}__name(isEscapedAt,"isEscapedAt");function isUnescapedDollarAt(text,index){return text[index]==="$"&&!isEscapedAt(text,index)}__name(isUnescapedDollarAt,"isUnescapedDollarAt");function unescapeMarkdownDollars(text){return text.replace(/(\\+)\$/g,(_match,slashes)=>`${"\\".repeat(Math.floor(slashes.length/2))}$`)}__name(unescapeMarkdownDollars,"unescapeMarkdownDollars");function unescapeMarkdownBeforeMath(text){return unescapeMarkdownDollars(`${text}$`).slice(0,-1)}__name(unescapeMarkdownBeforeMath,"unescapeMarkdownBeforeMath");function readInlineMathSpan(text,index){if(!isUnescapedDollarAt(text,index)){return null}const previous=text[index-1]??"";const next=text[index+1]??"";if(/\w/.test(previous)||isUnescapedDollarAt(text,index-1)||!next||/[\s\d$]/.test(next)){return null}let closingIndex=index+1;while(closingIndex<text.length&&text[closingIndex]!=="\n"&&closingIndex-index-1<=INLINE_MATH_MAX_CHARS&&!isUnescapedDollarAt(text,closingIndex)){closingIndex+=1}if(!isUnescapedDollarAt(text,closingIndex)){return null}const content=text.slice(index+1,closingIndex);const following=text[closingIndex+1]??"";if(content.length>INLINE_MATH_MAX_CHARS||/\s$/.test(content)||/[\w$]/.test(following)){return null}return{content,index,raw:text.slice(index,closingIndex+1)}}__name(readInlineMathSpan,"readInlineMathSpan");function findNextInlineMath(text,fromIndex=0){for(let index=fromIndex;index<text.length;index+=1){const span=readInlineMathSpan(text,index);if(span){return span}}return null}__name(findNextInlineMath,"findNextInlineMath");function*mergeInlineMathMatches(text,markupRegex,enableInlineMath=true){markupRegex.lastIndex=0;const markupMatches=text.matchAll(markupRegex);let nextMarkup=markupMatches.next();let nextMath=enableInlineMath?findNextInlineMath(text):null;let cursor=0;while(!nextMarkup.done||nextMath){while(!nextMarkup.done&&(nextMarkup.value.index??0)<cursor){nextMarkup=markupMatches.next()}if(nextMath&&nextMath.index<cursor){nextMath=findNextInlineMath(text,cursor)}const markupIndex=nextMarkup.done?Number.POSITIVE_INFINITY:nextMarkup.value.index??0;const mathIndex=nextMath?.index??Number.POSITIVE_INFINITY;if(!nextMarkup.done&&markupIndex<=mathIndex){const match=nextMarkup.value;yield{kind:"markup",match};cursor=markupIndex+match[0].length;nextMarkup=markupMatches.next()}else if(nextMath){yield{kind:"math",span:nextMath};cursor=mathIndex+nextMath.raw.length;nextMath=findNextInlineMath(text,cursor)}}}__name(mergeInlineMathMatches,"mergeInlineMathMatches");function findInlineMathExpressions(text){const expressions=[];for(const token of mergeInlineMathMatches(text,INLINE_CODE_SPAN_RE)){if(token.kind==="math"){expressions.push(token.span.content)}}return expressions}__name(findInlineMathExpressions,"findInlineMathExpressions");function readInlineMathSpanAt(text,index){return readInlineMathSpan(text,index)?.raw??null}__name(readInlineMathSpanAt,"readInlineMathSpanAt");export{formatRelativeTime,formatClockTime,formatTokenCount,formatPercentageUsed,contextUsageLabel,formatDuration,INLINE_CODE_SPAN_PATTERN_SOURCE,unescapeMarkdownDollars,unescapeMarkdownBeforeMath,mergeInlineMathMatches,findInlineMathExpressions,readInlineMathSpanAt,formatCompressionTokenCount,getCompressionStatusText,getCompressionFailureStatusText,getSystemInfoFields,redactProxy,computeGenerationRates,calculateErrorRate,calculateAverageLatency,calculateCacheHitRate,computeSessionStats,calculateCost,billableOutputTokens,commandRestrictionNames,getEffectiveSupportedModes,filterCommandsForMode,extensionOwnerLabel,MAX_EXTENSION_OWNER_LABEL_WIDTH,getCommandSourceBadge,getCommandSourceGroup,formatSupportedModes,getCommandDisplayName,getCommandSubcommandNames,levelLabel,skillOriginLabel,computeDiffColumnWidths,diffCommand};
6
6
  /**
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{getUserSettingsPath,v1ToV2Migration}from"./chunk-E6XRNALG.js";import{require_strip_json_comments}from"./chunk-EKRCICRK.js";import{getSystemDefaultsPath,getSystemSettingsPath}from"./chunk-ERGT5BD3.js";import{LoadedTrustedFolders,TrustLevel,getExplicitTrustLevel,getTrustedFoldersPath,isWorkflowAncestorDirectorySafe,parseJsoncObject}from"./chunk-SGUUOXLH.js";import{arePathsEquivalent}from"./chunk-IDXJIDME.js";import{ideContextStore}from"./chunk-XUB4JKSR.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name,__toESM}from"./chunk-KBWJGX7I.js";init_esbuild_shims();import{createHash}from"node:crypto";import*as fs from"node:fs/promises";var import_strip_json_comments=__toESM(require_strip_json_comments(),1);var MAX_TRUSTED_FOLDERS_BYTES=1024*1024;var MAX_SETTINGS_BYTES=4*1024*1024;function evaluateDaemonWorkflowAncestorTrust(snapshot,query){const denied=__name(()=>query.ancestorDirs.map(()=>false),"denied");if(snapshot.settingsError)return denied();if(!snapshot.folderTrustEnabled){return query.ancestorDirs.map(isWorkflowAncestorDirectorySafe)}if(snapshot.trustedFoldersError||snapshot.ideTrust===false&&(arePathsEquivalent(query.workspaceCwd,query.ideScopeCwd)||arePathsEquivalent(query.canonicalTargetDir,query.ideScopeCwd))){return denied()}const folders=new LoadedTrustedFolders({path:getTrustedFoldersPath(),config:{...snapshot.trustedFolders}},[]);if(folders.isPathTrusted(query.canonicalTargetDir)!==true){return denied()}return query.ancestorDirs.map(directory=>folders.isPathTrusted(directory)===true)}__name(evaluateDaemonWorkflowAncestorTrust,"evaluateDaemonWorkflowAncestorTrust");function policyError(code,filePath,error){return{code,path:filePath,message:error instanceof Error?error.message:String(error)}}__name(policyError,"policyError");async function readJsonObject(filePath,maxBytes,requireRegularFile,retryMissing=false,allowTrailingComma=false){const delays=[0,50,200];let result={};for(const delay of delays){if(delay>0){await new Promise(resolve=>setTimeout(resolve,delay))}result=await readJsonObjectOnce(filePath,maxBytes,requireRegularFile,allowTrailingComma);if(!result.error&&(!result.missing||!retryMissing))return result}return result}__name(readJsonObject,"readJsonObject");async function readJsonObjectOnce(filePath,maxBytes,requireRegularFile,allowTrailingComma){let stat2;try{stat2=await fs.lstat(filePath)}catch(error){if(error instanceof Error&&"code"in error&&error.code==="ENOENT"){return{value:{},missing:true}}return{error:policyError("trust_policy_unreadable",filePath,error)}}if(!requireRegularFile&&stat2.isSymbolicLink()){try{stat2=await fs.stat(filePath)}catch(error){return{error:policyError("trust_policy_unreadable",filePath,error)}}}if(requireRegularFile&&stat2.isSymbolicLink()||!stat2.isFile()){return{error:policyError("trust_policy_invalid",filePath,new Error("Trust policy input must be a regular file."))}}if(stat2.size>maxBytes){return{error:policyError("trust_policy_invalid",filePath,new Error(`Trust policy input exceeds ${maxBytes} bytes.`))}}try{const raw=await fs.readFile(filePath,"utf8");const parsed=allowTrailingComma?parseJsoncObject(raw):JSON.parse((0,import_strip_json_comments.default)(raw));if(typeof parsed!=="object"||parsed===null||Array.isArray(parsed)){throw new Error("Trust policy input must contain a JSON object.")}return{value:parsed}}catch(error){if(error instanceof Error&&"code"in error&&error.code==="ENOENT"){return{value:{},missing:true}}return{error:policyError("trust_policy_invalid",filePath,error)}}}__name(readJsonObjectOnce,"readJsonObjectOnce");function migrateFolderTrustSettings(value,scope){if(!value||!v1ToV2Migration.shouldMigrate(value))return value;return v1ToV2Migration.migrate(value,scope).settings}__name(migrateFolderTrustSettings,"migrateFolderTrustSettings");function folderTrustSetting(value,filePath){if(!value||!("security"in value))return{};const security=value?.["security"];if(typeof security!=="object"||security===null||Array.isArray(security)){return{error:policyError("trust_policy_invalid",filePath,new Error("`security` must be an object."))}}if(!("folderTrust"in security))return{};const folderTrust=security["folderTrust"];if(typeof folderTrust!=="object"||folderTrust===null||Array.isArray(folderTrust)){return{error:policyError("trust_policy_invalid",filePath,new Error("`security.folderTrust` must be an object."))}}if(!("enabled"in folderTrust))return{};const enabled=folderTrust["enabled"];if(typeof enabled==="boolean")return{value:enabled};return{error:policyError("trust_policy_invalid",filePath,new Error("`security.folderTrust.enabled` must be a boolean."))}}__name(folderTrustSetting,"folderTrustSetting");function parseTrustedFolders(value,filePath){const config={};for(const[rulePath,rawLevel]of Object.entries(value??{})){if(!Object.values(TrustLevel).includes(rawLevel)){return{config:{},error:policyError("trust_policy_invalid",filePath,new Error(`Invalid trust level for ${JSON.stringify(rulePath)}.`))}}config[rulePath]=rawLevel}return{config}}__name(parseTrustedFolders,"parseTrustedFolders");function semanticRevision(input){const sortedRules=Object.entries(input.trustedFolders).sort(([a],[b])=>a.localeCompare(b));return createHash("sha256").update(JSON.stringify({folderTrustEnabled:input.folderTrustEnabled,ideTrust:input.ideTrust??null,trustedFolders:sortedRules,settingsError:input.settingsError?.code??null,trustedFoldersError:input.trustedFoldersError?.code??null})).digest("hex")}__name(semanticRevision,"semanticRevision");async function readDaemonTrustPolicySnapshot(){const[user,system,systemDefaults]=await Promise.all([readJsonObject(getUserSettingsPath(),MAX_SETTINGS_BYTES,false),readJsonObject(getSystemSettingsPath(),MAX_SETTINGS_BYTES,false),readJsonObject(getSystemDefaultsPath(),MAX_SETTINGS_BYTES,false)]);const systemFolderTrust=folderTrustSetting(migrateFolderTrustSettings(system.value,"System"),getSystemSettingsPath());const userFolderTrust=folderTrustSetting(migrateFolderTrustSettings(user.value,"User"),getUserSettingsPath());const defaultsFolderTrust=folderTrustSetting(migrateFolderTrustSettings(systemDefaults.value,"SystemDefaults"),getSystemDefaultsPath());const settingsError=system.error??systemFolderTrust.error??user.error??userFolderTrust.error??systemDefaults.error??defaultsFolderTrust.error;const folderTrustEnabled=systemFolderTrust.value??userFolderTrust.value??defaultsFolderTrust.value??false;const trustedFoldersFile=await readJsonObject(getTrustedFoldersPath(),MAX_TRUSTED_FOLDERS_BYTES,true,folderTrustEnabled,true);const parsedTrustedFolders=parseTrustedFolders(trustedFoldersFile.value,getTrustedFoldersPath());const trustedFoldersError=trustedFoldersFile.error??parsedTrustedFolders.error;const ideTrust=ideContextStore.get()?.workspaceState?.isTrusted;const revision=semanticRevision({folderTrustEnabled,ideTrust,trustedFolders:parsedTrustedFolders.config,...settingsError?{settingsError}:{},...trustedFoldersError?{trustedFoldersError}:{}});return{revision,folderTrustEnabled,ideTrust,trustedFolders:Object.freeze({...parsedTrustedFolders.config}),...settingsError?{settingsError}:{},...trustedFoldersError?{trustedFoldersError}:{}}}__name(readDaemonTrustPolicySnapshot,"readDaemonTrustPolicySnapshot");function explicitTrustLevel(snapshot,workspaceCwd){return getExplicitTrustLevel(snapshot.trustedFolders,workspaceCwd)}__name(explicitTrustLevel,"explicitTrustLevel");function evaluateDaemonWorkspaceTrust(snapshot,workspaceCwd,processCwd=process.cwd()){if(snapshot.settingsError){return{state:"error",targetTrusted:false,source:"none",explicitTrustLevel:null,error:snapshot.settingsError}}if(!snapshot.folderTrustEnabled){return{state:"trusted",targetTrusted:true,source:"disabled",explicitTrustLevel:null}}if(snapshot.ideTrust!==void 0&&arePathsEquivalent(workspaceCwd,processCwd)){return{state:snapshot.ideTrust?"trusted":"untrusted",targetTrusted:snapshot.ideTrust,source:"ide",explicitTrustLevel:null}}if(snapshot.trustedFoldersError){return{state:"error",targetTrusted:false,source:"none",explicitTrustLevel:null,error:snapshot.trustedFoldersError}}const folders=new LoadedTrustedFolders({path:getTrustedFoldersPath(),config:{...snapshot.trustedFolders}},[]);const trusted=folders.isPathTrusted(workspaceCwd);return{state:trusted===true?"trusted":trusted===false?"untrusted":"unknown",targetTrusted:trusted===true,source:trusted===void 0?"none":"file",explicitTrustLevel:explicitTrustLevel(snapshot,workspaceCwd)}}__name(evaluateDaemonWorkspaceTrust,"evaluateDaemonWorkspaceTrust");export{evaluateDaemonWorkflowAncestorTrust,readDaemonTrustPolicySnapshot,evaluateDaemonWorkspaceTrust};
3
+ import{getUserSettingsPath,v1ToV2Migration}from"./chunk-AEX3XSTE.js";import{require_strip_json_comments}from"./chunk-EKRCICRK.js";import{getSystemDefaultsPath,getSystemSettingsPath}from"./chunk-ERGT5BD3.js";import{LoadedTrustedFolders,TrustLevel,getExplicitTrustLevel,getTrustedFoldersPath,isWorkflowAncestorDirectorySafe,parseJsoncObject}from"./chunk-WDO33SWR.js";import{arePathsEquivalent}from"./chunk-IDXJIDME.js";import{ideContextStore}from"./chunk-3NR3JBMA.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__name,__toESM}from"./chunk-KBWJGX7I.js";init_esbuild_shims();import{createHash}from"node:crypto";import*as fs from"node:fs/promises";var import_strip_json_comments=__toESM(require_strip_json_comments(),1);var MAX_TRUSTED_FOLDERS_BYTES=1024*1024;var MAX_SETTINGS_BYTES=4*1024*1024;function evaluateDaemonWorkflowAncestorTrust(snapshot,query){const denied=__name(()=>query.ancestorDirs.map(()=>false),"denied");if(snapshot.settingsError)return denied();if(!snapshot.folderTrustEnabled){return query.ancestorDirs.map(isWorkflowAncestorDirectorySafe)}if(snapshot.trustedFoldersError||snapshot.ideTrust===false&&(arePathsEquivalent(query.workspaceCwd,query.ideScopeCwd)||arePathsEquivalent(query.canonicalTargetDir,query.ideScopeCwd))){return denied()}const folders=new LoadedTrustedFolders({path:getTrustedFoldersPath(),config:{...snapshot.trustedFolders}},[]);if(folders.isPathTrusted(query.canonicalTargetDir)!==true){return denied()}return query.ancestorDirs.map(directory=>folders.isPathTrusted(directory)===true)}__name(evaluateDaemonWorkflowAncestorTrust,"evaluateDaemonWorkflowAncestorTrust");function policyError(code,filePath,error){return{code,path:filePath,message:error instanceof Error?error.message:String(error)}}__name(policyError,"policyError");async function readJsonObject(filePath,maxBytes,requireRegularFile,retryMissing=false,allowTrailingComma=false){const delays=[0,50,200];let result={};for(const delay of delays){if(delay>0){await new Promise(resolve=>setTimeout(resolve,delay))}result=await readJsonObjectOnce(filePath,maxBytes,requireRegularFile,allowTrailingComma);if(!result.error&&(!result.missing||!retryMissing))return result}return result}__name(readJsonObject,"readJsonObject");async function readJsonObjectOnce(filePath,maxBytes,requireRegularFile,allowTrailingComma){let stat2;try{stat2=await fs.lstat(filePath)}catch(error){if(error instanceof Error&&"code"in error&&error.code==="ENOENT"){return{value:{},missing:true}}return{error:policyError("trust_policy_unreadable",filePath,error)}}if(!requireRegularFile&&stat2.isSymbolicLink()){try{stat2=await fs.stat(filePath)}catch(error){return{error:policyError("trust_policy_unreadable",filePath,error)}}}if(requireRegularFile&&stat2.isSymbolicLink()||!stat2.isFile()){return{error:policyError("trust_policy_invalid",filePath,new Error("Trust policy input must be a regular file."))}}if(stat2.size>maxBytes){return{error:policyError("trust_policy_invalid",filePath,new Error(`Trust policy input exceeds ${maxBytes} bytes.`))}}try{const raw=await fs.readFile(filePath,"utf8");const parsed=allowTrailingComma?parseJsoncObject(raw):JSON.parse((0,import_strip_json_comments.default)(raw));if(typeof parsed!=="object"||parsed===null||Array.isArray(parsed)){throw new Error("Trust policy input must contain a JSON object.")}return{value:parsed}}catch(error){if(error instanceof Error&&"code"in error&&error.code==="ENOENT"){return{value:{},missing:true}}return{error:policyError("trust_policy_invalid",filePath,error)}}}__name(readJsonObjectOnce,"readJsonObjectOnce");function migrateFolderTrustSettings(value,scope){if(!value||!v1ToV2Migration.shouldMigrate(value))return value;return v1ToV2Migration.migrate(value,scope).settings}__name(migrateFolderTrustSettings,"migrateFolderTrustSettings");function folderTrustSetting(value,filePath){if(!value||!("security"in value))return{};const security=value?.["security"];if(typeof security!=="object"||security===null||Array.isArray(security)){return{error:policyError("trust_policy_invalid",filePath,new Error("`security` must be an object."))}}if(!("folderTrust"in security))return{};const folderTrust=security["folderTrust"];if(typeof folderTrust!=="object"||folderTrust===null||Array.isArray(folderTrust)){return{error:policyError("trust_policy_invalid",filePath,new Error("`security.folderTrust` must be an object."))}}if(!("enabled"in folderTrust))return{};const enabled=folderTrust["enabled"];if(typeof enabled==="boolean")return{value:enabled};return{error:policyError("trust_policy_invalid",filePath,new Error("`security.folderTrust.enabled` must be a boolean."))}}__name(folderTrustSetting,"folderTrustSetting");function parseTrustedFolders(value,filePath){const config={};for(const[rulePath,rawLevel]of Object.entries(value??{})){if(!Object.values(TrustLevel).includes(rawLevel)){return{config:{},error:policyError("trust_policy_invalid",filePath,new Error(`Invalid trust level for ${JSON.stringify(rulePath)}.`))}}config[rulePath]=rawLevel}return{config}}__name(parseTrustedFolders,"parseTrustedFolders");function semanticRevision(input){const sortedRules=Object.entries(input.trustedFolders).sort(([a],[b])=>a.localeCompare(b));return createHash("sha256").update(JSON.stringify({folderTrustEnabled:input.folderTrustEnabled,ideTrust:input.ideTrust??null,trustedFolders:sortedRules,settingsError:input.settingsError?.code??null,trustedFoldersError:input.trustedFoldersError?.code??null})).digest("hex")}__name(semanticRevision,"semanticRevision");async function readDaemonTrustPolicySnapshot(){const[user,system,systemDefaults]=await Promise.all([readJsonObject(getUserSettingsPath(),MAX_SETTINGS_BYTES,false),readJsonObject(getSystemSettingsPath(),MAX_SETTINGS_BYTES,false),readJsonObject(getSystemDefaultsPath(),MAX_SETTINGS_BYTES,false)]);const systemFolderTrust=folderTrustSetting(migrateFolderTrustSettings(system.value,"System"),getSystemSettingsPath());const userFolderTrust=folderTrustSetting(migrateFolderTrustSettings(user.value,"User"),getUserSettingsPath());const defaultsFolderTrust=folderTrustSetting(migrateFolderTrustSettings(systemDefaults.value,"SystemDefaults"),getSystemDefaultsPath());const settingsError=system.error??systemFolderTrust.error??user.error??userFolderTrust.error??systemDefaults.error??defaultsFolderTrust.error;const folderTrustEnabled=systemFolderTrust.value??userFolderTrust.value??defaultsFolderTrust.value??false;const trustedFoldersFile=await readJsonObject(getTrustedFoldersPath(),MAX_TRUSTED_FOLDERS_BYTES,true,folderTrustEnabled,true);const parsedTrustedFolders=parseTrustedFolders(trustedFoldersFile.value,getTrustedFoldersPath());const trustedFoldersError=trustedFoldersFile.error??parsedTrustedFolders.error;const ideTrust=ideContextStore.get()?.workspaceState?.isTrusted;const revision=semanticRevision({folderTrustEnabled,ideTrust,trustedFolders:parsedTrustedFolders.config,...settingsError?{settingsError}:{},...trustedFoldersError?{trustedFoldersError}:{}});return{revision,folderTrustEnabled,ideTrust,trustedFolders:Object.freeze({...parsedTrustedFolders.config}),...settingsError?{settingsError}:{},...trustedFoldersError?{trustedFoldersError}:{}}}__name(readDaemonTrustPolicySnapshot,"readDaemonTrustPolicySnapshot");function explicitTrustLevel(snapshot,workspaceCwd){return getExplicitTrustLevel(snapshot.trustedFolders,workspaceCwd)}__name(explicitTrustLevel,"explicitTrustLevel");function evaluateDaemonWorkspaceTrust(snapshot,workspaceCwd,processCwd=process.cwd()){if(snapshot.settingsError){return{state:"error",targetTrusted:false,source:"none",explicitTrustLevel:null,error:snapshot.settingsError}}if(!snapshot.folderTrustEnabled){return{state:"trusted",targetTrusted:true,source:"disabled",explicitTrustLevel:null}}if(snapshot.ideTrust!==void 0&&arePathsEquivalent(workspaceCwd,processCwd)){return{state:snapshot.ideTrust?"trusted":"untrusted",targetTrusted:snapshot.ideTrust,source:"ide",explicitTrustLevel:null}}if(snapshot.trustedFoldersError){return{state:"error",targetTrusted:false,source:"none",explicitTrustLevel:null,error:snapshot.trustedFoldersError}}const folders=new LoadedTrustedFolders({path:getTrustedFoldersPath(),config:{...snapshot.trustedFolders}},[]);const trusted=folders.isPathTrusted(workspaceCwd);return{state:trusted===true?"trusted":trusted===false?"untrusted":"unknown",targetTrusted:trusted===true,source:trusted===void 0?"none":"file",explicitTrustLevel:explicitTrustLevel(snapshot,workspaceCwd)}}__name(evaluateDaemonWorkspaceTrust,"evaluateDaemonWorkspaceTrust");export{evaluateDaemonWorkflowAncestorTrust,readDaemonTrustPolicySnapshot,evaluateDaemonWorkspaceTrust};
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2026 Qwen Team
@@ -1,6 +1,6 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
- import{resolveSupportedLanguage}from"./chunk-YE3LA3U4.js";import{resolveBundleDir}from"./chunk-4NPYOXJO.js";import{writeStderrLine}from"./chunk-M4ECEHLX.js";import{Storage}from"./chunk-5VB4YX3Z.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__glob,__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();import*as fs from"node:fs";import*as path from"node:path";import{pathToFileURL}from"node:url";init_esbuild_shims();function getTranslationModuleExport(module){return Object.prototype.hasOwnProperty.call(module,"default")?module["default"]:module}__name(getTranslationModuleExport,"getTranslationModuleExport");function isTranslationDict(value){return value!==null&&typeof value==="object"&&!Array.isArray(value)&&Object.keys(value).length>0}__name(isTranslationDict,"isTranslationDict");init_esbuild_shims();var MUST_TRANSLATE_KEYS=["Instruction files","Auto memory","View or change the language setting","List background tasks (text dump \u2014 interactive dialog opens via the footer pill)","Delete a previous session","Run installation and environment diagnostics","Browse dynamic model catalogs and choose which models stay enabled locally","Generate a one-line session recap now","Rename the current conversation. --auto lets the fast model pick a title.","Rewind conversation to a previous turn","Spawn a background agent that inherits the full conversation","Please provide a directive. Usage: /fork <directive>","Cannot fork while a response or tool call is in progress. Wait for it to finish or resolve the pending tool call.","Cannot fork before the first conversation turn.","The agent tool is unavailable; cannot fork.","Failed to launch fork: {{error}}","User launched a background fork via /fork: {{directive}}","Forked into a background agent. It inherits this conversation and runs without blocking \u2014 track it in the background tasks panel; it reports back when done.","Processing summary...","Project summary generated and saved successfully!","Saved to: {{filePath}}","Stopped because","Set UI language","Usage: /language ui [{{options}}]","Invalid language. Available: {{options}}","To request additional UI language packs, please open an issue on GitHub.","Open MCP management dialog","Manage MCP servers","Open the skills panel (browse, search, toggle, pick).","Manage Skills","Skills configuration saved.","Space toggle \xB7 Enter pick (fill input) \xB7 Esc save & exit \xB7 workspace scope","Tools","prompts","tools","Ask a quick side question without affecting the main conversation","Get a second opinion on the current conversation from a reviewer model","Consulting advisor...","Advisor review failed: {{error}}","No conversation context available for /advisor","No conversation context available for /btw","Focus too long (max {{max}} chars)","Another operation is in progress, wait for it to complete before running /advisor","No response received.","No model configured.","Manage Arena sessions","Start an Arena session with multiple models competing on the same task","Stop the current Arena session","Show the current Arena session status","Select a model result and merge its diff into the current workspace","Switch to plan mode or exit plan mode","Exited plan mode. Previous approval mode restored.","Enabled plan mode. The agent will analyze and plan without executing tools.",'Already in plan mode. Use "/plan exit" to exit plan mode.','Not in plan mode. Use "/plan" to enter plan mode first.',"Open the memory manager.","Save a durable memory to the memory system.",'Show context window usage breakdown. Use "/context detail" for per-item breakdown.',"Show per-item context usage breakdown.","Manage extensions","Manage installed extensions","Install an extension from a git repo or local path","Disable an extension","Enable an extension","Uninstall an extension","Manage extension settings","Lists installed extensions.","Updates all extensions or a named extension to the latest version.","Open extensions page in your browser","Manage Extensions","Extension Details","View Extension","Update Extension","Disable Extension","Enable Extension","Uninstall Extension","Select Scope","User Scope","Workspace Scope","No extensions found.","Toggle this help display","Toggle shell mode","Open command menu","Add file context","Accept suggestion / Autocomplete","Reverse search history","Lock release warning","Metadata write warning","Subsequent dreams may be skipped as locked until the next session's staleness sweep cleans the file.","The scheduler gate did not see this dream's timestamp; the next dream cycle may re-fire sooner than usual.","Press ? again to close","? for shortcuts",'Invalid approval mode "{{arg}}". Valid modes: {{modes}}','Approval mode set to "{{mode}}"',"auto_mode.entry_notice","Set up Qwen Code's status line UI","Cached (included in Input): {{tokens}}","By source:","Unclosed quote in arguments.","Token usage export path must be within the project working directory.","Failed to load token usage stats: {{error}}","Failed to export token usage stats: {{error}}","Note: generation timing (TTFT/TPS) belongs to generation metrics.","Cannot resolve export path within the working directory.","Export target does not exist: {{path}}","Could not create a temporary export file.","Activity","Efficiency","Today","Cache Hit Rate","Tool Success","Avg Latency","Generation Metrics","Latest Request","Generation Time","Average TTFT","Session TPS","Tool Leaderboard","Code Impact","streak","best","Token Trend","In/Out","Unset","Update requires sudo. Please run:","Standalone install detected. Please rerun the standalone installer to update:"];var globImport_locales_js=__glob({"./locales/ca.js":()=>import("./ca-C6DHLFZB.js"),"./locales/de.js":()=>import("./de-DAGCVRPC.js"),"./locales/en.js":()=>import("./en-NCSTYR4D.js"),"./locales/fr.js":()=>import("./fr-TYQLKSZJ.js"),"./locales/ja.js":()=>import("./ja-CKIVOIYI.js"),"./locales/pt.js":()=>import("./pt-MZXOOSPA.js"),"./locales/ru.js":()=>import("./ru-EU7G7NXF.js"),"./locales/zh-TW.js":()=>import("./zh-TW-CCPH46PA.js"),"./locales/zh.js":()=>import("./zh-TQOE3IND.js")});var currentLanguage="en";var translations={};var translationCache={};var loadingPromises={};var getBuiltinLocalesDir=__name(()=>path.join(resolveBundleDir(import.meta.url),"locales"),"getBuiltinLocalesDir");var getUserLocalesDir=__name(()=>path.join(Storage.getGlobalQwenDir(),"locales"),"getUserLocalesDir");function getUserLocalesDirectory(){return getUserLocalesDir()}__name(getUserLocalesDirectory,"getUserLocalesDirectory");var getLocalePath=__name((lang,useUserDir=false)=>{const baseDir=useUserDir?getUserLocalesDir():getBuiltinLocalesDir();return path.join(baseDir,`${lang}.js`)},"getLocalePath");function detectSystemLanguage(){const envLang=process.env["QWEN_CODE_LANG"]||process.env["LANG"];if(envLang){const resolved=resolveSupportedLanguage(envLang);if(resolved){return resolved}}try{const locale=Intl.DateTimeFormat().resolvedOptions().locale;const resolved=resolveSupportedLanguage(locale);if(resolved){return resolved}}catch{}return"en"}__name(detectSystemLanguage,"detectSystemLanguage");async function tryImportTranslations(moduleSpecifier){try{const module=await import(moduleSpecifier);const result=getTranslationModuleExport(module);if(isTranslationDict(result)){return{translations:result}}return{error:new Error("Module loaded but result is empty or invalid")}}catch(error){return{error:error instanceof Error?error:new Error(String(error))}}}__name(tryImportTranslations,"tryImportTranslations");async function tryImportBundledTranslations(lang){try{const module=await globImport_locales_js(`./locales/${lang}.js`);const result=getTranslationModuleExport(module);if(isTranslationDict(result)){return{translations:result}}return{error:new Error("Module loaded but result is empty or invalid")}}catch(error){return{error:error instanceof Error?error:new Error(String(error))}}}__name(tryImportBundledTranslations,"tryImportBundledTranslations");async function loadTranslationsAsync(lang){if(translationCache[lang]){return translationCache[lang]}const existingPromise=loadingPromises[lang];if(existingPromise){return existingPromise}const loadPromise=(async()=>{const userJsPath=getLocalePath(lang,true);if(fs.existsSync(getUserLocalesDir())&&fs.existsSync(userJsPath)){const userResult=await tryImportTranslations(pathToFileURL(userJsPath).href);if(userResult.translations){translationCache[lang]=userResult.translations;return userResult.translations}writeStderrLine(`Failed to load translations from user directory for ${lang}: ${userResult.error.message}`)}const builtinJsPath=getLocalePath(lang,false);const builtinModuleSpecifiers=[];if(fs.existsSync(getBuiltinLocalesDir())&&fs.existsSync(builtinJsPath)){builtinModuleSpecifiers.push(pathToFileURL(builtinJsPath).href)}let lastBuiltinError;for(const moduleSpecifier of builtinModuleSpecifiers){const builtinResult=await tryImportTranslations(moduleSpecifier);if(builtinResult.translations){translationCache[lang]=builtinResult.translations;return builtinResult.translations}lastBuiltinError=builtinResult.error}const bundledBuiltinResult=await tryImportBundledTranslations(lang);if(bundledBuiltinResult.translations){translationCache[lang]=bundledBuiltinResult.translations;return bundledBuiltinResult.translations}lastBuiltinError=bundledBuiltinResult.error;if(lastBuiltinError){writeStderrLine(`Failed to load JS translations for ${lang}: ${lastBuiltinError.message}`)}translationCache[lang]={};return{}})();loadingPromises[lang]=loadPromise;loadPromise.finally(()=>{delete loadingPromises[lang]});return loadPromise}__name(loadTranslationsAsync,"loadTranslationsAsync");function loadTranslations(lang){return translationCache[lang]||{}}__name(loadTranslations,"loadTranslations");function interpolate(template,params){if(!params)return template;return template.replace(/\{\{(\w+)\}\}/g,(match,key)=>params[key]??match)}__name(interpolate,"interpolate");function resolveLanguage(lang){if(lang==="auto"){return detectSystemLanguage()}return resolveSupportedLanguage(lang)??lang}__name(resolveLanguage,"resolveLanguage");function setLanguage(lang){const resolvedLang=resolveLanguage(lang);currentLanguage=resolvedLang;const loaded=loadTranslations(resolvedLang);translations=loaded;if(Object.keys(loaded).length===0){const userJsPath=getLocalePath(resolvedLang,true);const builtinJsPath=getLocalePath(resolvedLang,false);if(fs.existsSync(userJsPath)||fs.existsSync(builtinJsPath)){writeStderrLine(`Language file for ${resolvedLang} requires async loading. Use setLanguageAsync() instead, or call initializeI18n() first.`)}}}__name(setLanguage,"setLanguage");async function setLanguageAsync(lang){currentLanguage=resolveLanguage(lang);translations=await loadTranslationsAsync(currentLanguage)}__name(setLanguageAsync,"setLanguageAsync");function getCurrentLanguage(){return currentLanguage}__name(getCurrentLanguage,"getCurrentLanguage");function t(key,params){const translation=translations[key]??key;if(Array.isArray(translation)){return key}return interpolate(translation,params)}__name(t,"t");function localizeToolDisplayName(displayName){const key=`toolDisplayName.${displayName}`;const translated=t(key);return translated===key?displayName:translated}__name(localizeToolDisplayName,"localizeToolDisplayName");function ta(key){const translation=translations[key];if(Array.isArray(translation)){return translation}return[]}__name(ta,"ta");async function initializeI18n(lang){await setLanguageAsync(lang??"auto")}__name(initializeI18n,"initializeI18n");function resolveLanguageSetting(settingsLanguage){return process.env["QWEN_CODE_LANG"]||settingsLanguage||"auto"}__name(resolveLanguageSetting,"resolveLanguageSetting");export{MUST_TRANSLATE_KEYS,getUserLocalesDirectory,detectSystemLanguage,resolveLanguage,setLanguage,setLanguageAsync,getCurrentLanguage,t,localizeToolDisplayName,ta,initializeI18n,resolveLanguageSetting};
3
+ import{resolveSupportedLanguage}from"./chunk-FWJKQA2H.js";import{resolveBundleDir}from"./chunk-4NPYOXJO.js";import{writeStderrLine}from"./chunk-M4ECEHLX.js";import{Storage}from"./chunk-5VB4YX3Z.js";import{init_esbuild_shims}from"./chunk-VKDAXTCZ.js";import{__glob,__name}from"./chunk-KBWJGX7I.js";init_esbuild_shims();import*as fs from"node:fs";import*as path from"node:path";import{pathToFileURL}from"node:url";init_esbuild_shims();function getTranslationModuleExport(module){return Object.prototype.hasOwnProperty.call(module,"default")?module["default"]:module}__name(getTranslationModuleExport,"getTranslationModuleExport");function isTranslationDict(value){return value!==null&&typeof value==="object"&&!Array.isArray(value)&&Object.keys(value).length>0}__name(isTranslationDict,"isTranslationDict");init_esbuild_shims();var MUST_TRANSLATE_KEYS=["Instruction files","Auto memory","View or change the language setting","List background tasks (text dump \u2014 interactive dialog opens via the footer pill)","Delete a previous session","Run installation and environment diagnostics","Browse dynamic model catalogs and choose which models stay enabled locally","Generate a one-line session recap now","Rename the current conversation. --auto lets the fast model pick a title.","Rewind conversation to a previous turn","Spawn a background agent that inherits the full conversation","Please provide a directive. Usage: /fork <directive>","Cannot fork while a response or tool call is in progress. Wait for it to finish or resolve the pending tool call.","Cannot fork before the first conversation turn.","The agent tool is unavailable; cannot fork.","Failed to launch fork: {{error}}","User launched a background fork via /fork: {{directive}}","Forked into a background agent. It inherits this conversation and runs without blocking \u2014 track it in the background tasks panel; it reports back when done.","Processing summary...","Project summary generated and saved successfully!","Saved to: {{filePath}}","Stopped because","Set UI language","Usage: /language ui [{{options}}]","Invalid language. Available: {{options}}","To request additional UI language packs, please open an issue on GitHub.","Open MCP management dialog","Manage MCP servers","Open the skills panel (browse, search, toggle, pick).","Manage Skills","Skills configuration saved.","Space toggle \xB7 Enter pick (fill input) \xB7 Esc save & exit \xB7 workspace scope","Tools","prompts","tools","Ask a quick side question without affecting the main conversation","Get a second opinion on the current conversation from a reviewer model","Consulting advisor...","Advisor review failed: {{error}}","No conversation context available for /advisor","No conversation context available for /btw","Focus too long (max {{max}} chars)","Another operation is in progress, wait for it to complete before running /advisor","No response received.","No model configured.","Manage Arena sessions","Start an Arena session with multiple models competing on the same task","Stop the current Arena session","Show the current Arena session status","Select a model result and merge its diff into the current workspace","Switch to plan mode or exit plan mode","Exited plan mode. Previous approval mode restored.","Enabled plan mode. The agent will analyze and plan without executing tools.",'Already in plan mode. Use "/plan exit" to exit plan mode.','Not in plan mode. Use "/plan" to enter plan mode first.',"Open the memory manager.","Save a durable memory to the memory system.",'Show context window usage breakdown. Use "/context detail" for per-item breakdown.',"Show per-item context usage breakdown.","Manage extensions","Manage installed extensions","Install an extension from a git repo or local path","Disable an extension","Enable an extension","Uninstall an extension","Manage extension settings","Lists installed extensions.","Updates all extensions or a named extension to the latest version.","Open extensions page in your browser","Manage Extensions","Extension Details","View Extension","Update Extension","Disable Extension","Enable Extension","Uninstall Extension","Select Scope","User Scope","Workspace Scope","No extensions found.","Toggle this help display","Toggle shell mode","Open command menu","Add file context","Accept suggestion / Autocomplete","Reverse search history","Lock release warning","Metadata write warning","Subsequent dreams may be skipped as locked until the next session's staleness sweep cleans the file.","The scheduler gate did not see this dream's timestamp; the next dream cycle may re-fire sooner than usual.","Press ? again to close","? for shortcuts",'Invalid approval mode "{{arg}}". Valid modes: {{modes}}','Approval mode set to "{{mode}}"',"auto_mode.entry_notice","Set up Qwen Code's status line UI","Cached (included in Input): {{tokens}}","By source:","Unclosed quote in arguments.","Token usage export path must be within the project working directory.","Failed to load token usage stats: {{error}}","Failed to export token usage stats: {{error}}","Note: generation timing (TTFT/TPS) belongs to generation metrics.","Cannot resolve export path within the working directory.","Export target does not exist: {{path}}","Could not create a temporary export file.","Activity","Efficiency","Today","Cache Hit Rate","Tool Success","Avg Latency","Generation Metrics","Latest Request","Generation Time","Average TTFT","Session TPS","Tool Leaderboard","Code Impact","streak","best","Token Trend","In/Out","Unset","Update requires sudo. Please run:","Standalone install detected. Please rerun the standalone installer to update:"];var globImport_locales_js=__glob({"./locales/ca.js":()=>import("./ca-C6DHLFZB.js"),"./locales/de.js":()=>import("./de-DAGCVRPC.js"),"./locales/en.js":()=>import("./en-NCSTYR4D.js"),"./locales/fr.js":()=>import("./fr-TYQLKSZJ.js"),"./locales/ja.js":()=>import("./ja-CKIVOIYI.js"),"./locales/pt.js":()=>import("./pt-MZXOOSPA.js"),"./locales/ru.js":()=>import("./ru-EU7G7NXF.js"),"./locales/zh-TW.js":()=>import("./zh-TW-CCPH46PA.js"),"./locales/zh.js":()=>import("./zh-TQOE3IND.js")});var currentLanguage="en";var translations={};var translationCache={};var loadingPromises={};var getBuiltinLocalesDir=__name(()=>path.join(resolveBundleDir(import.meta.url),"locales"),"getBuiltinLocalesDir");var getUserLocalesDir=__name(()=>path.join(Storage.getGlobalQwenDir(),"locales"),"getUserLocalesDir");function getUserLocalesDirectory(){return getUserLocalesDir()}__name(getUserLocalesDirectory,"getUserLocalesDirectory");var getLocalePath=__name((lang,useUserDir=false)=>{const baseDir=useUserDir?getUserLocalesDir():getBuiltinLocalesDir();return path.join(baseDir,`${lang}.js`)},"getLocalePath");function detectSystemLanguage(){const envLang=process.env["QWEN_CODE_LANG"]||process.env["LANG"];if(envLang){const resolved=resolveSupportedLanguage(envLang);if(resolved){return resolved}}try{const locale=Intl.DateTimeFormat().resolvedOptions().locale;const resolved=resolveSupportedLanguage(locale);if(resolved){return resolved}}catch{}return"en"}__name(detectSystemLanguage,"detectSystemLanguage");async function tryImportTranslations(moduleSpecifier){try{const module=await import(moduleSpecifier);const result=getTranslationModuleExport(module);if(isTranslationDict(result)){return{translations:result}}return{error:new Error("Module loaded but result is empty or invalid")}}catch(error){return{error:error instanceof Error?error:new Error(String(error))}}}__name(tryImportTranslations,"tryImportTranslations");async function tryImportBundledTranslations(lang){try{const module=await globImport_locales_js(`./locales/${lang}.js`);const result=getTranslationModuleExport(module);if(isTranslationDict(result)){return{translations:result}}return{error:new Error("Module loaded but result is empty or invalid")}}catch(error){return{error:error instanceof Error?error:new Error(String(error))}}}__name(tryImportBundledTranslations,"tryImportBundledTranslations");async function loadTranslationsAsync(lang){if(translationCache[lang]){return translationCache[lang]}const existingPromise=loadingPromises[lang];if(existingPromise){return existingPromise}const loadPromise=(async()=>{const userJsPath=getLocalePath(lang,true);if(fs.existsSync(getUserLocalesDir())&&fs.existsSync(userJsPath)){const userResult=await tryImportTranslations(pathToFileURL(userJsPath).href);if(userResult.translations){translationCache[lang]=userResult.translations;return userResult.translations}writeStderrLine(`Failed to load translations from user directory for ${lang}: ${userResult.error.message}`)}const builtinJsPath=getLocalePath(lang,false);const builtinModuleSpecifiers=[];if(fs.existsSync(getBuiltinLocalesDir())&&fs.existsSync(builtinJsPath)){builtinModuleSpecifiers.push(pathToFileURL(builtinJsPath).href)}let lastBuiltinError;for(const moduleSpecifier of builtinModuleSpecifiers){const builtinResult=await tryImportTranslations(moduleSpecifier);if(builtinResult.translations){translationCache[lang]=builtinResult.translations;return builtinResult.translations}lastBuiltinError=builtinResult.error}const bundledBuiltinResult=await tryImportBundledTranslations(lang);if(bundledBuiltinResult.translations){translationCache[lang]=bundledBuiltinResult.translations;return bundledBuiltinResult.translations}lastBuiltinError=bundledBuiltinResult.error;if(lastBuiltinError){writeStderrLine(`Failed to load JS translations for ${lang}: ${lastBuiltinError.message}`)}translationCache[lang]={};return{}})();loadingPromises[lang]=loadPromise;loadPromise.finally(()=>{delete loadingPromises[lang]});return loadPromise}__name(loadTranslationsAsync,"loadTranslationsAsync");function loadTranslations(lang){return translationCache[lang]||{}}__name(loadTranslations,"loadTranslations");function interpolate(template,params){if(!params)return template;return template.replace(/\{\{(\w+)\}\}/g,(match,key)=>params[key]??match)}__name(interpolate,"interpolate");function resolveLanguage(lang){if(lang==="auto"){return detectSystemLanguage()}return resolveSupportedLanguage(lang)??lang}__name(resolveLanguage,"resolveLanguage");function setLanguage(lang){const resolvedLang=resolveLanguage(lang);currentLanguage=resolvedLang;const loaded=loadTranslations(resolvedLang);translations=loaded;if(Object.keys(loaded).length===0){const userJsPath=getLocalePath(resolvedLang,true);const builtinJsPath=getLocalePath(resolvedLang,false);if(fs.existsSync(userJsPath)||fs.existsSync(builtinJsPath)){writeStderrLine(`Language file for ${resolvedLang} requires async loading. Use setLanguageAsync() instead, or call initializeI18n() first.`)}}}__name(setLanguage,"setLanguage");async function setLanguageAsync(lang){currentLanguage=resolveLanguage(lang);translations=await loadTranslationsAsync(currentLanguage)}__name(setLanguageAsync,"setLanguageAsync");function getCurrentLanguage(){return currentLanguage}__name(getCurrentLanguage,"getCurrentLanguage");function t(key,params){const translation=translations[key]??key;if(Array.isArray(translation)){return key}return interpolate(translation,params)}__name(t,"t");function localizeToolDisplayName(displayName){const key=`toolDisplayName.${displayName}`;const translated=t(key);return translated===key?displayName:translated}__name(localizeToolDisplayName,"localizeToolDisplayName");function ta(key){const translation=translations[key];if(Array.isArray(translation)){return translation}return[]}__name(ta,"ta");async function initializeI18n(lang){await setLanguageAsync(lang??"auto")}__name(initializeI18n,"initializeI18n");function resolveLanguageSetting(settingsLanguage){return process.env["QWEN_CODE_LANG"]||settingsLanguage||"auto"}__name(resolveLanguageSetting,"resolveLanguageSetting");export{MUST_TRANSLATE_KEYS,getUserLocalesDirectory,detectSystemLanguage,resolveLanguage,setLanguage,setLanguageAsync,getCurrentLanguage,t,localizeToolDisplayName,ta,initializeI18n,resolveLanguageSetting};
4
4
  /**
5
5
  * @license
6
6
  * Copyright 2026 Qwen Team