@qwen-code/qwen-code 0.21.0 → 0.21.1-nightly.20260731.702932cc7

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 (423) hide show
  1. package/bundled/qc-helper/docs/configuration/model-providers.md +2 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +39 -28
  3. package/bundled/qc-helper/docs/features/channels/_meta.ts +2 -0
  4. package/bundled/qc-helper/docs/features/channels/github.md +139 -0
  5. package/bundled/qc-helper/docs/features/channels/gitlab.md +171 -0
  6. package/bundled/qc-helper/docs/features/channels/overview.md +61 -6
  7. package/bundled/qc-helper/docs/features/code-review.md +21 -1
  8. package/bundled/qc-helper/docs/features/hooks.md +72 -15
  9. package/bundled/qc-helper/docs/features/mcp.md +9 -1
  10. package/bundled/qc-helper/docs/features/scheduled-tasks.md +3 -1
  11. package/bundled/qc-helper/docs/features/sub-agents.md +42 -8
  12. package/bundled/qc-helper/docs/qwen-serve.md +11 -7
  13. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
  14. package/bundled/qc-helper/docs/support/troubleshooting.md +2 -1
  15. package/bundled/review/DESIGN.md +19 -0
  16. package/bundled/review/SKILL.md +120 -61
  17. package/chunks/MaxSizedBox-LAFHK4VO.js +88 -0
  18. package/chunks/{StandaloneSessionPicker-BIRMPLRD.js → StandaloneSessionPicker-EMNOBN3S.js} +71 -68
  19. package/chunks/{acp-startup-profiler-RV3IV562.js → acp-startup-profiler-2C4A5ZTJ.js} +2 -2
  20. package/chunks/{acpAgent-6J2U72PQ.js → acpAgent-ERFA6HWV.js} +1674 -591
  21. package/chunks/agent-PLKF6JK4.js +84 -0
  22. package/chunks/agent-headless-JAORDQ63.js +78 -0
  23. package/chunks/{anthropicContentGenerator-75BKLTSP.js → anthropicContentGenerator-OFHSZJBF.js} +79 -27
  24. package/chunks/{artifact-tool-Y5T7GG7F.js → artifact-tool-RDN2W7ND.js} +4 -4
  25. package/chunks/{askUserQuestion-2H6747FR.js → askUserQuestion-OZERWH5R.js} +4 -4
  26. package/chunks/bridge-NYOBVRIT.js +94 -0
  27. package/chunks/{build-RV63TIRH.js → build-GDBLPA24.js} +1 -1
  28. package/chunks/{ca-25EDXPFZ.js → ca-6W3SK7OQ.js} +6 -1
  29. package/chunks/channel-management-service-5S7YCWX5.js +418 -0
  30. package/chunks/channel-settings-store-NLOKYO23.js +91 -0
  31. package/chunks/{channel-worker-group-2ZD7TVAT.js → channel-worker-group-OVWGYMZS.js} +11 -6
  32. package/chunks/{channel-worker-manager-4OA4BCGB.js → channel-worker-manager-H55GKOQA.js} +11 -6
  33. package/chunks/{channel-worker-supervisor-V7KCFJTS.js → channel-worker-supervisor-CABBXYHK.js} +7 -5
  34. package/chunks/{chunk-RIBKPMRP.js → chunk-23F4XGWO.js} +19 -6
  35. package/chunks/{chunk-ACY3A37B.js → chunk-25VHI5T7.js} +23 -18
  36. package/chunks/{chunk-MZAXJAUM.js → chunk-26JK4RPD.js} +1 -1
  37. package/chunks/{chunk-6GMVPFB2.js → chunk-2IIJTXYF.js} +45 -16
  38. package/chunks/{chunk-BPJSQIJX.js → chunk-2J3OJGTL.js} +0 -2
  39. package/chunks/{chunk-2X55UKQE.js → chunk-2JZR3B4A.js} +3 -3
  40. package/chunks/{chunk-7JURR4JT.js → chunk-2OQUICDM.js} +167 -81
  41. package/chunks/{chunk-ZJHVAS7M.js → chunk-2YCYFWYZ.js} +4 -5
  42. package/chunks/{chunk-3QMGYBFN.js → chunk-3APUUXRF.js} +1 -80
  43. package/chunks/{chunk-MUP3T3AD.js → chunk-3I6DUGQD.js} +1 -35
  44. package/chunks/{chunk-JVPM2ULZ.js → chunk-3XZ5SSNR.js} +6 -6
  45. package/chunks/chunk-42VPM33K.js +319 -0
  46. package/chunks/{chunk-VAK25FTU.js → chunk-45IOTAUS.js} +1 -1
  47. package/chunks/chunk-45UYUCJ6.js +363 -0
  48. package/chunks/{chunk-JZA3JUDJ.js → chunk-4KP2F2TE.js} +1 -1
  49. package/chunks/{chunk-IO3IX5Q4.js → chunk-4YJQD2IO.js} +1 -1
  50. package/chunks/{chunk-JXJFVC6E.js → chunk-5G6XUGXO.js} +61 -14
  51. package/chunks/{chunk-ZOIFNCKL.js → chunk-5NNHICSA.js} +3 -23
  52. package/chunks/{chunk-A4UCTEB5.js → chunk-5WV5S2GT.js} +0 -1
  53. package/chunks/{chunk-RHLZR4E5.js → chunk-675H6PLP.js} +1 -1
  54. package/chunks/chunk-6FMJLI5M.js +1591 -0
  55. package/chunks/chunk-6MPDY6ZG.js +76 -0
  56. package/chunks/{chunk-PSOO6YXD.js → chunk-6NUWQ3R7.js} +9 -7
  57. package/chunks/{chunk-7MVVZO4N.js → chunk-6ZRWX46I.js} +4 -4
  58. package/chunks/{chunk-TPRQ7RZH.js → chunk-76E5Y3UZ.js} +3117 -993
  59. package/chunks/{chunk-UUUTRMI2.js → chunk-7ULQIS27.js} +1 -1
  60. package/chunks/{chunk-BKHWX6I2.js → chunk-A5BZ722X.js} +11 -3
  61. package/chunks/{chunk-TEHGS6UP.js → chunk-A5T5W7PR.js} +154 -16
  62. package/chunks/{chunk-VIA5XA4U.js → chunk-A5UODYG3.js} +4 -1
  63. package/chunks/{chunk-JLU636DO.js → chunk-ALMR3E6Q.js} +1 -0
  64. package/chunks/{chunk-EBJQ6AXW.js → chunk-ANDVK2JN.js} +358 -14
  65. package/chunks/{chunk-TOFQCPDC.js → chunk-AOHY3QJ3.js} +14 -8
  66. package/chunks/chunk-AQ37AY7B.js +93 -0
  67. package/chunks/{chunk-PJIZUQVC.js → chunk-AZQ3DT76.js} +2 -2
  68. package/chunks/{chunk-LKEJ26GS.js → chunk-B3TA3IF5.js} +16 -11
  69. package/chunks/{chunk-Q4M4MDQ4.js → chunk-B43QHWY6.js} +1 -1
  70. package/chunks/{chunk-UH3WSE5L.js → chunk-B4AJNNOL.js} +1 -6
  71. package/chunks/{chunk-K36B6G2O.js → chunk-B6FOGNGH.js} +5 -5
  72. package/chunks/{chunk-PWVFN2LF.js → chunk-BP2H5K25.js} +1 -1
  73. package/chunks/{chunk-LB6DUZ26.js → chunk-BTWSGZCT.js} +264 -185
  74. package/chunks/{chunk-ZNAUOR2I.js → chunk-BZBPT52P.js} +2 -2
  75. package/chunks/{chunk-L26JL52R.js → chunk-CBBP4BMC.js} +64 -67
  76. package/chunks/{chunk-ZD6UTE4A.js → chunk-CNTR4GR6.js} +1 -1
  77. package/chunks/{chunk-3SJ43L4W.js → chunk-CPZAH673.js} +6 -0
  78. package/chunks/{chunk-EPDRMGT4.js → chunk-D4HTUMGX.js} +4 -28
  79. package/chunks/{chunk-QAF7NMK7.js → chunk-D7CQTWRS.js} +1 -1
  80. package/chunks/{chunk-XVNQMZ2I.js → chunk-DGEIYUC3.js} +0 -1
  81. package/chunks/{chunk-BPZALHVR.js → chunk-DI35ZN7T.js} +1 -1
  82. package/chunks/{chunk-IKCX4CCL.js → chunk-DKPJUF5F.js} +118 -95
  83. package/chunks/{chunk-DLWL3Z7A.js → chunk-DSFHVTWD.js} +3 -3
  84. package/chunks/{chunk-FSITMZJH.js → chunk-DYRYLJ3O.js} +18 -9
  85. package/chunks/{chunk-NL7LTRLR.js → chunk-E2BHWIDT.js} +48 -72
  86. package/chunks/{chunk-UDX5OBWR.js → chunk-E2FN6SM7.js} +94 -4
  87. package/chunks/{chunk-USTWD7QV.js → chunk-E6CJ2SMM.js} +26 -16
  88. package/chunks/{chunk-KMQ33DO4.js → chunk-EDB7A72S.js} +4 -4
  89. package/chunks/{chunk-7ZCNENPP.js → chunk-FANRZEAJ.js} +1 -1
  90. package/chunks/{chunk-WBL3FJEU.js → chunk-FC4KQFCS.js} +1 -1
  91. package/chunks/{chunk-5NBDS5S6.js → chunk-FCYYAB4S.js} +162 -7
  92. package/chunks/{chunk-OKY7HXPG.js → chunk-FJ5WUMUQ.js} +2 -2
  93. package/chunks/{chunk-PHOF65IG.js → chunk-FRXG4ARO.js} +36273 -44436
  94. package/chunks/{chunk-FQK6JAFG.js → chunk-FS674JW4.js} +4 -4
  95. package/chunks/chunk-FYJ7W2PI.js +194 -0
  96. package/chunks/{chunk-BULDBTYC.js → chunk-G7XXKQYS.js} +3 -28
  97. package/chunks/{chunk-LS77BEZP.js → chunk-GLCZKT5V.js} +1 -5
  98. package/chunks/{chunk-VRYUBFMC.js → chunk-GRUAVQQR.js} +1 -1
  99. package/chunks/{chunk-MVSUYZDT.js → chunk-GWV7DI3S.js} +4 -4
  100. package/chunks/{chunk-A5L3JMUA.js → chunk-HC45LTEN.js} +18 -4
  101. package/chunks/{chunk-PC6JANNU.js → chunk-HKRVXYDN.js} +4 -4
  102. package/chunks/{chunk-GZXCZHCT.js → chunk-I3G5JWBV.js} +1 -1
  103. package/chunks/{chunk-4WIZGAH3.js → chunk-I5BT7ADR.js} +6 -58
  104. package/chunks/{chunk-GSN55ZRI.js → chunk-ID3O7PRB.js} +19 -7
  105. package/chunks/{chunk-L5UHQJTJ.js → chunk-IGTHU3T4.js} +1 -1
  106. package/chunks/{chunk-BIQWWWJN.js → chunk-IIUGIWWY.js} +1 -1
  107. package/chunks/{chunk-RWTEFFPU.js → chunk-JCJ7LKNA.js} +6140 -5616
  108. package/chunks/{chunk-S3TWXGKA.js → chunk-JE7KQ2UP.js} +4 -2
  109. package/chunks/{chunk-PWTZEM3C.js → chunk-JXVC2PL3.js} +3 -37
  110. package/chunks/chunk-JYBU6YUE.js +378 -0
  111. package/chunks/{chunk-RF3EXIHJ.js → chunk-K3PFMM5U.js} +49 -26
  112. package/chunks/{chunk-JCW2R7WC.js → chunk-K623ENWT.js} +3 -79
  113. package/chunks/{chunk-T2NCM2ET.js → chunk-K6KS3LTN.js} +2 -749
  114. package/chunks/chunk-KWHKHSIS.js +81 -0
  115. package/chunks/{chunk-DHHOYAPR.js → chunk-L2E5GFAG.js} +7 -7
  116. package/chunks/{chunk-2W3OOD4W.js → chunk-L55JWS76.js} +6 -3
  117. package/chunks/{chunk-E5TUC6CA.js → chunk-LHKCY7DY.js} +3 -3
  118. package/chunks/{chunk-NH6KE4JX.js → chunk-LOY7RWQG.js} +3 -3
  119. package/chunks/{chunk-U7M2DMGW.js → chunk-M4MSAE7U.js} +130 -5
  120. package/chunks/{chunk-IJTOWOD7.js → chunk-MB32MS4U.js} +92 -9
  121. package/chunks/{chunk-PR75REBZ.js → chunk-MM7TH7ZM.js} +12 -82
  122. package/chunks/{chunk-FODK6UMO.js → chunk-MPHPFVKK.js} +0 -2
  123. package/chunks/{chunk-M5JM7OSF.js → chunk-N4ACHWNH.js} +2 -3
  124. package/chunks/{chunk-JESCGQM3.js → chunk-NAVJD2PQ.js} +8 -7
  125. package/chunks/{chunk-J56UI34H.js → chunk-NBD76HUW.js} +4 -2
  126. package/chunks/{chunk-2SCDWPXI.js → chunk-NC4U4I3Y.js} +5 -5
  127. package/chunks/{chunk-H4SBPHSA.js → chunk-NNL7WPPK.js} +3 -3
  128. package/chunks/{chunk-YBL3QUDD.js → chunk-NQCXWP5D.js} +1 -1
  129. package/chunks/{chunk-CIKQ7KKO.js → chunk-NVFSGPIF.js} +954 -444
  130. package/chunks/{chunk-6OUGMXDC.js → chunk-NWNEANAT.js} +7 -7
  131. package/chunks/chunk-O6GEWCJA.js +21 -0
  132. package/chunks/chunk-OCPBI7J5.js +18 -0
  133. package/chunks/{chunk-KIM5GUMA.js → chunk-OE6F6ZWQ.js} +589 -220
  134. package/chunks/{chunk-SQCQ4KO2.js → chunk-P5DEY3NF.js} +380 -317
  135. package/chunks/{chunk-2JZBVYTU.js → chunk-Q3T5KA2V.js} +1 -8
  136. package/chunks/{chunk-MB4MZHMJ.js → chunk-QARJNL2V.js} +211 -522
  137. package/chunks/{chunk-YH6G52F2.js → chunk-QCXGC7QB.js} +4 -4
  138. package/chunks/chunk-QDK4F2N5.js +1252 -0
  139. package/chunks/{chunk-VDDGDZMA.js → chunk-QHWCP53L.js} +14 -7
  140. package/chunks/{chunk-VULLI6WQ.js → chunk-QIERF2GQ.js} +6 -6
  141. package/chunks/{chunk-TGILQ3YH.js → chunk-QQTJK5GB.js} +200 -77
  142. package/chunks/{chunk-H5FFA6TH.js → chunk-QTHQ6Z5X.js} +16 -3
  143. package/chunks/{chunk-5I2IWRSH.js → chunk-R2XWGR75.js} +2 -2
  144. package/chunks/{chunk-YPE6A4GC.js → chunk-RT7FNC2O.js} +2 -2
  145. package/chunks/{chunk-OFDOK3VM.js → chunk-RX7NJOPE.js} +8 -13
  146. package/chunks/{chunk-6AM5D4ME.js → chunk-S6LOFUVP.js} +0 -12
  147. package/chunks/{chunk-K4XWPEWB.js → chunk-SHN4KHDK.js} +4 -33
  148. package/chunks/{chunk-VYPFXUCB.js → chunk-SZ3KHTDR.js} +1 -1
  149. package/chunks/chunk-T26EAKDL.js +13 -0
  150. package/chunks/chunk-T3CHYWJZ.js +758 -0
  151. package/chunks/{chunk-FNQ6T3CV.js → chunk-TEGJSJDF.js} +10 -7
  152. package/chunks/{chunk-RZIX2G32.js → chunk-THPORXSI.js} +1 -1
  153. package/chunks/{chunk-OHNBB4XR.js → chunk-THVU3RNH.js} +1 -1
  154. package/chunks/{record-artifact-RQKFYO5B.js → chunk-TIRRPCFS.js} +22 -7
  155. package/chunks/{chunk-ETSW4KLJ.js → chunk-TUCOXPHJ.js} +2 -2
  156. package/chunks/{chunk-63P4EL5V.js → chunk-TZTAV5RH.js} +1 -1
  157. package/chunks/{chunk-LK7CHLVP.js → chunk-U4VTUMMK.js} +0 -60
  158. package/chunks/{chunk-3RN6GBKS.js → chunk-U5CODIJW.js} +1 -1
  159. package/chunks/chunk-UU2B5YG6.js +2196 -0
  160. package/chunks/{chunk-R5AFZNQW.js → chunk-VAVHTGU4.js} +15 -8
  161. package/chunks/{chunk-2NH6DYI4.js → chunk-VHPFWR2O.js} +12 -12
  162. package/chunks/{chunk-IKYJHJNF.js → chunk-VOMQ2P6B.js} +3 -3
  163. package/chunks/{chunk-ZFDTEDCF.js → chunk-VX22DUW2.js} +6 -6
  164. package/chunks/{chunk-HTR4WV6U.js → chunk-W4RQUHY3.js} +31 -1
  165. package/chunks/{chunk-M4FMGVY4.js → chunk-WQP7BKWA.js} +3 -3
  166. package/chunks/{chunk-LH2BYDQ5.js → chunk-X2E5TFJ5.js} +18 -12
  167. package/chunks/{chunk-COH43MRJ.js → chunk-XCGIMOLN.js} +27 -1
  168. package/chunks/{chunk-YX324OPW.js → chunk-XDS22O52.js} +1 -1
  169. package/chunks/chunk-XP4L6KS3.js +463 -0
  170. package/chunks/{chunk-6FGBXPWM.js → chunk-XQK4XXTN.js} +38 -44
  171. package/chunks/{chunk-55DJUCI2.js → chunk-XWYPFDB5.js} +53 -43
  172. package/chunks/{chunk-Y34KJKDC.js → chunk-Y7BVNVVW.js} +1 -1
  173. package/chunks/{chunk-IPUUTYMV.js → chunk-YDLJGZHL.js} +1 -1
  174. package/chunks/{chunk-HIJQF5B5.js → chunk-YGE3IXJP.js} +1 -1
  175. package/chunks/{chunk-LQIW3YFY.js → chunk-YJFPRUWX.js} +9 -7
  176. package/chunks/{chunk-J24WCGIN.js → chunk-YQIIG4NA.js} +4 -4
  177. package/chunks/{chunk-BJX6ZSUK.js → chunk-YUFIEIWC.js} +2 -2
  178. package/chunks/{chunk-NIBLUX3Y.js → chunk-Z3S5EMOW.js} +148 -21
  179. package/chunks/{chunk-WCXCRJYB.js → chunk-Z3YLHKB7.js} +1 -1
  180. package/chunks/chunk-Z4X5MTRT.js +133 -0
  181. package/chunks/{chunk-UW5EOVUN.js → chunk-ZBVS26BY.js} +4 -4
  182. package/chunks/{chunk-HTO4JFDZ.js → chunk-ZPJWUGCS.js} +0 -1
  183. package/chunks/{chunk-X5XDDSSH.js → chunk-ZPZ7ZJEE.js} +28 -5
  184. package/chunks/{computer-use-SOQ4E3VX.js → computer-use-GOM42LNK.js} +53 -50
  185. package/chunks/{config-utils-7V7GGIW6.js → config-utils-WADIDWGG.js} +4 -3
  186. package/chunks/contextCommand-6LVPTIWD.js +83 -0
  187. package/chunks/core-runtime-253XV2DB.js +137 -0
  188. package/chunks/{create-sub-session-QRJLW5BV.js → create-sub-session-45POYEVP.js} +50 -47
  189. package/chunks/{create-sub-session-IWW2IZ2T.js → create-sub-session-62YZWVAY.js} +3 -3
  190. package/chunks/{cron-create-YIID5XAW.js → cron-create-6E7GIQTG.js} +6 -6
  191. package/chunks/{cron-delete-ZVHYCEP2.js → cron-delete-JD26XY3W.js} +5 -5
  192. package/chunks/{cron-list-XEGS463Q.js → cron-list-CUWFB44G.js} +6 -6
  193. package/chunks/{daemon-YO6433NF.js → daemon-PCNCI5YU.js} +428 -18
  194. package/chunks/daemon-status-provider-AKALDYJJ.js +93 -0
  195. package/chunks/daemon-trust-policy-XB7ZSQFQ.js +88 -0
  196. package/chunks/daemon-trust-policy-monitor-FUTKP42Q.js +175 -0
  197. package/chunks/{de-HGRCYDEJ.js → de-SY6O76BF.js} +6 -1
  198. package/chunks/deferred-core-runtime-RKLCO7V5.js +92 -0
  199. package/chunks/dist-26BIMQT6.js +4487 -0
  200. package/chunks/{dist-F6IBUDR4.js → dist-2PERFI23.js} +12 -9
  201. package/chunks/{dist-46NQKLTW.js → dist-OAOC5OV4.js} +2 -2
  202. package/chunks/{dist-YFNEUWSE.js → dist-PVEAFLHY.js} +5 -4
  203. package/chunks/{dist-AIKFMUKK.js → dist-SL2LUMML.js} +1449 -14
  204. package/chunks/dist-ULIG4M5H.js +13415 -0
  205. package/chunks/{dist-WEAHOXDM.js → dist-WGMNT3JQ.js} +2 -1
  206. package/chunks/{dist-BBLXMS3N.js → dist-ZHXOBXDN.js} +3 -3
  207. package/chunks/earlyInputCapture-FCWU47OB.js +85 -0
  208. package/chunks/{edit-OBDSQURM.js → edit-TTACM3LN.js} +51 -48
  209. package/chunks/{en-MTWBNGDO.js → en-NBK3JKCE.js} +9 -1
  210. package/chunks/{enter-worktree-U6MRPQ2P.js → enter-worktree-R34GFDX6.js} +51 -48
  211. package/chunks/{enterPlanMode-BC5QUZZ2.js → enterPlanMode-KJPBB6G5.js} +51 -48
  212. package/chunks/environment-IJG3N2PR.js +105 -0
  213. package/chunks/errors-MRON5OJD.js +91 -0
  214. package/chunks/esm-K5FARBNI.js +5548 -0
  215. package/chunks/{exit-worktree-DGNYMECB.js → exit-worktree-UBA66Y4I.js} +51 -48
  216. package/chunks/exitPlanMode-SMSPGNSK.js +76 -0
  217. package/chunks/{fast-path-JJZFJANL.js → fast-path-ZBAMZDCP.js} +16 -6
  218. package/chunks/{fr-45RLL55O.js → fr-4KG5V7UT.js} +6 -1
  219. package/chunks/{gemini-QS36EBZV.js → gemini-XFT7HRNL.js} +106 -99
  220. package/chunks/{geminiContentGenerator-AG4KB6CV.js → geminiContentGenerator-XD3MLYQX.js} +40 -11
  221. package/chunks/{getMachineId-bsd-V7W3GODC.js → getMachineId-bsd-FG7IUY6U.js} +1 -1
  222. package/chunks/{getMachineId-darwin-TDO75DQP.js → getMachineId-darwin-GLCJI2RA.js} +1 -1
  223. package/chunks/{getMachineId-linux-TF43WQT2.js → getMachineId-linux-O6OPPAKO.js} +1 -1
  224. package/chunks/{getMachineId-unsupported-ZGUO3TXT.js → getMachineId-unsupported-S6CKYVGC.js} +1 -1
  225. package/chunks/{getMachineId-win-ECFYZZFQ.js → getMachineId-win-X5SRNEH7.js} +1 -1
  226. package/chunks/{glob-V7R3PSK3.js → glob-HFKY7HXZ.js} +51 -48
  227. package/chunks/goal-tools-HGO6VXPB.js +335 -0
  228. package/chunks/{grep-QYPSK7OP.js → grep-EO5Z3PFV.js} +53 -49
  229. package/chunks/handleAutoUpdate-WRENFE6C.js +84 -0
  230. package/chunks/i18n-ZG5OTVSV.js +100 -0
  231. package/chunks/{image-gen-Z3VPGKRC.js → image-gen-CKWZ4MJI.js} +12 -12
  232. package/chunks/initializer-FYPLLRC7.js +89 -0
  233. package/chunks/installationInfo-5RV4HRMC.js +83 -0
  234. package/chunks/{ja-B7DF7DFG.js → ja-F3GSQXMF.js} +6 -1
  235. package/chunks/{keychain-token-storage-MDTG3WRM.js → keychain-token-storage-IKO4G53C.js} +3 -3
  236. package/chunks/lib-RUF3WZA6.js +9 -0
  237. package/chunks/list-ZNWVL3AT.js +92 -0
  238. package/chunks/{list-agents-5KJJHR6I.js → list-agents-PXJ7ZUFB.js} +3 -3
  239. package/chunks/loadedSettingsAdapter-GQGNHP5I.js +86 -0
  240. package/chunks/{loggingContentGenerator-HS3S5H3Q.js → loggingContentGenerator-MS5DFAWH.js} +78 -113
  241. package/chunks/{loop-wakeup-FXKNNYSY.js → loop-wakeup-Y26NQZ5I.js} +15 -8
  242. package/chunks/{ls-NTK6VOQJ.js → ls-ONQTTMQR.js} +5 -5
  243. package/chunks/{lsp-2JI24STP.js → lsp-YGHHRGMD.js} +3 -3
  244. package/chunks/{managed-npm-update-JYEMMXA3.js → managed-npm-update-67AK4GTL.js} +51 -48
  245. package/chunks/mcp-FVQ4VTLM.js +86 -0
  246. package/chunks/{monitor-R3ODH5U6.js → monitor-BXB33EOZ.js} +51 -48
  247. package/chunks/nonInteractiveCli-CN2GYSN3.js +148 -0
  248. package/chunks/{notebook-edit-BNOK452R.js → notebook-edit-FKYRBV4L.js} +51 -48
  249. package/chunks/{openaiContentGenerator-WMCU3O2H.js → openaiContentGenerator-UUXV5DGU.js} +26 -27
  250. package/chunks/pidfile-MV347TTZ.js +89 -0
  251. package/chunks/process-registry-2CHQBXH5.js +157 -0
  252. package/chunks/{processUtils-RT7UNCC2.js → processUtils-LKFG52RV.js} +2 -2
  253. package/chunks/{pt-22Q3FP73.js → pt-EQ33KWEN.js} +6 -1
  254. package/chunks/{qwenContentGenerator-HHCRK4SX.js → qwenContentGenerator-3WYI2HRW.js} +56 -53
  255. package/chunks/{qwenOAuth2-OWLB5AKH.js → qwenOAuth2-B46MW45O.js} +10 -10
  256. package/chunks/read-file-ACSHVWP3.js +29 -0
  257. package/chunks/{read-mcp-resource-4DKQWGHD.js → read-mcp-resource-U2IJN5HM.js} +4 -4
  258. package/chunks/record-artifact-MGPJ7EG4.js +21 -0
  259. package/chunks/resumeHistoryUtils-AMS4767B.js +94 -0
  260. package/chunks/ripGrep-BAPM2UKC.js +76 -0
  261. package/chunks/{ru-FZCNZHDC.js → ru-7OZAUKGG.js} +6 -1
  262. package/chunks/{run-qwen-serve-FU6HEM4J.js → run-qwen-serve-JEN6FO2A.js} +1018 -263
  263. package/chunks/runtime-WVP22ISH.js +122 -0
  264. package/chunks/{scheduler-G2ZS2Z7E.js → scheduler-HTX5ACVR.js} +50 -47
  265. package/chunks/{sdk-exporters-grpc-AK3LGHNO.js → sdk-exporters-grpc-54L4LS5L.js} +4 -4
  266. package/chunks/{sdk-exporters-http-FYBSUCPD.js → sdk-exporters-http-4BQANSJ6.js} +7 -7
  267. package/chunks/{sdk-impl-GMVPB7NB.js → sdk-impl-Z4VXWVFX.js} +14 -14
  268. package/chunks/{send-message-Q6OOR6BR.js → send-message-PMP4ATVM.js} +8 -13
  269. package/chunks/serve-ELQIVNWN.js +92 -0
  270. package/chunks/{server-4UMH7OIZ.js → server-JNW2NOSQ.js} +5288 -1364
  271. package/chunks/{session-K3O3Q2SV.js → session-NC356XNS.js} +102 -95
  272. package/chunks/{settings-CR2EWTBA.js → settings-73RMIOJ6.js} +54 -51
  273. package/chunks/shell-NMHF5TFG.js +86 -0
  274. package/chunks/{skill-I3SDA4MB.js → skill-XPGXHEKO.js} +22 -22
  275. package/chunks/skill-settings-5IGIJDGA.js +94 -0
  276. package/chunks/spawnChannel-T5THBHFN.js +85 -0
  277. package/chunks/standalone-update-ODXEPDLP.js +95 -0
  278. package/chunks/{startInteractiveUI-SLZGHRPH.js → startInteractiveUI-S27DXVAE.js} +1241 -905
  279. package/chunks/{syntheticOutput-I3757IWH.js → syntheticOutput-D7E6ZFKR.js} +4 -4
  280. package/chunks/task-create-NFCYD43L.js +26 -0
  281. package/chunks/{task-list-FOPULZEP.js → task-list-TAVMGEVD.js} +7 -7
  282. package/chunks/{task-stop-H6RHXFVQ.js → task-stop-ZDF2UJRM.js} +3 -3
  283. package/chunks/{task-update-M57TFZJT.js → task-update-6L7LHGEX.js} +12 -11
  284. package/chunks/{team-create-YJALH5D2.js → team-create-CTLQWTJ2.js} +53 -50
  285. package/chunks/{team-delete-QE2UXJL7.js → team-delete-DPGGRQBU.js} +7 -7
  286. package/chunks/{team-plan-approval-34QFYKGN.js → team-plan-approval-WKRUAPJ4.js} +51 -48
  287. package/chunks/theme-manager-XQHXQQX6.js +80 -0
  288. package/chunks/{todoWrite-VQ7FKOHL.js → todoWrite-2UO5G6G6.js} +34 -6
  289. package/chunks/{tool-search-NF7GB6LE.js → tool-search-45YINAJA.js} +21 -22
  290. package/chunks/total-session-admission-QPUKGHKO.js +88 -0
  291. package/chunks/trustedFolders-YMUTRHEQ.js +98 -0
  292. package/chunks/{update-relaunch-WBUZJC5O.js → update-relaunch-PZUXTVHC.js} +5 -5
  293. package/chunks/updateCheck-IZAN4XTB.js +95 -0
  294. package/chunks/useAutoAcceptIndicator-CGL2MAYE.js +96 -0
  295. package/chunks/{validateNonInterActiveAuth-3R223G3R.js → validateNonInterActiveAuth-GBGNJ65K.js} +97 -90
  296. package/chunks/{version-HS7YSFHV.js → version-Z7EX24NZ.js} +1 -1
  297. package/chunks/{web-fetch-NKCSG7ZE.js → web-fetch-ETTT2H3V.js} +19 -21
  298. package/chunks/{web-search-S62WAP4S.js → web-search-Y3ZSVRJ6.js} +13 -13
  299. package/chunks/{workflow-QAGU5RU4.js → workflow-ATRJSAO7.js} +52 -49
  300. package/chunks/workspace-providers-status-YM3WLW3N.js +89 -0
  301. package/chunks/{workspace-registration-store-24JMHDGF.js → workspace-registration-store-4EGNCIPG.js} +1 -1
  302. package/chunks/workspace-registry-NGZOZKQP.js +96 -0
  303. package/chunks/workspace-service-SVWOXX2B.js +103 -0
  304. package/chunks/workspace-skills-status-YZHZ3PT5.js +89 -0
  305. package/chunks/workspace-trust-reconciler-GGBQV2U5.js +349 -0
  306. package/chunks/write-file-HLGCEB72.js +78 -0
  307. package/chunks/xterm-headless-NTYVIBT3.js +3475 -0
  308. package/chunks/{zh-LUIGBD55.js → zh-H3YDK5QW.js} +9 -1
  309. package/chunks/{zh-TW-F5KG2IYD.js → zh-TW-JYCP7XUA.js} +9 -1
  310. package/chunks/zoom-image-LDECT475.js +224 -0
  311. package/cli.js +50 -16
  312. package/locales/ca.js +7 -2
  313. package/locales/de.js +7 -2
  314. package/locales/en.js +10 -2
  315. package/locales/fr.js +7 -2
  316. package/locales/ja.js +7 -2
  317. package/locales/pt.js +7 -2
  318. package/locales/ru.js +7 -2
  319. package/locales/zh-TW.js +10 -2
  320. package/locales/zh.js +10 -2
  321. package/package.json +5 -4
  322. package/web-shell/assets/{arc-DcbWnB9T.js → arc-Dpy_U6Bb.js} +1 -1
  323. package/web-shell/assets/{architectureDiagram-3BPJPVTR-kMMF5sud.js → architectureDiagram-3BPJPVTR-DgDOg-c5.js} +1 -1
  324. package/web-shell/assets/{blockDiagram-GPEHLZMM-Htl9vTJS.js → blockDiagram-GPEHLZMM-tADd9Ja3.js} +1 -1
  325. package/web-shell/assets/{c4Diagram-AAUBKEIU-BnZnm0mQ.js → c4Diagram-AAUBKEIU-68wj9MCU.js} +1 -1
  326. package/web-shell/assets/channel-Do7fFnFl.js +1 -0
  327. package/web-shell/assets/{chunk-2J33WTMH-DziB7kDG.js → chunk-2J33WTMH-DjJLOeVU.js} +1 -1
  328. package/web-shell/assets/{chunk-4BX2VUAB-CmkD8daw.js → chunk-4BX2VUAB-CMbzGeVC.js} +1 -1
  329. package/web-shell/assets/{chunk-55IACEB6-CHAd9A_U.js → chunk-55IACEB6-SlKgejv9.js} +1 -1
  330. package/web-shell/assets/{chunk-727SXJPM-Dqaam3fE.js → chunk-727SXJPM-CijXssHZ.js} +1 -1
  331. package/web-shell/assets/{chunk-AQP2D5EJ-D_-saBYM.js → chunk-AQP2D5EJ-D8w25nvR.js} +1 -1
  332. package/web-shell/assets/{chunk-FMBD7UC4-B9r_veWD.js → chunk-FMBD7UC4-Bv9dcx_e.js} +1 -1
  333. package/web-shell/assets/{chunk-ND2GUHAM-B3EaCSpL.js → chunk-ND2GUHAM-Bzf6sAOd.js} +1 -1
  334. package/web-shell/assets/{chunk-QZHKN3VN-CYq8x9mn.js → chunk-QZHKN3VN-whNoNeW5.js} +1 -1
  335. package/web-shell/assets/classDiagram-4FO5ZUOK-By_XOP3X.js +1 -0
  336. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-By_XOP3X.js +1 -0
  337. package/web-shell/assets/{cose-bilkent-S5V4N54A-D0ng4uiB.js → cose-bilkent-S5V4N54A-rpQS44Lz.js} +1 -1
  338. package/web-shell/assets/{dagre-BM42HDAG-DCZollQv.js → dagre-BM42HDAG-Ck7VE6nT.js} +1 -1
  339. package/web-shell/assets/{diagram-2AECGRRQ-Dfk2pWS0.js → diagram-2AECGRRQ-CgRrsodR.js} +1 -1
  340. package/web-shell/assets/{diagram-5GNKFQAL-kX38ltWR.js → diagram-5GNKFQAL-CsTZtE5A.js} +1 -1
  341. package/web-shell/assets/{diagram-KO2AKTUF-CJz2vsXh.js → diagram-KO2AKTUF-D5EAdVq4.js} +1 -1
  342. package/web-shell/assets/{diagram-LMA3HP47-BvMLZm_7.js → diagram-LMA3HP47-DNrjHC7Z.js} +1 -1
  343. package/web-shell/assets/{diagram-OG6HWLK6-l7kfStkO.js → diagram-OG6HWLK6-ClJSJGgC.js} +1 -1
  344. package/web-shell/assets/{erDiagram-TEJ5UH35-BSVa8GGT.js → erDiagram-TEJ5UH35-DuVnos_y.js} +1 -1
  345. package/web-shell/assets/{flowDiagram-I6XJVG4X-CoawKIXH.js → flowDiagram-I6XJVG4X-DEpIVl1s.js} +1 -1
  346. package/web-shell/assets/{ganttDiagram-6RSMTGT7-DFUDH0zF.js → ganttDiagram-6RSMTGT7-COnQM2-C.js} +1 -1
  347. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Y2pvpT4e.js → gitGraphDiagram-PVQCEYII-C-lX5H3_.js} +1 -1
  348. package/web-shell/assets/index-C2GE3DAF.js +74 -0
  349. package/web-shell/assets/{index-D0GX0zZf.js → index-DfcyS2E7.js} +1 -1
  350. package/web-shell/assets/index-Qxt6kN7i.js +1700 -0
  351. package/web-shell/assets/index-bo0Z8hfu.css +5 -0
  352. package/web-shell/assets/{infoDiagram-5YYISTIA-CU8_zLiX.js → infoDiagram-5YYISTIA-D0WP-wmU.js} +1 -1
  353. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-AVQiV0DU.js → ishikawaDiagram-YF4QCWOH-DgsI3Clu.js} +1 -1
  354. package/web-shell/assets/{journeyDiagram-JHISSGLW-DQ0VSKa3.js → journeyDiagram-JHISSGLW-4yCoMZO6.js} +1 -1
  355. package/web-shell/assets/{kanban-definition-UN3LZRKU-BqnWqsE_.js → kanban-definition-UN3LZRKU-D_05au1N.js} +1 -1
  356. package/web-shell/assets/{linear-BkoihsaA.js → linear-B38fDz0Q.js} +1 -1
  357. package/web-shell/assets/{mermaid.core-5RJs-31j.js → mermaid.core-aGNwTaHi.js} +5 -5
  358. package/web-shell/assets/{mindmap-definition-RKZ34NQL-D33Bxnpd.js → mindmap-definition-RKZ34NQL-C2yf_5WM.js} +1 -1
  359. package/web-shell/assets/{pieDiagram-4H26LBE5-BuEAw3BH.js → pieDiagram-4H26LBE5-DiHABBT-.js} +1 -1
  360. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Kox_usEq.js → quadrantDiagram-W4KKPZXB-W9xkeAGe.js} +1 -1
  361. package/web-shell/assets/{requirementDiagram-4Y6WPE33-CNjeUif0.js → requirementDiagram-4Y6WPE33-BGmRXl9k.js} +1 -1
  362. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-BCd2OL_U.js → sankeyDiagram-5OEKKPKP-CvOmT43_.js} +1 -1
  363. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-CF2ZTsz0.js → sequenceDiagram-3UESZ5HK-C8pdd0Z-.js} +1 -1
  364. package/web-shell/assets/{stateDiagram-AJRCARHV-qenSzHtm.js → stateDiagram-AJRCARHV-C-CYdFx2.js} +1 -1
  365. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BieEHeN9.js +1 -0
  366. package/web-shell/assets/{timeline-definition-PNZ67QCA-B5DyWdgs.js → timeline-definition-PNZ67QCA-w2KQn1cI.js} +1 -1
  367. package/web-shell/assets/{vennDiagram-CIIHVFJN-DqP4I_o_.js → vennDiagram-CIIHVFJN-DuorhRku.js} +1 -1
  368. package/web-shell/assets/{wardley-L42UT6IY-CJe2e4mg.js → wardley-L42UT6IY-BAXm2cWy.js} +1 -1
  369. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BMDSw-Rr.js → wardleyDiagram-YWT4CUSO-8PHaOXn5.js} +1 -1
  370. package/web-shell/assets/{xychartDiagram-2RQKCTM6-BTVZYkxD.js → xychartDiagram-2RQKCTM6-Do84JFSc.js} +1 -1
  371. package/web-shell/index.html +2 -2
  372. package/chunks/MaxSizedBox-5DPPWPGT.js +0 -85
  373. package/chunks/agent-6ODUANDO.js +0 -81
  374. package/chunks/agent-headless-7BYQTMHW.js +0 -75
  375. package/chunks/bridge-ZUB64FAE.js +0 -90
  376. package/chunks/chunk-LEH5C7FV.js +0 -232
  377. package/chunks/chunk-SZRN75WQ.js +0 -29
  378. package/chunks/chunk-UGYMA4EI.js +0 -219
  379. package/chunks/chunk-Z2BC6UJ5.js +0 -8575
  380. package/chunks/contextCommand-JLHYA34Z.js +0 -80
  381. package/chunks/daemon-status-provider-2233Q37D.js +0 -89
  382. package/chunks/earlyInputCapture-A7NDU3PF.js +0 -82
  383. package/chunks/environment-W5UFC2CH.js +0 -102
  384. package/chunks/errors-M7CLORXH.js +0 -88
  385. package/chunks/exitPlanMode-GXTBWQAR.js +0 -403
  386. package/chunks/handleAutoUpdate-6DBEZYPV.js +0 -81
  387. package/chunks/i18n-VUJJZIMU.js +0 -97
  388. package/chunks/initializer-UWAK5U5O.js +0 -86
  389. package/chunks/installationInfo-6O2YAA52.js +0 -80
  390. package/chunks/list-GB4ESM3T.js +0 -89
  391. package/chunks/loadedSettingsAdapter-OT6JVQ7U.js +0 -83
  392. package/chunks/mcp-6DBDJPFU.js +0 -83
  393. package/chunks/nonInteractiveCli-MOYCYBBU.js +0 -141
  394. package/chunks/pidfile-TFRZZZIO.js +0 -86
  395. package/chunks/read-file-APMO3PSX.js +0 -31
  396. package/chunks/resumeHistoryUtils-6KRYEAWZ.js +0 -91
  397. package/chunks/ripGrep-BEJDEDXW.js +0 -73
  398. package/chunks/runtime-XXRRTNP6.js +0 -118
  399. package/chunks/serve-7BSTXJ4T.js +0 -89
  400. package/chunks/shell-HH3PF3A2.js +0 -83
  401. package/chunks/spawnChannel-RWNDBXGA.js +0 -82
  402. package/chunks/src-GE4TTTML.js +0 -3147
  403. package/chunks/standalone-update-Q6WFRZZQ.js +0 -92
  404. package/chunks/task-create-N7WQSGYA.js +0 -25
  405. package/chunks/theme-manager-SWRILQHI.js +0 -77
  406. package/chunks/total-session-admission-DLHHHLD3.js +0 -84
  407. package/chunks/trustedFolders-KHXHY6PY.js +0 -93
  408. package/chunks/updateCheck-RKL6M5XN.js +0 -92
  409. package/chunks/useAutoAcceptIndicator-CFQ5BUJL.js +0 -93
  410. package/chunks/workspace-providers-status-QSVZUETE.js +0 -86
  411. package/chunks/workspace-registry-UT4RBNBM.js +0 -88
  412. package/chunks/workspace-service-JFWRUS4V.js +0 -98
  413. package/chunks/workspace-skills-status-ZBBKJOI2.js +0 -85
  414. package/chunks/write-file-VHIXW5M7.js +0 -73
  415. package/web-shell/assets/channel-Cq7YKtfC.js +0 -1
  416. package/web-shell/assets/classDiagram-4FO5ZUOK-CQ9aC1Tg.js +0 -1
  417. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CQ9aC1Tg.js +0 -1
  418. package/web-shell/assets/index-D9haPt0X.css +0 -5
  419. package/web-shell/assets/index-ckX9Pq5k.js +0 -1230
  420. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-B7W4zlCr.js +0 -1
  421. package/chunks/{chunk-TARRHLLG.js → chunk-QUGAUQGJ.js} +25 -25
  422. package/chunks/{chunk-U7ZFW55U.js → chunk-VOQXFAY5.js} +977 -977
  423. /package/chunks/{chunk-LXXMOYPL.js → chunk-VXZBKKQR.js} +0 -0
