@organizaone/o1-code 0.17.0 → 0.19.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (316) hide show
  1. package/bundled/qc-helper/docs/configuration/model-providers.md +7 -0
  2. package/bundled/qc-helper/docs/configuration/settings.md +58 -0
  3. package/bundled/qc-helper/docs/features/hooks.md +2 -0
  4. package/chunks/{MaxSizedBox-5OKI3BX3.js → MaxSizedBox-LBBGD4JH.js} +50 -50
  5. package/chunks/{StandaloneSessionPicker-YNB6KJCF.js → StandaloneSessionPicker-HJRPWYSO.js} +68 -68
  6. package/chunks/{acp-subagent-executor-PZJCS3JL.js → acp-subagent-executor-ANREZOL3.js} +53 -53
  7. package/chunks/{acpAgent-PZPMGP4D.js → acpAgent-4PZL7OPY.js} +134 -134
  8. package/chunks/{agent-OSABTEYS.js → agent-2WDUUEKZ.js} +38 -38
  9. package/chunks/{agent-headless-BV3PXMGI.js → agent-headless-UGBGAV5A.js} +38 -38
  10. package/chunks/agent-shell-LD2O7MY4.js +10 -0
  11. package/chunks/{all-providers-G6HCDIYP.js → all-providers-QQ7QUI6H.js} +2 -2
  12. package/chunks/{anthropicContentGenerator-ZNCCGHIR.js → anthropicContentGenerator-OWPDYQLE.js} +27 -26
  13. package/chunks/{artifact-tool-NU2ZBB3C.js → artifact-tool-YPTGDOWY.js} +1 -1
  14. package/chunks/{bridge-GTQOFME4.js → bridge-Y4RS4LIM.js} +53 -53
  15. package/chunks/{bwrap-execution-FIGUBZCN.js → bwrap-execution-NXVT7BHP.js} +10 -9
  16. package/chunks/{chunk-374632MF.js → chunk-275M4OBK.js} +4 -4
  17. package/chunks/{chunk-JLI3WLWU.js → chunk-27QL6ITI.js} +3 -3
  18. package/chunks/{chunk-KVYQVMWW.js → chunk-2HEFHPUO.js} +1 -1
  19. package/chunks/{chunk-NQTVSCZM.js → chunk-2S3W2BIT.js} +4 -4
  20. package/chunks/{chunk-M7FKRX7E.js → chunk-2XICKCAO.js} +13 -13
  21. package/chunks/{chunk-STKTI6A4.js → chunk-2Z33L25G.js} +16 -16
  22. package/chunks/{chunk-RVSRZIOH.js → chunk-4GEHO2XY.js} +11 -11
  23. package/chunks/{chunk-GCTIW6ZL.js → chunk-4MQVXVZC.js} +1 -1
  24. package/chunks/{chunk-S6V24RNM.js → chunk-52G2UZZU.js} +9 -9
  25. package/chunks/{chunk-PD4HVHCC.js → chunk-53B5T577.js} +1 -1
  26. package/chunks/{chunk-GQ2KSD3A.js → chunk-5F56IIHO.js} +1 -1
  27. package/chunks/{chunk-UNY7AZRV.js → chunk-5PRQVH45.js} +1 -1
  28. package/chunks/{chunk-4OUIZHHJ.js → chunk-5TQYTWUK.js} +26 -13
  29. package/chunks/{chunk-65JWVPGE.js → chunk-5ZVLINFZ.js} +1 -1
  30. package/chunks/{chunk-WVUX64XK.js → chunk-65FY77IG.js} +2 -2
  31. package/chunks/{chunk-ZY7MBFLR.js → chunk-6ABRZIDJ.js} +2 -2
  32. package/chunks/{chunk-EQUQD6PI.js → chunk-6FMGYIYJ.js} +1 -1
  33. package/chunks/{chunk-LEU3A3JK.js → chunk-6GR5AOYF.js} +5 -5
  34. package/chunks/{chunk-LCR4BSNG.js → chunk-6GX676WS.js} +5 -23
  35. package/chunks/{chunk-5OGI74MG.js → chunk-7ASCNDOR.js} +5 -5
  36. package/chunks/{chunk-P4F73WS7.js → chunk-7LFCBMVX.js} +1 -1
  37. package/chunks/{chunk-XN5NUMXQ.js → chunk-7NZ6ERTO.js} +2 -2
  38. package/chunks/{chunk-P7LX2GT4.js → chunk-7UEP4GNM.js} +3 -3
  39. package/chunks/{chunk-3OEPXLJY.js → chunk-AJ3DGQKK.js} +6 -6
  40. package/chunks/chunk-AK6T4SJC.js +231 -0
  41. package/chunks/{chunk-DLKZRSBX.js → chunk-APMMNPWA.js} +8 -8
  42. package/chunks/{chunk-A2KXNBRR.js → chunk-AS3WO2ZW.js} +2 -2
  43. package/chunks/{chunk-5NNMFA5J.js → chunk-B3E57DII.js} +1 -1
  44. package/chunks/{chunk-OMHVL22G.js → chunk-B5I3IUHG.js} +29 -25
  45. package/chunks/{chunk-5ZB5VWWJ.js → chunk-BKEQFZ3K.js} +3 -3
  46. package/chunks/{chunk-XRA56BYR.js → chunk-BTA2NW65.js} +2 -2
  47. package/chunks/{chunk-DDMRRKEQ.js → chunk-BVPROTQ4.js} +6 -6
  48. package/chunks/{chunk-6DH6MBN3.js → chunk-C6EULC74.js} +1 -1
  49. package/chunks/{chunk-F7VSO6O5.js → chunk-C7QKP7FW.js} +8 -8
  50. package/chunks/{chunk-PUUMQ7PY.js → chunk-COMBBGHN.js} +3 -3
  51. package/chunks/{chunk-FHTFTKC6.js → chunk-CQZKVV7A.js} +2 -2
  52. package/chunks/{chunk-Q7ZCOZFW.js → chunk-CZG6DZZH.js} +1 -1
  53. package/chunks/{chunk-Z5VNJAKT.js → chunk-DVPQSDMD.js} +1 -1
  54. package/chunks/{chunk-LSYBUXN5.js → chunk-DVSJEZIT.js} +4 -4
  55. package/chunks/{chunk-XYJRLDOC.js → chunk-DWQZQDYY.js} +5 -5
  56. package/chunks/{chunk-HP4JPUKM.js → chunk-E2YI7LKA.js} +22 -22
  57. package/chunks/{chunk-BHLPGOFA.js → chunk-EQDCZMBX.js} +4 -4
  58. package/chunks/{chunk-RSC5X5CC.js → chunk-EZ27V5MZ.js} +30 -6
  59. package/chunks/{chunk-2LHQQK25.js → chunk-FDNTWDR3.js} +40 -11
  60. package/chunks/{chunk-WSHOWMUB.js → chunk-FJHDFJVI.js} +1 -1
  61. package/chunks/{chunk-VVF2QVSN.js → chunk-H4QNYXIC.js} +1 -1
  62. package/chunks/{chunk-776VI66O.js → chunk-H5AU3734.js} +1 -1
  63. package/chunks/{chunk-HEB4PBXG.js → chunk-HOXIWPNJ.js} +10 -10
  64. package/chunks/{chunk-5NKAXFD2.js → chunk-HP7IRBXY.js} +1 -1
  65. package/chunks/{chunk-NIOE4OJE.js → chunk-HU66EQY6.js} +1 -1
  66. package/chunks/{chunk-N3PNXNLT.js → chunk-I2J5M75F.js} +1 -1
  67. package/chunks/{chunk-Q5CQXESD.js → chunk-I5INQP6E.js} +1 -1
  68. package/chunks/{chunk-J5UW3SF4.js → chunk-ICS5D7OZ.js} +43 -80
  69. package/chunks/{chunk-JBXJETVL.js → chunk-IJJHHXRW.js} +11 -11
  70. package/chunks/{chunk-5I3MOJOI.js → chunk-IVKRKMG5.js} +2 -2
  71. package/chunks/{chunk-Y33VBQHJ.js → chunk-J5NHGFHB.js} +88 -58
  72. package/chunks/{chunk-PFTOZCCT.js → chunk-J7HPCUIE.js} +3 -3
  73. package/chunks/{chunk-VPPW7IAW.js → chunk-J7JPRPU7.js} +13 -7
  74. package/chunks/{chunk-W34TSFFO.js → chunk-JBHZH3PC.js} +1 -1
  75. package/chunks/{chunk-SPTU3FVH.js → chunk-JFO6OCHQ.js} +1 -1
  76. package/chunks/{chunk-4X3MIKOZ.js → chunk-JOBNLOEW.js} +2 -2
  77. package/chunks/{chunk-NGEXSHEP.js → chunk-JUWZD2PN.js} +1 -1
  78. package/chunks/{chunk-ZE44AQDR.js → chunk-JZZCOULA.js} +5 -5
  79. package/chunks/{chunk-UI4TGIWA.js → chunk-K2FOIXZ5.js} +44 -17
  80. package/chunks/{chunk-BWG46GHG.js → chunk-L4VKVFNI.js} +3 -3
  81. package/chunks/{chunk-YOBDFGGI.js → chunk-LCZW6GXU.js} +1 -1
  82. package/chunks/{chunk-S5H4RJ5J.js → chunk-LZQYRRU3.js} +2 -2
  83. package/chunks/{chunk-SJGGWEKA.js → chunk-MGODVF72.js} +3 -3
  84. package/chunks/{chunk-OLM75BL6.js → chunk-MLC6KXZV.js} +8 -8
  85. package/chunks/{chunk-ASCIEPTK.js → chunk-NYAXAPOP.js} +2 -2
  86. package/chunks/{chunk-365RIODD.js → chunk-OAAOCEVM.js} +5 -5
  87. package/chunks/{chunk-NOL6NAWN.js → chunk-OJSW65PQ.js} +1 -1
  88. package/chunks/{chunk-4PWHDVZ4.js → chunk-OLSQPKHE.js} +3 -3
  89. package/chunks/{chunk-F4GW667E.js → chunk-OPMQQPVT.js} +4 -4
  90. package/chunks/{chunk-PD6BR2JC.js → chunk-OVK563DU.js} +8 -8
  91. package/chunks/{chunk-GTEHJDDF.js → chunk-OYDDO6OG.js} +1 -1
  92. package/chunks/{chunk-PEBSCCH4.js → chunk-P6JZ4HYD.js} +7 -7
  93. package/chunks/{chunk-FADNOCZJ.js → chunk-QD5UHPFT.js} +1 -1
  94. package/chunks/{chunk-XZHQQWL7.js → chunk-QVJIOVF5.js} +20 -21
  95. package/chunks/{chunk-4TNDXCEE.js → chunk-QVMFV3XM.js} +1 -1
  96. package/chunks/{chunk-WVLNOFJ4.js → chunk-QWKLEJEY.js} +6 -6
  97. package/chunks/{chunk-4SJO2I35.js → chunk-QYUMJTBP.js} +1 -1
  98. package/chunks/chunk-RC67CA5Z.js +10861 -0
  99. package/chunks/{chunk-NW53GCAC.js → chunk-RCVPNZFY.js} +66 -62
  100. package/chunks/{chunk-IGL2VEKL.js → chunk-RKYOZTZO.js} +1277 -1073
  101. package/chunks/{chunk-TFFOK3SJ.js → chunk-RNEMD6QU.js} +1 -1
  102. package/chunks/{chunk-OW5FL4TK.js → chunk-S7G552VN.js} +3 -3
  103. package/chunks/{chunk-GGL2H4QS.js → chunk-SWMFQ5LO.js} +4 -4
  104. package/chunks/{chunk-QJLOREFB.js → chunk-TMDIF2JL.js} +3 -3
  105. package/chunks/{chunk-K3B6HYHT.js → chunk-TOHP6TCL.js} +2 -2
  106. package/chunks/{chunk-4YGPL24Z.js → chunk-TYOWBAXR.js} +5 -5
  107. package/chunks/{chunk-55BVGW3L.js → chunk-U3KIMPCC.js} +1 -1
  108. package/chunks/{chunk-COZTQ5V5.js → chunk-UE5DVT36.js} +2 -2
  109. package/chunks/{chunk-GES5XKEL.js → chunk-UOPDWTO3.js} +1 -1
  110. package/chunks/{chunk-FJAZPBX2.js → chunk-V75J4GJ2.js} +1 -1
  111. package/chunks/{chunk-B3BZBKAK.js → chunk-VINUVVAI.js} +1 -1
  112. package/chunks/{chunk-QIPHWJE4.js → chunk-VRJY2FUR.js} +4 -4
  113. package/chunks/{chunk-4OYKNMRP.js → chunk-VWZOXOSR.js} +1 -1
  114. package/chunks/{chunk-FXR7OHQM.js → chunk-VYJBEVMW.js} +1 -1
  115. package/chunks/{chunk-3D2STYD6.js → chunk-VYRPAY75.js} +229 -11073
  116. package/chunks/{chunk-N7WTXDQE.js → chunk-WGFFYBV3.js} +1 -1
  117. package/chunks/{chunk-ZGPPP7FC.js → chunk-WN23CFGN.js} +10 -10
  118. package/chunks/{chunk-6UQIU4EJ.js → chunk-X4TQXVEZ.js} +2 -2
  119. package/chunks/{chunk-A645EHMA.js → chunk-XOLEQMLH.js} +5 -5
  120. package/chunks/{chunk-VPFTCMMK.js → chunk-XOVXSDNN.js} +1 -1
  121. package/chunks/{chunk-CNEBV4KX.js → chunk-XRCCYNUO.js} +2 -2
  122. package/chunks/{chunk-FRSSQFFA.js → chunk-Y2TQ2S56.js} +1 -1
  123. package/chunks/{chunk-MVYJ7RV2.js → chunk-Y6XW6ZBE.js} +1 -1
  124. package/chunks/{chunk-NZ4NQDZ6.js → chunk-YXLCNZ7S.js} +7 -7
  125. package/chunks/{chunk-EYPNFXS6.js → chunk-Z333PU5C.js} +3 -3
  126. package/chunks/{chunk-TP3M5WJ2.js → chunk-Z3JO7QH2.js} +1 -1
  127. package/chunks/{chunk-DA4GEY74.js → chunk-Z3TVPPGU.js} +1 -1
  128. package/chunks/{chunk-LZ2EZKJA.js → chunk-ZHNI4QK6.js} +1 -1
  129. package/chunks/{chunk-HTC6ZV55.js → chunk-ZPZPI63H.js} +3 -3
  130. package/chunks/{chunk-ZRO2FPEP.js → chunk-ZQBNP2ZQ.js} +4 -4
  131. package/chunks/{chunk-FCNDMMJU.js → chunk-ZXAN2CZR.js} +4 -4
  132. package/chunks/{codex-subagent-executor-TERXQRWY.js → codex-subagent-executor-GOP5OFLJ.js} +53 -53
  133. package/chunks/{contextCommand-VROD3FTK.js → contextCommand-452SSDQS.js} +52 -52
  134. package/chunks/{core-runtime-O5IEX5JJ.js → core-runtime-PBWYHWNH.js} +53 -53
  135. package/chunks/{create-sub-session-LNRNDVAA.js → create-sub-session-EIJWLULW.js} +53 -53
  136. package/chunks/{daemon-git-worktree-guard-OPTBK6SV.js → daemon-git-worktree-guard-2AALKGC3.js} +94 -79
  137. package/chunks/{daemon-status-provider-A4GWR5S6.js → daemon-status-provider-VCR4B5XY.js} +58 -58
  138. package/chunks/{daemon-trust-policy-DDO7JF7Z.js → daemon-trust-policy-252THKLJ.js} +58 -58
  139. package/chunks/{daemon-trust-policy-monitor-XILHS4S6.js → daemon-trust-policy-monitor-JLH53AWD.js} +58 -58
  140. package/chunks/{deferred-core-runtime-6CT73AX6.js → deferred-core-runtime-3VTAJJCS.js} +50 -50
  141. package/chunks/{display-image-ETU7QIAC.js → display-image-U6HZKF3G.js} +2 -2
  142. package/chunks/{edit-FNMLMGJP.js → edit-G7Y6A52O.js} +40 -40
  143. package/chunks/{en-YLUPJ2ES.js → en-FDKIF2AN.js} +8 -0
  144. package/chunks/{enter-worktree-OZOIH6KH.js → enter-worktree-YQUTPRTW.js} +4 -3
  145. package/chunks/{enterPlanMode-TO3YGG3Q.js → enterPlanMode-LFE2LE5H.js} +38 -38
  146. package/chunks/{environment-MDVZ4DQC.js → environment-RHXWB6HI.js} +53 -53
  147. package/chunks/{errors-FQAPJF44.js → errors-SS4BLRZA.js} +52 -52
  148. package/chunks/{execution-sandbox-config-EYZYM2IC.js → execution-sandbox-config-NWYWWN7E.js} +11 -10
  149. package/chunks/{execution-tool-RUDM67GH.js → execution-tool-6CZ4GL5K.js} +40 -40
  150. package/chunks/{execution-worker-XXW2FXYP.js → execution-worker-DNPXGP3Q.js} +46 -46
  151. package/chunks/{exit-worktree-W5TC4B4C.js → exit-worktree-Y3VV3LC4.js} +4 -3
  152. package/chunks/{exitPlanMode-FA2OCLQP.js → exitPlanMode-5DP5J6XJ.js} +38 -38
  153. package/chunks/{fast-path-2GFJCUOS.js → fast-path-Z37HWA6N.js} +2 -2
  154. package/chunks/fast-path-settings-FIMIXD3V.js +1 -1
  155. package/chunks/{glob-MWRTU5EW.js → glob-UV57FE4X.js} +39 -39
  156. package/chunks/{goal-tools-KHMAJVPZ.js → goal-tools-JOADMEW3.js} +38 -38
  157. package/chunks/{grep-VO76ZOXG.js → grep-PFRUFHXB.js} +3 -2
  158. package/chunks/{handleAutoUpdate-HWMJLBVN.js → handleAutoUpdate-35BVVB5W.js} +54 -54
  159. package/chunks/{i18n-NGGQDXEM.js → i18n-XIZSGDN7.js} +51 -51
  160. package/chunks/{initializer-MVPM7JXT.js → initializer-X4GWJRV7.js} +58 -58
  161. package/chunks/{installationInfo-C2G3I3E4.js → installationInfo-NZHMU2NK.js} +50 -50
  162. package/chunks/{list-I65FUKJK.js → list-ZKYO3L7E.js} +60 -60
  163. package/chunks/{llm-YOFQTD4A.js → llm-ZTSUHOR2.js} +99 -99
  164. package/chunks/{llm-content-generator-7KO5OXN4.js → llm-content-generator-MIFAW3PL.js} +7 -6
  165. package/chunks/{loadedSettingsAdapter-YAJVF45V.js → loadedSettingsAdapter-YZQOWGKI.js} +58 -58
  166. package/chunks/{local-execution-environment-63PF5ZBZ.js → local-execution-environment-EUUAG64L.js} +46 -46
  167. package/chunks/{loggingContentGenerator-QG3CIPLX.js → loggingContentGenerator-OWTH4PME.js} +48 -46
  168. package/chunks/{ls-VJFHJL3S.js → ls-KIV7RGKE.js} +3 -3
  169. package/chunks/{managed-npm-update-GU3MH3MB.js → managed-npm-update-IDWHLESG.js} +50 -50
  170. package/chunks/{mcp-VVLQOGBP.js → mcp-6PJLNW72.js} +58 -58
  171. package/chunks/{model-call-collection-MRH3UD4D.js → model-call-collection-GFAJWGA5.js} +1 -1
  172. package/chunks/{model-configuration-HJOQTYTG.js → model-configuration-4IQM5YL2.js} +59 -59
  173. package/chunks/{modelConfigUtils-RTV3SOTO.js → modelConfigUtils-B3YLHREG.js} +52 -52
  174. package/chunks/{monitor-EMR4E63B.js → monitor-R6SQRVTW.js} +41 -39
  175. package/chunks/{node-BMQ3WD34.js → node-5A2VFKYD.js} +2 -1
  176. package/chunks/{nonInteractiveCli-334TZFLL.js → nonInteractiveCli-4LE7VZRX.js} +90 -90
  177. package/chunks/{nonInteractiveToolExecutor-XR44LLZ3.js → nonInteractiveToolExecutor-Q6HYQX24.js} +39 -39
  178. package/chunks/{notebook-edit-YWGLUUL6.js → notebook-edit-3T26DJEK.js} +39 -39
  179. package/chunks/{omni-RXY4KNEL.js → omni-55KAZXS5.js} +10 -10
  180. package/chunks/{openaiContentGenerator-KHDFMLCP.js → openaiContentGenerator-QTI4NIEI.js} +33 -32
  181. package/chunks/{openaiResponsesContentGenerator-VY5OJ6NZ.js → openaiResponsesContentGenerator-YRZKU2TP.js} +10 -9
  182. package/chunks/{processUtils-R3K5F7GY.js → processUtils-SFVXWEK2.js} +2 -2
  183. package/chunks/{prompt-terminal-ledger-5XJO6OHA.js → prompt-terminal-ledger-45YZQYQH.js} +51 -51
  184. package/chunks/{pt-NSYP3LJA.js → pt-ADEAZMHA.js} +7 -0
  185. package/chunks/{reactive-degrade-ANEZ6XT4.js → reactive-degrade-SZ7T7YCF.js} +10 -10
  186. package/chunks/{read-file-TW55ECGP.js → read-file-ZUP4L74O.js} +6 -6
  187. package/chunks/{record-source-U53PRXYX.js → record-source-ANENC5K7.js} +6 -6
  188. package/chunks/{request-shutdown-E5QAHOAD.js → request-shutdown-LRWCJOEG.js} +5 -5
  189. package/chunks/{resumeHistoryUtils-EOFUIZQJ.js → resumeHistoryUtils-WDL5S65U.js} +54 -54
  190. package/chunks/{ripGrep-ZKWIEUGQ.js → ripGrep-S7PJHTWC.js} +13 -12
  191. package/chunks/{run-o1-code-serve-YATJJJAD.js → run-o1-code-serve-CRTZPIBE.js} +88 -56
  192. package/chunks/{runtime-shell-policy-Z53GWNM7.js → runtime-shell-policy-XX3HN7A6.js} +1 -1
  193. package/chunks/{sandboxConfig-XDUNKCXS.js → sandboxConfig-M5D57NFL.js} +51 -51
  194. package/chunks/{scheduled-tasks-L6QZ4XZE.js → scheduled-tasks-PV6JXYS7.js} +56 -56
  195. package/chunks/{scheduler-SEPQ3ML6.js → scheduler-7JCEVSRX.js} +52 -52
  196. package/chunks/{sdk-exporters-grpc-FZO3Y43M.js → sdk-exporters-grpc-7ZF7NWTA.js} +2 -2
  197. package/chunks/{sdk-exporters-http-WYXH2KE4.js → sdk-exporters-http-73LTU25J.js} +3 -3
  198. package/chunks/{sdk-impl-5PWLMFPQ.js → sdk-impl-IAUUHG7Z.js} +5 -5
  199. package/chunks/{send-message-H6B5EST3.js → send-message-XY7EC52V.js} +5 -5
  200. package/chunks/{serve-KS74S5GC.js → serve-4FNQ44BF.js} +58 -58
  201. package/chunks/{server-X7BTPK77.js → server-BTZRXRWK.js} +150 -145
  202. package/chunks/{session-QUFO5VWG.js → session-3NETJ2OP.js} +2 -2
  203. package/chunks/{session-W7V75BI3.js → session-MHPXIRAB.js} +97 -97
  204. package/chunks/{session-attachments-root-2NROZDOQ.js → session-attachments-root-R7QRKG2O.js} +50 -50
  205. package/chunks/{session-pr-refresh-XXGV2TIH.js → session-pr-refresh-NZIYBJO6.js} +55 -55
  206. package/chunks/{settings-B2C5MWBH.js → settings-KQP2U3ZP.js} +57 -57
  207. package/chunks/{shell-VUXPYMLB.js → shell-EFKVGKOM.js} +38 -38
  208. package/chunks/{skill-SHYC6HZH.js → skill-URD5CMIO.js} +17 -17
  209. package/chunks/{skill-settings-B4AKE4YI.js → skill-settings-4QQKNLUM.js} +58 -58
  210. package/chunks/{spawnChannel-XFEWJ5IP.js → spawnChannel-JGW5L6Z5.js} +52 -52
  211. package/chunks/{standalone-update-22L47ZUN.js → standalone-update-LFU3BOLF.js} +52 -52
  212. package/chunks/{startInteractiveUI-QB53MCJH.js → startInteractiveUI-KWRDDS5R.js} +475 -914
  213. package/chunks/{task-create-WLFSUWNH.js → task-create-2BHPJUF3.js} +7 -7
  214. package/chunks/{task-update-STSLD6C5.js → task-update-NGKKBFU5.js} +7 -7
  215. package/chunks/{team-create-F5X3YMKF.js → team-create-SII3V6S6.js} +38 -38
  216. package/chunks/{team-plan-approval-KQJ4QBRY.js → team-plan-approval-3GDIGYLR.js} +38 -38
  217. package/chunks/{terminal-image-renderer-Q2VC54R7.js → terminal-image-renderer-SDU6KELE.js} +50 -50
  218. package/chunks/{theme-manager-MFHYS6E5.js → theme-manager-5N5JQJZQ.js} +50 -50
  219. package/chunks/{tool-call-2R6GT3ZZ.js → tool-call-GVZHLCX6.js} +6 -6
  220. package/chunks/{tool-result-media-HSSTJT3I.js → tool-result-media-3NEISIXC.js} +10 -10
  221. package/chunks/{tool-search-UL2WT6YC.js → tool-search-N3KKISSN.js} +14 -14
  222. package/chunks/{total-session-admission-D2KOHMZ3.js → total-session-admission-FAD7C46M.js} +53 -53
  223. package/chunks/{trustedFolders-X4LZ3K6K.js → trustedFolders-GW63QOTM.js} +52 -52
  224. package/chunks/{update-relaunch-ED6TQ62N.js → update-relaunch-QSTEABHY.js} +5 -5
  225. package/chunks/{updateCheck-CS26ASTO.js → updateCheck-X6ZRBJSX.js} +53 -53
  226. package/chunks/{upload-config-SCYOBHWY.js → upload-config-7GMCZTH7.js} +7 -7
  227. package/chunks/{useAutoAcceptIndicator-PEZGDAQS.js → useAutoAcceptIndicator-V6WYPN4U.js} +60 -60
  228. package/chunks/{validateNonInterActiveAuth-XA5EGKLC.js → validateNonInterActiveAuth-5JD64FR7.js} +87 -87
  229. package/chunks/{version-5GIY7DF6.js → version-AINMTXVB.js} +1 -1
  230. package/chunks/{web-fetch-3M7KAG4V.js → web-fetch-3G7T5PPD.js} +6 -6
  231. package/chunks/{web-search-BSGTGV6R.js → web-search-YYLBYDF5.js} +8 -8
  232. package/chunks/{workflow-YRZNEBZE.js → workflow-B5RUGWYS.js} +39 -39
  233. package/chunks/{workspace-providers-status-674S4QSV.js → workspace-providers-status-YPNCARQU.js} +64 -64
  234. package/chunks/{workspace-registration-store-KG5LYDLA.js → workspace-registration-store-SI4R2LBL.js} +1 -1
  235. package/chunks/{workspace-registry-GSBYPUM7.js → workspace-registry-B257SMEP.js} +53 -53
  236. package/chunks/{workspace-runtime-coordinator-EST53Y7Y.js → workspace-runtime-coordinator-WOQUHIXW.js} +54 -54
  237. package/chunks/{workspace-service-UJZYOUUA.js → workspace-service-LEFH6GQQ.js} +64 -64
  238. package/chunks/{workspace-skills-status-F4VMIJ4O.js → workspace-skills-status-TBMOY62A.js} +61 -61
  239. package/chunks/{workspace-trust-reconciler-LLBIRJVE.js → workspace-trust-reconciler-GBIJE56I.js} +64 -64
  240. package/chunks/{write-file-PQSR77L4.js → write-file-K2RNXABV.js} +40 -40
  241. package/chunks/{zoom-image-FQSFM5HP.js → zoom-image-GYZQKNAT.js} +6 -6
  242. package/cli.js +12 -12
  243. package/execution-worker.js +1 -1
  244. package/export-transcript-document.js +1 -1
  245. package/locales/en.js +10 -0
  246. package/locales/pt.js +9 -0
  247. package/package.json +3 -2
  248. package/release-notes.json +15 -0
  249. package/web-shell/assets/{abnfDiagram-VCTEODGH-1Iu-6dj4.js → abnfDiagram-VCTEODGH-D2ihsggw.js} +1 -1
  250. package/web-shell/assets/{arc-DFc2BbOx.js → arc-Do8BhmqS.js} +1 -1
  251. package/web-shell/assets/{architectureDiagram-5GKGNRK7-vhKTF91D.js → architectureDiagram-5GKGNRK7-DNvafzQk.js} +1 -1
  252. package/web-shell/assets/{blockDiagram-NRAW4CY4-DNkrj6Ki.js → blockDiagram-NRAW4CY4-C2l6s-dd.js} +1 -1
  253. package/web-shell/assets/{c4Diagram-UCG6FXSJ-Ht5PYyrP.js → c4Diagram-UCG6FXSJ-B_FFLJPy.js} +1 -1
  254. package/web-shell/assets/channel-ByXUUrNN.js +1 -0
  255. package/web-shell/assets/{chunk-2Q5K7J3B-CeBALpLN.js → chunk-2Q5K7J3B-DGzdk8ro.js} +1 -1
  256. package/web-shell/assets/{chunk-5VM5RSS4--1_8NrLZ.js → chunk-5VM5RSS4-UM28bO2O.js} +1 -1
  257. package/web-shell/assets/{chunk-F27PBJKO-CY0luuc1.js → chunk-F27PBJKO-OLQLKZT5.js} +1 -1
  258. package/web-shell/assets/{chunk-G27WJ6UU-DROBML9T.js → chunk-G27WJ6UU-BwzVWeH0.js} +1 -1
  259. package/web-shell/assets/{chunk-JWPE2WC7-DzSBkf4_.js → chunk-JWPE2WC7-CmKOy87S.js} +1 -1
  260. package/web-shell/assets/{chunk-LCL6LL3I-Ba4y11nc.js → chunk-LCL6LL3I-DQrv9QCe.js} +1 -1
  261. package/web-shell/assets/{chunk-POPQ4Y6H-BjISLscp.js → chunk-POPQ4Y6H-CToePaJn.js} +1 -1
  262. package/web-shell/assets/{chunk-SVP7TREG-7yAfbqQn.js → chunk-SVP7TREG-CxvaodrX.js} +1 -1
  263. package/web-shell/assets/{chunk-XXDRQBXY-DSfSbmGi.js → chunk-XXDRQBXY-F08Sgl2P.js} +1 -1
  264. package/web-shell/assets/classDiagram-DTDB5LWJ-DivXqSOk.js +1 -0
  265. package/web-shell/assets/classDiagram-v2-JRS7N3AN-DivXqSOk.js +1 -0
  266. package/web-shell/assets/{cose-bilkent-JH36ORCC-UeUy0V7W.js → cose-bilkent-JH36ORCC-DV0l_6Bc.js} +1 -1
  267. package/web-shell/assets/{cynefin-OW5HDTMX-CY1G2oDb.js → cynefin-OW5HDTMX-DNaFCPQT.js} +1 -1
  268. package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-BgRC-Tx3.js → cynefinDiagram-5FMLGOSQ-DnqY9A5l.js} +1 -1
  269. package/web-shell/assets/{dagre-3AP2YEHR-C4guzhrJ.js → dagre-3AP2YEHR-Ct-h_Mtu.js} +1 -1
  270. package/web-shell/assets/{diagram-S7CK7UJ4-DMIT_zqA.js → diagram-S7CK7UJ4-BPl7htW0.js} +1 -1
  271. package/web-shell/assets/{diagram-UQ7AKVKN-BtIUyVfz.js → diagram-UQ7AKVKN-DFQ3xGrv.js} +1 -1
  272. package/web-shell/assets/{diagram-VSXAHHWV-i1WGOEmU.js → diagram-VSXAHHWV-Dwn4_L2o.js} +1 -1
  273. package/web-shell/assets/{diagram-VX7I27RA-DUkhbKtw.js → diagram-VX7I27RA-CF8BxijU.js} +1 -1
  274. package/web-shell/assets/{diagram-Z3DM3KII--2gvvTex.js → diagram-Z3DM3KII-AwRnI4zw.js} +1 -1
  275. package/web-shell/assets/{ebnfDiagram-PWID7BFC-CE9xC4wu.js → ebnfDiagram-PWID7BFC-Dhk2RAC_.js} +1 -1
  276. package/web-shell/assets/{erDiagram-SSCWMZ5O-BZ9SVVvD.js → erDiagram-SSCWMZ5O-CdOqHMOe.js} +1 -1
  277. package/web-shell/assets/{flowDiagram-A5DVABFB-BbTpYAyb.js → flowDiagram-A5DVABFB-CA4vIx4m.js} +1 -1
  278. package/web-shell/assets/{ganttDiagram-EL5Y4UJY-CSSaFyQe.js → ganttDiagram-EL5Y4UJY-B2HRdA6n.js} +1 -1
  279. package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-C5njBsJ3.js → gitGraphDiagram-WWUBYQGX-Ciw9ejqB.js} +1 -1
  280. package/web-shell/assets/{index-uQHNUTA9.js → index-CVDFKd7Z.js} +1 -1
  281. package/web-shell/assets/{index-xp3z-i0g.js → index-fjLKOApE.js} +3 -3
  282. package/web-shell/assets/{infoDiagram-RXCK75RN-u73YWq3w.js → infoDiagram-RXCK75RN-Czs-Fg9i.js} +1 -1
  283. package/web-shell/assets/{ishikawaDiagram-5VMMS53U-C9Gf_MQb.js → ishikawaDiagram-5VMMS53U-BgWxCmiv.js} +1 -1
  284. package/web-shell/assets/{journeyDiagram-EYS64GPL-CJgpb5e7.js → journeyDiagram-EYS64GPL-CSIiBS9s.js} +1 -1
  285. package/web-shell/assets/{kanban-definition-3QL26DDD-kz1pguPM.js → kanban-definition-3QL26DDD-Dwkr1aiK.js} +1 -1
  286. package/web-shell/assets/{layout-BXLuBuV-.js → layout-1s_RTrXE.js} +1 -1
  287. package/web-shell/assets/{linear-CdJvYFfU.js → linear-s_vis_gi.js} +1 -1
  288. package/web-shell/assets/{mermaid.core-1SzlqD5d.js → mermaid.core-M8VeeqP0.js} +6 -6
  289. package/web-shell/assets/{mindmap-definition-FBJOCRG2-Bp1KcUzt.js → mindmap-definition-FBJOCRG2-YqNa0dLY.js} +1 -1
  290. package/web-shell/assets/{pegDiagram-XKGWAZYB-BVj2ocLM.js → pegDiagram-XKGWAZYB-CX4v7_Cz.js} +1 -1
  291. package/web-shell/assets/{pieDiagram-E7YTZNPT-CqycBMD_.js → pieDiagram-E7YTZNPT-BEGM4Uhg.js} +1 -1
  292. package/web-shell/assets/{quadrantDiagram-AXDQQJYC-DGxjjwg3.js → quadrantDiagram-AXDQQJYC-Ba0qSHpp.js} +1 -1
  293. package/web-shell/assets/{railroadDiagram-O6MQD6OU-RQ8WXYny.js → railroadDiagram-O6MQD6OU-Djx0ucJk.js} +1 -1
  294. package/web-shell/assets/{requirementDiagram-EFPCY7ZU-_e3s5Hgn.js → requirementDiagram-EFPCY7ZU-BbiwTBb_.js} +1 -1
  295. package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CmEhO3zf.js → sankeyDiagram-P5KCCOFB-BBpyS1HX.js} +1 -1
  296. package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-CRsFQVeP.js → sequenceDiagram-WJ2MYXX4-kFEvOWne.js} +1 -1
  297. package/web-shell/assets/{sizeCapture-X5ZJPWSS-DMEB3lYn.js → sizeCapture-X5ZJPWSS-CB0oeOds.js} +1 -1
  298. package/web-shell/assets/{stateDiagram-HBIQ2CUA-BU8XJpor.js → stateDiagram-HBIQ2CUA-BwMURXb5.js} +1 -1
  299. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DAoyfchD.js +1 -0
  300. package/web-shell/assets/{swimlanes-XN3QIQJK-CBmPyD4y.js → swimlanes-XN3QIQJK-Ch0xJvxW.js} +1 -1
  301. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-CpVOsDYq.js +8 -0
  302. package/web-shell/assets/{timeline-definition-24CTP7MA-CwA2ev3L.js → timeline-definition-24CTP7MA-Bg40ccS9.js} +1 -1
  303. package/web-shell/assets/{vennDiagram-4TSXK5OY-Ch2u9zkB.js → vennDiagram-4TSXK5OY-BhzjF8v1.js} +1 -1
  304. package/web-shell/assets/{wardleyDiagram-VM6X3IG4-B38eLQRf.js → wardleyDiagram-VM6X3IG4-15nlc60e.js} +1 -1
  305. package/web-shell/assets/{xychartDiagram-S5SC5T6Z-Cfn-9AoE.js → xychartDiagram-S5SC5T6Z-DbK_zL_2.js} +1 -1
  306. package/web-shell/index.html +1 -1
  307. package/web-shell/sw.js +1 -1
  308. package/web-shell/assets/channel-B3t7nnzY.js +0 -1
  309. package/web-shell/assets/classDiagram-DTDB5LWJ-ljQfduvv.js +0 -1
  310. package/web-shell/assets/classDiagram-v2-JRS7N3AN-ljQfduvv.js +0 -1
  311. package/web-shell/assets/stateDiagram-v2-4QOOHH4V-C7nQPPx2.js +0 -1
  312. package/web-shell/assets/swimlanesDiagram-VK2B7HYN-Cwu8boHh.js +0 -8
  313. package/chunks/{chunk-QOAAXVS4.js → chunk-DUHNRPAF.js} +3 -3
  314. package/chunks/{chunk-BAGPD67C.js → chunk-H4GDMMIG.js} +3 -3
  315. package/chunks/{chunk-YSZCVSC3.js → chunk-YZBNAMA2.js} +0 -0
  316. package/chunks/{container-execution-environment-INYC74GN.js → container-execution-environment-O2I5SDUH.js} +3 -3
