thursday-agent 0.10.0 → 0.11.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 (293) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/app-path-routes-manifest.json +0 -1
  3. package/.next/build-manifest.json +3 -3
  4. package/.next/prerender-manifest.json +3 -3
  5. package/.next/routes-manifest.json +0 -6
  6. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  7. package/.next/server/app/_global-error.html +1 -1
  8. package/.next/server/app/_global-error.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  10. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  11. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  12. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  13. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  14. package/.next/server/app/_not-found.html +1 -1
  15. package/.next/server/app/_not-found.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  17. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  18. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  19. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  24. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  25. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  26. package/.next/server/app/api/config/route.js.nft.json +1 -1
  27. package/.next/server/app/api/events/route.js.nft.json +1 -1
  28. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  29. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  30. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  31. package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
  32. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  33. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  34. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  35. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  36. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  37. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  38. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  39. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  40. package/.next/server/app/api/reach/route.js +13 -13
  41. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  42. package/.next/server/app/api/routine/route.js.nft.json +1 -1
  43. package/.next/server/app/api/signins/route.js +1 -1
  44. package/.next/server/app/api/signins/route.js.nft.json +1 -1
  45. package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
  46. package/.next/server/app/api/skills/route.js.nft.json +1 -1
  47. package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
  48. package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
  49. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  50. package/.next/server/app/api/thursday/tool-call/route.js +14 -15
  51. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  52. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  53. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  54. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  55. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  56. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  57. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  58. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  59. package/.next/server/app/page/server-reference-manifest.json +56 -56
  60. package/.next/server/app/page.js +4 -4
  61. package/.next/server/app/page.js.nft.json +1 -1
  62. package/.next/server/app/page_client-reference-manifest.js +1 -1
  63. package/.next/server/app-paths-manifest.json +0 -1
  64. package/.next/server/chunks/[root-of-the-server]__014ydvq._.js +2 -2
  65. package/.next/server/chunks/[root-of-the-server]__0209ah4._.js +7 -5
  66. package/.next/server/chunks/[root-of-the-server]__04r4h-2._.js +4 -2
  67. package/.next/server/chunks/[root-of-the-server]__0542v_d._.js +3 -0
  68. package/.next/server/chunks/[root-of-the-server]__0gewdg9._.js +2 -2
  69. package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
  70. package/.next/server/chunks/[root-of-the-server]__1-swlkw._.js +2 -2
  71. package/.next/server/chunks/[root-of-the-server]__12iddfq._.js +1 -1
  72. package/.next/server/chunks/[root-of-the-server]__1ai5lme._.js +3 -3
  73. package/.next/server/chunks/[root-of-the-server]__1cjxw0-._.js +2 -2
  74. package/.next/server/chunks/{[root-of-the-server]__1fy2g82._.js → [root-of-the-server]__1k3j52n._.js} +1 -1
  75. package/.next/server/chunks/[root-of-the-server]__1kyjt5m._.js +3 -3
  76. package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
  77. package/.next/server/chunks/_05v8k21._.js +3 -1
  78. package/.next/server/chunks/_0awtznl._.js +1 -1
  79. package/.next/server/chunks/_0na2fj1._.js +1 -1
  80. package/.next/server/chunks/_0x-ej3f._.js +17 -17
  81. package/.next/server/chunks/_12-amdu._.js +2 -2
  82. package/.next/server/chunks/_15740dw._.js +60 -0
  83. package/.next/server/chunks/_1dc_d1q._.js +3 -3
  84. package/.next/server/chunks/_1i350l5._.js +3 -1
  85. package/.next/server/chunks/_1jc5g4p._.js +2 -2
  86. package/.next/server/chunks/_1jn-aep._.js +4 -4
  87. package/.next/server/chunks/_1m88lkh._.js +11 -11
  88. package/.next/server/chunks/_1ogqovh._.js +4 -4
  89. package/.next/server/chunks/_1uuucy-._.js +1 -1
  90. package/.next/server/chunks/_1zxp-p6._.js +1 -1
  91. package/.next/server/chunks/features_0rfvely._.js +5 -3
  92. package/.next/server/chunks/ssr/{[root-of-the-server]__1se25x0._.js → [root-of-the-server]__0hpp3nw._.js} +29 -13
  93. package/.next/server/chunks/ssr/[root-of-the-server]__0m7u9j-._.js +3 -0
  94. package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +24 -60
  95. package/.next/server/chunks/ssr/[root-of-the-server]__1cz2rz5._.js +3 -0
  96. package/.next/server/chunks/ssr/{[root-of-the-server]__0tvavy9._.js → [root-of-the-server]__1iwyp1e._.js} +1 -1
  97. package/.next/server/chunks/ssr/[root-of-the-server]__1w9hqq8._.js +1 -1
  98. package/.next/server/chunks/ssr/_097-ljd._.js +1 -1
  99. package/.next/server/chunks/ssr/{_173siic._.js → _0btzccu._.js} +2 -2
  100. package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
  101. package/.next/server/chunks/ssr/{_1ng831c._.js → _0hjzb5o._.js} +2 -2
  102. package/.next/server/chunks/ssr/_0ld9_qq._.js +1 -1
  103. package/.next/server/chunks/ssr/{_1doidrw._.js → _0ouzu9f._.js} +2 -2
  104. package/.next/server/chunks/ssr/{_1flsjeo._.js → _0u7ko71._.js} +2 -2
  105. package/.next/server/chunks/ssr/{_0hlxij-._.js → _0wd_o8-._.js} +2 -2
  106. package/.next/server/chunks/ssr/_0ya0cb0._.js +3 -0
  107. package/.next/server/chunks/ssr/_10yyqtk._.js +67 -0
  108. package/.next/server/chunks/ssr/{_0bp-_fi._.js → _12eyown._.js} +3 -3
  109. package/.next/server/chunks/ssr/_12mijol._.js +11 -11
  110. package/.next/server/chunks/ssr/_132qkfz._.js +1 -1
  111. package/.next/server/chunks/ssr/_184327j._.js +1 -1
  112. package/.next/server/chunks/ssr/{_0tg0vf8._.js → _19ps4p3._.js} +7 -7
  113. package/.next/server/chunks/ssr/{_1yk6yak._.js → _1bhy4yg._.js} +2 -2
  114. package/.next/server/chunks/ssr/_1d423aj._.js +7 -5
  115. package/.next/server/chunks/ssr/{_0s41irp._.js → _1kd843u._.js} +2 -2
  116. package/.next/server/chunks/ssr/{_0p9pmxe._.js → _1kq2ye_._.js} +2 -2
  117. package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
  118. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  119. package/.next/server/chunks/ssr/_1p8xorg._.js +3 -0
  120. package/.next/server/chunks/ssr/{_17v-33v._.js → _1q683w8._.js} +3 -3
  121. package/.next/server/chunks/ssr/_1tawxu2._.js +3 -0
  122. package/.next/server/chunks/ssr/{_05rxyf9._.js → _1w2oba6._.js} +2 -2
  123. package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
  124. package/.next/server/chunks/ssr/{_1u2jw0i._.js → _1ybo1hd._.js} +3 -3
  125. package/.next/server/chunks/ssr/{features_bot_1yr-_pm._.js → features_bot_0s11m4r._.js} +2 -2
  126. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  127. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  128. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  129. package/.next/server/chunks/ssr/features_workspace_00jz2hu._.js +1 -1
  130. package/.next/server/chunks/ssr/{node_modules_04t200t._.js → node_modules_00pocul._.js} +1 -1
  131. package/.next/server/chunks/ssr/{node_modules_1dcbvfw._.js → node_modules_02zt4az._.js} +1 -1
  132. package/.next/server/chunks/ssr/{node_modules_0eb4rx7._.js → node_modules_05ojmcl._.js} +1 -1
  133. package/.next/server/chunks/ssr/{node_modules_08g12f-._.js → node_modules_06i6bli._.js} +1 -1
  134. package/.next/server/chunks/ssr/{node_modules_1expacw._.js → node_modules_09dj429._.js} +1 -1
  135. package/.next/server/chunks/ssr/{node_modules_0wq4-ts._.js → node_modules_0auzgvx._.js} +1 -1
  136. package/.next/server/chunks/ssr/{node_modules_048wmmj._.js → node_modules_0evjwh1._.js} +1 -1
  137. package/.next/server/chunks/ssr/{node_modules_1qehmwm._.js → node_modules_0gmdur8._.js} +1 -1
  138. package/.next/server/chunks/ssr/{node_modules_1ksh9gy._.js → node_modules_0j3te-1._.js} +1 -1
  139. package/.next/server/chunks/ssr/{node_modules_1n0h9sf._.js → node_modules_0rbaymq._.js} +1 -1
  140. package/.next/server/chunks/ssr/{node_modules_0511ha-._.js → node_modules_0tf8_1e._.js} +1 -1
  141. package/.next/server/chunks/ssr/{node_modules_18woe20._.js → node_modules_0yqy-0b._.js} +1 -1
  142. package/.next/server/chunks/ssr/{node_modules_0zjqwz7._.js → node_modules_1-53ebx._.js} +1 -1
  143. package/.next/server/chunks/ssr/{node_modules_1zf46lp._.js → node_modules_1-y9aho._.js} +1 -1
  144. package/.next/server/chunks/ssr/{node_modules_1xzo2wn._.js → node_modules_11bltzp._.js} +1 -1
  145. package/.next/server/chunks/ssr/{node_modules_11hbkuj._.js → node_modules_18jn2qo._.js} +1 -1
  146. package/.next/server/chunks/ssr/{node_modules_1zkpek5._.js → node_modules_1_te3bu._.js} +1 -1
  147. package/.next/server/chunks/ssr/{node_modules_0cdu6jq._.js → node_modules_1c0pg3k._.js} +1 -1
  148. package/.next/server/chunks/ssr/{node_modules_0piws2a._.js → node_modules_1en2jx5._.js} +1 -1
  149. package/.next/server/chunks/ssr/{node_modules_1m2ho33._.js → node_modules_1p-c8cr._.js} +1 -1
  150. package/.next/server/chunks/ssr/{node_modules_0pk6i-e._.js → node_modules_1qe-oxg._.js} +1 -1
  151. package/.next/server/chunks/ssr/{node_modules_0s1lwc9._.js → node_modules_1rjt833._.js} +1 -1
  152. package/.next/server/chunks/ssr/{node_modules_1_afpz7._.js → node_modules_1tzw5sn._.js} +1 -1
  153. package/.next/server/chunks/ssr/{node_modules_1cxc8kn._.js → node_modules_1x6uwvn._.js} +1 -1
  154. package/.next/server/chunks/ssr/{node_modules_0f2k5l0._.js → node_modules_1zqddke._.js} +1 -1
  155. package/.next/server/chunks/ssr/{node_modules_1_ban4u._.js → node_modules_211zgim._.js} +1 -1
  156. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0avl8-1._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0y51bqj._.js} +1 -1
  157. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_14oslro._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1sc114e._.js} +1 -1
  158. package/.next/server/middleware-build-manifest.js +3 -3
  159. package/.next/server/pages/404.html +1 -1
  160. package/.next/server/pages/500.html +1 -1
  161. package/.next/server/server-reference-manifest.js +1 -1
  162. package/.next/server/server-reference-manifest.json +57 -57
  163. package/.next/static/chunks/{0oz3rs47yy3p8.js → 03-724sj0nk_z.js} +2 -2
  164. package/.next/static/chunks/{42890jqk049q1.js → 03bhu4mk8en2q.js} +1 -1
  165. package/.next/static/chunks/{3vynnr71ghvom.js → 04imzjhvzw65d.js} +2 -2
  166. package/.next/static/chunks/{1pjygp7hqib6j.js → 0gljzv9fz1g7d.js} +1 -1
  167. package/.next/static/chunks/{2d4z3er53ng8r.js → 0h0lythv1ql93.js} +1 -1
  168. package/.next/static/chunks/{2o4dndk0d68do.js → 0hzbj7f48cmx0.js} +1 -1
  169. package/.next/static/chunks/{2ky81z-jgvasc.js → 0lwunwbl7u7pt.js} +1 -1
  170. package/.next/static/chunks/{0u9ae9k_2g7k3.js → 0r6nwxg4dv83t.js} +1 -1
  171. package/.next/static/chunks/0rn9nbg6aif9f.js +17 -0
  172. package/.next/static/chunks/{19ojn4lomsk0r.js → 0x_w4shtvrrfg.js} +1 -1
  173. package/.next/static/chunks/{2sdwbfs1x5skp.js → 0ympuji_ufypd.js} +1 -1
  174. package/.next/static/chunks/{3t9huugh-5_ps.js → 0zmrz4zfzm4dt.js} +1 -1
  175. package/.next/static/chunks/{3exjsi8pfdvzj.js → 11tlxkr7a_rpc.js} +1 -1
  176. package/.next/static/chunks/{0o980477kfqez.js → 12scesro428m7.js} +2 -2
  177. package/.next/static/chunks/16s2fx3890_jd.js +65 -0
  178. package/.next/static/chunks/{0oyz95sujd2c7.js → 1qzfgplyo18tc.js} +1 -1
  179. package/.next/static/chunks/{04e-e--5lk26x.js → 1r4zajz14jp9-.js} +1 -1
  180. package/.next/static/chunks/1s6m4cmbn7htf.js +1 -0
  181. package/.next/static/chunks/1wl9t1-3i-q8p.css +1 -0
  182. package/.next/static/chunks/2-asot3p1j3yg.js +1 -0
  183. package/.next/static/chunks/{0u3ktztrzu1fa.js → 2-jn4xscbm-i2.js} +1 -1
  184. package/.next/static/chunks/{0w20wnnfrscq7.js → 22h9gvclqtx_2.js} +1 -1
  185. package/.next/static/chunks/{337g9g_ux2gj-.js → 26-eblxwnykck.js} +1 -1
  186. package/.next/static/chunks/{43q9cgbuw8krx.js → 2kzwhbuobpkw3.js} +2 -2
  187. package/.next/static/chunks/{22shnca_6zfzs.js → 304q9p54tcgm1.js} +1 -1
  188. package/.next/static/chunks/{1u5i-jti87jbo.js → 35wdx3wt7cg4a.js} +1 -1
  189. package/.next/static/chunks/{1p764d75_0lhv.js → 37unh9460im7v.js} +2 -2
  190. package/.next/static/chunks/{01xjer0i_e5z5.js → 39gj5vxz1zpm_.js} +1 -1
  191. package/.next/static/chunks/{35kwn237o4wdn.js → 39vrqy1r_00jc.js} +1 -1
  192. package/.next/static/chunks/{09120tms63y21.js → 3dipmu0mptqum.js} +1 -1
  193. package/.next/static/chunks/3gki-squw28yu.js +1 -0
  194. package/.next/static/chunks/{3obf9n3cxj99k.js → 3jvldk2wvwbge.js} +1 -1
  195. package/.next/static/chunks/{1mwee7xvitlp9.js → 3nnzdl_te20hv.js} +1 -1
  196. package/.next/static/chunks/{2m267diam_vib.js → 3tz4dr0_8pq1-.js} +1 -1
  197. package/.next/static/chunks/{2gocl3dq0_h1s.js → 3x6pggb-2kyrk.js} +1 -1
  198. package/.next/static/chunks/{025bmrgeukcb2.js → 4440mws9jz3mt.js} +1 -1
  199. package/README.md +1 -1
  200. package/app/api/thursday/tool-call/route.ts +1 -15
  201. package/docs/images/demo-still.jpg +0 -0
  202. package/docs/live-calls.md +19 -11
  203. package/features/ai/prompts/live.prompt.ts +51 -26
  204. package/features/ai/prompts/prompt-helper.ts +1 -9
  205. package/features/ai/prompts/thursday.prompt.ts +8 -2
  206. package/features/bot/bot.run.ts +9 -3
  207. package/features/bot/bot.seed.ts +35 -91
  208. package/features/bot/components/bot-room.tsx +0 -6
  209. package/features/bot/components/room-pill.tsx +4 -2
  210. package/features/bot/seed-bots.ts +2 -2
  211. package/features/intro/components/intro.tsx +2 -3
  212. package/features/reach/reach.ts +2 -2
  213. package/features/signins/signins.query.ts +66 -1
  214. package/features/thursday/components/side-captions.tsx +31 -8
  215. package/features/thursday/components/thursday.tsx +97 -39
  216. package/features/thursday/components/write-line.tsx +28 -17
  217. package/features/thursday/thursday.action.ts +4 -20
  218. package/features/thursday/thursday.schema.ts +0 -9
  219. package/features/thursday/thursday.store.ts +11 -15
  220. package/features/thursday/thursday.text.ts +10 -8
  221. package/features/thursday/tool-line.ts +17 -6
  222. package/features/thursday/use-call-ring.ts +1 -5
  223. package/features/thursday/use-text-call.ts +37 -21
  224. package/features/thursday/use-thursday.ts +14 -44
  225. package/features/workspace/workspace.ts +4 -2
  226. package/guide/bots.md +12 -2
  227. package/guide/calls.md +7 -5
  228. package/lib/live/live.session.ts +0 -39
  229. package/package.json +1 -1
  230. package/scripts/live-session.test.mts +19 -26
  231. package/seed-skills/analyst/README.md +3 -4
  232. package/seed-skills/analyst/data-report/SKILL.md +5 -4
  233. package/seed-skills/insta/instagram/SKILL.md +5 -2
  234. package/seed-skills/insta/instagram/references/post.md +2 -2
  235. package/seed-skills/insta/instagram/scripts/compose.mjs +5 -1
  236. package/seed-skills/insta/instagram/scripts/inbox.mjs +5 -1
  237. package/seed-skills/insta/instagram/scripts/lib.mjs +12 -70
  238. package/seed-skills/insta/instagram/scripts/media.mjs +1 -1
  239. package/seed-skills/insta/instagram/scripts/profile.mjs +6 -2
  240. package/seed-skills/insta/instagram/scripts/read.mjs +5 -1
  241. package/seed-skills/insta/instagram/scripts/search.mjs +6 -2
  242. package/seed-skills/insta/instagram/scripts/sheet.mjs +31 -88
  243. package/seed-skills/insta/instagram/templates/carousel.html +1 -1
  244. package/seed-skills/tutor/picture-book/SKILL.md +16 -0
  245. package/seed-skills/tutor/picture-book/book/book.css +181 -0
  246. package/seed-skills/tutor/picture-book/book/book.html +33 -0
  247. package/seed-skills/tutor/picture-book/book/book.js +60 -0
  248. package/seed-skills/tutor/picture-book/references/picture-book.md +104 -0
  249. package/seed-skills/tutor/picture-book/scripts/book-video.mjs +177 -0
  250. package/seed-skills/tutor/picture-book/scripts/book.mjs +98 -0
  251. package/skills/browser/SKILL.md +13 -4
  252. package/skills/browser/references/scripts.md +55 -0
  253. package/{seed-skills/insta/instagram → skills/browser}/scripts/render.mjs +1 -1
  254. package/skills/browser/scripts/session.mjs +105 -0
  255. package/skills/browser/scripts/sheet.mjs +97 -0
  256. package/{seed-skills/insta/instagram → skills/browser}/scripts/webimage.mjs +1 -1
  257. package/skills/interactive-page/SKILL.md +4 -3
  258. package/{seed-skills/analyst/data-report → skills/interactive-page}/scripts/chart.mjs +3 -3
  259. package/skills/interactive-page/scripts/page.mjs +1 -0
  260. package/.next/server/app/api/probe/route/app-paths-manifest.json +0 -3
  261. package/.next/server/app/api/probe/route/build-manifest.json +0 -12
  262. package/.next/server/app/api/probe/route/server-reference-manifest.json +0 -4
  263. package/.next/server/app/api/probe/route.js +0 -10
  264. package/.next/server/app/api/probe/route.js.map +0 -5
  265. package/.next/server/app/api/probe/route.js.nft.json +0 -1
  266. package/.next/server/app/api/probe/route_client-reference-manifest.js +0 -3
  267. package/.next/server/chunks/[root-of-the-server]__012s2o8._.js +0 -3
  268. package/.next/server/chunks/[root-of-the-server]__0z0hc1f._.js +0 -4
  269. package/.next/server/chunks/[root-of-the-server]__1v7-zke._.js +0 -5
  270. package/.next/server/chunks/_0whlpyi._.js +0 -4
  271. package/.next/server/chunks/_next-internal_server_app_api_probe_route_actions_0cqd30j.js +0 -3
  272. package/.next/server/chunks/ssr/[root-of-the-server]__0cxqzfc._.js +0 -103
  273. package/.next/server/chunks/ssr/[root-of-the-server]__1-d2tgh._.js +0 -3
  274. package/.next/server/chunks/ssr/_070nv1_._.js +0 -3
  275. package/.next/server/chunks/ssr/_0u5xv6g._.js +0 -3
  276. package/.next/server/chunks/ssr/_157yfrk._.js +0 -3
  277. package/.next/server/chunks/ssr/_19n08g5._.js +0 -3
  278. package/.next/static/chunks/03kgfyrli_0gz.js +0 -1
  279. package/.next/static/chunks/24dst4mgurbsh.js +0 -1
  280. package/.next/static/chunks/25zq8gzhbdsr7.js +0 -1
  281. package/.next/static/chunks/2qod5tqlpz8b7.js +0 -17
  282. package/.next/static/chunks/30skcjexa57zn.js +0 -101
  283. package/.next/static/chunks/3qq4o8w2rv_e9.css +0 -1
  284. package/lib/probe.server.ts +0 -17
  285. package/lib/probe.ts +0 -55
  286. package/seed-skills/mail/mail/SKILL.md +0 -37
  287. package/seed-skills/mail/mail/recipes/gmail.mjs +0 -448
  288. package/seed-skills/mail/mail/references/recipes.md +0 -55
  289. package/seed-skills/mail/mail/scripts/mail.mjs +0 -202
  290. /package/.next/static/{Ar5V4kMdL4CE1trx8anrH → En1vUPazxcYjPjnnahcN5}/_buildManifest.js +0 -0
  291. /package/.next/static/{Ar5V4kMdL4CE1trx8anrH → En1vUPazxcYjPjnnahcN5}/_clientMiddlewareManifest.js +0 -0
  292. /package/.next/static/{Ar5V4kMdL4CE1trx8anrH → En1vUPazxcYjPjnnahcN5}/_ssgManifest.js +0 -0
  293. /package/{seed-skills/insta/instagram → skills/browser}/scripts/image-size.mjs +0 -0
