thursday-agent 0.1.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (573) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +5 -1
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +5 -5
  5. package/.next/routes-manifest.json +27 -3
  6. package/.next/server/app/_global-error/page.js +2 -2
  7. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  8. package/.next/server/app/_global-error.html +1 -1
  9. package/.next/server/app/_global-error.rsc +2 -2
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +2 -2
  12. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/server/app/_not-found/page.js +2 -2
  14. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  15. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  16. package/.next/server/app/_not-found.html +1 -1
  17. package/.next/server/app/_not-found.rsc +14 -14
  18. package/.next/server/app/_not-found.segments/_full.segment.rsc +14 -14
  19. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +12 -12
  20. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  21. package/.next/server/app/api/artifact/route.js +3 -3
  22. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/memory/files/route/app-paths-manifest.json +3 -0
  24. package/.next/server/app/api/bot/memory/files/route.js +10 -0
  25. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -0
  26. package/.next/server/app/api/bot/memory/files/route_client-reference-manifest.js +3 -0
  27. package/.next/server/app/api/bot/memory/route/app-paths-manifest.json +3 -0
  28. package/.next/server/app/api/bot/memory/route/build-manifest.json +12 -0
  29. package/.next/server/app/api/bot/memory/route/server-reference-manifest.json +4 -0
  30. package/.next/server/app/api/bot/memory/route.js +14 -0
  31. package/.next/server/app/api/bot/memory/route.js.map +5 -0
  32. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -0
  33. package/.next/server/app/api/bot/memory/route_client-reference-manifest.js +3 -0
  34. package/.next/server/app/api/bot/route.js +7 -7
  35. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  36. package/.next/server/app/api/bot/task/[id]/route.js +9 -9
  37. package/.next/server/app/api/bot/task/[id]/route.js.nft.json +1 -1
  38. package/.next/server/app/api/bot/task/route.js +8 -8
  39. package/.next/server/app/api/bot/task/route.js.nft.json +1 -1
  40. package/.next/server/app/api/config/route.js +6 -6
  41. package/.next/server/app/api/config/route.js.nft.json +1 -1
  42. package/.next/server/app/api/events/route.js +4 -5
  43. package/.next/server/app/api/events/route.js.nft.json +1 -1
  44. package/.next/server/app/api/file/[...path]/route.js +3 -3
  45. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  46. package/.next/server/app/api/llm-model/catalog/route.js +10 -9
  47. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  48. package/.next/server/app/api/llm-model/credits/route/app-paths-manifest.json +3 -0
  49. package/.next/server/app/api/llm-model/credits/route/build-manifest.json +12 -0
  50. package/.next/server/app/api/llm-model/credits/route/server-reference-manifest.json +4 -0
  51. package/.next/server/app/api/llm-model/credits/route.js +16 -0
  52. package/.next/server/app/api/llm-model/credits/route.js.map +5 -0
  53. package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -0
  54. package/.next/server/app/api/llm-model/credits/route_client-reference-manifest.js +3 -0
  55. package/.next/server/app/api/llm-model/route.js +10 -8
  56. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  57. package/.next/server/app/api/llm-model/subscription/route/app-paths-manifest.json +3 -0
  58. package/.next/server/app/api/llm-model/subscription/route/build-manifest.json +12 -0
  59. package/.next/server/app/api/llm-model/subscription/route/server-reference-manifest.json +4 -0
  60. package/.next/server/app/api/llm-model/subscription/route.js +15 -0
  61. package/.next/server/app/api/llm-model/subscription/route.js.map +5 -0
  62. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -0
  63. package/.next/server/app/api/llm-model/subscription/route_client-reference-manifest.js +3 -0
  64. package/.next/server/app/api/mcp/[name]/route.js +5 -5
  65. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  66. package/.next/server/app/api/mcp/oauth/callback/route.js +6 -6
  67. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  68. package/.next/server/app/api/mcp/route.js +5 -5
  69. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  70. package/.next/server/app/api/mcp/tools/route.js +5 -5
  71. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  72. package/.next/server/app/api/memory/edit/route/app-paths-manifest.json +3 -0
  73. package/.next/server/app/api/memory/edit/route/build-manifest.json +12 -0
  74. package/.next/server/app/api/memory/edit/route/server-reference-manifest.json +4 -0
  75. package/.next/server/app/api/memory/edit/route.js +24 -0
  76. package/.next/server/app/api/memory/edit/route.js.map +5 -0
  77. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -0
  78. package/.next/server/app/api/memory/{tidy → edit}/route_client-reference-manifest.js +1 -1
  79. package/.next/server/app/api/memory/route.js +7 -8
  80. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  81. package/.next/server/app/api/skills/[source]/[name]/route.js +3 -3
  82. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  83. package/.next/server/app/api/skills/route.js +3 -3
  84. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  85. package/.next/server/app/api/thursday/call/route.js +9 -7
  86. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  87. package/.next/server/app/api/thursday/skills/route.js +9 -7
  88. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  89. package/.next/server/app/api/thursday/tool-call/route.js +16 -15
  90. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  91. package/.next/server/app/api/workspace/route.js +4 -5
  92. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  93. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  94. package/.next/server/app/artifact/[...path]/page.js +5 -6
  95. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  96. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  97. package/.next/server/app/favicon.ico/route.js +3 -4
  98. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  99. package/.next/server/app/favicon.ico.body +0 -0
  100. package/.next/server/app/page/server-reference-manifest.json +66 -77
  101. package/.next/server/app/page.js +11 -11
  102. package/.next/server/app/page.js.nft.json +1 -1
  103. package/.next/server/app/page_client-reference-manifest.js +1 -1
  104. package/.next/server/app-paths-manifest.json +5 -1
  105. package/.next/server/chunks/[externals]__0dzuk6_._.js +3 -0
  106. package/.next/server/chunks/[root-of-the-server]__01dkp4a._.js +3 -0
  107. package/.next/server/chunks/[root-of-the-server]__02va5wz._.js +3 -0
  108. package/.next/server/chunks/[root-of-the-server]__02xjoto._.js +3 -0
  109. package/.next/server/chunks/[root-of-the-server]__04q--0f._.js +8 -0
  110. package/.next/server/chunks/[root-of-the-server]__0bl-e63._.js +3 -0
  111. package/.next/server/chunks/[root-of-the-server]__0ce8nf8._.js +5 -0
  112. package/.next/server/chunks/[root-of-the-server]__0ffbg85._.js +3 -0
  113. package/.next/server/chunks/[root-of-the-server]__0j7z0r3._.js +12 -0
  114. package/.next/server/chunks/[root-of-the-server]__0jq4ohy._.js +8 -0
  115. package/.next/server/chunks/[root-of-the-server]__0ls6_8y._.js +8 -0
  116. package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +3 -0
  117. package/.next/server/chunks/[root-of-the-server]__0pa2n68._.js +3 -0
  118. package/.next/server/chunks/[root-of-the-server]__0q0vvt2._.js +5 -0
  119. package/.next/server/chunks/[root-of-the-server]__1-ga0kh._.js +5 -0
  120. package/.next/server/chunks/[root-of-the-server]__11n256_._.js +5 -0
  121. package/.next/server/chunks/[root-of-the-server]__12cabg9._.js +3 -0
  122. package/.next/server/chunks/[root-of-the-server]__1339jnv._.js +8 -0
  123. package/.next/server/chunks/[root-of-the-server]__15bjnu5._.js +5 -0
  124. package/.next/server/chunks/[root-of-the-server]__18_teo8._.js +8 -0
  125. package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +5 -0
  126. package/.next/server/chunks/[root-of-the-server]__1anc1p9._.js +3 -0
  127. package/.next/server/chunks/[root-of-the-server]__1ccon1w._.js +10 -0
  128. package/.next/server/chunks/[root-of-the-server]__1fizn31._.js +3 -0
  129. package/.next/server/chunks/[root-of-the-server]__1llj3-b._.js +3 -0
  130. package/.next/server/chunks/[root-of-the-server]__1orn-5b._.js +11 -0
  131. package/.next/server/chunks/[root-of-the-server]__1p8m3f4._.js +3 -0
  132. package/.next/server/chunks/[root-of-the-server]__1wa1k7r._.js +8 -0
  133. package/.next/server/chunks/{_1hzrsvg._.js → _0-73of8._.js} +6 -6
  134. package/.next/server/chunks/{_1cbk7ms._.js → _0-fjql4._.js} +10 -10
  135. package/.next/server/chunks/_00xh_q0._.js +27 -0
  136. package/.next/server/chunks/{_0y8is-s._.js → _03a0897._.js} +1 -1
  137. package/.next/server/chunks/{_0pppbb5._.js → _03kp0jp._.js} +166 -35
  138. package/.next/server/chunks/_051qh8u._.js +3 -0
  139. package/.next/server/chunks/{node_modules_next_04q-o58._.js → _05dla15._.js} +2 -2
  140. package/.next/server/chunks/_05h2cii._.js +1 -1
  141. package/.next/server/chunks/_0c9j6rb._.js +49 -0
  142. package/.next/server/chunks/_0fzqt2y._.js +74 -44
  143. package/.next/server/chunks/{_0kl37zl._.js → _0ioz3nd._.js} +1 -1
  144. package/.next/server/chunks/_0iwfby5._.js +3 -0
  145. package/.next/server/chunks/{_0hin38_._.js → _0khihjk._.js} +5 -5
  146. package/.next/server/chunks/_0mecv0f._.js +26 -0
  147. package/.next/server/chunks/_0mh8j4m._.js +3 -0
  148. package/.next/server/chunks/{_1icgbi8._.js → _0n74zsf._.js} +2 -2
  149. package/.next/server/chunks/_0obojvv._.js +3 -0
  150. package/.next/server/chunks/_0recufk._.js +49 -0
  151. package/.next/server/chunks/{_1t8fv7b._.js → _0rnf-6n._.js} +2 -2
  152. package/.next/server/chunks/_0sb7tlz._.js +3 -0
  153. package/.next/server/chunks/{_0jgm3b8._.js → _0u10wmw._.js} +6 -6
  154. package/.next/server/chunks/{_12nr4xc._.js → _0u4aiy2._.js} +2 -2
  155. package/.next/server/chunks/_0wp4le3._.js +1 -1
  156. package/.next/server/chunks/_0y5fg-x._.js +1 -1
  157. package/.next/server/chunks/_1230wbx._.js +10 -0
  158. package/.next/server/chunks/_12nheja._.js +3 -0
  159. package/.next/server/chunks/_13510xh._.js +3 -0
  160. package/.next/server/chunks/_15hq89o._.js +1 -1
  161. package/.next/server/chunks/_17l5ygt._.js +49 -0
  162. package/.next/server/chunks/{_0ks6_sg._.js → _18-1wcc._.js} +6 -6
  163. package/.next/server/chunks/_1_5mnq4._.js +18 -0
  164. package/.next/server/chunks/{_0tzfesa._.js → _1_9mjx-._.js} +1 -1
  165. package/.next/server/chunks/_1d0j961._.js +6 -0
  166. package/.next/server/chunks/_1d5zmy8._.js +1 -1
  167. package/.next/server/chunks/_1drgfx4._.js +18 -0
  168. package/.next/server/chunks/{_1skgy7b._.js → _1e48czp._.js} +5 -5
  169. package/.next/server/chunks/_1f46eie._.js +3 -0
  170. package/.next/server/chunks/_1h5_8sk._.js +3 -0
  171. package/.next/server/chunks/_1hdnxb7._.js +3 -0
  172. package/.next/server/chunks/_1j8k_j5._.js +3 -0
  173. package/.next/server/chunks/{_10qam6o._.js → _1kg70wc._.js} +5 -5
  174. package/.next/server/chunks/_1krd9rf._.js +3 -0
  175. package/.next/server/chunks/_1nc0eui._.js +11 -0
  176. package/.next/server/chunks/_1nula3v._.js +3 -0
  177. package/.next/server/chunks/_1pf4qe-._.js +3 -0
  178. package/.next/server/chunks/_1php4eq._.js +1 -1
  179. package/.next/server/chunks/_1qxheoa._.js +3 -0
  180. package/.next/server/chunks/_1x6kd1r._.js +3 -0
  181. package/.next/server/chunks/_1yuv4vp._.js +1 -1
  182. package/.next/server/chunks/_1zjrdag._.js +3 -0
  183. package/.next/server/chunks/_next-internal_server_app_api_bot_memory_files_route_actions_1_xd_8f.js +3 -0
  184. package/.next/server/chunks/_next-internal_server_app_api_bot_memory_route_actions_1a8xfr7.js +3 -0
  185. package/.next/server/chunks/_next-internal_server_app_api_llm-model_credits_route_actions_0v424pb.js +3 -0
  186. package/.next/server/chunks/_next-internal_server_app_api_llm-model_subscription_route_actions_0-udcm5.js +3 -0
  187. package/.next/server/chunks/_next-internal_server_app_api_memory_edit_route_actions_02sfnmr.js +3 -0
  188. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  189. package/.next/server/chunks/features_0rpfxbk._.js +3 -0
  190. package/.next/server/chunks/features_1qf3cei._.js +3 -0
  191. package/.next/server/chunks/features_bot_0zt92oh._.js +3 -0
  192. package/.next/server/chunks/features_bot_bot_query_ts_12mgkl2._.js +1 -1
  193. package/.next/server/chunks/features_memory_1uqvksn._.js +6 -0
  194. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0tf290y._.js → node_modules_consola_dist_chunks_prompt_mjs_0i7cvml._.js} +1 -1
  195. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0228f43._.js → node_modules_consola_dist_chunks_prompt_mjs_0icqaqw._.js} +1 -1
  196. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0ir-vo2._.js → node_modules_consola_dist_chunks_prompt_mjs_0j61-ma._.js} +1 -1
  197. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0otw8ef._.js → node_modules_consola_dist_chunks_prompt_mjs_0r28-sm._.js} +1 -1
  198. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0v_7drq._.js +3 -0
  199. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_11zjo-1._.js +3 -0
  200. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1pycqsq._.js +3 -0
  201. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1xoq2rl._.js +3 -0
  202. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y49572._.js +3 -0
  203. package/.next/server/chunks/ssr/[externals]__0dizgek._.js +3 -0
  204. package/.next/server/chunks/ssr/[root-of-the-server]__09q9med._.js +1 -1
  205. package/.next/server/chunks/ssr/[root-of-the-server]__0_69wqr._.js +3 -0
  206. package/.next/server/chunks/ssr/[root-of-the-server]__0hg5gib._.js +1 -1
  207. package/.next/server/chunks/ssr/[root-of-the-server]__0i8ie7f._.js +3 -0
  208. package/.next/server/chunks/ssr/{[root-of-the-server]__0jsmmb-._.js → [root-of-the-server]__0mz33a7._.js} +1 -1
  209. package/.next/server/chunks/ssr/[root-of-the-server]__0tbkdlx._.js +3 -0
  210. package/.next/server/chunks/ssr/[root-of-the-server]__0vnmv-s._.js +3 -0
  211. package/.next/server/chunks/ssr/{[root-of-the-server]__0f6s48x._.js → [root-of-the-server]__0xpcv9w._.js} +3 -3
  212. package/.next/server/chunks/ssr/[root-of-the-server]__0xtssj3._.js +1 -1
  213. package/.next/server/chunks/ssr/[root-of-the-server]__0zkv7z_._.js +3 -0
  214. package/.next/server/chunks/ssr/[root-of-the-server]__10-dz5o._.js +57 -0
  215. package/.next/server/chunks/ssr/[root-of-the-server]__15_uhip._.js +3 -0
  216. package/.next/server/chunks/ssr/[root-of-the-server]__16jc196._.js +1 -1
  217. package/.next/server/chunks/ssr/[root-of-the-server]__1cyjywu._.js +3 -0
  218. package/.next/server/chunks/ssr/[root-of-the-server]__1eh7hid._.js +3 -0
  219. package/.next/server/chunks/ssr/[root-of-the-server]__1gtlw6v._.js +43 -0
  220. package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +1 -1
  221. package/.next/server/chunks/ssr/[root-of-the-server]__1ox7hbk._.js +4 -0
  222. package/.next/server/chunks/ssr/[root-of-the-server]__1pduf5n._.js +3 -0
  223. package/.next/server/chunks/ssr/{_1mznrxk._.js → _001_ms1._.js} +3 -3
  224. package/.next/server/chunks/ssr/_01_6m32._.js +3 -0
  225. package/.next/server/chunks/ssr/_01n3o0m._.js +3 -0
  226. package/.next/server/chunks/ssr/_07uchnc._.js +3 -0
  227. package/.next/server/chunks/ssr/_0ap2fzn._.js +3 -0
  228. package/.next/server/chunks/ssr/_0c-ql2m._.js +3 -0
  229. package/.next/server/chunks/ssr/_0h42fze._.js +3 -0
  230. package/.next/server/chunks/ssr/_0h7zdni._.js +1 -1
  231. package/.next/server/chunks/ssr/_0i_6q1w._.js +41 -0
  232. package/.next/server/chunks/ssr/_0kbkmar._.js +3 -0
  233. package/.next/server/chunks/ssr/_0lu1n_x._.js +3 -0
  234. package/.next/server/chunks/ssr/{_077-g6s._.js → _0mb8zc8._.js} +3 -3
  235. package/.next/server/chunks/ssr/_0mo2w06._.js +3 -0
  236. package/.next/server/chunks/ssr/{_13punpm._.js → _0q0zan6._.js} +2 -2
  237. package/.next/server/chunks/ssr/{_0gd4vaa._.js → _0u2jv_x._.js} +94 -58
  238. package/.next/server/chunks/ssr/_0y0tiht._.js +4 -0
  239. package/.next/server/chunks/ssr/_0zhoc3r._.js +3 -0
  240. package/.next/server/chunks/ssr/_1-teee5._.js +3 -3
  241. package/.next/server/chunks/ssr/_13fke0x._.js +3 -0
  242. package/.next/server/chunks/ssr/{_0q_2f2x._.js → _13z3f85._.js} +2 -2
  243. package/.next/server/chunks/ssr/_14_lw10._.js +3 -0
  244. package/.next/server/chunks/ssr/_15j2_8f._.js +3 -0
  245. package/.next/server/chunks/ssr/{_0lc_7c8._.js → _1eoqg_g._.js} +2 -2
  246. package/.next/server/chunks/ssr/_1sji22n._.js +3 -0
  247. package/.next/server/chunks/ssr/_1spzm8z._.js +3 -0
  248. package/.next/server/chunks/ssr/{_19_o9d-._.js → _1vi_uo7._.js} +2 -2
  249. package/.next/server/chunks/ssr/_1vyd1ji._.js +3 -0
  250. package/.next/server/chunks/ssr/_1xvgn77._.js +3 -0
  251. package/.next/server/chunks/ssr/_20kd_n0._.js +42 -0
  252. package/.next/server/chunks/ssr/features_bot_1s_-2vj._.js +3 -0
  253. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
  254. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  255. package/.next/server/chunks/ssr/lib_date-like_ts_02is0pw._.js +3 -0
  256. package/.next/server/chunks/ssr/lib_realtime_12wg_dd._.js +27 -0
  257. package/.next/server/chunks/ssr/lib_realtime_15h_v1v._.js +27 -0
  258. package/.next/server/chunks/ssr/{node_modules_1d-is1o._.js → node_modules_063xwpp._.js} +1 -1
  259. package/.next/server/chunks/ssr/{node_modules_1ub40gk._.js → node_modules_0bvraul._.js} +1 -1
  260. package/.next/server/chunks/ssr/{node_modules_1nhw9qg._.js → node_modules_0eu1va6._.js} +1 -1
  261. package/.next/server/chunks/ssr/{node_modules_0xwx4u-._.js → node_modules_0h50b8n._.js} +1 -1
  262. package/.next/server/chunks/ssr/{node_modules_043-236._.js → node_modules_0h5hnr1._.js} +1 -1
  263. package/.next/server/chunks/ssr/{node_modules_1t0y5jt._.js → node_modules_0h7u60n._.js} +1 -1
  264. package/.next/server/chunks/ssr/{node_modules_1k29j1j._.js → node_modules_0lm7_vm._.js} +1 -1
  265. package/.next/server/chunks/ssr/{node_modules_16i4o_3._.js → node_modules_0mwym0g._.js} +1 -1
  266. package/.next/server/chunks/ssr/{node_modules_1y8_3vg._.js → node_modules_0rjg6t1._.js} +1 -1
  267. package/.next/server/chunks/ssr/node_modules_0x3-ply._.js +3 -0
  268. package/.next/server/chunks/ssr/{node_modules_108wd2o._.js → node_modules_0y_cded._.js} +1 -1
  269. package/.next/server/chunks/ssr/{node_modules_1jatz7w._.js → node_modules_0z5tsu8._.js} +1 -1
  270. package/.next/server/chunks/ssr/{node_modules_0ls96je._.js → node_modules_0zp9r92._.js} +1 -1
  271. package/.next/server/chunks/ssr/{node_modules_06kvvuo._.js → node_modules_1-hc6uv._.js} +1 -1
  272. package/.next/server/chunks/ssr/{node_modules_1_588_4._.js → node_modules_113tz0l._.js} +1 -1
  273. package/.next/server/chunks/ssr/{node_modules_0ipn1ho._.js → node_modules_124bue5._.js} +1 -1
  274. package/.next/server/chunks/ssr/node_modules_17bwo43._.js +55 -0
  275. package/.next/server/chunks/ssr/{node_modules_0_j7-g4._.js → node_modules_1_n3ztw._.js} +1 -1
  276. package/.next/server/chunks/ssr/{node_modules_20ynonm._.js → node_modules_1bc7gu8._.js} +1 -1
  277. package/.next/server/chunks/ssr/{node_modules_1hn_sd5._.js → node_modules_1bgb6-f._.js} +1 -1
  278. package/.next/server/chunks/ssr/{node_modules_0bue6gy._.js → node_modules_1h4a4pp._.js} +1 -1
  279. package/.next/server/chunks/ssr/{node_modules_0fbw5-u._.js → node_modules_1i7u1ia._.js} +1 -1
  280. package/.next/server/chunks/ssr/{node_modules_1ee8gav._.js → node_modules_1juq3hs._.js} +1 -1
  281. package/.next/server/chunks/ssr/{node_modules_0_fvxnt._.js → node_modules_1l0qtdu._.js} +1 -1
  282. package/.next/server/chunks/ssr/{node_modules_13f2md6._.js → node_modules_1t9cyee._.js} +1 -1
  283. package/.next/server/chunks/ssr/{node_modules_0y2-av4._.js → node_modules_1uuj9x1._.js} +1 -1
  284. package/.next/server/chunks/ssr/{node_modules_00d6675._.js → node_modules_1vqb6po._.js} +1 -1
  285. package/.next/server/chunks/ssr/{node_modules_1v0077l._.js → node_modules_1xx28h1._.js} +1 -1
  286. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_092s8nx._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0d3skpl._.js} +1 -1
  287. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1nvexgu._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0i44kk5._.js} +1 -1
  288. package/.next/server/chunks/ssr/node_modules_@vercel_oidc_dist_0qe30a_._.js +3 -0
  289. package/.next/server/chunks/ssr/node_modules_consola_dist_chunks_prompt_mjs_05cwqv2._.js +47 -0
  290. package/.next/server/chunks/ssr/{node_modules_next_dist_0w6mzq5._.js → node_modules_next_dist_0drixxt._.js} +4 -4
  291. package/.next/server/chunks/ssr/node_modules_next_dist_1n3w9lb._.js +2 -2
  292. package/.next/server/instrumentation.js +1 -1
  293. package/.next/server/middleware-build-manifest.js +3 -3
  294. package/.next/server/pages/404.html +1 -1
  295. package/.next/server/pages/500.html +1 -1
  296. package/.next/server/server-reference-manifest.js +1 -1
  297. package/.next/server/server-reference-manifest.json +67 -78
  298. package/.next/static/chunks/{31ttnjt6g35a0.js → 0ev4hyghq0mbb.js} +1 -1
  299. package/.next/static/chunks/0r5qcctujhxli.js +1 -0
  300. package/.next/static/chunks/0tmgrnlje14-s.js +3 -0
  301. package/.next/static/chunks/0x79tx04dxbpp.js +1 -0
  302. package/.next/static/chunks/0xzgvc0fkdb6t.js +1 -0
  303. package/.next/static/chunks/10teww7wt-f6h.js +1 -0
  304. package/.next/static/chunks/14hgtsjg-kael.css +1 -0
  305. package/.next/static/chunks/17donp69y4do7.js +40 -0
  306. package/.next/static/chunks/1dkjg87pxk0n9.js +28 -0
  307. package/.next/static/chunks/1ekc7ul556kbl.js +1 -0
  308. package/.next/static/chunks/{1khakdu_iuedc.js → 1grhjo7a5a0_-.js} +1 -1
  309. package/.next/static/chunks/1kq8h8wi_e0bc.js +53 -0
  310. package/.next/static/chunks/1okqiww3pnwka.js +1 -0
  311. package/.next/static/chunks/26-pr2c9ro222.js +1 -0
  312. package/.next/static/chunks/{2ihkf6l2jowo9.js → 280t0_e99i276.js} +3 -3
  313. package/.next/static/chunks/28cizcdaabd4h.js +1 -0
  314. package/.next/static/chunks/2a0k6jlq0_v1u.js +2 -0
  315. package/.next/static/chunks/2fzs9fm8yarvq.js +1 -0
  316. package/.next/static/chunks/2h0sd2vumhb15.js +1 -0
  317. package/.next/static/chunks/2hw2f6zmt7fmt.js +1 -0
  318. package/.next/static/chunks/2t4vhi3m8ahya.js +1 -0
  319. package/.next/static/chunks/2tigdtz3dpcy8.js +1 -0
  320. package/.next/static/chunks/3111pj5wnjgos.js +1 -0
  321. package/.next/static/chunks/3786h5vayt80-.js +28 -0
  322. package/.next/static/chunks/{3aquirz5h71da.js → 3agpgkwaa321p.js} +1 -1
  323. package/.next/static/chunks/3cfi_q6d_wtci.js +1 -0
  324. package/.next/static/chunks/3ok9_x74rip3v.js +1 -0
  325. package/.next/static/chunks/3xk7yqgomx7yq.js +1 -0
  326. package/.next/static/chunks/3xpbkl66ssib5.js +38 -0
  327. package/.next/static/media/favicon.37o1pjldwi2uc.ico +0 -0
  328. package/README.md +6 -4
  329. package/app/api/bot/memory/files/route.ts +14 -0
  330. package/app/api/bot/memory/route.ts +5 -0
  331. package/app/api/events/app-event.client.ts +24 -0
  332. package/app/api/events/app-event.server.ts +45 -0
  333. package/app/api/events/app-event.ts +42 -0
  334. package/app/api/llm-model/catalog/route.ts +12 -0
  335. package/app/api/llm-model/credits/route.ts +11 -0
  336. package/app/api/llm-model/route.ts +26 -0
  337. package/app/api/llm-model/subscription/route.ts +11 -0
  338. package/app/api/memory/edit/route.ts +7 -0
  339. package/app/api/memory/route.ts +21 -0
  340. package/app/api/query-key.ts +159 -0
  341. package/app/api/thursday/tool-call/route.ts +67 -0
  342. package/bin/thursday.mjs +3 -0
  343. package/components/ui/button-group.tsx +45 -0
  344. package/components/ui/custom-icon.tsx +259 -0
  345. package/components/ui/dropdown-menu.tsx +271 -0
  346. package/components/ui/folded-text.tsx +68 -0
  347. package/components/ui/input-group.tsx +157 -0
  348. package/components/ui/json-view.tsx +240 -0
  349. package/components/ui/shiny-text.tsx +55 -0
  350. package/components/ui/text-type.tsx +213 -0
  351. package/components/ui/theme-sync.tsx +9 -0
  352. package/database/migrations/{20260908030742_rainy_marvel_zombies → 20260910173049_numerous_spirit}/migration.sql +30 -33
  353. package/database/migrations/{20260908030742_rainy_marvel_zombies → 20260910173049_numerous_spirit}/snapshot.json +124 -145
  354. package/database/migrations/20260911030320_opposite_jack_power/migration.sql +1 -0
  355. package/database/migrations/20260911030320_opposite_jack_power/snapshot.json +1158 -0
  356. package/docs/how-it-works.md +59 -0
  357. package/docs/images/keeps-going.png +0 -0
  358. package/docs/images/task-thread.png +0 -0
  359. package/docs/images/two-minds.png +0 -0
  360. package/features/ai/chatgpt.ts +617 -0
  361. package/features/ai/components/chatgpt-sign-in.tsx +66 -0
  362. package/features/ai/components/model-picker.tsx +17 -1
  363. package/features/ai/components/provider-icon.tsx +1 -0
  364. package/features/ai/load-tools.ts +105 -39
  365. package/features/ai/model.schema.ts +232 -34
  366. package/features/ai/model.ts +169 -24
  367. package/features/ai/prompts/bot.prompt.ts +245 -59
  368. package/features/ai/prompts/memory-edit.prompt.ts +33 -0
  369. package/features/ai/prompts/prompt-helper.ts +75 -30
  370. package/features/ai/prompts/thursday.prompt.ts +42 -17
  371. package/features/ai/tools/bot.tool.ts +32 -30
  372. package/features/ai/tools/connected.ts +17 -4
  373. package/features/ai/tools/mcp.tool.ts +5 -5
  374. package/features/ai/tools/memory.tool.ts +142 -74
  375. package/features/ai/tools/search.tool.ts +136 -47
  376. package/features/ai/tools/studio.tool.ts +5 -5
  377. package/features/ai/tools/tool-name.ts +2 -3
  378. package/features/ai/tools/workspace.tool.ts +33 -4
  379. package/features/bot/bot.action.ts +24 -7
  380. package/features/bot/bot.memory.ts +89 -0
  381. package/features/bot/bot.query.ts +41 -6
  382. package/features/bot/bot.run.ts +516 -210
  383. package/features/bot/bot.runner.ts +463 -93
  384. package/features/bot/bot.schema.ts +84 -7
  385. package/features/bot/bot.seed.ts +89 -16
  386. package/features/bot/components/bot-mark.tsx +122 -20
  387. package/features/bot/components/bot-room.tsx +519 -391
  388. package/features/bot/components/bot-setting.tsx +832 -341
  389. package/features/bot/components/bot-tool.tsx +2 -6
  390. package/features/bot/components/mark-palette.tsx +54 -0
  391. package/features/bot/components/path-chips.tsx +1 -1
  392. package/features/bot/components/task-badge.tsx +26 -6
  393. package/features/bot/components/task-reply.tsx +22 -33
  394. package/features/bot/components/task-setting.tsx +20 -17
  395. package/features/bot/task.query.ts +233 -33
  396. package/features/bot/task.store.ts +53 -9
  397. package/features/config/components/config-setting.tsx +265 -34
  398. package/features/config/components/models-badge.tsx +42 -0
  399. package/features/config/config.action.ts +12 -0
  400. package/features/config/config.const.ts +38 -2
  401. package/features/connectors/mcp.manager.ts +10 -2
  402. package/features/intro/components/intro.tsx +47 -46
  403. package/features/memory/components/memory-edit.tsx +338 -0
  404. package/features/memory/components/memory-setting.tsx +86 -79
  405. package/features/memory/memory.action.ts +3 -43
  406. package/features/memory/memory.edit.ts +87 -0
  407. package/features/memory/memory.query.ts +33 -44
  408. package/features/memory/memory.schema.ts +50 -97
  409. package/features/settings/components/settings.tsx +2 -0
  410. package/features/settings/settings.alert.ts +3 -1
  411. package/features/skills/components/skills-setting.tsx +9 -1
  412. package/features/thursday/components/ascii-orb.tsx +106 -90
  413. package/features/thursday/components/boot.tsx +7 -0
  414. package/features/thursday/components/call-log.tsx +219 -92
  415. package/features/thursday/components/face.tsx +6 -4
  416. package/features/thursday/components/tab-state.tsx +97 -0
  417. package/features/thursday/components/thursday-mark.tsx +4 -1
  418. package/features/thursday/components/thursday-setting.tsx +17 -47
  419. package/features/thursday/components/thursday.tsx +208 -95
  420. package/features/thursday/thursday.action.ts +12 -17
  421. package/features/thursday/thursday.query.ts +61 -70
  422. package/features/thursday/thursday.schema.ts +20 -7
  423. package/features/thursday/tool-line.ts +85 -11
  424. package/features/thursday/use-thursday.ts +86 -59
  425. package/features/workspace/components/file-view.tsx +4 -2
  426. package/features/workspace/workspace.ts +230 -13
  427. package/hooks/use-draft.ts +37 -0
  428. package/hooks/use-hotkey.ts +105 -0
  429. package/hooks/use-object-state.ts +51 -0
  430. package/hooks/use-on-visible.ts +72 -0
  431. package/hooks/use-theme.ts +106 -0
  432. package/hooks/use-wake-word.ts +262 -0
  433. package/lib/limits.ts +1 -1
  434. package/lib/oauth-page.ts +27 -0
  435. package/lib/realtime/openai.ts +2 -2
  436. package/lib/realtime/realtime.driver.ts +34 -1
  437. package/lib/realtime/realtime.protocol.ts +7 -1
  438. package/lib/realtime/realtime.tap.ts +122 -0
  439. package/lib/sandbox.ts +60 -29
  440. package/lib/tokens.ts +19 -0
  441. package/package.json +1 -1
  442. package/skills/browser/SKILL.md +55 -34
  443. package/.next/server/app/api/memory/tidy/route/app-paths-manifest.json +0 -3
  444. package/.next/server/app/api/memory/tidy/route.js +0 -23
  445. package/.next/server/app/api/memory/tidy/route.js.nft.json +0 -1
  446. package/.next/server/chunks/[root-of-the-server]__019dx9f._.js +0 -5
  447. package/.next/server/chunks/[root-of-the-server]__02_2sm-._.js +0 -5
  448. package/.next/server/chunks/[root-of-the-server]__02kt8yn._.js +0 -10
  449. package/.next/server/chunks/[root-of-the-server]__05luceg._.js +0 -3
  450. package/.next/server/chunks/[root-of-the-server]__06t77t4._.js +0 -11
  451. package/.next/server/chunks/[root-of-the-server]__0bed6hu._.js +0 -8
  452. package/.next/server/chunks/[root-of-the-server]__0dupqt7._.js +0 -5
  453. package/.next/server/chunks/[root-of-the-server]__0h59di-._.js +0 -5
  454. package/.next/server/chunks/[root-of-the-server]__0j_n5l3._.js +0 -3
  455. package/.next/server/chunks/[root-of-the-server]__0le4d-p._.js +0 -3
  456. package/.next/server/chunks/[root-of-the-server]__0m8ywyo._.js +0 -10
  457. package/.next/server/chunks/[root-of-the-server]__0nfuugi._.js +0 -5
  458. package/.next/server/chunks/[root-of-the-server]__0phdgco._.js +0 -8
  459. package/.next/server/chunks/[root-of-the-server]__0qjqtwo._.js +0 -5
  460. package/.next/server/chunks/[root-of-the-server]__0t_dqaj._.js +0 -3
  461. package/.next/server/chunks/[root-of-the-server]__0wvgrsl._.js +0 -3
  462. package/.next/server/chunks/[root-of-the-server]__0yk6s3w._.js +0 -5
  463. package/.next/server/chunks/[root-of-the-server]__0z3gelv._.js +0 -3
  464. package/.next/server/chunks/[root-of-the-server]__10qshki._.js +0 -3
  465. package/.next/server/chunks/[root-of-the-server]__113fqg5._.js +0 -12
  466. package/.next/server/chunks/[root-of-the-server]__11w_7_3._.js +0 -3
  467. package/.next/server/chunks/[root-of-the-server]__16thabu._.js +0 -3
  468. package/.next/server/chunks/[root-of-the-server]__173nhwf._.js +0 -8
  469. package/.next/server/chunks/[root-of-the-server]__1_0q_9w._.js +0 -3
  470. package/.next/server/chunks/[root-of-the-server]__1_aoyr9._.js +0 -3
  471. package/.next/server/chunks/[root-of-the-server]__1bqhuh9._.js +0 -8
  472. package/.next/server/chunks/[root-of-the-server]__1cqizfq._.js +0 -5
  473. package/.next/server/chunks/[root-of-the-server]__1dow0bz._.js +0 -3
  474. package/.next/server/chunks/[root-of-the-server]__1e-ci13._.js +0 -3
  475. package/.next/server/chunks/[root-of-the-server]__1gmn1cs._.js +0 -10
  476. package/.next/server/chunks/[root-of-the-server]__1lr7j9t._.js +0 -5
  477. package/.next/server/chunks/[root-of-the-server]__1mzp_el._.js +0 -3
  478. package/.next/server/chunks/[root-of-the-server]__1txedx6._.js +0 -8
  479. package/.next/server/chunks/[root-of-the-server]__1u_qvc7._.js +0 -3
  480. package/.next/server/chunks/[root-of-the-server]__1zgpz1w._.js +0 -3
  481. package/.next/server/chunks/_012yhfm._.js +0 -39
  482. package/.next/server/chunks/_06mxlgn._.js +0 -3
  483. package/.next/server/chunks/_07rtlxv._.js +0 -3
  484. package/.next/server/chunks/_0a351g7._.js +0 -6
  485. package/.next/server/chunks/_0kjjmag._.js +0 -3
  486. package/.next/server/chunks/_0zmestz._.js +0 -55
  487. package/.next/server/chunks/_0zuzmt_._.js +0 -39
  488. package/.next/server/chunks/_12bbv5i._.js +0 -96
  489. package/.next/server/chunks/_15q1pig._.js +0 -3
  490. package/.next/server/chunks/_1drv2et._.js +0 -36
  491. package/.next/server/chunks/_1ic3bew._.js +0 -5
  492. package/.next/server/chunks/_1mxn_lb._.js +0 -3
  493. package/.next/server/chunks/_1uj4_io._.js +0 -10
  494. package/.next/server/chunks/_1x7p319._.js +0 -6
  495. package/.next/server/chunks/_1yldgo4._.js +0 -55
  496. package/.next/server/chunks/_2050gwn._.js +0 -255
  497. package/.next/server/chunks/_next-internal_server_app_api_memory_tidy_route_actions_0_cfuom.js +0 -3
  498. package/.next/server/chunks/features_0scmr4i._.js +0 -3
  499. package/.next/server/chunks/features_bot_task_query_ts_11xuzl3._.js +0 -3
  500. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0vorg6w._.js +0 -3
  501. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0ykklj0._.js +0 -3
  502. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1ryg3wh._.js +0 -3
  503. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1vmaq9f._.js +0 -3
  504. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1vwbnq_._.js +0 -3
  505. package/.next/server/chunks/ssr/[externals]_node_crypto_1kn79-7._.js +0 -3
  506. package/.next/server/chunks/ssr/[root-of-the-server]__01id-v3._.js +0 -3
  507. package/.next/server/chunks/ssr/[root-of-the-server]__0b-0i32._.js +0 -3
  508. package/.next/server/chunks/ssr/[root-of-the-server]__0dfwvr4._.js +0 -4
  509. package/.next/server/chunks/ssr/[root-of-the-server]__0iuoa-r._.js +0 -3
  510. package/.next/server/chunks/ssr/[root-of-the-server]__1-mnhyd._.js +0 -90
  511. package/.next/server/chunks/ssr/[root-of-the-server]__185grso._.js +0 -3
  512. package/.next/server/chunks/ssr/[root-of-the-server]__1minz8_._.js +0 -3
  513. package/.next/server/chunks/ssr/_0-mc7ro._.js +0 -3
  514. package/.next/server/chunks/ssr/_01p5r6-._.js +0 -3
  515. package/.next/server/chunks/ssr/_09-0k3z._.js +0 -3
  516. package/.next/server/chunks/ssr/_0ay6b01._.js +0 -3
  517. package/.next/server/chunks/ssr/_0cvjbuz._.js +0 -3
  518. package/.next/server/chunks/ssr/_0fafgvl._.js +0 -3
  519. package/.next/server/chunks/ssr/_0j4v8of._.js +0 -3
  520. package/.next/server/chunks/ssr/_0l81bzy._.js +0 -3
  521. package/.next/server/chunks/ssr/_0nso8tp._.js +0 -3
  522. package/.next/server/chunks/ssr/_0sf1isi._.js +0 -3
  523. package/.next/server/chunks/ssr/_0ti51xc._.js +0 -3
  524. package/.next/server/chunks/ssr/_0y84qo6._.js +0 -3
  525. package/.next/server/chunks/ssr/_10uvw3l._.js +0 -3
  526. package/.next/server/chunks/ssr/_1dcxzqe._.js +0 -3
  527. package/.next/server/chunks/ssr/_1e-dgz0._.js +0 -4
  528. package/.next/server/chunks/ssr/_1fq7zgb._.js +0 -3
  529. package/.next/server/chunks/ssr/_1jbv7m1._.js +0 -3
  530. package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +0 -4
  531. package/.next/server/chunks/ssr/features_config_components_14jqgy4._.js +0 -3
  532. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +0 -4
  533. package/.next/server/chunks/ssr/lib_realtime_0aetuyp._.js +0 -24
  534. package/.next/server/chunks/ssr/lib_realtime_18k_aj-._.js +0 -24
  535. package/.next/server/chunks/ssr/node_modules_zod_v4_classic_errors_05xv7vp.js +0 -3
  536. package/.next/server/chunks/ssr/node_modules_zod_v4_classic_external_15fmmz3.js +0 -55
  537. package/.next/static/chunks/0f9sq-7q_yxyl.js +0 -1
  538. package/.next/static/chunks/0tydnn2kybibk.js +0 -1
  539. package/.next/static/chunks/0yysv1gzin17t.js +0 -1
  540. package/.next/static/chunks/1fr5m75pwtyic.js +0 -1
  541. package/.next/static/chunks/1gy3bbv7usnjo.js +0 -1
  542. package/.next/static/chunks/1keib_gt066gc.js +0 -1
  543. package/.next/static/chunks/1ytnip8wdng93.js +0 -1
  544. package/.next/static/chunks/21rk8w7bda-su.js +0 -1
  545. package/.next/static/chunks/247d-r95j8xs0.js +0 -1
  546. package/.next/static/chunks/28g42tw8tsvhd.js +0 -1
  547. package/.next/static/chunks/29gyb3nubj51j.js +0 -53
  548. package/.next/static/chunks/2cwjgkt_hoyhj.js +0 -22
  549. package/.next/static/chunks/2fq_86jvq9ymq.js +0 -2
  550. package/.next/static/chunks/2rbf1fpd8n80-.js +0 -22
  551. package/.next/static/chunks/2ukj8k69y89um.js +0 -1
  552. package/.next/static/chunks/2uxum7qbyeyxd.js +0 -1
  553. package/.next/static/chunks/2wngeetfnzxkp.js +0 -2
  554. package/.next/static/chunks/388-t2v72jh39.css +0 -1
  555. package/.next/static/chunks/3fqvc0cg-atq_.js +0 -1
  556. package/.next/static/chunks/3p4egvfjxpatb.js +0 -1
  557. package/.next/static/chunks/3qe1w1ei-huhl.js +0 -1
  558. package/.next/static/chunks/3xxa2j56-f3nm.js +0 -3
  559. package/.next/static/chunks/3y40riycdip-i.js +0 -1
  560. package/.next/static/chunks/45a6zbtkelph9.js +0 -1
  561. package/.next/static/media/favicon.2vob68tjqpejf.ico +0 -0
  562. package/features/ai/prompts/memory-tidy.prompt.ts +0 -123
  563. package/features/ai/tools/tidy.tool.ts +0 -22
  564. package/features/memory/components/memory-tidy.tsx +0 -395
  565. package/features/memory/memory.tidy.ts +0 -332
  566. package/features/memory/tidy.query.ts +0 -135
  567. package/features/thursday/use-call-title.ts +0 -31
  568. /package/.next/server/app/api/{memory/tidy → bot/memory/files}/route/build-manifest.json +0 -0
  569. /package/.next/server/app/api/{memory/tidy → bot/memory/files}/route/server-reference-manifest.json +0 -0
  570. /package/.next/server/app/api/{memory/tidy → bot/memory/files}/route.js.map +0 -0
  571. /package/.next/static/{X34BUd9bfdH27ripuwwBm → x1cCqY0kWpR_VcYx_lWO5}/_buildManifest.js +0 -0
  572. /package/.next/static/{X34BUd9bfdH27ripuwwBm → x1cCqY0kWpR_VcYx_lWO5}/_clientMiddlewareManifest.js +0 -0
  573. /package/.next/static/{X34BUd9bfdH27ripuwwBm → x1cCqY0kWpR_VcYx_lWO5}/_ssgManifest.js +0 -0
