@qwen-code/qwen-code 0.23.3-nightly.20260910.c46cb85cf2 → 0.23.3

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 (290) hide show
  1. package/bundled/goal-draft/SKILL.md +2 -2
  2. package/bundled/qc-helper/docs/features/channels/dingtalk.md +20 -0
  3. package/bundled/qc-helper/docs/features/channels/overview.md +6 -5
  4. package/bundled/qc-helper/docs/features/goals.md +2 -2
  5. package/bundled/qc-helper/docs/features/hooks.md +13 -14
  6. package/bundled/qc-helper/docs/qwen-serve.md +3 -7
  7. package/chunks/{MaxSizedBox-UZW24XUX.js → MaxSizedBox-D4LW7RZZ.js} +15 -15
  8. package/chunks/{StandaloneSessionPicker-IDK7NAZL.js → StandaloneSessionPicker-ALTTRWUP.js} +33 -33
  9. package/chunks/{acp-startup-profiler-ARO4II44.js → acp-startup-profiler-KEU6VAYR.js} +2 -2
  10. package/chunks/{acp-subagent-executor-7TLJGISS.js → acp-subagent-executor-LEUN3N7N.js} +15 -15
  11. package/chunks/{acpAgent-YRCNNIIU.js → acpAgent-BBSW7XZG.js} +68 -258
  12. package/chunks/{agent-SGU5EE7U.js → agent-SQ6OY3QD.js} +9 -9
  13. package/chunks/{agent-headless-JVYBLNLT.js → agent-headless-RI2THRQ7.js} +9 -9
  14. package/chunks/{anthropicContentGenerator-SGIR5IKF.js → anthropicContentGenerator-JSKMKS6V.js} +2 -2
  15. package/chunks/{bridge-YF6NYRPZ.js → bridge-DAFMI72L.js} +17 -17
  16. package/chunks/{ca-MX3WCEEG.js → ca-KC2AISNS.js} +1 -1
  17. package/chunks/{channel-management-service-E4HTMU7T.js → channel-management-service-OWDXVL7R.js} +5 -5
  18. package/chunks/{channel-settings-store-FZ5VKHQD.js → channel-settings-store-4I6JONT7.js} +25 -25
  19. package/chunks/{channel-worker-group-X6WH4XWF.js → channel-worker-group-F2ZZMLNS.js} +6 -6
  20. package/chunks/{channel-worker-manager-SICFJDPJ.js → channel-worker-manager-2SZLJJSJ.js} +6 -6
  21. package/chunks/{channel-worker-supervisor-HSFAKML6.js → channel-worker-supervisor-ZFNWMG6D.js} +4 -4
  22. package/chunks/{chunk-NVIBH7WS.js → chunk-2ALXPGB4.js} +1 -1
  23. package/chunks/{chunk-UBEYS536.js → chunk-2PJRI3EH.js} +3 -3
  24. package/chunks/{chunk-GP47UR3M.js → chunk-2ZN3O5FT.js} +6 -6
  25. package/chunks/{chunk-BI3WSRQE.js → chunk-3BTSSIJO.js} +3 -3
  26. package/chunks/{chunk-PIGUW2U2.js → chunk-3KQBQ6FM.js} +2 -14
  27. package/chunks/{chunk-RJZTX2OF.js → chunk-3UXUOFO6.js} +6 -6
  28. package/chunks/{chunk-HL2DQG3Y.js → chunk-3XLK2QMY.js} +10 -10
  29. package/chunks/{chunk-L3DTX6U4.js → chunk-4ALNJDHL.js} +1 -3
  30. package/chunks/{chunk-KHIBLKNK.js → chunk-53GWJOLP.js} +1 -1
  31. package/chunks/{chunk-LIR7YS2O.js → chunk-5KI7ZDTB.js} +4 -4
  32. package/chunks/{chunk-ZT6EPPBY.js → chunk-6JACAGYH.js} +1 -1
  33. package/chunks/{chunk-DMX7RF6E.js → chunk-6W4HBUA2.js} +1 -1
  34. package/chunks/{chunk-CSHX5ZC4.js → chunk-76RGWKLS.js} +1 -1
  35. package/chunks/{chunk-J5PYQVD2.js → chunk-7APZIRH3.js} +2 -2
  36. package/chunks/{chunk-OOLSYRZ7.js → chunk-7BXXIQG4.js} +4 -4
  37. package/chunks/{chunk-WY4N6KS7.js → chunk-7ICHPMBQ.js} +3 -3
  38. package/chunks/{chunk-KZ2CU2LH.js → chunk-7Q2AXRDJ.js} +1 -1
  39. package/chunks/{chunk-C4NLHK7X.js → chunk-7QYWGTHB.js} +128 -33
  40. package/chunks/{chunk-7XM6KEVW.js → chunk-AC6KDLH3.js} +1 -1
  41. package/chunks/{chunk-GDWE23OR.js → chunk-ALMR3E6Q.js} +3 -3
  42. package/chunks/{chunk-B6BDT4RX.js → chunk-AXTFYDXT.js} +1 -1
  43. package/chunks/{chunk-6EDWSKN4.js → chunk-BV6Q5HMY.js} +2 -2
  44. package/chunks/{chunk-3VPFA6L2.js → chunk-BWAMMKIS.js} +2 -2
  45. package/chunks/{chunk-IFHJIEMN.js → chunk-BWQLXU37.js} +10 -10
  46. package/chunks/{chunk-F2RKL5I2.js → chunk-BZM5U74J.js} +3 -3
  47. package/chunks/{chunk-JOMCZWX7.js → chunk-CUEXOHQH.js} +15 -9
  48. package/chunks/{chunk-CAAMI77K.js → chunk-CXTPVBFA.js} +1 -1
  49. package/chunks/{chunk-ATH66AEU.js → chunk-DAWWT2ID.js} +16 -16
  50. package/chunks/{chunk-MXOALJIL.js → chunk-DT75RKNH.js} +1 -1
  51. package/chunks/{chunk-BHR6IN2X.js → chunk-DYFOSJHU.js} +30 -30
  52. package/chunks/{chunk-KVBNJ4K2.js → chunk-E7LB57MB.js} +2 -2
  53. package/chunks/{chunk-XDQUDARC.js → chunk-EDMXGXAK.js} +7 -4
  54. package/chunks/{chunk-KFGPNCCY.js → chunk-EVTNACMT.js} +4 -4
  55. package/chunks/{chunk-TP2DUOB6.js → chunk-F42YYSCK.js} +2 -2
  56. package/chunks/{chunk-UGS62IR2.js → chunk-GCDXVPFK.js} +3 -3
  57. package/chunks/{chunk-SAWPURIU.js → chunk-GOXQL4YH.js} +2 -2
  58. package/chunks/{chunk-SXEE6PND.js → chunk-GSILBZLN.js} +2 -2
  59. package/chunks/{chunk-BTWGOKHU.js → chunk-HBQ2NXOU.js} +2 -2
  60. package/chunks/{chunk-34ZYDM3F.js → chunk-HBU7EKY4.js} +1 -1
  61. package/chunks/{chunk-T4JVQR7Z.js → chunk-HGAELO7B.js} +2 -2
  62. package/chunks/{chunk-ZHECLGA6.js → chunk-HNLMYDQE.js} +4 -2
  63. package/chunks/{chunk-PMS4FVLY.js → chunk-IL5M5NYD.js} +5 -5
  64. package/chunks/{chunk-HZTXKVSV.js → chunk-IV7GDNKC.js} +1 -1
  65. package/chunks/{chunk-5FFAUU4T.js → chunk-J3TJH52D.js} +1 -1
  66. package/chunks/{chunk-JDEW3V5B.js → chunk-JYKWOREU.js} +1 -1
  67. package/chunks/{chunk-E5GQNSJY.js → chunk-KFZYGSJN.js} +3 -3
  68. package/chunks/{chunk-ZUQVZTWG.js → chunk-KOKPXIAN.js} +3 -3
  69. package/chunks/{chunk-Q6HXLBZF.js → chunk-LDVNJZGH.js} +6 -6
  70. package/chunks/{chunk-VHKOULAI.js → chunk-MF6E7FSA.js} +2 -2
  71. package/chunks/{chunk-F45SKYIQ.js → chunk-MHAADZOZ.js} +3 -3
  72. package/chunks/{chunk-72BGC7RT.js → chunk-MLQNSPRZ.js} +4 -4
  73. package/chunks/{chunk-L2KF7HUE.js → chunk-MSNHNAQZ.js} +1 -1
  74. package/chunks/{chunk-JV5YASQA.js → chunk-N7VWZDWW.js} +55 -155
  75. package/chunks/{chunk-Q2XLNLAV.js → chunk-NE624IVP.js} +1 -1
  76. package/chunks/{chunk-CGKEUUYG.js → chunk-NFYEQRLG.js} +1 -1
  77. package/chunks/{chunk-FGRDUDCI.js → chunk-NHCZJQE4.js} +5 -5
  78. package/chunks/{chunk-TWC3FHUI.js → chunk-NHJKAR6E.js} +3 -3
  79. package/chunks/{chunk-VTBPMLRO.js → chunk-NJQTG2G3.js} +9 -9
  80. package/chunks/{chunk-LEGNDA46.js → chunk-NLNQNBZ2.js} +1 -1
  81. package/chunks/{chunk-QPWZX4ZV.js → chunk-NMCDMLHL.js} +12 -12
  82. package/chunks/{chunk-WS7MOFK6.js → chunk-NMRCXKQ5.js} +3 -3
  83. package/chunks/{chunk-YIU5PEAT.js → chunk-NOAG7N22.js} +1 -1
  84. package/chunks/{chunk-C75BXMPM.js → chunk-NOO4QFXM.js} +3 -1
  85. package/chunks/{chunk-B2TGBZXY.js → chunk-NRXWJXJ4.js} +2 -2
  86. package/chunks/{chunk-J2RNOJRV.js → chunk-OLTN767L.js} +2 -2
  87. package/chunks/{chunk-AWMJRE5N.js → chunk-OX7IZ2G5.js} +4 -4
  88. package/chunks/{chunk-O3MKRN2I.js → chunk-POC3YMHG.js} +1 -1
  89. package/chunks/{chunk-YKK2XXHF.js → chunk-PSPAM24S.js} +0 -4
  90. package/chunks/{chunk-YS2ZJSOA.js → chunk-Q2LVVIKF.js} +11 -28
  91. package/chunks/{chunk-AW2SIT3B.js → chunk-Q5BD56BW.js} +2 -2
  92. package/chunks/{chunk-LAP7X6EC.js → chunk-QMUYLYT5.js} +1 -1
  93. package/chunks/{chunk-ONGZNOIP.js → chunk-R4Q2PEFV.js} +1 -1
  94. package/chunks/{chunk-FRVV5SSD.js → chunk-RLLRJJDR.js} +2 -2
  95. package/chunks/{chunk-6EOMQPTS.js → chunk-RWVD5RRY.js} +3 -3
  96. package/chunks/{chunk-FYZ5NZ3V.js → chunk-RZHU3K6M.js} +20 -2
  97. package/chunks/{chunk-CUK6F5UF.js → chunk-S6Q6Q4P2.js} +1 -1
  98. package/chunks/{chunk-SNZWDV67.js → chunk-SBRX4BDI.js} +1 -1
  99. package/chunks/{chunk-5ZJ3KK5J.js → chunk-SODMFNAR.js} +4 -4
  100. package/chunks/{chunk-VID4BW52.js → chunk-SSGAAWLY.js} +28 -28
  101. package/chunks/{chunk-LY2GK2PR.js → chunk-SYLECP23.js} +4 -4
  102. package/chunks/{chunk-BQOP3K76.js → chunk-TWUKBNWM.js} +1 -1
  103. package/chunks/{chunk-5FKZ7KFQ.js → chunk-UKZ45TJL.js} +3 -3
  104. package/chunks/{chunk-7XVQNDFB.js → chunk-V2P3DOQR.js} +1 -1
  105. package/chunks/{chunk-WXFK4MH7.js → chunk-VG3Q2NC4.js} +5 -25
  106. package/chunks/{chunk-74JEYK2C.js → chunk-VZUCTJ2P.js} +9 -9
  107. package/chunks/{chunk-VLZOU6UH.js → chunk-W5FIP7FC.js} +3 -3
  108. package/chunks/{chunk-6NONRGYX.js → chunk-X6K77VHC.js} +1 -1
  109. package/chunks/{chunk-FGV2QEAO.js → chunk-X7UJKOHZ.js} +6 -4
  110. package/chunks/{chunk-7ZVIGDZF.js → chunk-XBZTAGB7.js} +1 -1
  111. package/chunks/{chunk-6UK77U7D.js → chunk-XGYHNWL3.js} +3 -3
  112. package/chunks/{chunk-ZGQIIGNQ.js → chunk-YBUMTY7B.js} +1 -1
  113. package/chunks/{chunk-JEMDIKGQ.js → chunk-YQHLFCPU.js} +1 -1
  114. package/chunks/{chunk-7ZKDPTYO.js → chunk-Z3GF56ME.js} +2 -2
  115. package/chunks/{chunk-IOUBOANU.js → chunk-ZU47FBOC.js} +1 -1
  116. package/chunks/{config-utils-S5LFS4RN.js → config-utils-L6KLDYIV.js} +19 -19
  117. package/chunks/{contextCommand-XXKZMMSQ.js → contextCommand-UYEH7NIU.js} +17 -17
  118. package/chunks/{core-runtime-YGUA42AZ.js → core-runtime-NVHT3Z3V.js} +15 -15
  119. package/chunks/{create-sub-session-SEK6KCYR.js → create-sub-session-YWASE5VH.js} +15 -15
  120. package/chunks/{daemon-git-worktree-guard-3AWINPPX.js → daemon-git-worktree-guard-FOW4RQSK.js} +15 -15
  121. package/chunks/{daemon-status-provider-RTKHKUFJ.js → daemon-status-provider-O5KQZYMP.js} +21 -21
  122. package/chunks/{daemon-trust-policy-6YQOC7B6.js → daemon-trust-policy-3ATXEON7.js} +21 -21
  123. package/chunks/{daemon-trust-policy-monitor-EN5L23GS.js → daemon-trust-policy-monitor-7MCNDNEC.js} +21 -21
  124. package/chunks/{de-OOLZAU2U.js → de-UU2YTO37.js} +1 -1
  125. package/chunks/{deferred-core-runtime-JPLQRVZO.js → deferred-core-runtime-JK5IXL5K.js} +15 -15
  126. package/chunks/{dist-JCXKXRH6.js → dist-AHJYPSJL.js} +5 -2
  127. package/chunks/{dist-3BJVSJ7D.js → dist-AIKC5E5P.js} +630 -9
  128. package/chunks/{dist-HX2LG76F.js → dist-F2DVGTL3.js} +29 -9
  129. package/chunks/{dist-J7PDFK53.js → dist-GWNQVPZT.js} +27 -8
  130. package/chunks/{dist-65Q3TRLH.js → dist-H6G3K26N.js} +34 -14
  131. package/chunks/{dist-SBK33YLC.js → dist-KJGRVIGJ.js} +33 -2
  132. package/chunks/{dist-WMFHZG3R.js → dist-KLZ7XGEQ.js} +4 -1
  133. package/chunks/{dist-LHGMHIDK.js → dist-ZA52JXAS.js} +5 -1
  134. package/chunks/{dist-QPTIRE3U.js → dist-ZXTZTE54.js} +11 -3
  135. package/chunks/{edit-QXJZIWRQ.js → edit-SY35KYIE.js} +9 -9
  136. package/chunks/{en-7BZ2OZKH.js → en-CAJHTIQT.js} +1 -1
  137. package/chunks/{enterPlanMode-2ITCVQ5N.js → enterPlanMode-HXX6KQJR.js} +9 -9
  138. package/chunks/{environment-URPO5ORZ.js → environment-DKXHG4HB.js} +17 -17
  139. package/chunks/{errors-TDUYLEKI.js → errors-ADY7LQJJ.js} +17 -17
  140. package/chunks/{exitPlanMode-RA7KMUEW.js → exitPlanMode-HSK2CQI6.js} +9 -9
  141. package/chunks/{fast-path-Q2JYP64P.js → fast-path-U636VWN2.js} +3 -3
  142. package/chunks/{fast-path-settings-GTHZLVSS.js → fast-path-settings-V7MI7EZJ.js} +1 -1
  143. package/chunks/{fr-JJWM2HUS.js → fr-HKNWVXRJ.js} +1 -1
  144. package/chunks/{glob-VHSV4BKE.js → glob-GUGGTH5L.js} +9 -9
  145. package/chunks/{goal-tools-5FIE56CK.js → goal-tools-PXYRSQGX.js} +11 -15
  146. package/chunks/{handleAutoUpdate-7FZFLKNZ.js → handleAutoUpdate-5KHS4HIN.js} +18 -18
  147. package/chunks/{i18n-NTFQDWKR.js → i18n-KSGKMUPT.js} +16 -16
  148. package/chunks/{image-gen-TF3IQWSH.js → image-gen-OCCR2WWU.js} +4 -4
  149. package/chunks/{initializer-LB3T635H.js → initializer-YYT5XEZF.js} +21 -21
  150. package/chunks/{installationInfo-KRO433ZG.js → installationInfo-UNSBPYW2.js} +15 -15
  151. package/chunks/{ja-L67TXFDJ.js → ja-GJS5RZGU.js} +1 -1
  152. package/chunks/{list-NEP3WPZ7.js → list-YL6LDQKQ.js} +24 -24
  153. package/chunks/{llm-AZEJEIAD.js → llm-XGGLBGPH.js} +57 -57
  154. package/chunks/{llm-content-generator-KWXFHBR3.js → llm-content-generator-ZHQQT5W7.js} +3 -3
  155. package/chunks/{loadedSettingsAdapter-NZORJLSD.js → loadedSettingsAdapter-3DXLASK7.js} +21 -21
  156. package/chunks/{loggingContentGenerator-NGHVU6AK.js → loggingContentGenerator-V72OCCJO.js} +10 -10
  157. package/chunks/{managed-npm-update-3LHNBEAG.js → managed-npm-update-HV5LPZH2.js} +15 -15
  158. package/chunks/{mcp-4SWJKDX7.js → mcp-IYVSIW6O.js} +21 -21
  159. package/chunks/{monitor-V5EFBZC7.js → monitor-TLBNM4MV.js} +9 -9
  160. package/chunks/{nonInteractiveCli-5UFUBUAT.js → nonInteractiveCli-LSJSQ2W4.js} +57 -57
  161. package/chunks/{notebook-edit-ATV46KWD.js → notebook-edit-OSPOLZP6.js} +9 -9
  162. package/chunks/{openaiContentGenerator-BKTO5QJK.js → openaiContentGenerator-BE4S5TRD.js} +6 -6
  163. package/chunks/{pidfile-JAIOWPI3.js → pidfile-H32FEPWA.js} +15 -15
  164. package/chunks/{processUtils-TCQH3LVD.js → processUtils-SSLIPDEA.js} +2 -2
  165. package/chunks/{prompt-terminal-ledger-BYXHEUHX.js → prompt-terminal-ledger-I5SLL6UF.js} +16 -16
  166. package/chunks/{pt-77SBDL4B.js → pt-FXMYXEUV.js} +1 -1
  167. package/chunks/{qwenContentGenerator-K5TJK75P.js → qwenContentGenerator-TMQC623Z.js} +11 -11
  168. package/chunks/{qwenOAuth2-NOXRK323.js → qwenOAuth2-3ZRQHHTC.js} +4 -4
  169. package/chunks/{read-file-DL7GNZD5.js → read-file-T2QAIZE2.js} +2 -2
  170. package/chunks/{resumeHistoryUtils-OYKXZ4YO.js → resumeHistoryUtils-QLKDH5GY.js} +19 -19
  171. package/chunks/{ripGrep-EOUMIU4K.js → ripGrep-YGWL7KCV.js} +3 -3
  172. package/chunks/{ru-UYWHKWF2.js → ru-RMHURE5U.js} +1 -1
  173. package/chunks/{run-qwen-serve-PPTGWC5B.js → run-qwen-serve-26KZDECC.js} +89 -231
  174. package/chunks/{runtime-5RO22P2N.js → runtime-BMEIVDDG.js} +26 -26
  175. package/chunks/{scheduled-tasks-YGERFWLZ.js → scheduled-tasks-NCFPP6VQ.js} +19 -19
  176. package/chunks/{scheduler-S6WU6M3C.js → scheduler-47TVMUVN.js} +17 -17
  177. package/chunks/{serve-HT4WOCWS.js → serve-KL3G6LQQ.js} +22 -22
  178. package/chunks/{server-SWXVPRCS.js → server-LBPYXZ5G.js} +55 -66
  179. package/chunks/{session-6DSFUOMO.js → session-YG6742LO.js} +58 -58
  180. package/chunks/{session-attachments-root-SOZCTQWW.js → session-attachments-root-OUBQDYC4.js} +15 -15
  181. package/chunks/{session-pr-refresh-F7XUBQBH.js → session-pr-refresh-EKGMYNAW.js} +18 -18
  182. package/chunks/{settings-SWQH36PO.js → settings-DDNHJX2L.js} +20 -20
  183. package/chunks/{shell-XUQL6EYV.js → shell-KUCXWITU.js} +9 -9
  184. package/chunks/{skill-HNRDD54C.js → skill-JQLKPNWZ.js} +2 -2
  185. package/chunks/{skill-settings-JU72PCII.js → skill-settings-XERQCUXZ.js} +20 -20
  186. package/chunks/{spawnChannel-7ZVM3GBU.js → spawnChannel-GQ45QFGB.js} +15 -15
  187. package/chunks/{standalone-update-64JQY2LX.js → standalone-update-PRF3ILGZ.js} +17 -17
  188. package/chunks/{start-opentui-ui-RSLBXESU.js → start-opentui-ui-JDSOZE3N.js} +62 -67
  189. package/chunks/{startInteractiveUI-ZDPHD7XE.js → startInteractiveUI-RRW3JVHN.js} +69 -85
  190. package/chunks/{team-create-U52VYSNO.js → team-create-5DRLOLOE.js} +9 -9
  191. package/chunks/{team-plan-approval-IQ4ADQIK.js → team-plan-approval-MWSGAL5T.js} +9 -9
  192. package/chunks/{terminal-image-renderer-ZEMF7LB2.js → terminal-image-renderer-H7PD4FQW.js} +15 -15
  193. package/chunks/{theme-manager-DK2S2SOX.js → theme-manager-7AV73D6R.js} +15 -15
  194. package/chunks/{tool-search-6U4OQG7K.js → tool-search-UGYTBLUV.js} +2 -6
  195. package/chunks/{total-session-admission-BOARHBZU.js → total-session-admission-JIHSTJ5S.js} +17 -17
  196. package/chunks/{trustedFolders-GKQZXZSV.js → trustedFolders-5VCBXFOP.js} +16 -16
  197. package/chunks/{update-relaunch-GLACF7PX.js → update-relaunch-4LF3APCV.js} +5 -5
  198. package/chunks/{updateCheck-NLBSZB4Q.js → updateCheck-4T3WUE5F.js} +17 -17
  199. package/chunks/{useAutoAcceptIndicator-3X3BYU7H.js → useAutoAcceptIndicator-UMGB64Z6.js} +23 -23
  200. package/chunks/{validateNonInterActiveAuth-NE3JLOIR.js → validateNonInterActiveAuth-GFJ72U2C.js} +54 -54
  201. package/chunks/{version-6H5YAT4N.js → version-EAAZN4T2.js} +1 -1
  202. package/chunks/{web-fetch-RWSO7TTN.js → web-fetch-VRU3A2NI.js} +5 -5
  203. package/chunks/{web-search-DADI3LV5.js → web-search-NEGYQNDJ.js} +319 -376
  204. package/chunks/{workflow-LPGCZCIT.js → workflow-UHPFALVZ.js} +10 -10
  205. package/chunks/{workspace-providers-status-QBRBEFTO.js → workspace-providers-status-AEYISSU2.js} +23 -23
  206. package/chunks/{workspace-registration-store-WUKTMJPW.js → workspace-registration-store-A7RGKW62.js} +1 -1
  207. package/chunks/{workspace-registry-CJV7KVGF.js → workspace-registry-C2NGE6SD.js} +17 -17
  208. package/chunks/{workspace-runtime-coordinator-7LYMFMFF.js → workspace-runtime-coordinator-QKMZ24YF.js} +18 -20
  209. package/chunks/{workspace-service-HWXZSA4J.js → workspace-service-RQTTAGGC.js} +24 -24
  210. package/chunks/{workspace-skills-status-D6QXUWCC.js → workspace-skills-status-5HWZU3HX.js} +21 -21
  211. package/chunks/{workspace-trust-reconciler-VZX7G7CZ.js → workspace-trust-reconciler-KFWATZUU.js} +23 -23
  212. package/chunks/{write-file-KKHV26YV.js → write-file-DPVB2SBQ.js} +10 -10
  213. package/chunks/{zh-J2GLI64H.js → zh-S5V3Z5CR.js} +1 -1
  214. package/chunks/{zh-TW-TBAICUJQ.js → zh-TW-2K2WRFPY.js} +1 -1
  215. package/chunks/{zoom-image-OG7X7KAA.js → zoom-image-S7AWLAPC.js} +2 -2
  216. package/cli.js +13 -13
  217. package/export-transcript-document.js +1 -1
  218. package/locales/ca.js +2 -2
  219. package/locales/de.js +2 -2
  220. package/locales/en.js +2 -2
  221. package/locales/fr.js +2 -2
  222. package/locales/ja.js +2 -2
  223. package/locales/pt.js +2 -2
  224. package/locales/ru.js +2 -2
  225. package/locales/zh-TW.js +2 -2
  226. package/locales/zh.js +2 -2
  227. package/package.json +3 -3
  228. package/web-shell/assets/{abnfDiagram-VCTEODGH-NT0lTLRG.js → abnfDiagram-VCTEODGH-nU24rpIE.js} +1 -1
  229. package/web-shell/assets/{arc-DDqnIMMx.js → arc-D1hTu8QI.js} +1 -1
  230. package/web-shell/assets/{architectureDiagram-5GKGNRK7-DfYghE3W.js → architectureDiagram-5GKGNRK7-B_fgkKe7.js} +1 -1
  231. package/web-shell/assets/{blockDiagram-NRAW4CY4-DlqJIx5c.js → blockDiagram-NRAW4CY4-C3pddUNg.js} +1 -1
  232. package/web-shell/assets/{c4Diagram-UCG6FXSJ-CinqLGU4.js → c4Diagram-UCG6FXSJ-kEFoC1ei.js} +1 -1
  233. package/web-shell/assets/channel-Blod4z1X.js +1 -0
  234. package/web-shell/assets/{chunk-2Q5K7J3B-CsjJX5M7.js → chunk-2Q5K7J3B-DbT9wS7j.js} +1 -1
  235. package/web-shell/assets/{chunk-5VM5RSS4-CaVb2tdH.js → chunk-5VM5RSS4-CNbULt6O.js} +1 -1
  236. package/web-shell/assets/{chunk-F27PBJKO-CRyErlzW.js → chunk-F27PBJKO-CbQRy4Tb.js} +1 -1
  237. package/web-shell/assets/{chunk-G27WJ6UU-7I79DZCf.js → chunk-G27WJ6UU-CVbXTxYk.js} +1 -1
  238. package/web-shell/assets/{chunk-JWPE2WC7-Dz4cac5F.js → chunk-JWPE2WC7-D89c_BXy.js} +1 -1
  239. package/web-shell/assets/{chunk-LCL6LL3I-Ls24Derb.js → chunk-LCL6LL3I-B7-I_9KB.js} +1 -1
  240. package/web-shell/assets/{chunk-POPQ4Y6H-JzYe4qx7.js → chunk-POPQ4Y6H-DcLQFzS4.js} +1 -1
  241. package/web-shell/assets/{chunk-SVP7TREG-BxDwesA-.js → chunk-SVP7TREG-DyBb2Axj.js} +1 -1
  242. package/web-shell/assets/{chunk-XXDRQBXY-CW4hjgWc.js → chunk-XXDRQBXY-BIA0eb5B.js} +1 -1
  243. package/web-shell/assets/classDiagram-DTDB5LWJ-D6hFDMqb.js +1 -0
  244. package/web-shell/assets/classDiagram-v2-JRS7N3AN-D6hFDMqb.js +1 -0
  245. package/web-shell/assets/{cose-bilkent-JH36ORCC-DxikE9iF.js → cose-bilkent-JH36ORCC-Db2FYN85.js} +1 -1
  246. package/web-shell/assets/{cynefin-OW5HDTMX-CvVsIkVN.js → cynefin-OW5HDTMX-i4GwmBVy.js} +1 -1
  247. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-CDHkk3wq.js → cynefinDiagram-5FMLGOSQ-LENf_IUy.js} +1 -1
  248. package/web-shell/assets/{dagre-3AP2YEHR-BgLdkVLT.js → dagre-3AP2YEHR-CF9XVrD9.js} +1 -1
  249. package/web-shell/assets/{diagram-S7CK7UJ4-DP43cGhe.js → diagram-S7CK7UJ4-DD5PJfSm.js} +1 -1
  250. package/web-shell/assets/{diagram-UQ7AKVKN-BWrZYhoT.js → diagram-UQ7AKVKN-CjD_sBMj.js} +1 -1
  251. package/web-shell/assets/{diagram-VSXAHHWV-B80wjH_n.js → diagram-VSXAHHWV-U5WwMqyA.js} +1 -1
  252. package/web-shell/assets/{diagram-VX7I27RA-DPpKmDsY.js → diagram-VX7I27RA-BujpHJJf.js} +1 -1
  253. package/web-shell/assets/{diagram-Z3DM3KII-kaEBNbNU.js → diagram-Z3DM3KII-3ZLtKEXo.js} +1 -1
  254. package/web-shell/assets/{ebnfDiagram-PWID7BFC-1-qbEZvk.js → ebnfDiagram-PWID7BFC-BGpiquRm.js} +1 -1
  255. package/web-shell/assets/{erDiagram-SSCWMZ5O-CrK2gMkV.js → erDiagram-SSCWMZ5O-D0besu_U.js} +1 -1
  256. package/web-shell/assets/{flowDiagram-A5DVABFB-Dic2xofW.js → flowDiagram-A5DVABFB-9DwDuIyr.js} +1 -1
  257. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DJko8vT7.js → ganttDiagram-EL5Y4UJY-CNlsAeNr.js} +1 -1
  258. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-DxsQ-bHT.js → gitGraphDiagram-WWUBYQGX-C_pPFiTR.js} +1 -1
  259. package/web-shell/assets/{index-t7VBrUeD.js → index-BYWs4JWq.js} +1 -1
  260. package/web-shell/assets/{index-DY8CxdBr.js → index-D3YS6KuJ.js} +152 -152
  261. package/web-shell/assets/{infoDiagram-RXCK75RN-DcRUJbNi.js → infoDiagram-RXCK75RN-Bpai64Ll.js} +1 -1
  262. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-CUPw-2_e.js → ishikawaDiagram-5VMMS53U-ktpJFq4r.js} +1 -1
  263. package/web-shell/assets/{journeyDiagram-EYS64GPL-yOHhZxkW.js → journeyDiagram-EYS64GPL-iz_DKgFX.js} +1 -1
  264. package/web-shell/assets/{kanban-definition-3QL26DDD-CFUGBbqz.js → kanban-definition-3QL26DDD-m_gG00Yt.js} +1 -1
  265. package/web-shell/assets/{layout-BoilNfBU.js → layout-qEvKgnvU.js} +1 -1
  266. package/web-shell/assets/{linear-DOuHaPrl.js → linear-C6lklGdq.js} +1 -1
  267. package/web-shell/assets/{mermaid.core-1G1fXWda.js → mermaid.core-DSCYB_2P.js} +6 -6
  268. package/web-shell/assets/{mindmap-definition-FBJOCRG2-B8BhkrOX.js → mindmap-definition-FBJOCRG2-DRQbT8w-.js} +1 -1
  269. package/web-shell/assets/{pegDiagram-XKGWAZYB-CipC5K1D.js → pegDiagram-XKGWAZYB-BhD0q0i6.js} +1 -1
  270. package/web-shell/assets/{pieDiagram-E7YTZNPT-CHBDFDUJ.js → pieDiagram-E7YTZNPT-BvIGQCSd.js} +1 -1
  271. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-_iiBkoZO.js → quadrantDiagram-AXDQQJYC-BDQtfpU-.js} +1 -1
  272. package/web-shell/assets/{railroadDiagram-O6MQD6OU-Cx1peHDi.js → railroadDiagram-O6MQD6OU-E1g2KIFK.js} +1 -1
  273. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-CBRiPbdQ.js → requirementDiagram-EFPCY7ZU-CuerYJOe.js} +1 -1
  274. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-TT6GcHaZ.js → sankeyDiagram-P5KCCOFB-CqWyCZGA.js} +1 -1
  275. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-CWP42PNb.js → sequenceDiagram-WJ2MYXX4-B-YWb8x4.js} +1 -1
  276. package/web-shell/assets/{sizeCapture-X5ZJPWSS-Bp94roEG.js → sizeCapture-X5ZJPWSS-BB7YY4Tl.js} +1 -1
  277. package/web-shell/assets/{stateDiagram-HBIQ2CUA-0ftrzTAy.js → stateDiagram-HBIQ2CUA-C8LDpNHS.js} +1 -1
  278. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-C4CbdvGa.js +1 -0
  279. package/web-shell/assets/{swimlanes-XN3QIQJK-D-FsenYJ.js → swimlanes-XN3QIQJK-D94vOoxZ.js} +1 -1
  280. package/web-shell/assets/swimlanesDiagram-VK2B7HYN--QNSIOC8.js +8 -0
  281. package/web-shell/assets/{timeline-definition-24CTP7MA-Ctvrj28y.js → timeline-definition-24CTP7MA-C9C8uEYm.js} +1 -1
  282. package/web-shell/assets/{vennDiagram-4TSXK5OY-5DZncjOt.js → vennDiagram-4TSXK5OY-CYzMHbVW.js} +1 -1
  283. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-jZjYwPY7.js → wardleyDiagram-VM6X3IG4-G9nhtLES.js} +1 -1
  284. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-Ci6Q2C2_.js → xychartDiagram-S5SC5T6Z-ruD2Wjhg.js} +1 -1
  285. package/web-shell/index.html +1 -1
  286. package/web-shell/assets/channel-BHGoSkEv.js +0 -1
  287. package/web-shell/assets/classDiagram-DTDB5LWJ-E47Xnn15.js +0 -1
  288. package/web-shell/assets/classDiagram-v2-JRS7N3AN-E47Xnn15.js +0 -1
  289. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-PgAST0dK.js +0 -1
  290. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-BcWcB5bj.js +0 -8