@@ -0,0 +1 @@
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,947627,e=>{"use strict";var t=e.i(843476),a=e.i(647163);e.s(["Table",0,function({className:e,...r}){return(0,t.jsx)("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:(0,t.jsx)("table",{"data-slot":"table",className:(0,a.cn)("w-full caption-bottom text-sm",e),...r})})},"TableBody",0,function({className:e,...r}){return(0,t.jsx)("tbody",{"data-slot":"table-body",className:(0,a.cn)("[&_tr:last-child]:border-0",e),...r})},"TableCell",0,function({className:e,...r}){return(0,t.jsx)("td",{"data-slot":"table-cell",className:(0,a.cn)("p-2 align-middle [&:has([role=checkbox])]:pr-0",e),...r})},"TableHead",0,function({className:e,...r}){return(0,t.jsx)("th",{"data-slot":"table-head",className:(0,a.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",e),...r})},"TableHeader",0,function({className:e,...r}){return(0,t.jsx)("thead",{"data-slot":"table-header",className:(0,a.cn)("[&_tr]:border-b",e),...r})},"TableRow",0,function({className:e,...r}){return(0,t.jsx)("tr",{"data-slot":"table-row",className:(0,a.cn)("border-b border-border/60 transition-colors data-[state=selected]:bg-muted hover:bg-muted/40",e),...r})}])},41533,e=>{"use strict";var t=e.i(247167);t.default.env.THURSDAY_APP_DIR?.trim()||t.default.cwd(),t.default.env.THURSDAY_HOME?.trim()||t.default.cwd(),t.default.env.THURSDAY_URL?.trim()||t.default.env.PORT?.trim();let a=".ai-workspace",r={workspace:a,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${a}/.agents/skills`,own:".agents/skills",seeds:"seed-skills"}};e.s(["APP_NAME",0,"Thursday","ARTIFACT_VIEW",0,{rows:200,setFiles:120},"ASCII_FACE",0,{charset:"emojiOnly",fontSize:{default:8,min:4,max:16},density:{default:1.4,min:.6,max:2}},"BOT_RUN",0,{steps:100,compactAt:5e5,compactHeadroom:.8,summaryWords:{min:600,max:3e3,perTokens:200},participants:12,concurrent:4,turns:120,queuedMessages:200,silenceMs:3e5,overflowShrink:.6,retryMs:1e4,compactFiles:40},"BROWSER_SKILL",0,"browser","CALL_BACK",0,{ringMs:3e4},"CALL_END",0,{quietMs:600,unsaidMs:2e3,maxMs:8e3},"CALL_ENDED_MS",0,12e3,"CALL_HISTORY_PAGE",0,10,"CALL_IDLE",0,{hangUpMs:2e4,warnMs:1e4},"CALL_LINE",0,{dwellMs:2e3},"CALL_RELAY",0,{quietMs:7e3,perTurn:3,readMs:15e3,chars:600},"FILE_THUMB",0,{pageWidth:1024,textWidth:512,textBytes:4096,pages:2},"FINISHED_NOTICE",0,{rows:5,words:240},"GIVEN_FILES",0,{dir:"inbox",maxBytes:0x1900000,perMessage:8},"INBOX_FINISHED",0,5,"IS_DEV",0,!1,"LIVE_CALL",0,{startupMs:3e4,closeMs:15e3,transcriptGapMs:1500,transcriptSaveMs:500,appendMs:15e3,backendOutputTokens:4096,reasoningCheckMs:5e3,keyCheckMs:5e3},"MEMORY_LIMITS",0,{facts:400,factsPerNote:50,carried:20,expanded:10},"PAGE_SIZE",0,50,"PATHS",0,r,"PROMPT_CROWDED",0,{bots:10,skills:20},"ROUTINE",0,{tickMs:3e4,max:12,minHours:1,runsShown:5},"STUDIO_SERVER",0,"studio","TEXT_CALL",0,{maxSteps:12,model:"text"},"WORKSPACE_VIEW",0,{rows:200,textMax:524288,elementMax:0x3200000}])},621285,428817,e=>{"use strict";var t=e.i(843476),a=e.i(24071),r=e.i(867927),i=e.i(482022),l=e.i(271645),s=e.i(798120),n=e.i(167881),o=e.i(630374),d=e.i(683408),c=e.i(671428),h=e.i(947627),u=e.i(41533),f=e.i(616172),g=e.i(95187);let m=(0,g.createServerReference)("7f8d58bd1288271da847b9deff4bb67295444fd389",g.callServer,void 0,g.findSourceMapURL,"openFileAction");e.s(["openFileAction",0,m],428817);var p=e.i(609856),x=e.i(647163);let w=new Set(["frame","image","audio","video"]),b=new Set(["image"]);function y(e){let t=(0,f.workspaceRelative)(e);if(!t)return{how:"os"};let a=(0,f.viewKindOf)(t);return b.has(a)?{how:"dialog",path:t}:w.has(a)?{how:"tab",path:t,href:s.queryKey.fileView(t)}:"none"===a?{how:"os"}:{how:"dialog",path:t}}let k=(0,l.createContext)(null),v={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"},inline:{prose:"pb-3",block:"pb-3"}};function _({kind:e,content:a,truncated:r,where:i="dialog"}){return(0,t.jsxs)(t.Fragment,{children:[null!=r&&(0,t.jsx)(j,{of:r}),(0,t.jsx)(N,{kind:e,content:a,where:i})]})}function j({of:e}){return(0,t.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,x.formatBytes)(u.WORKSPACE_VIEW.textMax)} of ${(0,x.formatBytes)(e)}. `,"Open the file itself for the rest."]})}function N({kind:e,content:a,where:r}){let i=v[r];switch(e){case"markdown":return(0,t.jsx)("div",{className:(0,x.cn)("min-w-0 text-sm leading-relaxed",i.prose),children:(0,t.jsx)(d.Markdown,{children:a})});case"csv":return(0,t.jsx)(E,{content:a,className:i.block});case"json":return(0,t.jsx)(L,{text:function(e){try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}(a),className:i.block});default:return(0,t.jsx)(L,{text:a,className:i.block})}}function S(e){let[t,a]=(0,l.useState)(null),[r,i]=(0,l.useState)(null),[n,o]=(0,l.useState)(null);return(0,l.useEffect)(()=>{if(!e)return;a(null),i(null),o(null);let t=!1;return fetch(s.queryKey.file(e),{headers:{range:`bytes=0-${u.WORKSPACE_VIEW.textMax-1}`}}).then(async e=>{if(!e.ok)throw Error(await e.text());return{text:await e.text(),of:function(e){let t=e.headers.get("content-range")?.match(/^bytes \d+-(\d+)\/(\d+)$/);if(!t)return null;let[,a,r]=t.map(Number);return a+1<r?r:null}(e)}}).then(({text:e,of:r})=>{t||(a(null===r?e:e.slice(0,e.lastIndexOf("\n")+1||void 0)),o(r))}).catch(e=>!t&&i((0,x.errorToString)(e))),()=>{t=!0}},[e]),{content:t,failure:r,truncated:n}}function C({path:e,bytes:a}){let[r,i]=(0,p.useServerAction)(m);return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:[`This file is ${(0,x.formatBytes)(a)} — too big to draw here without `,"taking the window with it. Open it where it is instead."]}),(0,t.jsx)(n.Button,{variant:"outline",loading:i,onClick:()=>r(e),children:"Reveal in the file manager"})]})}function T({path:e,group:l=[],kind:d,onPath:h,onClose:u}){let f="image"===d,{content:g,failure:m,truncated:p}=S(f?null:e),w=e?.split("/").pop()??"",b=e?l.indexOf(e):-1,y=e=>{!(b<0)&&h&&h(l[(b+e+l.length)%l.length])};return(0,t.jsx)(o.Dialog,{open:null!==e,onOpenChange:e=>!e&&u(),children:(0,t.jsxs)(o.DialogContent,{onKeyDown:e=>{"ArrowLeft"===e.key&&y(-1),"ArrowRight"===e.key&&y(1)},className:"flex max-h-[calc(100vh-3rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-4xl",children:[(0,t.jsx)(o.DialogTitle,{className:"sr-only",children:w}),(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1 border-b border-border/60 py-2 pr-12 pl-4",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px]",children:e}),b>=0&&l.length>1&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground tabular-nums",children:[b+1," / ",l.length]}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Previous image",onClick:()=>y(-1),children:(0,t.jsx)(a.ChevronLeft,{})}),(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Next image",onClick:()=>y(1),children:(0,t.jsx)(r.ChevronRight,{})})]}),f&&e&&(0,t.jsx)(n.Button,{variant:"ghost",size:"icon-sm","aria-label":"Open in a new tab",render:(0,t.jsx)("a",{href:s.queryKey.fileView(e),target:"_blank",rel:"noreferrer"}),children:(0,t.jsx)(i.ExternalLink,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:f&&e?(0,t.jsx)("img",{src:s.queryKey.file(e),alt:w,className:"mx-auto max-h-[calc(100vh-11rem)] object-contain p-4"}):m?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:m}):null===g?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(_,{kind:d,content:g,truncated:p})}),f&&l.length>1&&(0,t.jsx)("div",{className:"flex shrink-0 justify-center gap-1.5 border-t border-border/60 p-2.5",children:l.map(a=>(0,t.jsx)("button",{type:"button","aria-label":a.split("/").pop(),onClick:()=>h?.(a),className:(0,x.cn)("size-11 shrink-0 overflow-hidden rounded-md outline-none focus-visible:ring-3 focus-visible:ring-ring/50",a===e?"ring-2 ring-foreground":"opacity-55"),children:(0,t.jsx)("img",{src:s.queryKey.file(a),alt:"",loading:"lazy",className:"size-full bg-muted object-cover"})},a))})]})})}function L({text:e,className:a}){return(0,t.jsx)("pre",{className:(0,x.cn)("overflow-x-auto font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-foreground/90",a),children:e})}function E({content:e,className:a}){let[r,...i]=(0,l.useMemo)(()=>(function(e){let t=[],a=[],r="",i=!1;for(let l=0;l<e.length;l++){let s=e[l];i?'"'===s&&'"'===e[l+1]?(r+='"',l++):'"'===s?i=!1:r+=s:'"'===s?i=!0:","===s?(a.push(r),r=""):"\n"===s||"\r"===s?("\r"===s&&"\n"===e[l+1]&&l++,a.push(r),t.push(a),a=[],r=""):r+=s}return(r.length||a.length)&&(a.push(r),t.push(a)),t.filter(e=>e.some(e=>e.trim()))})(e),[e]);return r?(0,t.jsx)("div",{className:(0,x.cn)("overflow-x-auto",a),children:(0,t.jsxs)(h.Table,{children:[(0,t.jsx)(h.TableHeader,{children:(0,t.jsx)(h.TableRow,{children:r.map((e,a)=>(0,t.jsx)(h.TableHead,{className:"whitespace-nowrap",children:e},`${a}-${e}`))})}),(0,t.jsx)(h.TableBody,{children:i.map((e,a)=>(0,t.jsx)(h.TableRow,{children:r.map((r,i)=>(0,t.jsx)(h.TableCell,{className:"whitespace-nowrap",children:e[i]??""},`${a}-${i}`))},`${a}-${e[0]??""}`))})]})}):(0,t.jsx)(L,{text:e,className:a})}e.s(["FileBody",0,_,"FileLink",0,function({path:e,group:a,className:r,title:i,label:n,children:o}){let d=y(e),c=(0,l.useContext)(k),[h,u]=(0,p.useServerAction)(m);return"tab"===d.how?(0,t.jsx)("a",{href:d.href,target:"_blank",rel:"noreferrer",title:i??e,"aria-label":n,className:r,children:o}):(0,t.jsx)("button",{type:"button",disabled:u,title:i??e,"aria-label":n,className:r,onClick:()=>{"dialog"===d.how?c?c(d.path,a):window.open(s.queryKey.fileView(d.path),"_blank"):h(e)},children:o})},"FilePreview",0,function({path:e,bytes:a}){let r=(0,f.viewKindOf)(e),{content:i,failure:l,truncated:n}=S(w.has(r)?null:e);return("frame"===r||"image"===r)&&a>u.WORKSPACE_VIEW.elementMax?(0,t.jsx)(C,{path:e,bytes:a}):"frame"===r?(0,t.jsx)("iframe",{title:e,src:s.queryKey.file(e),allow:"clipboard-read; clipboard-write; fullscreen; autoplay",className:"h-full w-full bg-white"}):"image"===r?(0,t.jsx)("img",{src:s.queryKey.file(e),alt:e,className:"mx-auto max-w-full p-6"}):"audio"===r||"video"===r?"audio"===r?(0,t.jsx)("audio",{controls:!0,src:s.queryKey.file(e),className:"w-full p-6",children:(0,t.jsx)("track",{kind:"captions"})}):(0,t.jsx)("video",{controls:!0,src:s.queryKey.file(e),className:"max-w-full p-6",children:(0,t.jsx)("track",{kind:"captions"})}):l?(0,t.jsx)("p",{className:"p-5 font-mono text-xs text-destructive",children:l}):null===i?(0,t.jsxs)("div",{className:"space-y-3 p-5",children:[(0,t.jsx)(c.Skeleton,{className:"h-5 w-2/3"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(c.Skeleton,{className:"h-4 w-5/6"})]}):(0,t.jsx)(_,{kind:r,content:i,truncated:n})},"FileViewer",0,function({children:e}){let[a,r]=(0,l.useState)(null),i=(0,l.useCallback)((e,t=[])=>r({path:e,group:t}),[]);return(0,t.jsxs)(k,{value:i,children:[e,(0,t.jsx)(T,{path:a?.path??null,group:a?.group??[],kind:a?(0,f.viewKindOf)(a.path):"text",onPath:e=>r(t=>t&&{...t,path:e}),onClose:()=>r(null)})]})},"fileTarget",0,y,"useFileText",0,S,"useOpenFile",0,function(){let e=(0,l.useContext)(k);return(0,l.useCallback)((t,a=[])=>{let r=y(t);if("os"===r.how)return!1;if("dialog"===r.how&&e)return e(r.path,a),!0;let i="tab"===r.how?r.href:s.queryKey.fileView(r.path);return null!==window.open(i,"_blank")},[e])}],621285)},616172,e=>{"use strict";var t=e.i(798120),a=e.i(41533);let r=e=>`text/${e}; charset=utf-8`,i={md:{kind:"markdown",mime:r("markdown")},markdown:{kind:"markdown",mime:r("markdown")},csv:{kind:"csv",mime:r("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:r("plain")},log:{kind:"text",mime:r("plain")},html:{kind:"frame",mime:r("html")},htm:{kind:"frame",mime:r("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:r("css")},js:{kind:"none",mime:r("javascript")},woff2:{kind:"none",mime:"font/woff2"}},l=e=>e.split(".").pop()?.toLowerCase()??"",s=Object.entries(i).filter(([,e])=>"none"!==e.kind).map(([e])=>e),n=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${s.join("|")})\b`,"giu"),o=`${a.PATHS.workspace}/`,d=t.queryKey.file("");function c(e){let t=function(e){if(!e.startsWith(d))return e;let t=e.slice(d.length);try{return decodeURIComponent(t)}catch{return t}}(e.trim()),a=t.indexOf(o);return a>=0?t.slice(a+o.length)||null:t.startsWith("/")||/^[A-Za-z]:/.test(t)||t.split("/").includes("..")?null:t||null}let h=/^[\s`'"*_)]*(?:~|–|—|-|\.{2,}|…|to|through)[\s`'"*_(]*$/i;e.s(["opensOnFinish",0,e=>e.startsWith(`${a.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(l(e)),"pathsIn",0,function(e){let t=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),a=new Set,r="",i=null;for(let e of t.matchAll(n)){let l=e[0],s=!l.includes("/"),n=function(e){let t=c(e);if(!t)return null;let[a,...r]=t.split("/");return r.length&&a.includes(".")?null:t}(s?r+l:l);if(s||(r=n?.slice(0,n.lastIndexOf("/")+1)??""),n){if(i&&h.test(t.slice(i.end,e.index)))for(let e of function(e,t){let a=/^(.*?)(\d+)(\D*)$/.exec(e),r=/^(.*?)(\d+)(\D*)$/.exec(t);if(!a||!r||a[1]!==r[1]||a[3]!==r[3])return[];let i=Number(a[2]),l=Number(r[2]);if(!(l-i>1)||l-i>12)return[];let s=a[2].startsWith("0")?a[2].length:0;return Array.from({length:l-i-1},(e,t)=>`${a[1]}${String(i+t+1).padStart(s,"0")}${a[3]}`)}(i.rel,n))a.add(e);a.add(n),i={rel:n,end:e.index+l.length}}}return[...a].slice(0,12)},"viewKindOf",0,e=>i[l(e)]?.kind??"none","workspaceRelative",0,c])},867927,986253,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let r=(0,t.default)(a);e.s(["default",0,r],986253),e.s(["ChevronRight",0,r],867927)},482022,e=>{"use strict";var t=e.i(456420);let a={name:"external-link",size:24,node:[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]};a.node;let r=(0,t.default)(a);e.s(["ExternalLink",0,r],482022)},696017,e=>{"use strict";var t=e.i(60231),a=e.i(419524);e.i(947716);var r=e.i(723685),i=(0,a.__name)(e=>{let{securityLevel:a}=(0,t.getConfig2)(),i=(0,r.select)("body");if("sandbox"===a){let t=(0,r.select)(`#i${e}`),a=t.node()?.contentDocument??document;i=(0,r.select)(a.body)}return i.select(`#${e}`)},"selectSvgElement");e.s(["selectSvgElement",0,i])},502056,e=>{"use strict";var t=e.i(217248),a=e.i(447804),r=e.i(508324),i=e.i(419524),l=(0,i.__name)(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,a=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:a,subGraphTitleTotalMargin:t+a}},"getSubGraphTitleMargins"),s=new Map;async function n(e,r,i){let l,n;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");let o=r.shape?t.shapes[r.shape]:void 0;if(!o)throw Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===i.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),l=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t??null),n=await o(l,r,i)}else l=n=await o(e,r,i);return l.attr("data-look",(0,a.handleUndefinedAttr)(r.look)),r.tooltip&&n.attr("title",r.tooltip),s.set(r.id,l),r.haveCallback&&l.attr("class",l.attr("class")+" clickable"),l}(0,i.__name)(n,"insertNode");var o=(0,i.__name)((e,t)=>{s.set(t.id,e)},"setNodeElem"),d=(0,i.__name)(()=>{s.clear()},"clear"),c=(0,i.__name)(e=>{let t=s.get(e.id);r.log.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");let a=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+a-e.width/2)+", "+(e.y-e.height/2-8)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),a},"positionNode");e.s(["clear",0,d,"getSubGraphTitleMargins",0,l,"insertNode",0,n,"positionNode",0,c,"setNodeElem",0,o])},369110,e=>{"use strict";var t=e.i(502056),a=e.i(217248),r=e.i(224797),i=e.i(836333),l=e.i(60231),s=e.i(508324),n=e.i(419524);e.i(947716);var o=e.i(723685),d=e.i(883272),c=(0,n.__name)(async(e,t)=>{let n,c,h=(0,l.getConfig2)(),{themeVariables:u,handDrawnSeed:f}=h,{clusterBkg:g,clusterBorder:m}=u,{labelStyles:p,nodeStyles:x,borderStyles:w,backgroundStyles:b}=(0,r.styles2String)(t),y=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),k=(0,l.evaluate)(h.flowchart.htmlLabels),v="LR"===t.direction,_=y.insert("g").attr("class","cluster-label swimlane-label"),j=await (0,i.createText)(_,t.label,{style:t.labelStyle,useHtmlLabels:k,isNode:!0,width:t.width}),N=j.getBBox();if(k){let e=j.children[0],t=(0,o.select)(j);N=e.getBoundingClientRect(),t.attr("width",N.width),t.attr("height",N.height)}let S=t.padding??0,C=t.width<=N.width+S?N.width+S:t.width;t.width<=N.width+S?t.diff=(C-t.width)/2-S:t.diff=-S;let T=t.height,L=t.y-T/2,E=t.y+T/2,B=t.x-C/2,M=void 0!==t.swimlaneContentTop?t.swimlaneContentTop:L+T/3,R=4*!!v,A=N.height+2*R;if(v){let e=Math.max(A,N.height+2*R),a=B+e,i=Math.max(0,C-e);if("handDrawn"===t.look){let l=d.default.svg(y),s=(0,r.userNodeOverrides)(t,{roughness:.7,fill:g,stroke:m,fillWeight:3,seed:f}),o=(0,r.userNodeOverrides)(t,{roughness:.7,fill:"none",stroke:m,seed:f}),h=l.rectangle(B,L,e,T,s);n=y.insert(()=>h,":first-child");let u=l.rectangle(a,L,i,T,o);c=y.insert(()=>u,":first-child"),n.select("path:nth-child(2)").attr("style",w.join(";")),n.select("path").attr("style",b.join(";").replace("fill","stroke"))}else n=y.insert("rect",":first-child"),c=y.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",x).attr("x",B).attr("y",L).attr("width",e).attr("height",T).attr("fill",g).attr("stroke",m),c.attr("class","swimlane-body").attr("style",x).attr("x",a).attr("y",L).attr("width",i).attr("height",T).attr("fill","none").attr("stroke",m);let l=B+e/2,s=t.y;_.attr("transform",`translate(${l}, ${s}) rotate(-90) translate(${-N.width/2}, ${-N.height/2})`)}else{let e=Math.min(A,Math.max(0,M-L)),a=L+e,i=Math.max(0,E-a),l=t.x-C/2;if("handDrawn"===t.look){let s=d.default.svg(y),o=(0,r.userNodeOverrides)(t,{roughness:.7,fill:g,stroke:m,fillWeight:3,seed:f}),h=(0,r.userNodeOverrides)(t,{roughness:.7,fill:"none",stroke:m,seed:f}),u=s.rectangle(l,L,C,e,o);n=y.insert(()=>u,":first-child");let p=s.rectangle(l,a,C,i,h);c=y.insert(()=>p,":first-child"),n.select("path:nth-child(2)").attr("style",w.join(";")),n.select("path").attr("style",b.join(";").replace("fill","stroke"))}else n=y.insert("rect",":first-child"),c=y.insert("rect",":first-child"),n.attr("class","swimlane-title").attr("style",x).attr("x",l).attr("y",L).attr("width",C).attr("height",e).attr("fill",g).attr("stroke",m),c.attr("class","swimlane-body").attr("style",x).attr("x",l).attr("y",a).attr("width",C).attr("height",i).attr("fill","none").attr("stroke",m);let s=t.x-N.width/2,o=L+(e-N.height)/2;_.attr("transform",`translate(${s}, ${o})`)}if(s.log.trace("Swimlane data ",t,JSON.stringify(t)),p){let e=_.select("span");e&&e.attr("style",p)}return t.offsetX=0,t.width=C,t.height=T,t.offsetY=N.height-S/2,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:y,labelBBox:N}},"swimlane"),h=(0,n.__name)(async(e,n)=>{let c,h;s.log.info("Creating subgraph rect for ",n.id,n);let u=(0,l.getConfig2)(),{themeVariables:f,handDrawnSeed:g}=u,{clusterBkg:m,clusterBorder:p}=f,{labelStyles:x,nodeStyles:w,borderStyles:b,backgroundStyles:y}=(0,r.styles2String)(n),k=e.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),v=(0,l.getEffectiveHtmlLabels)(u),_=k.insert("g").attr("class","cluster-label "),j=(c="markdown"===n.labelType?await (0,i.createText)(_,n.label,{style:n.labelStyle,useHtmlLabels:v,isNode:!0,width:n.width}):await (0,a.createLabel_default)(_,n.label,n.labelStyle||"",!1,!0)).getBBox();if((0,l.getEffectiveHtmlLabels)(u)){let e=c.children[0],t=(0,o.select)(c);j=e.getBoundingClientRect(),t.attr("width",j.width),t.attr("height",j.height)}let N=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(N-n.width)/2-n.padding:n.diff=-n.padding;let S=n.height,C=n.x-N/2,T=n.y-S/2;if(s.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let e=d.default.svg(k),t=(0,r.userNodeOverrides)(n,{roughness:.7,fill:m,stroke:p,fillWeight:3,seed:g}),i=e.path((0,a.createRoundedRectPathD)(C,T,N,S,0),t);(h=k.insert(()=>(s.log.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",b.join(";")),h.select("path").attr("style",y.join(";").replace("fill","stroke"))}else(h=k.insert("rect",":first-child")).attr("style",w).attr("rx",n.rx).attr("ry",n.ry).attr("x",C).attr("y",T).attr("width",N).attr("height",S);let{subGraphTitleTopMargin:L}=(0,t.getSubGraphTitleMargins)(u);if(_.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+L})`),x){let e=_.select("span");e&&e.attr("style",x)}let E=h.node().getBBox();return n.offsetX=0,n.width=E.width,n.height=E.height,n.offsetY=j.height-n.padding/2,n.intersect=function(e){return(0,a.intersect_rect_default)(n,e)},{cluster:k,labelBBox:j}},"rect"),u=(0,n.__name)((e,t)=>{let r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),l=0*t.padding,s=l/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-s).attr("y",t.y-t.height/2-s).attr("width",t.width+l).attr("height",t.height+l).attr("fill","none");let n=i.node().getBBox();return t.width=n.width,t.height=n.height,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),f=(0,n.__name)(async(e,t)=>{let r,i=(0,l.getConfig2)(),{themeVariables:s,handDrawnSeed:n}=i,{altBackground:c,compositeBackground:h,compositeTitleBackground:u,nodeBorder:f}=s,g=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),m=g.insert("g",":first-child"),p=g.insert("g").attr("class","cluster-label"),x=g.append("rect"),w=await (0,a.createLabel_default)(p,t.label,t.labelStyle,void 0,!0),b=w.getBBox();if((0,l.getEffectiveHtmlLabels)(i)){let e=w.children[0],t=(0,o.select)(w);b=e.getBoundingClientRect(),t.attr("width",b.width),t.attr("height",b.height)}let y=0*t.padding,k=(t.width<=b.width+t.padding?b.width+t.padding:t.width)+y;t.width<=b.width+t.padding?t.diff=(k-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height+y,_=t.height+y-b.height-6,j=t.x-k/2,N=t.y-v/2;t.width=k;let S=t.y-t.height/2-y/2+b.height+2;if("handDrawn"===t.look){let e=t.cssClasses.includes("statediagram-cluster-alt"),i=d.default.svg(g),l=t.rx||t.ry?i.path((0,a.createRoundedRectPathD)(j,N,k,v,10),{roughness:.7,fill:u,fillStyle:"solid",stroke:f,seed:n}):i.rectangle(j,N,k,v,{seed:n});r=g.insert(()=>l,":first-child");let s=i.rectangle(j,S,k,_,{fill:e?c:h,fillStyle:e?"hachure":"solid",stroke:f,seed:n});r=g.insert(()=>l,":first-child"),x=g.insert(()=>s)}else(r=m.insert("rect",":first-child")).attr("class","outer").attr("x",j).attr("y",N).attr("width",k).attr("height",v).attr("data-look",t.look),x.attr("class","inner").attr("x",j).attr("y",S).attr("width",k).attr("height",_);return p.attr("transform",`translate(${t.x-b.width/2}, ${N+1-3*!(0,l.getEffectiveHtmlLabels)(i)})`),t.height=r.node().getBBox().height,t.offsetX=0,t.offsetY=b.height-t.padding/2,t.labelBBox=b,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:g,labelBBox:b}},"roundedWithTitle"),g=(0,n.__name)(async(e,n)=>{let c;s.log.info("Creating subgraph rect for ",n.id,n);let h=(0,l.getConfig2)(),{themeVariables:u,handDrawnSeed:f}=h,{clusterBkg:g,clusterBorder:m}=u,{labelStyles:p,nodeStyles:x,borderStyles:w,backgroundStyles:b}=(0,r.styles2String)(n),y=e.insert("g").attr("class","cluster "+n.cssClasses).attr("id",n.domId).attr("data-look",n.look),k=(0,l.getEffectiveHtmlLabels)(h),v=y.insert("g").attr("class","cluster-label "),_=await (0,i.createText)(v,n.label,{style:n.labelStyle,useHtmlLabels:k,isNode:!0,width:n.width}),j=_.getBBox();if((0,l.getEffectiveHtmlLabels)(h)){let e=_.children[0],t=(0,o.select)(_);j=e.getBoundingClientRect(),t.attr("width",j.width),t.attr("height",j.height)}let N=n.width<=j.width+n.padding?j.width+n.padding:n.width;n.width<=j.width+n.padding?n.diff=(N-n.width)/2-n.padding:n.diff=-n.padding;let S=n.height,C=n.x-N/2,T=n.y-S/2;if(s.log.trace("Data ",n,JSON.stringify(n)),"handDrawn"===n.look){let e=d.default.svg(y),t=(0,r.userNodeOverrides)(n,{roughness:.7,fill:g,stroke:m,fillWeight:4,seed:f}),i=e.path((0,a.createRoundedRectPathD)(C,T,N,S,n.rx),t);(c=y.insert(()=>(s.log.debug("Rough node insert CXC",i),i),":first-child")).select("path:nth-child(2)").attr("style",w.join(";")),c.select("path").attr("style",b.join(";").replace("fill","stroke"))}else(c=y.insert("rect",":first-child")).attr("style",x).attr("rx",n.rx).attr("ry",n.ry).attr("x",C).attr("y",T).attr("width",N).attr("height",S);let{subGraphTitleTopMargin:L}=(0,t.getSubGraphTitleMargins)(h);if(v.attr("transform",`translate(${n.x-j.width/2}, ${n.y-n.height/2+L})`),p){let e=v.select("span");e&&e.attr("style",p)}let E=c.node().getBBox();return n.offsetX=0,n.width=E.width,n.height=E.height,n.offsetY=j.height-n.padding/2,n.intersect=function(e){return(0,a.intersect_rect_default)(n,e)},{cluster:y,labelBBox:j}},"kanbanSection"),m={rect:h,squareRect:h,roundedWithTitle:f,noteGroup:u,divider:(0,n.__name)((e,t)=>{let r,{themeVariables:i,handDrawnSeed:s}=(0,l.getConfig2)(),{nodeBorder:n}=i,o=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),c=o.insert("g",":first-child"),h=0*t.padding,u=t.width+h;t.diff=-t.padding;let f=t.height+h,g=t.x-u/2,m=t.y-f/2;if(t.width=u,"handDrawn"===t.look){let e=d.default.svg(o).rectangle(g,m,u,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:s});r=o.insert(()=>e,":first-child")}else{r=c.insert("rect",":first-child");let e="outer";t.look,e="divider",r.attr("class",e).attr("x",g).attr("y",m).attr("width",u).attr("height",f).attr("data-look",t.look)}return t.height=r.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return(0,a.intersect_rect_default)(t,e)},{cluster:o,labelBBox:{}}},"divider"),kanbanSection:g,swimlane:c},p=new Map,x=(0,n.__name)(async(e,t)=>{let a=t.shape||"rect",r=await m[a](e,t);return p.set(t.id,r),r},"insertCluster"),w=(0,n.__name)(()=>{p=new Map},"clear");e.s(["clear",0,w,"insertCluster",0,x])},121292,e=>{"use strict";var t=e.i(369110),a=e.i(382793),r=e.i(502056),i=e.i(217248),l=e.i(447804),s=e.i(60231),n=e.i(508324),o=e.i(419524),d={common:s.common_default,getConfig:s.getConfig,insertCluster:t.insertCluster,insertEdge:a.insertEdge,insertEdgeLabel:a.insertEdgeLabel,insertMarkers:a.markers_default,insertNode:r.insertNode,interpolateToCurve:l.interpolateToCurve,labelHelper:i.labelHelper,log:n.log,positionEdgeLabel:a.positionEdgeLabel},c={},h=(0,o.__name)(e=>{for(let t of e)c[t.name]=t},"registerLayoutLoaders");(0,o.__name)(()=>{h([{name:"dagre",loader:(0,o.__name)(async()=>await e.A(555153),"loader")},{name:"swimlane",loader:(0,o.__name)(async()=>await e.A(12782),"loader")},{name:"cose-bilkent",loader:(0,o.__name)(async()=>await e.A(208503),"loader")}])},"registerDefaultLayoutLoaders")();var u=(0,o.__name)(async(e,t)=>{if(!(e.layoutAlgorithm in c))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let a=t.domId||t.id;t.domId=`${e.diagramId}-${a}`}let a=c[e.layoutAlgorithm],r=await a.loader(),{theme:i,themeVariables:l}=e.config,{useGradient:s,gradientStart:n,gradientStop:o}=l,h=t.attr("id");if(t.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",`${i?.includes("dark")?"#FFFFFF":"#000000"}`),s){let e=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");e.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),e.append("svg:stop").attr("offset","100%").attr("stop-color",o).attr("stop-opacity",1)}return r.render(e,t,d,{algorithm:a.algorithm})},"render"),f=(0,o.__name)((e="",{fallback:t="dagre"}={})=>{if(e in c)return e;if(t in c)return n.log.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm");e.s(["getRegisteredLayoutAlgorithm",0,f,"registerLayoutLoaders",0,h,"render",0,u])}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,633669,e=>{"use strict";var t=e.i(843476),n=e.i(818125),a=e.i(647163);e.s(["SourceChips",0,function({sources:e,limit:s,className:l}){let i=e.flatMap(e=>{let t=(0,n.hostOf)(e.url);return t?[{...e,host:t}]:[]}),r=s?i.slice(0,s):i,o=i.length-r.length;return(0,t.jsxs)("span",{className:(0,a.cn)("flex min-w-0 flex-wrap items-center gap-1",l),children:[r.map(e=>(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",title:e.title??e.url,className:"flex h-[22px] min-w-0 items-center gap-1.5 rounded-full bg-muted pr-2 pl-1 text-[11.5px] leading-4 text-foreground/80 outline-none transition-colors hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.SiteIcon,{host:e.host}),(0,t.jsx)("span",{className:"truncate",children:e.host})]},e.url)),o>0&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:["+",o]})]})}])},807038,e=>{"use strict";var t=e.i(843476),n=e.i(456420);let a={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"}]]};a.node;let s=(0,n.default)(a);var l=e.i(271645),i=e.i(798120),r=e.i(41533),o=e.i(83928),d=e.i(621285),c=e.i(616172),u=e.i(283653),h=e.i(647163);let p=e=>e.split(".").pop()?.toLowerCase()??"file",m=e=>e.split("/").pop()??e;e.s(["Attachments",0,function({text:e,className:n,onBubble:a=!1}){let f=(0,l.useMemo)(()=>(0,c.pathsIn)(e),[e]),{data:x}=(0,u.useServerRoute)(f.length?i.queryKey.workspaceFiles(f):null),g=(0,l.useMemo)(()=>x??[],[x]),y=(0,l.useMemo)(()=>g.filter(e=>"image"===(0,c.viewKindOf)(e.path)),[g]),b=(0,l.useMemo)(()=>{let e=0;return g.filter(t=>{let n=(0,o.faceOf)(t.path,t.bytes);return"text"===n||"page"===n&&(e+=1)<=r.FILE_THUMB.pages})},[g]),k=g.filter(e=>!y.includes(e)&&!b.includes(e)),j=new Set(g.map(e=>m(e.path))),M=f.filter(e=>!g.some(t=>t.path===e)&&!j.has(m(e)));if(!f.length||!x||!g.length&&!M.length)return null;let N=y.map(e=>e.path),S=y.slice(0,4),v=y.length-S.length,O=y.length+b.length<=2,_=O?"h-40 w-32":"h-26.25 w-21";return(0,t.jsxs)("div",{className:(0,h.cn)("flex min-w-0 flex-col gap-1.5",n),children:[(S.length>0||b.length>0)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-1.5",children:[b.map(e=>(0,t.jsxs)(d.FileLink,{path:e.path,title:`${e.path} — ${(0,h.formatBytes)(e.bytes)}`,className:(0,h.cn)("flex shrink-0 flex-col gap-1 rounded-xl outline-none transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",O?"w-32":"w-21"),children:[(0,t.jsx)(o.FileThumb,{path:e.path,bytes:e.bytes,className:(0,h.cn)("w-full rounded-xl ring-1 ring-foreground/5 ring-inset",_)}),(0,t.jsxs)("span",{className:"flex flex-col items-start px-0.5",children:[(0,t.jsx)("span",{className:"max-w-full truncate text-[11.5px] leading-4",children:m(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[p(e.path)," · ",(0,h.formatBytes)(e.bytes)]})]})]},e.path)),S.map((e,n)=>(0,t.jsxs)(d.FileLink,{path:e.path,group:N,title:`${e.path} — ${(0,h.formatBytes)(e.bytes)}`,className:(0,h.cn)("relative shrink-0 overflow-hidden rounded-xl bg-muted outline-none ring-1 ring-foreground/5 ring-inset transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",_),children:[(0,t.jsx)("img",{src:i.queryKey.file(e.path),alt:m(e.path),loading:"lazy",decoding:"async",className:"size-full object-cover"}),v>0&&n===S.length-1&&(0,t.jsxs)("span",{className:"absolute inset-0 grid place-items-center bg-black/45 text-[14px] font-medium text-white",children:["+",v]})]},e.path))]}),k.map(e=>{let n=(0,o.fileIcon)(e.path);return(0,t.jsxs)(d.FileLink,{path:e.path,title:e.path,className:(0,h.cn)("flex w-fit max-w-full items-center gap-2.5 rounded-xl py-1.5 pr-3 pl-1.5 outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",a?"bg-background/70 hover:bg-background":"bg-muted/70 hover:bg-muted"),children:[(0,t.jsx)("span",{className:(0,h.cn)("grid size-8 shrink-0 place-items-center rounded-lg text-muted-foreground",a?"bg-muted":"bg-background"),children:(0,t.jsx)(n,{className:"size-3.5"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col items-start",children:[(0,t.jsx)("span",{className:"max-w-full truncate text-[12.5px] leading-4.25",children:m(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[p(e.path)," · ",(0,h.formatBytes)(e.bytes)]})]})]},e.path)}),M.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:M.map(e=>(0,t.jsxs)("span",{title:`${e} — not on disk`,className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted/70 py-1 pr-2.5 pl-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(s,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate line-through",children:m(e)})]},e))})]})},"imagePathsIn",0,function(e){return(0,c.pathsIn)(e).filter(e=>"image"===(0,c.viewKindOf)(e))},"shortenPaths",0,function(e){return e.split(/(```[\s\S]*?```)/).map((e,t)=>t%2==1?e:e.replace(/`([^`\n]+)`/g,(e,t)=>{let n=t.trim();if(!n.includes("/"))return e;let[a]=(0,c.pathsIn)(n),s=a?.split("/").pop();return a&&s&&n.endsWith(s)?`\`${s}\``:e})).join("")}],807038)},222055,991322,852116,589128,e=>{"use strict";var t=e.i(843476),n=e.i(518515),a=e.i(689664),s=e.i(716327),l=e.i(482022),i=e.i(772382),r=e.i(60744),o=e.i(226091),d=e.i(91511),c=e.i(758925),u=e.i(218964),h=e.i(632781),p=e.i(468590),m=e.i(928310),f=e.i(730274),x=e.i(604139),g=e.i(747925),y=e.i(271645),b=e.i(798120),k=e.i(660302),j=e.i(818125),M=e.i(671428),N=e.i(633669),S=e.i(213377),v=e.i(807038),O=e.i(456420);let _={name:"cable",size:24,node:[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]};_.node;let w=(0,O.default)(_);e.s(["McpMark",0,w],991322);let A={name:"cpu",size:24,node:[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]};A.node;let E=(0,O.default)(A);e.s(["MemoryMark",0,E],852116);var L=e.i(431594);let T=e.i(856539).BookMarked;e.s(["SkillsMark",0,T],589128);var z=e.i(621285),C=e.i(283653),I=e.i(647163);let F={[S.TOOL_NAMES.web_search]:function({tool:e,threadId:n,collapsed:a}){let s=D(e),l=s.length?[]:Y(e.results);return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep",children:["“",e.input,"”"]}),s.length>0&&(0,t.jsx)(N.SourceChips,{sources:s,className:"px-3 pb-2"}),l.length>0&&(0,t.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:l.map((e,n)=>(0,t.jsxs)("li",{className:"flex gap-2 text-[11.5px] leading-snug text-muted-foreground",children:[(0,t.jsx)("span",{className:"mt-1.25 size-1 shrink-0 rounded-full bg-muted-foreground/50"}),(0,t.jsx)("span",{className:"truncate",children:e})]},`${n}-${e}`))})]})},[S.TOOL_NAMES.bash]:function({tool:e,threadId:n,collapsed:a}){let s=Y(e.results);return(0,t.jsx)(V,{tool:e,threadId:n,collapsed:a,children:(0,t.jsxs)("pre",{className:"mx-3 overflow-x-auto rounded-lg bg-foreground/5 px-2.5 py-1.5 font-mono text-[11px] leading-relaxed scrollbar-none dark:bg-black/25",children:[(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"$ "}),e.input,s.length>0&&(0,t.jsx)("span",{className:"block text-muted-foreground",children:s.join("\n")})]})})},[S.TOOL_NAMES.write_file]:function({tool:e,threadId:n,collapsed:a}){let s=e.path??e.input;return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px]",children:e.input}),(0,t.jsxs)(z.FileLink,{path:s,label:`Open ${s}`,className:"flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:bg-background hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",children:[(0,t.jsx)(l.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,t.jsx)(X,{lines:Y(e.results),mono:!0})]})}},R={[S.TOOL_NAMES.web_search]:d.Globe,[S.TOOL_NAMES.bash]:x.Terminal,[S.TOOL_NAMES.write_file]:r.FilePen,[S.TOOL_NAMES.memory_recall]:E,[S.TOOL_NAMES.memory_remember]:E,[S.TOOL_NAMES.memory_forget]:E,[S.TOOL_NAMES.memory_conversation]:E,[S.TOOL_NAMES.load_skill]:T,[S.TOOL_NAMES.tool_search]:w,[S.TOOL_NAMES.tool_call]:w,[S.TOOL_NAMES.thread_start]:f.Send,[S.TOOL_NAMES.thread_tell]:f.Send,[S.TOOL_NAMES.thread_answer]:f.Send,[S.TOOL_NAMES.thread_status]:u.ListChecks,[S.TOOL_NAMES.thread_cancel]:u.ListChecks,[S.TOOL_NAMES.thread_show]:u.ListChecks,[S.TOOL_NAMES.thread_seen]:u.ListChecks,[S.TOOL_NAMES.send_message]:p.MessageSquare,[S.TOOL_NAMES.look_at]:i.Eye,[S.TOOL_NAMES.sign_in_use]:c.KeyRound,[S.TOOL_NAMES.sign_in_keep]:c.KeyRound,[S.TOOL_NAMES.end_call]:m.PhoneOff,[S.TOOL_NAMES.routine]:L.RoutineMark},$=e=>R[e]??g.Wrench,K=new Set(["cat","sed","head","tail","grep","rg","ls","find","wc","awk","jq"]),P=e=>e.split("/").pop()??e;function D(e){return Y(e.results).flatMap(e=>{let t=/https?:\/\/\S+/.exec(e)?.[0];if(!t)return[];let n=e.slice(0,e.indexOf(t)).replace(/[\s—-]+$/,"");return[{url:t,...n?{title:n}:{}}]})}function q(e){let t=(0,v.imagePathsIn)(`${e.path??""} ${e.input}`)[0];if(e.name===S.TOOL_NAMES.web_search)return{icon:d.Globe,pages:D(e)};if(e.name===S.TOOL_NAMES.write_file)return{icon:r.FilePen,image:t,target:P(e.path??e.input)};if(e.name!==S.TOOL_NAMES.bash)return{icon:$(e.name),image:t};let a=e.input.replace(/^\s*cd\s+\S+\s*&&\s*/,"").trim(),[s=""]=a.split(/\s+/),l=/(?:^|[\s;&|(])playwright-cli((?:\s+-\S+)*)\s+([a-z-]+)/.exec(a);if(l){if("screenshot"===l[2])return{icon:n.Camera,image:t};let e=/https?:\/\/[^\s'"]+/.exec(a)?.[0];return{icon:d.Globe,host:e&&(0,j.hostOf)(e)||void 0,image:t}}return K.has(s)?{icon:o.FileText,image:t,target:e.path?P(e.path):void 0}:{icon:x.Terminal,image:t,target:s||void 0}}function B({face:e}){if(e.pages?.length){let n=[...new Set(e.pages.flatMap(e=>(0,j.hostOf)(e.url)??[]))].slice(0,3);return(0,t.jsx)("span",{className:"flex shrink-0 items-center gap-1",children:n.map(e=>(0,t.jsx)(j.SiteIcon,{host:e},e))})}return e.host?(0,t.jsxs)("span",{className:"flex h-5 shrink-0 items-center gap-1.5 rounded-full bg-muted pr-2 pl-1 text-[11px] text-foreground/80",children:[(0,t.jsx)(j.SiteIcon,{host:e.host}),e.host]}):e.target&&!e.image?(0,t.jsx)("span",{className:"max-w-40 shrink truncate font-mono text-[10.5px] text-muted-foreground",children:e.target}):null}function H({tool:e,threadId:n,collapsed:a}){return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsx)("p",{className:"px-3 pt-1 pb-1.5 text-[12px] leading-snug break-keep",children:e.input}),(0,t.jsx)(X,{lines:Y(e.results)})]})}function V({tool:e,threadId:n,collapsed:l=!1,children:i}){let r=void 0===e.results,o=q(e),d=o.icon,[c,u]=(0,y.useState)(!l),p=c||r,m=n&&e.callId&&((e.results?.length??0)>0||e.more);return(0,t.jsxs)("div",{className:(0,I.cn)("@container w-full overflow-hidden rounded-xl transition-colors",p?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>u(e=>!e),"aria-expanded":p,className:"flex w-full items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-[7px] bg-foreground/8 text-muted-foreground",children:r?(0,t.jsx)(h.Loader2,{className:"size-3 animate-spin"}):(0,t.jsx)(d,{className:"size-3"})}),e.note?(0,t.jsxs)(t.Fragment,{children:[r?(0,t.jsx)(k.ShinyText,{text:e.note,speed:2.4,className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep",children:e.note}),(0,t.jsx)("span",{className:"hidden min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-muted-foreground/85 @lg:block",children:e.input})]}):r?(0,t.jsx)(k.ShinyText,{text:e.input,speed:2.4,className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-foreground/80",children:e.input}),(0,t.jsx)(U,{paths:(0,v.imagePathsIn)(`${e.path??""} ${e.input}`)}),(0,t.jsx)(B,{face:o}),!r&&(0,t.jsx)(a.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,t.jsx)(s.ChevronDown,{className:(0,I.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",p&&"rotate-180")})]}),p&&(0,t.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[i,m&&(0,t.jsx)(J,{threadId:n,callId:e.callId})]})]})}function U({paths:e}){let[n,a]=(0,y.useState)([]),s=e.filter(e=>!n.includes(e)).slice(0,W);return s.length?(0,t.jsx)("span",{className:"flex shrink-0 items-center",children:s.map((e,n)=>(0,t.jsx)("img",{src:b.queryKey.file(e),alt:"",loading:"lazy",decoding:"async",onError:()=>a(t=>[...t,e]),className:(0,I.cn)("size-6 rounded-md bg-muted object-cover ring-2 ring-background",n>0&&"-ml-1.5")},e))}):null}let W=3;function J({threadId:e,callId:n}){let[a,l]=(0,y.useState)(!1),{data:i,isLoading:r}=(0,C.useServerRoute)(a?b.queryKey.toolResult(e,n):null);return(0,t.jsxs)("div",{className:"px-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(e=>!e),className:"flex items-center gap-1 rounded-md py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(s.ChevronDown,{className:(0,I.cn)("size-3",a&&"rotate-180")}),a?"Less":"Everything"]}),a&&(r||!i?(0,t.jsx)(M.Skeleton,{className:"mt-1.5 h-12 w-full rounded-lg"}):(0,t.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[Z(i).map((e,n)=>(0,t.jsx)(G,{src:e},`${n}-${e.length}`)),Y(i).length>0&&(0,t.jsx)("pre",{className:"max-h-72 overflow-auto rounded-lg bg-foreground/5 px-2.5 py-2 font-mono text-[11px] leading-relaxed break-all whitespace-pre-wrap dark:bg-black/25",children:Y(i).join("\n")})]}))]})}function G({src:e}){return(0,t.jsx)("img",{src:e,alt:"",className:"block w-full rounded-lg bg-muted object-contain"})}function X({lines:e,mono:n}){return 0===e.length?null:(0,t.jsx)("ul",{className:"px-3 pb-1.5",children:e.map((e,a)=>(0,t.jsx)("li",{className:(0,I.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",n&&"font-mono"),children:e},`${a}-${e}`))})}let Y=e=>e?.flatMap(e=>"text"===e.type?[e.text]:[])??[],Z=e=>e?.flatMap(e=>"image"===e.type?[e.src]:[])??[];e.s(["BotTool",0,function(e){let n=F[e.tool.name]??H;return(0,t.jsx)(n,{...e})},"StepTile",0,function({tool:e,onOpen:n}){let a=q(e),[s,l]=(0,y.useState)(!1),i=a.icon;return(0,t.jsx)("button",{type:"button",onClick:n,title:e.note??e.input,"aria-label":e.note??e.input,className:"grid size-6 shrink-0 place-items-center overflow-hidden rounded-full bg-background text-muted-foreground outline-none transition-transform hover:scale-110 focus-visible:ring-3 focus-visible:ring-ring/50",children:a.image&&!s?(0,t.jsx)("img",{src:b.queryKey.file(a.image),alt:"",loading:"lazy",decoding:"async",onError:()=>l(!0),className:"size-full object-cover"}):a.host?(0,t.jsx)(j.SiteIcon,{host:a.host,className:"size-3.5 rounded-full",fallback:(0,t.jsx)(i,{className:"size-3"})}):(0,t.jsx)(i,{className:"size-3"})})},"toolIcon",0,$],222055)},256604,567334,933916,671228,762074,e=>{"use strict";var t=e.i(843476),n=e.i(271645);let a=[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],s=["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"],l={A:[".##.","#..#","####","#..#","#..#"],B:["###.","#..#","###.","#..#","###."],C:[".###","#...","#...","#...",".###"],D:["###.","#..#","#..#","#..#","###."],E:["####","#...","###.","#...","####"],F:["####","#...","###.","#...","#..."],G:[".###","#...","#.##","#..#",".###"],H:["#..#","#..#","####","#..#","#..#"],I:["###",".#.",".#.",".#.","###"],J:["..##","...#","...#","#..#",".##."],K:["#..#","#.#.","##..","#.#.","#..#"],L:["#...","#...","#...","#...","####"],M:["#...#","##.##","#.#.#","#...#","#...#"],N:["#..#","##.#","#.##","#..#","#..#"],O:[".##.","#..#","#..#","#..#",".##."],P:["###.","#..#","###.","#...","#..."],Q:[".##.","#..#","#..#","#.#.",".#.#"],R:["###.","#..#","###.","#.#.","#..#"],S:[".###","#...",".##.","...#","###."],T:["###",".#.",".#.",".#.",".#."],U:["#..#","#..#","#..#","#..#",".##."],V:["#...#","#...#",".#.#.",".#.#.","..#.."],W:["#...#","#...#","#.#.#","##.##","#...#"],X:["#..#","#..#",".##.","#..#","#..#"],Y:["#.#","#.#",".#.",".#.",".#."],Z:["####","...#",".##.","#...","####"],0:[".##.","#.##","#..#","##.#",".##."],1:[".#.","##.",".#.",".#.","###"],2:["###.","...#",".##.","#...","####"],3:["###.","...#",".##.","...#","###."],4:["#..#","#..#","####","...#","...#"],5:["####","#...","###.","...#","###."],6:[".##.","#...","###.","#..#",".##."],7:["####","...#","..#.",".#..",".#.."],8:[".##.","#..#",".##.","#..#",".##."],9:[".##.","#..#",".###","...#",".##."],"!":["#","#","#",".","#"],"?":["###.","...#",".##.","....",".#.."],".":[".",".",".",".","#"],",":["..","..","..",".#","#."],"'":["#","#",".",".","."],"-":["...","...","###","...","..."],"+":["...",".#.","###",".#.","..."],":":[".","#",".","#","."],"(":[".#","#.","#.","#.",".#"],")":["#.",".#",".#",".#","#."],"<":["..#",".#.","#..",".#.","..#"],">":["#..",".#.","..#",".#.","#.."],"^":[".#.","#.#","...","...","..."],"~":["....",".#.#","#.#.","....","...."],"♥":[".#.#.","#####","#####",".###.","..#.."]," ":["..","..","..","..",".."]};function i(e,t){let n=43758.5453*Math.sin(127.1*e+311.7*t);return n-Math.floor(n)}Object.keys(l).filter(e=>!/^[A-Z0-9 ]$/.test(e)),e.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_MIN_LEVEL",0,6,"EMOJI_POOL",0,s,"EMOJI_RATIO",0,.11,"FACE_WORD_MAX",0,8,"LETTERS",0,l,"RAMP",0,a,"hash",0,i,"smoothstep",0,function(e,t,n){let a=Math.min(1,Math.max(0,(n-e)/(t-e)));return a*a*(3-2*a)},"undrawable",0,function(e){return Array.from(e.toUpperCase()).find(e=>!(e in l))??null}],567334);var r=e.i(504565),o=e.i(41533),d=e.i(149666),c=e.i(265402);let u=["ascii","emoji","emojiOnly"];e.s(["ASCII_CHARSETS",0,u],933916);var h=e.i(413168);let p=d.LiveSettingsSchema.extend({locale:r.default.string().max(35).nullish()}),m=[{id:"chatgpt",...c.TEXT_MODEL_PROVIDERS.chatgpt},{id:"openai",...c.TEXT_MODEL_PROVIDERS.openai}],f=r.default.object({charset:r.default.enum(u).default(o.ASCII_FACE.charset),fontSize:r.default.number().min(o.ASCII_FACE.fontSize.min).max(o.ASCII_FACE.fontSize.max).default(o.ASCII_FACE.fontSize.default),density:r.default.number().min(o.ASCII_FACE.density.min).max(o.ASCII_FACE.density.max).default(o.ASCII_FACE.density.default)}),x=f.parse({}),g={min:3,max:32},y=r.default.object({enabled:r.default.boolean(),phrase:r.default.string().trim().min(g.min).max(g.max)}),b=r.default.object({enabled:r.default.boolean(),combo:r.default.string().trim().min(1).max(64)}),k=["off","waiting","any"],j=r.default.enum(k),M=["center","sides"],N=r.default.enum(M);r.default.object({id:r.default.string().min(1),role:r.default.enum(["user","assistant","tool"]),tool:r.default.string().nullish(),text:r.default.string(),seq:r.default.number().int().min(0),fragments:r.default.array(h.LiveFragmentSchema).nullish()}),r.default.object({id:r.default.string().min(1),text:r.default.string(),seq:r.default.number().int().min(0)}),e.s(["CALL_BACK_DEFAULT",0,"waiting","CALL_BACK_LABEL",0,{off:"Never",waiting:"When a job needs me",any:"Whenever a job ends"},"CALL_BACK_MODES",0,k,"CAPTION_VIEWS",0,M,"CallBackSchema",0,j,"CaptionViewSchema",0,N,"FACE_DEFAULT",0,x,"HOTKEY_DEFAULT",0,{enabled:!0,combo:"alt+shift+KeyT"},"HotkeySchema",0,b,"ThursdayFaceSchema",0,f,"ThursdaySettingsSchema",0,p,"WAKE_DEFAULT",0,{enabled:!1,phrase:"hey thursday"},"WAKE_PHRASE",0,g,"WakeSchema",0,y,"textCallRunsOn",0,e=>m.find(t=>e(t.apiKeyName))?.id??null],671228);let S="thursday.icon";function v(){try{let e=window.localStorage.getItem(S);return f.parse(e?JSON.parse(e):{})}catch{return x}}let O=v(),_=new Set;function w(){for(let e of _)e()}function A(){return(0,n.useSyncExternalStore)(e=>{_.add(e);let t=e=>{e.key===S&&(O=v(),w())};return window.addEventListener("storage",t),()=>{_.delete(e),window.removeEventListener("storage",t)}},()=>O,()=>x)}e.s(["setThursdayFace",0,function(e){O=e;try{window.localStorage.setItem(S,JSON.stringify(e))}catch{}w()},"useThursdayFace",0,A],762074);let E=240/276,L=new Map,T=new Set,z=null;e.s(["THURSDAY_SEED",0,"thursday","ThursdayMark",0,function({size:e=16,className:l}){let r="ascii"!==A().charset,{cells:o,font:d}=function(e){let t=L.get(e);if(t)return t;let n=e*E,a=(e-n)/2,s=Math.max(2,Math.round(n/4)),l=n/s,r=.98*l,o=[];for(let e=0;e<s;e++)for(let t=0;t<s;t++){let d=3===s&&1!==e&&1!==t?.72:1,c=n/2+l*(t+.5-s/2)*d,u=n/2+l*(e+.5-s/2)*d,h=Math.hypot(c-n/2,u-n/2)/(n/2),p=977*s+e*s+t;!(h+(s>=5?(i(p,1)-.5)*.24:0)>.98)&&(s>=8&&i(p,2)<.02+.24*h**3||o.push({seed:p,x:a+c,y:a+u+.36*r,r:h}))}let d={cells:o,font:r};return L.set(e,d),d}(e),[c,u]=(0,n.useState)(0);return(0,n.useEffect)(()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){if(T.add(u),!z){let e=Date.now();z=setInterval(()=>{let t=Date.now()-e;for(let e of T)e(t)},155)}return()=>{T.delete(u),0===T.size&&z&&(clearInterval(z),z=null)}}},[]),(0,t.jsx)("svg",{viewBox:`0 0 ${e} ${e}`,width:e,height:e,className:l,fill:"currentColor","aria-hidden":!0,children:o.map(e=>(0,t.jsx)("text",{x:e.x,y:e.y,textAnchor:"middle",fontFamily:r?'"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif':"ui-monospace, SFMono-Regular, Menlo, monospace",fontWeight:r?void 0:700,fontSize:d,children:function(e,t,n){let l=Math.floor((t+620*i(e.seed,11)*3)/620);if(n){let t=Math.floor(i(e.seed,17)*s.length);return s[(t+9*l)%s.length]}let r=Math.round(5+4*Math.max(0,1-e.r**2)**.6),o=a[Math.min(a.length-1,r)];return o[Math.floor(i(e.seed,l)*o.length)]??" "}(e,c,r)},e.seed))})}],256604)},518515,772382,60744,218964,468590,928310,730274,604139,e=>{"use strict";var t=e.i(456420);let n={name:"camera",size:24,node:[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]};n.node;let a=(0,t.default)(n);e.s(["Camera",0,a],518515);let s={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};s.node;let l=(0,t.default)(s);e.s(["Eye",0,l],772382);let i={name:"file-pen",size:24,node:[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],aliases:["file-edit"]};i.node;let r=(0,t.default)(i);e.s(["FilePen",0,r],60744);let o={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};o.node;let d=(0,t.default)(o);e.s(["ListChecks",0,d],218964);let c={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};c.node;let u=(0,t.default)(c);e.s(["MessageSquare",0,u],468590);let h={name:"phone-off",size:24,node:[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]]};h.node;let p=(0,t.default)(h);e.s(["PhoneOff",0,p],928310);let m={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};m.node;let f=(0,t.default)(m);e.s(["Send",0,f],730274);let x={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};x.node;let g=(0,t.default)(x);e.s(["Terminal",0,g],604139)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,633669,e=>{"use strict";var t=e.i(843476),n=e.i(818125),a=e.i(647163);e.s(["SourceChips",0,function({sources:e,limit:s,className:l}){let i=e.flatMap(e=>{let t=(0,n.hostOf)(e.url);return t?[{...e,host:t}]:[]}),r=s?i.slice(0,s):i,o=i.length-r.length;return(0,t.jsxs)("span",{className:(0,a.cn)("flex min-w-0 flex-wrap items-center gap-1",l),children:[r.map(e=>(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",title:e.title??e.url,className:"flex h-[22px] min-w-0 items-center gap-1.5 rounded-full bg-muted pr-2 pl-1 text-[11.5px] leading-4 text-foreground/80 outline-none transition-colors hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.SiteIcon,{host:e.host}),(0,t.jsx)("span",{className:"truncate",children:e.host})]},e.url)),o>0&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:["+",o]})]})}])},807038,e=>{"use strict";var t=e.i(843476),n=e.i(456420);let a={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"}]]};a.node;let s=(0,n.default)(a);var l=e.i(271645),i=e.i(798120),r=e.i(41533),o=e.i(83928),d=e.i(621285),c=e.i(616172),u=e.i(283653),h=e.i(647163);let p=e=>e.split(".").pop()?.toLowerCase()??"file",m=e=>e.split("/").pop()??e;e.s(["Attachments",0,function({text:e,className:n,onBubble:a=!1}){let f=(0,l.useMemo)(()=>(0,c.pathsIn)(e),[e]),{data:x}=(0,u.useServerRoute)(f.length?i.queryKey.workspaceFiles(f):null),g=(0,l.useMemo)(()=>x??[],[x]),y=(0,l.useMemo)(()=>g.filter(e=>"image"===(0,c.viewKindOf)(e.path)),[g]),b=(0,l.useMemo)(()=>{let e=0;return g.filter(t=>{let n=(0,o.faceOf)(t.path,t.bytes);return"text"===n||"page"===n&&(e+=1)<=r.FILE_THUMB.pages})},[g]),k=g.filter(e=>!y.includes(e)&&!b.includes(e)),j=new Set(g.map(e=>m(e.path))),M=f.filter(e=>!g.some(t=>t.path===e)&&!j.has(m(e)));if(!f.length||!x||!g.length&&!M.length)return null;let N=y.map(e=>e.path),v=y.slice(0,4),S=y.length-v.length,O=y.length+b.length<=2,_=O?"h-40 w-32":"h-26.25 w-21";return(0,t.jsxs)("div",{className:(0,h.cn)("flex min-w-0 flex-col gap-1.5",n),children:[(v.length>0||b.length>0)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-1.5",children:[b.map(e=>(0,t.jsxs)(d.FileLink,{path:e.path,title:`${e.path} — ${(0,h.formatBytes)(e.bytes)}`,className:(0,h.cn)("flex shrink-0 flex-col gap-1 rounded-xl outline-none transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",O?"w-32":"w-21"),children:[(0,t.jsx)(o.FileThumb,{path:e.path,bytes:e.bytes,className:(0,h.cn)("w-full rounded-xl ring-1 ring-foreground/5 ring-inset",_)}),(0,t.jsxs)("span",{className:"flex flex-col items-start px-0.5",children:[(0,t.jsx)("span",{className:"max-w-full truncate text-[11.5px] leading-4",children:m(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[p(e.path)," · ",(0,h.formatBytes)(e.bytes)]})]})]},e.path)),v.map((e,n)=>(0,t.jsxs)(d.FileLink,{path:e.path,group:N,title:`${e.path} — ${(0,h.formatBytes)(e.bytes)}`,className:(0,h.cn)("relative shrink-0 overflow-hidden rounded-xl bg-muted outline-none ring-1 ring-foreground/5 ring-inset transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",_),children:[(0,t.jsx)("img",{src:i.queryKey.file(e.path),alt:m(e.path),loading:"lazy",decoding:"async",className:"size-full object-cover"}),S>0&&n===v.length-1&&(0,t.jsxs)("span",{className:"absolute inset-0 grid place-items-center bg-black/45 text-[14px] font-medium text-white",children:["+",S]})]},e.path))]}),k.map(e=>{let n=(0,o.fileIcon)(e.path);return(0,t.jsxs)(d.FileLink,{path:e.path,title:e.path,className:(0,h.cn)("flex w-fit max-w-full items-center gap-2.5 rounded-xl py-1.5 pr-3 pl-1.5 outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",a?"bg-background/70 hover:bg-background":"bg-muted/70 hover:bg-muted"),children:[(0,t.jsx)("span",{className:(0,h.cn)("grid size-8 shrink-0 place-items-center rounded-lg text-muted-foreground",a?"bg-muted":"bg-background"),children:(0,t.jsx)(n,{className:"size-3.5"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col items-start",children:[(0,t.jsx)("span",{className:"max-w-full truncate text-[12.5px] leading-4.25",children:m(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[p(e.path)," · ",(0,h.formatBytes)(e.bytes)]})]})]},e.path)}),M.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:M.map(e=>(0,t.jsxs)("span",{title:`${e} — not on disk`,className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted/70 py-1 pr-2.5 pl-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(s,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate line-through",children:m(e)})]},e))})]})},"imagePathsIn",0,function(e){return(0,c.pathsIn)(e).filter(e=>"image"===(0,c.viewKindOf)(e))},"shortenPaths",0,function(e){return e.split(/(```[\s\S]*?```)/).map((e,t)=>t%2==1?e:e.replace(/`([^`\n]+)`/g,(e,t)=>{let n=t.trim();if(!n.includes("/"))return e;let[a]=(0,c.pathsIn)(n),s=a?.split("/").pop();return a&&s&&n.endsWith(s)?`\`${s}\``:e})).join("")}],807038)},222055,991322,852116,589128,e=>{"use strict";var t=e.i(843476),n=e.i(518515),a=e.i(689664),s=e.i(716327),l=e.i(482022),i=e.i(772382),r=e.i(60744),o=e.i(226091),d=e.i(91511),c=e.i(758925),u=e.i(218964),h=e.i(632781),p=e.i(468590),m=e.i(928310),f=e.i(730274),x=e.i(604139),g=e.i(747925),y=e.i(271645),b=e.i(798120),k=e.i(660302),j=e.i(818125),M=e.i(671428),N=e.i(633669),v=e.i(213377),S=e.i(807038),O=e.i(456420);let _={name:"cable",size:24,node:[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]};_.node;let w=(0,O.default)(_);e.s(["McpMark",0,w],991322);let A={name:"cpu",size:24,node:[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]};A.node;let E=(0,O.default)(A);e.s(["MemoryMark",0,E],852116);var L=e.i(431594);let T=e.i(856539).BookMarked;e.s(["SkillsMark",0,T],589128);var z=e.i(621285),C=e.i(283653),I=e.i(647163);let F={[v.TOOL_NAMES.web_search]:function({tool:e,threadId:n,collapsed:a}){let s=D(e),l=s.length?[]:Y(e.results);return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep",children:["“",e.input,"”"]}),s.length>0&&(0,t.jsx)(N.SourceChips,{sources:s,className:"px-3 pb-2"}),l.length>0&&(0,t.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:l.map((e,n)=>(0,t.jsxs)("li",{className:"flex gap-2 text-[11.5px] leading-snug text-muted-foreground",children:[(0,t.jsx)("span",{className:"mt-1.25 size-1 shrink-0 rounded-full bg-muted-foreground/50"}),(0,t.jsx)("span",{className:"truncate",children:e})]},`${n}-${e}`))})]})},[v.TOOL_NAMES.bash]:function({tool:e,threadId:n,collapsed:a}){let s=Y(e.results);return(0,t.jsx)(V,{tool:e,threadId:n,collapsed:a,children:(0,t.jsxs)("pre",{className:"mx-3 overflow-x-auto rounded-lg bg-foreground/5 px-2.5 py-1.5 font-mono text-[11px] leading-relaxed scrollbar-none dark:bg-black/25",children:[(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"$ "}),e.input,s.length>0&&(0,t.jsx)("span",{className:"block text-muted-foreground",children:s.join("\n")})]})})},[v.TOOL_NAMES.write_file]:function({tool:e,threadId:n,collapsed:a}){let s=e.path??e.input;return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px]",children:e.input}),(0,t.jsxs)(z.FileLink,{path:s,label:`Open ${s}`,className:"flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:bg-background hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",children:[(0,t.jsx)(l.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,t.jsx)(X,{lines:Y(e.results),mono:!0})]})}},R={[v.TOOL_NAMES.web_search]:d.Globe,[v.TOOL_NAMES.bash]:x.Terminal,[v.TOOL_NAMES.write_file]:r.FilePen,[v.TOOL_NAMES.memory_recall]:E,[v.TOOL_NAMES.memory_remember]:E,[v.TOOL_NAMES.memory_forget]:E,[v.TOOL_NAMES.memory_conversation]:E,[v.TOOL_NAMES.load_skill]:T,[v.TOOL_NAMES.tool_search]:w,[v.TOOL_NAMES.tool_call]:w,[v.TOOL_NAMES.thread_start]:f.Send,[v.TOOL_NAMES.thread_tell]:f.Send,[v.TOOL_NAMES.thread_answer]:f.Send,[v.TOOL_NAMES.thread_status]:u.ListChecks,[v.TOOL_NAMES.thread_cancel]:u.ListChecks,[v.TOOL_NAMES.thread_show]:u.ListChecks,[v.TOOL_NAMES.thread_seen]:u.ListChecks,[v.TOOL_NAMES.send_message]:p.MessageSquare,[v.TOOL_NAMES.look_at]:i.Eye,[v.TOOL_NAMES.sign_in_use]:c.KeyRound,[v.TOOL_NAMES.sign_in_keep]:c.KeyRound,[v.TOOL_NAMES.end_call]:m.PhoneOff,[v.TOOL_NAMES.routine]:L.RoutineMark},$=e=>R[e]??g.Wrench,K=new Set(["cat","sed","head","tail","grep","rg","ls","find","wc","awk","jq"]),P=e=>e.split("/").pop()??e;function D(e){return Y(e.results).flatMap(e=>{let t=/https?:\/\/\S+/.exec(e)?.[0];if(!t)return[];let n=e.slice(0,e.indexOf(t)).replace(/[\s—-]+$/,"");return[{url:t,...n?{title:n}:{}}]})}function q(e){let t=(0,S.imagePathsIn)(`${e.path??""} ${e.input}`)[0];if(e.name===v.TOOL_NAMES.web_search)return{icon:d.Globe,pages:D(e)};if(e.name===v.TOOL_NAMES.write_file)return{icon:r.FilePen,image:t,target:P(e.path??e.input)};if(e.name!==v.TOOL_NAMES.bash)return{icon:$(e.name),image:t};let a=e.input.replace(/^\s*cd\s+\S+\s*&&\s*/,"").trim(),[s=""]=a.split(/\s+/),l=/(?:^|[\s;&|(])playwright-cli((?:\s+-\S+)*)\s+([a-z-]+)/.exec(a);if(l){if("screenshot"===l[2])return{icon:n.Camera,image:t};let e=/https?:\/\/[^\s'"]+/.exec(a)?.[0];return{icon:d.Globe,host:e&&(0,j.hostOf)(e)||void 0,image:t}}return K.has(s)?{icon:o.FileText,image:t,target:e.path?P(e.path):void 0}:{icon:x.Terminal,image:t,target:s||void 0}}function B({face:e}){if(e.pages?.length){let n=[...new Set(e.pages.flatMap(e=>(0,j.hostOf)(e.url)??[]))].slice(0,3);return(0,t.jsx)("span",{className:"flex shrink-0 items-center gap-1",children:n.map(e=>(0,t.jsx)(j.SiteIcon,{host:e},e))})}return e.host?(0,t.jsxs)("span",{className:"flex h-5 shrink-0 items-center gap-1.5 rounded-full bg-muted pr-2 pl-1 text-[11px] text-foreground/80",children:[(0,t.jsx)(j.SiteIcon,{host:e.host}),e.host]}):e.target&&!e.image?(0,t.jsx)("span",{className:"max-w-40 shrink truncate font-mono text-[10.5px] text-muted-foreground",children:e.target}):null}function H({tool:e,threadId:n,collapsed:a}){return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsx)("p",{className:"px-3 pt-1 pb-1.5 text-[12px] leading-snug break-keep",children:e.input}),(0,t.jsx)(X,{lines:Y(e.results)})]})}function V({tool:e,threadId:n,collapsed:l=!1,children:i}){let r=void 0===e.results,o=q(e),d=o.icon,[c,u]=(0,y.useState)(!l),p=c||r,m=n&&e.callId&&((e.results?.length??0)>0||e.more);return(0,t.jsxs)("div",{className:(0,I.cn)("@container w-full overflow-hidden rounded-xl transition-colors",p?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>u(e=>!e),"aria-expanded":p,className:"flex w-full items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-[7px] bg-foreground/8 text-muted-foreground",children:r?(0,t.jsx)(h.Loader2,{className:"size-3 animate-spin"}):(0,t.jsx)(d,{className:"size-3"})}),e.note?(0,t.jsxs)(t.Fragment,{children:[r?(0,t.jsx)(k.ShinyText,{text:e.note,speed:2.4,className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep",children:e.note}),(0,t.jsx)("span",{className:"hidden min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-muted-foreground/85 @lg:block",children:e.input})]}):r?(0,t.jsx)(k.ShinyText,{text:e.input,speed:2.4,className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-foreground/80",children:e.input}),(0,t.jsx)(U,{paths:(0,S.imagePathsIn)(`${e.path??""} ${e.input}`)}),(0,t.jsx)(B,{face:o}),!r&&(0,t.jsx)(a.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,t.jsx)(s.ChevronDown,{className:(0,I.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",p&&"rotate-180")})]}),p&&(0,t.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[i,m&&(0,t.jsx)(J,{threadId:n,callId:e.callId})]})]})}function U({paths:e}){let[n,a]=(0,y.useState)([]),s=e.filter(e=>!n.includes(e)).slice(0,W);return s.length?(0,t.jsx)("span",{className:"flex shrink-0 items-center",children:s.map((e,n)=>(0,t.jsx)("img",{src:b.queryKey.file(e),alt:"",loading:"lazy",decoding:"async",onError:()=>a(t=>[...t,e]),className:(0,I.cn)("size-6 rounded-md bg-muted object-cover ring-2 ring-background",n>0&&"-ml-1.5")},e))}):null}let W=3;function J({threadId:e,callId:n}){let[a,l]=(0,y.useState)(!1),{data:i,isLoading:r}=(0,C.useServerRoute)(a?b.queryKey.toolResult(e,n):null);return(0,t.jsxs)("div",{className:"px-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(e=>!e),className:"flex items-center gap-1 rounded-md py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(s.ChevronDown,{className:(0,I.cn)("size-3",a&&"rotate-180")}),a?"Less":"Everything"]}),a&&(r||!i?(0,t.jsx)(M.Skeleton,{className:"mt-1.5 h-12 w-full rounded-lg"}):(0,t.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[Z(i).map((e,n)=>(0,t.jsx)(G,{src:e},`${n}-${e.length}`)),Y(i).length>0&&(0,t.jsx)("pre",{className:"max-h-72 overflow-auto rounded-lg bg-foreground/5 px-2.5 py-2 font-mono text-[11px] leading-relaxed break-all whitespace-pre-wrap dark:bg-black/25",children:Y(i).join("\n")})]}))]})}function G({src:e}){return(0,t.jsx)("img",{src:e,alt:"",className:"block w-full rounded-lg bg-muted object-contain"})}function X({lines:e,mono:n}){return 0===e.length?null:(0,t.jsx)("ul",{className:"px-3 pb-1.5",children:e.map((e,a)=>(0,t.jsx)("li",{className:(0,I.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",n&&"font-mono"),children:e},`${a}-${e}`))})}let Y=e=>e?.flatMap(e=>"text"===e.type?[e.text]:[])??[],Z=e=>e?.flatMap(e=>"image"===e.type?[e.src]:[])??[];e.s(["BotTool",0,function(e){let n=F[e.tool.name]??H;return(0,t.jsx)(n,{...e})},"StepTile",0,function({tool:e,onOpen:n}){let a=q(e),[s,l]=(0,y.useState)(!1),i=a.icon;return(0,t.jsx)("button",{type:"button",onClick:n,title:e.note??e.input,"aria-label":e.note??e.input,className:"grid size-6 shrink-0 place-items-center overflow-hidden rounded-full bg-background text-muted-foreground outline-none transition-transform hover:scale-110 focus-visible:ring-3 focus-visible:ring-ring/50",children:a.image&&!s?(0,t.jsx)("img",{src:b.queryKey.file(a.image),alt:"",loading:"lazy",decoding:"async",onError:()=>l(!0),className:"size-full object-cover"}):a.host?(0,t.jsx)(j.SiteIcon,{host:a.host,className:"size-3.5 rounded-full",fallback:(0,t.jsx)(i,{className:"size-3"})}):(0,t.jsx)(i,{className:"size-3"})})},"toolIcon",0,$],222055)},256604,567334,933916,671228,762074,e=>{"use strict";var t=e.i(843476),n=e.i(271645);let a=[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],s=["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"],l={A:[".##.","#..#","####","#..#","#..#"],B:["###.","#..#","###.","#..#","###."],C:[".###","#...","#...","#...",".###"],D:["###.","#..#","#..#","#..#","###."],E:["####","#...","###.","#...","####"],F:["####","#...","###.","#...","#..."],G:[".###","#...","#.##","#..#",".###"],H:["#..#","#..#","####","#..#","#..#"],I:["###",".#.",".#.",".#.","###"],J:["..##","...#","...#","#..#",".##."],K:["#..#","#.#.","##..","#.#.","#..#"],L:["#...","#...","#...","#...","####"],M:["#...#","##.##","#.#.#","#...#","#...#"],N:["#..#","##.#","#.##","#..#","#..#"],O:[".##.","#..#","#..#","#..#",".##."],P:["###.","#..#","###.","#...","#..."],Q:[".##.","#..#","#..#","#.#.",".#.#"],R:["###.","#..#","###.","#.#.","#..#"],S:[".###","#...",".##.","...#","###."],T:["###",".#.",".#.",".#.",".#."],U:["#..#","#..#","#..#","#..#",".##."],V:["#...#","#...#",".#.#.",".#.#.","..#.."],W:["#...#","#...#","#.#.#","##.##","#...#"],X:["#..#","#..#",".##.","#..#","#..#"],Y:["#.#","#.#",".#.",".#.",".#."],Z:["####","...#",".##.","#...","####"],0:[".##.","#.##","#..#","##.#",".##."],1:[".#.","##.",".#.",".#.","###"],2:["###.","...#",".##.","#...","####"],3:["###.","...#",".##.","...#","###."],4:["#..#","#..#","####","...#","...#"],5:["####","#...","###.","...#","###."],6:[".##.","#...","###.","#..#",".##."],7:["####","...#","..#.",".#..",".#.."],8:[".##.","#..#",".##.","#..#",".##."],9:[".##.","#..#",".###","...#",".##."],"!":["#","#","#",".","#"],"?":["###.","...#",".##.","....",".#.."],".":[".",".",".",".","#"],",":["..","..","..",".#","#."],"'":["#","#",".",".","."],"-":["...","...","###","...","..."],"+":["...",".#.","###",".#.","..."],":":[".","#",".","#","."],"(":[".#","#.","#.","#.",".#"],")":["#.",".#",".#",".#","#."],"<":["..#",".#.","#..",".#.","..#"],">":["#..",".#.","..#",".#.","#.."],"^":[".#.","#.#","...","...","..."],"~":["....",".#.#","#.#.","....","...."],"♥":[".#.#.","#####","#####",".###.","..#.."]," ":["..","..","..","..",".."]};function i(e,t){let n=43758.5453*Math.sin(127.1*e+311.7*t);return n-Math.floor(n)}Object.keys(l).filter(e=>!/^[A-Z0-9 ]$/.test(e)),e.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_MIN_LEVEL",0,6,"EMOJI_POOL",0,s,"EMOJI_RATIO",0,.11,"FACE_WORD_MAX",0,8,"LETTERS",0,l,"RAMP",0,a,"hash",0,i,"smoothstep",0,function(e,t,n){let a=Math.min(1,Math.max(0,(n-e)/(t-e)));return a*a*(3-2*a)},"undrawable",0,function(e){return Array.from(e.toUpperCase()).find(e=>!(e in l))??null}],567334);var r=e.i(504565),o=e.i(41533),d=e.i(265402);let c=["ascii","emoji","emojiOnly"];e.s(["ASCII_CHARSETS",0,c],933916);var u=e.i(413168);let h=[{id:"chatgpt",...d.TEXT_MODEL_PROVIDERS.chatgpt},{id:"openai",...d.TEXT_MODEL_PROVIDERS.openai}],p=r.default.object({charset:r.default.enum(c).default(o.ASCII_FACE.charset),fontSize:r.default.number().min(o.ASCII_FACE.fontSize.min).max(o.ASCII_FACE.fontSize.max).default(o.ASCII_FACE.fontSize.default),density:r.default.number().min(o.ASCII_FACE.density.min).max(o.ASCII_FACE.density.max).default(o.ASCII_FACE.density.default)}),m=p.parse({}),f={min:3,max:32},x=r.default.object({enabled:r.default.boolean(),phrase:r.default.string().trim().min(f.min).max(f.max)}),g=r.default.object({enabled:r.default.boolean(),combo:r.default.string().trim().min(1).max(64)}),y=["off","waiting","any"],b=r.default.enum(y),k=["center","sides"],j=r.default.enum(k);r.default.object({id:r.default.string().min(1),role:r.default.enum(["user","assistant","tool"]),tool:r.default.string().nullish(),text:r.default.string(),seq:r.default.number().int().min(0),fragments:r.default.array(u.LiveFragmentSchema).nullish()}),r.default.object({id:r.default.string().min(1),text:r.default.string(),seq:r.default.number().int().min(0)}),e.s(["CALL_BACK_DEFAULT",0,"waiting","CALL_BACK_LABEL",0,{off:"Never",waiting:"When a job needs me",any:"Whenever a job ends"},"CALL_BACK_MODES",0,y,"CAPTION_VIEWS",0,k,"CallBackSchema",0,b,"CaptionViewSchema",0,j,"FACE_DEFAULT",0,m,"HOTKEY_DEFAULT",0,{enabled:!0,combo:"alt+shift+KeyT"},"HotkeySchema",0,g,"ThursdayFaceSchema",0,p,"WAKE_DEFAULT",0,{enabled:!1,phrase:"hey thursday"},"WAKE_PHRASE",0,f,"WakeSchema",0,x,"textCallRunsOn",0,e=>h.find(t=>e(t.apiKeyName))?.id??null],671228);let M="thursday.icon";function N(){try{let e=window.localStorage.getItem(M);return p.parse(e?JSON.parse(e):{})}catch{return m}}let v=N(),S=new Set;function O(){for(let e of S)e()}function _(){return(0,n.useSyncExternalStore)(e=>{S.add(e);let t=e=>{e.key===M&&(v=N(),O())};return window.addEventListener("storage",t),()=>{S.delete(e),window.removeEventListener("storage",t)}},()=>v,()=>m)}e.s(["setThursdayFace",0,function(e){v=e;try{window.localStorage.setItem(M,JSON.stringify(e))}catch{}O()},"useThursdayFace",0,_],762074);let w=240/276,A=new Map,E=new Set,L=null;e.s(["THURSDAY_SEED",0,"thursday","ThursdayMark",0,function({size:e=16,className:l}){let r="ascii"!==_().charset,{cells:o,font:d}=function(e){let t=A.get(e);if(t)return t;let n=e*w,a=(e-n)/2,s=Math.max(2,Math.round(n/4)),l=n/s,r=.98*l,o=[];for(let e=0;e<s;e++)for(let t=0;t<s;t++){let d=3===s&&1!==e&&1!==t?.72:1,c=n/2+l*(t+.5-s/2)*d,u=n/2+l*(e+.5-s/2)*d,h=Math.hypot(c-n/2,u-n/2)/(n/2),p=977*s+e*s+t;!(h+(s>=5?(i(p,1)-.5)*.24:0)>.98)&&(s>=8&&i(p,2)<.02+.24*h**3||o.push({seed:p,x:a+c,y:a+u+.36*r,r:h}))}let d={cells:o,font:r};return A.set(e,d),d}(e),[c,u]=(0,n.useState)(0);return(0,n.useEffect)(()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){if(E.add(u),!L){let e=Date.now();L=setInterval(()=>{let t=Date.now()-e;for(let e of E)e(t)},155)}return()=>{E.delete(u),0===E.size&&L&&(clearInterval(L),L=null)}}},[]),(0,t.jsx)("svg",{viewBox:`0 0 ${e} ${e}`,width:e,height:e,className:l,fill:"currentColor","aria-hidden":!0,children:o.map(e=>(0,t.jsx)("text",{x:e.x,y:e.y,textAnchor:"middle",fontFamily:r?'"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif':"ui-monospace, SFMono-Regular, Menlo, monospace",fontWeight:r?void 0:700,fontSize:d,children:function(e,t,n){let l=Math.floor((t+620*i(e.seed,11)*3)/620);if(n){let t=Math.floor(i(e.seed,17)*s.length);return s[(t+9*l)%s.length]}let r=Math.round(5+4*Math.max(0,1-e.r**2)**.6),o=a[Math.min(a.length-1,r)];return o[Math.floor(i(e.seed,l)*o.length)]??" "}(e,c,r)},e.seed))})}],256604)},518515,772382,60744,218964,468590,928310,730274,604139,e=>{"use strict";var t=e.i(456420);let n={name:"camera",size:24,node:[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]};n.node;let a=(0,t.default)(n);e.s(["Camera",0,a],518515);let s={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};s.node;let l=(0,t.default)(s);e.s(["Eye",0,l],772382);let i={name:"file-pen",size:24,node:[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],aliases:["file-edit"]};i.node;let r=(0,t.default)(i);e.s(["FilePen",0,r],60744);let o={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};o.node;let d=(0,t.default)(o);e.s(["ListChecks",0,d],218964);let c={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};c.node;let u=(0,t.default)(c);e.s(["MessageSquare",0,u],468590);let h={name:"phone-off",size:24,node:[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]]};h.node;let p=(0,t.default)(h);e.s(["PhoneOff",0,p],928310);let m={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};m.node;let f=(0,t.default)(m);e.s(["Send",0,f],730274);let x={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};x.node;let g=(0,t.default)(x);e.s(["Terminal",0,g],604139)}]);
@@ -1 +1 @@
1
- (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,457343,e=>{"use strict";var t=e.i(843476),n=e.i(867927),s=e.i(632781),a=e.i(648119),i=e.i(929272),r=e.i(759659),o=e.i(263676),l=e.i(271645),d=e.i(798120),c=e.i(167881),u=e.i(630374),x=e.i(463415),h=e.i(917162),m=e.i(660302),p=e.i(671428),f=e.i(41533),g=e.i(248473),j=e.i(95187);let b=(0,j.createServerReference)("7f205d1240f42627a1e6de9116d0ac943d0b4270de",j.callServer,void 0,j.findSourceMapURL,"clearFinishedThreadsAction"),k=(0,j.createServerReference)("7faad9c5d7887872a59722a8a48780695b761500d4",j.callServer,void 0,j.findSourceMapURL,"deleteThreadAction");var N=e.i(451888),v=e.i(635963),w=e.i(835878),y=e.i(222055),S=e.i(351866),T=e.i(978411),D=e.i(431594),M=e.i(895836),C=e.i(245629),z=e.i(609856),A=e.i(661504),R=e.i(283653),I=e.i(647163),O=e.i(399512);let $="w-36";function F({thread:e,bots:a,open:i,onOpen:r,onStop:o,onDelete:d}){let c="running"===e.status,u=(0,l.useMemo)(()=>(0,T.threadFromRow)(e,a),[e,a]),x=function(e){let t=e.room.questions[0];if(t)return{text:(0,I.plainText)(t.text),tone:I.WAITING_INK};if("waiting"===e.status&&e.ask)return{text:(0,N.isAppStop)(e.ask)?(0,I.plainText)(e.outcome??e.ask.question):e.ask.question,tone:I.WAITING_INK};let n=e.seen;if("cancelled"===e.status)return{text:"Stopped",tone:"text-muted-foreground"};if("done"===e.status)return{text:(0,I.plainText)(e.outcome??"Done"),tone:n?"text-muted-foreground":"text-foreground/80"};for(let t=e.lines.length-1;t>=0;t--){let n=e.lines[t];if("tool"===n.kind)return{text:n.note??n.input,tone:"text-muted-foreground",tool:n.name,shine:!0};if("text"===n.kind)return{text:n.text,tone:"text-muted-foreground",shine:!0};if("user"===n.kind)break}return{text:`${e.bot} is taking it on…`,tone:"text-muted-foreground italic",shine:!0}}(e),h=e.tokens.input+e.tokens.output;return(0,t.jsxs)("div",{className:(0,I.cn)("group/row relative transition-colors",i?"bg-muted/80":"hover:bg-muted/50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(v.BotMark,{size:40,seed:e.bot,...B(e.bot,a),state:c?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),e.routineId&&(0,t.jsx)("span",{title:"Started by a routine",className:"shrink-0",children:(0,t.jsx)(D.RoutineMark,{className:"size-3 text-muted-foreground/80"})}),(0,t.jsx)(w.BotRoster,{bots:(0,T.rosterOf)(u)}),c&&(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),x&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] leading-snug",children:[x.tool&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:x.tool}),x.shine?(0,t.jsx)(m.ShinyText,{text:x.text,speed:2.2,className:"min-w-0 truncate"}):(0,t.jsx)("span",{className:(0,I.cn)("min-w-0 truncate",x.tone),children:x.text})]})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",$),children:[(0,t.jsx)("span",{children:(0,C.whenOf)(e.updatedAt)}),(0,t.jsxs)("span",{className:"max-w-full truncate text-muted-foreground/70",title:h>0?`${e.id} \xb7 in ${(0,I.formatCount)(e.tokens.input)} \xb7 out ${(0,I.formatCount)(e.tokens.output)}`:e.id,children:[e.bot,h>0&&` \xb7 ${(0,I.formatCount)(h)}`]})]}),(0,t.jsx)(n.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]}),(0,t.jsx)(K,{thread:e,onStop:o,onDelete:d})]}),c&&(0,t.jsx)(P,{thread:e})]})}function K({thread:e,onStop:n,onDelete:s,className:o}){let l="running"===e.status||"waiting"===e.status;return(0,t.jsxs)(x.DropdownMenu,{children:[(0,t.jsx)(x.DropdownMenuTrigger,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost",className:o}),children:(0,t.jsx)(a.MoreHorizontal,{})}),(0,t.jsxs)(x.DropdownMenuContent,{align:"end",children:[l&&(0,t.jsxs)(x.DropdownMenuItem,{onClick:n,children:[(0,t.jsx)(i.Square,{}),"Stop"]}),(0,t.jsxs)(x.DropdownMenuItem,{variant:"destructive",onClick:s,children:[(0,t.jsx)(r.Trash2,{}),"Delete"]})]})]})}function q({thread:e,bots:n,onClose:s,onStop:a,onDelete:i}){let[r,d]=(0,l.useState)(null),x=(0,l.useCallback)(e=>{d(e?.closest("[data-slot=dialog-content]")??null)},[]),[h,m]=(0,l.useState)({}),p=(0,l.useMemo)(()=>e?(0,T.threadFromRow)(e,n):null,[e,n]),f=e?h[e.id]??null:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{ref:x,hidden:!0}),(0,t.jsx)(u.Dialog,{open:!!(e&&r),onOpenChange:e=>!e&&s(),modal:!1,disablePointerDismissal:!0,children:(0,t.jsx)(u.DialogPortal,{container:r,children:(0,t.jsx)(u.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:e&&p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[(0,t.jsx)(v.BotMark,{size:28,seed:e.bot,...B(e.bot,n),state:"running"===e.status?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(u.DialogTitle,{className:"sr-only",children:e.label}),(0,t.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:e.label}),(0,t.jsxs)("div",{className:"mt-0.5 flex min-w-0 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsxs)("span",{title:e.id,className:"min-w-0 truncate",children:[e.bot," · ",(0,C.whenOf)(e.updatedAt)]}),(0,t.jsx)(S.ThreadFacts,{thread:p})]})]}),(0,t.jsx)(K,{thread:e,onStop:()=>a(e),onDelete:()=>i(e),className:"text-muted-foreground"}),(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the thread"}),children:(0,t.jsx)(o.X,{})})]}),(0,t.jsx)(S.Conversation,{thread:p,tab:f,onTab:t=>m(n=>({...n,[e.id]:t})),className:"max-h-none min-h-0 flex-1 px-5",tabsClassName:"px-5"}),(0,t.jsx)("div",{className:"shrink-0 px-5 pt-2 pb-4",children:(0,t.jsx)(O.ThreadReply,{thread:{id:e.id,label:e.label,bot:e.bot,ask:e.ask,room:e.room},status:e.status,faces:(0,T.rosterOf)(p),to:f??e.bot})})]})})})})]})}function B(e,t){let n=t?.find(t=>t.name===e)?.icon;return{color:n?.color,shape:n?.shape,outline:n?.outline,paint:n?.paint}}function P({thread:e}){let n=[];if(e.lines.forEach((t,s)=>{if("tool"!==t.kind)return;let a=e.lines[s+1];n.push({step:t,took:a?(0,C.toDate)(a.at).getTime()-(0,C.toDate)(t.at).getTime():null})}),0===n.length)return null;let a=(0,C.toDate)(e.updatedAt).getTime()-(0,C.toDate)(e.createdAt).getTime();return(0,t.jsxs)("div",{className:"pointer-events-none absolute top-[calc(100%-0.75rem)] left-17 z-20 hidden w-96 max-w-[calc(100%-5rem)] rounded-xl bg-background p-3 pb-2 shadow-xl shadow-black/10 ring-1 ring-border/60 group-hover/row:block",children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)("span",{children:e.bot}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsxs)("span",{children:[n.length," ",1===n.length?"step":"steps"]}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsx)("span",{children:L(a)})]}),n.slice(-6).map(({step:e,took:n})=>{let a=(0,y.toolIcon)(e.name);return(0,t.jsxs)("div",{className:"flex h-5.5 items-center gap-2 font-mono text-[11px]",children:[null===n?(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}):(0,t.jsx)(a,{className:"size-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",children:e.name}),null===n?(0,t.jsx)(m.ShinyText,{text:e.note??e.input,speed:2.2,className:"min-w-0 flex-1 truncate"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:e.note??e.input}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right text-muted-foreground/70 tabular-nums",children:null===n?"":L(n)})]},e.id)})]})}function L(e){let t=Math.max(0,e)/1e3;if(t<10)return`${t.toFixed(1)}s`;if(t<60)return`${Math.round(t)}s`;let n=Math.floor(t/60);return`${n}m ${Math.round(t-60*n)}s`}function E(){return(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)(p.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)(p.Skeleton,{className:"h-3 w-40 max-w-full"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-80 max-w-full"})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-1.5",$),children:[(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-12"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-24"})]}),(0,t.jsx)("span",{className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"size-7 shrink-0"})]})}e.s(["ThreadSetting",0,function(){let[e,n]=(0,l.useState)(null),[s,a]=(0,l.useState)(""),{data:i}=(0,R.useServerRoute)(d.queryKey.bot),{items:r,isLoading:o,isLoadingMore:u,error:x,hasMore:m,sentinelRef:p}=(0,A.useServerPages)({key:(e,t)=>{if(0===e)return d.queryKey.threadHistory(null);let n=t?.at(-1);return n?d.queryKey.threadHistory((0,C.toDate)(n.updatedAt).toISOString()):null},size:f.PAGE_SIZE}),j=r.find(t=>t.id===e);(0,T.useSeenOnDetail)(j);let[N]=(0,z.useServerAction)(g.cancelThreadAction,{onOk:e=>{(0,R.revalidate)(d.queryKey.threads),T.screenActs.announce({kind:"stopped",id:e.id,label:e.label})}}),[v]=(0,z.useServerAction)(k,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),[w]=(0,z.useServerAction)(b,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),y=s.trim().toLowerCase(),S=y?r.filter(e=>[e.label,e.outcome,e.bot].join(" ").toLowerCase().includes(y)):r,D=async()=>{await h.notify.confirm({title:"Clear finished jobs?",description:"Everything done or stopped goes, messages included. Running and waiting jobs stay.",okText:"Clear",destructive:!0})&&w()},I=async t=>{if(!await h.notify.confirm({title:`Delete "${t.label}"?`,description:"Its messages go with it — nothing can be picked back up.",okText:"Delete",destructive:!0}))return;let s=S.findIndex(e=>e.id===t.id),a=S[s+1]??S[s-1];try{await v(t.id)}catch{return}t.id===e&&n(a?.id??null)};if(o)return(0,t.jsx)(M.SettingSkeleton,{rows:3});if(x)return(0,t.jsx)(M.SettingError,{message:x.message});let O=r.filter(e=>"waiting"===e.status).length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.SettingScreen,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(M.SettingRailNote,{children:[r.length," loaded",O>0&&` \xb7 ${O} waiting on you`]}),(0,t.jsx)(c.Button,{variant:"outline",size:"sm",onClick:D,children:"Clear finished"})]}),children:(0,t.jsx)(M.SettingGroup,{filter:(0,t.jsx)(M.SettingFilter,{value:s,onChange:a,placeholder:"Filter by label, bot or word"}),right:y?`${S.length} of ${r.length}`:void 0,children:(0,t.jsxs)(M.SettingItems,{children:[0===S.length?(0,t.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:y?"Nothing loaded matches. Keep scrolling to search further back.":"Nothing yet. When Thursday hands a job to a bot mid-call, it shows up here — while it runs, and after."}):S.map(e=>(0,t.jsx)(F,{thread:e,bots:i,open:e.id===j?.id,onOpen:()=>n(e.id),onStop:()=>N(e.id),onDelete:()=>I(e)},e.id)),(0,t.jsx)(M.SettingMore,{hasMore:m,loading:u,sentinelRef:p,ghost:(0,t.jsx)(E,{}),className:"divide-y divide-border/60"})]})})}),(0,t.jsx)(q,{thread:j,bots:i,onClose:()=>n(null),onStop:e=>N(e.id),onDelete:I})]})}],457343)},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},759659,e=>{"use strict";var t=e.i(456420);let n={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"]};n.node;let s=(0,t.default)(n);e.s(["Trash2",0,s],759659)}]);
1
+ (globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,457343,e=>{"use strict";var t=e.i(843476),n=e.i(867927),s=e.i(632781),a=e.i(648119),i=e.i(929272),r=e.i(759659),o=e.i(263676),l=e.i(271645),d=e.i(798120),c=e.i(167881),u=e.i(630374),x=e.i(463415),h=e.i(917162),m=e.i(660302),p=e.i(671428),f=e.i(41533),g=e.i(462945),j=e.i(95187);let b=(0,j.createServerReference)("7ff6815900e05d36ea29961dbdd1220d2f2c747e21",j.callServer,void 0,j.findSourceMapURL,"clearFinishedThreadsAction"),k=(0,j.createServerReference)("7f500e0b8018b42ed8661706a7d29c8ff2468b79f2",j.callServer,void 0,j.findSourceMapURL,"deleteThreadAction");var N=e.i(451888),v=e.i(635963),w=e.i(835878),y=e.i(222055),S=e.i(351866),T=e.i(978411),D=e.i(431594),M=e.i(895836),C=e.i(245629),z=e.i(609856),A=e.i(661504),R=e.i(283653),I=e.i(647163),O=e.i(399512);let $="w-36";function F({thread:e,bots:a,open:i,onOpen:r,onStop:o,onDelete:d}){let c="running"===e.status,u=(0,l.useMemo)(()=>(0,T.threadFromRow)(e,a),[e,a]),x=function(e){let t=e.room.questions[0];if(t)return{text:(0,I.plainText)(t.text),tone:I.WAITING_INK};if("waiting"===e.status&&e.ask)return{text:(0,N.isAppStop)(e.ask)?(0,I.plainText)(e.outcome??e.ask.question):e.ask.question,tone:I.WAITING_INK};let n=e.seen;if("cancelled"===e.status)return{text:"Stopped",tone:"text-muted-foreground"};if("done"===e.status)return{text:(0,I.plainText)(e.outcome??"Done"),tone:n?"text-muted-foreground":"text-foreground/80"};for(let t=e.lines.length-1;t>=0;t--){let n=e.lines[t];if("tool"===n.kind)return{text:n.note??n.input,tone:"text-muted-foreground",tool:n.name,shine:!0};if("text"===n.kind)return{text:n.text,tone:"text-muted-foreground",shine:!0};if("user"===n.kind)break}return{text:`${e.bot} is taking it on…`,tone:"text-muted-foreground italic",shine:!0}}(e),h=e.tokens.input+e.tokens.output;return(0,t.jsxs)("div",{className:(0,I.cn)("group/row relative transition-colors",i?"bg-muted/80":"hover:bg-muted/50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(v.BotMark,{size:40,seed:e.bot,...B(e.bot,a),state:c?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),e.routineId&&(0,t.jsx)("span",{title:"Started by a routine",className:"shrink-0",children:(0,t.jsx)(D.RoutineMark,{className:"size-3 text-muted-foreground/80"})}),(0,t.jsx)(w.BotRoster,{bots:(0,T.rosterOf)(u)}),c&&(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),x&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] leading-snug",children:[x.tool&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:x.tool}),x.shine?(0,t.jsx)(m.ShinyText,{text:x.text,speed:2.2,className:"min-w-0 truncate"}):(0,t.jsx)("span",{className:(0,I.cn)("min-w-0 truncate",x.tone),children:x.text})]})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",$),children:[(0,t.jsx)("span",{children:(0,C.whenOf)(e.updatedAt)}),(0,t.jsxs)("span",{className:"max-w-full truncate text-muted-foreground/70",title:h>0?`${e.id} \xb7 in ${(0,I.formatCount)(e.tokens.input)} \xb7 out ${(0,I.formatCount)(e.tokens.output)}`:e.id,children:[e.bot,h>0&&` \xb7 ${(0,I.formatCount)(h)}`]})]}),(0,t.jsx)(n.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]}),(0,t.jsx)(K,{thread:e,onStop:o,onDelete:d})]}),c&&(0,t.jsx)(P,{thread:e})]})}function K({thread:e,onStop:n,onDelete:s,className:o}){let l="running"===e.status||"waiting"===e.status;return(0,t.jsxs)(x.DropdownMenu,{children:[(0,t.jsx)(x.DropdownMenuTrigger,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost",className:o}),children:(0,t.jsx)(a.MoreHorizontal,{})}),(0,t.jsxs)(x.DropdownMenuContent,{align:"end",children:[l&&(0,t.jsxs)(x.DropdownMenuItem,{onClick:n,children:[(0,t.jsx)(i.Square,{}),"Stop"]}),(0,t.jsxs)(x.DropdownMenuItem,{variant:"destructive",onClick:s,children:[(0,t.jsx)(r.Trash2,{}),"Delete"]})]})]})}function q({thread:e,bots:n,onClose:s,onStop:a,onDelete:i}){let[r,d]=(0,l.useState)(null),x=(0,l.useCallback)(e=>{d(e?.closest("[data-slot=dialog-content]")??null)},[]),[h,m]=(0,l.useState)({}),p=(0,l.useMemo)(()=>e?(0,T.threadFromRow)(e,n):null,[e,n]),f=e?h[e.id]??null:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{ref:x,hidden:!0}),(0,t.jsx)(u.Dialog,{open:!!(e&&r),onOpenChange:e=>!e&&s(),modal:!1,disablePointerDismissal:!0,children:(0,t.jsx)(u.DialogPortal,{container:r,children:(0,t.jsx)(u.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:e&&p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[(0,t.jsx)(v.BotMark,{size:28,seed:e.bot,...B(e.bot,n),state:"running"===e.status?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(u.DialogTitle,{className:"sr-only",children:e.label}),(0,t.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:e.label}),(0,t.jsxs)("div",{className:"mt-0.5 flex min-w-0 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsxs)("span",{title:e.id,className:"min-w-0 truncate",children:[e.bot," · ",(0,C.whenOf)(e.updatedAt)]}),(0,t.jsx)(S.ThreadFacts,{thread:p})]})]}),(0,t.jsx)(K,{thread:e,onStop:()=>a(e),onDelete:()=>i(e),className:"text-muted-foreground"}),(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the thread"}),children:(0,t.jsx)(o.X,{})})]}),(0,t.jsx)(S.Conversation,{thread:p,tab:f,onTab:t=>m(n=>({...n,[e.id]:t})),className:"max-h-none min-h-0 flex-1 px-5",tabsClassName:"px-5"}),(0,t.jsx)("div",{className:"shrink-0 px-5 pt-2 pb-4",children:(0,t.jsx)(O.ThreadReply,{thread:{id:e.id,label:e.label,bot:e.bot,ask:e.ask,room:e.room},status:e.status,faces:(0,T.rosterOf)(p),to:f??e.bot})})]})})})})]})}function B(e,t){let n=t?.find(t=>t.name===e)?.icon;return{color:n?.color,shape:n?.shape,outline:n?.outline,paint:n?.paint}}function P({thread:e}){let n=[];if(e.lines.forEach((t,s)=>{if("tool"!==t.kind)return;let a=e.lines[s+1];n.push({step:t,took:a?(0,C.toDate)(a.at).getTime()-(0,C.toDate)(t.at).getTime():null})}),0===n.length)return null;let a=(0,C.toDate)(e.updatedAt).getTime()-(0,C.toDate)(e.createdAt).getTime();return(0,t.jsxs)("div",{className:"pointer-events-none absolute top-[calc(100%-0.75rem)] left-17 z-20 hidden w-96 max-w-[calc(100%-5rem)] rounded-xl bg-background p-3 pb-2 shadow-xl shadow-black/10 ring-1 ring-border/60 group-hover/row:block",children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)("span",{children:e.bot}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsxs)("span",{children:[n.length," ",1===n.length?"step":"steps"]}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsx)("span",{children:L(a)})]}),n.slice(-6).map(({step:e,took:n})=>{let a=(0,y.toolIcon)(e.name);return(0,t.jsxs)("div",{className:"flex h-5.5 items-center gap-2 font-mono text-[11px]",children:[null===n?(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}):(0,t.jsx)(a,{className:"size-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",children:e.name}),null===n?(0,t.jsx)(m.ShinyText,{text:e.note??e.input,speed:2.2,className:"min-w-0 flex-1 truncate"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:e.note??e.input}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right text-muted-foreground/70 tabular-nums",children:null===n?"":L(n)})]},e.id)})]})}function L(e){let t=Math.max(0,e)/1e3;if(t<10)return`${t.toFixed(1)}s`;if(t<60)return`${Math.round(t)}s`;let n=Math.floor(t/60);return`${n}m ${Math.round(t-60*n)}s`}function E(){return(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)(p.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)(p.Skeleton,{className:"h-3 w-40 max-w-full"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-80 max-w-full"})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-1.5",$),children:[(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-12"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-24"})]}),(0,t.jsx)("span",{className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"size-7 shrink-0"})]})}e.s(["ThreadSetting",0,function(){let[e,n]=(0,l.useState)(null),[s,a]=(0,l.useState)(""),{data:i}=(0,R.useServerRoute)(d.queryKey.bot),{items:r,isLoading:o,isLoadingMore:u,error:x,hasMore:m,sentinelRef:p}=(0,A.useServerPages)({key:(e,t)=>{if(0===e)return d.queryKey.threadHistory(null);let n=t?.at(-1);return n?d.queryKey.threadHistory((0,C.toDate)(n.updatedAt).toISOString()):null},size:f.PAGE_SIZE}),j=r.find(t=>t.id===e);(0,T.useSeenOnDetail)(j);let[N]=(0,z.useServerAction)(g.cancelThreadAction,{onOk:e=>{(0,R.revalidate)(d.queryKey.threads),T.screenActs.announce({kind:"stopped",id:e.id,label:e.label})}}),[v]=(0,z.useServerAction)(k,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),[w]=(0,z.useServerAction)(b,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),y=s.trim().toLowerCase(),S=y?r.filter(e=>[e.label,e.outcome,e.bot].join(" ").toLowerCase().includes(y)):r,D=async()=>{await h.notify.confirm({title:"Clear finished jobs?",description:"Everything done or stopped goes, messages included. Running and waiting jobs stay.",okText:"Clear",destructive:!0})&&w()},I=async t=>{if(!await h.notify.confirm({title:`Delete "${t.label}"?`,description:"Its messages go with it — nothing can be picked back up.",okText:"Delete",destructive:!0}))return;let s=S.findIndex(e=>e.id===t.id),a=S[s+1]??S[s-1];try{await v(t.id)}catch{return}t.id===e&&n(a?.id??null)};if(o)return(0,t.jsx)(M.SettingSkeleton,{rows:3});if(x)return(0,t.jsx)(M.SettingError,{message:x.message});let O=r.filter(e=>"waiting"===e.status).length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.SettingScreen,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(M.SettingRailNote,{children:[r.length," loaded",O>0&&` \xb7 ${O} waiting on you`]}),(0,t.jsx)(c.Button,{variant:"outline",size:"sm",onClick:D,children:"Clear finished"})]}),children:(0,t.jsx)(M.SettingGroup,{filter:(0,t.jsx)(M.SettingFilter,{value:s,onChange:a,placeholder:"Filter by label, bot or word"}),right:y?`${S.length} of ${r.length}`:void 0,children:(0,t.jsxs)(M.SettingItems,{children:[0===S.length?(0,t.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:y?"Nothing loaded matches. Keep scrolling to search further back.":"Nothing yet. When Thursday hands a job to a bot mid-call, it shows up here — while it runs, and after."}):S.map(e=>(0,t.jsx)(F,{thread:e,bots:i,open:e.id===j?.id,onOpen:()=>n(e.id),onStop:()=>N(e.id),onDelete:()=>I(e)},e.id)),(0,t.jsx)(M.SettingMore,{hasMore:m,loading:u,sentinelRef:p,ghost:(0,t.jsx)(E,{}),className:"divide-y divide-border/60"})]})})}),(0,t.jsx)(q,{thread:j,bots:i,onClose:()=>n(null),onStop:e=>N(e.id),onDelete:I})]})}],457343)},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},759659,e=>{"use strict";var t=e.i(456420);let n={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"]};n.node;let s=(0,t.default)(n);e.s(["Trash2",0,s],759659)}]);
@@ -12,7 +12,7 @@
12
12
  stroke: revert;
