thursday-agent 0.1.2 → 0.2.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 (358) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +1 -0
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +6 -0
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error/page_client-reference-manifest.js +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 +1 -1
  21. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/notes/route/app-paths-manifest.json +3 -0
  23. package/.next/server/app/api/bot/notes/route/build-manifest.json +12 -0
  24. package/.next/server/app/api/bot/notes/route/server-reference-manifest.json +4 -0
  25. package/.next/server/app/api/bot/notes/route.js +14 -0
  26. package/.next/server/app/api/bot/notes/route.js.map +5 -0
  27. package/.next/server/app/api/bot/notes/route.js.nft.json +1 -0
  28. package/.next/server/app/api/bot/notes/route_client-reference-manifest.js +3 -0
  29. package/.next/server/app/api/bot/route.js +4 -4
  30. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  31. package/.next/server/app/api/bot/task/[id]/route.js +6 -6
  32. package/.next/server/app/api/bot/task/[id]/route.js.nft.json +1 -1
  33. package/.next/server/app/api/bot/task/route.js +6 -6
  34. package/.next/server/app/api/bot/task/route.js.nft.json +1 -1
  35. package/.next/server/app/api/config/route.js +3 -3
  36. package/.next/server/app/api/config/route.js.nft.json +1 -1
  37. package/.next/server/app/api/events/route.js +1 -1
  38. package/.next/server/app/api/events/route.js.nft.json +1 -1
  39. package/.next/server/app/api/file/[...path]/route.js +1 -1
  40. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  41. package/.next/server/app/api/llm-model/catalog/route.js +6 -6
  42. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  43. package/.next/server/app/api/llm-model/route.js +3 -3
  44. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  45. package/.next/server/app/api/mcp/[name]/route.js +3 -3
  46. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  47. package/.next/server/app/api/mcp/oauth/callback/route.js +5 -5
  48. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  49. package/.next/server/app/api/mcp/route.js +3 -3
  50. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  51. package/.next/server/app/api/mcp/tools/route.js +3 -3
  52. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  53. package/.next/server/app/api/memory/route.js +7 -7
  54. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  55. package/.next/server/app/api/memory/tidy/route.js +10 -11
  56. package/.next/server/app/api/memory/tidy/route.js.nft.json +1 -1
  57. package/.next/server/app/api/skills/[source]/[name]/route.js +1 -1
  58. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  59. package/.next/server/app/api/skills/route.js +1 -1
  60. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  61. package/.next/server/app/api/thursday/call/route.js +8 -8
  62. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  63. package/.next/server/app/api/thursday/skills/route.js +8 -8
  64. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  65. package/.next/server/app/api/thursday/tool-call/route.js +11 -12
  66. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  67. package/.next/server/app/api/workspace/route.js +1 -1
  68. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  69. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  70. package/.next/server/app/artifact/[...path]/page.js +3 -3
  71. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  72. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  73. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  74. package/.next/server/app/page/server-reference-manifest.json +63 -41
  75. package/.next/server/app/page.js +7 -7
  76. package/.next/server/app/page.js.nft.json +1 -1
  77. package/.next/server/app/page_client-reference-manifest.js +1 -1
  78. package/.next/server/app-paths-manifest.json +1 -0
  79. package/.next/server/chunks/0d-b_next_dist_server_app-render_after-task-async-storage_external_0-exn7p.js +3 -0
  80. package/.next/server/chunks/{[root-of-the-server]__0t_dqaj._.js → [root-of-the-server]__0-npkh_._.js} +1 -1
  81. package/.next/server/chunks/[root-of-the-server]__005var5._.js +3 -0
  82. package/.next/server/chunks/[root-of-the-server]__019dx9f._.js +2 -2
  83. package/.next/server/chunks/[root-of-the-server]__02va5wz._.js +3 -0
  84. package/.next/server/chunks/{[root-of-the-server]__1mzp_el._.js → [root-of-the-server]__04_8spk._.js} +2 -2
  85. package/.next/server/chunks/[root-of-the-server]__06t77t4._.js +1 -1
  86. package/.next/server/chunks/[root-of-the-server]__0bed6hu._.js +4 -4
  87. package/.next/server/chunks/[root-of-the-server]__0cro2dz._.js +5 -0
  88. package/.next/server/chunks/[root-of-the-server]__0emr6go._.js +3 -0
  89. package/.next/server/chunks/[root-of-the-server]__0le4d-p._.js +1 -1
  90. package/.next/server/chunks/[root-of-the-server]__0m8ywyo._.js +5 -5
  91. package/.next/server/chunks/{[root-of-the-server]__113fqg5._.js → [root-of-the-server]__0p32jfz._.js} +3 -3
  92. package/.next/server/chunks/[root-of-the-server]__0phdgco._.js +4 -4
  93. package/.next/server/chunks/[root-of-the-server]__0wvgrsl._.js +1 -1
  94. package/.next/server/chunks/[root-of-the-server]__11j52t0._.js +5 -0
  95. package/.next/server/chunks/{[root-of-the-server]__0j_n5l3._.js → [root-of-the-server]__1692zrv._.js} +2 -2
  96. package/.next/server/chunks/[root-of-the-server]__16thabu._.js +1 -1
  97. package/.next/server/chunks/[root-of-the-server]__173nhwf._.js +3 -3
  98. package/.next/server/chunks/[root-of-the-server]__1bn73ih._.js +10 -0
  99. package/.next/server/chunks/[root-of-the-server]__1bqhuh9._.js +4 -4
  100. package/.next/server/chunks/[root-of-the-server]__1ccon1w._.js +10 -0
  101. package/.next/server/chunks/[root-of-the-server]__1cqizfq._.js +1 -1
  102. package/.next/server/chunks/{[root-of-the-server]__1u_qvc7._.js → [root-of-the-server]__1fboj2j._.js} +2 -2
  103. package/.next/server/chunks/{[root-of-the-server]__1dow0bz._.js → [root-of-the-server]__1oli73c._.js} +2 -2
  104. package/.next/server/chunks/[root-of-the-server]__1txedx6._.js +4 -4
  105. package/.next/server/chunks/[root-of-the-server]__1untqv8._.js +5 -0
  106. package/.next/server/chunks/_0-73of8._.js +55 -0
  107. package/.next/server/chunks/{_2050gwn._.js → _00_584r._.js} +66 -28
  108. package/.next/server/chunks/{_0y8is-s._.js → _03a0897._.js} +1 -1
  109. package/.next/server/chunks/_05h2cii._.js +1 -1
  110. package/.next/server/chunks/_06mxlgn._.js +1 -1
  111. package/.next/server/chunks/_0a351g7._.js +1 -1
  112. package/.next/server/chunks/{_0hin38_._.js → _0khihjk._.js} +5 -5
  113. package/.next/server/chunks/_0kjjmag._.js +1 -1
  114. package/.next/server/chunks/{_1t8fv7b._.js → _0n74zsf._.js} +5 -5
  115. package/.next/server/chunks/_0nn99o2._.js +3 -0
  116. package/.next/server/chunks/_0pppbb5._.js +10 -6
  117. package/.next/server/chunks/{_1icgbi8._.js → _0rnf-6n._.js} +5 -5
  118. package/.next/server/chunks/_0u10wmw._.js +55 -0
  119. package/.next/server/chunks/{_0kl37zl._.js → _0vnutv9._.js} +1 -1
  120. package/.next/server/chunks/_0wp4le3._.js +1 -1
  121. package/.next/server/chunks/_0y5fg-x._.js +1 -1
  122. package/.next/server/chunks/_106co2o._.js +3 -0
  123. package/.next/server/chunks/_12bbv5i._.js +10 -6
  124. package/.next/server/chunks/_15hq89o._.js +1 -1
  125. package/.next/server/chunks/_15q1pig._.js +1 -1
  126. package/.next/server/chunks/_18-1wcc._.js +55 -0
  127. package/.next/server/chunks/_19wg5yn._.js +138 -0
  128. package/.next/server/chunks/_1_5mnq4._.js +18 -0
  129. package/.next/server/chunks/_1bt95p9._.js +55 -0
  130. package/.next/server/chunks/_1cbk7ms._.js +9 -9
  131. package/.next/server/chunks/_1drgfx4._.js +18 -0
  132. package/.next/server/chunks/_1drv2et._.js +10 -6
  133. package/.next/server/chunks/{_10qam6o._.js → _1e48czp._.js} +5 -5
  134. package/.next/server/chunks/{_1skgy7b._.js → _1kg70wc._.js} +5 -5
  135. package/.next/server/chunks/_1php4eq._.js +1 -1
  136. package/.next/server/chunks/_1rysr-r._.js +10 -0
  137. package/.next/server/chunks/_1u3rwbr._.js +3 -0
  138. package/.next/server/chunks/_1x7p319._.js +1 -1
  139. package/.next/server/chunks/_1yuv4vp._.js +1 -1
  140. package/.next/server/chunks/_next-internal_server_app_api_bot_notes_route_actions_0qcsyu7.js +3 -0
  141. package/.next/server/chunks/config_ts_1g4sz5o._.js +1 -1
  142. package/.next/server/chunks/features_bot_task_query_ts_11xuzl3._.js +1 -1
  143. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0228f43._.js → node_modules_consola_dist_chunks_prompt_mjs_02s3hjt._.js} +1 -1
  144. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0ir-vo2._.js → node_modules_consola_dist_chunks_prompt_mjs_06067w6._.js} +1 -1
  145. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0otw8ef._.js → node_modules_consola_dist_chunks_prompt_mjs_096ais_._.js} +1 -1
  146. package/.next/server/chunks/{node_modules_consola_dist_chunks_prompt_mjs_0tf290y._.js → node_modules_consola_dist_chunks_prompt_mjs_0a1rd09._.js} +1 -1
  147. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0gzvgfv._.js +3 -0
  148. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0j61-ma._.js +3 -0
  149. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0tvkfgh._.js +3 -0
  150. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_11zjo-1._.js +3 -0
  151. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1pycqsq._.js +3 -0
  152. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1tpvamf._.js +3 -0
  153. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y9-wcr._.js +3 -0
  154. package/.next/server/chunks/ssr/[externals]__0dizgek._.js +3 -0
  155. package/.next/server/chunks/ssr/[root-of-the-server]__0f6s48x._.js +1 -1
  156. package/.next/server/chunks/ssr/[root-of-the-server]__0m1b5ky._.js +3 -0
  157. package/.next/server/chunks/ssr/{[root-of-the-server]__0dfwvr4._.js → [root-of-the-server]__0un-erv._.js} +2 -2
  158. package/.next/server/chunks/ssr/[root-of-the-server]__1-mnhyd._.js +5 -3
  159. package/.next/server/chunks/ssr/[root-of-the-server]__1bww500._.js +3 -0
  160. package/.next/server/chunks/ssr/[root-of-the-server]__1mzi-ju._.js +1 -1
  161. package/.next/server/chunks/ssr/[root-of-the-server]__1qfqvmg._.js +3 -0
  162. package/.next/server/chunks/ssr/[root-of-the-server]__1vcdast._.js +3 -0
  163. package/.next/server/chunks/ssr/[root-of-the-server]__1xwnu-h._.js +3 -0
  164. package/.next/server/chunks/ssr/_03webdr._.js +3 -0
  165. package/.next/server/chunks/ssr/{_0gd4vaa._.js → _040sk32._.js} +71 -29
  166. package/.next/server/chunks/ssr/_077-g6s._.js +1 -1
  167. package/.next/server/chunks/ssr/{_0lc_7c8._.js → _09ja_w1._.js} +2 -2
  168. package/.next/server/chunks/ssr/{_1dcxzqe._.js → _0f_b_9s._.js} +2 -2
  169. package/.next/server/chunks/ssr/_0h7zdni._.js +1 -1
  170. package/.next/server/chunks/ssr/_0lu1n_x._.js +3 -0
  171. package/.next/server/chunks/ssr/_0sf1isi._.js +1 -1
  172. package/.next/server/chunks/ssr/_0su6_08._.js +3 -0
  173. package/.next/server/chunks/ssr/{_0nso8tp._.js → _0w5bgak._.js} +2 -2
  174. package/.next/server/chunks/ssr/{_19_o9d-._.js → _0x_nu5e._.js} +2 -2
  175. package/.next/server/chunks/ssr/_1-teee5._.js +3 -3
  176. package/.next/server/chunks/ssr/_13punpm._.js +1 -1
  177. package/.next/server/chunks/ssr/{_0ay6b01._.js → _1ciyoo3._.js} +2 -2
  178. package/.next/server/chunks/ssr/_1e-dgz0._.js +1 -1
  179. package/.next/server/chunks/ssr/_1fq7zgb._.js +1 -1
  180. package/.next/server/chunks/ssr/{_0cvjbuz._.js → _1g6l4uj._.js} +2 -2
  181. package/.next/server/chunks/ssr/{_0q_2f2x._.js → _1lip4th._.js} +2 -2
  182. package/.next/server/chunks/ssr/_1m3bsfr._.js +3 -0
  183. package/.next/server/chunks/ssr/_1mznrxk._.js +1 -1
  184. package/.next/server/chunks/ssr/_1ruzehw._.js +3 -0
  185. package/.next/server/chunks/ssr/_1vyd1ji._.js +3 -0
  186. package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +2 -2
  187. package/.next/server/chunks/ssr/features_config_components_14jqgy4._.js +1 -1
  188. package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
  189. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  190. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  191. package/.next/server/chunks/ssr/lib_realtime_12wg_dd._.js +27 -0
  192. package/.next/server/chunks/ssr/lib_realtime_15h_v1v._.js +27 -0
  193. package/.next/server/chunks/ssr/{node_modules_108wd2o._.js → node_modules_004qlr4._.js} +1 -1
  194. package/.next/server/chunks/ssr/{node_modules_1ub40gk._.js → node_modules_01qnv-a._.js} +1 -1
  195. package/.next/server/chunks/ssr/{node_modules_1y8_3vg._.js → node_modules_04n7mjs._.js} +1 -1
  196. package/.next/server/chunks/ssr/{node_modules_0_j7-g4._.js → node_modules_08d8bke._.js} +1 -1
  197. package/.next/server/chunks/ssr/{node_modules_0y2-av4._.js → node_modules_09xhur7._.js} +1 -1
  198. package/.next/server/chunks/ssr/{node_modules_043-236._.js → node_modules_0_n241r._.js} +1 -1
  199. package/.next/server/chunks/ssr/{node_modules_0ls96je._.js → node_modules_0iz1rzd._.js} +1 -1
  200. package/.next/server/chunks/ssr/{node_modules_0xwx4u-._.js → node_modules_0kl7-tn._.js} +1 -1
  201. package/.next/server/chunks/ssr/{node_modules_1jatz7w._.js → node_modules_0kxz4gt._.js} +1 -1
  202. package/.next/server/chunks/ssr/{node_modules_1t0y5jt._.js → node_modules_0lrjk5t._.js} +1 -1
  203. package/.next/server/chunks/ssr/{node_modules_13f2md6._.js → node_modules_0m93zeg._.js} +1 -1
  204. package/.next/server/chunks/ssr/{node_modules_1nhw9qg._.js → node_modules_0n1kj4p._.js} +1 -1
  205. package/.next/server/chunks/ssr/{node_modules_1k29j1j._.js → node_modules_0ndvxub._.js} +1 -1
  206. package/.next/server/chunks/ssr/{node_modules_16i4o_3._.js → node_modules_13r44jq._.js} +1 -1
  207. package/.next/server/chunks/ssr/{node_modules_0fbw5-u._.js → node_modules_17lrt3y._.js} +1 -1
  208. package/.next/server/chunks/ssr/{node_modules_1d-is1o._.js → node_modules_18_dk7_._.js} +1 -1
  209. package/.next/server/chunks/ssr/{node_modules_1hn_sd5._.js → node_modules_19dp7ko._.js} +1 -1
  210. package/.next/server/chunks/ssr/{node_modules_20ynonm._.js → node_modules_1dwguw_._.js} +1 -1
  211. package/.next/server/chunks/ssr/{node_modules_00d6675._.js → node_modules_1hd-5tv._.js} +1 -1
  212. package/.next/server/chunks/ssr/{node_modules_1ee8gav._.js → node_modules_1hn8z1f._.js} +1 -1
  213. package/.next/server/chunks/ssr/{node_modules_0bue6gy._.js → node_modules_1n5ygqe._.js} +1 -1
  214. package/.next/server/chunks/ssr/{node_modules_1_588_4._.js → node_modules_1q0p85z._.js} +1 -1
  215. package/.next/server/chunks/ssr/{node_modules_0ipn1ho._.js → node_modules_1toafc-._.js} +1 -1
  216. package/.next/server/chunks/ssr/{node_modules_0_fvxnt._.js → node_modules_1xyd7ov._.js} +1 -1
  217. package/.next/server/chunks/ssr/{node_modules_1v0077l._.js → node_modules_1zu988w._.js} +1 -1
  218. package/.next/server/chunks/ssr/{node_modules_06kvvuo._.js → node_modules_20yebtj._.js} +1 -1
  219. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_092s8nx._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0m9a4y0._.js} +1 -1
  220. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1nvexgu._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_13w_wy9._.js} +1 -1
  221. package/.next/server/chunks/ssr/node_modules_consola_dist_chunks_prompt_mjs_05cwqv2._.js +47 -0
  222. package/.next/server/middleware-build-manifest.js +3 -3
  223. package/.next/server/pages/404.html +1 -1
  224. package/.next/server/pages/500.html +1 -1
  225. package/.next/server/server-reference-manifest.js +1 -1
  226. package/.next/server/server-reference-manifest.json +64 -42
  227. package/.next/static/chunks/05b6nx_o3_f_n.js +1 -0
  228. package/.next/static/chunks/{3aquirz5h71da.js → 07kl352c-lvcz.js} +1 -1
  229. package/.next/static/chunks/0dmns-gi0raa4.js +1 -0
  230. package/.next/static/chunks/0oc4_xoia77dg.css +1 -0
  231. package/.next/static/chunks/0pheo8m3a-rzi.js +1 -0
  232. package/.next/static/chunks/{2ihkf6l2jowo9.js → 18vhba44l1fc9.js} +3 -3
  233. package/.next/static/chunks/19i8h2t-5evjx.js +1 -0
  234. package/.next/static/chunks/{1gy3bbv7usnjo.js → 1c5fcj473025q.js} +1 -1
  235. package/.next/static/chunks/1pi_hbmjw-f-z.js +1 -0
  236. package/.next/static/chunks/{0tydnn2kybibk.js → 1twt6k09vg4np.js} +1 -1
  237. package/.next/static/chunks/{21rk8w7bda-su.js → 28gotuisldmom.js} +1 -1
  238. package/.next/static/chunks/{3xxa2j56-f3nm.js → 2998p0y7k1c8z.js} +1 -1
  239. package/.next/static/chunks/2l233xfycjpd8.js +1 -0
  240. package/.next/static/chunks/2p5n7pa3c40t-.js +2 -0
  241. package/.next/static/chunks/2ru1q132af7h7.js +1 -0
  242. package/.next/static/chunks/{2fq_86jvq9ymq.js → 2t8wqycwg3y04.js} +2 -2
  243. package/.next/static/chunks/32z_ypgtchw48.js +1 -0
  244. package/.next/static/chunks/{247d-r95j8xs0.js → 33pyjb3xd1iez.js} +1 -1
  245. package/.next/static/chunks/3786h5vayt80-.js +28 -0
  246. package/.next/static/chunks/3_h9txt3tq8t8.js +28 -0
  247. package/.next/static/chunks/{1khakdu_iuedc.js → 3ard_noqapnw1.js} +1 -1
  248. package/.next/static/chunks/{1fr5m75pwtyic.js → 3omud5xunrk1f.js} +1 -1
  249. package/.next/static/chunks/42dnrkbph9e-1.js +1 -0
  250. package/app/api/events/app-event.client.ts +24 -0
  251. package/app/api/events/app-event.server.ts +45 -0
  252. package/app/api/events/app-event.ts +44 -0
  253. package/app/api/llm-model/catalog/route.ts +12 -0
  254. package/app/api/llm-model/route.ts +21 -0
  255. package/app/api/query-key.ts +144 -0
  256. package/app/api/thursday/tool-call/route.ts +67 -0
  257. package/components/ui/button-group.tsx +45 -0
  258. package/components/ui/custom-icon.tsx +259 -0
  259. package/components/ui/dropdown-menu.tsx +271 -0
  260. package/components/ui/folded-text.tsx +68 -0
  261. package/components/ui/input-group.tsx +157 -0
  262. package/components/ui/json-view.tsx +240 -0
  263. package/components/ui/shiny-text.tsx +141 -0
  264. package/components/ui/text-type.tsx +213 -0
  265. package/components/ui/theme-sync.tsx +9 -0
  266. package/database/migrations/{20260908030742_rainy_marvel_zombies → 20260909060813_optimal_sabretooth}/migration.sql +7 -0
  267. package/database/migrations/{20260908030742_rainy_marvel_zombies → 20260909060813_optimal_sabretooth}/snapshot.json +54 -1
  268. package/database/migrations/20260909063821_bitter_tenebrous/migration.sql +1 -0
  269. package/database/migrations/20260909063821_bitter_tenebrous/snapshot.json +1285 -0
  270. package/docs/how-it-works.md +59 -0
  271. package/docs/images/keeps-going.png +0 -0
  272. package/docs/images/task-thread.png +0 -0
  273. package/docs/images/two-minds.png +0 -0
  274. package/features/ai/load-tools.ts +55 -5
  275. package/features/ai/prompts/bot.prompt.ts +121 -26
  276. package/features/ai/prompts/memory-tidy.prompt.ts +7 -1
  277. package/features/ai/prompts/prompt-helper.ts +31 -5
  278. package/features/ai/prompts/thursday.prompt.ts +2 -0
  279. package/features/ai/tools/bot.tool.ts +37 -18
  280. package/features/ai/tools/mcp.tool.ts +5 -5
  281. package/features/ai/tools/memory.tool.ts +17 -10
  282. package/features/ai/tools/studio.tool.ts +5 -5
  283. package/features/ai/tools/tool-name.ts +2 -0
  284. package/features/ai/tools/workspace.tool.ts +33 -5
  285. package/features/bot/bot.action.ts +31 -4
  286. package/features/bot/bot.notes.ts +120 -0
  287. package/features/bot/bot.query.ts +56 -1
  288. package/features/bot/bot.run.ts +43 -3
  289. package/features/bot/bot.runner.ts +94 -20
  290. package/features/bot/bot.schema.ts +17 -0
  291. package/features/bot/components/bot-room.tsx +405 -306
  292. package/features/bot/components/bot-setting.tsx +123 -20
  293. package/features/bot/task.query.ts +18 -5
  294. package/features/memory/components/memory-setting.tsx +11 -2
  295. package/features/memory/memory.query.ts +9 -2
  296. package/features/memory/memory.schema.ts +30 -0
  297. package/features/skills/components/skills-setting.tsx +9 -1
  298. package/features/workspace/workspace.ts +136 -3
  299. package/hooks/use-draft.ts +37 -0
  300. package/hooks/use-hotkey.ts +105 -0
  301. package/hooks/use-object-state.ts +51 -0
  302. package/hooks/use-on-visible.ts +72 -0
  303. package/hooks/use-theme.ts +106 -0
  304. package/hooks/use-wake-word.ts +262 -0
  305. package/lib/realtime/realtime.driver.ts +34 -1
  306. package/lib/realtime/realtime.protocol.ts +6 -0
  307. package/lib/sandbox.ts +9 -1
  308. package/lib/tokens.ts +19 -0
  309. package/package.json +1 -1
  310. package/.next/server/chunks/[root-of-the-server]__02kt8yn._.js +0 -10
  311. package/.next/server/chunks/[root-of-the-server]__0h59di-._.js +0 -5
  312. package/.next/server/chunks/[root-of-the-server]__0qjqtwo._.js +0 -5
  313. package/.next/server/chunks/[root-of-the-server]__0yk6s3w._.js +0 -5
  314. package/.next/server/chunks/[root-of-the-server]__0z3gelv._.js +0 -3
  315. package/.next/server/chunks/[root-of-the-server]__11w_7_3._.js +0 -3
  316. package/.next/server/chunks/[root-of-the-server]__1_0q_9w._.js +0 -3
  317. package/.next/server/chunks/[root-of-the-server]__1gmn1cs._.js +0 -10
  318. package/.next/server/chunks/_0fzqt2y._.js +0 -100
  319. package/.next/server/chunks/_0jgm3b8._.js +0 -55
  320. package/.next/server/chunks/_0ks6_sg._.js +0 -55
  321. package/.next/server/chunks/_0tzfesa._.js +0 -3
  322. package/.next/server/chunks/_0zmestz._.js +0 -55
  323. package/.next/server/chunks/_12nr4xc._.js +0 -3
  324. package/.next/server/chunks/_1hzrsvg._.js +0 -55
  325. package/.next/server/chunks/_1uj4_io._.js +0 -10
  326. package/.next/server/chunks/_1yldgo4._.js +0 -55
  327. package/.next/server/chunks/features_0scmr4i._.js +0 -3
  328. package/.next/server/chunks/features_bot_bot_query_ts_12mgkl2._.js +0 -3
  329. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0ykklj0._.js +0 -3
  330. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1ryg3wh._.js +0 -3
  331. package/.next/server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1vwbnq_._.js +0 -3
  332. package/.next/server/chunks/ssr/[root-of-the-server]__01id-v3._.js +0 -3
  333. package/.next/server/chunks/ssr/[root-of-the-server]__0b-0i32._.js +0 -3
  334. package/.next/server/chunks/ssr/[root-of-the-server]__185grso._.js +0 -3
  335. package/.next/server/chunks/ssr/[root-of-the-server]__1minz8_._.js +0 -3
  336. package/.next/server/chunks/ssr/_0j4v8of._.js +0 -3
  337. package/.next/server/chunks/ssr/_0l81bzy._.js +0 -3
  338. package/.next/server/chunks/ssr/_10uvw3l._.js +0 -3
  339. package/.next/server/chunks/ssr/_1jbv7m1._.js +0 -3
  340. package/.next/server/chunks/ssr/lib_realtime_0aetuyp._.js +0 -24
  341. package/.next/server/chunks/ssr/lib_realtime_18k_aj-._.js +0 -24
  342. package/.next/server/chunks/ssr/node_modules_zod_v4_classic_errors_05xv7vp.js +0 -3
  343. package/.next/static/chunks/0yysv1gzin17t.js +0 -1
  344. package/.next/static/chunks/1keib_gt066gc.js +0 -1
  345. package/.next/static/chunks/28g42tw8tsvhd.js +0 -1
  346. package/.next/static/chunks/2cwjgkt_hoyhj.js +0 -22
  347. package/.next/static/chunks/2rbf1fpd8n80-.js +0 -22
  348. package/.next/static/chunks/2ukj8k69y89um.js +0 -1
  349. package/.next/static/chunks/2wngeetfnzxkp.js +0 -2
  350. package/.next/static/chunks/388-t2v72jh39.css +0 -1
  351. package/.next/static/chunks/3fqvc0cg-atq_.js +0 -1
  352. package/.next/static/chunks/3p4egvfjxpatb.js +0 -1
  353. package/.next/static/chunks/3qe1w1ei-huhl.js +0 -1
  354. package/.next/static/chunks/3y40riycdip-i.js +0 -1
  355. package/.next/static/chunks/45a6zbtkelph9.js +0 -1
  356. /package/.next/static/{X34BUd9bfdH27ripuwwBm → YR4NWcDDuzwLbTTU7U7Vr}/_buildManifest.js +0 -0
  357. /package/.next/static/{X34BUd9bfdH27ripuwwBm → YR4NWcDDuzwLbTTU7U7Vr}/_clientMiddlewareManifest.js +0 -0
  358. /package/.next/static/{X34BUd9bfdH27ripuwwBm → YR4NWcDDuzwLbTTU7U7Vr}/_ssgManifest.js +0 -0