@@ -2,10 +2,10 @@
2
2
  "use strict";
3
3
  import {
4
4
  sanitizeTerminalText
5
- } from "./chunk-IPUUTYMV.js";
5
+ } from "./chunk-YDLJGZHL.js";
6
6
  import {
7
7
  formatHistoryGapNotice
8
- } from "./chunk-WCXCRJYB.js";
8
+ } from "./chunk-Z3YLHKB7.js";
9
9
  import {
10
10
  isGoalStatusKind,
11
11
  isTerminalGoalStatusKind
@@ -23,18 +23,18 @@ import {
23
23
  setGoalTerminalObserver,
24
24
  setLastGoalTerminal,
25
25
  unregisterGoalHook
26
- } from "./chunk-PHOF65IG.js";
26
+ } from "./chunk-FRXG4ARO.js";
27
27
  import {
28
28
  apiActivityTracker,
29
29
  formatVisionBridgeNoticeDisplay,
30
30
  isVisionBridgeNoticeDisplay
31
- } from "./chunk-CIKQ7KKO.js";
31
+ } from "./chunk-NVFSGPIF.js";
32
32
  import {
33
33
  ToolNames
34
- } from "./chunk-PR75REBZ.js";
34
+ } from "./chunk-MM7TH7ZM.js";
35
35
  import {
36
36
  createDebugLogger
37
- } from "./chunk-NL7LTRLR.js";
37
+ } from "./chunk-E2BHWIDT.js";
38
38
  import {
39
39
  init_esbuild_shims
40
40
  } from "./chunk-5O2XNYP6.js";