@@ -6,13 +6,13 @@ import {
6
6
  import {
7
7
  TUI_CHAT_RECORDING_FAILURE_MESSAGE,
8
8
  reportChatRecordingFailureToAdapter
9
- } from "./chunk-EQUQD6PI.js";
9
+ } from "./chunk-6FMGYIYJ.js";
10
10
  import {
11
11
  StreamJsonOutputAdapter
12
- } from "./chunk-374632MF.js";
12
+ } from "./chunk-275M4OBK.js";
13
13
  import {
14
14
  startPostRenderPrefetches
15
- } from "./chunk-M7FKRX7E.js";
15
+ } from "./chunk-2XICKCAO.js";
16
16
  import {
17
17
  AboutBox,
18
18
  BaseSelectionList,
@@ -76,7 +76,6 @@ import {
76
76
  hyperlinkAtCell,
77
77
  initialExtensionUpdatesState,
78
78
  isDeletionKey,
79
- isOrganizaOneAccountLogin,
80
79
  isPrintableSearchChar,
81
80
  keyMatchers,
82
81
  layoutRowForEvent,
@@ -113,7 +112,7 @@ import {
113
112
  useUIActions,
114
113
  useUIState,
115
114
  useVirtualViewport
116
- } from "./chunk-XZHQQWL7.js";
115
+ } from "./chunk-QVJIOVF5.js";
117
116
  import {
118
117
  CATEGORY_LABELS,
119
118
  ICON,
@@ -135,25 +134,25 @@ import {
135
134
  showsToolLabel,
136
135
  useStreamingContext,
137
136
  waitForGoalRuntime
138
- } from "./chunk-NZ4NQDZ6.js";
137
+ } from "./chunk-YXLCNZ7S.js";
139
138
  import {
140
139
  stopAndGetCapturedInput
141
140
  } from "./chunk-VFLUNXD6.js";
142
141
  import {
143
142
  useAutoAcceptIndicator
144
- } from "./chunk-COZTQ5V5.js";
143
+ } from "./chunk-UE5DVT36.js";
145
144
  import {
146
145
  KeypressProvider,
147
146
  useFocus,
148
147
  useKeypress,
149
148
  useKeypressContext
150
- } from "./chunk-XRA56BYR.js";
149
+ } from "./chunk-BTA2NW65.js";
151
150
  import {
152
151
  MAX_ACCEPTED_BACKLOG,
153
152
  PeerMessaging,
154
153
  classifyApiError,
155
154
  fireSessionDeleteHook
156
- } from "./chunk-N3PNXNLT.js";
155
+ } from "./chunk-I2J5M75F.js";
157
156
  import {
158
157
  MAX_SUGGESTIONS_TO_SHOW,
159
158
  SESSION_MENTION_PREFIX,
@@ -166,7 +165,7 @@ import {
166
165
  normalizeDescription,
167
166
  normalizePartList,
168
167
  resolveAtCommandQuery
169
- } from "./chunk-DLKZRSBX.js";
168
+ } from "./chunk-APMMNPWA.js";
170
169
  import {
171
170
  BuiltinCommandLoader,
172
171
  BundledSkillLoader,
@@ -223,7 +222,7 @@ import {
223
222
  resolveOutputStyleChoice,
224
223
  serializeUserPromptExpansionPrompt,
225
224
  supportsMatchers
226
- } from "./chunk-NW53GCAC.js";
225
+ } from "./chunk-RCVPNZFY.js";
227
226
  import {
228
227
  EXTENSION_RELOAD_FAILED_REASON,
229
228
  ExtensionRefreshState,
@@ -231,7 +230,7 @@ import {
231
230
  cleanupReviewWorktreeLeases,
232
231
  loadHierarchicalMemory,
233
232
  openRemoteSession
234
- } from "./chunk-Y33VBQHJ.js";
233
+ } from "./chunk-J5NHGFHB.js";
235
234
  import {
236
235
  BRAND,
237
236
  MAX_EXTENSION_OWNER_LABEL_WIDTH,
@@ -241,14 +240,14 @@ import {
241
240
  getEffectiveSupportedModes,
242
241
  repoDocUrl,
243
242
  skillOriginLabel
244
- } from "./chunk-ZE44AQDR.js";
243
+ } from "./chunk-JZZCOULA.js";
245
244
  import {
246
245
  contextUsageLabel,
247
246
  formatDuration,
248
247
  formatPercentageUsed,
249
248
  formatRelativeTime,
250
249
  formatTokenCount
251
- } from "./chunk-MVYJ7RV2.js";
250
+ } from "./chunk-Y6XW6ZBE.js";
252
251
  import {
253
252
  disableKittyProtocol,
254
253
  isKittyProtocolEnabled,
@@ -267,11 +266,12 @@ import {
267
266
  oscKittyNotify,
268
267
  saveClipboardImage,
269
268
  writeOsc52
270
- } from "./chunk-Q7ZCOZFW.js";
269
+ } from "./chunk-CZG6DZZH.js";
271
270
  import {
272
271
  sanitizeDisplayText
273
- } from "./chunk-PD6BR2JC.js";
272
+ } from "./chunk-OVK563DU.js";
274
273
  import "./chunk-AHKE26WU.js";
274
+ import "./chunk-BKEQFZ3K.js";
275
275
  import "./chunk-UMIHM32I.js";
276
276
  import {
277
277
  TOP_FRAME,
@@ -306,6 +306,7 @@ import {
306
306
  import {
307
307
  require_react
308
308
  } from "./chunk-2KK65OQ6.js";
309
+ import "./chunk-S7G552VN.js";
309
310
  import "./chunk-G4YDGSSX.js";
310
311
  import {
311
312
  MAX_INLINE_IMAGES_PER_ITEM,
@@ -314,14 +315,13 @@ import {
314
315
  } from "./chunk-KIN34HCU.js";
315
316
  import {
316
317
  setUpdateHandler
317
- } from "./chunk-F4GW667E.js";
318
+ } from "./chunk-OPMQQPVT.js";
318
319
  import {
319
320
  isHistoryItemVisibleAfterRestore
320
321
  } from "./chunk-64WBFX5X.js";
321
- import "./chunk-LCR4BSNG.js";
322
+ import "./chunk-6GX676WS.js";
322
323
  import "./chunk-7DQWDZUQ.js";
323
324
  import "./chunk-KD7GIK2D.js";
324
- import "./chunk-5ZB5VWWJ.js";
325
325
  import {
326
326
  AUTO_THEME_NAME,
327
327
  DEFAULT_THEME,
@@ -330,27 +330,27 @@ import {
330
330
  import {
331
331
  requestConsentInteractive,
332
332
  requestConsentOrFail
333
- } from "./chunk-3OEPXLJY.js";
333
+ } from "./chunk-AJ3DGQKK.js";
334
334
  import "./chunk-XZ3MQL2U.js";
335
335
  import {
336
336
  getErrorMessage as getErrorMessage2
337
- } from "./chunk-BWG46GHG.js";
337
+ } from "./chunk-L4VKVFNI.js";
338
338
  import {
339
339
  relaunchApp
340
- } from "./chunk-W34TSFFO.js";
340
+ } from "./chunk-JBHZH3PC.js";
341
341
  import "./chunk-XG36NMOI.js";
342
342
  import "./chunk-SPLQKNEP.js";
343
- import "./chunk-FXR7OHQM.js";
344
- import "./chunk-OW5FL4TK.js";
345
- import "./chunk-QIPHWJE4.js";
343
+ import "./chunk-VYJBEVMW.js";
344
+ import "./chunk-VRJY2FUR.js";
346
345
  import "./chunk-LXUIOY3M.js";
347
346
  import {
348
347
  openDashScopeAsrRealtimeStream,
349
348
  openVoiceStream,
350
349
  openVoiceStreamWithRetry
351
350
  } from "./chunk-MTSHGY6F.js";
352
- import "./chunk-STKTI6A4.js";
353
- import "./chunk-FRSSQFFA.js";
351
+ import "./chunk-2Z33L25G.js";
352
+ import "./chunk-LL7XM3LM.js";
353
+ import "./chunk-Y2TQ2S56.js";
354
354
  import {
355
355
  cpLen,
356
356
  cpSlice,
@@ -367,7 +367,7 @@ import {
367
367
  stringWidth
368
368
  } from "./chunk-F5IN4KK7.js";
369
369
  import "./chunk-ZCZKKAIG.js";
370
- import "./chunk-LL7XM3LM.js";
370
+ import "./chunk-ZWXTCEPP.js";
371
371
  import {
372
372
  isValidSessionId
373
373
  } from "./chunk-KQCQCJBL.js";
@@ -377,45 +377,44 @@ import {
377
377
  isStreamingVoiceModel,
378
378
  resolveVoiceStreamConfig,
379
379
  transcribeVoiceAudio
380
- } from "./chunk-FHTFTKC6.js";
380
+ } from "./chunk-CQZKVV7A.js";
381
381
  import {
382
382
  formatUnsupportedVoiceModelMessage,
383
383
  isSelectableVoiceModel
384
- } from "./chunk-6DH6MBN3.js";
384
+ } from "./chunk-C6EULC74.js";
385
385
  import "./chunk-TESN7CJW.js";
