@qwen-code/qwen-code 0.19.9 → 0.19.10-nightly.20260715.c538bd70d

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 (310) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +8 -0
  2. package/bundled/qc-helper/docs/features/channels/dingtalk.md +3 -0
  3. package/bundled/qc-helper/docs/features/channels/overview.md +11 -3
  4. package/bundled/qc-helper/docs/features/code-review.md +88 -44
  5. package/bundled/qc-helper/docs/features/commands.md +6 -6
  6. package/bundled/qc-helper/docs/features/hooks.md +29 -0
  7. package/bundled/qc-helper/docs/features/sub-agents.md +21 -0
  8. package/bundled/qc-helper/docs/qwen-serve.md +46 -20
  9. package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
  10. package/bundled/review/DESIGN.md +219 -33
  11. package/bundled/review/SKILL.md +449 -153
  12. package/chunks/{MaxSizedBox-6HYJ3ZPJ.js → MaxSizedBox-LOOBDOTZ.js} +31 -31
  13. package/chunks/{StandaloneSessionPicker-WS4GXYOG.js → StandaloneSessionPicker-76CLZSH2.js} +51 -49
  14. package/chunks/{acpAgent-5FWSOZL5.js → acpAgent-DFJOK7EB.js} +567 -482
  15. package/chunks/{agent-HOLHB3RT.js → agent-OJQWXNHP.js} +26 -26
  16. package/chunks/{agent-headless-SXL6H56A.js → agent-headless-ND7GOORY.js} +26 -26
  17. package/chunks/{anthropicContentGenerator-L73TO3DB.js → anthropicContentGenerator-56U3YCP2.js} +5 -5
  18. package/chunks/{artifact-tool-U7IRTLIV.js → artifact-tool-MIZLXBLF.js} +2 -2
  19. package/chunks/{askUserQuestion-2DLUUZZG.js → askUserQuestion-XMJVPNWM.js} +2 -2
  20. package/chunks/{bridge-BCJQ7BBB.js → bridge-SNJK2JLK.js} +32 -32
  21. package/chunks/{ca-UJ6HC4H2.js → ca-C2JTT2N5.js} +4 -1
  22. package/chunks/channel-worker-group-K7QKH6IG.js +13 -0
  23. package/chunks/channel-worker-manager-YSFB4HUU.js +418 -0
  24. package/chunks/channel-worker-supervisor-QCKIOYZD.js +20 -0
  25. package/chunks/{chunk-CCDMCZPP.js → chunk-26UABK2C.js} +1 -1
  26. package/chunks/{chunk-LXNEJD34.js → chunk-2FO5GFKZ.js} +1 -1
  27. package/chunks/{chunk-L36P3NBD.js → chunk-2W3OOD4W.js} +2 -0
  28. package/chunks/{chunk-7R3CZA3Q.js → chunk-2Z5UX4KI.js} +1 -1
  29. package/chunks/chunk-3MX7D6QN.js +516 -0
  30. package/chunks/{chunk-CLFKOZEK.js → chunk-3XULHBC7.js} +1 -1
  31. package/chunks/chunk-4QZADKJS.js +34 -0
  32. package/chunks/{chunk-E2IY465S.js → chunk-4UDHAJFV.js} +10 -10
  33. package/chunks/{chunk-5U27BZ72.js → chunk-55SAYASQ.js} +190 -77
  34. package/chunks/chunk-5HBA2Z7V.js +28 -0
  35. package/chunks/{chunk-ZJE7NSL3.js → chunk-5M6IDOMF.js} +34 -97
  36. package/chunks/{chunk-HVY356M2.js → chunk-5SQ55XJZ.js} +3 -3
  37. package/chunks/{chunk-EAXLGSFP.js → chunk-6GRAQNTY.js} +8 -8
  38. package/chunks/{chunk-K434OPES.js → chunk-6WPJRYLZ.js} +3 -3
  39. package/chunks/{chunk-VWPVHAMO.js → chunk-7DXHIMXL.js} +5 -1
  40. package/chunks/{chunk-J4TSQ5EQ.js → chunk-7NFB7LBQ.js} +8 -1
  41. package/chunks/{chunk-5SFOMFG4.js → chunk-7R4DPSRA.js} +36 -2
  42. package/chunks/{chunk-W2UIXQDL.js → chunk-7STBROEV.js} +1 -1
  43. package/chunks/{chunk-BMGVRZN4.js → chunk-AETEZU4U.js} +1 -1
  44. package/chunks/{chunk-HPDUL5MF.js → chunk-AGZWN4WV.js} +1 -1
  45. package/chunks/{chunk-RDJSGHZE.js → chunk-ALGGS7UH.js} +1 -38
  46. package/chunks/{chunk-GWHYEOV2.js → chunk-ARKANCNX.js} +2 -1
  47. package/chunks/{chunk-34Z3U5RQ.js → chunk-AU4R7ACM.js} +518 -114
  48. package/chunks/{channel-worker-supervisor-WSOAAYUO.js → chunk-B7MFJBKE.js} +67 -35
  49. package/chunks/{chunk-524RQP4Q.js → chunk-B7NUUEXC.js} +10 -4
  50. package/chunks/{chunk-MC23XKFE.js → chunk-BLPMRN4B.js} +3 -3
  51. package/chunks/{chunk-A3XKDTSH.js → chunk-BRRKAUGR.js} +4 -4
  52. package/chunks/{chunk-W3JHSWRP.js → chunk-BUPLOPUA.js} +4 -4
  53. package/chunks/{chunk-3VAGG5T5.js → chunk-BYOOK22F.js} +121 -16
  54. package/chunks/{chunk-EMDMPBJ4.js → chunk-C47ENMZJ.js} +3 -3
  55. package/chunks/{chunk-3AHXV67U.js → chunk-C5TVXLJZ.js} +1 -1
  56. package/chunks/{chunk-X6TJ3YZV.js → chunk-CGT5TQIZ.js} +159 -57
  57. package/chunks/{chunk-4C5BQ2D2.js → chunk-CQQD7MDG.js} +82 -12
  58. package/chunks/{chunk-KKNMOEZH.js → chunk-E2UVIFI2.js} +185 -398
  59. package/chunks/{chunk-P67PFTUT.js → chunk-EPY4ZEU6.js} +4 -4
  60. package/chunks/{chunk-6PESIEKJ.js → chunk-EZSRHWGS.js} +68 -6
  61. package/chunks/{chunk-4GORAUCN.js → chunk-F333XEAU.js} +1 -1
  62. package/chunks/{chunk-YLV3XXFB.js → chunk-FBU7WRZI.js} +17 -1
  63. package/chunks/{chunk-Q6I5QHMH.js → chunk-FGTCZJOD.js} +1 -1
  64. package/chunks/{chunk-LK7KUE55.js → chunk-FSA7ERJ2.js} +1 -1
  65. package/chunks/{chunk-B4G2WOFA.js → chunk-FTU55ZZ7.js} +3 -3
  66. package/chunks/{chunk-EGYZ275M.js → chunk-GCD7PEDZ.js} +4 -4
  67. package/chunks/{chunk-SJHDYNHF.js → chunk-GDQQRV43.js} +3 -3
  68. package/chunks/{chunk-3BTRNWWD.js → chunk-GOXKNSDZ.js} +1 -64
  69. package/chunks/{chunk-GZRTYZ2R.js → chunk-GQKWT45X.js} +154 -1
  70. package/chunks/chunk-GYTKQYDB.js +23 -0
  71. package/chunks/{chunk-YVEDCAUE.js → chunk-HGT6JR3U.js} +19 -0
  72. package/chunks/{chunk-N3EMS75V.js → chunk-HKM2TEF7.js} +1268 -1233
  73. package/chunks/chunk-IDS7MSUP.js +74 -0
  74. package/chunks/{chunk-PVZM22CK.js → chunk-INKAZNYC.js} +5 -5
  75. package/chunks/{chunk-3G7CIHVV.js → chunk-IOQ75R4R.js} +4 -4
  76. package/chunks/{chunk-AURZZYMD.js → chunk-IQOOJSPR.js} +4 -4
  77. package/chunks/{chunk-AKIVHSJR.js → chunk-J4UQXGVL.js} +111 -93
  78. package/chunks/{chunk-VTU57BWZ.js → chunk-JEKOCLRN.js} +1 -1
  79. package/chunks/{chunk-B5ORX3FG.js → chunk-JGUT3LWZ.js} +6 -1
  80. package/chunks/{chunk-PDZ7MBDG.js → chunk-JIQHT2O6.js} +27 -6
  81. package/chunks/{chunk-XUOOWUZS.js → chunk-JPAH76WA.js} +1 -1
  82. package/chunks/{chunk-BAPGSC7U.js → chunk-K4LG6TVJ.js} +23 -9
  83. package/chunks/chunk-KET3M4K4.js +493 -0
  84. package/chunks/{chunk-ORBGV7NJ.js → chunk-KKRTYONM.js} +6 -4
  85. package/chunks/{chunk-SCGXUJBT.js → chunk-KPA5QGN2.js} +3 -3
  86. package/chunks/{chunk-IAVB3HM3.js → chunk-KSO42X3Z.js} +13 -0
  87. package/chunks/{chunk-4QLQE5WJ.js → chunk-L5U3ELZX.js} +1 -1
  88. package/chunks/{chunk-77XJ3SWN.js → chunk-LIUEXYPL.js} +5 -5
  89. package/chunks/{chunk-4ZVWQHEQ.js → chunk-LQIDP6K5.js} +1 -1
  90. package/chunks/{chunk-34MW4KTI.js → chunk-LT5CRUA5.js} +2 -2
  91. package/chunks/{chunk-DC5Z3DU6.js → chunk-LXLTBIDP.js} +43 -6
  92. package/chunks/{chunk-VA4KQY6V.js → chunk-MEK7CQJR.js} +3 -3
  93. package/chunks/{chunk-KHUQZZJ6.js → chunk-MO7O5722.js} +370 -36
  94. package/chunks/chunk-MR3PXB6E.js +48 -0
  95. package/chunks/{chunk-PODM4SZ4.js → chunk-MV52C5MA.js} +5 -5
  96. package/chunks/{chunk-WL4L7EZH.js → chunk-OA4JVLSA.js} +27 -1
  97. package/chunks/{chunk-X4NKFGFJ.js → chunk-OJAMDVF5.js} +0 -15
  98. package/chunks/{chunk-BZIFY5TF.js → chunk-OKAIGAYW.js} +3 -3
  99. package/chunks/{chunk-ECNYL4AA.js → chunk-OPNPGO6D.js} +1 -1
  100. package/chunks/{chunk-3SJSQXNS.js → chunk-PEJWA3QQ.js} +12 -8
  101. package/chunks/{chunk-MXL5UP4X.js → chunk-Q6TUALBE.js} +1 -1
  102. package/chunks/{chunk-QYMQSECS.js → chunk-QAW7PIHT.js} +2 -2
  103. package/chunks/{chunk-5HOMWMCL.js → chunk-QEDYXCLG.js} +4167 -1338
  104. package/chunks/chunk-QNNTA7IX.js +91 -0
  105. package/chunks/{chunk-D2GFWEXB.js → chunk-QNT5T4Q2.js} +6 -6
  106. package/chunks/{chunk-CUMMSHH6.js → chunk-R5XLNDE2.js} +1 -1
  107. package/chunks/{chunk-LUODI7WD.js → chunk-RCEEXIOO.js} +6 -4
  108. package/chunks/{chunk-WQUQVGTF.js → chunk-RQWDLG6Z.js} +183 -96
  109. package/chunks/{chunk-XYQSMABS.js → chunk-SLCVZX6F.js} +4 -4
  110. package/chunks/{chunk-CEA3E3JB.js → chunk-SPJQO2CE.js} +2 -2
  111. package/chunks/{chunk-JSG7ZSBC.js → chunk-TQBODCFD.js} +1 -1
  112. package/chunks/chunk-TV6K2FB4.js +224 -0
  113. package/chunks/{chunk-5XUCZNSY.js → chunk-TYLOFD2U.js} +1 -1
  114. package/chunks/{chunk-CNEIYWSA.js → chunk-UKWAQ7AV.js} +5 -5
  115. package/chunks/{chunk-7PU4FYLG.js → chunk-US4YQT62.js} +4 -4
  116. package/chunks/{chunk-Q4YQW46J.js → chunk-UYPPCIJQ.js} +36 -18
  117. package/chunks/{chunk-YAUFFXDS.js → chunk-UZKG7HFG.js} +12 -11
  118. package/chunks/{chunk-GWLSNBG4.js → chunk-VQLRHJKL.js} +30 -26
  119. package/chunks/{chunk-L6P4KPHR.js → chunk-VRUHAVZS.js} +59 -39
  120. package/chunks/{chunk-HKMAENAO.js → chunk-W2U4RJJU.js} +8 -6
  121. package/chunks/{chunk-ATAKVRIF.js → chunk-WDSCTLAB.js} +7 -7
  122. package/chunks/{chunk-ZLXQN2QS.js → chunk-WIEO4CWB.js} +1 -1
  123. package/chunks/{chunk-OQ4DRIOA.js → chunk-WJOC24IW.js} +2 -2
  124. package/chunks/{chunk-J3JA76CF.js → chunk-WTNZ6DXB.js} +1 -1
  125. package/chunks/{chunk-NVYTCB5Z.js → chunk-XCR44EEA.js} +14589 -13980
  126. package/chunks/{chunk-TDEXZKMT.js → chunk-Y66VOBRP.js} +2 -2
  127. package/chunks/{chunk-CC2ITGCF.js → chunk-YHN5SUIJ.js} +49 -6
  128. package/chunks/{chunk-D5SKC4YG.js → chunk-ZBAROUR6.js} +41 -13
  129. package/chunks/{chunk-U2NNEY4R.js → chunk-ZEEVKDO7.js} +1 -1
  130. package/chunks/{chunk-5VXNZWGF.js → chunk-ZLOHB76C.js} +1 -1
  131. package/chunks/{chunk-JZETEN3Z.js → chunk-ZNCLTRNU.js} +3 -3
  132. package/chunks/{chunk-TO6QE22P.js → chunk-ZP4ZZJJG.js} +26 -22
  133. package/chunks/{chunk-UOZWKTQG.js → chunk-ZPAHLFZU.js} +2 -2
  134. package/chunks/{chunk-XLA62MYB.js → chunk-ZTXZ7FM4.js} +2 -2
  135. package/chunks/{computer-use-HM37RX6A.js → computer-use-DRETHEQF.js} +26 -26
  136. package/chunks/{config-utils-NV2SVGPB.js → config-utils-XSHOMMK4.js} +3 -2
  137. package/chunks/{contextCommand-OF5SFGH2.js → contextCommand-7YJUW23J.js} +28 -28
  138. package/chunks/{create-sub-session-INX7TXJI.js → create-sub-session-EAB2U5XW.js} +2 -2
  139. package/chunks/{create-sub-session-KPRT7ECJ.js → create-sub-session-L5HOZAEL.js} +26 -26
  140. package/chunks/{cron-create-AMBKGZX6.js → cron-create-GMVKSXZT.js} +4 -4
  141. package/chunks/{cron-delete-LRU4OJYG.js → cron-delete-VDZKUAVK.js} +4 -4
  142. package/chunks/{cron-list-WVP2JXER.js → cron-list-UG7C7RAR.js} +4 -4
  143. package/chunks/{daemon-ARHTSTXP.js → daemon-MI5HF26N.js} +603 -62
  144. package/chunks/{daemon-status-provider-B2UTZUJ2.js → daemon-status-provider-2D47GOJT.js} +36 -36
  145. package/chunks/{de-EBJN3OVN.js → de-2VCDRDGU.js} +4 -1
  146. package/chunks/{dist-WKPOYU7O.js → dist-IEXZC5ZR.js} +1 -1
  147. package/chunks/{dist-XKU3ABM5.js → dist-PQK4GCKA.js} +1 -1
  148. package/chunks/{dist-VHV4EVHG.js → dist-U75JK3PF.js} +1 -1
  149. package/chunks/{dist-R7LN5AZE.js → dist-VXO7QBON.js} +2 -2
  150. package/chunks/{dist-PNVLTKTL.js → dist-WH4TZSH3.js} +158 -4
  151. package/chunks/{dist-QYCAEZIT.js → dist-X2ABIW5R.js} +5 -1
  152. package/chunks/{earlyInputCapture-3VTHRC4C.js → earlyInputCapture-OJQPGCSX.js} +27 -27
  153. package/chunks/{edit-VNI4NJ73.js → edit-LZOAFLT2.js} +27 -27
  154. package/chunks/{en-5A6LA7RK.js → en-NJCA3TAA.js} +5 -1
  155. package/chunks/{enter-worktree-IYYBKPZT.js → enter-worktree-VL2TCGI5.js} +26 -26
  156. package/chunks/{enterPlanMode-GMC5FD5A.js → enterPlanMode-QGHBHZWI.js} +42 -27
  157. package/chunks/{environment-5HSSRMJ7.js → environment-2G5IC2EU.js} +30 -29
  158. package/chunks/{errors-HMFCJJ7P.js → errors-7QNQDNI2.js} +28 -28
  159. package/chunks/{exit-worktree-6BHCMP5G.js → exit-worktree-5V3X2MRH.js} +26 -26
  160. package/chunks/{exitPlanMode-CJW7G74W.js → exitPlanMode-XDPNQB4H.js} +26 -26
  161. package/chunks/{fast-path-FRDMDVHG.js → fast-path-NNSD4BVZ.js} +3 -3
  162. package/chunks/{fast-path-settings-5QZE64HR.js → fast-path-settings-DAOVFADC.js} +6 -4
  163. package/chunks/{fr-YXRABLYZ.js → fr-5F3E7WKD.js} +4 -1
  164. package/chunks/{gemini-QYSEGHAX.js → gemini-RKDUWGXJ.js} +139 -76
  165. package/chunks/{geminiContentGenerator-J7YNZDYP.js → geminiContentGenerator-V7QGHXVF.js} +4 -4
  166. package/chunks/{glob-BRCSGFOT.js → glob-ZNQUUOTS.js} +28 -27
  167. package/chunks/{grep-EE2DUOSY.js → grep-NYIGLM7R.js} +26 -26
  168. package/chunks/{handleAutoUpdate-5NWTLR67.js → handleAutoUpdate-UBQ4IQXY.js} +30 -30
  169. package/chunks/{i18n-BASPENNQ.js → i18n-5T3S6SGP.js} +27 -27
  170. package/chunks/initializer-TJED246Q.js +73 -0
  171. package/chunks/{installationInfo-W6V4DT7W.js → installationInfo-OTEU7FKR.js} +27 -27
  172. package/chunks/{ja-7VQOANVG.js → ja-66J6B53L.js} +5 -2
  173. package/chunks/{keychain-token-storage-VKUBNCP4.js → keychain-token-storage-AU22CQI6.js} +2 -2
  174. package/chunks/list-6OHS7MFJ.js +76 -0
  175. package/chunks/loadedSettingsAdapter-5456XIYG.js +70 -0
  176. package/chunks/{loop-wakeup-WX7BLWWP.js → loop-wakeup-C4EXLYVA.js} +5 -5
  177. package/chunks/{ls-ZB2BDP6T.js → ls-2OUTG3IZ.js} +4 -4
  178. package/chunks/{lsp-V5DN4YUJ.js → lsp-4VMNXZW6.js} +2 -2
  179. package/chunks/mcp-NOWRPFKY.js +70 -0
  180. package/chunks/{monitor-X5Z3H4FY.js → monitor-CVDZO3IZ.js} +26 -26
  181. package/chunks/nonInteractiveCli-UGI7Y43E.js +129 -0
  182. package/chunks/{notebook-edit-TRM2QIJK.js → notebook-edit-NWIA5TEJ.js} +27 -27
  183. package/chunks/{openaiContentGenerator-AAYONPMF.js → openaiContentGenerator-KJONBBJO.js} +12 -12
  184. package/chunks/{pidfile-D4I4FTVA.js → pidfile-L3TGXMTF.js} +27 -27
  185. package/chunks/{pt-2C6YCSHL.js → pt-TFZO5Y6T.js} +4 -1
  186. package/chunks/{qwenContentGenerator-K3HZ2H76.js → qwenContentGenerator-GXUZB5SJ.js} +28 -28
  187. package/chunks/{qwenOAuth2-PJQ27GSO.js → qwenOAuth2-LEYOU7RU.js} +5 -5
  188. package/chunks/{read-file-7SZSIZOL.js → read-file-I4OUZXTA.js} +8 -8
  189. package/chunks/{read-mcp-resource-SM5DA4RG.js → read-mcp-resource-JUFHCKSC.js} +2 -2
  190. package/chunks/{record-artifact-4XKZX3UW.js → record-artifact-DWSMBXYY.js} +2 -2
  191. package/chunks/{ripGrep-YNPFVCZP.js → ripGrep-XLCXANIO.js} +26 -26
  192. package/chunks/{ru-6BBHVZZV.js → ru-4L4LFHIT.js} +4 -1
  193. package/chunks/{run-qwen-serve-DMWV5N6L.js → run-qwen-serve-R6SBP6YS.js} +1232 -371
  194. package/chunks/{runtime-57WWRVHN.js → runtime-U3S33YUQ.js} +42 -37
  195. package/chunks/{scheduler-YBLGWSIL.js → scheduler-65QCIELP.js} +26 -26
  196. package/chunks/{send-message-F36YD6KQ.js → send-message-JZ752NWD.js} +3 -3
  197. package/chunks/{serve-R63NK3CV.js → serve-PSPOFCOD.js} +36 -34
  198. package/chunks/{server-Z22GCAXP.js → server-6P5ZB56O.js} +5561 -1377
  199. package/chunks/{session-HKAAI7BN.js → session-ILLOYW75.js} +298 -98
  200. package/chunks/{settings-3EYN66GK.js → settings-RMUJGYIK.js} +34 -32
  201. package/chunks/{shell-6YXINTWJ.js → shell-65GTAN5Q.js} +28 -26
  202. package/chunks/{skill-OO57P4X6.js → skill-L76U3YCX.js} +10 -10
  203. package/chunks/{spawnChannel-JD7G4VU6.js → spawnChannel-LXIGZ4EM.js} +28 -28
  204. package/chunks/{src-G5UPLZSZ.js → src-DWZT2X3Z.js} +87 -27
  205. package/chunks/{standalone-update-OB7F4JPZ.js → standalone-update-F6SRKPSD.js} +28 -28
  206. package/chunks/{startInteractiveUI-73EGLIIH.js → startInteractiveUI-UEJQP7S3.js} +730 -397
  207. package/chunks/{syntheticOutput-34H7LGA7.js → syntheticOutput-LELY6HAI.js} +3 -3
  208. package/chunks/{task-create-FRGOEIKY.js → task-create-QY3BIMNM.js} +8 -7
  209. package/chunks/{task-list-OW766BXZ.js → task-list-D2U47WBJ.js} +6 -5
  210. package/chunks/{task-stop-SIR5SNBN.js → task-stop-N6E5IYLH.js} +2 -2
  211. package/chunks/{task-update-YRA532MT.js → task-update-HJCQILLB.js} +8 -7
  212. package/chunks/{team-create-PECAAPXK.js → team-create-4QBZVOGN.js} +26 -26
  213. package/chunks/{team-delete-6OSECUZC.js → team-delete-RCWYDRF4.js} +6 -5
  214. package/chunks/{team-plan-approval-L6F434RY.js → team-plan-approval-BK4CIOFV.js} +26 -26
  215. package/chunks/{theme-manager-ZG4RY6GU.js → theme-manager-5F2IGW6E.js} +27 -27
  216. package/chunks/{todoWrite-YDMFEV4G.js → todoWrite-FKCGATPJ.js} +4 -4
  217. package/chunks/{tool-search-THVIWAPB.js → tool-search-J2ESO33H.js} +9 -9
  218. package/chunks/{total-session-admission-JOKNRIIA.js → total-session-admission-U4LZ5QTQ.js} +33 -33
  219. package/chunks/tree-sitter-YJVE2ZUK.js +2980 -0
  220. package/chunks/{trustedFolders-EOGT3UVS.js → trustedFolders-TIDOXCJA.js} +29 -28
  221. package/chunks/types-ML3TRJQ5.js +16 -0
  222. package/chunks/{updateCheck-2KYEYVSB.js → updateCheck-VRVR26FI.js} +29 -29
  223. package/chunks/{validateNonInterActiveAuth-EN6ZQSR2.js → validateNonInterActiveAuth-UGKYAVLG.js} +75 -71
  224. package/chunks/{version-3UEA6ZIR.js → version-7HR6VZAT.js} +1 -1
  225. package/chunks/{web-fetch-PAAEQKBW.js → web-fetch-QGODBB6S.js} +5 -5
  226. package/chunks/{workflow-QCCCMYP3.js → workflow-EDQAITEW.js} +27 -27
  227. package/chunks/workspace-providers-status-27UGAK77.js +73 -0
  228. package/chunks/workspace-registration-store-5H7577YQ.js +27 -0
  229. package/chunks/{workspace-registry-24QFLQYH.js → workspace-registry-F3THGAXC.js} +33 -33
  230. package/chunks/workspace-service-4JSAQAHP.js +86 -0
  231. package/chunks/workspace-skills-status-5JTWZHZU.js +72 -0
  232. package/chunks/{write-file-I3MUDRIE.js → write-file-UY6XCZZM.js} +27 -27
  233. package/chunks/{zh-RQE7I22T.js → zh-FSAH32JB.js} +6 -2
  234. package/chunks/{zh-TW-TBPQGHKH.js → zh-TW-D2YIE2LO.js} +6 -2
  235. package/cli.js +11 -11
  236. package/locales/ca.js +6 -0
  237. package/locales/de.js +6 -0
  238. package/locales/en.js +8 -0
  239. package/locales/fr.js +6 -0
  240. package/locales/ja.js +7 -1
  241. package/locales/pt.js +6 -0
  242. package/locales/ru.js +6 -0
  243. package/locales/zh-TW.js +9 -1
  244. package/locales/zh.js +9 -1
  245. package/package.json +3 -3
  246. package/web-shell/assets/{arc-C15hqnJe.js → arc-CObt_TK9.js} +1 -1
  247. package/web-shell/assets/{architectureDiagram-3BPJPVTR-B-At37J_.js → architectureDiagram-3BPJPVTR-B7aiJ6CK.js} +1 -1
  248. package/web-shell/assets/{blockDiagram-GPEHLZMM-B51wjcU7.js → blockDiagram-GPEHLZMM-BSK2CrID.js} +1 -1
  249. package/web-shell/assets/{c4Diagram-AAUBKEIU-xBK7BAwN.js → c4Diagram-AAUBKEIU-Bhx2p7T_.js} +1 -1
  250. package/web-shell/assets/channel-BBaLq8MV.js +1 -0
  251. package/web-shell/assets/{chunk-2J33WTMH-xKmLg7Yr.js → chunk-2J33WTMH-c3Hzv0Ni.js} +1 -1
  252. package/web-shell/assets/{chunk-4BX2VUAB-BfkdKZCM.js → chunk-4BX2VUAB-DNXaK7ZF.js} +1 -1
  253. package/web-shell/assets/{chunk-55IACEB6-DT713sZf.js → chunk-55IACEB6-BXjvDj_i.js} +1 -1
  254. package/web-shell/assets/{chunk-727SXJPM-CYEeAamv.js → chunk-727SXJPM-B6CaKFp-.js} +1 -1
  255. package/web-shell/assets/{chunk-AQP2D5EJ-DBN-5CFd.js → chunk-AQP2D5EJ-tij6Mz9B.js} +1 -1
  256. package/web-shell/assets/{chunk-FMBD7UC4-CGZKk4PH.js → chunk-FMBD7UC4-DdlsGk2h.js} +1 -1
  257. package/web-shell/assets/{chunk-ND2GUHAM-qQbC2O-y.js → chunk-ND2GUHAM-CdgGZSHE.js} +1 -1
  258. package/web-shell/assets/{chunk-QZHKN3VN-B3zeXwsX.js → chunk-QZHKN3VN-D8oJn1C0.js} +1 -1
  259. package/web-shell/assets/classDiagram-4FO5ZUOK-B2ZK6sWE.js +1 -0
  260. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B2ZK6sWE.js +1 -0
  261. package/web-shell/assets/{cose-bilkent-S5V4N54A-BKsl1Wvy.js → cose-bilkent-S5V4N54A-BUVmNp1Y.js} +1 -1
  262. package/web-shell/assets/{dagre-BM42HDAG-CuuuLiBK.js → dagre-BM42HDAG-CO4q310O.js} +1 -1
  263. package/web-shell/assets/{diagram-2AECGRRQ-CG4_eKiV.js → diagram-2AECGRRQ-C6gFvWkg.js} +1 -1
  264. package/web-shell/assets/{diagram-5GNKFQAL-DSFTmZB1.js → diagram-5GNKFQAL-NG2I_c0h.js} +1 -1
  265. package/web-shell/assets/{diagram-KO2AKTUF-BxwlEHn8.js → diagram-KO2AKTUF-DFKMS6I9.js} +1 -1
  266. package/web-shell/assets/{diagram-LMA3HP47-BUAg-jMG.js → diagram-LMA3HP47-BiElfsfP.js} +1 -1
  267. package/web-shell/assets/{diagram-OG6HWLK6-BFM2jlO5.js → diagram-OG6HWLK6-zLWDYUqu.js} +1 -1
  268. package/web-shell/assets/{erDiagram-TEJ5UH35-CerbFPa2.js → erDiagram-TEJ5UH35-DoVaazhK.js} +1 -1
  269. package/web-shell/assets/{flowDiagram-I6XJVG4X-BNeZz5Zz.js → flowDiagram-I6XJVG4X-0RLz-mXg.js} +1 -1
  270. package/web-shell/assets/{ganttDiagram-6RSMTGT7-CTOogLaM.js → ganttDiagram-6RSMTGT7-C-eX1A39.js} +3 -3
  271. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-yxSFkXPj.js → gitGraphDiagram-PVQCEYII-BauQu1Bu.js} +1 -1
  272. package/web-shell/assets/index-3uAT3ehO.css +5 -0
  273. package/web-shell/assets/index-CVHa2QH7.js +3 -0
  274. package/web-shell/assets/index-D1KigWat.js +1128 -0
  275. package/web-shell/assets/{infoDiagram-5YYISTIA-DYdAUevm.js → infoDiagram-5YYISTIA-C800cFvZ.js} +1 -1
  276. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CNuijZ90.js → ishikawaDiagram-YF4QCWOH-CFK1Jk6e.js} +1 -1
  277. package/web-shell/assets/{journeyDiagram-JHISSGLW-BTyiuonf.js → journeyDiagram-JHISSGLW-Cjx0WAC4.js} +1 -1
  278. package/web-shell/assets/{kanban-definition-UN3LZRKU-DPJo0Uow.js → kanban-definition-UN3LZRKU-DWMDHbiv.js} +1 -1
  279. package/web-shell/assets/{linear-C8wKCbIC.js → linear-vpW4FrZs.js} +1 -1
  280. package/web-shell/assets/{mermaid.core-BV5o7nW5.js → mermaid.core-DsHRUnDd.js} +5 -5
  281. package/web-shell/assets/{mindmap-definition-RKZ34NQL-BtLcBmSt.js → mindmap-definition-RKZ34NQL-D3Eb1cAK.js} +1 -1
  282. package/web-shell/assets/{pieDiagram-4H26LBE5-C22J7A9Q.js → pieDiagram-4H26LBE5-Cr2-6sWt.js} +1 -1
  283. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DSL10wiL.js → quadrantDiagram-W4KKPZXB-Yd7yUgVp.js} +1 -1
  284. package/web-shell/assets/{requirementDiagram-4Y6WPE33-feqh0UpX.js → requirementDiagram-4Y6WPE33-BE6SprL8.js} +1 -1
  285. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Z4OVaWaZ.js → sankeyDiagram-5OEKKPKP-DzkuMK8d.js} +1 -1
  286. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DIluIcb1.js → sequenceDiagram-3UESZ5HK-wD9A3Dhi.js} +1 -1
  287. package/web-shell/assets/{stateDiagram-AJRCARHV-hlhnuoYH.js → stateDiagram-AJRCARHV-BOp5q1Nm.js} +1 -1
  288. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BDsWUmPG.js +1 -0
  289. package/web-shell/assets/{timeline-definition-PNZ67QCA-Dqf_CqgL.js → timeline-definition-PNZ67QCA-Btc08sUA.js} +1 -1
  290. package/web-shell/assets/{vennDiagram-CIIHVFJN-DD2QhaTX.js → vennDiagram-CIIHVFJN-Bv6upsOA.js} +1 -1
  291. package/web-shell/assets/{wardley-L42UT6IY-B2uI85U_.js → wardley-L42UT6IY-D-XamnCK.js} +1 -1
  292. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-U1aJX71g.js → wardleyDiagram-YWT4CUSO-BbP_5Wfp.js} +1 -1
  293. package/web-shell/assets/{xychartDiagram-2RQKCTM6-C0ODHUee.js → xychartDiagram-2RQKCTM6-CO5Hh28b.js} +1 -1
  294. package/web-shell/index.html +2 -2
  295. package/chunks/chunk-CU3L64TP.js +0 -93
  296. package/chunks/initializer-UTQ7FB7G.js +0 -71
  297. package/chunks/list-DEICDL65.js +0 -74
  298. package/chunks/loadedSettingsAdapter-NOWEGDYJ.js +0 -68
  299. package/chunks/mcp-L5JXEEIA.js +0 -68
  300. package/chunks/nonInteractiveCli-LS2K4X6A.js +0 -124
  301. package/chunks/types-JNKGKUJT.js +0 -12
  302. package/chunks/workspace-providers-status-4KMGETOJ.js +0 -71
  303. package/chunks/workspace-service-RVLBMSMZ.js +0 -80
  304. package/chunks/workspace-skills-status-DS4ZVFTO.js +0 -70
  305. package/web-shell/assets/channel-CLiQD50f.js +0 -1
  306. package/web-shell/assets/classDiagram-4FO5ZUOK-D3sYqow5.js +0 -1
  307. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-D3sYqow5.js +0 -1
  308. package/web-shell/assets/index-D5IWFVk1.css +0 -5
  309. package/web-shell/assets/index-KFJRDhX7.js +0 -783
  310. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BhQMwgpl.js +0 -1