@@ -617,4 +617,4 @@ ${t}
617
617
  ${r}`}function XB({tool:e}){let t=(0,x.useMemo)(()=>i3e(e),[e]),n=(0,x.useMemo)(()=>e.content&&kp(e)||"",[e]);return!t&&!n?null:(0,u.jsx)("div",{className:Ie.expandedEdit,children:t?(0,u.jsx)(lwe,{diff:t}):(0,u.jsx)("pre",{className:Ie.expandedOutput,children:n})})}function ch({title:e,detail:t,status:n,children:a}){return(0,u.jsxs)("div",{className:Ie.expandedCard,children:[(0,u.jsxs)("div",{className:Ie.expandedCardHeader,children:[(0,u.jsxs)("span",{className:Ie.expandedCardTitleRow,children:[n&&(0,u.jsx)(gp,{status:n}),(0,u.jsx)("span",{className:Ie.expandedCardTitle,children:e})]}),t&&(0,u.jsx)("span",{className:Ie.expandedCardDetail,children:t})]}),a&&(0,u.jsx)("div",{className:Ie.expandedCardBody,children:a})]})}function b3e({tool:e,todos:t,expanded:n,title:a}){var r;let o=((r=(0,x.useContext)(UC).get(e.callId))==null?void 0:r.events)??[];return n?(0,u.jsx)(ch,{title:a,status:e.status,children:(0,u.jsx)("div",{className:Ie.todoBody,children:(0,u.jsx)(Bq,{todos:t})})}):(0,u.jsx)("div",{className:Ie.todoBody,children:(0,u.jsx)(Dq,{todos:t,events:o})})}function k3e({tool:e,displayName:t,detail:n,result:a}){let{t:r}=lt(),o=Iwe(),i=o?Lwe(o.tasks,e):void 0;return i?(0,u.jsx)(_q,{task:i}):(0,u.jsx)(ch,{title:t,detail:n,children:(0,u.jsx)("div",{className:Ie.workflowFallback,role:"status",children:e.status==="pending"||e.status==="in_progress"?r("workflow.inline.loading"):a||r("workflow.inline.unavailable")})})}function Vz(e,t){var n,a;let r=xp(e.rawOutput),o=a6(e),i=dh(e),s=i6(e),l=x3e(e),c=Cy(e),d=((n=e.subTools)==null?void 0:n.length)||((a=r?.toolCalls)==null?void 0:a.length)||0,f=r?.executionSummary,p=f&&typeof f.totalDurationMs=="number"?Aq(f.totalDurationMs):Iy(e.startTime,e.endTime??(e.status==="in_progress"&&t?t:void 0)),m=r&&typeof r.tokenCount=="number"&&r.tokenCount>0?r.tokenCount:f&&typeof f.outputTokens=="number"&&f.outputTokens>0?f.outputTokens:0,h=m>0?o6(m):"";return{agentType:s,explicitAgentType:l,description:c,subToolCount:d,elapsed:p,tokens:h,status:i,reason:o}}function x3e(e){var t;let n=xp(e.rawOutput),a=n?.subagentName;if(typeof a=="string"&&a.trim())return a.trim();let r=(t=e.args)==null?void 0:t.subagent_type;return typeof r=="string"&&r.trim()?r.trim():""}function KB(e){if(e.status==="completed")return!1;let t=e.toolName.toLowerCase();return!!(jo(e.toolName)||t==="write_file"||t==="writefile"||t==="edit"||t==="editfile"||Ho(t))}function S3e({tool:e}){let t=kp(e)||"";return(0,u.jsx)("pre",{className:Ie.expandedOutput,children:t})}function C3e({tool:e}){var t;let n=T3e(e)||(typeof((t=e.args)==null?void 0:t.args)=="string"&&e.args.args.trim()?e.args.args.trim():e.title??"");return(0,u.jsx)("pre",{className:Ie.expandedOutput,children:n})}function T3e(e){var t,n;let a=(t=e.content)==null?void 0:t[0];return a?.type!=="content"?"":typeof((n=a.content)==null?void 0:n.text)=="string"?a.content.text:""}function by(e){let t=e.toolName.toLowerCase();return Mr(e)?"agent":jo(e.toolName)?"ask":Ho(t)?"shell":PC(t)?"fetch":ad(t)?"todo":t==="read"||t==="read_file"||t==="readfile"?"read":t==="edit"||t==="editfile"?"edit":t==="write"||t==="write_file"||t==="writefile"?"write":"other"}function I3e({description:e,elapsed:t}){return(0,u.jsxs)(u.Fragment,{children:[e&&(0,u.jsx)("span",{className:Ie.lineArg,children:e}),t&&(0,u.jsx)("span",{className:Ie.lineElapsed,children:t})]})}function oh({info:e}){let{renderToolHeaderExtra:t}=ki(),n=t?.(e);return n?(0,u.jsx)(u.Fragment,{children:n}):(0,u.jsx)(I3e,{description:e.description,elapsed:e.kind==="agent"||Fa(e.tool.status)?e.elapsed:""})}function _3e(e){return e.length>u3e||e.includes(`
