thursday-agent 0.5.0 → 0.7.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 (667) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +3 -2
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/required-server-files.json +8 -1
  6. package/.next/routes-manifest.json +18 -6
  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 +1 -1
  10. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  13. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  14. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  15. package/.next/server/app/_not-found.html +1 -1
  16. package/.next/server/app/_not-found.rsc +13 -13
  17. package/.next/server/app/_not-found.segments/_full.segment.rsc +13 -13
  18. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +12 -12
  19. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  20. package/.next/server/app/api/artifact/route.js +10 -6
  21. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/memory/files/route.js +5 -4
  23. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  24. package/.next/server/app/api/bot/memory/route.js +8 -8
  25. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  26. package/.next/server/app/api/bot/route.js +8 -8
  27. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  28. package/.next/server/app/api/bot/thread/[id]/route/app-paths-manifest.json +3 -0
  29. package/.next/server/app/api/bot/thread/[id]/route.js +15 -0
  30. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -0
  31. package/.next/server/app/api/bot/thread/[id]/route_client-reference-manifest.js +3 -0
  32. package/.next/server/app/api/bot/thread/route/app-paths-manifest.json +3 -0
  33. package/.next/server/app/api/bot/thread/route.js +15 -0
  34. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -0
  35. package/.next/server/app/api/bot/thread/route_client-reference-manifest.js +3 -0
  36. package/.next/server/app/api/config/route.js +7 -7
  37. package/.next/server/app/api/config/route.js.nft.json +1 -1
  38. package/.next/server/app/api/events/route.js +3 -3
  39. package/.next/server/app/api/events/route.js.nft.json +1 -1
  40. package/.next/server/app/api/file/[...path]/route.js +4 -4
  41. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  42. package/.next/server/app/api/llm-model/catalog/route.js +8 -8
  43. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  44. package/.next/server/app/api/llm-model/credits/route.js +8 -8
  45. package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
  46. package/.next/server/app/api/llm-model/route.js +8 -8
  47. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  48. package/.next/server/app/api/llm-model/subscription/route.js +8 -8
  49. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  50. package/.next/server/app/api/mcp/[name]/route.js +6 -6
  51. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  52. package/.next/server/app/api/mcp/oauth/callback/route.js +4 -4
  53. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  54. package/.next/server/app/api/mcp/route.js +6 -6
  55. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  56. package/.next/server/app/api/mcp/tools/route.js +6 -6
  57. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  58. package/.next/server/app/api/memory/edit/route.js +15 -15
  59. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  60. package/.next/server/app/api/memory/route.js +7 -6
  61. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  62. package/.next/server/app/api/skills/[source]/[name]/route.js +6 -6
  63. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  64. package/.next/server/app/api/skills/route.js +6 -6
  65. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  66. package/.next/server/app/api/thursday/call/route.js +10 -11
  67. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  68. package/.next/server/app/api/thursday/skills/route.js +9 -10
  69. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  70. package/.next/server/app/api/thursday/tool-call/route.js +15 -15
  71. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  72. package/.next/server/app/api/workspace/missing/route/app-paths-manifest.json +3 -0
  73. package/.next/server/app/api/workspace/missing/route/build-manifest.json +12 -0
  74. package/.next/server/app/api/workspace/missing/route/server-reference-manifest.json +4 -0
  75. package/.next/server/app/api/workspace/missing/route.js +12 -0
  76. package/.next/server/app/api/workspace/missing/route.js.map +5 -0
  77. package/.next/server/app/api/workspace/missing/route.js.nft.json +1 -0
  78. package/.next/server/app/api/workspace/missing/route_client-reference-manifest.js +3 -0
  79. package/.next/server/app/api/workspace/route.js +5 -5
  80. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  81. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  82. package/.next/server/app/artifact/[...path]/page.js +4 -3
  83. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  84. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  85. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  86. package/.next/server/app/page/server-reference-manifest.json +67 -45
  87. package/.next/server/app/page.js +11 -9
  88. package/.next/server/app/page.js.nft.json +1 -1
  89. package/.next/server/app/page_client-reference-manifest.js +1 -1
  90. package/.next/server/app-paths-manifest.json +3 -2
  91. package/.next/server/chunks/[root-of-the-server]__0-06t3f._.js +8 -0
  92. package/.next/server/chunks/[root-of-the-server]__02846fb._.js +8 -0
  93. package/.next/server/chunks/[root-of-the-server]__05luceg._.js +3 -0
  94. package/.next/server/chunks/[root-of-the-server]__06--3q3._.js +8 -0
  95. package/.next/server/chunks/[root-of-the-server]__06l05n_._.js +3 -0
  96. package/.next/server/chunks/[root-of-the-server]__07bnah_._.js +3 -0
  97. package/.next/server/chunks/[root-of-the-server]__08eae20._.js +8 -0
  98. package/.next/server/chunks/[root-of-the-server]__0_ue8oe._.js +3 -0
  99. package/.next/server/chunks/[root-of-the-server]__0btqrct._.js +3 -0
  100. package/.next/server/chunks/[root-of-the-server]__0c9fgca._.js +5 -0
  101. package/.next/server/chunks/[root-of-the-server]__0h_x6q6._.js +5 -0
  102. package/.next/server/chunks/{[root-of-the-server]__0pa2n68._.js → [root-of-the-server]__0kxrvxf._.js} +2 -2
  103. package/.next/server/chunks/{[root-of-the-server]__0q0vvt2._.js → [root-of-the-server]__0ov3iir._.js} +2 -2
  104. package/.next/server/chunks/[root-of-the-server]__0qwtlmx._.js +8 -0
  105. package/.next/server/chunks/[root-of-the-server]__0sm5xvm._.js +3 -0
  106. package/.next/server/chunks/[root-of-the-server]__0zp35ul._.js +5 -0
  107. package/.next/server/chunks/[root-of-the-server]__144u9d_._.js +3 -0
  108. package/.next/server/chunks/[root-of-the-server]__18-2tsq._.js +5 -0
  109. package/.next/server/chunks/[root-of-the-server]__1e-ci13._.js +3 -0
  110. package/.next/server/chunks/[root-of-the-server]__1e2365e._.js +8 -0
  111. package/.next/server/chunks/[root-of-the-server]__1fix932._.js +8 -0
  112. package/.next/server/chunks/{[root-of-the-server]__0ce8nf8._.js → [root-of-the-server]__1g3t7vn._.js} +3 -3
  113. package/.next/server/chunks/[root-of-the-server]__1kp-83u._.js +5 -0
  114. package/.next/server/chunks/[root-of-the-server]__1kv8p3e._.js +5 -0
  115. package/.next/server/chunks/[root-of-the-server]__1orn-5b._.js +2 -3
  116. package/.next/server/chunks/_02szwk8._.js +5 -0
  117. package/.next/server/chunks/_05h2cii._.js +1 -1
  118. package/.next/server/chunks/_06c9kie._.js +216 -0
  119. package/.next/server/chunks/{_1x6kd1r._.js → _07y2gj-._.js} +1 -1
  120. package/.next/server/chunks/_0a43a-0._.js +3 -0
  121. package/.next/server/chunks/_0bujjey._.js +5 -0
  122. package/.next/server/chunks/_0c9j6rb._.js +1 -1
  123. package/.next/server/chunks/_0dkd549._.js +3 -0
  124. package/.next/server/chunks/_0ej1kvv._.js +3 -0
  125. package/.next/server/chunks/_0f6ts7z._.js +3 -0
  126. package/.next/server/chunks/_0gm9hyv._.js +55 -0
  127. package/.next/server/chunks/_0i55en5._.js +25 -0
  128. package/.next/server/chunks/_0k50n27._.js +18 -0
  129. package/.next/server/chunks/_0khihjk._.js +3 -3
  130. package/.next/server/chunks/_0n74zsf._.js +5 -5
  131. package/.next/server/chunks/_0nvm9ef._.js +3 -0
  132. package/.next/server/chunks/_0p56fn0._.js +3 -0
  133. package/.next/server/chunks/_0recufk._.js +1 -1
  134. package/.next/server/chunks/_0xbkz10._.js +3 -0
  135. package/.next/server/chunks/_10tkr26._.js +3 -0
  136. package/.next/server/chunks/{_0ioz3nd._.js → _11u2kp7._.js} +1 -1
  137. package/.next/server/chunks/_11ujpya._.js +3 -0
  138. package/.next/server/chunks/_127nx_p._.js +5 -0
  139. package/.next/server/chunks/_17l5ygt._.js +1 -1
  140. package/.next/server/chunks/_19uauj6._.js +3 -0
  141. package/.next/server/chunks/_1_5mnq4._.js +5 -5
  142. package/.next/server/chunks/_1abl6t9._.js +55 -0
  143. package/.next/server/chunks/_1d0j961._.js +3 -3
  144. package/.next/server/chunks/_1dbixxz._.js +3 -0
  145. package/.next/server/chunks/_1dc_d1q._.js +98 -0
  146. package/.next/server/chunks/_1drgfx4._.js +5 -5
  147. package/.next/server/chunks/_1e48czp._.js +3 -3
  148. package/.next/server/chunks/_1f31u5x._.js +5 -0
  149. package/.next/server/chunks/_1gnjfli._.js +3 -0
  150. package/.next/server/chunks/_1kg70wc._.js +3 -3
  151. package/.next/server/chunks/_1klbcft._.js +5 -0
  152. package/.next/server/chunks/_1krd9rf._.js +4 -1
  153. package/.next/server/chunks/_1kwmzab._.js +3 -0
  154. package/.next/server/chunks/{_1pf4qe-._.js → _1oxj9fa._.js} +1 -1
  155. package/.next/server/chunks/{_1f46eie._.js → _1pcmdbb._.js} +1 -1
  156. package/.next/server/chunks/_1qgix-j._.js +3 -0
  157. package/.next/server/chunks/{lib_logger_ts_1exwjut._.js → _1rpchta._.js} +5 -5
  158. package/.next/server/chunks/_1vsej-s._.js +5 -0
  159. package/.next/server/chunks/_1yx0p_s._.js +5 -0
  160. package/.next/server/chunks/{_0rnf-6n._.js → _20fsr_z._.js} +6 -6
  161. package/.next/server/chunks/_2128hkj._.js +5 -0
  162. package/.next/server/chunks/_next-internal_server_app_api_bot_thread_[id]_route_actions_1fstjn2.js +3 -0
  163. package/.next/server/chunks/_next-internal_server_app_api_bot_thread_route_actions_003ccso.js +3 -0
  164. package/.next/server/chunks/_next-internal_server_app_api_workspace_missing_route_actions_1fidi6p.js +3 -0
  165. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  166. package/.next/server/chunks/features_0-cnt0l._.js +4 -0
  167. package/.next/server/chunks/features_0hdaci0._.js +4 -0
  168. package/.next/server/chunks/features_1e39j7-._.js +8 -0
  169. package/.next/server/chunks/features_bot_bot_query_ts_12mgkl2._.js +1 -1
  170. package/.next/server/chunks/features_memory_1uqvksn._.js +1 -1
  171. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0v_7drq._.js → node_modules_consola_dist_chunks_prompt_mjs_0a7-pbw._.js} +1 -1
  172. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_17k8irj._.js → node_modules_consola_dist_chunks_prompt_mjs_0gzvgfv._.js} +1 -1
  173. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0i7cvml._.js → node_modules_consola_dist_chunks_prompt_mjs_107pxfn._.js} +1 -1
  174. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0icqaqw._.js → node_modules_consola_dist_chunks_prompt_mjs_15hbel8._.js} +1 -1
  175. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_18i-23e._.js +3 -0
  176. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1bewgf3._.js +3 -0
  177. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1nlww1m._.js +3 -0
  178. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1q77nfx._.js +3 -0
  179. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1xqdzx_._.js +3 -0
  180. package/.next/server/chunks/{node_modules_zod_v4_1801ax7._.js → node_modules_zod_v4_0lkux5-._.js} +2 -2
  181. package/.next/server/chunks/{node_modules_zod_v4_1cha_bw._.js → node_modules_zod_v4_1jmr9cq._.js} +2 -2
  182. package/.next/server/chunks/{node_modules_zod_v4_0ubdflj._.js → node_modules_zod_v4_1yrxmek._.js} +2 -2
  183. package/.next/server/chunks/node_modules_zod_v4_classic_errors_0tp0y-q.js +3 -0
  184. package/.next/server/chunks/ssr/[root-of-the-server]__0-e011f._.js +3 -0
  185. package/.next/server/chunks/ssr/[root-of-the-server]__09q9med._.js +1 -1
  186. package/.next/server/chunks/ssr/[root-of-the-server]__0lyi8i2._.js +1 -1
  187. package/.next/server/chunks/ssr/[root-of-the-server]__0pd8yr7._.js +3 -0
  188. package/.next/server/chunks/ssr/[root-of-the-server]__16jc196._.js +1 -1
  189. package/.next/server/chunks/ssr/[root-of-the-server]__18dthbp._.js +3 -0
  190. package/.next/server/chunks/ssr/[root-of-the-server]__18e68w8._.js +3 -0
  191. package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +1 -1
  192. package/.next/server/chunks/ssr/[root-of-the-server]__1nygfik._.js +5 -0
  193. package/.next/server/chunks/ssr/[root-of-the-server]__1sdphb0._.js +8 -0
  194. package/.next/server/chunks/ssr/[root-of-the-server]__1vdmfbe._.js +3 -0
  195. package/.next/server/chunks/ssr/[root-of-the-server]__1waa3rc._.js +85 -0
  196. package/.next/server/chunks/ssr/_0-2qsxo._.js +3 -0
  197. package/.next/server/chunks/ssr/_00rehl_._.js +3 -0
  198. package/.next/server/chunks/ssr/{_1lz_cq2._.js → _02oc_h5._.js} +76 -97
  199. package/.next/server/chunks/ssr/_05yghx6._.js +3 -0
  200. package/.next/server/chunks/ssr/_07nbwap._.js +3 -0
  201. package/.next/server/chunks/ssr/_08c4z-9._.js +3 -0
  202. package/.next/server/chunks/ssr/_0_qfdlw._.js +4 -0
  203. package/.next/server/chunks/ssr/{_0m2lsd1._.js → _0b6_jv-._.js} +2 -2
  204. package/.next/server/chunks/ssr/_0evkpto._.js +3 -0
  205. package/.next/server/chunks/ssr/_0geg212._.js +3 -0
  206. package/.next/server/chunks/ssr/{_1jdgjv9._.js → _0hxt2ul._.js} +2 -2
  207. package/.next/server/chunks/ssr/_0i_6q1w._.js +2 -2
  208. package/.next/server/chunks/ssr/_0lu1n_x._.js +1 -1
  209. package/.next/server/chunks/ssr/_0no7i1o._.js +3 -0
  210. package/.next/server/chunks/ssr/_0tzg--b._.js +3 -0
  211. package/.next/server/chunks/ssr/{_15j2_8f._.js → _0wzaht-._.js} +2 -2
  212. package/.next/server/chunks/ssr/_0z-g0uy._.js +3 -0
  213. package/.next/server/chunks/ssr/_114ylv7._.js +7 -0
  214. package/.next/server/chunks/ssr/_123y-ah._.js +3 -0
  215. package/.next/server/chunks/ssr/_12c-iwh._.js +3 -0
  216. package/.next/server/chunks/ssr/_12w42gi._.js +3 -0
  217. package/.next/server/chunks/ssr/_161kqav._.js +3 -0
  218. package/.next/server/chunks/ssr/_167hchk._.js +3 -0
  219. package/.next/server/chunks/ssr/{_0ap2fzn._.js → _16c6_xm._.js} +2 -2
  220. package/.next/server/chunks/ssr/_18opah7._.js +3 -0
  221. package/.next/server/chunks/ssr/_1_krfph._.js +3 -0
  222. package/.next/server/chunks/ssr/{_0rzucul._.js → _1_x5spz._.js} +3 -3
  223. package/.next/server/chunks/ssr/_1a61fc9._.js +3 -0
  224. package/.next/server/chunks/ssr/_1ey7qn-._.js +70 -0
  225. package/.next/server/chunks/ssr/_1g9vs7q._.js +3 -0
  226. package/.next/server/chunks/ssr/_1jmz33w._.js +3 -0
  227. package/.next/server/chunks/ssr/_1rgtxhr._.js +5 -0
  228. package/.next/server/chunks/ssr/_1slp25y._.js +3 -0
  229. package/.next/server/chunks/ssr/_1w_t7h7._.js +101 -0
  230. package/.next/server/chunks/ssr/{_0s99bgb._.js → _1wyfaq_._.js} +9 -3
  231. package/.next/server/chunks/ssr/_200gt-m._.js +102 -0
  232. package/.next/server/chunks/ssr/components_ui_tabs_tsx_0ej40b4._.js +3 -0
  233. package/.next/server/chunks/ssr/features_bot_thread_query_ts_023eklt._.js +4 -0
  234. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
  235. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  236. package/.next/server/chunks/ssr/features_workspace_00jz2hu._.js +8 -0
  237. package/.next/server/chunks/ssr/{_1-teee5._.js → lib_logger_ts_0-olsze._.js} +2 -7
  238. package/.next/server/chunks/ssr/{node_modules_05-n6dz._.js → node_modules_02ai7br._.js} +1 -1
  239. package/.next/server/chunks/ssr/{node_modules_1chvq5f._.js → node_modules_02deexj._.js} +1 -1
  240. package/.next/server/chunks/ssr/{node_modules_0m383r2._.js → node_modules_07za262._.js} +1 -1
  241. package/.next/server/chunks/ssr/{node_modules_07dsgkx._.js → node_modules_0_s9get._.js} +1 -1
  242. package/.next/server/chunks/ssr/{node_modules_1a0kmjl._.js → node_modules_0n3c7h0._.js} +1 -1
  243. package/.next/server/chunks/ssr/{node_modules_0zeg3x_._.js → node_modules_0od6jwr._.js} +1 -1
  244. package/.next/server/chunks/ssr/{node_modules_1y79i83._.js → node_modules_0rdt7pk._.js} +1 -1
  245. package/.next/server/chunks/ssr/{node_modules_17bwo43._.js → node_modules_0tusx4d._.js} +3 -3
  246. package/.next/server/chunks/ssr/{node_modules_04sksn9._.js → node_modules_0w1z7kz._.js} +1 -1
  247. package/.next/server/chunks/ssr/{node_modules_1uyk91w._.js → node_modules_0wdupfz._.js} +1 -1
  248. package/.next/server/chunks/ssr/{node_modules_0ifp389._.js → node_modules_1720w0a._.js} +1 -1
  249. package/.next/server/chunks/ssr/{node_modules_0u9da1h._.js → node_modules_18lsg7d._.js} +1 -1
  250. package/.next/server/chunks/ssr/{node_modules_1k6n600._.js → node_modules_1b94fxf._.js} +1 -1
  251. package/.next/server/chunks/ssr/{node_modules_20c28js._.js → node_modules_1ecdo1s._.js} +1 -1
  252. package/.next/server/chunks/ssr/{node_modules_0fkeku3._.js → node_modules_1fa9ag7._.js} +1 -1
  253. package/.next/server/chunks/ssr/{node_modules_1j8j4pt._.js → node_modules_1fv-_si._.js} +1 -1
  254. package/.next/server/chunks/ssr/{node_modules_0-dr_o7._.js → node_modules_1hf461g._.js} +1 -1
  255. package/.next/server/chunks/ssr/{node_modules_1lz0oxc._.js → node_modules_1m71ta-._.js} +1 -1
  256. package/.next/server/chunks/ssr/{node_modules_1t77e4n._.js → node_modules_1n93n-g._.js} +1 -1
  257. package/.next/server/chunks/ssr/{node_modules_16mkxuo._.js → node_modules_1n9lqu9._.js} +1 -1
  258. package/.next/server/chunks/ssr/{node_modules_1k7z2j6._.js → node_modules_1npnsvd._.js} +1 -1
  259. package/.next/server/chunks/ssr/{node_modules_056qgf-._.js → node_modules_1rn2r0n._.js} +1 -1
  260. package/.next/server/chunks/ssr/{node_modules_0x3-ply._.js → node_modules_1seuurl._.js} +2 -2
  261. package/.next/server/chunks/ssr/{node_modules_0bvopy2._.js → node_modules_1vq-mfk._.js} +1 -1
  262. package/.next/server/chunks/ssr/{node_modules_0iur59s._.js → node_modules_1vzyw1t._.js} +1 -1
  263. package/.next/server/chunks/ssr/{node_modules_1k8j8n0._.js → node_modules_1w359w4._.js} +1 -1
  264. package/.next/server/chunks/ssr/{node_modules_1x0ztf4._.js → node_modules_1yajbl6._.js} +1 -1
  265. package/.next/server/chunks/ssr/{node_modules_1-y7nni._.js → node_modules_20eqhy8._.js} +1 -1
  266. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0bkwd0u._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_019sbis._.js} +1 -1
  267. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0p9a9su._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0s6piq3._.js} +1 -1
  268. package/.next/server/chunks/ssr/{node_modules_@vercel_oidc_dist_1o553h-._.js → node_modules_@vercel_oidc_dist_05itbb1._.js} +1 -1
  269. package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_trash_mjs_0px2gzr._.js +3 -0
  270. package/.next/server/middleware-build-manifest.js +3 -3
  271. package/.next/server/pages/404.html +1 -1
  272. package/.next/server/pages/500.html +1 -1
  273. package/.next/server/server-reference-manifest.js +1 -1
  274. package/.next/server/server-reference-manifest.json +68 -46
  275. package/.next/static/chunks/07vqbk_9t4em4.js +2 -0
  276. package/.next/static/chunks/08krja1zx7nqg.js +1 -0
  277. package/.next/static/chunks/0g4b348l0pve7.js +1 -0
  278. package/.next/static/chunks/0qcuwdk132jjt.js +1 -0
  279. package/.next/static/chunks/0vlgzqo9ka90v.js +1 -0
  280. package/.next/static/chunks/{11r2yp_yh9_qn.js → 0z69gvysmave7.js} +1 -1
  281. package/.next/static/chunks/0zrupxgci5gqc.js +1 -0
  282. package/.next/static/chunks/12fvz1w5ows75.js +1 -0
  283. package/.next/static/chunks/14t03ned286iu.js +1 -0
  284. package/.next/static/chunks/156xxbkrz5lzu.js +18 -0
  285. package/.next/static/chunks/1fz14reod4lft.js +1 -0
  286. package/.next/static/chunks/1g23dbabl-vkr.js +1 -0
  287. package/.next/static/chunks/1ohslk4568tm3.js +1 -0
  288. package/.next/static/chunks/1qy_rc3oxfxok.js +1 -0
  289. package/.next/static/chunks/1sbmwswc9k2-1.js +1 -0
  290. package/.next/static/chunks/1vqezbhjm3goq.js +1 -0
  291. package/.next/static/chunks/1zea7qdl-7365.js +1 -0
  292. package/.next/static/chunks/1zvqumkg7kmo0.css +1 -0
  293. package/.next/static/chunks/26hpqt3y6bogl.js +12 -0
  294. package/.next/static/chunks/2_j5mqm6d-z18.js +99 -0
  295. package/.next/static/chunks/2dt6tu7a22svs.js +1 -0
  296. package/.next/static/chunks/2h5ls3d86kya6.js +1 -0
  297. package/.next/static/chunks/2wc6y1ht6dfuy.js +1 -0
  298. package/.next/static/chunks/{435atsnhs7ksu.js → 2xr0zpll7thyi.js} +2 -2
  299. package/.next/static/chunks/31jztc-yq30m7.js +1 -0
  300. package/.next/static/chunks/391af0i8eljzk.js +1 -0
  301. package/.next/static/chunks/3bfwpww3m3x4u.js +1 -0
  302. package/.next/static/chunks/{38gweqdo4jpfj.js → 3izg0a3k87q1-.js} +5 -5
  303. package/.next/static/chunks/3p2s2cjokx1aa.js +5 -0
  304. package/.next/static/chunks/{408ueu4hfvcg7.js → 41s3fml5oivsa.js} +1 -1
  305. package/README.md +45 -193
  306. package/app/api/events/app-event.ts +6 -4
  307. package/app/api/query-key.ts +25 -16
  308. package/bin/database.mjs +37 -0
  309. package/bin/thursday.mjs +44 -28
  310. package/components/ui/custom-icon.tsx +0 -60
  311. package/components/ui/radio-group.tsx +37 -0
  312. package/components/ui/shiny-text.tsx +33 -6
  313. package/database/migrations/{20260910173049_numerous_spirit → 20260916145701_clever_multiple_man}/migration.sql +80 -24
  314. package/database/migrations/{20260910173049_numerous_spirit → 20260916145701_clever_multiple_man}/snapshot.json +689 -110
  315. package/database/migrations/20260916160713_thread_cancelled/migration.sql +2 -0
  316. package/database/migrations/{20260911030320_opposite_jack_power → 20260916160713_thread_cancelled}/snapshot.json +706 -84
  317. package/docs/how-it-works.md +40 -35
  318. package/docs/images/keeps-going.png +0 -0
  319. package/docs/images/two-minds.png +0 -0
  320. package/docs/live-calls.md +236 -0
  321. package/docs/thread-rooms.md +71 -0
  322. package/features/ai/chatgpt.ts +1 -2
  323. package/features/ai/live.schema.ts +128 -0
  324. package/features/ai/load-tools.ts +152 -79
  325. package/features/ai/model.schema.ts +2 -120
  326. package/features/ai/model.ts +52 -88
  327. package/features/ai/prompts/bot.prompt.ts +91 -214
  328. package/features/ai/prompts/live.prompt.ts +169 -0
  329. package/features/ai/prompts/prompt-helper.ts +92 -32
  330. package/features/ai/prompts/thursday.prompt.ts +164 -190
  331. package/features/ai/tools/bot.tool.ts +38 -145
  332. package/features/ai/tools/call.tool.ts +33 -5
  333. package/features/ai/tools/connected.ts +5 -3
  334. package/features/ai/tools/mcp.tool.ts +7 -4
  335. package/features/ai/tools/memory.tool.ts +35 -31
  336. package/features/ai/tools/skills.tool.ts +11 -6
  337. package/features/ai/tools/studio.tool.ts +26 -21
  338. package/features/ai/tools/tool-name.ts +3 -5
  339. package/features/ai/tools/workspace.tool.ts +33 -10
  340. package/features/artifact/artifact.action.ts +2 -2
  341. package/features/artifact/artifact.query.ts +112 -61
  342. package/features/artifact/artifact.schema.ts +8 -6
  343. package/features/artifact/components/artifact-setting.tsx +83 -33
  344. package/features/bot/bot.action.ts +43 -36
  345. package/features/bot/bot.memory.ts +137 -20
  346. package/features/bot/bot.query.ts +28 -11
  347. package/features/bot/bot.run.ts +296 -744
  348. package/features/bot/bot.runner.ts +463 -864
  349. package/features/bot/bot.schema.ts +93 -82
  350. package/features/bot/bot.seed.ts +141 -64
  351. package/features/bot/components/bot-mark.tsx +324 -232
  352. package/features/bot/components/bot-room.tsx +1613 -697
  353. package/features/bot/components/bot-roster.tsx +8 -13
  354. package/features/bot/components/bot-setting.tsx +58 -42
  355. package/features/bot/components/bot-tool.tsx +55 -87
  356. package/features/bot/components/mark-palette.tsx +35 -32
  357. package/features/bot/components/path-chips.tsx +33 -3
  358. package/features/bot/components/thread-badge.tsx +34 -0
  359. package/features/bot/components/thread-reply.tsx +639 -0
  360. package/features/bot/components/thread-setting.tsx +674 -0
  361. package/features/bot/mark.const.ts +79 -31
  362. package/features/bot/room.query.ts +889 -0
  363. package/features/bot/room.schema.ts +64 -0
  364. package/features/bot/seed-bots.ts +2 -1
  365. package/features/bot/thread.query.ts +971 -0
  366. package/features/bot/thread.store.ts +587 -0
  367. package/features/config/components/voice-key.tsx +113 -88
  368. package/features/config/config.const.ts +5 -9
  369. package/features/connectors/mcp.schema.ts +0 -2
  370. package/features/intro/components/intro.tsx +169 -139
  371. package/features/memory/components/memory-setting.tsx +2 -7
  372. package/features/memory/memory.schema.ts +14 -23
  373. package/features/settings/components/setting-ui.tsx +0 -44
  374. package/features/settings/components/settings.tsx +12 -12
  375. package/features/settings/settings.alert.ts +3 -3
  376. package/features/settings/settings.store.ts +1 -1
  377. package/features/skills/skills.schema.ts +0 -2
  378. package/features/thursday/ascii.const.ts +74 -0
  379. package/features/thursday/components/ascii-field.tsx +24 -44
  380. package/features/thursday/components/ascii-orb.tsx +525 -381
  381. package/features/thursday/components/call-log.tsx +46 -44
  382. package/features/thursday/components/face.tsx +40 -10
  383. package/features/thursday/components/side-captions.tsx +273 -0
  384. package/features/thursday/components/tab-state.tsx +14 -6
  385. package/features/thursday/components/thursday-mark.tsx +1 -0
  386. package/features/thursday/components/thursday-setting.tsx +633 -333
  387. package/features/thursday/components/thursday.tsx +315 -274
  388. package/features/thursday/components/voice-picker.tsx +255 -0
  389. package/features/thursday/face.store.ts +5 -0
  390. package/features/thursday/thursday.action.ts +96 -72
  391. package/features/thursday/thursday.query.ts +49 -30
  392. package/features/thursday/thursday.schema.ts +37 -35
  393. package/features/thursday/thursday.store.ts +14 -7
  394. package/features/thursday/tool-call.ts +3 -3
  395. package/features/thursday/tool-line.ts +5 -3
  396. package/features/thursday/use-thursday.ts +801 -457
  397. package/features/workspace/file-kind.ts +9 -0
  398. package/features/workspace/workspace.query.ts +17 -0
  399. package/features/workspace/workspace.ts +82 -36
  400. package/hooks/use-hotkey.ts +3 -2
  401. package/lib/live/live.schema.ts +26 -0
  402. package/lib/live/live.server.ts +153 -0
  403. package/lib/live/live.session.ts +574 -0
  404. package/lib/{realtime/realtime.tap.ts → live/live.tap.ts} +41 -12
  405. package/lib/live/live.transport.ts +152 -0
  406. package/lib/protocol/use-server-pages.ts +9 -5
  407. package/lib/utils.ts +21 -20
  408. package/package.json +2 -2
  409. package/public/voices/alloy.ogg +0 -0
  410. package/public/voices/ash.ogg +0 -0
  411. package/public/voices/ballad.ogg +0 -0
  412. package/public/voices/beacon.ogg +0 -0
  413. package/public/voices/bossa.ogg +0 -0
  414. package/public/voices/cedar.ogg +0 -0
  415. package/public/voices/cinder.ogg +0 -0
  416. package/public/voices/coral.ogg +0 -0
  417. package/public/voices/delta.ogg +0 -0
  418. package/public/voices/echo.ogg +0 -0
  419. package/public/voices/gleam.ogg +0 -0
  420. package/public/voices/marin.ogg +0 -0
  421. package/public/voices/meridian.ogg +0 -0
  422. package/public/voices/quartz.ogg +0 -0
  423. package/public/voices/ripple.ogg +0 -0
  424. package/public/voices/sage.ogg +0 -0
  425. package/public/voices/shimmer.ogg +0 -0
  426. package/public/voices/stone.ogg +0 -0
  427. package/public/voices/tempo.ogg +0 -0
  428. package/public/voices/verse.ogg +0 -0
  429. package/public/voices/vesper.ogg +0 -0
  430. package/public/voices/willow.ogg +0 -0
  431. package/scripts/artifact-paths.test.mts +38 -0
  432. package/scripts/bot-context.test.mts +1408 -0
  433. package/scripts/live-history.test.mts +115 -0
  434. package/scripts/live-session.test.mts +938 -0
  435. package/server.js +1 -1
  436. package/skills/browser/SKILL.md +11 -1
  437. package/skills/computer/SKILL.md +1 -1
  438. package/skills/find-skills/SKILL.md +3 -8
  439. package/skills/interactive-page/SKILL.md +12 -7
  440. package/skills/interactive-page/references/diagram.md +89 -0
  441. package/skills/interactive-page/scripts/archify/LICENSE +22 -0
  442. package/skills/interactive-page/scripts/archify/README.md +25 -0
  443. package/skills/interactive-page/scripts/archify/assets/JetBrainsMono-OFL.txt +93 -0
  444. package/skills/interactive-page/scripts/archify/assets/template.html +14934 -0
  445. package/skills/interactive-page/scripts/archify/bin/archify.mjs +2126 -0
  446. package/skills/interactive-page/scripts/archify/bin/open-artifact.mjs +86 -0
  447. package/skills/interactive-page/scripts/archify/bin/preview.mjs +653 -0
  448. package/skills/interactive-page/scripts/archify/bin/visual-check.mjs +829 -0
  449. package/skills/interactive-page/scripts/archify/delta/architecture-delta.mjs +1223 -0
  450. package/skills/interactive-page/scripts/archify/examples/agent-run.lifecycle.json +60 -0
  451. package/skills/interactive-page/scripts/archify/examples/agent-tool-call.workflow.json +94 -0
  452. package/skills/interactive-page/scripts/archify/examples/async-job-roundtrip.sequence.json +61 -0
  453. package/skills/interactive-page/scripts/archify/examples/cache-miss-request.sequence.json +82 -0
  454. package/skills/interactive-page/scripts/archify/examples/checkout-platform.base.architecture.json +31 -0
  455. package/skills/interactive-page/scripts/archify/examples/checkout-platform.head.architecture.json +31 -0
  456. package/skills/interactive-page/scripts/archify/examples/deployment-release.lifecycle.json +49 -0
  457. package/skills/interactive-page/scripts/archify/examples/event-stream.dataflow.json +57 -0
  458. package/skills/interactive-page/scripts/archify/examples/incident-response.workflow.json +64 -0
  459. package/skills/interactive-page/scripts/archify/examples/product-analytics.dataflow.json +76 -0
  460. package/skills/interactive-page/scripts/archify/examples/production-deployment.architecture.json +71 -0
  461. package/skills/interactive-page/scripts/archify/examples/release-delivery.workflow.json +62 -0
  462. package/skills/interactive-page/scripts/archify/examples/web-app.architecture.json +46 -0
  463. package/skills/interactive-page/scripts/archify/migrations/workflow-v2.mjs +279 -0
  464. package/skills/interactive-page/scripts/archify/recipes/scenarios.mjs +284 -0
  465. package/skills/interactive-page/scripts/archify/references/authoring-contract.md +243 -0
  466. package/skills/interactive-page/scripts/archify/references/delivery-contract.md +120 -0
  467. package/skills/interactive-page/scripts/archify/references/viewer-runtime.md +45 -0
  468. package/skills/interactive-page/scripts/archify/renderers/architecture/grid.mjs +62 -0
  469. package/skills/interactive-page/scripts/archify/renderers/architecture/render-architecture.mjs +1078 -0
  470. package/skills/interactive-page/scripts/archify/renderers/dataflow/README.md +104 -0
  471. package/skills/interactive-page/scripts/archify/renderers/dataflow/render-dataflow.mjs +483 -0
  472. package/skills/interactive-page/scripts/archify/renderers/lifecycle/README.md +115 -0
  473. package/skills/interactive-page/scripts/archify/renderers/lifecycle/render-lifecycle.mjs +561 -0
  474. package/skills/interactive-page/scripts/archify/renderers/sequence/README.md +114 -0
  475. package/skills/interactive-page/scripts/archify/renderers/sequence/render-sequence.mjs +464 -0
  476. package/skills/interactive-page/scripts/archify/renderers/shared/brand-marks.mjs +563 -0
  477. package/skills/interactive-page/scripts/archify/renderers/shared/cli.mjs +218 -0
  478. package/skills/interactive-page/scripts/archify/renderers/shared/desktop-readability.mjs +26 -0
  479. package/skills/interactive-page/scripts/archify/renderers/shared/diagnostics.mjs +127 -0
  480. package/skills/interactive-page/scripts/archify/renderers/shared/engineering-profiles.mjs +157 -0
  481. package/skills/interactive-page/scripts/archify/renderers/shared/generated-brand-marks.mjs +3 -0
  482. package/skills/interactive-page/scripts/archify/renderers/shared/generated-validators.mjs +13 -0
  483. package/skills/interactive-page/scripts/archify/renderers/shared/geometry.mjs +1423 -0
  484. package/skills/interactive-page/scripts/archify/renderers/shared/i18n.mjs +595 -0
  485. package/skills/interactive-page/scripts/archify/renderers/shared/layout-report.mjs +40 -0
  486. package/skills/interactive-page/scripts/archify/renderers/shared/legend.mjs +217 -0
  487. package/skills/interactive-page/scripts/archify/renderers/shared/output-path.mjs +340 -0
  488. package/skills/interactive-page/scripts/archify/renderers/shared/repository-evidence.mjs +238 -0
  489. package/skills/interactive-page/scripts/archify/renderers/shared/repository-location.mjs +58 -0
  490. package/skills/interactive-page/scripts/archify/renderers/shared/text-fit.mjs +49 -0
  491. package/skills/interactive-page/scripts/archify/renderers/shared/utils.mjs +232 -0
  492. package/skills/interactive-page/scripts/archify/renderers/shared/validator.mjs +86 -0
  493. package/skills/interactive-page/scripts/archify/renderers/workflow/README.md +223 -0
  494. package/skills/interactive-page/scripts/archify/renderers/workflow/render-workflow.mjs +35 -0
  495. package/skills/interactive-page/scripts/archify/renderers/workflow/workflow-compiler.mjs +4400 -0
  496. package/skills/interactive-page/scripts/archify/renderers/workflow/workflow-migration-geometry.mjs +144 -0
  497. package/skills/interactive-page/scripts/archify/schemas/README.md +211 -0
  498. package/skills/interactive-page/scripts/archify/schemas/architecture.schema.json +178 -0
  499. package/skills/interactive-page/scripts/archify/schemas/common.schema.json +115 -0
  500. package/skills/interactive-page/scripts/archify/schemas/dataflow.schema.json +243 -0
  501. package/skills/interactive-page/scripts/archify/schemas/lifecycle.schema.json +266 -0
  502. package/skills/interactive-page/scripts/archify/schemas/sequence.schema.json +223 -0
  503. package/skills/interactive-page/scripts/archify/schemas/workflow.schema.json +428 -0
  504. package/skills/interactive-page/scripts/archify/scripts/check-render-output.mjs +916 -0
  505. package/skills/interactive-page/scripts/archify/scripts/render-examples.mjs +26 -0
  506. package/skills/interactive-page/scripts/bundle-artifact.sh +9 -8
  507. package/skills/skill-creator/SKILL.md +4 -5
  508. package/.next/server/app/api/bot/task/[id]/route/app-paths-manifest.json +0 -3
  509. package/.next/server/app/api/bot/task/[id]/route.js +0 -16
  510. package/.next/server/app/api/bot/task/[id]/route.js.nft.json +0 -1
  511. package/.next/server/app/api/bot/task/[id]/route_client-reference-manifest.js +0 -3
  512. package/.next/server/app/api/bot/task/route/app-paths-manifest.json +0 -3
  513. package/.next/server/app/api/bot/task/route.js +0 -16
  514. package/.next/server/app/api/bot/task/route.js.nft.json +0 -1
  515. package/.next/server/app/api/bot/task/route_client-reference-manifest.js +0 -3
  516. package/.next/server/chunks/[root-of-the-server]__026u77e._.js +0 -5
  517. package/.next/server/chunks/[root-of-the-server]__02va5wz._.js +0 -3
  518. package/.next/server/chunks/[root-of-the-server]__050zri4._.js +0 -3
  519. package/.next/server/chunks/[root-of-the-server]__0bg9710._.js +0 -3
  520. package/.next/server/chunks/[root-of-the-server]__0ffbg85._.js +0 -3
  521. package/.next/server/chunks/[root-of-the-server]__0in-d5s._.js +0 -3
  522. package/.next/server/chunks/[root-of-the-server]__0ncs9uu._.js +0 -3
  523. package/.next/server/chunks/[root-of-the-server]__0pa9k-f._.js +0 -8
  524. package/.next/server/chunks/[root-of-the-server]__0qi_m0e._.js +0 -8
  525. package/.next/server/chunks/[root-of-the-server]__0tq0m_k._.js +0 -3
  526. package/.next/server/chunks/[root-of-the-server]__0xep6j_._.js +0 -3
  527. package/.next/server/chunks/[root-of-the-server]__1-ga0kh._.js +0 -5
  528. package/.next/server/chunks/[root-of-the-server]__11n256_._.js +0 -5
  529. package/.next/server/chunks/[root-of-the-server]__144l7qt._.js +0 -8
  530. package/.next/server/chunks/[root-of-the-server]__1_04mcf._.js +0 -5
  531. package/.next/server/chunks/[root-of-the-server]__1anc1p9._.js +0 -3
  532. package/.next/server/chunks/[root-of-the-server]__1fizn31._.js +0 -3
  533. package/.next/server/chunks/[root-of-the-server]__1jg8t86._.js +0 -8
  534. package/.next/server/chunks/[root-of-the-server]__1lldzy9._.js +0 -3
  535. package/.next/server/chunks/[root-of-the-server]__1llj3-b._.js +0 -3
  536. package/.next/server/chunks/[root-of-the-server]__1p8m3f4._.js +0 -3
  537. package/.next/server/chunks/[root-of-the-server]__1peqvsi._.js +0 -3
  538. package/.next/server/chunks/[root-of-the-server]__1w8gm5h._.js +0 -10
  539. package/.next/server/chunks/[root-of-the-server]__1xt39nn._.js +0 -8
  540. package/.next/server/chunks/[root-of-the-server]__1zb8mfo._.js +0 -8
  541. package/.next/server/chunks/_0-73of8._.js +0 -55
  542. package/.next/server/chunks/_0-fjql4._.js +0 -31
  543. package/.next/server/chunks/_00xh_q0._.js +0 -25
  544. package/.next/server/chunks/_051qh8u._.js +0 -3
  545. package/.next/server/chunks/_05sovvj._.js +0 -3
  546. package/.next/server/chunks/_091bi8d._.js +0 -3
  547. package/.next/server/chunks/_0fzqt2y._.js +0 -142
  548. package/.next/server/chunks/_0lr92vd._.js +0 -3
  549. package/.next/server/chunks/_0mecv0f._.js +0 -31
  550. package/.next/server/chunks/_0mh8j4m._.js +0 -3
  551. package/.next/server/chunks/_0sb7tlz._.js +0 -3
  552. package/.next/server/chunks/_0si7xzn._.js +0 -3
  553. package/.next/server/chunks/_0u10wmw._.js +0 -55
  554. package/.next/server/chunks/_0wp4le3._.js +0 -3
  555. package/.next/server/chunks/_0y5fg-x._.js +0 -3
  556. package/.next/server/chunks/_1230wbx._.js +0 -10
  557. package/.next/server/chunks/_12nheja._.js +0 -3
  558. package/.next/server/chunks/_13510xh._.js +0 -3
  559. package/.next/server/chunks/_15hq89o._.js +0 -3
  560. package/.next/server/chunks/_18-1wcc._.js +0 -55
  561. package/.next/server/chunks/_18d7-5p._.js +0 -3
  562. package/.next/server/chunks/_1c78vw5._.js +0 -237
  563. package/.next/server/chunks/_1h5_8sk._.js +0 -3
  564. package/.next/server/chunks/_1hdnxb7._.js +0 -3
  565. package/.next/server/chunks/_1j8k_j5._.js +0 -3
  566. package/.next/server/chunks/_1nula3v._.js +0 -3
  567. package/.next/server/chunks/_1php4eq._.js +0 -3
  568. package/.next/server/chunks/_1yuv4vp._.js +0 -3
  569. package/.next/server/chunks/_1zkfbaa._.js +0 -3
  570. package/.next/server/chunks/_next-internal_server_app_api_bot_task_[id]_route_actions_1_k_8u3.js +0 -3
  571. package/.next/server/chunks/_next-internal_server_app_api_bot_task_route_actions_0xln6ra.js +0 -3
  572. package/.next/server/chunks/features_0rpfxbk._.js +0 -3
  573. package/.next/server/chunks/features_1qf3cei._.js +0 -8
  574. package/.next/server/chunks/features_bot_0zt92oh._.js +0 -3
  575. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1jidylq._.js +0 -3
  576. package/.next/server/chunks/ssr/[externals]__0dizgek._.js +0 -3
  577. package/.next/server/chunks/ssr/[root-of-the-server]__0-nob52._.js +0 -4
  578. package/.next/server/chunks/ssr/[root-of-the-server]__092knlj._.js +0 -3
  579. package/.next/server/chunks/ssr/[root-of-the-server]__0mz33a7._.js +0 -3
  580. package/.next/server/chunks/ssr/[root-of-the-server]__0s4wb56._.js +0 -3
  581. package/.next/server/chunks/ssr/[root-of-the-server]__0s9dq5u._.js +0 -3
  582. package/.next/server/chunks/ssr/[root-of-the-server]__0sd3izg._.js +0 -3
  583. package/.next/server/chunks/ssr/[root-of-the-server]__0vnmv-s._.js +0 -3
  584. package/.next/server/chunks/ssr/[root-of-the-server]__1-13tcn._.js +0 -43
  585. package/.next/server/chunks/ssr/[root-of-the-server]__10-dz5o._.js +0 -61
  586. package/.next/server/chunks/ssr/[root-of-the-server]__1zidpfl._.js +0 -3
  587. package/.next/server/chunks/ssr/_001_ms1._.js +0 -33
  588. package/.next/server/chunks/ssr/_01n3o0m._.js +0 -3
  589. package/.next/server/chunks/ssr/_04z2c7b._.js +0 -3
  590. package/.next/server/chunks/ssr/_06tssji._.js +0 -3
  591. package/.next/server/chunks/ssr/_0fk4c7d._.js +0 -3
  592. package/.next/server/chunks/ssr/_0h42fze._.js +0 -3
  593. package/.next/server/chunks/ssr/_0h7zdni._.js +0 -3
  594. package/.next/server/chunks/ssr/_0mggveb._.js +0 -3
  595. package/.next/server/chunks/ssr/_0nbpc_8._.js +0 -3
  596. package/.next/server/chunks/ssr/_0q0zan6._.js +0 -70
  597. package/.next/server/chunks/ssr/_0zcjrbg._.js +0 -3
  598. package/.next/server/chunks/ssr/_0zhoc3r._.js +0 -3
  599. package/.next/server/chunks/ssr/_11j92tu._.js +0 -3
  600. package/.next/server/chunks/ssr/_13fke0x._.js +0 -3
  601. package/.next/server/chunks/ssr/_18cymkq._.js +0 -3
  602. package/.next/server/chunks/ssr/_1ebxla1._.js +0 -3
  603. package/.next/server/chunks/ssr/_1nj4niv._.js +0 -42
  604. package/.next/server/chunks/ssr/_1ov37if._.js +0 -3
  605. package/.next/server/chunks/ssr/_1ovmc9s._.js +0 -3
  606. package/.next/server/chunks/ssr/_1sji22n._.js +0 -3
  607. package/.next/server/chunks/ssr/_1vi_uo7._.js +0 -3
  608. package/.next/server/chunks/ssr/_1vyd1ji._.js +0 -3
  609. package/.next/server/chunks/ssr/_1xx4zlb._.js +0 -3
  610. package/.next/server/chunks/ssr/components_ui_1y1l7yj._.js +0 -3
  611. package/.next/server/chunks/ssr/features_bot_1s_-2vj._.js +0 -3
  612. package/.next/server/chunks/ssr/lib_realtime_12wg_dd._.js +0 -27
  613. package/.next/server/chunks/ssr/lib_realtime_15h_v1v._.js +0 -27
  614. package/.next/server/chunks/ssr/node_modules_lucide-react_dist_esm_icons_0npjf8-._.js +0 -3
  615. package/.next/static/chunks/0n3jle9kbqfr2.js +0 -40
  616. package/.next/static/chunks/0r5qcctujhxli.js +0 -1
  617. package/.next/static/chunks/10teww7wt-f6h.js +0 -1
  618. package/.next/static/chunks/126fj4pga_72k.js +0 -1
  619. package/.next/static/chunks/159udiexf6dom.js +0 -2
  620. package/.next/static/chunks/18a96rkhi4_yd.js +0 -1
  621. package/.next/static/chunks/18gi7o2ibrgh8.js +0 -3
  622. package/.next/static/chunks/1dkjg87pxk0n9.js +0 -28
  623. package/.next/static/chunks/1q9z1tohil7xn.js +0 -1
  624. package/.next/static/chunks/1sjgfets224re.js +0 -1
  625. package/.next/static/chunks/1wszsr83t01gh.js +0 -1
  626. package/.next/static/chunks/22_zkas21rpna.js +0 -1
  627. package/.next/static/chunks/2fh4-3z_q8b_w.js +0 -1
  628. package/.next/static/chunks/2h0sd2vumhb15.js +0 -1
  629. package/.next/static/chunks/2szintyibu0s5.js +0 -1
  630. package/.next/static/chunks/2t4vhi3m8ahya.js +0 -1
  631. package/.next/static/chunks/2tigdtz3dpcy8.js +0 -1
  632. package/.next/static/chunks/3-b6b7entqazs.js +0 -1
  633. package/.next/static/chunks/3786h5vayt80-.js +0 -28
  634. package/.next/static/chunks/3cq5g494yuke8.css +0 -1
  635. package/.next/static/chunks/3dmbhsv2u_8kj.js +0 -1
  636. package/.next/static/chunks/3hibbjnt85-k6.js +0 -1
  637. package/.next/static/chunks/3i0a5px-oufgc.js +0 -1
  638. package/.next/static/chunks/3wexk9qo8zuj3.js +0 -18
  639. package/.next/static/chunks/3xk7yqgomx7yq.js +0 -1
  640. package/.next/static/chunks/3xre8bu_pk1p_.js +0 -1
  641. package/.next/static/chunks/3zv6t3i77xhr_.js +0 -1
  642. package/database/migrations/20260911030320_opposite_jack_power/migration.sql +0 -1
  643. package/docs/images/task-thread.png +0 -0
  644. package/features/bot/components/task-badge.tsx +0 -42
  645. package/features/bot/components/task-reply.tsx +0 -328
  646. package/features/bot/components/task-setting.tsx +0 -524
  647. package/features/bot/task.query.ts +0 -1079
  648. package/features/bot/task.store.ts +0 -487
  649. package/lib/realtime/client-secret.ts +0 -86
  650. package/lib/realtime/open-session.ts +0 -31
  651. package/lib/realtime/openai.ts +0 -35
  652. package/lib/realtime/realtime.audio.ts +0 -196
  653. package/lib/realtime/realtime.driver.ts +0 -489
  654. package/lib/realtime/realtime.protocol.ts +0 -393
  655. package/lib/realtime/realtime.schema.ts +0 -37
  656. package/lib/realtime/realtime.session.ts +0 -106
  657. package/lib/realtime/realtime.transport.ts +0 -384
  658. package/lib/realtime/xai.ts +0 -39
  659. /package/.next/server/app/api/bot/{task → thread}/[id]/route/build-manifest.json +0 -0
  660. /package/.next/server/app/api/bot/{task → thread}/[id]/route/server-reference-manifest.json +0 -0
  661. /package/.next/server/app/api/bot/{task → thread}/[id]/route.js.map +0 -0
  662. /package/.next/server/app/api/bot/{task → thread}/route/build-manifest.json +0 -0
  663. /package/.next/server/app/api/bot/{task → thread}/route/server-reference-manifest.json +0 -0
  664. /package/.next/server/app/api/bot/{task → thread}/route.js.map +0 -0
  665. /package/.next/static/{G6-gNoyGDEcgAsq-L4PE1 → yyRVBc0xxYQsh3GpbQX9b}/_buildManifest.js +0 -0
  666. /package/.next/static/{G6-gNoyGDEcgAsq-L4PE1 → yyRVBc0xxYQsh3GpbQX9b}/_clientMiddlewareManifest.js +0 -0
  667. /package/.next/static/{G6-gNoyGDEcgAsq-L4PE1 → yyRVBc0xxYQsh3GpbQX9b}/_ssgManifest.js +0 -0