@@ -1,3 +0,0 @@
1
- module.exports=[32477,a=>{"use strict";var b=a.i(187924),c=a.i(987234),d=a.i(164831);let e={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};e.node;let f=(0,d.default)(e);var g=a.i(141146),h=a.i(875160);let i={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};i.node;let j=(0,d.default)(i);var k=a.i(111376);let l={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};l.node;let m=(0,d.default)(l);var n=a.i(403512),o=a.i(26268),p=a.i(572131),q=a.i(986368),r=a.i(767561),s=a.i(340695),t=a.i(446181),u=a.i(950463),v=a.i(864037),w=a.i(608902),x=a.i(86922),y=a.i(405050);let z=(0,y.createServerReference)("7fdda987c5c6887d333c51ad9d859efeed3392ddd7",y.callServer,void 0,y.findSourceMapURL,"cancelMemoryTidyAction"),A=(0,y.createServerReference)("7f84194f8e656799a38ecdfbe0e6e7197314915282",y.callServer,void 0,y.findSourceMapURL,"runMemoryTidyAction"),B=(0,y.createServerReference)("7f89da96e453adc9271fa1c02af987e8afce58036e",y.callServer,void 0,y.findSourceMapURL,"setMemoryTidyModelAction"),C=(0,y.createServerReference)("7ff7165bd1c214fcdae348973ca11be2ca989d01bd",y.callServer,void 0,y.findSourceMapURL,"setMemoryTidyOnAction");var D=a.i(139329),E=a.i(619477),F=a.i(28996),G=a.i(199169),H=a.i(313237),I=a.i(759497),J=a.i(497895);function K({status:a}){let c=a.current,d=a.last;return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsxs)("div",{className:"border-t border-border/60",children:[(0,b.jsx)(L,{value:a.model}),(0,b.jsxs)("div",{className:"flex items-center gap-3 border-t border-border/60 py-2",children:[(0,b.jsx)("span",{className:"w-20 shrink-0 text-[13px] text-muted-foreground",children:c?"Reading":"Last read"}),c?(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,b.jsx)(h.Loader2,{className:"size-3.5 shrink-0 animate-spin"}),(0,b.jsxs)("span",{className:"truncate",children:["the last ",c.messages," ",1===c.messages?"message":"messages"]})]}):(0,b.jsx)(M,{run:d}),(0,b.jsx)(N,{run:c??d})]})]}),(0,b.jsx)(E.SettingNote,{className:(0,J.cn)(!a.model&&J.WAITING_INK),children:a.model?`Reads back after every ${a.every} messages of talk. ${a.pending} since the last one.`:"Nothing is read back until a model is picked — this never runs on the app default."})]})}function L({value:a}){return(0,b.jsxs)("button",{type:"button",onClick:()=>{var c;return c=a,t.notify.component({className:"sm:max-w-lg",renderer:({close:a})=>(0,b.jsx)(O,{current:c,onDone:a})})},className:"flex w-full items-center gap-3 py-2 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,b.jsx)("span",{className:"w-20 shrink-0 text-[13px] text-muted-foreground",children:"Model"}),(0,b.jsx)("span",{className:(0,J.cn)("min-w-0 flex-1 truncate font-mono text-[11px]",a?"text-muted-foreground":J.WAITING_INK),children:a??"Not picked"}),(0,b.jsx)(g.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60"})]})}function M({run:a}){if(!a)return(0,b.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:"Nothing read back yet"});let d=(0,c.formatDistanceToNowStrict)((0,G.toDate)(a.endedAt??a.startedAt),{addSuffix:!0});return"done"!==a.status?(0,b.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-destructive",children:[(0,b.jsx)(o.TriangleAlert,{className:"size-3.5 shrink-0"}),(0,b.jsxs)("span",{className:"truncate font-mono text-[11px]",children:["failed"===a.status?"Failed":"Stopped"," ",d,a.error?` — ${a.error}`:""]})]}):(0,b.jsxs)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:[d," · ",(0,D.tidyTally)(a.changes)]})}function N({run:a}){return a?(0,b.jsx)("button",{type:"button","aria-label":"What the last read changed",onClick:()=>P(),className:"shrink-0 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,b.jsx)(g.ChevronRight,{className:"size-4 text-muted-foreground/60"})}):(0,b.jsx)("span",{className:"size-4 shrink-0"})}function O({current:a,onDone:c}){let[d,e]=(0,H.useServerAction)(B,{onOk:()=>{(0,I.revalidate)(r.queryKey.memoryTidy),c()}}),f=a?.split("/")??null,[g,h]=(0,p.useState)({provider:f?.[0]??null,model:f?.slice(1).join("/")??""});return(0,b.jsx)(E.SettingDialogContent,{title:"Model",description:"What re-reads a call. There is no default: without a pick nothing is read back, so a model nobody chose never spends.",footer:(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(s.Button,{variant:"ghost",onClick:()=>d(""),children:"Clear"}),(0,b.jsx)(s.Button,{loading:e,disabled:!g.provider||!g.model.trim(),onClick:()=>d(`${g.provider}/${g.model.trim()}`),children:"Save"})]}),children:(0,b.jsx)(w.ModelPicker,{provider:g.provider,model:g.model,onChange:h})})}function P(){return t.notify.component({className:"sm:max-w-2xl",renderer:()=>(0,b.jsx)(Q,{})})}function Q(){let{data:a}=(0,I.useServerRoute)(r.queryKey.memoryTidy),d={onOk:()=>(0,I.revalidate)(r.queryKey.memoryTidy)},[e,f]=(0,H.useServerAction)(A,d),[g,h]=(0,H.useServerAction)(z,d);if(!a)return(0,b.jsx)(E.SettingDialogContent,{title:"What the last read changed",children:(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsx)(u.Skeleton,{className:"h-4 w-2/3"}),(0,b.jsx)(u.Skeleton,{className:"h-4 w-full"}),(0,b.jsx)(u.Skeleton,{className:"h-4 w-4/5"})]})});let i=a.current??a.last,j=i?(0,c.formatDistanceToNowStrict)((0,G.toDate)(i.endedAt??i.startedAt),{addSuffix:!0}):"";return(0,b.jsx)(E.SettingDialogContent,{title:"What the last read changed",description:"Memory as it stands after the model read those messages back. Every line here is one it wrote, revised or dropped.",footer:a.current?(0,b.jsx)(s.Button,{variant:"outline",loading:h,onClick:()=>g(),children:"Stop"}):(0,b.jsxs)(s.Button,{variant:"outline",loading:f,disabled:0===a.pending||!a.model,onClick:()=>e(),children:[!f&&(0,b.jsx)(x.MemoryMark,{className:"size-3.5"}),"Read now"]}),children:i?(0,b.jsxs)("div",{className:"space-y-3",children:[(0,b.jsxs)("div",{className:"flex items-center gap-2",children:[(0,b.jsx)("span",{className:"min-w-0 flex-1 text-sm",children:a.current?`Reading the last ${i.messages} messages`:`${i.messages} messages, ${j}`}),(0,b.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:["-"!==i.provider&&i.model,i.inputTokens>0&&` \xb7 ${i.inputTokens.toLocaleString()} in / ${i.outputTokens.toLocaleString()} out`]})]}),i.error&&(0,b.jsx)("p",{className:"font-mono text-xs text-destructive",children:i.error}),i.changes.length>0?(0,b.jsx)("ul",{className:"border-b border-border/60",children:i.changes.map((a,c)=>(0,b.jsx)(S,{change:a},`${c}-${a.op}-${a.text}`))}):!a.current&&(0,b.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Nothing needed changing."})]}):(0,b.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Nothing has been read back yet."})})}let R={add:{icon:n.Plus,label:"added"},replace:{icon:f,label:"revised"},forget:{icon:j,label:"dropped"},carry:{icon:k.Pin,label:"carried into every call"},uncarry:{icon:m,label:"no longer carried"}};function S({change:a}){let{icon:c,label:d}=R[a.op];return(0,b.jsxs)("li",{className:"flex gap-3 border-t border-border/60 py-3",children:[(0,b.jsxs)("span",{className:"flex w-3.5 shrink-0 justify-center pt-1 text-muted-foreground",children:[(0,b.jsx)(c,{className:"size-3.5"}),(0,b.jsx)("span",{className:"sr-only",children:d})]}),(0,b.jsx)("span",{className:"min-w-0 flex-1 text-sm leading-relaxed text-foreground/90",children:a.text}),(0,b.jsx)("span",{className:"shrink-0 pt-0.5 font-mono text-[11px] text-muted-foreground/50",children:a.path})]})}a.s(["MemoryTidyNotice",0,function(){return(0,q.useAppEvent)({"memory-tidied":a=>{v.toast.add({type:a.failed?"error":"success",title:a.failed?"Could not read the call back":"Memory tidied",description:a.tally,actionProps:{children:"Show",onClick:()=>{(0,F.openSettings)("thursday"),P()}}})}}),null},"TidySetting",0,function(){let{data:a}=(0,I.useServerRoute)(r.queryKey.memoryTidy),[c]=(0,H.useServerAction)(C,{onOk:()=>(0,I.revalidate)(r.queryKey.memoryTidy)});return(0,b.jsx)(E.SettingGroup,{label:"After a call",children:(0,b.jsx)(E.SettingToggle,{label:"Read the call back",description:"During a call she saves what she catches between sentences. Afterwards a model reads the whole thing back and fixes what she missed.",checked:a?.on??!1,disabled:!a,onChange:a=>c(a),children:a&&(0,b.jsx)(K,{status:a})})})}],32477)},647509,a=>{"use strict";a.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_MIN_LEVEL",0,6,"EMOJI_POOL",0,["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"],"EMOJI_RATIO",0,.11,"RAMP",0,[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],"hash",0,function(a,b){let c=43758.5453*Math.sin(127.1*a+311.7*b);return c-Math.floor(c)},"smoothstep",0,function(a,b,c){let d=Math.min(1,Math.max(0,(c-a)/(b-a)));return d*d*(3-2*d)}])},445432,a=>{"use strict";var b=a.i(187924),c=a.i(572131),d=a.i(913834),e=a.i(647509);let f=[235,235,235],g=["████ ███ ███ ██ ███ ","█ █ █ █ █ █ █ █ █","███ ███ ███ █ █ ███ ","█ █ █ █ █ █ █ █ █ ","████ █ █ █ █ ██ █ █"],h={happy:[".....................",".....................","....███.......███....","...█████.....█████...","...█████.....█████...","....███.......███....",".....................",".....................","█...................█",".██...............██.","...███.........███...","......█████████......","....................."],sad:[".....................",".....................","....███.......███....","...█████.....█████...","...█████.....█████...","....███.......███....",".....................",".....................","......█████████......","...███.........███...",".██...............██.","█...................█","....................."],love:[".....................","...██.██.....██.██...","..███████...███████..","..███████...███████..","...█████.....█████...","....███.......███....",".....█.........█.....",".....................","█...................█",".██...............██.","...███.........███...","......█████████......","....................."]};function i(a,b){let c=1-(0,e.smoothstep)(104.50000000000001,190,a.dist);return(.58+.2*Math.sin(.05*a.dist-.4*b)+.07*Math.sin(.35*b))*c}function j(a,b,c,d,f){switch(a){case"idle":return i(b,c)*(0,e.smoothstep)(0,1,Math.min(1,d/1.5));case"connecting":{let a=(0,e.smoothstep)(0,1,Math.min(1,d/1.8)),f=b.dist-235*a;return Math.exp(-(f*f)/6e3)*(.2+.85*(0,e.hash)(Math.floor(b.dist/9),Math.floor(11*b.angle))+.5*(0,e.hash)(137*b.seed,7))*a+i(b,c)*(1-a)}case"speaking":{let a=(0,e.smoothstep)(0,1,Math.min(1,d/.8)),g=190+(58*f.slow+58*f.bob)*a;for(let c=0;c<4;c++)g+=40*f.amp[c]*Math.sin((c+2)*b.angle+f.phase[c])*a;let h=Math.max(130,Math.min(278,g)),i=b.dist-h,j=Math.exp(-(i*i)/900),k=.55*Math.exp(-(b.dist*b.dist)/6e3),l=b.dist<h?.3*(1-b.dist/h)**.6:0,m=0;for(let a=0;a<f.rings.length;a++){let d=f.rings[a],e=c-d.born,g=b.dist-(h+100*e);m+=Math.exp(-(g*g)/2200)*d.power*Math.max(0,1-e/.55)}return j+k+l+.8*m}case"working":{let a=(0,e.smoothstep)(0,1,Math.min(1,d/.7)),f=b.dist-238,g=Math.exp(-(f*f)/1100),h=b.angle-3*c,j=Math.atan2(Math.sin(h),Math.cos(h));return g*Math.exp(-(j*j)/(j<0?2.8:.16))*a+i(b,c)*(1-a)}case"error":{if(b.letter<0)return 0;let a=d%9.2,f=b.letter,g=.12*b.seed;return Math.max(0,(0,e.smoothstep)(0,1,(a-.65*f-g)/.8)-(0,e.smoothstep)(0,1,(a-5.6-.5*f-g)/.7))*(.86+.14*Math.sin(3.5*c+6*b.seed))}}}function k({className:a,mode:d="idle",charset:i="ascii",emotion:l=null,fontSize:m=8,density:n=1.4,size:o=680,color:p=f,getSpectrum:q}){let r=(0,c.useRef)(null),s=(0,c.useRef)(null),t=(0,c.useRef)([]),u=(0,c.useRef)(null),v=(0,c.useRef)(i),w=(0,c.useRef)({cur:[...p],target:p}),x=(0,c.useRef)({cw:1,ch:1,errScale:3,faceScale:3,size:0}),y=(0,c.useRef)({cur:l,prev:null,start:-1/0}),z=(0,c.useRef)(q);z.current=q;let A=(0,c.useRef)({fast:0,mid:0,slow:0,bob:0,bobVel:0,lastOnset:-1/0,amp:[,,,,].fill(0),phase:Array.from({length:4},(a,b)=>2.1*b),rings:[]}),B=(0,c.useRef)({mode:d,start:0}),C=(0,c.useRef)(null),D=(0,c.useRef)(-1/0);return(0,c.useEffect)(()=>{let a=r.current;if(!a)return;let b=.95*m/n,c=1.25*m/n,d=680/o,f=b*d,h=c*d,i=Math.max(1,Math.floor(625.6/(g[0].length*f))),j=Math.max(1,Math.floor(557.6/(21*f)));x.current={cw:f,ch:h,errScale:i,faceScale:j,size:o};let k=[],l=Math.ceil(o/b),p=Math.ceil(o/c);for(let a=0;a<p;a++)for(let j=0;j<l;j++){let l=j*b,m=a*c,n=(l-o/2)*d,p=(m-o/2)*d,q=Math.hypot(n,p),r=function(a,b,c,d,e){let f=g.length,h=Math.floor(a/(c*e)+g[0].length/2),i=Math.floor(b/(d*e)+f/2);if(i<0||i>=f)return -1;let j=g[i];return h<0||h>=j.length||"█"!==j[h]?-1:Math.floor(h/5)}(n,p,f,h,i);r<0&&q>328||k.push({x:l+b/2,y:m+c/2,dx:n,dy:p,dist:q,angle:Math.atan2(p,n),seed:(0,e.hash)(j,a),grain:(0,e.hash)(5.7*j+19,2.3*a+53),gap:.05+.3*(0,e.hash)(7.3*j+11,3.1*a+5),birth:(0,e.hash)(3.1*j+7,5.7*a+2),death:(0,e.hash)(9.4*j+3,2.6*a+8),emoji:(0,e.hash)(2.7*j+31,5.9*a+17)<e.EMOJI_RATIO,letter:r})}t.current=k,u.current={ascii:Array.from({length:e.RAMP.length},()=>new Int32Array(k.length)),emoji:Array.from({length:e.RAMP.length},()=>new Int32Array(k.length)),asciiN:new Int32Array(e.RAMP.length),emojiN:new Int32Array(e.RAMP.length),glyph:Array(k.length)};let q=Math.min(2,window.devicePixelRatio||1);a.width=o*q,a.height=o*q,a.style.width=`${o}px`,a.style.height=`${o}px`;let v=a.getContext("2d");return v&&(v.setTransform(q,0,0,q,0,0),v.font=`700 ${m}px ui-monospace,SFMono-Regular,Menlo,monospace`,v.textAlign="center",v.textBaseline="middle",s.current=v),()=>{v?.clearRect(0,0,o,o),t.current=[],u.current=null}},[m,n,o]),(0,c.useEffect)(()=>{let a=y.current;a.cur!==l&&(y.current={cur:l,prev:a.cur,start:.001*performance.now()})},[l]),(0,c.useEffect)(()=>{v.current=i},[i]),(0,c.useEffect)(()=>{w.current.target=p},[p]),(0,c.useEffect)(()=>{let a=.001*performance.now();B.current.mode!==d?(C.current={...B.current},B.current={mode:d,start:a},D.current=a):B.current={mode:d,start:a}},[d]),(0,c.useEffect)(()=>{let a=0,b=Array(28),c=.001*performance.now(),d=f=>{let g=.001*f,i=Math.min(.05,Math.max(0,g-c));c=g;let k=s.current,l=u.current;if(!k||!l){a=requestAnimationFrame(d);return}let m=v.current,{cw:n,ch:o,faceScale:p,size:q}=x.current;l.asciiN.fill(0),l.emojiN.fill(0);let r=z.current?.();if(r&&r.length>1){let a=r.length-1;for(let c=0;c<28;c++){let d=Math.abs((c/28*2+1)%2-1)*a,e=Math.floor(d),f=Math.min(a,e+1);b[c]=r[e]+(r[f]-r[e])*(d-e)}}else for(let a=0;a<28;a++){let c=.5*Math.sin(1.7*g+1.7*a)+.3*Math.sin(.8*g+.6*a)+.2*Math.sin(3*g+2.9*a);b[a]=.5*c+.5}let E=A.current,F=0;for(let a=0;a<28;a++)F+=b[a];if(F=Math.min(1,F/28*2.6),E.fast+=(F-E.fast)*.3,E.mid+=(F-E.mid)*.06,E.slow+=(F-E.slow)*.02,E.fast>1.25*E.mid+.02&&E.fast>.07&&g-E.lastOnset>.14){E.lastOnset=g;let a=Math.min(1,1.7*E.fast);E.bobVel+=.05*a,E.rings.push({born:g,power:a}),E.rings.length>5&&E.rings.shift()}E.bobVel+=-(.012*E.bob)-.09*E.bobVel,E.bob+=E.bobVel;for(let a=0;a<4;a++){let c=a/4*28|0,d=(a+1)/4*28|0,f=0;for(let a=c;a<d;a++)f+=b[a];f=Math.min(1,f/Math.max(1,d-c)*2.6);let h=.7+.6*(0,e.hash)((.9*g|0)+31*a,a);E.amp[a]+=(f*h-E.amp[a])*(.02+.012*a),E.phase[a]+=i*(.5+.37*a)*(a%2?-1:1)}for(;E.rings.length>0&&g-E.rings[0].born>.55;)E.rings.shift();let G=B.current,H=C.current,I=(0,e.smoothstep)(0,1,Math.min(1,(g-D.current)/1.5)),J=null!==H&&I<1,K="error"===G.mode||J&&H?.mode==="error",L=y.current,M=g-L.start,N=Math.min(1,Math.max(0,M/.36)),O=Math.min(1,Math.max(0,(M-.36-.14)/.95)),P=null!==L.cur||M<1.45,Q=(a,b)=>{var c,d;let e,f;return c=b.dx,d=b.dy,e=Math.floor(c/(n*p)+10.5),(f=Math.floor(d/(o*p)+6.5))<0||f>=13||e<0||e>=21||"█"!==h[a][f][e]?0:f<7?1:2},R=(a,b)=>0===a?0:(1===a?1:.88)*(.74+.26*(1-Math.min(1,b.dist/270)))*(.42+.85*(0,e.hash)(Math.floor(.09*b.dx+.25*g),Math.floor(.09*b.dy-.18*g))),S=a=>{if(a.seed<.976)return 0;let b=195+160*(0,e.hash)(311*a.seed,9);return Math.exp(-((a.dist-b)**2)/7e3)*(.5+.5*Math.sin(g*(.5+1.5*(0,e.hash)(47*a.seed,21))+300*a.seed))*.36},T=t.current;for(let a=0;a<T.length;a++){let b=T[a],c=j(G.mode,b,g,g-G.start,E);if(J&&H){let a=j(H.mode,b,g,g-H.start,E);c=a+(c-a)*I}!(K&&b.letter>=0)&&((c*=(.66+.72*b.grain)*(.8+.4*(0,e.hash)(Math.floor(.05*b.dx+.5*g),Math.floor(.05*b.dy-.3*g))))>.3&&(0,e.hash)(31.7*Math.floor(1.6*g),613*b.seed)>.992&&(c=Math.max(c,.9)),c<b.gap+.05*Math.sin(.28*g+6.283*b.seed)&&(c=0));let d=!1;if(P){let a=(0,e.smoothstep)(0,1,(1.1*N-b.death)/.08),f=(0,e.smoothstep)(0,1,(1.1*O-b.birth)/.08),g=L.cur?Q(L.cur,b):0,h=L.prev?Q(L.prev,b):0,i=S(b);c=(L.prev?R(h,b)+i:c)*(1-a)+(L.cur?R(g,b)+i:c)*f,d=g>0&&f>.05||h>0&&a<.95}let f=(c=c<0?0:c>1?1:c)*(e.RAMP.length-1)|0;if(0===f)continue;let h=g*(d?.75:"emojiOnly"===m?e.EMOJI_CHAR_RATE:e.CHAR_RATE)+7*b.seed|0;if("emojiOnly"===m||"emoji"===m&&b.emoji&&f>=e.EMOJI_MIN_LEVEL){let c=((b.seed*e.EMOJI_POOL.length|0)+h)%e.EMOJI_POOL.length;l.glyph[a]=e.EMOJI_POOL[c],l.emoji[f][l.emojiN[f]++]=a}else{let c=e.RAMP[f],d=((b.seed*c.length|0)+h)%c.length;l.glyph[a]=c[d],l.ascii[f][l.asciiN[f]++]=a}}k.clearRect(0,0,q,q);let U=t.current,V=e.RAMP.length-1,W=w.current;for(let a=0;a<3;a++)W.cur[a]+=(W.target[a]-W.cur[a])*.05;k.fillStyle=`rgb(${0|W.cur[0]},${0|W.cur[1]},${0|W.cur[2]})`;for(let a=1;a<=V;a++){let b=l.asciiN[a];if(0===b)continue;k.globalAlpha=e.ALPHA_TOP*(a/V);let c=l.ascii[a];for(let a=0;a<b;a++){let b=U[c[a]];k.fillText(l.glyph[c[a]],b.x,b.y)}}for(let a=1;a<=V;a++){let b=l.emojiN[a];if(0===b)continue;k.globalAlpha=.35+a/V*.65;let c=l.emoji[a];for(let a=0;a<b;a++){let b=U[c[a]];k.fillText(l.glyph[c[a]],b.x,b.y)}}k.globalAlpha=1,!J&&H&&(C.current=null),a=requestAnimationFrame(d)};return a=requestAnimationFrame(d),()=>cancelAnimationFrame(a)},[]),(0,b.jsx)("canvas",{ref:r,className:a,"aria-hidden":!0,style:{display:"block",pointerEvents:"none"}})}var l=a.i(730357),m=a.i(497895);let n={idle:"idle",connecting:"connecting",listening:"listening",speaking:"speaking",working:"thinking",delegating:"delegating"},o={ripple:14,pulse:0,punch:0,stretch:0},p={idle:"idle",connecting:"connecting",listening:"connecting",speaking:"speaking",working:"working",delegating:"working"},q=[247,247,247],r=[10,10,10],s={mark:{label:"Mark",hint:"A silhouette with eyes. Blinks, glances, leans into a voice.",render:function({status:a,size:c,getSpectrum:e,look:f,className:g}){return(0,b.jsx)(d.BotMark,{size:c,seed:"thursday",color:f.color,shape:f.shape,outline:f.outline,state:n[a],getSpectrum:e,options:o,notify:!1,className:g})}},ascii:{label:"Ascii",hint:"A field of characters. No eyes — the whole orb is the expression.",render:function({status:a,size:c,getSpectrum:d,look:e,className:f}){let g="dark"===(0,l.useResolvedTheme)();return(0,b.jsx)(k,{mode:p[a],size:c,color:g?q:r,getSpectrum:d,charset:e.charset,fontSize:e.fontSize,density:e.density,className:f})}}},t=(0,c.memo)(function({look:a,status:d="idle",size:e=448,className:f,...g}){let h=(0,c.useRef)(null),[i,j]=(0,c.useState)(e),[k,l]=(0,c.useState)(!1);(0,c.useEffect)(()=>{let a=h.current;if(!a)return;let b=new ResizeObserver(([a])=>{let b=Math.round(a.contentRect.width);b>0&&j(b)});return b.observe(a),()=>b.disconnect()},[]),(0,c.useEffect)(()=>{let a=requestAnimationFrame(()=>l(!0));return()=>cancelAnimationFrame(a)},[]);let n=s[a.kind].render;return(0,b.jsx)("div",{ref:h,className:(0,m.cn)("aspect-square transition-opacity duration-700 ease-out",k?"opacity-100":"opacity-0",f),children:(0,b.jsx)(n,{...g,look:a,status:d,size:i})})});a.s(["FACES",0,s,"Face",0,t],445432)},334392,a=>{"use strict";a.s(["ASCII_CHARSETS",0,["ascii","emoji","emojiOnly"],"FACE_KINDS",0,["mark","ascii"]])},759399,a=>{"use strict";var b=a.i(572131),c=a.i(461512);let d="thursday.icon";function e(){return c.FACE_DEFAULT}let f=e(),g=new Set;function h(){for(let a of g)a()}a.s(["setThursdayFace",0,function(a){f=a;try{window.localStorage.setItem(d,JSON.stringify(a))}catch{}h()},"useThursdayFace",0,function(){return(0,b.useSyncExternalStore)(a=>{g.add(a);let b=a=>{a.key===d&&(f=e(),h())};return window.addEventListener("storage",b),()=>{g.delete(a),window.removeEventListener("storage",b)}},()=>f,()=>c.FACE_DEFAULT)}])},461512,a=>{"use strict";var b=a.i(702080),c=a.i(61876),d=a.i(411509),e=a.i(334392),f=a.i(616682);let g=b.default.object({systemPrompt:b.default.string().max(f.COMMON_VALIDATE.prompt.max).nullish(),model:c.speachModelRefSchema.nullish(),locale:b.default.string().max(35).nullish()}),h=d.botIconSchema.extend({kind:b.default.enum(e.FACE_KINDS).default("ascii"),charset:b.default.enum(e.ASCII_CHARSETS).default("ascii"),fontSize:b.default.number().min(4).max(16).default(8),density:b.default.number().min(.6).max(2).default(1.4)}).parse({}),i={min:3,max:32},j=b.default.object({enabled:b.default.boolean(),phrase:b.default.string().trim().min(i.min).max(i.max)}),k=b.default.object({enabled:b.default.boolean(),combo:b.default.string().trim().min(1).max(64)}),l=["off","waiting","any"],m=b.default.enum(l),n=["center","sides"],o=b.default.enum(n);b.default.object({id:b.default.string().min(1),role:b.default.enum(["user","assistant","tool"]),tool:b.default.string().nullish(),text:b.default.string(),seq:b.default.number().int().min(0)}),a.s(["CALL_BACK_DEFAULT",0,"off","CALL_BACK_LABEL",0,{off:"Never",waiting:"When a job needs me",any:"Whenever a job ends"},"CALL_BACK_MODES",0,l,"CALL_HISTORY_PAGE",0,10,"CAPTION_VIEWS",0,n,"CallBackSchema",0,m,"CaptionViewSchema",0,o,"FACE_DEFAULT",0,h,"HOTKEY_DEFAULT",0,{enabled:!0,combo:"alt+shift+KeyT"},"HotkeySchema",0,k,"ThursdaySettingsSchema",0,g,"WAKE_DEFAULT",0,{enabled:!0,phrase:"hey thursday"},"WAKE_PHRASE",0,i,"WakeSchema",0,j])},359006,a=>{"use strict";let b,c;var d=a.i(920226);let e=a=>b=>{try{let c=a(b);if(c instanceof Promise)return c;return{then:a=>e(a)(c),catch(a){return this}}}catch(a){return{then(a){return this},catch:b=>e(b)(a)}}};var f=a.i(461512);let g=f.ThursdaySettingsSchema.extend({wake:f.WakeSchema.catch(f.WAKE_DEFAULT),hotkey:f.HotkeySchema.catch(f.HOTKEY_DEFAULT),callBack:f.CallBackSchema.catch(f.CALL_BACK_DEFAULT),captionView:f.CaptionViewSchema.catch("center")}),h={systemPrompt:null,model:null,wake:f.WAKE_DEFAULT,hotkey:f.HOTKEY_DEFAULT,callBack:f.CALL_BACK_DEFAULT,captionView:"center"},i=(0,d.create)()((b=a=>({...h,patch:b=>a(b)}),c={name:"thursday.settings",merge:(a,b)=>{let c=g.safeParse(a);return{...b,...c.success?c.data:h}}},(a,d,f)=>{let g,h={storage:function(a){let b;try{b=a()}catch(a){return}return{getItem:a=>{var c;let d=a=>null===a?null:JSON.parse(a,void 0),e=null!=(c=b.getItem(a))?c:null;return e instanceof Promise?e.then(d):d(e)},setItem:(a,c)=>b.setItem(a,JSON.stringify(c,void 0)),removeItem:a=>b.removeItem(a)}}(()=>window.localStorage),partialize:a=>a,version:0,merge:(a,b)=>({...b,...a}),...c},i=!1,j=0,k=new Set,l=new Set,m=h.storage;if(!m)return b((...b)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),a(...b)});let n=()=>{let a=h.partialize({...d()});return m.setItem(h.name,{state:a,version:h.version})},o=f.setState;f.setState=(a,b)=>(o(a,b),n());let p=b((...b)=>(a(...b),n()));f.getInitialState=()=>p;let q=()=>{var b,c;if(!m)return;let f=++j;i=!1,k.forEach(a=>{var b;return a(null!=(b=d())?b:p)});let o=(null==(c=h.onRehydrateStorage)?void 0:c.call(h,null!=(b=d())?b:p))||void 0;return e(m.getItem.bind(m))(h.name).then(a=>{if(a)if("number"!=typeof a.version||a.version===h.version)return[!1,a.state];else{if(h.migrate){let b=h.migrate(a.state,a.version);return b instanceof Promise?b.then(a=>[!0,a]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(b=>{var c;if(f!==j)return;let[e,i]=b;if(a(g=h.merge(i,null!=(c=d())?c:p),!0),e)return n()}).then(()=>{f===j&&(null==o||o(d(),void 0),g=d(),i=!0,l.forEach(a=>a(g)))}).catch(a=>{f===j&&(null==o||o(void 0,a))})};return f.persist={setOptions:a=>{h={...h,...a},a.storage&&(m=a.storage)},clearStorage:()=>{++j,null==m||m.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>q(),hasHydrated:()=>i,onHydrate:a=>(k.add(a),()=>{k.delete(a)}),onFinishHydration:a=>(l.add(a),()=>{l.delete(a)})},h.skipHydration||q(),g||p}));a.s(["thursdaySettings",0,()=>{let{systemPrompt:a,model:b}=i.getState();return{systemPrompt:a,model:b,locale:"u"<typeof navigator?null:navigator.language??null}},"useThursdayStore",0,i],359006)},27418,421042,a=>{"use strict";let b={memory_recall:"memory_recall",memory_remember:"memory_remember",memory_forget:"memory_forget",memory_show:"memory_show",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",delegate:"delegate",task:"task",ask_bot:"ask_bot",ask_thursday:"ask_thursday",ask_back:"ask_back",report:"report",end_call:"end_call",tidy_done:"tidy_done"};a.s(["TOOL_NAMES",0,b],421042);let c={[b.memory_recall]:"Checking your notes",[b.memory_remember]:"Noting that down",[b.memory_forget]:"Forgetting that",[b.memory_show]:"Putting your notes on screen",[b.bash]:"Doing it on this computer",[b.web_search]:"Searching the web",[b.load_skill]:"Reading how to do this",[b.end_call]:"Ending the call"};a.s(["toolLine",0,function(a,d){let e;if(a===b.tool_search||a===b.tool_call)return"Reaching a connected service";let f=null;if(d)try{let a=JSON.parse(d);a&&"object"==typeof a&&!Array.isArray(a)&&(f=a)}catch{}return(f&&function(a,c){if(a===b.delegate){let a="string"==typeof c.bot?c.bot.trim():"";return a?`Handing this to ${a}`:"Handing this over"}if(a===b.task){let a="string"==typeof c.task?c.task.trim():"";return"answer"===c.action?"Passing that back":"cancel"===c.action?"Stopping that":a?`Checking on ${a}`:"Checking the jobs"}return null}(a,f))??c[a]??((e=a.indexOf("__"))<=0?null:`Reaching ${a.slice(0,e).replace(/[-_]/g," ")}`)}],27418)},332033,a=>{"use strict";var b=a.i(572131);let c=["ctrl","alt","meta"],d=/^(Control|Alt|Shift|Meta|OS)/,e=/^(input|textarea|select)$/i;function f(a){let{code:b,ctrlKey:c,altKey:e,shiftKey:f,metaKey:g}=a;if(!b||d.test(b)||!c&&!e&&!g)return null;let h=[];return c&&h.push("ctrl"),e&&h.push("alt"),f&&h.push("shift"),g&&h.push("meta"),[...h,b].join("+")}let g={ctrl:["Ctrl","⌃"],alt:["Alt","⌥"],shift:["Shift","⇧"],meta:["Meta","⌘"]};a.s(["HOTKEY_CAPTURE",0,{"data-hotkey-capture":""},"comboOf",0,f,"isCombo",0,a=>{let b=a.split("+"),e=b.at(-1);return!!(e&&!d.test(e)&&b.slice(0,-1).some(a=>c.includes(a)))},"useHotkey",0,function({enabled:a,combo:c,onPress:d}){let g=(0,b.useRef)(d);g.current=d,(0,b.useEffect)(()=>{if(!a||!c)return;let b=a=>{var b;a.repeat||(b=a.target)&&(e.test(b.tagName)||b.isContentEditable||b.closest?.("[data-hotkey-capture]"))||f(a)===c&&(a.preventDefault(),g.current())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[a,c])},"useHotkeyLabel",0,function(a){let[c,d]=(0,b.useState)(!1);return(0,b.useEffect)(()=>d(/mac/i.test(navigator.userAgent)),[]),a?function(a,b=!1){let c=a.split("+"),d=c.at(-1)??"",e=c.slice(0,-1).map(a=>g[a]?.[+!!b]??a),f=d.replace(/^(Key|Digit|Numpad)/,"").replace(/([a-z])([A-Z])/g,"$1 $2")||d;return b?[...e,f].join(""):[...e,f].join(" + ")}(a,c):null}])}];
2
-
3
- //# sourceMappingURL=_0ay6b01._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[8468,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(752562),f=a.i(589027),g=a.i(168370),h=a.i(847799),i=a.i(925039),j=a.i(696732),k=a.i(71215),l=a.i(62140),m=a.i(875160),n=a.i(328423),o=a.i(233540),p=a.i(674746),q=a.i(357307),r=a.i(924613),s=a.i(572131),t=a.i(767561),u=a.i(545097),v=a.i(950463),w=a.i(107340),x=a.i(86922),y=a.i(600154),z=a.i(369768),A=a.i(759497),B=a.i(497895),C=b([z]);[z]=C.then?(await C)():C;let K={web_search:function({tool:a,taskId:b,collapsed:c}){let e=O(a.results);return(0,d.jsxs)(G,{tool:a,taskId:b,icon:o.Search,collapsed:c,children:[(0,d.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep",children:["“",a.input,"”"]}),e.length>0&&(0,d.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:e.map((a,b)=>(0,d.jsxs)("li",{className:"flex gap-2 text-[11.5px] leading-snug text-muted-foreground",children:[(0,d.jsx)("span",{className:"mt-1.25 size-1 shrink-0 rounded-full bg-muted-foreground/50"}),(0,d.jsx)("span",{className:"truncate",children:a})]},`${b}-${a}`))})]})},bash:function({tool:a,taskId:b,collapsed:c}){let e=O(a.results);return(0,d.jsx)(G,{tool:a,taskId:b,icon:q.Terminal,collapsed:c,children:(0,d.jsxs)("pre",{className:"mx-3 overflow-x-auto rounded-lg bg-foreground/5 px-2.5 py-1.5 font-mono text-[11px] leading-relaxed scrollbar-none dark:bg-black/25",children:[(0,d.jsx)("span",{className:"text-muted-foreground/60",children:"$ "}),a.input,e.length>0&&(0,d.jsx)("span",{className:"block text-muted-foreground",children:e.join("\n")})]})})},fetch:a=>(0,d.jsx)(D,{icon:j.Globe,...a}),write_file:a=>(0,d.jsx)(E,{icon:h.FilePen,...a}),generate_image:function({tool:a,taskId:b,collapsed:c}){let[e]=O(a.results);return(0,d.jsxs)(G,{tool:a,taskId:b,icon:k.Image,collapsed:c,children:[(0,d.jsx)("p",{className:"px-3 pt-1 text-[12px] leading-snug break-keep",children:a.input}),e&&(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:e}),(0,d.jsxs)(z.FileLink,{path:e,label:`Open ${e}`,className:N,children:[(0,d.jsx)(g.ExternalLink,{className:"size-3"}),"Open"]})]})]})}},L={web_search:o.Search,bash:q.Terminal,fetch:j.Globe,write_file:h.FilePen,generate_image:k.Image,memory_recall:x.MemoryMark,memory_remember:x.MemoryMark,memory_forget:x.MemoryMark,memory_show:x.MemoryMark,load_skill:y.SkillsMark,tool_search:w.McpMark,tool_call:w.McpMark,delegate:p.Send,task:l.ListChecks,ask_bot:n.MessageSquare,ask_back:n.MessageSquare,ask_thursday:n.MessageSquare,report:i.Flag},M=a=>L[a]??r.Wrench;function D({icon:a,tool:b,taskId:c,collapsed:e}){return(0,d.jsxs)(G,{tool:b,taskId:c,icon:a,collapsed:e,children:[(0,d.jsx)("p",{className:"truncate px-3 pt-1 pb-1.5 font-mono text-[11px]",children:b.input}),(0,d.jsx)(J,{lines:O(b.results),mono:!0})]})}let N="flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:bg-background hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50";function E({icon:a,tool:b,taskId:c,collapsed:e}){let f=b.path??b.input;return(0,d.jsxs)(G,{tool:b,taskId:c,icon:a,collapsed:e,children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px]",children:b.input}),(0,d.jsxs)(z.FileLink,{path:f,label:`Open ${f}`,className:N,children:[(0,d.jsx)(g.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,d.jsx)(J,{lines:O(b.results),mono:!0})]})}function F({tool:a,taskId:b,collapsed:c}){return(0,d.jsxs)(G,{tool:a,taskId:b,icon:M(a.name),collapsed:c,children:[(0,d.jsx)("p",{className:"px-3 pt-1 pb-1.5 text-[12px] leading-snug break-keep",children:a.input}),(0,d.jsx)(J,{lines:O(a.results)})]})}function G({tool:a,taskId:b,icon:c,collapsed:g=!1,children:h}){let i=void 0===a.results,[j,k]=(0,s.useState)(!g),l=j||i,n=a.more&&b&&a.callId;return(0,d.jsxs)("div",{className:(0,B.cn)("@container w-full overflow-hidden rounded-xl transition-colors",l?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,d.jsxs)("button",{type:"button",onClick:()=>k(a=>!a),"aria-expanded":l,className:"flex w-full items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-[7px] bg-foreground/8 text-muted-foreground",children:i?(0,d.jsx)(m.Loader2,{className:"size-3 animate-spin"}):(0,d.jsx)(c,{className:"size-3"})}),a.note?(0,d.jsxs)(d.Fragment,{children:[i?(0,d.jsx)(u.default,{text:a.note,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep"}):(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep",children:a.note}),(0,d.jsx)("span",{className:"hidden min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-muted-foreground/85 @lg:block",children:a.input})]}):i?(0,d.jsx)(u.default,{text:a.input,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4"}):(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-foreground/80",children:a.input}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:a.name}),!i&&(0,d.jsx)(e.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,d.jsx)(f.ChevronDown,{className:(0,B.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",l&&"rotate-180")})]}),l&&(0,d.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[h,n&&(0,d.jsx)(H,{taskId:b,callId:a.callId})]})]})}function H({taskId:a,callId:b}){let[c,e]=(0,s.useState)(!1),{data:g,isLoading:h}=(0,A.useServerRoute)(c?t.queryKey.toolResult(a,b):null);return(0,d.jsxs)("div",{className:"px-3 pb-1",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>e(a=>!a),className:"flex items-center gap-1 rounded-md py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)(f.ChevronDown,{className:(0,B.cn)("size-3",c&&"rotate-180")}),c?"Less":"Everything"]}),c&&(h||!g?(0,d.jsx)(v.Skeleton,{className:"mt-1.5 h-12 w-full rounded-lg"}):(0,d.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[P(g).map((a,b)=>(0,d.jsx)(I,{src:a},`${b}-${a.length}`)),O(g).length>0&&(0,d.jsx)("pre",{className:"max-h-72 overflow-auto rounded-lg bg-foreground/5 px-2.5 py-2 font-mono text-[11px] leading-relaxed break-all whitespace-pre-wrap dark:bg-black/25",children:O(g).join("\n")})]}))]})}function I({src:a}){return(0,d.jsx)("img",{src:a,alt:"",className:"block w-full rounded-lg bg-muted object-contain"})}function J({lines:a,mono:b}){return 0===a.length?null:(0,d.jsx)("ul",{className:"px-3 pb-1.5",children:a.map((a,c)=>(0,d.jsx)("li",{className:(0,B.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",b&&"font-mono"),children:a},`${c}-${a}`))})}let O=a=>a?.flatMap(a=>"text"===a.type?[a.text]:[])??[],P=a=>a?.flatMap(a=>"image"===a.type?[a.src]:[])??[];a.s(["BotTool",0,function(a){let b=K[a.tool.name]??F;return(0,d.jsx)(b,{...a})},"toolIcon",0,M]),c()}catch(a){c(a)}},!1),107340,a=>{"use strict";var b=a.i(164831);let c={name:"cable",size:24,node:[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]};c.node;let d=(0,b.default)(c);a.s(["McpMark",0,d],107340)},86922,a=>{"use strict";var b=a.i(164831);let c={name:"cpu",size:24,node:[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]};c.node;let d=(0,b.default)(c);a.s(["MemoryMark",0,d],86922)},600154,a=>{"use strict";let b=a.i(689594).BookMarked;a.s(["SkillsMark",0,b])},847799,a=>{"use strict";var b=a.i(164831);let c={name:"file-pen",size:24,node:[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],aliases:["file-edit"]};c.node;let d=(0,b.default)(c);a.s(["FilePen",0,d],847799)},925039,a=>{"use strict";var b=a.i(164831);let c={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};c.node;let d=(0,b.default)(c);a.s(["Flag",0,d],925039)},62140,a=>{"use strict";var b=a.i(164831);let c={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};c.node;let d=(0,b.default)(c);a.s(["ListChecks",0,d],62140)},875160,a=>{"use strict";var b=a.i(702918);a.s(["Loader2",()=>b.default])},328423,a=>{"use strict";var b=a.i(164831);let c={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};c.node;let d=(0,b.default)(c);a.s(["MessageSquare",0,d],328423)},674746,a=>{"use strict";var b=a.i(164831);let c={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};c.node;let d=(0,b.default)(c);a.s(["Send",0,d],674746)},357307,a=>{"use strict";var b=a.i(164831);let c={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};c.node;let d=(0,b.default)(c);a.s(["Terminal",0,d],357307)}];
2
-
3
- //# sourceMappingURL=_0cvjbuz._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[704974,a=>{"use strict";var b=a.i(187924),c=a.i(497895);a.s(["Swatch",0,function({color:a,picked:d,onPick:e}){return(0,b.jsx)("button",{type:"button",onClick:e,"aria-label":a??"Follow the theme",style:a?{backgroundColor:a}:void 0,className:(0,c.cn)("size-5 rounded-full outline-none transition-transform hover:scale-110 focus-visible:ring-3 focus-visible:ring-ring/50",!a&&"bg-foreground",d&&"ring-2 ring-foreground/40 ring-offset-2 ring-offset-background")})}])},888396,a=>{"use strict";var b=a.i(572131);a.s(["useDraft",0,function(a,c,{min:d=1}={}){let[e,f]=(0,b.useState)(a),[g,h]=(0,b.useState)(a);return a!==g&&(h(a),f(a)),{value:e,set:f,commit:()=>{let b=e.trim();if(b.length<d)return f(a);f(b),b!==a&&c(b)},onKeyDown:a=>{"Enter"!==a.key||a.nativeEvent.isComposing||a.currentTarget.blur()}}}])},862966,a=>{"use strict";var b=a.i(572131),c=a.i(988712),d=a.i(426618),e=a.i(664565),f=a.i(487610),g=a.i(561311);let h=Promise.resolve(),i=(0,e.withMiddleware)(c.u,a=>(c,e,i)=>{let j,k=(0,b.useRef)(!1),{cache:l,initialSize:m=1,revalidateAll:n=!1,persistSize:o=!1,revalidateFirstPage:p=!0,revalidateOnMount:q=!1,parallel:r=!1}=i,[,,,s]=d.a.get(d.o);try{(j=(0,d.s)(c?c(0,null):null)[0])&&(j=g.INFINITE_PREFIX+j)}catch(a){}let[t,u,v]=(0,d.c)(l,j),w=(0,b.useCallback)(()=>(0,d.i)(t()._l)?m:t()._l,[l,j,m]);(0,f.useSyncExternalStore)((0,b.useCallback)(a=>j?v(j,()=>{a()}):()=>{},[l,j]),w,w);let x=(0,b.useCallback)(()=>{let a=t()._l;return(0,d.i)(a)?m:a},[j,m]),y=(0,b.useRef)(x());(0,d.u)(()=>{if(!k.current){k.current=!0;return}j&&u({_l:o?y.current:x()})},[j,l]);let z=q&&!k.current,A=a(j,async a=>{let b=t()._i,f=t()._r,g=d.a.get(l),h=g[8],j=()=>g[8]!==h;u({_r:d.U});let k=[],m=x(),[o]=(0,d.c)(l,a),q=o().data,v=[],w=null;for(let a=0;a<m;++a){let[g,h]=(0,d.s)(c(a,r?null:w));if(!g)break;let[m,o]=(0,d.c)(l,g),t=m().data,u=n||b||(0,d.i)(t)||p&&!a&&!(0,d.i)(q)||z||q&&!(0,d.i)(q[a])&&!i.compare(q[a],t);if(e&&("function"==typeof f?f(t,h):u)){let b=async()=>{if(g in s){let a=s[g];delete s[g],t=await a}else t=await e(h);j()||o({data:t,_k:h}),k[a]=t};r?v.push(b):await b()}else k[a]=t;r||(w=t)}return r&&await Promise.all(v.map(a=>a())),j()||u({_i:d.U}),k},i),B=(0,b.useCallback)(function(a,b){let c="boolean"==typeof b?{revalidate:b}:b||{},e=!1!==c.revalidate;return j?(e&&((0,d.i)(a)?u({_i:!0,_r:c.revalidate}):u({_i:!1,_r:c.revalidate})),arguments.length?A.mutate(a,{...c,revalidate:e}):A.mutate()):h},[j,l]),C=(0,b.useCallback)(a=>{let b;if(!j)return h;let[,e]=(0,d.c)(l,j);if((0,d.e)(a)?b=a(x()):"number"==typeof a&&(b=a),"number"!=typeof b)return h;e({_l:b}),y.current=b;let f=[],[g]=(0,d.c)(l,j),i=null;for(let a=0;a<b;++a){let[b]=(0,d.s)(c(a,i)),[e]=(0,d.c)(l,b),h=b?e().data:d.U;if((0,d.i)(h))return B(g().data);f.push(h),i=h}return B(f)},[j,l,B,x]);return{size:x(),setSize:C,mutate:B,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}});var j=a.i(287702),k=a.i(759497);a.s(["useServerPages",0,function(a){let c=a.size??j.PAGE_SIZE,{key:d}=a,{data:e,error:f,isLoading:g,isValidating:h,setSize:l,mutate:m}=i((a,b)=>(0,k.resolveKey)(d(a,b)),k.fetchRoute,{dedupingInterval:500,revalidateOnMount:!0,revalidateOnFocus:!0,revalidateOnReconnect:!0,focusThrottleInterval:1e3,revalidateFirstPage:!1,...a.swr}),n=e??[],o=n.flat(),p=n.at(-1),q=void 0!==p&&p.length>=c,r=(0,b.useRef)(0),s=h&&n.length>0&&r.current>n.length,t=(0,b.useRef)({isValidating:h,setSize:l,pages:n.length});t.current={isValidating:h,setSize:l,pages:n.length};let u=(0,k.resolveKey)(d(0,null)),v="string"==typeof u?u:u?.url;(0,b.useEffect)(()=>{if(v)return(0,k.registerPagedReader)({url:v,refresh:()=>m()})},[v,m]);let w=function(a,c={}){let{enabled:d=!0,margin:e="600px",revision:f}=c,g=(0,b.useRef)(a);g.current=a;let h=(0,b.useRef)(null),i=(0,b.useRef)(null),j=(0,b.useCallback)(a=>{h.current=a},[]);return(0,b.useEffect)(()=>{i.current?.disconnect();let a=h.current;if(a&&d)return i.current=new IntersectionObserver(([a])=>{a.isIntersecting&&g.current()},{root:function(a){let b=a.parentElement;for(;b;){let{overflowY:a}=getComputedStyle(b);if(("auto"===a||"scroll"===a)&&b.scrollHeight>b.clientHeight)return b;b=b.parentElement}return null}(a),rootMargin:e}),i.current.observe(a),()=>i.current?.disconnect()},[d,e,f]),j}(()=>{let a=t.current;a.isValidating||(r.current=a.pages+1,a.setSize(a.pages+1))},{enabled:q,revision:`${n.length}:${h}`});return{items:o,isLoading:g,isLoadingMore:s,error:f,hasMore:q,sentinelRef:w,refresh:()=>m()}}],862966)},951675,a=>{"use strict";var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.default)(c);a.s(["Trash2",0,d],951675)}];
2
-
3
- //# sourceMappingURL=_0fafgvl._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[703228,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(263359),f=a.i(689594),g=a.i(707963),h=a.i(141146),i=a.i(998697),j=a.i(483138),k=a.i(69095),l=a.i(696732),m=a.i(567826),n=a.i(403512),o=a.i(233540),p=a.i(917256),q=a.i(951675),r=a.i(201661),s=a.i(572131),t=a.i(767561),u=a.i(340695),v=a.i(316474),w=a.i(205522),x=a.i(846991),y=a.i(446181),z=a.i(950463),A=a.i(280281),B=a.i(621958),C=a.i(546893),D=a.i(287702),E=a.i(619477),F=a.i(167744),G=a.i(134285),H=a.i(496849),I=a.i(684e3),J=a.i(313237),K=a.i(759497),L=a.i(497895),M=b([x]);[x]=M.then?(await M)():M;let W={browser:l.Globe,computer:e.AppWindow,"find-skills":o.Search,"interactive-page":m.MousePointer2,"skill-creator":p.SquarePen};function N({skill:a}){let[b,c]=(0,J.useServerAction)(G.deleteSkillAction,{onOk:()=>(0,K.revalidate)(t.queryKey.skills)}),[e]=(0,J.useServerAction)(H.setSkillDisabledAction,{onOk:()=>(0,K.revalidate)(t.queryKey.skills)}),g=async()=>{await y.notify.confirm({title:`Delete ${a.name}?`,description:"Every file in this skill is deleted for good.",okText:"Delete",destructive:!0})&&b(a.dir)},i="default"===a.source&&W[a.dir]||f.BookMarked;return(0,d.jsxs)("div",{className:"group flex items-center transition-colors hover:bg-muted/50",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>{var b;return b=a,y.notify.component({className:"sm:max-w-4xl",renderer:()=>(0,d.jsx)(O,{skill:b})})},className:"flex min-w-0 flex-1 items-center gap-3 py-4 pl-4 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,d.jsx)("span",{className:(0,L.cn)("grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",a.disabled&&"opacity-45"),children:(0,d.jsx)(i,{className:"size-4"})}),(0,d.jsxs)("span",{className:(0,L.cn)("min-w-0 flex-1 space-y-0.5",a.disabled&&"opacity-45"),children:[(0,d.jsx)("span",{className:"block truncate text-sm font-medium",children:a.name}),(0,d.jsx)("span",{className:"line-clamp-2 text-xs leading-relaxed text-muted-foreground",children:a.description})]}),(0,d.jsx)(h.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 group-hover:text-foreground"})]}),(0,d.jsxs)("div",{className:"mr-4 ml-5 flex w-18 shrink-0 items-center justify-end gap-3",children:[(0,d.jsx)(A.Switch,{checked:!a.disabled,onCheckedChange:b=>e(a.source,a.dir,!b),"aria-label":`${a.name} on or off`,className:"shrink-0"}),"custom"===a.source?(0,d.jsx)(u.Button,{size:"icon-sm",variant:"ghost",loading:c,onClick:g,className:"shrink-0 text-muted-foreground",children:(0,d.jsx)(q.Trash2,{})}):(0,d.jsx)("span",{className:"size-7 shrink-0"})]})]})}function O({skill:a}){let[b,c]=(0,s.useState)(""),[e,f]=(0,s.useState)("SKILL.md");return(0,d.jsx)(E.SettingDialogContent,{title:a.name,description:(0,d.jsx)(P,{skill:a,path:e??b}),children:(0,d.jsxs)("div",{className:"flex h-[36rem] divide-x divide-border/60 overflow-hidden rounded-xl border border-border/60 bg-background",children:[(0,d.jsxs)("div",{className:"flex w-44 shrink-0 flex-col overflow-y-auto bg-muted/20 py-1",children:[b&&(0,d.jsxs)("button",{type:"button",onClick:()=>c(b.split("/").slice(0,-1).join("/")),className:"mx-1 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/50 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,d.jsx)(g.ChevronLeft,{className:"size-3 shrink-0"}),(0,d.jsx)("span",{className:"truncate",children:b.split("/").pop()})]}),(0,d.jsx)(R,{source:a.source,dir:a.dir,path:b,current:e,onPick:a=>{let d=b?`${b}/${a.name}`:a.name;"dir"===a.kind?c(d):f(d)}})]}),(0,d.jsx)("div",{className:"min-w-0 flex-1 overflow-y-auto",children:e?(0,d.jsx)(T,{source:a.source,dir:a.dir,path:e}):(0,d.jsx)("p",{className:"p-6 text-sm text-muted-foreground/60",children:"Pick a file"})})]})})}function P({skill:a,path:b}){if(!a)return(0,d.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground/60",children:"Pick a skill"});let c=[a.name,...b.split("/").filter(Boolean)];return(0,d.jsx)("span",{className:"flex min-w-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:c.map((a,b)=>(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[b>0&&(0,d.jsx)(h.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,d.jsx)("span",{className:(0,L.cn)("truncate",b===c.length-1&&"text-foreground"),children:a})]},`${b}-${a}`))})}function Q({icon:a,label:b,active:c,hasChildren:e,onClick:f}){return(0,d.jsxs)("button",{type:"button",onClick:f,className:(0,L.cn)("mx-1 flex items-center gap-1.5 rounded-md px-2 py-1 text-left text-xs outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",c?"bg-secondary text-foreground":"text-muted-foreground hover:bg-muted/50 hover:text-foreground"),children:[(0,d.jsx)("span",{className:"shrink-0 text-muted-foreground/70 [&>svg]:size-3",children:a}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate",children:b}),e&&(0,d.jsx)(h.ChevronRight,{className:"size-3 shrink-0 text-muted-foreground/50"})]})}function R({source:a,dir:b,path:c,current:e,onPick:f}){let{data:g,isLoading:h,error:l}=(0,K.useServerRoute)(t.queryKey.skillNode(a,b,c));return l?(0,d.jsx)("p",{className:"p-3 font-mono text-xs text-destructive",children:l.message}):h||!g?(0,d.jsxs)("div",{className:"space-y-2 p-2",children:[(0,d.jsx)(z.Skeleton,{className:"h-5 w-full"}),(0,d.jsx)(z.Skeleton,{className:"h-5 w-4/5"})]}):"dir"!==g.kind?null:(0,d.jsxs)(d.Fragment,{children:[g.entries.map(a=>(0,d.jsx)(Q,{icon:"dir"===a.kind?(0,d.jsx)(k.Folder,{}):a.name.endsWith(".md")?(0,d.jsx)(j.FileText,{}):(0,d.jsx)(i.File,{}),label:a.name,hasChildren:"dir"===a.kind,active:(c?`${c}/${a.name}`:a.name)===e,onClick:()=>f(a)},a.name)),0===g.entries.length&&(0,d.jsx)("p",{className:"p-3 text-xs text-muted-foreground/60",children:"Empty folder"})]})}function S({content:a}){let b=/^---\r?\n([\s\S]*?)\r?\n---[ \t]*\r?\n?/.exec(a),c=b?.[1].trim(),e=b?a.slice(b[0].length):a;return(0,d.jsxs)("div",{className:"min-w-0",children:[c&&(0,d.jsx)("pre",{className:"border-b border-border/60 bg-muted/20 px-5 py-3 font-mono text-[11px] leading-relaxed whitespace-pre-wrap text-muted-foreground",children:c}),(0,d.jsx)("div",{className:"px-5 py-4 text-sm leading-relaxed",children:(0,d.jsx)(x.Markdown,{children:e})})]})}function T({source:a,dir:b,path:c}){let{data:e,isLoading:f,error:g}=(0,K.useServerRoute)(t.queryKey.skillNode(a,b,c));if(g)return(0,d.jsx)("p",{className:"p-4 font-mono text-xs text-destructive",children:g.message});if(f||!e)return(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(z.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(z.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(z.Skeleton,{className:"h-4 w-5/6"})]});if("file"!==e.kind)return null;let h=c.split("/").pop()??"";return(0,d.jsxs)("div",{children:[(0,d.jsxs)("div",{className:"sticky top-0 z-20 flex items-center justify-between gap-2 border-b border-border/60 bg-background/90 px-5 py-2 font-mono text-[11px] text-muted-foreground backdrop-blur",children:[(0,d.jsx)("span",{className:"truncate",children:h}),(0,d.jsx)("span",{className:"shrink-0",children:(0,L.formatBytes)(e.size)})]}),null===e.content?(0,d.jsx)("p",{className:"px-5 py-4 text-sm text-muted-foreground/60",children:"Not a text file — the agent can still read it from disk."}):h.toLowerCase().endsWith(".md")?(0,d.jsx)(S,{content:e.content}):(0,d.jsx)("pre",{className:"overflow-x-auto px-5 py-4 font-mono text-[13px] leading-relaxed whitespace-pre text-foreground/90",children:e.content})]})}function U(){return y.notify.component({className:"sm:max-w-lg",renderer:({close:a})=>(0,d.jsx)(V,{onDone:a})})}function V({onDone:a}){let[b,c]=(0,s.useState)("write"),[e,f]=(0,s.useState)(""),[g,h]=(0,s.useState)(""),[i,j]=(0,s.useState)(""),[k,l]=(0,s.useState)(null),[m,o]=(0,s.useState)(!1),p=(0,s.useRef)(null),q={errorMessage:!1,onOk:()=>{(0,K.revalidate)(t.queryKey.skills),a()}},[x,y,,z]=(0,J.useServerAction)(F.createSkillAction,q),[A,G,,H]=(0,J.useServerAction)(I.uploadSkillAction,q),M=y||G,N="write"===b?z:H,O=!M&&("write"===b?e.trim()&&g.trim()&&i.trim():null!==k),P=async()=>{var a;!O||("write"===b?x({name:e.trim(),description:g.trim(),content:i}):k&&A({fileName:k.name,base64:await (a=k,new Promise((b,c)=>{let d=new FileReader;d.onload=()=>{let a=d.result;b(a.slice(a.indexOf(",")+1))},d.onerror=()=>c(d.error),d.readAsDataURL(a)}))}))},Q=a=>{let b=a?.[0]??null;b&&l(b)};return(0,d.jsxs)(E.SettingDialogContent,{title:"New skill",description:"Instructions the agent loads by name when a task calls for them.",footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(u.Button,{variant:"ghost",onClick:a,children:"Cancel"}),(0,d.jsxs)(u.Button,{disabled:!O,loading:M,onClick:P,children:[!M&&("write"===b?(0,d.jsx)(n.Plus,{}):(0,d.jsx)(r.Upload,{})),"write"===b?"Create":"Upload"]})]}),children:[(0,d.jsxs)(B.Tabs,{value:b,onValueChange:a=>c(a),children:[(0,d.jsxs)(B.TabsList,{className:"w-full",children:[(0,d.jsx)(B.TabsTrigger,{value:"write",children:"Write"}),(0,d.jsx)(B.TabsTrigger,{value:"upload",children:"Upload"})]}),(0,d.jsxs)(B.TabsContent,{value:"write",className:"space-y-5 pt-4",children:[(0,d.jsxs)(v.Field,{children:[(0,d.jsx)(v.FieldLabel,{htmlFor:"skill-name",children:"Name"}),(0,d.jsxs)(v.FieldContent,{children:[(0,d.jsx)(w.Input,{id:"skill-name",value:e,onChange:a=>f(a.target.value),placeholder:"deploy-checklist",spellCheck:!1,autoFocus:!0}),(0,d.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[D.PATHS.skills.custom,"/",e.trim()||"…","/SKILL.md"]})]})]}),(0,d.jsxs)(v.Field,{children:[(0,d.jsx)(v.FieldLabel,{htmlFor:"skill-description",children:"Description"}),(0,d.jsx)(v.FieldContent,{children:(0,d.jsx)(w.Input,{id:"skill-description",value:g,onChange:a=>h(a.target.value),placeholder:"When to use it — this is how the agent decides to load it"})})]}),(0,d.jsxs)(v.Field,{children:[(0,d.jsx)(v.FieldLabel,{htmlFor:"skill-content",children:"Content"}),(0,d.jsx)(C.Textarea,{id:"skill-content",value:i,onChange:a=>j(a.target.value),placeholder:"Markdown. The steps, the rules, the examples.",className:"min-h-40 resize-none font-mono text-xs"})]})]}),(0,d.jsxs)(B.TabsContent,{value:"upload",className:"space-y-4 pt-4",children:[(0,d.jsxs)("button",{type:"button",onClick:()=>p.current?.click(),onDragOver:a=>{a.preventDefault(),o(!0)},onDragLeave:()=>o(!1),onDrop:a=>{a.preventDefault(),o(!1),Q(a.dataTransfer.files)},className:(0,L.cn)("flex w-full flex-col items-center gap-2 rounded-xl border border-dashed px-6 py-10 text-center outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",m?"border-foreground/60 bg-muted/60":"border-border hover:bg-muted/40"),children:[(0,d.jsx)(r.Upload,{className:"size-5 text-muted-foreground"}),k?(0,d.jsxs)("span",{className:"text-sm",children:[k.name,(0,d.jsx)("span",{className:"ml-2 font-mono text-[11px] text-muted-foreground",children:(0,L.formatBytes)(k.size)})]}):(0,d.jsx)("span",{className:"text-sm text-muted-foreground",children:"Drop a file here, or click to choose"})]}),(0,d.jsx)("input",{ref:p,type:"file",accept:".md,.zip,.skill",className:"hidden",onChange:a=>Q(a.target.files)}),(0,d.jsxs)("div",{className:"space-y-1 text-xs text-muted-foreground",children:[(0,d.jsx)("p",{className:"font-medium text-foreground/80",children:"File requirements"}),(0,d.jsxs)("p",{children:["A ",(0,d.jsx)("span",{className:"font-mono",children:".md"})," file needs a YAML block with the skill's name and description."]}),(0,d.jsxs)("p",{children:["A ",(0,d.jsx)("span",{className:"font-mono",children:".zip"})," or"," ",(0,d.jsx)("span",{className:"font-mono",children:".skill"})," archive needs a SKILL.md inside — the rest of its folder comes along."]})]})]})]}),N&&(0,d.jsx)("p",{className:"font-mono text-xs text-destructive",children:N})]})}a.s(["SkillsSetting",0,function(){let[a,b]=(0,s.useState)(""),{data:c,isLoading:e,error:f}=(0,K.useServerRoute)(t.queryKey.skills),g=c??[];if(e)return(0,d.jsx)(E.SettingSkeleton,{rows:4});if(f)return(0,d.jsx)(E.SettingError,{message:f.message});let h=a.trim().toLowerCase(),i=g.filter(a=>!h||`${a.name} ${a.description}`.toLowerCase().includes(h)),j=g.filter(a=>!a.disabled).length;return(0,d.jsxs)(E.SettingScreen,{footer:(0,d.jsxs)(E.SettingRailNote,{children:[g.filter(a=>"default"===a.source).length," shipped · ",g.filter(a=>"custom"===a.source).length," ","installed"]}),children:[(0,d.jsx)(E.SettingToolbar,{count:`${j} on \xb7 ${g.length-j} off`,children:(0,d.jsx)(E.SettingFilter,{value:a,onChange:b,placeholder:"Filter skills"})}),(0,d.jsx)(E.SettingGroup,{label:"Custom",hint:"yours — added here · wins a name clash",children:(0,d.jsx)(E.SettingItems,{addRow:{label:"Add skill",onClick:U},children:i.filter(a=>"custom"===a.source).map(a=>(0,d.jsx)(N,{skill:a},`custom/${a.dir}`))})}),(0,d.jsx)(E.SettingGroup,{label:"Default",hint:"ships with the app · switch off, can't edit or delete",children:(0,d.jsx)(E.SettingItems,{children:i.filter(a=>"default"===a.source).map(a=>(0,d.jsx)(N,{skill:a},`default/${a.dir}`))})})]})},"openSkillCreate",0,U]),c()}catch(a){c(a)}},!1),167744,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f223826fe55fdfafd2f33fdec504bd70254486458",b.callServer,void 0,b.findSourceMapURL,"createSkillAction");a.s(["createSkillAction",0,c])},134285,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f645e3a0411cf62852954bcee1ff43b8656370846",b.callServer,void 0,b.findSourceMapURL,"deleteSkillAction");a.s(["deleteSkillAction",0,c])},496849,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f841017ea7ba9139eea1aaaf4933a489729043092",b.callServer,void 0,b.findSourceMapURL,"setSkillDisabledAction");a.s(["setSkillDisabledAction",0,c])},684e3,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fde03c0c0843f568a21bc904f706a56e5bddb1f69",b.callServer,void 0,b.findSourceMapURL,"uploadSkillAction");a.s(["uploadSkillAction",0,c])},263359,a=>{"use strict";var b=a.i(164831);let c={name:"app-window",size:24,node:[["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}],["path",{d:"M10 4v4",key:"pp8u80"}],["path",{d:"M2 8h20",key:"d11cs7"}],["path",{d:"M6 4v4",key:"1svtjw"}]]};c.node;let d=(0,b.default)(c);a.s(["AppWindow",0,d],263359)},567826,a=>{"use strict";var b=a.i(164831);let c={name:"mouse-pointer-2",size:24,node:[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z",key:"edeuup"}]]};c.node;let d=(0,b.default)(c);a.s(["MousePointer2",0,d],567826)},917256,a=>{"use strict";var b=a.i(164831);let c={name:"square-pen",size:24,node:[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],aliases:["pen-box","edit","pen-square"]};c.node;let d=(0,b.default)(c);a.s(["SquarePen",0,d],917256)},201661,a=>{"use strict";var b=a.i(164831);let c={name:"upload",size:24,node:[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]]};c.node;let d=(0,b.default)(c);a.s(["Upload",0,d],201661)}];
2
-
3
- //# sourceMappingURL=_0j4v8of._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[673701,a=>{"use strict";var b=a.i(187924),c=a.i(676459),d=a.i(926184),e=a.i(400187),f=a.i(497895);let g=(0,e.cva)("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",{variants:{variant:{default:"*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",secondary:"*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",muted:"*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",tinted:"*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",outline:"*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",ghost:"border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",destructive:"*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"}},defaultVariants:{variant:"default"}});(0,e.cva)("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",{variants:{side:{top:"top-0 -translate-y-3/4",bottom:"bottom-0 translate-y-3/4"},align:{start:"left-3",end:"right-3"}},defaultVariants:{side:"bottom",align:"end"}}),a.s(["Bubble",0,function({variant:a="default",align:c="start",className:d,...e}){return(0,b.jsx)("div",{"data-slot":"bubble","data-variant":a,"data-align":c,className:(0,f.cn)(g({variant:a}),d),...e})},"BubbleContent",0,function({className:a,render:b,...e}){var g;return g={defaultTagName:"div",props:(0,c.mergeProps)({className:(0,f.cn)("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",a)},e),render:b,state:{slot:"bubble-content"}},(0,d.useRenderElement)(g.defaultTagName??"div",g,g)}],673701)},613350,a=>{"use strict";var b=a.i(187924),c=a.i(589027),d=a.i(572131),e=a.i(497895);a.s(["FoldedText",0,function({text:a,subject:f,clamp:g="line-clamp-3",tall:h="max-h-40",className:i}){let[j,k]=(0,d.useState)(!1),[l,m]=(0,d.useState)(!1),n=(0,d.useRef)(null);return(0,d.useEffect)(()=>k(!1),[a]),(0,d.useEffect)(()=>{let a=n.current;a&&!j&&m(a.scrollHeight>a.clientHeight+1)},[j,a]),(0,b.jsxs)("div",{className:(0,e.cn)("flex items-start gap-1",i),children:[(0,b.jsx)("p",{ref:n,className:(0,e.cn)("min-w-0 flex-1 text-[13px] leading-snug break-keep",j?(0,e.cn)(h,"overflow-y-auto scrollbar-none"):g),children:a}),(l||j)&&(0,b.jsx)("button",{type:"button",onClick:()=>k(a=>!a),"aria-label":j?`Fold the ${f}`:`Read the whole ${f}`,className:"shrink-0 rounded-md p-0.5 opacity-60 outline-none transition-opacity hover:opacity-100 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,b.jsx)(c.ChevronDown,{className:(0,e.cn)("size-3.5",j&&"rotate-180")})})]})}])},467268,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(327598),f=a.i(752562),g=a.i(707963),h=a.i(141146),i=a.i(231500),j=a.i(585650),k=a.i(425256),l=a.i(875160),m=a.i(403512),n=a.i(474215),o=a.i(572131),p=a.i(767561),q=a.i(673701),r=a.i(340695),s=a.i(613350),t=a.i(846991),u=a.i(545097),v=a.i(546893),w=a.i(864037),x=a.i(287702),y=a.i(247118),z=a.i(383072),A=a.i(411509),B=a.i(913834),C=a.i(42380),D=a.i(16716),E=a.i(394440),F=a.i(28996),G=a.i(369768),H=a.i(199169),I=a.i(576271),J=a.i(313237),K=a.i(759497),L=a.i(497895),M=a.i(324835),N=a.i(777279),O=a.i(8468),P=b([t,D,G,O]);[t,D,G,O]=P.then?(await P)():P;let ap=(0,o.memo)(function(){let a=(0,N.useBotTasks)(),{data:b}=(0,K.useServerRoute)(p.queryKey.bot),[c,e]=(0,o.useState)(!1),[f,g]=(0,o.useState)(null),[h,i]=(0,o.useState)(!1),j=[...a].reverse(),k=f?j.find(a=>a.id===f)??null:null,[l,m]=function(){let[a,b]=(0,o.useState)(null),c=(0,o.useRef)([]),d=(0,o.useRef)(!1),e=(0,o.useRef)([]);(0,o.useEffect)(()=>()=>{for(let a of e.current)clearTimeout(a)},[]);let f=(0,o.useRef)(()=>{});f.current=()=>{if(d.current)return;let a=c.current.shift();a&&(d.current=!0,b(a),e.current.push(setTimeout(()=>{b(null),e.current.push(setTimeout(()=>{d.current=!1,f.current()},260))},3e3)))};let g=(0,o.useCallback)(a=>{let b=c.current.findIndex(b=>b.bot===a.bot);b>=0?c.current[b]=a:c.current.push(a),f.current()},[]);return[a,g]}(),n=(0,o.useRef)(null),q=(0,o.useRef)(new Map);(0,o.useEffect)(()=>{if(!N.botTasks.primed())return;let b=new Map(j.map(a=>[a.id,a.status])),c=n.current;n.current=b;let d=new Map;for(let b of(0,N.latestPerBot)(a))b.line&&d.set(b.bot.name,b.line.id);let e=q.current;if(q.current=d,c){for(let b of(0,N.latestPerBot)(a)){if("working"!==b.task.status)continue;let a=b.line?.id;a&&e.get(b.bot.name)!==a&&m({bot:b.bot.name,label:b.task.label,what:ae(b.task).text,live:!0})}for(let a of j){let b=c.get(a.id);b!==a.status&&(void 0===b&&"working"!==a.status&&a.relayed||m({bot:a.bot.name,label:a.label,...function(a,b){let c=a.bot.name;return"working"===a.status?{what:b?`${c} took this on`:`${c} picked it back up`,live:!0}:"waiting"===a.status?(0,A.isBudgetAsk)(a.ask)?{what:`${c} is out of steps`}:{what:`${c} is asking`,tone:L.WAITING_INK}:"failed"===a.status?{what:`${c} could not finish`,tone:"text-destructive"}:{what:`${c} finished`}}(a,void 0===b)}))}}},[a,m]);let r=(0,o.useRef)(new Set);(0,o.useEffect)(()=>{if(!k||k.relayed||"done"!==k.status&&"failed"!==k.status)return;let a=`${k.id}@${(0,H.toDate)(k.updatedAt).getTime()}`;r.current.has(a)||(r.current.add(a),(0,y.markReportedAction)([k.id]).then(I.unwrapResult).then(()=>(0,K.revalidate)(p.queryKey.tasks)).catch(b=>{r.current.delete(a),w.toast.add({type:"error",title:"Could not mark the task as read",description:(0,L.errorToString)(b)})}))},[k]);let s=a.filter(a=>"working"===a.status).length,t=j.filter(aq),u=t.length,v=t.map(a=>a.bot).filter((a,b,c)=>c.findIndex(b=>b.name===a.name)===b),x=(0,o.useCallback)(()=>i(!1),[]);return(0,d.jsx)("div",{className:"pointer-events-none absolute right-5 bottom-5 z-10 flex w-132 max-w-[calc(100vw-2.5rem)] flex-col items-end gap-2",children:c?(0,d.jsx)("div",{className:"pointer-events-auto flex max-h-[min(44rem,78vh)] w-full animate-in flex-col overflow-hidden rounded-3xl bg-background/75 shadow-2xl shadow-black/6 ring-1 ring-border/50 backdrop-blur-xl fade-in slide-in-from-bottom-1 duration-200",children:k?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(Y,{task:k,onBack:()=>g(null),onClose:()=>e(!1)}),(0,d.jsx)(af,{task:k,className:"min-h-0 flex-1"}),(0,d.jsx)(E.TaskReply,{task:{id:k.id,label:k.label,bot:k.bot.name,ask:function(a){if(!a.ask?.question)return a.ask;let b=a.lines.at(-1);return b&&(0,N.isOutcome)(b)&&b.text===a.ask.question?{...a.ask,question:""}:a.ask}(k)},status:"working"===k.status?"running":k.status,lines:k.lines,className:"mx-3 mb-2 shrink-0"})]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(X,{count:a.length,pending:u,composing:h,onCompose:()=>i(!0),onClose:()=>h?i(!1):e(!1)}),h?(0,d.jsx)(U,{bots:b,onDone:x}):j.length?(0,d.jsx)(ac,{tasks:j,onPick:g}):(0,d.jsx)(aa,{bots:b}),!h&&(0,d.jsx)(ab,{})]})}):(0,d.jsx)(Q,{bots:b,rows:t,waiting:v,count:a.length,busy:s,pending:u,beat:l,composing:h,onCompose:()=>i(!0),onCloseCompose:x,onPick:a=>{g(a),e(!0)},onOpen:()=>{f||1!==t.length||g(t[0].id),e(!0)}})})}),aq=a=>"waiting"===a.status;function Q({bots:a,rows:b,waiting:c,count:e,busy:g,pending:h,beat:i,composing:j,onCompose:k,onCloseCompose:m,onPick:o,onOpen:p}){let q=function({count:a,busy:b,pending:c}){return c>0?{text:1===c?"waiting on you":`${c} waiting on you`,tone:L.WAITING_INK,shine:"amber"}:b>0?{text:1===b?"working":`${b} running`,tone:"text-muted-foreground",shine:"muted"}:a>0?{text:"all done",tone:"text-muted-foreground"}:{text:"no jobs yet",tone:"text-muted-foreground"}}({count:e,busy:g,pending:h}),r=j||h>0;return(0,d.jsxs)("div",{className:(0,L.cn)("pointer-events-auto w-fit max-w-full overflow-hidden bg-background/78 ring-1 ring-border/50 backdrop-blur-md transition-shadow duration-300",r?"min-w-96 rounded-3xl shadow-lg shadow-black/8":"rounded-full shadow-sm shadow-black/3"),children:[(0,d.jsx)("div",{className:(0,L.cn)("grid transition-[grid-template-rows] duration-300 ease-out",r?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:(0,d.jsx)("div",{className:"min-h-0 overflow-hidden",inert:!r,children:j?(0,d.jsx)(U,{bots:a,onDone:m}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("p",{className:"flex items-center gap-2 px-3 py-2 font-mono text-[10px] tracking-wide text-muted-foreground",children:[(0,d.jsxs)("span",{className:"flex-1",children:["needs you · ",h]}),(0,d.jsx)(S,{onClick:k})]}),(0,d.jsx)("div",{className:"px-1.5 pb-2",children:b.map(a=>(0,d.jsx)(ad,{task:a,onPick:()=>o(a.id)},a.id))}),(0,d.jsx)("span",{className:"block h-1.5"})]})})}),(0,d.jsxs)("div",{className:(0,L.cn)("flex items-center gap-2 px-3 py-1.5"),children:[(0,d.jsxs)("button",{type:"button",onClick:p,"aria-label":e?`Tasks (${e})`:"Bots",className:"flex min-w-0 flex-1 items-center gap-2 rounded-full text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)(V,{bots:a,waiting:c,only:i?.bot}),(0,d.jsxs)("span",{className:"flex h-7 min-w-0 flex-1 items-center",children:[(0,d.jsx)(R,{on:!!i,children:(0,d.jsxs)("span",{className:"flex items-center gap-1.5 whitespace-nowrap",children:[(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:i?.label}),i?.live?(0,d.jsx)(u.default,{text:i.what,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 truncate text-[14px] leading-5 tracking-[-0.15px]"}):(0,d.jsx)("span",{className:(0,L.cn)("min-w-0 truncate text-[14px] leading-5 tracking-[-0.15px]",i?.tone??"text-foreground"),children:i?.what})]})}),(0,d.jsx)(R,{on:!i,children:q.shine?(0,d.jsx)("span",{className:(0,L.cn)("block","amber"===q.shine?"[--rest:var(--color-amber-700)] [--shine:var(--color-amber-400)] dark:[--rest:var(--color-amber-400)] dark:[--shine:var(--color-amber-100)]":"[--rest:var(--muted-foreground)] [--shine:var(--foreground)]"),children:(0,d.jsx)(u.default,{text:q.text,speed:2.6,color:"var(--rest)",shineColor:"var(--shine)",className:"truncate text-[14px] leading-5 tracking-[-0.15px]"})}):(0,d.jsx)("span",{className:(0,L.cn)("block animate-in truncate text-[14px] leading-5 tracking-[-0.15px] fade-in duration-300",q.tone),children:q.text},q.text)})]})]}),j&&(0,d.jsx)(T,{onClick:m,label:"Cancel the message",children:(0,d.jsx)(n.X,{className:"size-3.5"})}),!j&&0===h&&g>0&&(0,d.jsx)(l.Loader2,{className:"size-4 shrink-0 animate-spin text-muted-foreground/70"}),!j&&0===h&&0===g&&e>0&&(0,d.jsx)(f.Check,{className:"size-4 shrink-0 text-muted-foreground/60"})]})]})}function R({on:a,children:b}){return(0,d.jsx)("span",{className:(0,L.cn)("grid min-w-0 transition-[grid-template-columns,opacity] duration-200 ease-out",a?"grid-cols-[1fr] opacity-100":"grid-cols-[0fr] opacity-0"),children:(0,d.jsx)("span",{className:"min-w-0 overflow-hidden",children:b})})}function S({onClick:a}){return(0,d.jsx)(T,{onClick:a,label:"Message a bot",children:(0,d.jsx)(m.Plus,{className:"size-4"})})}function T({onClick:a,label:b,children:c}){return(0,d.jsx)("button",{type:"button",onClick:a,"aria-label":b,className:"grid size-7 shrink-0 place-items-center rounded-full text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:c})}function U({bots:a,onDone:b}){let[c,f]=(0,o.useState)(null),[i,j]=(0,o.useState)(""),[k,m]=(0,J.useServerAction)(z.startTaskAction,{onOk:()=>{(0,K.revalidate)(p.queryKey.tasks),b()}}),n=a?.length?a.map(a=>({name:a.name,icon:a.icon})):[{name:A.DEFAULT_BOT.name,icon:A.DEFAULT_BOT.icon}],q=()=>{c&&i.trim()&&!m&&k(c.name,i.trim())};return c?(0,d.jsxs)("div",{className:"flex min-h-32 flex-col pb-3",children:[(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-2",children:[(0,d.jsx)("button",{type:"button",onClick:()=>f(null),"aria-label":"Choose a different bot",className:"grid size-6 shrink-0 place-items-center rounded-lg text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,d.jsx)(g.ChevronLeft,{className:"size-3.5"})}),(0,d.jsx)(B.BotMark,{size:22,seed:c.name,vary:c.name,color:c.icon?.color,shape:c.icon?.shape,outline:c.icon?.outline,className:"shrink-0"}),(0,d.jsxs)("span",{className:"min-w-0 flex-1 truncate text-[12.5px] font-medium",children:["To ",c.name]})]}),(0,d.jsxs)("form",{onSubmit:a=>{a.preventDefault(),q()},className:"mx-3 mt-auto flex items-end gap-1 rounded-2xl bg-background py-2 pr-2 pl-3 ring-1 ring-border/80 transition-shadow focus-within:ring-ring/60",children:[(0,d.jsx)(v.Textarea,{value:i,rows:1,autoFocus:!0,disabled:m,onChange:a=>j(a.target.value),onKeyDown:a=>{"Enter"!==a.key||a.shiftKey||a.nativeEvent.isComposing||229===a.keyCode||(a.preventDefault(),q())},placeholder:`What should ${c.name} do? It cannot hear the call, so say the whole job.`,"aria-label":`Message for ${c.name}`,className:"max-h-32 min-h-15 flex-1 resize-none border-0 bg-transparent px-0 py-0 text-[13px] leading-5 shadow-none focus-visible:ring-0 dark:bg-transparent"}),(0,d.jsx)(r.Button,{type:"submit",size:"icon-sm",variant:i.trim()?"default":"ghost",disabled:!i.trim()||m,"aria-label":"Send",className:"rounded-full",children:m?(0,d.jsx)(l.Loader2,{className:"animate-spin"}):(0,d.jsx)(e.ArrowUp,{})})]})]}):(0,d.jsxs)("div",{className:"min-h-32 pb-3",children:[(0,d.jsx)("p",{className:"px-3 pt-3 pb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground",children:"message a bot"}),(0,d.jsx)("div",{className:"px-1",children:n.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>f(a),className:"flex w-full items-center gap-2.5 rounded-xl px-2 py-1.5 text-left outline-none transition-colors hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)(B.BotMark,{size:22,seed:a.name,vary:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,className:"shrink-0"}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px]",children:a.name}),(0,d.jsx)(h.ChevronRight,{className:"size-3.5 shrink-0 text-muted-foreground/50"})]},a.name))})]})}let ar=["alto","brio","cinder","delta"].map((a,b)=>({key:a,seed:a,color:M.MARK_PALETTE[Math.floor(b*M.MARK_PALETTE.length/4)],shape:M.MARK_SHAPES[b%M.MARK_SHAPES.length],outline:void 0}));function V({bots:a,waiting:b=[],only:c}){let e=a?.length?a.map(a=>({key:a.name,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,notify:!1})):ar.map(a=>({...a,notify:!1})),f=b.map(a=>({key:a.name,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,notify:!0})),g=[...f,...e.filter(a=>!f.some(b=>b.key===a.key))].map(a=>({...a,standIn:!1})),h=ar.filter(a=>!g.some(b=>b.key===a.key)).slice(0,Math.max(0,3-g.length)).map(a=>({...a,notify:!1,standIn:!0})),i=[...g,...h].slice(0,4);return(0,d.jsx)("span",{className:(0,L.cn)("flex shrink-0 items-center",!a?.length&&!f.length&&"opacity-50"),children:i.map((a,b)=>(0,d.jsx)("span",{className:(0,L.cn)("origin-right transition-[margin,opacity,transform] duration-300 ease-out",b>0&&"-ml-2",a.standIn&&"opacity-35",c&&a.key!==c&&"-ml-[28px] scale-50 opacity-0"),style:{zIndex:i.length-b},children:(0,d.jsx)(B.BotMark,{size:28,seed:a.seed,vary:a.seed,color:a.color,shape:a.shape,outline:a.outline,notify:a.notify})},a.key))})}function W({onClick:a}){return(0,d.jsx)("button",{type:"button",onClick:a,"aria-label":"Fold the room away",className:"grid size-7 shrink-0 place-items-center rounded-full bg-muted text-foreground outline-none transition-colors hover:bg-muted-foreground/20 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,d.jsx)(n.X,{className:"size-3.5"})})}function X({count:a,pending:b,composing:c,onCompose:e,onClose:f}){return(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3.5 pt-3 pb-1.5",children:[(0,d.jsx)("span",{className:"text-[13px] font-medium",children:"Tasks"}),a>0&&!c&&(0,d.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground tabular-nums",children:b>0?`${b} for you \xb7 ${a}`:a}),(0,d.jsx)("span",{className:"flex-1"}),!c&&(0,d.jsx)(S,{onClick:e}),(0,d.jsx)(W,{onClick:f})]})}function Y({task:a,onBack:b,onClose:c}){return(0,d.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,d.jsx)("button",{type:"button",onClick:b,"aria-label":"Back to the list",className:"shrink-0 rounded-md p-1 text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,d.jsx)(g.ChevronLeft,{className:"size-4"})}),(0,d.jsx)(B.BotMark,{size:22,seed:a.bot.name,vary:a.id,color:a.bot.icon?.color,shape:a.bot.icon?.shape,outline:a.bot.icon?.outline,notify:!1}),(0,d.jsxs)("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium",children:[a.label,(0,d.jsx)("span",{title:a.id,className:"ml-1.5 font-mono text-[10px] font-normal text-muted-foreground/60",children:a.id.slice(0,8)})]}),(0,d.jsx)(Z,{usage:a.tokens}),(0,d.jsx)($,{task:a}),(0,d.jsx)(_,{task:a}),(0,d.jsx)(W,{onClick:c})]})}function Z({usage:a}){let b=a.input+a.output;return b?(0,d.jsx)("span",{title:`in ${(0,L.formatCount)(a.input)} \xb7 out ${(0,L.formatCount)(a.output)}`,className:"shrink-0 font-mono text-[10px] text-muted-foreground/70 tabular-nums",children:(0,L.formatCount)(b)}):null}function $({task:a}){let{contextTokens:b,contextBudget:c}=a;if(!b||!c)return null;let e=Math.min(1,b/c);return(0,d.jsx)("span",{title:`Context ${(0,L.formatCount)(b)} of ${(0,L.formatCount)(c)} — it summarizes itself here`,className:"block h-[3px] w-9 shrink-0 overflow-hidden rounded-full bg-muted",children:(0,d.jsx)("span",{className:(0,L.cn)("block h-full rounded-full",e>.9?"bg-amber-500/80":"bg-muted-foreground/70"),style:{width:`${Math.max(4,Math.round(100*e))}%`}})})}let as={working:"text-muted-foreground",waiting:L.WAITING_INK,done:"text-foreground",failed:"text-destructive"};function _({task:a}){let b="done"===a.status&&a.relayed?"text-muted-foreground":as[a.status];return"working"===a.status?(0,d.jsx)(u.default,{text:"working",speed:2.2,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"shrink-0 font-mono text-[10px]"}):(0,d.jsx)("span",{className:(0,L.cn)("flex shrink-0 items-center gap-1.5 font-mono text-[10px]",b),children:a.status})}function aa({bots:a}){return(0,d.jsxs)("div",{className:"flex flex-col items-center gap-3 px-6 pt-3 pb-4 text-center",children:[(0,d.jsx)(V,{bots:a}),a?.length?(0,d.jsx)("p",{className:"text-[12px] text-muted-foreground",children:"Nothing handed over yet — ask for something that takes a while."}):(0,d.jsxs)("p",{className:"text-[12px] text-muted-foreground",children:["Thursday hands work to ",A.DEFAULT_BOT.name," until you make bots of your own in Settings › Bots."]})]})}function ab(){return(0,d.jsx)("div",{className:"flex shrink-0 justify-end px-3 pb-2.5",children:(0,d.jsxs)("button",{type:"button",onClick:()=>(0,F.openSettings)("tasks"),className:"flex items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)(k.History,{className:"size-3"}),"History"]})})}let at=[{id:"you",label:"needs you",holds:aq},{id:"working",label:"working",holds:a=>"working"===a.status},{id:"done",label:"done",holds:()=>!0}];function ac({tasks:a,onPick:b}){let c=new Map;for(let b of a){let a=at.find(a=>a.holds(b))??at[2],d=c.get(a.id);d?d.push(b):c.set(a.id,[b])}return(0,d.jsx)("div",{className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 pt-1 pb-1 scrollbar-none",children:at.map((a,e)=>{let f=c.get(a.id)??[];return f.length?(0,d.jsxs)(o.Fragment,{children:[(0,d.jsxs)("p",{className:(0,L.cn)("px-2.5 pb-1 font-mono text-[10px] text-muted-foreground",0===e?"pt-1":"pt-3"),children:[a.label," · ",f.length]}),f.map(a=>(0,d.jsx)(ad,{task:a,onPick:()=>b(a.id)},a.id))]},a.id):null})})}function ad({task:a,onPick:b}){let c=aq(a),e=a.lines.at(-1),f=(0,o.useMemo)(()=>ae(a),[a.status,a.outcome,a.relayed,a.ask,e?.id]),[g,h]=(0,E.useAnswerTask)(),[j,k]=(0,o.useState)(null),m="waiting"===a.status?a.ask?.options??[]:[],n=(0,A.isBudgetAsk)(a.ask);return(0,d.jsxs)("div",{className:"rounded-xl transition-colors hover:bg-muted/60",children:[(0,d.jsxs)("button",{type:"button",onClick:b,className:"flex w-full items-center gap-2.5 rounded-xl px-2 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)("span",{className:"relative flex size-8 shrink-0 items-center justify-center overflow-visible",title:a.bot.name,children:(0,d.jsx)(B.BotMark,{size:32,seed:a.bot.name,vary:a.id,color:a.bot.icon?.color,shape:a.bot.icon?.shape,outline:a.bot.icon?.outline,state:"working"===a.status?"thinking":"idle",notify:c})}),(0,d.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,d.jsxs)("span",{className:"flex items-center justify-between gap-2",children:[(0,d.jsx)("span",{className:(0,L.cn)("min-w-0 truncate text-[14px] leading-5 tracking-[-0.15px]",c?"text-foreground":"text-foreground/80"),children:a.label}),(0,d.jsx)(C.BotRoster,{bots:(0,N.rosterOf)(a),taskId:a.id}),(0,d.jsx)("span",{className:"flex-1"}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] leading-4 text-muted-foreground/70 tabular-nums",children:(0,H.shortAgo)(a.updatedAt)})]}),(0,d.jsxs)("span",{className:"mt-px flex h-4 items-center gap-1.5",children:["working"===a.status&&(0,d.jsx)(l.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground/70"}),"working"===a.status?(0,d.jsx)(u.default,{text:f.text,speed:2.2,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:(0,L.cn)("min-w-0 flex-1 truncate text-[12px] leading-4",f.tone)}):(0,d.jsx)("span",{className:(0,L.cn)("min-w-0 flex-1 truncate text-[12px] leading-4",f.tone),children:f.text})]})]})]}),m.length>0&&(0,d.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-0.5 pr-2 pb-2 pl-12.5",children:m.map(b=>(0,d.jsxs)(r.Button,{size:"sm",variant:"outline",loading:j===b,disabled:h,onClick:async()=>{k(b),await g(a,b),k(null)},className:(0,L.cn)("h-7 gap-1.5 rounded-full bg-background px-3 text-[12px]",!n&&"border-amber-500/35"),children:[n&&b===A.TASK_CONTINUE&&(0,d.jsx)(i.ChevronsRight,{className:"size-3.5 text-muted-foreground"}),b,n&&b===A.TASK_CONTINUE&&(0,d.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground",children:["+",x.BOT_RUN.steps," steps"]})]},b))})]})}function ae(a){if("waiting"===a.status&&a.ask)return(0,A.isBudgetAsk)(a.ask)?{text:(0,L.plainText)(a.outcome??a.ask.question),tone:"text-muted-foreground"}:{text:a.ask.question,tone:L.WAITING_INK};if("failed"===a.status)return{text:(0,L.plainText)(a.outcome??"Failed"),tone:"text-destructive"};if("done"===a.status)return{text:(0,L.plainText)(a.outcome??"Done"),tone:a.relayed?"text-muted-foreground":"text-foreground"};let b=(0,N.lastSaid)(a);return b?{text:"tool"===b.kind&&b.tool?b.tool.note??`${b.tool.name} \xb7 ${b.tool.input}`:b.text,tone:"text-muted-foreground"}:{text:`${a.bot.name} is taking it on…`,tone:"text-muted-foreground italic"}}function af({task:a,className:b}){let c=(0,o.useRef)(null),e=(0,o.useRef)(!0);return(0,o.useEffect)(()=>{e.current=!0},[a.id]),(0,o.useEffect)(()=>{let a=c.current;a&&e.current&&(a.scrollTop=a.scrollHeight)},[a.lines,a.status]),(0,d.jsx)(G.FileViewer,{children:(0,d.jsxs)("div",{ref:c,onScroll:a=>{let b=a.currentTarget;e.current=b.scrollHeight-b.scrollTop-b.clientHeight<24},className:(0,L.cn)("max-h-[64vh] space-y-3 overflow-y-auto px-4 pt-6 pb-4 mask-[linear-gradient(to_bottom,transparent,black_2rem)] scrollbar-none",b),children:[(0,d.jsx)(ag,{task:a}),(0,N.threadItems)(a).map(b=>"invite"===b.kind?(0,d.jsx)(ah,{from:b.from,to:b.to},b.key):(0,d.jsx)(al,{group:b.group,task:a},b.key)),"working"===a.status&&0===a.lines.length&&(0,d.jsx)(u.default,{text:`${a.bot.name} is taking it on…`,speed:2.2,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"block px-1 font-mono text-[10px]"})]})})}function ag({task:a}){return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(ah,{from:au,to:a.bot}),(0,d.jsx)(aj,{children:(0,d.jsx)(q.Bubble,{align:"end",className:"max-w-full",children:(0,d.jsx)(q.BubbleContent,{className:"rounded-tr-md py-2 pr-2 pl-3.5",children:(0,d.jsx)(s.FoldedText,{text:a.request,subject:"request"})})})})]})}let au={name:"Thursday"};function ah({from:a,to:b}){return(0,d.jsx)("div",{className:"flex animate-in justify-center fade-in duration-300",children:(0,d.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 font-mono text-[10px] text-muted-foreground",children:[(0,d.jsx)(ai,{bot:a}),(0,d.jsx)("span",{className:"shrink-0 text-muted-foreground/70",children:"invited"}),(0,d.jsx)(ai,{bot:b})]})})}function ai({bot:a}){return(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,d.jsx)(B.BotMark,{size:15,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,notify:!1,className:"shrink-0"}),(0,d.jsx)("span",{className:"truncate",children:a.name})]})}function aj({children:a}){return(0,d.jsx)(ak,{side:"end",name:"Thursday",mark:(0,d.jsx)(B.BotMark,{size:26,seed:"thursday",notify:!1,className:"mt-1 shrink-0"}),children:a})}function ak({side:a,mark:b,name:c,children:e}){return(0,d.jsxs)("div",{className:(0,L.cn)("flex gap-2.5","end"===a&&"flex-row-reverse"),children:[b,(0,d.jsxs)("div",{className:(0,L.cn)("flex min-w-0 flex-1 flex-col gap-1.5 [&>*+*]:max-w-[80%]","end"===a&&"items-end"),children:[(0,d.jsx)("p",{className:"max-w-[80%] truncate px-1 font-mono text-[10px] text-muted-foreground",children:c}),e]})]})}function al({group:a,task:b}){return a.lines[0]?.kind==="user"?(0,d.jsx)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,d.jsx)(aj,{children:a.lines.map(a=>(0,d.jsx)(q.Bubble,{align:"end",className:"max-w-full",children:(0,d.jsx)(q.BubbleContent,{className:"rounded-tr-md px-3.5 text-[13px] leading-snug break-keep",children:a.text})},a.id))})}):(0,d.jsx)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,d.jsx)(ak,{side:a.bot.name===b.bot.name?"start":"end",name:a.bot.name,mark:(0,d.jsx)(B.BotMark,{size:26,seed:a.bot.name,vary:b.id,color:a.bot.icon?.color,shape:a.bot.icon?.shape,outline:a.bot.icon?.outline,notify:!1,className:"mt-1 shrink-0"}),children:(function(a){let b=[];for(let c of a){let a="tool"===c.kind&&c.tool?"tools":"said",d=b.at(-1);d&&d.kind===a?d.lines.push(c):b.push({kind:a,key:c.id,lines:[c]})}return b})(a.lines).map(a=>"tools"===a.kind?(0,d.jsx)(ao,{lines:a.lines,taskId:b.id},a.key):a.lines.map(a=>(0,d.jsx)(am,{line:a,taskId:b.id},a.id)))})})}function am({line:a,taskId:b}){if("tool"===a.kind&&a.tool)return(0,d.jsx)(O.BotTool,{tool:a.tool,taskId:b});if("note"===a.kind)return(0,d.jsxs)("details",{className:"w-full py-1 text-muted-foreground",children:[(0,d.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-2.5 outline-none [&::-webkit-details-marker]:hidden",children:[(0,d.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[10px]",children:"Compacted — it goes on from its summary"}),(0,d.jsx)("span",{className:"h-px flex-1 bg-border"})]}),(0,d.jsx)("p",{className:"mt-2 rounded-xl bg-muted/40 px-3 py-2 text-[11px] leading-relaxed whitespace-pre-wrap break-keep",children:a.text})]});if(!(0,N.isOutcome)(a))return(0,d.jsx)("p",{className:"px-1 text-[12.5px] leading-relaxed break-keep text-muted-foreground",children:a.text});if(a.options)return(0,d.jsxs)("div",{className:"w-fit max-w-full space-y-1.5 rounded-2xl bg-amber-500/8 px-3 py-2 ring-1 ring-amber-500/25",children:[(0,d.jsx)("p",{className:"text-[13px] leading-snug break-keep",children:a.text}),a.options.length>0&&(0,d.jsx)("p",{className:"flex flex-wrap gap-1",children:a.options.map(a=>(0,d.jsx)("span",{className:"rounded-full bg-background/70 px-2 py-0.5 font-mono text-[10px] text-muted-foreground",children:a},a))})]});let c="error"===a.kind;return(0,d.jsxs)("div",{className:"min-w-0 px-1",children:[c&&(0,d.jsxs)("p",{className:"mb-1.5 flex items-center gap-1.5 font-mono text-[10px] text-destructive",children:[(0,d.jsx)(n.X,{className:"size-3 shrink-0"}),"Could not finish"]}),(0,d.jsx)(t.Markdown,{className:(0,L.cn)("overflow-x-auto text-[13px] leading-relaxed break-keep [&_h1]:text-[15px] [&_h2]:text-[14px] [&_h3]:text-[13px] [&_h3]:font-semibold [&_li]:my-0.5 [&_table]:text-[12px] [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",c&&"text-destructive"),children:a.text}),(0,d.jsxs)("div",{className:"mt-2 flex items-center gap-2",children:[(0,d.jsx)(D.PathChips,{text:a.text,className:"min-w-0"}),!c&&(0,d.jsx)("span",{className:"ml-auto shrink-0",children:(0,d.jsx)(an,{text:a.text})})]})]})}function an({text:a}){let[b,c]=(0,o.useState)(!1),e=(0,o.useRef)(null);return(0,o.useEffect)(()=>()=>{e.current&&clearTimeout(e.current)},[]),(0,d.jsx)("button",{type:"button","aria-label":"Copy the report",onClick:async()=>{try{await navigator.clipboard.writeText(a),c(!0),e.current&&clearTimeout(e.current),e.current=setTimeout(()=>c(!1),1400)}catch(a){w.toast.add({type:"error",title:"Could not copy the report",description:(0,L.errorToString)(a)})}},className:"grid size-5 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:b?(0,d.jsx)(f.Check,{className:"size-3"}):(0,d.jsx)(j.Copy,{className:"size-3"})})}function ao({lines:a,taskId:b}){return(0,d.jsxs)("div",{className:"flex w-full flex-col gap-0.5 rounded-2xl bg-muted/40 p-1",children:[a.length>1&&(0,d.jsxs)("p",{className:"px-2 py-1 font-mono text-[10px] text-muted-foreground",children:[a.length," steps"]}),a.map(a=>a.tool?(0,d.jsx)(O.BotTool,{tool:a.tool,taskId:b,collapsed:!0},a.id):null)]})}a.s(["BotRoom",0,ap,"Conversation",0,af]),c()}catch(a){c(a)}},!1),42380,a=>{"use strict";var b=a.i(187924),c=a.i(913834);a.s(["BotRoster",0,function({bots:a,taskId:d}){return a.length<2?null:(0,b.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",title:a.map(a=>a.name).join(", "),children:[(0,b.jsx)("span",{className:"flex items-center",children:a.slice(0,3).map(a=>(0,b.jsx)(c.BotMark,{size:18,seed:a.name,vary:d,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,notify:!1,className:"-ml-[3px] rounded-[7px] ring-2 ring-background first:ml-0"},a.name))}),(0,b.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground",children:[a.length," bots"]})]})}])},16716,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(998697),f=a.i(840260),g=a.i(930345),h=a.i(707938),i=a.i(576509),j=a.i(483138),k=a.i(904340),l=a.i(572131),m=a.i(369768),n=a.i(559553),o=a.i(497895),p=b([m]);[m]=p.then?(await p)():p;let q={markdown:j.FileText,csv:i.FileSpreadsheet,json:h.FileJson,text:k.FileType,image:g.FileImage};a.s(["PathChips",0,function({text:a,className:b}){let c=(0,l.useMemo)(()=>(0,n.pathsIn)(a),[a]);return c.length?(0,d.jsx)("div",{className:(0,o.cn)("flex flex-wrap gap-1.5",b),children:c.map(a=>{let b,c=a.split("/").pop()??a,g=(b=(0,n.viewKindOf)(a),"frame"===b?a.toLowerCase().endsWith(".pdf")?j.FileText:f.FileCode:q[b]??e.File);return(0,d.jsxs)(m.FileLink,{path:a,className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted/70 py-1 pr-2.5 pl-2 font-mono text-[11px] text-foreground/80 outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)(g,{className:"size-3 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"truncate",children:c})]},a)})}):null}]),c()}catch(a){c(a)}},!1),394440,a=>{"use strict";var b=a.i(187924),c=a.i(327598),d=a.i(231500),e=a.i(164831);let f={name:"corner-down-left",size:24,node:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]};f.node;let g=(0,e.default)(f);var h=a.i(875160),i=a.i(19895),j=a.i(474215),k=a.i(572131),l=a.i(767561),m=a.i(340695),n=a.i(613350),o=a.i(545097),p=a.i(546893),q=a.i(287702),r=a.i(405050);let s=(0,r.createServerReference)("7f6297eba857045d97a0b713eb1ebfbc273f39ed1d",r.callServer,void 0,r.findSourceMapURL,"answerTaskAction");var t=a.i(978349),u=a.i(411509),v=a.i(777279),w=a.i(313237),x=a.i(759497),y=a.i(497895);function z(){let[a,b]=(0,w.useServerAction)(s,{onOk:()=>(0,x.revalidate)(l.queryKey.tasks)});return[async(b,c)=>{let d=c.trim();if(!d)return!1;try{let c=await a(b.id,d);return v.screenActs.announce({kind:"answered",id:c.id,label:c.label,answer:d}),!0}catch{return!1}},b]}a.s(["TaskReply",0,function({task:a,status:e,lines:f=[],className:r}){let[s,A]=(0,k.useState)(()=>v.taskDrafts.get(a.id));(0,k.useEffect)(()=>A(v.taskDrafts.get(a.id)),[a.id]);let B=b=>{A(b),v.taskDrafts.set(a.id,b)},[C,D]=z(),[E,F]=(0,w.useServerAction)(t.cancelTaskAction,{onOk:a=>{(0,x.revalidate)(l.queryKey.tasks),v.screenActs.announce({kind:"stopped",id:a.id,label:a.label})}}),G=D||F,[H,I]=(0,k.useState)(!1),[J,K]=(0,k.useState)(null);(0,k.useEffect)(()=>{I(!1),K(null)},[a.id]),(0,k.useEffect)(()=>{"running"!==e&&K(null)},[e]),(0,k.useEffect)(()=>{J&&f.some(a=>"user"===a.kind&&a.text===J)&&K(null)},[f,J]);let L=async b=>{!G&&await C(a,b)&&(B(""),"running"===e&&(K(b.trim()),I(!1)))},M="waiting"===e?a.ask:null,N=(0,u.isBudgetAsk)(M),O=M?M.options.length?"Or put it another way…":"Your answer":"running"===e?`What's off? ${a.bot} reads this before its next step`:"Anything more? It picks up where it left off",P=(0,b.jsxs)("form",{onSubmit:a=>{a.preventDefault(),L(s)},className:"flex items-end gap-1 rounded-2xl bg-background py-1.5 pr-1.5 pl-3.5 ring-1 ring-border/80 transition-shadow focus-within:ring-ring/60",children:[(0,b.jsx)(p.Textarea,{value:s,rows:1,disabled:G,autoFocus:"running"===e,onChange:a=>B(a.target.value),onKeyDown:a=>{"Escape"===a.key&&"running"===e?I(!1):"Enter"!==a.key||a.shiftKey||a.nativeEvent.isComposing||229===a.keyCode||(a.preventDefault(),L(s))},placeholder:O,"aria-label":`Message for ${a.label}`,className:"max-h-32 min-h-0 flex-1 resize-none border-0 bg-transparent px-0 py-1 text-[13px] leading-5 shadow-none focus-visible:ring-0 dark:bg-transparent"}),"running"===e&&(0,b.jsx)(m.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:G,onClick:()=>I(!1),"aria-label":"Never mind",className:"text-muted-foreground",children:(0,b.jsx)(j.X,{})}),(0,b.jsx)(m.Button,{type:"submit",size:"icon-sm",variant:s.trim()?"default":"ghost",disabled:!s.trim()||G,"aria-label":"Send",className:"rounded-full",children:D?(0,b.jsx)(h.Loader2,{className:"animate-spin"}):(0,b.jsx)(c.ArrowUp,{})})]});return"running"!==e||H?M?(0,b.jsxs)("div",{className:(0,y.cn)("space-y-2.5 rounded-2xl px-3.5 py-3 ring-1",N?"bg-muted/40 ring-border/50":"bg-amber-500/8 ring-amber-500/25",r),children:[(0,b.jsxs)("p",{className:"flex items-center gap-1.5 font-mono text-[10px] text-muted-foreground",children:[(0,b.jsx)("span",{className:"shrink-0",children:"To"}),(0,b.jsx)("span",{className:"truncate text-foreground",children:a.bot}),(0,b.jsx)("span",{className:"shrink-0 text-muted-foreground/50",children:"·"}),(0,b.jsx)("span",{className:"truncate",children:a.label})]}),M.question&&(0,b.jsx)(n.FoldedText,{text:M.question,subject:"message",clamp:"line-clamp-6",tall:"max-h-56"}),M.options.length>0&&(0,b.jsx)("div",{className:"flex flex-wrap gap-1.5",children:M.options.map(a=>(0,b.jsxs)(m.Button,{size:"sm",variant:"outline",disabled:G,onClick:()=>L(a),className:"h-7 gap-1.5 rounded-full bg-background px-3 text-[12px]",children:[N&&a===u.TASK_CONTINUE&&(0,b.jsx)(d.ChevronsRight,{className:"size-3.5 text-muted-foreground"}),a,N&&a===u.TASK_CONTINUE&&(0,b.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground",children:["+",q.BOT_RUN.steps," steps"]})]},a))}),P,(0,b.jsx)("button",{type:"button",disabled:G,onClick:()=>E(a.id),className:"font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",children:"Stop this task instead"})]}):(0,b.jsx)("div",{className:r,children:P}):(0,b.jsxs)("div",{className:(0,y.cn)("flex items-center gap-2 rounded-2xl bg-muted/40 py-1.5 pr-1.5 pl-3.5 ring-1 ring-border/50",r),children:[J?(0,b.jsxs)("p",{className:"flex min-w-0 flex-1 items-center gap-2 text-[12.5px] leading-5 text-muted-foreground",children:[(0,b.jsx)(h.Loader2,{className:"size-3 shrink-0 animate-spin"}),(0,b.jsx)("span",{className:"shrink-0",children:"Before its next step:"}),(0,b.jsx)(o.default,{text:J,speed:2.2,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 truncate"})]}):(0,b.jsx)(o.default,{text:`${a.bot} is on it — Thursday steers it by voice.`,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 flex-1 truncate text-[12.5px] leading-5 break-keep"}),(0,b.jsxs)(m.Button,{type:"button",size:"sm",variant:"ghost",disabled:G,onClick:()=>I(!0),className:"h-7 shrink-0 gap-1.5 rounded-full px-2.5 text-[12px]",children:[(0,b.jsx)(g,{className:"size-3.5"}),"Step in"]}),(0,b.jsx)("span",{className:"h-4 w-px shrink-0 bg-border"}),(0,b.jsx)(m.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:G,onClick:()=>E(a.id),"aria-label":"Stop this task",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:F?(0,b.jsx)(h.Loader2,{className:"animate-spin"}):(0,b.jsx)(i.Square,{className:"size-3"})})]})},"useAnswerTask",0,z],394440)},247118,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f26ed34628aa747f4041e3b9f2728a7554015982d",b.callServer,void 0,b.findSourceMapURL,"markReportedAction");a.s(["markReportedAction",0,c])},383072,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f9fe74599a3a42962491399d55e9fc8e17f39eb51",b.callServer,void 0,b.findSourceMapURL,"startTaskAction");a.s(["startTaskAction",0,c])},978349,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fc799595327176b60f83fed3c679f1a687ecca4fe",b.callServer,void 0,b.findSourceMapURL,"cancelTaskAction");a.s(["cancelTaskAction",0,c])},777279,a=>{"use strict";var b=a.i(572131);let c=[],d=!1,e=new Set;function f(a,b){let c=a=>({name:a,icon:b?.find(b=>b.name===a)?.icon??null}),d=c(a.bot),e=[],f=new Map,g=new Map;for(let b of a.lines){let a=b.bot?c(b.bot):d,h=b.parent&&g.get(b.parent)?.name?d:null;switch(b.kind){case"user":e.push({id:b.id,bot:d,to:null,text:b.text,kind:"user"});break;case"text":e.push({id:b.id,bot:a,to:h,text:b.text,kind:"say"});break;case"note":e.push({id:b.id,bot:a,to:h,text:b.text,kind:"note"});break;case"tool":f.set(b.callId,e.length),e.push({id:b.id,bot:a,to:h,text:b.note??b.input,kind:"tool",tool:{name:b.name,input:b.input,note:b.note,path:b.path,callId:b.callId}});break;case"tool-result":{let a=f.get(b.callId),c=void 0===a?void 0:e[a];c?.tool&&void 0!==a&&(e[a]={...c,tool:{...c.tool,results:b.results,more:b.more}});break}case"ask":{let d=c(b.to);g.set(b.callId,d),e.push({id:b.id,bot:a,to:d,text:b.text,kind:"ask"});break}case"ask-result":{let c=g.get(b.callId);c&&b.text&&e.push({id:b.id,bot:c,to:a,text:b.text,kind:"ask"});break}case"waiting":e.push({id:b.id,bot:a,to:null,text:b.question,kind:"result",options:b.options})}}if("failed"===a.status&&a.outcome)e.push({id:`${a.id}-end`,bot:d,to:null,text:a.outcome,kind:"error"});else if("done"===a.status||"waiting"===a.status){let b=e.at(-1);b&&"say"===b.kind&&b.text===a.outcome&&(e[e.length-1]={...b,kind:"result"})}return{id:a.id,request:a.request,label:a.label,bot:d,lines:e,status:"running"===a.status?"working":a.status,outcome:a.outcome,ask:a.ask,relayed:a.reported,tokens:a.tokens,contextTokens:a.contextTokens,contextBudget:a.contextBudget,updatedAt:a.updatedAt}}let g=new Map,h=new Set,i=[];a.s(["botTasks",0,{sync(a,b){for(let g of(d=!0,c=[...a].reverse().map(a=>f(a,b)).slice(-30),e))g()},primed:()=>d},"isOutcome",0,a=>"result"===a.kind||"error"===a.kind,"lastSaid",0,function(a){for(let b=a.lines.length-1;b>=0;b--){let c=a.lines[b];if("user"!==c.kind&&"note"!==c.kind)return c}return null},"latestPerBot",0,function(a){let b=new Map;for(let c of a)for(let a of(b.has(c.bot.name)||b.set(c.bot.name,{bot:c.bot,task:c,line:null,open:0}),c.lines))"user"!==a.kind&&"note"!==a.kind&&b.set(a.bot.name,{bot:a.bot,task:c,line:a,open:b.get(a.bot.name)?.open??0});for(let c of a){if("working"!==c.status)continue;let a=b.get(c.bot.name);a&&(a.open+=1)}return[...b.values()]},"rosterOf",0,function(a){let b=[a.bot];for(let c of a.lines)b.some(a=>a.name===c.bot.name)||b.push(c.bot);return b},"screenActs",0,{announce(a){for(let b of h)b(a)},subscribe:a=>(h.add(a),()=>{h.delete(a)})},"taskDrafts",0,{get:a=>g.get(a)??"",set(a,b){b?g.set(a,b):g.delete(a)},typing:a=>(g.get(a)?.trim().length??0)>0},"taskFromRow",0,f,"threadItems",0,function(a){let b=new Set([a.bot.name]),c=[];for(let d of function(a){let b=[];for(let c of a){let a=b.at(-1);if(a&&a.bot.name===c.bot.name&&a.to?.name===c.to?.name&&"user"===a.lines[0].kind==("user"===c.kind)){a.lines.push(c);continue}b.push({key:c.id,bot:c.bot,to:c.to,lines:[c]})}return b}(a.lines))d.to&&!b.has(d.to.name)&&(b.add(d.to.name),c.push({kind:"invite",key:`${d.key}-joins`,from:d.bot,to:d.to})),b.add(d.bot.name),c.push({kind:"group",key:d.key,group:d});return c},"useBotTasks",0,function(){return(0,b.useSyncExternalStore)(a=>(e.add(a),()=>e.delete(a)),()=>c,()=>i)}])},327598,a=>{"use strict";var b=a.i(164831);let c={name:"arrow-up",size:24,node:[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]};c.node;let d=(0,b.default)(c);a.s(["ArrowUp",0,d],327598)},231500,a=>{"use strict";var b=a.i(164831);let c={name:"chevrons-right",size:24,node:[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]};c.node;let d=(0,b.default)(c);a.s(["ChevronsRight",0,d],231500)},585650,a=>{"use strict";var b=a.i(164831);let c={name:"copy",size:24,node:[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]};c.node;let d=(0,b.default)(c);a.s(["Copy",0,d],585650)},840260,a=>{"use strict";var b=a.i(164831);let c={name:"file-code",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]};c.node;let d=(0,b.default)(c);a.s(["FileCode",0,d],840260)},930345,a=>{"use strict";var b=a.i(164831);let c={name:"file-image",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["circle",{cx:"10",cy:"12",r:"2",key:"737tya"}],["path",{d:"m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22",key:"wt3hpn"}]]};c.node;let d=(0,b.default)(c);a.s(["FileImage",0,d],930345)},576509,a=>{"use strict";var b=a.i(164831);let c={name:"file-spreadsheet",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]]};c.node;let d=(0,b.default)(c);a.s(["FileSpreadsheet",0,d],576509)},904340,a=>{"use strict";var b=a.i(164831);let c={name:"file-type",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M11 18h2",key:"12mj7e"}],["path",{d:"M12 12v6",key:"3ahymv"}],["path",{d:"M9 13v-.5a.5.5 0 0 1 .5-.5h5a.5.5 0 0 1 .5.5v.5",key:"qbrxap"}]]};c.node;let d=(0,b.default)(c);a.s(["FileType",0,d],904340)},19895,a=>{"use strict";var b=a.i(164831);let c={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};c.node;let d=(0,b.default)(c);a.s(["Square",0,d],19895)}];
2
-
3
- //# sourceMappingURL=_0l81bzy._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[210799,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(589027),f=a.i(875160),g=a.i(272944),h=a.i(19895),i=a.i(951675),j=a.i(572131),k=a.i(767561),l=a.i(340695),m=a.i(676504),n=a.i(446181),o=a.i(545097),p=a.i(950463),q=a.i(978349),r=a.i(43081),s=a.i(944803),t=a.i(411509),u=a.i(913834),v=a.i(467268),w=a.i(42380),x=a.i(8468),y=a.i(777279),z=a.i(619477),A=a.i(199169),B=a.i(313237),C=a.i(862966),D=a.i(759497),E=a.i(497895),F=a.i(394440),G=b([v,x]);[v,x]=G.then?(await G)():G;let L="w-36";function H({task:a,bots:b,open:c,onToggle:k,onStop:n,onDelete:p}){var q,r;let s,x="running"===a.status||"waiting"===a.status,z="running"===a.status,B=(0,j.useMemo)(()=>(0,y.taskFromRow)(a,b),[a,b]),C=function(a){if("waiting"===a.status&&a.ask)return(0,t.isBudgetAsk)(a.ask)?{text:(0,E.plainText)(a.outcome??a.ask.question),tone:"text-muted-foreground"}:{text:a.ask.question,tone:E.WAITING_INK};if("failed"===a.status)return{text:(0,E.plainText)(a.outcome??"Failed"),tone:"text-destructive"};if("done"===a.status)return{text:(0,E.plainText)(a.outcome??"Done"),tone:a.reported?"text-muted-foreground":"text-foreground/80"};for(let b=a.lines.length-1;b>=0;b--){let c=a.lines[b];if("tool"===c.kind)return{text:c.note??c.input,tone:"text-muted-foreground",tool:c.name,shine:!0};if("text"===c.kind)return{text:c.text,tone:"text-muted-foreground",shine:!0};if("user"===c.kind||"waiting"===c.kind)break}return{text:`${a.bot} is taking it on…`,tone:"text-muted-foreground italic",shine:!0}}(a),D=a.tokens.input+a.tokens.output;return(0,d.jsxs)("div",{className:"group/row relative transition-colors hover:bg-muted/50",children:[(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,d.jsxs)("button",{type:"button",onClick:k,className:"flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,d.jsx)(u.BotMark,{size:40,seed:a.bot,vary:a.id,...(q=a.bot,r=b,s=r?.find(a=>a.name===q)?.icon,{color:s?.color,shape:s?.shape,outline:s?.outline}),state:z?"thinking":"idle",notify:"waiting"===a.status,className:"shrink-0"}),(0,d.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,d.jsxs)("span",{className:"flex items-center gap-2",children:[(0,d.jsx)("span",{className:"truncate text-sm font-medium",children:a.label}),(0,d.jsx)(w.BotRoster,{bots:(0,y.rosterOf)(B),taskId:a.id}),z&&(0,d.jsx)(f.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),C&&(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] leading-snug",children:[C.tool&&(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:C.tool}),C.shine?(0,d.jsx)(o.default,{text:C.text,speed:2.2,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 truncate"}):(0,d.jsx)("span",{className:(0,E.cn)("min-w-0 truncate",C.tone),children:C.text})]})]}),(0,d.jsxs)("span",{className:(0,E.cn)("flex shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",L),children:[(0,d.jsx)("span",{children:(0,A.whenOf)(a.updatedAt)}),(0,d.jsxs)("span",{className:"max-w-full truncate text-muted-foreground/70",title:D>0?`${a.id} \xb7 in ${(0,E.formatCount)(a.tokens.input)} \xb7 out ${(0,E.formatCount)(a.tokens.output)}`:a.id,children:[a.bot,D>0&&` \xb7 ${(0,E.formatCount)(D)}`]})]}),(0,d.jsx)(e.ChevronDown,{className:(0,E.cn)("size-4 shrink-0 text-muted-foreground transition-transform",c&&"rotate-180")})]}),(0,d.jsxs)(m.DropdownMenu,{children:[(0,d.jsx)(m.DropdownMenuTrigger,{render:(0,d.jsx)(l.Button,{size:"icon-sm",variant:"ghost"}),children:(0,d.jsx)(g.MoreHorizontal,{})}),(0,d.jsxs)(m.DropdownMenuContent,{align:"end",children:[x&&(0,d.jsxs)(m.DropdownMenuItem,{onClick:n,children:[(0,d.jsx)(h.Square,{}),"Stop"]}),(0,d.jsxs)(m.DropdownMenuItem,{variant:"destructive",onClick:p,children:[(0,d.jsx)(i.Trash2,{}),"Delete"]})]})]})]}),z&&!c&&(0,d.jsx)(I,{task:a}),c&&(0,d.jsxs)("div",{className:"mx-4 mb-4 space-y-2",children:[(0,d.jsx)("div",{className:"rounded-xl border border-border/60 bg-background",children:(0,d.jsx)(v.Conversation,{task:B})}),(0,d.jsx)(F.TaskReply,{task:{id:a.id,label:a.label,bot:a.bot,ask:a.ask},status:a.status})]})]})}function I({task:a}){let b=[];if(a.lines.forEach((c,d)=>{if("tool"!==c.kind)return;let e=a.lines[d+1];b.push({step:c,took:e?(0,A.toDate)(e.at).getTime()-(0,A.toDate)(c.at).getTime():null})}),0===b.length)return null;let c=(0,A.toDate)(a.updatedAt).getTime()-(0,A.toDate)(a.createdAt).getTime();return(0,d.jsxs)("div",{className:"pointer-events-none absolute top-[calc(100%-0.75rem)] left-17 z-20 hidden w-96 max-w-[calc(100%-5rem)] rounded-xl bg-background p-3 pb-2 shadow-xl shadow-black/10 ring-1 ring-border/60 group-hover/row:block",children:[(0,d.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[(0,d.jsx)("span",{children:a.bot}),(0,d.jsx)("span",{className:"opacity-50",children:"·"}),(0,d.jsxs)("span",{children:[b.length," ",1===b.length?"step":"steps"]}),(0,d.jsx)("span",{className:"opacity-50",children:"·"}),(0,d.jsx)("span",{children:J(c)})]}),b.slice(-6).map(({step:a,took:b})=>{let c=(0,x.toolIcon)(a.name);return(0,d.jsxs)("div",{className:"flex h-5.5 items-center gap-2 font-mono text-[11px]",children:[null===b?(0,d.jsx)(f.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}):(0,d.jsx)(c,{className:"size-3 shrink-0 text-muted-foreground"}),(0,d.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",children:a.name}),null===b?(0,d.jsx)(o.default,{text:a.note??a.input,speed:2.2,color:"var(--muted-foreground)",shineColor:"var(--foreground)",className:"min-w-0 flex-1 truncate"}):(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:a.note??a.input}),(0,d.jsx)("span",{className:"w-10 shrink-0 text-right text-muted-foreground/70 tabular-nums",children:null===b?"":J(b)})]},a.id)})]})}function J(a){let b=Math.max(0,a)/1e3;if(b<10)return`${b.toFixed(1)}s`;if(b<60)return`${Math.round(b)}s`;let c=Math.floor(b/60);return`${c}m ${Math.round(b-60*c)}s`}function K(){return(0,d.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,d.jsx)(p.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,d.jsxs)("span",{className:"min-w-0 flex-1 space-y-2",children:[(0,d.jsx)(p.Skeleton,{className:"h-3 w-40 max-w-full"}),(0,d.jsx)(p.Skeleton,{className:"h-2.5 w-80 max-w-full"})]}),(0,d.jsxs)("span",{className:(0,E.cn)("flex shrink-0 flex-col items-end gap-1.5",L),children:[(0,d.jsx)(p.Skeleton,{className:"h-2.5 w-12"}),(0,d.jsx)(p.Skeleton,{className:"h-2.5 w-24"})]}),(0,d.jsx)("span",{className:"size-4 shrink-0"}),(0,d.jsx)("span",{className:"size-7 shrink-0"})]})}a.s(["TaskSetting",0,function(){let[a,b]=(0,j.useState)(null),[c,e]=(0,j.useState)(""),{data:f}=(0,D.useServerRoute)(k.queryKey.bot),{items:g,isLoading:h,isLoadingMore:i,error:m,hasMore:o,sentinelRef:p}=(0,C.useServerPages)({key:(a,b)=>{if(0===a)return k.queryKey.taskHistory(null);let c=b?.at(-1);return c?k.queryKey.taskHistory((0,A.toDate)(c.updatedAt).toISOString()):null},size:t.TASK_HISTORY_PAGE,swr:{revalidateFirstPage:!0,refreshInterval:a=>3e3*!!a?.[0]?.some(a=>"running"===a.status)}}),[u]=(0,B.useServerAction)(q.cancelTaskAction,{okMessage:"Task stopped",onOk:a=>{(0,D.revalidate)(k.queryKey.tasks),y.screenActs.announce({kind:"stopped",id:a.id,label:a.label})}}),[v]=(0,B.useServerAction)(s.deleteTaskAction,{okMessage:"Task deleted",onOk:()=>(0,D.revalidate)(k.queryKey.tasks)}),[w]=(0,B.useServerAction)(r.clearFinishedTasksAction,{onOk:()=>(0,D.revalidate)(k.queryKey.tasks)}),x=async()=>{await n.notify.confirm({title:"Clear finished jobs?",description:"Everything done or failed goes, threads included. Running and waiting jobs stay.",okText:"Clear",destructive:!0})&&w()},E=async a=>{await n.notify.confirm({title:`Delete "${a.label}"?`,description:"The thread goes with it — nothing can be picked back up.",okText:"Delete",destructive:!0})&&v(a.id)};if(h)return(0,d.jsx)(z.SettingSkeleton,{rows:3});if(m)return(0,d.jsx)(z.SettingError,{message:m.message});let F=c.trim().toLowerCase(),G=F?g.filter(a=>[a.label,a.outcome,a.bot].join(" ").toLowerCase().includes(F)):g,I=g.filter(a=>"waiting"===a.status).length,J=g.filter(a=>"failed"===a.status).length;return(0,d.jsx)(z.SettingScreen,{footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)(z.SettingRailNote,{children:[g.length," loaded",I>0&&` \xb7 ${I} waiting on you`,J>0&&` \xb7 ${J} failed`]}),(0,d.jsx)(l.Button,{variant:"outline",size:"sm",onClick:x,children:"Clear finished"})]}),children:(0,d.jsx)(z.SettingGroup,{filter:(0,d.jsx)(z.SettingFilter,{value:c,onChange:e,placeholder:"Filter by label, bot or word"}),right:F?`${G.length} of ${g.length}`:void 0,children:(0,d.jsxs)(z.SettingItems,{children:[0===G.length?(0,d.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:F?"Nothing loaded matches. Keep scrolling to search further back.":"Nothing yet. When Thursday hands a job to a bot mid-call, it shows up here — while it runs, and after."}):G.map(c=>(0,d.jsx)(H,{task:c,bots:f,open:a===c.id,onToggle:()=>b(a=>a===c.id?null:c.id),onStop:()=>u(c.id),onDelete:()=>E(c)},c.id)),(0,d.jsx)(z.SettingMore,{hasMore:o,loading:i,sentinelRef:p,ghost:(0,d.jsx)(K,{}),className:"divide-y divide-border/60"})]})})})}]),c()}catch(a){c(a)}},!1),43081,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f08787ba9fc8824b7a875687443bbce164e04905e",b.callServer,void 0,b.findSourceMapURL,"clearFinishedTasksAction");a.s(["clearFinishedTasksAction",0,c])},944803,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f46407252db150b0c510d36e20dccf5a544e9107f",b.callServer,void 0,b.findSourceMapURL,"deleteTaskAction");a.s(["deleteTaskAction",0,c])},862966,a=>{"use strict";var b=a.i(572131),c=a.i(988712),d=a.i(426618),e=a.i(664565),f=a.i(487610),g=a.i(561311);let h=Promise.resolve(),i=(0,e.withMiddleware)(c.u,a=>(c,e,i)=>{let j,k=(0,b.useRef)(!1),{cache:l,initialSize:m=1,revalidateAll:n=!1,persistSize:o=!1,revalidateFirstPage:p=!0,revalidateOnMount:q=!1,parallel:r=!1}=i,[,,,s]=d.a.get(d.o);try{(j=(0,d.s)(c?c(0,null):null)[0])&&(j=g.INFINITE_PREFIX+j)}catch(a){}let[t,u,v]=(0,d.c)(l,j),w=(0,b.useCallback)(()=>(0,d.i)(t()._l)?m:t()._l,[l,j,m]);(0,f.useSyncExternalStore)((0,b.useCallback)(a=>j?v(j,()=>{a()}):()=>{},[l,j]),w,w);let x=(0,b.useCallback)(()=>{let a=t()._l;return(0,d.i)(a)?m:a},[j,m]),y=(0,b.useRef)(x());(0,d.u)(()=>{if(!k.current){k.current=!0;return}j&&u({_l:o?y.current:x()})},[j,l]);let z=q&&!k.current,A=a(j,async a=>{let b=t()._i,f=t()._r,g=d.a.get(l),h=g[8],j=()=>g[8]!==h;u({_r:d.U});let k=[],m=x(),[o]=(0,d.c)(l,a),q=o().data,v=[],w=null;for(let a=0;a<m;++a){let[g,h]=(0,d.s)(c(a,r?null:w));if(!g)break;let[m,o]=(0,d.c)(l,g),t=m().data,u=n||b||(0,d.i)(t)||p&&!a&&!(0,d.i)(q)||z||q&&!(0,d.i)(q[a])&&!i.compare(q[a],t);if(e&&("function"==typeof f?f(t,h):u)){let b=async()=>{if(g in s){let a=s[g];delete s[g],t=await a}else t=await e(h);j()||o({data:t,_k:h}),k[a]=t};r?v.push(b):await b()}else k[a]=t;r||(w=t)}return r&&await Promise.all(v.map(a=>a())),j()||u({_i:d.U}),k},i),B=(0,b.useCallback)(function(a,b){let c="boolean"==typeof b?{revalidate:b}:b||{},e=!1!==c.revalidate;return j?(e&&((0,d.i)(a)?u({_i:!0,_r:c.revalidate}):u({_i:!1,_r:c.revalidate})),arguments.length?A.mutate(a,{...c,revalidate:e}):A.mutate()):h},[j,l]),C=(0,b.useCallback)(a=>{let b;if(!j)return h;let[,e]=(0,d.c)(l,j);if((0,d.e)(a)?b=a(x()):"number"==typeof a&&(b=a),"number"!=typeof b)return h;e({_l:b}),y.current=b;let f=[],[g]=(0,d.c)(l,j),i=null;for(let a=0;a<b;++a){let[b]=(0,d.s)(c(a,i)),[e]=(0,d.c)(l,b),h=b?e().data:d.U;if((0,d.i)(h))return B(g().data);f.push(h),i=h}return B(f)},[j,l,B,x]);return{size:x(),setSize:C,mutate:B,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}});var j=a.i(287702),k=a.i(759497);a.s(["useServerPages",0,function(a){let c=a.size??j.PAGE_SIZE,{key:d}=a,{data:e,error:f,isLoading:g,isValidating:h,setSize:l,mutate:m}=i((a,b)=>(0,k.resolveKey)(d(a,b)),k.fetchRoute,{dedupingInterval:500,revalidateOnMount:!0,revalidateOnFocus:!0,revalidateOnReconnect:!0,focusThrottleInterval:1e3,revalidateFirstPage:!1,...a.swr}),n=e??[],o=n.flat(),p=n.at(-1),q=void 0!==p&&p.length>=c,r=(0,b.useRef)(0),s=h&&n.length>0&&r.current>n.length,t=(0,b.useRef)({isValidating:h,setSize:l,pages:n.length});t.current={isValidating:h,setSize:l,pages:n.length};let u=(0,k.resolveKey)(d(0,null)),v="string"==typeof u?u:u?.url;(0,b.useEffect)(()=>{if(v)return(0,k.registerPagedReader)({url:v,refresh:()=>m()})},[v,m]);let w=function(a,c={}){let{enabled:d=!0,margin:e="600px",revision:f}=c,g=(0,b.useRef)(a);g.current=a;let h=(0,b.useRef)(null),i=(0,b.useRef)(null),j=(0,b.useCallback)(a=>{h.current=a},[]);return(0,b.useEffect)(()=>{i.current?.disconnect();let a=h.current;if(a&&d)return i.current=new IntersectionObserver(([a])=>{a.isIntersecting&&g.current()},{root:function(a){let b=a.parentElement;for(;b;){let{overflowY:a}=getComputedStyle(b);if(("auto"===a||"scroll"===a)&&b.scrollHeight>b.clientHeight)return b;b=b.parentElement}return null}(a),rootMargin:e}),i.current.observe(a),()=>i.current?.disconnect()},[d,e,f]),j}(()=>{let a=t.current;a.isValidating||(r.current=a.pages+1,a.setSize(a.pages+1))},{enabled:q,revision:`${n.length}:${h}`});return{items:o,isLoading:g,isLoadingMore:s,error:f,hasMore:q,sentinelRef:w,refresh:()=>m()}}],862966)},272944,a=>{"use strict";var b=a.i(164831);let c={name:"ellipsis",size:24,node:[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],aliases:["more-horizontal"]};c.node;let d=(0,b.default)(c);a.s(["MoreHorizontal",0,d],272944)},951675,a=>{"use strict";var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.default)(c);a.s(["Trash2",0,d],951675)}];
2
-
3
- //# sourceMappingURL=_0nso8tp._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[701876,a=>{"use strict";var b=a.i(451208);a.s([],489277),a.i(489277),a.s(["7fc46134dc257ffb46e56975909bec673945ad7151",()=>b.openFileAction],701876)},832030,a=>{a.v(b=>Promise.all(["server/chunks/ssr/[externals]_node_readline_1u65a-m._.js","server/chunks/ssr/node_modules_consola_dist_chunks_prompt_mjs_1j4x-_j._.js"].map(b=>a.l(b))).then(()=>b(322479)))}];
2
-
3
- //# sourceMappingURL=_0sf1isi._.js.map