@@ -394,6 +394,12 @@ var SetupGithubError = class extends Error {
394
394
  this.partialResult = partialResult;
395
395
  }
396
396
  };
397
+ function isWorkspaceGenerationClosed(error) {
398
+ return Boolean(
399
+ error && typeof error === "object" && "code" in error && error.code === "workspace_generation_closed"
400
+ );
401
+ }
402
+ __name(isWorkspaceGenerationClosed, "isWorkspaceGenerationClosed");
397
403
  var nodeFileOps = {
398
404
  assertCanWrite() {
399
405
  },
@@ -514,6 +520,7 @@ async function setupGithub(options = {}) {
514
520
  sizeBytes: write.sizeBytes
515
521
  });
516
522
  } catch (error) {
523
+ if (isWorkspaceGenerationClosed(error)) throw error;
517
524
  result.partial = true;
518
525
  result.workflows.push({
519
526
  sourcePath: workflow.sourcePath,
@@ -530,6 +537,7 @@ async function setupGithub(options = {}) {
530
537
  }
531
538
  }
532
539
  } catch (error) {
540
+ if (isWorkspaceGenerationClosed(error)) throw error;
533
541
  if (error instanceof SetupGithubError) throw error;
534
542
  throw new SetupGithubError(
535
543
  "github_workflow_write_failed",
@@ -570,6 +578,7 @@ async function updateGitignore(gitRepoRoot, fileOps = nodeFileOps) {
570
578
  added: missingEntries
571
579
  };
572
580
  } catch (error) {
581
+ if (isWorkspaceGenerationClosed(error)) throw error;
573
582
  debugLogger2.debug("Failed to update .gitignore:", error);
574
583
  return {
575
584
  path: ".gitignore",
@@ -679,6 +688,206 @@ __name(realpathOrResolve, "realpathOrResolve");
679
688
 
680
689
  // packages/acp-bridge/src/transcript-replay.ts
681
690
  init_esbuild_shims();
691
+
692
+ // packages/core/dist/src/goals/goal-wire.js
693
+ init_esbuild_shims();
694
+
695
+ // packages/core/dist/src/goals/goal-protocol.js
696
+ init_esbuild_shims();
697
+ var GOAL_STATE_VERSION = 2;
698
+
699
+ // packages/core/dist/src/goals/goal-reducer.js
700
+ init_esbuild_shims();
701
+ var MAX_BLOCKED_AUDIT_COUNT = 3;
702
+ function parseGoalStateRecordPayloadV2(value) {
703
+ if (!isRecord(value) || !hasOnlyKeys(value, ["v", "cause", "snapshot", "blockedAudit"]) || value["v"] !== GOAL_STATE_VERSION || !isGoalStateCause(value["cause"]) || !isBlockedAudit(value["blockedAudit"])) {
704
+ return void 0;
705
+ }
706
+ const parsedSnapshot = parseGoalSnapshotV2(value["snapshot"]);
707
+ return parsedSnapshot?.activity === "idle" ? {
708
+ v: GOAL_STATE_VERSION,
709
+ cause: value["cause"],
710
+ snapshot: parsedSnapshot,
711
+ ...value["blockedAudit"] ? { blockedAudit: structuredClone(value["blockedAudit"]) } : {}
712
+ } : void 0;
713
+ }
714
+ __name(parseGoalStateRecordPayloadV2, "parseGoalStateRecordPayloadV2");
715
+ function parseGoalSnapshotV2(value) {
716
+ if (!isRecord(value) || !hasOnlyKeys(value, ["v", "goal", "activity"]) || value["v"] !== GOAL_STATE_VERSION || !isGoalActivity(value["activity"])) {
717
+ return void 0;
718
+ }
719
+ if (value["goal"] === null) {
720
+ return {
721
+ v: GOAL_STATE_VERSION,
722
+ goal: null,
723
+ activity: value["activity"]
724
+ };
725
+ }
726
+ const goal = parseGoalRecord(value["goal"]);
727
+ return goal ? { v: GOAL_STATE_VERSION, goal, activity: value["activity"] } : void 0;
728
+ }
729
+ __name(parseGoalSnapshotV2, "parseGoalSnapshotV2");
730
+ function copyCursor(cursor) {
731
+ return { recordId: cursor.recordId };
732
+ }
733
+ __name(copyCursor, "copyCursor");
734
+ function parseGoalRecord(value) {
735
+ if (!isRecord(value) || !hasOnlyKeys(value, [
736
+ "goalId",
737
+ "revision",
738
+ "objective",
739
+ "status",
740
+ "evidenceCursor",
741
+ "turnCount",
742
+ "activeTimeMs",
743
+ "createdAt",
744
+ "updatedAt",
745
+ "lastReason"
746
+ ]) || typeof value["goalId"] !== "string" || !value["goalId"] || !isNonNegativeInteger(value["revision"]) || value["revision"] === 0 || typeof value["objective"] !== "string" || !value["objective"].trim() || !isGoalStatus(value["status"]) || !isTranscriptCursor(value["evidenceCursor"]) || !isNonNegativeInteger(value["turnCount"]) || !isNonNegativeNumber(value["activeTimeMs"]) || !isFiniteNumber(value["createdAt"]) || !isFiniteNumber(value["updatedAt"]) || value["lastReason"] !== void 0 && typeof value["lastReason"] !== "string") {
747
+ return void 0;
748
+ }
749
+ return {
750
+ goalId: value["goalId"],
751
+ revision: value["revision"],
752
+ objective: value["objective"],
753
+ status: value["status"],
754
+ evidenceCursor: copyCursor(value["evidenceCursor"]),
755
+ turnCount: value["turnCount"],
756
+ activeTimeMs: value["activeTimeMs"],
757
+ createdAt: value["createdAt"],
758
+ updatedAt: value["updatedAt"],
759
+ ...value["lastReason"] === void 0 ? {} : { lastReason: value["lastReason"] }
760
+ };
761
+ }
762
+ __name(parseGoalRecord, "parseGoalRecord");
763
+ function isTranscriptCursor(value) {
764
+ return isRecord(value) && hasOnlyKeys(value, ["recordId"]) && (typeof value["recordId"] === "string" || value["recordId"] === null);
765
+ }
766
+ __name(isTranscriptCursor, "isTranscriptCursor");
767
+ function isGoalStatus(value) {
768
+ return value === "active" || value === "paused" || value === "blocked" || value === "usage_limited" || value === "complete";
769
+ }
770
+ __name(isGoalStatus, "isGoalStatus");
771
+ function isGoalActivity(value) {
772
+ return value === "idle" || value === "running" || value === "verifying";
773
+ }
774
+ __name(isGoalActivity, "isGoalActivity");
775
+ function isGoalStateCause(value) {
776
+ return value === "create" || value === "replace" || value === "edit" || value === "pause" || value === "resume" || value === "turn_finished" || value === "verifier_accept" || value === "verifier_reject" || value === "complete" || value === "blocked" || value === "usage_limited" || value === "clear" || value === "migrated";
777
+ }
778
+ __name(isGoalStateCause, "isGoalStateCause");
779
+ function isBlockedAudit(value) {
780
+ return value === void 0 || isRecord(value) && hasOnlyKeys(value, ["fingerprint", "count", "turnIds"]) && typeof value["fingerprint"] === "string" && value["fingerprint"].length > 0 && isNonNegativeInteger(value["count"]) && value["count"] > 0 && value["count"] <= MAX_BLOCKED_AUDIT_COUNT && Array.isArray(value["turnIds"]) && value["turnIds"].length === value["count"] && value["turnIds"].every((turnId) => typeof turnId === "string" && turnId.length > 0);
781
+ }
782
+ __name(isBlockedAudit, "isBlockedAudit");
783
+ function isRecord(value) {
784
+ return typeof value === "object" && value !== null && !Array.isArray(value);
785
+ }
786
+ __name(isRecord, "isRecord");
787
+ function hasOnlyKeys(value, keys) {
788
+ return Object.keys(value).every((key) => keys.includes(key));
789
+ }
790
+ __name(hasOnlyKeys, "hasOnlyKeys");
791
+ function isNonNegativeInteger(value) {
792
+ return typeof value === "number" && Number.isInteger(value) && value >= 0;
793
+ }
794
+ __name(isNonNegativeInteger, "isNonNegativeInteger");
795
+ function isNonNegativeNumber(value) {
796
+ return typeof value === "number" && Number.isFinite(value) && value >= 0;
797
+ }
798
+ __name(isNonNegativeNumber, "isNonNegativeNumber");
799
+ function isFiniteNumber(value) {
800
+ return typeof value === "number" && Number.isFinite(value);
801
+ }
802
+ __name(isFiniteNumber, "isFiniteNumber");
803
+
804
+ // packages/core/dist/src/goals/goal-legacy-projection.js
805
+ init_esbuild_shims();
806
+ function projectGoalStateToLegacy(payload, previousGoal = null) {
807
+ const snapshotGoal = payload.snapshot.goal;
808
+ const displayGoal = snapshotGoal ?? previousGoal;
809
+ const kind = legacyStatusKind(payload);
810
+ const goalStatus = {
811
+ type: "goal_status",
812
+ kind,
813
+ condition: displayGoal?.objective ?? "",
814
+ ...displayGoal ? { iterations: displayGoal.turnCount } : {},
815
+ ...displayGoal ? { setAt: displayGoal.createdAt } : {},
816
+ ...displayGoal ? { durationMs: displayGoal.activeTimeMs } : {},
817
+ ...displayGoal?.lastReason === void 0 ? {} : { lastReason: displayGoal.lastReason }
818
+ };
819
+ const terminalKind = kind === "achieved" || kind === "failed" || kind === "aborted" ? kind : void 0;
820
+ return {
821
+ activeGoal: snapshotGoal?.status === "active" ? {
822
+ condition: snapshotGoal.objective,
823
+ iterations: snapshotGoal.turnCount,
824
+ setAt: snapshotGoal.createdAt,
825
+ ...snapshotGoal.lastReason === void 0 ? {} : { lastReason: snapshotGoal.lastReason }
826
+ } : null,
827
+ goalStatus,
828
+ goalTerminal: terminalKind && displayGoal ? {
829
+ kind: terminalKind,
830
+ condition: displayGoal.objective,
831
+ iterations: displayGoal.turnCount,
832
+ durationMs: displayGoal.activeTimeMs,
833
+ ...displayGoal.lastReason === void 0 ? {} : { lastReason: displayGoal.lastReason }
834
+ } : null
835
+ };
836
+ }
837
+ __name(projectGoalStateToLegacy, "projectGoalStateToLegacy");
838
+ function legacyStatusKind(payload) {
839
+ switch (payload.cause) {
840
+ case "create":
841
+ case "replace":
842
+ case "edit":
843
+ case "resume":
844
+ case "migrated":
845
+ return "set";
846
+ case "complete":
847
+ return "achieved";
848
+ case "clear":
849
+ return "cleared";
850
+ case "pause":
851
+ return "paused";
852
+ case "blocked":
853
+ case "usage_limited":
854
+ return "aborted";
855
+ case "turn_finished":
856
+ case "verifier_accept":
857
+ case "verifier_reject":
858
+ return payload.snapshot.goal?.status === "complete" ? "achieved" : payload.snapshot.goal?.status === "blocked" || payload.snapshot.goal?.status === "usage_limited" ? "aborted" : "checking";
859
+ default:
860
+ return assertNever(payload.cause);
861
+ }
862
+ }
863
+ __name(legacyStatusKind, "legacyStatusKind");
864
+ function assertNever(value) {
865
+ throw new Error(`Unsupported Goal state cause: ${String(value)}`);
866
+ }
867
+ __name(assertNever, "assertNever");
868
+
869
+ // packages/core/dist/src/hooks/user-prompt-submit-context.js
870
+ init_esbuild_shims();
871
+ var USER_PROMPT_SUBMIT_CONTEXT_OPEN_TAG = "<qwen:user-prompt-submit-context>";
872
+ var USER_PROMPT_SUBMIT_CONTEXT_CLOSE_TAG = "</qwen:user-prompt-submit-context>";
873
+ function isUserPromptSubmitContextPartText(text) {
874
+ const trimmed = text.trim();
875
+ return trimmed.startsWith(USER_PROMPT_SUBMIT_CONTEXT_OPEN_TAG) && trimmed.endsWith(USER_PROMPT_SUBMIT_CONTEXT_CLOSE_TAG) && trimmed.length >= USER_PROMPT_SUBMIT_CONTEXT_OPEN_TAG.length + USER_PROMPT_SUBMIT_CONTEXT_CLOSE_TAG.length;
876
+ }
877
+ __name(isUserPromptSubmitContextPartText, "isUserPromptSubmitContextPartText");
878
+ function stripTrailingUserPromptSubmitContextPart(parts) {
879
+ if (parts.length <= 1) {
880
+ return parts;
881
+ }
882
+ const last = parts[parts.length - 1];
883
+ if (!last || typeof last.text !== "string" || !isUserPromptSubmitContextPartText(last.text)) {
884
+ return parts;
885
+ }
886
+ return parts.slice(0, -1);
887
+ }
888
+ __name(stripTrailingUserPromptSubmitContextPart, "stripTrailingUserPromptSubmitContextPart");
889
+
890
+ // packages/acp-bridge/src/transcript-replay.ts
682
891
  var MISSING_TRANSCRIPT_TOOL_RESULT_MESSAGE = "Tool result missing from saved history; the previous run likely ended before this tool completed.";
683
892
  var TRANSCRIPT_GOAL_STATUS_KINDS = /* @__PURE__ */ new Set([
684
893
  "set",
@@ -840,6 +1049,7 @@ var DefaultTranscriptReplayMachine = class {
840
1049
  options.onDiagnostic
841
1050
  );
842
1051
  this.usage = { ...initialState.cumulativeUsage };
1052
+ this.goalState = initialState.goalState;
843
1053
  for (const pending of initialState.pendingToolCalls) {
844
1054
  this.pendingToolCalls.set(pending.callId, pending);
845
1055
  this.usedToolCallIds.add(pending.callId);
@@ -858,6 +1068,7 @@ var DefaultTranscriptReplayMachine = class {
858
1068
  gapByChild = /* @__PURE__ */ new Map();
859
1069
  usage;
860
1070
  finalized = false;
1071
+ goalState;
861
1072
  *project(record) {
862
1073
  if (this.finalized) {
863
1074
  throw new Error(
@@ -939,28 +1150,109 @@ var DefaultTranscriptReplayMachine = class {
939
1150
  pendingToolCalls: [...this.pendingToolCalls.values()].map((pending) => ({
940
1151
  ...pending
941
1152
  })),
942
- cumulativeUsage: { ...this.usage }
1153
+ cumulativeUsage: { ...this.usage },
1154
+ ...this.goalState ? { goalState: this.goalState } : {}
943
1155
  };
944
1156
  }
945
1157
  *projectUserRecord(record, emit, meta) {
946
- if (record.subtype === "notification" || record.subtype === "cron" || record.subtype === "mid_turn_user_message") {
1158
+ if (record.subtype === "goal_runtime" || record.subtype === "notification" || record.subtype === "cron" || record.subtype === "mid_turn_user_message") {
947
1159
  const payload = isObjectRecord(record.systemPayload) ? record.systemPayload : void 0;
948
1160
  const displayText = payload && typeof payload["displayText"] === "string" ? payload["displayText"] : void 0;
1161
+ const backgroundTask = payload && isObjectRecord(payload["backgroundTask"]) ? payload["backgroundTask"] : void 0;
949
1162
  if (displayText) {
1163
+ const isNotification = record.subtype === "notification";
950
1164
  yield emit(
951
1165
  createTranscriptMessageUpdate({
952
1166
  role: "user",
953
1167
  text: displayText,
954
1168
  ...meta,
955
- ...record.subtype === "cron" ? { extra: { source: "cron" } } : {}
1169
+ ...isNotification ? {
1170
+ extra: {
1171
+ source: "background_notification",
1172
+ qwenDiscreteMessage: true,
1173
+ ...backgroundTask ? { backgroundTask } : {}
1174
+ }
1175
+ } : record.subtype === "cron" ? { extra: { source: "cron" } } : {}
956
1176
  })
957
1177
  );
958
1178
  return;
959
1179
  }
960
1180
  if (record.subtype !== "mid_turn_user_message") return;
1181
+ } else if (!record.subtype) {
1182
+ const payload = isObjectRecord(record.systemPayload) ? record.systemPayload : void 0;
1183
+ const displayText = payload && typeof payload["displayText"] === "string" ? payload["displayText"] : void 0;
1184
+ yield* this.projectMessageParts(
1185
+ displayText ? this.withUserPromptDisplayText(record, displayText) : this.withoutTrailingUserPromptSubmitContext(record),
1186
+ "user",
1187
+ emit,
1188
+ meta
1189
+ );
1190
+ return;
961
1191
  }
962
1192
  yield* this.projectMessageParts(record, "user", emit, meta);
963
1193
  }
1194
+ /**
1195
+ * Drops a trailing message part that is entirely a tagged UserPromptSubmit
1196
+ * context block. Injection always appends after the user's own part(s), so
1197
+ * a sole matching part is treated as user-authored and kept.
1198
+ */
1199
+ withoutTrailingUserPromptSubmitContext(record) {
1200
+ const parts = record.message?.parts;
1201
+ if (!Array.isArray(parts)) {
1202
+ return record;
1203
+ }
1204
+ const nextParts = stripTrailingUserPromptSubmitContextPart(parts);
1205
+ if (nextParts === parts) {
1206
+ return record;
1207
+ }
1208
+ return {
1209
+ ...record,
1210
+ message: {
1211
+ ...record.message,
1212
+ parts: [...nextParts]
1213
+ }
1214
+ };
1215
+ }
1216
+ /**
1217
+ * Rebuilds a plain user record for display: strip trailing tagged hook
1218
+ * context, then replace every text part with a single `displayText` part at
1219
+ * the first text position so images keep their relative order.
1220
+ */
1221
+ withUserPromptDisplayText(record, displayText) {
1222
+ const stripped = this.withoutTrailingUserPromptSubmitContext(record);
1223
+ const parts = stripped.message?.parts;
1224
+ if (!Array.isArray(parts) || parts.length === 0) {
1225
+ return {
1226
+ ...stripped,
1227
+ message: {
1228
+ ...stripped.message,
1229
+ parts: [{ text: displayText }]
1230
+ }
1231
+ };
1232
+ }
1233
+ let replaced = false;
1234
+ const nextParts = [];
1235
+ for (const part of parts) {
1236
+ if (isObjectRecord(part) && typeof part["text"] === "string") {
1237
+ if (!replaced) {
1238
+ nextParts.push({ text: displayText });
1239
+ replaced = true;
1240
+ }
1241
+ continue;
1242
+ }
1243
+ nextParts.push(part);
1244
+ }
1245
+ if (!replaced) {
1246
+ nextParts.push({ text: displayText });
1247
+ }
1248
+ return {
1249
+ ...stripped,
1250
+ message: {
1251
+ ...stripped.message,
1252
+ parts: nextParts
1253
+ }
1254
+ };
1255
+ }
964
1256
  *projectAssistantRecord(record, emit, meta) {
965
1257
  const usageMetadata = isObjectRecord(record.usageMetadata) ? record.usageMetadata : void 0;
966
1258
  let usageEmitted = false;
@@ -1123,6 +1415,38 @@ var DefaultTranscriptReplayMachine = class {
1123
1415
  }
1124
1416
  }
1125
1417
  *projectSystemRecord(record, emit, meta) {
1418
+ if (record.subtype === "goal_state") {
1419
+ const payload2 = parseGoalStateRecordPayloadV2(record.systemPayload);
1420
+ if (!payload2) {
1421
+ this.report(
1422
+ "malformed_goal_state",
1423
+ "Skipped a malformed Goal state transcript record.",
1424
+ record.uuid,
1425
+ "systemPayload"
1426
+ );
1427
+ return;
1428
+ }
1429
+ const projection = projectGoalStateToLegacy(
1430
+ payload2,
1431
+ this.goalState?.goal ?? null
1432
+ );
1433
+ this.goalState = payload2.snapshot;
1434
+ const { type: _type, ...goalStatus } = projection.goalStatus;
1435
+ yield emit(
1436
+ createTranscriptMessageUpdate({
1437
+ role: "assistant",
1438
+ text: "",
1439
+ ...meta,
1440
+ extra: {
1441
+ goalState: payload2.snapshot,
1442
+ goalStatus,
1443
+ ...projection.goalTerminal ? { goalTerminal: projection.goalTerminal } : {},
1444
+ "qwen.session.recordId": record.uuid
1445
+ }
1446
+ })
1447
+ );
1448
+ return;
1449
+ }
1126
1450
  if (record.subtype !== "slash_command") return;
1127
1451
  const payload = isObjectRecord(record.systemPayload) ? record.systemPayload : void 0;
1128
1452
  if (payload?.["phase"] !== "result") return;
@@ -1334,6 +1658,16 @@ function parseInitialState(value, onDiagnostic) {
1334
1658
  affectsCompleteness: true
1335
1659
  });
1336
1660
  }
1661
+ const rawGoalState = value["goalState"];
1662
+ const goalState = rawGoalState === void 0 ? void 0 : parseGoalSnapshotV2(rawGoalState);
1663
+ if (rawGoalState !== void 0 && !goalState) {
1664
+ onDiagnostic?.({
1665
+ code: "invalid_replay_state",
1666
+ severity: "warning",
1667
+ message: "Dropped a malformed Goal state from replay state.",
1668
+ affectsCompleteness: true
1669
+ });
1670
+ }
1337
1671
  return {
1338
1672
  v: 1,
1339
1673
  pendingToolCalls,
@@ -1342,7 +1676,8 @@ function parseInitialState(value, onDiagnostic) {
1342
1676
  cachedTokens: usage["cachedTokens"],
1343
1677
  candidateTokens: usage["candidateTokens"],
1344
1678
  apiTimeMs: usage["apiTimeMs"]
1345
- } : emptyUsage()
1679
+ } : emptyUsage(),
1680
+ ...goalState ? { goalState } : {}
1346
1681
  };
1347
1682
  }
1348
1683
  __name(parseInitialState, "parseInitialState");
@@ -2112,7 +2447,10 @@ var HistoryReplayer = class {
2112
2447
  machine;
2113
2448
  async replay(records, gaps) {
2114
2449
  try {
2115
- await this.replayPage(records, { finalizeDangling: true, gaps });
2450
+ await this.replayPage(records, {
2451
+ finalizeDangling: true,
2452
+ gaps
2453
+ });
2116
2454
  await this.supersedeUnrestorableGoal(records);
2117
2455
  } finally {
2118
2456
  this.setActiveRecordId(null);
@@ -2183,7 +2521,8 @@ var HistoryReplayer = class {
2183
2521
  cachedTokens: 0,
2184
2522
  candidateTokens: 0,
2185
2523
  apiTimeMs: 0
2186
- }
2524
+ },
2525
+ ...options.goalState ? { goalState: options.goalState } : {}
2187
2526
  };
2188
2527
  return createTranscriptReplayMachine({
2189
2528
  initialState,
@@ -2496,7 +2835,7 @@ async function extractMetadata(conversation, config) {
2496
2835
  const gitBranch = firstRecord?.gitBranch;
2497
2836
  let gitRepo;
2498
2837
  if (cwd) {
2499
- const { getGitRepoName } = await import("./src-GE4TTTML.js");
2838
+ const { getGitRepoName } = await import("./deferred-core-runtime-RKLCO7V5.js");
2500
2839
  gitRepo = getGitRepoName(cwd);
2501
2840
  }
2502
2841
  let model;
@@ -3217,7 +3556,7 @@ init_esbuild_shims();
3217
3556
 
3218
3557
  // packages/web-templates/src/generated/insightTemplate.ts
3219
3558
  init_esbuild_shims();
3220
- var INSIGHT_JS = '(function(e,B){"use strict";function U({data:t}){const{totalMessages:n=0,totalLinesAdded:l=0,totalLinesRemoved:s=0,totalFiles:r=0}=t,a=Object.keys(t.heatmap||{});let o=0;if(a.length>0){const c=a.map(x=>new Date(x)).map(x=>x.getTime()),d=new Date(Math.min(...c)),g=new Date(Math.max(...c)),E=Math.abs(g.getTime()-d.getTime());o=Math.ceil(E/(1e3*60*60*24))+1}const i=o>0?Math.round(n/o):0;return e.createElement("div",{className:"stats-row"},e.createElement("div",{className:"stat"},e.createElement("div",{className:"stat-value"},n),e.createElement("div",{className:"stat-label"},"Messages")),e.createElement("div",{className:"stat"},e.createElement("div",{className:"stat-value"},"+",l,"/-",s),e.createElement("div",{className:"stat-label"},"Lines")),e.createElement("div",{className:"stat"},e.createElement("div",{className:"stat-value"},r),e.createElement("div",{className:"stat-label"},"Files")),e.createElement("div",{className:"stat"},e.createElement("div",{className:"stat-value"},o),e.createElement("div",{className:"stat-label"},"Days")),e.createElement("div",{className:"stat"},e.createElement("div",{className:"stat-value"},i),e.createElement("div",{className:"stat-label"},"Msgs/Day")))}function K({insights:t}){return e.createElement("div",{className:"grid gap-4 md:grid-cols-2 md:gap-6"},e.createElement(J,{activeHours:t.activeHours,cardClass:"glass-card p-6",sectionTitleClass:"text-lg font-semibold tracking-tight text-slate-900"}))}function J({activeHours:t,cardClass:n,sectionTitleClass:l}){const r=[{label:"Morning",time:"06:00 - 12:00",hours:[6,7,8,9,10,11],color:"#fbbf24"},{label:"Afternoon",time:"12:00 - 18:00",hours:[12,13,14,15,16,17],color:"#0ea5e9"},{label:"Evening",time:"18:00 - 22:00",hours:[18,19,20,21],color:"#6366f1"},{label:"Night",time:"22:00 - 06:00",hours:[22,23,0,1,2,3,4,5],color:"#475569"}].map(o=>{const i=o.hours.reduce((m,c)=>m+(t[c]||0),0);return{...o,total:i}}),a=Math.max(...r.map(o=>o.total));return e.createElement("div",{className:`${n} h-full flex flex-col min-h-[320px]`},e.createElement("div",{className:"flex items-center justify-between mb-4"},e.createElement("h3",{className:l},"Active Hours")),e.createElement("div",{className:"flex-1 flex flex-col justify-center gap-4"},r.map(o=>e.createElement("div",{key:o.label,className:"space-y-2"},e.createElement("div",{className:"flex justify-between items-center text-sm"},e.createElement("div",{className:"flex items-center gap-2"},e.createElement("span",{className:"rounded-full",style:{width:"12px",height:"12px",backgroundColor:o.color}}),e.createElement("span",{className:"font-medium text-slate-700"},o.label),e.createElement("span",{className:"text-xs text-slate-400 hidden xl:inline"},o.time)),e.createElement("span",{className:"font-semibold text-slate-900"},o.total)),e.createElement("div",{className:"w-full rounded-full overflow-hidden",style:{height:"12px",backgroundColor:"#e2e8f0"}},e.createElement("div",{className:"h-full rounded-full",style:{width:`${a>0?o.total/a*100:0}%`,backgroundColor:o.color}}))))))}function V({heatmap:t}){return e.createElement("div",{className:"glass-card p-6 mt-4 md:mt-6"},e.createElement("div",{className:"mb-3"},e.createElement("h3",{className:"text-lg font-semibold tracking-tight text-slate-900"},"Activity Heatmap"),e.createElement("p",{className:"text-xs text-slate-500"},"Showing past year of activity")),e.createElement("div",{className:"heatmap-container"},e.createElement("div",{className:"min-w-[720px] rounded-xl bg-white/70"},e.createElement(X,{heatmapData:t}))),e.createElement(Z,null))}function X({heatmapData:t}){const a=new Date,o=new Date(a);o.setFullYear(a.getFullYear()-1);const i=[],m=new Date(o);for(;m<=a;)i.push(new Date(m)),m.setDate(m.getDate()+1);const c=[0,2,4,10,20],d=["#ebedf0","#9be9a8","#40c463","#30a14e","#216e39"];function g(u){if(u===0)return d[0];for(let f=c.length-1;f>=1;f--)if(u>=c[f])return d[f];return d[1]}const E=50,x=20,A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],w=o.getDay(),W=[];let h=-1,T=-100;return i.forEach((u,f)=>{const C=f+w,_=Math.floor(C/7),v=E+_*16,N=u.getMonth();N!==h&&(v-T>30&&(W.push({x:v,text:A[N]}),T=v),h=N)}),e.createElement("svg",{className:"heatmap-svg",width:1e3,height:130,viewBox:"0 0 1000 130"},i.map((u,f)=>{const C=f+w,_=Math.floor(C/7),v=u.getDay(),N=E+_*16,j=x+v*16,k=u.toISOString().split("T")[0],S=t[k]||0,L=g(S);return e.createElement("rect",{key:k,className:"heatmap-day",x:N,y:j,width:14,height:14,rx:"2",fill:L,"data-date":k,"data-count":S},e.createElement("title",null,k,": ",S," activities"))}),W.map((u,f)=>e.createElement("text",{key:f,x:u.x,y:"15",fontSize:"12",fill:"#64748b"},u.text)))}function Z(){const t=["#ebedf0","#9be9a8","#40c463","#30a14e","#216e39"];return e.createElement("div",{className:"flex items-center gap-2 mt-4"},e.createElement("span",{className:"text-xs text-slate-500"},"Less"),t.map((n,l)=>e.createElement("span",{key:l,className:"inline-block rounded",style:{width:"10px",height:"10px",backgroundColor:n}})),e.createElement("span",{className:"text-xs text-slate-500"},"More"))}function p({children:t}){if(!t||typeof t!="string")return t;const n=t.split(/(\\*\\*.*?\\*\\*)/g);return e.createElement(e.Fragment,null,n.map((l,s)=>l.startsWith("**")&&l.endsWith("**")&&l.length>=4?e.createElement("strong",{key:s},l.slice(2,-2)):l))}function F({text:t,label:n="Copy"}){const[l,s]=e.useState(!1),r=()=>{navigator.clipboard.writeText(t).then(()=>{s(!0),setTimeout(()=>s(!1),2e3)})};return e.createElement("button",{className:"copy-btn",onClick:r},l?"Copied!":n)}function R(t){return typeof t=="string"&&t.trim().length>0}function ee({qualitative:t,targetSections:n}){const{atAGlance:l}=t;if(!l)return null;const s=[{key:"wins",label:"What\'s working:",body:l.whats_working,href:"#section-wins",link:"Impressive Things You Did \u2192",showLink:n.wins},{key:"friction",label:"What\'s hindering you:",body:l.whats_hindering,href:"#section-friction",link:"Where Things Go Wrong \u2192",showLink:n.friction},{key:"features",label:"Quick wins to try:",body:l.quick_wins,href:"#section-features",link:"Features to Try \u2192",showLink:n.features},{key:"horizon",label:"Ambitious workflows:",body:l.ambitious_workflows,href:"#section-horizon",link:"On the Horizon \u2192",showLink:n.horizon}].filter(r=>R(r.body));return s.length===0?null:e.createElement("div",{className:"at-a-glance"},e.createElement("div",{className:"glance-title"},"At a Glance"),e.createElement("div",{className:"glance-sections"},s.map(r=>e.createElement("div",{key:r.key,className:"glance-section"},e.createElement("strong",null,r.label)," ",e.createElement(p,null,r.body),r.showLink&&e.createElement("a",{href:r.href,className:"see-more"},r.link)))))}function te({sections:t}){return t.length===0?null:e.createElement("nav",{className:"nav-toc"},t.map(n=>e.createElement("a",{key:n.href,href:n.href},n.label)))}function ne({qualitative:t,topGoals:n,topTools:l}){const{projectAreas:s}=t,r=Array.isArray(l)?Object.fromEntries(l):l;return e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-work",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"What You Work On"),Array.isArray(s==null?void 0:s.areas)&&s.areas.length>0&&e.createElement("div",{className:"project-areas mb-6"},s.areas.map((a,o)=>e.createElement("div",{key:o,className:"project-area"},e.createElement("div",{className:"area-header"},e.createElement("span",{className:"area-name"},a.name),e.createElement("span",{className:"area-count"},"~",a.session_count," sessions")),e.createElement("div",{className:"area-desc"},e.createElement(p,null,a.description))))),e.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"24px",marginBottom:"24px"}},n&&Object.keys(n).length>0&&e.createElement(D,{data:n,title:"What You Wanted",color:"#0ea5e9"}),r&&Object.keys(r).length>0&&e.createElement(D,{data:r,title:"Top Tools Used",color:"#6366f1"})))}function le({qualitative:t,insights:n}){const{interactionStyle:l}=t;return l?e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-usage",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"How You Use Qwen Code"),e.createElement("div",{className:"narrative"},e.createElement("p",null,e.createElement(p,null,l.narrative)),l.key_pattern&&e.createElement("div",{className:"key-insight"},e.createElement("strong",null,"Key pattern:")," ",e.createElement(p,null,l.key_pattern))),e.createElement(K,{insights:n}),e.createElement(V,{heatmap:n.heatmap})):null}function re({qualitative:t,primarySuccess:n,outcomes:l}){const s=t==null?void 0:t.impressiveWorkflows;return e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-wins",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"Impressive Things You Did"),(s==null?void 0:s.intro)&&e.createElement("p",{className:"section-intro"},e.createElement(p,null,s.intro)),s&&e.createElement("div",{className:"big-wins"},Array.isArray(s.impressive_workflows)&&s.impressive_workflows.map((r,a)=>e.createElement("div",{key:a,className:"big-win"},e.createElement("div",{className:"big-win-title"},r.title),e.createElement("div",{className:"big-win-desc"},e.createElement(p,null,r.description))))),e.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"24px",marginTop:"24px",marginBottom:"24px"}},n&&Object.keys(n).length>0&&e.createElement(D,{data:n,title:"What Helped Most (Qwen\'s Capabilities)",color:"#3b82f6",allowedKeys:["fast_accurate_search","correct_code_edits","good_explanations","proactive_help","multi_file_changes","good_debugging"]}),l&&Object.keys(l).length>0&&e.createElement(D,{data:l,title:"Outcomes",color:"#8b5cf6",allowedKeys:["fully_achieved","mostly_achieved","partially_achieved","not_achieved","unclear_from_transcript"]})))}function se(t){return t==="unclear_from_transcript"?"Unclear":t.split("_").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function D({data:t,title:n,color:l="#3b82f6",allowedKeys:s=null}){if(!t||Object.keys(t).length===0)return null;let r=Object.entries(t).filter(([,o])=>Number.isFinite(o)&&o!==0);if(s&&(r=r.filter(([o])=>s.includes(o))),r.sort((o,i)=>i[1]-o[1]),r=r.slice(0,10),r.length===0)return null;const a=Math.max(...r.map(([,o])=>o));return e.createElement("div",{className:"bar-chart-card",style:{flex:1,minWidth:0,backgroundColor:"#ffffff",borderRadius:"12px",padding:"20px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)",border:"1px solid #e2e8f0"}},e.createElement("h3",{style:{fontSize:"13px",fontWeight:700,color:"#64748b",marginTop:0,marginBottom:"16px",textTransform:"uppercase",letterSpacing:"0.5px"}},n),e.createElement("div",{className:"bar-chart",style:{display:"flex",flexDirection:"column",gap:"10px"}},r.map(([o,i])=>{const m=a>0?i/a*100:0;return e.createElement("div",{key:o,className:"bar-row",style:{display:"flex",alignItems:"center",gap:"12px"}},e.createElement("div",{className:"bar-label",style:{width:"130px",fontSize:"13px",color:"#475569",textAlign:"left",flexShrink:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},se(o)),e.createElement("div",{className:"bar-wrapper",style:{flex:1,display:"flex",alignItems:"center",gap:"10px",minWidth:0}},e.createElement("div",{className:"bar-bg",style:{flex:1,height:"8px",backgroundColor:"#f1f5f9",borderRadius:"4px",overflow:"hidden"}},e.createElement("div",{className:"bar-fill",style:{width:`${m}%`,height:"100%",backgroundColor:l,borderRadius:"4px",transition:"width 0.3s ease"}})),e.createElement("span",{className:"bar-value",style:{fontSize:"13px",fontWeight:600,color:"#475569",minWidth:"24px",textAlign:"right"}},i)))})))}function ae({qualitative:t,satisfaction:n,friction:l}){const s=t==null?void 0:t.frictionPoints;return e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-friction",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"Where Things Go Wrong"),(s==null?void 0:s.intro)&&e.createElement("p",{className:"section-intro"},e.createElement(p,null,s.intro)),s&&e.createElement("div",{className:"friction-categories"},Array.isArray(s.categories)&&s.categories.map((r,a)=>e.createElement("div",{key:a,className:"friction-category"},e.createElement("div",{className:"friction-title"},r.category),e.createElement("div",{className:"friction-desc"},e.createElement(p,null,r.description)),Array.isArray(r.examples)&&r.examples.length>0&&e.createElement("ul",{className:"friction-examples"},r.examples.map((o,i)=>e.createElement("li",{key:i},e.createElement(p,null,o))))))),e.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"24px",marginTop:"24px",marginBottom:"24px"}},l&&Object.keys(l).length>0&&e.createElement(D,{data:l,title:"Primary Friction Types",color:"#ef4444",allowedKeys:["misunderstood_request","wrong_approach","buggy_code","user_rejected_action","excessive_changes"]}),n&&Object.keys(n).length>0&&e.createElement(D,{data:n,title:"Inferred Satisfaction (model-estimated)",color:"#10b981",allowedKeys:["happy","satisfied","likely_satisfied","dissatisfied","frustrated"]})))}function oe({additions:t}){const[n,l]=e.useState(new Array(t.length).fill(!0)),[s,r]=e.useState(!1),a=m=>{const c=n.map((d,g)=>g===m?!d:d);l(c)},o=()=>{const m=t.filter((c,d)=>n[d]).map(c=>c.addition).join(`\n\n`);m&&navigator.clipboard.writeText(m).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})},i=n.filter(Boolean).length;return e.createElement("div",{className:"qwen-md-section"},e.createElement("h3",null,"Suggested QWEN.md Additions"),e.createElement("p",{className:"text-xs text-slate-500 mb-3"},"Just copy this into Qwen Code to add it to your QWEN.md."),e.createElement("div",{className:"qwen-md-actions",style:{marginBottom:"12px"}},e.createElement("button",{className:`copy-all-btn ${s?"copied":""}`,onClick:o,disabled:i===0},s?"Copied All!":`Copy All Checked (${i})`)),t.map((m,c)=>e.createElement("div",{key:c,className:"qwen-md-item"},e.createElement("input",{type:"checkbox",checked:n[c],onChange:()=>a(c),className:"cmd-checkbox"}),e.createElement("div",{style:{flex:1}},e.createElement("code",{className:"cmd-code"},m.addition),e.createElement("div",{className:"cmd-why"},e.createElement(p,null,m.why))),e.createElement(F,{text:m.addition}))))}function ie({qualitative:t}){const{improvements:n}=t;if(!n)return null;const l=Array.isArray(n.Qwen_md_additions)&&n.Qwen_md_additions.length>0||Array.isArray(n.features_to_try)&&n.features_to_try.length>0,s=Array.isArray(n.usage_patterns)&&n.usage_patterns.length>0;return!l&&!s?null:e.createElement(e.Fragment,null,l&&e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-features",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"Existing Qwen Code Features to Try"),Array.isArray(n.Qwen_md_additions)&&n.Qwen_md_additions.length>0&&e.createElement(oe,{additions:n.Qwen_md_additions}),e.createElement("p",{className:"text-xs text-slate-500 mb-3"},"Just copy this into Qwen Code and it\'ll set it up for you."),e.createElement("div",{className:"features-section"},Array.isArray(n.features_to_try)&&n.features_to_try.map((r,a)=>e.createElement("div",{key:a,className:"feature-card"},e.createElement("div",{className:"feature-title"},r.feature),e.createElement("div",{className:"feature-oneliner"},e.createElement(p,null,r.one_liner)),e.createElement("div",{className:"feature-why"},e.createElement("strong",null,"Why for you:")," ",e.createElement(p,null,r.why_for_you)),e.createElement("div",{className:"feature-examples"},e.createElement("div",{className:"feature-example"},e.createElement("div",{className:"example-code-row"},e.createElement("code",{className:"example-code"},r.example_code),e.createElement(F,{text:r.example_code})))))))),s&&e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-patterns",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"New Ways to Use Qwen Code"),e.createElement("p",{className:"text-xs text-slate-500 mb-3"},"Just copy this into Qwen Code and it\'ll walk you through it."),e.createElement("div",{className:"patterns-section"},Array.isArray(n.usage_patterns)&&n.usage_patterns.map((r,a)=>e.createElement("div",{key:a,className:"pattern-card"},e.createElement("div",{className:"pattern-title"},r.title),e.createElement("div",{className:"pattern-summary"},e.createElement(p,null,r.suggestion)),e.createElement("div",{className:"pattern-detail"},e.createElement(p,null,r.detail)),e.createElement("div",{className:"copyable-prompt-section"},e.createElement("div",{className:"prompt-label"},"Paste into Qwen Code:"),e.createElement("div",{className:"copyable-prompt-row"},e.createElement("code",{className:"copyable-prompt"},r.copyable_prompt),e.createElement(F,{text:r.copyable_prompt}))))))))}function me({qualitative:t}){const{futureOpportunities:n}=t;return n?e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-horizon",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"On the Horizon"),n.intro&&e.createElement("p",{className:"section-intro"},e.createElement(p,null,n.intro)),e.createElement("div",{className:"horizon-section"},Array.isArray(n.opportunities)&&n.opportunities.map((l,s)=>e.createElement("div",{key:s,className:"horizon-card"},e.createElement("div",{className:"horizon-title"},l.title),e.createElement("div",{className:"horizon-possible"},e.createElement(p,null,l.whats_possible)),e.createElement("div",{className:"horizon-tip"},e.createElement("strong",null,"Getting started:")," ",e.createElement(p,null,l.how_to_try)),e.createElement("div",{className:"pattern-prompt"},e.createElement("div",{className:"prompt-label"},"Paste into Qwen Code:"),e.createElement("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px"}},e.createElement("code",{style:{flex:1}},l.copyable_prompt),e.createElement(F,{text:l.copyable_prompt}))))))):null}function ce({qualitative:t}){const{memorableMoment:n}=t;return n?e.createElement("div",{className:"fun-ending"},e.createElement("div",{className:"fun-headline"},\'"\',n.headline,\'"\'),e.createElement("div",{className:"fun-detail"},e.createElement(p,null,n.detail))):null}const de={light:{background:"linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%)",textPrimary:"#0f172a",textSecondary:"#475569",textMuted:"#64748b",cardBackground:"rgba(255,255,255,0.7)",cardBackgroundSecondary:"rgba(255,255,255,0.5)",borderColor:"#e2e8f0",heatmapColors:["#9be9a8","#40c463","#30a14e","#216e39"],heatmapEmpty:"#ebedf0"},dark:{background:"linear-gradient(135deg, #0f172a 0%, #1e293b 100%)",textPrimary:"#f8fafc",textSecondary:"#e2e8f0",textMuted:"#94a3b8",cardBackground:"rgba(255,255,255,0.05)",cardBackgroundSecondary:"rgba(255,255,255,0.04)",borderColor:"rgba(255,255,255,0.08)",heatmapColors:["#0e4429","#006d32","#26a641","#39d353"],heatmapEmpty:"#2d333b"}};function pe({data:t,theme:n="light"}){var h,T,u,f,C,_;const l=de[n],{totalMessages:s=0,totalSessions:r=0,totalLinesAdded:a=0,totalLinesRemoved:o=0,totalFiles:i=0,currentStreak:m=0,longestStreak:c=0,activeHours:d={}}=t,g=Object.keys(t.heatmap||{});let E=0,x="";if(g.length>0){E=g.length;const v=g.map(S=>new Date(S).getTime()),N=new Date(Math.min(...v)),j=new Date(Math.max(...v)),k=S=>S.toISOString().split("T")[0];x=`${k(N)} \u2014 ${k(j)}`}const A=(u=(T=(h=t.qualitative)==null?void 0:h.interactionStyle)==null?void 0:T.key_pattern)!=null?u:null,w=(_=(C=(f=t.qualitative)==null?void 0:f.memorableMoment)==null?void 0:C.headline)!=null?_:null,W=fe(t.heatmap||{},l);return e.createElement("div",{id:"share-card",style:{width:"1200px",background:l.background,color:l.textPrimary,fontFamily:\'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"\',display:"flex",flexDirection:"column",padding:"48px 56px",position:"absolute",left:"-9999px",top:"-9999px",overflow:"hidden",boxSizing:"border-box"}},e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"32px"}},e.createElement("div",null,e.createElement("div",{style:{fontSize:"32px",fontWeight:700,letterSpacing:"-0.02em",lineHeight:1.2}},"Qwen Code Insights"),e.createElement("div",{style:{fontSize:"14px",color:l.textMuted,marginTop:"6px"}},x)),e.createElement("div",{style:{fontSize:"11px",color:l.textMuted,textTransform:"uppercase",letterSpacing:"0.15em",paddingTop:"8px"}},"qwen.ai")),e.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"16px",marginBottom:"32px"}},e.createElement(M,{value:String(s),label:"Messages",theme:l}),e.createElement(M,{value:String(r),label:"Sessions",theme:l}),e.createElement(M,{value:`+${a}/-${o}`,label:"Lines Changed",small:!0,theme:l}),e.createElement(M,{value:String(i),label:"Files",theme:l}),e.createElement(M,{value:`${m}d`,label:"Streak",theme:l}),e.createElement(M,{value:`${c}d`,label:"Best Streak",theme:l})),e.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px",marginBottom:"16px"}},e.createElement("div",{style:{background:l.cardBackground,borderRadius:"12px",padding:"20px",display:"flex",flexDirection:"column"}},e.createElement("div",{style:{fontSize:"12px",fontWeight:600,color:l.textMuted,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"12px"}},"Activity \xB7 ",E," active days"),e.createElement("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"}},e.createElement(ge,{cells:W})),e.createElement(ye,{theme:l})),e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"16px"}},e.createElement("div",{style:{background:l.cardBackground,borderRadius:"12px",padding:"20px",display:"flex",flexDirection:"column"}},e.createElement("div",{style:{fontSize:"12px",fontWeight:600,color:l.textMuted,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"12px"}},"Active Hours"),e.createElement("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:"10px"}},e.createElement(ue,{activeHours:d,theme:l}))),e.createElement("div",{style:{background:l.cardBackgroundSecondary,borderRadius:"12px",padding:"16px 16px",position:"relative"}},e.createElement("div",{style:{position:"absolute",left:"12px",fontSize:"64px",fontWeight:700,color:n==="light"?"rgba(99,102,241,0.15)":"rgba(99,102,241,0.2)",lineHeight:1,fontFamily:\'Georgia, "Times New Roman", serif\',userSelect:"none",pointerEvents:"none"}},"\u201C"),e.createElement("div",{style:{paddingLeft:"40px",position:"relative"}},A&&e.createElement("div",{style:{fontSize:"13px",color:l.textSecondary,lineHeight:1.6,marginBottom:w?"8px":0}},A),w&&e.createElement("div",{style:{fontSize:"12px",color:l.textMuted,lineHeight:1.5,fontStyle:"italic"}},w))))),e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"auto",paddingTop:"24px",borderTop:`1px solid ${l.borderColor}`,flexShrink:0}},e.createElement("div",{style:{fontSize:"12px",color:l.textMuted}},"Generated by Qwen Code \xB7 ",new Date().toISOString().split("T")[0]),e.createElement("div",{style:{fontSize:"12px",color:l.textMuted}},"github.com/QwenLM/qwen-code")))}function M({value:t,label:n,small:l,theme:s}){return e.createElement("div",{style:{textAlign:"center"}},e.createElement("div",{style:{fontSize:l?"18px":"28px",fontWeight:700,color:s.textPrimary,lineHeight:1.2}},t),e.createElement("div",{style:{fontSize:"11px",color:s.textMuted,textTransform:"uppercase",letterSpacing:"0.05em",marginTop:"4px"}},n))}function ue({activeHours:t,theme:n}){const s=[{label:"Morning",time:"06\u201312",hours:[6,7,8,9,10,11],color:"#fbbf24"},{label:"Afternoon",time:"12\u201318",hours:[12,13,14,15,16,17],color:"#0ea5e9"},{label:"Evening",time:"18\u201322",hours:[18,19,20,21],color:"#6366f1"},{label:"Night",time:"22\u201306",hours:[22,23,0,1,2,3,4,5],color:"#475569"}].map(a=>({...a,total:a.hours.reduce((o,i)=>o+(t[i]||0),0)})),r=Math.max(...s.map(a=>a.total),1);return e.createElement(e.Fragment,null,s.map(a=>{const o=r>0?a.total/r*100:0;return e.createElement("div",{key:a.label},e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",marginBottom:"4px"}},e.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},e.createElement("span",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:a.color,display:"inline-block",flexShrink:0}}),e.createElement("span",{style:{color:n.textSecondary,fontWeight:500}},a.label),e.createElement("span",{style:{color:n.textMuted,fontSize:"11px"}},a.time)),e.createElement("span",{style:{color:n.textMuted,fontWeight:600}},a.total)),e.createElement("div",{style:{height:"6px",background:n.borderColor,borderRadius:"3px",overflow:"hidden"}},e.createElement("div",{style:{width:`${o}%`,height:"100%",backgroundColor:a.color,borderRadius:"3px"}})))}))}function fe(t,n){const l=new Date,r=26*7,a=new Date(l);a.setDate(a.getDate()-r+1),a.setDate(a.getDate()-a.getDay());const o=[],i=new Date(l);i.setDate(i.getDate()+(6-i.getDay()));const m=new Date(a);for(;m<=i;){const c=m.toISOString().split("T")[0],d=t[c]||0;o.push({color:he(d,n)}),m.setDate(m.getDate()+1)}return o}function he(t,n){return t===0?n.heatmapEmpty:t<2?n.heatmapColors[0]:t<4?n.heatmapColors[1]:t<10?n.heatmapColors[2]:n.heatmapColors[3]}function ge({cells:t}){const l=Math.ceil(t.length/7),s=14,r=3,a=l*(s+r),o=7*(s+r);return e.createElement("svg",{width:a,height:o,viewBox:`0 0 ${a} ${o}`},t.map((i,m)=>{const c=Math.floor(m/7),d=m%7;return e.createElement("rect",{key:m,x:c*(s+r),y:d*(s+r),width:s,height:s,rx:2,fill:i.color})}))}function ye({theme:t}){return e.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"12px"}},e.createElement("span",{style:{fontSize:"11px",color:t.textMuted}},"Less"),[t.heatmapEmpty,t.heatmapColors[0],t.heatmapColors[1],t.heatmapColors[2],t.heatmapColors[3]].map((n,l)=>e.createElement("span",{key:l,style:{width:"10px",height:"10px",borderRadius:"2px",backgroundColor:n,display:"inline-block"}})),e.createElement("span",{style:{fontSize:"11px",color:t.textMuted}},"More"))}function b(t){return typeof t=="string"?t.trim().length>0:typeof t=="number"?Number.isFinite(t)&&t!==0:typeof t=="boolean"?t:Array.isArray(t)?t.some(n=>b(n)):t&&typeof t=="object"?Object.values(t).some(n=>b(n)):!1}function z(t){return Array.isArray(t)?t.some(([,n])=>Number.isFinite(n)&&n!==0):!!t&&Object.values(t).some(n=>Number.isFinite(n)&&n!==0)}function H(t){return Array.isArray(t)&&t.some(n=>b(n))}function xe({data:t}){var u,f,C,_,v,N,j,k,S,L,G,Y;const[n,l]=e.useState("dark"),s=e.useRef(!1),r=async()=>{const q=document.getElementById("share-card");if(!q||!window.html2canvas){alert("Export functionality is not available.");return}try{const y=q.cloneNode(!0);y.style.position="fixed",y.style.left="-9999px",y.style.top="0",y.style.pointerEvents="none",document.body.appendChild(y);const Q=await window.html2canvas(y,{scale:2,useCORS:!0,logging:!1,width:1200,height:y.scrollHeight});document.body.removeChild(y);const P=Q.toDataURL("image/png"),I=document.createElement("a");I.href=P,I.download=`qwen-insights-card-${new Date().toISOString().slice(0,10)}.png`,I.click()}catch(y){console.error("Export card error:",y),alert("Failed to export card. Please try again.")}};e.useEffect(()=>{s.current&&(s.current=!1,r())},[n]);const a=q=>{q===n?r():(s.current=!0,l(q))};if(!t)return e.createElement("div",{className:"text-center text-slate-600"},"No insight data available");const o=Object.keys(t.heatmap||{});let i="";if(o.length>0){const y=o.map(O=>new Date(O)).map(O=>O.getTime()),Q=new Date(Math.min(...y)),P=new Date(Math.max(...y)),I=O=>O.toISOString().split("T")[0];i=`${I(Q)} to ${I(P)}`}const m=b((u=t.qualitative)==null?void 0:u.atAGlance),c=!!t.qualitative&&(b(t.qualitative.projectAreas)||z(t.topGoals)||z(t.topTools)),d=b((f=t.qualitative)==null?void 0:f.interactionStyle),g=!!t.qualitative&&(b(t.qualitative.impressiveWorkflows)||z(t.primarySuccess)||z(t.outcomes)),E=!!t.qualitative&&(b(t.qualitative.frictionPoints)||z(t.satisfaction)||z(t.friction)),x=!!t.qualitative&&(H((C=t.qualitative.improvements)==null?void 0:C.Qwen_md_additions)||H((_=t.qualitative.improvements)==null?void 0:_.features_to_try)),A=!!t.qualitative&&H((v=t.qualitative.improvements)==null?void 0:v.usage_patterns),w=b((N=t.qualitative)==null?void 0:N.futureOpportunities),W=b((j=t.qualitative)==null?void 0:j.memorableMoment),h=[];c&&h.push({href:"#section-work",label:"What You Work On"}),d&&h.push({href:"#section-usage",label:"How You Use Qwen Code"}),g&&h.push({href:"#section-wins",label:"Impressive Things"}),E&&h.push({href:"#section-friction",label:"Where Things Go Wrong"}),x&&h.push({href:"#section-features",label:"Features to Try"}),A&&h.push({href:"#section-patterns",label:"New Usage Patterns"}),w&&h.push({href:"#section-horizon",label:"On the Horizon"});const T={wins:g,friction:E,features:x,horizon:w};return e.createElement("div",null,e.createElement("header",{className:"insights-header"},e.createElement("div",{className:"header-content"},e.createElement("div",{className:"header-title-section"},e.createElement("h1",{className:"header-title"},"Qwen Code Insights"),e.createElement("p",{className:"header-subtitle"},t.totalMessages?`${t.totalMessages.toLocaleString()} messages across ${(k=t.totalSessions)==null?void 0:k.toLocaleString()} sessions`:"Your personalized coding journey and patterns",i&&` \xB7 ${i}`)),e.createElement(Ee,{onExport:a}))),m&&t.qualitative&&e.createElement(ee,{qualitative:t.qualitative,targetSections:T}),h.length>0&&e.createElement(te,{sections:h}),e.createElement(U,{data:t}),c&&t.qualitative&&e.createElement(ne,{qualitative:t.qualitative,topGoals:t.topGoals,topTools:t.topTools}),d&&t.qualitative&&e.createElement(le,{qualitative:t.qualitative,insights:t}),g&&e.createElement(re,{qualitative:t.qualitative,primarySuccess:(S=t.primarySuccess)!=null?S:{},outcomes:(L=t.outcomes)!=null?L:{}}),E&&e.createElement(ae,{qualitative:t.qualitative,satisfaction:(G=t.satisfaction)!=null?G:{},friction:(Y=t.friction)!=null?Y:{}}),(x||A)&&t.qualitative&&e.createElement(ie,{qualitative:t.qualitative}),w&&t.qualitative&&e.createElement(me,{qualitative:t.qualitative}),W&&t.qualitative&&e.createElement(ce,{qualitative:t.qualitative}),e.createElement(pe,{data:t,theme:n}))}function Ee({onExport:t}){const[n,l]=e.useState(!1),s=e.useRef(null);e.useEffect(()=>{if(!n)return;const a=o=>{s.current&&!s.current.contains(o.target)&&l(!1)};return document.addEventListener("mousedown",a),()=>document.removeEventListener("mousedown",a)},[n]);const r=a=>{l(!1),t(a)};return e.createElement("div",{className:"export-dropdown-wrapper",ref:s},e.createElement("button",{className:"export-card-btn",onClick:()=>l(!n)},e.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),e.createElement("polyline",{points:"16 6 12 2 8 6"}),e.createElement("line",{x1:"12",y1:"2",x2:"12",y2:"15"})),e.createElement("span",null,"Export Card"),e.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`export-chevron ${n?"open":""}`},e.createElement("polyline",{points:"6 9 12 15 18 9"}))),n&&e.createElement("div",{className:"export-dropdown"},e.createElement("button",{className:"export-dropdown-item",onClick:()=>r("light")},e.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("circle",{cx:"12",cy:"12",r:"5"}),e.createElement("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),e.createElement("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),e.createElement("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),e.createElement("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),e.createElement("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),e.createElement("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),e.createElement("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),e.createElement("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})),e.createElement("span",null,"Light Theme")),e.createElement("button",{className:"export-dropdown-item",onClick:()=>r("dark")},e.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})),e.createElement("span",null,"Dark Theme"))))}const $=document.getElementById("react-root");$&&window.INSIGHT_DATA&&B?B.createRoot($).render(e.createElement(xe,{data:window.INSIGHT_DATA})):console.error("Failed to mount React app:",{container:!!$,data:!!window.INSIGHT_DATA,ReactDOM:!!B})})(React,ReactDOM);';
3559
+ var INSIGHT_JS = '(function(e,O){"use strict";function J({data:t}){const{totalMessages:n=0,totalLinesAdded:l=0,totalLinesRemoved:r=0,totalFiles:a=0}=t,s=Object.keys(t.heatmap||{});let o=0;if(s.length>0){const c=s.map(x=>new Date(x)).map(x=>x.getTime()),d=new Date(Math.min(...c)),g=new Date(Math.max(...c)),E=Math.abs(g.getTime()-d.getTime());o=Math.ceil(E/(1e3*60*60*24))+1}const i=o>0?Math.round(n/o):0;return e.createElement("div",{className:"stats-row"},e.createElement("div",{className:"stat"},e.createElement("div",{className:"stat-value"},n),e.createElement("div",{className:"stat-label"},"Messages")),e.createElement("div",{className:"stat"},e.createElement("div",{className:"stat-value"},"+",l,"/-",r),e.createElement("div",{className:"stat-label"},"Lines")),e.createElement("div",{className:"stat"},e.createElement("div",{className:"stat-value"},a),e.createElement("div",{className:"stat-label"},"Files")),e.createElement("div",{className:"stat"},e.createElement("div",{className:"stat-value"},o),e.createElement("div",{className:"stat-label"},"Days")),e.createElement("div",{className:"stat"},e.createElement("div",{className:"stat-value"},i),e.createElement("div",{className:"stat-label"},"Msgs/Day")))}/**\n * @license\n * Copyright 2026 Qwen Team\n * SPDX-License-Identifier: Apache-2.0\n */function D(t){const n=t.getFullYear(),l=String(t.getMonth()+1).padStart(2,"0"),r=String(t.getDate()).padStart(2,"0");return`${n}-${l}-${r}`}function Y(t){const[n,l,r]=t.split("-").map(Number);return new Date(n,l-1,r)}function V({insights:t}){return e.createElement("div",{className:"grid gap-4 md:grid-cols-2 md:gap-6"},e.createElement(X,{activeHours:t.activeHours,cardClass:"glass-card p-6",sectionTitleClass:"text-lg font-semibold tracking-tight text-slate-900"}))}function X({activeHours:t,cardClass:n,sectionTitleClass:l}){const a=[{label:"Morning",time:"06:00 - 12:00",hours:[6,7,8,9,10,11],color:"#fbbf24"},{label:"Afternoon",time:"12:00 - 18:00",hours:[12,13,14,15,16,17],color:"#0ea5e9"},{label:"Evening",time:"18:00 - 22:00",hours:[18,19,20,21],color:"#6366f1"},{label:"Night",time:"22:00 - 06:00",hours:[22,23,0,1,2,3,4,5],color:"#475569"}].map(o=>{const i=o.hours.reduce((m,c)=>m+(t[c]||0),0);return{...o,total:i}}),s=Math.max(...a.map(o=>o.total));return e.createElement("div",{className:`${n} h-full flex flex-col min-h-[320px]`},e.createElement("div",{className:"flex items-center justify-between mb-4"},e.createElement("h3",{className:l},"Active Hours")),e.createElement("div",{className:"flex-1 flex flex-col justify-center gap-4"},a.map(o=>e.createElement("div",{key:o.label,className:"space-y-2"},e.createElement("div",{className:"flex justify-between items-center text-sm"},e.createElement("div",{className:"flex items-center gap-2"},e.createElement("span",{className:"rounded-full",style:{width:"12px",height:"12px",backgroundColor:o.color}}),e.createElement("span",{className:"font-medium text-slate-700"},o.label),e.createElement("span",{className:"text-xs text-slate-400 hidden xl:inline"},o.time)),e.createElement("span",{className:"font-semibold text-slate-900"},o.total)),e.createElement("div",{className:"w-full rounded-full overflow-hidden",style:{height:"12px",backgroundColor:"#e2e8f0"}},e.createElement("div",{className:"h-full rounded-full",style:{width:`${s>0?o.total/s*100:0}%`,backgroundColor:o.color}}))))))}function Z({heatmap:t}){return e.createElement("div",{className:"glass-card p-6 mt-4 md:mt-6"},e.createElement("div",{className:"mb-3"},e.createElement("h3",{className:"text-lg font-semibold tracking-tight text-slate-900"},"Activity Heatmap"),e.createElement("p",{className:"text-xs text-slate-500"},"Showing past year of activity")),e.createElement("div",{className:"heatmap-container"},e.createElement("div",{className:"min-w-[720px] rounded-xl bg-white/70"},e.createElement(R,{heatmapData:t}))),e.createElement(ee,null))}function R({heatmapData:t}){const s=new Date,o=new Date(s);o.setFullYear(s.getFullYear()-1);const i=[],m=new Date(o);for(;m<=s;)i.push(new Date(m)),m.setDate(m.getDate()+1);const c=[0,2,4,10,20],d=["#ebedf0","#9be9a8","#40c463","#30a14e","#216e39"];function g(u){if(u===0)return d[0];for(let f=c.length-1;f>=1;f--)if(u>=c[f])return d[f];return d[1]}const E=50,x=20,A=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],w=o.getDay(),j=[];let h=-1,T=-100;return i.forEach((u,f)=>{const C=f+w,_=Math.floor(C/7),v=E+_*16,N=u.getMonth();N!==h&&(v-T>30&&(j.push({x:v,text:A[N]}),T=v),h=N)}),e.createElement("svg",{className:"heatmap-svg",width:1e3,height:130,viewBox:"0 0 1000 130"},i.map((u,f)=>{const C=f+w,_=Math.floor(C/7),v=u.getDay(),N=E+_*16,q=x+v*16,k=D(u),S=t[k]||0,I=g(S);return e.createElement("rect",{key:k,className:"heatmap-day",x:N,y:q,width:14,height:14,rx:"2",fill:I,"data-date":k,"data-count":S},e.createElement("title",null,k,": ",S," activities"))}),j.map((u,f)=>e.createElement("text",{key:f,x:u.x,y:"15",fontSize:"12",fill:"#64748b"},u.text)))}function ee(){const t=["#ebedf0","#9be9a8","#40c463","#30a14e","#216e39"];return e.createElement("div",{className:"flex items-center gap-2 mt-4"},e.createElement("span",{className:"text-xs text-slate-500"},"Less"),t.map((n,l)=>e.createElement("span",{key:l,className:"inline-block rounded",style:{width:"10px",height:"10px",backgroundColor:n}})),e.createElement("span",{className:"text-xs text-slate-500"},"More"))}function p({children:t}){if(!t||typeof t!="string")return t;const n=t.split(/(\\*\\*.*?\\*\\*)/g);return e.createElement(e.Fragment,null,n.map((l,r)=>l.startsWith("**")&&l.endsWith("**")&&l.length>=4?e.createElement("strong",{key:r},l.slice(2,-2)):l))}function H({text:t,label:n="Copy"}){const[l,r]=e.useState(!1),a=()=>{navigator.clipboard.writeText(t).then(()=>{r(!0),setTimeout(()=>r(!1),2e3)})};return e.createElement("button",{className:"copy-btn",onClick:a},l?"Copied!":n)}function te(t){return typeof t=="string"&&t.trim().length>0}function ne({qualitative:t,targetSections:n}){const{atAGlance:l}=t;if(!l)return null;const r=[{key:"wins",label:"What\'s working:",body:l.whats_working,href:"#section-wins",link:"Impressive Things You Did \u2192",showLink:n.wins},{key:"friction",label:"What\'s hindering you:",body:l.whats_hindering,href:"#section-friction",link:"Where Things Go Wrong \u2192",showLink:n.friction},{key:"features",label:"Quick wins to try:",body:l.quick_wins,href:"#section-features",link:"Features to Try \u2192",showLink:n.features},{key:"horizon",label:"Ambitious workflows:",body:l.ambitious_workflows,href:"#section-horizon",link:"On the Horizon \u2192",showLink:n.horizon}].filter(a=>te(a.body));return r.length===0?null:e.createElement("div",{className:"at-a-glance"},e.createElement("div",{className:"glance-title"},"At a Glance"),e.createElement("div",{className:"glance-sections"},r.map(a=>e.createElement("div",{key:a.key,className:"glance-section"},e.createElement("strong",null,a.label)," ",e.createElement(p,null,a.body),a.showLink&&e.createElement("a",{href:a.href,className:"see-more"},a.link)))))}function le({sections:t}){return t.length===0?null:e.createElement("nav",{className:"nav-toc"},t.map(n=>e.createElement("a",{key:n.href,href:n.href},n.label)))}function re({qualitative:t,topGoals:n,topTools:l}){const{projectAreas:r}=t,a=Array.isArray(l)?Object.fromEntries(l):l;return e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-work",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"What You Work On"),Array.isArray(r==null?void 0:r.areas)&&r.areas.length>0&&e.createElement("div",{className:"project-areas mb-6"},r.areas.map((s,o)=>e.createElement("div",{key:o,className:"project-area"},e.createElement("div",{className:"area-header"},e.createElement("span",{className:"area-name"},s.name),e.createElement("span",{className:"area-count"},"~",s.session_count," sessions")),e.createElement("div",{className:"area-desc"},e.createElement(p,null,s.description))))),e.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"24px",marginBottom:"24px"}},n&&Object.keys(n).length>0&&e.createElement(M,{data:n,title:"What You Wanted",color:"#0ea5e9"}),a&&Object.keys(a).length>0&&e.createElement(M,{data:a,title:"Top Tools Used",color:"#6366f1"})))}function ae({qualitative:t,insights:n}){const{interactionStyle:l}=t;return l?e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-usage",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"How You Use Qwen Code"),e.createElement("div",{className:"narrative"},e.createElement("p",null,e.createElement(p,null,l.narrative)),l.key_pattern&&e.createElement("div",{className:"key-insight"},e.createElement("strong",null,"Key pattern:")," ",e.createElement(p,null,l.key_pattern))),e.createElement(V,{insights:n}),e.createElement(Z,{heatmap:n.heatmap})):null}function se({qualitative:t,primarySuccess:n,outcomes:l}){const r=t==null?void 0:t.impressiveWorkflows;return e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-wins",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"Impressive Things You Did"),(r==null?void 0:r.intro)&&e.createElement("p",{className:"section-intro"},e.createElement(p,null,r.intro)),r&&e.createElement("div",{className:"big-wins"},Array.isArray(r.impressive_workflows)&&r.impressive_workflows.map((a,s)=>e.createElement("div",{key:s,className:"big-win"},e.createElement("div",{className:"big-win-title"},a.title),e.createElement("div",{className:"big-win-desc"},e.createElement(p,null,a.description))))),e.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"24px",marginTop:"24px",marginBottom:"24px"}},n&&Object.keys(n).length>0&&e.createElement(M,{data:n,title:"What Helped Most (Qwen\'s Capabilities)",color:"#3b82f6",allowedKeys:["fast_accurate_search","correct_code_edits","good_explanations","proactive_help","multi_file_changes","good_debugging"]}),l&&Object.keys(l).length>0&&e.createElement(M,{data:l,title:"Outcomes",color:"#8b5cf6",allowedKeys:["fully_achieved","mostly_achieved","partially_achieved","not_achieved","unclear_from_transcript"]})))}function oe(t){return t==="unclear_from_transcript"?"Unclear":t.split("_").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function M({data:t,title:n,color:l="#3b82f6",allowedKeys:r=null}){if(!t||Object.keys(t).length===0)return null;let a=Object.entries(t).filter(([,o])=>Number.isFinite(o)&&o!==0);if(r&&(a=a.filter(([o])=>r.includes(o))),a.sort((o,i)=>i[1]-o[1]),a=a.slice(0,10),a.length===0)return null;const s=Math.max(...a.map(([,o])=>o));return e.createElement("div",{className:"bar-chart-card",style:{flex:1,minWidth:0,backgroundColor:"#ffffff",borderRadius:"12px",padding:"20px",boxShadow:"0 1px 3px rgba(0, 0, 0, 0.08)",border:"1px solid #e2e8f0"}},e.createElement("h3",{style:{fontSize:"13px",fontWeight:700,color:"#64748b",marginTop:0,marginBottom:"16px",textTransform:"uppercase",letterSpacing:"0.5px"}},n),e.createElement("div",{className:"bar-chart",style:{display:"flex",flexDirection:"column",gap:"10px"}},a.map(([o,i])=>{const m=s>0?i/s*100:0;return e.createElement("div",{key:o,className:"bar-row",style:{display:"flex",alignItems:"center",gap:"12px"}},e.createElement("div",{className:"bar-label",style:{width:"130px",fontSize:"13px",color:"#475569",textAlign:"left",flexShrink:0,whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"}},oe(o)),e.createElement("div",{className:"bar-wrapper",style:{flex:1,display:"flex",alignItems:"center",gap:"10px",minWidth:0}},e.createElement("div",{className:"bar-bg",style:{flex:1,height:"8px",backgroundColor:"#f1f5f9",borderRadius:"4px",overflow:"hidden"}},e.createElement("div",{className:"bar-fill",style:{width:`${m}%`,height:"100%",backgroundColor:l,borderRadius:"4px",transition:"width 0.3s ease"}})),e.createElement("span",{className:"bar-value",style:{fontSize:"13px",fontWeight:600,color:"#475569",minWidth:"24px",textAlign:"right"}},i)))})))}function ie({qualitative:t,satisfaction:n,friction:l}){const r=t==null?void 0:t.frictionPoints;return e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-friction",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"Where Things Go Wrong"),(r==null?void 0:r.intro)&&e.createElement("p",{className:"section-intro"},e.createElement(p,null,r.intro)),r&&e.createElement("div",{className:"friction-categories"},Array.isArray(r.categories)&&r.categories.map((a,s)=>e.createElement("div",{key:s,className:"friction-category"},e.createElement("div",{className:"friction-title"},a.category),e.createElement("div",{className:"friction-desc"},e.createElement(p,null,a.description)),Array.isArray(a.examples)&&a.examples.length>0&&e.createElement("ul",{className:"friction-examples"},a.examples.map((o,i)=>e.createElement("li",{key:i},e.createElement(p,null,o))))))),e.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"24px",marginTop:"24px",marginBottom:"24px"}},l&&Object.keys(l).length>0&&e.createElement(M,{data:l,title:"Primary Friction Types",color:"#ef4444",allowedKeys:["misunderstood_request","wrong_approach","buggy_code","user_rejected_action","excessive_changes"]}),n&&Object.keys(n).length>0&&e.createElement(M,{data:n,title:"Inferred Satisfaction (model-estimated)",color:"#10b981",allowedKeys:["happy","satisfied","likely_satisfied","dissatisfied","frustrated"]})))}function me({additions:t}){const[n,l]=e.useState(new Array(t.length).fill(!0)),[r,a]=e.useState(!1),s=m=>{const c=n.map((d,g)=>g===m?!d:d);l(c)},o=()=>{const m=t.filter((c,d)=>n[d]).map(c=>c.addition).join(`\n\n`);m&&navigator.clipboard.writeText(m).then(()=>{a(!0),setTimeout(()=>a(!1),2e3)})},i=n.filter(Boolean).length;return e.createElement("div",{className:"qwen-md-section"},e.createElement("h3",null,"Suggested QWEN.md Additions"),e.createElement("p",{className:"text-xs text-slate-500 mb-3"},"Just copy this into Qwen Code to add it to your QWEN.md."),e.createElement("div",{className:"qwen-md-actions",style:{marginBottom:"12px"}},e.createElement("button",{className:`copy-all-btn ${r?"copied":""}`,onClick:o,disabled:i===0},r?"Copied All!":`Copy All Checked (${i})`)),t.map((m,c)=>e.createElement("div",{key:c,className:"qwen-md-item"},e.createElement("input",{type:"checkbox",checked:n[c],onChange:()=>s(c),className:"cmd-checkbox"}),e.createElement("div",{style:{flex:1}},e.createElement("code",{className:"cmd-code"},m.addition),e.createElement("div",{className:"cmd-why"},e.createElement(p,null,m.why))),e.createElement(H,{text:m.addition}))))}function ce({qualitative:t}){const{improvements:n}=t;if(!n)return null;const l=Array.isArray(n.Qwen_md_additions)&&n.Qwen_md_additions.length>0||Array.isArray(n.features_to_try)&&n.features_to_try.length>0,r=Array.isArray(n.usage_patterns)&&n.usage_patterns.length>0;return!l&&!r?null:e.createElement(e.Fragment,null,l&&e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-features",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"Existing Qwen Code Features to Try"),Array.isArray(n.Qwen_md_additions)&&n.Qwen_md_additions.length>0&&e.createElement(me,{additions:n.Qwen_md_additions}),e.createElement("p",{className:"text-xs text-slate-500 mb-3"},"Just copy this into Qwen Code and it\'ll set it up for you."),e.createElement("div",{className:"features-section"},Array.isArray(n.features_to_try)&&n.features_to_try.map((a,s)=>e.createElement("div",{key:s,className:"feature-card"},e.createElement("div",{className:"feature-title"},a.feature),e.createElement("div",{className:"feature-oneliner"},e.createElement(p,null,a.one_liner)),e.createElement("div",{className:"feature-why"},e.createElement("strong",null,"Why for you:")," ",e.createElement(p,null,a.why_for_you)),e.createElement("div",{className:"feature-examples"},e.createElement("div",{className:"feature-example"},e.createElement("div",{className:"example-code-row"},e.createElement("code",{className:"example-code"},a.example_code),e.createElement(H,{text:a.example_code})))))))),r&&e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-patterns",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"New Ways to Use Qwen Code"),e.createElement("p",{className:"text-xs text-slate-500 mb-3"},"Just copy this into Qwen Code and it\'ll walk you through it."),e.createElement("div",{className:"patterns-section"},Array.isArray(n.usage_patterns)&&n.usage_patterns.map((a,s)=>e.createElement("div",{key:s,className:"pattern-card"},e.createElement("div",{className:"pattern-title"},a.title),e.createElement("div",{className:"pattern-summary"},e.createElement(p,null,a.suggestion)),e.createElement("div",{className:"pattern-detail"},e.createElement(p,null,a.detail)),e.createElement("div",{className:"copyable-prompt-section"},e.createElement("div",{className:"prompt-label"},"Paste into Qwen Code:"),e.createElement("div",{className:"copyable-prompt-row"},e.createElement("code",{className:"copyable-prompt"},a.copyable_prompt),e.createElement(H,{text:a.copyable_prompt}))))))))}function de({qualitative:t}){const{futureOpportunities:n}=t;return n?e.createElement(e.Fragment,null,e.createElement("h2",{id:"section-horizon",className:"text-xl font-semibold text-slate-900 mt-8 mb-4"},"On the Horizon"),n.intro&&e.createElement("p",{className:"section-intro"},e.createElement(p,null,n.intro)),e.createElement("div",{className:"horizon-section"},Array.isArray(n.opportunities)&&n.opportunities.map((l,r)=>e.createElement("div",{key:r,className:"horizon-card"},e.createElement("div",{className:"horizon-title"},l.title),e.createElement("div",{className:"horizon-possible"},e.createElement(p,null,l.whats_possible)),e.createElement("div",{className:"horizon-tip"},e.createElement("strong",null,"Getting started:")," ",e.createElement(p,null,l.how_to_try)),e.createElement("div",{className:"pattern-prompt"},e.createElement("div",{className:"prompt-label"},"Paste into Qwen Code:"),e.createElement("div",{style:{display:"flex",alignItems:"flex-start",gap:"8px"}},e.createElement("code",{style:{flex:1}},l.copyable_prompt),e.createElement(H,{text:l.copyable_prompt}))))))):null}function pe({qualitative:t}){const{memorableMoment:n}=t;return n?e.createElement("div",{className:"fun-ending"},e.createElement("div",{className:"fun-headline"},\'"\',n.headline,\'"\'),e.createElement("div",{className:"fun-detail"},e.createElement(p,null,n.detail))):null}const ue={light:{background:"linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%)",textPrimary:"#0f172a",textSecondary:"#475569",textMuted:"#64748b",cardBackground:"rgba(255,255,255,0.7)",cardBackgroundSecondary:"rgba(255,255,255,0.5)",borderColor:"#e2e8f0",heatmapColors:["#9be9a8","#40c463","#30a14e","#216e39"],heatmapEmpty:"#ebedf0"},dark:{background:"linear-gradient(135deg, #0f172a 0%, #1e293b 100%)",textPrimary:"#f8fafc",textSecondary:"#e2e8f0",textMuted:"#94a3b8",cardBackground:"rgba(255,255,255,0.05)",cardBackgroundSecondary:"rgba(255,255,255,0.04)",borderColor:"rgba(255,255,255,0.08)",heatmapColors:["#0e4429","#006d32","#26a641","#39d353"],heatmapEmpty:"#2d333b"}};function fe({data:t,theme:n="light"}){var h,T,u,f,C,_;const l=ue[n],{totalMessages:r=0,totalSessions:a=0,totalLinesAdded:s=0,totalLinesRemoved:o=0,totalFiles:i=0,currentStreak:m=0,longestStreak:c=0,activeHours:d={}}=t,g=Object.keys(t.heatmap||{});let E=0,x="";if(g.length>0){E=g.length;const v=g.map(S=>Y(S).getTime()),N=new Date(Math.min(...v)),q=new Date(Math.max(...v)),k=S=>D(S);x=`${k(N)} \u2014 ${k(q)}`}const A=(u=(T=(h=t.qualitative)==null?void 0:h.interactionStyle)==null?void 0:T.key_pattern)!=null?u:null,w=(_=(C=(f=t.qualitative)==null?void 0:f.memorableMoment)==null?void 0:C.headline)!=null?_:null,j=ge(t.heatmap||{},l);return e.createElement("div",{id:"share-card",style:{width:"1200px",background:l.background,color:l.textPrimary,fontFamily:\'ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"\',display:"flex",flexDirection:"column",padding:"48px 56px",position:"absolute",left:"-9999px",top:"-9999px",overflow:"hidden",boxSizing:"border-box"}},e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"32px"}},e.createElement("div",null,e.createElement("div",{style:{fontSize:"32px",fontWeight:700,letterSpacing:"-0.02em",lineHeight:1.2}},"Qwen Code Insights"),e.createElement("div",{style:{fontSize:"14px",color:l.textMuted,marginTop:"6px"}},x)),e.createElement("div",{style:{fontSize:"11px",color:l.textMuted,textTransform:"uppercase",letterSpacing:"0.15em",paddingTop:"8px"}},"qwen.ai")),e.createElement("div",{style:{display:"grid",gridTemplateColumns:"repeat(6, 1fr)",gap:"16px",marginBottom:"32px"}},e.createElement(z,{value:String(r),label:"Messages",theme:l}),e.createElement(z,{value:String(a),label:"Sessions",theme:l}),e.createElement(z,{value:`+${s}/-${o}`,label:"Lines Changed",small:!0,theme:l}),e.createElement(z,{value:String(i),label:"Files",theme:l}),e.createElement(z,{value:`${m}d`,label:"Streak",theme:l}),e.createElement(z,{value:`${c}d`,label:"Best Streak",theme:l})),e.createElement("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:"24px",marginBottom:"16px"}},e.createElement("div",{style:{background:l.cardBackground,borderRadius:"12px",padding:"20px",display:"flex",flexDirection:"column"}},e.createElement("div",{style:{fontSize:"12px",fontWeight:600,color:l.textMuted,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"12px"}},"Activity \xB7 ",E," active days"),e.createElement("div",{style:{flex:1,display:"flex",alignItems:"center",justifyContent:"center"}},e.createElement(xe,{cells:j})),e.createElement(Ee,{theme:l})),e.createElement("div",{style:{display:"flex",flexDirection:"column",gap:"16px"}},e.createElement("div",{style:{background:l.cardBackground,borderRadius:"12px",padding:"20px",display:"flex",flexDirection:"column"}},e.createElement("div",{style:{fontSize:"12px",fontWeight:600,color:l.textMuted,textTransform:"uppercase",letterSpacing:"0.08em",marginBottom:"12px"}},"Active Hours"),e.createElement("div",{style:{flex:1,display:"flex",flexDirection:"column",justifyContent:"center",gap:"10px"}},e.createElement(he,{activeHours:d,theme:l}))),e.createElement("div",{style:{background:l.cardBackgroundSecondary,borderRadius:"12px",padding:"16px 16px",position:"relative"}},e.createElement("div",{style:{position:"absolute",left:"12px",fontSize:"64px",fontWeight:700,color:n==="light"?"rgba(99,102,241,0.15)":"rgba(99,102,241,0.2)",lineHeight:1,fontFamily:\'Georgia, "Times New Roman", serif\',userSelect:"none",pointerEvents:"none"}},"\u201C"),e.createElement("div",{style:{paddingLeft:"40px",position:"relative"}},A&&e.createElement("div",{style:{fontSize:"13px",color:l.textSecondary,lineHeight:1.6,marginBottom:w?"8px":0}},A),w&&e.createElement("div",{style:{fontSize:"12px",color:l.textMuted,lineHeight:1.5,fontStyle:"italic"}},w))))),e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginTop:"auto",paddingTop:"24px",borderTop:`1px solid ${l.borderColor}`,flexShrink:0}},e.createElement("div",{style:{fontSize:"12px",color:l.textMuted}},"Generated by Qwen Code \xB7 ",D(new Date)),e.createElement("div",{style:{fontSize:"12px",color:l.textMuted}},"github.com/QwenLM/qwen-code")))}function z({value:t,label:n,small:l,theme:r}){return e.createElement("div",{style:{textAlign:"center"}},e.createElement("div",{style:{fontSize:l?"18px":"28px",fontWeight:700,color:r.textPrimary,lineHeight:1.2}},t),e.createElement("div",{style:{fontSize:"11px",color:r.textMuted,textTransform:"uppercase",letterSpacing:"0.05em",marginTop:"4px"}},n))}function he({activeHours:t,theme:n}){const r=[{label:"Morning",time:"06\u201312",hours:[6,7,8,9,10,11],color:"#fbbf24"},{label:"Afternoon",time:"12\u201318",hours:[12,13,14,15,16,17],color:"#0ea5e9"},{label:"Evening",time:"18\u201322",hours:[18,19,20,21],color:"#6366f1"},{label:"Night",time:"22\u201306",hours:[22,23,0,1,2,3,4,5],color:"#475569"}].map(s=>({...s,total:s.hours.reduce((o,i)=>o+(t[i]||0),0)})),a=Math.max(...r.map(s=>s.total),1);return e.createElement(e.Fragment,null,r.map(s=>{const o=a>0?s.total/a*100:0;return e.createElement("div",{key:s.label},e.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"12px",marginBottom:"4px"}},e.createElement("div",{style:{display:"flex",alignItems:"center",gap:"6px"}},e.createElement("span",{style:{width:"8px",height:"8px",borderRadius:"50%",backgroundColor:s.color,display:"inline-block",flexShrink:0}}),e.createElement("span",{style:{color:n.textSecondary,fontWeight:500}},s.label),e.createElement("span",{style:{color:n.textMuted,fontSize:"11px"}},s.time)),e.createElement("span",{style:{color:n.textMuted,fontWeight:600}},s.total)),e.createElement("div",{style:{height:"6px",background:n.borderColor,borderRadius:"3px",overflow:"hidden"}},e.createElement("div",{style:{width:`${o}%`,height:"100%",backgroundColor:s.color,borderRadius:"3px"}})))}))}function ge(t,n){const l=new Date,a=26*7,s=new Date(l);s.setDate(s.getDate()-a+1),s.setDate(s.getDate()-s.getDay());const o=[],i=new Date(l);i.setDate(i.getDate()+(6-i.getDay()));const m=new Date(s);for(;m<=i;){const c=D(m),d=t[c]||0;o.push({color:ye(d,n)}),m.setDate(m.getDate()+1)}return o}function ye(t,n){return t===0?n.heatmapEmpty:t<2?n.heatmapColors[0]:t<4?n.heatmapColors[1]:t<10?n.heatmapColors[2]:n.heatmapColors[3]}function xe({cells:t}){const l=Math.ceil(t.length/7),r=14,a=3,s=l*(r+a),o=7*(r+a);return e.createElement("svg",{width:s,height:o,viewBox:`0 0 ${s} ${o}`},t.map((i,m)=>{const c=Math.floor(m/7),d=m%7;return e.createElement("rect",{key:m,x:c*(r+a),y:d*(r+a),width:r,height:r,rx:2,fill:i.color})}))}function Ee({theme:t}){return e.createElement("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"12px"}},e.createElement("span",{style:{fontSize:"11px",color:t.textMuted}},"Less"),[t.heatmapEmpty,t.heatmapColors[0],t.heatmapColors[1],t.heatmapColors[2],t.heatmapColors[3]].map((n,l)=>e.createElement("span",{key:l,style:{width:"10px",height:"10px",borderRadius:"2px",backgroundColor:n,display:"inline-block"}})),e.createElement("span",{style:{fontSize:"11px",color:t.textMuted}},"More"))}function b(t){return typeof t=="string"?t.trim().length>0:typeof t=="number"?Number.isFinite(t)&&t!==0:typeof t=="boolean"?t:Array.isArray(t)?t.some(n=>b(n)):t&&typeof t=="object"?Object.values(t).some(n=>b(n)):!1}function W(t){return Array.isArray(t)?t.some(([,n])=>Number.isFinite(n)&&n!==0):!!t&&Object.values(t).some(n=>Number.isFinite(n)&&n!==0)}function $(t){return Array.isArray(t)&&t.some(n=>b(n))}function ve({data:t}){var u,f,C,_,v,N,q,k,S,I,K,U;const[n,l]=e.useState("dark"),r=e.useRef(!1),a=async()=>{const F=document.getElementById("share-card");if(!F||!window.html2canvas){alert("Export functionality is not available.");return}try{const y=F.cloneNode(!0);y.style.position="fixed",y.style.left="-9999px",y.style.top="0",y.style.pointerEvents="none",document.body.appendChild(y);const P=await window.html2canvas(y,{scale:2,useCORS:!0,logging:!1,width:1200,height:y.scrollHeight});document.body.removeChild(y);const G=P.toDataURL("image/png"),L=document.createElement("a");L.href=G,L.download=`qwen-insights-card-${D(new Date)}.png`,L.click()}catch(y){console.error("Export card error:",y),alert("Failed to export card. Please try again.")}};e.useEffect(()=>{r.current&&(r.current=!1,a())},[n]);const s=F=>{F===n?a():(r.current=!0,l(F))};if(!t)return e.createElement("div",{className:"text-center text-slate-600"},"No insight data available");const o=Object.keys(t.heatmap||{});let i="";if(o.length>0){const y=o.map(B=>Y(B)).map(B=>B.getTime()),P=new Date(Math.min(...y)),G=new Date(Math.max(...y)),L=B=>D(B);i=`${L(P)} to ${L(G)}`}const m=b((u=t.qualitative)==null?void 0:u.atAGlance),c=!!t.qualitative&&(b(t.qualitative.projectAreas)||W(t.topGoals)||W(t.topTools)),d=b((f=t.qualitative)==null?void 0:f.interactionStyle),g=!!t.qualitative&&(b(t.qualitative.impressiveWorkflows)||W(t.primarySuccess)||W(t.outcomes)),E=!!t.qualitative&&(b(t.qualitative.frictionPoints)||W(t.satisfaction)||W(t.friction)),x=!!t.qualitative&&($((C=t.qualitative.improvements)==null?void 0:C.Qwen_md_additions)||$((_=t.qualitative.improvements)==null?void 0:_.features_to_try)),A=!!t.qualitative&&$((v=t.qualitative.improvements)==null?void 0:v.usage_patterns),w=b((N=t.qualitative)==null?void 0:N.futureOpportunities),j=b((q=t.qualitative)==null?void 0:q.memorableMoment),h=[];c&&h.push({href:"#section-work",label:"What You Work On"}),d&&h.push({href:"#section-usage",label:"How You Use Qwen Code"}),g&&h.push({href:"#section-wins",label:"Impressive Things"}),E&&h.push({href:"#section-friction",label:"Where Things Go Wrong"}),x&&h.push({href:"#section-features",label:"Features to Try"}),A&&h.push({href:"#section-patterns",label:"New Usage Patterns"}),w&&h.push({href:"#section-horizon",label:"On the Horizon"});const T={wins:g,friction:E,features:x,horizon:w};return e.createElement("div",null,e.createElement("header",{className:"insights-header"},e.createElement("div",{className:"header-content"},e.createElement("div",{className:"header-title-section"},e.createElement("h1",{className:"header-title"},"Qwen Code Insights"),e.createElement("p",{className:"header-subtitle"},t.totalMessages?`${t.totalMessages.toLocaleString()} messages across ${(k=t.totalSessions)==null?void 0:k.toLocaleString()} sessions`:"Your personalized coding journey and patterns",i&&` \xB7 ${i}`)),e.createElement(be,{onExport:s}))),m&&t.qualitative&&e.createElement(ne,{qualitative:t.qualitative,targetSections:T}),h.length>0&&e.createElement(le,{sections:h}),e.createElement(J,{data:t}),c&&t.qualitative&&e.createElement(re,{qualitative:t.qualitative,topGoals:t.topGoals,topTools:t.topTools}),d&&t.qualitative&&e.createElement(ae,{qualitative:t.qualitative,insights:t}),g&&e.createElement(se,{qualitative:t.qualitative,primarySuccess:(S=t.primarySuccess)!=null?S:{},outcomes:(I=t.outcomes)!=null?I:{}}),E&&e.createElement(ie,{qualitative:t.qualitative,satisfaction:(K=t.satisfaction)!=null?K:{},friction:(U=t.friction)!=null?U:{}}),(x||A)&&t.qualitative&&e.createElement(ce,{qualitative:t.qualitative}),w&&t.qualitative&&e.createElement(de,{qualitative:t.qualitative}),j&&t.qualitative&&e.createElement(pe,{qualitative:t.qualitative}),e.createElement(fe,{data:t,theme:n}))}function be({onExport:t}){const[n,l]=e.useState(!1),r=e.useRef(null);e.useEffect(()=>{if(!n)return;const s=o=>{r.current&&!r.current.contains(o.target)&&l(!1)};return document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[n]);const a=s=>{l(!1),t(s)};return e.createElement("div",{className:"export-dropdown-wrapper",ref:r},e.createElement("button",{className:"export-card-btn",onClick:()=>l(!n)},e.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8"}),e.createElement("polyline",{points:"16 6 12 2 8 6"}),e.createElement("line",{x1:"12",y1:"2",x2:"12",y2:"15"})),e.createElement("span",null,"Export Card"),e.createElement("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:`export-chevron ${n?"open":""}`},e.createElement("polyline",{points:"6 9 12 15 18 9"}))),n&&e.createElement("div",{className:"export-dropdown"},e.createElement("button",{className:"export-dropdown-item",onClick:()=>a("light")},e.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("circle",{cx:"12",cy:"12",r:"5"}),e.createElement("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),e.createElement("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),e.createElement("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),e.createElement("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),e.createElement("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),e.createElement("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),e.createElement("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),e.createElement("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})),e.createElement("span",null,"Light Theme")),e.createElement("button",{className:"export-dropdown-item",onClick:()=>a("dark")},e.createElement("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},e.createElement("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})),e.createElement("span",null,"Dark Theme"))))}const Q=document.getElementById("react-root");Q&&window.INSIGHT_DATA&&O?O.createRoot(Q).render(e.createElement(ve,{data:window.INSIGHT_DATA})):console.error("Failed to mount React app:",{container:!!Q,data:!!window.INSIGHT_DATA,ReactDOM:!!O})})(React,ReactDOM);';
3221
3560
  var INSIGHT_CSS = '*,:before,:after,::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: #3b82f680;--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border:0 solid #e5e7eb}:before,:after{--tw-content: ""}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";line-height:1.5}body{line-height:inherit;margin:0;background-image:linear-gradient(to bottom right,var(--tw-gradient-stops));--tw-gradient-from: #f8fafc var(--tw-gradient-from-position);--tw-gradient-to: #f1f5f9 var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #fff var(--tw-gradient-via-position), var(--tw-gradient-to);--tw-text-opacity: 1;min-height:100vh;color:rgb(15 23 42 / var(--tw-text-opacity, 1));-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.glass-card{--tw-border-opacity: 1;border-width:1px;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1));--tw-shadow: 0 10px 40px #0f172a14;--tw-shadow-colored: 0 10px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow);--tw-backdrop-blur: blur(8px);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);background-color:#fff9;border-radius:1rem}.col-span-2{grid-column:span 2 / span 2}.mx-auto{margin-left:auto;margin-right:auto}.mb-8{margin-bottom:2rem}.ml-2{margin-left:.5rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.grid{display:grid}.h-56{height:14rem}.h-full{height:100%}.min-h-screen{min-height:100vh}.w-full{width:100%}.min-w-\\[720px\\]{min-width:720px}.max-w-6xl{max-width:72rem}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.flex-col{flex-direction:column}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.divide-slate-200>:not([hidden])~:not([hidden]){--tw-divide-opacity: 1;border-color:rgb(226 232 240 / var(--tw-divide-opacity, 1))}.overflow-x-auto{overflow-x:auto}.rounded-full{border-radius:9999px}.rounded-xl{border-radius:1.25rem}.border{border-width:1px}.border-slate-100{--tw-border-opacity: 1;border-color:rgb(241 245 249 / var(--tw-border-opacity, 1))}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-900{--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.bg-white\\/70{background-color:#ffffff73}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.from-slate-50{--tw-gradient-from: #f8fafc var(--tw-gradient-from-position);--tw-gradient-to: #f8fafc00 var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-white{--tw-gradient-to: #ffffff00 var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), #ffffff var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-slate-100{--tw-gradient-to: #f1f5f9 var(--tw-gradient-to-position)}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-4{padding-left:1rem;padding-right:1rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tracking-\\[0\\.2em\\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-rose-700{--tw-text-opacity: 1;color:rgb(190 18 60 / var(--tw-text-opacity, 1))}.text-slate-200{--tw-text-opacity: 1;color:rgb(226 232 240 / var(--tw-text-opacity, 1))}.text-slate-400{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.shadow-inner{--tw-shadow: inset 0 2px 4px 0 #0000000d;--tw-shadow-colored: inset 0 2px 4px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-soft{--tw-shadow: 0 10px 40px #0f172a14;--tw-shadow-colored: 0 10px 40px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-slate-100{--tw-shadow-color: #f1f5f9;--tw-shadow: var(--tw-shadow-colored)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.hover\\:-translate-y-\\[1px\\]:hover{--tw-translate-y: -1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.hover\\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px #0000001a, 0 4px 6px -4px #0000001a;--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus-visible\\:outline:focus-visible{outline-style:solid}.focus-visible\\:outline-2:focus-visible{outline-width:2px}.focus-visible\\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\\:outline-slate-400:focus-visible{outline-color:#94a3b8}.active\\:translate-y-\\[1px\\]:active{--tw-translate-y: 1px;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.group:hover .group-hover\\:translate-x-0\\.5{--tw-translate-x: .125rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@media (min-width: 768px){.md\\:mt-6{margin-top:1.5rem}.md\\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.md\\:gap-6{gap:1.5rem}.md\\:py-12{padding-top:3rem;padding-bottom:3rem}.md\\:text-4xl{font-size:2.25rem;line-height:2.5rem}}.heatmap-container{width:100%;overflow-x:auto}.heatmap-svg{min-width:720px}.heatmap-day{cursor:pointer}.heatmap-day:hover{stroke:#00000024;stroke-width:1px}.heatmap-legend{display:flex;align-items:center;gap:4px;font-size:12px;color:#64748b;margin-top:8px}.heatmap-legend-item{width:10px;height:10px;border-radius:2px}.nav-toc{display:flex;flex-wrap:wrap;gap:8px;margin:24px 0 32px;padding:16px;background:#fff;border-radius:8px;border:1px solid #e2e8f0}.nav-toc a{font-size:12px;color:#64748b;text-decoration:none;padding:6px 12px;border-radius:6px;background:#f1f5f9;transition:all .15s}.nav-toc a:hover{background:#e2e8f0;color:#334155}.at-a-glance{background:linear-gradient(135deg,#fef3c7,#fde68a);border:1px solid #f59e0b;border-radius:12px;padding:20px 24px;margin-bottom:32px}.glance-title{font-size:16px;font-weight:700;color:#92400e;margin-bottom:16px}.glance-sections{display:flex;flex-direction:column;gap:12px}.glance-section{font-size:14px;color:#78350f;line-height:1.6}.glance-section strong{color:#92400e;font-weight:700}.see-more{color:#b45309;text-decoration:none;font-size:13px;white-space:nowrap;margin-left:4px}.see-more:hover{text-decoration:underline}.project-areas{display:flex;flex-direction:column;gap:12px;margin-bottom:32px}.project-area{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:16px}.area-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:8px}.area-name{font-weight:600;font-size:15px;color:#0f172a}.area-count{font-size:12px;color:#64748b;background:#f1f5f9;padding:2px 8px;border-radius:4px}.area-desc{font-size:14px;color:#475569;line-height:1.5}.narrative{background:#fff;border:1px solid #e2e8f0;border-radius:8px;padding:20px;margin-bottom:24px}.narrative p{margin-top:0;margin-bottom:12px;font-size:14px;color:#475569;line-height:1.7}.key-insight{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;padding:12px 16px;margin-top:12px;font-size:14px;color:#166534}.section-intro{font-size:14px;color:#64748b;margin-bottom:16px}.big-wins{display:flex;flex-direction:column;gap:12px;margin-bottom:24px}.big-win{background:#f0fdf4;border:1px solid #bbf7d0;border-radius:8px;padding:16px}.big-win-title{font-weight:600;font-size:15px;color:#166534;margin-bottom:8px}.big-win-desc{font-size:14px;color:#15803d;line-height:1.5}.friction-categories{display:flex;flex-direction:column;gap:16px;margin-bottom:24px}.friction-category{background:#fef2f2;border:1px solid #fca5a5;border-radius:8px;padding:16px}.friction-title{font-weight:600;font-size:15px;color:#991b1b;margin-bottom:6px}.friction-desc{font-size:13px;color:#7f1d1d;margin-bottom:10px}.friction-examples{margin:0 0 0 10px;padding:0;font-size:13px;color:#334155;list-style-type:disc}.friction-examples li{margin-bottom:4px}.qwen-md-section{background:#eff6ff;border:1px solid #bfdbfe;border-radius:8px;padding:12px;margin-bottom:20px}.qwen-md-section h3{font-size:13px;font-weight:600;color:#1e40af;margin:0 0 8px}.qwen-md-actions{margin-bottom:8px;padding-bottom:8px;border-bottom:1px solid #dbeafe}.copy-all-btn{background:#2563eb;color:#fff;border:none;border-radius:4px;padding:4px 10px;font-size:11px;cursor:pointer;font-weight:500;transition:all .2s}.copy-all-btn:hover{background:#1d4ed8}.copy-all-btn.copied{background:#16a34a}.qwen-md-item{display:flex;flex-wrap:wrap;align-items:flex-start;gap:8px;padding:8px 0;border-bottom:1px solid #dbeafe}.qwen-md-item:last-child{border-bottom:none}.cmd-checkbox{margin-top:2px}.cmd-code{background:#fff;padding:6px 10px;border-radius:4px;font-size:11px;color:#1e40af;border:1px solid #bfdbfe;font-family:monospace;display:block;white-space:pre-wrap;word-break:break-word;flex:1}.cmd-why{font-size:11px;color:#64748b;width:100%;padding-left:20px;margin-top:4px}.features-section,.patterns-section{display:flex;flex-direction:column;gap:12px;margin:16px 0}.feature-card{background:#f0fdf4;border:1px solid #86efac;border-radius:8px;padding:16px}.pattern-card{background:#f0f9ff;border:1px solid #7dd3fc;border-radius:8px;padding:16px}.feature-title,.pattern-title{font-weight:600;font-size:15px;color:#0f172a;margin-bottom:6px}.feature-oneliner,.pattern-summary{font-size:14px;color:#475569;margin-bottom:8px}.feature-why,.pattern-detail{font-size:13px;color:#334155;line-height:1.5}.feature-examples{margin-top:12px}.feature-example{padding:8px 0;border-top:1px solid #d1fae5}.feature-example:first-child{border-top:none}.example-code-row,.copyable-prompt-row{display:flex;align-items:flex-start;gap:8px}.example-code{flex:1;background:#f1f5f9;padding:8px 12px;border-radius:4px;font-family:monospace;font-size:12px;color:#334155;overflow-x:auto;white-space:pre-wrap}.copyable-prompt-section{margin-top:12px;padding-top:12px;border-top:1px solid #e2e8f0}.copyable-prompt{flex:1;background:#f8fafc;padding:10px 12px;border-radius:4px;font-family:monospace;font-size:12px;color:#334155;border:1px solid #e2e8f0;white-space:pre-wrap;line-height:1.5}.prompt-label{font-size:11px;font-weight:600;text-transform:uppercase;color:#64748b;margin-bottom:6px}.copy-btn{background:#e2e8f0;border:none;border-radius:4px;padding:4px 8px;font-size:11px;cursor:pointer;color:#475569;flex-shrink:0;transition:all .2s}.copy-btn:hover{background:#cbd5e1}.horizon-section{display:flex;flex-direction:column;gap:16px}.horizon-card{background:linear-gradient(135deg,#faf5ff,#f5f3ff);border:1px solid #c4b5fd;border-radius:8px;padding:16px}.horizon-title{font-weight:600;font-size:15px;color:#5b21b6;margin-bottom:8px}.horizon-possible{font-size:14px;color:#334155;margin-bottom:10px;line-height:1.5}.horizon-tip{font-size:13px;color:#6b21a8;background:#fff9;padding:8px 12px;border-radius:4px}.pattern-prompt{background:#f8fafc;padding:12px;border-radius:6px;margin-top:12px;border:1px solid #e2e8f0;display:flex;flex-direction:column;gap:8px}.pattern-prompt code{font-family:monospace;font-size:12px;color:#334155;display:block;white-space:pre-wrap}.fun-ending{background:linear-gradient(135deg,#fef3c7,#fde68a);border:1px solid #fbbf24;border-radius:12px;padding:24px;margin-top:40px;text-align:center}.fun-headline{font-size:18px;font-weight:600;color:#78350f;margin-bottom:8px}.fun-detail{font-size:14px;color:#92400e}.stats-row{display:flex;gap:24px;margin-bottom:40px;padding:20px 0;border-top:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;flex-wrap:wrap}.stat{text-align:center}.stat-value{font-size:24px;font-weight:700;color:#0f172a}.stat-label{font-size:11px;color:#64748b;text-transform:uppercase}@media (max-width: 640px){.stats-row{justify-content:center}}.header-with-action{position:relative}.insights-header{margin-bottom:2rem;padding:1.5rem 0;border-bottom:1px solid #e2e8f0}.header-content{display:flex;justify-content:space-between;align-items:center;gap:1.5rem;flex-wrap:wrap}.header-title-section{flex:1;min-width:0}.header-title{font-size:1.75rem;font-weight:700;color:#0f172a;letter-spacing:-.02em;margin:0 0 .375rem;line-height:1.2}.header-subtitle{font-size:.875rem;color:#64748b;margin:0;font-weight:400}.export-dropdown-wrapper{position:relative}.export-card-btn{display:inline-flex;align-items:center;gap:.5rem;height:36px;padding:0 .875rem;border:1px solid #e2e8f0;border-radius:8px;background:#fff;color:#334155;font-size:.8125rem;font-weight:500;cursor:pointer;transition:all .15s ease}.export-card-btn:hover{background:#f8fafc;border-color:#cbd5e1}.export-card-btn:active{background:#f1f5f9}.export-chevron{transition:transform .15s ease;opacity:.5}.export-chevron.open{transform:rotate(180deg)}.export-dropdown{position:absolute;top:calc(100% + 4px);right:0;min-width:160px;background:#fff;border:1px solid #e2e8f0;border-radius:8px;box-shadow:0 4px 16px #00000014;padding:4px;z-index:50}.export-dropdown-item{display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .75rem;border:none;border-radius:6px;background:none;color:#334155;font-size:.8125rem;font-weight:400;cursor:pointer;transition:background .1s ease}.export-dropdown-item:hover{background:#f1f5f9}.export-dropdown-item:active{background:#e2e8f0}@media (max-width: 640px){.header-content{flex-direction:column;align-items:flex-start;gap:1rem}.header-title{font-size:1.5rem}}';
3222
3561
 
3223
3562
  // packages/web-templates/src/generated/exportHtmlTemplate.ts
@@ -3386,6 +3725,11 @@ export {
3386
3725
  * Copyright 2025 Qwen Team
3387
3726
  * SPDX-License-Identifier: Apache-2.0
3388
3727
  */
3728
+ /**
3729
+ * @license
3730
+ * Copyright 2025 Qwen Code
3731
+ * SPDX-License-Identifier: Apache-2.0
3732
+ */
3389
3733
  /**
3390
3734
  * @license
3391
3735
  * Copyright 2025 Qwen