386
- import "./chunk-ZWXTCEPP.js";
387
386
  import {
388
387
  REASONING_EFFORT_DEFAULT,
389
388
  getReasoningEffortsForConfig,
390
389
  getReasoningForDisplay
391
- } from "./chunk-K3B6HYHT.js";
390
+ } from "./chunk-TOHP6TCL.js";
392
391
  import {
393
392
  buildHigherDisabled,
394
393
  computeWorkspaceSkillListUpdates,
395
394
  skillSettingStrings
396
- } from "./chunk-Q5CQXESD.js";
395
+ } from "./chunk-I5INQP6E.js";
397
396
  import "./chunk-W2R46PFD.js";
398
397
  import {
399
398
  createLoadedSettingsAdapter,
400
399
  getRawModelProviders
401
- } from "./chunk-GGL2H4QS.js";
400
+ } from "./chunk-SWMFQ5LO.js";
402
401
  import {
403
402
  getExtendedSystemInfo
404
- } from "./chunk-SJGGWEKA.js";
405
- import "./chunk-6UQIU4EJ.js";
403
+ } from "./chunk-MGODVF72.js";
404
+ import "./chunk-X4TQXVEZ.js";
406
405
  import "./chunk-QTAUA6ED.js";
407
406
  import "./chunk-LPCPB2S5.js";
408
407
  import "./chunk-LD2T7YET.js";
409
408
  import "./chunk-O7MSLRFZ.js";
410
409
  import "./chunk-W3YES77O.js";
411
- import "./chunk-TFFOK3SJ.js";
412
- import "./chunk-FCNDMMJU.js";
410
+ import "./chunk-RNEMD6QU.js";
411
+ import "./chunk-ZXAN2CZR.js";
413
412
  import {
414
413
  isInlineModelOverrideAllowed
415
- } from "./chunk-CNEBV4KX.js";
414
+ } from "./chunk-XRCCYNUO.js";
416
415
  import {
417
416
  loadMcpApprovals
418
- } from "./chunk-OLM75BL6.js";
417
+ } from "./chunk-MLC6KXZV.js";
419
418
  import {
420
419
  CORRUPTED_SUFFIX,
421
420
  SettingScope,
@@ -438,7 +437,7 @@ import {
438
437
  settingExistsInScope,
439
438
  validateSettingValue,
440
439
  writeOutputLanguageAndRegisterPath
441
- } from "./chunk-UI4TGIWA.js";
440
+ } from "./chunk-K2FOIXZ5.js";
442
441
  import {
443
442
  LOGO_ANIMATIONS,
444
443
  LOGO_FRAME_MS,
@@ -448,41 +447,38 @@ import {
448
447
  pickLogoAnimation,
449
448
  renderLogoRows,
450
449
  restFrame
451
- } from "./chunk-RSC5X5CC.js";
450
+ } from "./chunk-EZ27V5MZ.js";
452
451
  import "./chunk-EDRKBK4B.js";
453
- import "./chunk-365RIODD.js";
454
- import {
455
- require_semver
456
- } from "./chunk-U4T5CWGD.js";
457
- import "./chunk-PHTNY4JK.js";
458
- import "./chunk-2JJLDP4A.js";
459
- import "./chunk-MLAF3GLB.js";
460
452
  import {
461
453
  getCurrentLanguage,
462
454
  localizeToolDisplayName,
463
455
  t,
464
456
  ta
465
- } from "./chunk-A2KXNBRR.js";
457
+ } from "./chunk-AS3WO2ZW.js";
466
458
  import "./chunk-Q2V34OV7.js";
459
+ import "./chunk-OAAOCEVM.js";
460
+ import {
461
+ require_semver
462
+ } from "./chunk-U4T5CWGD.js";
463
+ import "./chunk-PHTNY4JK.js";
464
+ import "./chunk-2JJLDP4A.js";
465
+ import "./chunk-MLAF3GLB.js";
467
466
  import "./chunk-CJ7JDQEG.js";
468
467
  import "./chunk-CS4CELQI.js";
469
468
  import "./chunk-FMWE3YMM.js";
470
469
  import {
471
470
  formatVersionLabel,
472
471
  getCliVersion
473
- } from "./chunk-B3BZBKAK.js";
472
+ } from "./chunk-VINUVVAI.js";
474
473
  import "./chunk-Y75AMWDB.js";
475
474
  import "./chunk-FRITN2AG.js";
476
475
  import "./chunk-F4S6U26O.js";
477
476
  import {
478
477
  isWorkspaceTrusted,
479
478
  loadTrustedFolders
480
- } from "./chunk-LZ2EZKJA.js";
479
+ } from "./chunk-ZHNI4QK6.js";
481
480
  import "./chunk-BHXBXELA.js";
482
481
  import "./chunk-MXCWSDSC.js";
483
- import {
484
- require_strip_json_comments
485
- } from "./chunk-YCZIOHKD.js";
486
482
  import {
487
483
  AsyncFzf,
488
484
  AutonomousLoopTickResolver,
@@ -524,16 +520,19 @@ import {
524
520
  subagentGenerator,
525
521
  supportsHyperlinks,
526
522
  wrapForMultiplexer
527
- } from "./chunk-OMHVL22G.js";
523
+ } from "./chunk-B5I3IUHG.js";
528
524
  import "./chunk-MYMATZAY.js";
529
525
  import "./chunk-6IFQXZTP.js";
526
+ import {
527
+ require_strip_json_comments
528
+ } from "./chunk-YCZIOHKD.js";
530
529
  import "./chunk-YO3SEHXM.js";
531
530
  import {
532
531
  clearWorktreeSession,
533
532
  isSessionRuntimeActive,
534
533
  readWorktreeSession,
535
534
  restoreWorktreeContext
536
- } from "./chunk-GQ2KSD3A.js";
535
+ } from "./chunk-5F56IIHO.js";
537
536
  import "./chunk-4JDEAIW5.js";
538
537
  import {
539
538
  PEER_ADMISSION_LIMITS,
@@ -542,12 +541,12 @@ import {
542
541
  describeHoldCause,
543
542
  parseHeldExpiry
544
543
  } from "./chunk-AEGEUWVC.js";
545
- import "./chunk-5OGI74MG.js";
544
+ import "./chunk-7ASCNDOR.js";
546
545
  import "./chunk-VT3TJFQR.js";
547
- import "./chunk-HTC6ZV55.js";
546
+ import "./chunk-ZPZPI63H.js";
548
547
  import "./chunk-WK44MSGW.js";
549
- import "./chunk-F7VSO6O5.js";
550
- import "./chunk-PUUMQ7PY.js";
548
+ import "./chunk-C7QKP7FW.js";
549
+ import "./chunk-COMBBGHN.js";
551
550
  import "./chunk-ZMZRVR62.js";
552
551
  import "./chunk-NWCDFCWK.js";
553
552
  import {
@@ -555,17 +554,17 @@ import {
555
554
  isToolHiddenBehindToolSearch,
556
555
  resolveWorkflowAuthoringSurface,
557
556
  toolSearchBridgeSentence
558
- } from "./chunk-S6V24RNM.js";
559
- import "./chunk-VPFTCMMK.js";
560
- import "./chunk-P7LX2GT4.js";
557
+ } from "./chunk-52G2UZZU.js";
558
+ import "./chunk-XOVXSDNN.js";
559
+ import "./chunk-7UEP4GNM.js";
561
560
  import "./chunk-DQZYZDIL.js";
562
- import "./chunk-4TNDXCEE.js";
561
+ import "./chunk-QVMFV3XM.js";
563
562
  import "./chunk-F3FKDGHN.js";
564
- import "./chunk-N7WTXDQE.js";
563
+ import "./chunk-WGFFYBV3.js";
565
564
  import "./chunk-UBWL27PO.js";
566
565
  import "./chunk-DM6W2QYB.js";
567
566
  import "./chunk-UAACCQBD.js";
568
- import "./chunk-776VI66O.js";
567
+ import "./chunk-H5AU3734.js";
569
568
  import {
570
569
  ConditionalRulesRegistry,
571
570
  CoreToolScheduler,
@@ -627,12 +626,13 @@ import {
627
626
  saveWorkflowScript,
628
627
  updateSetting,
629
628
  validateWorkflowName
630
- } from "./chunk-IGL2VEKL.js";
629
+ } from "./chunk-RKYOZTZO.js";
631
630
  import "./chunk-FNALBCC7.js";
632
631
  import "./chunk-BZOAEOYF.js";
633
632
  import "./chunk-BIDB75DA.js";
634
633
  import "./chunk-GYGA6V6B.js";
635
634
  import "./chunk-EYWIFUPJ.js";
635
+ import "./chunk-MZI6FDZT.js";
636
636
  import "./chunk-7H3GWNGJ.js";
637
637
  import "./chunk-X427DWFD.js";
638
638
  import {
@@ -644,13 +644,12 @@ import {
644
644
  resolveBranchName,
645
645
  watchRepoBranch,
646
646
  writeRuntimeStatus
647
- } from "./chunk-65JWVPGE.js";
647
+ } from "./chunk-5ZVLINFZ.js";
648
648
  import "./chunk-DJOP5LOE.js";
649
649
  import {
650
650
  openBrowserSecurely,
651
651
  shouldLaunchBrowser
652
- } from "./chunk-2LHQQK25.js";
653
- import "./chunk-MZI6FDZT.js";
652
+ } from "./chunk-FDNTWDR3.js";
654
653
  import {
655
654
  parseCron
656
655
  } from "./chunk-4MSX3ERA.js";
@@ -669,50 +668,52 @@ import {
669
668
  elapsedActiveTime,
670
669
  goalPauseReasonForFailure,
671
670
  goalRequiresExactPermit
672
- } from "./chunk-4X3MIKOZ.js";
673
- import "./chunk-NQTVSCZM.js";
671
+ } from "./chunk-JOBNLOEW.js";
672
+ import "./chunk-2S3W2BIT.js";
673
+ import "./chunk-TC7UXK4M.js";
674
674
  import "./chunk-DS3COGEF.js";
675
675
  import {
676
676
  resolveModelId
677
- } from "./chunk-GTEHJDDF.js";
677
+ } from "./chunk-OYDDO6OG.js";
678
678
  import {
679
679
  glob
680
680
  } from "./chunk-4ESI3MQ5.js";
681
681
  import "./chunk-SYMKXR42.js";
682
682
  import "./chunk-JOBZWTVK.js";
683
683
  import "./chunk-CDYMT4OZ.js";
684
- import "./chunk-TC7UXK4M.js";
685
684
  import "./chunk-HPQNI3OQ.js";
686
- import "./chunk-YOBDFGGI.js";
685
+ import "./chunk-LCZW6GXU.js";
686
+ import "./chunk-DVPQSDMD.js";
687
687
  import "./chunk-CI2ZHR5C.js";
688
688
  import {
689
689
  ShellExecutionService,
690
690
  isSignalTermination
691
- } from "./chunk-4OUIZHHJ.js";
691
+ } from "./chunk-5TQYTWUK.js";
692
692
  import {
693
693
  stripAnsi
694
694
  } from "./chunk-WU3R2YUE.js";
695
695
  import {
696
696
  formatMemoryUsage
697
697
  } from "./chunk-M7AWQAB7.js";
698
+ import {
699
+ resolveBundleDir
700
+ } from "./chunk-Z2IHOXIK.js";
698
701
  import {
699
702
  promptIdContext
700
703
  } from "./chunk-5JTXPGNQ.js";
701
- import "./chunk-J5UW3SF4.js";
702
704
  import {
703
- resolveBundleDir
704
- } from "./chunk-Z2IHOXIK.js";
705
+ escapeShellArg
706
+ } from "./chunk-ICS5D7OZ.js";
705
707
  import "./chunk-5QSLFAMR.js";
706
- import "./chunk-UNY7AZRV.js";
707
- import "./chunk-Z5VNJAKT.js";
708
+ import "./chunk-5PRQVH45.js";
708
709
  import "./chunk-4LCUE7BN.js";
709
710
  import "./chunk-RIN7SNJN.js";
710
711
  import "./chunk-GVWQRVLV.js";
711
712
  import "./chunk-4J6KRUQB.js";
712
- import "./chunk-P4F73WS7.js";
713
+ import "./chunk-7LFCBMVX.js";
713
714
  import {
714
715
  parseRule
715
- } from "./chunk-NOL6NAWN.js";
716
+ } from "./chunk-OJSW65PQ.js";
716
717
  import {
717
718
  APPROVAL_MODES
718
719
  } from "./chunk-KQAVEXYD.js";
@@ -731,27 +732,39 @@ import "./chunk-RCZHQZJJ.js";
731
732
  import "./chunk-6YS3YH6O.js";
732
733
  import "./chunk-OSMXNPJP.js";
733
734
  import "./chunk-HX6AICAX.js";
734
- import "./chunk-WVLNOFJ4.js";
735
+ import "./chunk-QWKLEJEY.js";
735
736
  import {
736
737
  runOutsideAgentContext
737
- } from "./chunk-FJAZPBX2.js";
738
+ } from "./chunk-V75J4GJ2.js";
738
739
  import "./chunk-FOZEB37P.js";
740
+ import {
741
+ getStartupContextLength
742
+ } from "./chunk-ZQBNP2ZQ.js";
743
+ import "./chunk-YCTMVTDP.js";
744
+ import "./chunk-JSFADKTB.js";
745
+ import "./chunk-OHAUN3Q5.js";
746
+ import {
747
+ isPathWithinRoot
748
+ } from "./chunk-O7QDVXNJ.js";
749
+ import {
750
+ HOOKS_CONFIG_FIELDS
751
+ } from "./chunk-SRFL3HFU.js";
739
752
  import "./chunk-BQAZCJF7.js";
740
753
  import "./chunk-2QYMJSSC.js";
741
754
  import "./chunk-AVCUVYSA.js";
742
755
  import "./chunk-65B6QBMP.js";
743
756
  import "./chunk-O4IWNFDK.js";
757
+ import "./chunk-WMJL2XAM.js";
744
758
  import {
745
759
  fetchKeyInfo,
746
760
  onLowRateLimit
747
- } from "./chunk-S5H4RJ5J.js";
761
+ } from "./chunk-LZQYRRU3.js";
748
762
  import "./chunk-TC2TJAOF.js";
749
- import "./chunk-WMJL2XAM.js";
750
763
  import "./chunk-CP63SY5N.js";
751
764
  import {
752
765
  resolveReasoningForModel
753
- } from "./chunk-KVYQVMWW.js";
754
- import "./chunk-55BVGW3L.js";
766
+ } from "./chunk-2HEFHPUO.js";
767
+ import "./chunk-U3KIMPCC.js";
755
768
  import {
756
769
  ApiCancelEvent,
757
770
  AuthEvent,
@@ -790,7 +803,7 @@ import {
790
803
  runVisionBridge,
791
804
  shouldRunVisionBridge,
792
805
  splitImageParts
793
- } from "./chunk-ZGPPP7FC.js";
806
+ } from "./chunk-WN23CFGN.js";
794
807
  import "./chunk-242JUBPM.js";
795
808
  import {
796
809
  DEFAULT_CONTEXT_FILENAME,
@@ -798,6 +811,7 @@ import {
798
811
  getUnsupportedImageFormatWarning,
799
812
  isSupportedImageMimeType
800
813
  } from "./chunk-ROO6F2BT.js";
814
+ import "./chunk-3CMX5LCG.js";
801
815
  import {
802
816
  AUTO_MEMORY_INDEX_FILENAME,
803
817
  getAutoMemoryProjectStateDir,
@@ -809,40 +823,27 @@ import "./chunk-GADK6OTE.js";
809
823
  import {
810
824
  runSideQuery
811
825
  } from "./chunk-IC57EPC7.js";
812
- import "./chunk-3CMX5LCG.js";
813
826
  import {
814
827
  clampInlineMediaPart
815
828
  } from "./chunk-VEJCE7UR.js";
816
829
  import "./chunk-R7FX7HIR.js";
817
830
  import "./chunk-V4XETRAG.js";
818
831
  import "./chunk-ABTPVII7.js";
832
+ import "./chunk-HOPKSSYR.js";
819
833
  import "./chunk-FFUKRRCR.js";
820
834
  import "./chunk-23AFREUQ.js";
821
- import "./chunk-HOPKSSYR.js";
822
835
  import "./chunk-IQEM74QW.js";
823
836
  import {
824
837
  endInteractionSpan,
825
838
  getActiveInteractionSpan,
826
839
  redactUrlCredentials
827
- } from "./chunk-SPTU3FVH.js";
840
+ } from "./chunk-JFO6OCHQ.js";
828
841
  import {
829
842
  isBinary,
830
843
  stripAnsiAndControl
831
844
  } from "./chunk-FKI7XUZK.js";
832
845
  import "./chunk-EPSJPAHV.js";
833
846
  import "./chunk-2MXORWOC.js";
834
- import {
835
- getStartupContextLength
836
- } from "./chunk-ZRO2FPEP.js";
837
- import "./chunk-YCTMVTDP.js";
838
- import {
839
- HOOKS_CONFIG_FIELDS
840
- } from "./chunk-SRFL3HFU.js";
841
- import "./chunk-JSFADKTB.js";
842
- import "./chunk-OHAUN3Q5.js";
843
- import {
844
- isPathWithinRoot
845
- } from "./chunk-O7QDVXNJ.js";
846
847
  import {
847
848
  isShellProgressData
848
849
  } from "./chunk-JOFGX5ZA.js";
@@ -852,18 +853,55 @@ import {
852
853
  ToolDisplayNames,
853
854
  ToolNames
854
855
  } from "./chunk-IWYGXAQU.js";
856
+ import {
857
+ LOCAL_API_KEY_PLACEHOLDER,
858
+ ORGANIZAONE_ENV_KEY,
859
+ applyProviderInstallPlan,
860
+ buildInstallPlan,
861
+ credentialIdForProvider,
862
+ customProvider,
863
+ findExistingProviderModels,
864
+ findProviderByCredentials,
865
+ findProviderById,
866
+ getDefaultBaseUrlForProtocol,
867
+ getDefaultModelIds,
868
+ getMenuRows,
869
+ getModelsForProviderProtocol,
870
+ isImageGenerationCapable,
871
+ isOrganizaOneBaseUrl,
872
+ organizaoneO1gwProvider,
873
+ organizaoneProvider,
874
+ probeLocalServers,
875
+ reachesOrganizaOne,
876
+ readSavedApiKey,
877
+ removeCredential,
878
+ requiresApiKey,
879
+ resolveBaseUrl,
880
+ resolveModelProtocol,
881
+ resolveSavedModelApiKey,
882
+ shouldShowStep,
883
+ withdrawExportedCredential
884
+ } from "./chunk-TYOWBAXR.js";
885
+ import {
886
+ DEFAULT_TOKEN_LIMIT,
887
+ REASONING_EFFORT_TIERS,
888
+ clampReasoningEffort,
889
+ parseModelReasoningCapabilities,
890
+ reasoningEffortsForCapability
891
+ } from "./chunk-72EBG4FJ.js";
855
892
  import "./chunk-WPZM4XOT.js";
856
893
  import {
857
894
  FinishReason
858
- } from "./chunk-3D2STYD6.js";
895
+ } from "./chunk-VYRPAY75.js";
859
896
  import "./chunk-S7GOFMLU.js";
860
- import "./chunk-4OYKNMRP.js";
897
+ import "./chunk-RC67CA5Z.js";
898
+ import "./chunk-VWZOXOSR.js";
861
899
  import "./chunk-HHIX6THS.js";
862
900
  import "./chunk-O6GD6SFV.js";
863
901
  import {
864
902
  registerCleanup,
865
903
  runExitCleanup
866
- } from "./chunk-NGEXSHEP.js";
904
+ } from "./chunk-JUWZD2PN.js";
867
905
  import {
868
906
  finalizeStartupProfile,
869
907
  profileCheckpoint
@@ -875,6 +913,7 @@ import {
875
913
  writeStderrLineSafe,
876
914
  writeStdoutLine
877
915
  } from "./chunk-RANA4SOY.js";
916
+ import "./chunk-AK6T4SJC.js";
878
917
  import "./chunk-KMWAEX43.js";
879
918
  import "./chunk-EVC2HZ5T.js";
880
919
  import {
@@ -889,47 +928,12 @@ import {
889
928
  import {
890
929
  atomicWriteFileSync
891
930
  } from "./chunk-EPJAMNLS.js";
892
- import "./chunk-7TK6OY2J.js";
893
- import {
894
- LOCAL_API_KEY_PLACEHOLDER,
895
- ORGANIZAONE_ENV_KEY,
896
- applyProviderInstallPlan,
897
- buildInstallPlan,
898
- credentialIdForProvider,
899
- customProvider,
900
- findExistingProviderModels,
901
- findProviderByCredentials,
902
- findProviderById,
903
- getDefaultBaseUrlForProtocol,
904
- getDefaultModelIds,
905
- getMenuRows,
906
- getModelsForProviderProtocol,
907
- isImageGenerationCapable,
908
- isOrganizaOneBaseUrl,
909
- organizaoneLoginProvider,
910
- organizaoneProvider,
911
- probeLocalServers,
912
- reachesOrganizaOne,
913
- readSavedApiKey,
914
- removeCredential,
915
- requiresApiKey,
916
- resolveBaseUrl,
917
- resolveSavedModelApiKey,
918
- shouldShowStep,
919
- withdrawExportedCredential
920
- } from "./chunk-4YGPL24Z.js";
921
- import {
922
- DEFAULT_TOKEN_LIMIT,
923
- REASONING_EFFORT_TIERS,
924
- clampReasoningEffort,
925
- parseModelReasoningCapabilities,
926
- reasoningEffortsForCapability
927
- } from "./chunk-72EBG4FJ.js";
928
931
  import {
929
932
  MAINLINE_CODER_MODEL
930
- } from "./chunk-XYJRLDOC.js";
933
+ } from "./chunk-DWQZQDYY.js";
931
934
  import "./chunk-LEXKU5FI.js";
932
935
  import "./chunk-HDGYCLNB.js";
936
+ import "./chunk-7TK6OY2J.js";
933
937
  import {
934
938
  createDebugLogger,
935
939
  isDebugLogFileEnabled,
@@ -3024,8 +3028,8 @@ var Notices = /* @__PURE__ */ __name(({
3024
3028
  ] })
3025
3029
  ] });
