reasonix 0.49.0 → 0.50.0

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 (326) hide show
  1. package/dashboard/dist/app.css +1 -0
  2. package/dashboard/dist/app.js +28 -30531
  3. package/dashboard/dist/app.js.map +1 -1
  4. package/dashboard/dist/assets/KaTeX_AMS-Regular.ttf +0 -0
  5. package/dashboard/dist/assets/KaTeX_AMS-Regular.woff +0 -0
  6. package/dashboard/dist/assets/KaTeX_AMS-Regular.woff2 +0 -0
  7. package/dashboard/dist/assets/KaTeX_Caligraphic-Bold.ttf +0 -0
  8. package/dashboard/dist/assets/KaTeX_Caligraphic-Bold.woff +0 -0
  9. package/dashboard/dist/assets/KaTeX_Caligraphic-Bold.woff2 +0 -0
  10. package/dashboard/dist/assets/KaTeX_Caligraphic-Regular.ttf +0 -0
  11. package/dashboard/dist/assets/KaTeX_Caligraphic-Regular.woff +0 -0
  12. package/dashboard/dist/assets/KaTeX_Caligraphic-Regular.woff2 +0 -0
  13. package/dashboard/dist/assets/KaTeX_Fraktur-Bold.ttf +0 -0
  14. package/dashboard/dist/assets/KaTeX_Fraktur-Bold.woff +0 -0
  15. package/dashboard/dist/assets/KaTeX_Fraktur-Bold.woff2 +0 -0
  16. package/dashboard/dist/assets/KaTeX_Fraktur-Regular.ttf +0 -0
  17. package/dashboard/dist/assets/KaTeX_Fraktur-Regular.woff +0 -0
  18. package/dashboard/dist/assets/KaTeX_Fraktur-Regular.woff2 +0 -0
  19. package/dashboard/dist/assets/KaTeX_Main-Bold.ttf +0 -0
  20. package/dashboard/dist/assets/KaTeX_Main-Bold.woff +0 -0
  21. package/dashboard/dist/assets/KaTeX_Main-Bold.woff2 +0 -0
  22. package/dashboard/dist/assets/KaTeX_Main-BoldItalic.ttf +0 -0
  23. package/dashboard/dist/assets/KaTeX_Main-BoldItalic.woff +0 -0
  24. package/dashboard/dist/assets/KaTeX_Main-BoldItalic.woff2 +0 -0
  25. package/dashboard/dist/assets/KaTeX_Main-Italic.ttf +0 -0
  26. package/dashboard/dist/assets/KaTeX_Main-Italic.woff +0 -0
  27. package/dashboard/dist/assets/KaTeX_Main-Italic.woff2 +0 -0
  28. package/dashboard/dist/assets/KaTeX_Main-Regular.ttf +0 -0
  29. package/dashboard/dist/assets/KaTeX_Main-Regular.woff +0 -0
  30. package/dashboard/dist/assets/KaTeX_Main-Regular.woff2 +0 -0
  31. package/dashboard/dist/assets/KaTeX_Math-BoldItalic.ttf +0 -0
  32. package/dashboard/dist/assets/KaTeX_Math-BoldItalic.woff +0 -0
  33. package/dashboard/dist/assets/KaTeX_Math-BoldItalic.woff2 +0 -0
  34. package/dashboard/dist/assets/KaTeX_Math-Italic.ttf +0 -0
  35. package/dashboard/dist/assets/KaTeX_Math-Italic.woff +0 -0
  36. package/dashboard/dist/assets/KaTeX_Math-Italic.woff2 +0 -0
  37. package/dashboard/dist/assets/KaTeX_SansSerif-Bold.ttf +0 -0
  38. package/dashboard/dist/assets/KaTeX_SansSerif-Bold.woff +0 -0
  39. package/dashboard/dist/assets/KaTeX_SansSerif-Bold.woff2 +0 -0
  40. package/dashboard/dist/assets/KaTeX_SansSerif-Italic.ttf +0 -0
  41. package/dashboard/dist/assets/KaTeX_SansSerif-Italic.woff +0 -0
  42. package/dashboard/dist/assets/KaTeX_SansSerif-Italic.woff2 +0 -0
  43. package/dashboard/dist/assets/KaTeX_SansSerif-Regular.ttf +0 -0
  44. package/dashboard/dist/assets/KaTeX_SansSerif-Regular.woff +0 -0
  45. package/dashboard/dist/assets/KaTeX_SansSerif-Regular.woff2 +0 -0
  46. package/dashboard/dist/assets/KaTeX_Script-Regular.ttf +0 -0
  47. package/dashboard/dist/assets/KaTeX_Script-Regular.woff +0 -0
  48. package/dashboard/dist/assets/KaTeX_Script-Regular.woff2 +0 -0
  49. package/dashboard/dist/assets/KaTeX_Size1-Regular.ttf +0 -0
  50. package/dashboard/dist/assets/KaTeX_Size1-Regular.woff +0 -0
  51. package/dashboard/dist/assets/KaTeX_Size1-Regular.woff2 +0 -0
  52. package/dashboard/dist/assets/KaTeX_Size2-Regular.ttf +0 -0
  53. package/dashboard/dist/assets/KaTeX_Size2-Regular.woff +0 -0
  54. package/dashboard/dist/assets/KaTeX_Size2-Regular.woff2 +0 -0
  55. package/dashboard/dist/assets/KaTeX_Size3-Regular.ttf +0 -0
  56. package/dashboard/dist/assets/KaTeX_Size3-Regular.woff +0 -0
  57. package/dashboard/dist/assets/KaTeX_Size4-Regular.ttf +0 -0
  58. package/dashboard/dist/assets/KaTeX_Size4-Regular.woff +0 -0
  59. package/dashboard/dist/assets/KaTeX_Size4-Regular.woff2 +0 -0
  60. package/dashboard/dist/assets/KaTeX_Typewriter-Regular.ttf +0 -0
  61. package/dashboard/dist/assets/KaTeX_Typewriter-Regular.woff +0 -0
  62. package/dashboard/dist/assets/KaTeX_Typewriter-Regular.woff2 +0 -0
  63. package/dashboard/dist/assets/geist-cyrillic-400-normal.woff +0 -0
  64. package/dashboard/dist/assets/geist-cyrillic-400-normal.woff2 +0 -0
  65. package/dashboard/dist/assets/geist-cyrillic-500-normal.woff +0 -0
  66. package/dashboard/dist/assets/geist-cyrillic-500-normal.woff2 +0 -0
  67. package/dashboard/dist/assets/geist-cyrillic-600-normal.woff +0 -0
  68. package/dashboard/dist/assets/geist-cyrillic-600-normal.woff2 +0 -0
  69. package/dashboard/dist/assets/geist-cyrillic-700-normal.woff +0 -0
  70. package/dashboard/dist/assets/geist-cyrillic-700-normal.woff2 +0 -0
  71. package/dashboard/dist/assets/geist-cyrillic-ext-500-normal.woff +0 -0
  72. package/dashboard/dist/assets/geist-cyrillic-ext-600-normal.woff +0 -0
  73. package/dashboard/dist/assets/geist-cyrillic-ext-700-normal.woff +0 -0
  74. package/dashboard/dist/assets/geist-latin-400-normal.woff +0 -0
  75. package/dashboard/dist/assets/geist-latin-400-normal.woff2 +0 -0
  76. package/dashboard/dist/assets/geist-latin-500-normal.woff +0 -0
  77. package/dashboard/dist/assets/geist-latin-500-normal.woff2 +0 -0
  78. package/dashboard/dist/assets/geist-latin-600-normal.woff +0 -0
  79. package/dashboard/dist/assets/geist-latin-600-normal.woff2 +0 -0
  80. package/dashboard/dist/assets/geist-latin-700-normal.woff +0 -0
  81. package/dashboard/dist/assets/geist-latin-700-normal.woff2 +0 -0
  82. package/dashboard/dist/assets/geist-latin-ext-400-normal.woff +0 -0
  83. package/dashboard/dist/assets/geist-latin-ext-400-normal.woff2 +0 -0
  84. package/dashboard/dist/assets/geist-latin-ext-500-normal.woff +0 -0
  85. package/dashboard/dist/assets/geist-latin-ext-500-normal.woff2 +0 -0
  86. package/dashboard/dist/assets/geist-latin-ext-600-normal.woff +0 -0
  87. package/dashboard/dist/assets/geist-latin-ext-600-normal.woff2 +0 -0
  88. package/dashboard/dist/assets/geist-latin-ext-700-normal.woff +0 -0
  89. package/dashboard/dist/assets/geist-latin-ext-700-normal.woff2 +0 -0
  90. package/dashboard/dist/assets/geist-mono-cyrillic-400-normal.woff +0 -0
  91. package/dashboard/dist/assets/geist-mono-cyrillic-400-normal.woff2 +0 -0
  92. package/dashboard/dist/assets/geist-mono-cyrillic-500-normal.woff +0 -0
  93. package/dashboard/dist/assets/geist-mono-cyrillic-500-normal.woff2 +0 -0
  94. package/dashboard/dist/assets/geist-mono-cyrillic-600-normal.woff +0 -0
  95. package/dashboard/dist/assets/geist-mono-cyrillic-600-normal.woff2 +0 -0
  96. package/dashboard/dist/assets/geist-mono-latin-400-normal.woff +0 -0
  97. package/dashboard/dist/assets/geist-mono-latin-400-normal.woff2 +0 -0
  98. package/dashboard/dist/assets/geist-mono-latin-500-normal.woff +0 -0
  99. package/dashboard/dist/assets/geist-mono-latin-500-normal.woff2 +0 -0
  100. package/dashboard/dist/assets/geist-mono-latin-600-normal.woff +0 -0
  101. package/dashboard/dist/assets/geist-mono-latin-600-normal.woff2 +0 -0
  102. package/dashboard/dist/assets/geist-mono-latin-ext-400-normal.woff +0 -0
  103. package/dashboard/dist/assets/geist-mono-latin-ext-400-normal.woff2 +0 -0
  104. package/dashboard/dist/assets/geist-mono-latin-ext-500-normal.woff +0 -0
  105. package/dashboard/dist/assets/geist-mono-latin-ext-500-normal.woff2 +0 -0
  106. package/dashboard/dist/assets/geist-mono-latin-ext-600-normal.woff +0 -0
  107. package/dashboard/dist/assets/geist-mono-latin-ext-600-normal.woff2 +0 -0
  108. package/dashboard/dist/assets/geist-mono-symbols2-400-normal.woff +0 -0
  109. package/dashboard/dist/assets/geist-mono-symbols2-500-normal.woff +0 -0
  110. package/dashboard/dist/assets/geist-mono-symbols2-600-normal.woff +0 -0
  111. package/dashboard/dist/assets/geist-mono-vietnamese-400-normal.woff +0 -0
  112. package/dashboard/dist/assets/geist-mono-vietnamese-500-normal.woff +0 -0
  113. package/dashboard/dist/assets/geist-mono-vietnamese-600-normal.woff +0 -0
  114. package/dashboard/dist/assets/geist-vietnamese-400-normal.woff +0 -0
  115. package/dashboard/dist/assets/geist-vietnamese-500-normal.woff +0 -0
  116. package/dashboard/dist/assets/geist-vietnamese-600-normal.woff +0 -0
  117. package/dashboard/dist/assets/geist-vietnamese-600-normal.woff2 +0 -0
  118. package/dashboard/dist/assets/geist-vietnamese-700-normal.woff +0 -0
  119. package/dashboard/dist/assets/inter-cyrillic-400-normal.woff +0 -0
  120. package/dashboard/dist/assets/inter-cyrillic-400-normal.woff2 +0 -0
  121. package/dashboard/dist/assets/inter-cyrillic-500-normal.woff +0 -0
  122. package/dashboard/dist/assets/inter-cyrillic-500-normal.woff2 +0 -0
  123. package/dashboard/dist/assets/inter-cyrillic-600-normal.woff +0 -0
  124. package/dashboard/dist/assets/inter-cyrillic-600-normal.woff2 +0 -0
  125. package/dashboard/dist/assets/inter-cyrillic-700-normal.woff +0 -0
  126. package/dashboard/dist/assets/inter-cyrillic-700-normal.woff2 +0 -0
  127. package/dashboard/dist/assets/inter-cyrillic-ext-400-normal.woff +0 -0
  128. package/dashboard/dist/assets/inter-cyrillic-ext-400-normal.woff2 +0 -0
  129. package/dashboard/dist/assets/inter-cyrillic-ext-500-normal.woff +0 -0
  130. package/dashboard/dist/assets/inter-cyrillic-ext-500-normal.woff2 +0 -0
  131. package/dashboard/dist/assets/inter-cyrillic-ext-600-normal.woff +0 -0
  132. package/dashboard/dist/assets/inter-cyrillic-ext-600-normal.woff2 +0 -0
  133. package/dashboard/dist/assets/inter-cyrillic-ext-700-normal.woff +0 -0
  134. package/dashboard/dist/assets/inter-cyrillic-ext-700-normal.woff2 +0 -0
  135. package/dashboard/dist/assets/inter-greek-400-normal.woff +0 -0
  136. package/dashboard/dist/assets/inter-greek-400-normal.woff2 +0 -0
  137. package/dashboard/dist/assets/inter-greek-500-normal.woff +0 -0
  138. package/dashboard/dist/assets/inter-greek-500-normal.woff2 +0 -0
  139. package/dashboard/dist/assets/inter-greek-600-normal.woff +0 -0
  140. package/dashboard/dist/assets/inter-greek-600-normal.woff2 +0 -0
  141. package/dashboard/dist/assets/inter-greek-700-normal.woff +0 -0
  142. package/dashboard/dist/assets/inter-greek-700-normal.woff2 +0 -0
  143. package/dashboard/dist/assets/inter-greek-ext-400-normal.woff +0 -0
  144. package/dashboard/dist/assets/inter-greek-ext-400-normal.woff2 +0 -0
  145. package/dashboard/dist/assets/inter-greek-ext-500-normal.woff +0 -0
  146. package/dashboard/dist/assets/inter-greek-ext-500-normal.woff2 +0 -0
  147. package/dashboard/dist/assets/inter-greek-ext-600-normal.woff +0 -0
  148. package/dashboard/dist/assets/inter-greek-ext-600-normal.woff2 +0 -0
  149. package/dashboard/dist/assets/inter-greek-ext-700-normal.woff +0 -0
  150. package/dashboard/dist/assets/inter-greek-ext-700-normal.woff2 +0 -0
  151. package/dashboard/dist/assets/inter-latin-400-normal.woff +0 -0
  152. package/dashboard/dist/assets/inter-latin-400-normal.woff2 +0 -0
  153. package/dashboard/dist/assets/inter-latin-500-normal.woff +0 -0
  154. package/dashboard/dist/assets/inter-latin-500-normal.woff2 +0 -0
  155. package/dashboard/dist/assets/inter-latin-600-normal.woff +0 -0
  156. package/dashboard/dist/assets/inter-latin-600-normal.woff2 +0 -0
  157. package/dashboard/dist/assets/inter-latin-700-normal.woff +0 -0
  158. package/dashboard/dist/assets/inter-latin-700-normal.woff2 +0 -0
  159. package/dashboard/dist/assets/inter-latin-ext-400-normal.woff +0 -0
  160. package/dashboard/dist/assets/inter-latin-ext-400-normal.woff2 +0 -0
  161. package/dashboard/dist/assets/inter-latin-ext-500-normal.woff +0 -0
  162. package/dashboard/dist/assets/inter-latin-ext-500-normal.woff2 +0 -0
  163. package/dashboard/dist/assets/inter-latin-ext-600-normal.woff +0 -0
  164. package/dashboard/dist/assets/inter-latin-ext-600-normal.woff2 +0 -0
  165. package/dashboard/dist/assets/inter-latin-ext-700-normal.woff +0 -0
  166. package/dashboard/dist/assets/inter-latin-ext-700-normal.woff2 +0 -0
  167. package/dashboard/dist/assets/inter-vietnamese-400-normal.woff +0 -0
  168. package/dashboard/dist/assets/inter-vietnamese-400-normal.woff2 +0 -0
  169. package/dashboard/dist/assets/inter-vietnamese-500-normal.woff +0 -0
  170. package/dashboard/dist/assets/inter-vietnamese-500-normal.woff2 +0 -0
  171. package/dashboard/dist/assets/inter-vietnamese-600-normal.woff +0 -0
  172. package/dashboard/dist/assets/inter-vietnamese-600-normal.woff2 +0 -0
  173. package/dashboard/dist/assets/inter-vietnamese-700-normal.woff +0 -0
  174. package/dashboard/dist/assets/inter-vietnamese-700-normal.woff2 +0 -0
  175. package/dashboard/dist/vendor-icons.js +102 -0
  176. package/dashboard/dist/vendor-icons.js.map +1 -0
  177. package/dashboard/dist/vendor-katex.css +1 -0
  178. package/dashboard/dist/vendor-katex.js +258 -0
  179. package/dashboard/dist/vendor-katex.js.map +1 -0
  180. package/dashboard/dist/vendor-markdown.js +36 -0
  181. package/dashboard/dist/vendor-markdown.js.map +1 -0
  182. package/dashboard/dist/vendor-prism.js +15 -0
  183. package/dashboard/dist/vendor-prism.js.map +1 -0
  184. package/dashboard/dist/vendor-react.js +50 -0
  185. package/dashboard/dist/vendor-react.js.map +1 -0
  186. package/dashboard/index.html +4 -3
  187. package/dist/cli/{acp-WFQIC6SO.js → acp-6B25WIFF.js} +48 -49
  188. package/dist/cli/acp-6B25WIFF.js.map +1 -0
  189. package/dist/cli/chat-7WASPB4O.js +50 -0
  190. package/dist/cli/{chunk-QF32ROX2.js → chunk-3KRRTLC5.js} +955 -788
  191. package/dist/cli/chunk-3KRRTLC5.js.map +1 -0
  192. package/dist/cli/{chunk-TEDWJKEI.js → chunk-3RNFYDDM.js} +11 -27
  193. package/dist/cli/chunk-3RNFYDDM.js.map +1 -0
  194. package/dist/cli/{chunk-ZWHSHFDP.js → chunk-6IUMTRFP.js} +35 -7
  195. package/dist/cli/chunk-6IUMTRFP.js.map +1 -0
  196. package/dist/cli/{chunk-GNS7BAT2.js → chunk-7WITYWKN.js} +2 -2
  197. package/dist/cli/{chunk-HIYTRCSW.js → chunk-7YPMTE3U.js} +65 -28
  198. package/dist/cli/chunk-7YPMTE3U.js.map +1 -0
  199. package/dist/cli/{chunk-DFX5ZH5L.js → chunk-AAHB2PFX.js} +2 -2
  200. package/dist/cli/{chunk-PB3MAFEI.js → chunk-AJIZ5KFK.js} +3 -3
  201. package/dist/cli/{chunk-U5XQDCK7.js → chunk-ALCOQP6R.js} +10 -9
  202. package/dist/cli/chunk-ALCOQP6R.js.map +1 -0
  203. package/dist/cli/{chunk-6OWJV3YW.js → chunk-CAGKEGNE.js} +1 -2
  204. package/dist/cli/{chunk-JNTMOX7G.js → chunk-ENFBF6HI.js} +15 -3
  205. package/dist/cli/chunk-ENFBF6HI.js.map +1 -0
  206. package/dist/cli/{chunk-J2IHQGPQ.js → chunk-EZ57UEZQ.js} +2 -2
  207. package/dist/cli/{chunk-QX5TWXRZ.js → chunk-FQSQFCBI.js} +41 -2
  208. package/dist/cli/chunk-FQSQFCBI.js.map +1 -0
  209. package/dist/cli/{chunk-ZAEJWKXB.js → chunk-GMSAB2TC.js} +2 -2
  210. package/dist/cli/{chunk-MQWO32ZD.js → chunk-GPUH2BNM.js} +123 -286
  211. package/dist/cli/chunk-GPUH2BNM.js.map +1 -0
  212. package/dist/cli/{chunk-7AST3QQ3.js → chunk-I4Q3QT4W.js} +2 -2
  213. package/dist/cli/{chunk-O5LIHAMP.js → chunk-I6FBSTTR.js} +3 -3
  214. package/dist/cli/{chunk-AWEULQG6.js → chunk-IBRTU5WO.js} +25 -15
  215. package/dist/cli/{chunk-AWEULQG6.js.map → chunk-IBRTU5WO.js.map} +1 -1
  216. package/dist/cli/{chunk-RRXUIPWG.js → chunk-IK6WWRIX.js} +1 -1
  217. package/dist/cli/chunk-IK6WWRIX.js.map +1 -0
  218. package/dist/cli/{chunk-WMTMMSXU.js → chunk-MXWPAPZW.js} +315 -233
  219. package/dist/cli/chunk-MXWPAPZW.js.map +1 -0
  220. package/dist/cli/{chunk-7JTKBJ2G.js → chunk-NLRC3DWQ.js} +3 -3
  221. package/dist/cli/{chunk-PXBQ6IZ7.js → chunk-OPGWCKKU.js} +2 -2
  222. package/dist/cli/{chunk-23ZPCIPR.js → chunk-OWA42BKS.js} +21 -20
  223. package/dist/cli/chunk-OWA42BKS.js.map +1 -0
  224. package/dist/cli/{chunk-YEF7C4XI.js → chunk-PYIZZAVQ.js} +102 -94
  225. package/dist/cli/chunk-PYIZZAVQ.js.map +1 -0
  226. package/dist/cli/{chunk-EQATK2L2.js → chunk-SVD4UPRQ.js} +4 -3
  227. package/dist/cli/chunk-SVD4UPRQ.js.map +1 -0
  228. package/dist/cli/{chunk-PEMG6CUB.js → chunk-TX652NBA.js} +2 -2
  229. package/dist/cli/{chunk-W46ZMNKO.js → chunk-VVMY4M7J.js} +21 -2
  230. package/dist/cli/chunk-VVMY4M7J.js.map +1 -0
  231. package/dist/cli/{chunk-TAIKVL35.js → chunk-WSBFVOCO.js} +2 -2
  232. package/dist/cli/{chunk-ASOLXV67.js → chunk-X2BQZQEE.js} +3 -3
  233. package/dist/cli/{chunk-E5WCLUIU.js → chunk-XJZWMU5P.js} +2 -2
  234. package/dist/cli/{chunk-MGTBP7GG.js → chunk-XWPZHWC2.js} +20 -7
  235. package/dist/cli/chunk-XWPZHWC2.js.map +1 -0
  236. package/dist/cli/{chunk-JGTX4RRQ.js → chunk-ZAXMJANP.js} +2 -2
  237. package/dist/cli/{code-R4IHI7SR.js → code-TBK2TASK.js} +49 -57
  238. package/dist/cli/code-TBK2TASK.js.map +1 -0
  239. package/dist/cli/{commands-DRHFCYMO.js → commands-NXTKSQTN.js} +4 -4
  240. package/dist/cli/{commit-AG5KB4YP.js → commit-IR5SPP7A.js} +7 -8
  241. package/dist/cli/commit-IR5SPP7A.js.map +1 -0
  242. package/dist/cli/config-XK5WQGTS.js +194 -0
  243. package/dist/cli/{desktop-JGL6GORA.js → desktop-5NTQBADL.js} +200 -113
  244. package/dist/cli/desktop-5NTQBADL.js.map +1 -0
  245. package/dist/cli/{diff-4Z7ETWZO.js → diff-JNYX5BSZ.js} +8 -8
  246. package/dist/cli/{doctor-VA3RHQLB.js → doctor-IKYLUFXX.js} +11 -11
  247. package/dist/cli/{events-VRYXOSKI.js → events-HSC57ONU.js} +12 -8
  248. package/dist/cli/{events-VRYXOSKI.js.map → events-HSC57ONU.js.map} +1 -1
  249. package/dist/cli/index.js +87 -84
  250. package/dist/cli/index.js.map +1 -1
  251. package/dist/cli/{mcp-LZO4HXFA.js → mcp-BDJJWOCD.js} +3 -3
  252. package/dist/cli/{mcp-browse-C3GXVMYZ.js → mcp-browse-NJRZDI6V.js} +8 -8
  253. package/dist/cli/{mcp-inspect-ZMYUNFDS.js → mcp-inspect-Y62NWZQL.js} +7 -6
  254. package/dist/cli/mcp-inspect-Y62NWZQL.js.map +1 -0
  255. package/dist/cli/{prompt-MC3U5KRP.js → prompt-UTOIFUQC.js} +5 -5
  256. package/dist/cli/{prune-sessions-OEPFH4N6.js → prune-sessions-UCUD4XAP.js} +4 -4
  257. package/dist/cli/{replay-4TP7ZUMZ.js → replay-VVIN64MN.js} +10 -19
  258. package/dist/cli/replay-VVIN64MN.js.map +1 -0
  259. package/dist/cli/{run-6MXQYBOE.js → run-76OBDZFB.js} +28 -25
  260. package/dist/cli/run-76OBDZFB.js.map +1 -0
  261. package/dist/cli/{server-Z3IMJNNI.js → server-SZZDKTH2.js} +404 -163
  262. package/dist/cli/server-SZZDKTH2.js.map +1 -0
  263. package/dist/cli/{sessions-NXQ5SAV7.js → sessions-FZTGRCM5.js} +18 -18
  264. package/dist/cli/{setup-LHZELI6I.js → setup-4UNENGOE.js} +14 -40
  265. package/dist/cli/setup-4UNENGOE.js.map +1 -0
  266. package/dist/cli/{stats-SUIJ3QWY.js → stats-F4NDOD7D.js} +6 -6
  267. package/dist/cli/stats-F4NDOD7D.js.map +1 -0
  268. package/dist/cli/version-LUVTWHLL.js +33 -0
  269. package/dist/index.d.ts +325 -299
  270. package/dist/index.js +438 -528
  271. package/dist/index.js.map +1 -1
  272. package/package.json +5 -3
  273. package/dist/cli/acp-WFQIC6SO.js.map +0 -1
  274. package/dist/cli/chat-D32JGNVH.js +0 -51
  275. package/dist/cli/chunk-23ZPCIPR.js.map +0 -1
  276. package/dist/cli/chunk-EQATK2L2.js.map +0 -1
  277. package/dist/cli/chunk-HIYTRCSW.js.map +0 -1
  278. package/dist/cli/chunk-JNTMOX7G.js.map +0 -1
  279. package/dist/cli/chunk-LGEKVMMV.js +0 -59
  280. package/dist/cli/chunk-LGEKVMMV.js.map +0 -1
  281. package/dist/cli/chunk-MGTBP7GG.js.map +0 -1
  282. package/dist/cli/chunk-MQWO32ZD.js.map +0 -1
  283. package/dist/cli/chunk-QF32ROX2.js.map +0 -1
  284. package/dist/cli/chunk-QX5TWXRZ.js.map +0 -1
  285. package/dist/cli/chunk-RRXUIPWG.js.map +0 -1
  286. package/dist/cli/chunk-TEDWJKEI.js.map +0 -1
  287. package/dist/cli/chunk-U5XQDCK7.js.map +0 -1
  288. package/dist/cli/chunk-W46ZMNKO.js.map +0 -1
  289. package/dist/cli/chunk-WMTMMSXU.js.map +0 -1
  290. package/dist/cli/chunk-YEF7C4XI.js.map +0 -1
  291. package/dist/cli/chunk-ZWHSHFDP.js.map +0 -1
  292. package/dist/cli/code-R4IHI7SR.js.map +0 -1
  293. package/dist/cli/commit-AG5KB4YP.js.map +0 -1
  294. package/dist/cli/desktop-JGL6GORA.js.map +0 -1
  295. package/dist/cli/mcp-inspect-ZMYUNFDS.js.map +0 -1
  296. package/dist/cli/replay-4TP7ZUMZ.js.map +0 -1
  297. package/dist/cli/run-6MXQYBOE.js.map +0 -1
  298. package/dist/cli/server-Z3IMJNNI.js.map +0 -1
  299. package/dist/cli/setup-LHZELI6I.js.map +0 -1
  300. package/dist/cli/version-BIFONEUB.js +0 -33
  301. /package/dist/cli/{chat-D32JGNVH.js.map → chat-7WASPB4O.js.map} +0 -0
  302. /package/dist/cli/{chunk-GNS7BAT2.js.map → chunk-7WITYWKN.js.map} +0 -0
  303. /package/dist/cli/{chunk-DFX5ZH5L.js.map → chunk-AAHB2PFX.js.map} +0 -0
  304. /package/dist/cli/{chunk-PB3MAFEI.js.map → chunk-AJIZ5KFK.js.map} +0 -0
  305. /package/dist/cli/{chunk-6OWJV3YW.js.map → chunk-CAGKEGNE.js.map} +0 -0
  306. /package/dist/cli/{chunk-J2IHQGPQ.js.map → chunk-EZ57UEZQ.js.map} +0 -0
  307. /package/dist/cli/{chunk-ZAEJWKXB.js.map → chunk-GMSAB2TC.js.map} +0 -0
  308. /package/dist/cli/{chunk-7AST3QQ3.js.map → chunk-I4Q3QT4W.js.map} +0 -0
  309. /package/dist/cli/{chunk-O5LIHAMP.js.map → chunk-I6FBSTTR.js.map} +0 -0
  310. /package/dist/cli/{chunk-7JTKBJ2G.js.map → chunk-NLRC3DWQ.js.map} +0 -0
  311. /package/dist/cli/{chunk-PXBQ6IZ7.js.map → chunk-OPGWCKKU.js.map} +0 -0
  312. /package/dist/cli/{chunk-PEMG6CUB.js.map → chunk-TX652NBA.js.map} +0 -0
  313. /package/dist/cli/{chunk-TAIKVL35.js.map → chunk-WSBFVOCO.js.map} +0 -0
  314. /package/dist/cli/{chunk-ASOLXV67.js.map → chunk-X2BQZQEE.js.map} +0 -0
  315. /package/dist/cli/{chunk-E5WCLUIU.js.map → chunk-XJZWMU5P.js.map} +0 -0
  316. /package/dist/cli/{chunk-JGTX4RRQ.js.map → chunk-ZAXMJANP.js.map} +0 -0
  317. /package/dist/cli/{commands-DRHFCYMO.js.map → commands-NXTKSQTN.js.map} +0 -0
  318. /package/dist/cli/{doctor-VA3RHQLB.js.map → config-XK5WQGTS.js.map} +0 -0
  319. /package/dist/cli/{diff-4Z7ETWZO.js.map → diff-JNYX5BSZ.js.map} +0 -0
  320. /package/dist/cli/{prompt-MC3U5KRP.js.map → doctor-IKYLUFXX.js.map} +0 -0
  321. /package/dist/cli/{mcp-LZO4HXFA.js.map → mcp-BDJJWOCD.js.map} +0 -0
  322. /package/dist/cli/{mcp-browse-C3GXVMYZ.js.map → mcp-browse-NJRZDI6V.js.map} +0 -0
  323. /package/dist/cli/{stats-SUIJ3QWY.js.map → prompt-UTOIFUQC.js.map} +0 -0
  324. /package/dist/cli/{prune-sessions-OEPFH4N6.js.map → prune-sessions-UCUD4XAP.js.map} +0 -0
  325. /package/dist/cli/{sessions-NXQ5SAV7.js.map → sessions-FZTGRCM5.js.map} +0 -0
  326. /package/dist/cli/{version-BIFONEUB.js.map → version-LUVTWHLL.js.map} +0 -0