@@ -0,0 +1,5 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,279265,978411,399512,e=>{"use strict";var t=e.i(843476),n=e.i(401851),a=e.i(108957),s=e.i(980797),o=e.i(383482),r=e.i(96892),i=e.i(689664),l=e.i(716327),d=e.i(24071),c=e.i(867927),u=e.i(931619),m=e.i(119002),x=e.i(51481),p=e.i(508734),h=e.i(632781),f=e.i(77071),b=e.i(825398),g=e.i(263676),k=e.i(271645),j=e.i(511769),w=e.i(798120),y=e.i(815731),v=e.i(167881),N=e.i(496336),T=e.i(683408),M=e.i(660302),S=e.i(671428),z=e.i(127341),C=e.i(184762),_=e.i(6799),A=e.i(41533),R=e.i(201082),$=e.i(451888),I=e.i(635963),B=e.i(835878),q=e.i(764224),D=e.i(919191),E=e.i(929272),F=e.i(463415),O=e.i(673544),L=e.i(707467),P=e.i(95187);let K=(0,P.createServerReference)("7feb38361657ff2d01858e3fd2d867d37a52aac4ba",P.callServer,void 0,P.findSourceMapURL,"markSeenAction");var H=e.i(245629),U=e.i(393080),V=e.i(283653),Y=e.i(647163),W=e.i(553429);let G=[],Q=!1,J=new Set,X={sync(e,t){for(let n of(Q=!0,G=[...e].reverse().map(e=>Z(e,t)),J))n()},primed:()=>Q};function Z(e,t){let n=e=>({name:e,icon:t?.find(t=>t.name===e)?.icon??null}),a=n(e.bot),s=[],o=new Map,r=new Map,i=new Map;for(let t of e.lines){let e=t.bot?n(t.bot):a,l=t.to?n(t.to):t.parent?r.get(t.parent)??null:null;switch(t.kind){case"user":s.push({id:t.id,bot:t.to?n(t.to):a,to:t.to?n(t.to):null,text:t.text,kind:"user"});break;case"text":s.push({id:t.id,bot:e,to:l,text:t.text,kind:"say"});break;case"note":s.push({id:t.id,bot:e,to:l,text:t.text,kind:"note"});break;case"stop":s.push({id:t.id,bot:e,to:l,text:t.text,kind:"stop",at:t.at});break;case"tool":o.set(t.callId,s.length),s.push({id:t.id,bot:e,to:l,text:t.note??t.input,kind:"tool",tool:{name:t.name,input:t.input,note:t.note,path:t.path,callId:t.callId}});break;case"tool-result":{let e=o.get(t.callId)??i.get(t.callId),n=void 0===e?void 0:s[e];n?.tool&&void 0!==e?s[e]={...n,tool:{...n.tool,results:t.results,more:t.more}}:n?.kind==="ask"&&void 0!==e&&(s[e]={id:n.id,bot:n.bot,to:null,text:n.text,kind:"tool",tool:{name:t.name,input:n.text,callId:t.callId,results:t.results,more:t.more}});break}case"ask":{i.set(t.callId,s.length);let a=n(t.to);r.set(t.callId,e),s.push({id:t.id,bot:e,to:a,text:t.text,kind:"ask",question:t.question})}}}if("done"===e.status){let t=s.at(-1);t&&"say"===t.kind&&t.text===e.outcome&&(s[s.length-1]={...t,kind:"result"})}return{id:e.id,room:e.room,request:e.request,label:e.label,bot:a,lines:s,status:"running"===e.status?"working":e.status,outcome:e.outcome,ask:e.ask,seen:e.seen,tokens:e.tokens,contextTokens:e.contextTokens,contextBudget:e.contextBudget,updatedAt:e.updatedAt}}function ee(e){for(let t=e.lines.length-1;t>=0;t--){let n=e.lines[t];if("user"!==n.kind&&"note"!==n.kind&&"stop"!==n.kind)return n}return null}let et=new Map,en=new Map,ea={recipient:e=>en.get(e),select:(e,t)=>{en.set(e,t)},get:(e,t,n)=>et.get(e)?.get(JSON.stringify([t,n??null]))??"",set(e,t,n,a){let s=et.get(e)??new Map,o=JSON.stringify([t,a??null]);n?s.set(o,n):s.delete(o),s.size?et.set(e,s):et.delete(e)}},es=new Set,eo={announce(e){for(let t of es)t(e)},subscribe:e=>(es.add(e),()=>{es.delete(e)})},er=[];function ei(){return(0,k.useSyncExternalStore)(e=>(J.add(e),()=>J.delete(e)),()=>G,()=>er)}function el(e){let t=[e.bot];for(let n of e.lines)for(let e of[n.bot,n.to])e&&e.name!==W.ROOM_THURSDAY&&!t.some(t=>t.name===e.name)&&t.push(e);return t}let ed=e=>e.id.slice(0,e.id.lastIndexOf("-")),ec=e=>"user"===e.kind?{name:W.ROOM_THURSDAY}:e.bot,eu=e=>"user"===e.kind?e.bot:e.to,em=(e,t)=>({kind:"entry",speaker:e.bot,entry:{kind:"work",key:`${e.lines[0].id}-work`,lines:e.lines,open:t}});function ex(e,t,n=[]){let a,s=(a=new Set(e.lines.filter(e=>"tool"===e.kind||"ask"===e.kind).map(ed)),e=>"user"===e.kind||"ask"===e.kind||"result"===e.kind||"say"===e.kind&&!a.has(ed(e))),o=t===e.bot.name?e.lines:e.lines.filter(e=>ec(e).name===t||s(e)&&eu(e)?.name===t),r=new Set([e.bot.name,W.ROOM_THURSDAY]),i=new Map;for(let t of e.lines){let e=eu(t);e&&!r.has(e.name)&&(r.add(e.name),i.set(t.id,{from:ec(t),to:e})),r.add(t.bot.name)}let l=[],d=new Map,c=e=>{let t=e?d.get(e.name):void 0;t&&(d.delete(t.bot.name),l.push(em(t,!1)))};for(let e of o){if(!s(e)){let t=d.get(e.bot.name)??{bot:e.bot,lines:[],at:0};t.lines.push(e),t.at=l.length,d.set(e.bot.name,t);continue}let t=ec(e);c(eu(e));let n=i.get(e.id);n&&l.push({kind:"invite",key:`${e.id}-joins`,...n}),c(t),l.push({kind:"entry",speaker:t,entry:{kind:"message",key:e.id,line:e}})}for(let e of[...d.values()].sort((e,t)=>e.at-t.at).reverse())l.splice(e.at,0,em(e,!0));for(let e of n)d.has(e.name)||l.push({kind:"entry",speaker:e,entry:{kind:"work",key:`${e.name}-now`,lines:[],open:!0}});let u=[];for(let e of l){let t=u.at(-1);"invite"===e.kind?u.push(e):t?.kind==="turn"&&t.speaker.name===e.speaker.name?t.entries.push(e.entry):u.push({kind:"turn",key:e.entry.key,speaker:e.speaker,entries:[e.entry]})}return u}function ep(e){let t=new Map;for(let n of e)for(let e of(t.has(n.bot.name)||t.set(n.bot.name,{bot:n.bot,thread:n,line:null}),n.lines))"user"!==e.kind&&"note"!==e.kind&&"stop"!==e.kind&&t.set(e.bot.name,{bot:e.bot,thread:n,line:e});return[...t.values()]}function eh(e){let t=(0,k.useRef)(new Set),n=e?.id??null,a=e?`${e.id}@${(0,H.toDate)(e.updatedAt).getTime()}`:null,s=!!e&&"done"===e.status&&!e.seen;(0,k.useEffect)(()=>{!n||!a||!s||t.current.has(a)||(t.current.add(a),K([n]).then(U.unwrapResult).then(()=>(0,V.revalidate)(w.queryKey.threads)).catch(e=>{t.current.delete(a),_.toast.add({type:"error",title:"Could not mark the thread as read",description:(0,Y.errorToString)(e)})}))},[n,a,s])}e.s(["botThreads",0,X,"heardBy",0,eu,"lastSaid",0,ee,"latestPerBot",0,ep,"rosterOf",0,el,"screenActs",0,eo,"threadDrafts",0,ea,"threadFromRow",0,Z,"threadItems",0,ex,"useBotThreads",0,ei,"useSeenOnDetail",0,eh],978411);var ef=e.i(609856);function eb({thread:e,status:n,faces:a=[],to:s=null,className:o}){let[r,i]=(0,k.useState)(),[l,u]=(0,k.useState)(()=>ea.recipient(e.id)??e.bot),[m,x]=(0,k.useState)(!1),[p,f]=(0,k.useState)(null);(0,k.useEffect)(()=>{u(ea.recipient(e.id)??e.bot),i(void 0),x(!1)},[e.id,e.bot]),(0,k.useEffect)(()=>{s&&(ea.select(e.id,s),u(s))},[e.id,s]);let b=e.room.participants,j=e.room.questions,y=Math.max(0,j.findIndex(e=>e.id===r)),S=j[y],z="waiting"===n?e.ask:null,C=(0,$.isAppStop)(z),_=S?.bot??(b.some(e=>e.bot===l)?l:e.bot),A=S?.id,[R,I]=eN(),[B,q]=(0,ef.useServerAction)(L.cancelThreadAction,{onOk:e=>{(0,V.revalidate)(w.queryKey.threads),eo.announce({kind:"stopped",id:e.id,label:e.label})}}),F=I||q,O=e.room.deliveries.filter(e=>!e.delivered).map(e=>`${e.bot}: ${e.text}`).join(" · "),P=b.filter(e=>"running"===e.state).map(e=>e.bot).join(", ")||e.bot,K=e=>a.find(t=>t.name===e)??{name:e},H=async t=>{if(F)return!1;let a=await R(e,t,_,A);return a&&"running"===n&&x(!1),a},U=async e=>{f(e),await H(e),f(null)},W="running"===n||"waiting"===n?(0,t.jsx)(v.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:F,onClick:()=>B(e.id),"aria-label":"Stop this thread",title:"Stop this thread",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:q?(0,t.jsx)(h.Loader2,{className:"animate-spin"}):(0,t.jsx)(E.Square,{className:"size-3"})}):null;if(S){let n=S.options??[],a=S.text;return(0,t.jsxs)(eg,{className:o,children:[(0,t.jsx)(ek,{bot:K(_),word:"Question",children:j.length>1&&(0,t.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-0.5",children:[(0,t.jsx)(v.Button,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Previous question",disabled:F||0===y,onClick:()=>i(j[y-1].id),children:(0,t.jsx)(d.ChevronLeft,{})}),(0,t.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground tabular-nums","aria-live":"polite",children:[y+1," / ",j.length]}),(0,t.jsx)(v.Button,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Next question",disabled:F||y===j.length-1,onClick:()=>i(j[y+1].id),children:(0,t.jsx)(c.ChevronRight,{})})]})}),a&&(0,t.jsx)("div",{className:"max-h-[min(14rem,30vh)] min-w-0 overflow-y-auto overscroll-contain pr-1.5",children:(0,t.jsx)(T.Markdown,{className:"min-w-0 text-[13px] leading-snug wrap-anywhere break-keep [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:a})}),n.length>0&&(0,t.jsx)(ej,{options:n,picked:p,busy:F,onChoose:U}),(0,t.jsx)(ew,{threadId:e.id,recipient:_,draftKey:S.id,send:H,busy:F,placeholder:n.length?"Or write your own answer…":"Your answer…",label:`Answer for ${_}`,trailing:W},JSON.stringify([e.id,_,S.id]))]})}return C?(0,t.jsxs)(eg,{className:o,children:[(0,t.jsx)(ek,{bot:K(e.bot),word:"Paused"}),z?.question&&(0,t.jsx)(N.FoldedText,{text:z.question,subject:"message",clamp:"line-clamp-3",tall:"max-h-40"}),(0,t.jsx)(ej,{options:z?.options.length?z.options:[$.THREAD_CONTINUE],picked:p,busy:F,onChoose:U}),(0,t.jsx)(ew,{threadId:e.id,recipient:_,send:H,busy:F,placeholder:"Or put it another way…",label:`Message for ${_}`,trailing:W},JSON.stringify([e.id,_,"paused"]))]}):"running"!==n||m?(0,t.jsxs)("div",{className:(0,Y.cn)("flex min-w-0 flex-col gap-1.5",o),children:[(0,t.jsx)(ew,{threadId:e.id,recipient:_,send:H,busy:F,autoFocus:"running"===n,onEscape:"running"===n?()=>x(!1):void 0,placeholder:"running"===n?`What's off? ${_} reads this before its next step`:"Anything more? It picks up where it left off",label:`Message for ${_}`,className:"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",leading:b.length>1?(0,t.jsx)(ey,{current:K(_),bots:b.map(e=>K(e.bot)),disabled:F,onPick:t=>{ea.select(e.id,t),u(t)}}):null,trailing:"running"===n?(0,t.jsx)(v.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:F,onClick:()=>x(!1),"aria-label":"Never mind",className:"text-muted-foreground",children:(0,t.jsx)(g.X,{})}):null},JSON.stringify([e.id,_])),!!O&&"running"!==n&&(0,t.jsxs)("p",{className:"flex min-w-0 items-center gap-2 px-1 text-xs text-muted-foreground",children:[(0,t.jsx)(h.Loader2,{className:"size-3 shrink-0 animate-spin"}),(0,t.jsxs)("span",{className:"truncate",children:["Sending to ",O]})]})]}):(0,t.jsxs)("div",{className:(0,Y.cn)("flex min-w-0 items-center gap-2 rounded-2xl bg-muted/40 py-1.5 pr-1.5 pl-3.5 ring-1 ring-border/50",o),children:[O?(0,t.jsxs)("p",{className:"flex min-w-0 flex-1 items-center gap-2 text-[12.5px] leading-5 text-muted-foreground",children:[(0,t.jsx)(h.Loader2,{className:"size-3 shrink-0 animate-spin"}),(0,t.jsx)("span",{className:"shrink-0",children:"Before its next step:"}),(0,t.jsx)(M.ShinyText,{text:O,speed:2.2,className:"min-w-0 truncate"})]}):(0,t.jsx)(M.ShinyText,{text:`${P} \xb7 Working`,speed:2.4,className:"min-w-0 flex-1 truncate text-[12.5px] leading-5 break-keep"}),(0,t.jsxs)(v.Button,{type:"button",size:"sm",variant:"ghost",disabled:F,onClick:()=>x(!0),className:"h-7 shrink-0 gap-1.5 rounded-full px-2.5 text-[12px]",children:[(0,t.jsx)(D.CornerDownLeft,{className:"size-3.5"}),"Step in"]}),(0,t.jsx)("span",{className:"h-4 w-px shrink-0 bg-border"}),W]})}function eg({className:e,children:n}){return(0,t.jsx)("div",{className:(0,Y.cn)("flex min-w-0 flex-col gap-2.5 rounded-[18px] bg-muted py-2 pr-2 pl-3.5",e),children:n})}function ek({bot:e,word:n,children:a}){return(0,t.jsxs)("div",{className:"flex min-h-7 min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{title:e.name,className:"shrink-0 leading-none",children:(0,t.jsx)(ev,{bot:e,size:16})}),(0,t.jsx)("span",{className:(0,Y.cn)("truncate text-[12px] leading-4 font-medium",Y.WAITING_INK),children:n}),a]})}function ej({options:e,picked:n,busy:a,onChoose:s}){return(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.map(e=>(0,t.jsxs)(v.Button,{type:"button",size:"sm",variant:"ghost",loading:n===e,disabled:a,onClick:()=>s(e),className:"h-7 gap-1.5 rounded-full bg-background px-3 text-[12.5px] hover:bg-background/60 dark:hover:bg-background/60",children:[e===$.THREAD_CONTINUE&&n!==e&&(0,t.jsx)(u.ChevronsRight,{className:"size-3.5 text-muted-foreground"}),e]},e))})}function ew({threadId:e,recipient:n,draftKey:a,send:s,busy:o,placeholder:i,label:l,autoFocus:d=!1,onEscape:c,leading:u,trailing:m,className:x}){let[p,f]=(0,k.useState)(()=>ea.get(e,n,a)),[b,g]=(0,k.useState)(!1),j=t=>{f(t),ea.set(e,n,t,a)},w=async()=>{p.trim()&&!o&&(g(!0),await s(p)&&j(""),g(!1))};return(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),w()},className:(0,Y.cn)("flex min-w-0 items-end gap-1",x),children:[u,(0,t.jsx)(C.Textarea,{value:p,rows:1,disabled:o,autoFocus:d,onChange:e=>j(e.target.value),onKeyDown:e=>{"Escape"===e.key&&c?c():"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||229===e.keyCode||(e.preventDefault(),w())},placeholder:i,"aria-label":l,className:"max-h-32 min-h-0 min-w-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"}),m,(0,t.jsx)(v.Button,{type:"submit",size:"icon-sm",variant:p.trim()?"default":"ghost",disabled:!p.trim()||o,"aria-label":"Send",className:"rounded-full",children:b?(0,t.jsx)(h.Loader2,{className:"animate-spin"}):(0,t.jsx)(r.ArrowUp,{})})]})}function ey({current:e,bots:n,disabled:a,onPick:s}){return(0,t.jsxs)(F.DropdownMenu,{children:[(0,t.jsxs)(F.DropdownMenuTrigger,{render:(0,t.jsx)("button",{type:"button",disabled:a,"aria-label":`Message ${e.name}; choose another bot`,className:"mt-1 inline-flex h-5 shrink-0 items-center gap-1 self-start rounded-full bg-muted pr-1.5 pl-[3px] text-[12px] leading-none font-medium outline-none transition-colors hover:bg-muted-foreground/15 focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50"}),children:[(0,t.jsx)(ev,{bot:e,size:14}),(0,t.jsx)("span",{className:"max-w-32 truncate",children:e.name}),(0,t.jsx)(l.ChevronDown,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,t.jsx)(F.DropdownMenuContent,{align:"start",children:(0,t.jsx)(F.DropdownMenuGroup,{children:n.map(e=>(0,t.jsxs)(F.DropdownMenuItem,{onClick:()=>s(e.name),children:[(0,t.jsx)(ev,{bot:e,size:16}),e.name]},e.name))})})]})}function ev({bot:e,size:n}){return(0,t.jsx)(I.BotMark,{size:n,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"})}function eN(){let[e,t]=(0,ef.useServerAction)(O.answerThreadAction,{onOk:()=>(0,V.revalidate)(w.queryKey.threads)});return[async(t,n,a,s)=>{let o=n.trim();if(!o)return!1;try{let n=await e(t.id,o,a,s);return eo.announce({kind:"answered",id:n.id,label:n.label,answer:o,recipient:a,replyTo:s}),!0}catch{return!1}},t]}e.s(["ThreadReply",0,eb,"useAnswerThread",0,eN],399512);var eT=e.i(256604),eM=e.i(621285),eS=e.i(661504),ez=e.i(864723),eC=e.i(222055);let e_=(0,k.memo)(function(){let e=ei(),{data:n}=(0,V.useServerRoute)(w.queryKey.bot),[a,s]=(0,k.useState)(!1),[o,r]=(0,k.useState)(null),[i,l]=(0,k.useState)(!1),[d,c]=(0,k.useState)({}),[u,m]=(0,k.useState)("now"),x=(0,k.useRef)(0),p=[...e].reverse(),h=Date.now(),f=e=>"cancelled"===e.status?0:"done"===e.status&&e.seen?(0,H.toDate)(e.updatedAt).getTime()+A.ROOM_KEEP_READ_MS:1/0,b=p.filter(e=>f(e)>h),[,g]=(0,k.useState)(0),y=Math.min(...b.map(f));(0,k.useEffect)(()=>{if(!Number.isFinite(y))return;let e=setTimeout(()=>g(e=>e+1),y-Date.now());return()=>clearTimeout(e)},[y]);let v=a&&"history"===u,N=(0,eS.useServerPages)({key:(e,t)=>{if(!v)return null;if(0===e)return w.queryKey.threadHistory(null);let n=t?.at(-1);return n?w.queryKey.threadHistory((0,H.toDate)(n.updatedAt).toISOString()):null},size:A.PAGE_SIZE}),{refresh:T}=N,M=(0,k.useRef)(!1);M.current=N.items.length>0,(0,k.useEffect)(()=>{v&&M.current&&T()},[v,T]);let S=(0,k.useMemo)(()=>N.items.filter(e=>"done"===e.status||"cancelled"===e.status).map(e=>Z(e,n)),[N.items,n]),z=o?p.find(e=>e.id===o)??S.find(e=>e.id===o)??null:null,[C,_]=function(){let[e,t]=(0,k.useState)(null),n=(0,k.useRef)(null);return(0,k.useEffect)(()=>()=>{n.current&&clearTimeout(n.current)},[]),[e,(0,k.useCallback)(e=>{t(e),n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{n.current=null,t(null)},3400)},[])]}(),{crew:R,more:I}=(0,k.useMemo)(()=>(function(e,t){let n=new Map;for(let e of ep(t)){let{thread:t,bot:a,line:s}=e;if("waiting"===t.status&&t.bot.name===a.name){n.set(a.name,{waiting:!0,word:null});continue}!("working"!==t.status||n.get(a.name)?.waiting)&&n.set(a.name,{waiting:!1,word:s?.kind==="tool"||s?.kind==="say"?e$(tc(s)):null})}let a=new Map;for(let t of e??[])a.set(t.name,{name:t.name,icon:t.icon,awake:n.has(t.name),waiting:n.get(t.name)?.waiting??!1,word:n.get(t.name)?.word??null});for(let[e,t]of n)a.has(e)||a.set(e,{name:e,icon:null,awake:!0,waiting:t.waiting,word:t.word});let s=[...a.values()];if(!s.length)return{crew:eP.slice(0,eK),more:0};for(let e of eP){if(s.length>=eK)break;a.has(e.name)||s.push(e)}let o=e=>e.waiting?0:e.awake?1:e.standIn?3:2,r=s.map((e,t)=>({face:e,at:t})).sort((e,t)=>o(e.face)-o(t.face)||e.at-t.at).map(e=>e.face);return{crew:r.slice(0,10),more:Math.max(0,r.length-10)}})(n,e),[n,e]),B=(0,k.useRef)(null),q=(0,k.useRef)(new Map),D=(0,k.useRef)(new Set);(0,k.useEffect)(()=>{if(!X.primed())return;let t=B.current;B.current=new Map(e.map(e=>[e.id,e.status]));let n=q.current;q.current=function(e){let t=new Map;for(let n of e)for(let e of n.room.participants)t.set(`${n.id}
2
+ ${e.bot}`,e.state);return t}(e);let a=D.current;if(D.current=new Set(e.flatMap(e=>e.lines.map(e=>e.id))),!t)return;let s=null;for(let o of e)for(let e of function(e,t,n,a,s){let o=[],r=e.lines.filter(e=>!n.has(e.id)),i=e.bot,l=new Map;for(let e of r)"user"===e.kind?o.push({rank:1,at:e.bot.name,from:tm,to:[e.bot],text:e$(e.text)}):"stop"===e.kind?o.push({rank:3,at:e.bot.name,from:e.bot,to:[],sign:"stopped",text:tM(e.text)}):"ask"===e.kind&&e.to?.name===tm.name?o.push(e.question?{rank:4,at:e.bot.name,from:e.bot,to:[],sign:"question",text:`asks you \xb7 ${e$(e.text)}`}:{rank:2,at:e.bot.name,from:e.bot,to:[tm],text:e$(e.text)}):"ask"===e.kind&&e.to&&l.set(e.bot.name,[...l.get(e.bot.name)??[],e]);for(let[e,t]of l){let n=new Map;for(let e of t)e.to&&n.set(e.to.name,e.to);o.push({rank:2,at:e,from:t[0].bot,to:[...n.values()],text:1===t.length?e$(t[0].text):`sent ${t.length} parts out`})}for(let t of el(e)){let n=`${e.id}
3
+ ${t.name}`;t.name===i.name||"running"!==a.get(n)||"done"!==s.get(n)||r.some(e=>e.bot.name===t.name&&("ask"===e.kind||"say"===e.kind))||o.push({rank:1,at:t.name,from:t,to:[],sign:"done",text:"finished its part"})}if(!t)return"working"===e.status&&o.push({rank:1,at:i.name,from:tm,to:[i],text:`took on “${e$(e.label)}”`}),o;if(t===e.status)return o;let d=e$(e.label);return"cancelled"===e.status?o.push({rank:3,at:i.name,from:i,to:[],sign:"cancelled",text:`stopped \xb7 ${d}`}):"done"===e.status?o.push({rank:3,at:i.name,from:i,to:[],sign:"done",text:`done \xb7 ${d}`}):"working"===e.status?r.some(e=>"user"===e.kind)||o.push({rank:1,at:i.name,from:i,to:[],sign:"resumed",text:"picked it back up"}):(0,$.isAppStop)(e.ask)&&!o.some(e=>"question"===e.sign||"stopped"===e.sign)&&o.push({rank:3,at:i.name,from:i,to:[],sign:"stopped",text:"paused"}),o}(o,t.get(o.id),a,n,q.current))(!s||e.rank>=s.rank)&&(s=e);s&&_(s)},[e,_]),eh(a?z:null),(0,j.useAppEvent)({showThread:e=>{r(e.threadId),s(!0)}});let E=e.filter(e=>"working"===e.status).length,F=p.filter(eI).length,O=p.filter(eB),L=(0,k.useMemo)(()=>R.map(e=>({...e,word:null})),[R]),P=(0,k.useCallback)(()=>l(!1),[]),K=()=>{s(!1),l(!1),r(null),m("now"),x.current=0};return(0,t.jsx)("div",{className:"pointer-events-none absolute right-5 bottom-5 z-10 flex w-[min(80vw,calc(100vw-2.5rem))] flex-col items-end gap-2",children:a?(0,t.jsx)("div",{className:"pointer-events-auto flex max-h-[min(44rem,78vh)] w-132 max-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:z?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eZ,{thread:z,onBack:()=>r(null),onClose:K}),(0,t.jsx)(tn,{thread:z,tab:d[z.id]??null,onTab:e=>c(t=>({...t,[z.id]:e})),className:"min-h-0 flex-1"}),(0,t.jsx)(eb,{thread:{id:z.id,label:z.label,bot:z.bot.name,ask:z.ask,room:z.room},status:"working"===z.status?"running":z.status,faces:el(z),to:d[z.id]??z.bot.name,className:"mx-3 mb-2 shrink-0"})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eX,{tab:u,current:b.length,composing:i,onTab:e=>{l(!1),m(e)},onCompose:()=>l(!0),onClose:()=>i?l(!1):K()}),i?(0,t.jsx)(eL,{bots:n,onDone:P}):"history"===u?(0,t.jsx)(e8,{pages:N,threads:S,scroll:x,onPick:r}):b.length?(0,t.jsx)(te,{threads:b,onPick:r}):p.length?(0,t.jsx)(e7,{}):(0,t.jsx)(e4,{bots:n}),(0,t.jsx)(eD,{crew:L,more:I,bubble:null,label:"Fold the room away",onClick:K,side:C?(0,t.jsx)(eY,{handoff:C}):(0,t.jsx)(eE,{busy:E,pending:F,grown:!0})})]})}):(0,t.jsx)(eq,{crew:R,more:I,bubble:C,bots:n,rows:p.filter(e=>eI(e)||eB(e)),count:e.length,busy:E,pending:F,unread:O.length,composing:i,onCompose:()=>l(!0),onCloseCompose:P,onPick:e=>{r(e),s(!0)},onOpen:()=>s(!0)})})}),eA={done:i.Check,cancelled:g.X,question:x.CircleQuestionMark,stopped:m.CirclePause,resumed:b.RotateCw},eR={question:Y.WAITING_INK,stopped:Y.WAITING_INK},e$=e=>{let t=(0,Y.plainText)(e).replace(/\s+/g," ").trim();return t.length>28?`${t.slice(0,27)}…`:t},eI=$.needsThreadReply,eB=e=>"done"===e.status&&!e.seen;function eq({crew:e,more:n,bubble:a,bots:s,rows:o,count:r,busy:i,pending:l,unread:d,composing:c,onCompose:u,onCloseCompose:m,onPick:x,onOpen:p}){let h=c||o.length>0;return(0,t.jsxs)("div",{className:(0,Y.cn)("pointer-events-auto w-fit max-w-full bg-background/78 ring-1 ring-border/50 backdrop-blur-md transition-shadow duration-300",h?"w-132 rounded-3xl shadow-lg shadow-black/8":"rounded-full shadow-sm shadow-black/3"),children:[(0,t.jsx)("div",{className:(0,Y.cn)("grid overflow-hidden transition-[grid-template-rows] duration-300 ease-out",h?"grid-rows-[1fr]":"grid-rows-[0fr]"),children:(0,t.jsx)("div",{className:"min-h-0 overflow-hidden",inert:!h,children:c?(0,t.jsx)(eL,{bots:s,onDone:m}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("p",{className:"flex items-center gap-2 px-3 py-2 font-mono text-[10px] tracking-wide text-muted-foreground",children:[(0,t.jsx)("span",{className:"flex-1",children:[l>0?`${l} ${1===l?"needs":"need"} a reply`:"",d>0?`${d} new ${1===d?"result":"results"}`:""].filter(Boolean).join(" · ")}),(0,t.jsx)(eF,{onClick:u})]}),(0,t.jsx)("div",{className:"max-h-[45vh] overflow-y-auto px-1.5 pb-2",children:o.map(e=>(0,t.jsx)(tt,{thread:e,onPick:()=>x(e.id)},e.id))}),(0,t.jsx)("span",{className:"block h-1.5"})]})})}),(0,t.jsx)(eD,{crew:e,more:n,bubble:h?null:a,label:r?`Threads (${r})`:"Bots",onClick:p,side:(0,t.jsx)(eE,{busy:i,pending:l,grown:h}),children:c&&(0,t.jsx)(eO,{onClick:m,label:"Cancel the message",children:(0,t.jsx)(g.X,{className:"size-3.5"})})})]})}function eD({crew:e,more:n,bubble:a,side:s,label:o,onClick:r,children:i}){return(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2 px-3 py-1.5",children:[(0,t.jsxs)("button",{type:"button",onClick:r,"aria-label":o,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,t.jsx)(eH,{crew:e,more:n,bubble:a}),s]}),i]})}function eE(e){let n=function({busy:e,pending:t,grown:n}){return t>0?{text:1===t?"waiting on you":`${t} waiting on you`,shine:!0}:e>0?{text:"working",shine:!0,spin:!0}:n?null:{text:"Need a hand?",shine:!1}}(e);return n?(0,t.jsxs)("span",{className:"ml-auto flex h-7 shrink-0 items-center gap-1.5",children:[n.shine?(0,t.jsx)(M.ShinyText,{text:n.text,speed:2.6,className:"block truncate text-[14px] leading-5 tracking-[-0.15px]"}):(0,t.jsx)("span",{className:"block animate-in truncate text-[14px] leading-5 tracking-[-0.15px] text-muted-foreground fade-in duration-300",children:n.text},n.text),n.spin&&(0,t.jsx)(h.Loader2,{className:"size-4 shrink-0 animate-spin text-muted-foreground/70"})]}):null}function eF({onClick:e}){return(0,t.jsx)(eO,{onClick:e,label:"Message a bot",children:(0,t.jsx)(f.Plus,{className:"size-4"})})}function eO({onClick:e,label:n,children:a}){return(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":n,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:a})}function eL({bots:e,onDone:n}){let[a,s]=(0,k.useState)(null),[o,i]=(0,k.useState)(""),[l,u]=(0,ef.useServerAction)(R.startThreadAction,{onOk:()=>{(0,V.revalidate)(w.queryKey.threads),n()}}),m=e?.length?e.filter(e=>!e.disabled).map(e=>({name:e.name,icon:e.icon})):[{name:$.DEFAULT_BOT.name,icon:$.DEFAULT_BOT.icon}],x=()=>{a&&o.trim()&&!u&&l(a.name,o.trim())};return a?(0,t.jsxs)("div",{className:"flex min-h-32 flex-col pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-2",children:[(0,t.jsx)("button",{type:"button",onClick:()=>s(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,t.jsx)(d.ChevronLeft,{className:"size-3.5"})}),(0,t.jsx)(I.BotMark,{size:22,seed:a.name,color:a.icon?.color,shape:a.icon?.shape,outline:a.icon?.outline,paint:a.icon?.paint,className:"shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 truncate text-[12.5px] font-medium",children:["To ",a.name]})]}),(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),x()},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,t.jsx)(C.Textarea,{value:o,rows:1,autoFocus:!0,disabled:u,onChange:e=>i(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||229===e.keyCode||(e.preventDefault(),x())},placeholder:`What should ${a.name} do? It cannot hear the call, so say the whole job.`,"aria-label":`Message for ${a.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,t.jsx)(v.Button,{type:"submit",size:"icon-sm",variant:o.trim()?"default":"ghost",disabled:!o.trim()||u,"aria-label":"Send",className:"rounded-full",children:u?(0,t.jsx)(h.Loader2,{className:"animate-spin"}):(0,t.jsx)(r.ArrowUp,{})})]})]}):(0,t.jsxs)("div",{className:"min-h-32 pb-3",children:[(0,t.jsx)("p",{className:"px-3 pt-3 pb-1.5 font-mono text-[10px] tracking-wide text-muted-foreground",children:"message a bot"}),(0,t.jsx)("div",{className:"px-1",children:m.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>s(e),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,t.jsx)(I.BotMark,{size:22,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,className:"shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[13px]",children:e.name}),(0,t.jsx)(c.ChevronRight,{className:"size-3.5 shrink-0 text-muted-foreground/50"})]},e.name))})]})}let eP=["alto","brio","cinder","delta"].map((e,t)=>({name:e,icon:{color:ez.MARK_PALETTE[Math.floor(t*ez.MARK_PALETTE.length/4)],shape:ez.MARK_SHAPES[t%ez.MARK_SHAPES.length]},awake:!1,waiting:!1,word:null,standIn:!0})),eK=3;function eH({crew:e,more:n,bubble:a}){return(0,t.jsxs)("span",{className:"flex min-w-0 shrink items-center",children:[e.map((n,s)=>(0,t.jsxs)(k.Fragment,{children:[(0,t.jsxs)("span",{className:(0,Y.cn)("relative shrink-0 transition-[margin] duration-500 ease-out",s>0&&!e[s-1].word&&"-ml-2",n.standIn&&"opacity-35"),style:{zIndex:e.length-s},children:[(0,t.jsx)("span",{className:(0,Y.cn)("flex transition-transform duration-500 ease-out",n.awake&&"-translate-y-0.5 scale-110"),children:(0,t.jsx)(eU,{face:n})}),a?.at===n.name&&(0,t.jsx)(eV,{handoff:a})]}),n.word&&(0,t.jsx)("span",{className:"mx-2.5 min-w-0 shrink truncate",children:(0,t.jsx)(M.ShinyText,{text:n.word,speed:2.6,className:"truncate text-[13px] leading-5 tracking-[-0.1px]"})})]},n.name)),n>0&&(0,t.jsxs)("span",{className:(0,Y.cn)("grid size-7 shrink-0 place-items-center rounded-[9px] bg-muted font-mono text-[10px] text-muted-foreground ring-1 ring-border/50",!e.at(-1)?.word&&"-ml-2"),title:`${n} more`,children:["+",n]})]})}function eU({face:e}){return(0,t.jsx)(I.BotMark,{size:28,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:e.waiting})}function eV({handoff:e}){return(0,t.jsxs)("span",{className:"pointer-events-none absolute bottom-[calc(100%+10px)] left-1/2 flex w-max -translate-x-1/2 animate-in flex-col items-center fade-in zoom-in-95 duration-200",children:[(0,t.jsx)("span",{className:"flex rounded-full bg-background py-2 pr-3.5 pl-2.5 shadow-lg shadow-black/10 ring-1 ring-border",children:(0,t.jsx)(eW,{handoff:e})}),(0,t.jsx)("span",{className:"-mt-px size-0 border-x-[6px] border-t-[7px] border-x-transparent border-t-border"}),(0,t.jsx)("span",{className:"-mt-[7.5px] size-0 border-x-[6px] border-t-[7px] border-x-transparent border-t-background"})]})}function eY({handoff:e}){return(0,t.jsx)("span",{className:"ml-auto flex h-7 min-w-0 shrink animate-in items-center pl-4 fade-in duration-200",children:(0,t.jsx)(eW,{handoff:e})})}function eW({handoff:e}){let n=e.sign?eA[e.sign]:null,a=e.sign?eR[e.sign]:void 0;return(0,t.jsxs)("span",{className:(0,Y.cn)("flex min-w-0 items-center gap-2 text-[13px] leading-[18px] tracking-[-0.1px] whitespace-nowrap",a),children:[(0,t.jsx)(eG,{from:e.from,to:e.to}),n&&(0,t.jsx)(n,{className:(0,Y.cn)("size-3.5 shrink-0",!a&&"text-muted-foreground/70")}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:e.text})]})}function eG({from:e,to:n}){let a=[e,...n];return(0,t.jsx)("span",{className:"flex shrink-0 items-center",children:a.map((e,n)=>(0,t.jsx)("span",{className:(0,Y.cn)("relative flex",n>0&&"-ml-1.25"),style:{zIndex:a.length-n},children:(0,t.jsx)(eQ,{bot:e})},e.name))})}function eQ({bot:e}){return e.name===tm.name?(0,t.jsx)(eT.ThursdayMark,{size:18,className:"shrink-0"}):(0,t.jsx)(I.BotMark,{size:18,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"})}function eJ({onClick:e}){return(0,t.jsx)("button",{type:"button",onClick:e,"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,t.jsx)(g.X,{className:"size-3.5"})})}function eX({tab:e,current:n,composing:a,onTab:s,onCompose:o,onClose:r}){return(0,t.jsxs)("div",{className:"flex items-center gap-2 pt-3 pr-3.5 pb-1.5 pl-2.5",children:[(0,t.jsx)(z.Tabs,{value:a?null:e,onValueChange:e=>s(e),className:"gap-0",children:(0,t.jsxs)(z.TabsList,{className:"gap-1 rounded-none bg-transparent p-0 group-data-horizontal/tabs:h-auto",children:[(0,t.jsxs)(z.TabsTrigger,{value:"now",className:ts,children:["Now",n>0&&(0,t.jsx)("span",{className:"font-mono text-[10px] font-normal text-muted-foreground tabular-nums",children:n})]}),(0,t.jsx)(z.TabsTrigger,{value:"history",className:ts,children:"History"})]})}),(0,t.jsx)("span",{className:"flex-1"}),!a&&(0,t.jsx)(eF,{onClick:o}),(0,t.jsx)(eJ,{onClick:r})]})}function eZ({thread:e,onBack:n,onClose:a}){return(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,t.jsx)("button",{type:"button",onClick:n,"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,t.jsx)(d.ChevronLeft,{className:"size-4"})}),(0,t.jsx)(I.BotMark,{size:22,seed:e.bot.name,color:e.bot.icon?.color,shape:e.bot.icon?.shape,outline:e.bot.icon?.outline,paint:e.bot.icon?.paint,notify:!1}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium",children:[e.label,(0,t.jsx)("span",{title:e.id,className:"ml-1.5 font-mono text-[10px] font-normal text-muted-foreground/60",children:e.id.slice(0,8)})]}),(0,t.jsx)(e0,{thread:e}),(0,t.jsx)(eJ,{onClick:a})]})}function e0({thread:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e1,{usage:e.tokens}),(0,t.jsx)(e2,{thread:e}),(0,t.jsx)(e3,{thread:e})]})}function e1({usage:e}){let n=e.input+e.output;return n?(0,t.jsx)("span",{title:`in ${(0,Y.formatCount)(e.input)} \xb7 out ${(0,Y.formatCount)(e.output)}`,className:"shrink-0 font-mono text-[10px] text-muted-foreground/70 tabular-nums",children:(0,Y.formatCount)(n)}):null}function e2({thread:e}){let{contextTokens:n,contextBudget:a}=e;if(!n||!a)return null;let s=Math.min(1,n/a);return(0,t.jsx)("span",{title:`Context ${(0,Y.formatCount)(n)} of ${(0,Y.formatCount)(a)} — it summarizes itself here`,className:"block h-[3px] w-9 shrink-0 overflow-hidden rounded-full bg-muted",children:(0,t.jsx)("span",{className:(0,Y.cn)("block h-full rounded-full",s>.9?"bg-amber-500/80":"bg-muted-foreground/70"),style:{width:`${Math.max(4,Math.round(100*s))}%`}})})}let e5={working:"text-muted-foreground",waiting:Y.WAITING_INK,done:"text-foreground",cancelled:"text-muted-foreground"};function e3({thread:e}){let n="done"===e.status&&e.seen?"text-muted-foreground":e5[e.status];return"working"===e.status?(0,t.jsx)(M.ShinyText,{text:"working",speed:2.2,className:"shrink-0 font-mono text-[10px]"}):(0,t.jsx)("span",{className:(0,Y.cn)("flex shrink-0 items-center gap-1.5 font-mono text-[10px]",n),children:e.status})}function e4({bots:e}){return(0,t.jsx)("p",{className:"px-6 pt-4 pb-5 text-center text-[12px] text-muted-foreground",children:e?.length?"Nothing handed over yet — ask for something that takes a while.":`Thursday hands work to ${$.DEFAULT_BOT.name} until you make bots of your own in Settings › Bots.`})}function e7(){return(0,t.jsx)("p",{className:"px-6 pt-4 pb-5 text-center text-[12px] text-muted-foreground",children:"Nothing running or waiting."})}function e8({pages:e,threads:r,scroll:i,onPick:l}){let d=(0,k.useCallback)(e=>{e&&(e.scrollTop=i.current)},[i]),c=[];for(let e of r){let t=function(e){let t=(0,H.toDate)(e);return(0,s.isToday)(t)?"today":(0,o.isYesterday)(t)?"yesterday":(0,n.format)(t,(0,a.isThisYear)(t)?"MMM d":"MMM d, yyyy").toLowerCase()}(e.updatedAt),r=c.at(-1);r?.day===t?r.rows.push(e):c.push({day:t,rows:[e]})}return(0,t.jsx)("div",{ref:d,onScroll:e=>{i.current=e.currentTarget.scrollTop},className:"flex min-h-0 flex-1 flex-col gap-0.5 overflow-y-auto px-2 pt-1 pb-2 scrollbar-none",children:e.error?(0,t.jsx)("p",{className:"px-2.5 py-3 text-[12px] text-destructive",children:e.error.message}):e.isLoading?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(e6,{}),(0,t.jsx)(e6,{}),(0,t.jsx)(e6,{})]}):(0,t.jsxs)(t.Fragment,{children:[c.map((e,n)=>(0,t.jsxs)(k.Fragment,{children:[(0,t.jsxs)("p",{className:(0,Y.cn)("px-2.5 pb-1 font-mono text-[10px] text-muted-foreground",0===n?"pt-1":"pt-3"),children:[e.day," · ",e.rows.length]}),e.rows.map(e=>(0,t.jsx)(tt,{thread:e,onPick:()=>l(e.id)},e.id))]},e.day)),e.hasMore?(0,t.jsx)("div",{ref:e.sentinelRef,children:(0,t.jsx)(e6,{})}):0===c.length&&(0,t.jsx)("p",{className:"px-6 pt-3 pb-4 text-center text-[12px] text-muted-foreground",children:"Nothing has ended yet."})]})})}function e6(){return(0,t.jsxs)("div",{className:"flex items-center gap-2.5 px-2 py-1.5",children:[(0,t.jsx)(S.Skeleton,{className:"size-8 shrink-0 rounded-[10px]"}),(0,t.jsxs)("span",{className:"flex h-9 min-w-0 flex-1 flex-col justify-center gap-1.5",children:[(0,t.jsx)(S.Skeleton,{className:"h-3.5 w-2/5"}),(0,t.jsx)(S.Skeleton,{className:"h-2.5 w-3/5"})]})]})}let e9=[{id:"you",label:"needs you",holds:eI},{id:"unread",label:"new results",holds:eB},{id:"working",label:"working",holds:e=>"working"===e.status},{id:"done",label:"done",holds:()=>!0}];function te({threads:e,onPick:n}){let a=new Map;for(let t of e){let e=e9.find(e=>e.holds(t))??e9[e9.length-1],n=a.get(e.id);n?n.push(t):a.set(e.id,[t])}return(0,t.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:e9.map((e,s)=>{let o=a.get(e.id)??[];return o.length?(0,t.jsxs)(k.Fragment,{children:[(0,t.jsxs)("p",{className:(0,Y.cn)("px-2.5 pb-1 font-mono text-[10px] text-muted-foreground",0===s?"pt-1":"pt-3"),children:[e.label," · ",o.length]}),o.map(e=>(0,t.jsx)(tt,{thread:e,onPick:()=>n(e.id)},e.id))]},e.id):null})})}function tt({thread:e,onPick:n}){let a=eI(e),s=e.lines.at(-1),o=(0,k.useMemo)(()=>(function(e){let t=e.room.questions[0];if(t)return{text:(0,Y.plainText)(t.text),tone:"text-foreground"};if("waiting"===e.status&&e.ask)return{text:(0,$.isAppStop)(e.ask)?(0,Y.plainText)(e.outcome??e.ask.question):e.ask.question,tone:Y.WAITING_INK};let n=e.seen;if("cancelled"===e.status)return{text:"Stopped",tone:"text-muted-foreground"};if("done"===e.status)return{text:(0,Y.plainText)(e.outcome??"Done"),tone:n?"text-muted-foreground":"text-foreground"};let a=ee(e);return a?{text:"tool"===a.kind&&a.tool?a.tool.note??`${a.tool.name} \xb7 ${a.tool.input}`:a.text,tone:"text-muted-foreground"}:{text:`${e.bot.name} is taking it on…`,tone:"text-muted-foreground italic"}})(e),[e.status,e.outcome,e.seen,e.ask,e.room.questions,s?.id]),[r,i]=eN(),[l,d]=(0,k.useState)(null),c="waiting"===e.status&&(0,$.isAppStop)(e.ask)?e.ask?.options??[]:[];return(0,t.jsxs)("div",{className:"rounded-xl transition-colors hover:bg-muted/60",children:[(0,t.jsxs)("button",{type:"button",onClick:n,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,t.jsx)("span",{className:"relative flex size-8 shrink-0 items-center justify-center overflow-visible",title:e.bot.name,children:(0,t.jsx)(I.BotMark,{size:32,seed:e.bot.name,color:e.bot.icon?.color,shape:e.bot.icon?.shape,outline:e.bot.icon?.outline,paint:e.bot.icon?.paint,state:"working"===e.status?"thinking":"idle",notify:a,crossed:"cancelled"===e.status})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(a||eB(e))&&(0,t.jsx)("span",{className:"block text-[10px] font-medium text-foreground",children:e.room.questions.length?`${1===e.room.questions.length?"Question":`${e.room.questions.length} questions`} \xb7 ${[...new Set(e.room.questions.map(e=>e.bot))].join(", ")}`:"waiting"===e.status?(0,$.isAppStop)(e.ask)?"Paused":"Question":"New result"}),(0,t.jsxs)("span",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:(0,Y.cn)("min-w-0 truncate text-[14px] leading-5 tracking-[-0.15px]",a?"text-foreground":"text-foreground/80"),children:e.label}),(0,t.jsx)(B.BotRoster,{bots:el(e)}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] leading-4 text-muted-foreground/70 tabular-nums",children:(0,H.shortAgo)(e.updatedAt)})]}),(0,t.jsxs)("span",{className:"mt-px flex h-4 items-center gap-1.5",children:["working"===e.status&&(0,t.jsx)(h.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground/70"}),"working"!==e.status||a?(0,t.jsx)("span",{className:(0,Y.cn)("min-w-0 flex-1 truncate text-[12px] leading-4",o.tone),children:o.text}):(0,t.jsx)(M.ShinyText,{text:o.text,speed:2.2,className:(0,Y.cn)("min-w-0 flex-1 truncate text-[12px] leading-4",o.tone.includes("italic")&&"italic")})]})]})]}),c.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5 pt-0.5 pr-2 pb-2 pl-12.5",children:c.map(n=>(0,t.jsxs)(v.Button,{size:"sm",variant:"outline",loading:l===n,disabled:i,onClick:async()=>{d(n),await r(e,n),d(null)},className:"h-7 gap-1.5 rounded-full border-border bg-background px-3 text-[12px]",children:[n===$.THREAD_CONTINUE&&(0,t.jsx)(u.ChevronsRight,{className:"size-3.5 text-muted-foreground"}),n]},n))})]})}function tn({thread:e,tab:n=null,onTab:a,className:s,tabsClassName:o}){let r,i=(0,k.useRef)(null),l=(0,k.useRef)(!0),d=el(e),c=a&&n!==e.bot.name&&d.some(e=>e.name===n)?n:null,u=c??e.bot.name,m=d.filter(t=>(!c||t.name===c)&&to(e,t.name)),x=ex((r=new Set(e.room.questions.map(e=>`${e.bot}
4
+ ${e.text.trim()}`))).size?{...e,lines:e.lines.filter(e=>!("ask"===e.kind&&e.question&&e.to?.name===tm.name&&r.has(`${e.bot.name}
5
+ ${e.text.trim()}`)))}:e,u,m);return(0,k.useEffect)(()=>{l.current=!0},[e.id,c]),(0,k.useEffect)(()=>{let e=i.current;e&&l.current&&(e.scrollTop=e.scrollHeight)},[e.lines,e.status,c]),(0,t.jsxs)(eM.FileViewer,{children:[a&&(0,t.jsx)(ta,{thread:e,roster:d,side:c,onPick:a,className:o}),(0,t.jsxs)("div",{ref:i,onScroll:e=>{let t=e.currentTarget;l.current=t.scrollHeight-t.scrollTop-t.clientHeight<24},className:(0,Y.cn)("min-w-0 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",s),children:[!c&&(0,t.jsx)(tu,{thread:e}),x.map(n=>"invite"===n.kind?(0,t.jsx)(tx,{from:n.from,to:n.to},n.key):(0,t.jsx)(tr,{turn:n,thread:e,self:u},n.key))]})]})}function ta({thread:e,roster:n,side:a,onPick:s,className:o}){return(0,t.jsx)(z.Tabs,{value:a??e.bot.name,onValueChange:t=>s(t===e.bot.name?null:String(t)),className:(0,Y.cn)("shrink-0 gap-0 px-3 pt-1 pb-0.5",o),children:(0,t.jsx)(z.TabsList,{className:"w-full justify-start gap-1 overflow-x-auto rounded-none bg-transparent p-0 scrollbar-none group-data-horizontal/tabs:h-auto",children:n.map(n=>{let a=to(e,n.name);return(0,t.jsxs)(z.TabsTrigger,{value:n.name,className:(0,Y.cn)(ts,"pl-1.5"),children:[(0,t.jsx)(I.BotMark,{size:16,seed:n.name,color:n.icon?.color,shape:n.icon?.shape,outline:n.icon?.outline,paint:n.icon?.paint,notify:"asking"===a,className:"shrink-0"}),(0,t.jsx)("span",{className:"max-w-28 truncate",children:n.name}),"running"===a&&(0,t.jsx)(h.Loader2,{className:"size-3 animate-spin text-muted-foreground/70"})]},n.name)})})})}let ts="h-7 flex-none rounded-full px-3 py-0 text-[12px] text-muted-foreground hover:bg-muted/60 data-active:bg-muted data-active:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-none dark:data-active:border-transparent dark:data-active:bg-muted";function to(e,t){let{room:n}=e;return n.questions.some(e=>e.bot===t)?"asking":"working"===e.status&&n.participants.some(e=>e.bot===t&&"running"===e.state)?"running":null}function tr({turn:e,thread:n,self:a}){let s=e.speaker.name===a,o=s?"none":e.speaker.name===tm.name?"dark":"secondary",r=null;return(0,t.jsx)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,t.jsx)(tb,{side:s?"start":"end",name:e.speaker.name,mark:(0,t.jsx)(th,{bot:e.speaker}),children:e.entries.map(i=>{if("work"===i.kind)return s?(0,t.jsx)(tl,{lines:i.lines,trailing:i.open,bot:e.speaker,thread:n},i.key):(0,t.jsx)(ti,{lines:i.lines,trailing:i.open,bot:e.speaker,thread:n},i.key);let l=eu(i.line),d=l&&l.name!==e.speaker.name&&l.name!==a&&l.name!==tm.name&&l.name!==r?l:null;return l&&(r=l.name),(0,t.jsx)(tg,{line:i.line,surface:o,mention:d},i.key)})})})}function ti({lines:e,trailing:n,bot:a,thread:s}){var o;let[r,i]=(0,k.useState)(!1),d=n?to(s,a.name):null,c=(o=e,[["tool","step"],["say","note"],["stop","stop"],["note","compaction"]].map(([e,t])=>[o.filter(t=>t.kind===e).length,t]).filter(([e])=>e>0).map(([e,t])=>`${e} ${t}${1===e?"":"s"}`).join(" · "));if(!d&&!c)return null;let u=e.findLast(e=>"tool"===e.kind||"say"===e.kind),m=r&&e.length>0;return(0,t.jsxs)("div",{className:(0,Y.cn)("flex min-w-0 flex-col rounded-2xl bg-muted/40 p-1",m?"w-full":"w-fit max-w-full"),children:[(0,t.jsxs)("button",{type:"button",disabled:!e.length,"aria-expanded":m,onClick:()=>i(e=>!e),className:"flex min-w-0 items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none transition-colors enabled:hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50",children:["running"===d&&(0,t.jsx)(h.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground/60"}),d?(0,t.jsx)(M.ShinyText,{text:"asking"===d?"waiting on you":u?tc(u):"working",tone:"asking"===d?"waiting":"muted",speed:2.4,className:"min-w-0 truncate text-[12px] leading-4"}):(0,t.jsx)("span",{className:"min-w-0 truncate font-mono text-[10px] leading-4 text-muted-foreground",children:c}),e.length>0&&(0,t.jsx)(l.ChevronDown,{className:(0,Y.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",m&&"rotate-180")})]}),m&&(0,t.jsx)("div",{className:"flex min-w-0 flex-col gap-0.5 pt-0.5",children:tS(e).map(e=>"tools"===e.kind?e.lines.map(e=>e.tool&&(0,t.jsx)(eC.BotTool,{tool:e.tool,threadId:s.id,collapsed:!0},e.id)):"stops"===e.kind?(0,t.jsx)("div",{className:"px-1.5 py-1",children:(0,t.jsx)(tT,{lines:e.lines})},e.key):e.lines.map(e=>(0,t.jsx)(tv,{line:e,inset:!0},e.id)))})]})}function tl({lines:e,trailing:n,bot:a,thread:s}){let o=n?to(s,a.name):null,r=e.some(e=>e.tool&&void 0===e.tool.results);return(0,t.jsxs)(t.Fragment,{children:[tS(e).map(e=>"tools"===e.kind?(0,t.jsx)(td,{lines:e.lines,threadId:s.id},e.key):"stops"===e.kind?(0,t.jsx)(tT,{lines:e.lines},e.key):e.lines.map(e=>(0,t.jsx)(tv,{line:e},e.id))),o&&!r&&(0,t.jsx)(M.ShinyText,{text:"asking"===o?"waiting on you":"on the next step…",tone:"asking"===o?"waiting":"muted",speed:2.2,className:"block px-1 font-mono text-[10px]"})]})}function td({lines:e,threadId:n}){return(0,t.jsxs)("div",{className:"flex w-full flex-col gap-0.5 rounded-2xl bg-muted/40 p-1",children:[e.length>1&&(0,t.jsxs)("p",{className:"px-2 py-1 font-mono text-[10px] text-muted-foreground",children:[e.length," steps"]}),e.map(e=>e.tool&&(0,t.jsx)(eC.BotTool,{tool:e.tool,threadId:n,collapsed:!0},e.id))]})}function tc(e){return"tool"===e.kind&&e.tool?e.tool.note??`${e.tool.name} \xb7 ${e.tool.input}`:(0,Y.plainText)(e.text).replace(/\s+/g," ").trim()}function tu({thread:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(tx,{from:tm,to:e.bot}),(0,t.jsx)(tb,{side:"end",name:tm.name,mark:(0,t.jsx)(th,{bot:tm}),children:(0,t.jsx)(tf,{dark:!0,className:"py-2 pr-2 pl-3.5",children:(0,t.jsx)(N.FoldedText,{text:e.request,subject:"request",className:"wrap-anywhere"})})})]})}let tm={name:W.ROOM_THURSDAY};function tx({from:e,to:n}){return(0,t.jsx)("div",{className:"flex animate-in justify-center fade-in duration-300",children:(0,t.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,t.jsx)(tp,{bot:e}),(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground/70",children:"invited"}),(0,t.jsx)(tp,{bot:n})]})})}function tp({bot:e}){return(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[e.name===tm.name?(0,t.jsx)(eT.ThursdayMark,{size:15,className:"shrink-0"}):(0,t.jsx)(I.BotMark,{size:15,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function th({bot:e}){return e.name===tm.name?(0,t.jsx)(eT.ThursdayMark,{size:26,className:"mt-1 shrink-0"}):(0,t.jsx)(I.BotMark,{size:26,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"mt-1 shrink-0"})}function tf({dark:e=!1,children:n,className:a}){return(0,t.jsx)(y.Bubble,{align:"end",variant:e?"default":"secondary",className:"max-w-full",children:(0,t.jsx)(y.BubbleContent,{className:(0,Y.cn)("rounded-tr-md px-3.5",a),children:(0,t.jsx)("div",{className:(0,Y.cn)("min-w-0",e&&"inverse"),children:n})})})}function tb({side:e,mark:n,name:a,children:s}){return(0,t.jsxs)("div",{className:(0,Y.cn)("flex gap-2.5","end"===e&&"flex-row-reverse"),children:[n,(0,t.jsxs)("div",{className:(0,Y.cn)("flex min-w-0 flex-1 flex-col gap-1.5 [&>*+*]:max-w-[80%]","end"===e&&"items-end"),children:[(0,t.jsx)("p",{className:"max-w-[80%] truncate px-1 font-mono text-[10px] text-muted-foreground",children:a}),s]})]})}function tg({line:e,surface:n,mention:a}){let s=!!e.question,o="result"===e.kind,r="none"!==n,i=(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)(ty,{}),a?(0,t.jsx)(tw,{bot:a,bubble:r,children:e.text}):(0,t.jsx)(tk,{bubble:r,className:(0,Y.cn)(!o&&"leading-snug"),children:e.text})]});return(0,t.jsxs)(t.Fragment,{children:[r?(0,t.jsx)(tf,{dark:"dark"===n,children:i}):(0,t.jsx)("div",{className:"min-w-0 max-w-full px-1",children:i}),o&&(0,t.jsxs)("div",{className:"flex items-center gap-2 px-1",children:[(0,t.jsx)(q.PathChips,{text:e.text,className:"min-w-0"}),(0,t.jsx)(tN,{text:e.text})]})]})}function tk({children:e,bubble:n=!1,className:a}){return(0,t.jsx)(T.Markdown,{className:(0,Y.cn)("min-w-0 max-w-full text-[13px] leading-relaxed wrap-anywhere break-keep [&_h1]:text-[15px] [&_h2]:text-[14px] [&_h3]:text-[13px] [&_h3]:font-semibold [&_li]:my-0.5 [&_table]:text-[12px] [&_table]:wrap-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",n&&"[&_[data-streamdown=inline-code]]:text-[12px] [&_[data-streamdown=code-block]]:my-2 [&_[data-streamdown=code-block]]:gap-0 [&_[data-streamdown=code-block]]:rounded-[10px] [&_[data-streamdown=code-block]]:border-0 [&_[data-streamdown=code-block]]:bg-background [&_[data-streamdown=code-block]]:p-0 [&_[data-streamdown=code-block-header]]:h-7 [&_[data-streamdown=code-block-header]]:px-2.5 [&_[data-streamdown=code-block-header]]:text-[11px] [&_[data-streamdown=code-block-body]]:border-0 [&_[data-streamdown=code-block-body]]:bg-transparent! [&_[data-streamdown=code-block-body]]:px-2.5 [&_[data-streamdown=code-block-body]]:pt-0 [&_[data-streamdown=code-block-body]]:pb-2.5 [&_[data-streamdown=code-block-body]]:text-[12.5px] [&_[data-streamdown=code-block]_div:has(>[data-streamdown=code-block-actions])]:-mt-7 [&_[data-streamdown=code-block-actions]]:mr-1 [&_[data-streamdown=code-block-actions]]:border-0 [&_[data-streamdown=code-block-actions]]:bg-transparent!",a),children:e})}function tj({bot:e,bubble:n}){return(0,t.jsxs)("span",{className:(0,Y.cn)("mr-1.5 inline-flex h-5 max-w-full items-center gap-1 rounded-full pr-2 pl-[3px] align-[-4px] text-[12px] leading-none font-medium whitespace-nowrap text-foreground",n?"bg-background":"bg-muted"),children:[(0,t.jsx)(I.BotMark,{size:14,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function tw({bot:e,bubble:n,children:a}){return(0,t.jsxs)("div",{className:"min-w-0 max-w-full text-[13px] leading-snug",children:[(0,t.jsx)(tj,{bot:e,bubble:n}),(0,t.jsx)(tk,{bubble:n,className:"contents leading-snug [&>p:first-child]:inline",children:a})]})}function ty(){return(0,t.jsxs)("p",{className:"mb-1 flex items-center gap-1.5 text-[12px] leading-4 font-medium text-muted-foreground",children:[(0,t.jsx)(x.CircleQuestionMark,{className:"size-3.5 shrink-0"}),"Question"]})}function tv({line:e,inset:n=!1}){return"note"===e.kind?(0,t.jsxs)("details",{className:"w-full px-2 py-1 text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-2.5 outline-none [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,t.jsx)("span",{className:"min-w-0 text-center font-mono text-[10px]",children:"Compacted — it goes on from its summary"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border"})]}),(0,t.jsx)(tk,{className:"mt-2 rounded-xl bg-muted/40 px-3 py-2 text-[11px]",children:e.text})]}):(0,t.jsx)(tk,{className:(0,Y.cn)("text-[12.5px] text-muted-foreground",n?"px-2.5 py-1":"px-1"),children:e.text})}function tN({text:e}){let[n,a]=(0,k.useState)(!1),s=(0,k.useRef)(null);return(0,k.useEffect)(()=>()=>{s.current&&clearTimeout(s.current)},[]),(0,t.jsx)("button",{type:"button","aria-label":"Copy the answer",onClick:async()=>{try{await navigator.clipboard.writeText(e),a(!0),s.current&&clearTimeout(s.current),s.current=setTimeout(()=>a(!1),1400)}catch(e){_.toast.add({type:"error",title:"Could not copy the answer",description:(0,Y.errorToString)(e)})}},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:n?(0,t.jsx)(i.Check,{className:"size-3"}):(0,t.jsx)(p.Copy,{className:"size-3"})})}function tT({lines:e}){return(0,t.jsxs)("details",{className:"group min-w-0 px-1 text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-[12.5px] leading-relaxed outline-none [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)(b.RotateCw,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:tM(e[0].text)}),e.length>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:["×",e.length]}),(0,t.jsx)(l.ChevronDown,{className:"size-2.5 shrink-0 text-muted-foreground/70 transition-transform group-open:rotate-180"})]}),(0,t.jsx)("div",{className:"mt-1 space-y-1 pl-4.5 text-[11px] leading-relaxed",children:e.map(e=>(0,t.jsxs)("p",{className:"flex gap-2 break-keep",children:[e.at&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-muted-foreground/70 tabular-nums",children:(0,n.format)((0,H.toDate)(e.at),"HH:mm:ss")}),(0,t.jsx)("span",{className:"min-w-0",children:e.text})]},e.id))})]})}let tM=e=>e.split(" (")[0].replace(/\.$/,"");function tS(e){let t=[];for(let n of e){let e="tool"===n.kind&&n.tool?"tools":"stop"===n.kind?"stops":"said",a=t.at(-1),s=a?.kind===e&&("stops"!==e||tM(a.lines[0].text)===tM(n.text));a&&s?a.lines.push(n):t.push({kind:e,key:n.id,lines:[n]})}return t}e.s(["BotRoom",0,e_,"Conversation",0,tn,"ThreadFacts",0,e0],279265)},673544,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f4df059775807466d6f59f19acbde15dbef4cbdd9",t.callServer,void 0,t.findSourceMapURL,"answerThreadAction");e.s(["answerThreadAction",0,n])},707467,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f9a5f6dfac94ea98a45074e6bdc01793589f97196",t.callServer,void 0,t.findSourceMapURL,"cancelThreadAction");e.s(["cancelThreadAction",0,n])},108957,931619,119002,51481,508734,825398,815731,496336,201082,835878,764224,919191,e=>{"use strict";var t=e.i(677241),n=e.i(24708),a=e.i(845110);e.s(["isThisYear",0,function(e,s){return function(e,t){let[n,s]=(0,a.normalizeDates)(void 0,e,t);return n.getFullYear()===s.getFullYear()}((0,t.constructFrom)(s?.in||e,e),(0,n.constructNow)(s?.in||e))}],108957);var s=e.i(456420);let o={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"}]]};o.node;let r=(0,s.default)(o);e.s(["ChevronsRight",0,r],931619);let i={name:"circle-pause",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"10",x2:"10",y1:"15",y2:"9",key:"c1nkhi"}],["line",{x1:"14",x2:"14",y1:"15",y2:"9",key:"h65svq"}]],aliases:["pause-circle"]};i.node;let l=(0,s.default)(i);e.s(["CirclePause",0,l],119002);let d={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};d.node;let c=(0,s.default)(d);e.s(["CircleQuestionMark",0,c],51481);let u={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"}]]};u.node;let m=(0,s.default)(u);e.s(["Copy",0,m],508734);let x={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};x.node;let p=(0,s.default)(x);e.s(["RotateCw",0,p],825398);var h=e.i(843476),f=e.i(176782),b=e.i(552245),g=e.i(225913),k=e.i(647163);let j=(0,g.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,g.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"}}),e.s(["Bubble",0,function({variant:e="default",align:t="start",className:n,...a}){return(0,h.jsx)("div",{"data-slot":"bubble","data-variant":e,"data-align":t,className:(0,k.cn)(j({variant:e}),n),...a})},"BubbleContent",0,function({className:e,render:t,...n}){var a;return a={defaultTagName:"div",props:(0,f.mergeProps)({className:(0,k.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",e)},n),render:t,state:{slot:"bubble-content"}},(0,b.useRenderElement)(a.defaultTagName??"div",a,a)}],815731);var w=e.i(716327),y=e.i(271645);e.s(["FoldedText",0,function({text:e,subject:t,clamp:n="line-clamp-3",tall:a="max-h-40",className:s}){let[o,r]=(0,y.useState)(!1),[i,l]=(0,y.useState)(!1),d=(0,y.useRef)(null);return(0,y.useEffect)(()=>r(!1),[e]),(0,y.useEffect)(()=>{let e=d.current;e&&!o&&l(e.scrollHeight>e.clientHeight+1)},[o,e]),(0,h.jsxs)("div",{className:(0,k.cn)("flex items-start gap-1",s),children:[(0,h.jsx)("p",{ref:d,className:(0,k.cn)("min-w-0 flex-1 text-[13px] leading-snug break-keep",o?(0,k.cn)(a,"overflow-y-auto scrollbar-none"):n),children:e}),(i||o)&&(0,h.jsx)("button",{type:"button",onClick:()=>r(e=>!e),"aria-label":o?`Fold the ${t}`:`Read the whole ${t}`,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,h.jsx)(w.ChevronDown,{className:(0,k.cn)("size-3.5",o&&"rotate-180")})})]})}],496336);var v=e.i(95187);let N=(0,v.createServerReference)("7ff917f5236e9de4a7137d6d5003d5dafeb295990e",v.callServer,void 0,v.findSourceMapURL,"startThreadAction");e.s(["startThreadAction",0,N],201082);var T=e.i(635963);e.s(["BotRoster",0,function({bots:e}){return e.length<2?null:(0,h.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",title:e.map(e=>e.name).join(", "),children:[(0,h.jsx)("span",{className:"flex items-center gap-0.5",children:e.slice(0,3).map(e=>(0,h.jsx)(T.BotMark,{size:18,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"},e.name))}),(0,h.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground",children:[e.length," bots"]})]})}],835878);var M=e.i(829600);let S={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"}]]};S.node;let z=(0,s.default)(S),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 _=(0,s.default)(C);var A=e.i(905015);let R={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"}]]};R.node;let $=(0,s.default)(R);var I=e.i(226091);let B={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"}]]};B.node;let q=(0,s.default)(B),D={name:"file-x",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:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]]};D.node;let E=(0,s.default)(D);var F=e.i(798120),O=e.i(621285),L=e.i(616172),P=e.i(283653);let K={markdown:I.FileText,csv:$,json:A.FileJson,text:q,image:_};e.s(["PathChips",0,function({text:e,className:t}){let n=(0,y.useMemo)(()=>(0,L.pathsIn)(e),[e]),{data:a}=(0,P.useServerRoute)(n.length?F.queryKey.workspaceMissing(n):null),s=(0,y.useMemo)(()=>new Set(a),[a]);if(!n.length)return null;let o="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]";return(0,h.jsx)("div",{className:(0,k.cn)("flex flex-wrap gap-1.5",t),children:n.map(e=>{let t,n=e.split("/").pop()??e;if(s.has(e))return(0,h.jsxs)("span",{title:`${e} — not on disk`,className:(0,k.cn)(o,"text-muted-foreground"),children:[(0,h.jsx)(E,{className:"size-3 shrink-0"}),(0,h.jsx)("span",{className:"truncate line-through",children:n})]},e);let a="frame"===(t=(0,L.viewKindOf)(e))?e.toLowerCase().endsWith(".pdf")?I.FileText:z:K[t]??M.File;return(0,h.jsxs)(O.FileLink,{path:e,className:(0,k.cn)(o,"text-foreground/80 outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50"),children:[(0,h.jsx)(a,{className:"size-3 shrink-0 text-muted-foreground"}),(0,h.jsx)("span",{className:"truncate",children:n})]},e)})})}],764224);let H={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"}]]};H.node;let U=(0,s.default)(H);e.s(["CornerDownLeft",0,U],919191)},929272,e=>{"use strict";var t=e.i(456420);let n={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};n.node;let a=(0,t.default)(n);e.s(["Square",0,a],929272)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,805995,e=>{"use strict";var t=e.i(843476),n=e.i(493801),i=e.i(456420);let s={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};s.node;let r=(0,i.default)(s),o={name:"captions",size:24,node:[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],aliases:["subtitles"]};o.node;let a=(0,i.default)(o);var l=e.i(689664),d=e.i(867927);let c={name:"clapperboard",size:24,node:[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]]};c.node;let u=(0,i.default)(c);var m=e.i(815170),f=e.i(758925),g=e.i(566595),h=e.i(466787),x=e.i(271645),y=e.i(798120),p=e.i(167881),k=e.i(23750),v=e.i(917162),j=e.i(671428),b=e.i(412294),S=e.i(146538),N=e.i(968978),w=e.i(265402),C=e.i(635963),M=e.i(95187);let I=(0,M.createServerReference)("7fb6f8b381203a417ba7628fded304ddd5d574c1d9",M.callServer,void 0,M.findSourceMapURL,"removeConfigAction");var A=e.i(239945),D=e.i(992112),K=e.i(895836),T=e.i(609856),R=e.i(283653),z=e.i(647163);let $={[D.EXA_API_KEY]:g.Search},q={image:m.Image,video:u,speech:r,transcription:a};function O({section:e}){let{data:n,isLoading:i,error:s}=(0,R.useServerRoute)(y.queryKey.config);if(i)return(0,t.jsx)(K.SettingSkeleton,{rows:4});if(s)return(0,t.jsx)(K.SettingError,{message:s.message});let r=e=>(0,D.isConfigSet)(n,e),o=e=>n?.find(t=>t.key===e)?.value,a=D.CONFIG_GROUPS.filter(t=>t.section===e),l=a.flatMap(e=>e.entries);return(0,t.jsx)(K.SettingScreen,{footer:(0,t.jsx)(K.SettingRailNote,{children:"keys"===e?(0,t.jsxs)(t.Fragment,{children:[l.filter(e=>r(e.key)).length," of"," ",l.length," set",a.some(e=>!(0,D.groupSatisfied)(e,r))?" · a call needs one voice key":" · your keys stay on this machine"]}):(0,t.jsxs)(t.Fragment,{children:[l.length," of ",l.length," resolved ·"," ",l.filter(e=>o(e.key)).length," pinned"]})}),children:a.map(e=>(0,t.jsx)(K.SettingGroup,{label:e.title,hint:e.hint,right:(0,t.jsx)(F,{group:e,isSet:r}),children:(0,t.jsx)(K.SettingItems,{children:e.entries.map(n=>n.choices?(0,t.jsx)(H,{entry:n,choices:n.choices,value:o(n.key),isSet:r},n.key):(0,t.jsx)(B,{entry:n,set:r(n.key),needed:!(0,D.groupSatisfied)(e,r)},n.key))})},e.id))})}function F({group:e,isSet:n}){return"none"===e.require?null:(0,D.groupSatisfied)(e,n)?(0,t.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(l.Check,{className:"size-3"}),"ready"]}):(0,t.jsxs)("span",{className:(0,z.cn)("flex items-center gap-1 font-mono text-[11px]",z.WAITING_INK),children:[(0,t.jsx)(h.TriangleAlert,{className:"size-3"}),e.note??"Required"]})}function B({entry:e,set:n,needed:i}){let s=_(e,n),r=W(e,n),o=U(e,n),a=r.data?E(r.data):P(n,i,s.data,e.signIn);return(0,t.jsxs)("button",{type:"button",onClick:()=>{var i,s,r;return e.signIn?(i=e,v.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(Q,{entry:i,onDone:e})})):(s=e,r=n,v.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(V,{entry:s,set:r,onDone:e})}))},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(Y,{entry:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.signIn?n?L(r.data,o):"sign in with your account":e.key})]}),s.isLoading||r.isLoading?(0,t.jsx)(j.Skeleton,{className:"h-3 w-20 shrink-0"}):(0,t.jsxs)("span",{className:(0,z.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",a.ink),children:[a.warn?(0,t.jsx)(h.TriangleAlert,{className:"size-3"}):n&&(0,t.jsx)(l.Check,{className:"size-3"}),a.text]}),(0,t.jsx)(d.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let G=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function P(e,t,n,i){return e?n?"refused"in n?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${G.format(n.balance)} left`,ink:n.low?z.WAITING_INK:"text-muted-foreground",warn:n.low}:{text:i?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:t?{text:"Needed",ink:z.WAITING_INK,warn:!0}:{text:i?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function _(e,t){return(0,R.useServerRoute)(t&&"vercel-ai-gateway"===e.provider?y.queryKey.gatewayCredits:null)}function U(e,t){let{data:n}=(0,R.useServerRoute)(t&&e.signIn?y.queryKey.llmModel:null);return n?.find(t=>t.id===e.provider)?.plan??null}function W(e,t){return(0,R.useServerRoute)(t&&e.signIn?y.queryKey.subscriptionUsage:null)}function E(e){return"refused"in e?{text:"Sign-in refused",ink:"text-destructive",warn:!0}:{text:e.spent?"Limit reached":`${e.usedPercent}% used`,ink:e.high?z.WAITING_INK:"text-muted-foreground",warn:e.high}}function L(e,t){let i=!e||"refused"in e?null:e,s=`${i?.plan??t??"unknown"} plan`;return i?.resetsAt?`${s} \xb7 resets in ${(0,n.formatDistanceToNowStrict)(new Date(i.resetsAt))}`:s}function Y({entry:e}){if(e.provider)return(0,t.jsx)(N.ProviderIcon,{provider:e.provider,className:"size-4"});let n=$[e.key]??f.KeyRound;return(0,t.jsx)(n,{className:"size-4 text-muted-foreground"})}function H({entry:e,choices:n,value:i,isSet:s}){let r=n.find(e=>e.value===i),o=n.filter(e=>s(e.needs)),a=i&&!r?i:null,l=e.kind?q[e.kind]:C.BotsMark;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var i,s,r;return e.kind||e.text?(i=e,v.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(X,{entry:i,onDone:e})})):(s=e,r=n,v.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(J,{entry:s,choices:r,onDone:e})}))},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(l,{className:"size-4 text-muted-foreground"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[!r&&!a&&(0,t.jsx)("span",{className:(0,z.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",e.kind?z.WAITING_INK:"text-muted-foreground"),children:e.kind?"off":"auto"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:r?.label??a??(e.kind?"Not offered to bots until you pick one":o[0]?.label??"No key for any of these yet")})]})]}),(0,t.jsx)(d.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function X({entry:e,onDone:n}){let{data:i}=(0,R.useServerRoute)(y.queryKey.config),s=i?.find(t=>t.key===e.key)?.value,[r,o]=(0,x.useState)(()=>{let t=e.text?(0,w.parseTextModel)(s):(0,w.parseMediaModel)(s);return{provider:t?.provider??null,model:t?.model??""}}),a=()=>{(0,R.revalidate)(y.queryKey.config),n()},[l]=(0,T.useServerAction)(A.setConfigAction,{okMessage:`${e.label} saved`,onOk:a}),[d,c]=(0,T.useServerAction)(I,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:a});return(0,t.jsx)(K.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)(p.Button,{variant:"ghost",loading:c,onClick:()=>d(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(p.Button,{variant:"ghost",onClick:n,children:"Close"})]}),children:(0,t.jsx)(S.ModelPicker,{kind:e.kind,provider:r.provider,model:r.model,onChange:t=>{o(t),t.model.trim()&&l(e.key,`${t.provider}/${t.model.trim()}`)}})})}function J({entry:e,choices:n,onDone:i}){let{data:s}=(0,R.useServerRoute)(y.queryKey.config),r=s?.find(t=>t.key===e.key)?.value,o=()=>{(0,R.revalidate)(y.queryKey.config),i()},[a,l]=(0,T.useServerAction)(A.setConfigAction,{okMessage:`${e.label} saved`,onOk:o}),[d,c]=(0,T.useServerAction)(I,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:o});return(0,t.jsx)(K.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[r&&(0,t.jsx)(p.Button,{variant:"ghost",loading:c,onClick:()=>d(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(p.Button,{variant:"ghost",onClick:i,children:"Close"})]}),children:(0,t.jsx)(K.SettingChoiceRows,{options:n.map(e=>({value:e.value,label:e.label,disabled:!(0,D.isConfigSet)(s,e.needs)&&`needs ${e.needs}`})),value:r,onChange:t=>a(e.key,t),disabled:l})})}function Q({entry:e,onDone:n}){let{data:i}=(0,R.useServerRoute)(y.queryKey.config),s=(0,D.isConfigSet)(i,e.key),r=U(e,s),o=W(e,s),a=o.data?E(o.data):null,[l,d]=(0,T.useServerAction)(I,{okMessage:`Signed out of ${e.label}`,onOk:()=>{(0,R.revalidate)(y.queryKey.config),(0,R.revalidate)(y.queryKey.llmModel),n()}});return(0,t.jsx)(K.SettingDialogContent,{title:e.label,description:s?(0,t.jsxs)(t.Fragment,{children:["Signed in ·"," ",(0,t.jsx)("span",{className:"font-mono",children:L(o.data,r)}),a&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsx)("span",{className:(0,z.cn)("font-mono",a.ink),children:a.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)(p.Button,{variant:"ghost",loading:d,onClick:()=>l(e.key),children:"Sign out"}),(0,t.jsx)(p.Button,{variant:"ghost",onClick:n,children:s?"Close":"Cancel"}),!s&&(0,t.jsx)(b.ChatGptSignIn,{})]}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(K.SettingNote,{children:s?"Bots on this subscription spend your plan's usage, not a key. When it runs out, the job stops and says when it resets.":"The sign-in opens in its own window. Approve it there, and this turns to signed in by itself."}),o.data&&"refused"in o.data&&(0,t.jsx)(K.SettingNote,{className:"wrap-break-word text-destructive",children:o.data.refused})]})})}function V({entry:e,set:n,onDone:i}){let[s,r]=(0,x.useState)(""),{data:o}=_(e,n),a=o?P(n,!1,o):null,l=()=>{(0,R.revalidate)(y.queryKey.config),(0,R.revalidate)(y.queryKey.llmModel)},[d,c]=(0,T.useServerAction)(A.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{l(),i()}}),[u,m]=(0,T.useServerAction)(I,{okMessage:`${e.label} key removed`,onOk:()=>{l(),i()}});return(0,t.jsx)(K.SettingDialogContent,{title:e.label,description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-mono",children:e.key}),e.hint&&(0,t.jsxs)(t.Fragment,{children:[" · ",e.hint]}),a&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsx)("span",{className:(0,z.cn)("font-mono",a.ink),children:a.text})]})]}),footer:(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsx)(p.Button,{variant:"ghost",loading:m,onClick:()=>u(e.key),children:"Remove"}),(0,t.jsx)(p.Button,{variant:"ghost",onClick:i,children:"Cancel"}),(0,t.jsx)(p.Button,{loading:c,disabled:s.trim().length<8,onClick:()=>d(e.key,s),children:n?"Replace":"Save"})]}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(k.Input,{value:s,onChange:e=>r(e.target.value),onKeyDown:t=>{"Enter"===t.key&&s.trim().length>=8&&d(e.key,s)},placeholder:n?"New value — replaces the current key":e.key,spellCheck:!1,type:"password",autoFocus:!0}),o&&"refused"in o&&(0,t.jsx)(K.SettingNote,{className:"wrap-break-word text-destructive",children:o.refused})]})})}e.s(["ConfigGroups",0,O,"ConfigSetting",0,function(){return(0,t.jsx)(O,{section:"keys"})}],805995)},493801,e=>{"use strict";var t=e.i(24708),n=e.i(55545),i=e.i(455024),s=e.i(99151),r=e.i(845110),o=e.i(281092),a=e.i(234662);e.s(["formatDistanceToNowStrict",0,function(e,l){return function(e,t,l){var d;let c,u,m=(0,i.getDefaultOptions)(),f=l?.locale??m.locale??n.defaultLocale,g=(u=(0,o.toDate)(e)-(0,o.toDate)(t))<0?-1:u>0?1:u;if(isNaN(g))throw RangeError("Invalid time value");let h=Object.assign({},l,{addSuffix:l?.addSuffix,comparison:g}),[x,y]=(0,r.normalizeDates)(l?.in,...g>0?[t,e]:[e,t]),p=(d=l?.roundingMethod??"round",e=>{let t=(d?Math[d]:Math.trunc)(e);return 0===t?0:t}),k=y.getTime()-x.getTime(),v=k/a.millisecondsInMinute,j=(k-((0,s.getTimezoneOffsetInMilliseconds)(y)-(0,s.getTimezoneOffsetInMilliseconds)(x)))/a.millisecondsInMinute,b=l?.unit;if("second"===(c=b||(v<1?"second":v<60?"minute":v<a.minutesInDay?"hour":j<a.minutesInMonth?"day":j<a.minutesInYear?"month":"year"))){let e=p(k/1e3);return f.formatDistance("xSeconds",e,h)}if("minute"===c){let e=p(v);return f.formatDistance("xMinutes",e,h)}if("hour"===c){let e=p(v/60);return f.formatDistance("xHours",e,h)}if("day"===c){let e=p(j/a.minutesInDay);return f.formatDistance("xDays",e,h)}if("month"===c){let e=p(j/a.minutesInMonth);return 12===e&&"month"!==b?f.formatDistance("xYears",1,h):f.formatDistance("xMonths",e,h)}else{let e=p(j/a.minutesInYear);return f.formatDistance("xYears",e,h)}}(e,(0,t.constructNow)(e),l)}],493801)},466787,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlert",()=>t.default])}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,805995,e=>{"use strict";var t=e.i(843476),n=e.i(493801),i=e.i(456420);let s={name:"audio-lines",size:24,node:[["path",{d:"M2 10v3",key:"1fnikh"}],["path",{d:"M6 6v11",key:"11sgs0"}],["path",{d:"M10 3v18",key:"yhl04a"}],["path",{d:"M14 8v7",key:"3a1oy3"}],["path",{d:"M18 5v13",key:"123xd1"}],["path",{d:"M22 10v3",key:"154ddg"}]]};s.node;let r=(0,i.default)(s),o={name:"captions",size:24,node:[["rect",{width:"18",height:"14",x:"3",y:"5",rx:"2",ry:"2",key:"12ruh7"}],["path",{d:"M7 15h4M15 15h2M7 11h2M13 11h4",key:"1ueiar"}]],aliases:["subtitles"]};o.node;let a=(0,i.default)(o);var l=e.i(689664),d=e.i(867927);let c={name:"clapperboard",size:24,node:[["path",{d:"m12.296 3.464 3.02 3.956",key:"qash78"}],["path",{d:"M20.2 6 3 11l-.9-2.4c-.3-1.1.3-2.2 1.3-2.5l13.5-4c1.1-.3 2.2.3 2.5 1.3z",key:"1h7j8b"}],["path",{d:"M3 11h18v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"4lm6w1"}],["path",{d:"m6.18 5.276 3.1 3.899",key:"zjj9t3"}]]};c.node;let u=(0,i.default)(c);var m=e.i(815170),f=e.i(758925),g=e.i(566595),h=e.i(466787),x=e.i(271645),y=e.i(798120),k=e.i(167881),p=e.i(23750),v=e.i(917162),j=e.i(671428),S=e.i(412294),N=e.i(146538),b=e.i(968978),w=e.i(265402),C=e.i(635963),I=e.i(95187);let M=(0,I.createServerReference)("7ff28dc5f254ed7fecc4fc2197f95a4732ea0d8ad1",I.callServer,void 0,I.findSourceMapURL,"removeConfigAction");var A=e.i(981577),D=e.i(992112),K=e.i(895836),T=e.i(609856),z=e.i(283653),R=e.i(647163);let $={[D.EXA_API_KEY]:g.Search},q={image:m.Image,video:u,speech:r,transcription:a};function O({section:e}){let{data:n,isLoading:i,error:s}=(0,z.useServerRoute)(y.queryKey.config);if(i)return(0,t.jsx)(K.SettingSkeleton,{rows:4});if(s)return(0,t.jsx)(K.SettingError,{message:s.message});let r=e=>(0,D.isConfigSet)(n,e),o=e=>n?.find(t=>t.key===e)?.value,a=D.CONFIG_GROUPS.filter(t=>t.section===e),l=a.flatMap(e=>e.entries);return(0,t.jsx)(K.SettingScreen,{footer:(0,t.jsx)(K.SettingRailNote,{children:"keys"===e?(0,t.jsxs)(t.Fragment,{children:[l.filter(e=>r(e.key)).length," of"," ",l.length," set",a.some(e=>!(0,D.groupSatisfied)(e,r))?" · a call needs one voice key":" · your keys stay on this machine"]}):(0,t.jsxs)(t.Fragment,{children:[l.length," of ",l.length," resolved ·"," ",l.filter(e=>o(e.key)).length," pinned"]})}),children:a.map(e=>(0,t.jsx)(K.SettingGroup,{label:e.title,hint:e.hint,right:(0,t.jsx)(F,{group:e,isSet:r}),children:(0,t.jsx)(K.SettingItems,{children:e.entries.map(n=>n.choices?(0,t.jsx)(H,{entry:n,choices:n.choices,value:o(n.key),isSet:r},n.key):(0,t.jsx)(B,{entry:n,set:r(n.key),needed:!(0,D.groupSatisfied)(e,r)},n.key))})},e.id))})}function F({group:e,isSet:n}){return"none"===e.require?null:(0,D.groupSatisfied)(e,n)?(0,t.jsxs)("span",{className:"flex items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(l.Check,{className:"size-3"}),"ready"]}):(0,t.jsxs)("span",{className:(0,R.cn)("flex items-center gap-1 font-mono text-[11px]",R.WAITING_INK),children:[(0,t.jsx)(h.TriangleAlert,{className:"size-3"}),e.note??"Required"]})}function B({entry:e,set:n,needed:i}){let s=_(e,n),r=L(e,n),o=U(e,n),a=r.data?W(r.data):P(n,i,s.data,e.signIn);return(0,t.jsxs)("button",{type:"button",onClick:()=>{var i,s,r;return e.signIn?(i=e,v.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(Q,{entry:i,onDone:e})})):(s=e,r=n,v.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(V,{entry:s,set:r,onDone:e})}))},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(Y,{entry:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:e.signIn?n?E(r.data,o):"sign in with your account":e.key})]}),s.isLoading||r.isLoading?(0,t.jsx)(j.Skeleton,{className:"h-3 w-20 shrink-0"}):(0,t.jsxs)("span",{className:(0,R.cn)("flex shrink-0 items-center gap-1.5 font-mono text-xs",a.ink),children:[a.warn?(0,t.jsx)(h.TriangleAlert,{className:"size-3"}):n&&(0,t.jsx)(l.Check,{className:"size-3"}),a.text]}),(0,t.jsx)(d.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}let G=new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"});function P(e,t,n,i){return e?n?"refused"in n?{text:"Key refused",ink:"text-destructive",warn:!0}:{text:`${G.format(n.balance)} left`,ink:n.low?R.WAITING_INK:"text-muted-foreground",warn:n.low}:{text:i?"Signed in":"Set",ink:"text-muted-foreground",warn:!1}:t?{text:"Needed",ink:R.WAITING_INK,warn:!0}:{text:i?"Signed out":"Not set",ink:"text-muted-foreground/60",warn:!1}}function _(e,t){return(0,z.useServerRoute)(t&&"vercel-ai-gateway"===e.provider?y.queryKey.gatewayCredits:null)}function U(e,t){let{data:n}=(0,z.useServerRoute)(t&&e.signIn?y.queryKey.llmModel:null);return n?.find(t=>t.id===e.provider)?.plan??null}function L(e,t){return(0,z.useServerRoute)(t&&e.signIn?y.queryKey.subscriptionUsage:null)}function W(e){return"refused"in e?{text:"Sign-in refused",ink:"text-destructive",warn:!0}:{text:e.spent?"Limit reached":`${e.usedPercent}% used`,ink:e.high?R.WAITING_INK:"text-muted-foreground",warn:e.high}}function E(e,t){let i=!e||"refused"in e?null:e,s=`${i?.plan??t??"unknown"} plan`;return i?.resetsAt?`${s} \xb7 resets in ${(0,n.formatDistanceToNowStrict)(new Date(i.resetsAt))}`:s}function Y({entry:e}){if(e.provider)return(0,t.jsx)(b.ProviderIcon,{provider:e.provider,className:"size-4"});let n=$[e.key]??f.KeyRound;return(0,t.jsx)(n,{className:"size-4 text-muted-foreground"})}function H({entry:e,choices:n,value:i,isSet:s}){let r=n.find(e=>e.value===i),o=n.filter(e=>s(e.needs)),a=i&&!r?i:null,l=e.kind?q[e.kind]:C.BotsMark;return(0,t.jsxs)("button",{type:"button",onClick:()=>{var i,s,r;return e.kind||e.text?(i=e,v.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(X,{entry:i,onDone:e})})):(s=e,r=n,v.notify.component({className:"sm:max-w-md",renderer:({close:e})=>(0,t.jsx)(J,{entry:s,choices:r,onDone:e})}))},className:"group flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-8 shrink-0 place-items-center rounded-lg bg-muted/60",children:(0,t.jsx)(l,{className:"size-4 text-muted-foreground"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[!r&&!a&&(0,t.jsx)("span",{className:(0,R.cn)("shrink-0 rounded-[5px] border border-border/60 px-1 font-mono text-[10px]",e.kind?R.WAITING_INK:"text-muted-foreground"),children:e.kind?"off":"auto"}),(0,t.jsx)("span",{className:"truncate font-mono text-xs text-muted-foreground",children:r?.label??a??(e.kind?"Not offered to bots until you pick one":o[0]?.label??"No key for any of these yet")})]})]}),(0,t.jsx)(d.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function X({entry:e,onDone:n}){let{data:i}=(0,z.useServerRoute)(y.queryKey.config),s=i?.find(t=>t.key===e.key)?.value,[r,o]=(0,x.useState)(()=>{let t=e.text?(0,w.parseTextModel)(s):(0,w.parseMediaModel)(s);return{provider:t?.provider??null,model:t?.model??""}}),a=()=>{(0,z.revalidate)(y.queryKey.config),n()},[l]=(0,T.useServerAction)(A.setConfigAction,{okMessage:`${e.label} saved`,onOk:a}),[d,c]=(0,T.useServerAction)(M,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:a});return(0,t.jsx)(K.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)(k.Button,{variant:"ghost",loading:c,onClick:()=>d(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:n,children:"Close"})]}),children:(0,t.jsx)(N.ModelPicker,{kind:e.kind,provider:r.provider,model:r.model,onChange:t=>{o(t),t.model.trim()&&l(e.key,`${t.provider}/${t.model.trim()}`)}})})}function J({entry:e,choices:n,onDone:i}){let{data:s}=(0,z.useServerRoute)(y.queryKey.config),r=s?.find(t=>t.key===e.key)?.value,o=()=>{(0,z.revalidate)(y.queryKey.config),i()},[a,l]=(0,T.useServerAction)(A.setConfigAction,{okMessage:`${e.label} saved`,onOk:o}),[d,c]=(0,T.useServerAction)(M,{okMessage:e.kind?`${e.label} switched off`:`${e.label} back to automatic`,onOk:o});return(0,t.jsx)(K.SettingDialogContent,{title:e.label,description:e.hint,footer:(0,t.jsxs)(t.Fragment,{children:[r&&(0,t.jsx)(k.Button,{variant:"ghost",loading:c,onClick:()=>d(e.key),children:e.kind?"Turn off":"Automatic"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:i,children:"Close"})]}),children:(0,t.jsx)(K.SettingChoiceRows,{options:n.map(e=>({value:e.value,label:e.label,disabled:!(0,D.isConfigSet)(s,e.needs)&&`needs ${e.needs}`})),value:r,onChange:t=>a(e.key,t),disabled:l})})}function Q({entry:e,onDone:n}){let{data:i}=(0,z.useServerRoute)(y.queryKey.config),s=(0,D.isConfigSet)(i,e.key),r=U(e,s),o=L(e,s),a=o.data?W(o.data):null,[l,d]=(0,T.useServerAction)(M,{okMessage:`Signed out of ${e.label}`,onOk:()=>{(0,z.revalidate)(y.queryKey.config),(0,z.revalidate)(y.queryKey.llmModel),n()}});return(0,t.jsx)(K.SettingDialogContent,{title:e.label,description:s?(0,t.jsxs)(t.Fragment,{children:["Signed in ·"," ",(0,t.jsx)("span",{className:"font-mono",children:E(o.data,r)}),a&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsx)("span",{className:(0,R.cn)("font-mono",a.ink),children:a.text})]})]}):"Sign in with your ChatGPT account instead of a key",footer:(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)(k.Button,{variant:"ghost",loading:d,onClick:()=>l(e.key),children:"Sign out"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:n,children:s?"Close":"Cancel"}),!s&&(0,t.jsx)(S.ChatGptSignIn,{})]}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(K.SettingNote,{children:s?"Bots on this subscription spend your plan's usage, not a key. When it runs out, the job stops and says when it resets.":"The sign-in opens in its own window. Approve it there, and this turns to signed in by itself."}),o.data&&"refused"in o.data&&(0,t.jsx)(K.SettingNote,{className:"wrap-break-word text-destructive",children:o.data.refused})]})})}function V({entry:e,set:n,onDone:i}){let[s,r]=(0,x.useState)(""),{data:o}=_(e,n),a=o?P(n,!1,o):null,l=()=>{(0,z.revalidate)(y.queryKey.config),(0,z.revalidate)(y.queryKey.llmModel)},[d,c]=(0,T.useServerAction)(A.setConfigAction,{okMessage:`${e.label} key saved`,onOk:()=>{l(),i()}}),[u,m]=(0,T.useServerAction)(M,{okMessage:`${e.label} key removed`,onOk:()=>{l(),i()}});return(0,t.jsx)(K.SettingDialogContent,{title:e.label,description:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"font-mono",children:e.key}),e.hint&&(0,t.jsxs)(t.Fragment,{children:[" · ",e.hint]}),a&&(0,t.jsxs)(t.Fragment,{children:[" · ",(0,t.jsx)("span",{className:(0,R.cn)("font-mono",a.ink),children:a.text})]})]}),footer:(0,t.jsxs)(t.Fragment,{children:[n&&(0,t.jsx)(k.Button,{variant:"ghost",loading:m,onClick:()=>u(e.key),children:"Remove"}),(0,t.jsx)(k.Button,{variant:"ghost",onClick:i,children:"Cancel"}),(0,t.jsx)(k.Button,{loading:c,disabled:s.trim().length<8,onClick:()=>d(e.key,s),children:n?"Replace":"Save"})]}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(p.Input,{value:s,onChange:e=>r(e.target.value),onKeyDown:t=>{"Enter"===t.key&&s.trim().length>=8&&d(e.key,s)},placeholder:n?"New value — replaces the current key":e.key,spellCheck:!1,type:"password",autoFocus:!0}),o&&"refused"in o&&(0,t.jsx)(K.SettingNote,{className:"wrap-break-word text-destructive",children:o.refused})]})})}e.s(["ConfigGroups",0,O,"ConfigSetting",0,function(){return(0,t.jsx)(O,{section:"keys"})}],805995)},493801,e=>{"use strict";var t=e.i(24708),n=e.i(55545),i=e.i(455024),s=e.i(99151),r=e.i(845110),o=e.i(281092),a=e.i(234662);e.s(["formatDistanceToNowStrict",0,function(e,l){return function(e,t,l){var d;let c,u,m=(0,i.getDefaultOptions)(),f=l?.locale??m.locale??n.defaultLocale,g=(u=(0,o.toDate)(e)-(0,o.toDate)(t))<0?-1:u>0?1:u;if(isNaN(g))throw RangeError("Invalid time value");let h=Object.assign({},l,{addSuffix:l?.addSuffix,comparison:g}),[x,y]=(0,r.normalizeDates)(l?.in,...g>0?[t,e]:[e,t]),k=(d=l?.roundingMethod??"round",e=>{let t=(d?Math[d]:Math.trunc)(e);return 0===t?0:t}),p=y.getTime()-x.getTime(),v=p/a.millisecondsInMinute,j=(p-((0,s.getTimezoneOffsetInMilliseconds)(y)-(0,s.getTimezoneOffsetInMilliseconds)(x)))/a.millisecondsInMinute,S=l?.unit;if("second"===(c=S||(v<1?"second":v<60?"minute":v<a.minutesInDay?"hour":j<a.minutesInMonth?"day":j<a.minutesInYear?"month":"year"))){let e=k(p/1e3);return f.formatDistance("xSeconds",e,h)}if("minute"===c){let e=k(v);return f.formatDistance("xMinutes",e,h)}if("hour"===c){let e=k(v/60);return f.formatDistance("xHours",e,h)}if("day"===c){let e=k(j/a.minutesInDay);return f.formatDistance("xDays",e,h)}if("month"===c){let e=k(j/a.minutesInMonth);return 12===e&&"month"!==S?f.formatDistance("xYears",1,h):f.formatDistance("xMonths",e,h)}else{let e=k(j/a.minutesInYear);return f.formatDistance("xYears",e,h)}}(e,(0,t.constructNow)(e),l)}],493801)},815170,e=>{"use strict";var t=e.i(456420);let n={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};n.node;let i=(0,t.default)(n);e.s(["Image",0,i],815170)},466787,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlert",()=>t.default])}]);
package/README.md CHANGED
@@ -1,10 +1,11 @@
1
1
  <div align="center">