@@ -1,3 +1,3 @@
1
- module.exports=[964665,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(707963),f=a.i(168370),g=a.i(998697),h=a.i(572327),i=a.i(707938),j=a.i(483138),k=a.i(844561),l=a.i(71215),m=a.i(595775),n=a.i(649268),o=a.i(239025),p=a.i(951675),q=a.i(586446),r=a.i(572131),s=a.i(767561),t=a.i(340695),u=a.i(446181),v=a.i(950463),w=a.i(287702),x=a.i(504636),y=a.i(619477),z=a.i(369768),A=a.i(749238),B=a.i(199169),C=a.i(313237),D=a.i(759497),E=a.i(497895),F=b([z]);[z]=F.then?(await F)():F;let L={markdown:j.FileText,csv:o.Sheet,json:i.FileJson,text:j.FileText,frame:h.FileCode2,image:l.Image,audio:n.Music,video:q.Video,none:g.File};function G({entry:a,active:b,onPick:c}){let e="set"===a.kind?m.Images:L[a.view];return(0,d.jsxs)("button",{type:"button",onClick:c,title:`${a.name} \xb7 ${(0,B.shortAgo)(a.at)}`,className:(0,E.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",b?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,d.jsx)(e,{className:"size-3.5 shrink-0 opacity-70"}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.name}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/75",children:"set"===a.kind?a.count:(0,E.formatBytes)(a.bytes)})]})}function H({row:a,file:b,onOpen:c,onBack:g,onGone:h}){let[i]=(0,C.useServerAction)(A.openFileAction),[j,l]=(0,C.useServerAction)(x.deleteArtifactAction,{okMessage:"Deleted",onOk:()=>{(0,D.revalidate)(s.queryKey.artifacts),b?g():h()}}),m=b?{path:b.path,bytes:b.bytes,at:b.at}:"file"===a.kind?{path:a.path,bytes:a.bytes,at:a.at}:null,n=async a=>{await u.notify.confirm({title:`Delete ${a.split("/").pop()}?`,description:"It is deleted from disk for good.",okText:"Delete",destructive:!0})&&j(a)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-3 border-b border-border/60 px-6",children:[b&&(0,d.jsxs)("button",{type:"button",onClick:g,className:"-ml-1 flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)(e.ChevronLeft,{className:"size-3"}),a.name]}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-foreground",children:m?m.path.split("/").pop()??a.name:a.name}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:m?`${(0,E.formatBytes)(m.bytes)} \xb7 ${(0,B.shortAgo)(m.at)}`:`${a.count} ${1===a.count?"file":"files"} \xb7 ${(0,B.shortAgo)(a.at)}`}),m&&(0,d.jsx)("a",{href:s.queryKey.fileView(m.path),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,d.jsx)(f.ExternalLink,{className:"size-4"})}),(0,d.jsx)(t.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>i(m?.path??a.path),children:(0,d.jsx)(k.FolderOpen,{})}),m&&(0,d.jsx)(t.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:l,className:"text-muted-foreground",onClick:()=>n(m.path),children:(0,d.jsx)(p.Trash2,{})})]}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:m?(0,d.jsx)(z.FilePreview,{path:m.path,bytes:m.bytes}):(0,d.jsx)(I,{name:a.name,onOpen:c})})]})}function I({name:a,onOpen:b}){let{data:c,isLoading:e,error:f}=(0,D.useServerRoute)(s.queryKey.artifactSet(a,w.ARTIFACT_VIEW.setFiles));if(e)return(0,d.jsx)("div",{className:"grid grid-cols-4 gap-3 p-5",children:Array.from({length:8},(a,b)=>(0,d.jsx)(v.Skeleton,{className:"aspect-4/3 w-full rounded-xl"},b))});if(f)return(0,d.jsx)(y.SettingError,{message:f.message});let g=c?.files??[];return 0===g.length?(0,d.jsx)("p",{className:"p-5 text-xs text-muted-foreground/60",children:"Nothing in here the app can open."}):(0,d.jsxs)("div",{className:"p-5",children:[(0,d.jsx)("div",{className:"grid grid-cols-4 gap-3",children:g.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>b(a),title:`${a.name} \xb7 ${(0,E.formatBytes)(a.bytes)}`,className:"flex flex-col gap-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-2",children:[(0,d.jsx)(J,{file:a}),(0,d.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:a.name})]},a.path))}),c&&c.total>g.length&&(0,d.jsx)("p",{className:"pt-4 font-mono text-[11px] text-muted-foreground/60",children:`${g.length} of ${c.total.toLocaleString("en")} — the rest are in the folder`})]})}function J({file:a}){if("image"===a.view&&a.bytes<=w.WORKSPACE_VIEW.elementMax)return(0,d.jsx)("img",{src:s.queryKey.file(a.path),alt:a.name,loading:"lazy",decoding:"async",className:"aspect-4/3 w-full rounded-xl object-cover"});let b=L[a.view];return(0,d.jsx)("span",{className:"grid aspect-4/3 w-full place-items-center rounded-xl bg-muted/40 text-muted-foreground",children:(0,d.jsx)(b,{className:"size-5"})})}function K({empty:a,onReveal:b}){return(0,d.jsxs)("div",{className:"space-y-4 p-8",children:[(0,d.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:a?"Nothing finished yet. When a bot ends a job with something to hand over — a page, a report, a set of pictures — it lands here.":"Pick something on the left. A folder a bot filled is one row, and opens as a sheet."}),(0,d.jsxs)(t.Button,{variant:"outline",onClick:b,children:[(0,d.jsx)(k.FolderOpen,{}),"Reveal folder"]})]})}a.s(["ArtifactSetting",0,function(){let[a,b]=(0,r.useState)(null),[c,e]=(0,r.useState)(""),[f,g]=(0,r.useState)(w.ARTIFACT_VIEW.rows),{data:h,isLoading:i,error:j}=(0,D.useServerRoute)(s.queryKey.artifactShelf(f),{keepPreviousData:!0}),[l]=(0,C.useServerAction)(A.openFileAction);if(i)return(0,d.jsx)(y.SettingPanesSkeleton,{});if(j)return(0,d.jsx)(y.SettingError,{message:j.message});let m=h?.entries??[],n=h?.total??0,o=c.trim().toLowerCase(),p=o?m.filter(a=>a.name.toLowerCase().includes(o)):m,q=m.find(b=>b.path===a?.row.path)??a?.row;return(0,d.jsx)(y.SettingPanes,{footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y.SettingRailNote,{children:(0,d.jsxs)("span",{className:"font-mono",children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:"artifacts"}),` \xb7 ${function(a,b,c){if(0===b)return"empty";let d=b>a.length?`${a.length} of ${b.toLocaleString("en")} artifacts`:`${b} ${1===b?"artifact":"artifacts"}`;return c>b?`${d} \xb7 ${c.toLocaleString("en")} files`:d}(m,n,h?.files??0)}`]})}),(0,d.jsxs)(t.Button,{variant:"outline",size:"sm",onClick:()=>l("artifacts"),children:[(0,d.jsx)(k.FolderOpen,{}),"Reveal folder"]})]}),left:(0,d.jsxs)("div",{className:"flex flex-col py-2",children:[(0,d.jsx)(y.SettingFilter,{value:c,onChange:e,placeholder:"Filter artifacts",className:"mx-2 mb-1.5 w-auto"}),0===p.length?(0,d.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground/60",children:o?"Nothing matches":"Nothing here yet"}):p.map(a=>(0,d.jsx)(G,{entry:a,active:a.path===q?.path,onPick:()=>b({row:a,file:null})},a.path)),n>m.length&&(0,d.jsx)("button",{type:"button",onClick:()=>g(f+w.ARTIFACT_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(w.ARTIFACT_VIEW.rows,n-m.length)} more of ${n.toLocaleString("en")}`})]}),right:q?(0,d.jsx)(H,{row:q,file:a?.file??null,onOpen:a=>b({row:q,file:a}),onBack:()=>b({row:q,file:null}),onGone:()=>b(null)},q.path):(0,d.jsx)(K,{empty:0===n,onReveal:()=>l("artifacts")})})}]),c()}catch(a){c(a)}},!1),504636,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f3f437b7e31640c30158a87a505166dd8cf350e75",b.callServer,void 0,b.findSourceMapURL,"deleteArtifactAction");a.s(["deleteArtifactAction",0,c])},572327,a=>{"use strict";var b=a.i(164831);let c={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};c.node;let d=(0,b.default)(c);a.s(["FileCode2",0,d],572327)},595775,a=>{"use strict";var b=a.i(164831);let c={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};c.node;let d=(0,b.default)(c);a.s(["Images",0,d],595775)},649268,a=>{"use strict";var b=a.i(164831);let c={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};c.node;let d=(0,b.default)(c);a.s(["Music",0,d],649268)},239025,a=>{"use strict";var b=a.i(164831);let c={name:"sheet",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]};c.node;let d=(0,b.default)(c);a.s(["Sheet",0,d],239025)},951675,a=>{"use strict";var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.default)(c);a.s(["Trash2",0,d],951675)},586446,a=>{"use strict";var b=a.i(164831);let c={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};c.node;let d=(0,b.default)(c);a.s(["Video",0,d],586446)}];
1
+ module.exports=[964665,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(707963),f=a.i(168370),g=a.i(998697),h=a.i(572327),i=a.i(707938),j=a.i(483138),k=a.i(844561),l=a.i(71215),m=a.i(595775),n=a.i(649268),o=a.i(239025),p=a.i(951675),q=a.i(586446),r=a.i(572131),s=a.i(767561),t=a.i(340695),u=a.i(446181),v=a.i(950463),w=a.i(287702),x=a.i(938349),y=a.i(619477),z=a.i(369768),A=a.i(664510),B=a.i(199169),C=a.i(313237),D=a.i(759497),E=a.i(497895),F=b([z]);[z]=F.then?(await F)():F;let L={markdown:j.FileText,csv:o.Sheet,json:i.FileJson,text:j.FileText,frame:h.FileCode2,image:l.Image,audio:n.Music,video:q.Video,none:g.File};function G({entry:a,active:b,onPick:c}){let e="set"===a.kind?m.Images:L[a.view];return(0,d.jsxs)("button",{type:"button",onClick:c,title:`${a.name} \xb7 ${(0,B.shortAgo)(a.at)}`,className:(0,E.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",b?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,d.jsx)(e,{className:"size-3.5 shrink-0 opacity-70"}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.name}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/75",children:"set"===a.kind?a.count:(0,E.formatBytes)(a.bytes)})]})}function H({row:a,file:b,onOpen:c,onBack:g,onGone:h}){let[i]=(0,C.useServerAction)(A.openFileAction),[j,l]=(0,C.useServerAction)(x.deleteArtifactAction,{okMessage:"Deleted",onOk:()=>{(0,D.revalidate)(s.queryKey.artifacts),b?g():h()}}),m=b?{path:b.path,bytes:b.bytes,at:b.at}:"file"===a.kind?{path:a.path,bytes:a.bytes,at:a.at}:null,n=async a=>{await u.notify.confirm({title:`Delete ${a.split("/").pop()}?`,description:"It is deleted from disk for good.",okText:"Delete",destructive:!0})&&j(a)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-3 border-b border-border/60 px-6",children:[b&&(0,d.jsxs)("button",{type:"button",onClick:g,className:"-ml-1 flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,d.jsx)(e.ChevronLeft,{className:"size-3"}),a.name]}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-foreground",children:m?m.path.split("/").pop()??a.name:a.name}),(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:m?`${(0,E.formatBytes)(m.bytes)} \xb7 ${(0,B.shortAgo)(m.at)}`:`${a.count} ${1===a.count?"file":"files"} \xb7 ${(0,B.shortAgo)(a.at)}`}),m&&(0,d.jsx)("a",{href:s.queryKey.fileView(m.path),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,d.jsx)(f.ExternalLink,{className:"size-4"})}),(0,d.jsx)(t.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>i(m?.path??a.path),children:(0,d.jsx)(k.FolderOpen,{})}),m&&(0,d.jsx)(t.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:l,className:"text-muted-foreground",onClick:()=>n(m.path),children:(0,d.jsx)(p.Trash2,{})})]}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:m?(0,d.jsx)(z.FilePreview,{path:m.path,bytes:m.bytes}):(0,d.jsx)(I,{name:a.name,onOpen:c})})]})}function I({name:a,onOpen:b}){let{data:c,isLoading:e,error:f}=(0,D.useServerRoute)(s.queryKey.artifactSet(a,w.ARTIFACT_VIEW.setFiles));if(e)return(0,d.jsx)("div",{className:"grid grid-cols-4 gap-3 p-5",children:Array.from({length:8},(a,b)=>(0,d.jsx)(v.Skeleton,{className:"aspect-4/3 w-full rounded-xl"},b))});if(f)return(0,d.jsx)(y.SettingError,{message:f.message});let g=c?.files??[];return 0===g.length?(0,d.jsx)("p",{className:"p-5 text-xs text-muted-foreground/60",children:"Nothing in here the app can open."}):(0,d.jsxs)("div",{className:"p-5",children:[(0,d.jsx)("div",{className:"grid grid-cols-4 gap-3",children:g.map(a=>(0,d.jsxs)("button",{type:"button",onClick:()=>b(a),title:`${a.name} \xb7 ${(0,E.formatBytes)(a.bytes)}`,className:"flex flex-col gap-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-2",children:[(0,d.jsx)(J,{file:a}),(0,d.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:a.name})]},a.path))}),c&&c.total>g.length&&(0,d.jsx)("p",{className:"pt-4 font-mono text-[11px] text-muted-foreground/60",children:`${g.length} of ${c.total.toLocaleString("en")} — the rest are in the folder`})]})}function J({file:a}){if("image"===a.view&&a.bytes<=w.WORKSPACE_VIEW.elementMax)return(0,d.jsx)("img",{src:s.queryKey.file(a.path),alt:a.name,loading:"lazy",decoding:"async",className:"aspect-4/3 w-full rounded-xl object-cover"});let b=L[a.view];return(0,d.jsx)("span",{className:"grid aspect-4/3 w-full place-items-center rounded-xl bg-muted/40 text-muted-foreground",children:(0,d.jsx)(b,{className:"size-5"})})}function K({empty:a,onReveal:b}){return(0,d.jsxs)("div",{className:"space-y-4 p-8",children:[(0,d.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:a?"Nothing finished yet. When a bot ends a job with something to hand over — a page, a report, a set of pictures — it lands here.":"Pick something on the left. A folder a bot filled is one row, and opens as a sheet."}),(0,d.jsxs)(t.Button,{variant:"outline",onClick:b,children:[(0,d.jsx)(k.FolderOpen,{}),"Reveal folder"]})]})}a.s(["ArtifactSetting",0,function(){let[a,b]=(0,r.useState)(null),[c,e]=(0,r.useState)(""),[f,g]=(0,r.useState)(w.ARTIFACT_VIEW.rows),{data:h,isLoading:i,error:j}=(0,D.useServerRoute)(s.queryKey.artifactShelf(f),{keepPreviousData:!0}),[l]=(0,C.useServerAction)(A.openFileAction);if(i)return(0,d.jsx)(y.SettingPanesSkeleton,{});if(j)return(0,d.jsx)(y.SettingError,{message:j.message});let m=h?.entries??[],n=h?.total??0,o=c.trim().toLowerCase(),p=o?m.filter(a=>a.name.toLowerCase().includes(o)):m,q=m.find(b=>b.path===a?.row.path)??a?.row;return(0,d.jsx)(y.SettingPanes,{footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(y.SettingRailNote,{children:(0,d.jsxs)("span",{className:"font-mono",children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:"artifacts"}),` \xb7 ${function(a,b,c){if(0===b)return"empty";let d=b>a.length?`${a.length} of ${b.toLocaleString("en")} artifacts`:`${b} ${1===b?"artifact":"artifacts"}`;return c>b?`${d} \xb7 ${c.toLocaleString("en")} files`:d}(m,n,h?.files??0)}`]})}),(0,d.jsxs)(t.Button,{variant:"outline",size:"sm",onClick:()=>l("artifacts"),children:[(0,d.jsx)(k.FolderOpen,{}),"Reveal folder"]})]}),left:(0,d.jsxs)("div",{className:"flex flex-col py-2",children:[(0,d.jsx)(y.SettingFilter,{value:c,onChange:e,placeholder:"Filter artifacts",className:"mx-2 mb-1.5 w-auto"}),0===p.length?(0,d.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground/60",children:o?"Nothing matches":"Nothing here yet"}):p.map(a=>(0,d.jsx)(G,{entry:a,active:a.path===q?.path,onPick:()=>b({row:a,file:null})},a.path)),n>m.length&&(0,d.jsx)("button",{type:"button",onClick:()=>g(f+w.ARTIFACT_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(w.ARTIFACT_VIEW.rows,n-m.length)} more of ${n.toLocaleString("en")}`})]}),right:q?(0,d.jsx)(H,{row:q,file:a?.file??null,onOpen:a=>b({row:q,file:a}),onBack:()=>b({row:q,file:null}),onGone:()=>b(null)},q.path):(0,d.jsx)(K,{empty:0===n,onReveal:()=>l("artifacts")})})}]),c()}catch(a){c(a)}},!1),938349,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fce3f493e6c36ed983cc6adcb44ebe36f59ca1837",b.callServer,void 0,b.findSourceMapURL,"deleteArtifactAction");a.s(["deleteArtifactAction",0,c])},572327,a=>{"use strict";var b=a.i(164831);let c={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};c.node;let d=(0,b.default)(c);a.s(["FileCode2",0,d],572327)},595775,a=>{"use strict";var b=a.i(164831);let c={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};c.node;let d=(0,b.default)(c);a.s(["Images",0,d],595775)},649268,a=>{"use strict";var b=a.i(164831);let c={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};c.node;let d=(0,b.default)(c);a.s(["Music",0,d],649268)},239025,a=>{"use strict";var b=a.i(164831);let c={name:"sheet",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]};c.node;let d=(0,b.default)(c);a.s(["Sheet",0,d],239025)},951675,a=>{"use strict";var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.default)(c);a.s(["Trash2",0,d],951675)},586446,a=>{"use strict";var b=a.i(164831);let c={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};c.node;let d=(0,b.default)(c);a.s(["Video",0,d],586446)}];
2
2
 