618
618
  `)}function L3e(e){return e.find(t=>Fa(t.status))??e[e.length-1]}function A3e(e,t,n,a=!1){if(jC(e)){let o=e.filter(s=>Fa(s.status)&&!yi(s));if(o.length===0)return t("subagent.background");if(o.length===1&&jo(o[0].toolName))return t("toolGroup.summary.provideInformation");let i=o.map(s=>jo(s.toolName)?t("toolGroup.summary.provideInformation"):Xz(s,t,n));return t("toolGroup.running",{name:i.join(" \xB7 "),count:o.length})}return R3e(e,t,a)||t("toolGroup.summary",{count:e.length})}function Xz(e,t,n){if(ad(e.toolName))return t("toolGroup.summary.updatedTodos",{count:1});if(jo(e.toolName))return Fa(e.status)?t("toolGroup.summary.provideInformation"):t("toolGroup.summary.askedQuestions",{count:Zz(e)});let{displayName:a,description:r,hideDisplayName:o}=Kz(e,t,n);return[o?"":a,r].filter(Boolean).join(" ")}function Kz(e,t,n){let a=bp(e.toolName,t),r=ba(fq(e,n),120);return{kind:by(e),tool:e,displayName:a,description:r,elapsed:"",workspaceCwd:n,hideDisplayName:!!Cue(e)}}function E3e({tool:e,workspaceCwd:t}){let{t:n}=lt(),a=jo(e.toolName),r=Fa(e.status),o=yi(e),i=r&&!o&&Mr(e),s=m6(i),l=!a&&r?o?n("subagent.background"):n("toolGroup.runningPrefix").trim():"";if(ad(e.toolName)||a)return(0,u.jsxs)(u.Fragment,{children:[l&&(0,u.jsxs)("span",{children:[l," "]}),Xz(e,n,t)]});let c=Kz(e,n,t),d=i?gq(e,n):"",f=i?{...c,description:[c.description,d&&`(${d})`].filter(Boolean).join(" "),elapsed:Vz(e,s).elapsed}:c;return(0,u.jsxs)(u.Fragment,{children:[l&&(0,u.jsxs)("span",{children:[l," "]}),(0,u.jsxs)("span",{className:Ie.chatSummaryInline,children:[!f.hideDisplayName&&(0,u.jsx)("span",{className:Ie.lineName,children:f.displayName}),(0,u.jsx)(oh,{info:f})]})]})}function R3e(e,t,n){let a=n?e.filter(Mr).length:0;if(a>0){let f=e.length-a;return[t("toolGroup.summary.ranAgents",{count:a}),f?t("toolGroup.summary",{count:f}):""].filter(Boolean).join(" \xB7 ")}let r=0,o=0,i=0,s=0,l=0,c=0,d=0;for(let f of e){let p=f.toolName.toLowerCase();Ho(p)?o++:p==="edit"||p==="editfile"||p==="write"||p==="write_file"||p==="writefile"?r++:p==="read"||p==="read_file"||p==="readfile"?i++:p==="grep"||p==="grep_search"||p==="search"||p==="glob"||p==="web_search"||p==="websearch"?s++:ad(p)?l++:jo(p)?c+=Zz(f):d++}return[r?t("toolGroup.summary.editedFiles",{count:r}):"",o?t("toolGroup.summary.ranCommands",{count:o}):"",i?t("toolGroup.summary.readFiles",{count:i}):"",s?t("toolGroup.summary.searched",{count:s}):"",l?t("toolGroup.summary.updatedTodos",{count:l}):"",c?t("toolGroup.summary.askedQuestions",{count:c}):"",d?t("toolGroup.summary.otherTools",{count:d}):""].filter(Boolean).join(" ")}function Zz(e){var t;let n=(t=e.args)==null?void 0:t.questions;return Array.isArray(n)&&n.length>0?n.length:1}function M3e(){return(0,u.jsxs)("svg",{className:Ie.chatSummaryToolIcon,width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,u.jsx)("path",{d:"M12 20h9"}),(0,u.jsx)("path",{d:"M16.5 3.5a2.1 2.1 0 0 1 3 3L7 19l-4 1 1-4Z"})]})}function Qz(){return(0,u.jsxs)("svg",{className:Ie.chatSummaryToolIcon,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","data-testid":"chat-summary-tool-icon","aria-hidden":"true",children:[(0,u.jsx)("rect",{x:"2",y:"2",width:"10",height:"10",rx:"2.4",stroke:"currentColor",strokeWidth:"1.2"}),(0,u.jsx)("path",{d:"M4.6 5.2 6 6.6 4.6 8",stroke:"currentColor",strokeWidth:"1.05",strokeLinecap:"round",strokeLinejoin:"round"}),(0,u.jsx)("path",{d:"M7.3 8.1h2.1",stroke:"currentColor",strokeWidth:"1.05",strokeLinecap:"round"})]})}function N3e(){return(0,u.jsxs)("svg",{className:Ie.chatSummaryToolIcon,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[(0,u.jsx)("circle",{cx:"7",cy:"7",r:"5.5",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M1.8 7h10.4M7 1.5c1.3 1.5 2 3.3 2 5.5s-.7 4-2 5.5M7 1.5C5.7 3 5 4.8 5 7s.7 4 2 5.5",stroke:"currentColor",strokeWidth:"1.05",strokeLinecap:"round"})]})}function P3e(){return(0,u.jsxs)("svg",{className:Ie.chatSummaryToolIcon,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:[(0,u.jsx)("rect",{x:"2",y:"1.6",width:"10",height:"10.8",rx:"2.2",stroke:"currentColor",strokeWidth:"1.25"}),(0,u.jsx)("path",{d:"M4.5 5.2h5M4.5 7h5M4.5 8.8h5",stroke:"currentColor",strokeWidth:"1.15",strokeLinecap:"round"})]})}function O3e(){return(0,u.jsx)("svg",{className:Ie.chatSummaryToolIcon,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:(0,u.jsx)("path",{d:"M3 4.2 4.2 5.4 6.1 3.3M7.5 4.5h3.6M3 9.1l1.2 1.2 1.9-2.1M7.5 9.4h3.6",stroke:"currentColor",strokeWidth:"1.25",strokeLinecap:"round",strokeLinejoin:"round"})})}function D3e(){return(0,u.jsx)("svg",{className:Ie.chatSummaryToolIcon,width:"14",height:"14",viewBox:"0 0 14 14",fill:"none","aria-hidden":"true",children:(0,u.jsx)("path",{d:"M3.4 3.2h7.2c.7 0 1.25.55 1.25 1.25v3.4c0 .7-.55 1.25-1.25 1.25H7.5L4.5 11V9.1H3.4c-.7 0-1.25-.55-1.25-1.25v-3.4c0-.7.55-1.25 1.25-1.25Z",stroke:"currentColor",strokeWidth:"1.2",strokeLinecap:"round",strokeLinejoin:"round"})})}function NC(){return(0,u.jsx)("svg",{className:Ie.chatSummaryToolIcon,width:"14",height:"14",viewBox:"0 0 1024 1024",fill:"currentColor","aria-hidden":"true",children:(0,u.jsx)("path",{d:"M770.08 96.32c1.728.64 3.072 1.984 3.712 3.712l38.848 107.584c.64 1.728 1.984 3.104 3.712 3.712l107.584 38.848a6.144 6.144 0 0 1 0 11.584l-107.584 38.848a6.144 6.144 0 0 0-3.712 3.712l-38.848 107.584a6.144 6.144 0 0 1-11.584 0L723.36 304.32a6.144 6.144 0 0 0-3.712-3.712L612.064 261.76a6.144 6.144 0 0 1 0-11.584l107.584-38.848a6.144 6.144 0 0 0 3.712-3.712l38.848-107.584c1.184-3.2 4.704-4.8 7.872-3.68zM576 160H384q-119.296 0-203.648 84.352Q96 328.704 96 448v192q0 119.296 84.352 203.648Q264.704 928 384 928h256q119.296 0 203.648-84.352Q928 759.296 928 640V512h-64v128q0 92.8-65.6 158.4Q732.8 864 640 864H384q-92.8 0-158.4-65.6Q160 732.8 160 640V448q0-92.8 65.6-158.4Q291.2 224 384 224h192v-64zm96 248.224L568.224 512 672 615.776l45.248-45.28L658.752 512l58.496-58.496L672 408.224zM320 608V448h64v160h-64z",stroke:"currentColor",strokeWidth:"28",strokeLinejoin:"round"})})}function Yz({tool:e}){let t=by(e);return t==="agent"?(0,u.jsx)(NC,{}):t==="ask"?(0,u.jsx)(D3e,{}):t==="edit"||t==="write"?(0,u.jsx)(M3e,{}):t==="fetch"?(0,u.jsx)(N3e,{}):t==="read"?(0,u.jsx)(P3e,{}):t==="todo"?(0,u.jsx)(O3e,{}):(0,u.jsx)(Qz,{})}function PC(e){let t=e.toLowerCase();return t==="web_fetch"||t==="webfetch"||t==="fetch"}function B3e(e,t){var n,a;if(((n=e.approval)==null?void 0:n.id)!==((a=t.approval)==null?void 0:a.id)||e.workspaceCwd!==t.workspaceCwd||e.summaryOnly!==t.summaryOnly||e.forceExpanded!==t.forceExpanded||e.detailsVisible!==t.detailsVisible||e.hideHeader!==t.hideHeader||e.hideCollapsedOutput!==t.hideCollapsedOutput)return!1;let r=e.tool,o=t.tool;return r.callId===o.callId&&r.toolName===o.toolName&&r.status===o.status&&r.subagentSessionReady===o.subagentSessionReady&&r.startTime===o.startTime&&r.endTime===o.endTime&&r.subContent===o.subContent&&r.rawOutput===o.rawOutput&&r.args===o.args&&r.content===o.content&&r.title===o.title&&$3e(r.subTools,o.subTools)}function $3e(e,t){if(e===t)return!0;if(!e||!t||e.length!==t.length)return!1;for(let n=0;n<e.length;n++){let a=e[n],r=t[n];if(a.callId!==r.callId||a.toolName!==r.toolName||a.status!==r.status||a.subagentSessionReady!==r.subagentSessionReady||a.endTime!==r.endTime||a.rawOutput!==r.rawOutput||a.args!==r.args||a.subContent!==r.subContent||a.title!==r.title)return!1}return!0}var ZB=/\[([^\]]+)\]\(qwen-session:\/\/([^)]+)\)/g;function B5(e,t){if(!e||!e.includes("qwen-session://"))return e;let n=[],a=0,r;for(ZB.lastIndex=0;(r=ZB.exec(e))!==null;){r.index>a&&n.push(e.slice(a,r.index));let o=r[2];n.push(t!=="interactive"?(0,u.jsx)("span",{style:{textDecoration:"underline"},children:r[1]},r.index):(0,u.jsx)("a",{href:"#",role:"button",style:{textDecoration:"underline",cursor:"pointer"},onClick:i=>{i.preventDefault(),i.stopPropagation(),window.dispatchEvent(new CustomEvent("qwen:open-session",{detail:o}))},children:r[1]},r.index)),a=r.index+r[0].length}return a<e.length&&n.push(e.slice(a)),n.length===1?n[0]:(0,u.jsx)(u.Fragment,{children:n})}var OC=(0,x.memo)(function({tool:e,approval:t,workspaceCwd:n,summaryOnly:a=!1,forceExpanded:r=!1,detailsVisible:o=!0,hideHeader:i=!1,hideCollapsedOutput:s=!1}){let{t:l}=lt(),c=qn(),d=f6(),f=Oq(),{hostOwnsEditDiffPreview:p}=ki(),m=f!==void 0,h=hh(e.rawOutput),g=r||!!h,y=t?.toolCallId===e.callId,v=!!(p&&y&&t!=null&&t.hasDiffPreview&&GB(t?.toolName??e.toolName)),w=v,[b,I]=(0,x.useState)(!1),[_,L]=(0,x.useState)(()=>g||!a&&KB(e)&&!w),S=(0,x.useRef)(null),C=(0,x.useRef)(!1),A=t6(e.toolName);(0,x.useEffect)(()=>{L(g||!a&&KB(e)&&!w),I(!1),S.current=null,C.current=!1},[g,w,m,a,e.callId,e.toolName]);let E=Mr(e),O=!y&&t?.toolCallId&&E&&bi(e,t.toolCallId),D=!!(v||p&&O&&t!=null&&t.hasDiffPreview&&GB(t.toolName??"")),H=Fa(e.status),W=H&&!Ho(e.toolName)&&!PC(e.toolName)&&!D,Q=m6(W);if((0,x.useEffect)(()=>{!g&&!E&&e.status==="completed"&&!C.current&&L(!1)},[g,E,e.status]),E){let ne=Vz(e,Q),We=ne.explicitAgentType?`${l("agent.label")} (${yh(ne.explicitAgentType,l)})`:l("agent.label"),ve=e.status==="completed"||e.status==="failed",ze=yi(e),U=[ze&&!ve?l("subagent.background"):e.status==="pending"?l("subagent.pending"):l("subagent.running"),ze&&!ve||D?"":ne.elapsed].filter(Boolean).join(" \xB7 "),fe=[ne.subToolCount>0?l("subagent.toolsCount",{count:ne.subToolCount}):"",ne.elapsed,ne.tokens,ne.reason?ba(ne.reason,80):""].filter(Boolean).join(" \xB7 "),pe=r||_||!!O,Oe=!!y,He=Ji(e),vt=(0,u.jsx)(d6,{tool:e,approval:p?t:void 0,hideHeader:!0,defaultExpanded:!0,inline:!0});if(d&&!i){let ot=(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)(NC,{}),(0,u.jsx)(gp,{status:ve?ne.status:e.status}),(0,u.jsx)("span",{className:Ie.lineName,children:We}),(0,u.jsx)(oh,{info:{kind:"agent",tool:e,displayName:We,description:ne.description?ba(ne.description,60):"",elapsed:ve?fe:U,workspaceCwd:n}})]});return(0,u.jsx)("div",{className:Ie.line,"data-transcript-tool-call-id":e.callId,children:Oe?(0,u.jsx)("div",{className:`${Ie.lineMain} ${Ie.lineButton}`,"aria-disabled":"true",children:ot}):(0,u.jsxs)("button",{type:"button",className:`${Ie.lineMain} ${Ie.lineExpandable} ${Ie.lineButton}`,"aria-disabled":!!He||void 0,title:He?l(He):void 0,onClick:()=>{He||d.onOpen(e)},children:[ot,(0,u.jsx)("span",{className:Ie.lineChevronRight,"aria-hidden":"true"})]})})}return(0,u.jsxs)("div",{className:Ie.line,"data-transcript-tool-call-id":e.callId,children:[!i&&(0,u.jsxs)("div",{className:`${Ie.lineMain} ${Oe?"":Ie.lineExpandable}`,"aria-disabled":!!He||void 0,title:He?l(He):void 0,onClick:Oe||He?void 0:()=>L(!_),children:[(0,u.jsx)(NC,{}),(0,u.jsx)(gp,{status:ve?ne.status:e.status}),(0,u.jsx)("span",{className:Ie.lineName,children:We}),(0,u.jsx)(oh,{info:{kind:"agent",tool:e,displayName:We,description:ne.description?ba(ne.description,60):"",elapsed:ve?fe:U,workspaceCwd:n}}),!Oe&&(0,u.jsx)("span",{className:_?Ie.lineChevronDown:Ie.lineChevronRight,"aria-hidden":"true"})]}),pe&&(0,u.jsx)("div",{className:Ie.lineDetail,children:i?(0,u.jsx)("div",{className:Ie.expandedAgentCard,children:vt}):vt})]})}let j=dq(e,n),Y=Tue(e),K=a&&Ho(e.toolName)?fq(e,n):j,ue=bp(e.toolName,l),M=D||Ho(e.toolName)||PC(e.toolName)?"":Iy(e.startTime,H?Q:e.endTime),de=e.toolName.toLowerCase(),F=de==="monitor"&&m&&!b&&!i,N=ad(de),ae=N?Mq(e):void 0,he=!!ae&&ae.length>0,ce=ae?ae.filter(ne=>ne.status==="completed").length:0,X=Ho(de),ie=de==="grep"||de==="grep_search"||de==="search"||de==="glob",le=de==="read"||de==="read_file"||de==="readfile",J=!N&&_3e(K),oe=!g&&!w,be=F||oe,xe=()=>{C.current=!0,L(ne=>!ne)},V=()=>{I(!0),oe&&xe()},we=()=>{f&&Gz(S,()=>f.onOpen(e),V)},et=o3e(e),Ee=_&&J,nt=le,ct=Ee&&!X&&!ie&&!le,mt=j,zt=_&&!et&&(!N||!he&&!Y);return(0,u.jsxs)("div",{className:Ie.line,"data-transcript-tool-call-id":e.callId,children:[i&&H&&M&&(0,u.jsx)("div",{className:Ie.lineMain,children:(0,u.jsx)(oh,{info:{kind:by(e),tool:e,displayName:ue,description:"",elapsed:M,workspaceCwd:n}})}),!i&&(0,u.jsxs)("div",{className:`${Ie.lineMain} ${be?Ie.lineExpandable:""}`,title:F?void 0:oe?l(_?"tool.collapseHint":"tool.expand"):void 0,"aria-expanded":F?void 0:oe?_:void 0,role:be?"button":void 0,tabIndex:be?0:void 0,onClick:be?()=>{if(F){we();return}xe()}:void 0,onKeyDown:be?ne=>{if(!(ne.key!=="Enter"&&ne.key!==" ")){if(ne.preventDefault(),F){we();return}xe()}}:void 0,children:[(0,u.jsx)(Yz,{tool:e}),(0,u.jsx)(gp,{status:e.status}),(0,u.jsx)("span",{className:Ie.lineName,children:ue}),N&&he&&(0,u.jsxs)("span",{className:Ie.todoProgress,children:[ce,"/",ae.length]}),(0,u.jsx)(oh,{info:{kind:by(e),tool:e,displayName:ue,description:N||ct?"":K,elapsed:N?"":M,workspaceCwd:n}}),be&&(0,u.jsx)("span",{className:!F&&_?Ie.lineChevronDown:Ie.lineChevronRight,"aria-hidden":"true"})]}),h&&(!a||_)&&(0,u.jsx)(r3e,{display:h}),!h&&(!a||_)&&N&&he&&(0,u.jsx)(b3e,{tool:e,todos:ae,expanded:_,title:ue}),!h&&(!a||_)&&N&&!he&&Y&&(0,u.jsx)("div",{className:Ie.lineOutput,children:B5(Y,c)}),!h&&zt&&(0,u.jsx)(ch,{title:ue,detail:mt,status:e.status,children:Y&&(0,u.jsx)("div",{className:`${Ie.lineOutput} ${Ie.expandedLineOutput}`,children:B5(Y,c)})}),!h&&!N&&!s&&Y&&!zt&&(!_||!et)&&(!a||_)&&(0,u.jsx)("div",{className:_?`${Ie.lineOutput} ${Ie.expandedLineOutput}`:Ie.lineOutput,children:B5(Y,c)}),!h&&!N&&_&&et&&(!A||o)&&(0,u.jsx)("div",{className:A?`${Ie.lineDetail} ${Ie.workflowLineDetail}`:nt?`${Ie.lineDetail} ${Ie.markdownLineDetail}`:Ie.lineDetail,children:A?(0,u.jsx)(k3e,{tool:e,displayName:ue,detail:mt,result:Y}):le?(0,u.jsx)(ch,{title:ue,status:e.status,children:(0,u.jsx)(h3e,{tool:e})}):(0,u.jsxs)(ch,{title:ue,detail:mt,status:e.status,children:[Ho(de)&&(0,u.jsx)(m3e,{tool:e}),(de==="write_file"||de==="writefile")&&(0,u.jsx)(XB,{tool:e}),(de==="edit"||de==="write"||de==="editfile")&&(0,u.jsx)(XB,{tool:e}),jo(e.toolName)&&(0,u.jsx)(S3e,{tool:e}),n6(de)&&(0,u.jsx)(C3e,{tool:e})]})})]})},B3e),q3e=(0,x.memo)(function({isStreaming:e,expanded:t,documentMode:n,translateContent:a,generateContent:r,onToggle:o}){let{language:i,t:s}=lt();return(0,u.jsxs)("div",{className:`${Ie.chatSummaryThoughtHeader}${t?` ${Ie.chatSummaryThoughtHeaderExpanded}`:""}`,onClick:l=>{!n&&l.currentTarget.contains(l.target)&&o()},children:[(0,u.jsxs)("button",{type:"button",disabled:n,tabIndex:n?-1:void 0,className:Ie.chatSummaryThoughtSummary,"data-testid":"compact-thinking-summary","aria-expanded":n?void 0:t,title:n?void 0:s(t?"thinking.collapse":"thinking.expand"),children:[(0,u.jsx)("span",{className:Ie.chatSummaryThoughtIcon,"aria-hidden":"true",children:(0,u.jsx)(s6,{})}),(0,u.jsx)("span",{className:`${Ie.chatSummaryThoughtLabel}${e?` ${Ie.chatSummaryThoughtLabelActive}`:""}`,children:s(e?"thinking.running":"thinking.done")})]}),i==="zh-CN"&&a!==void 0&&r&&(0,u.jsx)(vq,{content:a,generateContent:r,className:Ie.chatSummaryThoughtTranslate}),(0,u.jsx)("span",{className:t?Ie.chatSummaryThoughtChevronDown:Ie.chatSummaryThoughtChevronRight,"aria-hidden":"true"})]})}),$5=(0,x.memo)(function({content:e,isStreaming:t,generateContent:n}){let a=qn()==="document",r=xy(),[o,i]=(0,x.useState)(!1),s=a?r:o,l=(0,x.useCallback)(()=>{a||i(c=>!c)},[a]);return(0,u.jsxs)("div",{className:Ie.chatSummaryThought,children:[(0,u.jsx)(q3e,{isStreaming:t,expanded:s,documentMode:a,translateContent:a||t?void 0:e,generateContent:n,onToggle:l}),s&&(0,u.jsx)("div",{className:Ie.chatSummaryThoughtContent,children:(0,u.jsx)(tl,{content:e,source:"thinking"})})]})}),z3e=(0,x.memo)(function({tools:e,compactSummary:t=!1,thoughts:n,pendingApproval:a,workspaceCwd:r,isLocateFlashing:o=!1,generateContent:i}){let{t:s}=lt(),l=qn()==="document",c=xy(),d=f6(),f=Oq(),p=f!==void 0,[m,h]=(0,x.useState)(!1),[g,y]=(0,x.useState)(!1),v=l?c:g,w=(0,x.useRef)(null),b=jC(e),I=e.find(ce=>Fa(ce.status)&&!yi(ce))??(e.length>0?L3e(e):void 0),_=e.length===1?e[0]:void 0,L=!!(n!=null&&n.length),S=_&&Mr(_)?_:void 0,C=_&&_.toolName.toLowerCase()==="monitor"?_:void 0,A=_?hh(_.rawOutput):void 0,E=A?.resourceUri,O=e.some(ce=>hh(ce.rawOutput)),D=e.some(ce=>t6(ce.toolName)),H=e.some(ce=>Fa(ce.status)&&!yi(ce)),W=n?.find(ce=>ce.isStreaming),Q=b&&H?!0:W!==void 0,j=!Q&&e.some(ce=>Fa(ce.status)&&yi(ce)),Y=!!(!t&&S&&d),K=!!(!t&&C&&p&&!m),ue=Y||K,M=!t&&S?Ji(S):void 0,de=b?I??e[0]:e[0],F=a?.toolCallId&&e.some(ce=>bi(ce,a.toolCallId)),N=new Map,ae=new Set;for(let ce=0;t&&ce<e.length;ce++){if(!Mr(e[ce]))continue;let X=ce+1;for(;X<e.length&&Mr(e[X]);)X++;if(X-ce>=2){let ie=e.slice(ce,X);N.set(ie[0].callId,ie);for(let le of ie.slice(1))ae.add(le.callId)}ce=X-1}(0,x.useEffect)(()=>{h(!1),y(!1),w.current=null},[p,C?.callId]),(0,x.useEffect)(()=>{(E||O)&&y(!0)},[E,O]);let he=()=>{!C||!f||Gz(w,()=>f.onOpen(C),()=>{h(!0),y(ce=>!ce)})};return F?(0,u.jsx)("div",{className:`${Ie.group}${o?` ${nl.flash}`:""}`,children:e.map(ce=>(0,u.jsx)(OC,{tool:ce,approval:a,workspaceCwd:r,forceExpanded:l},ce.callId))}):(0,u.jsxs)("div",{className:o?nl.flash:void 0,children:[(0,u.jsxs)("button",{type:"button",disabled:l,"aria-disabled":!!M||void 0,tabIndex:l?-1:void 0,className:Ie.chatSummary,onClick:()=>{if(!(l||M)){if(Y&&S&&d){d.onOpen(S);return}if(K&&C&&f){he();return}y(ce=>!ce)}},"aria-expanded":l||ue?void 0:g,title:M?s(M):l||ue?void 0:s(v?"tool.collapseHint":"tool.expand"),children:[(0,u.jsx)("span",{className:j?`${Ie.chatSummaryIcon} ${Ie.chatSummaryIconDetached}`:Ie.chatSummaryIcon,"aria-hidden":"true",children:W?(0,u.jsx)(s6,{}):de?(0,u.jsx)(Yz,{tool:de}):(0,u.jsx)(Qz,{})}),(0,u.jsx)("span",{className:Q?`${Ie.chatSummaryText} ${Ie.chatSummaryTextActive}`:Ie.chatSummaryText,children:W?s("thinking.running"):_?(0,u.jsx)(E3e,{tool:_,workspaceCwd:r}):A3e(e,s,r,t)}),(0,u.jsx)("span",{className:v?Ie.chatChevronDown:Ie.chatChevronRight,"aria-hidden":"true"})]}),(v||O||D)&&(0,u.jsx)("div",{"aria-hidden":!v,ref:ce=>{ce?.toggleAttribute("inert",!v)},className:v?Ie.chatSummaryContentClip:`${Ie.chatSummaryContentClip} ${Ie.chatSummaryContentCollapsed}`,style:!v&&O&&!D?{display:"none"}:void 0,children:(0,u.jsx)("div",{className:Ie.chatSummaryContentInner,children:(0,u.jsxs)("div",{className:`${Ie.group} ${Ie.chatSummaryGroup}`,children:[e.map(ce=>{if(ae.has(ce.callId))return null;let X=N.get(ce.callId);return(0,u.jsxs)(x.Fragment,{children:[n?.filter(ie=>ie.beforeToolCallId===ce.callId).map((ie,le)=>(0,u.jsx)($5,{content:ie.content,isStreaming:ie.isStreaming,generateContent:i},`thought-${ce.callId}-${le}`)),X?(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{className:Ie.chatSummaryParallelAgents,"data-testid":"compact-parallel-agents",children:(0,u.jsx)(Rq,{agents:X,pendingApproval:a})}),X.slice(1).flatMap(ie=>n?.filter(le=>le.beforeToolCallId===ie.callId).map((le,J)=>(0,u.jsx)($5,{content:le.content,isStreaming:le.isStreaming,generateContent:i},`thought-${ie.callId}-${J}`)))]}):(0,u.jsx)(OC,{tool:ce,approval:a,workspaceCwd:r,summaryOnly:!_||L,forceExpanded:l||!!_&&!L,detailsVisible:v,hideHeader:!!_&&!L})]},ce.callId)}),n?.filter(ce=>ce.beforeToolCallId===void 0).map((ce,X)=>(0,u.jsx)($5,{content:ce.content,isStreaming:ce.isStreaming,generateContent:i},`thought-trailing-${X}`))]})})})]})}),U6="summary-",Jz=e=>`${U6}${e}`,eF=e=>e.startsWith(U6),tF=e=>eF(e)?e.slice(U6.length):void 0,F3e="_message_1ujhf_1",U3e="_header_1ujhf_6",H3e="_headerStatic_1ujhf_7",j3e="_chevron_1ujhf_24",W3e="_title_1ujhf_30",G3e="_progress_1ujhf_39",yc={message:F3e,header:U3e,headerStatic:H3e,chevron:j3e,title:W3e,progress:G3e};function V3e({id:e,todos:t}){var n;let a=((n=(0,x.useContext)(UC).get(e))==null?void 0:n.events)??[];return(0,u.jsx)(Dq,{todos:t,events:a})}var X3e=(0,x.memo)(function({id:e,todos:t,isLocateFlashing:n=!1}){let{t:a}=lt(),r=qn()==="document",o=xy(),[i,s]=(0,x.useState)(!1);if(t.length===0)return null;let l=r?o:i,c=t.length,d=t.filter(f=>f.status==="completed").length;return(0,u.jsxs)("div",{className:`${yc.message}${n?` ${nl.flash}`:""}`,children:[r?(0,u.jsxs)("div",{className:yc.headerStatic,children:[(0,u.jsx)("span",{className:yc.title,children:a("plan.title")}),(0,u.jsxs)("span",{className:yc.progress,children:[d,"/",c]})]}):(0,u.jsxs)("button",{type:"button",className:yc.header,onClick:()=>s(f=>!f),"aria-expanded":i,title:a(i?"todo.collapse":"todo.expand"),children:[(0,u.jsx)("span",{className:yc.chevron,"aria-hidden":"true",children:i?"\u25BE":"\u25B8"}),(0,u.jsx)("span",{className:yc.title,children:a("plan.title")}),(0,u.jsxs)("span",{className:yc.progress,children:[d,"/",c]})]}),l?(0,u.jsx)(Bq,{todos:t,numbered:!0}):(0,u.jsx)(V3e,{id:e,todos:t})]})}),K3e="_message_1abcu_1",Z3e="_content_1abcu_11",Q3e="_question_1abcu_17",Y3e="_prefix_1abcu_24",J3e="_answer_1abcu_28",eSe="_pending_1abcu_32",tSe="_shortcuts_1abcu_36",Vu={message:K3e,content:Z3e,question:Q3e,prefix:Y3e,answer:J3e,pending:eSe,shortcuts:tSe},nSe=(0,x.memo)(function({question:e,answer:t,isPending:n}){let{t:a}=lt();return(0,u.jsxs)("div",{className:Vu.message,children:[(0,u.jsxs)("div",{className:Vu.content,children:[(0,u.jsxs)("div",{className:Vu.question,children:[(0,u.jsx)("span",{className:Vu.prefix,children:"/btw "}),(0,u.jsx)("span",{children:e})]}),(0,u.jsx)("div",{className:Vu.answer,children:n?(0,u.jsx)("span",{className:Vu.pending,children:a("btw.answering")}):(0,u.jsx)(tl,{content:t})})]}),(0,u.jsx)("div",{className:Vu.shortcuts,children:a(n?"btw.shortcuts.pending":"btw.shortcuts.done")})]})}),aSe="_message_1g0wi_1",rSe="_header_1g0wi_21",oSe="_status_1g0wi_30",iSe="_name_1g0wi_35",sSe="_command_1g0wi_42",lSe="_output_1g0wi_51",cp={message:aSe,header:rSe,status:oSe,name:iSe,command:sSe,output:lSe},cSe=(0,x.memo)(function({command:e,output:t}){let{t:n}=lt();return(0,u.jsxs)("div",{className:cp.message,children:[(0,u.jsxs)("div",{className:cp.header,children:[(0,u.jsx)("span",{className:cp.status,children:"\u2713"}),(0,u.jsx)("span",{className:cp.name,children:n("shell.command")}),e&&(0,u.jsx)("span",{className:cp.command,children:e})]}),t&&(0,u.jsx)("pre",{className:cp.output,children:t})]})}),uSe="_progress_1ik59_1",dSe="_spinner_1ik59_12",fSe="_bar_1ik59_19",pSe="_stage_1ik59_25",mSe="_icon_1ik59_29",hSe="_done_1ik59_35",gSe="_error_1ik59_43",vSe="_detail_1ik59_51",wSe="_path_1ik59_56",ySe="_pathButton_1ik59_61",Ea={progress:uSe,spinner:dSe,bar:fSe,stage:pSe,icon:mSe,done:hSe,error:gSe,detail:vSe,path:wSe,pathButton:ySe},QB=["\u280B","\u2819","\u2839","\u2838","\u283C","\u2834","\u2826","\u2827"];function bSe({progress:e}){let{stage:t,progress:n,detail:a,isComplete:r,error:o}=e,[i,s]=(0,x.useState)(0),l=30,c=Math.round(n/100*l),d=l-c,f="\u2588".repeat(Math.max(0,c))+"\u2591".repeat(Math.max(0,d));return(0,x.useEffect)(()=>{if(r||o)return;let p=setInterval(()=>{s(m=>(m+1)%QB.length)},120);return()=>clearInterval(p)},[r,o]),o?(0,u.jsxs)("div",{className:`${Ea.progress} ${Ea.error}`,children:[(0,u.jsx)("span",{className:Ea.icon,children:"\u2715"}),(0,u.jsx)("span",{className:Ea.stage,children:t}),(0,u.jsx)("div",{className:Ea.detail,children:o})]}):r?(0,u.jsxs)("div",{className:`${Ea.progress} ${Ea.done}`,children:[(0,u.jsx)("span",{className:Ea.icon,children:"\u2713"}),(0,u.jsx)("span",{className:Ea.stage,children:t})]}):(0,u.jsxs)("div",{className:Ea.progress,children:[(0,u.jsx)("span",{className:Ea.spinner,children:QB[i]}),(0,u.jsx)("span",{className:Ea.bar,children:f}),(0,u.jsxs)("span",{className:Ea.stage,children:[t,a?` (${a})`:""]})]})}function kSe({path:e,onInsightReportOpen:t}){let{t:n}=lt();return(0,u.jsxs)("div",{className:`${Ea.progress} ${Ea.done}`,children:[(0,u.jsx)("span",{className:Ea.icon,children:"\u2713"}),(0,u.jsx)("span",{className:Ea.stage,children:n("insight.ready")}),t?(0,u.jsx)("button",{type:"button",className:`${Ea.path} ${Ea.pathButton}`,onClick:()=>t(e),children:e}):(0,u.jsx)("span",{className:Ea.path,children:e})]})}var xSe=(0,x.memo)(function({message:e,pendingApproval:t,onShowContextDetail:n,onImagePreview:a,onAttachmentPreview:r,onInsightReportOpen:o,workspaceCwd:i,showRetryHint:s=!1,onRetryClick:l,sendFailed:c=!1,onRetrySend:d,onEditUserMessage:f,onBranchSession:p,branchRecordId:m,showAssistantActions:h=!1,showAssistantBranch:g=!1,isLocateFlashing:y=!1,assistantTurnFooterInfo:v,generateContent:w}){let{t:b}=lt(),I=(0,x.useMemo)(()=>p&&m?()=>p(m):void 0,[p,m]),_=(0,x.useContext)(FC),L=e.role==="tool_group"&&e.tools.length===1&&e6(e.tools[0])?e.tools[0]:void 0,S=L?Sue(L):null,C=!!S||e.role==="user"||e.role==="system"&&e.source==="mid_turn_message_injected",A=(()=>{var D;switch(e.role){case"user":return(0,u.jsx)(sq,{content:e.content,images:e.images,files:e.files,inputAnnotations:e.inputAnnotations,isLocateFlashing:y,sendFailed:c,onRetrySend:d,onEdit:f,onImagePreview:a,onAttachmentPreview:r});case"assistant":return(0,u.jsx)(rde,{content:e.content,isStreaming:e.isStreaming,timestamp:e.timestamp,onBranchSession:I,showFooterActions:h,showBranchAction:g,isLocateFlashing:y,customFooterInfo:v});case"thinking":return(0,u.jsx)(ude,{content:e.content,isStreaming:e.isStreaming,timestamp:e.timestamp,isLocateFlashing:y,generateContent:w});case"tool_group":return L&&!S&&!((D=kp(L))!=null&&D.trim())?null:S&&L?!S.answers.length&&!S.text.trim()?null:(0,u.jsx)(bue,{tool:L,result:S,isLocateFlashing:y}):(0,u.jsx)(z3e,{tools:e.tools,thoughts:e.thoughts,compactSummary:_&&eF(e.id),pendingApproval:t,workspaceCwd:i,isLocateFlashing:y,generateContent:w});case"plan":return(0,u.jsx)(X3e,{id:e.id,todos:e.todos,isLocateFlashing:y});case"system":return(0,u.jsx)(jge,{content:e.content,variant:e.variant,source:e.source,data:e.data,images:e.images,files:e.files,onShowContextDetail:n,onImagePreview:a,onAttachmentPreview:r,showRetryHint:s&&e.retryable===!0,onRetryClick:l});case"user_shell":return(0,u.jsx)(cSe,{command:e.command,output:e.output});case"btw":return(0,u.jsx)(nSe,{question:e.question,answer:e.answer,isPending:e.isPending});case"insight_progress":return(0,u.jsx)(bSe,{progress:{stage:e.stage,progress:e.progress,detail:e.detail}});case"insight_ready":return(0,u.jsx)(kSe,{path:e.path,onInsightReportOpen:o});case"insight_error":return(0,u.jsx)("div",{style:{color:"var(--error-color, #e06c75)"},children:e.error});default:return null}})();if(A===null)return null;let E=(0,u.jsx)(vp,{label:`message:${e.role}`,resetKeys:[e],fallback:(0,u.jsx)(SSe,{align:C?"end":"start"}),children:A}),O=(0,u.jsx)("div",{"data-user-selectable":"true",style:{display:"contents"},children:E});return e.role==="assistant"?h?O:(0,u.jsx)(Y5,{timestamp:e.timestamp,children:O}):e.role==="system"&&e.source==="prompt_cancelled"?O:(0,u.jsx)(Y5,{timestamp:e.timestamp,chatMode:C,toolGroupSpacing:e.role==="tool_group"&&_,copyText:C&&"content"in e?e.content:void 0,copyTitle:b("common.copy"),children:O})},CSe);function SSe({align:e}){let{t}=lt();return(0,u.jsx)("div",{role:"alert",style:{display:"flex",justifyContent:e==="end"?"flex-end":"flex-start"},children:(0,u.jsx)("span",{style:{color:"var(--error-color, #e06c75)",fontSize:"0.85em",opacity:.85},children:t("message.renderError")})})}function CSe(e,t){var n,a;return((n=e.pendingApproval)==null?void 0:n.id)!==((a=t.pendingApproval)==null?void 0:a.id)||e.onShowContextDetail!==t.onShowContextDetail||e.onImagePreview!==t.onImagePreview||e.onAttachmentPreview!==t.onAttachmentPreview||e.workspaceCwd!==t.workspaceCwd||e.showRetryHint!==t.showRetryHint||e.onRetryClick!==t.onRetryClick||e.sendFailed!==t.sendFailed||e.onRetrySend!==t.onRetrySend||e.onEditUserMessage!==t.onEditUserMessage||e.onInsightReportOpen!==t.onInsightReportOpen||e.onBranchSession!==t.onBranchSession||e.branchRecordId!==t.branchRecordId||e.showAssistantActions!==t.showAssistantActions||e.showAssistantBranch!==t.showAssistantBranch||e.isLocateFlashing!==t.isLocateFlashing||e.generateContent!==t.generateContent||!TSe(e.assistantTurnFooterInfo,t.assistantTurnFooterInfo)?!1:ISe(e.message,t.message)}function TSe(e,t){return e===t?!0:!e||!t?!1:e.turnId===t.turnId&&e.message.id===t.message.id&&e.message.content===t.message.content&&e.message.isStreaming===t.message.isStreaming&&e.message.timestamp===t.message.timestamp}function ISe(e,t){if(e===t)return!0;if(e.id!==t.id||e.role!==t.role||e.timestamp!==t.timestamp)return!1;switch(e.role){case"user":return t.role==="user"&&e.content===t.content&&JB(e.images,t.images);case"assistant":return t.role==="assistant"&&e.content===t.content&&e.isStreaming===t.isStreaming;case"thinking":return t.role==="thinking"&&e.content===t.content&&e.isStreaming===t.isStreaming;case"system":return t.role==="system"&&e.content===t.content&&e.variant===t.variant&&e.retryable===t.retryable&&e.source===t.source&&e.data===t.data&&JB(e.images,t.images);case"user_shell":return t.role==="user_shell"&&e.command===t.command&&e.output===t.output&&e.cwd===t.cwd;case"btw":return t.role==="btw"&&e.question===t.question&&e.answer===t.answer&&e.isPending===t.isPending;case"insight_progress":return t.role==="insight_progress"&&e.stage===t.stage&&e.progress===t.progress&&e.detail===t.detail;case"insight_ready":return t.role==="insight_ready"&&e.path===t.path;case"insight_error":return t.role==="insight_error"&&e.error===t.error;case"plan":return t.role==="plan"&&_Se(e.todos,t.todos);case"tool_group":return t.role==="tool_group"&&LSe(e.thoughts,t.thoughts)&&e.tools.length===t.tools.length&&e.tools.every((n,a)=>nF(n,t.tools[a]));default:return!1}}function _Se(e,t){return e.length===t.length&&e.every((n,a)=>{let r=t[a];return r&&n.id===r.id&&n.content===r.content&&n.status===r.status&&n.priority===r.priority})}function nF(e,t){return t?e.callId===t.callId&&e.toolName===t.toolName&&e.status===t.status&&e.subagentSessionReady===t.subagentSessionReady&&e.title===t.title&&e.kind===t.kind&&e.startTime===t.startTime&&e.endTime===t.endTime&&e.subContent===t.subContent&&bc(e.args)===bc(t.args)&&bc(e.rawOutput)===bc(t.rawOutput)&&bc(e.locations)===bc(t.locations)&&bc(e.content)===bc(t.content)&&ASe(e.subTools,t.subTools):!1}function LSe(e,t){return e===t?!0:!e||!t||e.length!==t.length?!1:e.every((n,a)=>{var r,o,i;return n.content===((r=t[a])==null?void 0:r.content)&&n.isStreaming===((o=t[a])==null?void 0:o.isStreaming)&&n.beforeToolCallId===((i=t[a])==null?void 0:i.beforeToolCallId)})}function ASe(e,t){return!e&&!t?!0:!e||!t||e.length!==t.length?!1:e.every((n,a)=>nF(n,t[a]))}var YB=new WeakMap;function JB(e,t){return e===t?!0:!e||!t||e.length!==t.length?!1:e.every((n,a)=>n.data===t[a].data&&n.mimeType===t[a].mimeType)}function bc(e){if(e===void 0)return"";if(e!==null&&typeof e=="object"){let t=YB.get(e);if(t!==void 0)return t;try{t=JSON.stringify(e)}catch{t=String(e)}return YB.set(e,t),t}try{return JSON.stringify(e)}catch{return String(e)}}function e$({additions:e,deletions:t,className:n,additionsClassName:a,deletionsClassName:r}){return e===void 0||t===void 0?null:(0,u.jsxs)("span",{className:n,children:[(0,u.jsxs)("span",{className:a,children:["+",e]}),(0,u.jsxs)("span",{className:r,children:["-",t]})]})}function ESe(e){if(!e.some(t=>t.additions===void 0||t.deletions===void 0))return e.reduce((t,n)=>({additions:t.additions+(n.additions??0),deletions:t.deletions+(n.deletions??0)}),{additions:0,deletions:0})}function RSe(e,t){if(!e||!t)return;let n=e.workspaces;if(n){let a=n.filter(o=>o.cwd===t),r=a[0];return a.length!==1||!(r!=null&&r.id)||r.trusted!==!0||n.filter(o=>o.id===r.id).length!==1||r.primary!==(r.cwd===e.workspaceCwd)?void 0:MSe(r)}if(e.workspaceCwd===t)return{cwd:t,primary:!0}}function MSe(e){return{cwd:e.cwd,id:e.id,primary:e.primary}}function NSe(e,t){return e?.cwd===t.cwd&&e.id===t.id&&e.primary===t.primary}function PSe(e){var t;let n=l6(),a=Gfe(),r=(0,x.useMemo)(()=>RSe(n.capabilities,e),[n.capabilities,e]),o=(0,x.useRef)(void 0);r?NSe((t=o.current)==null?void 0:t.owner,r)||(o.current={owner:r}):o.current=void 0;let i=o.current,s=(0,x.useRef)(void 0);(0,x.useEffect)(()=>{if(!i){s.current=void 0;return}let c={};return s.current=c,()=>{queueMicrotask(()=>{s.current===c&&o.current===i&&(o.current=void 0)})}},[i]);let l=(0,x.useMemo)(()=>{if(!i)return;let c=i,d=()=>{let p=o.current;if(p!==c)throw new Error("Workspace artifact owner is no longer available");return p.owner},f=p=>{let m=d();if(m.id!==p)throw new Error("Scheduled task workspace owner no longer matches");return m};return{async readWorkspaceFile(p){let m=d(),h=await(m.primary?a.readWorkspaceFile(p):n.client.workspaceByCwd(m.cwd).readWorkspaceFile(p));return d(),h},async readFileBytes(p,m){let h=d(),g=await(h.primary?a.readFileBytes(p,m):n.client.workspaceByCwd(h.cwd).readWorkspaceFileBytes(p,m));return d(),g},async stat(p){let m=d(),h=await(m.primary?a.stat(p):n.client.workspaceByCwd(m.cwd).fileStat(p));return d(),h},async listScheduledTasks(p){f(p);let m=await a.listScheduledTasks(p);return f(p),m},async updateScheduledTask(p,m,h){f(h);let g=await a.updateScheduledTask(p,m,h);return f(h),g},async deleteScheduledTask(p,m){f(m),await a.deleteScheduledTask(p,m),f(m)}}},[i,a,n.client]);if(!(!i||!l))return{workspaceCwd:i.owner.cwd,...i.owner.id?{workspaceId:i.owner.id}:{},actions:l}}var OSe="_root_n9pre_1",DSe="_card_n9pre_7",BSe="_summary_n9pre_14",$Se="_icon_n9pre_22",qSe="_iconSvg_n9pre_33",zSe="_title_n9pre_39",FSe="_reviewSummary_n9pre_46",USe="_reviewSummaryWithStats_n9pre_53",HSe="_reviewMeta_n9pre_58",jSe="_linkButton_n9pre_65",WSe="_reviewButton_n9pre_66",GSe="_showMoreButton_n9pre_67",VSe="_actions_n9pre_96",XSe="_openButtonWrapper_n9pre_102",KSe="_list_n9pre_126",ZSe="_fileRow_n9pre_133",QSe="_path_n9pre_153",YSe="_lineStats_n9pre_162",JSe="_additions_n9pre_171",e5e="_deletions_n9pre_175",t5e="_chevronIcon_n9pre_189",n5e="_chevronIconOpen_n9pre_197",a5e="_artifactInfo_n9pre_201",r5e="_artifactMeta_n9pre_206",St={root:OSe,card:DSe,summary:BSe,icon:$Se,iconSvg:qSe,title:zSe,reviewSummary:FSe,reviewSummaryWithStats:USe,reviewMeta:HSe,linkButton:jSe,reviewButton:WSe,showMoreButton:GSe,actions:VSe,openButtonWrapper:XSe,list:KSe,fileRow:ZSe,path:QSe,lineStats:YSe,additions:JSe,deletions:e5e,chevronIcon:t5e,chevronIconOpen:n5e,artifactInfo:a5e,artifactMeta:r5e},DC=3;function t$(e,t){return t?e:e.slice(0,DC)}function o5e({turnId:e,changes:t,artifacts:n,scheduledTasks:a,workspaceCwd:r,onOpenRequest:o,onReviewChanges:i,onOpenArtifact:s,onOpenScheduledTask:l,onError:c}){let{t:d}=lt(),f=PSe(r),p=f?.actions,[m,h]=(0,x.useState)(!1),[g,y]=(0,x.useState)(!1);if(t.length===0&&n.length===0&&a.length===0)return null;let v=t$(t,m),w=t.length-DC,b=t$(n,g),I=n.length-DC,_=ESe(t),L=A=>{if(o){o({id:"review",kind:"review",title:d("turnOutputs.review"),turnId:e,changes:t,...r?{workspaceCwd:r}:{},...f!=null&&f.workspaceId?{workspaceId:f.workspaceId}:{},...A?{selectedPath:A}:{}});return}i(t,A)},S=A=>{let E=u5e(A,t,r);if(o){o({id:`artifact:${A.id}`,kind:"artifact",title:A.title??"Artifact",turnId:e,artifactId:A.id,...A.managedId?{managedId:A.managedId}:{},artifact:A,...r?{workspaceCwd:r}:{},...f!=null&&f.workspaceId?{workspaceId:f.workspaceId}:{},...E!==void 0?{previewContent:E}:{}});return}s(A.id,E)},C=A=>{if(o){o({id:`scheduled-task:${A.toolCallId}`,kind:"scheduled_task",title:d("scheduledTasks.title"),turnId:e,task:f!=null&&f.workspaceId?{...A,workspaceId:f.workspaceId}:A,...r?{workspaceCwd:r}:{},...f!=null&&f.workspaceId?{workspaceId:f.workspaceId}:{}});return}l(A)};return(0,u.jsxs)("div",{className:St.root,children:[t.length>0&&(0,u.jsxs)("div",{className:St.card,children:[(0,u.jsxs)("div",{className:St.summary,children:[(0,u.jsx)("span",{className:St.icon,"aria-hidden":"true",children:(0,u.jsxs)("svg",{viewBox:"0 0 24 24",fill:"none",focusable:"false",className:St.iconSvg,children:[(0,u.jsx)("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2",stroke:"currentColor",strokeWidth:"1.6"}),(0,u.jsx)("path",{d:"M9 9.5h6M12 6.5v6",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"}),(0,u.jsx)("path",{d:"M9 16h6",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}),(0,u.jsxs)("div",{className:[St.reviewSummary,_?St.reviewSummaryWithStats:""].filter(Boolean).join(" "),children:[(0,u.jsx)("div",{className:St.title,children:d("turnOutputs.filesEdited",{count:t.length})}),(0,u.jsxs)("div",{className:St.reviewMeta,children:[(0,u.jsx)(e$,{additions:_?.additions,deletions:_?.deletions,className:St.lineStats,additionsClassName:St.additions,deletionsClassName:St.deletions}),(0,u.jsxs)("button",{type:"button",className:St.linkButton,onClick:()=>L(),children:[d("turnOutputs.viewChanges")," \u2197"]})]})]}),(0,u.jsx)("div",{className:St.actions,children:(0,u.jsx)("button",{type:"button",className:St.reviewButton,onClick:()=>L(),children:d("turnOutputs.review")})})]}),(0,u.jsxs)("div",{className:St.list,children:[v.map(A=>(0,u.jsxs)("button",{type:"button",className:St.fileRow,onClick:()=>L(A.path),title:A.path,children:[(0,u.jsx)("span",{className:St.path,children:g5e(A.path,r)}),(0,u.jsx)(e$,{additions:A.additions,deletions:A.deletions,className:St.lineStats,additionsClassName:St.additions,deletionsClassName:St.deletions})]},`${A.toolCallId}:${A.path}`)),w>0&&(0,u.jsxs)("button",{type:"button",className:St.showMoreButton,onClick:()=>h(A=>!A),children:[(0,u.jsx)("span",{children:m?d("turnOutputs.collapseFiles"):d("turnOutputs.showMoreFiles",{count:w})}),(0,u.jsx)(n$,{open:m})]})]})]}),b.map(A=>(0,u.jsx)(i5e,{artifact:A,onOpen:aF(A)?()=>S(A):void 0,onError:c,onDownload:m5e(A)&&p?E=>Poe(p,A.workspacePath,A.mimeType,E):void 0},A.id)),I>0&&(0,u.jsxs)("button",{type:"button",className:St.showMoreButton,onClick:()=>y(A=>!A),children:[(0,u.jsx)("span",{children:g?d("turnOutputs.collapseArtifacts"):d("turnOutputs.showMoreArtifacts",{count:I})}),(0,u.jsx)(n$,{open:g})]}),a.map(A=>(0,u.jsx)(s5e,{task:A,scheduleLabel:B$(A.cron,d),onOpen:()=>C(A)},A.toolCallId))]})}function i5e({artifact:e,onOpen:t,onDownload:n,onError:a}){let{t:r}=lt(),[o,i]=(0,x.useState)(!1),s=(0,x.useRef)(!0);(0,x.useEffect)(()=>(s.current=!0,()=>{s.current=!1}),[]);let l=Loe(e.sizeBytes),c=h5e(e,r),d=e.workspacePath&&sy(e.workspacePath).split("/").at(-1)||e.title,f=async()=>{if(!(!n||o)){i(!0);try{await n(()=>!s.current)}catch(p){if(!s.current)return;let m=r("common.downloadFailed",{message:ly(p)});a?a(new Error(m,{cause:p}),m):console.error(m,p)}finally{i(!1)}}};return(0,u.jsx)("div",{className:St.card,children:(0,u.jsxs)("div",{className:St.summary,children:[(0,u.jsx)("span",{className:St.icon,"aria-hidden":"true",children:(0,u.jsx)($oe,{artifact:e,className:St.iconSvg})}),(0,u.jsxs)("div",{className:St.artifactInfo,children:[(0,u.jsx)("div",{className:St.title,children:e.title}),(0,u.jsx)("div",{className:St.artifactMeta,children:[_oe(e),l].filter(Boolean).join(" \xB7 ")})]}),(0,u.jsxs)("div",{className:St.actions,children:[n&&(0,u.jsxs)("button",{type:"button",className:St.reviewButton,onClick:()=>void f(),title:`${r("common.download")} ${d}`,disabled:o,children:[(0,u.jsx)(Gm,{size:16,strokeWidth:1.8,"aria-hidden":"true"}),r(o?"common.downloading":"common.download")]}),(0,u.jsx)("span",{className:St.openButtonWrapper,title:c??e.title,children:(0,u.jsxs)("button",{type:"button",className:St.reviewButton,onClick:t,disabled:!t,children:[(0,u.jsx)(Xl,{size:16,strokeWidth:1.8,"aria-hidden":"true"}),r("common.open")]})})]})]})})}function s5e({task:e,scheduleLabel:t,onOpen:n}){let{t:a}=lt();return(0,u.jsx)("div",{className:St.card,children:(0,u.jsxs)("div",{className:St.summary,children:[(0,u.jsx)("span",{className:St.icon,"aria-hidden":"true",children:(0,u.jsx)(l5e,{})}),(0,u.jsxs)("div",{className:St.artifactInfo,children:[(0,u.jsx)("div",{className:St.title,children:e.title}),(0,u.jsx)("div",{className:St.artifactMeta,children:[t,e.recurring?a("scheduledTasks.repeats"):a("scheduledTasks.runsOnce")].filter(Boolean).join(" \xB7 ")})]}),(0,u.jsx)("div",{className:St.actions,children:(0,u.jsx)("button",{type:"button",className:St.reviewButton,onClick:n,title:e.title,children:a("common.open")})})]})})}function l5e(){return(0,u.jsxs)("svg",{className:St.iconSvg,viewBox:"0 0 24 24",fill:"none",focusable:"false","aria-hidden":"true",children:[(0,u.jsx)("rect",{x:"4",y:"4",width:"16",height:"16",rx:"3",stroke:"currentColor",strokeWidth:"1.8"}),(0,u.jsx)("path",{d:"M12 8v4l3 2",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]})}function n$({open:e}){return(0,u.jsx)("svg",{className:[St.chevronIcon,e?St.chevronIconOpen:""].filter(Boolean).join(" "),viewBox:"0 0 16 16",fill:"none",focusable:"false","aria-hidden":"true",children:(0,u.jsx)("path",{d:"m4 6 4 4 4-4",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}var c5e=(0,x.memo)(o5e);function u5e(e,t,n){if(!f5e(e)||!e.workspacePath)return;let a=t.find(r=>Ooe(r.path,e.workspacePath,n));if(a)return d5e(a)}function d5e(e){for(let t=e.diffs.length-1;t>=0;t--){let n=e.diffs[t];if(n!=null&&n.fullContent)return n.newText}}function f5e(e){var t,n;let a=((t=e.workspacePath)==null?void 0:t.toLowerCase())??"",r=((n=e.mimeType)==null?void 0:n.toLowerCase())??"";return e.kind==="html"||p5e(a)||r==="text/html"||r==="text/markdown"}function p5e(e){let t=e.toLowerCase();return t.endsWith(".html")||t.endsWith(".htm")||t.endsWith(".md")||t.endsWith(".markdown")||Moe(t)!==void 0}function m5e(e){return e.storage==="workspace"&&e.status==="available"&&!!e.workspacePath}function aF(e){return e.storage!=="workspace"?!0:e.status==="available"||e.status==="changed"}function h5e(e,t){if(!aF(e))return e.workspacePath?t("turnOutputs.artifactUnavailable",{path:e.workspacePath}):t("turnOutputs.artifactMissing")}function g5e(e,t){return J5(e,t)}function v5e(e,t){let[n,a]=(0,x.useState)(!1);return(0,x.useLayoutEffect)(()=>{let r=e.current;if(!r||!t){a(!1);return}let o=r.closest("[data-history-viewport]")??r,i=()=>{let d=Number.parseFloat(getComputedStyle(r).getPropertyValue("--chat-regular-content-width"))||1e3;a(o.getBoundingClientRect().width>=d)};i();let s=typeof ResizeObserver>"u"?null:new ResizeObserver(i);s?.observe(o);let l=r.closest("[data-web-shell-root]"),c=new MutationObserver(i);return l&&c.observe(l,{attributes:!0,attributeFilter:["style"]}),()=>{s?.disconnect(),c.disconnect()}},[e,t]),n}var w5e="_collapseRow_d7f01_1",y5e="_collapseRowClickable_d7f01_14",b5e="_collapseLabel_d7f01_19",k5e="_processedLabel_d7f01_36",x5e="_processedMeta_d7f01_43",S5e="_hiddenMetrics_d7f01_47",C5e="_summaryMetrics_d7f01_51",T5e="_collapseIcon_d7f01_59",I5e="_chevronRight_d7f01_72",_5e="_chevronDown_d7f01_73",wi={collapseRow:w5e,collapseRowClickable:y5e,collapseLabel:b5e,processedLabel:k5e,processedMeta:x5e,hiddenMetrics:S5e,summaryMetrics:C5e,collapseIcon:T5e,chevronRight:I5e,chevronDown:_5e},L5e="_list_16t54_1",A5e="_listWithWelcomeHeader_16t54_12",E5e="_historyStatus_16t54_32",R5e="_historyRetryButton_16t54_38",M5e="_virtualSizer_16t54_64",N5e="_virtualRow_16t54_73",P5e="_loadingSkeleton_16t54_83",O5e="_srOnly_16t54_91",D5e="_loadingSkeletonUserRow_16t54_103",B5e="_loadingSkeletonAssistantRow_16t54_109",$5e="_loadingSkeletonUserBubble_16t54_115",q5e="_loadingSkeletonUserBubbleCompact_16t54_116",z5e="_loadingSkeletonAssistantBlock_16t54_130",F5e="_loadingSkeletonLineWide_16t54_138",U5e="_loadingSkeletonLineMedium_16t54_139",H5e="_loadingSkeletonLineShort_16t54_140",j5e="_loadingSkeletonLineNarrow_16t54_141",W5e="_turnStatusRow_16t54_181",G5e="_turnAnswerRow_16t54_182",V5e="_turnContentRow_16t54_193",X5e="_sessionTimelineLayer_16t54_197",K5e="_sessionTimelinePanel_16t54_210",Z5e="_sessionTimelineViewport_16t54_226",Q5e="_sessionTimelineList_16t54_274",Y5e="_sessionTimelineItem_16t54_284",J5e="_sessionTimelineButton_16t54_289",eCe="_sessionTimelineTick_16t54_309",tCe="_sessionTimelineButtonInRange_16t54_397",nCe="_sessionTimelineButtonCurrent_16t54_401",aCe="_sessionTimelineDetails_16t54_412",rCe="_sessionTimelineDetailsTitle_16t54_450",oCe="_sessionTimelineDetailsIcon_16t54_457",iCe="_sessionTimelineDetailsTitleText_16t54_469",sCe="_sessionTimelineDetailsDetail_16t54_479",Lt={list:L5e,listWithWelcomeHeader:A5e,historyStatus:E5e,historyRetryButton:R5e,virtualSizer:M5e,virtualRow:N5e,loadingSkeleton:P5e,srOnly:O5e,loadingSkeletonUserRow:D5e,loadingSkeletonAssistantRow:B5e,loadingSkeletonUserBubble:$5e,loadingSkeletonUserBubbleCompact:q5e,loadingSkeletonAssistantBlock:z5e,loadingSkeletonLineWide:F5e,loadingSkeletonLineMedium:U5e,loadingSkeletonLineShort:H5e,loadingSkeletonLineNarrow:j5e,turnStatusRow:W5e,turnAnswerRow:G5e,turnContentRow:V5e,sessionTimelineLayer:X5e,sessionTimelinePanel:K5e,sessionTimelineViewport:Z5e,sessionTimelineList:Q5e,sessionTimelineItem:Y5e,sessionTimelineButton:J5e,sessionTimelineTick:eCe,sessionTimelineButtonInRange:tCe,sessionTimelineButtonCurrent:nCe,sessionTimelineDetails:aCe,sessionTimelineDetailsTitle:rCe,sessionTimelineDetailsIcon:oCe,sessionTimelineDetailsTitleText:iCe,sessionTimelineDetailsDetail:sCe},q5=()=>{},lCe=15e3,z5=180,cCe=400,a$=5e3;function uCe(e,t){if(!e||e.length!==t.length||t.length===0)return!1;for(let r=0;r<t.length-1;r+=1)if(e[r]!==t[r])return!1;let n=e[e.length-1],a=t[t.length-1];return n.id!==a.id||n.role!==a.role||a.role!=="assistant"&&a.role!=="thinking"||n.role!=="assistant"&&n.role!=="thinking"||n.isStreaming!==!0||a.isStreaming!==!0?!1:n.role==="assistant"&&a.role==="assistant"?typeof n.content!="string"||typeof a.content!="string"?!1:n.branchRecordId===a.branchRecordId&&n.usage===a.usage&&!!n.content.trim()==!!a.content.trim():n.role==="thinking"&&a.role==="thinking"}function dCe(e,t){return e.length===t.length&&e.every((n,a)=>Object.is(n,t[a]))}function fCe(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n?.role==="user")return n.id}return null}function pCe(e){return e[e.length-1]}function mCe(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n&&ko(n))return n.id}return null}function hCe(e,t){return e.role!=="tool_group"?!1:!!(t!=null&&t.toolCallId&&e.tools.some(n=>bi(n,t.toolCallId)))}function BC(e){return e6(e)||!!hh(e.rawOutput)}function r$(e){let t=[],n=!1;for(let a of e){if(a.role!=="tool_group"||a.tools.length<2||!a.tools.some(BC)){t.push(a);continue}n=!0;let r=[],o=0,i=s=>{s.length!==0&&t.push({...a,id:o++===0?a.id:`${a.id}-${s[0].callId}`,tools:s})};for(let s of a.tools)BC(s)?(i(r),r=[],i([s])):r.push(s);i(r)}return n?t:e}function gCe(e,t){let n=[],a=0,r=o=>o.role==="tool_group"&&!hCe(o,t)&&!o.tools.some(BC);for(;a<e.length;){let o=e[a];if(o.role!=="thinking"&&!r(o)){n.push(o),a++;continue}let i=[],s=a-1,l=a;for(;l<e.length;){let p=e[l];if(p.role==="thinking"||r(p)){i.push(p),s=l,l++;continue}break}let c=i.filter(p=>p.role==="tool_group").flatMap(p=>p.tools);if(c.length===0||i.length<=1||i.length>=2&&i.every(Q5)){for(let p of i)n.push(p);a=s+1;continue}let d=[],f=[];for(let p of i)if(p.role==="thinking"){let m={content:p.content,...p.isStreaming===!0?{isStreaming:!0}:{}};d.push(m),f.push(m)}else if(p.role==="tool_group"&&p.tools.length>0){let m=p.tools[0].callId;for(let h of f)h.beforeToolCallId=m;f.length=0}n.push({id:Jz(i[0].id),role:"tool_group",tools:c,...d.length>0?{thoughts:d}:{},timestamp:i[0].timestamp}),a=s+1}return n}function vCe(e,t){var n;let a=e[e.length-1];if(a?.role!=="tool_group"||tF(a.id)===void 0||!((n=a.thoughts)!=null&&n.length))return;let r=a.thoughts[a.thoughts.length-1];if(r?.isStreaming!==!0)return;let o=a.thoughts.slice();o[o.length-1]={...r,content:t.content,isStreaming:!0};let i=e.slice();return i[i.length-1]={...a,thoughts:o,...a.id===Jz(t.id)?{timestamp:t.timestamp}:{}},i}function rF(e){return Yre(YCe(e))}function ty(e){if(e.type==="parallel_agents")return`group:${e.key}`;if(e.type==="turn_outputs")return`outputs:${e.key}`;if(e.type==="turn_collapse"){let t=e.turnCollapse.liveStartedAt;return t===void 0?`tc:${e.key}`:`tc:${e.key}:${t}`}return`msg:${e.key}`}function wCe(e,t,n,a,r){if((!n||n.size===0)&&(!a||a.size===0)&&(!r||r.size===0))return e;let o=[],i=null,s=(l,c)=>{if(c&&t||!l)return;let d=n?.get(l)??[],f=a?.get(l)??[],p=r?.get(l)??[];d.length===0&&f.length===0&&p.length===0||o.push({type:"turn_outputs",key:l,turnId:l,changes:d,artifacts:f,scheduledTasks:p})};for(let l of e)l.type==="message"&&ko(l.message)?(s(i,!1),i=l.message.id):!i&&l.type==="message"?i=l.message.id:!i&&l.type==="parallel_agents"&&(i=l.turnId),o.push(l);return s(i,!0),o}function yCe(e,t){let n=i=>i.type==="parallel_agents"&&(t?.has(i.key)===!0||i.agents.some(s=>Fa(s.status)));if(!e.some(i=>n(i)))return e;let a=[],r=[],o=()=>{a.push(...r),r=[]};for(let i of e)i.type==="message"&&ko(i.message)?(o(),a.push(i)):n(i)?r.push(i):a.push(i);return o(),a}function bCe(e,t){return e.type==="message"&&(e.message.role==="assistant"||t&&e.message.role==="system"&&e.message.source==="background_notification")&&!!e.message.content&&e.message.content.trim().length>0}function Ny(e,t,n,a=!0){let r=t;for(let o=n;o>t;o--)if(DCe(e[o])){r=o;break}for(let o=n;o>r;o--)if(bCe(e[o],a))return o;return-1}function kCe(e,{isResponding:t,latestTurnAwaitsAgentSummary:n,gateBackgroundAgentStatus:a}){let r=[];for(let i=0;i<e.length;i++){let s=e[i];s.type==="message"&&ko(s.message)&&r.push(i)}let o=new Map;for(let i=0;i<r.length;i++){let s=r[i],l=(i+1<r.length?r[i+1]:e.length)-1;if(i===r.length-1&&(t||a&&n)||a&&lF(e,s,l))continue;let c=e[s],d=Ny(e,s,l,!1);if(d<0)continue;let f=e[d];c?.type==="message"&&f.type==="message"&&f.message.role==="assistant"&&o.set(f.message.id,c.message.id)}return o}function o$(e,t){if(e.type==="parallel_agents")return!0;if(e.type==="turn_outputs"||e.type==="turn_collapse")return!1;switch(e.message.role){case"tool_group":return!e.message.tools.some(e6);case"plan":return!0;case"assistant":return!t;case"thinking":return!0;case"system":return e.message.source==="background_notification"?!t:e.message.source==="vision_bridge_notice";case"user":case"user_shell":case"btw":case"insight_progress":case"insight_ready":case"insight_error":return!1;default:return e.message,!1}}function oF(e){return e.source==="mid_turn_message_injected"}function xCe(e,t){if(e.type==="parallel_agents")return{kind:"agents",timestamp:e.timestamp,label:t?t("timeline.parallelAgents"):"Parallel agents"};if(e.type==="turn_outputs")return{kind:"none"};if(e.type!=="message")return{kind:"none"};let{message:n}=e;switch(n.role){case"thinking":return{kind:"thought",timestamp:n.timestamp,label:t?t("timeline.thinking"):"Thinking"};case"assistant":return e.turnCollapse?{kind:"none",timestamp:n.timestamp}:nd(n.content,1)?{kind:"commentary",timestamp:n.timestamp,label:t?t("timeline.assistantUpdate"):"Assistant update"}:{kind:"none",timestamp:n.timestamp};case"tool_group":{let a=n.tools.length;return{kind:"tool",timestamp:n.timestamp,label:t?t("timeline.toolCalls",{count:a}):`${a} tool call${a===1?"":"s"}`}}case"plan":return{kind:"plan",timestamp:n.timestamp,label:t?t("timeline.planUpdate"):"Plan update"};case"system":return oF(n)?{kind:"status",timestamp:n.timestamp,label:t?t("timeline.statusUpdate"):"Status update"}:{kind:"none",timestamp:n.timestamp};case"user":case"user_shell":case"btw":case"insight_progress":case"insight_ready":case"insight_error":return{kind:"none",timestamp:n.timestamp};default:return{kind:"none"}}}function nd(e,t,n={}){let a=(n.stripMarkdown===!0?SCe(e):e??"").replace(/\s+/g," ").trim();if(t<=0||!a)return"";let r=Array.from(a);return r.length>t?`${r.slice(0,t-1).join("")}\u2026`:a}function SCe(e){if(!e)return"";let t=[],n=r=>{let o=`\0${t.length}\0`;return t.push(r),o},a=e.replace(/```[^\n`]*\n?([\s\S]*?)```/g,(r,o)=>n(o)).replace(/!\[([^\]]*)\]\([^)]+\)/g,"$1").replace(/\[([^\]]+)\]\([^)]+\)/g,"$1").replace(/`([^`\n]+)`/g,(r,o)=>n(o)).replace(/^\s{0,3}#{1,6}\s+/gm,"").replace(/^\s{0,3}>\s?/gm,"").replace(/^\s*[-*+]\s+/gm,"");a=F5(a,"~~"),a=F5(a,"**"),a=F5(a,"__"),a=a.replace(/\*([^*\s][^*]*?\S)\*/g,"$1").replace(/(^|[^\p{L}\p{N}_])_([^_\s][^_]*?\S)_(?=$|[^\p{L}\p{N}_])/gu,"$1$2");for(let[r,o]of t.entries())a=a.split(`\0${r}\0`).join(o);return a}function F5(e,t){let n="",a=0;for(;a<e.length;){let r=e.indexOf(t,a);if(r===-1)return n+e.slice(a);let o=r+t.length,i=e.indexOf(t,o);if(i===-1)return n+e.slice(a);let s=e.slice(o,i);n+=s.trim().length===0?e.slice(a,i+t.length):e.slice(a,r)+s,a=i+t.length}return n}function CCe(e,t){let n=e.role==="user"?e.content:e.role==="user_shell"?e.command:"";return nd(n,32)||(t?t("timeline.userTurn"):"User turn")}function TCe(e){return e.role==="user"&&(e.source==="cron"||e.source==="loop")}function ko(e){return e.role==="user"||e.role==="user_shell"}function ICe(e,t){if(!t.startsWith("msg:"))return;let n=t.slice(4);n=tF(n)??n;for(let a=e.length-1;a>=0;a--){let r=e[a];if(r?.id===n){for(let o=a;o>=0;o--){let i=e[o];if(i&&ko(i))return i.id}return}}}function _Ce(e,t){for(let n of e)if(n.type==="turn_collapse"&&n.turnCollapse.turnId===t)return n.turnCollapse.collapsed;return!1}function LCe(e,t){switch(e.role){case"thinking":return t?t("timeline.kind.thought"):"thinking";case"assistant":return nd(e.content,120,{stripMarkdown:!0});case"tool_group":{let n=e.tools.length;return t?t("timeline.toolCalls",{count:n}):`${n} tool call${n===1?"":"s"}`}case"plan":return t?t("timeline.planDetail"):"plan update";case"system":return oF(e)?nd(e.content,120,{stripMarkdown:!0}):"";case"user":case"user_shell":case"btw":case"insight_progress":case"insight_ready":case"insight_error":return"";default:return""}}function ACe(e,t){if(e.type==="parallel_agents"){let n=e.agents.length;return t?t("timeline.parallelAgentsDetail",{count:n}):`${n} parallel agent${n===1?"":"s"}`}return e.type==="turn_outputs"||e.type!=="message"?"":LCe(e.message,t)}function ECe(e,t){return t?t(`timeline.kind.${e}`):f6e[e]}function RCe(e,t,n,a){if(t!==null)for(let i of e){if(i.type!=="message")continue;let{message:s}=i;if(s.id!==t||s.role!=="assistant")continue;let l=nd(s.content,180,{stripMarkdown:!0});if(l)return l}let r=[];for(let i=0;i<e.length;i+=1){let s=e[i];if(s.type==="message"&&t!==null&&s.message.id===t)continue;let l=ACe(s,a);l&&r.push(l)}return nd(r.join(" \xB7 "),180)||(n.length>0?n.map(i=>ECe(i,a)).join(" \xB7 "):a?a("timeline.noActivity"):"No activity")}function MCe(e,t){let n=[],a=null,r=[],o=()=>{if(!a)return;let i=rF(r),s=Ny(i,-1,i.length-1,!1),l=s>=0?i[s]:null,c=l?.type==="message"&&l.message.role==="assistant"&&!l.message.isStreaming&&nd(l.message.content,1,{stripMarkdown:!0}).length>0?l.message.id:null,d=[];for(let f of i){if(f.type==="message"&&c!==null&&f.message.id===c)continue;let p=xCe(f,t);p.kind!=="none"&&!d.includes(p.kind)&&d.push(p.kind)}n.push({id:a.id,label:CCe(a,t),detail:RCe(i,c,d,t),timestamp:a.timestamp,nodeKinds:d,...TCe(a)?{isScheduledTask:!0}:{}})};for(let i of e){if(ko(i)){o(),a=i,r=[];continue}a&&r.push(i)}return o(),n}function NCe(){return(0,u.jsxs)("svg",{className:Lt.sessionTimelineDetailsIcon,viewBox:"0 0 16 16","aria-hidden":"true",focusable:"false",children:[(0,u.jsx)("circle",{cx:"8",cy:"8",r:"6.25"}),(0,u.jsx)("path",{d:"M8 4.5v4l-2.5 2"})]})}function PCe(e){var t,n,a;let r=e.rawOutput&&typeof e.rawOutput=="object"?e.rawOutput:void 0;return[e.callId,e.toolName,e.kind??"",e.status,e.parentToolCallId??"",e.subContent?"sub-content":"",((t=e.subTools)==null?void 0:t.length)??0,String(((n=e.args)==null?void 0:n.subagent_type)??""),((a=e.args)==null?void 0:a.run_in_background)===!0?"background":"",String(r?.type??""),String(r?.status??"")].join(":")}function OCe(e){return e.map(t=>{let n=`${t.id}:${t.role}:${t.timestamp??""}`;switch(t.role){case"assistant":case"thinking":return`${n}:${t.isStreaming?"streaming":t.content}`;case"tool_group":return`${n}:${t.tools.map(PCe).join(",")}`;case"system":return`${n}:${t.variant}:${t.source??""}:${t.content}`;case"user":return`${n}:${t.content}`;case"user_shell":return`${n}:${t.command}`;case"plan":case"btw":case"insight_progress":case"insight_ready":case"insight_error":return n;default:return n}}).join("|")}function DCe(e){return e.type==="parallel_agents"?!0:e.type==="turn_outputs"||e.type==="turn_collapse"?!1:e.message.role==="tool_group"||e.message.role==="plan"}function BCe(e){if(e.type==="turn_outputs")return null;if(e.type==="turn_collapse")return e.turnCollapse.liveStartedAt===void 0||e.turnCollapse.toolCallCount===void 0||e.turnCollapse.toolCallCount<=0?null:`turn:${e.turnCollapse.turnId}:${e.turnCollapse.toolCallCount}`;if(e.type==="parallel_agents"){let n=e.agents.filter(a=>Fa(a.status));return n.length===0?null:`agents:${e.key}:${n.map(a=>a.callId).join(",")}`}if(e.message.role!=="tool_group")return null;let t=e.message.tools.filter(n=>Fa(n.status));return t.length===0?null:`tools:${e.message.id}:${t.map(n=>n.callId).join(",")}`}function $Ce(e){for(let t=e.length-1;t>=0;t--){let n=BCe(e[t]);if(n)return n}return null}function qCe(e){if(!(e.type!=="message"||e.message.role!=="system"))return e.message.source==="prompt_cancelled"||e.message.source==="turn_error"?e.message.timestamp:void 0}function zCe(e){return e.type==="message"&&e.message.role==="system"&&e.message.source==="turn_error"}function FCe(e){var t;if(!(e.type!=="message"||e.message.role!=="assistant"))return(t=e.message.content)!=null&&t.trim()?e.message.timestamp:void 0}function UCe(e){return e.type==="message"&&e.message.role==="assistant"?e.message.usage:void 0}function U5(e){return typeof e=="number"&&Number.isFinite(e)&&e>=0?e:void 0}function i$(e){if(e.parentToolCallId||!Mr(e))return;let t=e.rawOutput&&typeof e.rawOutput=="object"?e.rawOutput:void 0,n=t!=null&&t.executionSummary&&typeof t.executionSummary=="object"?t.executionSummary:void 0,a=U5(n?.inputTokens),r=U5(n?.outputTokens);if(a===void 0&&r===void 0)return;let o=U5(n?.cachedTokens);return{callId:e.callId,usage:{inputTokens:a??0,outputTokens:r??0,...o!==void 0?{cachedTokens:o}:{}}}}function HCe(e){return e.type==="parallel_agents"?e.agents.flatMap(t=>i$(t)??[]):e.type!=="message"||e.message.role!=="tool_group"?[]:e.message.tools.flatMap(t=>i$(t)??[])}function jCe(e){return e.type==="parallel_agents"?e.agents.length:e.type==="turn_outputs"||e.type==="turn_collapse"?0:e.message.role==="tool_group"?e.message.tools.filter(t=>!jo(t.toolName)).length:0}function iF(e,t){for(let n=Math.min(t,e.length-1);n>=0;n--){let a=e[n];if(a.type==="message"&&ko(a.message))return a.message.id}return null}function sF(e){let t=[],n=null;for(let a of e)a.type==="message"&&ko(a.message)&&(n=a.message.id),t.push(n);return t}function s$(e,t,n,a){let r=a===void 0?iF(e,t):a[t]??null;return r?n.get(r)??null:null}function WCe(e,t,n,a,r=sF(e)){let o=Number.POSITIVE_INFINITY,i=-1;for(let l of t){if(l<0||l>=e.length)continue;let c=s$(e,l,n,r);c!==null&&(o=Math.min(o,c),i=Math.max(i,c))}if(i<0)return null;let s=a==null?null:s$(e,a,n,r);return{startIndex:o,endIndex:i,currentIndex:s!==null&&s>=o&&s<=i?s:i}}function Rh(e,t,n,a){for(let r=t;r<=n;r++){let o=e[r];if(o.type==="parallel_agents"){if(o.agents.some(a))return!0}else if(o.type==="message"&&o.message.role==="tool_group"&&o.message.tools.some(a))return!0}return!1}function GCe(e,t,n,a){return a?Rh(e,t,n,r=>bi(r,a)):!1}function VCe(e,t,n){return Rh(e,t,n,a=>Mr(a)&&Fa(a.status))}function XCe(e,t,n){return Rh(e,t,n,a=>hh(a.rawOutput)!==void 0)}function KCe(e,t){let n=new Set(t);for(let a of e){if(a.type!=="message"||a.message.role!=="system"||a.message.source!=="background_notification")continue;let r=a.message.data;if(!r||typeof r!="object"||Array.isArray(r)||!("kind"in r)||r.kind!=="shell")continue;let o="taskId"in r?r.taskId:void 0;typeof o=="string"&&n.add(o)}return n}function ZCe(e,t,n,a){return Rh(e,t,n,r=>{let o=Qre(r);return o!==void 0&&!a.has(o)})}function lF(e,t,n){return Rh(e,t,n,a=>yi(a)&&Fa(a.status))}function QCe(e,t,n,a){if(!(a!=null&&a.size))return!1;for(let r=t;r<=n;r++){let o=e[r];if(o.type==="parallel_agents"&&a.has(o.key))return!0}return!1}function H5(e){return e.type==="parallel_agents"?e.agents.filter(t=>yi(t)&&t.status!=="failed").map(t=>t.callId):e.type==="message"&&e.message.role==="tool_group"?e.message.tools.filter(t=>yi(t)&&t.status!=="failed").map(t=>t.callId):[]}function cF(e){var t;if(e.role!=="system"||e.source!=="background_notification")return null;let n=((t=e.content)==null?void 0:t.trimStart().toLowerCase().startsWith("background agent "))===!0,a=e.data;if(typeof a!="object"||a===null||Array.isArray(a))return n?{status:"completed",...e.timestamp!==void 0?{endTime:e.timestamp}:{}}:null;let{kind:r,toolUseId:o,status:i}=a;if(r!=="agent"&&!(r===void 0&&n))return null;let s=i===void 0?"completed":I$(i)?i:void 0;return s?{...typeof o=="string"?{callId:o}:{},status:s,...e.timestamp!==void 0?{endTime:e.timestamp}:{}}:null}function $C(e){return e.type==="message"?cF(e.message):null}function YCe(e){let t=new Map;for(let r of e){let o=cF(r);o!=null&&o.callId&&t.set(o.callId,o)}if(t.size===0)return e;let n=!1,a=e.map(r=>{if(r.role!=="tool_group")return r;let o=!1,i=r.tools.map(s=>{let l=t.get(s.callId);if(!l||!yi(s)||!Fa(s.status))return s;let c=_$(s,l.status,l.endTime);return c===s?s:(o=!0,c)});return o?(n=!0,{...r,tools:i}):r});return n?a:e}function uF(e,t,n,a){let r=-1,o;for(let c=n;c>t;c--){let d=e[c];if(!(d.type!=="message"||d.message.role!=="system")){if(d.message.source==="turn_error"||d.message.source==="prompt_cancelled"){if(r<0)return null;continue}if(d.message.source==="background_notification"){let f=$C(d);if(a&&!f)continue;r<0&&(r=c,o=f?.callId)}}}if(r<0)return null;let i=-1;if(o){for(let c=n;c>=0;c--)if(H5(e[c]).includes(o)){i=c;break}}for(let c=n;c>=t&&!(i>=0);c--)if(H5(e[c]).length>0){i=c;break}let s=new Set,l=!1;if(i>=0){let c=i;for(let f=i;f>=0;f--){let p=e[f];if(p.type==="message"&&ko(p.message)){c=f;break}}let d=[];for(let f=c;f<=n;f++){let p=e[f];for(let h of H5(p))s.add(h);let m=$C(p);m&&(l=!0,m.callId?s.delete(m.callId):d.push(new Set(s)))}for(let f of d)for(let p of f)if(s.has(p)){s.delete(p);break}}return{lastNotificationIndex:r,sawAgentCompletion:l,unmatchedAgentCallIds:s}}function qC(e,t,n,a=!1,r=!0,o=!0){let i=uF(e,t,n,a);if(!i)return!1;if(i.sawAgentCompletion&&i.unmatchedAgentCallIds.size>0)return r;for(let s=i.lastNotificationIndex+1;s<=n;s++){let l=e[s];if(l.type==="message"&&l.message.role==="thinking")return!1}return o&&Ny(e,t,n,!1)<i.lastNotificationIndex}function JCe(e,{overrides:t,isResponding:n,activeTurnStartedAt:a,backgroundSummaryGraceActive:r=!0,waitForUnmatchedAgentCompletions:o=!0,waitForOrderedNarration:i=!0,terminalBackgroundShellTaskIds:s,automaticallyExpandedAgentKeys:l,pendingApprovalCallId:c,includeSubagentToolUsageInMetrics:d=!0,paginatedExpanded:f,enabled:p}){if(!p||e.length===0)return e;let m=[];for(let y=0;y<e.length;y++){let v=e[y];v.type==="message"&&ko(v.message)&&m.push(y)}if(m.length===0)return e;let h=KCe(e,s),g=[];for(let y=0;y<m[0];y++)g.push(e[y]);for(let y=0;y<m.length;y++){let v=m[y],w=(y+1<m.length?m[y+1]:e.length)-1,b=e[v],I=b.message.id,_=b.message.timestamp,L=y===m.length-1,S=L&&n,C=VCe(e,v,w),A=XCe(e,v,w),E=ZCe(e,v,w,h),O=QCe(e,v,w,l),D=L&&r&&qC(e,v,w,!1,o,i),H=GCe(e,v,w,c),W=Ny(e,v,w),Q=0,j,Y,K=0,ue=0,M=0,de=0,F=0,N=!1,ae=new Set,he=!1;for(let be=v+1;be<=w;be++){let xe=e[be];o$(xe,be===W)&&Q++,zCe(xe)&&(he=!0),de+=jCe(xe),xe.type==="message"&&xe.message.role==="thinking"?F++:xe.type==="message"&&xe.message.role==="tool_group"&&xe.message.thoughts&&(F+=xe.message.thoughts.length);let V=qCe(xe);V!==void 0&&(j=j===void 0?V:Math.max(j,V));let we=FCe(xe);we!==void 0&&(Y=Y===void 0?we:Math.max(Y,we));let et=UCe(xe);if(et&&(K+=et.inputTokens,ue+=et.outputTokens,M+=et.cachedTokens??0,N=!0),d)for(let Ee of HCe(xe))ae.has(Ee.callId)||(ae.add(Ee.callId),K+=Ee.usage.inputTokens,ue+=Ee.usage.outputTokens,M+=Ee.usage.cachedTokens??0,N=!0)}let ce=S||D?a??_??Date.now():void 0,X=j??Y,ie=_!==void 0&&X!==void 0&&X>=_?X-_:void 0;if(H||Q===0&&!(N||ie!==void 0||ce!==void 0)){for(let be=v;be<=w;be++)g.push(e[be]);continue}let le=S||C||A||E||O||D||(he||W<0)&&L,J=!(Q===0||(t.has(I)?t.get(I):f!=null&&f.has(I)||le));g.push({type:"message",key:b.key,message:b.message});let oe={turnId:I,collapsed:J,hiddenCount:Q,...ie!==void 0?{elapsedMs:ie}:{},...N?{inputTokens:K,outputTokens:ue}:{},...M>0?{cachedTokens:M}:{},...de>0?{toolCallCount:de}:{},...F>0?{thinkingCount:F}:{},...ce!==void 0?{liveStartedAt:ce}:{}};if(g.push({type:"turn_collapse",key:`tc-${I}`,turnCollapse:oe}),!J){for(let be=v+1;be<=w;be++){let xe=e[be];be===W&&xe.type==="message"&&xe.message.role==="assistant"?g.push({...xe,turnCollapse:oe}):g.push(xe)}continue}for(let be=v+1;be<=w;be++){let xe=e[be];if(!(be===W&&S)){if(be===W&&xe.type==="message"&&xe.message.role==="assistant"){g.push({...xe,turnCollapse:oe});continue}o$(xe,be===W)||g.push(xe)}}}return g}function j5(e,t,n){if(n){for(let a=0;a<e.length;a++){let r=e[a];if(r.type==="message"&&r.message.role==="tool_group"&&r.message.tools.some(o=>bi(o,n))||r.type==="parallel_agents"&&r.agents.some(o=>bi(o,n)))return a}return-1}for(let a=0;a<e.length;a++){let r=e[a];if(r.type==="message"&&r.message.id===t)return a}return-1}function l$(e,t){if(!t)return!1;let n=t.callId;return e.type==="message"?n?e.message.role==="tool_group"&&e.message.tools.some(a=>bi(a,n)):e.message.id===t.messageId:e.type==="parallel_agents"?!!n&&e.agents.some(a=>bi(a,n)):(e.type,!1)}function c$(e,t){var n;return e?e.type==="message"?(n=e.message.sourceBlockIds)==null?void 0:n.join(","):t.filter(a=>e.type==="parallel_agents"?a.role==="tool_group"&&e.agents.some(r=>a.tools.some(o=>bi(o,r.callId))):a.id===(e.type==="turn_outputs"?e.turnId:e.turnCollapse.turnId)).flatMap(a=>a.sourceBlockIds??[]).join(",")||void 0:void 0}var W5=0,e6e=120,t6e=80,n6e=32,a6e=240,ny=30,G5=160,u$=30,dF=200;function r6e(e,t=dF){return e>t}function o6e(e,t){return e<=t}function i6e(e){let t=Math.max(0,Math.ceil(e/1e3));if(t<60)return`${t}s`;let n=Math.floor(t/60),a=t-n*60;return`${n}m ${a}s`}function s6e(e){return e!==void 0&&e>0?i6e(e):""}function l6e(e,t){if(e.inputTokens===void 0||e.outputTokens===void 0)return"";let n=e.cachedTokens??0,a=n>0&&e.inputTokens>0?` (${Qa(n)} ${t("turn.cached")}, ${Math.round(n/e.inputTokens*100)}%)`:"";return`\u2191${Qa(e.inputTokens)}${a} \u2193${Qa(e.outputTokens)}`}function d$(e,t){let n=[],a=l6e(e,t);return a&&n.push(a),e.toolCallCount!==void 0&&e.toolCallCount>0&&n.push(t("turn.toolCalls",{count:e.toolCallCount})),e.thinkingCount!==void 0&&e.thinkingCount>0&&n.push(t("turn.thinkingCount",{count:e.thinkingCount})),n.join(" \xB7 ")}function c6e(e){return e.inputTokens!==void 0&&e.outputTokens!==void 0||e.toolCallCount!==void 0&&e.toolCallCount>0}var u6e=(0,x.memo)(function({turnCollapse:e,onToggleCollapse:t}){let{t:n}=lt(),a=e.hiddenCount>0,r=e.liveStartedAt,o=a||r!==void 0||c6e(e),i=m6(r!==void 0&&o),s=(0,x.useRef)(0),l=(0,x.useRef)(r);l.current!==r&&(l.current=r,s.current=0);let c;r!==void 0&&o?(s.current=Math.max(s.current,Math.max(0,i-r)),c=s.current):o&&e.elapsedMs!==void 0?(s.current=0,c=e.elapsedMs):(s.current=0,c=void 0);let d=s6e(c),f=d$(e,n),p=d$(e,n),m=n(r!==void 0?"turn.processing":"turn.processed"),h=!!d&&o,g=!!f&&o,y=!!p&&o;if(!o)return null;let v=()=>{if(!a)return;let w=e.collapsed;t(e.turnId,w)};return(0,u.jsxs)("div",{className:a?`${wi.collapseRow} ${wi.collapseRowClickable}`:wi.collapseRow,role:a?"button":void 0,tabIndex:a?0:void 0,"aria-expanded":a?!e.collapsed:void 0,"aria-label":a?e.collapsed?n("turn.expand"):n("turn.collapse"):void 0,title:a?e.collapsed?n("turn.expand"):n("turn.collapse"):void 0,onClick:a?v:void 0,onKeyDown:a?w=>{w.key!=="Enter"&&w.key!==" "||(w.preventDefault(),v())}:void 0,children:[(0,u.jsxs)("span",{className:wi.collapseLabel,children:[(0,u.jsxs)("span",{className:wi.processedLabel,children:[m,h&&(0,u.jsxs)("span",{className:wi.processedMeta,children:[" ",d]})]}),y&&(0,u.jsx)("span",{className:wi.summaryMetrics,children:p}),g&&(0,u.jsx)("span",{className:wi.hiddenMetrics,children:f})]}),a&&(0,u.jsx)("span",{"data-testid":`toggle-${e.turnId}`,className:wi.collapseIcon,onClick:w=>{w.stopPropagation(),v()},children:(0,u.jsx)("span",{className:e.collapsed?wi.chevronRight:wi.chevronDown,"aria-hidden":"true"})})]})});function d6e(e){if(e.type==="turn_collapse")return Lt.turnStatusRow;if(e.type==="turn_outputs")return Lt.turnContentRow;if(e.type==="message"&&e.turnCollapse)return Lt.turnAnswerRow}var f6e={thought:"thinking",commentary:"assistant update",tool:"tool calls",agents:"parallel agents",plan:"plan update",status:"status update",none:"turn"},p6e=["--background","--foreground","--muted-foreground","--border","--font-sans"],f$="session-timeline-detail-tooltip",m6e=(0,x.memo)(function({entries:e,currentTurnId:t,currentRange:n,hidden:a,onSelect:r}){let o=gh(),{t:i}=lt(),s=(0,x.useRef)(null),l=(0,x.useRef)(null),c=(0,x.useRef)(null),d=(0,x.useRef)(!1),f=(0,x.useRef)(!1),p=(0,x.useRef)(null),m=(0,x.useRef)(null),[h,g]=(0,x.useState)(null),y=n!==null?n.currentIndex:e.findIndex(A=>A.id===t),v=(0,x.useCallback)(()=>g(null),[]),w=(0,x.useCallback)(()=>{d.current||f.current||v()},[v]),b=(0,x.useCallback)((A,E)=>{let O=s.current;if(!O)return null;let D=getComputedStyle(O),H=E.getBoundingClientRect();return{entry:A,top:H.top+H.height/2,left:H.right+8,clamped:!1,themeVars:Object.fromEntries(p6e.map(W=>[W,D.getPropertyValue(W)]))}},[]),I=(0,x.useCallback)(A=>{let E=l.current;if(!E)return null;let O=Array.from(E.querySelectorAll('[data-testid="session-timeline-entry"]')).find(D=>D.getAttribute("data-turn-id")===A.id);return O?.querySelector("button")??null},[]),_=(0,x.useCallback)(A=>{let E=l.current;if(!E)return!1;let O=E.getBoundingClientRect(),D=A.getBoundingClientRect();return D.bottom>=O.top&&D.top<=O.bottom},[]),L=(0,x.useCallback)(()=>{g(A=>{if(!A)return null;let E=I(A.entry);return!E||!_(E)?null:b(A.entry,E)})},[b,I,_]),S=(0,x.useCallback)((A,E)=>{g(b(A,E))},[b]),C=(0,x.useCallback)(()=>{typeof window>"u"||(p.current!==null&&window.cancelAnimationFrame(p.current),m.current!==null&&window.clearTimeout(m.current),f.current=!0,p.current=window.requestAnimationFrame(()=>{p.current=null,f.current=!1,L()}),m.current=window.setTimeout(()=>{m.current=null,f.current=!1},100))},[L]);return(0,x.useLayoutEffect)(()=>{if(a)return;let A=l.current;if(!A||y<0)return;let E=A.querySelector(`[data-timeline-index="${y}"]`);if(!E)return;let O=E.offsetTop+E.offsetHeight/2,D=A.scrollHeight-A.clientHeight,H=Math.max(0,Math.min(O-A.clientHeight/2,D));if(A.scrollTop===H)return;d.current=!0,A.scrollTop=H;let W=window.requestAnimationFrame(()=>{d.current=!1,L()}),Q=window.setTimeout(()=>{d.current=!1},100);return()=>{window.cancelAnimationFrame(W),window.clearTimeout(Q),d.current=!1}},[y,a,L]),(0,x.useLayoutEffect)(()=>{if(!(!h||typeof window>"u"))return window.addEventListener("resize",L),()=>{window.removeEventListener("resize",L)}},[L,h]),(0,x.useLayoutEffect)(()=>()=>{p.current!==null&&window.cancelAnimationFrame(p.current),m.current!==null&&window.clearTimeout(m.current),f.current=!1},[]),(0,x.useLayoutEffect)(()=>{if(!h||h.clamped)return;let A=s.current,E=c.current;if(!A||!E||typeof window>"u")return;let O=E.getBoundingClientRect(),D=12,H=h.top;O.top<D?H+=D-O.top:O.bottom>window.innerHeight-D&&(H-=O.bottom-(window.innerHeight-D)),H!==h.top&&g(W=>W?.entry.id===h.entry.id?{...W,top:H,clamped:!0}:W)},[h]),a||e.length===0?null:(0,u.jsx)("div",{className:Lt.sessionTimelineLayer,"aria-hidden":"false",children:(0,u.jsxs)("nav",{ref:s,className:Lt.sessionTimelinePanel,"aria-label":i("timeline.sessionTimeline"),"data-testid":"session-timeline",onMouseLeave:v,children:[(0,u.jsx)("div",{ref:l,className:Lt.sessionTimelineViewport,"data-testid":"session-timeline-viewport",onScroll:w,children:(0,u.jsx)("ol",{className:Lt.sessionTimelineList,children:e.map((A,E)=>{let O=n!==null&&E>=n.startIndex&&E<=n.endIndex,D=n!==null?E===n.currentIndex:A.id===t,H=A.nodeKinds.join(","),W=[`${i("timeline.turnPrefix",{index:E+1})}: ${A.label}`,D?i("timeline.currentTurn"):null].filter(Boolean).join(". "),Q=K=>S(A,K.currentTarget),j=K=>{C(),S(A,K.currentTarget)},Y=h?.entry.id===A.id;return(0,u.jsx)("li",{className:Lt.sessionTimelineItem,"data-testid":"session-timeline-entry","data-turn-id":A.id,"data-timeline-index":E,"data-node-kinds":H,"data-in-current-range":O?"true":void 0,children:(0,u.jsx)("button",{type:"button",className:zC(Lt.sessionTimelineButton,O?Lt.sessionTimelineButtonInRange:void 0,D?Lt.sessionTimelineButtonCurrent:void 0),"aria-current":D?"step":void 0,"aria-describedby":Y?f$:void 0,"aria-label":W,onClick:()=>r(A.id),onFocus:j,onBlur:v,onMouseEnter:Q,onMouseLeave:v,children:(0,u.jsx)("span",{className:Lt.sessionTimelineTick})})},A.id)})})}),h&&typeof document<"u"&&(0,ky.createPortal)((0,u.jsxs)("div",{ref:c,className:Lt.sessionTimelineDetails,id:f$,"data-testid":"session-timeline-detail","data-title":h.entry.label,"data-detail":h.entry.detail,"data-scheduled-task":h.entry.isScheduledTask?"true":void 0,role:"tooltip",style:{...h.themeVars,top:h.top,left:h.left},children:[(0,u.jsxs)("span",{className:Lt.sessionTimelineDetailsTitle,children:[h.entry.isScheduledTask&&(0,u.jsx)(NCe,{}),(0,u.jsx)("span",{className:Lt.sessionTimelineDetailsTitleText,children:h.entry.label})]}),(0,u.jsx)("span",{className:Lt.sessionTimelineDetailsDetail,children:h.entry.detail})]}),o??document.body)]})})});function zC(...e){return e.filter(Boolean).join(" ")||void 0}var h6e=[];function g6e({label:e}){return(0,u.jsxs)(u.Fragment,{children:[(0,u.jsx)("div",{role:"status","aria-live":"polite",className:Lt.srOnly,children:e}),(0,u.jsxs)("div",{className:Lt.loadingSkeleton,"data-testid":"message-list-loading-skeleton","aria-hidden":"true",children:[(0,u.jsx)("div",{className:Lt.loadingSkeletonUserRow,children:(0,u.jsxs)("div",{className:Lt.loadingSkeletonUserBubble,children:[(0,u.jsx)("span",{className:Lt.loadingSkeletonLineWide}),(0,u.jsx)("span",{className:Lt.loadingSkeletonLineShort})]})}),(0,u.jsx)("div",{className:Lt.loadingSkeletonAssistantRow,children:(0,u.jsxs)("div",{className:Lt.loadingSkeletonAssistantBlock,children:[(0,u.jsx)("span",{className:Lt.loadingSkeletonLineMedium}),(0,u.jsx)("span",{className:Lt.loadingSkeletonLineWide}),(0,u.jsx)("span",{className:Lt.loadingSkeletonLineNarrow})]})}),(0,u.jsx)("div",{className:Lt.loadingSkeletonUserRow,children:(0,u.jsx)("div",{className:Lt.loadingSkeletonUserBubbleCompact,children:(0,u.jsx)("span",{className:Lt.loadingSkeletonLineMedium})})}),(0,u.jsx)("div",{className:Lt.loadingSkeletonAssistantRow,children:(0,u.jsxs)("div",{className:Lt.loadingSkeletonAssistantBlock,children:[(0,u.jsx)("span",{className:Lt.loadingSkeletonLineWide}),(0,u.jsx)("span",{className:Lt.loadingSkeletonLineMedium})]})})]})]})}var v6e=(0,x.memo)((0,x.forwardRef)(function({messages:e,frozenViewport:t=!1,sessionKey:n,terminalBackgroundShellTaskIds:a,pendingApproval:r,onShowContextDetail:o,onImagePreview:i,onAttachmentPreview:s,onInsightReportOpen:l,onEditUserMessage:c,loadingTranscript:d,catchingUp:f,hasOlderHistory:p=!1,loadingOlderHistory:m=!1,historyCapacityReached:h=!1,historyPaginationError:g=!1,onLoadOlderHistory:y,transcriptBlockCount:v=0,transcriptActivity:w,onReloadTranscript:b,isResponding:I=!1,transcriptReloadPaused:_=I,activeTurnStartedAt:L,welcomeHeader:S,centerWelcomeHeader:C=!1,workspaceCwd:A,tailContent:E,tailKey:O="tail",virtualScrollThreshold:D=dF,autoScrollTailIntoView:H=!1,bottomOverlayInset:W=0,hideSessionTimeline:Q=!1,hideFirstUserMessage:j=!1,firstTurnMetrics:Y,includeSubagentToolUsageInMetrics:K=!0,showRetryHint:ue=!1,onRetryClick:M,failedPromptMessageId:de,onRetryFailedPrompt:F,onBranchSession:N,onCanScrollToBottomChange:ae,turnFileChanges:he,turnArtifacts:ce,turnScheduledTasks:X,onReviewChanges:ie,onOpenArtifact:le,onOpenScheduledTask:J,onTurnOutputOpen:oe,onError:be,generateContent:xe},V){var we,et;let Ee=(0,x.useRef)(t);Ee.current=t;let{t:nt}=lt(),ct=qn(),mt=(0,x.useContext)(FC),zt=(0,x.useMemo)(()=>{let $=new Map,Z,ge=0;for(let Te of e)Te.role==="user"&&($.set(Te.id,ge),Z=Te.id,ge+=1);return{lastId:Z,turnIndexById:$}},[e]),ne=(0,x.useMemo)(()=>{if(!t)return;let $=[...zt.turnIndexById.keys()];return new Set($.filter((Z,ge)=>ge===0||ge===$.length-1))},[zt,t]),We=(0,x.useRef)(void 0),ve=uCe(We.current,e);(0,x.useLayoutEffect)(()=>{We.current=e},[e]);let ze=(0,x.useRef)(void 0),U=(0,x.useMemo)(()=>{var $;let Z=ze.current,ge=e[e.length-1],Te;if(ve&&Z?.sourceMessages===We.current&&Z?.compactMode===mt&&Z.pendingApproval===r&&(ge?.role==="assistant"&&(($=Z.value[Z.value.length-1])==null?void 0:$.id)===ge.id?(Te=Z.value.slice(),Te[Te.length-1]=ge):ge?.role==="thinking"&&(Te=mt?vCe(Z.value,ge):r$(e))),!Te){let Ae=r$(e);Te=mt?gCe(Ae,r):Ae}return ze.current={sourceMessages:e,compactMode:mt,pendingApproval:r,value:Te},Te},[mt,e,r,ve]),fe=(0,x.useRef)(void 0),pe=(0,x.useMemo)(()=>{let $=fe.current,Z=U[U.length-1],ge;if(ve&&I&&$?.sourceMessages===We.current&&$?.compactMode===mt&&$.pendingApproval===r&&$.isResponding===I&&$.turnFileChanges===he&&$.turnArtifacts===ce&&$.turnScheduledTasks===X){let Te=$.value[$.value.length-1];Te?.type==="message"&&Te.message.id===Z.id&&(ge=$.value.slice(),ge[ge.length-1]={...Te,message:Z})}return ge??(ge=wCe(rF(U),I,he,ce,X)),fe.current={sourceMessages:e,compactMode:mt,pendingApproval:r,isResponding:I,turnFileChanges:he,turnArtifacts:ce,turnScheduledTasks:X,value:ge},ge},[U,e,ve,mt,r,I,he,ce,X]),Oe=(0,x.useMemo)(()=>{for(let $=U.length-1;$>=0;$-=1){let Z=U[$];if(Z?.role==="system"&&Z.source==="background_notification")return Z.id}return null},[U]),[He,vt]=(0,x.useState)(Oe),ot=!!(d||f),Wt=(0,x.useRef)(ot),Fn=(0,x.useRef)(U.length>0),hn=!Fn.current&&U.length>0,Yt=ot||Wt.current||hn;(0,x.useLayoutEffect)(()=>{Yt&&vt(Oe),U.length>0&&(Fn.current=!0),Wt.current=ot},[Yt,Oe,ot,U.length]);let Jt=!Yt&&Oe!==null&&He!==Oe,Xt=(0,x.useMemo)(()=>{for(let $=pe.length-1;$>=0;$-=1){let Z=pe[$];if(Z.type==="message"&&ko(Z.message))return $}return 0},[pe]),Un=ct==="interactive",Ma=(0,x.useMemo)(()=>Un&&lF(pe,Xt,pe.length-1),[pe,Un,Xt]),$e=(0,x.useMemo)(()=>uF(pe,Xt,pe.length-1,!0),[pe,Xt]),bt=(0,x.useMemo)(()=>{let $=$e?.unmatchedAgentCallIds;return $&&$.size>0?[...$].sort().join("|"):""},[$e]),Je=Jt&&!Ma&&($e?.sawAgentCompletion??!1)&&($e?.unmatchedAgentCallIds.size??0)>0,[sn,Ha]=(0,x.useState)(!1);(0,x.useEffect)(()=>{Ha(!1)},[bt,Xt,I]),(0,x.useEffect)(()=>{if(!Je||I)return;let $=setTimeout(()=>Ha(!0),a$);return()=>clearTimeout($)},[Je,bt,Xt,I]);let cn=(0,x.useMemo)(()=>Jt&&!Ma&&!I&&($e?.sawAgentCompletion??!1)&&($e?.unmatchedAgentCallIds.size??0)===0&&qC(pe,Xt,pe.length-1,!0,!0,!0),[Jt,pe,I,$e,Ma,Xt]),[yr,Vo]=(0,x.useState)(!1),al=(0,x.useMemo)(()=>{let $=$e;if(!$||$.lastNotificationIndex<0)return"";let Z=pe[$.lastNotificationIndex];return Z?.type==="message"?Z.message.id:""},[pe,$e]);(0,x.useEffect)(()=>{Vo(!1)},[al,Xt,I]),(0,x.useEffect)(()=>{if(!cn)return;let $=setTimeout(()=>Vo(!0),a$);return()=>clearTimeout($)},[cn,al,Xt,I]);let Jr=(0,x.useMemo)(()=>Jt&&qC(pe,Xt,pe.length-1,!0,Ma||!sn,!yr),[Jt,pe,Ma,Xt,yr,sn]),xi=(0,x.useMemo)(()=>{let $=new Set;for(let Z=Xt;Z<pe.length;Z+=1){let ge=pe[Z];ge.type==="parallel_agents"&&$.add(ge.key)}return $},[pe,Xt]),es=(0,x.useMemo)(()=>{if(!Jt)return{key:null};let $=-1,Z;for(let ge=pe.length-1;ge>=0;ge-=1){let Te=pe[ge];if(Te.type!=="message"||Te.message.role!=="system"||Te.message.source!=="background_notification")continue;let Ae=$C(Te);if(Ae){$=ge,Z=Ae.callId;break}}for(let ge=$-1;ge>=0;ge-=1){let Te=pe[ge];if(Te.type==="parallel_agents"&&(!Z||Te.agents.some(Ae=>Ae.callId===Z)))return{key:Te.key}}return{key:null}},[Jt,pe]),ma=(0,x.useRef)(null),Ec=v5e(ma,!Q),[sd,Py]=(0,x.useState)(()=>new Set),Mh=(0,x.useCallback)(($,Z)=>{Py(ge=>{if(ge.has($)===Z)return ge;let Te=new Set(ge);return Z?Te.add($):Te.delete($),Te})},[]),ld=(0,x.useRef)(null),Rc=(0,x.useMemo)(()=>{var $,Z;if(!Ec)return h6e;let ge=OCe(U);return((($=ld.current)==null?void 0:$.signature)!==ge||((Z=ld.current)==null?void 0:Z.t)!==nt)&&(ld.current={signature:ge,t:nt,entries:MCe(U,nt)}),ld.current.entries},[Ec,U,nt]),Oy=(0,x.useMemo)(()=>new Map(Rc.map(($,Z)=>[$.id,Z])),[Rc]),Nh=(0,x.useMemo)(()=>mCe(U),[U]),[Cp,Ph]=(0,x.useState)(null),Dy=Cp!==null?((we=Rc[Cp.currentIndex])==null?void 0:we.id)??Nh:Nh,Oh=(0,x.useRef)(void 0),cd=(0,x.useMemo)(()=>{let $=Oh.current,Z;return ve&&I&&$?.sourceMessages===We.current&&$?.isResponding===I&&$.latestTurnAwaitsAgentSummary===Jr&&$.gateBackgroundAgentStatus===Un?Z=$.value:Z=kCe(pe,{isResponding:I,latestTurnAwaitsAgentSummary:Jr,gateBackgroundAgentStatus:Un}),Oh.current={sourceMessages:e,isResponding:I,latestTurnAwaitsAgentSummary:Jr,gateBackgroundAgentStatus:Un,value:Z},Z},[pe,e,ve,Un,I,Jr]),{collapseCompletedTurns:By}=ki(),ud=By??!0,[Mc,dd]=(0,x.useState)(()=>new Map),[rl,Nc]=(0,x.useState)(()=>new Set),ol=(0,x.useRef)(new Map),[Dh,$y]=(0,x.useTransition)(),fd=(0,x.useRef)(!1),pd=(0,x.useRef)(new Map),il=(0,x.useRef)(void 0),ts=(0,x.useRef)([]),sl=(0,x.useRef)(!0);t&&(sl.current=!1);let nn=(0,x.useRef)(!1),Bh=(0,x.useRef)(0),Pc=(0,x.useRef)(0),Nr=(0,x.useRef)(!1),br=(0,x.useRef)(0),ll=(0,x.useRef)(!1),cl=(0,x.useRef)(0),Qn=(0,x.useRef)(null),Oc=(0,x.useRef)(!1),Si=(0,x.useRef)(null),$h=(0,x.useRef)(null),Tp=(0,x.useRef)(!1),md=(0,x.useRef)(null),ul=(0,x.useRef)(!1),z=(0,x.useRef)(d),se=(0,x.useRef)(!!d),ke=(0,x.useRef)(void 0),Ke=(0,x.useRef)(void 0),yt=(0,x.useRef)(W),Gt=(0,x.useRef)(null),Xo=(0,x.useRef)(f),eo=(0,x.useRef)(f),Ko=(0,x.useRef)(!1),hd=(0,x.useRef)(!1),ns=(0,x.useRef)(void 0),Dc=(0,x.useRef)(void 0);eo.current=f;let Pr=(0,x.useRef)(!1),Or=(0,x.useRef)(void 0),Ip=(0,x.useRef)(void 0),as=(0,x.useRef)(void 0),_p=(0,x.useRef)(void 0),Lp=(0,x.useRef)(void 0),gd=(0,x.useRef)(void 0),qh=(0,x.useRef)(void 0),qy=(0,x.useRef)(v),zy=(0,x.useRef)(_);qy.current=v,zy.current=_||t;let Fy=(0,x.useRef)(null),[An,Ci]=(0,x.useState)(null),G6=(0,x.useRef)(!1);G6.current=An?.virtual===!0;let V6=(0,x.useRef)(U.length);(0,x.useLayoutEffect)(()=>{V6.current=U.length},[U.length]);let Uy=(0,x.useRef)(e);(0,x.useLayoutEffect)(()=>{Uy.current=e},[e]);let[CF,zh]=(0,x.useState)(!1),[TF,IF]=(0,x.useState)(n);TF!==n&&(IF(n),ol.current.clear(),br.current+=1,Nr.current=!1,Pr.current=!1,Ci(null),dd($=>$.size?new Map:$),Nc($=>$.size?new Set:$)),(0,x.useEffect)(()=>{p||(Pr.current=!1,Fy.current=null)},[p]);let Ap=(0,x.useCallback)(()=>{let $=ma.current,Z=$?$.scrollHeight-$.scrollTop-$.clientHeight:0,ge=!sl.current&&Z>1;$h.current!==ge&&($h.current=ge,ae?.(ge))},[ae]),Ya=(0,x.useCallback)(()=>{Dc.current!==void 0&&window.cancelAnimationFrame(Dc.current),Dc.current=window.requestAnimationFrame(Ap)},[Ap]),$t=(0,x.useCallback)($=>{Ee.current&&($=!1),sl.current!==$&&(sl.current=$,Ya())},[Ya]),vd=(0,x.useRef)(void 0),Hy=(0,x.useRef)(!1),Na=(0,x.useMemo)(()=>{var $;Hy.current=!1;let Z=[ne,Mc,I,L,a,Jt,Ma,sn,yr,ud,j,Y,K,sd,mt,r,he,ce,X,rl],ge=vd.current,Te=pe[pe.length-1];if(ve&&I&&ge&&ge.sourceMessages===We.current&&dCe(ge.dependencies,Z)&&Te?.type==="message"){let Hn=ty(Te),Co=-1;for(let Ga=ge.value.length-1;Ga>=0;Ga-=1)if(ty(ge.value[Ga])===Hn){Co=Ga;break}if(Co>=0){let Ga=ge.value[Co];if(Ga?.type==="message"){let to=ge.value.slice();return to[Co]={...Ga,message:Te.message},vd.current={sourceMessages:e,dependencies:Z,value:to,virtualizerItems:ge.virtualizerItems},Hy.current=!0,to}}}let Ae=JCe(pe,{overrides:Mc,isResponding:I,activeTurnStartedAt:L,terminalBackgroundShellTaskIds:a,backgroundSummaryGraceActive:Jt,waitForUnmatchedAgentCompletions:Ma||!sn,waitForOrderedNarration:!yr,automaticallyExpandedAgentKeys:sd,pendingApprovalCallId:r?.toolCallId??null,includeSubagentToolUsageInMetrics:K,paginatedExpanded:ne?new Set([...rl,...ne]):rl,enabled:ud}),Rt=ne?Ae.map(Hn=>{if(!("turnCollapse"in Hn)||!Hn.turnCollapse||!ne.has(Hn.turnCollapse.turnId))return Hn;let{turnId:Co,collapsed:Ga,hiddenCount:to}=Hn.turnCollapse;return{...Hn,turnCollapse:{turnId:Co,collapsed:Ga,hiddenCount:to}}}):Ae,gn=!1,kn=Y?Rt.map(Hn=>gn||Hn.type!=="turn_collapse"?Hn:(gn=!0,{...Hn,turnCollapse:{...Hn.turnCollapse,...Y.durationMs!==void 0&&Y.durationMs>0?{elapsedMs:Y.durationMs}:{},...Y.inputTokens!==void 0?{inputTokens:Y.inputTokens}:{},...Y.outputTokens!==void 0?{outputTokens:Y.outputTokens}:{},...Y.cachedTokens!==void 0?{cachedTokens:Y.cachedTokens}:{}}})):Rt,Mt=yCe(kn,sd);if(!j)return vd.current={sourceMessages:e,dependencies:Z,value:Mt,virtualizerItems:Mt},Mt;let an=($=U.find(Hn=>Hn.role==="user"))==null?void 0:$.id,qt=an?Mt.filter(Hn=>Hn.type!=="message"||Hn.message.id!==an):Mt;return vd.current={sourceMessages:e,dependencies:Z,value:qt,virtualizerItems:qt},qt},[pe,ve,Mc,I,L,a,Jt,Ma,sn,yr,ud,ne,j,Y,K,U,e,sd,mt,r,he,ce,X,rl]),wd=((et=vd.current)==null?void 0:et.sourceMessages)===e?vd.current.virtualizerItems:Na,Ep=(0,x.useCallback)($=>wd.some(Z=>String(ty(Z))===$),[wd]),jy=(0,x.useRef)(void 0),_F=(0,x.useMemo)(()=>{var $;if(Hy.current&&(($=jy.current)==null?void 0:$.length)===Na.length)return jy.current.value;let Z=sF(Na);return jy.current={length:Na.length,value:Z},Z},[Na]),LF=Rc.length>=Vfe,Zo=E!=null,yd=!!d,dl=!!S,Ja=dl?1:0,Bc=Ja+Na.length,Rp=Bc+(Zo?1:0),AF=Ja+pe.length+(Zo?1:0),rs=r6e(AF,D),ja=(0,x.useCallback)(()=>ma.current,[]),X6=(0,x.useCallback)(()=>{let $=ma.current;if(!$)return;let Z=$.scrollHeight-$.scrollTop-$.clientHeight<ny;nn.current=!Z,$t(Z),Ya()},[Ya,$t]),Mp=(0,x.useCallback)(()=>{Bh.current=Date.now()+1e3},[]),Fh=(0,x.useCallback)(()=>{Lp.current!==void 0&&(window.clearTimeout(Lp.current),Lp.current=void 0)},[]),Qo=(0,x.useCallback)(()=>{var $;Fh(),($=gd.current)==null||$.abort(),gd.current=void 0},[Fh]),bd=(0,x.useCallback)(()=>{Fh();let $=qh.current;if($){if(w?.getSnapshot().lastEventId===$.lastEventId)return;qh.current=void 0}!b||gd.current!==void 0||nn.current||zy.current||qy.current<=rB||(Lp.current=window.setTimeout(()=>{if(Lp.current=void 0,zy.current||nn.current||qy.current<=rB)return;let Z=ma.current;if(!Z||Z.scrollHeight-Z.scrollTop-Z.clientHeight>=ny)return;let ge=new AbortController;gd.current=ge,b(ge.signal).then(()=>{if(ge.signal.aborted)return;let Te=w?.getSnapshot();qh.current={...Te?.lastEventId!==void 0?{lastEventId:Te.lastEventId}:{}}}).catch(Te=>{Te instanceof Error&&Te.name==="AbortError"||console.warn("[MessageList] transcript reload failed:",Te)}).finally(()=>{gd.current===ge&&(gd.current=void 0)})},lCe))},[Fh,b,w]);(0,x.useEffect)(()=>{qh.current=void 0},[w]),(0,x.useEffect)(()=>{if(!w)return Qo;let $=w.getSnapshot().lastEventId,Z=w.subscribe(()=>{let ge=w.getSnapshot().lastEventId;ge!==$&&($=ge,bd())});return()=>{Z(),Qo()}},[w,bd,Qo]),(0,x.useEffect)(()=>{if(_){Qo();return}bd()},[Qo,_,bd,v]);let kd=(0,x.useCallback)(()=>{hd.current=!0,ns.current!==void 0&&window.cancelAnimationFrame(ns.current),ns.current=window.requestAnimationFrame(()=>{hd.current=!1,ns.current=void 0,X6()})},[X6]);(0,x.useEffect)(()=>()=>{ns.current!==void 0&&window.cancelAnimationFrame(ns.current),Dc.current!==void 0&&window.cancelAnimationFrame(Dc.current),Or.current!==void 0&&window.cancelAnimationFrame(Or.current),Ip.current!==void 0&&window.cancelAnimationFrame(Ip.current),as.current!==void 0&&window.cancelAnimationFrame(as.current),Qo(),ke.current!==void 0&&window.cancelAnimationFrame(ke.current),Ke.current!==void 0&&window.cancelAnimationFrame(Ke.current)},[Qo]);let K6=(0,x.useCallback)(($,Z)=>{var ge;let Te=ma.current;(!Te||Te.scrollHeight>Te.clientHeight+1)&&(nn.current=!0,$t(!1)),kd(),il.current!==void 0&&window.clearTimeout(il.current),pd.current.clear(),(ge=ma.current)==null||ge.querySelectorAll("[data-message-row-key]").forEach(Ae=>{let Rt=Ae.dataset.messageRowKey;Rt&&pd.current.set(Rt,Ae.getBoundingClientRect().top)}),fd.current=!0,$y(()=>{Nc(Ae=>{if(!Ae.has($))return Ae;let Rt=new Set(Ae);return Rt.delete($),Rt}),dd(Ae=>{let Rt=new Map(Ae);return Rt.set($,Z),Rt})})},[kd,$t]);(0,x.useLayoutEffect)(()=>{var $;if(Dh||!fd.current)return;fd.current=!1;for(let ge of ts.current)ge.cancel();ts.current=[];let Z=typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches;Z||($=ma.current)==null||$.querySelectorAll("[data-message-row-key]").forEach(ge=>{if(typeof ge.animate!="function")return;let Te=ge.dataset.messageRowKey,Ae=Te?pd.current.get(Te):void 0;if(Ae===void 0){ts.current.push(ge.animate([{opacity:0},{opacity:1}],{duration:z5,easing:"ease-out"}));return}let Rt=Ae-ge.getBoundingClientRect().top;Math.abs(Rt)<1||ts.current.push(ge.animate([{translate:`0 ${Rt}px`},{translate:"0 0"}],{duration:z5,easing:"ease-out"}))}),pd.current.clear(),il.current=window.setTimeout(()=>{il.current=void 0,kd()},Z?0:z5)},[kd,Dh]),(0,x.useEffect)(()=>()=>{il.current!==void 0&&window.clearTimeout(il.current);for(let $ of ts.current)$.cancel();ts.current=[]},[]);let EF=(0,x.useCallback)($=>{let Z=$.target;Z instanceof HTMLElement&&Z.closest("[aria-expanded]")&&(nn.current=!0,$t(!1),kd())},[kd,$t]),$c=(0,x.useCallback)($=>{if(dl&&$===W5)return"slot:header";if(Zo&&$===Bc)return`slot:tail:${O}`;let Z=wd[$-Ja];return Z?ty(Z):`slot:row:${$}`},[dl,Zo,Bc,O,wd,Ja]),RF=(0,x.useCallback)($=>{if(dl&&$===W5)return e6e;if(Zo&&$===Bc)return a6e;let Z=wd[$-Ja];return Z?.type==="turn_collapse"?n6e:t6e},[dl,Zo,Ja,Bc,wd]),Wa=(0,x.useCallback)(($="auto")=>{if(Ee.current)return;let Z=ja();if(!Z||Z.scrollHeight<=Z.clientHeight)return;Oc.current=!1,cl.current+=1;let ge=cl.current;ll.current=!0,$==="smooth"?Z.scrollTo({top:Z.scrollHeight,behavior:$}):Z.scrollTop=Z.scrollHeight,Ya(),Pc.current=Math.max(0,Z.scrollHeight-Z.clientHeight),Ap();let Te=()=>{if(cl.current!==ge||(ll.current=!1,!Oc.current)||(Oc.current=!1,eo.current||nn.current))return;let Ae=ja();!Ae||Ae.scrollHeight<=Ae.clientHeight||($t(!0),Ae.scrollTop=Ae.scrollHeight,Ya(),Pc.current=Math.max(0,Ae.scrollHeight-Ae.clientHeight),Ap())};$==="smooth"?setTimeout(Te,350):requestAnimationFrame(Te)},[ja,Ap,Ya,$t]),Z6=(0,x.useCallback)(($="smooth")=>{nn.current=!1,$t(!0),Wa($)},[Wa,$t]),Yo=Vre({count:Rp,enabled:rs,getScrollElement:ja,getItemKey:$c,estimateSize:RF,overscan:20,anchorTo:"end",useFlushSync:!1,useAnimationFrameWithResizeObserver:!0,directDomUpdates:!0});Yo.shouldAdjustScrollPositionOnItemSizeChange=($,Z,ge)=>{var Te;return o6e($.end,((Te=ma.current)==null?void 0:Te.scrollTop)??ge.scrollOffset??0)};let MF=(0,x.useCallback)($=>{if(Yo.measureElement($),!$||!G6.current)return;let Z=Number($.dataset.index);Number.isFinite(Z)&&!Yo.itemSizeCache.has($c(Z))&&Yo.resizeItem(Z,$.offsetHeight)},[$c,Yo]);(0,x.useLayoutEffect)(()=>{if(!An)return;let $=ma.current;if(An.rowKey&&!Ep(An.rowKey)){let Z=ICe(Uy.current,An.rowKey);if(Z!==void 0&&_Ce(Na,Z)&&Mc.get(Z)!==!1&&!rl.has(Z)){Nc(ge=>ge.has(Z)?ge:new Set(ge).add(Z)),Ci(ge=>ge&&{...ge,rowKey:`msg:${Z}`});return}An.generation===br.current&&(br.current+=1),Nr.current=!1,_p.current=void 0,zh(!1),Ci(null);return}if(An.settled){if(!$){Nr.current=!1,Ci(null);return}if(An.virtual?U.length===An.messageCount:$.scrollHeight===An.scrollHeight){if(Nr.current=!1,Or.current!==void 0)return;let Z=u$,ge=()=>{if(Or.current=void 0,An.generation===br.current&&V6.current===An.messageCount){if(Z-=1,Z>0){Or.current=requestAnimationFrame(ge);return}Ci(Te=>Te===An?null:Te)}};Or.current=requestAnimationFrame(ge);return}Or.current!==void 0&&(cancelAnimationFrame(Or.current),Or.current=void 0),Or.current=requestAnimationFrame(()=>{if(Or.current=void 0,An.generation!==br.current)return;if(An.rowKey&&!Ep(An.rowKey)){Nr.current=!1,Ci(null);return}let Z=An.rowKey?Array.from($.querySelectorAll("[data-message-row-key]")).find(ge=>ge.dataset.messageRowKey===An.rowKey):void 0;Z&&An.rowTop!==void 0?$.scrollTop+=Z.getBoundingClientRect().top-An.rowTop:$.scrollTop=An.scrollTop+Math.max(0,$.scrollHeight-An.scrollHeight),Nr.current=!1,Ci(null)})}},[Ep,U.length,An,Na,Mc,rl]);let Q6=Yo.getVirtualItems(),xd=Yo.getTotalSize(),Y6=(0,x.useRef)({entryIndexById:new Map,headerOffset:0,isVisible:!1,turnIdByDisplayIndex:[],visibleItems:[]});Y6.current={entryIndexById:Oy,headerOffset:Ja,isVisible:Ec,turnIdByDisplayIndex:_F,visibleItems:Na};let J6=(0,x.useCallback)(()=>{let $=ja(),Z=Y6.current;if(!$||!Z.isVisible||Z.entryIndexById.size===0){Ph(qt=>qt===null?qt:null);return}let ge=$.getBoundingClientRect(),Te=ge.top,Ae=ge.bottom,Rt=Te+(Ae-Te)/2,gn=[],kn=null,Mt=Number.POSITIVE_INFINITY;$.querySelectorAll("[data-index]").forEach(qt=>{let Hn=qt.dataset.index;if(Hn===void 0)return;let Co=Number(Hn);if(!Number.isFinite(Co))return;let Ga=Co-Z.headerOffset;if(Ga<0||Ga>=Z.visibleItems.length)return;let to=qt.getBoundingClientRect();if(to.bottom<Te||to.top>Ae)return;gn.push(Ga);let PF=to.top+(to.bottom-to.top)/2,r9=Math.abs(PF-Rt);r9<Mt&&(Mt=r9,kn=Ga)});let an=WCe(Z.visibleItems,gn,Z.entryIndexById,kn,Z.turnIdByDisplayIndex);Ph(qt=>qt?.startIndex===an?.startIndex&&qt?.endIndex===an?.endIndex&&qt?.currentIndex===an?.currentIndex?qt:an)},[ja]),fl=(0,x.useCallback)(()=>{Si.current!==null&&cancelAnimationFrame(Si.current),Si.current=requestAnimationFrame(()=>{Si.current=null,J6()})},[J6]);(0,x.useEffect)(()=>()=>{Qn.current!==null&&(clearTimeout(Qn.current),Qn.current=null),Si.current!==null&&(cancelAnimationFrame(Si.current),Si.current=null)},[]),(0,x.useEffect)(()=>{fl()},[fl,Rp,xd,rs,Q6.length,Ec]);let[Np,Wy]=(0,x.useState)(null);(0,x.useEffect)(()=>{if(!Np)return;let $=setTimeout(()=>Wy(null),1600);return()=>clearTimeout($)},[Np]);let Gy=(0,x.useCallback)(($,Z)=>{var ge,Te;nn.current=!0,$t(!1),cl.current+=1;let Ae=cl.current;if(ll.current=!0,rs)if(Ee.current){let Rt=Yo.getOffsetForIndex($,"center");Rt&&ma.current&&(ma.current.scrollTop=Rt[0])}else Yo.scrollToIndex($,{align:"center"});else(Te=(ge=ma.current)==null?void 0:ge.querySelector(`[data-index="${$}"]`))==null||Te.scrollIntoView({block:"center"});Qn.current!==null&&clearTimeout(Qn.current),Qn.current=setTimeout(()=>{Qn.current=null,cl.current===Ae&&(ll.current=!1,fl(),Ya())},150),Wy(null),requestAnimationFrame(()=>Wy(Z))},[rs,Yo,$t,fl,Ya]),e9=(0,x.useRef)({visibleItems:[],displayItems:[],headerOffset:0,performScrollToRow:()=>{}});e9.current={visibleItems:Na,displayItems:pe,headerOffset:Ja,performScrollToRow:Gy};let qc=(0,x.useRef)(null),Vy=(0,x.useCallback)(($,Z)=>{let{visibleItems:ge,displayItems:Te,headerOffset:Ae,performScrollToRow:Rt}=e9.current,gn=j5(ge,$,Z);if(gn>=0)return qc.current=null,Rt(gn+Ae,{messageId:$,callId:Z}),!0;let kn=j5(Te,$,Z);if(kn<0)return!1;let Mt=iF(Te,kn);return Mt?(qc.current={messageId:$,callId:Z},dd(an=>{if(an.get(Mt)===!0)return an;let qt=new Map(an);return qt.set(Mt,!0),qt}),!0):!1},[]);(0,x.useImperativeHandle)(V,()=>({scrollToMessage:Vy,scrollToBottom:Z6}),[Vy,Z6]),(0,x.useEffect)(()=>{let $=qc.current;if(!$)return;let Z=j5(Na,$.messageId,$.callId);Z<0||(qc.current=null,Gy(Z+Ja,$))},[Na,Ja,Gy]);let Ti=(0,x.useCallback)(async($=!1,Z=!1)=>{let ge=ma.current;if(!ge||!y||m||Nr.current||g&&!Z||Pr.current&&!$)return;Pr.current=!1,Nr.current=!0;let Te=++br.current;Or.current!==void 0&&(cancelAnimationFrame(Or.current),Or.current=void 0),zh(!Z);let Ae;if(rs){let an=String($c(Ja)),qt=u$;if(Ae=await new Promise(Hn=>{let Co=()=>{if(Ip.current=void 0,Te!==br.current||ma.current!==ge||!Ep(an)||qt--<=0){Hn(void 0);return}let Ga=Array.from(ge.querySelectorAll("[data-message-row-key]")).find(to=>to.dataset.messageRowKey===an);Ga?Hn({rowKey:an,rowTop:Ga.getBoundingClientRect().top}):Ip.current=requestAnimationFrame(Co)};Ip.current=requestAnimationFrame(Co)}),!Ae){Te===br.current&&(Nr.current=!1,_p.current=void 0,zh(!1));return}}let Rt=ge.scrollHeight,gn=ge.scrollTop,kn=ge.getBoundingClientRect().top,Mt=Ae?void 0:Array.from(ge.querySelectorAll("[data-message-row-key]")).find(an=>{let qt=an.dataset.messageRowKey;return qt!==void 0&&qt.startsWith("msg:")&&an.getBoundingClientRect().bottom>kn});nn.current=!0,Ci({scrollHeight:Rt,scrollTop:gn,messageCount:U.length,virtual:rs,settled:!1,generation:Te,...Ae??(Mt?{rowKey:Mt.dataset.messageRowKey,rowTop:Mt.getBoundingClientRect().top}:{})});try{ol.current.set(Te,{ids:new Set(Uy.current.map(qt=>qt.id)),resolved:!1}),await y(Z?{force:!0}:void 0);let an=ol.current.get(Te);an&&(an.resolved=!0),Te===br.current&&Ci(qt=>qt?.generation===Te?{...qt,settled:!0}:qt)}catch{ol.current.delete(Te),Te===br.current&&(Pr.current=!0,Nr.current=!1,Ci(null))}finally{Te===br.current&&zh(!1)}},[m,y,g,$c,Ep,Ja,U.length,rs]),NF=(0,x.useCallback)(()=>{Ti(!0,!0)},[Ti]);(0,x.useLayoutEffect)(()=>{let $=ol.current;if($.size===0)return;let Z=e.find(gn=>!(gn!=null&&gn.id.startsWith("local-")));if(!Z)return;let ge=$.entries().next().value;if(!ge)return;let[Te,Ae]=ge;if(Ae.ids.has(Z.id))return;let Rt=[];for(let gn=0;gn<e.length;gn++){let kn=e[gn];if(!kn||!ko(kn)||Ae.ids.has(kn.id))continue;let Mt=!1;for(let an=gn+1;an<e.length;an++){let qt=e[an];if(ko(qt))break;if(Ae.ids.has(qt.id)){Mt=!0;break}}Mt&&Rt.push(kn.id)}if(Rt.length===0){if(!Ae.resolved)return}else Nc(gn=>{let kn=null;for(let Mt of Rt)gn.has(Mt)||(kn??(kn=new Set(gn)),kn.add(Mt));return kn??gn});$.delete(Te);for(let gn of $.values())for(let kn of e)kn&&gn.ids.add(kn.id)},[e]),(0,x.useEffect)(()=>{let $=_p.current;if($===void 0||m||An||Nr.current||(_p.current=void 0,!p||$!==br.current))return;let Z=ja();Z&&Z.scrollTop<=G5&&Ti(!0)},[ja,p,Ti,m,An]);let Xy=(0,x.useCallback)(()=>{let $=ja();if(!$)return;let Z=$.scrollTop;p&&Z<=G5&&Ti(!0);let ge=Date.now()<=Bh.current;if(ll.current&&!ge){Pc.current=Z;return}fl();let Te=Pc.current;Pc.current=Z;let Ae=$.scrollHeight-Z-$.clientHeight;if(Ya(),Z<Te-1){let Rt=Ae<ny;ge?(Qo(),nn.current=!0,$t(!1)):Rt?(nn.current=!1,$t(!0)):nn.current||(Qo(),$t(!1));return}Ae<ny?(nn.current=!1,$t(!0),bd()):Qo()},[ja,p,Ti,Ya,fl,bd,Qo,$t]);(0,x.useEffect)(()=>{let $=ja();if($)return $.addEventListener("scroll",Xy,{passive:!0}),()=>$.removeEventListener("scroll",Xy)},[ja,Xy]);let Uh=(0,x.useCallback)(()=>{if(!p||m||f||yd)return;let $=ja();if(!$||$.scrollHeight>$.clientHeight+1)return;let Z=Fy.current;if(Z!==null&&Z.loader===y&&Z.totalVirtualSize===xd){Pr.current=!0;return}Fy.current={loader:y,totalVirtualSize:xd},Ti()},[f,ja,p,Ti,m,y,yd,xd]);(0,x.useEffect)(()=>{Uh()},[Uh,xd]),(0,x.useEffect)(()=>{let $=ja();if(!$)return;let Z=()=>{if(as.current=void 0,!($.scrollTop>G5)){if(m||Nr.current){_p.current=br.current;return}Ti(!0)}},ge=()=>{as.current!==void 0&&cancelAnimationFrame(as.current),as.current=requestAnimationFrame(Z)},Te=Mt=>{Mp(),Mt.deltaY<0&&ge()},Ae=()=>{Mp()},Rt=()=>ge(),gn=Mt=>{let an=$.getBoundingClientRect(),qt=20;(Mt.clientX>=an.right-qt||Mt.clientY>=an.bottom-qt)&&Mp()},kn=Mt=>{(Mt.key==="ArrowUp"||Mt.key==="ArrowDown"||Mt.key==="PageUp"||Mt.key==="PageDown"||Mt.key==="Home"||Mt.key==="End"||Mt.key===" ")&&(Mp(),(Mt.key==="ArrowUp"||Mt.key==="PageUp"||Mt.key==="Home")&&ge())};return $.addEventListener("wheel",Te,{passive:!0}),$.addEventListener("touchstart",Ae,{passive:!0}),$.addEventListener("touchmove",Rt,{passive:!0}),$.addEventListener("pointerdown",gn,{passive:!0}),$.addEventListener("keydown",kn,{passive:!0}),()=>{$.removeEventListener("wheel",Te),$.removeEventListener("touchstart",Ae),$.removeEventListener("touchmove",Rt),$.removeEventListener("pointerdown",gn),$.removeEventListener("keydown",kn),as.current!==void 0&&(cancelAnimationFrame(as.current),as.current=void 0)}},[ja,Ti,m,Mp]),(0,x.useEffect)(()=>{let $=ja();if(!$||typeof ResizeObserver>"u")return;let Z=new ResizeObserver(()=>{Ya(),Uh(),!(eo.current||nn.current)&&($t(!0),Wa())});Z.observe($);for(let Te of Array.from($.children))Z.observe(Te);let ge=new MutationObserver(Te=>{for(let Ae of Te){for(let Rt of Array.from(Ae.addedNodes))Rt instanceof HTMLElement&&Z.observe(Rt);for(let Rt of Array.from(Ae.removedNodes))Rt instanceof HTMLElement&&Z.unobserve(Rt)}Ya()});return ge.observe($,{childList:!0}),Ya(),()=>{Z.disconnect(),ge.disconnect()}},[ja,Uh,Ya,Wa,$t]),(0,x.useEffect)(()=>{e.length===0&&(nn.current=!1,Oc.current=!1,$t(!0),qc.current=null,ol.current.clear(),dd($=>$.size?new Map:$),Nc($=>$.size?new Set:$))},[e.length,$t]),(0,x.useEffect)(()=>{let $=ma.current;if(!$)return;let Z=new ResizeObserver(()=>{fl(),!eo.current&&(nn.current||($t(!0),requestAnimationFrame(()=>{!eo.current&&!nn.current&&Wa()})))});return Z.observe($),()=>Z.disconnect()},[Wa,fl,$t]),(0,x.useLayoutEffect)(()=>{let $=fCe(e);if(f||d||z.current){md.current=$,Tp.current=!0,ul.current=!1,z.current=d;return}if(z.current=d,!Tp.current){md.current=$,Tp.current=!0,ul.current=!1;return}let Z=pCe(e);$&&Z?.role==="user"&&$!==md.current?(nn.current=!1,$t(!0),qc.current=null,ul.current=!0):ul.current=!1,md.current=$},[e,f,d,$t]),(0,x.useLayoutEffect)(()=>{Xo.current&&!f&&(nn.current=!1,$t(!0),Wa("auto")),Xo.current=f},[f,Wa,$t]),(0,x.useLayoutEffect)(()=>{if(d){se.current=!0;return}if(!se.current||f||e.length===0)return;se.current=!1,nn.current=!1,$t(!0),qc.current=null,ke.current!==void 0&&window.cancelAnimationFrame(ke.current),Ke.current!==void 0&&window.cancelAnimationFrame(Ke.current);let $=()=>{eo.current||nn.current||($t(!0),Wa("auto"))};ke.current=window.requestAnimationFrame(()=>{ke.current=void 0,$(),Ke.current=window.requestAnimationFrame(()=>{Ke.current=void 0,$()})})},[f,d,e.length,Wa,$t]),(0,x.useLayoutEffect)(()=>{let $=yt.current!==W;yt.current=W,$&&(f||nn.current||($t(!0),requestAnimationFrame(()=>{!eo.current&&!nn.current&&Wa("auto")})))},[W,f,Wa,$t]);let Hh=(0,x.useMemo)(()=>$Ce(Na),[Na]);(0,x.useLayoutEffect)(()=>{if(!f){if(!Hh){Gt.current=null;return}Hh!==Gt.current&&(Gt.current=Hh,(sl.current||!nn.current)&&requestAnimationFrame(()=>{nn.current||($t(!0),Wa())}))}},[f,Hh,Wa,$t]),(0,x.useEffect)(()=>{H&&Zo&&!Ko.current&&(nn.current=!1,$t(!0),requestAnimationFrame(()=>{nn.current||Wa()})),Ko.current=Zo},[H,Zo,Wa,$t]);let t9=(0,x.useCallback)($=>{let Z=Ae=>{if(Ae.type==="parallel_agents")return(0,u.jsx)(Y5,{timestamp:Ae.timestamp,children:(0,u.jsx)("div",{className:l$(Ae,Np)?nl.flash:void 0,children:(0,u.jsx)(Rq,{agents:Ae.agents,autoManageExpansion:ct==="interactive"&&!f,automaticCollapseDelayMs:es.key===Ae.key&&!Jr?cCe:void 0,deferAutomaticCollapse:es.key===Ae.key&&Jr,expandActiveWhenLive:I&&xi.has(Ae.key),onAutomaticExpansionChange:an=>Mh(Ae.key,an),pendingApproval:r})})});if(Ae.type==="turn_outputs")return(0,u.jsx)(c5e,{changes:Ae.changes,turnId:Ae.turnId,artifacts:Ae.artifacts,scheduledTasks:Ae.scheduledTasks,workspaceCwd:A,onOpenRequest:oe,onReviewChanges:ie??q5,onOpenArtifact:le??q5,onOpenScheduledTask:J??q5,onError:be});if(Ae.type==="turn_collapse")return(0,u.jsx)(u6e,{turnCollapse:Ae.turnCollapse,onToggleCollapse:K6});let Rt=Ae.message.role==="assistant"?cd.get(Ae.message.id):void 0,gn;Ae.message.role==="assistant"&&Rt&&!t&&(gn={turnId:Rt,message:{id:Ae.message.id,content:Ae.message.content,isStreaming:Ae.message.isStreaming,timestamp:Ae.message.timestamp}});let kn=Ae.message.role==="assistant"?Ae.message.branchRecordId:void 0,Mt=Ae.message.role==="user"?Ae.message.content:void 0;return(0,u.jsx)(xSe,{message:Ae.message,pendingApproval:r,onShowContextDetail:o,onImagePreview:i,onAttachmentPreview:s,onInsightReportOpen:l,onEditUserMessage:c&&!I&&!p&&!h&&Ae.message.role==="user"&&Mt!==void 0&&Ae.message.id===zt.lastId?()=>c(zt.turnIndexById.get(Ae.message.id)??0,Mt):void 0,workspaceCwd:A,showRetryHint:ue,onRetryClick:M,sendFailed:Ae.message.role==="user"&&Ae.message.id===de,onRetrySend:F,onBranchSession:N,branchRecordId:kn,showAssistantActions:Ae.message.role==="assistant"&&cd.has(Ae.message.id),showAssistantBranch:Ae.message.role==="assistant"&&!I&&kn!==void 0,isLocateFlashing:l$(Ae,Np),assistantTurnFooterInfo:gn,generateContent:xe})};if(dl&&$===W5)return S;if(Zo&&$===Bc)return E;let ge=$-Ja,Te=Na[ge];return Te?Z(Te):null},[dl,S,Zo,E,Bc,r,f,I,Jr,xi,es,ct,Mh,o,i,s,l,c,zt,p,h,xe,Ja,Na,Np,cd,t,A,ue,M,de,F,N,K6,le,J,ie,oe,be]),n9=(0,x.useCallback)($=>$?d6e($):void 0,[]),a9=rs?xd:e;return(0,x.useLayoutEffect)(()=>{if(f)return;let $=ul.current;if(ll.current&&!$){nn.current||(Oc.current=!0);return}hd.current&&!$||(sl.current||$||!nn.current)&&(nn.current||$t(!0),Wa($?"smooth":"auto"),ul.current=!1)},[a9,Rp,f,Wa,$t]),(0,x.useLayoutEffect)(()=>{Ya()},[a9,Ya,Rp]),(0,u.jsxs)("div",{ref:ma,className:zC(Lt.list,dl&&C?Lt.listWithWelcomeHeader:void 0),"data-web-shell-message-list":!0,onClickCapture:EF,children:[yd&&(0,u.jsx)(g6e,{label:nt("editor.sessionLoading")}),m&&!yd&&!CF&&(0,u.jsx)("div",{className:Lt.historyStatus,role:"status",children:nt("history.loadingEarlier")}),h&&!yd&&(0,u.jsx)("div",{className:Lt.historyStatus,role:"status",children:nt("history.capacityReached")}),g&&!yd&&!h&&(0,u.jsxs)("div",{className:Lt.historyStatus,children:[(0,u.jsx)("span",{role:"status",children:nt("history.paginationError")}),y&&(0,u.jsx)("button",{type:"button",className:Lt.historyRetryButton,onClick:NF,children:nt("history.retry")})]}),(0,u.jsx)(m6e,{entries:Rc,currentTurnId:Dy,currentRange:Cp,hidden:!Ec||!LF,onSelect:Vy}),rs?(0,u.jsx)("div",{ref:Yo.containerRef,className:Lt.virtualSizer,children:Q6.map($=>(0,u.jsx)("div",{"data-index":$.index,ref:MF,className:zC(Lt.virtualRow,n9(Na[$.index-Ja])),"data-message-row-key":String($c($.index)),"data-source-block-ids":c$(Na[$.index-Ja],e),"data-web-shell-message-row":!0,style:{position:"absolute",top:0,left:0,right:0},children:t9($.index)},$.key))}):Array.from({length:Rp},($,Z)=>{let ge=$c(Z),Te=Na[Z-Ja];return(0,u.jsx)("div",{"data-index":Z,className:n9(Te),"data-message-row-key":String(ge),"data-source-block-ids":c$(Te,e),"data-web-shell-message-row":!0,children:t9(Z)},ge)})]})})),p$={en:{title:"Something went wrong",body:"An unexpected error occurred and this content could not be displayed.",retry:"Try again",reload:"Reload page"},"zh-CN":{title:"\u51FA\u4E86\u70B9\u95EE\u9898",body:"\u53D1\u751F\u610F\u5916\u9519\u8BEF\uFF0C\u65E0\u6CD5\u663E\u793A\u6B64\u5185\u5BB9\u3002",retry:"\u91CD\u8BD5",reload:"\u91CD\u65B0\u52A0\u8F7D"}},w6e={display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:"0.75rem",padding:"2rem",minHeight:"8rem",height:"100%",textAlign:"center",color:"inherit"},y6e={margin:0,fontSize:"1rem",fontWeight:600},b6e={margin:0,fontSize:"0.85rem",opacity:.7,maxWidth:"32rem"},k6e={appearance:"none",cursor:"pointer",padding:"0.4rem 1rem",fontSize:"0.85rem",borderRadius:"6px",border:"1px solid rgba(128, 128, 128, 0.4)",background:"transparent",color:"inherit"};function x6e({error:e,onRetry:t,language:n="en",retryMode:a="reset"}){let r=p$[n]??p$.en;return(0,u.jsxs)("div",{role:"alert",style:w6e,"data-web-shell-error":!0,children:[(0,u.jsx)("p",{style:y6e,children:r.title}),(0,u.jsx)("p",{style:b6e,children:r.body}),!1,(0,u.jsx)("button",{type:"button",style:k6e,onClick:t,children:a==="reload"?r.reload:r.retry})]})}function S6e(e){let t=new Map;for(let n of e){if(n.kind!=="assistant"&&n.kind!=="user")continue;let a=Ra(n.meta);if(a?.source!=="background_notification"||a.qwenDiscreteMessage!==!0)continue;let r=Ra(a.backgroundTask),o=bo(r,"toolUseId"),i=bo(r,"status");r?.kind!=="agent"||!o||!i||t.set(o,{status:i,endTime:n.serverTimestamp??n.clientReceivedAt})}return t}function C6e(e){return e.startsWith("Model switched: ")}var T6e=/^[A-Za-z0-9_.-]+ \(unrecognized daemon event\): /,I6e=["usage_update: {","a2ui: {"];function _6e(e){return e.debugReason!==void 0?e.debugReason.startsWith("unrecognized_"):e.kind!=="debug"?!1:T6e.test(e.text)||I6e.some(t=>e.text.startsWith(t))}function L6e(e){return e!=="loop_detected"}function A6e(e,t){return e.errorKind==="loop_detected"?t?.loopDetected??e.text:e.errorKind==="model_stream_interrupted"||e.source==="turn_error"&&e.text.trim().toLowerCase()==="terminated"?t?.modelStreamInterrupted??e.text:e.text}function E6e(e,t){return e===void 0?{}:t?{data:{...Ra(e)??{value:e},errorKind:t}}:{data:e}}function R6e(e){if(!e||typeof e!="object")return null;let t=e;return typeof t.displayName=="string"&&t.displayName?t.displayName:typeof t.newSessionId=="string"?t.newSessionId.slice(0,8):null}function M6e(e){if(!e||typeof e!="object")return;let t=e.items;if(!Array.isArray(t)||t.length===0)return;let n=[];for(let a of t){if(!a||typeof a!="object")continue;let r=a.content;if(Array.isArray(r))for(let o of r){if(!o||typeof o!="object")continue;let i=o.type,s=o.data,l=o.mimeType;if(i==="image"&&typeof s=="string"&&typeof l=="string"){let c=o;n.push({data:s,mimeType:l,...typeof c.attachmentId=="string"?{attachmentId:c.attachmentId}:{}})}}}return n.length>0?n:void 0}function N6e(e){if(!e||typeof e!="object")return;let t=e.items;if(!Array.isArray(t))return;let n=t.flatMap(a=>{if(!a||typeof a!="object")return[];let r=a.content;return Array.isArray(r)?r.flatMap(o=>{if(!o||typeof o!="object")return[];let i=o;return i.type==="resource"&&typeof i.attachmentId=="string"?[{name:i.attachmentId,attachmentId:i.attachmentId,mimeType:typeof i.mimeType=="string"?i.mimeType:"application/octet-stream"}]:[]}):[]});return n.length>0?n:void 0}function P6e(e){if(!e||typeof e!="object")return;let t=e.items;if(!Array.isArray(t)||t.length===0)return;let n=[];for(let a of t){if(!a||typeof a!="object")continue;let r=a.content;if(Array.isArray(r))for(let o of r){if(!o||typeof o!="object"||o.type!=="text")continue;let i=o.text;typeof i=="string"&&i.length>0&&n.push(i)}}return n.length>0?n.join(`
