@qwen-code/qwen-code 0.19.12 → 0.20.0-nightly.20260720.0c271659d

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 (276) hide show
  1. package/bundled/qc-helper/docs/integration-github-action.md +1 -1
  2. package/bundled/qc-helper/docs/qwen-serve.md +42 -5
  3. package/bundled/review/DESIGN.md +2 -2
  4. package/bundled/review/SKILL.md +13 -9
  5. package/chunks/{MaxSizedBox-QOXLJGAF.js → MaxSizedBox-ED3QND6V.js} +30 -27
  6. package/chunks/{StandaloneSessionPicker-FLV6CGYJ.js → StandaloneSessionPicker-NQVAOTKS.js} +50 -45
  7. package/chunks/{acpAgent-OB2CTF3P.js → acpAgent-HOBFF5B6.js} +353 -130
  8. package/chunks/{agent-CKSI7BTR.js → agent-J7EPFLA6.js} +22 -22
  9. package/chunks/{agent-headless-U36LIYTU.js → agent-headless-RRG3JU7Q.js} +22 -22
  10. package/chunks/{anthropicContentGenerator-ZZRGFEES.js → anthropicContentGenerator-HVKLXOOU.js} +6 -5
  11. package/chunks/{artifact-tool-PHO5XEGZ.js → artifact-tool-WBCAMD3O.js} +2 -2
  12. package/chunks/{askUserQuestion-CEPBT47X.js → askUserQuestion-6DZC4UV5.js} +2 -2
  13. package/chunks/{bridge-AIKTINJG.js → bridge-OW5FZ6BF.js} +25 -25
  14. package/chunks/build-SSCNEHZZ.js +62 -0
  15. package/chunks/{channel-worker-group-NEUVTPB2.js → channel-worker-group-53CMOPFT.js} +4 -4
  16. package/chunks/{channel-worker-manager-7CQVOVWV.js → channel-worker-manager-UTXILKC2.js} +4 -4
  17. package/chunks/{channel-worker-supervisor-3BU2KNCZ.js → channel-worker-supervisor-ZGO2W2MD.js} +3 -3
  18. package/chunks/chunk-27AJEU6G.js +442 -0
  19. package/chunks/{chunk-BABX5XRO.js → chunk-2HOVDT7W.js} +1 -1
  20. package/chunks/{chunk-GW7BONBU.js → chunk-2JOLZA6L.js} +5 -5
  21. package/chunks/{chunk-ZSDFNE6Y.js → chunk-2TDSM7I6.js} +3 -3
  22. package/chunks/{chunk-6IITZE7O.js → chunk-2YJLFCYI.js} +7 -7
  23. package/chunks/{chunk-VEFR4XJQ.js → chunk-37MGCVTS.js} +1 -1
  24. package/chunks/{chunk-3B6PSWHE.js → chunk-3ML52IFS.js} +4 -4
  25. package/chunks/{chunk-TKASNYDS.js → chunk-3QR5MOHP.js} +2 -2
  26. package/chunks/{chunk-KRMARA3A.js → chunk-3SNKL6L6.js} +29 -13
  27. package/chunks/{chunk-DJ4VHAFJ.js → chunk-3ZL6YMO2.js} +3 -3
  28. package/chunks/chunk-43T5WDQ7.js +127 -0
  29. package/chunks/{chunk-W6CQPLWM.js → chunk-4ODB7WIB.js} +1 -1
  30. package/chunks/{chunk-CHPQFLW6.js → chunk-4UH63YE5.js} +5 -5
  31. package/chunks/{chunk-2CCDMJM7.js → chunk-53OPIXUE.js} +3 -3
  32. package/chunks/{chunk-HTHUX2T5.js → chunk-5QWWOFGG.js} +0 -1
  33. package/chunks/{chunk-3DJY4IFO.js → chunk-5SCI6E3E.js} +1 -1
  34. package/chunks/{chunk-4CHDYDG3.js → chunk-6EFTQYW7.js} +1 -1
  35. package/chunks/{chunk-OBSLEYCD.js → chunk-6HQW55TM.js} +29 -2
  36. package/chunks/{chunk-N47VAEAJ.js → chunk-6MN6XJTR.js} +2379 -1291
  37. package/chunks/{chunk-UCTCDLDS.js → chunk-6VGRTGOG.js} +1 -1
  38. package/chunks/{chunk-KNGZ5EYL.js → chunk-7JQK6FXK.js} +198 -120
  39. package/chunks/{chunk-2476XGOU.js → chunk-A4TJMY65.js} +1 -1
  40. package/chunks/{chunk-67Q33DQY.js → chunk-AMRWCMX4.js} +4 -4
  41. package/chunks/{chunk-XAAEDML2.js → chunk-AYCDXHZB.js} +1 -1
  42. package/chunks/{chunk-VAJS2E2D.js → chunk-BDBMYST4.js} +1 -1
  43. package/chunks/{chunk-F2RR4HO2.js → chunk-BVLROR2T.js} +1 -1
  44. package/chunks/{chunk-UE5TZ55T.js → chunk-C27BYUX6.js} +29 -2
  45. package/chunks/{chunk-PK7COE5O.js → chunk-CL7IRYTA.js} +1 -1
  46. package/chunks/{chunk-KMJOMWHE.js → chunk-COWNNAWJ.js} +1 -1
  47. package/chunks/{chunk-UOA2IHRI.js → chunk-CPCVCKKF.js} +1 -1
  48. package/chunks/{chunk-4RPARQ5D.js → chunk-D2VIDMVM.js} +2 -2
  49. package/chunks/{chunk-4MPYGENG.js → chunk-DCCW7CRR.js} +6 -6
  50. package/chunks/chunk-DIKIJS6Z.js +114 -0
  51. package/chunks/{chunk-ETN2G32U.js → chunk-DR5AUNJ2.js} +4 -4
  52. package/chunks/{chunk-6ETOSWAO.js → chunk-DSBCU6JY.js} +3 -3
  53. package/chunks/{chunk-LKR7QQ63.js → chunk-EAUYY7SS.js} +3 -3
  54. package/chunks/{chunk-J2MKYJKZ.js → chunk-EIAK6Q2B.js} +2 -2
  55. package/chunks/{chunk-WEPXQKGP.js → chunk-EZVDJFZ7.js} +1 -1
  56. package/chunks/{chunk-WHQNBBWW.js → chunk-FLSVD6BS.js} +2 -2
  57. package/chunks/{chunk-3ESL7JXA.js → chunk-FODJ5Q5K.js} +3 -3
  58. package/chunks/{chunk-4XCVGEEX.js → chunk-FSL5W5TI.js} +3 -3
  59. package/chunks/{chunk-NE6HHLL3.js → chunk-FWT66O5E.js} +2 -2
  60. package/chunks/{chunk-OSSDHJDU.js → chunk-G45X5TRN.js} +1 -1
  61. package/chunks/{chunk-ZGT623SG.js → chunk-G6MDKXDP.js} +12 -12
  62. package/chunks/{chunk-KANTXY7B.js → chunk-GKY2OJ7R.js} +2 -2
  63. package/chunks/chunk-GMGDLUC7.js +37 -0
  64. package/chunks/{chunk-J6NT5YTN.js → chunk-H2XVO6NE.js} +1 -289
  65. package/chunks/{chunk-XSEWNUMZ.js → chunk-I4HZ4GOD.js} +8 -8
  66. package/chunks/{chunk-CPU6I5YV.js → chunk-I6JUVU7J.js} +34 -24
  67. package/chunks/{chunk-UZC5VPOJ.js → chunk-IDGTC5AS.js} +3 -3
  68. package/chunks/{chunk-QIFTJDBY.js → chunk-INL2RSLA.js} +1 -1
  69. package/chunks/{chunk-GSPWDTYY.js → chunk-INQQM52C.js} +18 -16
  70. package/chunks/{chunk-HVGJWOR6.js → chunk-JBCFW3IL.js} +2 -2
  71. package/chunks/{chunk-LPHGXXZX.js → chunk-JD3MKVKL.js} +1 -1
  72. package/chunks/{chunk-GCY7QTCE.js → chunk-JDPCOUZ3.js} +1602 -398
  73. package/chunks/{chunk-NUHSLBJZ.js → chunk-JNWZQ27S.js} +15 -9
  74. package/chunks/{chunk-KGWA7XYL.js → chunk-JRJ2LV6P.js} +6 -226
  75. package/chunks/{chunk-QSG4ZFG4.js → chunk-KTUQMDEP.js} +1 -1
  76. package/chunks/{chunk-RKUMFUFM.js → chunk-LTQ5C5AB.js} +4 -4
  77. package/chunks/{chunk-V4PCIS25.js → chunk-MAQQGNQ5.js} +44 -1
  78. package/chunks/{chunk-EISVEV45.js → chunk-NBMIC7DR.js} +2 -2
  79. package/chunks/{chunk-GEHSF7MS.js → chunk-NEEB7UEN.js} +2545 -1974
  80. package/chunks/{chunk-BKNPMEN6.js → chunk-NIJEXGV6.js} +93 -17
  81. package/chunks/{chunk-PR5XQ73G.js → chunk-NQVA6O7F.js} +2 -2
  82. package/chunks/{chunk-FUSMC3SZ.js → chunk-NT324EJ6.js} +13 -8
  83. package/chunks/{chunk-5N7M4XYN.js → chunk-O2SPEQFA.js} +5 -5
  84. package/chunks/{chunk-OEHCAWUA.js → chunk-OLMETXLX.js} +2 -2
  85. package/chunks/{chunk-JCJPZMJV.js → chunk-OOCI5VVU.js} +1 -1
  86. package/chunks/{chunk-XSPFQQRE.js → chunk-OONJNQ42.js} +3 -3
  87. package/chunks/{chunk-ANRANWVE.js → chunk-OP4MOGXF.js} +1 -1
  88. package/chunks/{chunk-SGPFJMRP.js → chunk-PBATSWUQ.js} +1 -1
  89. package/chunks/chunk-QKYTTBYW.js +624 -0
  90. package/chunks/{chunk-W4UN42YP.js → chunk-QOSKUG5P.js} +77 -20
  91. package/chunks/{chunk-76BFY7AF.js → chunk-QTERJVPZ.js} +1 -6
  92. package/chunks/{chunk-WIYV7CSF.js → chunk-RB7NXUP5.js} +3 -3
  93. package/chunks/{chunk-HCCR43AY.js → chunk-RFIAR4YL.js} +1 -1
  94. package/chunks/{chunk-GMUPIMHF.js → chunk-RS5JPH6Y.js} +3 -3
  95. package/chunks/chunk-RS7MT2QG.js +305 -0
  96. package/chunks/{chunk-GXFYV7MP.js → chunk-SG2PEESS.js} +1106 -592
  97. package/chunks/{chunk-PUKUUASO.js → chunk-SLLG5XXE.js} +1 -1
  98. package/chunks/{chunk-GLH2NTPB.js → chunk-SQMTULHJ.js} +1 -1
  99. package/chunks/{chunk-NPMVLWYL.js → chunk-STFP7PJR.js} +6 -6
  100. package/chunks/chunk-SV5PQVQE.js +71 -0
  101. package/chunks/{chunk-HZ4M2UQD.js → chunk-TFNZCC4B.js} +1 -1
  102. package/chunks/{chunk-5QSVANRT.js → chunk-THNJYTA6.js} +2 -2
  103. package/chunks/{chunk-MRE77ST5.js → chunk-TN2BYMNH.js} +69 -2216
  104. package/chunks/{chunk-64GC5EMF.js → chunk-TQBA6DVX.js} +1 -1
  105. package/chunks/{chunk-VLHQMOZK.js → chunk-U24E4R5U.js} +3 -3
  106. package/chunks/{chunk-4CA4WUMS.js → chunk-UEY4AYUL.js} +2 -2
  107. package/chunks/{chunk-42VIHAYT.js → chunk-UGRL5B5F.js} +1 -1
  108. package/chunks/chunk-V7RNNPGC.js +44 -0
  109. package/chunks/{chunk-R3EDIMYZ.js → chunk-VGFFYNBD.js} +1 -1
  110. package/chunks/chunk-VIOFKPPN.js +125 -0
  111. package/chunks/{chunk-BEZPRKD3.js → chunk-VLDBVLC4.js} +156 -2
  112. package/chunks/{chunk-HD6EGS5K.js → chunk-VWLLDHAY.js} +6 -6
  113. package/chunks/chunk-WCDH2CRI.js +1187 -0
  114. package/chunks/{chunk-7SX6WZNO.js → chunk-XVVH63JG.js} +3 -3
  115. package/chunks/{chunk-I7RRHHYG.js → chunk-Y2ENGUD6.js} +1 -1
  116. package/chunks/{chunk-NALRQ3SG.js → chunk-Y5534U4G.js} +332 -116
  117. package/chunks/{chunk-4SJJT466.js → chunk-YDZ6J2BY.js} +72 -159
  118. package/chunks/{chunk-APOFULHK.js → chunk-YNBP3YSU.js} +7 -6
  119. package/chunks/{chunk-EFAXBOQO.js → chunk-YWEW33JY.js} +7 -7
  120. package/chunks/{chunk-335ECZTA.js → chunk-ZEOZL37W.js} +1 -1
  121. package/chunks/{chunk-DUR7BZYK.js → chunk-ZGJ4LDD2.js} +53 -28
  122. package/chunks/{computer-use-4PUGCUQK.js → computer-use-ET5476VX.js} +22 -22
  123. package/chunks/{config-utils-6PJUXHLI.js → config-utils-AHQ6YZ66.js} +3 -3
  124. package/chunks/{contextCommand-C57KTWFV.js → contextCommand-QIULFDBF.js} +25 -26
  125. package/chunks/{create-sub-session-5Q42XR6I.js → create-sub-session-BVL2ZHTM.js} +22 -22
  126. package/chunks/{create-sub-session-DIJOV6HV.js → create-sub-session-P26FE5GG.js} +2 -2
  127. package/chunks/{cron-create-X462ERYA.js → cron-create-JWFHBDRQ.js} +4 -4
  128. package/chunks/{cron-delete-SL5UJUM3.js → cron-delete-GDX4E26G.js} +4 -4
  129. package/chunks/{cron-list-3MD6SVXI.js → cron-list-USMAIWPT.js} +4 -4
  130. package/chunks/{daemon-ZW6LHOXT.js → daemon-EE5T3KOW.js} +169 -84
  131. package/chunks/{daemon-status-provider-YPV3UXHT.js → daemon-status-provider-L5UW7TGV.js} +29 -29
  132. package/chunks/{dist-3DQNQJ6H.js → dist-2BHAYBKP.js} +1 -1
  133. package/chunks/{dist-J2H4KTLB.js → dist-2MIU4UUH.js} +1 -1
  134. package/chunks/{dist-IEQSDXS7.js → dist-53PZYC5B.js} +2 -2
  135. package/chunks/{dist-NUXRQHC5.js → dist-AU7NQQRP.js} +1 -1
  136. package/chunks/{dist-XLE6ODMB.js → dist-FUTEXY6A.js} +1 -1
  137. package/chunks/{dist-IGZMVS5R.js → dist-WGTQO7F2.js} +1 -1
  138. package/chunks/{earlyInputCapture-5VDWSYAM.js → earlyInputCapture-ZLAL5GTE.js} +23 -23
  139. package/chunks/{edit-GORZTX2U.js → edit-4ZOPT6OC.js} +23 -23
  140. package/chunks/{enter-worktree-LJB2AW4L.js → enter-worktree-DFP5CZYS.js} +22 -22
  141. package/chunks/{enterPlanMode-LIIPP37T.js → enterPlanMode-7VEJ7A2A.js} +22 -22
  142. package/chunks/{environment-HQ2UHJ35.js → environment-KHS35XJY.js} +24 -24
  143. package/chunks/{errors-6JD5VMVQ.js → errors-574WBU5R.js} +24 -24
  144. package/chunks/{exit-worktree-IEP2WHOV.js → exit-worktree-5Q7V6D4C.js} +22 -22
  145. package/chunks/{exitPlanMode-U5Z6XBLO.js → exitPlanMode-SX2F6PDJ.js} +22 -22
  146. package/chunks/{fast-path-HFKNMP23.js → fast-path-G7BLOZVF.js} +2 -2
  147. package/chunks/{gemini-C2SCJH3N.js → gemini-M4JWSTGU.js} +70 -68
  148. package/chunks/{geminiContentGenerator-ADZTXEKV.js → geminiContentGenerator-MKXLUFUH.js} +4 -4
  149. package/chunks/{glob-GOAPGD6G.js → glob-FPKZY5W6.js} +22 -22
  150. package/chunks/{grep-HZLSTX7D.js → grep-RS22OMZG.js} +22 -22
  151. package/chunks/{handleAutoUpdate-UF74WGFE.js → handleAutoUpdate-RFNQ36JC.js} +27 -28
  152. package/chunks/{i18n-FMXIYUOC.js → i18n-MAEWSKYF.js} +23 -23
  153. package/chunks/{initializer-ERDBM3DU.js → initializer-T2BFZJBP.js} +28 -28
  154. package/chunks/{installationInfo-LROMXYLX.js → installationInfo-3UETF773.js} +25 -23
  155. package/chunks/{keychain-token-storage-K23CFKGN.js → keychain-token-storage-DWRJMNH3.js} +2 -2
  156. package/chunks/{list-6JPJROU5.js → list-FWZUKWD2.js} +30 -30
  157. package/chunks/{loadedSettingsAdapter-QCWYUBBF.js → loadedSettingsAdapter-3DUNHAPX.js} +27 -27
  158. package/chunks/{loop-wakeup-6H7OENTB.js → loop-wakeup-5GLTUBHA.js} +5 -5
  159. package/chunks/{ls-APTSOOS5.js → ls-FHBY3Y7I.js} +4 -4
  160. package/chunks/{lsp-HPACPJAN.js → lsp-B6VMEW6Y.js} +2 -2
  161. package/chunks/{mcp-3P3KWYWO.js → mcp-POXS7QWD.js} +27 -27
  162. package/chunks/{monitor-LMYKCF6R.js → monitor-2ZZC2NKH.js} +22 -22
  163. package/chunks/nonInteractiveCli-WSJVCB2W.js +126 -0
  164. package/chunks/{notebook-edit-IBEOVZ6A.js → notebook-edit-BMQLME3Q.js} +23 -23
  165. package/chunks/{openaiContentGenerator-42PZKET5.js → openaiContentGenerator-GOREG72R.js} +11 -11
  166. package/chunks/{pidfile-VTBDIGOH.js → pidfile-MVZDE5TC.js} +23 -23
  167. package/chunks/{processUtils-L7ZKOGDG.js → processUtils-RH5KNLDH.js} +2 -2
  168. package/chunks/{qwenContentGenerator-VR2CNFGI.js → qwenContentGenerator-R55BCLRI.js} +24 -24
  169. package/chunks/{qwenOAuth2-6LS2T3Q6.js → qwenOAuth2-QZBI2SOZ.js} +11 -11
  170. package/chunks/react-SG7JAQSZ.js +8 -0
  171. package/chunks/{read-file-VSKOE22I.js → read-file-CPS2CYYG.js} +8 -8
  172. package/chunks/{read-mcp-resource-C6NT52T6.js → read-mcp-resource-AKCL7I43.js} +2 -2
  173. package/chunks/{record-artifact-ENCU7QCL.js → record-artifact-PEUB7727.js} +2 -2
  174. package/chunks/resumeHistoryUtils-YD6DSYHU.js +78 -0
  175. package/chunks/{ripGrep-5V5FLW2A.js → ripGrep-UKGJ7RHZ.js} +22 -22
  176. package/chunks/{run-qwen-serve-LSOPP4R2.js → run-qwen-serve-GFKSKLF6.js} +1442 -148
  177. package/chunks/{runtime-LT7R4CS5.js → runtime-4KGNL3TP.js} +31 -31
  178. package/chunks/{scheduler-YOWQ7KZP.js → scheduler-GJ3CELWI.js} +22 -22
  179. package/chunks/{send-message-5GZ4FX2V.js → send-message-3RHE7HSM.js} +3 -3
  180. package/chunks/{serve-VWLBXKGK.js → serve-UU6Z4C7W.js} +27 -27
  181. package/chunks/{server-3RW3FYOH.js → server-RTJUMN24.js} +393 -256
  182. package/chunks/{session-ZONXFOBQ.js → session-EYD3CEB5.js} +79 -163
  183. package/chunks/{settings-JC3VC53L.js → settings-H5O22TGQ.js} +26 -26
  184. package/chunks/{shell-2NGEMAVM.js → shell-KVNHDHMT.js} +22 -22
  185. package/chunks/{skill-3U2T6H3E.js → skill-32525KCE.js} +10 -10
  186. package/chunks/{spawnChannel-QEAUPARQ.js → spawnChannel-G7DUQKHL.js} +24 -24
  187. package/chunks/{src-75ZPXO7B.js → src-DUFUUEHE.js} +52 -22
  188. package/chunks/{standalone-update-UUJWJWYY.js → standalone-update-UC6CWBLH.js} +24 -24
  189. package/chunks/{startInteractiveUI-V7XISPQ6.js → startInteractiveUI-A5YYAWLF.js} +5451 -2045
  190. package/chunks/{syntheticOutput-ULOVVLY4.js → syntheticOutput-FG5PQKIR.js} +3 -3
  191. package/chunks/{task-create-DUE2PMNI.js → task-create-HX32YXO7.js} +7 -7
  192. package/chunks/{task-list-WVPNX7BZ.js → task-list-QWSY4ZIU.js} +5 -5
  193. package/chunks/{task-stop-CPEQWOT6.js → task-stop-GWC6UWAL.js} +2 -2
  194. package/chunks/{task-update-HY2LNFFB.js → task-update-NCTAB73Q.js} +7 -7
  195. package/chunks/{team-create-R6AXDYPG.js → team-create-LS2Q32Y4.js} +22 -22
  196. package/chunks/{team-delete-JJV6IUOA.js → team-delete-KK37HTOG.js} +5 -5
  197. package/chunks/{team-plan-approval-O2ZPPT64.js → team-plan-approval-DWCZABX6.js} +22 -22
  198. package/chunks/{theme-manager-YIX2IC2D.js → theme-manager-E22CNBIL.js} +23 -23
  199. package/chunks/{todoWrite-JHHIDOIV.js → todoWrite-ERCAMLFS.js} +4 -4
  200. package/chunks/{tool-search-5IE2VO7X.js → tool-search-MHXUDFD2.js} +9 -9
  201. package/chunks/{total-session-admission-K6APQYEF.js → total-session-admission-KOPTGDJZ.js} +25 -25
  202. package/chunks/{trustedFolders-GPSSPVBF.js → trustedFolders-ANQXYAQT.js} +23 -23
  203. package/chunks/{update-relaunch-4BVAPX6Y.js → update-relaunch-HFGRB7PE.js} +9 -9
  204. package/chunks/{updateCheck-AHTHWLAM.js → updateCheck-EKIPND4B.js} +33 -26
  205. package/chunks/useAutoAcceptIndicator-EE22V2F5.js +80 -0
  206. package/chunks/{validateNonInterActiveAuth-UKAPCWDM.js → validateNonInterActiveAuth-RUICXVPH.js} +61 -63
  207. package/chunks/{version-EXGWKKQE.js → version-QLT755OV.js} +1 -1
  208. package/chunks/{web-fetch-ZDNE6FF2.js → web-fetch-DINW4Z65.js} +10 -10
  209. package/chunks/{workflow-G7U6OQWS.js → workflow-GPMXRWKK.js} +23 -23
  210. package/chunks/{workspace-providers-status-W6CEA6YM.js → workspace-providers-status-XCQKBVSX.js} +30 -30
  211. package/chunks/{workspace-registration-store-OGBMWCLC.js → workspace-registration-store-4I4KL7TN.js} +1 -1
  212. package/chunks/{workspace-registry-ZUWQM44P.js → workspace-registry-N4J57SFQ.js} +25 -25
  213. package/chunks/{workspace-service-UXX5P7GU.js → workspace-service-JJNJWVH3.js} +32 -32
  214. package/chunks/{workspace-skills-status-635B5R7N.js → workspace-skills-status-CEHLAQ2Y.js} +28 -28
  215. package/chunks/{write-file-DR3HN7IH.js → write-file-XRGEJRCC.js} +23 -23
  216. package/cli.js +11 -11
  217. package/package.json +3 -3
  218. package/web-shell/assets/{arc-_dVIKMdB.js → arc-DwJhljn9.js} +1 -1
  219. package/web-shell/assets/{architectureDiagram-3BPJPVTR-MuN3nKpL.js → architectureDiagram-3BPJPVTR-qdxSRav-.js} +1 -1
  220. package/web-shell/assets/{blockDiagram-GPEHLZMM-BtmvJjzx.js → blockDiagram-GPEHLZMM-2-dKM5aM.js} +1 -1
  221. package/web-shell/assets/{c4Diagram-AAUBKEIU-Dvi58_BU.js → c4Diagram-AAUBKEIU-Dt_Nu2HD.js} +1 -1
  222. package/web-shell/assets/channel-C6uyh95L.js +1 -0
  223. package/web-shell/assets/{chunk-2J33WTMH-YqxOVhS1.js → chunk-2J33WTMH-CBCeeNfD.js} +1 -1
  224. package/web-shell/assets/{chunk-4BX2VUAB-DoBgbC9z.js → chunk-4BX2VUAB-DPAzjqNs.js} +1 -1
  225. package/web-shell/assets/{chunk-55IACEB6-3NEQrBAr.js → chunk-55IACEB6-yrqyxvIK.js} +1 -1
  226. package/web-shell/assets/{chunk-727SXJPM-DrCZQxp0.js → chunk-727SXJPM-DguD_BBT.js} +1 -1
  227. package/web-shell/assets/{chunk-AQP2D5EJ-m_g3zjgv.js → chunk-AQP2D5EJ-KRUOG9v0.js} +1 -1
  228. package/web-shell/assets/{chunk-FMBD7UC4-D1_crABJ.js → chunk-FMBD7UC4-C0lilT2U.js} +1 -1
  229. package/web-shell/assets/{chunk-ND2GUHAM-BdhgVtBx.js → chunk-ND2GUHAM-DG9epIWK.js} +1 -1
  230. package/web-shell/assets/{chunk-QZHKN3VN-BlmThhm-.js → chunk-QZHKN3VN-PdJDkYHw.js} +1 -1
  231. package/web-shell/assets/classDiagram-4FO5ZUOK-Cv8Ulf-B.js +1 -0
  232. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-Cv8Ulf-B.js +1 -0
  233. package/web-shell/assets/{cose-bilkent-S5V4N54A-Cbjm_00Z.js → cose-bilkent-S5V4N54A-BAOPPuJm.js} +1 -1
  234. package/web-shell/assets/{dagre-BM42HDAG-C39QNVgC.js → dagre-BM42HDAG-CDHJv82_.js} +1 -1
  235. package/web-shell/assets/{diagram-2AECGRRQ-DNXSAixC.js → diagram-2AECGRRQ-C_hkG5fN.js} +1 -1
  236. package/web-shell/assets/{diagram-5GNKFQAL-BCbGUPEA.js → diagram-5GNKFQAL-e9zo_eKt.js} +1 -1
  237. package/web-shell/assets/{diagram-KO2AKTUF-1eujKSDC.js → diagram-KO2AKTUF-BFN41SCb.js} +1 -1
  238. package/web-shell/assets/{diagram-LMA3HP47-DUMKXgql.js → diagram-LMA3HP47-DG72N0W0.js} +1 -1
  239. package/web-shell/assets/{diagram-OG6HWLK6-BFktU3_u.js → diagram-OG6HWLK6-Dkmp-tdv.js} +1 -1
  240. package/web-shell/assets/{erDiagram-TEJ5UH35-BvJC7DLk.js → erDiagram-TEJ5UH35-CyS0GnQV.js} +1 -1
  241. package/web-shell/assets/{flowDiagram-I6XJVG4X-Cgu3PlOt.js → flowDiagram-I6XJVG4X-Cg1SRmzV.js} +1 -1
  242. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DLNXN5Xh.js → ganttDiagram-6RSMTGT7-CoNkSLs3.js} +1 -1
  243. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-BQFRDv6R.js → gitGraphDiagram-PVQCEYII-DEA6GWPa.js} +1 -1
  244. package/web-shell/assets/index-B49xd8_A.css +5 -0
  245. package/web-shell/assets/{index-CdC3pjP3.js → index-CMaZgs6B.js} +1 -1
  246. package/web-shell/assets/index-D-cDAZgO.js +1192 -0
  247. package/web-shell/assets/{infoDiagram-5YYISTIA-DT2mOSvp.js → infoDiagram-5YYISTIA-BZshyoGT.js} +1 -1
  248. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-9fy_K4bd.js → ishikawaDiagram-YF4QCWOH-CT2ssZqC.js} +1 -1
  249. package/web-shell/assets/{journeyDiagram-JHISSGLW-CoGSEuhE.js → journeyDiagram-JHISSGLW-BtMQ0rDG.js} +1 -1
  250. package/web-shell/assets/{kanban-definition-UN3LZRKU-BP9hHYIj.js → kanban-definition-UN3LZRKU-CoDbK5Db.js} +1 -1
  251. package/web-shell/assets/{linear-uIroDsmp.js → linear-CwhZ6u7u.js} +1 -1
  252. package/web-shell/assets/{mermaid.core-BUwoStsA.js → mermaid.core-C9nn0nrr.js} +5 -5
  253. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DZB-FWim.js → mindmap-definition-RKZ34NQL-BXUbjTeL.js} +1 -1
  254. package/web-shell/assets/{pieDiagram-4H26LBE5-YPptloKl.js → pieDiagram-4H26LBE5-JddiYlWQ.js} +1 -1
  255. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-dgk3DSzm.js → quadrantDiagram-W4KKPZXB-DK5HKzXO.js} +1 -1
  256. package/web-shell/assets/{requirementDiagram-4Y6WPE33-BH2En2i9.js → requirementDiagram-4Y6WPE33-Y-uipa_6.js} +1 -1
  257. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BB98feeI.js → sankeyDiagram-5OEKKPKP-BbWeqo8H.js} +1 -1
  258. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CunAIGh8.js → sequenceDiagram-3UESZ5HK-tX2gOoo5.js} +1 -1
  259. package/web-shell/assets/{stateDiagram-AJRCARHV-DTJs_-I2.js → stateDiagram-AJRCARHV-CACN457G.js} +1 -1
  260. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DaUeO2zt.js +1 -0
  261. package/web-shell/assets/{timeline-definition-PNZ67QCA-Cd4AN7O0.js → timeline-definition-PNZ67QCA-DnHWKSOq.js} +1 -1
  262. package/web-shell/assets/{vennDiagram-CIIHVFJN-xIG-rUU9.js → vennDiagram-CIIHVFJN-BO8Yl2FG.js} +1 -1
  263. package/web-shell/assets/{wardley-L42UT6IY-D1UyjIcG.js → wardley-L42UT6IY-1NMqqrBi.js} +1 -1
  264. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BVM0Mb99.js → wardleyDiagram-YWT4CUSO-C3eWgIvD.js} +1 -1
  265. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BX31JDSz.js → xychartDiagram-2RQKCTM6-D0h8FgFX.js} +1 -1
  266. package/web-shell/index.html +2 -2
  267. package/chunks/chunk-EDFD7VOX.js +0 -368
  268. package/chunks/chunk-GFYFLDEG.js +0 -709
  269. package/chunks/chunk-LUJQUNKY.js +0 -3288
  270. package/chunks/nonInteractiveCli-YURFHZV5.js +0 -129
  271. package/web-shell/assets/channel-Bi5TehaT.js +0 -1
  272. package/web-shell/assets/classDiagram-4FO5ZUOK-BKhhRdd1.js +0 -1
  273. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BKhhRdd1.js +0 -1
  274. package/web-shell/assets/index-C_ouplMQ.js +0 -1187
  275. package/web-shell/assets/index-XGDFJE-X.css +0 -5
  276. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DrfFMYta.js +0 -1