3
- //# sourceMappingURL=_0lc_7c8._.js.map
3
+ //# sourceMappingURL=_09ja_w1._.js.map
@@ -1,3 +1,3 @@
1
- module.exports=[588237,a=>{"use strict";var b=a.i(187924),c=a.i(497895);a.s(["Table",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,c.cn)("w-full caption-bottom text-sm",a),...d})})},"TableBody",0,function({className:a,...d}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,c.cn)("[&_tr:last-child]:border-0",a),...d})},"TableCell",0,function({className:a,...d}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,c.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",a),...d})},"TableHead",0,function({className:a,...d}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,c.cn)("h-9 px-2 text-left align-middle font-mono text-[11px] font-normal tracking-[0.1em] whitespace-nowrap text-muted-foreground uppercase [&:has([role=checkbox])]:pr-0",a),...d})},"TableHeader",0,function({className:a,...d}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,c.cn)("[&_tr]:border-b",a),...d})},"TableRow",0,function({className:a,...d}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,c.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",a),...d})}])},369768,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(767561),g=a.i(340695),h=a.i(965733),i=a.i(846991),j=a.i(950463),k=a.i(588237),l=a.i(287702),m=a.i(559553),n=a.i(749238),o=a.i(313237),p=a.i(497895),q=b([i]);[i]=q.then?(await q)():q;let A=new Set(["frame","image","audio","video"]);function r(a){let b=(0,m.workspaceRelative)(a);if(!b)return{how:"os"};let c=(0,m.viewKindOf)(b);return A.has(c)?{how:"tab",path:b,href:f.queryKey.fileView(b)}:"none"===c?{how:"os"}:{how:"dialog",path:b}}let B=(0,e.createContext)(null),C={dialog:{prose:"px-5 py-4",block:"px-4 py-3"},page:{prose:"px-5 py-6 sm:px-8",block:"px-5 py-5"}};function s({kind:a,content:b,truncated:c,where:e="dialog"}){return(0,d.jsxs)(d.Fragment,{children:[null!=c&&(0,d.jsx)(t,{of:c}),(0,d.jsx)(u,{kind:a,content:b,where:e})]})}function t({of:a}){return(0,d.jsxs)("p",{className:"border-b border-border/60 px-5 py-2.5 font-mono text-[11px] text-muted-foreground",children:[`Showing the first ${(0,p.formatBytes)(l.WORKSPACE_VIEW.textMax)} of ${(0,p.formatBytes)(a)}. `,"Open the file itself for the rest."]})}function u({kind:a,content:b,where:c}){let e=C[c];switch(a){case"markdown":return(0,d.jsx)("div",{className:(0,p.cn)("min-w-0 text-sm leading-relaxed",e.prose),children:(0,d.jsx)(i.Markdown,{children:b})});case"csv":return(0,d.jsx)(z,{content:b,className:e.block});case"json":return(0,d.jsx)(y,{text:function(a){try{return JSON.stringify(JSON.parse(a),null,2)}catch{return a}}(b),className:e.block});default:return(0,d.jsx)(y,{text:b,className:e.block})}}function v(a){let[b,c]=(0,e.useState)(null),[d,g]=(0,e.useState)(null),[h,i]=(0,e.useState)(null);return(0,e.useEffect)(()=>{if(!a)return;c(null),g(null),i(null);let b=!1;return fetch(f.queryKey.file(a),{headers:{range:`bytes=0-${l.WORKSPACE_VIEW.textMax-1}`}}).then(async a=>{if(!a.ok)throw Error(await a.text());return{text:await a.text(),of:function(a){let b=a.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!b)return null;let[,c,d]=b.map(Number);return c+1<d?d:null}(a)}}).then(({text:a,of:d})=>{if(b)return;let e=null===d?a:a.slice(0,a.lastIndexOf("\n")+1||void 0);c(e),i(d)}).catch(a=>!b&&g((0,p.errorToString)(a))),()=>{b=!0}},[a]),{content:b,failure:d,truncated:h}}function w({path:a,bytes:b}){let[c,e]=(0,o.useServerAction)(n.openFileAction);return(0,d.jsxs)("div",{className:"space-y-4 p-8",children:[(0,d.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,p.formatBytes)(b)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,d.jsx)(g.Button,{variant:"outline",loading:e,onClick:()=>c(a),children:"Reveal in the file manager"})]})}function x({path:a,kind:b,onClose:c}){let{content:e,failure:f,truncated:g}=v(a),i=a?.split("/").pop()??"";return(0,d.jsx)(h.Dialog,{open:null!==a,onOpenChange:a=>!a&&c(),children:(0,d.jsxs)(h.DialogContent,{className:"flex max-h-[calc(100vh-3rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl",children:[(0,d.jsx)(h.DialogTitle,{className:"sr-only",children:i}),(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-2 border-b border-border/60 px-4 py-2.5 pr-12",children:(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:a})}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:f?(0,d.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:f}):null===e?(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(j.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-5/6"})]}):(0,d.jsx)(s,{kind:b,content:e,truncated:g})})]})})}function y({text:a,className:b}){return(0,d.jsx)("pre",{className:(0,p.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",b),children:a})}function z({content:a,className:b}){let[c,...f]=(0,e.useMemo)(()=>(function(a){let b=[],c=[],d="",e=!1;for(let f=0;f<a.length;f++){let g=a[f];e?'"'===g&&'"'===a[f+1]?(d+='"',f++):'"'===g?e=!1:d+=g:'"'===g?e=!0:","===g?(c.push(d),d=""):"\n"===g||"\r"===g?("\r"===g&&"\n"===a[f+1]&&f++,c.push(d),b.push(c),c=[],d=""):d+=g}return(d.length||c.length)&&(c.push(d),b.push(c)),b.filter(a=>a.some(a=>a.trim()))})(a),[a]);return c?(0,d.jsx)("div",{className:(0,p.cn)("overflow-x-auto",b),children:(0,d.jsxs)(k.Table,{children:[(0,d.jsx)(k.TableHeader,{children:(0,d.jsx)(k.TableRow,{children:c.map((a,b)=>(0,d.jsx)(k.TableHead,{className:"whitespace-nowrap",children:a},`${b}-${a}`))})}),(0,d.jsx)(k.TableBody,{children:f.map((a,b)=>(0,d.jsx)(k.TableRow,{children:c.map((c,e)=>(0,d.jsx)(k.TableCell,{className:"whitespace-nowrap",children:a[e]??""},`${b}-${e}`))},`${b}-${a[0]??""}`))})]})}):(0,d.jsx)(y,{text:a,className:b})}a.s(["FileBody",0,s,"FileDialog",0,x,"FileLink",0,function({path:a,className:b,title:c,label:g,children:h}){let i=r(a),j=(0,e.useContext)(B),[k,l]=(0,o.useServerAction)(n.openFileAction);return"tab"===i.how?(0,d.jsx)("a",{href:i.href,target:"_blank",rel:"noreferrer",title:c??a,"aria-label":g,className:b,children:h}):(0,d.jsx)("button",{type:"button",disabled:l,title:c??a,"aria-label":g,className:b,onClick:()=>{"dialog"===i.how?j?j(i.path):window.open(f.queryKey.fileView(i.path),"_blank"):k(a)},children:h})},"FilePreview",0,function({path:a,bytes:b}){let c=(0,m.viewKindOf)(a),{content:e,failure:g,truncated:h}=v(A.has(c)?null:a);return("frame"===c||"image"===c)&&b>l.WORKSPACE_VIEW.elementMax?(0,d.jsx)(w,{path:a,bytes:b}):"frame"===c?(0,d.jsx)("iframe",{title:a,src:f.queryKey.file(a),allow:"clipboard-read; clipboard-write; fullscreen; autoplay",className:"h-full w-full bg-white"}):"image"===c?(0,d.jsx)("img",{src:f.queryKey.file(a),alt:a,className:"mx-auto max-w-full p-6"}):"audio"===c||"video"===c?"audio"===c?(0,d.jsx)("audio",{controls:!0,src:f.queryKey.file(a),className:"w-full p-6",children:(0,d.jsx)("track",{kind:"captions"})}):(0,d.jsx)("video",{controls:!0,src:f.queryKey.file(a),className:"max-w-full p-6",children:(0,d.jsx)("track",{kind:"captions"})}):g?(0,d.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:g}):null===e?(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(j.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-5/6"})]}):(0,d.jsx)(s,{kind:c,content:e,truncated:h})},"FileViewer",0,function({children:a}){let[b,c]=(0,e.useState)(null);return(0,d.jsxs)(B,{value:c,children:[a,(0,d.jsx)(x,{path:b,kind:b?(0,m.viewKindOf)(b):"text",onClose:()=>c(null)})]})},"fileTarget",0,r,"useFileText",0,v,"useOpenFile",0,function(){let a=(0,e.useContext)(B);return(0,e.useCallback)(b=>{let c=r(b);if("os"===c.how)return!1;if("dialog"===c.how&&a)return a(c.path),!0;let d="tab"===c.how?c.href:f.queryKey.fileView(c.path);return null!==window.open(d,"_blank")},[a])}]),c()}catch(a){c(a)}},!1),749238,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fc46134dc257ffb46e56975909bec673945ad7151",b.callServer,void 0,b.findSourceMapURL,"openFileAction");a.s(["openFileAction",0,c])},559553,a=>{"use strict";var b=a.i(287702);let c=a=>`text/${a}; charset=utf-8`,d={md:{kind:"markdown",mime:c("markdown")},markdown:{kind:"markdown",mime:c("markdown")},csv:{kind:"csv",mime:c("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:c("plain")},log:{kind:"text",mime:c("plain")},html:{kind:"frame",mime:c("html")},htm:{kind:"frame",mime:c("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},css:{kind:"none",mime:c("css")},js:{kind:"none",mime:c("javascript")},woff2:{kind:"none",mime:"font/woff2"}},e=Object.entries(d).filter(([,a])=>"none"!==a.kind).map(([a])=>a),f=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${e.join("|")})\b`,"giu"),g=`${b.PATHS.workspace}/`;function h(a){let b=a.trim(),c=b.indexOf(g);return c>=0?b.slice(c+g.length)||null:b.startsWith("/")||/^[A-Za-z]:/.test(b)||b.split("/").includes("..")?null:b||null}a.s(["pathsIn",0,function(a){let b=a.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),c=new Set;for(let a of b.match(f)??[]){let b=function(a){let b=h(a);if(!b)return null;let[c,...d]=b.split("/");return d.length&&c.includes(".")?null:b}(a);b&&c.add(b)}return[...c].slice(0,6)},"viewKindOf",0,a=>d[a.split(".").pop()?.toLowerCase()??""]?.kind??"none","workspaceRelative",0,h])}];
1
+ module.exports=[588237,a=>{"use strict";var b=a.i(187924),c=a.i(497895);a.s(["Table",0,function({className:a,...d}){return(0,b.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,b.jsx)("table",{"data-slot":"table",className:(0,c.cn)("w-full caption-bottom text-sm",a),...d})})},"TableBody",0,function({className:a,...d}){return(0,b.jsx)("tbody",{"data-slot":"table-body",className:(0,c.cn)("[&_tr:last-child]:border-0",a),...d})},"TableCell",0,function({className:a,...d}){return(0,b.jsx)("td",{"data-slot":"table-cell",className:(0,c.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",a),...d})},"TableHead",0,function({className:a,...d}){return(0,b.jsx)("th",{"data-slot":"table-head",className:(0,c.cn)("h-9 px-2 text-left align-middle font-mono text-[11px] font-normal tracking-[0.1em] whitespace-nowrap text-muted-foreground uppercase [&:has([role=checkbox])]:pr-0",a),...d})},"TableHeader",0,function({className:a,...d}){return(0,b.jsx)("thead",{"data-slot":"table-header",className:(0,c.cn)("[&_tr]:border-b",a),...d})},"TableRow",0,function({className:a,...d}){return(0,b.jsx)("tr",{"data-slot":"table-row",className:(0,c.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",a),...d})}])},369768,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(572131),f=a.i(767561),g=a.i(340695),h=a.i(965733),i=a.i(846991),j=a.i(950463),k=a.i(588237),l=a.i(287702),m=a.i(559553),n=a.i(664510),o=a.i(313237),p=a.i(497895),q=b([i]);[i]=q.then?(await q)():q;let A=new Set(["frame","image","audio","video"]);function r(a){let b=(0,m.workspaceRelative)(a);if(!b)return{how:"os"};let c=(0,m.viewKindOf)(b);return A.has(c)?{how:"tab",path:b,href:f.queryKey.fileView(b)}:"none"===c?{how:"os"}:{how:"dialog",path:b}}let B=(0,e.createContext)(null),C={dialog:{prose:"px-5 py-4",block:"px-4 py-3"},page:{prose:"px-5 py-6 sm:px-8",block:"px-5 py-5"}};function s({kind:a,content:b,truncated:c,where:e="dialog"}){return(0,d.jsxs)(d.Fragment,{children:[null!=c&&(0,d.jsx)(t,{of:c}),(0,d.jsx)(u,{kind:a,content:b,where:e})]})}function t({of:a}){return(0,d.jsxs)("p",{className:"border-b border-border/60 px-5 py-2.5 font-mono text-[11px] text-muted-foreground",children:[`Showing the first ${(0,p.formatBytes)(l.WORKSPACE_VIEW.textMax)} of ${(0,p.formatBytes)(a)}. `,"Open the file itself for the rest."]})}function u({kind:a,content:b,where:c}){let e=C[c];switch(a){case"markdown":return(0,d.jsx)("div",{className:(0,p.cn)("min-w-0 text-sm leading-relaxed",e.prose),children:(0,d.jsx)(i.Markdown,{children:b})});case"csv":return(0,d.jsx)(z,{content:b,className:e.block});case"json":return(0,d.jsx)(y,{text:function(a){try{return JSON.stringify(JSON.parse(a),null,2)}catch{return a}}(b),className:e.block});default:return(0,d.jsx)(y,{text:b,className:e.block})}}function v(a){let[b,c]=(0,e.useState)(null),[d,g]=(0,e.useState)(null),[h,i]=(0,e.useState)(null);return(0,e.useEffect)(()=>{if(!a)return;c(null),g(null),i(null);let b=!1;return fetch(f.queryKey.file(a),{headers:{range:`bytes=0-${l.WORKSPACE_VIEW.textMax-1}`}}).then(async a=>{if(!a.ok)throw Error(await a.text());return{text:await a.text(),of:function(a){let b=a.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!b)return null;let[,c,d]=b.map(Number);return c+1<d?d:null}(a)}}).then(({text:a,of:d})=>{if(b)return;let e=null===d?a:a.slice(0,a.lastIndexOf("\n")+1||void 0);c(e),i(d)}).catch(a=>!b&&g((0,p.errorToString)(a))),()=>{b=!0}},[a]),{content:b,failure:d,truncated:h}}function w({path:a,bytes:b}){let[c,e]=(0,o.useServerAction)(n.openFileAction);return(0,d.jsxs)("div",{className:"space-y-4 p-8",children:[(0,d.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,p.formatBytes)(b)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,d.jsx)(g.Button,{variant:"outline",loading:e,onClick:()=>c(a),children:"Reveal in the file manager"})]})}function x({path:a,kind:b,onClose:c}){let{content:e,failure:f,truncated:g}=v(a),i=a?.split("/").pop()??"";return(0,d.jsx)(h.Dialog,{open:null!==a,onOpenChange:a=>!a&&c(),children:(0,d.jsxs)(h.DialogContent,{className:"flex max-h-[calc(100vh-3rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl",children:[(0,d.jsx)(h.DialogTitle,{className:"sr-only",children:i}),(0,d.jsx)("div",{className:"flex shrink-0 items-center gap-2 border-b border-border/60 px-4 py-2.5 pr-12",children:(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:a})}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:f?(0,d.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:f}):null===e?(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(j.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-5/6"})]}):(0,d.jsx)(s,{kind:b,content:e,truncated:g})})]})})}function y({text:a,className:b}){return(0,d.jsx)("pre",{className:(0,p.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",b),children:a})}function z({content:a,className:b}){let[c,...f]=(0,e.useMemo)(()=>(function(a){let b=[],c=[],d="",e=!1;for(let f=0;f<a.length;f++){let g=a[f];e?'"'===g&&'"'===a[f+1]?(d+='"',f++):'"'===g?e=!1:d+=g:'"'===g?e=!0:","===g?(c.push(d),d=""):"\n"===g||"\r"===g?("\r"===g&&"\n"===a[f+1]&&f++,c.push(d),b.push(c),c=[],d=""):d+=g}return(d.length||c.length)&&(c.push(d),b.push(c)),b.filter(a=>a.some(a=>a.trim()))})(a),[a]);return c?(0,d.jsx)("div",{className:(0,p.cn)("overflow-x-auto",b),children:(0,d.jsxs)(k.Table,{children:[(0,d.jsx)(k.TableHeader,{children:(0,d.jsx)(k.TableRow,{children:c.map((a,b)=>(0,d.jsx)(k.TableHead,{className:"whitespace-nowrap",children:a},`${b}-${a}`))})}),(0,d.jsx)(k.TableBody,{children:f.map((a,b)=>(0,d.jsx)(k.TableRow,{children:c.map((c,e)=>(0,d.jsx)(k.TableCell,{className:"whitespace-nowrap",children:a[e]??""},`${b}-${e}`))},`${b}-${a[0]??""}`))})]})}):(0,d.jsx)(y,{text:a,className:b})}a.s(["FileBody",0,s,"FileDialog",0,x,"FileLink",0,function({path:a,className:b,title:c,label:g,children:h}){let i=r(a),j=(0,e.useContext)(B),[k,l]=(0,o.useServerAction)(n.openFileAction);return"tab"===i.how?(0,d.jsx)("a",{href:i.href,target:"_blank",rel:"noreferrer",title:c??a,"aria-label":g,className:b,children:h}):(0,d.jsx)("button",{type:"button",disabled:l,title:c??a,"aria-label":g,className:b,onClick:()=>{"dialog"===i.how?j?j(i.path):window.open(f.queryKey.fileView(i.path),"_blank"):k(a)},children:h})},"FilePreview",0,function({path:a,bytes:b}){let c=(0,m.viewKindOf)(a),{content:e,failure:g,truncated:h}=v(A.has(c)?null:a);return("frame"===c||"image"===c)&&b>l.WORKSPACE_VIEW.elementMax?(0,d.jsx)(w,{path:a,bytes:b}):"frame"===c?(0,d.jsx)("iframe",{title:a,src:f.queryKey.file(a),allow:"clipboard-read; clipboard-write; fullscreen; autoplay",className:"h-full w-full bg-white"}):"image"===c?(0,d.jsx)("img",{src:f.queryKey.file(a),alt:a,className:"mx-auto max-w-full p-6"}):"audio"===c||"video"===c?"audio"===c?(0,d.jsx)("audio",{controls:!0,src:f.queryKey.file(a),className:"w-full p-6",children:(0,d.jsx)("track",{kind:"captions"})}):(0,d.jsx)("video",{controls:!0,src:f.queryKey.file(a),className:"max-w-full p-6",children:(0,d.jsx)("track",{kind:"captions"})}):g?(0,d.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:g}):null===e?(0,d.jsxs)("div",{className:"space-y-3 p-5",children:[(0,d.jsx)(j.Skeleton,{className:"h-5 w-2/3"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-full"}),(0,d.jsx)(j.Skeleton,{className:"h-4 w-5/6"})]}):(0,d.jsx)(s,{kind:c,content:e,truncated:h})},"FileViewer",0,function({children:a}){let[b,c]=(0,e.useState)(null);return(0,d.jsxs)(B,{value:c,children:[a,(0,d.jsx)(x,{path:b,kind:b?(0,m.viewKindOf)(b):"text",onClose:()=>c(null)})]})},"fileTarget",0,r,"useFileText",0,v,"useOpenFile",0,function(){let a=(0,e.useContext)(B);return(0,e.useCallback)(b=>{let c=r(b);if("os"===c.how)return!1;if("dialog"===c.how&&a)return a(c.path),!0;let d="tab"===c.how?c.href:f.queryKey.fileView(c.path);return null!==window.open(d,"_blank")},[a])}]),c()}catch(a){c(a)}},!1),664510,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7fe8b3afbc975a1ad4e4d7f319af758baa5a9d2c2c",b.callServer,void 0,b.findSourceMapURL,"openFileAction");a.s(["openFileAction",0,c])},559553,a=>{"use strict";var b=a.i(287702);let c=a=>`text/${a}; charset=utf-8`,d={md:{kind:"markdown",mime:c("markdown")},markdown:{kind:"markdown",mime:c("markdown")},csv:{kind:"csv",mime:c("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:c("plain")},log:{kind:"text",mime:c("plain")},html:{kind:"frame",mime:c("html")},htm:{kind:"frame",mime:c("html")},pdf:{kind:"frame",mime:"application/pdf"},png:{kind:"image",mime:"image/png"},jpg:{kind:"image",mime:"image/jpeg"},jpeg:{kind:"image",mime:"image/jpeg"},gif:{kind:"image",mime:"image/gif"},webp:{kind:"image",mime:"image/webp"},svg:{kind:"image",mime:"image/svg+xml"},mp3:{kind:"audio",mime:"audio/mpeg"},wav:{kind:"audio",mime:"audio/wav"},mp4:{kind:"video",mime:"video/mp4"},webm:{kind:"video",mime:"video/webm"},css:{kind:"none",mime:c("css")},js:{kind:"none",mime:c("javascript")},woff2:{kind:"none",mime:"font/woff2"}},e=Object.entries(d).filter(([,a])=>"none"!==a.kind).map(([a])=>a),f=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${e.join("|")})\b`,"giu"),g=`${b.PATHS.workspace}/`;function h(a){let b=a.trim(),c=b.indexOf(g);return c>=0?b.slice(c+g.length)||null:b.startsWith("/")||/^[A-Za-z]:/.test(b)||b.split("/").includes("..")?null:b||null}a.s(["pathsIn",0,function(a){let b=a.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),c=new Set;for(let a of b.match(f)??[]){let b=function(a){let b=h(a);if(!b)return null;let[c,...d]=b.split("/");return d.length&&c.includes(".")?null:b}(a);b&&c.add(b)}return[...c].slice(0,6)},"viewKindOf",0,a=>d[a.split(".").pop()?.toLowerCase()??""]?.kind??"none","workspaceRelative",0,h])}];
2
2
 
3
- //# sourceMappingURL=_1dcxzqe._.js.map
3
+ //# sourceMappingURL=_0f_b_9s._.js.map