619
619
  `):void 0}function m$(e){var t;return((t=e.meta)==null?void 0:t.source)==="background_notification"}function h$(e){var t;return Ra((t=e.meta)==null?void 0:t.backgroundTask)??void 0}function g$(e){return e.text.length===0}function v$(e,t){if(!e)return t;if(!t)return e;let n=(e.cachedTokens??0)+(t.cachedTokens??0);return{inputTokens:e.inputTokens+t.inputTokens,outputTokens:e.outputTokens+t.outputTokens,...n>0?{cachedTokens:n}:{}}}function O6e(e,t={}){var n,a,r,o,i;let s=[],l=t.includeSourceIdentity===!0,c=t.safeToolProjection===!0,d=((n=t.labels)==null?void 0:n.promptCancelled)??"Request cancelled.",f=new Map,p=new Map,m=new Map,h=S6e(e),g=null,y=null,v=!1;for(let w=0;w<e.length;w++){let b=e[w],I=b.serverTimestamp??b.clientReceivedAt;switch(b.kind){case"user":{let _=b;if(m$(_)){g=null,y=null,v=!0,s.push({id:b.id,role:"system",content:_.text,variant:"info",source:"background_notification",data:h$(_),timestamp:I,sourceBlockIds:[b.id]});break}g=null,y=null,v=!1;let L=Ra(_.meta),S=bo(L,"source"),C=Array.isArray(L?.inputAnnotations)?L.inputAnnotations:void 0,A=(a=_.images)==null?void 0:a.map(D=>({data:D.data,mimeType:D.mimeType||"image/*",...D.attachmentId?{attachmentId:D.attachmentId}:{}})),E=(r=_.files)==null?void 0:r.map(D=>({name:D.name,mimeType:D.mimeType||"text/plain",...D.data!==void 0?{data:D.data}:{},...D.text!==void 0?{text:D.text}:{},...D.attachmentId?{attachmentId:D.attachmentId}:{}}));if(S==="mid_turn_message_injected"){s.push({id:b.id,role:"system",content:_.text,variant:"info",source:S,timestamp:I,...A&&A.length>0?{images:A}:{},...E&&E.length>0?{files:E}:{}}),v=!0;break}let O={id:b.id,role:"user",content:_.text,timestamp:I,sourceBlockIds:[b.id],...S?{source:S}:{},...C?{inputAnnotations:C}:{}};A&&A.length>0&&(O.images=A),E&&E.length>0&&(O.files=E),s.push(O);break}case"assistant":{let _=b;if(m$(_)){g=null,y=null,v=!0,s.push({id:b.id,role:"system",content:_.text,variant:"info",source:"background_notification",data:h$(_),timestamp:I,sourceBlockIds:[b.id]});break}let L=Ra(_.meta);if(L?.source==="vision_bridge_notice"){g=null,y=null,v=!0,s.push({id:b.id,role:"system",content:_.text,variant:"info",source:"vision_bridge_notice",...L.visionBridgeNotice!==void 0?{data:L.visionBridgeNotice}:{},timestamp:I});break}if(!_.text&&!_.usage)break;let S=_.parentToolCallId?f.get(_.parentToolCallId):void 0;if(S){w$(S,_.text,b.id);break}let C=e9e(_.text);if(C){let E=null,O=!1,D=0,H=0,W=0,Q=null;for(let j of C)j.kind==="insight"?j.data.type==="insight_progress"?E=j.data:j.data.type==="insight_ready"?(O=!0,s.push({id:`${b.id}-ir-${D++}`,role:"insight_ready",path:j.data.path,timestamp:I,sourceBlockIds:[b.id]})):j.data.type==="insight_error"&&(O=!0,s.push({id:`${b.id}-ie-${H++}`,role:"insight_error",error:j.data.error,timestamp:I,sourceBlockIds:[b.id]})):(s.push({id:l?`${b.id}-t-${W++}`:`${b.id}-t-${s.length}`,role:"assistant",content:j.text,timestamp:I,sourceBlockIds:[b.id]}),g=s.length-1,Q=g,y=null);if(_.branchRecordId&&Q!==null){let j=s[Q];j?.role==="assistant"&&(s[Q]={...j,branchRecordId:_.branchRecordId})}E&&!O&&s.push({id:`${b.id}-ip`,role:"insight_progress",stage:E.stage,progress:E.progress,detail:E.detail,timestamp:I,sourceBlockIds:[b.id]}),v=!0;break}let A=g!==null?s[g]:void 0;if(A&&A.role==="assistant"&&!v&&_.segmentId===void 0&&!g$(_)){let E=v$(A.usage,_.usage);s[g]={...A,content:A.content+_.text,isStreaming:_.streaming,sourceBlockIds:Js(A.sourceBlockIds,b.id),..._.branchRecordId?{branchRecordId:_.branchRecordId}:{},...E?{usage:E}:{}},v=!1,y=null}else if(!g$(_))s.push({id:b.id,role:"assistant",content:_.text,isStreaming:_.streaming,timestamp:I,sourceBlockIds:[b.id],..._.branchRecordId?{branchRecordId:_.branchRecordId}:{},..._.usage?{usage:_.usage}:{}}),g=s.length-1,y=null,v=!1;else if(_.usage&&A&&A.role==="assistant"){let E=v$(A.usage,_.usage);s[g]={...A,..._.branchRecordId?{branchRecordId:_.branchRecordId}:{},...E?{usage:E}:{}}}break}case"thought":{let _=b,L=_.parentToolCallId?f.get(_.parentToolCallId):void 0;if(L){w$(L,_.text,b.id);break}let S=y!==null?s[y]:void 0;S&&S.role==="thinking"&&!v&&_.segmentId===void 0?(s[y]={...S,content:S.content+_.text,isStreaming:_.streaming,sourceBlockIds:Js(S.sourceBlockIds,b.id)},v=!1):(s.push({id:b.id,role:"thinking",content:_.text,isStreaming:_.streaming,timestamp:I,sourceBlockIds:[b.id]}),y=s.length-1,v=!1),g=null;break}case"tool":{let _=b,L=U6e(_,c),S=h.get(L.callId),C=_$(L,S?.status,S?.endTime,c);_.serverTimestamp!==void 0&&p.set(C.callId,_.serverTimestamp);let A=C.parentToolCallId?f.get(C.parentToolCallId):void 0,E=f.get(C.callId);if(E){y$(E,C,{replaceArgs:c||_.rawInput!==void 0||E.args===void 0,replaceRawOutput:c||pF(_)!==void 0||E.rawOutput===void 0});break}if(A){$6e(A,C),f.set(C.callId,C);break}V5(s,b.id,C,I),f.set(C.callId,C),g=null,y=null,v=!0;break}case"shell":{let _=b,L=s[s.length-1];if(L&&L.role==="tool_group"){let S=q6e(L.tools),C=L.tools[S];if(C){let A=typeof C.rawOutput=="string"?C.rawOutput:"",E={...C,rawOutput:A+_.text,sourceBlockIds:Js(C.sourceBlockIds,b.id)};s[s.length-1]={...L,sourceBlockIds:Js(L.sourceBlockIds,b.id),tools:[...L.tools.slice(0,S),E,...L.tools.slice(S+1)]},f.get(C.callId)===C&&f.set(C.callId,E)}}else s.push({id:b.id,role:"tool_group",sourceBlockIds:[b.id],tools:[{callId:b.id,toolName:"shell",status:"completed",kind:"execute",rawOutput:_.text,sourceBlockIds:[b.id]}],timestamp:I}),v=!0;break}case"user_shell":{let _=b;s.push({id:b.id,role:"user_shell",sourceBlockIds:[b.id],command:_.command,output:_.text,..._.cwd?{cwd:_.cwd}:{},timestamp:I}),v=!0;break}case"permission":{let _=b;W6e(_,m,c);let L=j6e(_,c);if(!L)break;_.serverTimestamp!==void 0&&!p.has(L.callId)&&p.set(L.callId,_.serverTimestamp);let S=Mr(L);if(!_.resolved)break;let C=f.get(L.callId);if(C){let A=C.status,E=C.endTime;L.toolName=C.toolName,_.resolved&&(X5(_.resolved)?L.status=S?L.status:"in_progress":(L.status=c&&b$(_.resolved)?"completed":"failed",L.endTime=_.updatedAt)),y$(C,L),(z6e(A)||_.resolved&&S&&X5(_.resolved))&&(C.status=A,C.endTime=E);break}if(_.resolved){X5(_.resolved)?(S||(L.status="in_progress"),V5(s,b.id,L,I),f.set(L.callId,L),v=!0):(L.status=c&&b$(_.resolved)?"completed":"failed",L.endTime=_.updatedAt,V5(s,b.id,L,I),f.set(L.callId,L),v=!0);break}break}case"status":case"debug":{let _=b;if(_6e(_))break;if(_.source==="mid_turn_message_injected"){let A=M6e(_.data),E=N6e(_.data);s.push({id:b.id,role:"system",content:_.text.length>0?_.text:P6e(_.data)??_.text,variant:"info",timestamp:I,source:_.source,..._.data!==void 0?{data:_.data}:{},...A?{images:A}:{},...E?{files:E}:{}}),v=!0;break}let L=_.source==="session_branched"?R6e(_.data):null,S=L&&(o=t.labels)!=null&&o.branchSuccess?t.labels.branchSuccess(L):_.text;if(C6e(S))break;let C=F6e(S);if(C){s.push({id:b.id,role:"plan",todos:C,timestamp:I,sourceBlockIds:[b.id]}),v=!0;break}s.push({id:b.id,role:"system",content:S,variant:"info",timestamp:I,sourceBlockIds:[b.id],..._.source?{source:_.source}:{},..._.data!==void 0?{data:_.data}:{}}),v=!0;break}case"error":{let _=b,L=_.errorKind;s.push({id:b.id,role:"system",content:A6e(_,t.labels),variant:"error",retryable:_.source==="turn_error"&&L6e(L),timestamp:I,sourceBlockIds:[b.id],..._.source?{source:_.source}:{},...E6e(_.data,L)}),v=!0;break}case"prompt_cancelled":s.push({id:b.id,role:"system",content:d,variant:"info",source:"prompt_cancelled",timestamp:I,sourceBlockIds:[b.id]}),v=!0;break}}for(let w of f.values()){let b=m.get(w.callId);b!=null&&b.title&&(w.title=b.title),!Array.isArray((i=w.args)==null?void 0:i.questions)&&b!=null&&b.args&&(w.args=b.args),Mr(w)&&Fa(w.status)&&w.endTime===void 0&&(w.startTime=p.get(w.callId)??w.startTime)}return D6e(s),l||B6e(s),s}function D6e(e){let t=n=>{let a=[];for(let r of n)a.push(...r.sourceBlockIds??[]),r.subTools&&a.push(...t(r.subTools));return a};for(let n of e)n.role==="tool_group"&&(n.sourceBlockIds=Js(n.sourceBlockIds,...t(n.tools)))}function B6e(e){let t=n=>{for(let a of n)delete a.sourceBlockIds,a.subTools&&t(a.subTools)};for(let n of e)delete n.sourceBlockIds,n.role==="tool_group"&&t(n.tools)}function $6e(e,t){e.subTools||(e.subTools=[]),e.subTools.push(t),e.sourceBlockIds=Js(e.sourceBlockIds,...t.sourceBlockIds??[])}function Js(e,...t){return[...new Set([...e??[],...t])]}function w$(e,t,n){e.subContent=(e.subContent||"")+t,e.sourceBlockIds=Js(e.sourceBlockIds,n)}function V5(e,t,n,a){let r=i=>Mr(i),o=e[e.length-1];if(o&&o.role==="tool_group"&&o.id.startsWith("tg-")&&!r(n)&&!o.tools.some(r)){o.tools.push(n),o.sourceBlockIds=Js(o.sourceBlockIds,t);return}e.push({id:`tg-${t}`,role:"tool_group",tools:[n],timestamp:a,sourceBlockIds:[t]})}function q6e(e){for(let t=e.length-1;t>=0;t--){let n=e[t];if(n.kind==="execute"&&n.status==="in_progress")return t}for(let t=e.length-1;t>=0;t--)if(e[t].kind==="execute")return t;return e.length-1}function y$(e,t,n={}){e.status=t.status??e.status,e.title=t.title??e.title,e.toolName=t.toolName??e.toolName,e.kind=t.kind??e.kind,e.sourceBlockIds=Js(e.sourceBlockIds,...t.sourceBlockIds??[]),e.content=t.content??e.content,e.endTime=t.endTime??e.endTime,e.wasCancelled=t.wasCancelled??e.wasCancelled,n.replaceRawOutput!==!1&&(e.rawOutput=t.rawOutput??e.rawOutput),n.replaceArgs!==!1&&(e.args=t.args??e.args),e.executionMode=t.executionMode??e.executionMode,e.subagentSessionReady=e.subagentSessionReady===!0?!0:t.subagentSessionReady??e.subagentSessionReady,e.locations=t.locations??e.locations}function z6e(e){return e==="completed"||e==="failed"}function F6e(e){let t=e.startsWith("plan: ")?e.slice(6):void 0;if(t)try{let n=JSON.parse(t),a=Ra(n);if(a?.sessionUpdate!=="plan"||!Array.isArray(a.entries))return;let r=rh(a.entries);return r.length>0?r:void 0}catch{return}}function Ra(e){if(!(!e||typeof e!="object"||Array.isArray(e)))return e}function bo(e,t){let n=e?.[t];return typeof n=="string"&&n.length>0?n:void 0}function U6e(e,t){var n;let a=V6e(e,t),r=t?e.background===!0?"background":"foreground":(n=Ra(a))==null?void 0:n.executionMode,o=G6e(e,a),i=t?void 0:X6e(e),s={running:"in_progress",pending:"pending",confirming:"pending",background:"pending",completed:"completed",failed:"failed",cancelled:t?"failed":"completed",canceled:t?"failed":"completed",in_progress:"in_progress"},l=e.status==="completed"||e.status==="failed"||e.status==="cancelled"||e.status==="canceled",c=o&&(!t||!l);return{callId:e.toolCallId,toolName:e.toolName||"unknown",title:e.title,status:(c?"pending":s[e.status])||e.status||"in_progress",kind:gF(e.toolName,e.toolKind),rawOutput:a,args:H6e(e,t),executionMode:SD(r)?r:void 0,subagentSessionReady:e.subagentSessionReady,parentToolCallId:e.parentToolCallId,startTime:e.createdAt,endTime:l&&!c?e.updatedAt:void 0,...hF(e.status)?{wasCancelled:!0}:{},...i?{content:i}:{},sourceBlockIds:[e.id]}}function H6e(e,t){return t?H6(e.preview):e.rawInput}function j6e(e,t){let n=Ra(e.toolCall);if(!t&&!n)return;let a=t?H6(e.preview):n?fF(n):void 0;if(Array.isArray(a?.questions))return;let r=n?Ra(n._meta):void 0,o=t?e.toolKind:bo(n,"kind"),i=(t?e.toolName:bo(r,"toolName")??bo(n,"toolName")??bo(n,"name"))??(a!=null&&a.subagent_type?"agent":void 0)??(o==="fetch"?"web_fetch":o),s=t?e.toolCallId:bo(n,"toolCallId")??bo(n,"id");return!s||!i?void 0:{callId:s,toolName:i,title:t?e.title:bo(n,"title")??e.title,status:"pending",kind:gF(i,o),args:a,startTime:e.createdAt,sourceBlockIds:[e.id]}}function W6e(e,t,n){let a=Ra(e.toolCall),r=n?e.toolCallId:bo(a,"toolCallId")??bo(a,"id");if(!r)return;let o=n?e.title:bo(a,"title")??e.title,i=n?H6(e.preview):a?fF(a):void 0;Array.isArray(i?.questions)&&t.set(r,{...o?{title:o}:{},...i?{args:i}:{}})}function X5(e){let[t="",n=""]=e.toLowerCase().split(":",2);return k$(t)?!0:t!=="selected"?!1:k$(n.trim())}function b$(e){return e.trim().toLowerCase()==="resolved"}function k$(e){return e==="allow"||e==="allowed"||e==="approve"||e==="approved"||e==="accept"||e==="accepted"||e==="confirm"||e==="confirmed"||e==="proceed"||e==="proceed_once"||e==="proceed_once_and_switch_to_default"||e==="proceed_always_project"||e==="proceed_always_user"||e==="allow_once"||e==="allow_always"||e==="success"||e==="succeeded"}function fF(e){return Ra(e.rawInput)??Ra(e.input)??Ra(e.args)}function G6e(e,t){var n;let a=(n=e.toolName)==null?void 0:n.toLowerCase();if(a!=="agent"&&a!=="task")return!1;if(e.background===!0)return!0;let r=Ra(t);return r?.status==="background"}function V6e(e,t){return t?mF(e.resultPreview):pF(e)}function pF(e){return K6e(e)&&e.status==="failed"?Z6e(e)??e.details??e.rawOutput:!hF(e.status)||!e.details?e.rawOutput??e.details:e.rawOutput&&typeof e.rawOutput=="object"&&!Array.isArray(e.rawOutput)?{...e.rawOutput,status:e.status,reason:e.details}:{status:e.status,reason:e.details,text:typeof e.rawOutput=="string"&&e.rawOutput?e.rawOutput:e.details}}function mF(e){if(e)return e.kind==="question_answers"?{type:"ask_user_question_answers",text:e.text,answers:e.answers}:e.kind==="text"?e.text:e.kind==="generic"?e.summary:{entries:e.entries.map(t=>({content:t.content,status:t.status,...t.priority?{priority:t.priority}:{},_meta:{qwenTodo:{id:t.id,...t.blockedBy?{blockedBy:[...t.blockedBy]}:{}}}})),...e.planId||e.revision!==void 0?{plan:{...e.planId?{id:e.planId}:{},...e.revision!==void 0?{revision:e.revision}:{}}}:{}}}function H6(e){if(e)switch(e.kind){case"ask_user_question":return{questions:e.questions.map(t=>({...t.header?{header:t.header}:{},question:t.question,options:t.options.map(n=>({label:n.label,...n.description?{description:n.description}:{}}))}))};case"todo_list":return mF(e);case"command":return{command:e.command,...e.cwd?{cwd:e.cwd}:{}};case"file_diff":return{path:e.path,...e.oldText!==void 0?{oldText:e.oldText}:{},...e.newText!==void 0?{newText:e.newText}:{},...e.patch!==void 0?{patch:e.patch}:{}};case"file_read":return{path:e.path,...e.range?{range:[...e.range]}:{}};case"web_fetch":return{url:e.url,...e.method?{method:e.method}:{}};case"subagent_delegation":return{subagent_type:e.agentName,prompt:e.task,...e.parentDelegationId?{parentDelegationId:e.parentDelegationId}:{}};default:return}}var x$=new WeakMap;function X6e(e){let t=e.content;if(!Array.isArray(t))return;let n=x$.get(e);if(n!==void 0)return n;let a=t.flatMap(o=>{let i=Ra(o);if(!i)return[];let s=i.type;if(s==="content"){let l=Ra(i.content);return!l||typeof l.type!="string"?[]:[{type:"content",content:{...l,type:l.type}}]}if(s==="diff"){let l=i.newText;if(typeof l!="string")return[];let c=i.path,d=i.oldText;return[{type:"diff",...typeof c=="string"?{path:c}:{},...typeof d=="string"?{oldText:d}:{},newText:l}]}if(s==="terminal"){let l=i.terminalId;return[{type:"terminal",...typeof l=="string"?{terminalId:l}:{}}]}return[]});if(a.length===0)return;let r=Object.freeze(a);return x$.set(e,r),r}function K6e(e){if(!e.toolName)return!1;let t=e.toolName.toLowerCase();return t==="ask_user_question"||t==="askuserquestion"}function Z6e(e){if(!Array.isArray(e.content))return;let t=e.content.map(n=>{var a;return(a=n?.content)==null?void 0:a.text}).filter(n=>!!n);if(!(!t||t.length===0))return t.join(`