@@ -1,79 +1,15 @@
1
1
  // Force strict mode and setup for ESM
2
2
  "use strict";
3
3
  import {
4
- startPostRenderPrefetches
5
- } from "./chunk-E2IY465S.js";
6
- import {
7
- stopAndGetCapturedInput
8
- } from "./chunk-LXNEJD34.js";
9
- import {
10
- DualOutputContext,
11
- useDualOutput,
12
- useGeminiStream
13
- } from "./chunk-Q4YQW46J.js";
14
- import {
15
- MAX_SUGGESTIONS_TO_SHOW,
16
- MAX_WIDTH,
17
- SuggestionsDisplay,
18
- buildMcpResourceRef,
19
- buildMcpServerRef,
20
- getExtensionSuggestions,
21
- matchMcpServerPrefix
22
- } from "./chunk-77XJ3SWN.js";
4
+ TUI_CHAT_RECORDING_FAILURE_MESSAGE,
5
+ reportChatRecordingFailureToAdapter
6
+ } from "./chunk-QNNTA7IX.js";
23
7
  import {
24
8
  StreamJsonOutputAdapter
25
- } from "./chunk-B4G2WOFA.js";
26
- import {
27
- BuiltinCommandLoader,
28
- BundledSkillLoader,
29
- CommandService,
30
- DISPLAY_HOOK_EVENTS,
31
- FileCommandLoader,
32
- MAX_STACKED_SKILLS,
33
- McpPromptLoader,
34
- SavedWorkflowLoader,
35
- SkillCommandLoader,
36
- addConfigToMatcherGroup,
37
- appendUserPromptExpansionAdditionalContext,
38
- createEmptyHookEventInfo,
39
- findMidInputSlashCommand,
40
- findSlashCommandTokens,
41
- formatApprovalModeDescription,
42
- formatApprovalModeName,
43
- formatUserPromptExpansionBlockedMessage,
44
- getAllConfigs,
45
- getBestSlashCommandMatch,
46
- getTranslatedSourceDisplayMap,
47
- hasBlockingBackgroundWork,
48
- hasSlashCommandPathSeparator,
49
- isBtwCommand,
50
- isMidInputCompletableCommand,
51
- isSlashCommand,
52
- parseSlashCommand,
53
- parseStackedSlashCommands,
54
- refreshExtensionContentRuntime,
55
- resetBackgroundStateForSessionSwitch,
56
- restoreGoalFromHistory,
57
- serializeUserPromptExpansionPrompt,
58
- supportsMatchers,
59
- useAutoAcceptIndicator
60
- } from "./chunk-5U27BZ72.js";
61
- import {
62
- EXTENSION_RELOAD_FAILED_REASON,
63
- ExtensionRefreshState,
64
- appEvents,
65
- loadHierarchicalGeminiMemory
66
- } from "./chunk-5HOMWMCL.js";
9
+ } from "./chunk-FTU55ZZ7.js";
67
10
  import {
68
- disableKittyProtocol,
69
- isKittyProtocolEnabled,
70
- isKittyProtocolSupported
71
- } from "./chunk-5DTTYNB7.js";
72
- import "./chunk-D2GFWEXB.js";
73
- import {
74
- setUpdateHandler
75
- } from "./chunk-XYQSMABS.js";
76
- import "./chunk-PVZM22CK.js";
11
+ startPostRenderPrefetches
12
+ } from "./chunk-4UDHAJFV.js";
77
13
  import {
78
14
  AboutBox,
79
15
  BaseSelectionList,
@@ -90,6 +26,7 @@ import {
90
26
  RadioButtonSelect,
91
27
  RenderModeProvider,
92
28
  SessionPicker,
29
+ TOOL_DISPLAY_BY_NAME,
93
30
  TOOL_SUCCESS_RATE_HIGH,
94
31
  TOOL_SUCCESS_RATE_MEDIUM,
95
32
  TerminalOutputProvider,
@@ -132,16 +69,79 @@ import {
132
69
  useTextBuffer,
133
70
  useUIActions,
134
71
  useUIState
135
- } from "./chunk-AKIVHSJR.js";
72
+ } from "./chunk-J4UQXGVL.js";
136
73
  import {
137
74
  relaunchApp
138
- } from "./chunk-VTU57BWZ.js";
75
+ } from "./chunk-JEKOCLRN.js";
76
+ import {
77
+ MaxSizedBox,
78
+ OverflowProvider,
79
+ useOverflowState
80
+ } from "./chunk-5SQ55XJZ.js";
81
+ import {
82
+ stopAndGetCapturedInput
83
+ } from "./chunk-2FO5GFKZ.js";
84
+ import {
85
+ DualOutputContext,
86
+ useDualOutput,
87
+ useGeminiStream
88
+ } from "./chunk-UYPPCIJQ.js";
89
+ import {
90
+ MAX_SUGGESTIONS_TO_SHOW,
91
+ MAX_WIDTH,
92
+ SuggestionsDisplay,
93
+ buildMcpResourceRef,
94
+ buildMcpServerRef,
95
+ getExtensionSuggestions,
96
+ matchMcpServerPrefix
97
+ } from "./chunk-LIUEXYPL.js";
98
+ import {
99
+ BuiltinCommandLoader,
100
+ BundledSkillLoader,
101
+ CommandService,
102
+ DISPLAY_HOOK_EVENTS,
103
+ FileCommandLoader,
104
+ MAX_STACKED_SKILLS,
105
+ McpPromptLoader,
106
+ SavedWorkflowLoader,
107
+ SkillCommandLoader,
108
+ addConfigToMatcherGroup,
109
+ appendUserPromptExpansionAdditionalContext,
110
+ createEmptyHookEventInfo,
111
+ findMidInputSlashCommand,
112
+ findSlashCommandTokens,
113
+ formatApprovalModeDescription,
114
+ formatApprovalModeName,
115
+ formatUserPromptExpansionBlockedMessage,
116
+ getAllConfigs,
117
+ getBestSlashCommandMatch,
118
+ getTranslatedSourceDisplayMap,
119
+ hasBlockingBackgroundWork,
120
+ hasSlashCommandPathSeparator,
121
+ isBtwCommand,
122
+ isMidInputCompletableCommand,
123
+ isSlashCommand,
124
+ parseSlashCommand,
125
+ parseStackedSlashCommands,
126
+ refreshExtensionContentRuntime,
127
+ resetBackgroundStateForSessionSwitch,
128
+ restoreGoalFromHistory,
129
+ serializeUserPromptExpansionPrompt,
130
+ supportsMatchers,
131
+ useAutoAcceptIndicator
132
+ } from "./chunk-55SAYASQ.js";
133
+ import {
134
+ EXTENSION_RELOAD_FAILED_REASON,
135
+ ExtensionRefreshState,
136
+ appEvents,
137
+ loadHierarchicalGeminiMemory
138
+ } from "./chunk-QEDYXCLG.js";
139
139
  import {
140
140
  SessionStatsProvider,
141
141
  getCommandDisplayName,
142
142
  getCommandSourceBadge,
143
143
  useSessionStats
144
- } from "./chunk-AURZZYMD.js";
144
+ } from "./chunk-IQOOJSPR.js";
145
145
  import {
146
146
  Colors,
147
147
  SettingsContext,
@@ -150,7 +150,7 @@ import {
150
150
  useMouseEvents,
151
151
  useSettings,
152
152
  useTerminalSize
153
- } from "./chunk-JZETEN3Z.js";
153
+ } from "./chunk-ZNCLTRNU.js";
154
154
  import {
155
155
  BEL,
156
156
  GeminiRespondingSpinner,
@@ -179,17 +179,7 @@ import {
179
179
  useStreamingContext,
180
180
  wrapForMultiplexer,
181
181
  writeOsc52
182
- } from "./chunk-GWLSNBG4.js";
183
- import "./chunk-4WGODMVR.js";
184
- import {
185
- isHistoryItemVisibleAfterRestore
186
- } from "./chunk-7X7TEQNX.js";
187
- import "./chunk-KW7NOTN6.js";
188
- import {
189
- MaxSizedBox,
190
- OverflowProvider,
191
- useOverflowState
192
- } from "./chunk-HVY356M2.js";
182
+ } from "./chunk-VQLRHJKL.js";
193
183
  import {
194
184
  Box_default,
195
185
  Static,
@@ -204,31 +194,42 @@ import {
204
194
  use_is_screen_reader_enabled_default,
205
195
  use_stdin_default,
206
196
  use_stdout_default
207
- } from "./chunk-CNEIYWSA.js";
197
+ } from "./chunk-UKWAQ7AV.js";
198
+ import {
199
+ disableKittyProtocol,
200
+ isKittyProtocolEnabled,
201
+ isKittyProtocolSupported
202
+ } from "./chunk-5DTTYNB7.js";
203
+ import "./chunk-QNT5T4Q2.js";
204
+ import "./chunk-4WGODMVR.js";
205
+ import "./chunk-GCD7PEDZ.js";
206
+ import "./chunk-NHDKSOEY.js";
207
+ import {
208
+ setUpdateHandler
209
+ } from "./chunk-SLCVZX6F.js";
210
+ import {
211
+ isHistoryItemVisibleAfterRestore
212
+ } from "./chunk-7X7TEQNX.js";
208
213
  import {
209
214
  require_react
210
215
  } from "./chunk-HTHUX2T5.js";