13
13
  stroke-width: revert;
14
14
  }
15
- `,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),a=t.i(419524),r=t.i(139941);t.i(947716);var i=t.i(723685),s=(0,a.__name)((t,e)=>{let a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a},"drawRect"),l=(0,a.__name)((t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),n=(0,a.__name)((t,a)=>{let r=a.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",a.x),i.attr("y",a.y),i.attr("class","legend"),i.style("text-anchor",a.anchor),a.class&&i.attr("class",a.class);let s=i.append("tspan");return s.attr("x",a.x+2*a.textMargin),s.text(r),i},"drawText"),o=(0,a.__name)((t,e,a,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,a.__name)((t,e,a,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,a.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),a=t.i(508324),r=t.i(419524),i=(0,r.__name)((t,r,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,r);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,r);t.attr("viewBox",g),a.log.debug(`viewBox configured: ${g} with padding: ${r}`)},"setupViewPortForSVG"),s=(0,r.__name)((t,e)=>{let a=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*e,height:a.height+2*e,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),l=(0,r.__name)((t,e,a,r,i)=>`${t-i} ${e-i} ${a} ${r}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var a=t.i(723685),r=(0,e.__name)((t,e)=>{let r;return"sandbox"===e&&(r=(0,a.select)("#i"+t)),("sandbox"===e?(0,a.select)(r.nodes()[0].contentDocument.body):(0,a.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,r])},557786,t=>{"use strict";var e=t.i(708664);t.i(248585),t.i(117204),t.i(865264),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324);var a=(0,t.i(419524).__name)(t=>`${(0,e.styles_default)(t)}
15
+ `,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),a=t.i(419524),r=t.i(779879);t.i(947716);var i=t.i(723685),s=(0,a.__name)((t,e)=>{let a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a},"drawRect"),l=(0,a.__name)((t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),n=(0,a.__name)((t,a)=>{let r=a.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",a.x),i.attr("y",a.y),i.attr("class","legend"),i.style("text-anchor",a.anchor),a.class&&i.attr("class",a.class);let s=i.append("tspan");return s.attr("x",a.x+2*a.textMargin),s.text(r),i},"drawText"),o=(0,a.__name)((t,e,a,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,a.__name)((t,e,a,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,a.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),a=t.i(508324),r=t.i(419524),i=(0,r.__name)((t,r,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,r);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,r);t.attr("viewBox",g),a.log.debug(`viewBox configured: ${g} with padding: ${r}`)},"setupViewPortForSVG"),s=(0,r.__name)((t,e)=>{let a=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*e,height:a.height+2*e,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),l=(0,r.__name)((t,e,a,r,i)=>`${t-i} ${e-i} ${a} ${r}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var a=t.i(723685),r=(0,e.__name)((t,e)=>{let r;return"sandbox"===e&&(r=(0,a.select)("#i"+t)),("sandbox"===e?(0,a.select)(r.nodes()[0].contentDocument.body):(0,a.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,r])},557786,t=>{"use strict";var e=t.i(708664);t.i(248585),t.i(117204),t.i(865264),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324);var a=(0,t.i(419524).__name)(t=>`${(0,e.styles_default)(t)}
16
16
  .swimlane.cluster rect {
17
17
  stroke: ${t.clusterBorder} !important;
18
18
  }
@@ -12,4 +12,4 @@
12
12
  stroke: revert;
13
13
  stroke-width: revert;
14
14
  }
15
- `,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),r=t.i(419524),a=t.i(139941);t.i(947716);var i=t.i(723685),s=(0,r.__name)((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)r.attr(t,e.attrs[t]);return e.class&&r.attr("class",e.class),r},"drawRect"),l=(0,r.__name)((t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),n=(0,r.__name)((t,r)=>{let a=r.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",r.x),i.attr("y",r.y),i.attr("class","legend"),i.style("text-anchor",r.anchor),r.class&&i.attr("class",r.class);let s=i.append("tspan");return s.attr("x",r.x+2*r.textMargin),s.text(a),i},"drawText"),o=(0,r.__name)((t,e,r,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",r);let l=(0,a.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,r.__name)((t,e,r,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",r);let l=(0,a.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,r.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,r.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,r.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),r=t.i(508324),a=t.i(419524),i=(0,a.__name)((t,a,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,a);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,a);t.attr("viewBox",g),r.log.debug(`viewBox configured: ${g} with padding: ${a}`)},"setupViewPortForSVG"),s=(0,a.__name)((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+2*e,height:r.height+2*e,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),l=(0,a.__name)((t,e,r,a,i)=>`${t-i} ${e-i} ${r} ${a}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var r=t.i(723685),a=(0,e.__name)((t,e)=>{let a;return"sandbox"===e&&(a=(0,r.select)("#i"+t)),("sandbox"===e?(0,r.select)(a.nodes()[0].contentDocument.body):(0,r.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,a])},59618,t=>{"use strict";var e=t.i(499272);t.i(248585),t.i(117204),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324);var r=t.i(419524),a={parser:e.classDiagram_default,get db(){return new e.ClassDB},renderer:e.classRenderer_v3_unified_default,styles:e.styles_default,init:(0,r.__name)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};t.s(["diagram",0,a])}]);
15
+ `,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),r=t.i(419524),a=t.i(779879);t.i(947716);var i=t.i(723685),s=(0,r.__name)((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)r.attr(t,e.attrs[t]);return e.class&&r.attr("class",e.class),r},"drawRect"),l=(0,r.__name)((t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),n=(0,r.__name)((t,r)=>{let a=r.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",r.x),i.attr("y",r.y),i.attr("class","legend"),i.style("text-anchor",r.anchor),r.class&&i.attr("class",r.class);let s=i.append("tspan");return s.attr("x",r.x+2*r.textMargin),s.text(a),i},"drawText"),o=(0,r.__name)((t,e,r,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",r);let l=(0,a.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,r.__name)((t,e,r,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",r);let l=(0,a.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,r.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,r.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,r.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),r=t.i(508324),a=t.i(419524),i=(0,a.__name)((t,a,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,a);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,a);t.attr("viewBox",g),r.log.debug(`viewBox configured: ${g} with padding: ${a}`)},"setupViewPortForSVG"),s=(0,a.__name)((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+2*e,height:r.height+2*e,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),l=(0,a.__name)((t,e,r,a,i)=>`${t-i} ${e-i} ${r} ${a}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var r=t.i(723685),a=(0,e.__name)((t,e)=>{let a;return"sandbox"===e&&(a=(0,r.select)("#i"+t)),("sandbox"===e?(0,r.select)(a.nodes()[0].contentDocument.body):(0,r.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,a])},59618,t=>{"use strict";var e=t.i(499272);t.i(248585),t.i(117204),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324);var r=t.i(419524),a={parser:e.classDiagram_default,get db(){return new e.ClassDB},renderer:e.classRenderer_v3_unified_default,styles:e.styles_default,init:(0,r.__name)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};t.s(["diagram",0,a])}]);
@@ -12,4 +12,4 @@
12
12
  stroke: revert;
