@qitqode/qitqode-android-arm64 0.1.36 → 0.2.1

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 (419) hide show
  1. package/bundle/{chunk-cx7p4ezk.js → chunk-03mbn7nj.js} +2 -2
  2. package/bundle/{chunk-1yv5h8k4.js → chunk-073ydjmk.js} +1 -1
  3. package/bundle/{chunk-rrd0jf5m.js → chunk-07s30fpb.js} +1 -1
  4. package/bundle/{chunk-yacccwf6.js → chunk-087tnr8a.js} +1 -1
  5. package/bundle/{chunk-kx2dp8ch.js → chunk-0f3ft9dh.js} +1 -1
  6. package/bundle/{chunk-rgxy4ngt.js → chunk-0gab4v98.js} +1 -1
  7. package/bundle/chunk-0xrr0k94.js +2 -0
  8. package/bundle/chunk-0yagj4ss.js +2 -0
  9. package/bundle/chunk-0ych0f5w.js +2 -0
  10. package/bundle/{chunk-xyjehgzm.js → chunk-0z1cxvk1.js} +2 -2
  11. package/bundle/{chunk-rph9zj24.js → chunk-0zxwjsvz.js} +1 -1
  12. package/bundle/{chunk-pqnbdygz.js → chunk-1p6jjrea.js} +2 -2
  13. package/bundle/{chunk-9cw4cnz0.js → chunk-1q1cddy4.js} +1 -1
  14. package/bundle/{chunk-w9pdvcf9.js → chunk-1sfcxdbw.js} +2 -2
  15. package/bundle/chunk-22hr3ndh.js +2 -0
  16. package/bundle/chunk-23tyxyyj.js +2 -0
  17. package/bundle/chunk-28g1ndpx.js +2 -0
  18. package/bundle/chunk-29v1v357.js +2 -0
  19. package/bundle/{chunk-txqc7543.js → chunk-29zm623f.js} +2 -2
  20. package/bundle/{chunk-wm77svwm.js → chunk-2a9rzgk6.js} +1 -1
  21. package/bundle/chunk-2avxtbv3.js +2 -0
  22. package/bundle/{chunk-eaqfnwdj.js → chunk-2bgqy6z7.js} +1 -1
  23. package/bundle/{chunk-9zre5e54.js → chunk-2hv2c8d5.js} +1 -1
  24. package/bundle/{chunk-swcgsrbj.js → chunk-2jpmxt4v.js} +1 -1
  25. package/bundle/chunk-2qk0k2eb.js +2 -0
  26. package/bundle/{chunk-nsjp44fp.js → chunk-2qwmrp16.js} +1 -1
  27. package/bundle/{chunk-dykqn0nj.js → chunk-2xqqkf86.js} +2 -2
  28. package/bundle/{chunk-mvsrzvc4.js → chunk-3aq70t26.js} +1 -1
  29. package/bundle/{chunk-zfcfyagt.js → chunk-3h49k2ck.js} +1 -1
  30. package/bundle/chunk-3kn57y8d.js +619 -0
  31. package/bundle/chunk-3ktj87g4.js +2 -0
  32. package/bundle/{chunk-52b1v7mn.js → chunk-3qfpw8f6.js} +1 -1
  33. package/bundle/{chunk-v3x5nrc4.js → chunk-3tmq81kq.js} +2 -2
  34. package/bundle/chunk-3wxvpvg4.js +3 -0
  35. package/bundle/{chunk-neqy8j4n.js → chunk-42r7z6sq.js} +1 -1
  36. package/bundle/chunk-42wdfks8.js +2 -0
  37. package/bundle/chunk-4f19vqxf.js +2 -0
  38. package/bundle/{chunk-d93z6hrn.js → chunk-4fk46ngj.js} +1 -1
  39. package/bundle/{chunk-njkserae.js → chunk-4hd3v58j.js} +1 -1
  40. package/bundle/chunk-4jq25vbc.js +2 -0
  41. package/bundle/chunk-4m3k1atq.js +2 -0
  42. package/bundle/{chunk-1wpjmwnh.js → chunk-4mvg7jt1.js} +1 -1
  43. package/bundle/chunk-4n2ytddp.js +2 -0
  44. package/bundle/{chunk-zesbm9k1.js → chunk-4sxg9cgr.js} +1 -1
  45. package/bundle/{chunk-8fgamz4y.js → chunk-4v61ysex.js} +1 -1
  46. package/bundle/chunk-4yg42p6y.js +2 -0
  47. package/bundle/chunk-4zx3ze68.js +2 -0
  48. package/bundle/chunk-57xbwzdn.js +3 -0
  49. package/bundle/{chunk-rexdr63q.js → chunk-5az84brc.js} +2 -2
  50. package/bundle/{chunk-y0ydzdfc.js → chunk-5t0w9ecw.js} +1 -1
  51. package/bundle/{chunk-nq495be3.js → chunk-5wwd40t3.js} +1 -1
  52. package/bundle/chunk-637sjdzq.js +2 -0
  53. package/bundle/{chunk-snt1kefv.js → chunk-64c8q9zg.js} +3 -3
  54. package/bundle/{chunk-g794ey6w.js → chunk-6avjq7my.js} +1 -1
  55. package/bundle/chunk-6bghztra.js +2 -0
  56. package/bundle/{chunk-n0trgp1c.js → chunk-6dfjtzqb.js} +2 -2
  57. package/bundle/chunk-6h8f89tt.js +2 -0
  58. package/bundle/{chunk-b0jh0rby.js → chunk-6j339s7a.js} +2 -2
  59. package/bundle/{chunk-8q6z6emx.js → chunk-6kf4vw2g.js} +1 -1
  60. package/bundle/{chunk-hgsykghj.js → chunk-6pcmv8vs.js} +2 -2
  61. package/bundle/chunk-6sjj203r.js +2 -0
  62. package/bundle/{chunk-pmv8yr8c.js → chunk-6y4mwmn4.js} +1 -1
  63. package/bundle/{chunk-kt0ej3nq.js → chunk-6ypafpg8.js} +1 -1
  64. package/bundle/{chunk-p8kpqyxb.js → chunk-732yr6qq.js} +2 -2
  65. package/bundle/{chunk-3sz6gw10.js → chunk-73fz0cf4.js} +2 -2
  66. package/bundle/chunk-79aka9xe.js +2 -0
  67. package/bundle/{chunk-8tp4whyw.js → chunk-7my2231h.js} +1 -1
  68. package/bundle/{chunk-e03tgfpb.js → chunk-7myg8076.js} +6 -6
  69. package/bundle/{chunk-hbh2034m.js → chunk-7njz51r4.js} +1 -1
  70. package/bundle/chunk-7nqdhe7x.js +2 -0
  71. package/bundle/{chunk-zaan8jk6.js → chunk-7ntw4rrn.js} +1 -1
  72. package/bundle/chunk-7rhry8nv.js +2 -0
  73. package/bundle/chunk-7x88b2n2.js +2 -0
  74. package/bundle/{chunk-983rqajz.js → chunk-7zvawpe1.js} +2 -2
  75. package/bundle/{chunk-jgz1a29w.js → chunk-86jsqc7d.js} +3 -3
  76. package/bundle/{chunk-zbqzm65q.js → chunk-86yk21g4.js} +1 -1
  77. package/bundle/{chunk-w3bmf3zz.js → chunk-8e6gx3gg.js} +1 -1
  78. package/bundle/chunk-8mthftwc.js +2 -0
  79. package/bundle/{chunk-73ckx171.js → chunk-8q5ns61h.js} +1 -1
  80. package/bundle/{chunk-549ptbaj.js → chunk-8rh0femq.js} +1 -1
  81. package/bundle/chunk-8wdara3b.js +2 -0
  82. package/bundle/chunk-8xhzpnph.js +2 -0
  83. package/bundle/{chunk-kqhh2pm9.js → chunk-94qhpkfx.js} +1 -1
  84. package/bundle/{chunk-gxmxx8jb.js → chunk-99148b1k.js} +1 -1
  85. package/bundle/chunk-9akz8w0d.js +2 -0
  86. package/bundle/{chunk-7gbytqkn.js → chunk-9b4aqcde.js} +2 -2
  87. package/bundle/{chunk-tdmn21z0.js → chunk-9ea1n338.js} +2 -2
  88. package/bundle/chunk-9eg2ytjd.js +17 -0
  89. package/bundle/chunk-9etpppyv.js +3 -0
  90. package/bundle/{chunk-vgaxv70x.js → chunk-9jrxrjzt.js} +2 -2
  91. package/bundle/{chunk-3bkdbqjj.js → chunk-9jsgs71h.js} +1 -1
  92. package/bundle/{chunk-xqwvx3qq.js → chunk-9nn4jpb7.js} +1 -1
  93. package/bundle/{chunk-pxx2hz0g.js → chunk-9rxyq6f9.js} +2 -2
  94. package/bundle/chunk-9tk4wsn4.js +2 -0
  95. package/bundle/{chunk-9fkmhmh6.js → chunk-9y15zjxa.js} +1 -1
  96. package/bundle/chunk-a0rjp24v.js +2 -0
  97. package/bundle/{chunk-mdzzcrf9.js → chunk-a2dz9nqh.js} +2 -2
  98. package/bundle/chunk-a7p0x4sw.js +2 -0
  99. package/bundle/{chunk-ev3a2sxv.js → chunk-a92hh67a.js} +2 -2
  100. package/bundle/chunk-ae0a496j.js +2 -0
  101. package/bundle/{chunk-3bnqw3xp.js → chunk-ahyqfbmq.js} +2 -2
  102. package/bundle/chunk-aq1j9y18.js +2 -0
  103. package/bundle/chunk-aq8nz9hp.js +2 -0
  104. package/bundle/{chunk-zxddasg8.js → chunk-as845ya4.js} +1 -1
  105. package/bundle/chunk-b4zy78be.js +2 -0
  106. package/bundle/{chunk-45mjcxqk.js → chunk-b50t4jc5.js} +1 -1
  107. package/bundle/chunk-basjzwqp.js +2 -0
  108. package/bundle/{chunk-d1rn44wz.js → chunk-bbbh69ys.js} +1 -1
  109. package/bundle/{chunk-mw2hr4pd.js → chunk-bcx2vkv4.js} +1 -1
  110. package/bundle/{chunk-72zxassf.js → chunk-bggybm9k.js} +1 -1
  111. package/bundle/{chunk-4gs87ghj.js → chunk-bgng3rdj.js} +2 -2
  112. package/bundle/chunk-bhetpmgq.js +3 -0
  113. package/bundle/{chunk-bnz0mxak.js → chunk-bk3z400e.js} +1 -1
  114. package/bundle/chunk-bm7xpjh6.js +2 -0
  115. package/bundle/{chunk-jw16f6t0.js → chunk-bzs2ep7s.js} +1 -1
  116. package/bundle/{chunk-7fawtcnn.js → chunk-c1g8n10t.js} +1 -1
  117. package/bundle/chunk-c2k556rk.js +2 -0
  118. package/bundle/{chunk-w03fdrxe.js → chunk-cbf1y12x.js} +1 -1
  119. package/bundle/{chunk-vc4e6xc4.js → chunk-cbmwhvxw.js} +2 -2
  120. package/bundle/{chunk-5bate758.js → chunk-cp39f96a.js} +1 -1
  121. package/bundle/{chunk-9nk0ts0s.js → chunk-d307vb2d.js} +1 -1
  122. package/bundle/chunk-d41mg7at.js +2 -0
  123. package/bundle/chunk-d50kpss6.js +2 -0
  124. package/bundle/chunk-day0rb5p.js +2 -0
  125. package/bundle/{chunk-3gw6r3hf.js → chunk-dj3525nn.js} +215 -215
  126. package/bundle/{chunk-b4ysd5b4.js → chunk-dknemkw2.js} +2 -2
  127. package/bundle/chunk-dp7cww4v.js +2 -0
  128. package/bundle/{chunk-yeq7b87a.js → chunk-drwqag0f.js} +1 -1
  129. package/bundle/{chunk-qdcf1ay5.js → chunk-e586sjb0.js} +2 -2
  130. package/bundle/{chunk-qs4wef8c.js → chunk-e6wp96vm.js} +1 -1
  131. package/bundle/{chunk-d0xs3j5h.js → chunk-e89zjjmj.js} +1 -1
  132. package/bundle/chunk-egae7vvg.js +2 -0
  133. package/bundle/chunk-erdjd9w3.js +2 -0
  134. package/bundle/chunk-ex93y6dw.js +2 -0
  135. package/bundle/chunk-eyr0vf92.js +2 -0
  136. package/bundle/{chunk-02xcb52z.js → chunk-ezfzb8qc.js} +2 -2
  137. package/bundle/{chunk-qpd0gab8.js → chunk-f1bcz9yz.js} +1 -1
  138. package/bundle/chunk-f4zfk5ye.js +2 -0
  139. package/bundle/{chunk-rd4x4tsv.js → chunk-f7rj6fck.js} +1 -1
  140. package/bundle/{chunk-4sazy0nq.js → chunk-f83wv08n.js} +1 -1
  141. package/bundle/{chunk-n7xgfm5x.js → chunk-faa0zxey.js} +2 -2
  142. package/bundle/{chunk-3dr4469n.js → chunk-fbm6qczy.js} +1 -1
  143. package/bundle/{chunk-0g25z230.js → chunk-fd7fmvyw.js} +1 -1
  144. package/bundle/chunk-fghqr4x8.js +8 -0
  145. package/bundle/{chunk-bjcb9kt0.js → chunk-fgn83bs7.js} +1 -1
  146. package/bundle/{chunk-dshnn54c.js → chunk-fpm2vgz6.js} +1 -1
  147. package/bundle/chunk-fvkwcx35.js +2 -0
  148. package/bundle/{chunk-w5940jxm.js → chunk-fvy24yhq.js} +1 -1
  149. package/bundle/{chunk-fjm9kstr.js → chunk-fymt1rym.js} +1 -1
  150. package/bundle/{chunk-dt899wbf.js → chunk-g3kd4957.js} +2 -2
  151. package/bundle/{chunk-f36ctnbp.js → chunk-g5cgpvef.js} +2 -2
  152. package/bundle/{chunk-fmxm4kaj.js → chunk-g9end129.js} +1 -1
  153. package/bundle/chunk-gbmmbhy4.js +2 -0
  154. package/bundle/chunk-gp877cq5.js +2 -0
  155. package/bundle/{chunk-tgd5ctnt.js → chunk-gr4bctqj.js} +2 -2
  156. package/bundle/{chunk-dvxk6mr6.js → chunk-grw4gg9j.js} +2 -2
  157. package/bundle/{chunk-mvnxwwe7.js → chunk-gtjn3yc4.js} +2 -2
  158. package/bundle/chunk-hk8vvc10.js +2 -0
  159. package/bundle/{chunk-7dep7g7c.js → chunk-hmznf0ax.js} +1 -1
  160. package/bundle/{chunk-yjp0btmq.js → chunk-hpa7e9va.js} +3 -3
  161. package/bundle/{chunk-hcy77w6t.js → chunk-hq9bgnqb.js} +1 -1
  162. package/bundle/{chunk-gkj4a27z.js → chunk-hrw5rmj1.js} +1 -1
  163. package/bundle/{chunk-n2ygpy76.js → chunk-hs3vfhar.js} +1 -1
  164. package/bundle/chunk-hwavzxdm.js +2 -0
  165. package/bundle/chunk-hwnc2sa5.js +2 -0
  166. package/bundle/chunk-j2gvpa15.js +2 -0
  167. package/bundle/{chunk-te5tfq79.js → chunk-j3jqk62r.js} +1 -1
  168. package/bundle/{chunk-jqn27885.js → chunk-j5ymkhry.js} +1 -1
  169. package/bundle/chunk-j7n8khk7.js +2 -0
  170. package/bundle/{chunk-mqtqcc10.js → chunk-jgtcfw96.js} +2 -2
  171. package/bundle/{chunk-364ccew0.js → chunk-jjjs8p0t.js} +2 -2
  172. package/bundle/chunk-jkh98wby.js +2 -0
  173. package/bundle/{chunk-h7w35n7w.js → chunk-jv4th87b.js} +1 -1
  174. package/bundle/{chunk-j63fkt6n.js → chunk-jvjq554f.js} +1 -1
  175. package/bundle/{chunk-00sr2gwz.js → chunk-jw114bbt.js} +2 -2
  176. package/bundle/{chunk-ax1y4699.js → chunk-jwph7tpc.js} +1 -1
  177. package/bundle/{chunk-xdacgfba.js → chunk-k1gddnkm.js} +1 -1
  178. package/bundle/chunk-k5a652s4.js +2 -0
  179. package/bundle/{chunk-1mcsf4yb.js → chunk-k6cbfrzc.js} +2 -2
  180. package/bundle/chunk-k6w32q2p.js +2 -0
  181. package/bundle/{chunk-sy3n0qhc.js → chunk-kc1xmcc9.js} +141 -135
  182. package/bundle/{chunk-5kmfnkzv.js → chunk-kdcnder5.js} +1 -1
  183. package/bundle/chunk-ke5rqv5b.js +2 -0
  184. package/bundle/chunk-kghwk0yh.js +2 -0
  185. package/bundle/{chunk-r6ndvzd0.js → chunk-km1n4ttr.js} +1 -1
  186. package/bundle/{chunk-htkwc2se.js → chunk-knh01n2r.js} +2 -2
  187. package/bundle/{chunk-ydc6ypjt.js → chunk-ks1cs80p.js} +2 -2
  188. package/bundle/{chunk-08q55ya0.js → chunk-kxjrrdj0.js} +1 -1
  189. package/bundle/{chunk-jts0dma5.js → chunk-kzvvvj79.js} +2 -2
  190. package/bundle/chunk-mgadsp7r.js +2 -0
  191. package/bundle/chunk-mk2s9py8.js +2 -0
  192. package/bundle/{chunk-hb9mc5f9.js → chunk-mpe8zxc0.js} +1 -1
  193. package/bundle/{chunk-yykjvt7f.js → chunk-mswx4k75.js} +2 -2
  194. package/bundle/{chunk-rqmvj7f4.js → chunk-mx3jd1p9.js} +1 -1
  195. package/bundle/{chunk-v8dd6tyn.js → chunk-mxf9p0p9.js} +1 -1
  196. package/bundle/{chunk-std2bgv7.js → chunk-mxhb5adq.js} +2 -2
  197. package/bundle/{chunk-gwfx7tx7.js → chunk-my3cswnp.js} +2 -2
  198. package/bundle/chunk-n0k0pp4k.js +2 -0
  199. package/bundle/chunk-n393nnh5.js +2 -0
  200. package/bundle/chunk-n5vyed7w.js +2 -0
  201. package/bundle/{chunk-jf6ry79j.js → chunk-n7kqdqkh.js} +4 -4
  202. package/bundle/{chunk-tdxbm1nd.js → chunk-n90eh3e7.js} +1 -1
  203. package/bundle/{chunk-ebkztnpf.js → chunk-nb86kh94.js} +217 -217
  204. package/bundle/{chunk-s8mghr5a.js → chunk-ngvp6zc2.js} +2 -2
  205. package/bundle/{chunk-e07dbha4.js → chunk-nh044sjn.js} +1 -1
  206. package/bundle/{chunk-a42q5mx4.js → chunk-nm6wnne9.js} +1 -1
  207. package/bundle/{chunk-mcc5ynma.js → chunk-p4ewy9xh.js} +3 -3
  208. package/bundle/{chunk-cx0j6mpq.js → chunk-p5mes2sh.js} +1 -1
  209. package/bundle/{chunk-vgnddhdj.js → chunk-p635phfw.js} +1 -1
  210. package/bundle/{chunk-dgx4rq86.js → chunk-p887g1xj.js} +1 -1
  211. package/bundle/{chunk-7jhrxzjx.js → chunk-p9mj4zyk.js} +2 -2
  212. package/bundle/chunk-pasm65wq.js +2 -0
  213. package/bundle/chunk-pfh34atn.js +2 -0
  214. package/bundle/{chunk-xdjwapwy.js → chunk-pfkm3j8g.js} +2 -2
  215. package/bundle/chunk-phpmxjf8.js +2 -0
  216. package/bundle/{chunk-9dh9bc9d.js → chunk-pp9neaaz.js} +1 -1
  217. package/bundle/{chunk-c72jajx9.js → chunk-pzefsndd.js} +1 -1
  218. package/bundle/{chunk-dh1h513y.js → chunk-q128vfc6.js} +1 -1
  219. package/bundle/{chunk-5pkg052s.js → chunk-q148vndn.js} +2 -2
  220. package/bundle/{chunk-4fa390yr.js → chunk-q4fn41ex.js} +2 -2
  221. package/bundle/{chunk-zrmx397j.js → chunk-q5abwn50.js} +1 -1
  222. package/bundle/{chunk-cjxcnhmq.js → chunk-q9ft590w.js} +2 -2
  223. package/bundle/{chunk-7vftsy04.js → chunk-qaz100ht.js} +1 -1
  224. package/bundle/{chunk-g5prcvq2.js → chunk-qeg0jnxq.js} +2 -2
  225. package/bundle/{chunk-tabcpx7t.js → chunk-qf1dqzra.js} +2 -2
  226. package/bundle/{chunk-vcrakhgy.js → chunk-qg9bt0kx.js} +2 -2
  227. package/bundle/{chunk-pnq1h5az.js → chunk-qhnpq5gb.js} +2 -2
  228. package/bundle/{chunk-brh35yt5.js → chunk-qkh8697x.js} +2 -2
  229. package/bundle/chunk-qvzvxsjw.js +2 -0
  230. package/bundle/chunk-qzszrd0s.js +2 -0
  231. package/bundle/{chunk-yzwgvjzd.js → chunk-r0s28gnb.js} +1 -1
  232. package/bundle/chunk-r2qns6yc.js +3 -0
  233. package/bundle/{chunk-yj6rbe9p.js → chunk-rcyzqa3g.js} +2 -2
  234. package/bundle/{chunk-70pb4kcm.js → chunk-rdwma0de.js} +2 -2
  235. package/bundle/{chunk-25bp7pcm.js → chunk-rk2bk4s7.js} +2 -2
  236. package/bundle/{chunk-x6rr6ss1.js → chunk-rm5ntsvn.js} +1 -1
  237. package/bundle/chunk-rnq5ezrt.js +2 -0
  238. package/bundle/{chunk-xhbb8b5g.js → chunk-rp8asmq7.js} +1 -1
  239. package/bundle/{chunk-z1rshv6g.js → chunk-rpfhgncs.js} +1 -1
  240. package/bundle/{chunk-cagk1sjd.js → chunk-s0ptrw0z.js} +1 -1
  241. package/bundle/{chunk-yw9pfqxt.js → chunk-s0ty36qg.js} +1 -1
  242. package/bundle/{chunk-5yfzzmv0.js → chunk-s7yza695.js} +1 -1
  243. package/bundle/chunk-s99cvvc9.js +2 -0
  244. package/bundle/chunk-sh76e256.js +3 -0
  245. package/bundle/chunk-skpkjnyy.js +2 -0
  246. package/bundle/{chunk-8r3410c2.js → chunk-skv9ww0s.js} +1 -1
  247. package/bundle/chunk-snt4kwab.js +2 -0
  248. package/bundle/chunk-sq47t8f1.js +2 -0
  249. package/bundle/chunk-sqhgnvvs.js +2 -0
  250. package/bundle/chunk-t114r59h.js +2 -0
  251. package/bundle/chunk-t1f56k0j.js +2 -0
  252. package/bundle/{chunk-9s4whpg1.js → chunk-t1jgx17a.js} +2 -2
  253. package/bundle/chunk-t69jx6fz.js +2 -0
  254. package/bundle/{chunk-srxx88nb.js → chunk-t9zbp2qw.js} +1 -1
  255. package/bundle/{chunk-jcjaw7tk.js → chunk-ta7mfkms.js} +2 -2
  256. package/bundle/{chunk-w1ypf53m.js → chunk-tce12v85.js} +1 -1
  257. package/bundle/{chunk-6sfhbckv.js → chunk-tczbhj0e.js} +2 -2
  258. package/bundle/{chunk-h1kg35mn.js → chunk-tge53d52.js} +1 -1
  259. package/bundle/chunk-tq1dqhes.js +2 -0
  260. package/bundle/chunk-tsb3jsx4.js +2 -0
  261. package/bundle/chunk-ttpbpzbh.js +2 -0
  262. package/bundle/{chunk-2dkrfc1s.js → chunk-v5z6sx6j.js} +1 -1
  263. package/bundle/chunk-v667egp5.js +2 -0
  264. package/bundle/{chunk-37dvnent.js → chunk-v7mg632n.js} +2 -2
  265. package/bundle/{chunk-60qyqqxx.js → chunk-v9rg0a8g.js} +1 -1
  266. package/bundle/{chunk-jngchw38.js → chunk-ve3np791.js} +1 -1
  267. package/bundle/{chunk-wev34grp.js → chunk-vhe92p7a.js} +2 -2
  268. package/bundle/{chunk-132tcp2j.js → chunk-vjx0064q.js} +2 -2
  269. package/bundle/{chunk-atpzz901.js → chunk-vm1ek7yf.js} +1 -1
  270. package/bundle/{chunk-3mepk08v.js → chunk-vqpfpmha.js} +2 -2
  271. package/bundle/{chunk-cdh26622.js → chunk-vqss3e48.js} +2 -2
  272. package/bundle/{chunk-ewpzqnj4.js → chunk-w79jzf8w.js} +1 -1
  273. package/bundle/{chunk-yha554nm.js → chunk-w7em72p8.js} +2 -2
  274. package/bundle/chunk-wcqfr8vr.js +3 -0
  275. package/bundle/{chunk-r58gzg6m.js → chunk-wdaf713t.js} +1 -1
  276. package/bundle/{chunk-ymtcm4xd.js → chunk-wf4x5cjc.js} +1 -1
  277. package/bundle/{chunk-vsys768k.js → chunk-wfggztm4.js} +1 -1
  278. package/bundle/{chunk-p8k48st6.js → chunk-wp3dpt6d.js} +2 -2
  279. package/bundle/{chunk-acyj91wq.js → chunk-x2cavpa9.js} +1 -1
  280. package/bundle/chunk-x3afqfww.js +4 -0
  281. package/bundle/{chunk-qb35hqm4.js → chunk-x4pdpka8.js} +1 -1
  282. package/bundle/{chunk-vm58fkrv.js → chunk-xd3xc1vv.js} +1 -1
  283. package/bundle/{chunk-f77nxt23.js → chunk-xjpvv3vp.js} +2 -2
  284. package/bundle/chunk-xnhvt98g.js +5 -0
  285. package/bundle/{chunk-64s7vfj7.js → chunk-xny5ecn0.js} +2 -2
  286. package/bundle/chunk-xwgc2pw7.js +28 -0
  287. package/bundle/chunk-xxrtr6sd.js +2 -0
  288. package/bundle/chunk-y287zwkr.js +10 -0
  289. package/bundle/{chunk-ezrskm25.js → chunk-y3dfk6n5.js} +1 -1
  290. package/bundle/{chunk-t01bhw5h.js → chunk-y4e7e42x.js} +3 -3
  291. package/bundle/chunk-y8eggnrr.js +2 -0
  292. package/bundle/{chunk-9xvctnjr.js → chunk-yajd975f.js} +1 -1
  293. package/bundle/chunk-yck5h49c.js +2 -0
  294. package/bundle/{chunk-8yr682pv.js → chunk-yd2emszh.js} +2 -2
  295. package/bundle/{chunk-p9zrk16q.js → chunk-yd8bzhv6.js} +1 -1
  296. package/bundle/{chunk-24rw1br0.js → chunk-yerfyz4w.js} +1 -1
  297. package/bundle/{chunk-jxg15t11.js → chunk-yg0pfngv.js} +1 -1
  298. package/bundle/{chunk-y1b2h15z.js → chunk-ypcc3cnb.js} +1 -1
  299. package/bundle/{chunk-w24660y4.js → chunk-yqb6cfed.js} +2 -2
  300. package/bundle/{chunk-shwjjrj8.js → chunk-yr35q7q1.js} +1 -1
  301. package/bundle/{chunk-rcyhqkv5.js → chunk-yrfq22a5.js} +1 -1
  302. package/bundle/{chunk-gg7bg3ek.js → chunk-yvjke593.js} +1 -1
  303. package/bundle/{chunk-zfnbk5gy.js → chunk-ywkvq7zb.js} +1 -1
  304. package/bundle/{chunk-p3rp99na.js → chunk-yx1h0b5v.js} +1 -1
  305. package/bundle/chunk-yxeja9kg.js +2 -0
  306. package/bundle/{chunk-mzbr0m2v.js → chunk-yz0pwv2m.js} +1 -1
  307. package/bundle/{chunk-q81m4m9z.js → chunk-z2h1gxyx.js} +1 -1
  308. package/bundle/{chunk-qqne79vp.js → chunk-zdzxsyxs.js} +2 -2
  309. package/bundle/{chunk-yzh4rmrt.js → chunk-zek5c15t.js} +1 -1
  310. package/bundle/{chunk-8dxdeksr.js → chunk-zfd70p01.js} +1 -1
  311. package/bundle/{chunk-41x11r2s.js → chunk-zqkv8796.js} +1 -1
  312. package/bundle/chunk-ztn2jv26.js +11 -0
  313. package/bundle/index.js +3 -3
  314. package/bundle/parser.worker.js +2 -2
  315. package/bundle/worker.js +1 -1
  316. package/package.json +1 -1
  317. package/bundle/chunk-092bx2yw.js +0 -2
  318. package/bundle/chunk-0j6dhrew.js +0 -2
  319. package/bundle/chunk-0jrgk6vk.js +0 -2
  320. package/bundle/chunk-0qn52zsd.js +0 -2
  321. package/bundle/chunk-10accb7b.js +0 -2
  322. package/bundle/chunk-13kpdfr7.js +0 -2
  323. package/bundle/chunk-15s8zwgf.js +0 -2
  324. package/bundle/chunk-1bx2sjn6.js +0 -11
  325. package/bundle/chunk-1kgyfja6.js +0 -2
  326. package/bundle/chunk-4kqdzdv5.js +0 -3
  327. package/bundle/chunk-4tbqsrsn.js +0 -2
  328. package/bundle/chunk-53kns5wy.js +0 -2
  329. package/bundle/chunk-559ek1ym.js +0 -2
  330. package/bundle/chunk-7cbj28fp.js +0 -2
  331. package/bundle/chunk-8yn64y27.js +0 -2
  332. package/bundle/chunk-8ywa7az5.js +0 -2
  333. package/bundle/chunk-8ywdddts.js +0 -2
  334. package/bundle/chunk-8zmreqxx.js +0 -2
  335. package/bundle/chunk-92zjark4.js +0 -2
  336. package/bundle/chunk-9yakc5yv.js +0 -28
  337. package/bundle/chunk-aq28ejhv.js +0 -2
  338. package/bundle/chunk-b0x888w9.js +0 -2
  339. package/bundle/chunk-b10px5g4.js +0 -2
  340. package/bundle/chunk-b1qhpxee.js +0 -2
  341. package/bundle/chunk-bcs2gvmp.js +0 -2
  342. package/bundle/chunk-bs020a3x.js +0 -2
  343. package/bundle/chunk-d72rty3t.js +0 -2
  344. package/bundle/chunk-dj951pms.js +0 -2
  345. package/bundle/chunk-dp6zktka.js +0 -2
  346. package/bundle/chunk-dvqdtdza.js +0 -2
  347. package/bundle/chunk-dx7h5r8j.js +0 -2
  348. package/bundle/chunk-e88wd9ex.js +0 -2
  349. package/bundle/chunk-ebabnv33.js +0 -3
  350. package/bundle/chunk-ebdpg3cn.js +0 -2
  351. package/bundle/chunk-ec7pznsp.js +0 -2
  352. package/bundle/chunk-et7kz7kx.js +0 -2
  353. package/bundle/chunk-eyc6tb5h.js +0 -2
  354. package/bundle/chunk-eywryd3k.js +0 -2
  355. package/bundle/chunk-eze57bty.js +0 -2
  356. package/bundle/chunk-fa47vzfc.js +0 -2
  357. package/bundle/chunk-fe397ph0.js +0 -2
  358. package/bundle/chunk-fr75ytdr.js +0 -2
  359. package/bundle/chunk-fw2tnbt6.js +0 -2
  360. package/bundle/chunk-fwr2qgqb.js +0 -2
  361. package/bundle/chunk-g204pt98.js +0 -2
  362. package/bundle/chunk-gcgmwqhh.js +0 -2
  363. package/bundle/chunk-gvtjxg0d.js +0 -2
  364. package/bundle/chunk-gw36mrg4.js +0 -2
  365. package/bundle/chunk-h36qec67.js +0 -2
  366. package/bundle/chunk-h9gtymfm.js +0 -2
  367. package/bundle/chunk-h9qn35pn.js +0 -2
  368. package/bundle/chunk-hhjkezfz.js +0 -2
  369. package/bundle/chunk-hnz570f9.js +0 -3
  370. package/bundle/chunk-j21dnncc.js +0 -4
  371. package/bundle/chunk-ja18tvc7.js +0 -2
  372. package/bundle/chunk-jr2q5295.js +0 -3
  373. package/bundle/chunk-kwzawx7r.js +0 -2
  374. package/bundle/chunk-m0mek3es.js +0 -2
  375. package/bundle/chunk-m31d2n6h.js +0 -2
  376. package/bundle/chunk-n14qktbg.js +0 -2
  377. package/bundle/chunk-nr4q9fv7.js +0 -2
  378. package/bundle/chunk-nzzsj54n.js +0 -2
  379. package/bundle/chunk-p19qfw59.js +0 -2
  380. package/bundle/chunk-p2yxj9s4.js +0 -2
  381. package/bundle/chunk-p8czsxp0.js +0 -3
  382. package/bundle/chunk-pq3qwxa8.js +0 -2
  383. package/bundle/chunk-ps9p14y6.js +0 -2
  384. package/bundle/chunk-q7rt76qw.js +0 -10
  385. package/bundle/chunk-qagc6v17.js +0 -2
  386. package/bundle/chunk-qc0zhbhm.js +0 -2
  387. package/bundle/chunk-qp9y0g73.js +0 -3
  388. package/bundle/chunk-r0ewmh6f.js +0 -2
  389. package/bundle/chunk-r3df289z.js +0 -2
  390. package/bundle/chunk-r78kfhvz.js +0 -2
  391. package/bundle/chunk-rebsz3bj.js +0 -2
  392. package/bundle/chunk-rph5xswc.js +0 -2
  393. package/bundle/chunk-schtpyjs.js +0 -2
  394. package/bundle/chunk-t0jjes17.js +0 -2
  395. package/bundle/chunk-t5tfppwv.js +0 -17
  396. package/bundle/chunk-t8rke5fr.js +0 -8
  397. package/bundle/chunk-tf4xwqz7.js +0 -2
  398. package/bundle/chunk-tqazneg6.js +0 -2
  399. package/bundle/chunk-tzg4z74d.js +0 -2
  400. package/bundle/chunk-v8ksjgc3.js +0 -2
  401. package/bundle/chunk-v8vcwx23.js +0 -2
  402. package/bundle/chunk-vdpd4akk.js +0 -5
  403. package/bundle/chunk-vftqwdpg.js +0 -3
  404. package/bundle/chunk-vg41rtdy.js +0 -2
  405. package/bundle/chunk-w57j3pgz.js +0 -616
  406. package/bundle/chunk-w6rf2knb.js +0 -2
  407. package/bundle/chunk-wh7r96t3.js +0 -2
  408. package/bundle/chunk-wnjqaxze.js +0 -2
  409. package/bundle/chunk-xfz698bh.js +0 -2
  410. package/bundle/chunk-xxj3sgd5.js +0 -2
  411. package/bundle/chunk-yfp9y71y.js +0 -2
  412. package/bundle/chunk-yg9c1v8v.js +0 -2
  413. package/bundle/chunk-yjjh339w.js +0 -2
  414. package/bundle/chunk-yt6vd7a5.js +0 -2
  415. package/bundle/chunk-yzq3c3dq.js +0 -2
  416. package/bundle/chunk-z1j25911.js +0 -2
  417. package/bundle/chunk-z29ahthm.js +0 -2
  418. package/bundle/chunk-zgre4gc2.js +0 -2
  419. package/bundle/chunk-zthkjx33.js +0 -2
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{So as E,To as c,Uo as M,Vo as i}from"./chunk-g5prcvq2.js";import{Xo as g,Zo as n,_o as k,bp as d,cp as u,qp as e,rp as _0,sp as I,tp as O0}from"./chunk-t5tfppwv.js";import{Ap as r}from"./chunk-qdcf1ay5.js";import{$t as y,Wt as G}from"./chunk-qp9y0g73.js";import{qu as s}from"./chunk-xyjehgzm.js";import{Bu as X,Ku as o}from"./chunk-j21dnncc.js";import{Ru as x,Vu as K,_u as T}from"./chunk-vc4e6xc4.js";import{$u as j}from"./chunk-hnz570f9.js";import{HP as A,UI as w,aK as f,nD as v,rG as L}from"./chunk-ydc6ypjt.js";import{iQ as p}from"./chunk-4sazy0nq.js";var F={};p(F,{waitForDependencies:()=>M0,layer:()=>V0,get:()=>R0,defaultLayer:()=>W0,TuiConfig:()=>F,Service:()=>z,Info:()=>Z0});import l from"path";var J={};p(J,{Keybinds:()=>B0,ConfigKeybinds:()=>J});var _=(O,Z)=>A.String.pipe(A.optional,A.withDecodingDefault(w.succeed(O))).annotate({description:Z}),j0=process.platform==="win32"?"ctrl+z,ctrl+-,super+z":"ctrl+-,super+z",w0=A.Struct({leader:_("ctrl+x","Leader key for keybind combinations"),app_exit:_("ctrl+c,ctrl+d,<leader>q","Exit the application"),editor_open:_("<leader>e","Open external editor"),theme_list:_("<leader>t","List available themes"),sidebar_toggle:_("<leader>b","Toggle sidebar"),scrollbar_toggle:_("none","Toggle session scrollbar"),status_view:_("<leader>s","View status"),session_export:_("<leader>x","Export session to editor"),session_new:_("<leader>n","Create a new session"),session_list:_("<leader>l","List all sessions"),session_timeline:_("<leader>g","Show session timeline"),session_fork:_("none","Fork session from message"),session_rename:_("ctrl+r","Rename session"),session_delete:_("ctrl+d","Delete session"),stash_delete:_("ctrl+d","Delete stash entry"),model_provider_list:_("ctrl+a","Open provider list from model dialog"),model_favorite_toggle:_("ctrl+f","Toggle model favorite status"),session_share:_("none","Share current session"),session_unshare:_("none","Unshare current session"),session_interrupt:_("escape","Interrupt current session"),session_compact:_("<leader>c","Compact the session"),messages_page_up:_("pageup,ctrl+alt+b","Scroll messages up by one page"),messages_page_down:_("pagedown,ctrl+alt+f","Scroll messages down by one page"),messages_line_up:_("ctrl+alt+y","Scroll messages up by one line"),messages_line_down:_("ctrl+alt+e","Scroll messages down by one line"),messages_half_page_up:_("ctrl+alt+u","Scroll messages up by half page"),messages_half_page_down:_("ctrl+alt+d","Scroll messages down by half page"),messages_first:_("ctrl+g,home","Navigate to first message"),messages_last:_("ctrl+alt+g,end","Navigate to last message"),messages_next:_("none","Navigate to next message"),messages_previous:_("none","Navigate to previous message"),messages_last_user:_("none","Navigate to last user message"),messages_copy:_("<leader>y","Copy message"),messages_undo:_("<leader>u","Undo message"),messages_redo:_("<leader>r","Redo message"),messages_toggle_conceal:_("<leader>h","Toggle code block concealment in messages"),tool_details:_("none","Toggle tool details visibility"),model_list:_("<leader>m","List available models"),model_cycle_recent:_("f2","Next recently used model"),model_cycle_recent_reverse:_("shift+f2","Previous recently used model"),model_cycle_favorite:_("none","Next favorite model"),model_cycle_favorite_reverse:_("none","Previous favorite model"),command_list:_("ctrl+p","List available commands"),agent_list:_("<leader>a","List agents"),agent_cycle:_("ctrl+space","Next agent"),agent_cycle_reverse:_("none","Previous agent"),variant_cycle:_("ctrl+t","Cycle model variants"),variant_list:_("none","List model variants"),input_clear:_("ctrl+c","Clear input field"),input_paste:_("super+v,ctrl+v","Paste from clipboard"),input_submit:_("return","Submit input"),input_newline:_("shift+return,ctrl+return,alt+return,ctrl+j","Insert newline in input"),input_move_left:_("left,ctrl+b","Move cursor left in input"),input_move_right:_("right,ctrl+f","Move cursor right in input"),input_move_up:_("up","Move cursor up in input"),input_move_down:_("down","Move cursor down in input"),input_select_left:_("shift+left","Select left in input"),input_select_right:_("shift+right","Select right in input"),input_select_up:_("shift+up","Select up in input"),input_select_down:_("shift+down","Select down in input"),input_line_home:_("ctrl+a","Move to start of line in input"),input_line_end:_("ctrl+e","Move to end of line in input"),input_select_line_home:_("ctrl+shift+a","Select to start of line in input"),input_select_line_end:_("ctrl+shift+e","Select to end of line in input"),input_visual_line_home:_("alt+a","Move to start of visual line in input"),input_visual_line_end:_("alt+e","Move to end of visual line in input"),input_select_visual_line_home:_("alt+shift+a","Select to start of visual line in input"),input_select_visual_line_end:_("alt+shift+e","Select to end of visual line in input"),input_buffer_home:_("home","Move to start of buffer in input"),input_buffer_end:_("end","Move to end of buffer in input"),input_select_buffer_home:_("shift+home","Select to start of buffer in input"),input_select_buffer_end:_("shift+end","Select to end of buffer in input"),input_delete_line:_("ctrl+shift+d","Delete line in input"),input_delete_to_line_end:_("ctrl+k","Delete to end of line in input"),input_delete_to_line_start:_("ctrl+u","Delete to start of line in input"),input_backspace:_("backspace,shift+backspace","Backspace in input"),input_delete:_("ctrl+d,delete,shift+delete","Delete character in input"),input_undo:_(j0,"Undo in input"),input_redo:_("ctrl+.,super+shift+z","Redo in input"),input_word_forward:_("alt+f,alt+right,ctrl+right","Move word forward in input"),input_word_backward:_("alt+b,alt+left,ctrl+left","Move word backward in input"),input_select_word_forward:_("alt+shift+f,alt+shift+right","Select word forward in input"),input_select_word_backward:_("alt+shift+b,alt+shift+left","Select word backward in input"),input_delete_word_forward:_("alt+d,alt+delete,ctrl+delete","Delete word forward in input"),input_delete_word_backward:_("ctrl+w,ctrl+backspace,alt+backspace","Delete word backward in input"),history_previous:_("up","Previous history item"),history_next:_("down","Next history item"),session_child_first:_("<leader>down","Go to first child session"),session_child_cycle:_("right","Go to next child session"),session_child_cycle_reverse:_("left","Go to previous child session"),session_parent:_("up","Go to parent session"),terminal_suspend:_("ctrl+z","Suspend terminal"),terminal_title_toggle:_("none","Toggle terminal title"),tips_toggle:_("<leader>h","Toggle tips on home screen"),plugin_manager:_("none","Open plugin manager dialog"),display_thinking:_("none","Toggle thinking blocks visibility")}).annotate({identifier:"KeybindsConfig"}),B0=r(w0);var K0=j.object(Object.fromEntries(Object.keys(J.Keybinds.shape).map((O)=>[O,j.string().optional()]))).strict(),R=j.object({scroll_speed:j.number().min(0.001).optional().describe("TUI scroll speed"),scroll_acceleration:j.object({enabled:j.boolean().describe("Enable scroll acceleration")}).optional().describe("Scroll acceleration settings"),diff_style:j.enum(["auto","stacked"]).optional().describe("Control diff rendering style: 'auto' adapts to terminal width, 'stacked' always shows single column"),mouse:j.boolean().optional().describe("Enable or disable mouse capture (default: true on desktop, false on Android/Termux)"),accessible:j.boolean().optional().describe("Screen-reader friendly mode: linear main-screen rendering, no mouse capture, reduced motion, no sound (default: false)"),reduce_motion:j.boolean().optional().describe("Disable spinners and other animations, showing static text instead (default: false)"),sound:j.boolean().optional().describe("Enable or disable sound cues (default: true)"),announcements:j.enum(["quiet","normal","verbose"]).optional().describe("Verbosity of accessible-mode screen-reader announcements: 'quiet' announces only turn boundaries, errors, and stops; 'normal' adds tool-start lines; 'verbose' adds tool-completion lines (default: normal). Errors are always announced.")}),P=j.object({$schema:j.string().optional(),theme:j.string().optional(),keybinds:K0.optional(),plugin:M.Spec.zod.array().optional(),plugin_enabled:j.record(j.string(),j.boolean()).optional()}).extend(R.shape).strict();var D=o.create({service:"tui.migrate"}),X0="https://qitqode.com/tui.json",Y0=P.shape.theme.optional(),b=j.record(j.string(),j.unknown()).optional(),H0=j.object({scroll_speed:R.shape.scroll_speed.catch(void 0),scroll_acceleration:R.shape.scroll_acceleration.catch(void 0),diff_style:R.shape.diff_style.catch(void 0)}).strip();async function t(O){let Z=await G0(O);for(let V of Z){let $=await K.readText(V).catch((m)=>{D.warn("failed to read config for tui migration",{path:V,error:m});return});if(!$)continue;let Q=[],B=g($,Q,{allowTrailingComma:!0});if(Q.length||!B||typeof B!=="object"||Array.isArray(B))continue;let W=Y0.safeParse("theme"in B?B.theme:void 0),Y=b.safeParse("keybinds"in B?B.keybinds:void 0),N=b.safeParse("tui"in B?B.tui:void 0),H={theme:W.success?W.data:void 0,keybinds:Y.success?Y.data:void 0,tui:N.success?N.data:void 0},S=H.tui?J0(H.tui):void 0;if(H.theme===void 0&&H.keybinds===void 0&&!S)continue;let U=l.join(l.dirname(V),"tui.json");if(await K.exists(U))continue;let C={$schema:X0};if(H.theme!==void 0)C.theme=H.theme;if(H.keybinds!==void 0)C.keybinds=H.keybinds;if(S)Object.assign(C,S);if(!await K.write(U,JSON.stringify(C,null,2)).then(()=>!0).catch((m)=>{return D.warn("failed to write tui migration target",{from:V,to:U,error:m}),!1}))continue;if(!await D0(V,$)){D.warn("tui config migrated but source file was not stripped",{from:V,to:U});continue}D.info("migrated tui config",{from:V,to:U})}}function J0(O){let Z=H0.parse(O);if(Z.scroll_speed===void 0&&Z.diff_style===void 0&&Z.scroll_acceleration===void 0)return;return Z}async function D0(O,Z){let V=O+".tui-migration.bak";if(!(await K.exists(V)?!0:await K.write(V,Z).then(()=>!0).catch((W)=>{return D.warn("failed to backup source config during tui migration",{path:O,backup:V,error:W}),!1})))return!1;let B=["theme","keybinds","tui"].reduce((W,Y)=>{let N=n(W,[Y],void 0,{formattingOptions:{insertSpaces:!0,tabSize:2}});if(!N.length)return W;return k(W,N)},Z);return K.write(O,B).then(()=>{return D.info("stripped tui keys from server config",{path:O,backup:V}),!0}).catch((W)=>{return D.warn("failed to strip legacy tui keys from server config",{path:O,backup:V,error:W}),!1})}async function G0(O){let Z=[...I(T.Path.config,"qitqode"),...await K.findUp(["qitqode.json","qitqode.jsonc"],O.cwd,void 0,{rootFirst:!0})];for(let $ of G(O.directories))Z.push(...I($,"qitqode"));if(X.QITQODE_CONFIG)Z.push(X.QITQODE_CONFIG);return(await Promise.all(G(Z).map(async($)=>{return await K.exists($)?$:void 0}))).filter(($)=>!!$)}var a=v.Reference("CurrentWorkingDirectory",{defaultValue:()=>process.cwd()});var h=o.create({service:"tui.config"}),Z0=P;class z extends v.Service()("@qitqode/TuiConfig"){}function I0(O,Z){if(K.contains(Z.directory,O))return"local";return"global"}function N0(O){let Z={...O};if(!("tui"in Z))return Z;if(!s(Z.tui))return delete Z.tui,Z;let V=Z.tui;return delete Z.tui,{...V,...Z}}async function U0(O,Z){if(!O.plugin)return O;for(let V=0;V<O.plugin.length;V++)O.plugin[V]=await M.resolvePluginSpec(O.plugin[V],Z);return O}async function q(O,Z,V){let $=await z0(Z);if(O.result=y(O.result,$),!$.plugin?.length)return;let Q=I0(Z,V),B=M.deduplicatePluginOrigins([...O.result.plugin_origins??[],...$.plugin.map((W)=>({spec:W,scope:Q,source:Z}))]);O.result.plugin=B.map((W)=>W.spec),O.result.plugin_origins=B}var A0=w.fn("TuiConfig.loadState")(function*(O){let Z=yield*_0(O.directory);yield*w.promise(()=>t({directories:Z,cwd:O.directory}));let V=X.QITQODE_DISABLE_PROJECT_CONFIG?[]:yield*e("tui",O.directory),$={result:{}};for(let W of I(T.Path.config,"tui"))yield*w.promise(()=>q($,W,O)).pipe(w.orDie);if(X.QITQODE_TUI_CONFIG){let W=X.QITQODE_TUI_CONFIG;yield*w.promise(()=>q($,W,O)).pipe(w.orDie),h.debug("loaded custom tui config",{path:W})}for(let W of V)yield*w.promise(()=>q($,W,O)).pipe(w.orDie);let Q=G(Z).filter((W)=>W.endsWith(".qitqode")||W===X.QITQODE_CONFIG_DIR);for(let W of Q){if(!W.endsWith(".qitqode")&&W!==X.QITQODE_CONFIG_DIR)continue;for(let Y of I(W,"tui"))yield*w.promise(()=>q($,Y,O)).pipe(w.orDie)}let B={...$.result.keybinds??{}};if(process.platform==="win32")B.terminal_suspend="none",B.input_undo??=G(["ctrl+z",...J.Keybinds.shape.input_undo.parse(void 0).split(",")]).join(",");return $.result.keybinds=J.Keybinds.parse(B),{config:$.result,dirs:$.result.plugin?.length?Q:[]}}),V0=L.effect(z,w.gen(function*(){let O=yield*a,Z=yield*u.Service,V=yield*x.Service,$=yield*A0({directory:O}),Q=yield*w.forEach($.dirs,(Y)=>i.install({fs:V,npm:Z,dir:Y}).pipe(w.forkScoped),{concurrency:"unbounded"}),B=w.fn("TuiConfig.get")(()=>w.succeed($.config)),W=w.fn("TuiConfig.waitForDependencies")(()=>w.forEach(Q,f.join,{concurrency:"unbounded"}).pipe(w.ignore(),w.asVoid));return z.of({get:B,waitForDependencies:W})}).pipe(w.withSpan("TuiConfig.layer"))),W0=V0.pipe(L.provide(u.defaultLayer),L.provide(x.defaultLayer)),{runPromise:$0}=d(z,W0);async function M0(){await $0((O)=>O.waitForDependencies())}async function R0(){return $0((O)=>O.get())}async function z0(O){let Z=await O0(O);if(!Z)return{};return C0(Z,O).catch((V)=>{return h.warn("failed to load tui config",{path:O,error:V}),{}})}async function C0(O,Z){return c.substitute({text:O,type:"path",path:Z,missing:"empty"}).then((V)=>E.jsonc(V,Z)).then((V)=>{if(!s(V))return{};return E.schema(Z0,N0(V),Z)}).then((V)=>U0(V,Z)).catch((V)=>{return h.warn("invalid tui config",{path:Z,error:V}),{}})}
3
- export{Z0 as u,z as v,V0 as w,W0 as x,M0 as y,R0 as z,F as A};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Af as a}from"./chunk-8ywdddts.js";import"./chunk-zfnbk5gy.js";import"./chunk-nfg7nt13.js";import"./chunk-yj6rbe9p.js";import"./chunk-4sazy0nq.js";export{a as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Ef as a}from"./chunk-7gbytqkn.js";import"./chunk-txqc7543.js";import"./chunk-4sazy0nq.js";export default a();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Sh as b}from"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-4sazy0nq.js";export{b as QuickJSAsyncWASMModule};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{wd as a}from"./chunk-jqn27885.js";import"./chunk-6sfhbckv.js";import"./chunk-4sazy0nq.js";export{a as dict};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{kQ as t}from"./chunk-4sazy0nq.js";var e=await import("./chunk-8ywa7az5.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var L="./libopentui-430t0qv0.dylib";export{L as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Bf as k}from"./chunk-zfnbk5gy.js";import{yg as f}from"./chunk-yj6rbe9p.js";function z(){return async(l,b)=>k(await f(l,b.options),b)}export{z as Af};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wg as a,Xg as b}from"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";export{b as AppRuntime,a as AppLayer};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var a="./highlights-x6tmsnaa.scm";export{a as default};
@@ -1,28 +0,0 @@
1
- // @bun
2
- import{mf as GH}from"./chunk-std2bgv7.js";import{Pp as DH,Tp as o,jq as NH}from"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import{Qt as Q}from"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import{su as VH}from"./chunk-xyjehgzm.js";import{Bu as i,Ju as WH}from"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-4sazy0nq.js";var wH=0.9,RH=256,HH="[Earlier tool result removed to fit the request size limit]",f;function b(H){return Buffer.byteLength(JSON.stringify(H),"utf8")}function $H(){return i.QITQODE_QLEX_MAX_REQUEST_BYTES??f}function n(H){let X=i.QITQODE_QLEX_MAX_REQUEST_BYTES;if(X!==void 0)return X;let Z=Math.max(1,Math.min(Math.floor(H*wH),Math.floor(H)-1));return f=f===void 0?Z:Math.min(f,Z),f}function y(H,X){return!!H&&typeof H==="object"&&H.role===X}function XH(H){let X=[],Z=0;while(Z<H.length){let $=Z,J=H[Z];if(Z++,y(J,"assistant")&&Array.isArray(J?.tool_calls)&&J.tool_calls.length>0)while(Z<H.length&&y(H[Z],"tool"))Z++;X.push({start:$,end:Z})}return X}function ZH(H,X){if(X.length===0)return[];let Z=-1;for(let $=X.length-1;$>=0;$--){let J=X[$],K=!1;for(let z=J.start;z<J.end;z++)if(y(H[z],"user"))K=!0;if(K){Z=$;break}}return X.filter(($,J)=>{if(J===X.length-1)return!1;if(J===Z)return!1;if($.start===0&&y(H[0],"system"))return!1;return!0})}function l(H,X){let Z=b(H),$={toolResultsElided:0,unitsDropped:0},J=()=>({body:H,bytes:Z,originalBytes:Z,reduced:!1,actions:$});if(!H||typeof H!=="object")return J();let K=H.messages;if(!Array.isArray(K))return J();let z=K.map((N)=>N&&typeof N==="object"?{...N}:N),Y=()=>({...H,messages:z}),V=()=>b(Y())<=X;{let N=z;for(let F of ZH(N,XH(N))){let L=!1;for(let S=F.start;S<F.end;S++){let E=N[S];if(!y(E,"tool"))continue;let R=E?.content;if(typeof R!=="string"||R.length<RH)continue;if(R===HH)continue;N[S]={...E,content:HH},$.toolResultsElided++,L=!0}if(L&&V())break}}if(!V())for(;;){let N=z,L=ZH(N,XH(N))[0];if(!L)break;if(z=[...N.slice(0,L.start),...N.slice(L.end)],$.unitsDropped++,V())break}let G=Y(),D=b(G);return{body:G,bytes:D,originalBytes:Z,reduced:D<Z&&D<=X,actions:$}}var w=WH({service:"provider.qlex"}),IH=Q.streamUrl(),AH=Q.omniqueryBaseUrl()+"/runOrchestrated";function T(H,X){let Z=H;if(X.status!==void 0)Z.status=X.status;if(X.upstreamCode!==void 0)Z.upstreamCode=X.upstreamCode;if(Z.category=X.category,Z.retryable=X.retryable,X.outputBudgetRecoveryAvailable!==void 0)Z.outputBudgetRecoveryAvailable=X.outputBudgetRecoveryAvailable;if(X.outputBudgetRecoveryTokens!==void 0)Z.outputBudgetRecoveryTokens=X.outputBudgetRecoveryTokens}function B(H,X){return{...H,...X}}class jH extends Error{name="QlexNotLoggedInError";constructor(H){super(Q.copy().notLoggedIn);T(this,B({category:"invalid_credentials",retryable:!1},H))}}class _H extends Error{name="QlexInsufficientBalanceError";constructor(H,X){super(Q.copy().insufficientBalance(H));T(this,B({status:402,category:"billing",retryable:!1},X))}}class UH extends Error{name="QlexRateLimitError";constructor(H){super(Q.copy().rateLimit);T(this,B({status:429,category:"rate_limited",retryable:!0},H))}}class FH extends Error{name="QlexInvalidCredentialsError";constructor(H,X){super(Q.copy().invalidCredentials(H));T(this,B({status:401,category:"invalid_credentials",retryable:!1},X))}}class OH extends Error{name="QlexRequestRejectedError";constructor(H,X,Z){super(Q.copy().requestRejected(H,X));T(this,B({status:400,category:"request_rejected",retryable:!1},Z))}}class m extends Error{name="QlexRequestTooLargeError";stage;constructor(H="irreducible",X,Z){super(H==="after-reduction"?Q.copy().requestTooLargeAfterReduction(X):Q.copy().requestTooLargeIrreducible(X));this.stage=H,T(this,B({status:413,category:"request_too_large",retryable:!1},Z))}}class LH extends Error{name="QlexRequestNotSentError";constructor(H,X){super(Q.copy().requestNotSent(H));T(this,B({category:"request_rejected",retryable:!1},X))}}class v extends Error{name="QlexGatewayError";constructor(H,X){super(Q.copy().gatewayUnavailable(H));T(this,B({category:"gateway_routing",retryable:!1},X))}}var TH=60000;function FX(H){return Q.sanitizeUpstreamError(H)}class h extends Error{name="QlexStreamError";constructor(H,X){let Z=B({category:"unknown",retryable:!1},X);super(Z.category==="output_budget_exhausted"?Q.copy().outputBudgetExhausted():Z.category==="empty_output"?Q.copy().emptyOutput():Z.category==="stream_truncated"?Q.copy().streamCutOff():Q.copy().streamFailed(H));T(this,Z),VH(this)}}var BH=[{match:/\b(unauthori[sz]ed|forbidden|invalid[ _-]?(api[ _-]?key|token|credential)|expired[ _-]?token|authentication[ _-]?(failed|error)|401|403)\b/i,category:"invalid_credentials",retryable:!1},{match:/(output (?:token )?budget|maximum output tokens|max_tokens|finish[_ -]?reason.{0,20}(length|budget)|reasoning.{0,20}(budget|tokens))/i,category:"output_budget_exhausted",retryable:!1},{match:/\b(no visible output|empty output|produced no (?:visible )?(?:text|output)|nothing to display)\b/i,category:"empty_output",retryable:!1},{match:/\b(insufficient[ _-]?(credits?|qredits?|balance|funds)|payment[ _-]?required|quota[ _-]?exceeded|out[ _-]?of[ _-]?(credits?|qredits?)|402)\b/i,category:"billing",retryable:!1},{match:/\b(rate[ _-]?limit(ed|s)?|too[ _-]?many[ _-]?requests|429)\b/i,category:"rate_limited",retryable:!0},{match:/(unexpected end of (json|input|stream|data)|premature (close|end)|socket hang ?up|incomplete (response|output|json|message)|truncated|stream (ended|closed|terminated) (early|unexpectedly|prematurely)|\bECONNRESET\b|\bEPIPE\b)/i,category:"stream_truncated",retryable:!0},{match:/\b(overloaded|at capacity|service[ _-]?unavailable|temporarily[ _-]?unavailable|bad[ _-]?gateway|gateway[ _-]?time(d[ _-]?out|out)|timed[ _-]?out|502|503|504)\b/i,category:"transient",retryable:!0}];function bH(H){let X=H??"";for(let Z of BH)if(Z.match.test(X))return{category:Z.category,retryable:Z.retryable};return{category:"unknown",retryable:!1}}function xH(H){return DH(H)}function qH(H,X){let Z,$,J,K=!1;try{let G=JSON.parse(X);if(G&&typeof G==="object"){let D=G.error&&typeof G.error==="object"?G.error:void 0;if(typeof D?.code==="string")Z=D.code;else if(typeof G.code==="string")Z=G.code;if(typeof D?.message==="string")$=D.message;else if(typeof G.message==="string")$=G.message;if(typeof G.details?.field==="string")J=G.details.field}}catch(G){K=/^\s*[\[{]/.test(X)&&(hH(X)||/unexpected end|end of json|unterminated string/i.test(String(G)))}let z=Z?.toUpperCase()??"",Y=(()=>{if(K)return"stream_truncated";if(H===402)return"billing";if(H===413)return"request_too_large";if(H===429)return"rate_limited";if(H===401||H===403)return z==="ERR_GATEWAY_REQUIRED"||xH(X)?"gateway_routing":"invalid_credentials";if(z.includes("CONFIG"))return"configuration";if(H>=500)return"transient";if(H>=400)return"request_rejected";return"unknown"})(),V={status:H,category:Y,retryable:Y==="transient"||Y==="rate_limited"||Y==="stream_truncated"};if(Z!==void 0)V.upstreamCode=Z;if($!==void 0)V.upstreamMessage=$;if(J!==void 0)V.field=J;return V}function hH(H){let X=0,Z=!1,$=!1;for(let J of H){if(Z){if($)$=!1;else if(J==="\\")$=!0;else if(J==='"')Z=!1;continue}if(J==='"')Z=!0;else if(J==="{"||J==="[")X++;else if(J==="}"||J==="]")X--;if(X<0)return!1}return Z||X>0}var vH=new Set(["coding","agent","research","review","chat"]);function fH(H){if(H===void 0)return;if(typeof H==="string"&&vH.has(H))return H;throw Error(`invalid Qortex posture: ${String(H)}`)}function yH(H){if(H===void 0)return;let X=Array.isArray(H)?H:[H];if(X.every((Z)=>typeof Z==="string"&&/^[^/\s]+\/[^/\s]+$/.test(Z)))return Array.isArray(H)?X:H;throw Error(`invalid Qortex directive registry key: ${String(H)}`)}function c(H){if(typeof H==="string")return H;if(Array.isArray(H))return H.map((X)=>{if(typeof X==="string")return X;if(X&&typeof X==="object"){let Z=X;if(typeof Z.text==="string")return Z.text;if(typeof Z.content==="string")return Z.content}return""}).join("");if(H===void 0||H===null)return"";return String(H)}var gH="[Tool call]",pH="[Tool returned no output]";function MH(H){if(!Array.isArray(H))return{messages:H,dropped:[]};let X=[];return{messages:H.flatMap(($,J)=>{if(!$||typeof $!=="object")return X.push({index:J,role:typeof $,reason:"not-an-object"}),[];let K=$,z=c(K.content);if(z.trim().length>0)return[{...K,content:z}];if(K.role==="assistant"&&Array.isArray(K.tool_calls)&&K.tool_calls.length>0)return[{...K,content:gH}];if(K.role==="tool"&&typeof K.tool_call_id==="string"&&K.tool_call_id.trim().length>0)return[{...K,content:pH}];return X.push({index:J,role:typeof K.role==="string"?K.role:"unknown",reason:"empty-content"}),[]}),dropped:X}}function uH(H){return MH(H).messages}function cH(H){if(!Array.isArray(H))return!1;return H.some((X)=>!!X&&typeof X==="object"&&X.role==="user")}function mH(H){if(!Array.isArray(H))return!1;return H.some((X)=>{if(!X||typeof X!=="object")return!1;let Z=X;if(Z.role!=="user")return!1;return c(Z.content).trim().length>0})}function dH(H){if(!Array.isArray(H))return H;let X=(K)=>!!K&&typeof K==="object"&&K.role==="system",Z=0;while(Z<H.length&&X(H[Z]))Z++;if(Z<=1)return H;let $=H.slice(0,Z),J=$.map((K)=>typeof K.content==="string"?K.content:String(K.content??"")).filter((K)=>K.length>0).join(`
3
-
4
- `);return[{...$[0],role:"system",content:J},...H.slice(Z)]}var g="<tool_call>",p="</tool_call>";function iH(H){if(!Array.isArray(H)||H.length===0)return;let X=H.map((Z)=>{try{return JSON.stringify(Z)}catch{return}}).filter((Z)=>Z!==void 0);if(X.length===0)return;return["# Tools","","You may call one or more functions to assist with the user query.","","You are provided with function signatures within <tools></tools> XML tags:","<tools>",...X,"</tools>","","For each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:","<tool_call>",'{"name": <function-name>, "arguments": <args-json-object>}',"</tool_call>","","Function results will be provided within <tool_response></tool_response> XML tags. Do not write <tool_response> blocks yourself.","Only use the functions declared above. Never invent function names, and never write out a function-call-like block in any other format."].join(`
5
- `)}var nH=3;function s(H){let X=H;for(let Z=0;Z<nH;Z++){if(X!==null&&typeof X==="object")return X;if(typeof X!=="string")return;try{X=JSON.parse(X)}catch{return}}return}function lH(H){let X=H?.tool_calls;if(!Array.isArray(X))return;for(let Z of X){let $=Z?.function;if(!$)continue;w.debug("tool call ingress",{tool:typeof $.name==="string"?$.name:"?",source:"native",args:a($.arguments)})}}function a(H,X=300){let Z;try{Z=typeof H==="string"?H:JSON.stringify(H)??String(H)}catch{Z="<unrenderable>"}return Z.length<=X?Z:`${Z.slice(0,X)}\u2026 (${Z.length} chars total)`}function rH(H){let X=H.function??{},Z=typeof X.name==="string"?X.name:"",$=X.arguments===void 0?{}:s(X.arguments);if($===void 0)w.warn("dropping unrecoverable tool-call arguments while re-encoding history",{tool:Z,raw:a(X.arguments)});return`${g}
6
- ${JSON.stringify({name:Z,arguments:$??{}})}
7
- ${p}`}function QH(H,X){if(!Array.isArray(H))return H;let Z=H.map((J)=>{if(!J||typeof J!=="object")return J;let K=J;if(K.role==="assistant"&&Array.isArray(K.tool_calls)){let z=K.tool_calls.map(rH).join(`
8
- `),Y=c(K.content),{tool_calls:V,...G}=K;return{...G,content:Y.length>0?`${Y}
9
- ${z}`:z}}if(K.role==="tool"){let{tool_call_id:z,name:Y,...V}=K;return{...V,role:"user",content:`<tool_response>
10
- ${c(K.content)}
11
- </tool_response>`}}return J}),$=iH(X);if($){let J=0;while(J<Z.length&&!!Z[J]&&typeof Z[J]==="object"&&Z[J].role==="system")J++;Z.splice(J,0,{role:"system",content:$})}return Z}function oH(){return process.env.QITQODE_TOOL_PROTOCOL==="text"?"text":"native"}function sH(H){if(Array.isArray(H.tools)&&H.tools.length>0)return!0;let X=H.messages;if(!Array.isArray(X))return!1;return X.some((Z)=>{if(!Z||typeof Z!=="object")return!1;let $=Z;return $.role==="tool"||$.role==="assistant"&&Array.isArray($.tool_calls)})}function JH(H,X){let Z=X?.toolMode??"native",$=H.model??"default",J={stream:H.stream??!0};if(H.temperature!==void 0)J.temperature=H.temperature;if(H.max_tokens!==void 0)J.max_tokens=H.max_tokens;let K=X?.outputAdvisory;if(K){let D=K.tierOutputLimit;if(J.max_tokens!==void 0){if(D!==void 0&&J.max_tokens>D)J.max_tokens=D}else{let N=K.recommendedTotalTokens??K.tierRecommendedStepTokens??D,F=N===void 0?void 0:D===void 0?N:Math.min(N,D);if(F!==void 0)J.max_tokens=F}if(X?.outputBudgetRecoveryTokens!==void 0){let N=typeof J.max_tokens==="number"?J.max_tokens:0,F=K.tierOutputLimit??X.outputBudgetRecoveryTokens;if(X.outputBudgetRecoveryTokens>N)J.max_tokens=Math.min(X.outputBudgetRecoveryTokens,F)}}if(H.tools!==void 0)J.tools=H.tools;if(H.tool_choice!==void 0)J.tool_choice=H.tool_choice;if(H.stream_options!==void 0)J.stream_options=H.stream_options;let z=Z==="text"?QH(H.messages,H.tools):H.messages,Y={},V=fH(H.posture);if(V!==void 0)Y.posture=V;let G=yH(H.directive);if(G!==void 0)Y.directive=G;if(H.modelPersona!==void 0)Y.modelPersona=H.modelPersona;return{tier:$,messages:dH(uH(z)),opts:J,...Y}}var d=new Map;function x(H){return typeof H==="number"&&Number.isFinite(H)&&H>0?H:void 0}function aH(H,X){let Z={},$=x(X.tierOutputLimit),J=x(X.tierRecommendedStepTokens),K=x(X.reasoningReserveTokens),z=x(X.visibleOutputFloorTokens),Y=x(X.recommendedTotalTokens),V=x(X.viableTotalFloorTokens),G=x(X.budgetPolicyVersion);if($!==void 0)Z.tierOutputLimit=$;if(J!==void 0)Z.tierRecommendedStepTokens=J;if(K!==void 0)Z.reasoningReserveTokens=K;if(z!==void 0)Z.visibleOutputFloorTokens=z;if(Y!==void 0)Z.recommendedTotalTokens=Y;if(V!==void 0)Z.viableTotalFloorTokens=V;if(typeof X.reasoningReported==="boolean")Z.reasoningReported=X.reasoningReported;if(G!==void 0)Z.budgetPolicyVersion=G;if(Object.keys(Z).length===0)return;d.set(H,Z)}function tH(H){return d.get(H)}function OX(){d.clear()}function eH(H){let X=(Z)=>typeof Z==="string"&&(Z.startsWith("qlex")||Z.startsWith("qortex"));return X(H.id)||X(H.object)}function HX(H){let X=[],Z=H.indexOf(`
12
- `)===-1?[H]:H.split(`
13
- `);for(let z of Z){let Y=z.endsWith("\r")?z.slice(0,-1):z;if(!Y.startsWith("data:"))continue;let V=Y.slice(5);if(V.startsWith(" "))V=V.slice(1);X.push(V)}if(X.length===0)return{kind:"skip"};let $=X.length===1?X[0]:X.join(`
14
- `);if($==="")return{kind:"skip"};if($==="[DONE]")return{kind:"done"};if($.startsWith("[ERROR]"))return{kind:"error",message:$.slice(7).trim()||"qlex stream error"};let J=$.charCodeAt(0),K=J===123||J===91||J===32||J===9||J===10||J===13;try{if(!K)return{kind:"token",content:$};let z=JSON.parse($);if(z&&typeof z==="object"){let Y=z.id;if(Y==="qlex-cost"||Y==="qortex-cost")return{kind:"cost",cost:z};if(Y==="qlex-stream"&&z.usage&&typeof z.usage==="object"){let D=z.choices,N;if(Array.isArray(D)&&D[0]&&typeof D[0]==="object"){let F=D[0].finish_reason;if(typeof F==="string")N=F}return{kind:"usage",usage:z.usage,finishReason:N}}if(Array.isArray(z.choices))return{kind:"passthrough",chunk:z};let V=z,G=typeof V.content==="string"?V.content:typeof V.text==="string"?V.text:typeof V.delta==="string"?V.delta:void 0;if(G!==void 0)return{kind:"token",content:G};if(eH(z)){let D=z.object;return{kind:"control",control:typeof D==="string"&&D.endsWith(".tier.outputLimits")?"tier-output-limits":"unknown",chunk:z}}}}catch{}return{kind:"token",content:$}}function XX(H,X){let Z=Math.min(H.length,X.length-1);for(let $=Z;$>=1;$--)if(X.startsWith(H.slice(H.length-$)))return $;return 0}function ZX(H){if(typeof H==="string"){try{let Z=JSON.parse(H);if(Z!==null&&typeof Z==="object")return H}catch{}let X=s(H);return JSON.stringify(X??H)}return JSON.stringify(H??{})}class SH{onText;onToolCall;pending="";inBlock=!1;constructor(H,X){this.onText=H;this.onToolCall=X}feed(H){this.pending+=H,this.drain(!1)}flush(){if(this.drain(!0),this.inBlock)this.emitBlock(this.pending,!0),this.inBlock=!1;else if(this.pending.length>0)this.onText(this.pending);this.pending=""}drain(H){while(!0)if(!this.inBlock){let X=this.pending.indexOf(g);if(X===-1){let Z=H?0:XX(this.pending,g),$=this.pending.length-Z;if($>0)this.onText(this.pending.slice(0,$)),this.pending=Z>0?this.pending.slice($):"";return}if(X>0)this.onText(this.pending.slice(0,X));this.pending=this.pending.slice(X+g.length),this.inBlock=!0}else{let X=this.pending.indexOf(p);if(X===-1)return;if(this.emitBlock(this.pending.slice(0,X),!1),this.pending=this.pending.slice(X+p.length),this.pending.startsWith(`\r
15
- `))this.pending=this.pending.slice(2);else if(this.pending.startsWith(`
16
- `))this.pending=this.pending.slice(1);this.inBlock=!1}}emitBlock(H,X){try{let Z=JSON.parse(H.trim());if(Z&&typeof Z==="object"&&typeof Z.name==="string"){this.onToolCall({name:Z.name,arguments:ZX(Z.arguments)});return}}catch{}this.onText(`${g}${H}${X?"":p}`)}}function r(H,X,Z){let $={id:"qlex-stream",object:"chat.completion.chunk",created:Math.floor(Date.now()/1000),model:"qlex",choices:[{index:0,delta:H,finish_reason:X}]};if(Z)$.usage=Z;return`data: ${JSON.stringify($)}
17
-
18
- `}function $X(H,X){let Z=X?.toolProtocolEnabled===!0,$=X?.tier,J=X?.requestedOutputBudget,K=H.getReader(),z=new TextDecoder,Y=new TextEncoder,V="",G=!1,D=!1,N,F,L,S,E=!1,R=!1,C=0;return new ReadableStream({async start(P){let A=(_)=>{if(_.length>0)E=!0;let W=G?{content:_}:{role:"assistant",content:_};G=!0,P.enqueue(Y.encode(r(W,null)))},q=0,I=Z?new SH(A,(_)=>{w.debug("tool call ingress",{tool:_.name,source:"text-shim",args:a(_.arguments),objectShaped:s(_.arguments)!==void 0});let W={...G?{}:{role:"assistant"},tool_calls:[{index:q,id:`qlexcall_${Date.now().toString(36)}_${q}`,type:"function",function:{name:_.name,arguments:_.arguments}}]};G=!0,R=!0,q++,P.enqueue(Y.encode(r(W,null)))}):void 0,t=(_)=>I?I.feed(_):A(_),O=()=>{I?.flush();let W=N||F!==void 0||L!==void 0?{prompt_tokens:N?.tokens.prompt??L?.prompt??0,completion_tokens:N?.tokens.completion??L?.completion??0,total_tokens:N?.tokens.total??(N?.tokens.prompt??L?.prompt??0)+(N?.tokens.completion??L?.completion??0),cost_usd:N?.cost_usd,cost_credits:N?.cost_credits??N?.cost_qredits,context_window:F}:void 0,j=q>0?"tool_calls":S??"stop";if(j==="length"||j==="max_tokens"){let U=u($??"default",J),k=U!==void 0;w.debug("qlex output budget exhausted",{tier:$,contentStreamed:E,outputBudgetRecoveryAvailable:k}),P.error(new h("output budget exhausted",{category:"output_budget_exhausted",retryable:!1,outputBudgetRecoveryAvailable:k,outputBudgetRecoveryTokens:U})),D=!0;return}if(!E&&!R&&S!=="tool_calls"){let U=u($??"default",J),k=U!==void 0;w.debug("qlex completed without visible output",{tier:$,outputBudgetRecoveryAvailable:k}),P.error(new h("empty output",{category:"empty_output",retryable:!1,outputBudgetRecoveryAvailable:k,outputBudgetRecoveryTokens:U})),D=!0;return}if(P.enqueue(Y.encode(r({},j,W))),P.enqueue(Y.encode(`data: [DONE]
19
-
20
- `)),!N&&$!==void 0)w.info("qlex cost frame absent on stream finish",{tier:$});P.close(),D=!0},M=(_)=>{let W=HX(_);switch(C++,W.kind){case"skip":return!1;case"token":return t(W.content),!1;case"passthrough":{let j=W.chunk.choices;if(Array.isArray(j)&&j[0]&&typeof j[0]==="object"){let U=j[0].finish_reason;if(typeof U==="string")S=U;let k=j[0].delta;if(typeof k?.content==="string"&&k.content.length>0)E=!0;if(Array.isArray(k?.tool_calls))R=!0;lH(j[0].delta)}return G=!0,P.enqueue(Y.encode(`data: ${JSON.stringify(W.chunk)}
21
-
22
- `)),!1}case"cost":if(W.cost.final)N=W.cost;return!1;case"usage":if(W.usage.context_window!==void 0)F=W.usage.context_window;if(W.usage.prompt_tokens!==void 0&&W.usage.completion_tokens!==void 0)L={prompt:W.usage.prompt_tokens,completion:W.usage.completion_tokens};if(W.finishReason!==void 0)S=W.finishReason;return!1;case"control":{if(W.control==="tier-output-limits"){let j=W.chunk;if($!==void 0)aH($,j);w.debug("qlex tier output limits",{tierOutputLimit:j.tierOutputLimit,tierRecommendedStepTokens:j.tierRecommendedStepTokens,tierStepGuidance:j.tierStepGuidance,reasoningReserveTokens:j.reasoningReserveTokens,visibleOutputFloorTokens:j.visibleOutputFloorTokens,recommendedTotalTokens:j.recommendedTotalTokens,viableTotalFloorTokens:j.viableTotalFloorTokens,reasoningReported:j.reasoningReported,budgetPolicyVersion:j.budgetPolicyVersion})}else w.debug("qlex control frame dropped",{id:W.chunk.id,object:W.chunk.object});return!1}case"done":return O(),!0;case"error":{let j=bH(W.message);w.debug("qlex stream error frame",{tier:$,raw:W.message,frameIndex:C,contentStreamed:G,category:j.category,retryable:j.retryable});let U=j.category==="output_budget_exhausted"||j.category==="empty_output"?u($??"default",J):void 0;if(j.retryable===!1&&U!==void 0)j.outputBudgetRecoveryAvailable=!0,j.outputBudgetRecoveryTokens=U;return P.error(new h(W.message,j)),D=!0,!0}}};try{while(!0){let{done:W,value:j}=await K.read();if(W)break;V+=z.decode(j,{stream:!0});let U;while((U=V.indexOf(`
23
-
24
- `))!==-1){let k=V.slice(0,U);if(V=V.slice(U+2),M(k))return}}V+=z.decode();let _=V.replace(/\r?\n$/,"");if(_.length>0&&M(_))return;if(!D)O()}catch(_){if(!D)P.error(_ instanceof h?_:new h(_ instanceof Error?_.message:String(_)))}finally{K.releaseLock()}},cancel(P){K.cancel(P).catch(()=>{})}})}function PH(H){return{content:typeof H.content==="string"?H.content:H.choices?.[0]?.message?.content??"",finishReason:H.choices?.[0]?.finish_reason??"stop"}}function JX(H){let X=H??{},{content:Z,finishReason:$}=PH(X),J=X.usage??{},K=J.prompt_tokens??0,z=J.completion_tokens??0,Y="orch-"+Date.now().toString(36),V=Math.floor(Date.now()/1000),G=(S,E,R)=>{let C={id:Y,object:"chat.completion.chunk",created:V,model:"orchestrated",choices:[{index:0,delta:S,finish_reason:E}]};if(R)C.usage=R;return`data: ${JSON.stringify(C)}
25
-
26
- `},D={prompt_tokens:K,completion_tokens:z,total_tokens:J.total_tokens??K+z};if(typeof J.cost_usd==="number")D.cost_usd=J.cost_usd;if(typeof J.cost_credits==="number")D.cost_credits=J.cost_credits;if(typeof J.context_window==="number")D.context_window=J.context_window;let N=[G({role:"assistant",content:""},null),G({content:Z},null),G({},$,D),`data: [DONE]
27
-
28
- `],F=new TextEncoder,L=new ReadableStream({start(S){for(let E of N)S.enqueue(F.encode(E));S.close()}});return new Response(L,{status:200,headers:{"content-type":"text/event-stream"}})}function LX(H){let X=H??{},{content:Z,finishReason:$}=PH(X),J=X.usage??{},K=J.prompt_tokens??0,z=J.completion_tokens??0,Y={id:"orch-"+Date.now(),object:"chat.completion",created:Math.floor(Date.now()/1000),model:"orchestrated",choices:[{index:0,message:{role:"assistant",content:Z},finish_reason:$}],usage:{prompt_tokens:K,completion_tokens:z,total_tokens:J.total_tokens??K+z,...typeof J.cost_usd==="number"?{cost_usd:J.cost_usd}:{},...typeof J.context_window==="number"?{context_window:J.context_window}:{}}};return new Response(JSON.stringify(Y),{status:200,headers:{"content-type":"application/json"}})}async function KX(H,X,Z){let $=qH(H,X),J=X?`HTTP ${H}: ${X}`:`HTTP ${H}`;switch(w.error("gateway rejected request",{tier:Z.tier,status:H,category:$.category,upstreamCode:$.upstreamCode,field:$.field,retryable:$.retryable}),$.category){case"billing":return new _H(X||void 0,$);case"rate_limited":return new UH($);case"gateway_routing":return new v(`HTTP ${H}`,$);case"invalid_credentials":return await Z.onInvalidCredentials?.().catch(()=>{}),new FH(J,$);case"request_too_large":return new m("irreducible",$.upstreamMessage??X??void 0,$);case"request_rejected":case"tool_protocol":return new OH($.upstreamMessage??X??void 0,$.field,$);case"configuration":case"transient":case"unknown":default:return new v(J,$)}}function KH(H){let X=$H();if(X===void 0)return H;let Z=b(H);if(Z<=X)return H;let $=l(H,X);return w.warn("request over known size ceiling, reducing before send",{tier:H.tier,bytes:Z,ceiling:X,reducedBytes:$.bytes,fits:$.reduced,...$.actions}),$.bytes<Z?$.body:H}function zH(H){let X=b(H),Z=n(X),$=l(H,Z);if(!$.reduced)throw w.error("request too large and cannot be reduced further",{tier:H.tier,rejectedBytes:X,ceiling:Z,reducedBytes:$.bytes,...$.actions}),new m("irreducible");return w.warn("request too large, retrying once with reduced history",{tier:H.tier,rejectedBytes:X,ceiling:Z,reducedBytes:$.bytes,...$.actions,notice:Q.copy().requestTooLargeRecovering()}),$.body}function YH(H){let X=b(H);throw n(X),w.error("reduced request still too large",{tier:H.tier,rejectedBytes:X}),new m("after-reduction")}function zX(H,X=globalThis.fetch,Z,$){let J=$?.responseTimeoutMs??TH;return async(K,z)=>{if(z?.method==="POST"&&typeof z?.body==="string"){let Y;try{Y=JSON.parse(z.body)}catch{return X(K,z)}let V=oH(),G=tH(Y.model??"default"),D=JH(Y,{toolMode:V,outputAdvisory:G});if(cH(Y.messages)&&!mH(D.messages)){let{dropped:O}=MH(V==="text"?QH(Y.messages,Y.tools):Y.messages);throw w.error("refusing to send: user message lost in normalization",{tier:D.tier,toolMode:V,inputRoles:Array.isArray(Y.messages)?Y.messages.map((M)=>M&&typeof M==="object"?String(M.role):"?"):"not-an-array",droppedCount:O.length,dropped:O}),new LH("your message could not be turned into sendable content")}let N=await H(),F=typeof N==="string"?{key:N,method:"sso"}:N;if(!F?.key)throw new jH;let L=new Headers(z.headers),S=()=>{if(F.method==="api-key")L.delete("Authorization"),L.set("x-api-key",F.key);else L.delete("x-api-key"),L.set("Authorization",`Bearer ${F.key}`)};S(),L.set("Content-Type","application/json");let E=!1,R=async(O,M)=>{let _=qH(O,M),W=async()=>({retry:!1,error:await KX(O,M,{onInvalidCredentials:Z,tier:D.tier})});if(_.category!=="invalid_credentials"||E)return W();E=!0;let j=o(F),U=await NH(F);if(U.kind==="recovered"&&o(U.credential)!==j)return F=U.credential,S(),{retry:!0};if(U.kind==="inconclusive")return{retry:!1,error:new v(`HTTP ${O}: ${U.reason}`,_)};return W()};if(D.tier==="orchestrated"){let O=z.signal,M=async(j)=>{let U=new AbortController,k=()=>U.abort(O?.reason);if(O)if(O.aborted)U.abort(O.reason);else O.addEventListener("abort",k,{once:!0});let e=!1,kH=setTimeout(()=>{e=!0,U.abort()},J);try{return await X(AH,{method:"POST",headers:L,body:JSON.stringify(j),signal:U.signal})}catch(EH){if(e)throw new v(`no response within ${Math.round(J/1000)}s`);throw EH}finally{clearTimeout(kH),O?.removeEventListener("abort",k)}},_=KH(D),W=await M(_);if(W.status===413){if(await W.body?.cancel().catch(()=>{}),_=zH(_),W=await M(_),W.status===413)await W.body?.cancel().catch(()=>{}),YH(_)}while(!W.ok){let j=await W.text().catch(()=>""),U=await R(W.status,j);if(!U.retry)throw U.error;W=await M(_)}return JX(await W.json())}let C=z.signal,P=async(O)=>{let M=new AbortController,_=()=>M.abort(C?.reason);if(C)if(C.aborted)M.abort(C.reason);else C.addEventListener("abort",_,{once:!0});let W=()=>C?.removeEventListener("abort",_),j=!1,U=setTimeout(()=>{j=!0,M.abort()},J);try{return{res:await X(IH,{method:"POST",headers:L,body:JSON.stringify(O),signal:M.signal}),detach:W}}catch(k){if(W(),j)throw new v(`no response within ${Math.round(J/1000)}s`);throw k}finally{clearTimeout(U)}},A=KH(D),{res:q,detach:I}=await P(A);if(q.status===400&&V==="native"&&sH(Y))I(),await q.body?.cancel().catch(()=>{}),A=JH(Y,{toolMode:"text",outputAdvisory:G}),{res:q,detach:I}=await P(A);if(q.status===413){if(I(),await q.body?.cancel().catch(()=>{}),A=zH(A),{res:q,detach:I}=await P(A),q.status===413)I(),await q.body?.cancel().catch(()=>{}),YH(A)}try{while(!q.ok){let O=await q.text().catch(()=>""),M=await R(q.status,O);if(I(),!M.retry)throw M.error;({res:q,detach:I}=await P(A))}}catch(O){throw I(),O}if(Y.stream!==!1&&q.body){let O=Array.isArray(Y.tools)&&Y.tools.length>0;return new Response($X(q.body,{toolProtocolEnabled:O,tier:D.tier,requestedOutputBudget:D.opts.max_tokens}),{status:q.status,statusText:q.statusText,headers:{"content-type":"text/event-stream"}})}return q}return X(K,z)}}function qX(H){let X=H.getToken??(async()=>H.bearerToken),Z=zX(X,globalThis.fetch,H.onInvalidCredentials);return GH({name:H.name??"qlex",baseURL:Q.streamBaseUrl(),fetch:Z})}function MX(H,X){return u(H,X)!==void 0}var YX=2;function u(H,X){let Z=d.get(H),$=Z?.tierOutputLimit;if(!Z||!$)return;let J=X??Z.recommendedTotalTokens??Z.tierRecommendedStepTokens;if(!J||J>=$)return;let K=Z.recommendedTotalTokens??Z.tierRecommendedStepTokens??J,z=Math.min($,Math.max(J+1,J*YX,K));return z>J?z:void 0}export{$X as transformQlexStream,JX as toOrchestratedSSEStream,LX as toOpenAICompletion,FX as sanitizeUpstreamProviderError,oH as resolveToolMode,iH as renderToolProtocolPrompt,aH as recordTierOutputAdvisory,XX as partialTagSuffixLength,HX as parseQlexFrame,qH as parseQlexError,MH as normalizeQlexMessagesWithReport,uH as normalizeQlexMessages,dH as mergeLeadingSystemMessages,xH as isGatewayRequiredError,cH as hasUserRoleMessage,mH as hasUsableUserMessage,sH as hasToolContext,u as getTierOutputBudgetRecovery,tH as getTierOutputAdvisory,c as flattenMessageContent,QH as encodeToolProtocolMessages,ZX as encodeExtractedArguments,s as decodeToolArgumentsToObject,qX as createQlexProvider,zX as createCustomFetch,OX as clearTierOutputAdvisories,bH as classifyQlexStreamError,MX as canIncreaseTierOutputBudget,JH as buildQlexBody,SH as ToolCallExtractor,g as TOOL_CALL_OPEN,p as TOOL_CALL_CLOSE,h as QlexStreamError,m as QlexRequestTooLargeError,OH as QlexRequestRejectedError,LH as QlexRequestNotSentError,UH as QlexRateLimitError,jH as QlexNotLoggedInError,FH as QlexInvalidCredentialsError,_H as QlexInsufficientBalanceError,v as QlexGatewayError,IH as QLEX_STREAM_URL,TH as QLEX_RESPONSE_TIMEOUT_MS,AH as QLEX_ORCHESTRATED_URL};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{gf as a}from"./chunk-snt1kefv.js";import"./chunk-4sazy0nq.js";export default a();
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{jt as e,kt as f,lt as g,nt as h,ot as i,pt as j,qt as k,rt as l,tt as m,ut as n}from"./chunk-7dep7g7c.js";import{zt as d}from"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import{ku as c}from"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import{Ku as b}from"./chunk-j21dnncc.js";import{Vu as a}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-4sazy0nq.js";export{h as getEnvInfo,c as Wildcard,n as Token,m as Rpc,d as Process,b as Log,l as Lock,k as Locale,j as LocalContext,i as Keybind,a as Filesystem,g as EffectUtil,f as Color,e as Archive};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var h="./tree-sitter-typescript-zxjzwt75.wasm";export{h as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{ls as a,ms as b,ns as c}from"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-4sazy0nq.js";export{c as makeRuntime,a as attachWith,b as attach};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Al as f,Bl as g,Cl as h,Dl as i,vl as a,wl as b,xl as c,yl as d,zl as e}from"./chunk-364ccew0.js";import"./chunk-yjp0btmq.js";import"./chunk-25bp7pcm.js";import"./chunk-45mjcxqk.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-4sazy0nq.js";export{i as stopRefresh,h as startRefresh,g as refresh,d as readModelCatalogResponse,f as get,c as Provider,b as Model,a as MODEL_CATALOG_MAX_BYTES,e as Data};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var l="./tree-sitter-javascript-nd0q4pe9.wasm";export{l as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Cd as s}from"./chunk-37dvnent.js";import{Pd as r}from"./chunk-9xvctnjr.js";import{Xg as i}from"./chunk-w57j3pgz.js";import{Ih as z,Jh as B,Zg as u,_g as g,ch as q}from"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{Mk as f,ak as G,bk as V,ek as S,gl as x,mk as $,rl as K,sl as J}from"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import{_l as R,am as p}from"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import{Ku as w}from"./chunk-j21dnncc.js";import{_u as U}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import{LL as A,UI as c}from"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import{lQ as v,mQ as P}from"./chunk-4sazy0nq.js";import{EOL as X}from"os";var k=r({command:"config",describe:"show resolved configuration",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(J.Service.use((o)=>o.get()));process.stdout.write(JSON.stringify(e,null,2)+X)})}});import{EOL as y}from"os";var Y=r({command:"search <query>",describe:"search files by query",builder:(e)=>e.positional("query",{type:"string",demandOption:!0,description:"Search query"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.search({query:e.query})));process.stdout.write(o.join(y)+y)})}}),Z=r({command:"read <path>",describe:"read file contents as JSON",builder:(e)=>e.positional("path",{type:"string",demandOption:!0,description:"File path to read"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.read(e.path)));process.stdout.write(JSON.stringify(o,null,2)+y)})}}),H=r({command:"status",describe:"show file status information",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(g.Service.use((o)=>o.status()));process.stdout.write(JSON.stringify(e,null,2)+y)})}}),ee=r({command:"list <path>",describe:"list files in a directory",builder:(e)=>e.positional("path",{type:"string",demandOption:!0,description:"File path to list"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(g.Service.use((t)=>t.list(e.path)));process.stdout.write(JSON.stringify(o,null,2)+y)})}}),oe=r({command:"tree [dir]",describe:"show directory tree",builder:(e)=>e.positional("dir",{type:"string",description:"Directory to tree",default:process.cwd()}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.tree({cwd:e.dir,limit:200})));console.log(JSON.stringify(o,null,2))})}}),L=r({command:"file",describe:"file system debugging utilities",builder:(e)=>e.command(Z).command(H).command(ee).command(Y).command(oe).demandCommand(),async handler(){}});import{EOL as D}from"os";var E=r({command:"lsp",describe:"LSP debugging utilities",builder:(e)=>e.command(te).command(re).command(ie).demandCommand(),async handler(){}}),te=r({command:"diagnostics <file>",describe:"get diagnostics for a file",builder:(e)=>e.positional("file",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(S.Service.use((t)=>c.gen(function*(){return yield*t.touchFile(e.file,!0),yield*c.sleep(1000),yield*t.diagnostics()})));process.stdout.write(JSON.stringify(o,null,2)+D)})}}),re=r({command:"symbols <query>",describe:"search workspace symbols",builder:(e)=>e.positional("query",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let n=[];try{const o=v(n,w.Default.time("symbols"),0);let t=await i.runPromise(S.Service.use((d)=>d.workspaceSymbol(e.query)));process.stdout.write(JSON.stringify(t,null,2)+D)}catch(a){var m=a,l=1}finally{P(n,m,l)}})}}),ie=r({command:"document-symbols <uri>",describe:"get symbols from a document",builder:(e)=>e.positional("uri",{type:"string",demandOption:!0}),async handler(e){await s(process.cwd(),async()=>{let n=[];try{const o=v(n,w.Default.time("document-symbols"),0);let t=await i.runPromise(S.Service.use((d)=>d.documentSymbol(e.uri)));process.stdout.write(JSON.stringify(t,null,2)+D)}catch(a){var m=a,l=1}finally{P(n,m,l)}})}});import{EOL as C}from"os";var F=r({command:"rg",describe:"ripgrep debugging utilities",builder:(e)=>e.command(se).command(ne).command(ae).demandCommand(),async handler(){}}),se=r({command:"tree",describe:"show file tree using ripgrep",builder:(e)=>e.option("limit",{type:"number"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.tree({cwd:p.directory,limit:e.limit})));process.stdout.write(o+C)})}}),ne=r({command:"files",describe:"list files using ripgrep",builder:(e)=>e.option("query",{type:"string",description:"Filter files by query"}).option("glob",{type:"string",description:"Glob pattern to match files"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(c.gen(function*(){return yield*(yield*u.Service).files({cwd:p.directory,glob:e.glob?[e.glob]:void 0}).pipe(A.take(e.limit??1/0),A.runCollect,c.map((n)=>[...n]))}));process.stdout.write(o.join(C)+C)})}}),ae=r({command:"search <pattern>",describe:"search file contents using ripgrep",builder:(e)=>e.positional("pattern",{type:"string",demandOption:!0,description:"Search pattern"}).option("glob",{type:"array",description:"File glob patterns"}).option("limit",{type:"number",description:"Limit number of results"}),async handler(e){await s(process.cwd(),async()=>{let o=await i.runPromise(u.Service.use((t)=>t.search({cwd:p.directory,pattern:e.pattern,glob:e.glob,limit:e.limit})));process.stdout.write(JSON.stringify(o.items,null,2)+C)})}});import{EOL as me}from"os";var T=r({command:"scrap",describe:"list all known projects",builder:(e)=>e,async handler(){let e=w.Default.time("scrap"),o=await R.list();process.stdout.write(JSON.stringify(o,null,2)+me),e.stop()}});import{EOL as ce}from"os";var j=r({command:"skill",describe:"list all available skills",builder:(e)=>e,async handler(){await s(process.cwd(),async()=>{let e=await i.runPromise(c.gen(function*(){return yield*(yield*q.Service).all()}));process.stdout.write(JSON.stringify(e,null,2)+ce)})}});var M=r({command:"snapshot",describe:"snapshot debugging utilities",builder:(e)=>e.command(de).command(le).command(pe).demandCommand(),async handler(){}}),I=(e)=>s(process.cwd(),async()=>{console.log(await i.runPromise($.Service.use(e)))}),_=(e)=>e.positional("hash",{type:"string",description:"hash",demandOption:!0}),de=r({command:"track",describe:"track current snapshot state",async handler(){await I((e)=>e.track())}}),le=r({command:"patch <hash>",describe:"show patch for a snapshot hash",builder:_,async handler(e){await I((o)=>o.patch(e.hash))}}),pe=r({command:"diff <hash>",describe:"show diff for a snapshot hash",builder:_,async handler(e){await I((o)=>o.diff(e.hash))}});import{EOL as b}from"os";import{basename as ue}from"path";var Q=r({command:"agent <name>",describe:"show agent configuration details",builder:(e)=>e.positional("name",{type:"string",demandOption:!0,description:"Agent name"}).option("tool",{type:"string",description:"Tool id to execute"}).option("params",{type:"string",description:"Tool params as a JSON object"}),async handler(e){await s(process.cwd(),async()=>{let o=e.name,t=await i.runPromise(B.Service.use((d)=>d.get(o)));if(!t)process.stderr.write(`Agent ${o} not found, run '${ue(process.execPath)} agent list' to get an agent list`+b),process.exit(1);let n=await fe(t),a=await ye(t,n),m=e.tool;if(m){let d=n.find((W)=>W.id===m);if(!d)process.stderr.write(`Tool ${m} not found for agent ${o}`+b),process.exit(1);if(a[m]===!1)process.stderr.write(`Tool ${m} is disabled for agent ${o}`+b),process.exit(1);let h=ge(e.params),O=await we(t),N=await d.execute(h,O);process.stdout.write(JSON.stringify({tool:m,input:h,result:N},null,2)+b);return}let l={...t,tools:a};process.stdout.write(JSON.stringify(l,null,2)+b)})}});async function fe(e){return i.runPromise(c.gen(function*(){let o=yield*x.Service,t=yield*z.Service,n=e.model??(yield*o.defaultModel());return yield*t.tools({...n,agent:e})}))}async function ye(e,o){let t=f.disabled(o.map((a)=>a.id),e.permission),n={};for(let a of o)n[a.id]=!t.has(a.id);return n}function ge(e){if(!e)return{};let o=e.trim();if(o.length===0)return{};let t=(()=>{try{return JSON.parse(o)}catch{throw Error("Failed to parse --params. Provide a valid JSON object.")}})();if(!t||typeof t!=="object"||Array.isArray(t))throw Error("Tool params must be an object.");return t}async function we(e){let{session:o,messageID:t}=await i.runPromise(c.gen(function*(){let a=yield*K.Service,m=yield*a.create({title:`Debug tool run (${e.name})`}),l=G.ascending(),d=e.model?e.model:yield*c.gen(function*(){return yield*(yield*x.Service).defaultModel()}),h=Date.now(),O={id:l,sessionID:m.id,role:"assistant",time:{created:h},parentID:l,modelID:d.modelID,providerID:d.providerID,mode:"debug",agent:e.name,path:{cwd:p.directory,root:p.worktree},cost:0,tokens:{input:0,output:0,reasoning:0,cache:{read:0,write:0}}};return yield*a.updateMessage(O),{session:m,messageID:l}})),n=f.merge(e.permission,o.permission??[]);return{sessionID:o.id,messageID:t,callID:V.ascending(),agent:e.name,abort:new AbortController().signal,messages:[],metadata:()=>c.void,ask(a){return c.sync(()=>{for(let m of a.patterns)if(f.evaluate(a.permission,m,n).action==="deny")throw new f.DeniedError({ruleset:n})})}}}var jo=r({command:"debug",describe:"debugging and troubleshooting tools",builder:(e)=>e.command(k).command(E).command(F).command(L).command(T).command(j).command(M).command(Q).command(be).command({command:"wait",describe:"wait indefinitely (for debugging)",async handler(){await s(process.cwd(),async()=>{await new Promise((o)=>setTimeout(o,86400000))})}}).demandCommand(),async handler(){}}),be=r({command:"paths",describe:"show global paths (data, config, cache, state)",handler(){for(let[e,o]of Object.entries(U.Path))console.log(e.padEnd(10),o)}});export{jo as DebugCommand};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{xd as a}from"./chunk-vm58fkrv.js";import"./chunk-6sfhbckv.js";import"./chunk-4sazy0nq.js";export{a as dict};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{xg as r}from"./chunk-yj6rbe9p.js";import{kQ as o}from"./chunk-4sazy0nq.js";var c=new r("zod v4");async function m(){return async(n,e)=>{let t;if("_zod"in n)try{t=(await import("./chunk-9cw4cnz0.js")).toJSONSchema}catch{throw c}else try{t=(await import("./chunk-qb35hqm4.js")).zodToJsonSchema}catch{throw new r("zod-to-json-schema")}return t(n,e)}}export{m as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var _="./libopentui-0r5w9btr.so";export{_ as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{sd as a,td as b}from"./chunk-3bnqw3xp.js";import"./chunk-45mjcxqk.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-4sazy0nq.js";export{a as read,b as copy};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{o as L}from"./chunk-3gw6r3hf.js";import"./chunk-jw16f6t0.js";import{A as K}from"./chunk-4kqdzdv5.js";import{B as N}from"./chunk-gsez13bg.js";import{C as F,E as J}from"./chunk-c8k32724.js";import"./chunk-rqmvj7f4.js";import"./chunk-a9y27zd2.js";import"./chunk-pmv8yr8c.js";import{N as M}from"./chunk-132tcp2j.js";import"./chunk-jf6ry79j.js";import"./chunk-3bnqw3xp.js";import"./chunk-6sfhbckv.js";import"./chunk-5kmfnkzv.js";import"./chunk-jcjaw7tk.js";import{Pd as B}from"./chunk-9xvctnjr.js";import"./chunk-1mcsf4yb.js";import"./chunk-txqc7543.js";import"./chunk-p8k48st6.js";import{Sf as z}from"./chunk-9s4whpg1.js";import"./chunk-mqtqcc10.js";import"./chunk-b4ysd5b4.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-w24660y4.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";var x=B({command:"attach <url>",describe:"attach to a running qitqode server",builder:(j)=>j.positional("url",{type:"string",describe:"http://localhost:4096",demandOption:!0}).option("dir",{type:"string",description:"directory to run in"}).option("continue",{alias:["c"],describe:"continue the last session",type:"boolean"}).option("session",{alias:["s"],type:"string",describe:"session id to continue"}).option("fork",{type:"boolean",describe:"fork the session when continuing (use with --continue or --session)"}).option("password",{alias:["p"],type:"string",describe:"basic auth password (defaults to QITQODE_SERVER_PASSWORD)"}),handler:async(j)=>{let Q=J();try{F();let q=N(j);if(q){z.error(q),process.exitCode=1;return}let R=(()=>{if(!j.dir)return;try{return process.chdir(j.dir),process.cwd()}catch{return j.dir}})(),S=M({password:j.password}),V=await K.get();await L({url:j.url,config:V,args:{continue:j.continue,sessionID:j.session,fork:j.fork},directory:R,headers:S})}finally{Q?.()}}});export{x as AttachCommand};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{kQ as o}from"./chunk-4sazy0nq.js";var i=(t)=>`standard-openapi: ${t}`,s=new Map,r=async(t)=>{let e=s.get(t);if(e)return e;let a;switch(t){case"valibot":a=(await import("./chunk-60qyqqxx.js")).default();break;case"zod":a=(await import("./chunk-kwzawx7r.js")).default();break;default:a=(await import("./chunk-4tbqsrsn.js")).default()}return s.set(t,a),a},d=async(t,e={})=>{let a=await r(t["~standard"].vendor),{components:n={},options:c}=e;return{schema:await a(t,{components:n,options:c}),components:Object.keys(n).length>0?n:void 0}};
3
- export{i as vg,d as wg};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{xg as t}from"./chunk-yj6rbe9p.js";import{kQ as o}from"./chunk-4sazy0nq.js";async function e(){try{let{toJSONSchema:r}=await import("./chunk-9nk0ts0s.js");return r}catch{throw new t("sury")}}export{e as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Tf as a,Uf as b}from"./chunk-f36ctnbp.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-4sazy0nq.js";export{a as start,b as Heap};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Vf as a,Wf as b,Xf as c,Yf as d,Zf as e}from"./chunk-cjxcnhmq.js";import"./chunk-htkwc2se.js";import"./chunk-mqtqcc10.js";import"./chunk-b4ysd5b4.js";import"./chunk-ebabnv33.js";import"./chunk-nfg7nt13.js";import"./chunk-yj6rbe9p.js";import"./chunk-f77nxt23.js";import"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";export{c as url,b as openapi,d as listen,e as Server,a as Default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var _="./libopentui-smaejjb8.so";export{_ as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{a,b,c,d,e,f,g}from"./chunk-fmxm4kaj.js";import"./chunk-41x11r2s.js";import"./chunk-wm77svwm.js";import"./chunk-rqmvj7f4.js";import"./chunk-7jhrxzjx.js";import"./chunk-jcjaw7tk.js";import"./chunk-9xvctnjr.js";import"./chunk-9s4whpg1.js";import"./chunk-b4ysd5b4.js";import"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";export{f as statusEffect,a as resolveApiKeyFlag,e as logoutEffect,d as loginEffect,c as interactiveLogin,b as apiKeyLoginEffect,g as AuthCommand};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{mf as h}from"./chunk-std2bgv7.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-4sazy0nq.js";var v=(q)=>{return h({baseURL:"https://gateway.ai.cloudflare.com/v1/compat",name:"Unified",...q||{}})},x=v();export{x as unified,v as createUnified};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var t="./highlights-r812a2qc.scm";export{t as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Qd as a,Rd as b,Sd as c}from"./chunk-mvnxwwe7.js";import"./chunk-t01bhw5h.js";import"./chunk-8yr682pv.js";import"./chunk-v3x5nrc4.js";import"./chunk-4sazy0nq.js";export{b as validateSsoProfile,a as isSsoProfile,c as fromSSO};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var t=Object.fromEntries([]);export{t as modules};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";function o(){return(e,n)=>e.toJsonSchema(n)}export{o as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{$P as f,WP as a,XP as b,YP as c,ZP as d,_P as e,aQ as g,bQ as h,cQ as i,dQ as j}from"./chunk-ev3a2sxv.js";import"./chunk-4sazy0nq.js";export{c as TreeCursor,b as Tree,f as Query,j as Parser,d as Node,i as MIN_COMPATIBLE_VERSION,a as LookaheadIterator,g as Language,h as LANGUAGE_VERSION,e as CaptureQuantifier};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var t="./tree-sitter-3jzf13jk.wasm";export{t as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var n="./highlights-hk7bwhj4.scm";export{n as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{n as a,o as b}from"./chunk-3gw6r3hf.js";import"./chunk-jw16f6t0.js";import"./chunk-4kqdzdv5.js";import"./chunk-c8k32724.js";import"./chunk-rqmvj7f4.js";import"./chunk-a9y27zd2.js";import"./chunk-pmv8yr8c.js";import"./chunk-jf6ry79j.js";import"./chunk-3bnqw3xp.js";import"./chunk-6sfhbckv.js";import"./chunk-5kmfnkzv.js";import"./chunk-jcjaw7tk.js";import"./chunk-1mcsf4yb.js";import"./chunk-txqc7543.js";import"./chunk-p8k48st6.js";import"./chunk-9s4whpg1.js";import"./chunk-mqtqcc10.js";import"./chunk-b4ysd5b4.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-w24660y4.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";export{b as tui,a as rendererConfig};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Dp as a,Ep as b,Fp as c,Gp as d,Hp as e,Ip as f,Jp as g,Kp as h,Lp as i}from"./chunk-64s7vfj7.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-4sazy0nq.js";export{i as gateway,h as createGatewayProvider,h as createGateway,g as GatewayResponseError,d as GatewayRateLimitError,e as GatewayModelNotFoundError,c as GatewayInvalidRequestError,f as GatewayInternalServerError,a as GatewayError,b as GatewayAuthenticationError};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var e="./libopentui-xtk56e94.so";export{e as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Vr as a,Wr as b}from"./chunk-0g25z230.js";import"./chunk-4sazy0nq.js";export{a as generateSecret,b as generateCodeChallengeFromVerifier};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{hf as a,if as b,jf as c,kf as d,lf as e,mf as f}from"./chunk-std2bgv7.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-4sazy0nq.js";export{f as createOpenAICompatible,e as VERSION,d as OpenAICompatibleImageModel,c as OpenAICompatibleEmbeddingModel,b as OpenAICompatibleCompletionLanguageModel,a as OpenAICompatibleChatLanguageModel};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{kQ as t}from"./chunk-4sazy0nq.js";var e=await import("./chunk-eyc6tb5h.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{xv as o}from"./chunk-tdmn21z0.js";var e=o;
3
- export{e as $u};
@@ -1,4 +0,0 @@
1
- // @bun
2
- import{_u as Q}from"./chunk-vc4e6xc4.js";import{$u as u}from"./chunk-hnz570f9.js";import{SP as B}from"./chunk-ydc6ypjt.js";import{iQ as i}from"./chunk-4sazy0nq.js";var Pq={};i(Pq,{redactValue:()=>D,init:()=>Hq,flush:()=>Jq,file:()=>qq,enabled:()=>a,create:()=>h,Level:()=>s,Default:()=>e});import U from"path";import Z from"fs/promises";import{createWriteStream as m}from"fs";var Wq="https://qortex.forgewise.tech/api/v1/qortex/streamTier",Gq=new URL("https://qortex.forgewise.tech/api/v1/qortex/streamTier").origin,_="https://qortex.forgewise.tech/api/v1/qortex/streamTier".replace(/\/streamTier$/,""),Vq={name:"QitQode",family:"qlex",npm:"@qitqode/qlex-provider",limit:{context:200000,output:16384},capabilities:{temperature:!0,reasoning:!1,attachment:!0,toolcall:!0,input:{text:!0,audio:!1,image:!0,video:!1,pdf:!1},output:{text:!0,audio:!1,image:!1,video:!1,pdf:!1},interleaved:!1},release_date:"2025-07-06"};function F(q){return q.replace(/provider\s+'[^']*'\s*(?:stream\s+)?(?:failed|error)?\s*:?\s*/gi,"").replace(/\b(?:anthropic|openai|google|vertex\s*ai|bedrock|azure|x\.?ai|mistral|deepseek|cohere|groq|together(?:\.ai)?|openrouter|fireworks|perplexity|meta)\b/gi,"").replace(/\b(?:gpt|claude|gemini|grok|llama|qwen|sonnet|opus|haiku|o[0-9])[-\w.]*/gi,"").replace(/\s+/g," ").replace(/^[\s:;,.\-]+/,"").replace(/[\s.]+$/,"").trim()}var Fq={notLoggedIn:"Not logged in to QitQode. Run `qitqode auth login` to sign in with your Forgewise account.",rateLimit:"Rate limit exceeded. Please wait a moment before sending more requests.",insufficientBalance:(q)=>{let H=q?F(q):"";return`Insufficient qredits${H?`: ${H}`:""}. Add qredits at qitqode.com to continue.`},invalidCredentials:(q)=>{let H=q?F(q):"";return`Your QitQode sign-in has ended${H?` (${H})`:""}. Renewing it automatically didn't work, so signing in again is the only step left.`},accountNotLinked:(q)=>{let H=q?F(q):"";return`This credential isn't linked to a QitQode account${H?` (${H})`:""}, so there is no wallet to read. Sign in with your Forgewise account, or use a key issued to that account.`},gatewayUnavailable:(q)=>{let H=q?F(q):"";return`The QitQode model gateway is unavailable${H?` (${H})`:""}. Your sign-in is still valid \u2014 the model backend isn't reachable through its trusted gateway yet. This is a server-side configuration issue, not a login problem.`},streamFailed:(q)=>{let H=q?F(q):"";return`The QitQode model stream failed${H?`: ${H}`:""}.`},streamCutOff:()=>"The model's reply was cut off before it finished and QitQode could not recover it. This is a temporary upstream fault \u2014 your sign-in is fine and the service is reachable. Send the message again; if it keeps happening, try a shorter request or a different tier.",outputBudgetExhausted:()=>"The model ran out of output room before it could finish. QitQode will retry once with more headroom when the tier allows it.",emptyOutput:()=>"The model used its output budget without producing visible text. QitQode did not receive an answer and no charge is implied.",requestRejected:(q,H)=>{let $=q?F(q):"",W=H?F(H):"";return`QitQode built an invalid request and the server rejected it${W?` (field: ${W})`:""}${$?`: ${$}`:""}. This is a problem with the request QitQode sent \u2014 not your sign-in, and not a gateway outage. Sending the same thing again will fail the same way.`},requestNotSent:(q)=>{let H=q?F(q):"";return`QitQode did not send this request${H?`: ${H}`:""}. Nothing was sent and no qredits were spent. This is a problem inside QitQode \u2014 not your sign-in, and not a gateway outage.`},requestTooLargeRecovering:(q)=>{let H=q?F(q):"";return`This request was too large to send${H?` (${H})`:""}, so QitQode removed some earlier conversation detail and is trying once more. Your sign-in is fine and the service is reachable.`},requestTooLargeIrreducible:(q)=>{let H=q?F(q):"";return`This request is too large for the service to accept${H?` (${H})`:""}, and QitQode couldn't make it smaller without losing your current request. Try removing large pasted text or attachments from your message, or start a new session. This isn't a sign-in problem or a service outage.`},requestTooLargeAfterReduction:(q)=>{let H=q?F(q):"";return`This request was still too large for the service after QitQode removed earlier conversation detail${H?` (${H})`:""}, so it stopped rather than retrying again. Start a new session, or send a shorter message with fewer attachments. This isn't a sign-in problem or a service outage.`},insufficientBalanceFallback:"Insufficient qredits.",insufficientBalanceCliSuffix:" Visit qitqode.com to add qredits.",invalidCredentialsFallback:"Your QitQode sign-in has ended and couldn't be renewed automatically. Sign in again.",apiKeyPrompt:"Paste your Qortex API key:",apiKeyPlaceholder:"qortex-...",loginMenuForgewise:"Sign in with Forgewise account",loginMenuApiKey:"Paste a Qortex API key",waitingForgewise:"\u23F3 Waiting for Forgewise sign-in in your browser\u2026"};function J(q){let H=process.env[q]?.toLowerCase();return H==="true"||H==="1"}function x(q){let H=process.env[q]?.toLowerCase();return H==="false"||H==="0"}function M(q){let H=process.env[q];if(!H)return;let $=Number(H);return Number.isInteger($)&&$>0?$:void 0}var K=J("QITQODE_EXPERIMENTAL"),C=J("QITQODE_DISABLE_CLAUDE_CODE"),O=J("QITQODE_DISABLE_EXTERNAL_SKILLS"),n=O||C||J("QITQODE_DISABLE_CLAUDE_CODE_SKILLS"),o=process.env.QITQODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT,L={OTEL_EXPORTER_OTLP_ENDPOINT:process.env.OTEL_EXPORTER_OTLP_ENDPOINT,OTEL_EXPORTER_OTLP_HEADERS:process.env.OTEL_EXPORTER_OTLP_HEADERS,QITQODE_AUTO_SHARE:J("QITQODE_AUTO_SHARE"),QITQODE_AUTO_HEAP_SNAPSHOT:J("QITQODE_AUTO_HEAP_SNAPSHOT"),QITQODE_GIT_BASH_PATH:process.env.QITQODE_GIT_BASH_PATH,QITQODE_CONFIG:process.env.QITQODE_CONFIG,QITQODE_CONFIG_CONTENT:process.env.QITQODE_CONFIG_CONTENT,get QITQODE_BACKEND_URL(){return process.env.QITQODE_BACKEND_URL??_},get QITQODE_QLEX_MAX_REQUEST_BYTES(){return M("QITQODE_QLEX_MAX_REQUEST_BYTES")},QITQODE_DISABLE_AUTOUPDATE:J("QITQODE_DISABLE_AUTOUPDATE"),QITQODE_DISABLE_LOG_ROTATION:J("QITQODE_DISABLE_LOG_ROTATION"),QITQODE_ALWAYS_NOTIFY_UPDATE:J("QITQODE_ALWAYS_NOTIFY_UPDATE"),QITQODE_DISABLE_PRUNE:J("QITQODE_DISABLE_PRUNE"),QITQODE_DISABLE_TERMINAL_TITLE:J("QITQODE_DISABLE_TERMINAL_TITLE"),QITQODE_SHOW_TTFD:J("QITQODE_SHOW_TTFD"),QITQODE_PERMISSION:process.env.QITQODE_PERMISSION,QITQODE_DISABLE_DEFAULT_PLUGINS:J("QITQODE_DISABLE_DEFAULT_PLUGINS"),QITQODE_DISABLE_LSP_DOWNLOAD:!0,QITQODE_ENABLE_EXPERIMENTAL_MODELS:J("QITQODE_ENABLE_EXPERIMENTAL_MODELS"),QITQODE_DISABLE_AUTOCOMPACT:J("QITQODE_DISABLE_AUTOCOMPACT"),QITQODE_DISABLE_MODELS_FETCH:J("QITQODE_DISABLE_MODELS_FETCH"),QITQODE_DISABLE_MOUSE:J("QITQODE_DISABLE_MOUSE"),QITQODE_OUTPUT_LENGTH_CONTINUATION_LIMIT:M("QITQODE_OUTPUT_LENGTH_CONTINUATION_LIMIT")??3,QITQODE_INVALID_OUTPUT_CONTINUATION_LIMIT:M("QITQODE_INVALID_OUTPUT_CONTINUATION_LIMIT")??2,QITQODE_TEXT_NGRAM_N:M("QITQODE_TEXT_NGRAM_N")??6,QITQODE_TEXT_REPEAT_THRESHOLD:M("QITQODE_TEXT_REPEAT_THRESHOLD")??3,QITQODE_TEXT_WINDOW_TOKENS:M("QITQODE_TEXT_WINDOW_TOKENS")??500,QITQODE_MAX_PROMPT_IMAGES:M("QITQODE_MAX_PROMPT_IMAGES")??4,QITQODE_MAX_PROMPT_IMAGE_SIZE:M("QITQODE_MAX_PROMPT_IMAGE_SIZE")??393216,QITQODE_DISABLE_PROVIDER_ENV:J("QITQODE_DISABLE_PROVIDER_ENV"),QITQODE_DISABLE_CLAUDE_CODE:C,get QITQODE_DISABLE_CLAUDE_CODE_MCP(){return C||J("QITQODE_DISABLE_CLAUDE_CODE_MCP")},QITQODE_DISABLE_CLAUDE_CODE_PROMPT:C||J("QITQODE_DISABLE_CLAUDE_CODE_PROMPT"),QITQODE_DISABLE_CLAUDE_CODE_COMMANDS:J("QITQODE_DISABLE_CLAUDE_CODE_COMMANDS"),QITQODE_DISABLE_CLAUDE_CODE_SKILLS:n,QITQODE_DISABLE_EXTERNAL_SKILLS:O,QITQODE_DISABLE_CODEX_SKILLS:O||J("QITQODE_DISABLE_CODEX_SKILLS"),QITQODE_DISABLE_OPENCODE_SKILLS:O||J("QITQODE_DISABLE_OPENCODE_SKILLS"),QITQODE_FAKE_VCS:process.env.QITQODE_FAKE_VCS,QITQODE_DISABLE_GIT:J("QITQODE_DISABLE_GIT"),get QITQODE_SERVER_PASSWORD(){return process.env.QITQODE_SERVER_PASSWORD},get QITQODE_SERVER_USERNAME(){return process.env.QITQODE_SERVER_USERNAME},QITQODE_ENABLE_QUESTION_TOOL:J("QITQODE_ENABLE_QUESTION_TOOL"),QITQODE_EXPERIMENTAL:K,QITQODE_EXPERIMENTAL_FILEWATCHER:B.boolean("QITQODE_EXPERIMENTAL_FILEWATCHER").pipe(B.withDefault(!1)),QITQODE_EXPERIMENTAL_DISABLE_FILEWATCHER:B.boolean("QITQODE_EXPERIMENTAL_DISABLE_FILEWATCHER").pipe(B.withDefault(!1)),QITQODE_EXPERIMENTAL_ICON_DISCOVERY:K||J("QITQODE_EXPERIMENTAL_ICON_DISCOVERY"),QITQODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT:o===void 0?process.platform==="win32":J("QITQODE_EXPERIMENTAL_DISABLE_COPY_ON_SELECT"),QITQODE_ENABLE_EXA:J("QITQODE_ENABLE_EXA")||K||J("QITQODE_EXPERIMENTAL_EXA"),QITQODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS:M("QITQODE_EXPERIMENTAL_BASH_DEFAULT_TIMEOUT_MS"),QITQODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX:M("QITQODE_EXPERIMENTAL_OUTPUT_TOKEN_MAX"),QITQODE_EXPERIMENTAL_OXFMT:K||J("QITQODE_EXPERIMENTAL_OXFMT"),QITQODE_EXPERIMENTAL_LSP_TY:J("QITQODE_EXPERIMENTAL_LSP_TY"),QITQODE_EXPERIMENTAL_LSP_TOOL:K||J("QITQODE_EXPERIMENTAL_LSP_TOOL"),QITQODE_EXPERIMENTAL_WORKFLOW_TOOL:!x("QITQODE_EXPERIMENTAL_WORKFLOW_TOOL"),QITQODE_EXPERIMENTAL_MARKDOWN:!x("QITQODE_EXPERIMENTAL_MARKDOWN"),QITQODE_MODELS_URL:process.env.QITQODE_MODELS_URL,QITQODE_MODELS_PATH:process.env.QITQODE_MODELS_PATH,QITQODE_DB:process.env.QITQODE_DB,QITQODE_DISABLE_CHANNEL_DB:!x("QITQODE_DISABLE_CHANNEL_DB"),QITQODE_SKIP_MIGRATIONS:J("QITQODE_SKIP_MIGRATIONS"),QITQODE_STRICT_CONFIG_DEPS:J("QITQODE_STRICT_CONFIG_DEPS"),QITQODE_WORKSPACE_ID:process.env.QITQODE_WORKSPACE_ID,QITQODE_EXPERIMENTAL_HTTPAPI:J("QITQODE_EXPERIMENTAL_HTTPAPI"),QITQODE_EXPERIMENTAL_WORKSPACES:K||J("QITQODE_EXPERIMENTAL_WORKSPACES"),get QITQODE_DISABLE_COMPOSE_SKILLS(){return J("QITQODE_DISABLE_COMPOSE_SKILLS")},get QITQODE_DISABLE_BUILTIN_SKILLS(){return J("QITQODE_DISABLE_BUILTIN_SKILLS")},get QITQODE_DISABLE_PROJECT_CONFIG(){return J("QITQODE_DISABLE_PROJECT_CONFIG")},get QITQODE_TUI_CONFIG(){return process.env.QITQODE_TUI_CONFIG},get QITQODE_CONFIG_DIR(){return process.env.QITQODE_CONFIG_DIR},get QITQODE_HOME(){return process.env.QITQODE_HOME},get QITQODE_PURE(){return J("QITQODE_PURE")},get QITQODE_PLUGIN_META_FILE(){return process.env.QITQODE_PLUGIN_META_FILE},get QITQODE_CLIENT(){return process.env.QITQODE_CLIENT??"cli"}};var s=u.enum(["DEBUG","INFO","WARN","ERROR"]).meta({ref:"LogLevel",description:"Log level"}),f={DEBUG:0,INFO:1,WARN:2,ERROR:3},l=10,r=52428800,t=209715200,p="INFO";function X(q){return f[q]>=f[p]}function a(q){return X(q)}var c=new Map,e=h({service:"default"}),G="";function qq(){return G}var z,T=0,v=!0,w=(q)=>{return process.stderr.write(q),q.length};function k(){return new Date().toISOString().split(".")[0].replace(/:/g,"")}async function Hq(q){if(q.level)p=q.level;if(v=q.rotate??!L.QITQODE_DISABLE_LOG_ROTATION,g(Q.Path.log),q.print)return;if(G=U.join(Q.Path.log,q.dev?"dev.log":k()+".log"),q.dev){let H=await Z.stat(G).catch(()=>null);if(H&&H.size>0)await Z.rename(G,`${G}.${k()}`).catch(()=>{})}else await Z.truncate(G).catch(()=>{});z=m(G,{flags:"a"}),T=0,w=(H)=>{return S=S.then(async()=>{if(T+=Buffer.byteLength(H),v&&T>=r)T=Buffer.byteLength(H),await $q();await new Promise(($)=>{if(!z){$();return}z.write(H,()=>$())})}).catch(()=>{}),H.length}}var S=Promise.resolve();async function Jq(){await S}async function $q(){let q=z,H=`${G}.${k()}`;for(let $=2;await Z.stat(H).then(()=>!0,()=>!1);$++)H=`${G}.${k()}.${$}`;if(await Z.rename(G,H).catch(()=>{}),z=m(G,{flags:"a"}),q)q.end();g(Q.Path.log)}async function g(q){let H=await Z.readdir(q).catch(()=>[]),W=(await Promise.all(H.filter((Y)=>Y.includes(".log")&&U.join(q,Y)!==G).map(async(Y)=>{let N=await Z.stat(U.join(q,Y)).catch(()=>null);return N?.isFile()?{name:Y,size:N.size}:null}))).flatMap((Y)=>Y?[Y]:[]).sort((Y,N)=>Y.name<N.name?-1:Y.name>N.name?1:0),j=W.reduce((Y,N)=>Y+N.size,0),P=W.length,R=W.filter((Y)=>{if(P<=l&&j<=t)return!1;return j-=Y.size,P-=1,!0});await Promise.all(R.map((Y)=>Z.unlink(U.join(q,Y.name)).catch(()=>{})))}var Yq=/token|secret|password|passwd|credential|api[_-]?key|authorization|cookie|set-cookie/i;function D(q,H){if(Yq.test(q)&&H!==void 0&&H!==null)return"[REDACTED]";return H}var A=10240;function jq(q){try{let H=JSON.stringify(q,function($,W){return $?D($,W):W});if(typeof H==="string"&&H.length>A)return H.slice(0,A)+`\u2026[truncated ${H.length-A} chars]`;return H}catch{return"[unserializable]"}}function d(q,H=0){let $=q.message;return q.cause instanceof Error&&H<10?$+" Caused by: "+d(q.cause,H+1):$}var E=Date.now();function h(q){q=q||{};let H=q.service;if(H&&typeof H==="string"){let j=c.get(H);if(j)return j}function $(j,P){let R=Object.entries({...q,...P}).filter(([y,V])=>V!==void 0&&V!==null).map(([y,V])=>{let b=`${y}=`;if(V instanceof Error)return b+d(V);let I=D(y,V);if(I!==V)return b+I;if(typeof V==="object"&&V!==null)return b+jq(V);return b+V}).join(" "),Y=new Date,N=Y.getTime()-E;return E=Y.getTime(),[Y.toISOString().split(".")[0],"+"+N+"ms",R,j].filter(Boolean).join(" ")+`
3
- `}let W={debug(j,P){if(X("DEBUG"))w("DEBUG "+$(j,P))},info(j,P){if(X("INFO"))w("INFO "+$(j,P))},error(j,P){if(X("ERROR"))w("ERROR "+$(j,P))},warn(j,P){if(X("WARN"))w("WARN "+$(j,P))},tag(j,P){if(q)q[j]=P;return W},clone(){return h({...q})},time(j,P){let R=Date.now();W.info(j,{status:"started",...P});function Y(){W.info(j,{status:"completed",duration:Date.now()-R,...P})}return{stop:Y,[Symbol.dispose](){Y()}}}};if(H&&typeof H==="string")c.set(H,W);return W}
4
- export{Wq as vu,Gq as wu,_ as xu,Vq as yu,F as zu,Fq as Au,L as Bu,s as Cu,a as Du,e as Eu,qq as Fu,Hq as Gu,Jq as Hu,D as Iu,h as Ju,Pq as Ku};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{jg as a,kg as b,lg as c}from"./chunk-htkwc2se.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";export{b as run,a as encodeDir,c as ClaudeImport};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{Zf as E}from"./chunk-cjxcnhmq.js";import"./chunk-htkwc2se.js";import"./chunk-mqtqcc10.js";import"./chunk-b4ysd5b4.js";import"./chunk-ebabnv33.js";import"./chunk-nfg7nt13.js";import"./chunk-yj6rbe9p.js";import"./chunk-f77nxt23.js";import"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import{kQ as z}from"./chunk-4sazy0nq.js";var J={command:"generate",handler:async()=>{let A=await E.openapi();for(let q of Object.values(A.paths))for(let y of["get","post","put","delete","patch"]){let k=q[y];if(!k?.operationId)continue;k["x-codeSamples"]=[{lang:"js",source:['import { createQitQodeClient } from "@qitqode/sdk"',"","const client = createQitQodeClient()",`await client.${k.operationId}({`," ...","})"].join(`
3
- `)}]}let F=JSON.stringify(A,null,2),B=await import("./chunk-jgz1a29w.js"),C=await import("./chunk-kt0ej3nq.js"),D=await import("./chunk-w5940jxm.js"),G=await(B.format??B.default?.format)(F,{parser:"json",plugins:[C.default??C,D.default??D],printWidth:120});await new Promise((q,y)=>{process.stdout.write(G,(k)=>{if(k)y(k);else q()})})}};export{J as GenerateCommand};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Af as l}from"./chunk-8ywdddts.js";import"./chunk-zfnbk5gy.js";import{vg as q}from"./chunk-ebabnv33.js";import"./chunk-nfg7nt13.js";import"./chunk-yj6rbe9p.js";import{kQ as C}from"./chunk-4sazy0nq.js";function J(){return async(f,b)=>{if("_zod"in f)return l()(f,{components:b.components,options:{io:"input",...b.options}});try{let{createSchema:w}=await import("./chunk-swcgsrbj.js"),{schema:B,components:k}=w(f,{schemaType:"input",...b.options});if(k)b.components.schemas={...b.components.schemas,...k};return B}catch{throw Error(q('Missing dependencies "zod-openapi v4".'))}}}export{J as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Wd as a}from"./chunk-gg7bg3ek.js";import"./chunk-t01bhw5h.js";import"./chunk-8yr682pv.js";import"./chunk-v3x5nrc4.js";import"./chunk-4sazy0nq.js";export{a as fromIni};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var q="./tree-sitter-powershell-ryb2ffqs.wasm";export{q as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{kQ as t}from"./chunk-4sazy0nq.js";var e=await import("./chunk-wh7r96t3.js",{with:{type:"file"}}),a=e.default;export{a as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Pd as b}from"./chunk-9xvctnjr.js";import{Sf as t}from"./chunk-9s4whpg1.js";import{Xg as u}from"./chunk-w57j3pgz.js";import"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{gl as y,nk as m}from"./chunk-sy3n0qhc.js";import{El as v}from"./chunk-364ccew0.js";import{am as a}from"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import{UI as s}from"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";import{EOL as f}from"os";var M=b({command:"models [provider]",describe:"list all available models",builder:(r)=>{return r.positional("provider",{describe:"provider ID to filter models by",type:"string",array:!1}).option("verbose",{describe:"use more verbose model output (includes metadata like costs)",type:"boolean"}).option("refresh",{describe:"refresh the models cache from models.dev",type:"boolean"})},handler:async(r)=>{if(r.refresh)await v.refresh(!0),t.println(t.Style.TEXT_SUCCESS_BOLD+"Models cache refreshed"+t.Style.TEXT_NORMAL);await a.provide({directory:process.cwd(),async fn(){await u.runPromise(s.gen(function*(){let n=yield*(yield*y.Service).list(),l=(e,o)=>{let i=n[e],d=Object.entries(i.models).sort(([c],[p])=>c.localeCompare(p));for(let[c,p]of d)if(process.stdout.write(`${e}/${c}`),process.stdout.write(f),o)process.stdout.write(JSON.stringify(p,null,2)),process.stdout.write(f)};if(r.provider){let e=m.make(r.provider);if(!n[e]){yield*s.sync(()=>t.error(`Provider not found: ${r.provider}`));return}yield*s.sync(()=>l(e,r.verbose));return}let h=Object.keys(n).sort((e,o)=>{let i=e.startsWith("opencode"),d=o.startsWith("opencode");if(i&&!d)return-1;if(!i&&d)return 1;return e.localeCompare(o)});yield*s.sync(()=>{for(let e of h)l(m.make(e),r.verbose)})}))}})}});export{M as ModelsCommand};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var F="./tree-sitter-markdown-411r6y9b.wasm";export{F as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var t="./injections-73j83es3.scm";export{t as default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{qe as a}from"./chunk-8tp4whyw.js";import"./chunk-t01bhw5h.js";import"./chunk-8yr682pv.js";import"./chunk-v3x5nrc4.js";import"./chunk-4sazy0nq.js";export{a as fromProcess};
@@ -1,3 +0,0 @@
1
- // @bun
2
- import{M as o}from"./chunk-vftqwdpg.js";import{N as i}from"./chunk-132tcp2j.js";import{Cd as p}from"./chunk-37dvnent.js";import{Pd as n}from"./chunk-9xvctnjr.js";import{Sf as B}from"./chunk-9s4whpg1.js";import{Zf as l}from"./chunk-cjxcnhmq.js";import"./chunk-htkwc2se.js";import"./chunk-mqtqcc10.js";import"./chunk-b4ysd5b4.js";import"./chunk-ebabnv33.js";import"./chunk-nfg7nt13.js";import"./chunk-yj6rbe9p.js";import"./chunk-f77nxt23.js";import{Xg as g}from"./chunk-w57j3pgz.js";import{Jh as d}from"./chunk-ebkztnpf.js";import"./chunk-pxx2hz0g.js";import"./chunk-rexdr63q.js";import"./chunk-kqhh2pm9.js";import"./chunk-7fawtcnn.js";import"./chunk-mdzzcrf9.js";import"./chunk-wev34grp.js";import{gl as f}from"./chunk-sy3n0qhc.js";import"./chunk-364ccew0.js";import"./chunk-vdpd4akk.js";import"./chunk-yjp0btmq.js";import"./chunk-1bx2sjn6.js";import"./chunk-g5prcvq2.js";import"./chunk-t5tfppwv.js";import"./chunk-25bp7pcm.js";import"./chunk-qdcf1ay5.js";import"./chunk-45mjcxqk.js";import"./chunk-qqne79vp.js";import"./chunk-64s7vfj7.js";import{Op as D}from"./chunk-e03tgfpb.js";import"./chunk-gwfx7tx7.js";import"./chunk-1wpjmwnh.js";import"./chunk-cqtkxwd8.js";import"./chunk-ymtcm4xd.js";import"./chunk-yykjvt7f.js";import"./chunk-3mepk08v.js";import"./chunk-atpzz901.js";import"./chunk-0g25z230.js";import"./chunk-w9pdvcf9.js";import"./chunk-4gs87ghj.js";import"./chunk-brh35yt5.js";import"./chunk-vcrakhgy.js";import"./chunk-xdjwapwy.js";import{qt as I}from"./chunk-7dep7g7c.js";import"./chunk-tabcpx7t.js";import"./chunk-cx7p4ezk.js";import"./chunk-tgd5ctnt.js";import"./chunk-p8kpqyxb.js";import"./chunk-3sz6gw10.js";import"./chunk-xqwvx3qq.js";import"./chunk-qp9y0g73.js";import"./chunk-xyjehgzm.js";import{Bu as u,Ku as x}from"./chunk-j21dnncc.js";import{Vu as y}from"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-ev3a2sxv.js";import"./chunk-pnq1h5az.js";import"./chunk-4sazy0nq.js";import Q from"path";import{pathToFileURL as a}from"url";import{EOL as O}from"os";function $(j){let K=j.state;return{input:K.input,metadata:"metadata"in K?K.metadata:{},part:j}}function C(j){let K=j.description?B.Style.TEXT_DIM+` ${j.description}`+B.Style.TEXT_NORMAL:"";B.println(B.Style.TEXT_NORMAL+j.icon,B.Style.TEXT_NORMAL+j.title+K)}function b(j,K){if(B.empty(),C(j),!K?.trim())return;B.println(K),B.empty()}function c(j){let K=j.state,V="input"in K?K.input:void 0,Y=("title"in K&&K.title?K.title:void 0)||(V&&typeof V==="object"&&Object.keys(V).length>0?JSON.stringify(V):"Unknown");C({icon:"\u2699",title:`${j.tool} ${Y}`})}function t(j){let K=j.path??"",V=`${j.kind} "${j.pattern}"`,Y=K?`in ${T(K)}`:"",H=j.count===void 0?Y:`${Y}${Y?" \xB7 ":""}${j.count} ${j.count===1?"match":"matches"}`;C({icon:"\u2731",title:V,...H&&{description:H}})}function r(j){t({kind:"Glob",pattern:j.input.pattern,path:j.input.path,count:j.metadata.count})}function jj(j){t({kind:"Grep",pattern:j.input.pattern,path:j.input.path,count:j.metadata.matches})}function Bj(j){let K=T(j.input.filePath),V=Object.entries(j.input).filter(([H,S])=>{if(H==="filePath")return!1;return typeof S==="string"||typeof S==="number"||typeof S==="boolean"}),Y=V.length?`[${V.map(([H,S])=>`${H}=${S}`).join(", ")}]`:void 0;C({icon:"\u2192",title:`Read ${K}`,...Y&&{description:Y}})}function Gj(j){b({icon:"\u2190",title:`Write ${T(j.input.filePath)}`},j.part.state.status==="completed"?j.part.state.output:void 0)}function Jj(j){C({icon:"%",title:`WebFetch ${j.input.url}`})}function Kj(j){let K=T(j.input.filePath),V=j.metadata.diff;b({icon:"\u2190",title:`Edit ${K}`},V)}function Mj(j){C({icon:"\u25C7",title:`Exa Code Search "${j.input.query}"`})}function Nj(j){C({icon:"\u25C8",title:`Web Search "${j.input.query}"`})}function k(j){let K=j.part.state.input?.operation??j.part.state.input,V=j.part.state.status,Y=typeof K?.subagent_type==="string"&&K.subagent_type.trim().length>0?K.subagent_type:"unknown",H=I.titlecase(Y),S=typeof K?.description==="string"&&K.description.trim().length>0?K.description:void 0,w=V==="error"?"\u2717":V==="running"?"\u2022":"\u2713",L=S??`${H} Task`;C({icon:w,title:L,description:S?`${H} Agent`:void 0})}function Vj(j){C({icon:"\u2192",title:`Skill "${j.input.name}"`})}function Xj(j){let K=j.part.state.status==="completed"?j.part.state.output?.trim():void 0;b({icon:"$",title:`${j.input.command}`},K)}function T(j){if(!j)return"";if(Q.isAbsolute(j))return Q.relative(process.cwd(),j)||".";return j}var Tj=n({command:"run [message..]",describe:"run qitqode with a message",builder:(j)=>{return j.positional("message",{describe:"message to send",type:"string",array:!0,default:[]}).option("command",{describe:"the command to run, use message for args",type:"string"}).option("continue",{alias:["c"],describe:"continue the last session",type:"boolean"}).option("session",{alias:["s"],describe:"session id to continue",type:"string"}).option("fork",{describe:"fork the session before continuing (requires --continue or --session)",type:"boolean"}).option("share",{type:"boolean",describe:"share the session"}).option("model",{type:"string",alias:["m"],describe:"model to use in the format of provider/model"}).option("agent",{type:"string",describe:"agent to use"}).option("format",{type:"string",choices:["default","json"],default:"default",describe:"format: default (formatted) or json (raw JSON events)"}).option("file",{alias:["f"],type:"string",array:!0,describe:"file(s) to attach to message"}).option("title",{type:"string",describe:"title for the session (uses truncated prompt if no value provided)"}).option("attach",{type:"string",describe:"attach to a running qitqode server (e.g., http://localhost:4096)"}).option("password",{alias:["p"],type:"string",describe:"basic auth password (defaults to QITQODE_SERVER_PASSWORD)"}).option("dir",{type:"string",describe:"directory to run in, path on remote server if attaching"}).option("port",{type:"number",describe:"port for the local server (defaults to random port if no value provided)"}).option("variant",{type:"string",describe:"model variant (provider-specific reasoning effort, e.g., high, max, minimal)"}).option("thinking",{type:"boolean",describe:"show thinking blocks",default:!1}).option("dangerously-skip-permissions",{type:"boolean",describe:"auto-approve permissions that are not explicitly denied (dangerous!)",default:!1})},handler:async(j)=>{let K=[...j.message,...j["--"]||[]].join(" "),V=(()=>{if(!j.dir)return;if(j.attach)return j.dir;try{return process.chdir(j.dir),process.cwd()}catch{B.error("Failed to change directory to "+j.dir),process.exit(1)}})(),Y=[];if(j.file){let M=Array.isArray(j.file)?j.file:[j.file];for(let X of M){let N=Q.resolve(process.cwd(),X);if(!await y.exists(N))B.error(`File not found: ${X}`),process.exit(1);let W=await y.isDir(N)?"application/x-directory":"text/plain";Y.push({type:"file",url:a(N).href,filename:Q.basename(N),mime:W})}}if(!process.stdin.isTTY)K+=`
3
- `+await Bun.stdin.text();if(K.trim().length===0&&!j.command)B.error("You must provide a message or a command"),process.exit(1);if(j.fork&&!j.continue&&!j.session)B.error("--fork requires --continue or --session"),process.exit(1);let H=[{permission:"question",action:"deny",pattern:"*"},{permission:"plan_enter",action:"deny",pattern:"*"},{permission:"plan_exit",action:"deny",pattern:"*"}];function S(){if(j.title===void 0)return;if(j.title!=="")return j.title;return K.slice(0,50)+(K.length>50?"...":"")}async function w(M){let X=j.continue?(await M.session.list()).data?.find((Z)=>!Z.parentID)?.id:j.session;if(X&&j.fork)return(await M.session.fork({sessionID:X})).data?.id;if(X)return X;let N=S();return(await M.session.create({title:N,permission:H})).data?.id}async function L(M,X){let N=await M.config.get();if(!N.data)return;if(N.data.share!=="auto"&&!u.QITQODE_AUTO_SHARE&&!j.share)return;let W=await M.session.share({sessionID:X}).catch((Z)=>{if(Z instanceof Error&&Z.message.includes("disabled"))B.println(B.Style.TEXT_DANGER_BOLD+"! "+Z.message);return{error:Z}});if(!W.error&&"data"in W&&W.data?.share?.url)B.println(B.Style.TEXT_INFO_BOLD+"~ "+W.data.share.url)}async function h(M){function X(G){try{if(G.tool==="bash")return Xj($(G));if(G.tool==="glob")return r($(G));if(G.tool==="grep")return jj($(G));if(G.tool==="read")return Bj($(G));if(G.tool==="write")return Gj($(G));if(G.tool==="webfetch")return Jj($(G));if(G.tool==="edit")return Kj($(G));if(G.tool==="codesearch")return Mj($(G));if(G.tool==="websearch")return Nj($(G));if(G.tool==="actor")return k($(G));if(G.tool==="skill")return Vj($(G));return c(G)}catch{return c(G)}}function N(G,q){if(j.format==="json")return process.stdout.write(JSON.stringify({type:G,timestamp:Date.now(),sessionID:A,...q})+O),!0;return!1}let W=await M.event.subscribe(),Z;async function e(G){let q=new Map,z=x.create({service:"cli.run"}),E=W.stream[Symbol.asyncIterator](),F=G.completion.then(()=>"DONE");try{while(!0){let P=await Promise.race([E.next(),F]);if(P==="DONE")break;if(P.done)break;let _=P.value;if(G.onEvent(_),z.debug("event received",{type:_.type}),_.type==="message.updated"&&_.properties.info.role==="assistant"&&j.format!=="json"&&q.get("start")!==!0)B.empty(),B.println(`> ${_.properties.info.agent} \xB7 ${_.properties.info.modelID}`),B.empty(),q.set("start",!0);if(_.type==="message.part.updated"){let J=_.properties.part;if(J.sessionID!==A)continue;if(J.type==="tool"&&(J.state.status==="completed"||J.state.status==="error")){if(N("tool_use",{part:J}))continue;if(J.state.status==="completed"){X(J);continue}C({icon:"\u2717",title:`${J.tool} failed`}),B.error(J.state.error)}if(J.type==="tool"&&J.tool==="actor"&&J.state.status==="running"&&j.format!=="json"){if(q.get(J.id)===!0)continue;k($(J)),q.set(J.id,!0)}if(J.type==="step-start"){if(N("step_start",{part:J}))continue}if(J.type==="step-finish"){if(N("step_finish",{part:J}))continue}if(J.type==="text"&&J.time?.end){if(N("text",{part:J}))continue;let R=J.text.trim();if(!R)continue;if(!process.stdout.isTTY){process.stdout.write(R+O);continue}B.empty(),B.println(R),B.empty()}if(J.type==="reasoning"&&J.time?.end&&j.thinking){if(N("reasoning",{part:J}))continue;let R=J.text.trim();if(!R)continue;let U=`Thinking: ${R}`;if(process.stdout.isTTY){B.empty(),B.println(`${B.Style.TEXT_DIM}\x1B[3m${U}\x1B[0m${B.Style.TEXT_NORMAL}`),B.empty();continue}process.stdout.write(U+O)}}if(_.type==="session.error"){let J=_.properties;if(J.sessionID!==A||!J.error)continue;let R=String(J.error.name);if("data"in J.error&&J.error.data&&"message"in J.error.data)R=String(J.error.data.message);if(Z=Z?Z+O+R:R,N("error",{error:J.error}))continue;B.error(R)}if(_.type==="permission.asked"){let J=_.properties;if(J.sessionID!==A)continue;if(j["dangerously-skip-permissions"])await M.permission.reply({requestID:J.id,reply:"once"});else B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL+`permission requested: ${J.permission} (${J.patterns.join(", ")}); auto-rejecting`),await M.permission.reply({requestID:J.id,reply:"reject"})}}}finally{G.stop(),await E.return?.(void 0).catch(()=>{})}}let v=await(async()=>{if(!j.agent)return;let G=j.agent;if(j.attach){let z=await M.app.agents(void 0,{throwOnError:!0}).then((F)=>F.data??[]).catch(()=>{return});if(!z){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`failed to list agents from ${j.attach}. Falling back to default agent`);return}let E=z.find((F)=>F.name===G);if(!E){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" not found. Falling back to default agent`);return}if(E.mode==="subagent"){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" is a subagent, not a primary agent. Falling back to default agent`);return}return G}let q=await g.runPromise(d.Service.use((z)=>z.get(G)));if(!q){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" not found. Falling back to default agent`);return}if(q.mode==="subagent"){B.println(B.Style.TEXT_WARNING_BOLD+"!",B.Style.TEXT_NORMAL,`agent "${G}" is a subagent, not a primary agent. Falling back to default agent`);return}return G})(),A=await w(M);if(!A)B.error("Session not found"),process.exit(1);await L(M,A);let s=x.create({service:"cli.run.poll"}),m=o({sessionID:A,query:async()=>{try{return(await M.session.status()).data?.[A]}catch(G){throw s.debug("session.status query failed",{error:G}),G}}});if(e(m).catch((G)=>{console.error(G),process.exit(1)}),j.command)await M.session.command({sessionID:A,agent:v,model:j.model,command:j.command,arguments:K,variant:j.variant});else{let G=j.model?f.parseModel(j.model):void 0;await M.session.prompt({sessionID:A,agent:v,model:G,variant:j.variant,parts:[...Y,{type:"text",text:K}]})}m.markStarted()}if(j.attach){let M=i({password:j.password}),X=D({baseUrl:j.attach,directory:V,headers:M});return await h(X)}await p(process.cwd(),async()=>{let X=D({baseUrl:"http://qitqode.internal",fetch:async(N,W)=>{let Z=new Request(N,W);return l.Default().app.fetch(Z)}});await h(X)})}});export{Tj as RunCommand};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import{Cu as a,Du as b,Eu as c,Fu as d,Gu as e,Hu as f,Iu as g,Ju as h}from"./chunk-j21dnncc.js";import"./chunk-vc4e6xc4.js";import"./chunk-hnz570f9.js";import"./chunk-tdmn21z0.js";import"./chunk-s8mghr5a.js";import"./chunk-pqnbdygz.js";import"./chunk-ydc6ypjt.js";import"./chunk-4sazy0nq.js";export{g as redactValue,e as init,f as flush,d as file,b as enabled,h as create,a as Level,c as Default};
@@ -1,2 +0,0 @@
1
- // @bun
2
- import"./chunk-4sazy0nq.js";var k="./opentui-drfwd3v7.dll";export{k as default};