@@ -0,0 +1,624 @@
1
+ // Force strict mode and setup for ESM
2
+ "use strict";
3
+ import {
4
+ createDebugLogger
5
+ } from "./chunk-C27BYUX6.js";
6
+ import {
7
+ init_esbuild_shims
8
+ } from "./chunk-5O2XNYP6.js";
9
+ import {
10
+ __name
11
+ } from "./chunk-J2S4EL5Y.js";
12
+
13
+ // packages/cli/src/ui/utils/platformConstants.ts
14
+ init_esbuild_shims();
15
+ var KITTY_CTRL_C = "[99;5u";
16
+ var KITTY_KEYCODE_ENTER = 13;
17
+ var KITTY_KEYCODE_NUMPAD_ENTER = 57414;
18
+ var KITTY_KEYCODE_TAB = 9;
19
+ var KITTY_KEYCODE_BACKSPACE = 127;
20
+ var KITTY_MODIFIER_BASE = 1;
21
+ var KITTY_MODIFIER_EVENT_TYPES_OFFSET = 128;
22
+ var MODIFIER_SHIFT_BIT = 1;
23
+ var MODIFIER_ALT_BIT = 2;
24
+ var MODIFIER_CTRL_BIT = 4;
25
+ var VSCODE_SHIFT_ENTER_SEQUENCE = "\\\r\n";
26
+ var BACKSLASH_ENTER_DETECTION_WINDOW_MS = 5;
27
+ var MAX_KITTY_SEQUENCE_LENGTH = 32;
28
+ var CHAR_CODE_ESC = 27;
29
+
30
+ // packages/cli/src/ui/utils/clipboardUtils.ts
31
+ init_esbuild_shims();
32
+ import * as fs from "node:fs/promises";
33
+ import { constants as fsConstants } from "node:fs";
34
+ import { execSync, spawn } from "node:child_process";
35
+ import * as path from "node:path";
36
+ import { randomUUID } from "node:crypto";
37
+
38
+ // packages/cli/src/utils/osc.ts
39
+ init_esbuild_shims();
40
+ var ESC = "\x1B";
41
+ var BEL = "\x07";
42
+ var ST = ESC + "\\";
43
+ var OSC_PREFIX = ESC + "]";
44
+ var SEP = ";";
45
+ var OSC = {
46
+ /** iTerm2 notification / progress */
47
+ ITERM2: 9,
48
+ /** Kitty desktop notification protocol */
49
+ KITTY: 99,
50
+ /** Ghostty / cmux notification */
51
+ GHOSTTY: 777
52
+ };
53
+ function detectTerminal() {
54
+ const termProgram = process.env["TERM_PROGRAM"];
55
+ switch (termProgram) {
56
+ case "iTerm.app":
57
+ return "iTerm.app";
58
+ case "kitty":
59
+ return "kitty";
60
+ case "ghostty":
61
+ return "ghostty";
62
+ case "Apple_Terminal":
63
+ return "Apple_Terminal";
64
+ default:
65
+ break;
66
+ }
67
+ if (process.env["TERM"] === "xterm-ghostty") {
68
+ return "ghostty";
69
+ }
70
+ if (process.env["TERM"]?.includes("kitty")) {
71
+ return "kitty";
72
+ }
73
+ if (process.env["KITTY_WINDOW_ID"]) return "kitty";
74
+ return "unknown";
75
+ }
76
+ __name(detectTerminal, "detectTerminal");
77
+ function sanitizeOscPayload(text) {
78
+ return text.replace(/[\x00-\x08\x0b\x0c\x0e-\x1f\x7f\x80-\x9f]/g, "");
79
+ }
80
+ __name(sanitizeOscPayload, "sanitizeOscPayload");
81
+ function osc(...parts) {
82
+ const isKitty = detectTerminal() === "kitty";
83
+ const inScreen = !!process.env["STY"];
84
+ const terminator = isKitty && !inScreen ? ST : BEL;
85
+ const sanitized = parts.map(
86
+ (p) => typeof p === "string" ? sanitizeOscPayload(p) : p
87
+ );
88
+ return `${OSC_PREFIX}${sanitized.join(SEP)}${terminator}`;
89
+ }
90
+ __name(osc, "osc");
91
+ function wrapForMultiplexer(sequence) {
92
+ if (process.env["TMUX"]) {
93
+ const escaped = sequence.replaceAll("\x1B", "\x1B\x1B");
94
+ return `\x1BPtmux;${escaped}\x1B\\`;
95
+ }
96
+ if (process.env["STY"]) {
97
+ return `\x1BP${sequence}\x1B\\`;
98
+ }
99
+ return sequence;
100
+ }
101
+ __name(wrapForMultiplexer, "wrapForMultiplexer");
102
+ function encodeKittyPayload(text) {
103
+ return Buffer.from(text, "utf8").toString("base64");
104
+ }
105
+ __name(encodeKittyPayload, "encodeKittyPayload");
106
+ function oscITerm2Notify(title, message) {
107
+ const displayString = title ? `${title}:
108
+ ${message}` : message;
109
+ return osc(OSC.ITERM2, `
110
+
111
+ ${displayString}`);
112
+ }
113
+ __name(oscITerm2Notify, "oscITerm2Notify");
114
+ function oscKittyNotify(title, message, id) {
115
+ return [
116
+ osc(OSC.KITTY, `i=${id}:d=0:p=title:e=1`, encodeKittyPayload(title)),
117
+ osc(OSC.KITTY, `i=${id}:p=body:e=1`, encodeKittyPayload(message)),
118
+ osc(OSC.KITTY, `i=${id}:d=1:a=focus`, "")
119
+ ];
120
+ }
121
+ __name(oscKittyNotify, "oscKittyNotify");
122
+ function oscGhosttyNotify(title, message) {
123
+ return osc(OSC.GHOSTTY, "notify", title, message);
124
+ }
125
+ __name(oscGhosttyNotify, "oscGhosttyNotify");
126
+ function generateKittyId() {
127
+ return Math.floor(Math.random() * 2 ** 31);
128
+ }
129
+ __name(generateKittyId, "generateKittyId");
130
+
131
+ // packages/cli/src/ui/utils/clipboardUtils.ts
132
+ var debugLogger = createDebugLogger("CLIPBOARD_UTILS");
133
+ var PROCESS_TIMEOUT_MS = 5e3;
134
+ function writeOsc52(text) {
135
+ try {
136
+ const MAX_OSC52_BYTES = 75e3;
137
+ if (Buffer.byteLength(text, "utf-8") > MAX_OSC52_BYTES) {
138
+ debugLogger.warn(
139
+ `writeOsc52: text too large (${Buffer.byteLength(text, "utf-8")} bytes), skipping`
140
+ );
141
+ return false;
142
+ }
143
+ const base64 = Buffer.from(text, "utf-8").toString("base64");
144
+ const sequence = wrapForMultiplexer(`\x1B]52;c;${base64}\x07`);
145
+ const stream = process.stderr.isTTY ? process.stderr : process.stdout.isTTY ? process.stdout : null;
146
+ if (!stream) {
147
+ debugLogger.warn(
148
+ "OSC 52 clipboard requires a TTY; stdout/stderr not connected to terminal"
149
+ );
150
+ return false;
151
+ }
152
+ stream.write(sequence, (err) => {
153
+ if (err) debugLogger.warn("writeOsc52: async write failed:", err);
154
+ });
155
+ return true;
156
+ } catch (e) {
157
+ debugLogger.warn("writeOsc52 failed:", e);
158
+ return false;
159
+ }
160
+ }
161
+ __name(writeOsc52, "writeOsc52");
162
+ var linuxClipboardTool;
163
+ var cachedWlPasteImageTypes = null;
164
+ var clipboardModulePromise = null;
165
+ async function getClipboardModule() {
166
+ if (!clipboardModulePromise) {
167
+ const modName = "@teddyzhu/clipboard";
168
+ clipboardModulePromise = import(modName).catch(() => {
169
+ debugLogger.error(
170
+ "Failed to load @teddyzhu/clipboard native module. Clipboard image features will be unavailable."
171
+ );
172
+ return null;
173
+ });
174
+ }
175
+ return clipboardModulePromise;
176
+ }
177
+ __name(getClipboardModule, "getClipboardModule");
178
+ function getLinuxClipboardTool() {
179
+ if (linuxClipboardTool !== void 0) return linuxClipboardTool;
180
+ const sessionType = process.env["XDG_SESSION_TYPE"];
181
+ const waylandDisplay = process.env["WAYLAND_DISPLAY"];
182
+ const display = process.env["DISPLAY"];
183
+ let toolName = null;
184
+ if (sessionType === "wayland" || waylandDisplay) {
185
+ toolName = "wl-paste";
186
+ } else if (sessionType === "x11" || display) {
187
+ toolName = "xclip";
188
+ } else {
189
+ linuxClipboardTool = null;
190
+ return null;
191
+ }
192
+ try {
193
+ execSync("command -v " + toolName, { stdio: "ignore" });
194
+ linuxClipboardTool = toolName;
195
+ return toolName;
196
+ } catch {
197
+ debugLogger.warn(`${toolName} not found`);
198
+ linuxClipboardTool = null;
199
+ return null;
200
+ }
201
+ }
202
+ __name(getLinuxClipboardTool, "getLinuxClipboardTool");
203
+ async function saveFromCommand(command, args, destination) {
204
+ let fd;
205
+ try {
206
+ fd = await fs.open(
207
+ destination,
208
+ fsConstants.O_WRONLY | fsConstants.O_CREAT | fsConstants.O_EXCL
209
+ );
210
+ } catch {
211
+ return false;
212
+ }
213
+ return new Promise((resolve) => {
214
+ const child = spawn(command, args, {
215
+ stdio: ["ignore", "pipe", "pipe"]
216
+ });
217
+ const fileStream = fd.createWriteStream();
218
+ let stderr = "";
219
+ let resolved = false;
220
+ const safeResolve = /* @__PURE__ */ __name((value) => {
221
+ if (!resolved) {
222
+ resolved = true;
223
+ try {
224
+ if (!child.killed) child.kill();
225
+ } catch {
226
+ }
227
+ try {
228
+ fileStream.destroy();
229
+ } catch {
230
+ }
231
+ resolve(value);
232
+ }
233
+ }, "safeResolve");
234
+ const timer = setTimeout(() => {
235
+ debugLogger.debug(`${command} timed out after ${PROCESS_TIMEOUT_MS}ms`);
236
+ safeResolve(false);
237
+ }, PROCESS_TIMEOUT_MS);
238
+ child.stderr.on("data", (data) => {
239
+ stderr += data.toString();
240
+ });
241
+ child.stdout.pipe(fileStream);
242
+ child.stdout.on("error", (err) => {
243
+ debugLogger.debug(`stdout error for ${command}:`, err);
244
+ clearTimeout(timer);
245
+ safeResolve(false);
246
+ });
247
+ child.on("error", (err) => {
248
+ debugLogger.debug(`Failed to spawn ${command}:`, err);
249
+ clearTimeout(timer);
250
+ safeResolve(false);
251
+ });
252
+ fileStream.on("error", (err) => {
253
+ debugLogger.debug(`File stream error for ${destination}:`, err);
254
+ clearTimeout(timer);
255
+ safeResolve(false);
256
+ });
257
+ child.on("close", (code) => {
258
+ clearTimeout(timer);
259
+ if (resolved) return;
260
+ if (code !== 0) {
261
+ debugLogger.debug(
262
+ `${command} exited with code ${code}. Args: ${args.join(" ")}`
263
+ );
264
+ if (stderr) debugLogger.debug(`${command} stderr: ${stderr.trim()}`);
265
+ safeResolve(false);
266
+ return;
267
+ }
268
+ const checkFile = /* @__PURE__ */ __name(() => {
269
+ fs.stat(destination).then((stats) => {
270
+ safeResolve(stats.size > 0);
271
+ }).catch(() => {
272
+ safeResolve(false);
273
+ });
274
+ }, "checkFile");
275
+ if (fileStream.writableFinished) {
276
+ checkFile();
277
+ } else {
278
+ fileStream.on("finish", checkFile);
279
+ fileStream.on("close", () => {
280
+ if (!resolved) checkFile();
281
+ });
282
+ }
283
+ });
284
+ });
285
+ }
286
+ __name(saveFromCommand, "saveFromCommand");
287
+ async function checkClipboardForImage(command, args) {
288
+ if (command === "wl-paste" && args.length === 1 && args[0] === "--list-types") {
289
+ const types = await getWlPasteImageTypes();
290
+ return types.length > 0;
291
+ }
292
+ return new Promise((resolve) => {
293
+ try {
294
+ const child = spawn(command, args, {
295
+ stdio: ["ignore", "pipe", "ignore"]
296
+ });
297
+ let stdout = "";
298
+ const timer = setTimeout(() => {
299
+ try {
300
+ child.kill();
301
+ } catch {
302
+ }
303
+ resolve(false);
304
+ }, PROCESS_TIMEOUT_MS);
305
+ child.stdout.on("data", (data) => {
306
+ stdout += data.toString();
307
+ });
308
+ child.on("close", (code) => {
309
+ clearTimeout(timer);
310
+ resolve(
311
+ code === 0 && stdout.split("\n").some((line) => line === "image/png" || line === "image/bmp")
312
+ );
313
+ });
314
+ child.on("error", () => {
315
+ clearTimeout(timer);
316
+ resolve(false);
317
+ });
318
+ } catch {
319
+ resolve(false);
320
+ }
321
+ });
322
+ }
323
+ __name(checkClipboardForImage, "checkClipboardForImage");
324
+ async function clipboardHasImage(onUnavailable) {
325
+ cachedWlPasteImageTypes = null;
326
+ if (process.platform === "linux") {
327
+ try {
328
+ const tool = getLinuxClipboardTool();
329
+ if (tool === "wl-paste") {
330
+ return checkClipboardForImage("wl-paste", ["--list-types"]);
331
+ }
332
+ if (tool === "xclip") {
333
+ return checkClipboardForImage("xclip", [
334
+ "-selection",
335
+ "clipboard",
336
+ "-t",
337
+ "TARGETS",
338
+ "-o"
339
+ ]);
340
+ }
341
+ } catch (error) {
342
+ debugLogger.error("Error checking clipboard for image:", error);
343
+ }
344
+ return false;
345
+ }
346
+ try {
347
+ const mod = await getClipboardModule();
348
+ if (!mod) {
349
+ onUnavailable?.();
350
+ return false;
351
+ }
352
+ const clipboard = new mod.ClipboardManager();
353
+ return clipboard.hasFormat("image");
354
+ } catch (error) {
355
+ debugLogger.error("Error checking clipboard for image:", error);
356
+ return false;
357
+ }
358
+ }
359
+ __name(clipboardHasImage, "clipboardHasImage");
360
+ async function getWlPasteImageTypes() {
361
+ if (cachedWlPasteImageTypes !== null) {
362
+ return cachedWlPasteImageTypes;
363
+ }
364
+ return new Promise((resolve) => {
365
+ const child = spawn("wl-paste", ["--list-types"], {
366
+ stdio: ["ignore", "pipe", "ignore"]
367
+ });
368
+ let stdout = "";
369
+ const timer = setTimeout(() => {
370
+ try {
371
+ child.kill();
372
+ } catch {
373
+ }
374
+ resolve([]);
375
+ }, PROCESS_TIMEOUT_MS);
376
+ child.stdout.on("data", (data) => {
377
+ stdout += data.toString();
378
+ });
379
+ child.on("close", (code) => {
380
+ clearTimeout(timer);
381
+ if (code !== 0) {
382
+ resolve([]);
383
+ return;
384
+ }
385
+ const types = stdout.trim().split("\n").filter((t) => t === "image/png" || t === "image/bmp");
386
+ cachedWlPasteImageTypes = types;
387
+ resolve(types);
388
+ });
389
+ child.on("error", () => {
390
+ clearTimeout(timer);
391
+ resolve([]);
392
+ });
393
+ });
394
+ }
395
+ __name(getWlPasteImageTypes, "getWlPasteImageTypes");
396
+ async function saveFileWithWlPaste(tempFilePath) {
397
+ const imageTypes = await getWlPasteImageTypes();
398
+ if (imageTypes.includes("image/png")) {
399
+ const success = await saveFromCommand(
400
+ "wl-paste",
401
+ ["--no-newline", "--type", "image/png"],
402
+ tempFilePath
403
+ );
404
+ if (success) return tempFilePath;
405
+ try {
406
+ await fs.unlink(tempFilePath);
407
+ } catch {
408
+ }
409
+ }
410
+ if (imageTypes.includes("image/bmp")) {
411
+ const bmpPath = tempFilePath.replace(/\.png$/, ".bmp");
412
+ const bmpSuccess = await saveFromCommand(
413
+ "wl-paste",
414
+ ["--no-newline", "--type", "image/bmp"],
415
+ bmpPath
416
+ );
417
+ if (bmpSuccess) {
418
+ try {
419
+ await new Promise((resolve, reject) => {
420
+ const child = spawn(
421
+ "python3",
422
+ [
423
+ "-c",
424
+ "import sys; from PIL import Image; Image.open(sys.argv[1]).save(sys.argv[2])",
425
+ bmpPath,
426
+ tempFilePath
427
+ ],
428
+ { stdio: ["ignore", "ignore", "pipe"] }
429
+ );
430
+ let stderr = "";
431
+ child.stderr.on("data", (d) => {
432
+ stderr += d.toString();
433
+ });
434
+ const timer = setTimeout(() => {
435
+ try {
436
+ child.kill();
437
+ } catch {
438
+ }
439
+ reject(new Error("python3 timed out"));
440
+ }, PROCESS_TIMEOUT_MS);
441
+ child.on("close", (code) => {
442
+ clearTimeout(timer);
443
+ if (code === 0) resolve();
444
+ else
445
+ reject(
446
+ new Error(
447
+ `python3 exited with code ${code}${stderr ? ": " + stderr.trim() : ""}`
448
+ )
449
+ );
450
+ });
451
+ child.on("error", (err) => {
452
+ clearTimeout(timer);
453
+ reject(err);
454
+ });
455
+ });
456
+ try {
457
+ await fs.unlink(bmpPath);
458
+ } catch {
459
+ }
460
+ return tempFilePath;
461
+ } catch (err) {
462
+ debugLogger.warn(
463
+ "BMP-to-PNG conversion failed (install python3-pil for BMP support):",
464
+ err
465
+ );
466
+ try {
467
+ await fs.unlink(bmpPath);
468
+ } catch {
469
+ }
470
+ try {
471
+ await fs.unlink(tempFilePath);
472
+ } catch {
473
+ }
474
+ return false;
475
+ }
476
+ }
477
+ try {
478
+ await fs.unlink(bmpPath);
479
+ } catch {
480
+ }
481
+ }
482
+ return false;
483
+ }
484
+ __name(saveFileWithWlPaste, "saveFileWithWlPaste");
485
+ async function saveFileWithXclip(tempFilePath) {
486
+ const success = await saveFromCommand(
487
+ "xclip",
488
+ ["-selection", "clipboard", "-t", "image/png", "-o"],
489
+ tempFilePath
490
+ );
491
+ if (success) return true;
492
+ try {
493
+ await fs.unlink(tempFilePath);
494
+ } catch {
495
+ }
496
+ return false;
497
+ }
498
+ __name(saveFileWithXclip, "saveFileWithXclip");
499
+ async function saveClipboardImage(targetDir) {
500
+ try {
501
+ const baseDir = targetDir || process.cwd();
502
+ const tempDir = path.join(baseDir, "clipboard");
503
+ await fs.mkdir(tempDir, { recursive: true });
504
+ const timestamp = (/* @__PURE__ */ new Date()).getTime();
505
+ if (process.platform === "linux") {
506
+ const pngPath = path.join(
507
+ tempDir,
508
+ `clipboard-${timestamp}-${randomUUID()}.png`
509
+ );
510
+ const tool = getLinuxClipboardTool();
511
+ if (tool === "wl-paste") {
512
+ const savedPath = await saveFileWithWlPaste(pngPath);
513
+ if (savedPath) {
514
+ try {
515
+ const stats = await fs.stat(savedPath);
516
+ if (stats.size > 0) return savedPath;
517
+ await fs.unlink(savedPath);
518
+ } catch {
519
+ }
520
+ }
521
+ return null;
522
+ }
523
+ if (tool === "xclip") {
524
+ if (await saveFileWithXclip(pngPath)) return pngPath;
525
+ return null;
526
+ }
527
+ return null;
528
+ }
529
+ const mod = await getClipboardModule();
530
+ if (!mod) return null;
531
+ const clipboard = new mod.ClipboardManager();
532
+ if (!clipboard.hasFormat("image")) {
533
+ return null;
534
+ }
535
+ const tempFilePath = path.join(
536
+ tempDir,
537
+ `clipboard-${timestamp}-${randomUUID()}.png`
538
+ );
539
+ const imageData = clipboard.getImageData();
540
+ const buffer = imageData.data;
541
+ if (!buffer) {
542
+ return null;
543
+ }
544
+ await fs.writeFile(tempFilePath, buffer);
545
+ return tempFilePath;
546
+ } catch (error) {
547
+ debugLogger.error("Error saving clipboard image:", error);
548
+ return null;
549
+ }
550
+ }
551
+ __name(saveClipboardImage, "saveClipboardImage");
552
+ async function cleanupOldClipboardImages(targetDir) {
553
+ try {
554
+ const baseDir = targetDir || process.cwd();
555
+ const tempDir = path.join(baseDir, "clipboard");
556
+ const files = await fs.readdir(tempDir);
557
+ const MAX_IMAGES = 100;
558
+ const CLEANUP_COUNT = 50;
559
+ const imageFiles = [];
560
+ for (const file of files) {
561
+ if (file.startsWith("clipboard-") && (file.endsWith(".png") || file.endsWith(".jpg") || file.endsWith(".webp") || file.endsWith(".heic") || file.endsWith(".heif") || file.endsWith(".tiff") || file.endsWith(".gif") || file.endsWith(".bmp"))) {
562
+ const filePath = path.join(tempDir, file);
563
+ const stats = await fs.stat(filePath);
564
+ imageFiles.push({
565
+ name: file,
566
+ path: filePath,
567
+ atime: stats.atimeMs
568
+ });
569
+ }
570
+ }
571
+ if (imageFiles.length > MAX_IMAGES) {
572
+ imageFiles.sort((a, b) => a.atime - b.atime);
573
+ const removeCount = Math.min(
574
+ CLEANUP_COUNT,
575
+ imageFiles.length - MAX_IMAGES + CLEANUP_COUNT
576
+ );
577
+ const filesToRemove = imageFiles.slice(0, removeCount);
578
+ for (const file of filesToRemove) {
579
+ await fs.unlink(file.path);
580
+ }
581
+ }
582
+ } catch {
583
+ }
584
+ }
585
+ __name(cleanupOldClipboardImages, "cleanupOldClipboardImages");
586
+
587
+ export {
588
+ KITTY_CTRL_C,
589
+ KITTY_KEYCODE_ENTER,
590
+ KITTY_KEYCODE_NUMPAD_ENTER,
591
+ KITTY_KEYCODE_TAB,
592
+ KITTY_KEYCODE_BACKSPACE,
593
+ KITTY_MODIFIER_BASE,
594
+ KITTY_MODIFIER_EVENT_TYPES_OFFSET,
595
+ MODIFIER_SHIFT_BIT,
596
+ MODIFIER_ALT_BIT,
597
+ MODIFIER_CTRL_BIT,
598
+ VSCODE_SHIFT_ENTER_SEQUENCE,
599
+ BACKSLASH_ENTER_DETECTION_WINDOW_MS,
600
+ MAX_KITTY_SEQUENCE_LENGTH,
601
+ CHAR_CODE_ESC,
602
+ BEL,
603
+ OSC_PREFIX,
604
+ detectTerminal,
605
+ wrapForMultiplexer,
606
+ oscITerm2Notify,
607
+ oscKittyNotify,
608
+ oscGhosttyNotify,
609
+ generateKittyId,
610
+ writeOsc52,
611
+ clipboardHasImage,
612
+ saveClipboardImage,
613
+ cleanupOldClipboardImages
614
+ };
615
+ /**
616
+ * @license
617
+ * Copyright 2025 Google LLC
618
+ * SPDX-License-Identifier: Apache-2.0
619
+ */
620
+ /**
621
+ * @license
622
+ * Copyright 2026 Qwen Team
623
+ * SPDX-License-Identifier: Apache-2.0
624
+ */