@@ -3,16 +3,18 @@ import { createRequire as __cr } from 'node:module'; if (typeof globalThis.requi
3
3
  import {
4
4
  QQChannel,
5
5
  createMcpRuntime
6
- } from "./chunk-U5XQDCK7.js";
6
+ } from "./chunk-ALCOQP6R.js";
7
7
  import {
8
+ applyPlanMode,
8
9
  buildCodeToolset
9
- } from "./chunk-AWEULQG6.js";
10
+ } from "./chunk-IBRTU5WO.js";
11
+ import "./chunk-WSBFVOCO.js";
10
12
  import {
11
13
  Eventizer,
12
14
  autoResolveVerdict
13
- } from "./chunk-MGTBP7GG.js";
14
- import "./chunk-GNS7BAT2.js";
15
- import "./chunk-EQATK2L2.js";
15
+ } from "./chunk-XWPZHWC2.js";
16
+ import "./chunk-7WITYWKN.js";
17
+ import "./chunk-SVD4UPRQ.js";
16
18
  import {
17
19
  CacheFirstLoop,
18
20
  ImmutablePrefix,
@@ -20,41 +22,28 @@ import {
20
22
  listFilesWithStatsAsync,
21
23
  parseAtQuery,
22
24
  rankPickerCandidates
23
- } from "./chunk-MQWO32ZD.js";
24
- import "./chunk-7AST3QQ3.js";
25
- import "./chunk-7JTKBJ2G.js";
26
- import "./chunk-HIYTRCSW.js";
27
- import {
28
- MemoryStore,
29
- codeSystemPrompt
30
- } from "./chunk-O5LIHAMP.js";
31
- import "./chunk-FEZK652I.js";
32
- import {
33
- canonicalPresetName,
34
- resolvePreset
35
- } from "./chunk-LGEKVMMV.js";
36
- import {
37
- countTokensBounded
38
- } from "./chunk-6OWJV3YW.js";
39
- import {
40
- DeepSeekClient,
41
- pickPrimaryBalance
42
- } from "./chunk-J2IHQGPQ.js";
43
- import "./chunk-25T6CVUP.js";
44
- import {
45
- loadDotenv
46
- } from "./chunk-2UQP6H6T.js";
47
- import "./chunk-TAIKVL35.js";
25
+ } from "./chunk-GPUH2BNM.js";
26
+ import "./chunk-I4Q3QT4W.js";
27
+ import "./chunk-NLRC3DWQ.js";
28
+ import "./chunk-7YPMTE3U.js";
48
29
  import {
49
30
  pauseGate,
50
31
  toApprovalPrompt
51
- } from "./chunk-ZWHSHFDP.js";
32
+ } from "./chunk-6IUMTRFP.js";
33
+ import {
34
+ MemoryStore,
35
+ codeSystemPrompt
36
+ } from "./chunk-I6FBSTTR.js";
52
37
  import {
53
38
  SkillStore
54
- } from "./chunk-JNTMOX7G.js";
39
+ } from "./chunk-ENFBF6HI.js";
40
+ import "./chunk-FEZK652I.js";
55
41
  import "./chunk-PLHAZOLZ.js";