216
+ import "./chunk-WJOC24IW.js";
217
+ import "./chunk-C47ENMZJ.js";
218
+ import "./chunk-YAF2MQZ6.js";
219
+ import "./chunk-INKAZNYC.js";
211
220
  import {
212
221
  AUTO_THEME_NAME,
213
222
  DEFAULT_THEME,
214
223
  themeManager
215
- } from "./chunk-MXL5UP4X.js";
216
- import "./chunk-3G7CIHVV.js";
217
- import {
218
- getErrorMessage as getErrorMessage2
219
- } from "./chunk-VA4KQY6V.js";
220
- import "./chunk-EGYZ275M.js";
221
- import "./chunk-NHDKSOEY.js";
222
- import "./chunk-OQ4DRIOA.js";
223
- import "./chunk-EMDMPBJ4.js";
224
- import "./chunk-YAF2MQZ6.js";
224
+ } from "./chunk-Q6TUALBE.js";
225
+ import "./chunk-KW7NOTN6.js";
225
226
  import {
226
227
  openQwenAsrRealtimeStream,
227
228
  openVoiceStream,
228
229
  openVoiceStreamWithRetry
229
- } from "./chunk-6PESIEKJ.js";
230
- import "./chunk-N3EMS75V.js";
231
- import "./chunk-U2NNEY4R.js";
230
+ } from "./chunk-EZSRHWGS.js";
231
+ import "./chunk-HKM2TEF7.js";
232
+ import "./chunk-ZEEVKDO7.js";
232
233
  import {
233
234
  cpLen,
234
235
  cpSlice,
@@ -241,52 +242,62 @@ import {
241
242
  stringWidth,
242
243
  stripUnsafeCharacters,
243
244
  toCodePoints
244
- } from "./chunk-Q6I5QHMH.js";
245
+ } from "./chunk-FGTCZJOD.js";
245
246
  import "./chunk-QHTIBUWB.js";
246
247
  import "./chunk-L573Z2QZ.js";
248
+ import "./chunk-RXFQM6FQ.js";
249
+ import "./chunk-MV52C5MA.js";
250
+ import "./chunk-6H67XLET.js";
251
+ import "./chunk-IOQ75R4R.js";
252
+ import {
253
+ getErrorMessage as getErrorMessage2
254
+ } from "./chunk-MEK7CQJR.js";
255
+ import {
256
+ getExtendedSystemInfo
257
+ } from "./chunk-BUPLOPUA.js";
258
+ import {
259
+ formatDuration,
260
+ formatRelativeTime,
261
+ formatTokenCount
262
+ } from "./chunk-E5Z2AVNV.js";
263
+ import "./chunk-LT5CRUA5.js";
247
264
  import {
248
265
  assertVoiceBaseUrlNetworkAllowed,
249
266
  isKeytermEcho,
250
267
  isStreamingVoiceModel,
251
268
  resolveVoiceStreamConfig,
252
269
  transcribeVoiceAudio
253
- } from "./chunk-PDZ7MBDG.js";
270
+ } from "./chunk-JIQHT2O6.js";
254
271
  import {
255
272
  formatUnsupportedVoiceModelMessage,
256
273
  isSelectableVoiceModel
257
- } from "./chunk-HPDUL5MF.js";
258
- import "./chunk-LK7KUE55.js";
259
- import "./chunk-RXFQM6FQ.js";
260
- import "./chunk-PODM4SZ4.js";
261
- import "./chunk-6H67XLET.js";
262
- import "./chunk-BAPGSC7U.js";
274
+ } from "./chunk-AGZWN4WV.js";
275
+ import "./chunk-FSA7ERJ2.js";
276
+ import "./chunk-6RLROE6G.js";
277
+ import "./chunk-COH43MRJ.js";
278
+ import "./chunk-K4LG6TVJ.js";
263
279
  import {
264
280
  requestConsentInteractive,
265
281
  requestConsentOrFail
266
- } from "./chunk-P67PFTUT.js";
282
+ } from "./chunk-EPY4ZEU6.js";
267
283
  import "./chunk-57OAHC2Y.js";
268
- import "./chunk-TO6QE22P.js";
269
- import {
270
- getExtendedSystemInfo
271
- } from "./chunk-W3JHSWRP.js";
272
- import {
273
- formatDuration,
274
- formatRelativeTime,
275
- formatTokenCount
276
- } from "./chunk-E5Z2AVNV.js";
277
- import "./chunk-W7FJ3N32.js";
278
- import "./chunk-6RLROE6G.js";
279
- import "./chunk-COH43MRJ.js";
280
- import "./chunk-34MW4KTI.js";
281
- import "./chunk-DC5Z3DU6.js";
284
+ import "./chunk-ZP4ZZJJG.js";
285
+ import "./chunk-4QZADKJS.js";
282
286
  import "./chunk-V6WHFGST.js";
283
287
  import {
284
288
  createLoadedSettingsAdapter
285
- } from "./chunk-BMGVRZN4.js";
286
- import "./chunk-CUMMSHH6.js";
289
+ } from "./chunk-AETEZU4U.js";
290
+ import "./chunk-W7FJ3N32.js";
291
+ import "./chunk-GYTKQYDB.js";
292
+ import "./chunk-TJTKSVIV.js";
293
+ import "./chunk-OJAMDVF5.js";
294
+ import "./chunk-LXLTBIDP.js";
295
+ import "./chunk-R5XLNDE2.js";
296
+ import "./chunk-AU4R7ACM.js";
297
+ import "./chunk-UDXSXLER.js";
287
298
  import {
288
299
  loadMcpApprovals
289
- } from "./chunk-ATAKVRIF.js";
300
+ } from "./chunk-WDSCTLAB.js";
290
301
  import {
291
302
  CORRUPTED_SUFFIX,
292
303
  SettingScope,
@@ -308,38 +319,36 @@ import {
308
319
  settingExistsInScope,
309
320
  validateSettingValue,
310
321
  writeOutputLanguageAndRegisterPath
311
- } from "./chunk-4C5BQ2D2.js";
322
+ } from "./chunk-CQQD7MDG.js";
312
323
  import "./chunk-RKUWKYED.js";