620
- `)}function hF(e){return e==="cancelled"||e==="canceled"}var Q6e=['"insight_progress":','"insight_ready":','"insight_error":'];function Y6e(e){try{let t=JSON.parse(e),n=Ra(t.insight_progress);if(n&&typeof n.stage=="string"&&typeof n.progress=="number")return{type:"insight_progress",stage:n.stage,progress:n.progress,detail:typeof n.detail=="string"?n.detail:void 0};let a=Ra(t.insight_ready);if(a&&typeof a.path=="string")return{type:"insight_ready",path:a.path};let r=Ra(t.insight_error);if(r&&typeof r.error=="string")return{type:"insight_error",error:r.error}}catch{}return null}function J6e(e,t){if(e[t]!=="{")return null;let n=0,a=!1,r=!1;for(let o=t;o<e.length;o++){let i=e[o];if(r){r=!1;continue}if(i==="\\"&&a){r=!0;continue}if(i==='"'){a=!a;continue}if(!a){if(i==="{")n++;else if(i==="}"&&(n--,n===0))return e.slice(t,o+1)}}return null}function e9e(e){let t=[],n=0,a=0,r=!1;for(;a<e.length;){let i=e.indexOf("{",a);if(i===-1)break;let s=e.slice(i+1).trimStart();if(!Q6e.some(f=>s.startsWith(f))){a=i+1;continue}let l=J6e(e,i);if(!l){a=i+1;continue}let c=Y6e(l);if(!c){a=i+1;continue}r=!0;let d=e.slice(n,i).trim();d&&t.push({kind:"text",text:d}),t.push({kind:"insight",data:c}),n=i+l.length,a=n}if(!r)return null;let o=e.slice(n).trim();return o&&t.push({kind:"text",text:o}),t.length>0?t:null}function gF(e,t){if(t)return t;if(!e)return;let n=e.toLowerCase();if(n==="bash"||n==="execute")return"execute";if(n==="read")return"read";if(n==="edit"||n==="write")return"edit";if(n.includes("search")||n==="grep"||n==="glob")return"search";if(n==="agent"||n==="task")return"other"}function t9e(e,t,n=!1){return O6e(e,{safeToolProjection:n,includeSourceIdentity:!0,labels:{promptCancelled:t("request.cancelled"),branchSuccess:a=>t("branch.success",{name:a}),modelStreamInterrupted:t("error.modelStreamInterrupted"),loopDetected:t("error.loopDetected")}})}var n9e="_app_evevi_1",a9e="_appChat_evevi_62",r9e="_content_evevi_114",o9e="_themeDark_evevi_432",i9e="_themeLight_evevi_506",s9e="_contentHasMessages_evevi_588",up={app:n9e,appChat:a9e,content:r9e,themeDark:o9e,themeLight:i9e,contentHasMessages:s9e},l9e=1e3,c9e=40;function vF(e){if(e!==void 0)return MD(e);if(typeof window>"u")return"en";let t=new URLSearchParams(window.location.search);return MD(t.get("language")??t.get("lang")??navigator.language)}function u9e(e){let t=`${typeof e=="number"&&Number.isFinite(e)&&e>0?e:l9e}px`,n=`calc(${t} + ${c9e}px)`;return{"--chat-regular-content-width":t,"--chat-regular-shell-width":n,"--chat-content-width":t,"--chat-shell-width":n}}function d9e({blocks:e,renderMode:t="readonly",theme:n=th.Dark,language:a,className:r,style:o,chatMaxWidth:i,workspaceCwd:s="",compactThinking:l=!1,documentExpanded:c=!0,collapseCompletedTurns:d,markdownTableMode:f="basic",virtualScrollThreshold:p,markdown:m,composerTagIcons:h,artifact:g,renderToolHeaderExtra:y,parseUserMessageContent:v,renderUserMessageContent:w,renderComposerTag:b,renderComposerTagTooltip:I,renderAssistantTurnFooter:_,mcpAppBaseUrl:L}){let S=t==="document",C=!S&&(d??!0),A=S?"basic":f,E=vF(a),O=(0,x.useMemo)(()=>A$(E),[E]),D=(0,x.useMemo)(()=>t9e(e,O,S),[e,S,O]),H=(0,x.useMemo)(()=>wwe(D),[D]),W=(0,x.useMemo)(()=>fwe(D),[D]),Q=(0,x.useMemo)(()=>({artifact:g,composerTagIcons:h,renderToolHeaderExtra:y,parseUserMessageContent:v,renderUserMessageContent:w,renderComposerTag:b,renderComposerTagTooltip:I,renderAssistantTurnFooter:_,compactThinking:l,collapseCompletedTurns:C,markdownTableMode:A,markdown:m}),[g,C,l,h,m,A,v,_,b,I,y,w]),j=(0,x.useRef)(null),[Y,K]=(0,x.useState)(null),ue=(0,x.useRef)(new Set),M=[up.app,up.appChat,n===th.Light?up.themeLight:up.themeDark,n===th.Dark?"dark":void 0,r].filter(Boolean).join(" "),de=(0,x.useMemo)(()=>({...o,...u9e(i)}),[i,o]);return(0,x.useLayoutEffect)(()=>{if(typeof document>"u")return;let F=document.createElement("div");return F.dataset.webShellPortalRoot="",F.dataset.webShellShadcn="",document.body.appendChild(F),K(F),()=>{F.remove(),K(null)}},[]),(0,x.useLayoutEffect)(()=>{let F=j.current;if(!F||!Y)return;let N=null,ae=()=>{N=null;let ie=getComputedStyle(F),le=new Set;Y.dataset.webShellShadcn="",Y.classList.toggle("dark",n===th.Dark),Y.lang=E;for(let J=0;J<ie.length;J+=1){let oe=ie[J];oe.startsWith("--")&&(le.add(oe),Y.style.setProperty(oe,ie.getPropertyValue(oe)))}for(let J of ue.current)le.has(J)||Y.style.removeProperty(J);ue.current=le},he=()=>{N===null&&(N=requestAnimationFrame(ae))};ae();let ce=new MutationObserver(he),X=F;for(;X;)ce.observe(X,{attributes:!0,attributeFilter:["class","style","data-theme","lang"]}),X=X.parentElement;return window.addEventListener("resize",he),()=>{ce.disconnect(),window.removeEventListener("resize",he),N!==null&&cancelAnimationFrame(N)}},[Y,E,M,de,n]),(0,u.jsx)(oie,{value:n,children:(0,u.jsx)(toe,{language:E,children:(0,u.jsx)(Wz.Provider,{value:L,children:(0,u.jsx)(E$.Provider,{value:Y,children:(0,u.jsx)(noe,{value:t,children:(0,u.jsx)(aoe,{value:c,children:(0,u.jsx)(Rre,{value:Q,children:(0,u.jsx)(Ere,{timeline:W,details:H,children:(0,u.jsx)(FC.Provider,{value:!1,children:(0,u.jsx)("div",{ref:j,className:M,style:de,"data-web-shell-root":!0,"data-web-shell-shadcn":!0,"data-transcript-render-mode":t,"data-document-expanded":S?String(c):void 0,lang:E,children:(0,u.jsx)("div",{className:`${up.content} ${up.contentHasMessages}`,children:(0,u.jsx)(v6e,{messages:D,pendingApproval:null,isResponding:!1,workspaceCwd:s,virtualScrollThreshold:S?Number.MAX_SAFE_INTEGER:p,hideSessionTimeline:S})})})})})})})})})})})})}function wF(e){let t=vF(e.language);return(0,u.jsx)(vp,{label:"web-shell-transcript-root",resetKeys:[e.blocks,t],fallback:(n,a)=>(0,u.jsx)(x6e,{error:n,onRetry:a,language:t}),children:(0,u.jsx)(d9e,{...e})})}var pt=je(ca(),1),kF="qwen-export-theme";function od(e){return e===void 0||typeof e=="string"}function id(e){return e===void 0||typeof e=="number"&&Number.isFinite(e)&&e>=0}function f9e(){let e=document.getElementById("transcript-document");if(!(e instanceof HTMLScriptElement))throw new Error("Transcript document envelope is missing.");let t=e.textContent??"";if(t.length>33554432)throw new Error("Transcript document exceeds the envelope budget.");if(new TextEncoder().encode(t).byteLength>33554432)throw new Error("Transcript document exceeds the envelope budget.");let n=JSON.parse(t);if(n.schemaVersion!==1||n.rendererVersion!=="0.23.3-nightly.20260910.c46cb85cf2+4f7d302b60c335c5"||!Array.isArray(n.blocks)||n.blocks.length>1e3||!n.metadata||typeof n.metadata!="object"||Array.isArray(n.metadata)||!od(n.metadata.title)||!od(n.metadata.startedAt)||!od(n.metadata.projectName)||!od(n.metadata.repository)||!od(n.metadata.gitBranch)||!od(n.metadata.model)||!od(n.metadata.channel)||!id(n.metadata.promptCount)||!id(n.metadata.contextUsagePercent)||!id(n.metadata.contextWindowSize)||!id(n.metadata.totalTokens)||!id(n.metadata.filesWritten)||!id(n.metadata.linesAdded)||!id(n.metadata.linesRemoved)||typeof n.metadata.exportedAt!="string"||typeof n.metadata.complete!="boolean"||typeof n.metadata.truncated!="boolean")throw new Error("Transcript document is incompatible with this renderer.");return n}function p9e(){try{let e=localStorage.getItem(kF);if(e==="light"||e==="dark")return e}catch{}return"dark"}function yF(e){if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function m9e(e){if(e!==void 0)return e>=1e6?`${e/1e6}m`:e>=1e3?`${e/1e3}k`:String(e)}function Qr({label:e,value:t}){return t===void 0||t===""?null:(0,pt.jsxs)("div",{className:"document-metadata-item",children:[(0,pt.jsx)("dt",{children:e}),(0,pt.jsx)("dd",{children:t})]})}function h9e({metadata:e}){let t=e.contextUsagePercent===void 0?void 0:`${e.contextUsagePercent>100?">100":e.contextUsagePercent}%${e.contextWindowSize===void 0?"":` of ${m9e(e.contextWindowSize)}`}`;return(0,pt.jsxs)("aside",{className:"document-metadata","data-document-metadata":!0,children:[(0,pt.jsxs)("section",{children:[(0,pt.jsx)("h2",{children:"Session Info"}),(0,pt.jsxs)("dl",{children:[(0,pt.jsx)(Qr,{label:"Session",value:e.title??"Qwen Code Chat Export"}),(0,pt.jsx)(Qr,{label:"Started",value:yF(e.startedAt)}),(0,pt.jsx)(Qr,{label:"Exported",value:yF(e.exportedAt)}),(0,pt.jsx)(Qr,{label:"Project",value:e.projectName}),(0,pt.jsx)(Qr,{label:"Repository",value:e.repository}),(0,pt.jsx)(Qr,{label:"Branch",value:e.gitBranch}),(0,pt.jsx)(Qr,{label:"Model",value:e.model}),(0,pt.jsx)(Qr,{label:"Channel",value:e.channel})]})]}),(0,pt.jsxs)("section",{children:[(0,pt.jsx)("h2",{children:"Statistics"}),(0,pt.jsxs)("dl",{children:[(0,pt.jsx)(Qr,{label:"Prompts",value:e.promptCount}),(0,pt.jsx)(Qr,{label:"Context Usage",value:t}),(0,pt.jsx)(Qr,{label:"Tokens",value:e.totalTokens?.toLocaleString()})]})]}),(0,pt.jsxs)("section",{children:[(0,pt.jsx)("h2",{children:"File Operations"}),(0,pt.jsxs)("dl",{children:[(0,pt.jsx)(Qr,{label:"Files modified",value:e.filesWritten}),(0,pt.jsx)(Qr,{label:"Lines added",value:e.linesAdded}),(0,pt.jsx)(Qr,{label:"Lines removed",value:e.linesRemoved})]})]})]})}function g9e({value:e}){let[t,n]=(0,Yr.useState)(p9e),[a,r]=(0,Yr.useState)(!0),o=(0,Yr.useRef)(a),i=(0,Yr.useRef)(null);return(0,Yr.useEffect)(()=>{document.documentElement.classList.toggle("dark",t==="dark"),document.documentElement.classList.toggle("light",t==="light");try{localStorage.setItem(kF,t)}catch{}},[t]),(0,Yr.useEffect)(()=>{o.current=a},[a]),(0,Yr.useEffect)(()=>{let s=()=>{i.current=o.current,(0,j6.flushSync)(()=>r(!0))},l=()=>{let c=i.current;i.current=null,c!==null&&(0,j6.flushSync)(()=>r(c))};return addEventListener("beforeprint",s),addEventListener("afterprint",l),()=>{removeEventListener("beforeprint",s),removeEventListener("afterprint",l)}},[]),(0,Yr.useEffect)(()=>{document.title=e.metadata.title||"Qwen Code Chat Export",requestAnimationFrame(()=>{document.body.dataset.renderComplete="true"})},[e.metadata.title]),(0,pt.jsxs)("main",{className:"document-shell",children:[(0,pt.jsxs)("header",{className:"document-header",children:[(0,pt.jsxs)("div",{children:[(0,pt.jsx)("h1",{children:e.metadata.title||"Qwen Code Chat Export"}),(0,pt.jsx)("p",{children:e.metadata.startedAt?`Started ${e.metadata.startedAt}`:`Exported ${e.metadata.exportedAt}`})]}),(!e.metadata.complete||e.metadata.truncated)&&(0,pt.jsx)("span",{className:"document-warning",children:"Partial export"}),(0,pt.jsxs)("div",{className:"document-actions","aria-label":"Document controls",children:[(0,pt.jsx)("button",{type:"button","data-document-expand-all":!0,disabled:a,onClick:()=>r(!0),children:"Expand all"}),(0,pt.jsx)("button",{type:"button","data-document-collapse-all":!0,disabled:!a,onClick:()=>r(!1),children:"Collapse all"}),(0,pt.jsx)("button",{type:"button","data-document-theme-toggle":!0,"aria-label":`Switch to ${t==="dark"?"light":"dark"} theme`,onClick:()=>n(s=>s==="dark"?"light":"dark"),children:t==="dark"?"Light theme":"Dark theme"})]})]}),(0,pt.jsxs)("div",{className:"document-content",children:[(0,pt.jsx)("div",{className:"document-transcript",children:(0,pt.jsx)(wF,{blocks:e.blocks,renderMode:"document",compactThinking:!0,documentExpanded:a,theme:t})}),(0,pt.jsx)(h9e,{metadata:e.metadata})]})]})}function xF(){return(0,Yr.useEffect)(()=>{document.body.dataset.renderComplete="error"},[]),(0,pt.jsxs)("main",{className:"document-error",role:"alert",children:[(0,pt.jsx)("h1",{children:"Unable to open this chat export"}),(0,pt.jsx)("p",{children:"The file is incomplete or uses an incompatible renderer version."})]})}var W6=class extends Yr.Component{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?(0,pt.jsx)(xF,{}):this.props.children}},SF=document.getElementById("app");if(!SF)throw new Error("Transcript document root is missing.");if(document.body.dataset.renderComplete!=="error"){let e=(0,bF.createRoot)(SF);try{e.render((0,pt.jsx)(W6,{children:(0,pt.jsx)(g9e,{value:f9e()})}))}catch{e.render((0,pt.jsx)(xF,{}))}}})();
620
+ `)}function hF(e){return e==="cancelled"||e==="canceled"}var Q6e=['"insight_progress":','"insight_ready":','"insight_error":'];function Y6e(e){try{let t=JSON.parse(e),n=Ra(t.insight_progress);if(n&&typeof n.stage=="string"&&typeof n.progress=="number")return{type:"insight_progress",stage:n.stage,progress:n.progress,detail:typeof n.detail=="string"?n.detail:void 0};let a=Ra(t.insight_ready);if(a&&typeof a.path=="string")return{type:"insight_ready",path:a.path};let r=Ra(t.insight_error);if(r&&typeof r.error=="string")return{type:"insight_error",error:r.error}}catch{}return null}function J6e(e,t){if(e[t]!=="{")return null;let n=0,a=!1,r=!1;for(let o=t;o<e.length;o++){let i=e[o];if(r){r=!1;continue}if(i==="\\"&&a){r=!0;continue}if(i==='"'){a=!a;continue}if(!a){if(i==="{")n++;else if(i==="}"&&(n--,n===0))return e.slice(t,o+1)}}return null}function e9e(e){let t=[],n=0,a=0,r=!1;for(;a<e.length;){let i=e.indexOf("{",a);if(i===-1)break;let s=e.slice(i+1).trimStart();if(!Q6e.some(f=>s.startsWith(f))){a=i+1;continue}let l=J6e(e,i);if(!l){a=i+1;continue}let c=Y6e(l);if(!c){a=i+1;continue}r=!0;let d=e.slice(n,i).trim();d&&t.push({kind:"text",text:d}),t.push({kind:"insight",data:c}),n=i+l.length,a=n}if(!r)return null;let o=e.slice(n).trim();return o&&t.push({kind:"text",text:o}),t.length>0?t:null}function gF(e,t){if(t)return t;if(!e)return;let n=e.toLowerCase();if(n==="bash"||n==="execute")return"execute";if(n==="read")return"read";if(n==="edit"||n==="write")return"edit";if(n.includes("search")||n==="grep"||n==="glob")return"search";if(n==="agent"||n==="task")return"other"}function t9e(e,t,n=!1){return O6e(e,{safeToolProjection:n,includeSourceIdentity:!0,labels:{promptCancelled:t("request.cancelled"),branchSuccess:a=>t("branch.success",{name:a}),modelStreamInterrupted:t("error.modelStreamInterrupted"),loopDetected:t("error.loopDetected")}})}var n9e="_app_evevi_1",a9e="_appChat_evevi_62",r9e="_content_evevi_114",o9e="_themeDark_evevi_432",i9e="_themeLight_evevi_506",s9e="_contentHasMessages_evevi_588",up={app:n9e,appChat:a9e,content:r9e,themeDark:o9e,themeLight:i9e,contentHasMessages:s9e},l9e=1e3,c9e=40;function vF(e){if(e!==void 0)return MD(e);if(typeof window>"u")return"en";let t=new URLSearchParams(window.location.search);return MD(t.get("language")??t.get("lang")??navigator.language)}function u9e(e){let t=`${typeof e=="number"&&Number.isFinite(e)&&e>0?e:l9e}px`,n=`calc(${t} + ${c9e}px)`;return{"--chat-regular-content-width":t,"--chat-regular-shell-width":n,"--chat-content-width":t,"--chat-shell-width":n}}function d9e({blocks:e,renderMode:t="readonly",theme:n=th.Dark,language:a,className:r,style:o,chatMaxWidth:i,workspaceCwd:s="",compactThinking:l=!1,documentExpanded:c=!0,collapseCompletedTurns:d,markdownTableMode:f="basic",virtualScrollThreshold:p,markdown:m,composerTagIcons:h,artifact:g,renderToolHeaderExtra:y,parseUserMessageContent:v,renderUserMessageContent:w,renderComposerTag:b,renderComposerTagTooltip:I,renderAssistantTurnFooter:_,mcpAppBaseUrl:L}){let S=t==="document",C=!S&&(d??!0),A=S?"basic":f,E=vF(a),O=(0,x.useMemo)(()=>A$(E),[E]),D=(0,x.useMemo)(()=>t9e(e,O,S),[e,S,O]),H=(0,x.useMemo)(()=>wwe(D),[D]),W=(0,x.useMemo)(()=>fwe(D),[D]),Q=(0,x.useMemo)(()=>({artifact:g,composerTagIcons:h,renderToolHeaderExtra:y,parseUserMessageContent:v,renderUserMessageContent:w,renderComposerTag:b,renderComposerTagTooltip:I,renderAssistantTurnFooter:_,compactThinking:l,collapseCompletedTurns:C,markdownTableMode:A,markdown:m}),[g,C,l,h,m,A,v,_,b,I,y,w]),j=(0,x.useRef)(null),[Y,K]=(0,x.useState)(null),ue=(0,x.useRef)(new Set),M=[up.app,up.appChat,n===th.Light?up.themeLight:up.themeDark,n===th.Dark?"dark":void 0,r].filter(Boolean).join(" "),de=(0,x.useMemo)(()=>({...o,...u9e(i)}),[i,o]);return(0,x.useLayoutEffect)(()=>{if(typeof document>"u")return;let F=document.createElement("div");return F.dataset.webShellPortalRoot="",F.dataset.webShellShadcn="",document.body.appendChild(F),K(F),()=>{F.remove(),K(null)}},[]),(0,x.useLayoutEffect)(()=>{let F=j.current;if(!F||!Y)return;let N=null,ae=()=>{N=null;let ie=getComputedStyle(F),le=new Set;Y.dataset.webShellShadcn="",Y.classList.toggle("dark",n===th.Dark),Y.lang=E;for(let J=0;J<ie.length;J+=1){let oe=ie[J];oe.startsWith("--")&&(le.add(oe),Y.style.setProperty(oe,ie.getPropertyValue(oe)))}for(let J of ue.current)le.has(J)||Y.style.removeProperty(J);ue.current=le},he=()=>{N===null&&(N=requestAnimationFrame(ae))};ae();let ce=new MutationObserver(he),X=F;for(;X;)ce.observe(X,{attributes:!0,attributeFilter:["class","style","data-theme","lang"]}),X=X.parentElement;return window.addEventListener("resize",he),()=>{ce.disconnect(),window.removeEventListener("resize",he),N!==null&&cancelAnimationFrame(N)}},[Y,E,M,de,n]),(0,u.jsx)(oie,{value:n,children:(0,u.jsx)(toe,{language:E,children:(0,u.jsx)(Wz.Provider,{value:L,children:(0,u.jsx)(E$.Provider,{value:Y,children:(0,u.jsx)(noe,{value:t,children:(0,u.jsx)(aoe,{value:c,children:(0,u.jsx)(Rre,{value:Q,children:(0,u.jsx)(Ere,{timeline:W,details:H,children:(0,u.jsx)(FC.Provider,{value:!1,children:(0,u.jsx)("div",{ref:j,className:M,style:de,"data-web-shell-root":!0,"data-web-shell-shadcn":!0,"data-transcript-render-mode":t,"data-document-expanded":S?String(c):void 0,lang:E,children:(0,u.jsx)("div",{className:`${up.content} ${up.contentHasMessages}`,children:(0,u.jsx)(v6e,{messages:D,pendingApproval:null,isResponding:!1,workspaceCwd:s,virtualScrollThreshold:S?Number.MAX_SAFE_INTEGER:p,hideSessionTimeline:S})})})})})})})})})})})})}function wF(e){let t=vF(e.language);return(0,u.jsx)(vp,{label:"web-shell-transcript-root",resetKeys:[e.blocks,t],fallback:(n,a)=>(0,u.jsx)(x6e,{error:n,onRetry:a,language:t}),children:(0,u.jsx)(d9e,{...e})})}var pt=je(ca(),1),kF="qwen-export-theme";function od(e){return e===void 0||typeof e=="string"}function id(e){return e===void 0||typeof e=="number"&&Number.isFinite(e)&&e>=0}function f9e(){let e=document.getElementById("transcript-document");if(!(e instanceof HTMLScriptElement))throw new Error("Transcript document envelope is missing.");let t=e.textContent??"";if(t.length>33554432)throw new Error("Transcript document exceeds the envelope budget.");if(new TextEncoder().encode(t).byteLength>33554432)throw new Error("Transcript document exceeds the envelope budget.");let n=JSON.parse(t);if(n.schemaVersion!==1||n.rendererVersion!=="0.23.3+4f7d302b60c335c5"||!Array.isArray(n.blocks)||n.blocks.length>1e3||!n.metadata||typeof n.metadata!="object"||Array.isArray(n.metadata)||!od(n.metadata.title)||!od(n.metadata.startedAt)||!od(n.metadata.projectName)||!od(n.metadata.repository)||!od(n.metadata.gitBranch)||!od(n.metadata.model)||!od(n.metadata.channel)||!id(n.metadata.promptCount)||!id(n.metadata.contextUsagePercent)||!id(n.metadata.contextWindowSize)||!id(n.metadata.totalTokens)||!id(n.metadata.filesWritten)||!id(n.metadata.linesAdded)||!id(n.metadata.linesRemoved)||typeof n.metadata.exportedAt!="string"||typeof n.metadata.complete!="boolean"||typeof n.metadata.truncated!="boolean")throw new Error("Transcript document is incompatible with this renderer.");return n}function p9e(){try{let e=localStorage.getItem(kF);if(e==="light"||e==="dark")return e}catch{}return"dark"}function yF(e){if(!e)return;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function m9e(e){if(e!==void 0)return e>=1e6?`${e/1e6}m`:e>=1e3?`${e/1e3}k`:String(e)}function Qr({label:e,value:t}){return t===void 0||t===""?null:(0,pt.jsxs)("div",{className:"document-metadata-item",children:[(0,pt.jsx)("dt",{children:e}),(0,pt.jsx)("dd",{children:t})]})}function h9e({metadata:e}){let t=e.contextUsagePercent===void 0?void 0:`${e.contextUsagePercent>100?">100":e.contextUsagePercent}%${e.contextWindowSize===void 0?"":` of ${m9e(e.contextWindowSize)}`}`;return(0,pt.jsxs)("aside",{className:"document-metadata","data-document-metadata":!0,children:[(0,pt.jsxs)("section",{children:[(0,pt.jsx)("h2",{children:"Session Info"}),(0,pt.jsxs)("dl",{children:[(0,pt.jsx)(Qr,{label:"Session",value:e.title??"Qwen Code Chat Export"}),(0,pt.jsx)(Qr,{label:"Started",value:yF(e.startedAt)}),(0,pt.jsx)(Qr,{label:"Exported",value:yF(e.exportedAt)}),(0,pt.jsx)(Qr,{label:"Project",value:e.projectName}),(0,pt.jsx)(Qr,{label:"Repository",value:e.repository}),(0,pt.jsx)(Qr,{label:"Branch",value:e.gitBranch}),(0,pt.jsx)(Qr,{label:"Model",value:e.model}),(0,pt.jsx)(Qr,{label:"Channel",value:e.channel})]})]}),(0,pt.jsxs)("section",{children:[(0,pt.jsx)("h2",{children:"Statistics"}),(0,pt.jsxs)("dl",{children:[(0,pt.jsx)(Qr,{label:"Prompts",value:e.promptCount}),(0,pt.jsx)(Qr,{label:"Context Usage",value:t}),(0,pt.jsx)(Qr,{label:"Tokens",value:e.totalTokens?.toLocaleString()})]})]}),(0,pt.jsxs)("section",{children:[(0,pt.jsx)("h2",{children:"File Operations"}),(0,pt.jsxs)("dl",{children:[(0,pt.jsx)(Qr,{label:"Files modified",value:e.filesWritten}),(0,pt.jsx)(Qr,{label:"Lines added",value:e.linesAdded}),(0,pt.jsx)(Qr,{label:"Lines removed",value:e.linesRemoved})]})]})]})}function g9e({value:e}){let[t,n]=(0,Yr.useState)(p9e),[a,r]=(0,Yr.useState)(!0),o=(0,Yr.useRef)(a),i=(0,Yr.useRef)(null);return(0,Yr.useEffect)(()=>{document.documentElement.classList.toggle("dark",t==="dark"),document.documentElement.classList.toggle("light",t==="light");try{localStorage.setItem(kF,t)}catch{}},[t]),(0,Yr.useEffect)(()=>{o.current=a},[a]),(0,Yr.useEffect)(()=>{let s=()=>{i.current=o.current,(0,j6.flushSync)(()=>r(!0))},l=()=>{let c=i.current;i.current=null,c!==null&&(0,j6.flushSync)(()=>r(c))};return addEventListener("beforeprint",s),addEventListener("afterprint",l),()=>{removeEventListener("beforeprint",s),removeEventListener("afterprint",l)}},[]),(0,Yr.useEffect)(()=>{document.title=e.metadata.title||"Qwen Code Chat Export",requestAnimationFrame(()=>{document.body.dataset.renderComplete="true"})},[e.metadata.title]),(0,pt.jsxs)("main",{className:"document-shell",children:[(0,pt.jsxs)("header",{className:"document-header",children:[(0,pt.jsxs)("div",{children:[(0,pt.jsx)("h1",{children:e.metadata.title||"Qwen Code Chat Export"}),(0,pt.jsx)("p",{children:e.metadata.startedAt?`Started ${e.metadata.startedAt}`:`Exported ${e.metadata.exportedAt}`})]}),(!e.metadata.complete||e.metadata.truncated)&&(0,pt.jsx)("span",{className:"document-warning",children:"Partial export"}),(0,pt.jsxs)("div",{className:"document-actions","aria-label":"Document controls",children:[(0,pt.jsx)("button",{type:"button","data-document-expand-all":!0,disabled:a,onClick:()=>r(!0),children:"Expand all"}),(0,pt.jsx)("button",{type:"button","data-document-collapse-all":!0,disabled:!a,onClick:()=>r(!1),children:"Collapse all"}),(0,pt.jsx)("button",{type:"button","data-document-theme-toggle":!0,"aria-label":`Switch to ${t==="dark"?"light":"dark"} theme`,onClick:()=>n(s=>s==="dark"?"light":"dark"),children:t==="dark"?"Light theme":"Dark theme"})]})]}),(0,pt.jsxs)("div",{className:"document-content",children:[(0,pt.jsx)("div",{className:"document-transcript",children:(0,pt.jsx)(wF,{blocks:e.blocks,renderMode:"document",compactThinking:!0,documentExpanded:a,theme:t})}),(0,pt.jsx)(h9e,{metadata:e.metadata})]})]})}function xF(){return(0,Yr.useEffect)(()=>{document.body.dataset.renderComplete="error"},[]),(0,pt.jsxs)("main",{className:"document-error",role:"alert",children:[(0,pt.jsx)("h1",{children:"Unable to open this chat export"}),(0,pt.jsx)("p",{children:"The file is incomplete or uses an incompatible renderer version."})]})}var W6=class extends Yr.Component{constructor(){super(...arguments);this.state={failed:!1}}static getDerivedStateFromError(){return{failed:!0}}render(){return this.state.failed?(0,pt.jsx)(xF,{}):this.props.children}},SF=document.getElementById("app");if(!SF)throw new Error("Transcript document root is missing.");if(document.body.dataset.renderComplete!=="error"){let e=(0,bF.createRoot)(SF);try{e.render((0,pt.jsx)(W6,{children:(0,pt.jsx)(g9e,{value:f9e()})}))}catch{e.render((0,pt.jsx)(xF,{}))}}})();
package/locales/ca.js CHANGED
@@ -852,8 +852,8 @@ export default {
852
852
  "L'entrada a l'ordre és JSON amb tool_name, tool_input, tool_use_id, error, error_type, is_interrupt i is_timeout.",
853
853
  'Input to command is JSON with notification message and type.':
854
854
  "L'entrada a l'ordre és JSON amb el missatge de notificació i el tipus.",
855
- 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the text projection captured at a supported submission boundary).':
856
- 'L’entrada de l’ordre és JSON amb "prompt" (el prompt actual vinculat al model) i el camp opcional "submitted_prompt" (la projecció de text capturada en un límit d’enviament compatible).',
855
+ 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the supported interactive TUI text projection).':
856
+ 'L’entrada de l’ordre és JSON amb "prompt" (el prompt actual vinculat al model) i el camp opcional "submitted_prompt" (la projecció de text de la TUI interactiva compatible).',
857
857
  'Input to command is JSON with command_name, command_args, and expanded prompt text.':