56
- import "./chunk-DFX5ZH5L.js";
57
- import "./chunk-PB3MAFEI.js";
42
+ import "./chunk-AAHB2PFX.js";
43
+ import {
44
+ countTokensBounded
45
+ } from "./chunk-CAGKEGNE.js";
46
+ import "./chunk-AJIZ5KFK.js";
58
47
  import "./chunk-S4XVGLRW.js";
59
48
  import {
60
49
  deleteSession,
@@ -64,23 +53,36 @@ import {
64
53
  patchSessionMeta,
65
54
  sessionPath,
66
55
  timestampSuffix
67
- } from "./chunk-RRXUIPWG.js";
68
- import "./chunk-ZAEJWKXB.js";
69
- import "./chunk-QX5TWXRZ.js";
70
- import "./chunk-YEF7C4XI.js";
56
+ } from "./chunk-IK6WWRIX.js";
71
57
  import {
58
+ DeepSeekClient,
59
+ pickPrimaryBalance
60
+ } from "./chunk-EZ57UEZQ.js";
61
+ import "./chunk-25T6CVUP.js";
62
+ import {
63
+ loadDotenv
64
+ } from "./chunk-2UQP6H6T.js";
65
+ import "./chunk-GMSAB2TC.js";
66
+ import "./chunk-FQSQFCBI.js";
67
+ import "./chunk-PYIZZAVQ.js";
68
+ import {
69
+ DEFAULT_MODEL,
70
+ bridgeEndpointEnv,
72
71
  describeQQAccess,
73
72
  isPlausibleKey,
73
+ isReasoningEffort,
74
74
  loadApiKey,
75
- loadBaseUrl,
76
75
  loadDesktopOpenTabs,
77
76
  loadEditMode,
78
77
  loadEditor,
79
- loadPreset,
78
+ loadEndpoint,
79
+ loadModel,
80
80
  loadQQConfig,
81
81
  loadReasoningEffort,
82
82
  loadRecentWorkspaces,
83
83
  loadResolvedSkillPaths,
84
+ loadShowSystemEvents,
85
+ loadSubagentModels,
84
86
  loadWorkspaceDir,
85
87
  parseMcpSpec,
86
88
  pushRecentWorkspace,
@@ -90,12 +92,15 @@ import {
90
92
  saveDesktopOpenTabs,
91
93
  saveEditMode,
92
94
  saveEditor,
93
- savePreset,
95
+ saveModel,
94
96
  saveQQConfig,
95
97
  saveReasoningEffort,
98
+ saveShowSystemEvents,
99
+ saveSubagentModels,
96
100
  saveWorkspaceDir,
101
+ webSearchEngine,
97
102
  writeConfig
98
- } from "./chunk-WMTMMSXU.js";
103
+ } from "./chunk-MXWPAPZW.js";
99
104
  import {
100
105
  VERSION
101
106
  } from "./chunk-XXC2BYTV.js";