313
324
  import {
314
325
  getCurrentLanguage,
315
326
  localizeToolDisplayName,
316
327
  t,
317
328
  ta
318
- } from "./chunk-YAUFFXDS.js";
319
- import "./chunk-SCGXUJBT.js";
320
- import "./chunk-3BTRNWWD.js";
329
+ } from "./chunk-UZKG7HFG.js";
330
+ import "./chunk-KPA5QGN2.js";
331
+ import "./chunk-GOXKNSDZ.js";
332
+ import "./chunk-IDS7MSUP.js";
321
333
  import "./chunk-QRUIS3DN.js";
322
- import "./chunk-X4NKFGFJ.js";
323
- import "./chunk-TJTKSVIV.js";
324
- import "./chunk-34Z3U5RQ.js";
325
- import "./chunk-UDXSXLER.js";
326
334
  import {
327
335
  isWorkspaceTrusted,
328
336
  loadTrustedFolders
329
- } from "./chunk-HKMAENAO.js";
337
+ } from "./chunk-W2U4RJJU.js";
330
338
  import {
331
339
  require_strip_json_comments
332
- } from "./chunk-RDJSGHZE.js";
340
+ } from "./chunk-ALGGS7UH.js";
341
+ import "./chunk-MR3PXB6E.js";
342
+ import {
343
+ clearScreen,
344
+ writeStderrLine
345
+ } from "./chunk-YUZI3WAC.js";
333
346
  import "./chunk-XFSFZCM5.js";
334
347
  import "./chunk-URK542T4.js";
335
348
  import {
336
349
  getCliVersion
337
- } from "./chunk-3AHXV67U.js";
350
+ } from "./chunk-C5TVXLJZ.js";
338
351
  import "./chunk-VJNBRRZG.js";
339
- import {
340
- clearScreen,
341
- writeStderrLine
342
- } from "./chunk-YUZI3WAC.js";
343
352
  import {
344
353
  ALIBABA_PROVIDERS,
345
354
  AsyncFzf,
@@ -352,6 +361,7 @@ import {
352
361
  INITIAL_FOLLOWUP_STATE,
353
362
  IdeClient,
354
363
  Logger,
364
+ MAX_RECENT_ACTIVITIES,
355
365
  MCPOAuthProvider,
356
366
  MCPOAuthTokenStorage,
357
367
  SessionService,
@@ -367,6 +377,7 @@ import {
367
377
  applyProviderInstallPlan,
368
378
  buildBackgroundEntryLabel,
369
379
  buildInstallPlan,
380
+ buildSessionRecoveryPlan,
370
381
  checkForExtensionUpdate,
371
382
  checkHasEditorType,
372
383
  clearWelcomeBackState,
@@ -398,6 +409,7 @@ import {
398
409
  glob,
399
410
  ideContextStore,
400
411
  isEditorAvailable,
412
+ isExtensionCommittedWithWarningsError,
401
413
  isGatedMcpScope,
402
414
  isImageCapable,
403
415
  isSessionRuntimeActive,
@@ -429,35 +441,35 @@ import {
429
441
  validateWorkflowName,
430
442
  watchRepoBranch,
431
443
  writeRuntimeStatus
432
- } from "./chunk-NVYTCB5Z.js";
433
- import "./chunk-CU3L64TP.js";
434
- import "./chunk-ZJE7NSL3.js";
444
+ } from "./chunk-XCR44EEA.js";
435
445
  import "./chunk-H6XPXXMH.js";
436
- import "./chunk-MC23XKFE.js";
437
- import "./chunk-LUODI7WD.js";
438
- import "./chunk-ORBGV7NJ.js";
439
- import "./chunk-KKNMOEZH.js";
446
+ import "./chunk-5M6IDOMF.js";
447
+ import "./chunk-BLPMRN4B.js";
448
+ import "./chunk-RCEEXIOO.js";
449
+ import "./chunk-KKRTYONM.js";
450
+ import "./chunk-TV6K2FB4.js";
451
+ import "./chunk-E2UVIFI2.js";
440
452
  import {
441
453
  runSideQuery
442
- } from "./chunk-W2UIXQDL.js";
454
+ } from "./chunk-7STBROEV.js";
443
455
  import "./chunk-XU457J4V.js";
444
456
  import "./chunk-VDDGDZMA.js";
445
- import "./chunk-CEA3E3JB.js";
457
+ import "./chunk-SPJQO2CE.js";
446
458
  import "./chunk-SZRN75WQ.js";
447
459
  import "./chunk-HTO4JFDZ.js";
448
460
  import "./chunk-CPBF7KYF.js";
449
461
  import {
450
462
  APPROVAL_MODES
451
- } from "./chunk-4GORAUCN.js";
463
+ } from "./chunk-F333XEAU.js";
452
464
  import "./chunk-6AM5D4ME.js";
453
- import "./chunk-7R3CZA3Q.js";
465
+ import "./chunk-2Z5UX4KI.js";
454
466
  import {
455
467
  HOOKS_CONFIG_FIELDS
456
- } from "./chunk-GWHYEOV2.js";
468
+ } from "./chunk-ARKANCNX.js";
457
469
  import {
458
470
  isPathWithinRoot
459
- } from "./chunk-4QLQE5WJ.js";
460
- import "./chunk-5XUCZNSY.js";
471
+ } from "./chunk-L5U3ELZX.js";
472
+ import "./chunk-TYLOFD2U.js";
461
473
  import {
462
474
  AuthEvent,
463
475
  DiscoveredMCPTool,
@@ -481,7 +493,7 @@ import {
481
493
  recordSkillInvocation,
482
494
  removeMCPServerStatus,
483
495
  removeMCPStatusChangeListener
484
- } from "./chunk-3VAGG5T5.js";
496
+ } from "./chunk-BYOOK22F.js";
485
497
  import "./chunk-4WKAA4KS.js";
486
498
  import "./chunk-CR3C7WXL.js";
487
499
  import {
@@ -493,35 +505,34 @@ import {
493
505
  getAutoMemoryProjectStateDir,
494
506
  getAutoMemoryRoot,
495
507
  getUserAutoMemoryRoot
496
- } from "./chunk-YLV3XXFB.js";
497
- import "./chunk-TDEXZKMT.js";
498
- import "./chunk-J3JA76CF.js";
508
+ } from "./chunk-FBU7WRZI.js";
509
+ import "./chunk-Y66VOBRP.js";
510
+ import "./chunk-WTNZ6DXB.js";
499
511
  import {
500
- ToolDisplayNames,
501
512
  ToolNames
502
- } from "./chunk-B5ORX3FG.js";
513
+ } from "./chunk-JGUT3LWZ.js";
503
514
  import {
504
515
  qwenOAuth2Events
505
- } from "./chunk-BZIFY5TF.js";
506
- import "./chunk-UOZWKTQG.js";
516
+ } from "./chunk-OKAIGAYW.js";
517
+ import "./chunk-ZPAHLFZU.js";
507
518
  import "./chunk-JESCGQM3.js";
508
519
  import {
509
520
  atomicWriteFileSync
510
- } from "./chunk-ZLXQN2QS.js";
521
+ } from "./chunk-WIEO4CWB.js";
511
522
  import {
512
523
  REASONING_EFFORT_TIERS
513
524
  } from "./chunk-XVNQMZ2I.js";
514
525
  import {
515
526
  DEFAULT_TOKEN_LIMIT
516
- } from "./chunk-524RQP4Q.js";
517
- import "./chunk-JSG7ZSBC.js";
527
+ } from "./chunk-B7NUUEXC.js";
528
+ import "./chunk-TQBODCFD.js";
518
529
  import "./chunk-A4UCTEB5.js";
519
530
  import "./chunk-XWRJCPHC.js";
520
531
  import "./chunk-4LD5APFL.js";
521
532
  import "./chunk-TYAMGABM.js";
522
533
  import "./chunk-FCMNKVXT.js";
523
534
  import "./chunk-DJ2GSRLV.js";
524
- import "./chunk-4ZVWQHEQ.js";
535
+ import "./chunk-LQIDP6K5.js";
525
536
  import {
526
537
  Storage,
527
538
  createDebugLogger,
@@ -532,17 +543,17 @@ import {
532
543
  isNodeError,
533
544
  shortenPath,
534
545
  tildeifyPath
535
- } from "./chunk-J4TSQ5EQ.js";
536
- import "./chunk-CCDMCZPP.js";
537
- import {
538
- registerCleanup,
539
- runExitCleanup
540
- } from "./chunk-ECNYL4AA.js";
546
+ } from "./chunk-7NFB7LBQ.js";
547
+ import "./chunk-26UABK2C.js";
541
548
  import {
542
549
  finalizeStartupProfile,
543
550
  profileCheckpoint
544
551
  } from "./chunk-QSWDGAIC.js";
545
552
  import "./chunk-Q7YDKOGY.js";
553
+ import {
554
+ registerCleanup,
555
+ runExitCleanup
556
+ } from "./chunk-OPNPGO6D.js";
546
557
  import "./chunk-75DOP5OR.js";
547
558
  import "./chunk-DMTGGOSA.js";
548
559
  import "./chunk-YQ3U5MUC.js";