13
13
  stroke-width: revert;
14
14
  }
15
- `,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),a=t.i(419524),r=t.i(139941);t.i(947716);var i=t.i(723685),s=(0,a.__name)((t,e)=>{let a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a},"drawRect"),l=(0,a.__name)((t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),n=(0,a.__name)((t,a)=>{let r=a.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",a.x),i.attr("y",a.y),i.attr("class","legend"),i.style("text-anchor",a.anchor),a.class&&i.attr("class",a.class);let s=i.append("tspan");return s.attr("x",a.x+2*a.textMargin),s.text(r),i},"drawText"),o=(0,a.__name)((t,e,a,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,a.__name)((t,e,a,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,a.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),a=t.i(508324),r=t.i(419524),i=(0,r.__name)((t,r,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,r);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,r);t.attr("viewBox",g),a.log.debug(`viewBox configured: ${g} with padding: ${r}`)},"setupViewPortForSVG"),s=(0,r.__name)((t,e)=>{let a=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*e,height:a.height+2*e,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),l=(0,r.__name)((t,e,a,r,i)=>`${t-i} ${e-i} ${a} ${r}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var a=t.i(723685),r=(0,e.__name)((t,e)=>{let r;return"sandbox"===e&&(r=(0,a.select)("#i"+t)),("sandbox"===e?(0,a.select)(r.nodes()[0].contentDocument.body):(0,a.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,r])},595502,t=>{"use strict";var e=t.i(708664);t.i(248585),t.i(117204),t.i(865264),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324),t.s([],631220),t.i(631220),t.s(["diagram",()=>e.diagram],595502)}]);
15
+ `,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),a=t.i(419524),r=t.i(779879);t.i(947716);var i=t.i(723685),s=(0,a.__name)((t,e)=>{let a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a},"drawRect"),l=(0,a.__name)((t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),n=(0,a.__name)((t,a)=>{let r=a.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",a.x),i.attr("y",a.y),i.attr("class","legend"),i.style("text-anchor",a.anchor),a.class&&i.attr("class",a.class);let s=i.append("tspan");return s.attr("x",a.x+2*a.textMargin),s.text(r),i},"drawText"),o=(0,a.__name)((t,e,a,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,a.__name)((t,e,a,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,a.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),a=t.i(508324),r=t.i(419524),i=(0,r.__name)((t,r,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,r);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,r);t.attr("viewBox",g),a.log.debug(`viewBox configured: ${g} with padding: ${r}`)},"setupViewPortForSVG"),s=(0,r.__name)((t,e)=>{let a=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*e,height:a.height+2*e,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),l=(0,r.__name)((t,e,a,r,i)=>`${t-i} ${e-i} ${a} ${r}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var a=t.i(723685),r=(0,e.__name)((t,e)=>{let r;return"sandbox"===e&&(r=(0,a.select)("#i"+t)),("sandbox"===e?(0,a.select)(r.nodes()[0].contentDocument.body):(0,a.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,r])},595502,t=>{"use strict";var e=t.i(708664);t.i(248585),t.i(117204),t.i(865264),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324),t.s([],631220),t.i(631220),t.s(["diagram",()=>e.diagram],595502)}]);
package/README.md CHANGED
@@ -14,7 +14,7 @@ You talk. Bots take the slow work to a real browser, a shell and your files, and
14
14
 