858
858
  "L'entrada a l'ordre és JSON amb command_name, command_args i el text del missatge expandit.",
859
859
  'Input to command is JSON with session start source.':
package/locales/de.js CHANGED
@@ -798,8 +798,8 @@ export default {
798
798
  'Die Eingabe an den Befehl ist JSON mit tool_name, tool_input, tool_use_id, error, error_type, is_interrupt und is_timeout.',
799
799
  'Input to command is JSON with notification message and type.':
800
800
  'Die Eingabe an den Befehl ist JSON mit Benachrichtigungsnachricht und -typ.',
801
- 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the text projection captured at a supported submission boundary).':
802
- 'Die Eingabe für den Befehl ist JSON mit "prompt" (dem aktuellen modellgebundenen Prompt) und optional "submitted_prompt" (der an einer unterstützten Übermittlungsgrenze erfassten Textprojektion).',
801
+ 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the supported interactive TUI text projection).':
802
+ 'Die Eingabe für den Befehl ist JSON mit "prompt" (dem aktuellen modellgebundenen Prompt) und optional "submitted_prompt" (der Textprojektion der unterstützten interaktiven TUI).',
803
803
  'Input to command is JSON with command_name, command_args, and expanded prompt text.':
804
804
  'Die Eingabe an den Befehl ist JSON mit command_name, command_args und erweitertem Prompt-Text.',