@@ -594,6 +605,7 @@ var DualOutputBridge = class {
594
605
  sessionId;
595
606
  active = true;
596
607
  shutdownPromise = null;
608
+ unsubscribeRecordingFailure;
597
609
  constructor(config, target, options = {}) {
598
610
  this.sessionId = config.getSessionId();
599
611
  if ("fd" in target) {
@@ -661,6 +673,10 @@ var DualOutputBridge = class {
661
673
  // includePartialMessages — always emit streaming events
662
674
  this.stream
663
675
  );
676
+ this.unsubscribeRecordingFailure = typeof config.onChatRecordingFailure === "function" ? config.onChatRecordingFailure((event) => {
677
+ this.emitRecordingFailure(event);
678
+ }) : () => {
679
+ };
664
680
  try {
665
681
  this.adapter.emitSystemMessage("session_start", {
666
682
  session_id: this.sessionId,
@@ -807,8 +823,20 @@ var DualOutputBridge = class {
807
823
  this.active = false;
808
824
  }
809
825
  }
826
+ emitRecordingFailure(event) {
827
+ if (!this.active) return;
828
+ this.disableIfBufferOverflowed();
829
+ if (!this.active) return;
830
+ try {
831
+ reportChatRecordingFailureToAdapter(this.adapter, event);
832
+ } catch (err) {
833
+ debugLogger.error("DualOutput recording failure output error:", err);
834
+ this.active = false;
835
+ }
836
+ }
810
837
  shutdown() {
811
838
  if (this.shutdownPromise) return this.shutdownPromise;
839
+ this.unsubscribeRecordingFailure();
812
840
  if (this.active) {
813
841
  try {
814
842
  this.adapter.emitSystemMessage("session_end", {
@@ -6586,8 +6614,8 @@ function SettingsDialog({
6586
6614
  }
6587
6615
  } else if (item.type === "number" || item.type === "string") {
6588
6616
  const isSubDialogSetting = item.value === "ui.theme" || item.value === "general.preferredEditor" || item.value === "fastModel" || item.value === "visionModel";
6589
- const path11 = item.value.split(".");
6590
- const currentValue = getNestedValue(pendingSettings, path11);
6617
+ const path12 = item.value.split(".");
6618
+ const currentValue = getNestedValue(pendingSettings, path12);
6591
6619
  const defaultValue = getDefaultValue(item.value);
6592
6620
  if (currentValue !== void 0 && currentValue !== null) {
6593
6621
  displayValue = String(currentValue);
@@ -14635,18 +14663,25 @@ import { promisify as promisify3 } from "node:util";
14635
14663
  import { execFile as execFile4 } from "node:child_process";
14636
14664
  var execFileAsync3 = promisify3(execFile4);
14637
14665
  var windowsBrowserProgIds = {
14638
- AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
14639
- MSEdgeDHTML: { name: "Edge", id: "com.microsoft.edge" },
14640
- // On macOS, it's "com.microsoft.edgemac"
14641
14666
  MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
14642
- // Newer Edge/Win10 releases
14643
- "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" },
14644
- FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
14667
+ // The missing `L` is correct.
14668
+ MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
14669
+ MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
14670
+ AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
14645
14671
  ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
14672
+ ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
14673
+ ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
14674
+ ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
14646
14675
  BraveHTML: { name: "Brave", id: "com.brave.Browser" },
14647
14676
  BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
14648
- BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" }
14677
+ BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
14678
+ BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
14679
+ FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
14680
+ OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
14681
+ VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
14682
+ "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
14649
14683
  };
14684
+ var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
14650
14685
  var UnknownBrowserError = class extends Error {
14651
14686
  static {
14652
14687
  __name(this, "UnknownBrowserError");
@@ -14664,11 +14699,11 @@ async function defaultBrowser(_execFileAsync = execFileAsync3) {
14664
14699
  throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
14665
14700
  }
14666
14701
  const { id } = match.groups;
14667
- const browser = windowsBrowserProgIds[id];
14668
- if (!browser) {
14669
- throw new UnknownBrowserError(`Unknown browser ID: ${id}`);
14670
- }
14671
- return browser;
14702
+ const dotIndex = id.lastIndexOf(".");
14703
+ const hyphenIndex = id.lastIndexOf("-");
14704
+ const baseIdByDot = dotIndex === -1 ? void 0 : id.slice(0, dotIndex);
14705
+ const baseIdByHyphen = hyphenIndex === -1 ? void 0 : id.slice(0, hyphenIndex);
14706
+ return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
14672
14707
  }
14673
14708
  __name(defaultBrowser, "defaultBrowser");
14674
14709
 
@@ -15095,12 +15130,38 @@ var DiscoverTab = /* @__PURE__ */ __name(({
15095
15130
  setInstalling(true);
15096
15131
  let installed2 = 0;
15097
15132
  const errors = [];
15133
+ const warnings = [];
15098
15134
  for (const plugin of targets) {
15099
15135
  let ext;
15100
15136
  try {
15101
15137
  const metadata = await parseInstallSource(plugin.installSource);
15102
- ext = await extensionManager.installExtension(metadata);
15138
+ ext = await extensionManager.installExtension(
15139
+ metadata,
15140
+ void 0,
15141
+ void 0,
15142
+ process.cwd(),
15143
+ void 0,
15144
+ scope === "user" ? { scope: "user" } : { scope: "workspace", workspacePath: process.cwd() }
15145
+ );
15103
15146
  } catch (error) {
15147
+ if (isExtensionCommittedWithWarningsError(error)) {
15148
+ installed2++;
15149
+ warnings.push(
15150
+ `${plugin.name}: ${redactUrlCredentials(getErrorMessage2(error))}`
15151
+ );
15152
+ try {
15153
+ extensionManager.setExtensionScope(error.identity.name, scope);
15154
+ } catch (scopeError) {
15155
+ warnings.push(
15156
+ `${plugin.name}: ${redactUrlCredentials(getErrorMessage2(scopeError))}`
15157
+ );
15158
+ debugLogger12.error(
15159
+ "Installed extension but failed to apply scope preference:",
15160
+ scopeError
15161
+ );
15162
+ }
15163
+ continue;
15164
+ }
15104
15165
  errors.push(
15105
15166
  `${plugin.name}: ${redactUrlCredentials(getErrorMessage2(error))}`
15106
15167
  );
@@ -15108,39 +15169,11 @@ var DiscoverTab = /* @__PURE__ */ __name(({
15108
15169
  }
15109
15170
  installed2++;
15110
15171
  try {
15111
- if (scope !== "user") {
15112
- await extensionManager.disableExtension(
15113
- ext.name,
15114
- "User" /* User */
15115
- );
15116
- try {
15117
- await extensionManager.enableExtension(
15118
- ext.name,
15119
- "Workspace" /* Workspace */
15120
- );
15121
- } catch (enableError) {
15122
- try {
15123
- await extensionManager.enableExtension(
15124
- ext.name,
15125
- "User" /* User */
15126
- );
15127
- } catch (rollbackError) {
15128
- debugLogger12.error(
15129
- "Scope rollback failed after install:",
15130
- rollbackError
15131
- );
15132
- errors.push(
15133
- t(
15134
- "{{name}}: installed, but the scope rollback failed \u2014 it may be disabled at all scopes; re-enable it from the Installed tab.",
15135
- { name: plugin.name }
15136
- )
15137
- );
15138
- }
15139
- throw enableError;
15140
- }
15141
- }
15142
15172
  extensionManager.setExtensionScope(ext.name, scope);
15143
15173
  } catch (scopeError) {
15174
+ warnings.push(
15175
+ `${plugin.name}: ${redactUrlCredentials(getErrorMessage2(scopeError))}`
15176
+ );
15144
15177
  debugLogger12.error(
15145
15178
  "Installed extension but failed to apply scope preference:",
15146
15179
  scopeError
@@ -15151,10 +15184,16 @@ var DiscoverTab = /* @__PURE__ */ __name(({
15151
15184
  setSelectedKeys(/* @__PURE__ */ new Set());
15152
15185
  if (errors.length === 0) {
15153
15186
  onStatus({
15154
- type: "success",
15155
- text: t("Installed {{count}} extension(s).", {
15187
+ type: warnings.length === 0 ? "success" : "warning",
15188
+ text: warnings.length === 0 ? t("Installed {{count}} extension(s).", {
15156
15189
  count: String(installed2)
15157
- })
15190
+ }) : t(
15191
+ "Installed {{count}} extension(s) with warnings: {{detail}}",
15192
+ {
15193
+ count: String(installed2),
15194
+ detail: warnings.join("; ")
15195
+ }
15196
+ )
15158
15197
  });
15159
15198
  } else {
15160
15199
  onStatus({
@@ -15162,7 +15201,7 @@ var DiscoverTab = /* @__PURE__ */ __name(({
15162
15201
  text: t("Installed {{ok}}, failed {{fail}}: {{detail}}", {
15163
15202
  ok: String(installed2),
15164
15203
  fail: String(errors.length),
15165
- detail: errors.join("; ")
15204
+ detail: [...warnings, ...errors].join("; ")
15166
15205
  })
15167
15206
  });
15168
15207
  }
@@ -15578,6 +15617,7 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
15578
15617
  server,
15579
15618
  onViewTools,
15580
15619
  onViewResources,
15620
+ onApprove,
15581
15621
  onReconnect,
15582
15622
  onDisable,
15583
15623
  onAuthenticate,
@@ -15614,6 +15654,13 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
15614
15654
  value: "reconnect"
15615
15655
  });
15616
15656
  }
15657
+ if (awaitingApproval && onApprove) {
15658
+ result.push({
15659
+ key: "approve",
15660
+ label: t("Approve"),
15661
+ value: "approve"
15662
+ });
15663
+ }
15617
15664
  result.push({
15618
15665
  key: "toggle-disable",
15619
15666
  label: server.isDisabled ? t("Enable") : t("Disable"),
@@ -15634,7 +15681,7 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
15634
15681
  });
15635
15682
  }
15636
15683
  return result;
15637
- }, [server, onViewResources, awaitingApproval]);
15684
+ }, [server, onViewResources, onApprove, awaitingApproval]);
15638
15685
  useKeypress(
15639
15686
  (key) => {
15640
15687
  if (key.name === "escape") {
@@ -15717,6 +15764,9 @@ var ServerDetailStep = /* @__PURE__ */ __name(({
15717
15764
  case "view-resources":
15718
15765
  onViewResources?.();
15719
15766
  break;
15767
+ case "approve":
15768
+ onApprove?.();
15769
+ break;
15720
15770
  case "reconnect":
15721
15771
  onReconnect?.();
15722
15772
  break;
@@ -16732,22 +16782,34 @@ var ExtensionActionsView = /* @__PURE__ */ __name(({
16732
16782
  const name = extension.name;
16733
16783
  try {
16734
16784
  switch (action) {
16735
- case "toggle":
16785
+ case "toggle": {
16786
+ let activationResult;
16736
16787
  if (enabled) {
16737
- await manager.disableExtension(name, settingScopeFor(scope));
16788
+ activationResult = await manager.disableExtension(
16789
+ name,
16790
+ settingScopeFor(scope)
16791
+ );
16738
16792
  } else {
16739
- await manager.enableExtension(name, settingScopeFor(scope));
16793
+ activationResult = await manager.enableExtension(
16794
+ name,
16795
+ settingScopeFor(scope)
16796
+ );
16740
16797
  }
16741
16798
  setEnabled(!enabled);
16799
+ const warnings = activationResult.warnings ?? [];
16742
16800
  onStatus({
16743
- type: "success",
16744
- text: t('"{{name}}" {{state}}.', {
16801
+ type: warnings.length > 0 ? "warning" : "success",
16802
+ text: warnings.length > 0 ? t('"{{name}}" changed with warnings: {{detail}}', {
16803
+ name,
16804
+ detail: warnings.map((warning) => warning.error).join("; ")
16805
+ }) : t('"{{name}}" {{state}}.', {
16745
16806
  name,
16746
16807
  state: enabled ? t("disabled") : t("enabled")
16747
16808
  })
16748
16809
  });
16749
16810
  onReload();
16750
16811
  break;
16812
+ }
16751
16813
  case "favorite": {
16752
16814
  const now = manager.toggleFavorite(name);
16753
16815
  setIsFavorite(now);
@@ -16800,19 +16862,30 @@ var ExtensionActionsView = /* @__PURE__ */ __name(({
16800
16862
  }
16801
16863
  break;
16802
16864
  }
16803
- case "update":
16804
- await manager.updateExtension(
16865
+ case "update": {
16866
+ const result = await manager.updateExtension(
16805
16867
  extension,
16806
16868
  "update available" /* UPDATE_AVAILABLE */,
16807
16869
  () => {
16808
16870
  }
16809
16871
  );
16810
- onStatus({
16811
- type: "success",
16812
- text: t('Updated "{{name}}".', { name })
16813
- });
16872
+ if (result?.warnings?.length) {
16873
+ onStatus({
16874
+ type: "warning",
16875
+ text: t('Updated "{{name}}" with warnings: {{warnings}}.', {
16876
+ name,
16877
+ warnings: result.warnings.map((warning) => `${warning.code}: ${warning.error}`).join("; ")
16878
+ })
16879
+ });
16880
+ } else {
16881
+ onStatus({
16882
+ type: "success",
16883
+ text: t('Updated "{{name}}".', { name })
16884
+ });
16885
+ }
16814
16886
  onReload();
16815
16887
  break;
16888
+ }
16816
16889
  case "uninstall":
16817
16890
  setSub("uninstall-confirm");
16818
16891
  break;
@@ -16831,32 +16904,28 @@ var ExtensionActionsView = /* @__PURE__ */ __name(({
16831
16904
  const name = extension.name;
16832
16905
  setScopeBusy(true);
16833
16906
  try {
16834
- if (newScope === "user") {
16835
- await manager.enableExtension(name, "User" /* User */);
16836
- } else {
16837
- await manager.disableExtension(name, "User" /* User */);
16838
- try {
16839
- await manager.enableExtension(name, "Workspace" /* Workspace */);
16840
- } catch (enableError) {
16841
- try {
16842
- await manager.enableExtension(name, "User" /* User */);
16843
- } catch (rollbackError) {
16844
- throw new Error(
16845
- t(
16846
- 'Could not change scope, and the rollback also failed \u2014 "{{name}}" may be disabled at all scopes. Re-enable it from the Installed tab. ({{error}})',
16847
- { name, error: getErrorMessage2(rollbackError) }
16848
- )
16849
- );
16850
- }
16851
- throw enableError;
16852
- }
16907
+ const result = await manager.setExtensionActivationScope(
16908
+ extension.id,
16909
+ newScope === "user" ? { scope: "user" } : { scope: "workspace", workspacePath: process.cwd() }
16910
+ );
16911
+ let preferenceWarning;
16912
+ try {
16913
+ manager.setExtensionScope(name, newScope);
16914
+ } catch (error) {
16915
+ preferenceWarning = getErrorMessage2(error);
16853
16916
  }
16854
- manager.setExtensionScope(name, newScope);
16855
16917
  setScope(newScope);
16856
16918
  setEnabled(true);
16919
+ const warnings = [
16920
+ ...(result.warnings ?? []).map((warning) => warning.error),
16921
+ ...preferenceWarning ? [preferenceWarning] : []
16922
+ ];
16857
16923
  onStatus({
16858
- type: "success",
16859
- text: t('Set "{{name}}" scope to {{scope}}.', {
16924
+ type: warnings.length > 0 ? "warning" : "success",
16925
+ text: warnings.length > 0 ? t('Set "{{name}}" scope with warnings: {{detail}}', {
16926
+ name,
16927
+ detail: warnings.join("; ")
16928
+ }) : t('Set "{{name}}" scope to {{scope}}.', {
16860
16929
  name,
16861
16930
  scope: t(SCOPE_LABEL[newScope])
16862
16931
  })
@@ -16875,10 +16944,14 @@ var ExtensionActionsView = /* @__PURE__ */ __name(({
16875
16944
  if (!manager) return;
16876
16945
  setUninstallBusy(true);
16877
16946
  try {
16878
- await manager.uninstallExtension(ext.name, false);
16947
+ const result = await manager.uninstallExtension(ext.name, false);
16948
+ const warnings = result.warnings ?? [];
16879
16949
  onStatus({
16880
- type: "success",
16881
- text: t('Uninstalled "{{name}}".', { name: ext.name })
16950
+ type: warnings.length > 0 ? "warning" : "success",
16951
+ text: warnings.length > 0 ? t('Uninstalled "{{name}}" with warnings: {{detail}}', {
16952
+ name: ext.name,
16953
+ detail: warnings.map((warning) => warning.error).join("; ")
16954
+ }) : t('Uninstalled "{{name}}".', { name: ext.name })
16882
16955
  });
16883
16956
  onReload();
16884
16957
  } catch (error) {
@@ -17245,14 +17318,19 @@ var InstalledTab = /* @__PURE__ */ __name(({
17245
17318
  text: item.isActive ? t('Disabling "{{name}}"...', { name: item.name }) : t('Enabling "{{name}}"...', { name: item.name })
17246
17319
  });
17247
17320
  try {
17321
+ let result;
17248
17322
  if (item.isActive) {
17249
- await extensionManager.disableExtension(item.name, scope);
17323
+ result = await extensionManager.disableExtension(item.name, scope);
17250
17324
  } else {
17251
- await extensionManager.enableExtension(item.name, scope);
17325
+ result = await extensionManager.enableExtension(item.name, scope);
17252
17326
  }
17327
+ const warnings = result.warnings ?? [];
17253
17328
  onStatus({
17254
- type: "success",
17255
- text: t('"{{name}}" {{state}}.', {
17329
+ type: warnings.length > 0 ? "warning" : "success",
17330
+ text: warnings.length > 0 ? t('"{{name}}" changed with warnings: {{detail}}', {
17331
+ name: item.name,
17332
+ detail: warnings.map((warning) => warning.error).join("; ")
17333
+ }) : t('"{{name}}" {{state}}.', {
17256
17334
  name: item.name,
17257
17335
  state: item.isActive ? t("disabled") : t("enabled")
17258
17336
  })
@@ -17673,6 +17751,16 @@ var SourcesTab = /* @__PURE__ */ __name(({
17673
17751
  onChanged();
17674
17752
  goToList();
17675
17753
  } catch (error) {
17754
+ if (isExtensionCommittedWithWarningsError(error)) {
17755
+ onStatus({
17756
+ type: "warning",
17757
+ text: redactUrlCredentials(getErrorMessage2(error))
17758
+ });
17759
+ await load();
17760
+ onChanged();
17761
+ goToList();
17762
+ return;
17763
+ }
17676
17764
  onStatus({
17677
17765
  type: "error",
17678
17766
  text: redactUrlCredentials(getErrorMessage2(error))
@@ -18204,7 +18292,7 @@ function ExtensionsManagerDialog({
18204
18292
  status && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)(
18205
18293
  Text,
18206
18294
  {
18207
- color: status.type === "error" ? theme.status.error : status.type === "success" ? theme.status.success : theme.text.secondary,
18295
+ color: status.type === "error" ? theme.status.error : status.type === "warning" ? theme.status.warning : status.type === "success" ? theme.status.success : theme.text.secondary,
18208
18296
  children: status.text
18209
18297
  }
18210
18298
  ),
@@ -18691,6 +18779,33 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
18691
18779
  setIsLoading(false);
18692
18780
  }
18693
18781
  }, [config, selectedServer, reloadServers]);
18782
+ const handleApprove = (0, import_react65.useCallback)(async () => {
18783
+ if (!config || !selectedServer) return;
18784
+ try {
18785
+ setIsLoading(true);
18786
+ const approvals = loadMcpApprovals();
18787
+ const root = config.getWorkingDir();
18788
+ await approvals.setState(
18789
+ root,
18790
+ selectedServer.name,
18791
+ selectedServer.config,
18792
+ "approved"
18793
+ );
18794
+ config.approveMcpServerForSession(selectedServer.name);
18795
+ const toolRegistry = config.getToolRegistry();
18796
+ if (toolRegistry) {
18797
+ await toolRegistry.discoverToolsForServer(selectedServer.name);
18798
+ }
18799
+ await reloadServers();
18800
+ } catch (error) {
18801
+ debugLogger17.error(
18802
+ `Error approving server '${selectedServer.name}':`,
18803
+ error
18804
+ );
18805
+ } finally {
18806
+ setIsLoading(false);
18807
+ }
18808
+ }, [config, selectedServer, reloadServers]);
18694
18809
  const handleEnableServer = (0, import_react65.useCallback)(async () => {
18695
18810
  if (!config || !selectedServer) return;
18696
18811
  try {
@@ -18931,6 +19046,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
18931
19046
  server: selectedServer,
18932
19047
  onViewTools: handleViewTools,
18933
19048
  onViewResources: handleViewResources,
19049
+ onApprove: handleApprove,
18934
19050
  onReconnect: handleReconnect,
18935
19051
  onDisable: handleDisable,
18936
19052
  onAuthenticate: handleAuthenticate,
@@ -19003,6 +19119,7 @@ var MCPManagementDialog = /* @__PURE__ */ __name(({
19003
19119
  handleViewResources,
19004
19120
  handleReconnect,
19005
19121
  handleDisable,
19122
+ handleApprove,
19006
19123
  handleAuthenticate,
19007
19124
  handleClearAuth,
19008
19125
  handleNavigateBack,
@@ -20919,7 +21036,7 @@ function FileRow({
20919
21036
  }) {
20920
21037
  const pointer = selected ? "\u203A " : " ";
20921
21038
  const tag = file.isDeleted ? t(" (deleted)") : file.isUntracked ? t(" (untracked)") : file.oversized ? t(" (oversized \u2014 diff omitted)") : file.isNewFile ? t(" (new)") : file.truncated ? t(" (truncated)") : "";
20922
- const path11 = truncatePathStart(file.displayPath, maxPathChars);
21039
+ const path12 = truncatePathStart(file.displayPath, maxPathChars);
20923
21040
  return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(Box_default, { flexDirection: "row", children: [
20924
21041
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)(
20925
21042
  Text,
@@ -20928,7 +21045,7 @@ function FileRow({
20928
21045
  bold: selected,
20929
21046
  children: [
20930
21047
  pointer,
20931
- path11
21048
+ path12
20932
21049
  ]
20933
21050
  }
20934
21051
  ),
@@ -20993,11 +21110,11 @@ function FileDetail({
20993
21110
  ] });
20994
21111
  }
20995
21112
  __name(FileDetail, "FileDetail");
20996
- function truncatePathStart(path11, maxChars) {
21113
+ function truncatePathStart(path12, maxChars) {
20997
21114
  if (maxChars <= 0) return "";
20998
- if (path11.length <= maxChars) return path11;
20999
- if (maxChars <= 1) return path11.slice(-maxChars);
21000
- return "\u2026" + path11.slice(-(maxChars - 1));
21115
+ if (path12.length <= maxChars) return path12;
21116
+ if (maxChars <= 1) return path12.slice(-maxChars);
21117
+ return "\u2026" + path12.slice(-(maxChars - 1));
21001
21118
  }
21002
21119
  __name(truncatePathStart, "truncatePathStart");
21003
21120
  function useVisibleWindow(total, selectedIndex, windowSize) {
@@ -21014,18 +21131,18 @@ __name(useVisibleWindow, "useVisibleWindow");
21014
21131
  function currentToFiles(result, hunks) {
21015
21132
  if (!result) return [];
21016
21133
  const out = [];
21017
- for (const [path11, s] of result.perFileStats) {
21018
- out.push(perFileToUnified(path11, s, hunks));
21134
+ for (const [path12, s] of result.perFileStats) {
21135
+ out.push(perFileToUnified(path12, s, hunks));
21019
21136
  }
21020
21137
  out.sort((a, b) => a.path.localeCompare(b.path));
21021
21138
  return out;
21022
21139
  }
21023
21140
  __name(currentToFiles, "currentToFiles");
21024
- function perFileToUnified(path11, s, hunks) {
21025
- const fileHunks = hunks.get(path11);
21141
+ function perFileToUnified(path12, s, hunks) {
21142
+ const fileHunks = hunks.get(path12);
21026
21143
  return {
21027
- path: path11,
21028
- displayPath: sanitizeFilenameForDisplay(path11),
21144
+ path: path12,
21145
+ displayPath: sanitizeFilenameForDisplay(path12),
21029
21146
  added: s.added ?? 0,
21030
21147
  removed: s.isUntracked ? 0 : s.removed ?? 0,
21031
21148
  isBinary: !!s.isBinary,
@@ -22406,12 +22523,7 @@ var WorkflowSaveOverlay = /* @__PURE__ */ __name(({
22406
22523
 
22407
22524
  // packages/cli/src/ui/components/background-view/BackgroundTasksDialog.tsx
22408
22525
  var import_jsx_runtime99 = __toESM(require_jsx_runtime(), 1);
22409
- var TOOL_DISPLAY_BY_NAME = Object.fromEntries(
22410
- Object.keys(ToolNames).map((key) => [
22411
- ToolNames[key],
22412
- ToolDisplayNames[key]
22413
- ])
22414
- );
22526
+ var MAX_LIVE_LABEL_CHARS = 4096;
22415
22527
  function formatActivityLabel(name, description) {
22416
22528
  const display = localizeToolDisplayName(TOOL_DISPLAY_BY_NAME[name] ?? name);
22417
22529
  const singleLineDesc = description ? description.replace(/\s*\n\s*/g, " ").trim() : "";
@@ -22552,7 +22664,7 @@ function elapsedFor(entry) {
22552
22664
  __name(elapsedFor, "elapsedFor");
22553
22665
  function truncateToWidth(text, maxWidth) {
22554
22666
  if (maxWidth <= 0) return "";
22555
- if (stringWidth(text) <= maxWidth) return text;
22667
+ if (getCachedStringWidth(text) <= maxWidth) return text;
22556
22668
  const ellipsis = "\u2026";
22557
22669
  const ellipsisWidth = stringWidth(ellipsis);
22558
22670
  const target = Math.max(0, maxWidth - ellipsisWidth);
@@ -22785,7 +22897,9 @@ var AgentDetailBody = /* @__PURE__ */ __name(({ entry, maxHeight, maxWidth }) =>
22785
22897
  const childAgents = registry.getAll().filter((task) => task.parentAgentId === entry.agentId).sort(compareActiveThenTerminal);
22786
22898
  const visibleChildAgents = childAgents.slice(0, 5);
22787
22899
  const hiddenChildCount = childAgents.length - visibleChildAgents.length;
22788
- const activities = (entry.recentActivities ?? []).slice(-5);
22900
+ const activities = (entry.recentActivities ?? []).slice(
22901
+ -MAX_RECENT_ACTIVITIES
22902
+ );
22789
22903
  const blockedReason = entry.resumeBlockedReason;
22790
22904
  const hasError = Boolean(entry.error);
22791
22905
  const hasBlockedReason = Boolean(blockedReason);
@@ -22796,6 +22910,31 @@ var AgentDetailBody = /* @__PURE__ */ __name(({ entry, maxHeight, maxWidth }) =>
22796
22910
  const lastIdx = visiblePromptLines.length - 1;
22797
22911
  visiblePromptLines[lastIdx] = `${visiblePromptLines[lastIdx].trimEnd()}\u2026`;
22798
22912
  }
22913
+ const liveActivity = activities.length > 0 ? activities[activities.length - 1] : void 0;
22914
+ const historyActivities = activities.slice(0, -1);
22915
+ const liveFullLabel = liveActivity ? sanitizeMultilineForDisplay(
22916
+ formatActivityLabel(liveActivity.name, liveActivity.description)
22917
+ ) : "";
22918
+ const liveLabel = liveFullLabel.length > MAX_LIVE_LABEL_CHARS ? `${liveFullLabel.slice(0, MAX_LIVE_LABEL_CHARS)}\u2026` : liveFullLabel;
22919
+ const wrappedRows = /* @__PURE__ */ __name((text) => maxWidth > 0 ? Math.max(1, Math.ceil(getCachedStringWidth(text) / maxWidth)) : 1, "wrappedRows");
22920
+ let reservedLines = 2;
22921
+ if (parentLine !== void 0) reservedLines += 3;
22922
+ if (visibleChildAgents.length > 0) {
22923
+ reservedLines += 2 + visibleChildAgents.length + (hiddenChildCount > 0 ? 1 : 0);
22924
+ }
22925
+ if (liveActivity) reservedLines += 2 + wrappedRows(`> ${liveLabel}`);
22926
+ if (entry.outputFile) {
22927
+ reservedLines += 2 + wrappedRows(` ${entry.outputFile}`);
22928
+ }
22929
+ if (visiblePromptLines.length > 0) {
22930
+ reservedLines += 2 + visiblePromptLines.length;
22931
+ }
22932
+ if (hasBlockedReason) reservedLines += 3;
22933
+ if (hasError) reservedLines += 3;
22934
+ const historyBudget = Math.max(0, maxHeight - reservedLines);
22935
+ const shownHistory = historyActivities.slice(
22936
+ Math.max(0, historyActivities.length - historyBudget)
22937
+ );
22799
22938
  return /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
22800
22939
  MaxSizedBox,
22801
22940
  {
@@ -22833,24 +22972,33 @@ var AgentDetailBody = /* @__PURE__ */ __name(({ entry, maxHeight, maxWidth }) =>
22833
22972
  activities.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_react76.Fragment, { children: [
22834
22973
  /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, {}),
22835
22974
  /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { bold: true, dimColor: true, children: t("Progress") }) }),
22836
- activities.map((a, i) => {
22837
- const isLast = i === activities.length - 1;
22838
- const prefix = isLast ? "> " : " ";
22975
+ shownHistory.map((a, i) => {
22976
+ const prefix = " ";
22977
+ const fullLabel = sanitizeMultilineForDisplay(
22978
+ formatActivityLabel(a.name, a.description)
22979
+ );
22839
22980
  const label = truncateToWidth(
22840
- escapeAnsiCtrlCodes(formatActivityLabel(a.name, a.description)),
22841
- Math.max(0, maxWidth - stringWidth(prefix))
22981
+ fullLabel,
22982
+ Math.max(0, maxWidth - getCachedStringWidth(prefix))
22842
22983
  );
22843
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(
22844
- Text,
22845
- {
22846
- color: isLast ? theme.text.primary : theme.text.secondary,
22847
- children: [
22848
- prefix,
22849
- label
22850
- ]
22851
- }
22852
- ) }, `${a.at}-${i}`);
22853
- })
22984
+ return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(Text, { color: theme.text.secondary, children: [
22985
+ prefix,
22986
+ label
22987
+ ] }) }, `${a.at}-${i}`);
22988
+ }),
22989
+ liveActivity && // The live row is the one the user opens this view to inspect
22990
+ // ("is this command stuck or still reasonable?"), so it renders
22991
+ // in full and wraps; the height budget above keeps it and the
22992
+ // Transcript pointer on-screen by trimming older history first.
22993
+ // Prefix and label must be ONE string child: MaxSizedBox's wrap
22994
+ // layout drops the prefix's trailing space when they arrive as
22995
+ // separate segments (`> Shell` → `>Shell`).
22996
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { color: theme.text.primary, children: `> ${liveLabel}` }) }, "live")
22997
+ ] }),
22998
+ entry.outputFile && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_react76.Fragment, { children: [
22999
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, {}),
23000
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { bold: true, dimColor: true, children: t("Transcript") }) }),
23001
+ /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Text, { color: theme.text.secondary, wrap: "wrap", children: ` ${escapeAnsiCtrlCodes(entry.outputFile)}` }) })
22854
23002
  ] }),
22855
23003
  visiblePromptLines.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime99.jsxs)(import_react76.Fragment, { children: [
22856
23004
  /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(Box_default, {}),
@@ -23931,7 +24079,7 @@ var LoadingIndicator = /* @__PURE__ */ __name(({
23931
24079
  );
23932
24080
  const showTokens = !isNarrow && outputTokens > 0;
23933
24081
  const tokenArrow = isReceivingContent ? "\u2193" : "\u2191";
23934
- const timeStr = elapsedTime < 60 ? `${elapsedTime.toFixed(1)}s` : formatDuration(elapsedTime * 1e3);
24082
+ const timeStr = elapsedTime < 60 ? `${Math.floor(Math.max(0, elapsedTime))}s` : formatDuration(elapsedTime * 1e3);
23935
24083
  const tokenStr = showTokens ? ` \xB7 ${tokenArrow} ${formatTokenCount(outputTokens)} tokens` : "";
23936
24084
  const tokenRateStr = showTokens && showResponseTokensPerSecond && isReceivingContent && elapsedTime > 0 ? ` \xB7 ${formatTokensPerSecond(outputTokensSinceTimerStart / elapsedTime)}` : "";
23937
24085
  const cancelAndTimerContent = streamingState !== "waiting_for_confirmation" /* WaitingForConfirmation */ ? t("({{time}}{{tokens}} \xB7 esc to cancel)", {
@@ -25851,8 +25999,8 @@ function buildSegmentsForVisualSlice(tokens, sliceStart, sliceEnd) {
25851
25999
  __name(buildSegmentsForVisualSlice, "buildSegmentsForVisualSlice");
25852
26000
 
25853
26001
  // packages/cli/src/ui/components/InputPrompt.tsx
25854
- import * as path8 from "node:path";
25855
- import * as fs12 from "node:fs/promises";
26002
+ import * as path9 from "node:path";
26003
+ import * as fs13 from "node:fs/promises";
25856
26004
 
25857
26005
  // packages/cli/src/ui/contexts/ShellFocusContext.tsx
25858
26006
  init_esbuild_shims();
@@ -27762,6 +27910,62 @@ function VoiceIndicator({
27762
27910
  }
27763
27911
  __name(VoiceIndicator, "VoiceIndicator");
27764
27912
 
27913
+ // packages/cli/src/services/prompt-stash.ts
27914
+ init_esbuild_shims();
27915
+ import * as fs12 from "node:fs";
27916
+ import * as path8 from "node:path";
27917
+ var PROMPT_STASH_FILE = "prompt-stash.json";
27918
+ function getPromptStashPath(targetDir) {
27919
+ return path8.join(new Storage(targetDir).getProjectDir(), PROMPT_STASH_FILE);
27920
+ }
27921
+ __name(getPromptStashPath, "getPromptStashPath");
27922
+ function savePromptStash(targetDir, text) {
27923
+ try {
27924
+ const filePath = getPromptStashPath(targetDir);
27925
+ fs12.mkdirSync(path8.dirname(filePath), { recursive: true, mode: 448 });
27926
+ const data = { version: 1, text };
27927
+ atomicWriteFileSync(filePath, JSON.stringify(data), {
27928
+ mode: 384,
27929
+ forceMode: true,
27930
+ noFollow: true
27931
+ });
27932
+ return true;
27933
+ } catch {
27934
+ return false;
27935
+ }
27936
+ }
27937
+ __name(savePromptStash, "savePromptStash");
27938
+ function loadPromptStash(targetDir) {
27939
+ try {
27940
+ const raw = fs12.readFileSync(getPromptStashPath(targetDir), "utf8");
27941
+ const parsed = JSON.parse(raw);
27942
+ if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) && parsed.version === 1 && typeof parsed.text === "string") {
27943
+ return parsed.text;
27944
+ }
27945
+ } catch {
27946
+ }
27947
+ return null;
27948
+ }
27949
+ __name(loadPromptStash, "loadPromptStash");
27950
+ function restorePromptStash(targetDir, currentText, onRestore) {
27951
+ const stashedPrompt = loadPromptStash(targetDir);
27952
+ if (stashedPrompt === null || currentText.length > 0) {
27953
+ return false;
27954
+ }
27955
+ onRestore(stashedPrompt);
27956
+ return true;
27957
+ }
27958
+ __name(restorePromptStash, "restorePromptStash");
27959
+ function clearPromptStash(targetDir) {
27960
+ try {
27961
+ fs12.unlinkSync(getPromptStashPath(targetDir));
27962
+ return true;
27963
+ } catch (error) {
27964
+ return error.code === "ENOENT";
27965
+ }
27966
+ }
27967
+ __name(clearPromptStash, "clearPromptStash");
27968
+
27765
27969
  // packages/cli/src/ui/components/InputPrompt.tsx
27766
27970
  var import_jsx_runtime106 = __toESM(require_jsx_runtime(), 1);
27767
27971
  var PASTED_IMAGE_EXTENSIONS = /\.(png|jpe?g|gif|webp|bmp)$/i;
@@ -27781,6 +27985,23 @@ function classifyPastedImagePaths(pasted) {
27781
27985
  }
27782
27986
  __name(classifyPastedImagePaths, "classifyPastedImagePaths");
27783
27987
  var debugLogger29 = createDebugLogger("INPUT_PROMPT");
27988
+ function expandPendingPastePlaceholders(value, pendingPastes) {
27989
+ if (pendingPastes.size === 0) {
27990
+ return value;
27991
+ }
27992
+ const placeholders = Array.from(pendingPastes.keys()).sort(
27993
+ (a, b) => b.length - a.length
27994
+ );
27995
+ const escapedPlaceholders = placeholders.map(
27996
+ (placeholderValue) => placeholderValue.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
27997
+ );
27998
+ const placeholderRegex = new RegExp(escapedPlaceholders.join("|"), "g");
27999
+ return value.replace(
28000
+ placeholderRegex,
28001
+ (matchedPlaceholder) => pendingPastes.get(matchedPlaceholder) ?? matchedPlaceholder
28002
+ );
28003
+ }
28004
+ __name(expandPendingPastePlaceholders, "expandPendingPastePlaceholders");
27784
28005
  var LARGE_PASTE_CHAR_THRESHOLD = 1e3;
27785
28006
  var LARGE_PASTE_LINE_THRESHOLD = 10;
27786
28007
  var InputPrompt = /* @__PURE__ */ __name(({
@@ -27806,7 +28027,8 @@ var InputPrompt = /* @__PURE__ */ __name(({
27806
28027
  vimHandleInput,
27807
28028
  isEmbeddedShellFocused,
27808
28029
  promptSuggestion,
27809
- onPromptSuggestionDismiss
28030
+ onPromptSuggestionDismiss,
28031
+ clipboardUnavailableShownRef: sessionClipboardUnavailableShownRef
27810
28032
  }) => {
27811
28033
  const isShellFocused = useShellFocusState();
27812
28034
  const uiState = useUIState();
@@ -27854,6 +28076,8 @@ var InputPrompt = /* @__PURE__ */ __name(({
27854
28076
  const [attachments, setAttachments] = (0, import_react95.useState)([]);
27855
28077
  const [isAttachmentMode, setIsAttachmentMode] = (0, import_react95.useState)(false);
27856
28078
  const [selectedAttachmentIndex, setSelectedAttachmentIndex] = (0, import_react95.useState)(-1);
28079
+ const localClipboardUnavailableShownRef = (0, import_react95.useRef)(false);
28080
+ const clipboardUnavailableShownRef = sessionClipboardUnavailableShownRef ?? localClipboardUnavailableShownRef;
27857
28081
  const [pendingPastes, setPendingPastes] = (0, import_react95.useState)(
27858
28082
  /* @__PURE__ */ new Map()
27859
28083
  );
@@ -28025,6 +28249,7 @@ var InputPrompt = /* @__PURE__ */ __name(({
28025
28249
  const resetReverseSearchCompletionState = reverseSearchCompletion.resetCompletionState;
28026
28250
  const resetCommandSearchCompletionState = commandSearchCompletion.resetCompletionState;
28027
28251
  const showCursor = focus && isShellFocused && !isEmbeddedShellFocused && !agentTabBarFocused;
28252
+ const targetDir = config.getTargetDir();
28028
28253
  const resetEscapeState = (0, import_react95.useCallback)(() => {
28029
28254
  if (escapeTimerRef.current) {
28030
28255
  clearTimeout(escapeTimerRef.current);
@@ -28067,17 +28292,7 @@ var InputPrompt = /* @__PURE__ */ __name(({
28067
28292
  exportCompletion.reset();
28068
28293
  let finalValue = submittedValue;
28069
28294
  if (pendingPastes.size > 0) {
28070
- const placeholders = Array.from(pendingPastes.keys()).sort(
28071
- (a, b) => b.length - a.length
28072
- );
28073
- const escapedPlaceholders = placeholders.map(
28074
- (placeholderValue) => placeholderValue.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")
28075
- );
28076
- const placeholderRegex = new RegExp(escapedPlaceholders.join("|"), "g");
28077
- finalValue = finalValue.replace(
28078
- placeholderRegex,
28079
- (matchedPlaceholder) => pendingPastes.get(matchedPlaceholder) ?? matchedPlaceholder
28080
- );
28295
+ finalValue = expandPendingPastePlaceholders(finalValue, pendingPastes);
28081
28296
  setPendingPastes(/* @__PURE__ */ new Map());
28082
28297
  activePlaceholderIds.current.clear();
28083
28298
  }
@@ -28085,12 +28300,13 @@ var InputPrompt = /* @__PURE__ */ __name(({
28085
28300
  shellHistory.addCommandToHistory(finalValue);
28086
28301
  }
28087
28302
  if (attachments.length > 0) {
28088
- const attachmentRefs = attachments.map((att) => `@${path8.relative(config.getTargetDir(), att.path)}`).join(" ");
28303
+ const attachmentRefs = attachments.map((att) => `@${path9.relative(config.getTargetDir(), att.path)}`).join(" ");
28089
28304
  finalValue = `${attachmentRefs}
28090
28305
 
28091
28306
  ${finalValue.trim()}`;
28092
28307
  }
28093
28308
  buffer.setText("");
28309
+ clearPromptStash(targetDir);
28094
28310
  onSubmit(finalValue);
28095
28311
  resetHistoryNavRef.current();
28096
28312
  followup.dismiss();
@@ -28111,6 +28327,7 @@ ${finalValue.trim()}`;
28111
28327
  resetReverseSearchCompletionState,
28112
28328
  attachments,
28113
28329
  config,
28330
+ targetDir,
28114
28331
  pendingPastes,
28115
28332
  followup,
28116
28333
  onPromptSuggestionDismiss
@@ -28160,47 +28377,67 @@ ${finalValue.trim()}`;
28160
28377
  resetReverseSearchCompletionState,
28161
28378
  resetCommandSearchCompletionState
28162
28379
  ]);
28163
- const handleClipboardImage = (0, import_react95.useCallback)(async (validated = false) => {
28164
- try {
28165
- const hasImage = validated || await clipboardHasImage();
28166
- if (hasImage) {
28167
- const imagePath = await saveClipboardImage(Storage.getGlobalTempDir());
28168
- if (imagePath) {
28169
- cleanupOldClipboardImages(Storage.getGlobalTempDir()).catch(() => {
28170
- });
28171
- const filename = path8.basename(imagePath);
28172
- const newAttachment = {
28173
- id: String(Date.now()),
28174
- path: imagePath,
28175
- filename
28176
- };
28177
- setAttachments((prev) => [...prev, newAttachment]);
28380
+ const reportClipboardUnavailable = (0, import_react95.useCallback)(() => {
28381
+ if (clipboardUnavailableShownRef.current) {
28382
+ return;
28383
+ }
28384
+ clipboardUnavailableShownRef.current = true;
28385
+ uiState.historyManager?.addItem(
28386
+ {
28387
+ type: "error",
28388
+ text: t(
28389
+ "Clipboard image paste is unavailable because the native clipboard module could not be loaded. Reinstall Qwen Code or use the npm installation method."
28390
+ )
28391
+ },
28392
+ Date.now()
28393
+ );
28394
+ }, [clipboardUnavailableShownRef, uiState.historyManager]);
28395
+ const handleClipboardImage = (0, import_react95.useCallback)(
28396
+ async (validated = false) => {
28397
+ try {
28398
+ const hasImage = validated || await clipboardHasImage(reportClipboardUnavailable);
28399
+ if (hasImage) {
28400
+ const imagePath = await saveClipboardImage(
28401
+ Storage.getGlobalTempDir()
28402
+ );
28403
+ if (imagePath) {
28404
+ cleanupOldClipboardImages(Storage.getGlobalTempDir()).catch(() => {
28405
+ });
28406
+ const filename = path9.basename(imagePath);
28407
+ const newAttachment = {
28408
+ id: String(Date.now()),
28409
+ path: imagePath,
28410
+ filename
28411
+ };
28412
+ setAttachments((prev) => [...prev, newAttachment]);
28413
+ }
28178
28414
  }
28415
+ } catch (error) {
28416
+ debugLogger29.error("Error handling clipboard image:", error);
28179
28417
  }
28180
- } catch (error) {
28181
- debugLogger29.error("Error handling clipboard image:", error);
28182
- }
28183
- }, []);
28418
+ },
28419
+ [reportClipboardUnavailable]
28420
+ );
28184
28421
  const promotePastedImagePaths = (0, import_react95.useCallback)(
28185
28422
  async (imagePaths, originalPasted) => {
28186
28423
  const cwd3 = config.getTargetDir();
28187
- const clipboardDir = path8.join(Storage.getGlobalTempDir(), "clipboard");
28424
+ const clipboardDir = path9.join(Storage.getGlobalTempDir(), "clipboard");
28188
28425
  const attachments2 = [];
28189
28426
  for (const imagePath of imagePaths) {
28190
- const sourcePath = path8.isAbsolute(imagePath) ? imagePath : path8.resolve(cwd3, imagePath);
28427
+ const sourcePath = path9.isAbsolute(imagePath) ? imagePath : path9.resolve(cwd3, imagePath);
28191
28428
  try {
28192
- const stats = await fs12.stat(sourcePath);
28429
+ const stats = await fs13.stat(sourcePath);
28193
28430
  if (!stats.isFile()) continue;
28194
- await fs12.mkdir(clipboardDir, { recursive: true });
28195
- const destPath = path8.join(
28431
+ await fs13.mkdir(clipboardDir, { recursive: true });
28432
+ const destPath = path9.join(
28196
28433
  clipboardDir,
28197
- `clipboard-${Date.now()}-${attachments2.length}${path8.extname(sourcePath)}`
28434
+ `clipboard-${Date.now()}-${attachments2.length}${path9.extname(sourcePath)}`
28198
28435
  );
28199
- await fs12.copyFile(sourcePath, destPath);
28436
+ await fs13.copyFile(sourcePath, destPath);
28200
28437
  attachments2.push({
28201
28438
  id: `${Date.now()}-${attachments2.length}`,
28202
28439
  path: destPath,
28203
- filename: path8.basename(destPath)
28440
+ filename: path9.basename(destPath)
28204
28441
  });
28205
28442
  } catch {
28206
28443
  }
@@ -28342,6 +28579,9 @@ ${finalValue.trim()}`;
28342
28579
  const charCount = [...pasted].length;
28343
28580
  const lineCount = pasted.split("\n").length;
28344
28581
  const pastedImagePaths = classifyPastedImagePaths(pasted);
28582
+ if (key.clipboardImageUnavailable) {
28583
+ reportClipboardUnavailable();
28584
+ }
28345
28585
  if (key.pasteImage) {
28346
28586
  handleClipboardImage(true);
28347
28587
  } else if (pastedImagePaths.allImages && pastedImagePaths.imagePaths.length > 0) {
@@ -28359,6 +28599,21 @@ ${finalValue.trim()}`;
28359
28599
  }
28360
28600
  return true;
28361
28601
  }
28602
+ if (keyMatchers["showMoreLines" /* SHOW_MORE_LINES */](key) && buffer.text.length > 0) {
28603
+ const textToStash = expandPendingPastePlaceholders(
28604
+ buffer.text,
28605
+ pendingPastes
28606
+ );
28607
+ const saved = savePromptStash(targetDir, textToStash);
28608
+ uiState.historyManager?.addItem(
28609
+ {
28610
+ type: saved ? "info" : "error",
28611
+ text: saved ? t("Prompt stashed. It will be restored next time.") : t("Failed to stash prompt.")
28612
+ },
28613
+ Date.now()
28614
+ );
28615
+ return true;
28616
+ }
28362
28617
  if (vimHandleInput && vimHandleInput(key)) {
28363
28618
  return true;
28364
28619
  }
@@ -28799,6 +29054,7 @@ ${currentText}`);
28799
29054
  shellHistory,
28800
29055
  reverseSearchCompletion,
28801
29056
  handleClipboardImage,
29057
+ reportClipboardUnavailable,
28802
29058
  promotePastedImagePaths,
28803
29059
  resetCompletionState,
28804
29060
  dismissCompletion,
@@ -28847,7 +29103,8 @@ ${currentText}`);
28847
29103
  exportCompletion,
28848
29104
  isHistoryRestoredText,
28849
29105
  showCompletionSuggestions,
28850
- voiceInput
29106
+ voiceInput,
29107
+ targetDir
28851
29108
  ]
28852
29109
  );
28853
29110
  const renderLineWithHighlighting = (0, import_react95.useCallback)(
@@ -29165,7 +29422,7 @@ var AutoAcceptIndicator = /* @__PURE__ */ __name(({
29165
29422
  subText = cycleText;
29166
29423
  break;
29167
29424
  case "auto" /* AUTO */:
29168
- textContent = t("auto mode (classifier-evaluated)");
29425
+ textContent = t("Auto mode");
29169
29426
  subText = cycleText;
29170
29427
  break;
29171
29428
  case "yolo" /* YOLO */:
@@ -30182,6 +30439,7 @@ var Composer = /* @__PURE__ */ __name(() => {
30182
30439
  setShowShortcuts((prev) => !prev);
30183
30440
  }, []);
30184
30441
  const [showSuggestions, setShowSuggestions] = (0, import_react103.useState)(false);
30442
+ const clipboardUnavailableShownRef = (0, import_react103.useRef)(false);
30185
30443
  const handleTabConsumerChange = (0, import_react103.useCallback)(
30186
30444
  (active) => {
30187
30445
  uiActions.onTabConsumerChange(active);
@@ -30236,7 +30494,8 @@ var Composer = /* @__PURE__ */ __name(() => {
30236
30494
  isEmbeddedShellFocused: uiState.embeddedShellFocused,
30237
30495
  placeholder: vimEnabled ? " " + t("Press 'i' for INSERT mode and 'Esc' for NORMAL mode.") : " " + t("Type your message or @path/to/file"),
30238
30496
  promptSuggestion: uiState.promptSuggestion,
30239
- onPromptSuggestionDismiss: uiState.abortPromptSuggestion
30497
+ onPromptSuggestionDismiss: uiState.abortPromptSuggestion,
30498
+ clipboardUnavailableShownRef
30240
30499
  }
30241
30500
  ),
30242
30501
  uiState.isInputActive && !showSuggestions && (showShortcuts ? /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(KeyboardShortcuts, {}) : !isScreenReaderEnabled && /* @__PURE__ */ (0, import_jsx_runtime117.jsx)(Footer, {}))
@@ -31374,17 +31633,11 @@ function statusIcon(entry) {
31374
31633
  }
31375
31634
  }
31376
31635
  __name(statusIcon, "statusIcon");
31377
- var TOOL_DISPLAY_BY_NAME2 = Object.fromEntries(
31378
- Object.keys(ToolNames).map((key) => [
31379
- ToolNames[key],
31380
- ToolDisplayNames[key]
31381
- ])
31382
- );
31383
31636
  function activityLabel(entry) {
31384
31637
  const last = entry.recentActivities?.at(-1);
31385
31638
  if (!last) return "";
31386
31639
  const display = localizeToolDisplayName(
31387
- TOOL_DISPLAY_BY_NAME2[last.name] ?? last.name
31640
+ TOOL_DISPLAY_BY_NAME[last.name] ?? last.name
31388
31641
  );
31389
31642
  const desc = last.description?.replace(/\s*\n\s*/g, " ").trim();
31390
31643
  return desc ? `${display} ${desc}` : display;
@@ -31523,8 +31776,8 @@ var LiveAgentPanelBody = /* @__PURE__ */ __name(({ snapshots, now, maxRows, widt
31523
31776
  }, "LiveAgentPanelBody");
31524
31777
  var AgentRow = /* @__PURE__ */ __name(({ entry, now, selected = false, tree }) => {
31525
31778
  const { glyph, color } = statusIcon(entry);
31526
- const label = escapeAnsiCtrlCodes(descriptionWithoutPrefix(entry));
31527
- const activity = escapeAnsiCtrlCodes(activityLabel(entry));
31779
+ const label = sanitizeMultilineForDisplay(descriptionWithoutPrefix(entry));
31780
+ const activity = sanitizeMultilineForDisplay(activityLabel(entry));
31528
31781
  const elapsed = elapsedLabel(entry, now);
31529
31782
  const showType = entry.subagentType !== void 0 && entry.subagentType !== DEFAULT_SUBAGENT_TYPE;
31530
31783
  const safeSubagentType = showType ? escapeAnsiCtrlCodes(entry.subagentType ?? "") : "";
@@ -31629,7 +31882,7 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
31629
31882
  }, "DefaultAppLayout");
31630
31883
 
31631
31884
  // packages/cli/src/ui/App.tsx
31632
- import fs13 from "node:fs";
31885
+ import fs14 from "node:fs";
31633
31886
  var import_jsx_runtime129 = __toESM(require_jsx_runtime(), 1);
31634
31887
  var App = /* @__PURE__ */ __name(() => {
31635
31888
  const uiState = useUIState();
@@ -31646,13 +31899,13 @@ var App = /* @__PURE__ */ __name(() => {
31646
31899
  corruptedPath: settings.corruptedPath,
31647
31900
  wasRecovered: settings.wasRecovered,
31648
31901
  onExit: () => {
31649
- if (settings.corruptedPath && fs13.existsSync(settings.corruptedPath)) {
31902
+ if (settings.corruptedPath && fs14.existsSync(settings.corruptedPath)) {
31650
31903
  try {
31651
31904
  const settingsPath = settings.corruptedPath.slice(
31652
31905
  0,
31653
31906
  -CORRUPTED_SUFFIX.length
31654
31907
  );
31655
- fs13.copyFileSync(settings.corruptedPath, settingsPath);
31908
+ fs14.copyFileSync(settings.corruptedPath, settingsPath);
31656
31909
  } catch (e) {
31657
31910
  writeStderrLine(
31658
31911
  `Failed to restore corrupted file: ${e instanceof Error ? e.message : String(e)}`
@@ -31661,7 +31914,7 @@ var App = /* @__PURE__ */ __name(() => {
31661
31914
  return;
31662
31915
  }
31663
31916
  try {
31664
- fs13.unlinkSync(settings.corruptedPath);
31917
+ fs14.unlinkSync(settings.corruptedPath);
31665
31918
  } catch (e) {
31666
31919
  writeStderrLine(
31667
31920
  `Settings restored, but could not remove ${settings.corruptedPath}: ${e instanceof Error ? e.message : String(e)}`
@@ -31671,9 +31924,9 @@ var App = /* @__PURE__ */ __name(() => {
31671
31924
  process.exit(1);
31672
31925
  },
31673
31926
  onContinue: () => {
31674
- if (settings.corruptedPath && fs13.existsSync(settings.corruptedPath)) {
31927
+ if (settings.corruptedPath && fs14.existsSync(settings.corruptedPath)) {
31675
31928
  try {
31676
- fs13.unlinkSync(settings.corruptedPath);
31929
+ fs14.unlinkSync(settings.corruptedPath);
31677
31930
  } catch (e) {
31678
31931
  writeStderrLine(
31679
31932
  `Could not remove ${settings.corruptedPath}: ${e instanceof Error ? e.message : String(e)}`
@@ -31876,7 +32129,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
31876
32129
  // packages/cli/src/ui/hooks/useFeedbackDialog.ts
31877
32130
  init_esbuild_shims();
31878
32131
  var import_react116 = __toESM(require_react(), 1);
31879
- import * as fs14 from "node:fs";
32132
+ import * as fs15 from "node:fs";
31880
32133
  var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
31881
32134
  var FEEDBACK_SHOW_PROBABILITY = 0.25;
31882
32135
  var MIN_TOOL_CALLS = 10;
@@ -31887,8 +32140,8 @@ var lastMessageIsAIResponse = /* @__PURE__ */ __name((history) => history.length
31887
32140
  var getFeedbackLastShownTimestampFromFile = /* @__PURE__ */ __name(() => {
31888
32141
  try {
31889
32142
  const userSettingsPath = Storage.getGlobalSettingsPath();
31890
- if (fs14.existsSync(userSettingsPath)) {
31891
- const content = fs14.readFileSync(userSettingsPath, "utf-8");
32143
+ if (fs15.existsSync(userSettingsPath)) {
32144
+ const content = fs15.readFileSync(userSettingsPath, "utf-8");
31892
32145
  const settings = JSON.parse((0, import_strip_json_comments.default)(content));
31893
32146
  return settings?.ui?.feedbackLastShownTimestamp ?? 0;
31894
32147
  }
@@ -32214,19 +32467,35 @@ function useBranchCommand(options) {
32214
32467
  let forkCreated = false;
32215
32468
  let prevSessionData;
32216
32469
  try {
32217
- try {
32218
- config.getChatRecordingService()?.finalize();
32219
- } catch {
32220
- }
32470
+ const outgoingRecording = config.getChatRecordingService();
32471
+ outgoingRecording?.finalize();
32472
+ await outgoingRecording?.flush();
32221
32473
  try {
32222
32474
  prevSessionData = await sessionService.loadSession(oldSessionId);
32223
32475
  } catch {
32224
32476
  }
32225
32477
  await sessionService.forkSession(oldSessionId, newSessionId);
32226
32478
  forkCreated = true;
32479
+ const provisional = await sessionService.loadSession(newSessionId);
32480
+ if (!provisional) {
32481
+ throw new Error("Failed to load newly forked session");
32482
+ }
32483
+ const baseName = name ?? deriveFirstPrompt(provisional.conversation.messages);
32484
+ const effectiveTitle = await computeUniqueBranchTitle(
32485
+ baseName,
32486
+ sessionService
32487
+ );
32488
+ const titlePersisted = await sessionService.renameSession(
32489
+ newSessionId,
32490
+ effectiveTitle,
32491
+ name ? "manual" : "auto"
32492
+ );
32493
+ if (!titlePersisted) {
32494
+ throw new Error("Failed to persist branch title");
32495
+ }
32227
32496
  const resumed = await sessionService.loadSession(newSessionId);
32228
32497
  if (!resumed) {
32229
- throw new Error("Failed to load newly forked session");
32498
+ throw new Error("Failed to reload titled branch session");
32230
32499
  }
32231
32500
  config.startNewSession(newSessionId, resumed);
32232
32501
  coreSwapped = true;
@@ -32251,12 +32520,6 @@ function useBranchCommand(options) {
32251
32520
  );
32252
32521
  } catch {
32253
32522
  }
32254
- const baseName = name ?? deriveFirstPrompt(resumed.conversation.messages);
32255
- const effectiveTitle = await computeUniqueBranchTitle(
32256
- baseName,
32257
- sessionService
32258
- );
32259
- config.getChatRecordingService()?.recordCustomTitle(effectiveTitle);
32260
32523
  setSessionName?.(effectiveTitle);
32261
32524
  remount?.();
32262
32525
  const titleInfo = name ? ` "${name}"` : "";
@@ -32375,6 +32638,11 @@ function useResumeCommand(options) {
32375
32638
  return;
32376
32639
  }
32377
32640
  const customTitle = sessionService.getSessionTitle(sessionId);
32641
+ const recoveryPlan = buildSessionRecoveryPlan({
32642
+ sessionId,
32643
+ conversation: sessionData.conversation,
32644
+ historyGaps: sessionData.historyGaps
32645
+ });
32378
32646
  const rawItems = buildResumedHistoryItems(sessionData, config);
32379
32647
  const collapseOnResume = settings.merged.ui?.history?.collapseOnResume ?? false;
32380
32648
  const collapsePreviewCount = settings.merged.ui?.history?.collapsePreviewCount ?? 0;
@@ -32383,6 +32651,14 @@ function useResumeCommand(options) {
32383
32651
  collapseOnResume,
32384
32652
  collapsePreviewCount
32385
32653
  );
32654
+ if (recoveryPlan.kind !== "clean" && recoveryPlan.kind !== "degraded_history" && recoveryPlan.visibleNotice) {
32655
+ const nextId = (uiHistoryItems.at(-1)?.id ?? 0) + 1;
32656
+ uiHistoryItems.push({
32657
+ id: nextId,
32658
+ type: "info" /* INFO */,
32659
+ text: recoveryPlan.visibleNotice
32660
+ });
32661
+ }
32386
32662
  resetBackgroundStateForSessionSwitch(config);
32387
32663
  config.startNewSession(sessionId, sessionData);
32388
32664
  coreSwapped = true;
@@ -33806,7 +34082,7 @@ function useDoublePress(onDoublePress, onPending) {
33806
34082
  __name(useDoublePress, "useDoublePress");
33807
34083
 
33808
34084
  // packages/cli/src/ui/AppContainer.tsx
33809
- import * as fs17 from "node:fs";
34085
+ import * as fs18 from "node:fs";
33810
34086
  import { basename as basename3 } from "node:path";
33811
34087
 
33812
34088
  // packages/cli/src/utils/windowTitle.ts
@@ -36022,11 +36298,11 @@ var import_react136 = __toESM(require_react(), 1);
36022
36298
 
36023
36299
  // packages/cli/src/services/command-migration-tool.ts
36024
36300
  init_esbuild_shims();
36025
- import { promises as fs15 } from "node:fs";
36026
- import path9 from "node:path";
36301
+ import { promises as fs16 } from "node:fs";
36302
+ import path10 from "node:path";
36027
36303
  async function detectTomlCommands(commandDir) {
36028
36304
  try {
36029
- await fs15.access(commandDir);
36305
+ await fs16.access(commandDir);
36030
36306
  } catch {
36031
36307
  return [];
36032
36308
  }
@@ -36050,16 +36326,16 @@ async function migrateTomlCommands(options) {
36050
36326
  return result;
36051
36327
  }
36052
36328
  for (const relativeFile of tomlFiles) {
36053
- const tomlPath = path9.join(commandDir, relativeFile);
36329
+ const tomlPath = path10.join(commandDir, relativeFile);
36054
36330
  try {
36055
- const tomlContent = await fs15.readFile(tomlPath, "utf-8");
36331
+ const tomlContent = await fs16.readFile(tomlPath, "utf-8");
36056
36332
  const markdownContent = convertTomlToMarkdown(tomlContent);
36057
36333
  const markdownPath = tomlPath.replace(/\.toml$/, ".md");
36058
36334
  try {
36059
- await fs15.access(markdownPath);
36335
+ await fs16.access(markdownPath);
36060
36336
  throw new Error(
36061
36337
  t("Markdown file already exists: {{filename}}", {
36062
- filename: path9.basename(markdownPath)
36338
+ filename: path10.basename(markdownPath)
36063
36339
  })
36064
36340
  );
36065
36341
  } catch (error) {
@@ -36067,12 +36343,12 @@ async function migrateTomlCommands(options) {
36067
36343
  throw error;
36068
36344
  }
36069
36345
  }
36070
- await fs15.writeFile(markdownPath, markdownContent, "utf-8");
36346
+ await fs16.writeFile(markdownPath, markdownContent, "utf-8");
36071
36347
  if (createBackup) {
36072
36348
  const backupPath = `${tomlPath}.backup`;
36073
- await fs15.rename(tomlPath, backupPath);
36349
+ await fs16.rename(tomlPath, backupPath);
36074
36350
  } else if (deleteOriginal) {
36075
- await fs15.unlink(tomlPath);
36351
+ await fs16.unlink(tomlPath);
36076
36352
  }
36077
36353
  result.convertedFiles.push(relativeFile);
36078
36354
  } catch (error) {
@@ -36254,9 +36530,9 @@ __name(useGitBranchName, "useGitBranchName");
36254
36530
  // packages/cli/src/ui/hooks/useWorktreeSession.ts
36255
36531
  init_esbuild_shims();
36256
36532
  var import_react139 = __toESM(require_react(), 1);
36257
- import fs16 from "node:fs";
36533
+ import fs17 from "node:fs";
36258
36534
  import fsPromises from "node:fs/promises";
36259
- import path10 from "node:path";
36535
+ import path11 from "node:path";
36260
36536
  function useWorktreeSession(config) {
36261
36537
  const [session, setSession] = (0, import_react139.useState)(null);
36262
36538
  (0, import_react139.useEffect)(() => {
@@ -36272,14 +36548,14 @@ function useWorktreeSession(config) {
36272
36548
  }, "safeLoad");
36273
36549
  void safeLoad();
36274
36550
  const filePath = config.getSessionService().getWorktreeSessionPath(config.getSessionId());
36275
- const dirPath = path10.dirname(filePath);
36276
- const fileName = path10.basename(filePath);
36551
+ const dirPath = path11.dirname(filePath);
36552
+ const fileName = path11.basename(filePath);
36277
36553
  let watcher;
36278
36554
  const setupWatcher = /* @__PURE__ */ __name(async () => {
36279
36555
  try {
36280
36556
  await fsPromises.mkdir(dirPath, { recursive: true });
36281
36557
  if (cancelled) return;
36282
- watcher = fs16.watch(dirPath, (_eventType, filename) => {
36558
+ watcher = fs17.watch(dirPath, (_eventType, filename) => {
36283
36559
  if (filename === null || filename.toString() === fileName) {
36284
36560
  void safeLoad();
36285
36561
  }
@@ -36505,6 +36781,16 @@ var useExtensionUpdates = /* @__PURE__ */ __name((extensionManager, addItem, cwd
36505
36781
  }
36506
36782
  ).then((result) => {
36507
36783
  if (!result) return;
36784
+ if (result.warnings?.length) {
36785
+ addItem(
36786
+ {
36787
+ type: "warning" /* WARNING */,
36788
+ text: `Extension "${getExtensionDisplayName(extension, getCurrentLanguage())}" updated with warnings: ${result.warnings.map((warning) => `${warning.code}: ${warning.error}`).join("; ")}.`
36789
+ },
36790
+ Date.now()
36791
+ );
36792
+ return;
36793
+ }
36508
36794
  addItem(
36509
36795
  {
36510
36796
  type: "info" /* INFO */,
@@ -37742,7 +38028,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
37742
38028
  const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
37743
38029
  const isValidPath = (0, import_react157.useCallback)((filePath) => {
37744
38030
  try {
37745
- return fs17.existsSync(filePath) && fs17.statSync(filePath).isFile();
38031
+ return fs18.existsSync(filePath) && fs18.statSync(filePath).isFile();
37746
38032
  } catch (_e) {
37747
38033
  return false;
37748
38034
  }
@@ -37757,6 +38043,19 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
37757
38043
  shellModeActive,
37758
38044
  preferredEditor
37759
38045
  });
38046
+ const restoredPromptStashTargetsRef = (0, import_react157.useRef)(/* @__PURE__ */ new Set());
38047
+ const promptStashTargetDir = config.getTargetDir();
38048
+ (0, import_react157.useEffect)(() => {
38049
+ if (restoredPromptStashTargetsRef.current.has(promptStashTargetDir)) {
38050
+ return;
38051
+ }
38052
+ restoredPromptStashTargetsRef.current.add(promptStashTargetDir);
38053
+ restorePromptStash(
38054
+ promptStashTargetDir,
38055
+ buffer.text,
38056
+ (text) => buffer.setText(text)
38057
+ );
38058
+ }, [buffer, promptStashTargetDir]);
37760
38059
  (0, import_react157.useEffect)(() => {
37761
38060
  const fetchUserMessages = /* @__PURE__ */ __name(async () => {
37762
38061
  const pastMessagesRaw = await logger?.getPreviousUserMessages() || [];
@@ -37901,14 +38200,31 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
37901
38200
  const chatRecordingService = config.getChatRecordingService();
37902
38201
  if (!chatRecordingService?.setTitleRecordedCallback) return;
37903
38202
  const existingCallback = chatRecordingService.getTitleRecordedCallback();
37904
- chatRecordingService.setTitleRecordedCallback((customTitle, source) => {
37905
- existingCallback?.(customTitle, source);
37906
- setSessionName(customTitle);
37907
- });
38203
+ chatRecordingService.setTitleRecordedCallback(
38204
+ (customTitle, source, sessionId) => {
38205
+ existingCallback?.(customTitle, source, sessionId);
38206
+ if (sessionId === config.getSessionId()) {
38207
+ setSessionName(customTitle);
38208
+ }
38209
+ }
38210
+ );
37908
38211
  return () => {
37909
38212
  chatRecordingService.setTitleRecordedCallback(existingCallback);
37910
38213
  };
37911
38214
  }, [config]);
38215
+ const addHistoryItem = historyManager.addItem;
38216
+ (0, import_react157.useEffect)(() => {
38217
+ if (typeof config.onChatRecordingFailure !== "function") return;
38218
+ return config.onChatRecordingFailure(() => {
38219
+ addHistoryItem(
38220
+ {
38221
+ type: "warning" /* WARNING */,
38222
+ text: t(TUI_CHAT_RECORDING_FAILURE_MESSAGE)
38223
+ },
38224
+ Date.now()
38225
+ );
38226
+ });
38227
+ }, [addHistoryItem, config]);
37912
38228
  const {
37913
38229
  isResumeDialogOpen,
37914
38230
  resumeMatchedSessions,
@@ -39579,7 +39895,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
39579
39895
  }
39580
39896
  } else if (keyMatchers["toggleIDEContextDetail" /* TOGGLE_IDE_CONTEXT_DETAIL */](key) && config.getIdeMode() && ideContextState) {
39581
39897
  handleSlashCommand("/ide status");
39582
- } else if (keyMatchers["showMoreLines" /* SHOW_MORE_LINES */](key) && !enteringConstrainHeightMode) {
39898
+ } else if (keyMatchers["showMoreLines" /* SHOW_MORE_LINES */](key) && buffer.text.length === 0 && !enteringConstrainHeightMode) {
39583
39899
  setConstrainHeight(false);
39584
39900
  } else if (keyMatchers["toggleShellInputFocus" /* TOGGLE_SHELL_INPUT_FOCUS */](key)) {
39585
39901
  if (activePtyId || embeddedShellFocused) {
@@ -40420,6 +40736,7 @@ __name(installSynchronizedOutput, "installSynchronizedOutput");
40420
40736
  // packages/cli/src/ui/startInteractiveUI.tsx
40421
40737
  var import_jsx_runtime134 = __toESM(require_jsx_runtime(), 1);
40422
40738
  var debugLogger37 = createDebugLogger("STARTUP");
40739
+ var PRESSURE_CHECK_INTERVAL_MS = 3e4;
40423
40740
  async function startInteractiveUI(config, settings, startupWarnings, workspaceRoot = process.cwd(), initializationResult, options = {}) {
40424
40741
  const version = await getCliVersion();
40425
40742
  setWindowTitle(settings, basename4(workspaceRoot));
@@ -40513,7 +40830,23 @@ async function startInteractiveUI(config, settings, startupWarnings, workspaceRo
40513
40830
  connectIde: options.postRenderConnectIde ?? false,
40514
40831
  initializeTelemetry: options.postRenderInitializeTelemetry ?? config.isTelemetryInitializationDeferred()
40515
40832
  });
40833
+ const pressureMonitor = config.getMemoryPressureMonitor?.();
40834
+ let pressureCheckTimer;
40835
+ if (pressureMonitor) {
40836
+ pressureCheckTimer = setInterval(() => {
40837
+ try {
40838
+ pressureMonitor.performCheck();
40839
+ } catch {
40840
+ }
40841
+ }, PRESSURE_CHECK_INTERVAL_MS);
40842
+ pressureCheckTimer.unref?.();
40843
+ }
40516
40844
  registerCleanup(async () => {
40845
+ if (pressureCheckTimer) clearInterval(pressureCheckTimer);
40846
+ try {
40847
+ pressureMonitor?.performCheck();
40848
+ } catch {
40849
+ }
40517
40850
  remoteInputWatcher?.shutdown();
40518
40851
  await dualOutputBridge?.shutdown();
40519
40852
  disableKittyProtocol();