3026
3030
  }, "Notices");
3027
- var PathText = /* @__PURE__ */ __name(({ path: path15, room }) => {
3028
- const { parent, name } = fitPath(path15, room);
3031
+ var PathText = /* @__PURE__ */ __name(({ path: path14, room }) => {
3032
+ const { parent, name } = fitPath(path14, room);
3029
3033
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Text, { children: [
3030
3034
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { color: extendedTheme.text.muted, children: parent }),
3031
3035
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { color: theme.text.primary, bold: true, children: name })
@@ -3044,7 +3048,7 @@ var Header = /* @__PURE__ */ __name(({
3044
3048
  const tier = getLayoutTier(columns);
3045
3049
  const marginX = sideMargin(tier);
3046
3050
  const width = Math.max(0, columns - marginX * 2);
3047
- const path15 = process.platform === "win32" ? workingDirectory : tildeifyPath(workingDirectory);
3051
+ const path14 = process.platform === "win32" ? workingDirectory : tildeifyPath(workingDirectory);
3048
3052
  const versionText = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Text, { bold: true, color: extendedTheme.text.muted, children: `${formatVersionLabel(version)} \xB7 ${organization.toUpperCase()}` });
3049
3053
  const notices = /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3050
3054
  Notices,
@@ -3062,11 +3066,11 @@ var Header = /* @__PURE__ */ __name(({
3062
3066
  return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(Box_default, { flexDirection: "column", marginX, width, children: [
3063
3067
  row("logo", /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(O1Wordmark, {}), versionText),
3064
3068
  row("notices", null, notices),
3065
- row("path", null, /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PathText, { path: path15, room: width }))
3069
+ row("path", null, /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(PathText, { path: path14, room: width }))
3066
3070
  ] });
3067
3071
  }
3068
3072
  const hints = hintItems(tier);
3069
- const folderWidth = getCachedStringWidth(fitPath(path15, 0).name);
3073
+ const folderWidth = getCachedStringWidth(fitPath(path14, 0).name);
3070
3074
  while (hints.length > 0 && hintsWidth(hints) + 3 + folderWidth > width) {
3071
3075
  hints.pop();
3072
3076
  }
@@ -3090,7 +3094,7 @@ var Header = /* @__PURE__ */ __name(({
3090
3094
  /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
3091
3095
  PathText,
3092
3096
  {
3093
- path: path15,
3097
+ path: path14,
3094
3098
  room: hints.length > 0 ? width - hintsWidth(hints) - 3 : width
3095
3099
  }
3096
3100
  )
@@ -9451,8 +9455,8 @@ function SettingsDialog({
9451
9455
  displayValue2 = before + (cursorVisible ? renderSoftwareCursor(cursor) : cursor) + after;
9452
9456
  } else if (isNumericSettingType(item.type) || item.type === "string") {
9453
9457
  const isSubDialogSetting = item.value === "ui.theme" || item.value === "general.preferredEditor" || item.value === "fastModel" || item.value === "visionModel";
9454
- const path15 = item.value.split(".");
9455
- const currentValue = getNestedValue(pendingSettings, path15);
9458
+ const path14 = item.value.split(".");
9459
+ const currentValue = getNestedValue(pendingSettings, path14);
9456
9460
  const defaultValue = getDefaultValue(item.value);
9457
9461
  const effectiveCurrentValue = currentValue !== void 0 && currentValue !== null ? currentValue : defaultValue;
9458
9462
  if (item.value === "general.outputLanguage" && isAutoLanguage(
@@ -10499,6 +10503,7 @@ __name(localPort, "localPort");
10499
10503
  var routeProtocol = /* @__PURE__ */ __name((proto, wireApi) => wireApi === "responses" ? "openai-responses" /* USE_OPENAI_RESPONSES */ : proto, "routeProtocol");
10500
10504
  function useProviderSetupFlow(onSubmit, modelProviders, providerProtocol, selection, rawModelProviders) {
10501
10505
  const [provider, setProvider] = (0, import_react38.useState)(null);
10506
+ const [modelDiscoveryConnection, setModelDiscoveryConnection] = (0, import_react38.useState)();
10502
10507
  const [visibleSteps, setVisibleSteps] = (0, import_react38.useState)([]);
10503
10508
  const [stepIndex, setStepIndex] = (0, import_react38.useState)(0);
10504
10509
  const [protocol, setProtocol] = (0, import_react38.useState)("openai" /* USE_OPENAI */);
@@ -10527,6 +10532,7 @@ function useProviderSetupFlow(onSubmit, modelProviders, providerProtocol, select
10527
10532
  const start = (0, import_react38.useCallback)(
10528
10533
  (config, initialProtocol, existingEnv, existingModelIds, options) => {
10529
10534
  setProvider(config);
10535
+ setModelDiscoveryConnection(options?.modelDiscoveryConnection);
10530
10536
  setKeyCheck(void 0);
10531
10537
  setCredentialExtras(void 0);
10532
10538
  validateModelIdsRef.current = options?.validateModelIds;
@@ -10910,6 +10916,7 @@ function useProviderSetupFlow(onSubmit, modelProviders, providerProtocol, select
10910
10916
  }, "buildPreview");
10911
10917
  const preview = currentStep === "review" ? buildPreview() : { json: "", error: "" };
10912
10918
  const state = {
10919
+ modelDiscoveryConnection,
10913
10920
  provider,
10914
10921
  step: currentStep,
10915
10922
  stepIndex: stepIndex + 1,
@@ -11980,8 +11987,8 @@ function DiscoveringModelIdsStep({
11980
11987
  const [snapshot, setSnapshot] = (0, import_react41.useState)(
11981
11988
  () => reusableCheck ? snapshotOf(reusableCheck, config.models ?? []) : null
11982
11989
  );
11983
- const baseUrl = flow.state.baseUrl;
11984
- const apiKey = flow.state.apiKey;
11990
+ const baseUrl = flow.state.modelDiscoveryConnection?.baseUrl ?? flow.state.baseUrl;
11991
+ const apiKey = flow.state.modelDiscoveryConnection?.apiKey ?? flow.state.apiKey;
11985
11992
  const protocol = protocolOf3(flow.state.protocol);
11986
11993
  const clientVersion = (0, import_react41.useContext)(AppContext)?.version;
11987
11994
  const requiresKey = requiresApiKey(config);
@@ -12902,7 +12909,7 @@ function AuthDialog() {
12902
12909
  local: [t("Local")],
12903
12910
  family: [t("API key"), family ? t(family.label) : ""]
12904
12911
  };
12905
- const path15 = viewLevel !== "provider-setup" ? menuPaths[viewLevel] : p ? [t(p.uiLabels?.flowTitle ?? p.label), getStepLabel(step, p)] : [t("Provider Setup")];
12912
+ const path14 = viewLevel !== "provider-setup" ? menuPaths[viewLevel] : p ? [t(p.uiLabels?.flowTitle ?? p.label), getStepLabel(step, p)] : [t("Provider Setup")];
12906
12913
  const position = getAuthStepPosition({
12907
12914
  screensBefore: viewStack.length,
12908
12915
  ...viewLevel === "provider-setup" ? { flow: { stepIndex, totalSteps } } : {}
@@ -12918,7 +12925,7 @@ function AuthDialog() {
12918
12925
  };
12919
12926
  }
12920
12927
  return {
12921
- viewPath: path15,
12928
+ viewPath: path14,
12922
12929
  stepText: position.total === void 0 ? t("step {{step}}", { step: String(position.step) }) : t("step {{step}} of {{total}}", {
12923
12930
  step: String(position.step),
12924
12931
  total: String(position.total)
@@ -14155,10 +14162,44 @@ function ModelListEditDialog({
14155
14162
  const [isKeyValid, setIsKeyValid] = (0, import_react46.useState)(false);
14156
14163
  const closeLatchRef = (0, import_react46.useRef)(false);
14157
14164
  const submitInFlightRef = (0, import_react46.useRef)(false);
14165
+ const [connection] = (0, import_react46.useState)(() => {
14166
+ const generator = config.getContentGeneratorConfig();
14167
+ if (!generator || !reachesOrganizaOne(generator) || !generator.authType) {
14168
+ throw new Error(
14169
+ "The active model does not use an OrganizaOne connection."
14170
+ );
14171
+ }
14172
+ const authType = generator.authType;
14173
+ const protocol = authType === "openai-responses" /* USE_OPENAI_RESPONSES */ ? "openai" /* USE_OPENAI */ : authType;
14174
+ const models = getModelsForProviderProtocol(
14175
+ settings.merged.modelProviders,
14176
+ generator.authType,
14177
+ settings.merged.providerProtocol
14178
+ );
14179
+ const active = models.find(
14180
+ (model) => model.id === config.getModel() && resolveModelProtocol(protocol, model) === authType && reachesOrganizaOne(model) && model.connection === generator.connection && (generator.connection || model.baseUrl === generator.baseUrl)
14181
+ );
14182
+ const preset = generator.connection ? organizaoneO1gwProvider : organizaoneProvider;
14183
+ const envKey = active ? active.envKey ?? "" : generator.apiKeyEnvKey ?? preset.envKey;
14184
+ const provider = {
14185
+ ...preset,
14186
+ protocolOptions: [protocol],
14187
+ ...active?.baseUrl ? {
14188
+ baseUrlByProtocol: {
14189
+ ...preset.baseUrlByProtocol,
14190
+ [protocol]: active.baseUrl
14191
+ }
14192
+ } : {},
14193
+ envKey,
14194
+ ...active?.credential ? { credentialId: active.credential } : {},
14195
+ ownsModel: /* @__PURE__ */ __name((model) => reachesOrganizaOne(model) && resolveModelProtocol(protocol, model) === authType && (!active?.baseUrl || model.baseUrl === active.baseUrl) && model.connection === generator.connection && (model.envKey ?? "") === envKey && model.credential === active?.credential, "ownsModel")
14196
+ };
14197
+ return { generator, active, provider };
14198
+ });
14158
14199
  const selection = {
14159
- authType: settings.merged.security?.auth?.selectedType,
14160
- id: settings.merged.model?.name,
14161
- baseUrl: settings.merged.model?.baseUrl
14200
+ authType: connection.generator.authType,
14201
+ id: config.getModel(),
14202
+ baseUrl: connection.active?.baseUrl
14162
14203
  };
14163
14204
  const submitEdit = (0, import_react46.useCallback)(
14164
14205
  async (providerConfig, inputs) => {
@@ -14167,7 +14208,7 @@ function ModelListEditDialog({
14167
14208
  const credential = organizaOneAccountCredential();
14168
14209
  const withTokenExtras = {
14169
14210
  ...inputs,
14170
- ...credential?.expiresAt !== void 0 ? {
14211
+ ...credential?.apiKey === connection.generator.apiKey && credential?.expiresAt !== void 0 ? {
14171
14212
  credentialExtras: {
14172
14213
  expiresAt: credential.expiresAt,
14173
14214
  ...credential.deviceName ? { deviceName: credential.deviceName } : {}
@@ -14185,7 +14226,16 @@ function ModelListEditDialog({
14185
14226
  ),
14186
14227
  selection
14187
14228
  );
14229
+ if (connection.active?.credential || connection.active?.envKey || connection.generator.connection || connection.generator.apiKeyEnvKey) {
14230
+ delete plan.credential;
14231
+ }
14232
+ plan.modelSelection = {
14233
+ modelId: config.getModel(),
14234
+ baseUrl: connection.active?.baseUrl ?? inputs.baseUrl
14235
+ };
14188
14236
  await applyProviderInstallPlan(plan, {
14237
+ keepOtherProviders: true,
14238
+ doRefreshAuth: false,
14189
14239
  settings: createLoadedSettingsAdapter(settings),
14190
14240
  reloadModelProviders: /* @__PURE__ */ __name((mp) => config.reloadModelProvidersConfig(mp), "reloadModelProviders"),
14191
14241
  syncAuthState: /* @__PURE__ */ __name((authType, modelId, baseUrl) => config.syncModelSelection(authType, modelId, baseUrl), "syncAuthState"),
@@ -14199,7 +14249,7 @@ function ModelListEditDialog({
14199
14249
  onSaved();
14200
14250
  },
14201
14251
  // eslint-disable-next-line react-hooks/exhaustive-deps -- selection is rebuilt from the same settings fields every render
14202
- [config, onSaved, settings]
14252
+ [config, connection, onSaved, settings]
14203
14253
  );
14204
14254
  const flow = useProviderSetupFlow(
14205
14255
  submitEdit,
@@ -14209,19 +14259,22 @@ function ModelListEditDialog({
14209
14259
  );
14210
14260
  (0, import_react46.useEffect)(() => {
14211
14261
  const saved = findExistingProviderModels(
14212
- organizaoneLoginProvider,
14262
+ connection.provider,
14213
14263
  settings.merged.modelProviders,
14214
14264
  settings.merged.providerProtocol,
14215
14265
  selection
14216
14266
  );
14217
- const builtInIds = new Set(getDefaultModelIds(organizaoneLoginProvider));
14218
14267
  flow.start(
14219
- organizaoneLoginProvider,
14220
- saved?.protocol ?? config.getContentGeneratorConfig?.()?.authType,
14268
+ connection.provider,
14269
+ connection.generator.authType,
14221
14270
  void 0,
14222
- saved ? saved.models.map((model) => model.id).filter((id) => !builtInIds.has(id)) : void 0,
14271
+ saved?.models.map((model) => model.id),
14223
14272
  {
14224
14273
  startAt: "models",
14274
+ modelDiscoveryConnection: {
14275
+ baseUrl: connection.generator.baseUrl ?? "",
14276
+ apiKey: connection.generator.apiKey ?? ""
14277
+ },
14225
14278
  validateModelIds: /* @__PURE__ */ __name((ids) => {
14226
14279
  const active = config.getModel();
14227
14280
  return active && !ids.includes(active) ? t(
@@ -14231,8 +14284,9 @@ function ModelListEditDialog({
14231
14284
  }, "validateModelIds")
14232
14285
  }
14233
14286
  );
14234
- const credential = organizaOneAccountCredential();
14235
- if (credential?.apiKey) flow.changeApiKey(credential.apiKey);
14287
+ if (!connection.generator.connection && connection.generator.apiKey) {
14288
+ flow.changeApiKey(connection.generator.apiKey);
14289
+ }
14236
14290
  }, []);
14237
14291
  useKeypress(
14238
14292
  (key) => {
@@ -14581,7 +14635,7 @@ function ModelDialog({
14581
14635
  const preferredModelId = isFastModelMode && parsedFastModelSetting ? parsedFastModelSetting.modelId : isVisionModelMode && parsedVisionModelSetting ? parsedVisionModelSetting.modelId : isImageModelMode && parsedImageModelSetting ? parsedImageModelSetting.modelId : config?.getModel() || MAINLINE_CODER_MODEL;
14582
14636
  const isAuxiliaryModelMode = isFastModelMode || isVoiceModelMode || isVisionModelMode || isCompactionModelMode || isImageModelMode;
14583
14637
  const canEditModelList = (0, import_react47.useMemo)(
14584
- () => !isAuxiliaryModelMode && isOrganizaOneAccountLogin(config?.getContentGeneratorConfig?.()?.apiKey),
14638
+ () => !isAuxiliaryModelMode && reachesOrganizaOne(config?.getContentGeneratorConfig?.() ?? {}),
14585
14639
  [config, isAuxiliaryModelMode]
14586
14640
  );
14587
14641
  const activeRuntimeSnapshot = isAuxiliaryModelMode ? void 0 : config?.getActiveRuntimeModelSnapshot?.();
@@ -16280,7 +16334,7 @@ function OutputStyleDialog({
16280
16334
  __name(OutputStyleDialog, "OutputStyleDialog");
16281
16335
 
16282
16336
  // packages/cli/src/ui/components/DialogManager.tsx
16283
- import process10 from "node:process";
16337
+ import process4 from "node:process";
16284
16338
 
16285
16339
  // packages/cli/src/ui/components/IdeTrustChangeDialog.tsx
16286
16340
  init_esbuild_shims();
@@ -18960,538 +19014,6 @@ var TabBar2 = /* @__PURE__ */ __name(({
18960
19014
  // packages/cli/src/ui/components/extensions/tabs/DiscoverTab.tsx
18961
19015
  init_esbuild_shims();
18962
19016
  var import_react67 = __toESM(require_react(), 1);
18963
-
18964
- // node_modules/open/index.js
18965
- init_esbuild_shims();
18966
- import process9 from "node:process";
18967
- import { Buffer as Buffer2 } from "node:buffer";
18968
- import path from "node:path";
18969
- import { fileURLToPath } from "node:url";
18970
- import { promisify as promisify5 } from "node:util";
18971
- import childProcess from "node:child_process";
18972
- import fs7, { constants as fsConstants2 } from "node:fs/promises";
18973
-
18974
- // node_modules/wsl-utils/index.js
18975
- init_esbuild_shims();
18976
- import process5 from "node:process";
18977
- import fs6, { constants as fsConstants } from "node:fs/promises";
18978
-
18979
- // node_modules/wsl-utils/node_modules/is-wsl/index.js
18980
- init_esbuild_shims();
18981
- import process4 from "node:process";
18982
- import os4 from "node:os";
18983
- import fs5 from "node:fs";
18984
-
18985
- // node_modules/is-inside-container/index.js
18986
- init_esbuild_shims();
18987
- import fs4 from "node:fs";
18988
-
18989
- // node_modules/is-inside-container/node_modules/is-docker/index.js
18990
- init_esbuild_shims();
18991
- import fs3 from "node:fs";
18992
- var isDockerCached;
18993
- function hasDockerEnv() {
18994
- try {
18995
- fs3.statSync("/.dockerenv");
18996
- return true;
18997
- } catch {
18998
- return false;
18999
- }
19000
- }
19001
- __name(hasDockerEnv, "hasDockerEnv");
19002
- function hasDockerCGroup() {
19003
- try {
19004
- return fs3.readFileSync("/proc/self/cgroup", "utf8").includes("docker");
19005
- } catch {
19006
- return false;
19007
- }
19008
- }
19009
- __name(hasDockerCGroup, "hasDockerCGroup");
19010
- function isDocker() {
19011
- if (isDockerCached === void 0) {
19012
- isDockerCached = hasDockerEnv() || hasDockerCGroup();
19013
- }
19014
- return isDockerCached;
19015
- }
19016
- __name(isDocker, "isDocker");
19017
-
19018
- // node_modules/is-inside-container/index.js
19019
- var cachedResult;
19020
- var hasContainerEnv = /* @__PURE__ */ __name(() => {
19021
- try {
19022
- fs4.statSync("/run/.containerenv");
19023
- return true;
19024
- } catch {
19025
- return false;
19026
- }
19027
- }, "hasContainerEnv");
19028
- function isInsideContainer() {
19029
- if (cachedResult === void 0) {
19030
- cachedResult = hasContainerEnv() || isDocker();
19031
- }
19032
- return cachedResult;
19033
- }
19034
- __name(isInsideContainer, "isInsideContainer");
19035
-
19036
- // node_modules/wsl-utils/node_modules/is-wsl/index.js
19037
- var isWsl2 = /* @__PURE__ */ __name(() => {
19038
- if (process4.platform !== "linux") {
19039
- return false;
19040
- }
19041
- if (os4.release().toLowerCase().includes("microsoft")) {
19042
- if (isInsideContainer()) {
19043
- return false;
19044
- }
19045
- return true;
19046
- }
19047
- try {
19048
- return fs5.readFileSync("/proc/version", "utf8").toLowerCase().includes("microsoft") ? !isInsideContainer() : false;
19049
- } catch {
19050
- return false;
19051
- }
19052
- }, "isWsl");
19053
- var is_wsl_default = process4.env.__IS_WSL_TEST__ ? isWsl2 : isWsl2();
19054
-
19055
- // node_modules/wsl-utils/index.js
19056
- var wslDrivesMountPoint = /* @__PURE__ */ (() => {
19057
- const defaultMountPoint = "/mnt/";
19058
- let mountPoint;
19059
- return async function() {
19060
- if (mountPoint) {
19061
- return mountPoint;
19062
- }
19063
- const configFilePath = "/etc/wsl.conf";
19064
- let isConfigFileExists = false;
19065
- try {
19066
- await fs6.access(configFilePath, fsConstants.F_OK);
19067
- isConfigFileExists = true;
19068
- } catch {
19069
- }
19070
- if (!isConfigFileExists) {
19071
- return defaultMountPoint;
19072
- }
19073
- const configContent = await fs6.readFile(configFilePath, { encoding: "utf8" });
19074
- const configMountPoint = /(?<!#.*)root\s*=\s*(?<mountPoint>.*)/g.exec(configContent);
19075
- if (!configMountPoint) {
19076
- return defaultMountPoint;
19077
- }
19078
- mountPoint = configMountPoint.groups.mountPoint.trim();
19079
- mountPoint = mountPoint.endsWith("/") ? mountPoint : `${mountPoint}/`;
19080
- return mountPoint;
19081
- };
19082
- })();
19083
- var powerShellPathFromWsl = /* @__PURE__ */ __name(async () => {
19084
- const mountPoint = await wslDrivesMountPoint();
19085
- return `${mountPoint}c/Windows/System32/WindowsPowerShell/v1.0/powershell.exe`;
19086
- }, "powerShellPathFromWsl");
19087
- var powerShellPath = /* @__PURE__ */ __name(async () => {
19088
- if (is_wsl_default) {
19089
- return powerShellPathFromWsl();
19090
- }
19091
- return `${process5.env.SYSTEMROOT || process5.env.windir || String.raw`C:\Windows`}\\System32\\WindowsPowerShell\\v1.0\\powershell.exe`;
19092
- }, "powerShellPath");
19093
-
19094
- // node_modules/define-lazy-prop/index.js
19095
- init_esbuild_shims();
19096
- function defineLazyProperty(object, propertyName, valueGetter) {
19097
- const define = /* @__PURE__ */ __name((value) => Object.defineProperty(object, propertyName, { value, enumerable: true, writable: true }), "define");
19098
- Object.defineProperty(object, propertyName, {
19099
- configurable: true,
19100
- enumerable: true,
19101
- get() {
19102
- const result = valueGetter();
19103
- define(result);
19104
- return result;
19105
- },
19106
- set(value) {
19107
- define(value);
19108
- }
19109
- });
19110
- return object;
19111
- }
19112
- __name(defineLazyProperty, "defineLazyProperty");
19113
-
19114
- // node_modules/default-browser/index.js
19115
- init_esbuild_shims();
19116
- import { promisify as promisify4 } from "node:util";
19117
- import process8 from "node:process";
19118
- import { execFile as execFile5 } from "node:child_process";
19119
-
19120
- // node_modules/default-browser-id/index.js
19121
- init_esbuild_shims();
19122
- import { promisify } from "node:util";
19123
- import process6 from "node:process";
19124
- import { execFile as execFile2 } from "node:child_process";
19125
- var execFileAsync = promisify(execFile2);
19126
- async function defaultBrowserId() {
19127
- if (process6.platform !== "darwin") {
19128
- throw new Error("macOS only");
19129
- }
19130
- const { stdout } = await execFileAsync("defaults", ["read", "com.apple.LaunchServices/com.apple.launchservices.secure", "LSHandlers"]);
19131
- const match = /LSHandlerRoleAll = "(?!-)(?<id>[^"]+?)";\s+?LSHandlerURLScheme = (?:http|https);/.exec(stdout);
19132
- return match?.groups.id ?? "com.apple.Safari";
19133
- }
19134
- __name(defaultBrowserId, "defaultBrowserId");
19135
-
19136
- // node_modules/bundle-name/index.js
19137
- init_esbuild_shims();
19138
-
19139
- // node_modules/run-applescript/index.js
19140
- init_esbuild_shims();
19141
- import process7 from "node:process";
19142
- import { promisify as promisify2 } from "node:util";
19143
- import { execFile as execFile3, execFileSync } from "node:child_process";
19144
- var execFileAsync2 = promisify2(execFile3);
19145
- async function runAppleScript(script, { humanReadableOutput = true } = {}) {
19146
- if (process7.platform !== "darwin") {
19147
- throw new Error("macOS only");
19148
- }
19149
- const outputArguments = humanReadableOutput ? [] : ["-ss"];
19150
- const { stdout } = await execFileAsync2("osascript", ["-e", script, outputArguments]);
19151
- return stdout.trim();
19152
- }
19153
- __name(runAppleScript, "runAppleScript");
19154
-
19155
- // node_modules/bundle-name/index.js
19156
- async function bundleName(bundleId) {
19157
- return runAppleScript(`tell application "Finder" to set app_path to application file id "${bundleId}" as string
19158
- tell application "System Events" to get value of property list item "CFBundleName" of property list file (app_path & ":Contents:Info.plist")`);
19159
- }
19160
- __name(bundleName, "bundleName");
19161
-
19162
- // node_modules/default-browser/windows.js
19163
- init_esbuild_shims();
19164
- import { promisify as promisify3 } from "node:util";
19165
- import { execFile as execFile4 } from "node:child_process";
19166
- var execFileAsync3 = promisify3(execFile4);
19167
- var windowsBrowserProgIds = {
19168
- MSEdgeHTM: { name: "Edge", id: "com.microsoft.edge" },
19169
- // The missing `L` is correct.
19170
- MSEdgeBHTML: { name: "Edge Beta", id: "com.microsoft.edge.beta" },
19171
- MSEdgeDHTML: { name: "Edge Dev", id: "com.microsoft.edge.dev" },
19172
- AppXq0fevzme2pys62n3e0fbqa7peapykr8v: { name: "Edge", id: "com.microsoft.edge.old" },
19173
- ChromeHTML: { name: "Chrome", id: "com.google.chrome" },
19174
- ChromeBHTML: { name: "Chrome Beta", id: "com.google.chrome.beta" },
19175
- ChromeDHTML: { name: "Chrome Dev", id: "com.google.chrome.dev" },
19176
- ChromiumHTM: { name: "Chromium", id: "org.chromium.Chromium" },
19177
- BraveHTML: { name: "Brave", id: "com.brave.Browser" },
19178
- BraveBHTML: { name: "Brave Beta", id: "com.brave.Browser.beta" },
19179
- BraveDHTML: { name: "Brave Dev", id: "com.brave.Browser.dev" },
19180
- BraveSSHTM: { name: "Brave Nightly", id: "com.brave.Browser.nightly" },
19181
- FirefoxURL: { name: "Firefox", id: "org.mozilla.firefox" },
19182
- OperaStable: { name: "Opera", id: "com.operasoftware.Opera" },
19183
- VivaldiHTM: { name: "Vivaldi", id: "com.vivaldi.Vivaldi" },
19184
- "IE.HTTP": { name: "Internet Explorer", id: "com.microsoft.ie" }
19185
- };
19186
- var _windowsBrowserProgIdMap = new Map(Object.entries(windowsBrowserProgIds));
19187
- var UnknownBrowserError = class extends Error {
19188
- static {
19189
- __name(this, "UnknownBrowserError");
19190
- }
19191
- };
19192
- async function defaultBrowser(_execFileAsync = execFileAsync3) {
19193
- const { stdout } = await _execFileAsync("reg", [
19194
- "QUERY",
19195
- " HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\Shell\\Associations\\UrlAssociations\\http\\UserChoice",
19196
- "/v",
19197
- "ProgId"
19198
- ]);
19199
- const match = /ProgId\s*REG_SZ\s*(?<id>\S+)/.exec(stdout);
19200
- if (!match) {
19201
- throw new UnknownBrowserError(`Cannot find Windows browser in stdout: ${JSON.stringify(stdout)}`);
19202
- }
19203
- const { id } = match.groups;
19204
- const dotIndex = id.lastIndexOf(".");
19205
- const hyphenIndex = id.lastIndexOf("-");
19206
- const baseIdByDot = dotIndex === -1 ? void 0 : id.slice(0, dotIndex);
19207
- const baseIdByHyphen = hyphenIndex === -1 ? void 0 : id.slice(0, hyphenIndex);
19208
- return windowsBrowserProgIds[id] ?? windowsBrowserProgIds[baseIdByDot] ?? windowsBrowserProgIds[baseIdByHyphen] ?? { name: id, id };
19209
- }
19210
- __name(defaultBrowser, "defaultBrowser");
19211
-
19212
- // node_modules/default-browser/index.js
19213
- var execFileAsync4 = promisify4(execFile5);
19214
- var titleize = /* @__PURE__ */ __name((string) => string.toLowerCase().replaceAll(/(?:^|\s|-)\S/g, (x) => x.toUpperCase()), "titleize");
19215
- async function defaultBrowser2() {
19216
- if (process8.platform === "darwin") {
19217
- const id = await defaultBrowserId();
19218
- const name = await bundleName(id);
19219
- return { name, id };
19220
- }
19221
- if (process8.platform === "linux") {
19222
- const { stdout } = await execFileAsync4("xdg-mime", ["query", "default", "x-scheme-handler/http"]);
19223
- const id = stdout.trim();
19224
- const name = titleize(id.replace(/.desktop$/, "").replace("-", " "));
19225
- return { name, id };
19226
- }
19227
- if (process8.platform === "win32") {
19228
- return defaultBrowser();
19229
- }
19230
- throw new Error("Only macOS, Linux, and Windows are supported");
19231
- }
19232
- __name(defaultBrowser2, "defaultBrowser");
19233
-
19234
- // node_modules/open/index.js
19235
- var execFile6 = promisify5(childProcess.execFile);
19236
- var __dirname = path.dirname(fileURLToPath(import.meta.url));
19237
- var localXdgOpenPath = path.join(__dirname, "xdg-open");
19238
- var { platform, arch } = process9;
19239
- async function getWindowsDefaultBrowserFromWsl() {
19240
- const powershellPath = await powerShellPath();
19241
- const rawCommand = String.raw`(Get-ItemProperty -Path "HKCU:\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice").ProgId`;
19242
- const encodedCommand = Buffer2.from(rawCommand, "utf16le").toString("base64");
19243
- const { stdout } = await execFile6(
19244
- powershellPath,
19245
- [
19246
- "-NoProfile",
19247
- "-NonInteractive",
19248
- "-ExecutionPolicy",
19249
- "Bypass",
19250
- "-EncodedCommand",
19251
- encodedCommand
19252
- ],
19253
- { encoding: "utf8" }
19254
- );
19255
- const progId = stdout.trim();
19256
- const browserMap = {
19257
- ChromeHTML: "com.google.chrome",
19258
- BraveHTML: "com.brave.Browser",
19259
- MSEdgeHTM: "com.microsoft.edge",
19260
- FirefoxURL: "org.mozilla.firefox"
19261
- };
19262
- return browserMap[progId] ? { id: browserMap[progId] } : {};
19263
- }
19264
- __name(getWindowsDefaultBrowserFromWsl, "getWindowsDefaultBrowserFromWsl");
19265
- var pTryEach = /* @__PURE__ */ __name(async (array, mapper) => {
19266
- let latestError;
19267
- for (const item of array) {
19268
- try {
19269
- return await mapper(item);
19270
- } catch (error) {
19271
- latestError = error;
19272
- }
19273
- }
19274
- throw latestError;
19275
- }, "pTryEach");
19276
- var baseOpen = /* @__PURE__ */ __name(async (options) => {
19277
- options = {
19278
- wait: false,
19279
- background: false,
19280
- newInstance: false,
19281
- allowNonzeroExitCode: false,
19282
- ...options
19283
- };
19284
- if (Array.isArray(options.app)) {
19285
- return pTryEach(options.app, (singleApp) => baseOpen({
19286
- ...options,
19287
- app: singleApp
19288
- }));
19289
- }
19290
- let { name: app, arguments: appArguments = [] } = options.app ?? {};
19291
- appArguments = [...appArguments];
19292
- if (Array.isArray(app)) {
19293
- return pTryEach(app, (appName) => baseOpen({
19294
- ...options,
19295
- app: {
19296
- name: appName,
19297
- arguments: appArguments
19298
- }
19299
- }));
19300
- }
19301
- if (app === "browser" || app === "browserPrivate") {
19302
- const ids = {
19303
- "com.google.chrome": "chrome",
19304
- "google-chrome.desktop": "chrome",
19305
- "com.brave.Browser": "brave",
19306
- "org.mozilla.firefox": "firefox",
19307
- "firefox.desktop": "firefox",
19308
- "com.microsoft.msedge": "edge",
19309
- "com.microsoft.edge": "edge",
19310
- "com.microsoft.edgemac": "edge",
19311
- "microsoft-edge.desktop": "edge"
19312
- };
19313
- const flags = {
19314
- chrome: "--incognito",
19315
- brave: "--incognito",
19316
- firefox: "--private-window",
19317
- edge: "--inPrivate"
19318
- };
19319
- const browser = is_wsl_default ? await getWindowsDefaultBrowserFromWsl() : await defaultBrowser2();
19320
- if (browser.id in ids) {
19321
- const browserName = ids[browser.id];
19322
- if (app === "browserPrivate") {
19323
- appArguments.push(flags[browserName]);
19324
- }
19325
- return baseOpen({
19326
- ...options,
19327
- app: {
19328
- name: apps[browserName],
19329
- arguments: appArguments
19330
- }
19331
- });
19332
- }
19333
- throw new Error(`${browser.name} is not supported as a default browser`);
19334
- }
19335
- let command;
19336
- const cliArguments = [];
19337
- const childProcessOptions = {};
19338
- if (platform === "darwin") {
19339
- command = "open";
19340
- if (options.wait) {
19341
- cliArguments.push("--wait-apps");
19342
- }
19343
- if (options.background) {
19344
- cliArguments.push("--background");
19345
- }
19346
- if (options.newInstance) {
19347
- cliArguments.push("--new");
19348
- }
19349
- if (app) {
19350
- cliArguments.push("-a", app);
19351
- }
19352
- } else if (platform === "win32" || is_wsl_default && !isInsideContainer() && !app) {
19353
- command = await powerShellPath();
19354
- cliArguments.push(
19355
- "-NoProfile",
19356
- "-NonInteractive",
19357
- "-ExecutionPolicy",
19358
- "Bypass",
19359
- "-EncodedCommand"
19360
- );
19361
- if (!is_wsl_default) {
19362
- childProcessOptions.windowsVerbatimArguments = true;
19363
- }
19364
- const encodedArguments = ["Start"];
19365
- if (options.wait) {
19366
- encodedArguments.push("-Wait");
19367
- }
19368
- if (app) {
19369
- encodedArguments.push(`"\`"${app}\`""`);
19370
- if (options.target) {
19371
- appArguments.push(options.target);
19372
- }
19373
- } else if (options.target) {
19374
- encodedArguments.push(`"${options.target}"`);
19375
- }
19376
- if (appArguments.length > 0) {
19377
- appArguments = appArguments.map((argument) => `"\`"${argument}\`""`);
19378
- encodedArguments.push("-ArgumentList", appArguments.join(","));
19379
- }
19380
- options.target = Buffer2.from(encodedArguments.join(" "), "utf16le").toString("base64");
19381
- } else {
19382
- if (app) {
19383
- command = app;
19384
- } else {
19385
- const isBundled = !__dirname || __dirname === "/";
19386
- let exeLocalXdgOpen = false;
19387
- try {
19388
- await fs7.access(localXdgOpenPath, fsConstants2.X_OK);
19389
- exeLocalXdgOpen = true;
19390
- } catch {
19391
- }
19392
- const useSystemXdgOpen = process9.versions.electron ?? (platform === "android" || isBundled || !exeLocalXdgOpen);
19393
- command = useSystemXdgOpen ? "xdg-open" : localXdgOpenPath;
19394
- }
19395
- if (appArguments.length > 0) {
19396
- cliArguments.push(...appArguments);
19397
- }
19398
- if (!options.wait) {
19399
- childProcessOptions.stdio = "ignore";
19400
- childProcessOptions.detached = true;
19401
- }
19402
- }
19403
- if (platform === "darwin" && appArguments.length > 0) {
19404
- cliArguments.push("--args", ...appArguments);
19405
- }
19406
- if (options.target) {
19407
- cliArguments.push(options.target);
19408
- }
19409
- const subprocess = childProcess.spawn(command, cliArguments, childProcessOptions);
19410
- if (options.wait) {
19411
- return new Promise((resolve5, reject) => {
19412
- subprocess.once("error", reject);
19413
- subprocess.once("close", (exitCode) => {
19414
- if (!options.allowNonzeroExitCode && exitCode > 0) {
19415
- reject(new Error(`Exited with code ${exitCode}`));
19416
- return;
19417
- }
19418
- resolve5(subprocess);
19419
- });
19420
- });
19421
- }
19422
- subprocess.unref();
19423
- return subprocess;
19424
- }, "baseOpen");
19425
- var open = /* @__PURE__ */ __name((target, options) => {
19426
- if (typeof target !== "string") {
19427
- throw new TypeError("Expected a `target`");
19428
- }
19429
- return baseOpen({
19430
- ...options,
19431
- target
19432
- });
19433
- }, "open");
19434
- function detectArchBinary(binary) {
19435
- if (typeof binary === "string" || Array.isArray(binary)) {
19436
- return binary;
19437
- }
19438
- const { [arch]: archBinary } = binary;
19439
- if (!archBinary) {
19440
- throw new Error(`${arch} is not supported`);
19441
- }
19442
- return archBinary;
19443
- }
19444
- __name(detectArchBinary, "detectArchBinary");
19445
- function detectPlatformBinary({ [platform]: platformBinary }, { wsl }) {
19446
- if (wsl && is_wsl_default) {
19447
- return detectArchBinary(wsl);
19448
- }
19449
- if (!platformBinary) {
19450
- throw new Error(`${platform} is not supported`);
19451
- }
19452
- return detectArchBinary(platformBinary);
19453
- }
19454
- __name(detectPlatformBinary, "detectPlatformBinary");
19455
- var apps = {};
19456
- defineLazyProperty(apps, "chrome", () => detectPlatformBinary({
19457
- darwin: "google chrome",
19458
- win32: "chrome",
19459
- linux: ["google-chrome", "google-chrome-stable", "chromium"]
19460
- }, {
19461
- wsl: {
19462
- ia32: "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe",
19463
- x64: ["/mnt/c/Program Files/Google/Chrome/Application/chrome.exe", "/mnt/c/Program Files (x86)/Google/Chrome/Application/chrome.exe"]
19464
- }
19465
- }));
19466
- defineLazyProperty(apps, "brave", () => detectPlatformBinary({
19467
- darwin: "brave browser",
19468
- win32: "brave",
19469
- linux: ["brave-browser", "brave"]
19470
- }, {
19471
- wsl: {
19472
- ia32: "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe",
19473
- x64: ["/mnt/c/Program Files/BraveSoftware/Brave-Browser/Application/brave.exe", "/mnt/c/Program Files (x86)/BraveSoftware/Brave-Browser/Application/brave.exe"]
19474
- }
19475
- }));
19476
- defineLazyProperty(apps, "firefox", () => detectPlatformBinary({
19477
- darwin: "firefox",
19478
- win32: String.raw`C:\Program Files\Mozilla Firefox\firefox.exe`,
19479
- linux: "firefox"
19480
- }, {
19481
- wsl: "/mnt/c/Program Files/Mozilla Firefox/firefox.exe"
19482
- }));
19483
- defineLazyProperty(apps, "edge", () => detectPlatformBinary({
19484
- darwin: "microsoft edge",
19485
- win32: "msedge",
19486
- linux: ["microsoft-edge", "microsoft-edge-dev"]
19487
- }, {
19488
- wsl: "/mnt/c/Program Files (x86)/Microsoft/Edge/Application/msedge.exe"
19489
- }));
19490
- defineLazyProperty(apps, "browser", () => "browser");
19491
- defineLazyProperty(apps, "browserPrivate", () => "browserPrivate");
19492
- var open_default = open;
19493
-
19494
- // packages/cli/src/ui/components/extensions/tabs/DiscoverTab.tsx
19495
19017
  var import_jsx_runtime77 = __toESM(require_jsx_runtime(), 1);
19496
19018
  var debugLogger13 = createDebugLogger("DISCOVER_TAB");
19497
19019
  function formatInstalls(n) {
@@ -19730,13 +19252,6 @@ var DiscoverTab = /* @__PURE__ */ __name(({
19730
19252
  onStatus({ type: "info", text: t("No homepage available.") });
19731
19253
  return;
19732
19254
  }
19733
- if (false) {
19734
- onStatus({
19735
- type: "info",
19736
- text: t("Would open: {{url}}", { url: plugin.homepage })
19737
- });
19738
- return;
19739
- }
19740
19255
  let protocol;
19741
19256
  try {
19742
19257
  protocol = new URL(plugin.homepage).protocol;
@@ -19751,7 +19266,7 @@ var DiscoverTab = /* @__PURE__ */ __name(({
19751
19266
  return;
19752
19267
  }
19753
19268
  try {
19754
- await open_default(plugin.homepage);
19269
+ await openBrowserSecurely(plugin.homepage);
19755
19270
  } catch {
19756
19271
  onStatus({
19757
19272
  type: "error",
@@ -26212,7 +25727,7 @@ function FileRow({
26212
25727
  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)") : "";
26213
25728
  const renameFits = !!file.oldDisplayPath && maxPathChars >= 19;
26214
25729
  const pathBudget = renameFits ? Math.floor((maxPathChars - 3) / 2) : maxPathChars;
26215
- const path15 = truncatePathStart(file.displayPath, pathBudget);
25730
+ const path14 = truncatePathStart(file.displayPath, pathBudget);
26216
25731
  return /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Box_default, { flexDirection: "row", children: [
26217
25732
  /* @__PURE__ */ (0, import_jsx_runtime106.jsx)(
26218
25733
  Text,
@@ -26232,7 +25747,7 @@ function FileRow({
26232
25747
  {
26233
25748
  color: selected ? theme.text.accent : theme.text.primary,
26234
25749
  bold: selected,
26235
- children: path15
25750
+ children: path14
26236
25751
  }
26237
25752
  ),
26238
25753
  /* @__PURE__ */ (0, import_jsx_runtime106.jsxs)(Text, { color: theme.text.secondary, children: [
@@ -26296,11 +25811,11 @@ function FileDetail({
26296
25811
  ] });
26297
25812
  }
26298
25813
  __name(FileDetail, "FileDetail");
26299
- function truncatePathStart(path15, maxChars) {
25814
+ function truncatePathStart(path14, maxChars) {
26300
25815
  if (maxChars <= 0) return "";
26301
- if (path15.length <= maxChars) return path15;
26302
- if (maxChars <= 1) return path15.slice(-maxChars);
26303
- return "\u2026" + path15.slice(-(maxChars - 1));
25816
+ if (path14.length <= maxChars) return path14;
25817
+ if (maxChars <= 1) return path14.slice(-maxChars);
25818
+ return "\u2026" + path14.slice(-(maxChars - 1));
26304
25819
  }
26305
25820
  __name(truncatePathStart, "truncatePathStart");
26306
25821
  function useVisibleWindow(total, selectedIndex, windowSize) {
@@ -26317,18 +25832,18 @@ __name(useVisibleWindow, "useVisibleWindow");
26317
25832
  function currentToFiles(result, hunks) {
26318
25833
  if (!result) return [];
26319
25834
  const out = [];
26320
- for (const [path15, s] of result.perFileStats) {
26321
- out.push(perFileToUnified(path15, s, hunks));
25835
+ for (const [path14, s] of result.perFileStats) {
25836
+ out.push(perFileToUnified(path14, s, hunks));
26322
25837
  }
26323
25838
  out.sort((a, b) => a.path.localeCompare(b.path));
26324
25839
  return out;
26325
25840
  }
26326
25841
  __name(currentToFiles, "currentToFiles");
26327
- function perFileToUnified(path15, s, hunks) {
26328
- const fileHunks = hunks.get(path15);
25842
+ function perFileToUnified(path14, s, hunks) {
25843
+ const fileHunks = hunks.get(path14);
26329
25844
  return {
26330
- path: path15,
26331
- displayPath: sanitizeFilenameForDisplay(path15),
25845
+ path: path14,
25846
+ displayPath: sanitizeFilenameForDisplay(path14),
26332
25847
  // Carry the pre-rename path so the interactive viewer can show `old → new`
26333
25848
  // for renames (keyed/addressed by the new path).
26334
25849
  oldDisplayPath: s.oldPath ? sanitizeFilenameForDisplay(s.oldPath) : void 0,
@@ -26420,22 +25935,22 @@ __name(emptyMessage, "emptyMessage");
26420
25935
  // packages/cli/src/ui/components/MemoryDialog.tsx
26421
25936
  init_esbuild_shims();
26422
25937
  var import_react87 = __toESM(require_react(), 1);
26423
- import fs8 from "node:fs/promises";
26424
- import os5 from "node:os";
26425
- import path2 from "node:path";
25938
+ import fs3 from "node:fs/promises";
25939
+ import os4 from "node:os";
25940
+ import path from "node:path";
26426
25941
  import { spawn } from "node:child_process";
26427
25942
  var import_jsx_runtime107 = __toESM(require_jsx_runtime(), 1);
26428
25943
  var DISPLAY_ENV_VARS = ["DISPLAY", "WAYLAND_DISPLAY", "MIR_SOCKET"];
26429
25944
  async function resolvePreferredMemoryFile(dir, fallbackFilename) {
26430
25945
  for (const filename of getAllMemoryFilenames()) {
26431
- const filePath = path2.join(dir, filename);
25946
+ const filePath = path.join(dir, filename);
26432
25947
  try {
26433
- await fs8.access(filePath);
25948
+ await fs3.access(filePath);
26434
25949
  return filePath;
26435
25950
  } catch {
26436
25951
  }
26437
25952
  }
26438
- return path2.join(dir, fallbackFilename);
25953
+ return path.join(dir, fallbackFilename);
26439
25954
  }
26440
25955
  __name(resolvePreferredMemoryFile, "resolvePreferredMemoryFile");
26441
25956
  async function openFolderPath(folderPath) {
@@ -26470,16 +25985,16 @@ function shouldOpenFolderPath() {
26470
25985
  }
26471
25986
  __name(shouldOpenFolderPath, "shouldOpenFolderPath");
26472
25987
  async function ensureFileExists(filePath) {
26473
- await fs8.mkdir(path2.dirname(filePath), { recursive: true });
25988
+ await fs3.mkdir(path.dirname(filePath), { recursive: true });
26474
25989
  try {
26475
- await fs8.access(filePath);
25990
+ await fs3.access(filePath);
26476
25991
  } catch {
26477
- await fs8.writeFile(filePath, "", "utf-8");
25992
+ await fs3.writeFile(filePath, "", "utf-8");
26478
25993
  }
26479
25994
  }
26480
25995
  __name(ensureFileExists, "ensureFileExists");
26481
25996
  function formatDisplayPath(filePath) {
26482
- const home = os5.homedir();
25997
+ const home = os4.homedir();
26483
25998
  if (filePath.startsWith(home)) {
26484
25999
  return `~${filePath.slice(home.length)}`;
26485
26000
  }
@@ -26510,14 +26025,14 @@ function MemoryDialog({ onClose }) {
26510
26025
  );
26511
26026
  const [lastDreamAt, setLastDreamAt] = (0, import_react87.useState)(null);
26512
26027
  const globalMemoryPath = (0, import_react87.useMemo)(
26513
- () => path2.join(
26028
+ () => path.join(
26514
26029
  Storage.getGlobalO1CodeDir(),
26515
26030
  getAllMemoryFilenames()[0] ?? "AGENTS.md"
26516
26031
  ),
26517
26032
  []
26518
26033
  );
26519
26034
  const projectMemoryPath = (0, import_react87.useMemo)(
26520
- () => path2.join(
26035
+ () => path.join(
26521
26036
  config.getWorkingDir(),
26522
26037
  getAllMemoryFilenames()[0] ?? "AGENTS.md"
26523
26038
  ),
@@ -26567,7 +26082,7 @@ function MemoryDialog({ onClose }) {
26567
26082
  value: "project",
26568
26083
  action: "file",
26569
26084
  description: t("Saved in {{path}}", {
26570
- path: path2.relative(config.getWorkingDir(), projectMemoryPath) || path2.basename(projectMemoryPath)
26085
+ path: path.relative(config.getWorkingDir(), projectMemoryPath) || path.basename(projectMemoryPath)
26571
26086
  })
26572
26087
  }
26573
26088
  ];
@@ -26582,8 +26097,8 @@ function MemoryDialog({ onClose }) {
26582
26097
  let cancelled = false;
26583
26098
  async function loadMeta() {
26584
26099
  try {
26585
- const metadataPath = path2.join(memoryStatePath, "meta.json");
26586
- const content = await fs8.readFile(metadataPath, "utf-8");
26100
+ const metadataPath = path.join(memoryStatePath, "meta.json");
26101
+ const content = await fs3.readFile(metadataPath, "utf-8");
26587
26102
  const parsed = JSON.parse(content);
26588
26103
  if (!cancelled && parsed.lastDreamAt) {
26589
26104
  const ts = new Date(parsed.lastDreamAt).getTime();
@@ -26643,11 +26158,11 @@ function MemoryDialog({ onClose }) {
26643
26158
  setError(null);
26644
26159
  const targetPath = await resolveTargetPath(item);
26645
26160
  if (item.action === "folder") {
26646
- await fs8.mkdir(targetPath, { recursive: true });
26161
+ await fs3.mkdir(targetPath, { recursive: true });
26647
26162
  if (shouldOpenFolderPath()) {
26648
26163
  await openFolderPath(targetPath);
26649
26164
  } else {
26650
- const indexPath = path2.join(targetPath, AUTO_MEMORY_INDEX_FILENAME);
26165
+ const indexPath = path.join(targetPath, AUTO_MEMORY_INDEX_FILENAME);
26651
26166
  await ensureFileExists(indexPath);
26652
26167
  await launchEditor(indexPath);
26653
26168
  }
@@ -26883,14 +26398,14 @@ __name(MemoryDialog, "MemoryDialog");
26883
26398
  // packages/cli/src/ui/components/SkillReviewDialog.tsx
26884
26399
  init_esbuild_shims();
26885
26400
  var import_react88 = __toESM(require_react(), 1);
26886
- import { promises as fs9, watch } from "node:fs";
26401
+ import { promises as fs4, watch } from "node:fs";
26887
26402
  var import_jsx_runtime108 = __toESM(require_jsx_runtime(), 1);
26888
26403
  var debugLogger22 = createDebugLogger("SKILL_REVIEW_DIALOG");
26889
26404
  var PREVIEW_MAX_HEIGHT = 12;
26890
26405
  var WATCH_DEBOUNCE_MS = 300;
26891
26406
  var PREVIEW_MAX_BYTES = 64 * 1024;
26892
26407
  async function readPreviewChunk(filePath) {
26893
- const handle = await fs9.open(filePath, "r");
26408
+ const handle = await fs4.open(filePath, "r");
26894
26409
  try {
26895
26410
  const buf = Buffer.alloc(PREVIEW_MAX_BYTES + 1);
26896
26411
  const { bytesRead } = await handle.read(buf, 0, PREVIEW_MAX_BYTES + 1, 0);
@@ -29214,7 +28729,7 @@ var DialogManager = /* @__PURE__ */ __name(({
29214
28729
  }
29215
28730
  uiActions.closeSettingsDialog();
29216
28731
  },
29217
- onRestartRequest: () => process10.exit(0),
28732
+ onRestartRequest: () => process4.exit(0),
29218
28733
  availableTerminalHeight: listDialogHeight,
29219
28734
  width: mainAreaWidth,
29220
28735
  config
@@ -30051,8 +29566,8 @@ __name(useInputHistory, "useInputHistory");
30051
29566
  // packages/cli/src/ui/hooks/useShellHistory.ts
30052
29567
  init_esbuild_shims();
30053
29568
  var import_react100 = __toESM(require_react(), 1);
30054
- import * as fs10 from "node:fs/promises";
30055
- import * as path3 from "node:path";
29569
+ import * as fs5 from "node:fs/promises";
29570
+ import * as path2 from "node:path";
30056
29571
  var MAX_HISTORY_LENGTH = 100;
30057
29572
  var debugLogger24 = createDebugLogger("SHELL_HISTORY");
30058
29573
  async function getHistoryFilePath(projectRoot, configStorage) {
@@ -30062,7 +29577,7 @@ async function getHistoryFilePath(projectRoot, configStorage) {
30062
29577
  __name(getHistoryFilePath, "getHistoryFilePath");
30063
29578
  async function readHistoryFile(filePath) {
30064
29579
  try {
30065
- const text = await fs10.readFile(filePath, "utf-8");
29580
+ const text = await fs5.readFile(filePath, "utf-8");
30066
29581
  const parsed = parseHistoryFile(text);
30067
29582
  if (parsed) return parsed;
30068
29583
  return parseLegacyHistoryFile(text);
@@ -30104,8 +29619,8 @@ function parseLegacyHistoryFile(text) {
30104
29619
  __name(parseLegacyHistoryFile, "parseLegacyHistoryFile");
30105
29620
  async function writeHistoryFile(filePath, history) {
30106
29621
  try {
30107
- await fs10.mkdir(path3.dirname(filePath), { recursive: true });
30108
- await fs10.writeFile(filePath, JSON.stringify(history));
29622
+ await fs5.mkdir(path2.dirname(filePath), { recursive: true });
29623
+ await fs5.writeFile(filePath, JSON.stringify(history));
30109
29624
  } catch (error) {
30110
29625
  debugLogger24.error("Error writing shell history:", error);
30111
29626
  }
@@ -32000,8 +31515,8 @@ function buildSegmentsForVisualSlice(tokens, sliceStart, sliceEnd) {
32000
31515
  __name(buildSegmentsForVisualSlice, "buildSegmentsForVisualSlice");
32001
31516
 
32002
31517
  // packages/cli/src/ui/components/InputPrompt.tsx
32003
- import * as path7 from "node:path";
32004
- import * as fs12 from "node:fs/promises";
31518
+ import * as path6 from "node:path";
31519
+ import * as fs7 from "node:fs/promises";
32005
31520
 
32006
31521
  // packages/cli/src/ui/contexts/ShellFocusContext.tsx
32007
31522
  init_esbuild_shims();
@@ -33284,21 +32799,21 @@ function isAvailable(command) {
33284
32799
  return !command.hidden && command.userInvocable !== false && getEffectiveSupportedModes(command).includes("interactive");
33285
32800
  }
33286
32801
  __name(isAvailable, "isAvailable");
33287
- function commandLabel(command, path15 = command.name) {
33288
- return isBuiltin(command) && !path15.includes(" ") ? t(COMMAND_LABELS[command.name] ?? command.name) : command.name;
32802
+ function commandLabel(command, path14 = command.name) {
32803
+ return isBuiltin(command) && !path14.includes(" ") ? t(COMMAND_LABELS[command.name] ?? command.name) : command.name;
33289
32804
  }
33290
32805
  __name(commandLabel, "commandLabel");
33291
32806
  function normalizeSearch(value) {
33292
32807
  return value.normalize("NFD").replace(new RegExp("\\p{M}", "gu"), "").toLocaleLowerCase();
33293
32808
  }
33294
32809
  __name(normalizeSearch, "normalizeSearch");
33295
- function matchesSlashMenuQuery(command, query, path15 = command.name) {
32810
+ function matchesSlashMenuQuery(command, query, path14 = command.name) {
33296
32811
  const text = normalizeSearch(
33297
32812
  [
33298
- path15,
32813
+ path14,
33299
32814
  command.name,
33300
32815
  ...command.altNames ?? [],
33301
- commandLabel(command, path15),
32816
+ commandLabel(command, path14),
33302
32817
  normalizeDescription(command.description)
33303
32818
  ].join(" ")
33304
32819
  );
@@ -34102,14 +33617,14 @@ __name(useVoiceInput, "useVoiceInput");
34102
33617
 
34103
33618
  // packages/cli/src/ui/voice/voice-recorder.ts
34104
33619
  init_esbuild_shims();
34105
- import process11 from "node:process";
33620
+ import process5 from "node:process";
34106
33621
 
34107
33622
  // packages/cli/src/ui/voice/arecord-recorder.ts
34108
33623
  init_esbuild_shims();
34109
33624
  import { spawn as spawn2 } from "node:child_process";
34110
33625
  import { mkdtemp, readFile as readFile2, rm } from "node:fs/promises";
34111
33626
  import { tmpdir } from "node:os";
34112
- import path4 from "node:path";
33627
+ import path3 from "node:path";
34113
33628
  var DEVICE_OPEN_GRACE_MS = 200;
34114
33629
  function toArecordError(error) {
34115
33630
  if (error.code === "ENOENT") {
@@ -34141,8 +33656,8 @@ var ArecordRecorder = class {
34141
33656
  this.closePromise = null;
34142
33657
  }
34143
33658
  async start(_options = {}) {
34144
- this.tmpDir = await mkdtemp(path4.join(tmpdir(), "o1-code-voice-"));
34145
- this.filePath = path4.join(this.tmpDir, "recording.wav");
33659
+ this.tmpDir = await mkdtemp(path3.join(tmpdir(), "o1-code-voice-"));
33660
+ this.filePath = path3.join(this.tmpDir, "recording.wav");
34146
33661
  const child = spawn2("arecord", [
34147
33662
  "-q",
34148
33663
  "-f",
@@ -34366,7 +33881,7 @@ init_esbuild_shims();
34366
33881
  import { spawn as spawn3 } from "node:child_process";
34367
33882
  import { mkdtemp as mkdtemp2, readFile as readFile3, rm as rm2 } from "node:fs/promises";
34368
33883
  import { tmpdir as tmpdir2 } from "node:os";
34369
- import path5 from "node:path";
33884
+ import path4 from "node:path";
34370
33885
  var SILENCE_EFFECT_ARGS = ["silence", "1", "0.1", "3%", "1", "2.0", "3%"];
34371
33886
  var MAX_STDERR_LENGTH = 4096;
34372
33887
  function toSoxError(error) {
@@ -34416,8 +33931,8 @@ var SoxRecorder = class {
34416
33931
  async start(options = {}) {
34417
33932
  this.stopRequested = false;
34418
33933
  this.onAutoStop = options.onAutoStop ?? null;
34419
- this.tmpDir = await mkdtemp2(path5.join(tmpdir2(), "o1-code-voice-"));
34420
- this.filePath = path5.join(this.tmpDir, "recording.wav");
33934
+ this.tmpDir = await mkdtemp2(path4.join(tmpdir2(), "o1-code-voice-"));
33935
+ this.filePath = path4.join(this.tmpDir, "recording.wav");
34421
33936
  this.child = spawn3("sox", [
34422
33937
  "-d",
34423
33938
  "-r",
@@ -34578,11 +34093,11 @@ var FallbackVoiceRecorder = class {
34578
34093
  }
34579
34094
  };
34580
34095
  function createVoiceRecorder(options = {}) {
34581
- const platform2 = options.platform ?? process11.platform;
34096
+ const platform = options.platform ?? process5.platform;
34582
34097
  const factories = [
34583
34098
  options.createNativeRecorder ?? createNativeAudioRecorder
34584
34099
  ];
34585
- if (platform2 === "linux") {
34100
+ if (platform === "linux") {
34586
34101
  factories.push(options.createSoxRecorder ?? createSoxRecorder);
34587
34102
  factories.push(options.createArecordRecorder ?? createArecordRecorder);
34588
34103
  } else {
@@ -34821,17 +34336,17 @@ __name(useAttachmentPreparation, "useAttachmentPreparation");
34821
34336
 
34822
34337
  // packages/cli/src/services/prompt-stash.ts
34823
34338
  init_esbuild_shims();
34824
- import * as fs11 from "node:fs";
34825
- import * as path6 from "node:path";
34339
+ import * as fs6 from "node:fs";
34340
+ import * as path5 from "node:path";
34826
34341
  var PROMPT_STASH_FILE = "prompt-stash.json";
34827
34342
  function getPromptStashPath(targetDir) {
34828
- return path6.join(new Storage(targetDir).getProjectDir(), PROMPT_STASH_FILE);
34343
+ return path5.join(new Storage(targetDir).getProjectDir(), PROMPT_STASH_FILE);
34829
34344
  }
34830
34345
  __name(getPromptStashPath, "getPromptStashPath");
34831
34346
  function savePromptStash(targetDir, text) {
34832
34347
  try {
34833
34348
  const filePath = getPromptStashPath(targetDir);
34834
- fs11.mkdirSync(path6.dirname(filePath), { recursive: true, mode: 448 });
34349
+ fs6.mkdirSync(path5.dirname(filePath), { recursive: true, mode: 448 });
34835
34350
  const data = { version: 1, text };
34836
34351
  atomicWriteFileSync(filePath, JSON.stringify(data), {
34837
34352
  mode: 384,
@@ -34846,7 +34361,7 @@ function savePromptStash(targetDir, text) {
34846
34361
  __name(savePromptStash, "savePromptStash");
34847
34362
  function loadPromptStash(targetDir) {
34848
34363
  try {
34849
- const raw = fs11.readFileSync(getPromptStashPath(targetDir), "utf8");
34364
+ const raw = fs6.readFileSync(getPromptStashPath(targetDir), "utf8");
34850
34365
  const parsed = JSON.parse(raw);
34851
34366
  if (typeof parsed === "object" && parsed !== null && !Array.isArray(parsed) && parsed.version === 1 && typeof parsed.text === "string") {
34852
34367
  return parsed.text;
@@ -34867,7 +34382,7 @@ function restorePromptStash(targetDir, currentText, onRestore) {
34867
34382
  __name(restorePromptStash, "restorePromptStash");
34868
34383
  function clearPromptStash(targetDir) {
34869
34384
  try {
34870
- fs11.unlinkSync(getPromptStashPath(targetDir));
34385
+ fs6.unlinkSync(getPromptStashPath(targetDir));
34871
34386
  return true;
34872
34387
  } catch (error) {
34873
34388
  return error.code === "ENOENT";
@@ -35279,7 +34794,7 @@ var InputPrompt = /* @__PURE__ */ __name(({
35279
34794
  shellHistory.addCommandToHistory(finalValue);
35280
34795
  }
35281
34796
  if (attachments.length > 0) {
35282
- const attachmentRefs = attachments.map((att) => `@${path7.relative(config.getTargetDir(), att.path)}`).join(" ");
34797
+ const attachmentRefs = attachments.map((att) => `@${path6.relative(config.getTargetDir(), att.path)}`).join(" ");
35283
34798
  finalValue = `${attachmentRefs}
35284
34799
 
35285
34800
  ${finalValue.trim()}`;
@@ -35385,20 +34900,20 @@ ${finalValue.trim()}`;
35385
34900
  signal
35386
34901
  );
35387
34902
  if (signal.aborted) {
35388
- if (imagePath) await fs12.unlink(imagePath).catch(() => {
34903
+ if (imagePath) await fs7.unlink(imagePath).catch(() => {
35389
34904
  });
35390
34905
  return;
35391
34906
  }
35392
34907
  if (imagePath) {
35393
- const sizeBytes = await fs12.stat(imagePath).then((stats) => stats.size).catch(() => void 0);
34908
+ const sizeBytes = await fs7.stat(imagePath).then((stats) => stats.size).catch(() => void 0);
35394
34909
  if (signal.aborted) {
35395
- await fs12.unlink(imagePath).catch(() => {
34910
+ await fs7.unlink(imagePath).catch(() => {
35396
34911
  });
35397
34912
  return;
35398
34913
  }
35399
34914
  cleanupOldClipboardImages(Storage.getGlobalTempDir()).catch(() => {
35400
34915
  });
35401
- const filename = path7.basename(imagePath);
34916
+ const filename = path6.basename(imagePath);
35402
34917
  const newAttachment = {
35403
34918
  id: String(Date.now()),
35404
34919
  path: imagePath,
@@ -35418,43 +34933,43 @@ ${finalValue.trim()}`;
35418
34933
  async (imagePaths, originalPasted) => {
35419
34934
  await attachmentPreparation.run(async (signal, preparing) => {
35420
34935
  const cwd3 = config.getTargetDir();
35421
- const clipboardDir = path7.join(Storage.getGlobalTempDir(), "clipboard");
34936
+ const clipboardDir = path6.join(Storage.getGlobalTempDir(), "clipboard");
35422
34937
  const attachments2 = [];
35423
34938
  let committed = false;
35424
34939
  try {
35425
34940
  for (const imagePath of imagePaths) {
35426
34941
  signal.throwIfAborted();
35427
- const sourcePath = path7.isAbsolute(imagePath) ? imagePath : path7.resolve(cwd3, imagePath);
34942
+ const sourcePath = path6.isAbsolute(imagePath) ? imagePath : path6.resolve(cwd3, imagePath);
35428
34943
  let sourceValidated = false;
35429
34944
  let destination;
35430
34945
  try {
35431
- const stats = await fs12.stat(sourcePath);
34946
+ const stats = await fs7.stat(sourcePath);
35432
34947
  if (!stats.isFile()) continue;
35433
34948
  sourceValidated = true;
35434
34949
  preparing();
35435
- await fs12.mkdir(clipboardDir, { recursive: true });
35436
- const destPath = path7.join(
34950
+ await fs7.mkdir(clipboardDir, { recursive: true });
34951
+ const destPath = path6.join(
35437
34952
  clipboardDir,
35438
- `clipboard-${Date.now()}-${attachments2.length}${path7.extname(sourcePath)}`
34953
+ `clipboard-${Date.now()}-${attachments2.length}${path6.extname(sourcePath)}`
35439
34954
  );
35440
34955
  destination = destPath;
35441
- await fs12.copyFile(sourcePath, destPath);
34956
+ await fs7.copyFile(sourcePath, destPath);
35442
34957
  if (signal.aborted) {
35443
- await fs12.unlink(destPath).catch(() => {
34958
+ await fs7.unlink(destPath).catch(() => {
35444
34959
  });
35445
34960
  for (const attachment of attachments2)
35446
- await fs12.unlink(attachment.path).catch(() => {
34961
+ await fs7.unlink(attachment.path).catch(() => {
35447
34962
  });
35448
34963
  return;
35449
34964
  }
35450
34965
  attachments2.push({
35451
34966
  id: `${Date.now()}-${attachments2.length}`,
35452
34967
  path: destPath,
35453
- filename: path7.basename(destPath),
34968
+ filename: path6.basename(destPath),
35454
34969
  sizeBytes: stats.size
35455
34970
  });
35456
34971
  } catch (error) {
35457
- if (destination) await fs12.unlink(destination).catch(() => {
34972
+ if (destination) await fs7.unlink(destination).catch(() => {
35458
34973
  });
35459
34974
  if (sourceValidated || signal.aborted) throw error;
35460
34975
  }
@@ -35471,7 +34986,7 @@ ${finalValue.trim()}`;
35471
34986
  } finally {
35472
34987
  if (!committed) {
35473
34988
  for (const attachment of attachments2)
35474
- await fs12.unlink(attachment.path).catch(() => {
34989
+ await fs7.unlink(attachment.path).catch(() => {
35475
34990
  });
35476
34991
  }
35477
34992
  }
@@ -36507,14 +36022,14 @@ ${currentText}`);
36507
36022
  setSlashMenuDismissed(true);
36508
36023
  completion.dismissCompletion();
36509
36024
  },
36510
- onSelect: (command, path15 = command.name, invokeBareAction = false) => {
36025
+ onSelect: (command, path14 = command.name, invokeBareAction = false) => {
36511
36026
  setSlashMenuPanelOpen(false);
36512
36027
  if (invokeBareAction) {
36513
- handleSubmitAndClear(`/${path15}`);
36514
- } else if (command.subCommands?.length || command.acceptsInput === true || path15.includes(" ") && command.acceptsInput !== false && !command.submitOnAccept || command.kind !== "built-in" /* BUILT_IN */ && !command.submitOnAccept) {
36515
- buffer.setText(`/${path15} `);
36028
+ handleSubmitAndClear(`/${path14}`);
36029
+ } else if (command.subCommands?.length || command.acceptsInput === true || path14.includes(" ") && command.acceptsInput !== false && !command.submitOnAccept || command.kind !== "built-in" /* BUILT_IN */ && !command.submitOnAccept) {
36030
+ buffer.setText(`/${path14} `);
36516
36031
  } else {
36517
- handleSubmitAndClear(`/${path15}`);
36032
+ handleSubmitAndClear(`/${path14}`);
36518
36033
  }
36519
36034
  }
36520
36035
  }
@@ -36609,7 +36124,7 @@ __name(useWorkingTreeDiff, "useWorkingTreeDiff");
36609
36124
  // packages/cli/src/ui/hooks/useStatusLine.ts
36610
36125
  init_esbuild_shims();
36611
36126
  var import_react121 = __toESM(require_react(), 1);
36612
- import { exec } from "child_process";
36127
+ import { exec, execFile as execFile2 } from "child_process";
36613
36128
  var CONTEXT_PRESET_ITEM_IDS = /* @__PURE__ */ new Set([
36614
36129
  "context-used",
36615
36130
  "context-remaining"
@@ -36629,7 +36144,14 @@ function resolveHideContextIndicator(config, isContextOverLimit = false, keepAut
36629
36144
  __name(resolveHideContextIndicator, "resolveHideContextIndicator");
36630
36145
  var debugLog = createDebugLogger("STATUS_LINE");
36631
36146
  var MAX_STATUS_LINES = 2;
36632
- var PULL_REQUEST_LOOKUP_COMMAND = "gh pr view --json number --jq .number";
36147
+ var PULL_REQUEST_LOOKUP_ARGS = [
36148
+ "pr",
36149
+ "view",
36150
+ "--json",
36151
+ "number",
36152
+ "--jq",
36153
+ ".number"
36154
+ ];
36633
36155
  function parsePullRequestNumber(stdout) {
36634
36156
  const prNumber = stdout.trim();
36635
36157
  return /^\d+$/.test(prNumber) ? prNumber : void 0;
@@ -36782,8 +36304,9 @@ function useStatusLine(keepAutomaticContextIndicator = false, availableWidth) {
36782
36304
  const generation = ++pullRequestLookupGenerationRef.current;
36783
36305
  let child;
36784
36306
  try {
36785
- child = exec(
36786
- PULL_REQUEST_LOOKUP_COMMAND,
36307
+ child = execFile2(
36308
+ "gh",
36309
+ PULL_REQUEST_LOOKUP_ARGS,
36787
36310
  { cwd: currentDir, timeout: 2e3, maxBuffer: 1024 },
36788
36311
  (error, stdout) => {
36789
36312
  if (generation !== pullRequestLookupGenerationRef.current || pullRequestLookupKeyRef.current !== lookupKey) {
@@ -39347,7 +38870,7 @@ var DefaultAppLayout = /* @__PURE__ */ __name(() => {
39347
38870
  }, "DefaultAppLayout");
39348
38871
 
39349
38872
  // packages/cli/src/ui/App.tsx
39350
- import fs13 from "node:fs";
38873
+ import fs8 from "node:fs";
39351
38874
  var import_jsx_runtime146 = __toESM(require_jsx_runtime(), 1);
39352
38875
  var App = /* @__PURE__ */ __name(({ onExitSummary }) => {
39353
38876
  const uiState = useUIState();
@@ -39364,13 +38887,13 @@ var App = /* @__PURE__ */ __name(({ onExitSummary }) => {
39364
38887
  corruptedPath: settings.corruptedPath,
39365
38888
  wasRecovered: settings.wasRecovered,
39366
38889
  onExit: () => {
39367
- if (settings.corruptedPath && fs13.existsSync(settings.corruptedPath)) {
38890
+ if (settings.corruptedPath && fs8.existsSync(settings.corruptedPath)) {
39368
38891
  try {
39369
38892
  const settingsPath = settings.corruptedPath.slice(
39370
38893
  0,
39371
38894
  -CORRUPTED_SUFFIX.length
39372
38895
  );
39373
- fs13.copyFileSync(settings.corruptedPath, settingsPath);
38896
+ fs8.copyFileSync(settings.corruptedPath, settingsPath);
39374
38897
  } catch (e) {
39375
38898
  writeStderrLine(
39376
38899
  `Failed to restore corrupted file: ${e instanceof Error ? e.message : String(e)}`
@@ -39379,7 +38902,7 @@ var App = /* @__PURE__ */ __name(({ onExitSummary }) => {
39379
38902
  return;
39380
38903
  }
39381
38904
  try {
39382
- fs13.unlinkSync(settings.corruptedPath);
38905
+ fs8.unlinkSync(settings.corruptedPath);
39383
38906
  } catch (e) {
39384
38907
  writeStderrLine(
39385
38908
  `Settings restored, but could not remove ${settings.corruptedPath}: ${e instanceof Error ? e.message : String(e)}`
@@ -39389,9 +38912,9 @@ var App = /* @__PURE__ */ __name(({ onExitSummary }) => {
39389
38912
  process.exit(1);
39390
38913
  },
39391
38914
  onContinue: () => {
39392
- if (settings.corruptedPath && fs13.existsSync(settings.corruptedPath)) {
38915
+ if (settings.corruptedPath && fs8.existsSync(settings.corruptedPath)) {
39393
38916
  try {
39394
- fs13.unlinkSync(settings.corruptedPath);
38917
+ fs8.unlinkSync(settings.corruptedPath);
39395
38918
  } catch (e) {
39396
38919
  writeStderrLine(
39397
38920
  `Could not remove ${settings.corruptedPath}: ${e instanceof Error ? e.message : String(e)}`
@@ -39711,7 +39234,7 @@ function installTerminalResizeReflow(stdout, options = {}) {
39711
39234
  __name(installTerminalResizeReflow, "installTerminalResizeReflow");
39712
39235
 
39713
39236
  // packages/cli/src/ui/AppContainer.tsx
39714
- import process18 from "node:process";
39237
+ import process12 from "node:process";
39715
39238
 
39716
39239
  // packages/cli/src/ui/hooks/use-turn-start-index.ts
39717
39240
  init_esbuild_shims();
@@ -39750,13 +39273,13 @@ __name(useTurnOutcome, "useTurnOutcome");
39750
39273
  // packages/cli/src/ui/hooks/useMemoryMonitor.ts
39751
39274
  init_esbuild_shims();
39752
39275
  var import_react139 = __toESM(require_react(), 1);
39753
- import process12 from "node:process";
39754
- import os6 from "node:os";
39276
+ import process6 from "node:process";
39277
+ import os5 from "node:os";
39755
39278
  import v8 from "v8";
39756
39279
  var debugLogger32 = createDebugLogger("MEMORY_MONITOR");
39757
39280
  var MEMORY_WARNING_THRESHOLD = Math.min(
39758
39281
  7 * 1024 * 1024 * 1024,
39759
- Math.floor(os6.totalmem() * 0.85)
39282
+ Math.floor(os5.totalmem() * 0.85)
39760
39283
  );
39761
39284
  var MEMORY_UI_COMPACT_THRESHOLD = /* @__PURE__ */ __name(() => Math.floor(v8.getHeapStatistics().heap_size_limit * 0.65), "MEMORY_UI_COMPACT_THRESHOLD");
39762
39285
  var MEMORY_CHECK_INTERVAL = 60 * 1e3;
@@ -39769,7 +39292,7 @@ var useMemoryMonitor = /* @__PURE__ */ __name(({
39769
39292
  const lastCompactRef = (0, import_react139.useRef)(0);
39770
39293
  (0, import_react139.useEffect)(() => {
39771
39294
  const debugIntervalId = setInterval(() => {
39772
- const memUsage = process12.memoryUsage();
39295
+ const memUsage = process6.memoryUsage();
39773
39296
  const heapUsed = memUsage.heapUsed / 1024 / 1024;
39774
39297
  const heapTotal = memUsage.heapTotal / 1024 / 1024;
39775
39298
  const rss = memUsage.rss / 1024 / 1024;
@@ -39798,7 +39321,7 @@ var useMemoryMonitor = /* @__PURE__ */ __name(({
39798
39321
  }
39799
39322
  }, MEMORY_DEBUG_INTERVAL);
39800
39323
  const warningIntervalId = setInterval(() => {
39801
- const usage = process12.memoryUsage();
39324
+ const usage = process6.memoryUsage();
39802
39325
  if (usage.rss > MEMORY_WARNING_THRESHOLD) {
39803
39326
  debugLogger32.warn(
39804
39327
  `[MEMORY_WARNING] High memory usage detected: ${(usage.rss / (1024 * 1024 * 1024)).toFixed(2)} GB`
@@ -39855,12 +39378,12 @@ __name(useWakeRepaint, "useWakeRepaint");
39855
39378
  // packages/cli/src/ui/hooks/useThemeCommand.ts
39856
39379
  init_esbuild_shims();
39857
39380
  var import_react141 = __toESM(require_react(), 1);
39858
- import process13 from "node:process";
39381
+ import process7 from "node:process";
39859
39382
  var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, addItem, initialThemeError, config) => {
39860
39383
  const [isThemeDialogOpen, setIsThemeDialogOpen] = (0, import_react141.useState)(!!initialThemeError);
39861
39384
  const [themeBeforeDialogOpen, setThemeBeforeDialogOpen] = (0, import_react141.useState)(themeManager.getActiveTheme().name);
39862
39385
  const openThemeDialog = (0, import_react141.useCallback)(() => {
39863
- if (process13.env["NO_COLOR"]) {
39386
+ if (process7.env["NO_COLOR"]) {
39864
39387
  const feedbackItem = {
39865
39388
  type: "info" /* INFO */,
39866
39389
  text: t(
@@ -39947,7 +39470,7 @@ var useThemeCommand = /* @__PURE__ */ __name((loadedSettings, setThemeError, add
39947
39470
  // packages/cli/src/ui/hooks/useFeedbackDialog.ts
39948
39471
  init_esbuild_shims();
39949
39472
  var import_react142 = __toESM(require_react(), 1);
39950
- import * as fs14 from "node:fs";
39473
+ import * as fs9 from "node:fs";
39951
39474
  var import_strip_json_comments = __toESM(require_strip_json_comments(), 1);
39952
39475
  var FEEDBACK_SHOW_PROBABILITY = 0.25;
39953
39476
  var MIN_TOOL_CALLS = 10;
@@ -39958,8 +39481,8 @@ var lastMessageIsAIResponse = /* @__PURE__ */ __name((history) => history.length
39958
39481
  var getFeedbackLastShownTimestampFromFile = /* @__PURE__ */ __name(() => {
39959
39482
  try {
39960
39483
  const userSettingsPath = Storage.getGlobalSettingsPath();
39961
- if (fs14.existsSync(userSettingsPath)) {
39962
- const content = fs14.readFileSync(userSettingsPath, "utf-8");
39484
+ if (fs9.existsSync(userSettingsPath)) {
39485
+ const content = fs9.readFileSync(userSettingsPath, "utf-8");
39963
39486
  const settings = JSON.parse((0, import_strip_json_comments.default)(content));
39964
39487
  return settings?.ui?.feedbackLastShownTimestamp ?? 0;
39965
39488
  }
@@ -40126,7 +39649,7 @@ __name(useSettingsCommand, "useSettingsCommand");
40126
39649
 
40127
39650
  // packages/cli/src/ui/utils/terminal-buffer.ts
40128
39651
  init_esbuild_shims();
40129
- import process14 from "node:process";
39652
+ import process8 from "node:process";
40130
39653
  function isCiEnvKey(key) {
40131
39654
  return key === "CI" || key === "CONTINUOUS_INTEGRATION" || key.startsWith("CI_");
40132
39655
  }
@@ -40142,7 +39665,7 @@ function isCiEnvironment(env) {
40142
39665
  );
40143
39666
  }
40144
39667
  __name(isCiEnvironment, "isCiEnvironment");
40145
- function isInteractiveTerminal(stdoutIsTTY = process14.stdout.isTTY, env = process14.env) {
39668
+ function isInteractiveTerminal(stdoutIsTTY = process8.stdout.isTTY, env = process8.env) {
40146
39669
  return Boolean(stdoutIsTTY) && !isCiEnvironment(env) && env["TERM"]?.toLowerCase() !== "dumb";
40147
39670
  }
40148
39671
  __name(isInteractiveTerminal, "isInteractiveTerminal");
@@ -40150,7 +39673,7 @@ function shouldUseVirtualViewport(useTerminalBuffer, screenReader, terminalInter
40150
39673
  return terminalInteractive && (useTerminalBuffer ?? true) && !screenReader;
40151
39674
  }
40152
39675
  __name(shouldUseVirtualViewport, "shouldUseVirtualViewport");
40153
- function shouldUseIncrementalRendering(incrementalRendering, env = process14.env) {
39676
+ function shouldUseIncrementalRendering(incrementalRendering, env = process8.env) {
40154
39677
  const override = env["O1CODE_INCREMENTAL_RENDERING"];
40155
39678
  if (override === "0") {
40156
39679
  return false;
@@ -40995,7 +40518,7 @@ __name(useDeleteCommand, "useDeleteCommand");
40995
40518
  // packages/cli/src/ui/hooks/slashCommandProcessor.ts
40996
40519
  init_esbuild_shims();
40997
40520
  var import_react152 = __toESM(require_react(), 1);
40998
- import process15 from "node:process";
40521
+ import process9 from "node:process";
40999
40522
  var debugLogger35 = createDebugLogger("SLASH_COMMAND_PROCESSOR");
41000
40523
  function hasUserPromptExpansionHooks(config) {
41001
40524
  return !!config && !config.getDisableAllHooks?.() && (config.hasHooksForEvent?.("UserPromptExpansion") ?? false);
@@ -41032,14 +40555,14 @@ function shouldHideSlashCommandInvocation(command, canonicalPath, args) {
41032
40555
  return false;
41033
40556
  }
41034
40557
  if (canonicalPath.length === 1 && SLASH_COMMAND_ROOTS_HIDE_INVOCATION.has(canonicalPath[0] ?? "")) {
41035
- if (canonicalPath[0] === "theme" && process15.env["NO_COLOR"]) {
40558
+ if (canonicalPath[0] === "theme" && process9.env["NO_COLOR"]) {
41036
40559
  return false;
41037
40560
  }
41038
40561
  return true;
41039
40562
  }
41040
- const path15 = canonicalPath.join(" ");
41041
- if (BARE_SLASH_COMMANDS_HIDE_INVOCATION.has(path15)) {
41042
- if (path15 === "model") {
40563
+ const path14 = canonicalPath.join(" ");
40564
+ if (BARE_SLASH_COMMANDS_HIDE_INVOCATION.has(path14)) {
40565
+ if (path14 === "model") {
41043
40566
  return isPickerOnlyModelInvocation(args);
41044
40567
  }
41045
40568
  return args.trim() === "";
@@ -42260,7 +41783,7 @@ function useDoublePress(onDoublePress, onPending) {
42260
41783
  __name(useDoublePress, "useDoublePress");
42261
41784
 
42262
41785
  // packages/cli/src/ui/AppContainer.tsx
42263
- import * as fs21 from "node:fs";
41786
+ import * as fs16 from "node:fs";
42264
41787
  import { basename as basename3 } from "node:path";
42265
41788
 
42266
41789
  // packages/cli/src/ui/utils/windowTitle.ts
@@ -42348,9 +41871,9 @@ var import_react159 = __toESM(require_react(), 1);
42348
41871
  init_esbuild_shims();
42349
41872
  var import_react155 = __toESM(require_react(), 1);
42350
41873
  import crypto2 from "node:crypto";
42351
- import path8 from "node:path";
42352
- import os7 from "node:os";
42353
- import fs15 from "node:fs";
41874
+ import path7 from "node:path";
41875
+ import os6 from "node:os";
41876
+ import fs10 from "node:fs";
42354
41877
  var OUTPUT_UPDATE_INTERVAL_MS = 1e3;
42355
41878
  var MAX_OUTPUT_LENGTH = 1e4;
42356
41879
  var debugLogger36 = createDebugLogger("SHELL_COMMAND_PROCESSOR");
@@ -42391,23 +41914,30 @@ var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPend
42391
41914
  { type: "user_shell", text: rawQuery },
42392
41915
  userMessageTimestamp
42393
41916
  );
42394
- const isWindows = os7.platform() === "win32";
41917
+ const isWindows = os6.platform() === "win32";
41918
+ const selectedShell = config.getAgentShellConfiguration?.().shell ?? (isWindows ? "cmd" : "bash");
42395
41919
  const targetDir = config.getTargetDir();
42396
41920
  let commandToExecute = rawQuery;
42397
41921
  let pwdFilePath;
42398
- if (!isWindows && !config.getShellExecutionSandbox?.()) {
41922
+ if (selectedShell !== "cmd" && !config.getShellExecutionSandbox?.()) {
42399
41923
  let command = rawQuery.trim();
42400
41924
  const pwdFileName = `shell_pwd_${crypto2.randomBytes(6).toString("hex")}.tmp`;
42401
- pwdFilePath = path8.join(os7.tmpdir(), pwdFileName);
42402
- const trailingBackslashes = /\\+$/.exec(command)?.[0].length ?? 0;
42403
- if (trailingBackslashes % 2 === 1) {
42404
- command += "\n";
42405
- }
42406
- if (!command.endsWith(";") && !command.endsWith("&")) {
42407
- command += ";";
41925
+ pwdFilePath = path7.join(os6.tmpdir(), pwdFileName);
41926
+ const quotedPwdPath = escapeShellArg(pwdFilePath, selectedShell);
41927
+ if (selectedShell === "powershell") {
41928
+ commandToExecute = `& { ${command}
41929
+ }; $__o1Success = $?; $__o1ExitCode = $LASTEXITCODE; (Get-Location).ProviderPath | Set-Content -LiteralPath ${quotedPwdPath} -Encoding UTF8; if (-not $__o1Success) { if ($__o1ExitCode) { exit $__o1ExitCode }; exit 1 }; exit 0`;
41930
+ } else {
41931
+ const trailingBackslashes = /\\+$/.exec(command)?.[0].length ?? 0;
41932
+ if (trailingBackslashes % 2 === 1) {
41933
+ command += "\n";
41934
+ }
41935
+ if (!command.endsWith(";") && !command.endsWith("&")) {
41936
+ command += ";";
41937
+ }
41938
+ commandToExecute = `{ ${command}
41939
+ }; __code=$?; ${isWindows ? "pwd -W" : "pwd"} > ${quotedPwdPath}; exit $__code`;
42408
41940
  }
42409
- commandToExecute = `{ ${command}
42410
- }; __code=$?; pwd > "${pwdFilePath}"; exit $__code`;
42411
41941
  }
42412
41942
  const executeCommand = /* @__PURE__ */ __name(async (resolve5) => {
42413
41943
  let lastUpdateTime = Date.now();
@@ -42438,8 +41968,8 @@ var useShellCommandProcessor = /* @__PURE__ */ __name((addItemToHistory, setPend
42438
41968
  onDebugMessage(`Executing in ${targetDir}: ${commandToExecute}`);
42439
41969
  const cleanupShellCommand = /* @__PURE__ */ __name(() => {
42440
41970
  abortSignal.removeEventListener("abort", abortHandler);
42441
- if (pwdFilePath && fs15.existsSync(pwdFilePath)) {
42442
- fs15.unlinkSync(pwdFilePath);
41971
+ if (pwdFilePath && fs10.existsSync(pwdFilePath)) {
41972
+ fs10.unlinkSync(pwdFilePath);
42443
41973
  }
42444
41974
  setActiveShellPtyId(null);
42445
41975
  setShellInputFocused(false);
@@ -42563,9 +42093,10 @@ ${finalOutput}`;
42563
42093
  finalOutput = `Command exited with code ${result2.exitCode}.
42564
42094
  ${finalOutput}`;
42565
42095
  }
42566
- if (pwdFilePath && fs15.existsSync(pwdFilePath)) {
42567
- const finalPwd = fs15.readFileSync(pwdFilePath, "utf8").trim();
42568
- if (finalPwd && finalPwd !== targetDir) {
42096
+ if (pwdFilePath && fs10.existsSync(pwdFilePath)) {
42097
+ const finalPwd = fs10.readFileSync(pwdFilePath, "utf8").trim();
42098
+ const sameDirectory = isWindows ? path7.win32.normalize(finalPwd).toLowerCase() === path7.win32.normalize(targetDir).toLowerCase() : finalPwd === targetDir;
42099
+ if (finalPwd && !sameDirectory) {
42569
42100
  const warning = `WARNING: shell mode is stateless; the directory change to '${finalPwd}' will not persist.`;
42570
42101
  finalOutput = `${warning}
42571
42102
 
@@ -42658,7 +42189,7 @@ var useStateAndRef = /* @__PURE__ */ __name((initialValue) => {
42658
42189
  // packages/cli/src/ui/hooks/useReactToolScheduler.ts
42659
42190
  init_esbuild_shims();
42660
42191
  var import_react157 = __toESM(require_react(), 1);
42661
- import * as path9 from "node:path";
42192
+ import * as path8 from "node:path";
42662
42193
  var debugLogger37 = createDebugLogger("REACT_TOOL_SCHEDULER");
42663
42194
  function useReactToolScheduler(onComplete, config, getPreferredEditor, onEditorClose, onToolResultFullTurnModel) {
42664
42195
  const [toolCallsForDisplay, setToolCallsForDisplay] = (0, import_react157.useState)([]);
@@ -42896,7 +42427,7 @@ function detectMemoryOp(toolName, args, projectRoot) {
42896
42427
  const READ_TOOLS = /* @__PURE__ */ new Set(["read_file"]);
42897
42428
  const filePath = args?.["file_path"];
42898
42429
  if (!filePath) return void 0;
42899
- const resolved = path9.resolve(filePath);
42430
+ const resolved = path8.resolve(filePath);
42900
42431
  if (!isAnyAutoMemPath(resolved, projectRoot)) return void 0;
42901
42432
  if (WRITE_TOOLS.has(toolName)) return "write";
42902
42433
  if (READ_TOOLS.has(toolName)) return "read";
@@ -43031,8 +42562,8 @@ function mapToDisplay(toolOrTools, projectRoot) {
43031
42562
  __name(mapToDisplay, "mapToDisplay");
43032
42563
 
43033
42564
  // packages/cli/src/ui/hooks/use-llm-stream.ts
43034
- import { promises as fs16 } from "node:fs";
43035
- import path10 from "node:path";
42565
+ import { promises as fs11 } from "node:fs";
42566
+ import path9 from "node:path";
43036
42567
 
43037
42568
  // packages/cli/src/ui/auth/organizaone-unauthorized.ts
43038
42569
  init_esbuild_shims();
@@ -43056,7 +42587,7 @@ function reactToOrganizaOneUnauthorized(unauthorized, actions) {
43056
42587
  __name(reactToOrganizaOneUnauthorized, "reactToOrganizaOneUnauthorized");
43057
42588
 
43058
42589
  // packages/cli/src/ui/hooks/use-llm-stream.ts
43059
- import process16 from "node:process";
42590
+ import process10 from "node:process";
43060
42591
 
43061
42592
  // packages/cli/src/ui/hooks/useMessageQueue.ts
43062
42593
  init_esbuild_shims();
@@ -46860,8 +46391,25 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
46860
46391
  );
46861
46392
  });
46862
46393
  if (continuationWasCancelled()) {
46863
- if (toolGoalBinding && llmClient) {
46864
- llmClient.addHistory({ role: "user", parts: responsesToSend });
46394
+ if (llmClient) {
46395
+ const cancelledTurnParts = toolGoalBinding ? responsesToSend : finalizedResponses.flatMap(
46396
+ (entry, index) => orderedResponses[index].status === "cancelled" ? entry.responseParts : entry.responseParts.flatMap(
46397
+ (part) => part.functionResponse ? [
46398
+ {
46399
+ functionResponse: {
46400
+ id: part.functionResponse.id,
46401
+ name: part.functionResponse.name,
46402
+ response: {
46403
+ error: "[Operation Cancelled] User intentionally cancelled before this result was submitted; its output was discarded. Stop and await further instructions; do not retry."
46404
+ }
46405
+ }
46406
+ }
46407
+ ] : []
46408
+ )
46409
+ );
46410
+ if (cancelledTurnParts.length > 0) {
46411
+ llmClient.addHistory({ role: "user", parts: cancelledTurnParts });
46412
+ }
46865
46413
  }
46866
46414
  markToolsAsSubmitted(
46867
46415
  llmTools.map((toolCall) => toolCall.request.callId)
@@ -47260,7 +46808,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
47260
46808
  return;
47261
46809
  }
47262
46810
  try {
47263
- await fs16.mkdir(checkpointDir, { recursive: true });
46811
+ await fs11.mkdir(checkpointDir, { recursive: true });
47264
46812
  } catch (error) {
47265
46813
  if (!isNodeError(error) || error.code !== "EEXIST") {
47266
46814
  onDebugMessage(
@@ -47281,14 +46829,14 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
47281
46829
  const promptId = toolCall.request.prompt_id;
47282
46830
  const timestamp = (/* @__PURE__ */ new Date()).toISOString().replace(/:/g, "-").replace(/\./g, "_");
47283
46831
  const toolName = toolCall.request.name;
47284
- const fileName = path10.basename(filePath);
46832
+ const fileName = path9.basename(filePath);
47285
46833
  const toolCallWithSnapshotFileName = `${timestamp}-${fileName}-${toolName}.json`;
47286
46834
  const clientHistory = llmClient?.getHistoryShallow();
47287
- const toolCallWithSnapshotFilePath = path10.join(
46835
+ const toolCallWithSnapshotFilePath = path9.join(
47288
46836
  checkpointDir,
47289
46837
  toolCallWithSnapshotFileName
47290
46838
  );
47291
- await fs16.writeFile(
46839
+ await fs11.writeFile(
47292
46840
  toolCallWithSnapshotFilePath,
47293
46841
  JSON.stringify(
47294
46842
  {
@@ -47448,7 +46996,7 @@ var useLlmStream = /* @__PURE__ */ __name((llmClient, history, addItem, config,
47448
46996
  const summary = scheduler.getExitSummary();
47449
46997
  scheduler.stop();
47450
46998
  if (summary) {
47451
- process16.stderr.write(summary + "\n");
46999
+ process10.stderr.write(summary + "\n");
47452
47000
  }
47453
47001
  };
47454
47002
  }, [
@@ -47767,7 +47315,24 @@ ${text}` : text, "withDroppedSummary");
47767
47315
  // packages/cli/src/ui/hooks/vim.ts
47768
47316
  init_esbuild_shims();
47769
47317
  var import_react160 = __toESM(require_react(), 1);
47770
- import { execFile as execFile7, execFileSync as execFileSync2 } from "child_process";
47318
+ import { execFile as execFile3, execFileSync } from "child_process";
47319
+
47320
+ // packages/cli/src/ui/utils/clipboard-text.ts
47321
+ init_esbuild_shims();
47322
+ import { createRequire } from "node:module";
47323
+ function readWindowsClipboardText() {
47324
+ try {
47325
+ const native = createRequire(import.meta.url)(
47326
+ "@teddyzhu/clipboard"
47327
+ );
47328
+ return new native.ClipboardManager().getText();
47329
+ } catch {
47330
+ return void 0;
47331
+ }
47332
+ }
47333
+ __name(readWindowsClipboardText, "readWindowsClipboardText");
47334
+
47335
+ // packages/cli/src/ui/hooks/vim.ts
47771
47336
  var DIGIT_MULTIPLIER = 10;
47772
47337
  var DEFAULT_COUNT = 1;
47773
47338
  var MAX_COUNT = 9999;
@@ -47870,20 +47435,16 @@ var linuxReadCmd;
47870
47435
  var linuxWriteCmd;
47871
47436
  function readClipboard() {
47872
47437
  try {
47873
- const platform2 = process.platform;
47874
- if (platform2 === "darwin") {
47875
- return execFileSync2("pbpaste", [], {
47438
+ const platform = process.platform;
47439
+ if (platform === "darwin") {
47440
+ return execFileSync("pbpaste", [], {
47876
47441
  encoding: "utf-8",
47877
47442
  timeout: 200,
47878
47443
  stdio: ["pipe", "pipe", "ignore"]
47879
47444
  }).toString();
47880
47445
  }
47881
- if (platform2 === "win32") {
47882
- return execFileSync2("powershell", ["-c", "Get-Clipboard"], {
47883
- encoding: "utf-8",
47884
- timeout: 200,
47885
- stdio: ["pipe", "pipe", "ignore"]
47886
- }).toString();
47446
+ if (platform === "win32") {
47447
+ return readWindowsClipboardText();
47887
47448
  }
47888
47449
  if (linuxReadCmd === void 0) {
47889
47450
  const candidates = [
@@ -47894,7 +47455,7 @@ function readClipboard() {
47894
47455
  linuxReadCmd = null;
47895
47456
  for (const [bin, args] of candidates) {
47896
47457
  try {
47897
- execFileSync2(bin, args, {
47458
+ execFileSync(bin, args, {
47898
47459
  encoding: "utf-8",
47899
47460
  timeout: 200,
47900
47461
  stdio: ["pipe", "pipe", "ignore"]
@@ -47907,7 +47468,7 @@ function readClipboard() {
47907
47468
  }
47908
47469
  if (linuxReadCmd) {
47909
47470
  const [bin, ...args] = linuxReadCmd;
47910
- return execFileSync2(bin, args, {
47471
+ return execFileSync(bin, args, {
47911
47472
  encoding: "utf-8",
47912
47473
  timeout: 200,
47913
47474
  stdio: ["pipe", "pipe", "ignore"]
@@ -47922,17 +47483,17 @@ function readClipboard() {
47922
47483
  __name(readClipboard, "readClipboard");
47923
47484
  function writeClipboard(text) {
47924
47485
  try {
47925
- const platform2 = process.platform;
47486
+ const platform = process.platform;
47926
47487
  const cb = /* @__PURE__ */ __name(() => {
47927
47488
  }, "cb");
47928
- if (platform2 === "darwin") {
47929
- const child = execFile7("pbcopy", [], { timeout: 500 }, cb);
47489
+ if (platform === "darwin") {
47490
+ const child = execFile3("pbcopy", [], { timeout: 500 }, cb);
47930
47491
  child.stdin?.end(text);
47931
47492
  child.unref();
47932
47493
  return;
47933
47494
  }
47934
- if (platform2 === "win32") {
47935
- const child = execFile7("clip", [], { timeout: 500 }, cb);
47495
+ if (platform === "win32") {
47496
+ const child = execFile3("clip", [], { timeout: 500 }, cb);
47936
47497
  child.stdin?.end(text);
47937
47498
  child.unref();
47938
47499
  return;
@@ -47946,7 +47507,7 @@ function writeClipboard(text) {
47946
47507
  linuxWriteCmd = null;
47947
47508
  for (const [bin, args] of candidates) {
47948
47509
  try {
47949
- execFileSync2(bin, args, {
47510
+ execFileSync(bin, args, {
47950
47511
  input: text,
47951
47512
  timeout: 200,
47952
47513
  stdio: ["pipe", "pipe", "ignore"]
@@ -47959,7 +47520,7 @@ function writeClipboard(text) {
47959
47520
  }
47960
47521
  if (linuxWriteCmd) {
47961
47522
  const [bin, ...args] = linuxWriteCmd;
47962
- const child = execFile7(bin, args, { timeout: 500 }, (err) => {
47523
+ const child = execFile3(bin, args, { timeout: 500 }, (err) => {
47963
47524
  if (err && !writeOsc52(text)) {
47964
47525
  debugLogger39.warn(
47965
47526
  "writeClipboard: cached tool and OSC 52 both failed"
@@ -49230,7 +48791,7 @@ function useVim(buffer, onSubmit) {
49230
48791
  let text = s.yankRegister;
49231
48792
  let isLinewise = s.yankLinewise;
49232
48793
  if (!text) {
49233
- text = readClipboard();
48794
+ text = readClipboard() ?? "";
49234
48795
  isLinewise = text.includes("\n");
49235
48796
  }
49236
48797
  if (text) {
@@ -49275,7 +48836,7 @@ function useVim(buffer, onSubmit) {
49275
48836
  let text = s.yankRegister;
49276
48837
  let isLinewise = s.yankLinewise;
49277
48838
  if (!text) {
49278
- text = readClipboard();
48839
+ text = readClipboard() ?? "";
49279
48840
  isLinewise = text.includes("\n");
49280
48841
  }
49281
48842
  if (text) {
@@ -49785,7 +49346,7 @@ __name(useTerminalProgress, "useTerminalProgress");
49785
49346
  // packages/cli/src/ui/hooks/useFolderTrust.ts
49786
49347
  init_esbuild_shims();
49787
49348
  var import_react166 = __toESM(require_react(), 1);
49788
- import * as process17 from "node:process";
49349
+ import * as process11 from "node:process";
49789
49350
  var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
49790
49351
  const [isTrusted, setIsTrusted] = (0, import_react166.useState)(void 0);
49791
49352
  const [isFolderTrustDialogOpen, setIsFolderTrustDialogOpen] = (0, import_react166.useState)(false);
@@ -49800,7 +49361,7 @@ var useFolderTrust = /* @__PURE__ */ __name((settings, onTrustChange) => {
49800
49361
  const handleFolderTrustSelect = (0, import_react166.useCallback)(
49801
49362
  (choice) => {
49802
49363
  const trustedFolders = loadTrustedFolders();
49803
- const cwd3 = process17.cwd();
49364
+ const cwd3 = process11.cwd();
49804
49365
  let trustLevel;
49805
49366
  const wasTrusted = isTrusted ?? false;
49806
49367
  switch (choice) {
@@ -49977,11 +49538,11 @@ var import_react168 = __toESM(require_react(), 1);
49977
49538
 
49978
49539
  // packages/cli/src/services/command-migration-tool.ts
49979
49540
  init_esbuild_shims();
49980
- import { promises as fs17 } from "node:fs";
49981
- import path11 from "node:path";
49541
+ import { promises as fs12 } from "node:fs";
49542
+ import path10 from "node:path";
49982
49543
  async function detectTomlCommands(commandDir) {
49983
49544
  try {
49984
- await fs17.access(commandDir);
49545
+ await fs12.access(commandDir);
49985
49546
  } catch {
49986
49547
  return [];
49987
49548
  }
@@ -50005,16 +49566,16 @@ async function migrateTomlCommands(options) {
50005
49566
  return result;
50006
49567
  }
50007
49568
  for (const relativeFile of tomlFiles) {
50008
- const tomlPath = path11.join(commandDir, relativeFile);
49569
+ const tomlPath = path10.join(commandDir, relativeFile);
50009
49570
  try {
50010
- const tomlContent = await fs17.readFile(tomlPath, "utf-8");
49571
+ const tomlContent = await fs12.readFile(tomlPath, "utf-8");
50011
49572
  const markdownContent = convertTomlToMarkdown(tomlContent);
50012
49573
  const markdownPath = tomlPath.replace(/\.toml$/, ".md");
50013
49574
  try {
50014
- await fs17.access(markdownPath);
49575
+ await fs12.access(markdownPath);
50015
49576
  throw new Error(
50016
49577
  t("Markdown file already exists: {{filename}}", {
50017
- filename: path11.basename(markdownPath)
49578
+ filename: path10.basename(markdownPath)
50018
49579
  })
50019
49580
  );
50020
49581
  } catch (error) {
@@ -50022,12 +49583,12 @@ async function migrateTomlCommands(options) {
50022
49583
  throw error;
50023
49584
  }
50024
49585
  }
50025
- await fs17.writeFile(markdownPath, markdownContent, "utf-8");
49586
+ await fs12.writeFile(markdownPath, markdownContent, "utf-8");
50026
49587
  if (createBackup) {
50027
49588
  const backupPath = `${tomlPath}.backup`;
50028
- await fs17.rename(tomlPath, backupPath);
49589
+ await fs12.rename(tomlPath, backupPath);
50029
49590
  } else if (deleteOriginal) {
50030
- await fs17.unlink(tomlPath);
49591
+ await fs12.unlink(tomlPath);
50031
49592
  }
50032
49593
  result.convertedFiles.push(relativeFile);
50033
49594
  } catch (error) {
@@ -50115,14 +49676,14 @@ __name(sendNotification, "sendNotification");
50115
49676
  // packages/cli/src/ui/utils/whats-new.ts
50116
49677
  init_esbuild_shims();
50117
49678
  var import_semver = __toESM(require_semver(), 1);
50118
- import fs18 from "node:fs";
50119
- import path12 from "node:path";
49679
+ import fs13 from "node:fs";
49680
+ import path11 from "node:path";
50120
49681
  var MAX_HIGHLIGHTS = 4;
50121
49682
  var SEEN_VERSION_FILE = "last-seen-version";
50122
49683
  function loadReleaseHighlights(bundleDir = resolveBundleDir(import.meta.url)) {
50123
49684
  try {
50124
49685
  return JSON.parse(
50125
- fs18.readFileSync(path12.join(bundleDir, "release-notes.json"), "utf8")
49686
+ fs13.readFileSync(path11.join(bundleDir, "release-notes.json"), "utf8")
50126
49687
  );
50127
49688
  } catch {
50128
49689
  return void 0;
@@ -50145,21 +49706,21 @@ function computeWhatsNew(notes, fromVersion, toVersion, repoUrl = BRAND.repoUrl)
50145
49706
  }
50146
49707
  __name(computeWhatsNew, "computeWhatsNew");
50147
49708
  function seenVersionPath() {
50148
- return path12.join(Storage.getGlobalO1CodeDir(), SEEN_VERSION_FILE);
49709
+ return path11.join(Storage.getGlobalO1CodeDir(), SEEN_VERSION_FILE);
50149
49710
  }
50150
49711
  __name(seenVersionPath, "seenVersionPath");
50151
49712
  function takeWhatsNew(currentVersion, notes = loadReleaseHighlights()) {
50152
49713
  if (!import_semver.default.valid(currentVersion)) return void 0;
50153
49714
  let previous;
50154
49715
  try {
50155
- previous = fs18.readFileSync(seenVersionPath(), "utf8").trim();
49716
+ previous = fs13.readFileSync(seenVersionPath(), "utf8").trim();
50156
49717
  } catch {
50157
49718
  previous = void 0;
50158
49719
  }
50159
49720
  if (previous === currentVersion) return void 0;
50160
49721
  try {
50161
- fs18.mkdirSync(path12.dirname(seenVersionPath()), { recursive: true });
50162
- fs18.writeFileSync(seenVersionPath(), `${currentVersion}
49722
+ fs13.mkdirSync(path11.dirname(seenVersionPath()), { recursive: true });
49723
+ fs13.writeFileSync(seenVersionPath(), `${currentVersion}
50163
49724
  `);
50164
49725
  } catch {
50165
49726
  return void 0;
@@ -50237,9 +49798,9 @@ __name(useGitBranchName, "useGitBranchName");
50237
49798
  // packages/cli/src/ui/hooks/useWorktreeSession.ts
50238
49799
  init_esbuild_shims();
50239
49800
  var import_react170 = __toESM(require_react(), 1);
50240
- import fs19 from "node:fs";
49801
+ import fs14 from "node:fs";
50241
49802
  import fsPromises from "node:fs/promises";
50242
- import path13 from "node:path";
49803
+ import path12 from "node:path";
50243
49804
  function useWorktreeSession(config) {
50244
49805
  const [session, setSession] = (0, import_react170.useState)(null);
50245
49806
  (0, import_react170.useEffect)(() => {
@@ -50259,14 +49820,14 @@ function useWorktreeSession(config) {
50259
49820
  }, "safeLoad");
50260
49821
  void safeLoad();
50261
49822
  const filePath = config.getSessionService().getWorktreeSessionPath(config.getSessionId());
50262
- const dirPath = path13.dirname(filePath);
50263
- const fileName = path13.basename(filePath);
49823
+ const dirPath = path12.dirname(filePath);
49824
+ const fileName = path12.basename(filePath);
50264
49825
  let watcher;
50265
49826
  const setupWatcher = /* @__PURE__ */ __name(async () => {
50266
49827
  try {
50267
49828
  await fsPromises.mkdir(dirPath, { recursive: true });
50268
49829
  if (cancelled) return;
50269
- watcher = fs19.watch(dirPath, (_eventType, filename) => {
49830
+ watcher = fs14.watch(dirPath, (_eventType, filename) => {
50270
49831
  if (filename === null || filename.toString() === fileName) {
50271
49832
  void safeLoad();
50272
49833
  }
@@ -51083,8 +50644,8 @@ init_esbuild_shims();
51083
50644
 
51084
50645
  // packages/cli/src/services/tips/tipHistory.ts
51085
50646
  init_esbuild_shims();
51086
- import * as fs20 from "node:fs";
51087
- import * as path14 from "node:path";
50647
+ import * as fs15 from "node:fs";
50648
+ import * as path13 from "node:path";
51088
50649
  var TipHistory = class _TipHistory {
51089
50650
  static {
51090
50651
  __name(this, "TipHistory");
@@ -51149,9 +50710,9 @@ var TipHistory = class _TipHistory {
51149
50710
  */
51150
50711
  persist() {
51151
50712
  try {
51152
- const dir = path14.dirname(this.filePath);
51153
- if (!fs20.existsSync(dir)) {
51154
- fs20.mkdirSync(dir, { recursive: true });
50713
+ const dir = path13.dirname(this.filePath);
50714
+ if (!fs15.existsSync(dir)) {
50715
+ fs15.mkdirSync(dir, { recursive: true });
51155
50716
  }
51156
50717
  atomicWriteFileSync(this.filePath, JSON.stringify(this.data, null, 2), {
51157
50718
  mode: 384,
@@ -51165,14 +50726,14 @@ var TipHistory = class _TipHistory {
51165
50726
  * Load history from disk, incrementing session count.
51166
50727
  */
51167
50728
  static load() {
51168
- const filePath = path14.join(
50729
+ const filePath = path13.join(
51169
50730
  Storage.getGlobalO1CodeDir(),
51170
50731
  "tip_history.json"
51171
50732
  );
51172
50733
  let data = { sessionCount: 0, tips: {} };
51173
50734
  try {
51174
- if (fs20.existsSync(filePath)) {
51175
- const raw = fs20.readFileSync(filePath, "utf-8");
50735
+ if (fs15.existsSync(filePath)) {
50736
+ const raw = fs15.readFileSync(filePath, "utf-8");
51176
50737
  const parsed = JSON.parse(raw);
51177
50738
  if (typeof parsed === "object" && parsed !== null && typeof parsed.sessionCount === "number") {
51178
50739
  data = {
@@ -51954,7 +51515,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
51954
51515
  const { stdin, setRawMode } = use_stdin_default();
51955
51516
  const { stdout } = use_stdout_default();
51956
51517
  const writeRaw = (0, import_react185.useCallback)((data) => {
51957
- process18.stdout.write(data);
51518
+ process12.stdout.write(data);
51958
51519
  }, []);
51959
51520
  const terminal = (0, import_react185.useMemo)(
51960
51521
  () => buildTerminalNotification(writeRaw),
@@ -52221,7 +51782,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
52221
51782
  const staticAreaMaxItemHeight = Math.max(terminalHeight * 4, 100);
52222
51783
  const isValidPath = (0, import_react185.useCallback)((filePath) => {
52223
51784
  try {
52224
- return fs21.existsSync(filePath) && fs21.statSync(filePath).isFile();
51785
+ return fs16.existsSync(filePath) && fs16.statSync(filePath).isFile();
52225
51786
  } catch (_e) {
52226
51787
  return false;
52227
51788
  }
@@ -52632,7 +52193,7 @@ var AppContainer = /* @__PURE__ */ __name((props) => {
52632
52193
  if (exitStartedRef.current) return;
52633
52194
  exitStartedRef.current = true;
52634
52195
  await runExitCleanup();
52635
- process18.exit(0);
52196
+ process12.exit(0);
52636
52197
  }, []);
52637
52198
  const slashCommandActions = (0, import_react185.useMemo)(
52638
52199
  () => ({
@@ -54060,8 +53621,8 @@ ${currentText}` : popped.modelText
54060
53621
  const [escapePressedOnce, setEscapePressedOnce] = (0, import_react185.useState)(false);
54061
53622
  const escapeTimerRef = (0, import_react185.useRef)(null);
54062
53623
  const contextMenuOpenRef = (0, import_react185.useRef)(false);
54063
- const handleContextMenuChange = (0, import_react185.useCallback)((open2) => {
54064
- contextMenuOpenRef.current = open2;
53624
+ const handleContextMenuChange = (0, import_react185.useCallback)((open) => {
53625
+ contextMenuOpenRef.current = open;
54065
53626
  }, []);
54066
53627
  const dialogsVisibleRef = (0, import_react185.useRef)(false);
54067
53628
  const [isRewindSelectorOpen, setIsRewindSelectorOpen] = (0, import_react185.useState)(false);
@@ -54815,7 +54376,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
54815
54376
  lastTitleRef.current = null;
54816
54377
  const folderName2 = basename3(config.getTargetDir());
54817
54378
  writeTerminalTitle(
54818
- (value) => process18.stdout.write(value),
54379
+ (value) => process12.stdout.write(value),
54819
54380
  formatSessionWindowTitle(null, folderName2)
54820
54381
  );
54821
54382
  }
@@ -54829,7 +54390,7 @@ ${migrationResult.failedFiles.map((f) => ` \u2022 ${f.file}: ${f.error}`).join(
54829
54390
  );
54830
54391
  if (lastTitleRef.current !== title) {
54831
54392
  lastTitleRef.current = title;
54832
- writeTerminalTitle((value) => process18.stdout.write(value), title);
54393
+ writeTerminalTitle((value) => process12.stdout.write(value), title);
54833
54394
  }
54834
54395
  }, [
54835
54396
  sessionName,