@@ -207,6 +212,38 @@ function setDesktopQQEnabled(enabled, path) {
207
212
  return loadDesktopQQState(path);
208
213
  }
209
214
 
215
+ // src/desktop/qq-turn-routing.ts
216
+ function createQQTurnRoutingState() {
217
+ return {
218
+ replyTabs: /* @__PURE__ */ new Set(),
219
+ pendingByTab: /* @__PURE__ */ new Map()
220
+ };
221
+ }
222
+ function markQQTurnStarted(state, tabId) {
223
+ state.replyTabs.add(tabId);
224
+ }
225
+ function markQQTurnFinished(state, tabId) {
226
+ state.replyTabs.delete(tabId);
227
+ state.pendingByTab.delete(tabId);
228
+ }
229
+ function shouldRouteQQForTab(state, tabId) {
230
+ return state.replyTabs.has(tabId);
231
+ }
232
+ function setQQPendingInteraction(state, tabId, gateId, kind, payload) {
233
+ if (!shouldRouteQQForTab(state, tabId)) return;
234
+ state.pendingByTab.set(tabId, { gateId, kind, payload });
235
+ }
236
+ function takeQQPendingInteraction(state, tabId) {
237
+ const hit = state.pendingByTab.get(tabId);
238
+ if (!hit) return null;
239
+ state.pendingByTab.delete(tabId);
240
+ return hit;
241
+ }
242
+ function clearQQTurnRouting(state) {
243
+ state.replyTabs.clear();
244
+ state.pendingByTab.clear();
245
+ }
246
+
210
247
  // src/cli/commands/desktop.ts