2
2
 
3
- <img src="docs/images/hero.png" alt="Thursday — an open-source voice agent with a face made of emoji" width="760">
3
+ <img src="docs/images/hero.png" alt="Thursday — an open-source voice assistant with a face made of emoji" width="760">
4
4
 
5
5
  ### Everyone wanted Friday. This is Thursday.
6
6
 
7
- **An open-source voice agent that lives on your machine.** You talk. It works. You keep talking.
7
+ **An open-source voice assistant that runs on your computer, with a team of AI bots behind it.**<br>
8
+ You talk. Bots take the slow work to a real browser, a shell and your files. The conversation never stops.
8
9
 
9
10
  [![npm](https://img.shields.io/npm/v/thursday-agent?style=flat-square&color=111&label=npm)](https://www.npmjs.com/package/thursday-agent)
10
11
  [![CI](https://img.shields.io/github/actions/workflow/status/cgoinglove/thursday/ci.yml?style=flat-square&label=ci)](https://github.com/cgoinglove/thursday/actions/workflows/ci.yml)
@@ -15,174 +16,81 @@
15
16
 
16
17
  </div>
17
18
 
18
- !![video: 60-second demo, 1440×900, light theme, no browser chrome. One call, start to finish: say "Hey Thursday", ask "I'm going to Kyoto next week, find me a coat under $200 and put the options on one page", she answers "On it — Navigator went to look", keep talking about something else while the job line appears under the call, the page opens by itself, she says "It's back". Cut a 12-second GIF of that take (from "On it" to the page opening) for right here → `docs/images/demo.gif`; the full take goes to YouTube, linked underneath.]
19
+ ## Quick start
19
20
 
20
21
  ```bash
21
22
  npx thursday-agent
22
23
  ```
23
24
 
24
- One API key, typed into the first screen. Then say **"hey thursday."** No `.env`, no account, no cloud. That is the whole setup.
25
+ Paste an OpenAI API key, pick your starter bots, and say **“hey thursday.”** No account, no `.env`.
25
26
 
26
- <br>
27
-
28
- ## Say this out loud
29
-
30
- > **"I'm going to Kyoto next week — find me a coat under $200 and put the options on one page."**
27
+ ## Talk while it works
31
28
 
32
- She answers *"On it — Navigator went to look"* and **keeps talking to you.** A bot opens the shops in a real browser, reads the pages, builds the page. Two minutes later it opens on your screen.
29
+ Most agents make you type and wait. Thursday is a real-time voice call you can interrupt. Anything that takes more than a few seconds goes to a bot in the background, so the call never goes quiet, and she tells you when it's back.
33
30
 
34
- You never watched a spinner. You never stopped talking.
35
-
36
- <br>
31
+ ![A voice call with Thursday while a bot looks for hotels in the background](docs/images/call.png)
37
32
 
38
- ## She has a face, and it is made of emoji
33
+ ## One sentence, a whole team
39
34
 
40
- <div align="center">
41
- <picture>
42
- <source media="(prefers-color-scheme: dark)" srcset="docs/images/face-dark.png">
43
- <img src="docs/images/face-light.png" alt="Thursday's face: an orb of emoji that swells when she speaks" width="280">
44
- </picture>
45
- </div>
35
+ Bots hand parts of a job to each other, check what comes back, and ask you only when a decision is yours. Every handoff is saved: open the thread to see who did what, or step in.
46
36
 
47
- Hundreds of them, packed into one orb. When she talks, the rim swells with her voice and every syllable shakes a few loose — you can tell she is speaking with the sound off.
37
+ ![A planner bot splits a trip request between two bots and one asks the user a question](docs/images/room.png)
48
38
 
49
- Rather have letters, a sprinkle, or a plain mark with two eyes? Settings › Thursday.
39
+ ## Errands, in a real browser
50
40
 
51
- <br>
41
+ Orders, bookings, forms, the inbox. Bots use their own browser or the Chrome you're already signed into, and ask before using a login you gave them. A purchase stops at the Pay button, left open on your screen.
52
42
 
53
- ## A harness you talk to
43
+ ![A checkout a bot filled in and left open, with the Pay button for the user to press](docs/images/errands.png)
54
44
 
55
- A **harness** is the layer around a model that decides what it sees, which tools it may call, where its commands run, and what survives the session. Claude Code, [OpenClaw](https://github.com/openclaw/openclaw) and [Hermes](https://github.com/NousResearch/hermes-agent) are harnesses, and they got very good this year.
45
+ ## Results you can keep
56
46
 
57
- **Every one of them is typed at.**
47
+ Pages, charts, videos, slides, docs and scripts, saved as files on your machine and opened on your screen when they're ready.
58
48
 
59
- Not because nobody thought of speech. Because speech breaks the one thing a harness does: run a long loop. A voice model that opens a browser goes quiet for ninety seconds — and a quiet call is a dead call. Nobody holds a phone through that.
49
+ ![Files made by six different bots: a rent chart, a short video, a carousel, a trip page, launch copy, and a script](docs/images/artifacts.png)
60
50
 
61
- ![Why a voice agent needs two minds](docs/images/two-minds.png)
51
+ ## Your crew
62
52
 
63
- So Thursday puts **two minds on one line.** A realtime speech model holds the conversation and may only touch what it can answer in a glance. Everything slower goes to a **bot** — a text model with your whole machine — that runs in the background and reports back in one sentence, out loud.
53
+ Pick starter bots on the first run, or make your own with a name and one sentence about what it's for. Give each its own model and tools.
64
54
 
65
- The conversation never stops, because the thing holding it never does the slow part.
55
+ ![A lineup of bots, each with its own face and job, plus a slot to make your own](docs/images/bots.png)
66
56
 
67
- ### And the call can read a skill
57
+ ## And also
68
58
 
69
- A **skill** is a folder with a `SKILL.md` in it — a page of your instructions that a model opens only when it turns out to need them. It is how Claude Code, Codex and OpenClaw learn a house style without carrying it in every prompt.
59
+ - **Hang up, it keeps going.** Jobs run on your machine, and Thursday tells you when they finish, or calls you if you turn that on.
60
+ - **Memory you can read.** What she knows about you is plain notes. Open, edit, or delete any line.
61
+ - **Skills and MCP.** Teach bots new methods with Agent Skills, and connect any MCP server.
62
+ - **Any model.** OpenAI, Anthropic, Google, xAI, Vercel AI Gateway, or your ChatGPT sign-in, per bot.
63
+ - **Local-first.** No Thursday account and no server of ours. The app, your data and your keys stay on your computer.
70
64
 
71
- Skills were built for agents you type at. Switch it on in Settings and **the voice model reads one mid-sentence** — so "book the usual place" stops being a sentence you have to finish. Bots have their own, always.
65
+ ## Requirements
72
66
 
73
- As far as I can find, nothing else lets a realtime speech model do this. The traffic goes the other way: the skills written *about* voice are instructions for a coding agent building a voice app. If you know of one, open an issue and this paragraph changes.
67
+ - Node.js 22.18+
68
+ - An OpenAI API key for the voice
69
+ - macOS. Linux should work; Windows is not tested yet.
74
70
 
75
71
  <details>
76
- <summary><b>Isn't this what LiveKit and the Realtime API examples do?</b></summary>
77
-
78
- The split is not new. OpenAI's own [realtime-agents](https://github.com/openai/openai-realtime-agents) demonstrates it as the "chat-supervisor" pattern, and [LiveKit Agents](https://github.com/livekit/agents) attaches MCP tools to a realtime session in a line.
79
-
80
- They are frameworks and demonstrations: excellent parts for building a voice agent. What they hand the supervisor is a tool list.
72
+ <summary><b>What does it cost?</b></summary>
81
73
 
82
- Thursday hands it a machine — a shell, a real browser, skills, connectors, a workspace, and jobs that keep running after you hang up. It is a harness first, and speech is how you operate it. That is the whole difference, and it is the half that takes the work.
74
+ Thursday is free and MIT-licensed. You bring the keys: the voice is billed by OpenAI per active minute of a call, and bots use whichever provider you pick for them.
83
75
 
84
76
  </details>
85
77
 
86
- <br>
87
-
88
- ## What a bot actually has
89
-
90
- Not an API sandbox. **Your computer** — down to the Chrome you are already signed into, which no agent in someone else's cloud can borrow.
91
-
92
- - **A shell** — real commands on your real files
93
- - **A real browser** — its own, or attached to your Chrome. When there is something for you to see — a checkout, a map, a sign-in — it opens a window on your screen and leaves it there
94
- - **Skills** — the browser, this Mac, building a page; `npx skills add` for the rest
95
- - **46 connectors** — Notion, GitHub, Linear, Slack, Figma, Stripe, Supabase… one click each
96
- - **A studio** — image, video, speech, transcription
97
- - **Its own memory** — what it learned doing the job, kept as files you can open on its page
98
- - **Each other** — a bot hands a part of its job to the bot that exists for it
99
-
100
- ![A bot gets your shell, your skills and a real browser — and leaves the checkout for you](docs/images/machine.png)
101
-
102
- It signs in the way you would let it: a session it kept, your own Chrome, you in the window it opened, or the login you gave it — after asking. And there is one button it never presses: **pay.** It takes the order to the last screen, leaves it open in front of you, and tells you what it buys and for how much.
103
-
104
- <br>
105
-
106
- ## One sentence. Three bots. You typed none of it.
107
-
108
- ![The room they sorted it out in](docs/images/task-thread.png)
109
-
110
- Jarvis holds the job and decides neither half is his. Navigator opens six shops and reads them. Scribe builds the page out of what came back. It reaches you as one line, out loud — and the room is there to read if you ever want to know how.
111
-
112
- Those three come with her. Two more are ready-made in Settings — **Insta** draws the post, writes the caption and puts it up once you say so; **Voyage** plans the trip with a map for each day — and one of your own takes a name and a sentence.
113
-
114
- <br>
115
-
116
- ## Hang up. It keeps going.
117
-
118
- The job is not in the call. It runs on the server and the screen is a projection of it — so hang up mid-sentence, open a new tab, come back in ten minutes. She tells you what came in, or rings you, if you let her. The tab says it too: `(2) Thursday` means two things are waiting on you.
119
-
120
- ![The call ends at 0:12; the job runs to 2:41](docs/images/keeps-going.png)
121
-
122
- Close the app and it does the honest thing: ten seconds with no browser on it and every running job stops where it stands. **Nothing spends your keys while you are not looking.** Open it again and they pick themselves back up — the same after a restart, a `Ctrl+C`, or a model that went quiet for a minute.
123
-
124
- <br>
125
-
126
- ## It remembers you, and you can read it
127
-
128
- One fact per line, in the database on your disk. Open the Memory screen and read every one — where it came from, when it landed, whether it rides in every call — and delete any of them. Or type what changed, *"I moved to Busan"*, and watch the edit land.
129
-
130
- Every fact remembers the call it was said in, so when one line is not enough she can go back and read the conversation.
131
-
132
- <br>
133
-
134
- ## Local-first, and here it is not a slogan
135
-
136
- | | |
137
- |---|---|
138
- | **Your browser** | Bots drive a real browser on your machine — and can attach to the Chrome already open on your desk |
139
- | **Your machine** | Real commands on real files. Not a VM with a copy |
140
- | **Your keys** | A SQLite file on your disk, stripped from the shell a bot runs in |
141
- | **Your memory** | Facts in a database on your disk. Read, edit and delete them on the screen |
142
- | **No account** | Nothing to sign up for. The "server" is a Node process on `127.0.0.1` |
143
-
144
- **Honest caveat:** the *intelligence* is remote. There is no local realtime speech model worth putting a call on yet, so the audio goes to OpenAI or xAI. Everything else never leaves the machine. When a local voice model lands, this is the app that is ready for it.
145
-
146
- <br>
147
-
148
- ## Install
149
-
150
- ```bash
151
- npx thursday-agent
152
- ```
153
-
154
- Opens at `localhost:3000`, or the next free port if something already has it. One OpenAI or xAI key opens the call — a voice key is also a text key, so one is enough to run everything.
155
-
156
- ### Running it
78
+ <details>
79
+ <summary><b>Where does my data go?</b></summary>
157
80
 
158
- It runs in the terminal you started it in, like `n8n`. There is no daemon and nothing is installed into your login items.
81
+ What you say and what bots work on go only to the model providers you set up and the services you connect. The app listens only on `127.0.0.1`, and your calls, memory and files live in `~/.thursday` (or the checkout, when you run from source).
159
82
 
160
- | | |
161
- |---|---|
162
- | **Stop it** | `Ctrl+C` — running jobs are parked and pick up at the next start |
163
- | **Start it again** | the same `npx thursday-agent` |
164
- | **Close the terminal** | it stops with the terminal — nothing is left running |
165
- | **Keep it up while you work** | run it in its own tab, or `npx thursday-agent &` |
166
- | **Another port** | `npx thursday-agent --port 4000` |
167
- | **Somewhere else on disk** | `npx thursday-agent --home ~/work/thursday` |
83
+ </details>
168
84
 
169
- **Your data outlives all of it.** Everything you say, everything the bots write, your keys and your memory live in `~/.thursday`, never inside the package — so restarting, rebooting, or upgrading to the next version keeps every call and every file. Deleting that folder is the uninstall.
85
+ <details>
86
+ <summary><b>Is it safe to let bots use my computer?</b></summary>
170
87
 
171
- ```
172
- ~/.thursday
173
- ├── local.db calls, memory, bots, jobs, keys
174
- └── .ai-workspace
175
- ├── artifacts/ what the bots made for you
176
- ├── projects/ code they build
177
- ├── bots/ each bot's own memory and kept sign-ins
178
- ├── .agents/ skills you installed
179
- └── scratch/ one folder per job, cleared three days after it ends
180
- ```
88
+ Bots run real commands, so treat Thursday like any powerful local tool: it is not a sandbox. Read [SECURITY.md](SECURITY.md) before giving it access to anything sensitive.
181
89
 
182
- The first run also fetches the browser bots drive (~280 MB) in the background, once. That one lands in Playwright's own cache — `~/Library/Caches/ms-playwright`, or `~/.cache/ms-playwright` on Linux — so every run after it, and every upgrade, skips the download.
90
+ </details>
183
91
 
184
92
  <details>
185
- <summary><b>From source</b></summary>
93
+ <summary><b>Run from source</b></summary>
186
94
 
187
95
  ```bash
188
96
  git clone https://github.com/cgoinglove/thursday.git
@@ -191,72 +99,16 @@ pnpm install
191
99
  pnpm dev
192
100
  ```
193
101
 
194
- Node 22.18+ and pnpm 10+. The first run fetches the browser bots drive (~280 MB) in the background.
195
-
196
- </details>
197
-
198
- <details>
199
- <summary><b>Which models can I use?</b></summary>
200
-
201
- | | Providers |
202
- |---|---|
203
- | **Voice** (the call) | OpenAI Realtime · xAI Grok Voice |
204
- | **Text** (the bots) | OpenAI · Anthropic · Google · xAI · Vercel AI Gateway — every model it carries, live · your ChatGPT plan, by signing in |
205
- | **Studio** | OpenAI · Google · xAI · Vercel AI Gateway |
206
-
207
- Every bot can run on its own model. Give the errand-runner something cheap and the planner something good.
208
-
209
- </details>
210
-
211
- <details>
212
- <summary><b>Ten more things to try saying</b></summary>
213
-
214
- - "What did I download this week?" — one command, run while you talk
215
- - "Remember my sister's birthday is March 3rd." — saved the moment it lands
216
- - "Anything from my landlord in my email?" — read in the Chrome you are signed into
217
- - "Find the cheapest flight to Osaka on the 14th." — left at the pay button, on your screen
218
- - "Plan three days in Kyoto, with a map for each day." — Voyage
219
- - "Make a post about Friday's gig and put it on Instagram." — Insta, once you say so
220
- - "Write up what we decided today as a one-pager." — opens as a document, not a chat bubble
221
- - "Go through my card statements and list every subscription I am paying for."
222
- - "Watch this page and tell me when the price drops."
223
- - "Build me a page of thirty wedding pose photos."
102
+ Requires pnpm 10+.
224
103
 
225
104
  </details>
226
105
 
227
- <br>
228
-
229
- ## Where this is going
230
-
231
- **0.x** — this web app. More harness: better bots, more skills, a wider studio, and whatever the first people who actually talk to her ask for.
232
-
233
- **1.0** — a desktop app. The same server in a window, with the microphone and the machine one step closer.
234
-
235
- Tell me what you said to her and where it stopped. That is the roadmap.
236
-
237
- <br>
238
-
239
- ## The part where I am honest with you
240
-
241
- She is a language model with a shell, a browser and your API keys. **That is the product, not an accident.** Keys are stripped from the environment the shell runs in. The server is localhost-only. A login you gave a bot is asked about before it is used, and a payment is left for you to press — instructions a skill carries, not a lock the code holds.
242
-
243
- The shell is not fenced, and it is not meant to be — a bot that cannot look around cannot do the job, and a command writes wherever you can. That includes the database your keys sit in.
244
-
245
- It is not a sandbox and it does not pretend to be. → [SECURITY.md](SECURITY.md)
246
-
247
- Built on macOS. Linux should work; Windows is untested.
248
-
249
- <br>
250
-
251
- ---
252
-
253
106
  <div align="center">
254
107
 
255
- **If you have ever wanted to just talk to your computer while it worked — star it.**<br>
256
- That is how I know to keep going.
108
+ <br>
257
109
 
258
- [![Star History](https://api.star-history.com/svg?repos=cgoinglove/thursday&type=Date)](https://star-history.com/#cgoinglove/thursday&Date)
110
+ **[How it works](docs/how-it-works.md)** · [Contributing](CONTRIBUTING.md) · [Security](SECURITY.md) · [MIT](LICENSE)
259
111
 
260
- [How it works](docs/how-it-works.md) · [Contributing](CONTRIBUTING.md) · [Architecture](CLAUDE.md) · [MIT](LICENSE)
112
+ If you'd rather say it than type it, [star Thursday](https://github.com/cgoinglove/thursday).
261
113
 
262
114
  </div>
@@ -6,8 +6,8 @@
6
6
  export type AppEvent =
7
7
  /** Sent on connect. A changed `boot` means the server restarted; re-read everything. */
8
8
  | { type: "hello"; boot: string }
9
- /** Signal: a task changed (every write in bot.query). */
10
- | { type: "tasks" }
9
+ /** Signal: a thread changed (every write in thread.query and room.query). */
10
+ | { type: "threads" }
11
11
  /** Signal: a note or fact changed. */
12
12
  | { type: "memory" }
13
13
  /** Signal: a server was registered, removed, synced, or finished OAuth. */
@@ -15,7 +15,9 @@ export type AppEvent =
15
15
  /** Signal: a sign-in was written away from the settings screen (ai/chatgpt's sign-in answer). */
16
16
  | { type: "config" }
17
17
  /** Data: a finished job produced a document; `path` is workspace-relative. */
18
- | { type: "artifact"; taskId: string; label: string; path: string };
18
+ | { type: "artifact"; threadId: string; label: string; path: string }
19
+ /** Data: Thursday puts a job in front of the user (`thread` `open` on a call). */
20
+ | { type: "showThread"; threadId: string };
19
21
 
20
22
  /** Union members carrying nothing but `type`. */
21
23
  type Signal<E = AppEvent> = E extends AppEvent
@@ -29,7 +31,7 @@ type Signal<E = AppEvent> = E extends AppEvent
29
31
  * makes a signal missing here a compile error.
30
32
  */
31
33
  export const SIGNALS: Record<Signal, true> = {
32
- tasks: true,
34
+ threads: true,
33
35
  memory: true,
34
36
  mcp: true,
35
37
  config: true,