15
15
  [English](README.md) · [한국어](README.ko.md)
16
16
 
17
- ![A live call: she answers a weather question herself while a bot's finished page lands in the corner](docs/images/demo.gif)
17
+ ![A live call: asked "Jarvis, how's it going?", she checks on the bot's job and says the GitHub Trending page is done](docs/images/demo.gif)
18
18
 
19
19
  [▶ Watch the 90-second demo, with sound](https://youtu.be/V7fBDY3cYRU)
20
20
 
@@ -2,12 +2,9 @@ import { asSchema } from "ai";
2
2
  import z from "zod";
3
3
  import { loadTools } from "@/features/ai/load-tools";
4
4
  import { modelErrorToString } from "@/features/ai/model";
5
- import { createServerProbe } from "@/lib/probe.server";
6
5
  import { serverRoute } from "@/lib/protocol/server-route";
7
6
  import { publicError } from "@/lib/public-error";
8
7
 
9
- const probe = createServerProbe("server");
10
-
11
8
  /**
12
9
  * Executes a tool call from the voice session. The page forwards what the model
13
10
  * asked for; bots never come through here (they call `execute` directly).
@@ -58,7 +55,6 @@ export const POST = serverRoute(async (request) => {
58
55
  );
59
56
  }
60
57
 
61
- const began = Date.now();
62
58
  try {
63
59
  const output = await tool.execute(parsed?.value ?? input ?? {}, {
64
60
  toolCallId,
@@ -66,18 +62,8 @@ export const POST = serverRoute(async (request) => {
66
62
  context: undefined,
67
63
  abortSignal: request.signal,
68
64
  });
69
- const drained = await drain(output);
70
- probe("tool", {
71
- callId,
72
- name,
73
- input,
74
- ms: Date.now() - began,
75
- // The rows keep a tool's arguments only; what it answered is kept here
76
- output: JSON.stringify(drained)?.slice(0, 3000),
77
- });
78
- return { output: drained };
65
+ return { output: await drain(output) };
79
66
  } catch (cause) {
80
- probe("tool.failed", { callId, name, input, error: String(cause) });
81
67
  // A tool failure is a line the model reads and recovers from, not a masked server error.
82
68
  publicError(`"${name}" failed: ${modelErrorToString(cause)}`);
83
69
  }
Binary file
@@ -23,17 +23,20 @@ delegation is a different integration: its notification contains metadata, not t
23
23
  text, so the application would have to reconstruct the request and operate the backend.
24
24
 
25
25
  The voice and the backend are one assistant. Both prompts open with the same identity
26
- (`thursdayIdentity`) and the same rule for ending the call (`callEnding`), read the same
26
+ (`thursdayIdentity`), each followed by its own rule for ending the call, read the same
27
27
  memory, and neither is told it is part of something else. The voice holds conversation and
28
28
  memory only. Right under the identity, `## Always` groups what holds on every turn: the ending
29
29
  rule (the only line marked `IMPORTANT`), the guide's starter backchannel and interruption
30
- policies, and under the guide's `Delegation policy` label three lines — hand everything but
31
- greetings, small talk and a brief clarification to the backend; hand over whatever the user says
32
- about themselves, their people, their plans or how they want things done as they say it, unless
33
- it is already written in the prompt; answer from what the backend returns without guessing while
34
- waiting. Live decides by itself whether to delegate, so the rule stays even this short. It says
35
- nothing else about how to speak; it sees no tool schema and no tool name but `end_call`, in the
36
- ending rule. The backend prompt holds the work: memory (merging a fact that repeats or changes one
30
+ policies, and the guide's `Delegation policy` under its three labels: `Backend tools` names
31
+ what the backend can do (end the call, background work, routines, memory, this computer and the
32
+ web) and never how; `Delegate to the backend when` is the user wanting the call to end, anything
33
+ on that list or a change to work already asked for, and whatever the user says about themselves,
34
+ their people, their plans or how they want things done, unless it is already written in the
35
+ prompt; `Do not delegate to the backend when` is greetings, small talk, only wanting her to stop
36
+ talking, what the conversation already answers, and a brief clarification. Live decides by
37
+ itself whether to delegate, and it decides from that list: without it (09-17 to 09-19) a
38
+ hang-up, a stop or a routine was answered and never handed over. It says nothing else about how
39
+ to speak; it sees no tool schema and no tool name but `end_call`, in the ending rule. The backend prompt holds the work: memory (merging a fact that repeats or changes one
37
40
  already kept, and tidying with the user past the limits), background work and threads, this
38
41
  computer, what to return, and the earlier calls. A request that carries earlier work further goes to
39
42
  that thread; one that stands on its own opens a new one; it asks the user only when it could be
@@ -212,10 +215,15 @@ for a goodbye, which would leave the ending to the model.
212
215
 
213
216
  The user wanting the call to end, however they say it, sets everything else aside: the
214
217
  voice answers yes and hands it to the backend at once, and the backend runs `end_call`
215
- without deliberating. The ending rule names `end_call` in the voice prompt too, the one tool
216
- name it holds: without it, ending read as something to say rather than do.
218
+ without deliberating. The voice's rule names `end_call` too, the one tool name it holds:
219
+ without it, ending read as something to say rather than do. The two rules say what each
220
+ side can do: while they were one sentence ("forget every other task, answer yes, then use
221
+ the tool"), the voice said yes and went quiet with the line open, four times in five
222
+ (09-20), so its rule says to hand the turn over, and that a yes alone leaves the line open.
217
223
  Whether that turn reaches the backend at all is the voice's own decision, and it often
218
- answers and hands nothing over (measured 09-18: eight calls, none ended by asking). The
224
+ answers and hands nothing over. Ending the call leads the `Backend tools` list for that
225
+ reason: with the list, five calls in seven ended by asking (09-16); without it, one in 21,
226
+ then none in 34 (09-17 to 09-19). The
219
227
  quiet hang-up below is what ends such a call.
220
228
  The page does not close on `end_call` itself: it waits until her voice has been quiet
221
229
  for `CALL_END.quietMs`, or `CALL_END.unsaidMs` when nothing was said, never past