211
248
  var desktopQqRuntimeSnapshot = {
212
249
  runtimeState: "disconnected"
@@ -293,21 +330,25 @@ function buildLoadedMessages(records) {
293
330
  return out;
294
331
  }
295
332
  function emitSettings(tab) {
296
- const apiKey = loadApiKey();
333
+ const ep = loadEndpoint();
334
+ const editMode = loadEditMode();
335
+ if (tab.toolset) applyPlanMode(tab.toolset.tools, editMode);
297
336
  const recent = loadRecentWorkspaces().filter((p) => p !== tab.rootDir);
298
337
  emit(
299
338
  {
300
339
  type: "$settings",
301
340
  reasoningEffort: loadReasoningEffort(),
302
- editMode: loadEditMode(),
341
+ editMode,
303
342
  budgetUsd: tab.runtime?.loop.budgetUsd ?? null,
304
- baseUrl: loadBaseUrl(),
305
- apiKeyPrefix: apiKey ? `${apiKey.slice(0, 6)}\u2026${apiKey.slice(-3)}` : void 0,
343
+ baseUrl: ep.baseUrl,
344
+ apiKeyPrefix: ep.apiKey ? `${ep.apiKey.slice(0, 6)}\u2026${ep.apiKey.slice(-3)}` : void 0,
306
345
  workspaceDir: tab.rootDir,
307
346
  recentWorkspaces: recent,
308
347
  model: tab.currentModel,
309
- preset: tab.currentPreset,
310
348
  editor: loadEditor(),
349
+ webSearchEngine: webSearchEngine(),
350
+ subagentModels: loadSubagentModels(),
351
+ showSystemEvents: loadShowSystemEvents(),
311
352
  version: VERSION
312
353
  },
313
354
  tab.id
@@ -424,7 +465,8 @@ function emitSkills(tab) {
424
465
  try {
425
466
  const store = new SkillStore({
426
467
  projectRoot: tab.rootDir,
427
- customSkillPaths: loadResolvedSkillPaths(tab.rootDir)
468
+ customSkillPaths: loadResolvedSkillPaths(tab.rootDir),
469
+ subagentModels: loadSubagentModels()
428
470
  });
429
471
  const items = store.list().map((s) => ({
430
472
  name: s.name,
@@ -455,10 +497,11 @@ function mintSessionFor(rootDir) {
455
497
  function buildRuntimeFor(tab) {
456
498
  if (!tab.toolset) throw new Error("buildRuntimeFor called before initTabToolset finished");
457
499
  const toolset = tab.toolset;
458
- const client = new DeepSeekClient({ baseUrl: loadBaseUrl() });
500
+ applyPlanMode(toolset.tools, loadEditMode());
501
+ const ep = loadEndpoint();
502
+ const client = new DeepSeekClient({ apiKey: ep.apiKey, baseUrl: ep.baseUrl });
459
503
  const prefix = new ImmutablePrefix({ system: tab.system, toolSpecs: toolset.tools.specs() });
460
504
  const reasoningEffort = loadReasoningEffort();
461
- const { autoEscalate } = resolvePreset(tab.currentPreset);
462
505
  const loop = new CacheFirstLoop({
463
506
  client,
464
507
  prefix,
@@ -466,8 +509,7 @@ function buildRuntimeFor(tab) {
466
509
  model: tab.currentModel,
467
510
  budgetUsd: tab.budgetUsd,
468
511
  session: tab.currentSession,
469
- reasoningEffort,
470
- autoEscalate
512
+ reasoningEffort
471
513
  });
472
514
  const eventizer = new Eventizer();
473
515
  const ctx = { model: tab.currentModel, prefixHash: prefix.fingerprint, reasoningEffort };
@@ -582,9 +624,7 @@ async function desktopCommand(opts) {
582
624
  channel: null,
583
625
  runtimeState: "disconnected",
584
626
  lastError: void 0,
585
- pendingGateId: null,
586
- interaction: { kind: null, payload: null },
587
- replyThisTurn: false
627
+ routing: createQQTurnRoutingState()
588
628
  };
589
629
  function currentQqSettings() {
590
630
  const base = loadDesktopQQState();
@@ -663,14 +703,12 @@ async function desktopCommand(opts) {
663
703
  ""
664
704
  ).trim();
665
705
  }
666
- function handleQQPauseReply(text) {
667
- if (qqRuntime.interaction.kind === null || qqRuntime.pendingGateId === null) return false;
668
- qqRuntime.replyThisTurn = true;
706
+ function handleQQPauseReply(tab, text) {
707
+ const pending = takeQQPendingInteraction(qqRuntime.routing, tab.id);
708
+ if (!pending) return false;
669
709
  const followup = stripFollowupPrefix(text);
670
- const interaction = qqRuntime.interaction;
671
- qqRuntime.interaction = { kind: null, payload: null };
672
- const gateId = qqRuntime.pendingGateId;
673
- qqRuntime.pendingGateId = null;
710
+ const interaction = pending;
711
+ const gateId = pending.gateId;
674
712
  switch (interaction.kind) {
675
713
  case "run_command":
676
714
  case "run_background":
@@ -737,8 +775,7 @@ async function desktopCommand(opts) {
737
775
  }
738
776
  }
739
777
  function handleQQPauseRequest(tab, kind, payload) {
740
- if (!qqRuntime.channel) return;
741
- qqRuntime.interaction = { kind, payload };
778
+ if (!qqRuntime.channel || !shouldRouteQQForTab(qqRuntime.routing, tab.id)) return;
742
779
  let qqMessage = "";
743
780
  switch (kind) {
744
781
  case "run_command":
@@ -851,14 +888,13 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
851
888
  },
852
889
  tab.id
853
890
  );
854
- if (handleQQPauseReply(trimmed)) return;
891
+ if (handleQQPauseReply(tab, trimmed)) return;
855
892
  if (tab.aborter) {
856
893
  void channel.sendResponse(
857
894
  "Session is busy. Wait for the current turn or reply to the pending prompt."
858
895
  ).catch(() => void 0);
859
896
  return;
860
897
  }
861
- qqRuntime.replyThisTurn = true;
862
898
  void runTurn(tab, trimmed, true);
863
899
  },
864
900
  onError: (message) => {
@@ -883,9 +919,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
883
919
  async function stopDesktopQQ(shouldDisable = true) {
884
920
  const channel = qqRuntime.channel;
885
921
  qqRuntime.channel = null;
886
- qqRuntime.interaction = { kind: null, payload: null };
887
- qqRuntime.pendingGateId = null;
888
- qqRuntime.replyThisTurn = false;
922
+ clearQQTurnRouting(qqRuntime.routing);
889
923
  if (channel) await channel.stop();
890
924
  if (shouldDisable) setDesktopQQEnabled(false);
891
925
  setQQRuntimeState("disconnected");
@@ -893,14 +927,11 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
893
927
  function createTabSkeleton(initialDir) {
894
928
  const dir = resolve(initialDir ?? opts.dir ?? loadWorkspaceDir() ?? process.cwd());
895
929
  pushRecentWorkspace(dir);
896
- const preset = canonicalPresetName(loadPreset());
897
- const resolved = resolvePreset(preset);
898
- const model = opts.model || resolved.model;
930
+ const model = opts.model || loadModel() || DEFAULT_MODEL;
899
931
  const tab = {
900
932
  id: nextTabId(),
901
933
  rootDir: dir,
902
934
  currentSession: "",
903
- currentPreset: preset,
904
935
  currentModel: model,
905
936
  budgetUsd: opts.budgetUsd,
906
937
  toolset: null,
@@ -917,7 +948,8 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
917
948
  completedStepIds: /* @__PURE__ */ new Set(),
918
949
  planTotalSteps: 0,
919
950
  mcpRuntime: null,
920
- mcpStatuses: /* @__PURE__ */ new Map()
951
+ mcpStatuses: /* @__PURE__ */ new Map(),
952
+ switching: false
921
953
  };
922
954
  tab.currentSession = mintSessionFor(dir);
923
955
  tabs.set(tab.id, tab);
@@ -935,7 +967,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
935
967
  modelId: tab.currentModel
936
968
  });
937
969
  if (loadApiKey()) {
938
- process.env.DEEPSEEK_API_KEY = loadApiKey();
970
+ bridgeEndpointEnv();
939
971
  tab.runtime = buildRuntimeFor(tab);
940
972
  void bridgeTabMcp(tab);
941
973
  }
@@ -956,6 +988,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
956
988
  },
957
989
  getMcpPrefix: () => void 0,
958
990
  getRequestedCount: () => requested,
991
+ getWorkspaceDir: () => tab.rootDir,
959
992
  progressSink: { current: null }
960
993
  });
961
994
  tab.mcpRuntime = runtime;
@@ -1021,7 +1054,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1021
1054
  if (!tab.runtime) return;
1022
1055
  const rt = tab.runtime;
1023
1056
  tab.aborter = new AbortController();
1024
- qqRuntime.replyThisTurn = fromQQ;
1057
+ if (fromQQ) markQQTurnStarted(qqRuntime.routing, tab.id);
1025
1058
  let lastAssistantText = "";
1026
1059
  if (tab.currentSession) {
1027
1060
  const existing = loadSessionMeta(tab.currentSession).summary;
@@ -1051,20 +1084,26 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1051
1084
  emit({ type: "$error", message: err.message }, tab.id);
1052
1085
  } finally {
1053
1086
  tab.aborter = null;
1054
- if (fromQQ && lastAssistantText && qqRuntime.channel && qqRuntime.replyThisTurn) {
1055
- await qqRuntime.channel.sendResponse(lastAssistantText).catch((err) => {
1056
- emit({ type: "$error", message: `qq send failed: ${err.message}` }, tab.id);
1057
- });
1058
- }
1059
- qqRuntime.replyThisTurn = false;
1060
- emit({ type: "$turn_complete" }, tab.id);
1061
- if (tab.planTotalSteps > 0 && tab.completedStepIds.size >= tab.planTotalSteps) {
1062
- tab.completedStepIds.clear();
1063
- tab.planTotalSteps = 0;
1064
- emit({ type: "$plan_cleared" }, tab.id);
1087
+ if (!tab.switching) {
1088
+ if (fromQQ && lastAssistantText && qqRuntime.channel && shouldRouteQQForTab(qqRuntime.routing, tab.id)) {
1089
+ await qqRuntime.channel.sendResponse(lastAssistantText).catch((err) => {
1090
+ emit(
1091
+ { type: "$error", message: `qq send failed: ${err.message}` },
1092
+ tab.id
1093
+ );
1094
+ });
1095
+ }
1096
+ emit({ type: "$turn_complete" }, tab.id);
1097
+ if (tab.planTotalSteps > 0 && tab.completedStepIds.size >= tab.planTotalSteps) {
1098
+ tab.completedStepIds.clear();
1099
+ tab.planTotalSteps = 0;
1100
+ emit({ type: "$plan_cleared" }, tab.id);
1101
+ }
1102
+ emitSessions(tab);
1103
+ void emitBalance(tab);
1065
1104
  }
1066
- emitSessions(tab);
1067
- void emitBalance(tab);
1105
+ if (fromQQ) markQQTurnFinished(qqRuntime.routing, tab.id);
1106
+ tab.switching = false;
1068
1107
  }
1069
1108
  });
1070
1109
  }
@@ -1115,9 +1154,9 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1115
1154
  }
1116
1155
  return void 0;
1117
1156
  }
1118
- function abortTurn(tab) {
1157
+ function abortTurn(tab, opts2 = {}) {
1119
1158
  tab.aborter?.abort();
1120
- tab.runtime?.loop.abort();
1159
+ tab.runtime?.loop.abort(opts2.discardCurrentTurn ? { discardCurrentTurn: true } : void 0);
1121
1160
  }
1122
1161
  function tabSessionLabel(tab) {
1123
1162
  if (tab.currentSession) {
@@ -1209,7 +1248,6 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1209
1248
  const tab = activeRunningTab();
1210
1249
  const tabId = tab?.id;
1211
1250
  if (tab) tab.pendingGateIds.add(req.id);
1212
- qqRuntime.pendingGateId = req.id;
1213
1251
  const auto = autoResolveVerdict(req, loadEditMode());
1214
1252
  if (auto !== null) {
1215
1253
  if (req.kind === "plan_checkpoint") {
@@ -1232,6 +1270,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1232
1270
  }
1233
1271
  if (req.kind === "run_command" || req.kind === "run_background") {
1234
1272
  const payload = req.payload;
1273
+ if (tab) setQQPendingInteraction(qqRuntime.routing, tab.id, req.id, req.kind, payload);
1235
1274
  emit(
1236
1275
  {
1237
1276
  type: "$confirm_required",
@@ -1251,6 +1290,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1251
1290
  }
1252
1291
  if (req.kind === "path_access") {
1253
1292
  const payload = req.payload;
1293
+ if (tab) setQQPendingInteraction(qqRuntime.routing, tab.id, req.id, req.kind, payload);
1254
1294
  emit(
1255
1295
  {
1256
1296
  type: "$path_access_required",
@@ -1273,6 +1313,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1273
1313
  }
1274
1314
  if (req.kind === "choice") {
1275
1315
  const payload = req.payload;
1316
+ if (tab) setQQPendingInteraction(qqRuntime.routing, tab.id, req.id, req.kind, payload);
1276
1317
  emit(
1277
1318
  {
1278
1319
  type: "$choice_required",
@@ -1291,6 +1332,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1291
1332
  if (tab) {
1292
1333
  tab.completedStepIds.clear();
1293
1334
  tab.planTotalSteps = payload.steps?.length ?? 0;
1335
+ setQQPendingInteraction(qqRuntime.routing, tab.id, req.id, req.kind, payload);
1294
1336
  }
1295
1337
  emit(
1296
1338
  {
@@ -1307,7 +1349,10 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1307
1349
  }
1308
1350
  if (req.kind === "plan_checkpoint") {
1309
1351
  const payload = req.payload;
1310
- if (tab) tab.completedStepIds.add(payload.stepId);
1352
+ if (tab) {
1353
+ tab.completedStepIds.add(payload.stepId);
1354
+ setQQPendingInteraction(qqRuntime.routing, tab.id, req.id, req.kind, payload);
1355
+ }
1311
1356
  emit(
1312
1357
  {
1313
1358
  type: "$step_completed",
@@ -1336,6 +1381,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1336
1381
  }
1337
1382
  if (req.kind === "plan_revision") {
1338
1383
  const payload = req.payload;
1384
+ if (tab) setQQPendingInteraction(qqRuntime.routing, tab.id, req.id, req.kind, payload);
1339
1385
  emit(
1340
1386
  {
1341
1387
  type: "$revision_required",
@@ -1389,7 +1435,8 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1389
1435
  carryover: {
1390
1436
  totalCostUsd: meta.totalCostUsd ?? 0,
1391
1437
  cacheHitTokens: meta.cacheHitTokens ?? 0,
1392
- cacheMissTokens: meta.cacheMissTokens ?? 0
1438
+ cacheMissTokens: meta.cacheMissTokens ?? 0,
1439
+ totalCompletionTokens: meta.totalCompletionTokens ?? 0
1393
1440
  }
1394
1441
  },
1395
1442
  tab.id
@@ -1405,14 +1452,16 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1405
1452
  });
1406
1453
  return tab;
1407
1454
  }
1408
- const savedTabs = opts.dir ? [] : loadDesktopOpenTabs().filter((t) => {
1455
+ const savedTabs = loadDesktopOpenTabs().filter((t) => {
1409
1456
  try {
1410
1457
  return existsSync(t.dir) && statSync(t.dir).isDirectory();
1411
1458
  } catch {
1412
1459
  return false;
1413
1460
  }
1414
1461
  });
1415
- first = bootstrapTab(savedTabs[0]?.dir, savedTabs[0]);
1462
+ const startupDir = opts.dir;
1463
+ const startupTab = startupDir ? savedTabs.find((t) => resolve(t.dir) === resolve(startupDir)) : savedTabs[0];
1464
+ first = bootstrapTab(opts.dir ?? savedTabs[0]?.dir, startupTab);
1416
1465
  const restored = [first];
1417
1466
  for (const t of savedTabs.slice(1)) restored.push(bootstrapTab(t.dir, t));
1418
1467
  const activeIdx = savedTabs.findIndex((t) => t.active);
@@ -1498,7 +1547,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1498
1547
  }
1499
1548
  try {
1500
1549
  saveApiKey(key);
1501
- process.env.DEEPSEEK_API_KEY = key;
1550
+ bridgeEndpointEnv();
1502
1551
  for (const tab2 of tabs.values()) {
1503
1552
  if (!tab2.toolset) {
1504
1553
  emitSettings(tab2);
@@ -1531,6 +1580,27 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1531
1580
  if (!hasKey) emit({ type: "$needs_setup", reason: "no_api_key" }, t.id);
1532
1581
  else if (t.toolset) emit({ type: "$ready" }, t.id);
1533
1582
  void emitBalance(t);
1583
+ if (t.currentSession) {
1584
+ try {
1585
+ const msgs = buildLoadedMessages(loadSessionMessages(t.currentSession));
1586
+ const meta = loadSessionMeta(t.currentSession);
1587
+ emit(
1588
+ {
1589
+ type: "$session_loaded",
1590
+ name: t.currentSession,
1591
+ messages: msgs,
1592
+ carryover: {
1593
+ totalCostUsd: meta.totalCostUsd ?? 0,
1594
+ cacheHitTokens: meta.cacheHitTokens ?? 0,
1595
+ cacheMissTokens: meta.cacheMissTokens ?? 0,
1596
+ totalCompletionTokens: meta.totalCompletionTokens ?? 0
1597
+ }
1598
+ },
1599
+ t.id
1600
+ );
1601
+ } catch {
1602
+ }
1603
+ }
1534
1604
  }
1535
1605
  return;
1536
1606
  }
@@ -1555,7 +1625,7 @@ ${optionsList}${p.allowCustom ? "\n\n(You can also reply with custom text.)" : "
1555
1625
  return;
1556
1626
  }
1557
1627
  if (msg.cmd === "abort") {
1558
- abortTurn(tab);
1628
+ abortTurn(tab, { discardCurrentTurn: true });
1559
1629
  cancelPendingGates(tab);
1560
1630
  return;
1561
1631
  }
@@ -1672,6 +1742,7 @@ ${found.body}${argsLine}`;
1672
1742
  try {
1673
1743
  const records = loadSessionMessages(msg.name);
1674
1744
  const meta = loadSessionMeta(msg.name);
1745
+ if (tab.aborter) tab.switching = true;
1675
1746
  abortTurn(tab);
1676
1747
  cancelPendingGates(tab);
1677
1748
  tab.currentSession = msg.name;
@@ -1698,7 +1769,8 @@ ${found.body}${argsLine}`;
1698
1769
  carryover: {
1699
1770
  totalCostUsd: meta.totalCostUsd ?? 0,
1700
1771
  cacheHitTokens: meta.cacheHitTokens ?? 0,
1701
- cacheMissTokens: meta.cacheMissTokens ?? 0
1772
+ cacheMissTokens: meta.cacheMissTokens ?? 0,
1773
+ totalCompletionTokens: meta.totalCompletionTokens ?? 0
1702
1774
  }
1703
1775
  },
1704
1776
  tab.id
@@ -1711,6 +1783,7 @@ ${found.body}${argsLine}`;
1711
1783
  return;
1712
1784
  }
1713
1785
  if (msg.cmd === "new_chat") {
1786
+ if (tab.aborter) tab.switching = true;
1714
1787
  abortTurn(tab);
1715
1788
  cancelPendingGates(tab);
1716
1789
  tab.currentSession = mintSessionFor(tab.rootDir);
@@ -1729,11 +1802,14 @@ ${found.body}${argsLine}`;
1729
1802
  }
1730
1803
  if (msg.cmd === "settings_save") {
1731
1804
  try {
1732
- if (msg.reasoningEffort !== void 0) {
1805
+ if (msg.reasoningEffort !== void 0 && isReasoningEffort(msg.reasoningEffort)) {
1733
1806
  saveReasoningEffort(msg.reasoningEffort);
1734
1807
  tab.runtime?.loop.configure({ reasoningEffort: msg.reasoningEffort });
1735
1808
  }
1736
- if (msg.editMode !== void 0) saveEditMode(msg.editMode);
1809
+ if (msg.editMode !== void 0) {
1810
+ saveEditMode(msg.editMode);
1811
+ if (tab.toolset) applyPlanMode(tab.toolset.tools, msg.editMode);
1812
+ }
1737
1813
  if (msg.budgetUsd !== void 0) {
1738
1814
  tab.budgetUsd = msg.budgetUsd ?? void 0;
1739
1815
  tab.runtime?.loop.setBudget(msg.budgetUsd);
@@ -1744,17 +1820,28 @@ ${found.body}${argsLine}`;
1744
1820
  return;
1745
1821
  }
1746
1822
  if (msg.editor !== void 0) saveEditor(msg.editor);
1747
- if (msg.preset !== void 0) {
1748
- tab.currentPreset = canonicalPresetName(msg.preset);
1749
- const resolved = resolvePreset(tab.currentPreset);
1750
- tab.currentModel = resolved.model;
1751
- savePreset(tab.currentPreset);
1752
- if (tab.toolset) {
1753
- tab.system = codeSystemPrompt(tab.rootDir, {
1754
- hasSemanticSearch: tab.toolset.semantic.enabled,
1755
- modelId: tab.currentModel
1756
- });
1757
- if (tab.runtime) tab.runtime = buildRuntimeFor(tab);
1823
+ if (msg.showSystemEvents !== void 0) saveShowSystemEvents(msg.showSystemEvents);
1824
+ if (msg.webSearchEngine !== void 0) {
1825
+ const cfg = readConfig();
1826
+ cfg.webSearchEngine = msg.webSearchEngine;
1827
+ writeConfig(cfg);
1828
+ }
1829
+ if (msg.subagentModels !== void 0) {
1830
+ saveSubagentModels(msg.subagentModels);
1831
+ emitSkills(tab);
1832
+ }
1833
+ if (msg.model !== void 0) {
1834
+ const next = msg.model.trim();
1835
+ if (next) {
1836
+ tab.currentModel = next;
1837
+ saveModel(next);
1838
+ if (tab.toolset) {
1839
+ tab.system = codeSystemPrompt(tab.rootDir, {
1840
+ hasSemanticSearch: tab.toolset.semantic.enabled,
1841
+ modelId: tab.currentModel
1842
+ });
1843
+ if (tab.runtime) tab.runtime = buildRuntimeFor(tab);
1844
+ }
1758
1845
  }
1759
1846
  }
1760
1847
  emitSettings(tab);
@@ -1992,4 +2079,4 @@ export {
1992
2079
  normalizeSessionTitle,
1993
2080
  writeAllSync
1994
2081
  };
1995
- //# sourceMappingURL=desktop-JGL6GORA.js.map
2082
+ //# sourceMappingURL=desktop-5NTQBADL.js.map