805
805
  'Input to command is JSON with session start source.':
package/locales/en.js CHANGED
@@ -1155,8 +1155,8 @@ export default {
1155
1155
  'Input to command is JSON with tool_name, tool_input, tool_use_id, error, error_type, is_interrupt, and is_timeout.',
1156
1156
  'Input to command is JSON with notification message and type.':
1157
1157
  'Input to command is JSON with notification message and type.',
1158
- 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the text projection captured at a supported submission boundary).':
1159
- 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the text projection captured at a supported submission boundary).',
1158
+ 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the supported interactive TUI text projection).':
1159
+ 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the supported interactive TUI text projection).',
1160
1160
  'Input to command is JSON with command_name, command_args, and expanded prompt text.':
1161
1161
  'Input to command is JSON with command_name, command_args, and expanded prompt text.',
1162
1162
  'Input to command is JSON with session start source.':
package/locales/fr.js CHANGED
@@ -867,8 +867,8 @@ export default {
867
867
  "L'entrée de la commande est du JSON avec tool_name, tool_input, tool_use_id, error, error_type, is_interrupt et is_timeout.",
868
868
  'Input to command is JSON with notification message and type.':
869
869
  "L'entrée de la commande est du JSON avec le message et le type de notification.",
870
- 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the text projection captured at a supported submission boundary).':
871
- 'L’entrée de la commande est un JSON avec "prompt" (l’invite actuelle liée au modèle) et, facultativement, "submitted_prompt" (la projection textuelle capturée à une frontière de soumission prise en charge).',
870
+ 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the supported interactive TUI text projection).':
871
+ 'L’entrée de la commande est un JSON avec "prompt" (l’invite actuelle liée au modèle) et, facultativement, "submitted_prompt" (la projection textuelle de l’interface TUI interactive prise en charge).',
872
872
  'Input to command is JSON with command_name, command_args, and expanded prompt text.':
873
873
  "L'entrée de la commande est du JSON avec command_name, command_args et le texte d'invite développé.",
874
874
  'Input to command is JSON with session start source.':
package/locales/ja.js CHANGED
@@ -583,8 +583,8 @@ export default {
583
583
  'コマンドへの入力は tool_name、tool_input、tool_use_id、error、error_type、is_interrupt、is_timeout を持つ JSON です。',
584
584
  'Input to command is JSON with notification message and type.':
585
585
  'コマンドへの入力は通知メッセージとタイプを持つ JSON です。',
586
- 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the text projection captured at a supported submission boundary).':
587
- 'コマンド入力は、"prompt"(現在のモデル向けプロンプト)と、オプションの "submitted_prompt"(サポート対象の送信境界でキャプチャされたテキスト投影)を含む JSON です。',
586
+ 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the supported interactive TUI text projection).':
587
+ 'コマンド入力は、"prompt"(現在のモデル向けプロンプト)と、オプションの "submitted_prompt"(サポート対象の対話型 TUI で入力されたテキストの投影)を含む JSON です。',
588
588
  'Input to command is JSON with command_name, command_args, and expanded prompt text.':
589
589
  'コマンドへの入力は command_name、command_args、展開後のプロンプトテキストを持つ JSON です。',
590
590
  'Input to command is JSON with session start source.':
package/locales/pt.js CHANGED
@@ -804,8 +804,8 @@ export default {
804
804
  'A entrada para o comando é JSON com tool_name, tool_input, tool_use_id, error, error_type, is_interrupt e is_timeout.',
805
805
  'Input to command is JSON with notification message and type.':
806
806
  'A entrada para o comando é JSON com mensagem e tipo de notificação.',
807
- 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the text projection captured at a supported submission boundary).':
808
- 'A entrada para o comando é JSON com "prompt" (o prompt atual vinculado ao modelo) e o campo opcional "submitted_prompt" (a projeção de texto capturada em um ponto de envio compatível).',
807
+ 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the supported interactive TUI text projection).':
808
+ 'A entrada para o comando é JSON com "prompt" (o prompt atual vinculado ao modelo) e o campo opcional "submitted_prompt" (a projeção de texto da TUI interativa compatível).',
809
809
  'Input to command is JSON with command_name, command_args, and expanded prompt text.':
810
810
  'A entrada para o comando é JSON com command_name, command_args e o texto do prompt expandido.',
811
811
  'Input to command is JSON with session start source.':
package/locales/ru.js CHANGED
@@ -811,8 +811,8 @@ export default {
811
811
  'Ввод в команду — это JSON с tool_name, tool_input, tool_use_id, error, error_type, is_interrupt и is_timeout.',
812
812
  'Input to command is JSON with notification message and type.':
813
813
  'Ввод в команду — это JSON с сообщением уведомления и типом.',
814
- 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the text projection captured at a supported submission boundary).':
815
- 'Ввод команды — JSON с полем "prompt" (текущий промпт, отправляемый модели) и необязательным "submitted_prompt" (текстовая проекция, захваченная на поддерживаемой границе отправки).',
814
+ 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the supported interactive TUI text projection).':
815
+ 'Ввод команды — JSON с полем "prompt" (текущий промпт, отправляемый модели) и необязательным "submitted_prompt" (текстовая проекция поддерживаемого интерактивного TUI).',
816
816
  'Input to command is JSON with command_name, command_args, and expanded prompt text.':
817
817
  'Ввод в команду — это JSON с command_name, command_args и развернутым текстом промпта.',
818
818
  'Input to command is JSON with session start source.':
package/locales/zh-TW.js CHANGED
@@ -1064,8 +1064,8 @@ export default {
1064
1064
  '命令輸入為包含 tool_name、tool_input、tool_use_id、error、error_type、is_interrupt 和 is_timeout 的 JSON。',
1065
1065
  'Input to command is JSON with notification message and type.':
1066
1066
  '命令輸入為包含通知消息和類型的 JSON。',
1067
- 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the text projection captured at a supported submission boundary).':
1068
- '命令輸入為 JSON,其中包含 "prompt"(目前模型側提示)以及選用的 "submitted_prompt"(在受支援的提交邊界擷取的文字投影)。',
1067
+ 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the supported interactive TUI text projection).':
1068
+ '命令輸入為 JSON,其中包含 "prompt"(目前模型側提示)以及選用的 "submitted_prompt"(受支援互動式 TUI 的提交文字投影)。',
1069
1069
  'Input to command is JSON with command_name, command_args, and expanded prompt text.':
1070
1070
  '命令輸入為包含 command_name、command_args 和展開後提示文本的 JSON。',
1071
1071
  'Input to command is JSON with session start source.':
package/locales/zh.js CHANGED
@@ -1124,8 +1124,8 @@ export default {
1124
1124
  '命令输入为包含 tool_name、tool_input、tool_use_id、error、error_type、is_interrupt 和 is_timeout 的 JSON。',
1125
1125
  'Input to command is JSON with notification message and type.':
1126
1126
  '命令输入为包含通知消息和类型的 JSON。',
1127
- 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the text projection captured at a supported submission boundary).':
1128
- '命令输入为 JSON,其中包含 "prompt"(当前模型侧提示)以及可选的 "submitted_prompt"(在受支持的提交边界捕获的文本投影)。',
1127
+ 'Input to command is JSON with "prompt" (the current model-bound prompt) and optional "submitted_prompt" (the supported interactive TUI text projection).':
1128
+ '命令输入为 JSON,其中包含 "prompt"(当前模型侧提示)以及可选的 "submitted_prompt"(受支持交互式 TUI 的提交文本投影)。',
1129
1129
  'Input to command is JSON with command_name, command_args, and expanded prompt text.':
1130
1130
  '命令输入为包含 command_name、command_args 和展开后提示文本的 JSON。',
1131
1131
  'Input to command is JSON with session start source.':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/qwen-code",
3
- "version": "0.23.3-nightly.20260910.c46cb85cf2",
3
+ "version": "0.23.3",
4
4
  "description": "Qwen Code - AI-powered coding assistant",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,11 +28,11 @@
28
28
  "export-transcript-document.css"
29
29
  ],
30
30
  "config": {
31
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.23.3-nightly.20260910.c46cb85cf2"
31
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.23.3"
32
32
  },
33
33
  "dependencies": {},
34
34
  "optionalDependencies": {
35
- "@qwen-code/audio-capture": "0.23.3-nightly.20260910.c46cb85cf2",
35
+ "@qwen-code/audio-capture": "0.23.3",
36
36
  "@lydell/node-pty": "1.2.0-beta.10",
37
37
  "@lydell/node-pty-darwin-arm64": "1.2.0-beta.10",
38
38
  "@lydell/node-pty-darwin-x64": "1.2.0-beta.10",
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-SVP7TREG-BxDwesA-.js";import{p as f}from"./chunk-JWPE2WC7-Dz4cac5F.js";import{_ as n,l as o}from"./mermaid.core-1G1fXWda.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-CvVsIkVN.js";import"./index-DY8CxdBr.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};
1
+ import{g as p,r as u,d as a}from"./chunk-SVP7TREG-DyBb2Axj.js";import{p as f}from"./chunk-JWPE2WC7-D89c_BXy.js";import{_ as n,l as o}from"./mermaid.core-DSCYB_2P.js";import{M as c,b as d}from"./cynefin-OW5HDTMX-i4GwmBVy.js";import"./index-D3YS6KuJ.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};