thursday-agent 0.8.0 → 0.9.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 (264) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +3 -3
  3. package/.next/prerender-manifest.json +3 -3
  4. package/.next/server/app/_global-error/page.js.nft.json +1 -1
  5. package/.next/server/app/_global-error.html +1 -1
  6. package/.next/server/app/_global-error.rsc +1 -1
  7. package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
  8. package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
  9. package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  10. package/.next/server/app/_not-found/page.js.nft.json +1 -1
  11. package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
  12. package/.next/server/app/_not-found.html +1 -1
  13. package/.next/server/app/_not-found.rsc +2 -2
  14. package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
  15. package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
  16. package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  17. package/.next/server/app/api/artifact/route.js.nft.json +1 -1
  18. package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
  19. package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
  20. package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
  21. package/.next/server/app/api/bot/route.js.nft.json +1 -1
  22. package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
  23. package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
  24. package/.next/server/app/api/config/route.js.nft.json +1 -1
  25. package/.next/server/app/api/events/route.js.nft.json +1 -1
  26. package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
  27. package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
  28. package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
  29. package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
  30. package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
  31. package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
  32. package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
  33. package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
  34. package/.next/server/app/api/mcp/route.js.nft.json +1 -1
  35. package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
  36. package/.next/server/app/api/memory/edit/route.js +1 -1
  37. package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
  38. package/.next/server/app/api/memory/route.js.nft.json +1 -1
  39. package/.next/server/app/api/probe/route.js.nft.json +1 -1
  40. package/.next/server/app/api/reach/route.js +11 -11
  41. package/.next/server/app/api/reach/route.js.nft.json +1 -1
  42. package/.next/server/app/api/routine/route.js +6 -6
  43. package/.next/server/app/api/routine/route.js.nft.json +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 +11 -11
  50. package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
  51. package/.next/server/app/api/thursday/tool-call/route.js +6 -6
  52. package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
  53. package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
  54. package/.next/server/app/api/workspace/route.js.nft.json +1 -1
  55. package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
  56. package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
  57. package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
  58. package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
  59. package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  60. package/.next/server/app/page/server-reference-manifest.json +56 -56
  61. package/.next/server/app/page.js +3 -3
  62. package/.next/server/app/page.js.nft.json +1 -1
  63. package/.next/server/app/page_client-reference-manifest.js +1 -1
  64. package/.next/server/chunks/[root-of-the-server]__012s2o8._.js +1 -1
  65. package/.next/server/chunks/[root-of-the-server]__04r4h-2._.js +1 -1
  66. package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
  67. package/.next/server/chunks/[root-of-the-server]__0nmhgeo._.js +3 -0
  68. package/.next/server/chunks/[root-of-the-server]__1fy2g82._.js +3 -0
  69. package/.next/server/chunks/[root-of-the-server]__1ndi14y._.js +1 -1
  70. package/.next/server/chunks/[root-of-the-server]__1nmflqk._.js +3 -0
  71. package/.next/server/chunks/[root-of-the-server]__1v7-zke._.js +1 -1
  72. package/.next/server/chunks/[root-of-the-server]__1wnzmx9._.js +3 -0
  73. package/.next/server/chunks/[root-of-the-server]__1xv-5cq._.js +1 -1
  74. package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
  75. package/.next/server/chunks/_05v8k21._.js +1 -1
  76. package/.next/server/chunks/_0awtznl._.js +4 -4
  77. package/.next/server/chunks/_0k6qjcf._.js +1 -1
  78. package/.next/server/chunks/_0na2fj1._.js +5 -5
  79. package/.next/server/chunks/_0x-ej3f._.js +21 -21
  80. package/.next/server/chunks/_1dc_d1q._.js +22 -20
  81. package/.next/server/chunks/_1jc5g4p._.js +2 -2
  82. package/.next/server/chunks/_1jn-aep._.js +50 -48
  83. package/.next/server/chunks/{_1u8ygbz._.js → _1m88lkh._.js} +7 -7
  84. package/.next/server/chunks/_1uuucy-._.js +4 -4
  85. package/.next/server/chunks/_1v9r2ke._.js +1 -1
  86. package/.next/server/chunks/ssr/{[root-of-the-server]__1h4bnrf._.js → [root-of-the-server]__0oo-wlv._.js} +2 -2
  87. package/.next/server/chunks/ssr/{[root-of-the-server]__1kyi568._.js → [root-of-the-server]__0tvavy9._.js} +1 -1
  88. package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +1 -1
  89. package/.next/server/chunks/ssr/[root-of-the-server]__0zuns7e._.js +3 -0
  90. package/.next/server/chunks/ssr/[root-of-the-server]__1se25x0._.js +1 -1
  91. package/.next/server/chunks/ssr/{_1i3ddn7._.js → _05pl_u8._.js} +1 -1
  92. package/.next/server/chunks/ssr/_070nv1_._.js +3 -0
  93. package/.next/server/chunks/ssr/_097-ljd._.js +1 -1
  94. package/.next/server/chunks/ssr/_0dshsh4._.js +3 -0
  95. package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
  96. package/.next/server/chunks/ssr/{_0z8jpch._.js → _0ital-2._.js} +2 -2
  97. package/.next/server/chunks/ssr/{_19g570d._.js → _0kjj5ts._.js} +3 -3
  98. package/.next/server/chunks/ssr/{_1nod5hh._.js → _0l_mcfz._.js} +2 -2
  99. package/.next/server/chunks/ssr/_0ld9_qq._.js +1 -1
  100. package/.next/server/chunks/ssr/_0ltz2q5._.js +3 -0
  101. package/.next/server/chunks/ssr/_0scf7xy._.js +3 -0
  102. package/.next/server/chunks/ssr/_0u5xv6g._.js +3 -0
  103. package/.next/server/chunks/ssr/{_0ewory0._.js → _0urj3mc._.js} +2 -2
  104. package/.next/server/chunks/ssr/{_0pm-2p-._.js → _1-zyvdb._.js} +2 -2
  105. package/.next/server/chunks/ssr/{_1_rqu8x._.js → _12mijol._.js} +7 -7
  106. package/.next/server/chunks/ssr/_15zqt-t._.js +1 -1
  107. package/.next/server/chunks/ssr/_184327j._.js +1 -1
  108. package/.next/server/chunks/ssr/{_1y-ea28._.js → _1a-nuxx._.js} +2 -2
  109. package/.next/server/chunks/ssr/_1alxym6._.js +3 -0
  110. package/.next/server/chunks/ssr/{_0hzz82u._.js → _1d423aj._.js} +25 -23
  111. package/.next/server/chunks/ssr/{_1u1mxu9._.js → _1flbs77._.js} +2 -2
  112. package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
  113. package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
  114. package/.next/server/chunks/ssr/{_1oijqjw._.js → _1tmu8z-._.js} +2 -2
  115. package/.next/server/chunks/ssr/{_10y6r1n._.js → _1uy0xom._.js} +3 -3
  116. package/.next/server/chunks/ssr/_1x-kojb._.js +20 -0
  117. package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
  118. package/.next/server/chunks/ssr/_1z74dmq._.js +164 -0
  119. package/.next/server/chunks/ssr/features_bot_1nr94ks._.js +3 -0
  120. package/.next/server/chunks/ssr/features_bot_1s_-2vj._.js +1 -1
  121. package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
  122. package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
  123. package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
  124. package/.next/server/chunks/ssr/{node_modules_111sh9o._.js → node_modules_03d0rfz._.js} +1 -1
  125. package/.next/server/chunks/ssr/{node_modules_0lg75qx._.js → node_modules_04_sbbc._.js} +1 -1
  126. package/.next/server/chunks/ssr/{node_modules_10gbm2y._.js → node_modules_05ybmta._.js} +1 -1
  127. package/.next/server/chunks/ssr/{node_modules_1v9tc1c._.js → node_modules_068ws5v._.js} +1 -1
  128. package/.next/server/chunks/ssr/{node_modules_1_8mv4v._.js → node_modules_06bb4q8._.js} +1 -1
  129. package/.next/server/chunks/ssr/{node_modules_01f8_se._.js → node_modules_07rs_p2._.js} +1 -1
  130. package/.next/server/chunks/ssr/{node_modules_0ii1l89._.js → node_modules_0dzm4um._.js} +1 -1
  131. package/.next/server/chunks/ssr/{node_modules_20xmwtu._.js → node_modules_0jljel9._.js} +1 -1
  132. package/.next/server/chunks/ssr/{node_modules_1ix-g49._.js → node_modules_0sgy-dc._.js} +1 -1
  133. package/.next/server/chunks/ssr/{node_modules_0woscox._.js → node_modules_0t_ez6-._.js} +1 -1
  134. package/.next/server/chunks/ssr/{node_modules_059vtf2._.js → node_modules_0th357h._.js} +1 -1
  135. package/.next/server/chunks/ssr/{node_modules_06w645b._.js → node_modules_0ubdtk-._.js} +1 -1
  136. package/.next/server/chunks/ssr/{node_modules_0b8df3s._.js → node_modules_0uyh_vb._.js} +1 -1
  137. package/.next/server/chunks/ssr/{node_modules_07ih6wb._.js → node_modules_0wnlddw._.js} +1 -1
  138. package/.next/server/chunks/ssr/{node_modules_0gt-uw9._.js → node_modules_0x630an._.js} +1 -1
  139. package/.next/server/chunks/ssr/{node_modules_1x825hz._.js → node_modules_0yvz9e0._.js} +1 -1
  140. package/.next/server/chunks/ssr/{node_modules_0t-44lj._.js → node_modules_12et8d5._.js} +1 -1
  141. package/.next/server/chunks/ssr/{node_modules_1m3gb16._.js → node_modules_13kwejm._.js} +1 -1
  142. package/.next/server/chunks/ssr/{node_modules_1p9rdsy._.js → node_modules_1af3w91._.js} +1 -1
  143. package/.next/server/chunks/ssr/{node_modules_0sz5yg1._.js → node_modules_1bucjlk._.js} +1 -1
  144. package/.next/server/chunks/ssr/{node_modules_1teyzfa._.js → node_modules_1lkix61._.js} +1 -1
  145. package/.next/server/chunks/ssr/{node_modules_1lsyy7k._.js → node_modules_1ogczzz._.js} +1 -1
  146. package/.next/server/chunks/ssr/{node_modules_1-7qawg._.js → node_modules_1s-gb-1._.js} +1 -1
  147. package/.next/server/chunks/ssr/{node_modules_0yv-re6._.js → node_modules_1uwg-gz._.js} +1 -1
  148. package/.next/server/chunks/ssr/{node_modules_03ptrl9._.js → node_modules_1wbkzl9._.js} +1 -1
  149. package/.next/server/chunks/ssr/{node_modules_00jv9_3._.js → node_modules_1z1lrbk._.js} +1 -1
  150. package/.next/server/chunks/ssr/{node_modules_@base-ui_react_0jne69c._.js → node_modules_@base-ui_react_0buz1-j._.js} +1 -1
  151. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_00q1oa3._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0r443fh._.js} +1 -1
  152. package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1-2_5z7._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10wnlbk._.js} +1 -1
  153. package/.next/server/middleware-build-manifest.js +3 -3
  154. package/.next/server/pages/404.html +1 -1
  155. package/.next/server/pages/500.html +1 -1
  156. package/.next/server/server-reference-manifest.js +1 -1
  157. package/.next/server/server-reference-manifest.json +57 -57
  158. package/.next/static/chunks/06nt9tatr-dug.js +1 -0
  159. package/.next/static/chunks/0_awn8tucznxc.js +1 -0
  160. package/.next/static/chunks/{34s52v8f841zo.js → 0ge-hx0ed83a1.js} +1 -1
  161. package/.next/static/chunks/0pda_vf-abwvx.js +1 -0
  162. package/.next/static/chunks/{2u9yjkpkoij75.js → 0qmd8n52hp-6v.js} +1 -1
  163. package/.next/static/chunks/0rowp9rx3qbxu.js +18 -0
  164. package/.next/static/chunks/{1ocy4w0v20a3v.js → 13ixzheqw7o-w.js} +2 -2
  165. package/.next/static/chunks/1grkt5gr8pbg1.js +17 -0
  166. package/.next/static/chunks/{21gf2t_whhurc.js → 1yugpvvi8qrbu.js} +2 -2
  167. package/.next/static/chunks/{1e4yrzs5evq_r.js → 245hb85nsy6j4.js} +1 -1
  168. package/.next/static/chunks/27lkanxvtdn09.js +1 -0
  169. package/.next/static/chunks/{0oz7a68qanm99.js → 27tvv1i-smrck.js} +1 -1
  170. package/.next/static/chunks/{2zhfdbq50ee5i.js → 2c64drdevdla3.js} +1 -1
  171. package/.next/static/chunks/{0k5tkt_qi52kb.js → 2ndw4w4u2x51r.js} +1 -1
  172. package/.next/static/chunks/37j27b3e1gt7r.js +1 -0
  173. package/.next/static/chunks/{2om4lkg86feb4.js → 38301ji-85i30.js} +1 -1
  174. package/.next/static/chunks/{09c13vnqy7al3.js → 3bbzsitgiltnt.js} +2 -2
  175. package/.next/static/chunks/3fec-aeteddr-.js +1 -0
  176. package/.next/static/chunks/3go3hwp1z2_h2.css +1 -0
  177. package/.next/static/chunks/3h2bun3hcggg8.js +1 -0
  178. package/.next/static/chunks/{0g1p98s2pfx2w.js → 3h2e-xv1zxh_f.js} +2 -2
  179. package/.next/static/chunks/3j1y335o95mj7.js +1 -0
  180. package/.next/static/chunks/3obf9n3cxj99k.js +1 -0
  181. package/.next/static/chunks/{2upc9mkcc3nlq.js → 427qsc6kahxyo.js} +1 -1
  182. package/README.md +31 -14
  183. package/bin/port.mjs +11 -7
  184. package/bin/thursday.mjs +1 -1
  185. package/components/ui/radio-group.tsx +2 -2
  186. package/components/ui/shiny-text.tsx +3 -22
  187. package/docs/how-it-works.md +11 -3
  188. package/docs/images/first-run.png +0 -0
  189. package/docs/images/keeps-going.png +0 -0
  190. package/docs/images/two-minds.png +0 -0
  191. package/features/ai/components/model-browser.tsx +1 -1
  192. package/features/ai/components/model-picker.tsx +1 -1
  193. package/features/ai/guide.ts +9 -4
  194. package/features/ai/prompts/bot.prompt.ts +4 -1
  195. package/features/ai/tools/routine.tool.ts +28 -16
  196. package/features/bot/bot.runner.ts +3 -1
  197. package/features/bot/components/bot-mark.tsx +6 -1
  198. package/features/bot/components/bot-setting.tsx +2 -4
  199. package/features/bot/components/bot-tool.tsx +2 -0
  200. package/features/bot/components/room-list.tsx +12 -3
  201. package/features/bot/components/room-pill.tsx +26 -19
  202. package/features/config/components/config-setting.tsx +17 -5
  203. package/features/config/components/voice-key.tsx +38 -18
  204. package/features/connectors/mcp.const.ts +90 -59
  205. package/features/intro/components/intro.tsx +50 -27
  206. package/features/routine/components/routine-mark.tsx +4 -6
  207. package/features/routine/components/routine-setting.tsx +332 -143
  208. package/features/routine/routine.query.ts +24 -3
  209. package/features/routine/routine.schema.ts +55 -4
  210. package/features/settings/components/install-app.tsx +1 -4
  211. package/features/settings/components/setting-ui.tsx +1 -1
  212. package/features/skills/skills.discover.ts +2 -1
  213. package/features/skills/skills.query.ts +5 -1
  214. package/features/skills/skills.schema.ts +2 -0
  215. package/features/thursday/components/ascii-orb.tsx +39 -10
  216. package/features/thursday/components/connect-wave.tsx +284 -0
  217. package/features/thursday/components/side-captions.tsx +29 -17
  218. package/features/thursday/components/thursday-setting.tsx +2 -2
  219. package/features/thursday/components/thursday.tsx +130 -58
  220. package/features/thursday/components/voice-picker.tsx +1 -1
  221. package/features/thursday/components/write-line.tsx +2 -2
  222. package/features/thursday/open-work.ts +11 -3
  223. package/features/thursday/tool-line.ts +94 -12
  224. package/features/thursday/use-text-call.ts +3 -2
  225. package/features/thursday/use-thursday.ts +5 -2
  226. package/features/workspace/components/artifact-view.tsx +129 -7
  227. package/guide/bots.md +17 -5
  228. package/guide/calls.md +15 -7
  229. package/guide/setup.md +10 -2
  230. package/lib/desktop-notify.ts +3 -2
  231. package/package.json +1 -1
  232. package/scripts/bot-context.test.mts +1 -1
  233. package/skills/computer/SKILL.md +1 -0
  234. package/skills/interactive-page/SKILL.md +4 -0
  235. package/.next/server/chunks/[root-of-the-server]__0n-l_n_._.js +0 -3
  236. package/.next/server/chunks/[root-of-the-server]__0wvo2of._.js +0 -3
  237. package/.next/server/chunks/[root-of-the-server]__1e6aut3._.js +0 -3
  238. package/.next/server/chunks/[root-of-the-server]__1ziojdq._.js +0 -3
  239. package/.next/server/chunks/ssr/[root-of-the-server]__1srp8l5._.js +0 -3
  240. package/.next/server/chunks/ssr/_0mes4s0._.js +0 -3
  241. package/.next/server/chunks/ssr/_0ya0cb0._.js +0 -3
  242. package/.next/server/chunks/ssr/_0yto5s7._.js +0 -20
  243. package/.next/server/chunks/ssr/_10dw2nv._.js +0 -3
  244. package/.next/server/chunks/ssr/_1p0gxeo._.js +0 -164
  245. package/.next/server/chunks/ssr/_1r41yvh._.js +0 -3
  246. package/.next/server/chunks/ssr/_1r79ksv._.js +0 -3
  247. package/.next/server/chunks/ssr/features_bot_1ogjt52._.js +0 -3
  248. package/.next/server/chunks/ssr/node_modules_@base-ui_react_0b3d4m9._.js +0 -3
  249. package/.next/static/chunks/03omwz_vi2ndg.js +0 -1
  250. package/.next/static/chunks/0_1bqgd6wt_og.js +0 -1
  251. package/.next/static/chunks/0abgkzikaznxc.js +0 -1
  252. package/.next/static/chunks/0bddkpash59-o.js +0 -17
  253. package/.next/static/chunks/0c2-bzhy3a0ib.js +0 -1
  254. package/.next/static/chunks/0iilfb1ocevnx.js +0 -1
  255. package/.next/static/chunks/0imbhx-j830a_.css +0 -1
  256. package/.next/static/chunks/24h1y9dhy3m_2.js +0 -1
  257. package/.next/static/chunks/2be08eqxsfc1y.js +0 -1
  258. package/.next/static/chunks/2d3yhjtafgmtw.js +0 -1
  259. package/.next/static/chunks/2f_5saocsko_b.js +0 -1
  260. package/.next/static/chunks/2lwbr5vx0ixaj.js +0 -18
  261. package/.next/static/chunks/44kjmi5h_p8px.js +0 -1
  262. /package/.next/static/{UiOMPYpQ4fqGyu5PzS-7j → u8kJqShUAa49vY7BxAWsw}/_buildManifest.js +0 -0
  263. /package/.next/static/{UiOMPYpQ4fqGyu5PzS-7j → u8kJqShUAa49vY7BxAWsw}/_clientMiddlewareManifest.js +0 -0
  264. /package/.next/static/{UiOMPYpQ4fqGyu5PzS-7j → u8kJqShUAa49vY7BxAWsw}/_ssgManifest.js +0 -0
@@ -11,12 +11,21 @@ import { markSeenAction } from "@/features/bot/bot.action";
11
11
  import type { Bot } from "@/features/bot/bot.schema";
12
12
  import { shortenPaths } from "@/features/bot/components/attachments";
13
13
  import { BotMark } from "@/features/bot/components/bot-mark";
14
- import { roomOpens, useBotThreads } from "@/features/bot/thread.store";
14
+ import {
15
+ roomOpens,
16
+ type ThreadView,
17
+ useBotThreads,
18
+ } from "@/features/bot/thread.store";
15
19
  import { FileThumb } from "@/features/workspace/components/file-thumb";
16
- import { viewKindOf } from "@/features/workspace/file-kind";
20
+ import {
21
+ opensOnFinish,
22
+ pathsIn,
23
+ viewKindOf,
24
+ } from "@/features/workspace/file-kind";
25
+ import { toDate } from "@/lib/date-like";
17
26
  import { unwrapResult } from "@/lib/protocol/result";
18
27
  import { revalidate, useServerRoute } from "@/lib/protocol/use-server-route";
19
- import { errorToString } from "@/lib/utils";
28
+ import { errorToString, plainText } from "@/lib/utils";
20
29
  import { FileViewer, useOpenFile } from "./file-view";
21
30
 
22
31
  /**
@@ -52,6 +61,86 @@ export type Finished = {
52
61
  /** File faces a card draws before the rest fold into a count. */
53
62
  const FACES_SHOWN = 4;
54
63
 
64
+ /**
65
+ * Cards waved off in this browser, newest first, so a reload does not bring them back. Short:
66
+ * a card also goes once its thread is read, which the server keeps.
67
+ */
68
+ const DISMISSED_KEY = "thursday.corner-dismissed";
69
+ const DISMISSED_KEEP = 50;
70
+
71
+ function readDismissed(): string[] {
72
+ try {
73
+ const stored = JSON.parse(
74
+ window.localStorage.getItem(DISMISSED_KEY) ?? "[]",
75
+ );
76
+ return Array.isArray(stored) ? stored : [];
77
+ } catch {
78
+ return [];
79
+ }
80
+ }
81
+
82
+ function rememberDismissed(ids: string[]) {
83
+ try {
84
+ const kept = [
85
+ ...ids,
86
+ ...readDismissed().filter((id) => !ids.includes(id)),
87
+ ].slice(0, DISMISSED_KEEP);
88
+ window.localStorage.setItem(DISMISSED_KEY, JSON.stringify(kept));
89
+ } catch {
90
+ // blocked storage: the card comes back after a reload, which is only a card
91
+ }
92
+ }
93
+
94
+ /**
95
+ * A job finished while this page is not the one in front: the browser's own notification,
96
+ * which brings Thursday forward when pressed — the card is waiting there. Nothing when the
97
+ * page is in front (the card says it) or notifications were never allowed (see
98
+ * `askToNotify`).
99
+ */
100
+ function tellFinished(threadId: string, label: string, words: string) {
101
+ if (typeof Notification === "undefined") return;
102
+ if (Notification.permission !== "granted") return;
103
+ if (document.visibilityState === "visible" && document.hasFocus()) return;
104
+ try {
105
+ const shown = new Notification(label, {
106
+ body: words,
107
+ tag: threadId,
108
+ icon: "/icon.svg",
109
+ });
110
+ shown.onclick = () => {
111
+ window.focus();
112
+ shown.close();
113
+ };
114
+ } catch {
115
+ // a browser that shows none from a page; the card and the room still have it
116
+ }
117
+ }
118
+
119
+ /**
120
+ * Asks once, in the browser's quiet way, whether this page may show a notification when a
121
+ * job finishes out of sight. Called as a call is placed: the moment someone starts handing
122
+ * out work, and never on load.
123
+ */
124
+ export function askToNotify() {
125
+ if (typeof Notification === "undefined") return;
126
+ if (Notification.permission !== "default") return;
127
+ void Notification.requestPermission().catch(() => undefined);
128
+ }
129
+
130
+ /** A finished job as a card, read off its row when no event brought it: after a reload. */
131
+ function cardOf(thread: ThreadView): Finished {
132
+ const files = pathsIn(thread.outcome ?? "");
133
+ const lead = files.findIndex(opensOnFinish);
134
+ return {
135
+ threadId: thread.id,
136
+ label: thread.label,
137
+ bot: thread.bot.name,
138
+ words: plainText(thread.outcome ?? "").slice(0, FINISHED_NOTICE.words),
139
+ paths:
140
+ lead > 0 ? [files[lead], ...files.filter((_, at) => at !== lead)] : files,
141
+ };
142
+ }
143
+
55
144
  function Notice() {
56
145
  const [rows, setRows] = useState<Finished[]>([]);
57
146
  const { data: bots } = useServerRoute<Bot[]>(queryKey.bot);
@@ -66,7 +155,8 @@ function Notice() {
66
155
  event.paths[0],
67
156
  event.paths.filter((path) => viewKindOf(path) === "image"),
68
157
  ),
69
- finished: (event) =>
158
+ finished: (event) => {
159
+ tellFinished(event.threadId, event.label, event.words);
70
160
  setRows((was) =>
71
161
  [
72
162
  {
@@ -79,11 +169,40 @@ function Notice() {
79
169
  // A job that finishes twice (picked back up, ended again) keeps one card
80
170
  ...was.filter((row) => row.threadId !== event.threadId),
81
171
  ].slice(0, FINISHED_NOTICE.rows),
82
- ),
172
+ );
173
+ },
83
174
  });
84
175
 
85
- const drop = (threadId: string) =>
176
+ // What finished while the page was away, or before a reload, and is still unread: the
177
+ // corner holds it until it is opened or waved off, as an event would have put it there
178
+ const seeded = useRef(false);
179
+ useEffect(() => {
180
+ if (seeded.current || !threads.length) return;
181
+ seeded.current = true;
182
+ const dismissed = new Set(readDismissed());
183
+ const waiting = threads
184
+ .filter(
185
+ (thread) =>
186
+ thread.status === "done" && !thread.seen && !dismissed.has(thread.id),
187
+ )
188
+ .sort(
189
+ (a, b) => toDate(b.updatedAt).getTime() - toDate(a.updatedAt).getTime(),
190
+ );
191
+ if (!waiting.length) return;
192
+ setRows((was) =>
193
+ [
194
+ ...was,
195
+ ...waiting
196
+ .filter((thread) => !was.some((row) => row.threadId === thread.id))
197
+ .map(cardOf),
198
+ ].slice(0, FINISHED_NOTICE.rows),
199
+ );
200
+ }, [threads]);
201
+
202
+ const drop = (threadId: string) => {
203
+ rememberDismissed([threadId]);
86
204
  setRows((was) => was.filter((row) => row.threadId !== threadId));
205
+ };
87
206
 
88
207
  // Read somewhere else (the room, `thread_show`): the card goes. A card is armed
89
208
  // only once its thread was seen unread, since the thread list may still hold
@@ -147,7 +266,10 @@ function Notice() {
147
266
  <span className="flex-1">{rows.length} new</span>
148
267
  <button
149
268
  type="button"
150
- onClick={() => setRows([])}
269
+ onClick={() => {
270
+ rememberDismissed(rows.map((row) => row.threadId));
271
+ setRows([]);
272
+ }}
151
273
  className="rounded-md px-1 font-sans text-[11px] outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50"
152
274
  >
153
275
  Clear all
package/guide/bots.md CHANGED
@@ -67,7 +67,7 @@ clear later why the bot changed course. Saying the same to her on a call does th
67
67
  A job ends in the thing that was asked for and a short report. Anything longer than a few
68
68
  lines is a file. Nothing opens by itself: every finished job waits as a card in the corner at
69
69
  the bottom left of the call screen — the bot, the job's name, how its answer begins, and its
70
- files under that — until it is opened or dismissed. Opening a card, or a file on it, counts as
70
+ files under that — until it is opened or dismissed, a reload of the page included. Opening a card, or a file on it, counts as
71
71
  reading the result: the thread stops showing as new, and she will not bring it up on a call.
72
72
  Dismissing a card does not; the result still waits in its thread. The files also show under
73
73
  the bot's words in the thread: pictures as thumbnails, a page or a written report as a small preview
@@ -80,10 +80,22 @@ folder, listed on its page in Settings › Bots.
80
80
 
81
81
  ## Routines: jobs that start by themselves
82
82
 
83
- A routine is a bot, a job and a time: every weekday at nine, every six hours. It is made by
84
- telling Thursday — "every morning at nine, go through my mail" — or in **Settings ›
85
- Routines**, which lists them all, each with one switch. There are two kinds of time, a time of
86
- day on chosen days, or every so many hours, and at most twelve routines.
83
+ A routine is a bot, a job and a time: tomorrow at eight, every weekday at nine, every six
84
+ hours. It is made by telling Thursday — "every morning at nine, go through my mail", "in an
85
+ hour, check the fares again" — or in **Settings › Routines**, which lists them all, each with
86
+ one switch. **When** has three kinds of time, and at most twelve routines exist:
87
+
88
+ - **Once**: a day (today, tomorrow, the two days after, or any day from the calendar) and a
89
+ time, or **In an hour**. It starts that once and then switches itself off; it stays in the
90
+ list with its run, and picking a new day and time sets it again. A time already gone is
91
+ refused.
92
+ - **On set days**: a time of day on the days picked. Every day, Weekdays and Weekends fill the
93
+ days in one press.
94
+ - **Every few hours**: 1, 2, 3, 6, 12 or 24 hours after each start; any other number can be
95
+ asked of Thursday.
96
+
97
+ What is picked is filled black, and the line under the field says it back in words, with when
98
+ it first starts.
87
99
 
88
100
  Each time it is due, a routine opens an ordinary thread, marked with a repeat sign, and that
89
101
  thread behaves like any other: it shows in the corner of the call screen, a question pauses
package/guide/calls.md CHANGED
@@ -74,10 +74,13 @@ keeps them under the search.
74
74
  ## Hearing the words
75
75
 
76
76
  **Settings › Thursday › Captions** picks where the words show: under her face, or down the
77
- two sides of the screen. What she is doing — a search, work handed to a bot, what she is
78
- thinking about — shows as one line under her face; with the words down the sides it stands on
79
- her side instead, under what she last said, the last three steps at a time with the older
80
- ones fainter. Every call is kept; **Settings › Thursday › History** opens them,
77
+ two sides of the screen. A narrow window always shows them under her face. What she is
78
+ doing — a search, work handed to a bot — shows as one line under her face; with the words down
79
+ the sides it stands on her side instead, under what she said, the last three steps at a time
80
+ with the older ones fainter, and the steps stay with that answer for the rest of the call:
81
+ clicking an earlier answer of hers brings it back with the steps behind it. What she is
82
+ thinking about stays under her face either way. Every call is kept; **Settings › Thursday ›
83
+ History** opens them,
81
84
  one call at a time, and deletes a single call or all of them.
82
85
 
83
86
  ## Her voice, her face, her models
@@ -98,13 +101,18 @@ one call at a time, and deletes a single call or all of them.
98
101
  While a call is open, a question or a result from a bot comes into the conversation by
99
102
  itself, in a quiet moment, and she says it.
100
103
 
101
- With no call open, the computer shows a notification. **Settings › Thursday › Starting a
104
+ With no call open, a finished job lands as a card in the bottom left corner, and if Thursday
105
+ is not the window in front, as a notification that brings her forward when pressed (the
106
+ browser asks once, the first time a call is placed). With no Thursday window open at all,
107
+ the computer's own notification says it instead; on a Mac pressing that one opens Script
108
+ Editor rather than the app. **Settings › Thursday › Starting a
102
109
  call › She calls you** makes the screen ring instead: "When a job needs me" rings for a
103
110
  question or a stop — where it starts — "Whenever a job ends" rings for results too, and
104
111
  "Never" leaves it to the notification. It is one call however much is waiting: while it rings, the screen says under her
105
112
  face whose work it is about and what it asks — with the answers the bot offered, and the
106
- other work waiting by name — and one round button, Answer. Tapping her face answers too, Esc
107
- is "not now", and she opens by saying why she called, then tells the rest one by one. A ring
113
+ other work waiting by name — and one round button, Answer. Tapping her face answers too, and
114
+ so does the wake phrase when it is on (the screen says so beside "not now"); Esc is "not now".
115
+ She opens by saying why she called, then tells the rest one by one. A ring
108
116
  nobody takes becomes a short missed list in the same place, with Call back, until it is
109
117
  called back or cleared with Esc; the work itself stays in the room either way. She cannot
110
118
  switch this on herself: when they ask to be
package/guide/setup.md CHANGED
@@ -37,7 +37,8 @@ Settings › Thursday instead.
37
37
 
38
38
  A skill is a written-down way of doing something that a bot reads before it starts. Some ship
39
39
  with the app — the browser, this Mac, finding more skills, building a page or a chart, and
40
- writing a new skill. **Settings › Skills** lists them, switches one off, uploads one, or
40
+ writing a new skill. The one for this Mac is not listed on other computers.
41
+ **Settings › Skills** lists them, switches one off, uploads one, or
41
42
  writes one. A bot can also install one from the open registry while it works: for itself
42
43
  alone unless they asked for every bot to have it. A bot's own skills sit in its own folder
43
44
  and are not on that screen, which lists the shared ones.
@@ -49,6 +50,12 @@ details. Once connected, its tools are there for bots to search and call, and up
49
50
  them can be pinned to one bot so they are always in front of it. Signing in happens in a
50
51
  popup window; a server that needs it again turns red on that screen.
51
52
 
53
+ The list starts with everyday services — to-dos, the house, flights, and Zapier for Gmail,
54
+ Google Calendar and the other apps connected there — and the tools for developers come after.
55
+ Home Assistant is the one that asks for two things first: the address of their own Home
56
+ Assistant, and a long-lived access token made on their profile page there. Its Model Context
57
+ Protocol Server integration has to be added in Home Assistant too.
58
+
52
59
  ## Sites they signed in to
53
60
 
54
61
  When a bot needs them signed in to a website — to post, to read mail, to order — it opens a
@@ -77,7 +84,8 @@ of the Settings list for as long as it is not installed. Safari on a Mac does it
77
84
  its File menu, **Add to Dock**; Firefox cannot. It is the same local app either way; nothing
78
85
  moves anywhere.
79
86
 
80
- The app comes back on the same address every time it starts. If that port is taken by
87
+ The app comes back on the same address every time it starts: the first start takes port 4747,
88
+ which other apps rarely use, and keeps it. If that port is taken by
81
89
  something else one day, it says so where it was started and serves on the next one for that
82
90
  day; the browser then shows other settings, because a browser keeps settings per address.
83
91
  Starting it once with `--port` and a number moves it to that address for good.
@@ -2,8 +2,9 @@ import { execFile } from "node:child_process";
2
2
  import { APP_NAME } from "@/config";
3
3
 
4
4
  /**
5
- * Native desktop notification for work that finished while nobody is on the
6
- * line. Best effort: the inbox is the durable signal, so failures are swallowed.
5
+ * Native desktop notification for work that finished while no page is open (with one open,
6
+ * the page shows its own). Best effort: the inbox is the durable signal, so failures are
7
+ * swallowed. On macOS it is AppleScript's, so pressing it opens Script Editor, not the app.
7
8
  */
8
9
 
9
10
  /** The OS truncates longer text anyway. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "thursday-agent",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "description": "A voice agent that runs on your own machine — talk to her, she hands the slow work to bots with a shell, a browser and skills.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -1326,7 +1326,7 @@ test("the call makes, reads and removes a routine, and is told when its time can
1326
1326
  String(
1327
1327
  await routine({ action: "create", ...job, time: "09:00", everyHours: 6 }),
1328
1328
  ),
1329
- /not both/,
1329
+ /Give one of `at`, `time` or `everyHours`/,
1330
1330
  );
1331
1331
  assert.match(
1332
1332
  String(
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: computer
3
3
  description: "This Mac itself — its apps, its windows, what is on screen. Read a window as text, click, type, open or focus an app, walk a menu, read the clipboard."
4
+ platforms: [darwin]
4
5
  ---
5
6
 
6
7
  # The Mac
@@ -25,6 +25,10 @@ quick page: one HTML file, no kit, no build, ready in the time it takes to write
25
25
  toggle or a sort. Nothing comes from the network: pictures sit beside the file.
26
26
  3. Hand back that path.
27
27
 
28
+ When the page recommends or compares things people choose partly by how they look — places,
29
+ stays, food, things to buy — give each one a photo or two of what it looks like, with a short
30
+ caption, from the first version: download them from the pages you read into the page's folder.
31
+
28
32
  Take the kit below instead when the page is a tool — controls that keep state, a calculator,
29
33
  charts that respond — and markdown when it is only a few paragraphs.
30
34
 
@@ -1,3 +0,0 @@
1
- module.exports=[418520,e=>e.a(async(r,t)=>{try{var o=await e.y("@libsql/client-6da938047d5fc1cd");e.n(o),t()}catch(e){t(e)}},!0),500874,(e,r,t)=>{r.exports=e.x("buffer",()=>require("buffer"))},233405,(e,r,t)=>{r.exports=e.x("child_process",()=>require("child_process"))},522734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},874533,(e,r,t)=>{r.exports=e.x("node:child_process",()=>require("node:child_process"))},666680,(e,r,t)=>{r.exports=e.x("node:crypto",()=>require("node:crypto"))},902157,(e,r,t)=>{r.exports=e.x("node:fs",()=>require("node:fs"))},912714,(e,r,t)=>{r.exports=e.x("node:fs/promises",()=>require("node:fs/promises"))},347299,(e,r,t)=>{r.exports=e.x("node:http",()=>require("node:http"))},660526,(e,r,t)=>{r.exports=e.x("node:os",()=>require("node:os"))},750227,(e,r,t)=>{r.exports=e.x("node:path",()=>require("node:path"))},59639,(e,r,t)=>{r.exports=e.x("node:process",()=>require("node:process"))},136340,(e,r,t)=>{r.exports=e.x("node:timers/promises",()=>require("node:timers/promises"))},509656,(e,r,t)=>{r.exports=e.x("node:tty",()=>require("node:tty"))},812057,(e,r,t)=>{r.exports=e.x("node:util",()=>require("node:util"))},446786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))},814747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},605365,(e,r,t)=>{r.exports=e.x("process",()=>require("process"))},375814,e=>{"use strict";let r=e=>e.split("/").map(encodeURIComponent).join("/");var t=e.i(333925);let o=e=>`text/${e}; charset=utf-8`,n={md:{kind:"markdown",mime:o("markdown")},markdown:{kind:"markdown",mime:o("markdown")},csv:{kind:"csv",mime:o("csv")},json:{kind:"json",mime:"application/json; charset=utf-8"},txt:{kind:"text",mime:o("plain")},log:{kind:"text",mime:o("plain")},html:{kind:"frame",mime:o("html")},htm:{kind:"frame",mime:o("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:o("css")},js:{kind:"none",mime:o("javascript")},woff2:{kind:"none",mime:"font/woff2"}},i=e=>e.split(".").pop()?.toLowerCase()??"",a=Object.entries(n).filter(([,e])=>"none"!==e.kind).map(([e])=>e),s=RegExp(String.raw`(?<![\p{L}\p{N}_/:@%-])\/?(?:[\p{L}\p{N}_.@%-]+/)*[\p{L}\p{N}_@%-]+(?:\.[\p{L}\p{N}_-]+)*\.(?:${a.join("|")})\b`,"giu"),l=`${t.PATHS.workspace}/`,c=({memory:"/api/memory",memoryPage:e=>({url:"/api/memory",query:{offset:e||null}}),notePath:e=>({url:"/api/memory",query:{path:e}}),mcp:"/api/mcp",mcpServer:e=>({url:"/api/mcp",pathVariable:[e]}),mcpTools:"/api/mcp/tools",skills:"/api/skills",skillNode:(e,r,t)=>({url:"/api/skills",pathVariable:[e,r],query:{path:t}}),bot:"/api/bot",botMemory:"/api/bot/memory",botKeepWorking:"/api/bot/keep-working",botMemoryFiles:e=>({url:"/api/bot/memory/files",query:{bot:e}}),routines:"/api/routine",threads:"/api/bot/thread",threadHistory:e=>({url:"/api/bot/thread",query:{history:1,before:e}}),thread:e=>({url:"/api/bot/thread",query:{id:e}}),toolResult:(e,r)=>({url:"/api/bot/thread",pathVariable:[e],query:{call:r}}),workspace:"/api/workspace",workspaceFolder:(e,r)=>({url:"/api/workspace",query:{path:e||null,rows:r}}),workspaceFiles:e=>({url:"/api/workspace/files",query:{paths:JSON.stringify(e)}}),artifacts:"/api/artifact",artifactShelf:e=>({url:"/api/artifact",query:{rows:e}}),artifactSet:(e,r)=>({url:"/api/artifact",query:{set:e,rows:r}}),file:e=>`/api/file/${r(e)}`,favicon:e=>`/api/favicon/${encodeURIComponent(e)}`,fileView:e=>`/artifact/${r(e)}`,events:"/api/events",config:"/api/config",callHistory:e=>({url:"/api/thursday/call",query:{before:e}}),callSkills:"/api/thursday/skills",toolCall:"/api/thursday/tool-call",signIns:"/api/signins",reach:"/api/reach",textCall:"/api/thursday/text",memoryEdit:"/api/memory/edit",llmModel:"/api/llm-model",modelCatalog:"/api/llm-model/catalog",gatewayCredits:"/api/llm-model/credits",subscriptionUsage:"/api/llm-model/subscription"}).file(""),p=/^[\s`'"*_)]*(?:~|–|—|-|\.{2,}|…|to|through)[\s`'"*_(]*$/i;e.s(["mimeOf",0,e=>n[i(e)]?.mime??"application/octet-stream","opensOnFinish",0,e=>e.startsWith(`${t.PATHS.artifacts}/`)&&["md","markdown","html","htm"].includes(i(e)),"pathsIn",0,function(e){let r=e.replace(/\b[a-z][\w+.-]*:\/\/\S+/gi," "),t=new Set,o="",n=null;for(let e of r.matchAll(s)){let i=e[0],a=!i.includes("/"),s=function(e){let r,t,o=(t=(r=function(e){if(!e.startsWith(c))return e;let r=e.slice(c.length);try{return decodeURIComponent(r)}catch{return r}}(e.trim())).indexOf(l))>=0?r.slice(t+l.length)||null:r.startsWith("/")||/^[A-Za-z]:/.test(r)||r.split("/").includes("..")?null:r||null;if(!o)return null;let[n,...i]=o.split("/");return i.length&&n.includes(".")?null:o}(a?o+i:i);if(a||(o=s?.slice(0,s.lastIndexOf("/")+1)??""),s){if(n&&p.test(r.slice(n.end,e.index)))for(let e of function(e,r){let t=/^(.*?)(\d+)(\D*)$/.exec(e),o=/^(.*?)(\d+)(\D*)$/.exec(r);if(!t||!o||t[1]!==o[1]||t[3]!==o[3])return[];let n=Number(t[2]),i=Number(o[2]);if(!(i-n>1)||i-n>12)return[];let a=t[2].startsWith("0")?t[2].length:0;return Array.from({length:i-n-1},(e,r)=>`${t[1]}${String(n+r+1).padStart(a,"0")}${t[3]}`)}(n.rel,s))t.add(e);t.add(s),n={rel:s,end:e.index+i.length}}}return[...t].slice(0,12)},"viewKindOf",0,e=>n[i(e)]?.kind??"none"],375814)},198306,(e,r,t)=>{"use strict";var o=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,r,t,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of a(r))l.call(e,s)||s===t||n(e,s,{get:()=>r[s],enumerable:!(o=i(r,s))||o.enumerable});return e},p=(e,r,t)=>(t=null!=e?o(s(e)):{},c(!r&&e&&e.__esModule?t:n(t,"default",{value:e,enumerable:!0}),e)),u={},d={isValidAccessToken:()=>b,readAuthConfig:()=>k,writeAuthConfig:()=>w};for(var f in d)n(u,f,{get:d[f],enumerable:!0});r.exports=c(n({},"__esModule",{value:!0}),u);var m=p(e.r(522734)),h=p(e.r(814747)),y=e.r(913803);function g(){let e=(0,y.getVercelDataDir)();if(!e)throw Error(`Unable to find Vercel CLI data directory. Your platform: ${process.platform}. Supported: darwin, linux, win32.`);return h.join(e,"auth.json")}function k(){try{let e=g();if(!m.existsSync(e))return null;let r=m.readFileSync(e,"utf8");if(!r)return null;return JSON.parse(r)}catch(e){return null}}function w(e){let r=g(),t=h.dirname(r);m.existsSync(t)||m.mkdirSync(t,{mode:504,recursive:!0}),m.writeFileSync(r,JSON.stringify(e,null,2),{mode:384})}function b(e,r=0){if(!e.token)return!1;if("number"!=typeof e.expiresAt)return!0;let t=Math.floor(Date.now()/1e3);return e.expiresAt>=t+r/1e3}},736374,(e,r,t)=>{"use strict";var o=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={},l={AccessTokenMissingError:()=>p,RefreshAccessTokenFailedError:()=>u};for(var c in l)o(s,c,{get:l[c],enumerable:!0});r.exports=((e,r,t)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of i(r))a.call(e,s)||void 0===s||o(e,s,{get:()=>r[s],enumerable:!(t=n(r,s))||t.enumerable});return e})(o({},"__esModule",{value:!0}),s);class p extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login)."),this.name="AccessTokenMissingError"}}class u extends Error{constructor(e){super("Failed to refresh authentication token.",{cause:e}),this.name="RefreshAccessTokenFailedError"}}},903736,(e,r,t)=>{"use strict";var o=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={},l={processTokenResponse:()=>h,refreshTokenRequest:()=>m};for(var c in l)o(s,c,{get:l[c],enumerable:!0});r.exports=((e,r,t)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of i(r))a.call(e,s)||void 0===s||o(e,s,{get:()=>r[s],enumerable:!(t=n(r,s))||t.enumerable});return e})(o({},"__esModule",{value:!0}),s);var p=e.r(446786);let u=`@vercel/oidc node-${process.version} ${(0,p.platform)()} (${(0,p.arch)()}) ${(0,p.hostname)()}`,d=null;async function f(){if(d)return d;let e=await fetch("https://vercel.com/.well-known/openid-configuration",{headers:{"user-agent":u}});if(!e.ok)throw Error("Failed to discover OAuth endpoints");let r=await e.json();if(!r||"string"!=typeof r.token_endpoint)throw Error("Invalid OAuth discovery response");let t=r.token_endpoint;return d=t,t}async function m(e){let r=await f();return await fetch(r,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":u},body:new URLSearchParams({client_id:"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",grant_type:"refresh_token",...e})})}async function h(e){let r=await e.json();return e.ok?"object"!=typeof r||null===r?[Error("Invalid token response")]:"string"!=typeof r.access_token?[Error("Missing access_token in response")]:"Bearer"!==r.token_type?[Error("Invalid token_type in response")]:"number"!=typeof r.expires_in?[Error("Missing expires_in in response")]:[null,r]:[Error("object"==typeof r&&r&&"error"in r?String(r.error):"Token refresh failed")]}},424134,(e,r,t)=>{"use strict";var o=Object.defineProperty,n=Object.getOwnPropertyDescriptor,i=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,s={},l={VercelOidcTokenError:()=>p};for(var c in l)o(s,c,{get:l[c],enumerable:!0});r.exports=((e,r,t)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of i(r))a.call(e,s)||void 0===s||o(e,s,{get:()=>r[s],enumerable:!(t=n(r,s))||t.enumerable});return e})(o({},"__esModule",{value:!0}),s);class p extends Error{constructor(e,r){super(e),this.name="VercelOidcTokenError",this.cause=r}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}},713292,(e,r,t)=>{"use strict";var o=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,r,t,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of a(r))l.call(e,s)||s===t||n(e,s,{get:()=>r[s],enumerable:!(o=i(r,s))||o.enumerable});return e},p=(e,r,t)=>(t=null!=e?o(s(e)):{},c(!r&&e&&e.__esModule?t:n(t,"default",{value:e,enumerable:!0}),e)),u={},d={findRootDir:()=>k,getUserDataDir:()=>w};for(var f in d)n(u,f,{get:d[f],enumerable:!0});r.exports=c(n({},"__esModule",{value:!0}),u);var m=p(e.r(814747)),h=p(e.r(522734)),y=p(e.r(446786)),g=e.r(424134);function k(){try{let e=process.cwd();for(;e!==m.default.dirname(e);){let r=m.default.join(e,".vercel");if(h.default.existsSync(r))return e;e=m.default.dirname(e)}}catch(e){throw new g.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function w(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(y.default.platform()){case"darwin":return m.default.join(y.default.homedir(),"Library/Application Support");case"linux":return m.default.join(y.default.homedir(),".local/share");case"win32":if(process.env.LOCALAPPDATA)return process.env.LOCALAPPDATA;return null;default:return null}}},913803,(e,r,t)=>{"use strict";var o=Object.create,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,c=(e,r,t,o)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let s of a(r))l.call(e,s)||s===t||n(e,s,{get:()=>r[s],enumerable:!(o=i(r,s))||o.enumerable});return e},p=(e,r,t)=>(t=null!=e?o(s(e)):{},c(!r&&e&&e.__esModule?t:n(t,"default",{value:e,enumerable:!0}),e)),u={},d={assertVercelOidcTokenResponse:()=>x,findProjectInfo:()=>T,getTokenPayload:()=>A,getVercelDataDir:()=>v,getVercelOidcToken:()=>j,getVercelToken:()=>O,isExpired:()=>E,loadToken:()=>P,saveToken:()=>_};for(var f in d)n(u,f,{get:d[f],enumerable:!0});r.exports=c(n({},"__esModule",{value:!0}),u);var m=p(e.r(814747)),h=p(e.r(522734)),y=e.r(424134),g=e.r(713292),k=e.r(198306),w=e.r(903736),b=e.r(736374);function v(){let e=(0,g.getUserDataDir)();return e?m.join(e,"com.vercel.cli"):null}async function O(e){let r=(0,k.readAuthConfig)();if(!r?.token)throw new b.AccessTokenMissingError;if((0,k.isValidAccessToken)(r,e?.expirationBufferMs))return r.token;if(!r.refreshToken)throw(0,k.writeAuthConfig)({}),new b.RefreshAccessTokenFailedError("No refresh token available");try{let e=await (0,w.refreshTokenRequest)({refresh_token:r.refreshToken}),[t,o]=await (0,w.processTokenResponse)(e);if(t||!o)throw(0,k.writeAuthConfig)({}),new b.RefreshAccessTokenFailedError(t);let n={token:o.access_token,expiresAt:Math.floor(Date.now()/1e3)+o.expires_in};return o.refresh_token&&(n.refreshToken=o.refresh_token),(0,k.writeAuthConfig)(n),n.token}catch(e){if((0,k.writeAuthConfig)({}),e instanceof b.AccessTokenMissingError||e instanceof b.RefreshAccessTokenFailedError)throw e;throw new b.RefreshAccessTokenFailedError(e)}}async function j(e,r,t){let o=`https://api.vercel.com/v1/projects/${r}/token?source=vercel-oidc-refresh${t?`&teamId=${t}`:""}`,n=await fetch(o,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!n.ok)throw new y.VercelOidcTokenError(`Failed to refresh OIDC token: ${n.statusText}`);let i=await n.json();return x(i),i}function x(e){if(!e||"object"!=typeof e)throw TypeError("Vercel OIDC token is malformed. Expected an object. Please run `vc env pull` and try again");if(!("token"in e)||"string"!=typeof e.token)throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property. Please run `vc env pull` and try again")}function T(){let e=(0,g.findRootDir)();if(!e)throw new y.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let r=m.join(e,".vercel","project.json");if(!h.existsSync(r))throw new y.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let t=JSON.parse(h.readFileSync(r,"utf8"));if("string"!=typeof t.projectId&&"string"!=typeof t.orgId)throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:t.projectId,teamId:t.orgId}}function _(e,r){let t=(0,g.getUserDataDir)();if(!t)throw new y.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let o=m.join(t,"com.vercel.token",`${r}.json`),n=JSON.stringify(e);h.mkdirSync(m.dirname(o),{mode:504,recursive:!0}),h.writeFileSync(o,n),h.chmodSync(o,432)}function P(e){let r=(0,g.getUserDataDir)();if(!r)throw new y.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let t=m.join(r,"com.vercel.token",`${e}.json`);if(!h.existsSync(t))return null;let o=JSON.parse(h.readFileSync(t,"utf8"));return x(o),o}function A(e){let r=e.split(".");if(3!==r.length)throw new y.VercelOidcTokenError("Invalid token. Please run `vc env pull` and try again");let t=r[1].replace(/-/g,"+").replace(/_/g,"/"),o=t.padEnd(t.length+(4-t.length%4)%4,"=");return JSON.parse(Buffer.from(o,"base64").toString("utf8"))}function E(e,r=0){return 1e3*e.exp<Date.now()+r}}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0n-l_n_._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[70729,e=>{e.v(e=>Promise.resolve().then(()=>e(666680)))},522275,e=>{e.v(e=>Promise.resolve().then(()=>e(380690)))},441758,e=>e.a(async(t,a)=>{try{var r=e.i(97334),n=e.i(91264),s=t([r]);[r]=s.then?(await s)():s;let o=(0,n.serverRoute)(async e=>(0,r.streamTextCall)(await e.json(),e.signal));e.s(["POST",0,o]),a()}catch(e){a(e)}},!1),495744,e=>{"use strict";var t=e.i(747909),a=e.i(174017),r=e.i(996250),n=e.i(759756),s=e.i(561916),o=e.i(174677),i=e.i(869741),l=e.i(316795),u=e.i(487718),d=e.i(995169),c=e.i(47587),p=e.i(666012),h=e.i(570101),v=e.i(626937),m=e.i(10372),R=e.i(193695);e.i(52474);var _=e.i(600220);let g=new t.AppRouteRouteModule({definition:{kind:a.RouteKind.APP_ROUTE,page:"/api/thursday/text/route",pathname:"/api/thursday/text",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/app/api/thursday/text/route.ts",nextConfigOutput:"standalone",userland:()=>e.r(441758),...{}}),{workAsyncStorage:f,workUnitAsyncStorage:w,serverHooks:x}=g;async function E(e,t,r){r.requestMeta&&(0,n.setRequestMeta)(e,r.requestMeta),g.isDev&&(0,n.addRequestMeta)(e,"devRequestTimingInternalsEnd",process.hrtime.bigint());let f="/api/thursday/text/route";f=f.replace(/\/index$/,"")||"/";let w=await g.prepare(e,t,{srcPage:f,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==r.waitUntil||r.waitUntil.call(r,Promise.resolve()),null;let{buildId:x,deploymentId:E,params:C,nextConfig:P,parsedUrl:y,isDraftMode:A,prerenderManifest:T,routerServerContext:S,isOnDemandRevalidate:b,revalidateOnlyGenerated:N,resolvedPathname:O,clientReferenceManifest:q,serverActionsManifest:k}=w,H=(0,i.normalizeAppPath)(f),I=!!(T.dynamicRoutes[H]||T.routes[O]),M=async()=>((null==S?void 0:S.render404)?await S.render404(e,t,y,!1):t.end("This page could not be found"),null);if(I&&!A){let e=!!T.routes[O],t=T.dynamicRoutes[H];if(t&&!1===t.fallback&&!e){if(P.adapterPath)return await M();throw new R.NoFallbackError}}let U=null;!I||g.isDev||A||(U="/index"===(U=O)?"/":U);let j=!0===g.isDev||!I,D=I&&!j;k&&q&&(0,o.setManifestsSingleton)({page:f,clientReferenceManifest:q,serverActionsManifest:k});let F=e.method||"GET",K=(0,s.getTracer)(),L=K.getActiveScopeSpan(),$=!!(null==S?void 0:S.isWrappedByNextServer),B=!!(0,n.getRequestMeta)(e,"minimalMode"),G=(0,n.getRequestMeta)(e,"incrementalCache")||await g.getIncrementalCache(e,P,T,B);null==G||G.resetRequestCache(),globalThis.__incrementalCache=G;let V={params:C,previewProps:T.preview,renderOpts:{experimental:{authInterrupts:!!P.experimental.authInterrupts,useCacheTimeout:P.experimental.useCacheTimeout},cacheComponents:!!P.cacheComponents,validationLevel:P.experimental.instantInsights.validationLevel,supportsDynamicResponse:j,incrementalCache:G,hmrRefreshHash:(0,n.getRequestMeta)(e,"hmrRefreshHash"),cacheLifeProfiles:P.cacheLife,staticPageGenerationTimeout:P.staticPageGenerationTimeout,waitUntil:r.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,a,r,n)=>g.onRequestError(e,t,r,n,S)},sharedContext:{buildId:x,deploymentId:E}},X=new l.NodeNextRequest(e),W=new l.NodeNextResponse(t),z=u.NextRequestAdapter.fromNodeNextRequest(X,(0,u.signalFromNodeResponse)(t)),Z=async({previousCacheEntry:a})=>{try{if(!B&&b&&N&&!a)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let n=await g.handle(z,V);e.fetchMetrics=V.renderOpts.fetchMetrics;let s=V.renderOpts.pendingWaitUntil;s&&r.waitUntil&&(r.waitUntil(s),s=void 0);let o=V.renderOpts.collectedTags;if(!I)return await (0,p.sendResponse)(X,W,n,s),null;{let e=await n.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(n.headers);o&&(t[m.NEXT_CACHE_TAGS_HEADER]=o),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let a=void 0!==V.renderOpts.collectedRevalidate&&!(V.renderOpts.collectedRevalidate>=m.INFINITE_CACHE)&&V.renderOpts.collectedRevalidate,r=void 0===V.renderOpts.collectedExpire||V.renderOpts.collectedExpire>=m.INFINITE_CACHE?!1!==a&&a>0?P.expireTime:void 0:V.renderOpts.collectedExpire;return{value:{kind:_.CachedRouteKind.APP_ROUTE,status:n.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:a,expire:r}}}}catch(t){throw(null==a?void 0:a.isStale)&&await g.onRequestError(e,t,{routerKind:"App Router",routePath:f,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:b})},!1,S),t}},J=async(n,o)=>{try{var i,l;let n=await g.handleResponse({req:e,nextConfig:P,cacheKey:U,routeKind:a.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:N,responseGenerator:Z,waitUntil:r.waitUntil,isMinimalMode:B});if(!I)return;if((null==n||null==(i=n.value)?void 0:i.kind)!==_.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==n||null==(l=n.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});B||t.setHeader("x-nextjs-cache",b?"REVALIDATED":n.isMiss?"MISS":n.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let s=(0,h.fromNodeOutgoingHttpHeaders)(n.value.headers);B&&I||s.delete(m.NEXT_CACHE_TAGS_HEADER),!n.cacheControl||t.getHeader("Cache-Control")||s.get("Cache-Control")||s.set("Cache-Control",(0,v.getCacheControlHeader)(n.cacheControl)),await (0,p.sendResponse)(X,W,new Response(n.value.body,{headers:s,status:n.value.status||200}));return}catch(t){if(t instanceof R.NoFallbackError||await g.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:D,isOnDemandRevalidate:b})},!1,S),I)throw t;await (0,p.sendResponse)(X,W,new Response(null,{status:500}));return}finally{(()=>{if(!n)return;let e=t.statusCode;n.setAttributes({"http.status_code":e,"next.rsc":!1}),e&&e>=500&&(n.setStatus({code:s.SpanStatusCode.ERROR}),n.setAttribute("error.type",e.toString()));let a=K.getRootSpanAttributes();if(!a)return;if(a.get("next.span_type")!==d.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${a.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let r=a.get("next.route")||H,i=`${F} ${r}`;n.setAttributes({"next.route":r,"http.route":r,"next.span_name":i}),n.updateName(i),o&&o!==n&&(o.setAttribute("http.route",r),o.updateName(i))})()}};if($&&L)await J(L,void 0);else{let t=K.getActiveScopeSpan();await K.withPropagatedContext(e.headers,()=>K.trace(d.BaseServerSpan.handleRequest,{spanName:`${F} ${f}`,kind:s.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},e=>J(e,t)),void 0,!$)}}e.s(["handler",0,E,"patchFetch",0,function(){return(0,r.patchFetch)({workAsyncStorage:f,workUnitAsyncStorage:w})},"routeModule",0,g,"serverHooks",0,x,"workAsyncStorage",0,f,"workUnitAsyncStorage",0,w])},814317,e=>{e.v(e=>Promise.resolve().then(()=>e(265143)))},994193,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_node_timers_promises_1-73689._.js","server/chunks/_1dc_d1q._.js"].map(t=>e.l(t))).then(()=>t(39803)))},866938,e=>{e.v(e=>Promise.resolve().then(()=>e(378884)))},628124,e=>{e.v(e=>Promise.resolve().then(()=>e(629668)))},149325,e=>{e.v(e=>Promise.resolve().then(()=>e(786025)))},967030,e=>{e.v(e=>Promise.resolve().then(()=>e(783697)))},683671,e=>{e.v(t=>Promise.all(["server/chunks/node_modules_@vercel_oidc_dist_token_1o4m7ms.js"].map(t=>e.l(t))).then(()=>t(390391)))},329280,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_node_readline_1u65a-m._.js","server/chunks/node_modules_consola_dist_chunks_prompt_mjs_02axwqv._.js"].map(t=>e.l(t))).then(()=>t(781937)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__0wvo2of._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[70729,e=>{e.v(s=>Promise.all(["server/chunks/[externals]_node_crypto_1kn79-7._.js"].map(s=>e.l(s))).then(()=>s(666680)))},102473,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__18-2tsq._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(232347)))},973589,e=>{"use strict";var s=e.i(902157),r=e.i(912714),_=e.i(750227),t=e.i(333925);let n=(0,_.join)(t.APP_DIR,"guide"),o=".guide";async function h(){if(!(0,s.existsSync)(n))return;let e=(0,_.join)(t.DATA_DIR,t.PATHS.workspace,o);await (0,r.rm)(e,{recursive:!0,force:!0}),await (0,r.cp)(n,e,{recursive:!0})}e.s(["guideLine",0,()=>`How ${t.APP_NAME} works for the person using it — its screens, its settings, what it connects to, what to do when something stops — is written under \`${o}/\` here, \`index.md\` first. Read it whenever an answer depends on how the app works: what can be asked for, where something is changed, a wish that needs a setting switched on, something that stopped or was refused. Answer from it rather than from what you assume.`,"installGuide",0,h])},242792,e=>{e.v(s=>Promise.all(["server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y49572._.js","server/chunks/_10tkr26._.js","server/chunks/[root-of-the-server]__0nr-v8s._.js","server/chunks/_1y8w80a._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/_1kg70wc._.js","server/chunks/_1ogqovh._.js"].map(s=>e.l(s))).then(()=>s(799791)))},327784,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__0mrk2it._.js","server/chunks/_1tpr507._.js","server/chunks/features_0rfvely._.js","server/chunks/_05h2cii._.js","server/chunks/[root-of-the-server]__0n-l_n_._.js","server/chunks/features_0hdaci0._.js","server/chunks/_136j09a._.js","server/chunks/_1kg70wc._.js","server/chunks/_10tkr26._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/_1zxp-p6._.js","server/chunks/_1jn-aep._.js"].map(s=>e.l(s))).then(()=>s(49002)))},193435,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__0h_x6q6._.js","server/chunks/features_0hdaci0._.js","server/chunks/_0f6ts7z._.js","server/chunks/_1e48czp._.js","server/chunks/_1y8w80a._.js","server/chunks/lib_logger_ts_07e65t5._.js"].map(s=>e.l(s))).then(()=>s(5509)))},890054,e=>{e.v(s=>Promise.all(["server/chunks/_0eauz4t._.js"].map(s=>e.l(s))).then(()=>s(375814)))},51833,e=>{e.v(s=>Promise.all(["server/chunks/node_modules_consola_dist_chunks_prompt_mjs_1y49572._.js","server/chunks/lib_logger_ts_07e65t5._.js","server/chunks/[root-of-the-server]__1cjxw0-._.js"].map(s=>e.l(s))).then(()=>s(871096)))},573349,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__1wbc1wv._.js"].map(s=>e.l(s))).then(()=>s(913803)))},566462,e=>{e.v(s=>Promise.all(["server/chunks/[root-of-the-server]__0rl-fef._.js"].map(s=>e.l(s))).then(()=>s(313176)))},207580,e=>{e.v(s=>Promise.all(["server/chunks/[externals]__0y3n8y6._.js","server/chunks/node_modules_consola_dist_chunks_prompt_mjs_0q8fc1x._.js"].map(s=>e.l(s))).then(()=>s(27996)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1e6aut3._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[500874,(e,r,s)=>{r.exports=e.x("buffer",()=>require("buffer"))},233405,(e,r,s)=>{r.exports=e.x("child_process",()=>require("child_process"))},522734,(e,r,s)=>{r.exports=e.x("fs",()=>require("fs"))},70729,e=>{e.v(e=>Promise.resolve().then(()=>e(666680)))},347299,(e,r,s)=>{r.exports=e.x("node:http",()=>require("node:http"))},136340,(e,r,s)=>{r.exports=e.x("node:timers/promises",()=>require("node:timers/promises"))},446786,(e,r,s)=>{r.exports=e.x("os",()=>require("os"))},814747,(e,r,s)=>{r.exports=e.x("path",()=>require("path"))},605365,(e,r,s)=>{r.exports=e.x("process",()=>require("process"))},522275,e=>{e.v(e=>Promise.resolve().then(()=>e(380690)))},814317,e=>{e.v(e=>Promise.resolve().then(()=>e(265143)))},994193,e=>{e.v(e=>Promise.resolve().then(()=>e(39803)))},866938,e=>{e.v(e=>Promise.resolve().then(()=>e(378884)))},628124,e=>{e.v(e=>Promise.resolve().then(()=>e(629668)))},440998,e=>{"use strict";var r=e.i(912714),s=e.i(750227),i=e.i(687388),t=e.i(53748),o=e.i(629668),l=e.i(786025);async function n(e,a=i.WORKSPACE_VIEW.rows){let m=await (0,l.insideWorkspace)(e);m||(0,t.publicError)("Outside the workspace");let u=await (0,r.readdir)(m,{withFileTypes:!0}).catch(()=>null);u||(0,t.publicError)("No such folder");let c=u.filter(e=>e.isDirectory()?(0,o.isListedFolder)(e.name):e.isFile()&&"none"!==(0,o.viewKindOf)(e.name)).sort((e,r)=>Number(e.isFile())-Number(r.isFile())||e.name.localeCompare(r.name)),p=await Promise.all(c.slice(0,a).map(async i=>{let t=e?`${e}/${i.name}`:i.name;if(i.isDirectory())return{kind:"dir",name:i.name,path:t};let l=await (0,r.stat)((0,s.join)(m,i.name)).catch(()=>null);return l?{kind:"file",name:i.name,path:t,bytes:l.size,at:l.mtime,view:(0,o.viewKindOf)(i.name)}:null}));return{path:e,entries:p.filter(e=>null!==e),total:c.length}}async function a(e){return(await Promise.all(e.map(async e=>{let s=await (0,l.insideWorkspace)(e);if(!s)return null;let i=await (0,r.stat)(s).catch(()=>null);return i?.isFile()?{path:e,bytes:i.size}:null}))).filter(e=>null!==e)}e.s(["readWorkspaceFolder",0,n,"statFiles",0,a])},149325,e=>{e.v(e=>Promise.resolve().then(()=>e(786025)))},967030,e=>{e.v(e=>Promise.resolve().then(()=>e(783697)))},683671,e=>{e.v(r=>Promise.all(["server/chunks/node_modules_@vercel_oidc_dist_token_1o4m7ms.js"].map(r=>e.l(r))).then(()=>r(390391)))},329280,e=>{e.v(r=>Promise.all(["server/chunks/[externals]_node_readline_1u65a-m._.js","server/chunks/node_modules_consola_dist_chunks_prompt_mjs_02axwqv._.js"].map(r=>e.l(r))).then(()=>r(781937)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1ziojdq._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[750227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},59639,(a,b,c)=>{b.exports=a.x("node:process",()=>require("node:process"))},287702,a=>{"use strict";process.env.THURSDAY_APP_DIR?.trim()||process.cwd(),process.env.THURSDAY_HOME?.trim()||process.cwd(),process.env.THURSDAY_URL?.trim()||process.env.PORT?.trim();let b=".ai-workspace",c={workspace:b,artifacts:"artifacts",projects:"projects",scratch:"scratch",bots:"bots",output:".output",signIns:".sign-ins",skills:{default:"skills",custom:`${b}/.agents/skills`,own:".agents/skills",seeds:"seed-skills"}};a.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,8e3,"CALL_HISTORY_PAGE",0,10,"CALL_IDLE",0,{hangUpMs:2e4,warnMs:1e4},"CALL_LINE",0,{dwellMs:2e3},"CALL_NUDGE",0,{on:!1,waitMs:1500},"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,c,"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}])},992025,a=>{a.v(a=>Promise.resolve().then(()=>a(948986)))},199968,a=>{"use strict";var b=a.i(164831);let c={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};c.node;let d=(0,b.default)(c);a.s(["default",0,d])},141146,a=>{"use strict";var b=a.i(199968);a.s(["ChevronRight",()=>b.default])},929490,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1teyzfa._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SVP7TREG_mjs_03r5m21._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0lct0v1._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(161868)))},969267,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0yv-re6._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_1feyqvf._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_cytoscape_dist_cytoscape_esm_mjs_0arohj6._.js","server/chunks/ssr/node_modules_11trqmi._.js"].map(b=>a.l(b))).then(()=>b(626047)))},784520,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0qwth-_._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_blockDiagram-I7D4REHJ_mjs_0qg1lr5._.js"].map(b=>a.l(b))).then(()=>b(155638)))},613707,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-F27PBJKO_mjs_0ms0zmb._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_c4Diagram-7LVT6UL2_mjs_06bhe3-._.js"].map(b=>a.l(b))).then(()=>b(557384)))},53467,a=>{"use strict";var b=a.i(261234),c=a.i(539110);a.i(975930);var d=a.i(671731),e=(0,c.__name)(a=>{let{securityLevel:c}=(0,b.getConfig2)(),e=(0,d.select)("body");if("sandbox"===c){let b=(0,d.select)(`#i${a}`),c=b.node()?.contentDocument??document;e=(0,d.select)(c.body)}return e.select(`#${a}`)},"selectSvgElement");a.s(["selectSvgElement",0,e])},882458,a=>{"use strict";var b=a.i(416635),c=a.i(43429),d=a.i(428212),e=a.i(916573),f=a.i(887370),g=a.i(261234),h=a.i(875117),i=a.i(539110),j={common:g.common_default,getConfig:g.getConfig,insertCluster:b.insertCluster,insertEdge:c.insertEdge,insertEdgeLabel:c.insertEdgeLabel,insertMarkers:c.markers_default,insertNode:d.insertNode,interpolateToCurve:f.interpolateToCurve,labelHelper:e.labelHelper,log:h.log,positionEdgeLabel:c.positionEdgeLabel},k={},l=(0,i.__name)(a=>{for(let b of a)k[b.name]=b},"registerLayoutLoaders");(0,i.__name)(()=>{l([{name:"dagre",loader:(0,i.__name)(async()=>await a.A(390118),"loader")},{name:"swimlane",loader:(0,i.__name)(async()=>await a.A(860094),"loader")},{name:"cose-bilkent",loader:(0,i.__name)(async()=>await a.A(989520),"loader")}])},"registerDefaultLayoutLoaders")();var m=(0,i.__name)(async(a,b)=>{if(!(a.layoutAlgorithm in k))throw Error(`Unknown layout algorithm: ${a.layoutAlgorithm}`);if(a.diagramId)for(let b of a.nodes){let c=b.domId||b.id;b.domId=`${a.diagramId}-${c}`}let c=k[a.layoutAlgorithm],d=await c.loader(),{theme:e,themeVariables:f}=a.config,{useGradient:g,gradientStart:h,gradientStop:i}=f,l=b.attr("id");if(b.append("defs").append("filter").attr("id",`${l}-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",`${e?.includes("dark")?"#FFFFFF":"#000000"}`),b.append("defs").append("filter").attr("id",`${l}-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",`${e?.includes("dark")?"#FFFFFF":"#000000"}`),g){let a=b.append("linearGradient").attr("id",b.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");a.append("svg:stop").attr("offset","0%").attr("stop-color",h).attr("stop-opacity",1),a.append("svg:stop").attr("offset","100%").attr("stop-color",i).attr("stop-opacity",1)}return d.render(a,b,j,{algorithm:c.algorithm})},"render"),n=(0,i.__name)((a="",{fallback:b="dagre"}={})=>{if(a in k)return a;if(b in k)return h.log.warn(`Layout algorithm ${a} is not registered. Using ${b} as fallback.`),b;throw Error(`Both layout algorithms ${a} and ${b} are not registered.`)},"getRegisteredLayoutAlgorithm");a.s(["getRegisteredLayoutAlgorithm",0,n,"registerLayoutLoaders",0,l,"render",0,m])},854712,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_1v463pe._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-TICWLB2K_mjs_1t97mh7._.js"].map(b=>a.l(b))).then(()=>b(336243)))},892569,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_0thh8pk._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-TICWLB2K_mjs_1t97mh7._.js"].map(b=>a.l(b))).then(()=>b(538994)))},989520,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1nl12mt._.js","server/chunks/ssr/node_modules_cytoscape_dist_cytoscape_esm_mjs_0arohj6._.js"].map(b=>a.l(b))).then(()=>b(127273)))},388833,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1ix-g49._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_18pinup._.js"].map(b=>a.l(b))).then(()=>b(517237)))},390118,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_dagre-GXQ25YYZ_mjs_0k_lz8d._.js","server/chunks/ssr/node_modules_dagre-d3-es_src_dagre_index_0g66msq.js"].map(b=>a.l(b))).then(()=>b(920028)))},831868,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_20xmwtu._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0eji647._.js"].map(b=>a.l(b))).then(()=>b(767190)))},840309,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1-7qawg._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_18pinup._.js"].map(b=>a.l(b))).then(()=>b(464445)))},835410,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1_8mv4v._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_18pinup._.js"].map(b=>a.l(b))).then(()=>b(617803)))},728413,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0b8df3s._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_diagram-VX7I27RA_mjs_0dl8gzm._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_13hksv_._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(217755)))},992149,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0t-44lj._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_18pinup._.js"].map(b=>a.l(b))).then(()=>b(752425)))},70220,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_03ptrl9._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SVP7TREG_mjs_03r5m21._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0lct0v1._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(137554)))},595386,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0il0v7d._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_erDiagram-RLTQ6QDP_mjs_18g60i7._.js"].map(b=>a.l(b))).then(()=>b(239909)))},707604,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0ql0igl._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SHT3W25Y_mjs_00p5j42._.js"].map(b=>a.l(b))).then(()=>b(1258)))},598518,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1831lye._.js","server/chunks/ssr/node_modules_1_d0q_7._.js"].map(b=>a.l(b))).then(()=>b(722966)))},126571,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_10gbm2y._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0dlpxwr._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_gitGraphDiagram-WWUBYQGX_mjs_0g15hiw._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(349834)))},814636,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0sz5yg1._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_1ok0411._.js"].map(b=>a.l(b))).then(()=>b(525902)))},147136,a=>{a.v(b=>Promise.all(["server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_ishikawaDiagram-5VMMS53U_mjs_05o2e4d._.js"].map(b=>a.l(b))).then(()=>b(206340)))},719552,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_201yvda._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_journeyDiagram-3NMN7TZE_mjs_16ehrbl._.js"].map(b=>a.l(b))).then(()=>b(450754)))},653408,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-5VM5RSS4_mjs_0tg6kya._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_kanban-definition-UXKFOSKX_mjs_1uiqd5g._.js"].map(b=>a.l(b))).then(()=>b(301315)))},165250,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_1turj0n._.js","server/chunks/ssr/1daa_mermaid_dist_chunks_mermaid_core_mindmap-definition-YA3MSWOX_mjs_19k8byt._.js"].map(b=>a.l(b))).then(()=>b(790158)))},325455,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_1v9tc1c._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SVP7TREG_mjs_03r5m21._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0lct0v1._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(595628)))},934650,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1-2_5z7._.js","server/chunks/ssr/node_modules_1rg7lj4._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_1sgfrma._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(748116)))},389088,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_111pp7w._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_quadrantDiagram-AXDQQJYC_mjs_0h4a9wq._.js"].map(b=>a.l(b))).then(()=>b(888630)))},523431,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_059vtf2._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SVP7TREG_mjs_03r5m21._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_0lct0v1._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(846881)))},458290,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_1turj0n._.js","server/chunks/ssr/1daa_mermaid_dist_chunks_mermaid_core_requirementDiagram-BXWQKSXE_mjs_0kwiv6n._.js"].map(b=>a.l(b))).then(()=>b(443250)))},215730,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_d3-scale_src_1tr1qwb._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_sankeyDiagram-P5KCCOFB_mjs_187yyta._.js"].map(b=>a.l(b))).then(()=>b(656950)))},295724,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_1o1kg4c._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_sequenceDiagram-WJ2MYXX4_mjs_1n01m3a._.js"].map(b=>a.l(b))).then(()=>b(571979)))},482052,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_sizeCapture-INFHLROL_mjs_179zv_p._.js"].map(b=>a.l(b))).then(()=>b(865684)))},438231,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_1rxlz7e._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_stateDiagram-D77RDMKH_mjs_1mer5fv._.js","server/chunks/ssr/node_modules_dagre-d3-es_src_dagre_index_0g66msq.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-IMKFNOWR_mjs_0vdq1-l._.js"].map(b=>a.l(b))).then(()=>b(168538)))},991687,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_0jkhu0x._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-IMKFNOWR_mjs_0vdq1-l._.js"].map(b=>a.l(b))).then(()=>b(472309)))},860094,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_swimlanes-42K2YHIH_mjs_0scuk32._.js"].map(b=>a.l(b))).then(()=>b(827033)))},819980,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_04f6p6a._.js","server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_chunk-SHT3W25Y_mjs_00p5j42._.js"].map(b=>a.l(b))).then(()=>b(1471)))},623969,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_d3-shape_src_arc_1-w13bo.js","server/chunks/ssr/1daa_mermaid_dist_chunks_mermaid_core_timeline-definition-24CTP7MA_mjs_10dmaxt._.js"].map(b=>a.l(b))).then(()=>b(301394)))},788557,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_mermaid_dist_chunks_mermaid_core_vennDiagram-4TSXK5OY_mjs_0anqu7y._.js"].map(b=>a.l(b))).then(()=>b(509170)))},925161,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0yv-re6._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_wardleyDiagram-VM6X3IG4_mjs_0kh3fjb._.js","server/chunks/ssr/node_modules_@mermaid-js_parser_dist_17wxxyr._.js","server/chunks/ssr/1daa_@mermaid-js_parser_dist_chunks_mermaid-parser_core_chunk-FOHPRMQF_mjs_0ybwfeq._.js"].map(b=>a.l(b))).then(()=>b(914844)))},506751,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_0xht9wg._.js","server/chunks/ssr/1q96_modules_mermaid_dist_chunks_mermaid_core_xychartDiagram-S5SC5T6Z_mjs_08t5e44._.js"].map(b=>a.l(b))).then(()=>b(176947)))},236914,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_streamdown_dist_highlighted-body-KPVGNVTW_1fnf894.js"].map(b=>a.l(b))).then(()=>b(391282)))},172487,a=>{a.v(b=>Promise.all(["server/chunks/ssr/node_modules_streamdown_dist_mermaid-HWGCJPDP_093xi20.js"].map(b=>a.l(b))).then(()=>b(853409)))}];
2
-
3
- //# sourceMappingURL=%5Broot-of-the-server%5D__1srp8l5._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[901729,a=>a.a(async(b,c)=>{try{var d=a.i(187924),e=a.i(707963),f=a.i(141146),g=a.i(168370),h=a.i(998697),i=a.i(572327),j=a.i(707938),k=a.i(483138),l=a.i(69095),m=a.i(844561),n=a.i(71215),o=a.i(649268),p=a.i(239025),q=a.i(951675),r=a.i(586446),s=a.i(572131),t=a.i(767561),u=a.i(340695),v=a.i(446181),w=a.i(287702),x=a.i(619477),y=a.i(369768),z=a.i(36714),A=a.i(608945),B=a.i(239036),C=a.i(199169),D=a.i(313237),E=a.i(759497),F=a.i(497895),G=b([y]);[y]=G.then?(await G)():G;let M={markdown:k.FileText,csv:p.Sheet,json:j.FileJson,text:k.FileText,frame:i.FileCode2,image:n.Image,audio:o.Music,video:r.Video,none:h.File};function H({label:a,rows:b,children:c}){return 0===b.length?null:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"px-3 pt-3 pb-1 font-mono text-[10px] text-muted-foreground/60",children:a}),c]})}function I({entry:a,active:b,onPick:c}){let e="dir"===a.kind?l.Folder:M[a.view];return(0,d.jsxs)("button",{type:"button",onClick:c,title:"file"===a.kind?`${a.name} \xb7 ${(0,C.shortAgo)(a.at)}`:a.name,className:(0,F.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",b?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,d.jsx)(e,{className:"size-3.5 shrink-0 opacity-70"}),(0,d.jsx)("span",{className:"min-w-0 flex-1 truncate",children:a.name}),"file"===a.kind?(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/75",children:(0,F.formatBytes)(a.bytes)}),(0,d.jsx)("span",{className:"w-3.5 shrink-0"})]}):(0,d.jsx)(f.ChevronRight,{className:"size-3.5 shrink-0 text-muted-foreground/50"})]})}function J({empty:a,onReveal:b}){return(0,d.jsxs)("div",{className:"space-y-4 p-8",children:[a?(0,d.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:["Nothing here yet. What a bot writes during a call lands in"," ",(0,d.jsx)("span",{className:"font-mono text-[13px] text-foreground",children:"artifacts/"})," ","— a page, a table, a picture — and shows up here to open."]}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:"Pick a file on the left."}),(0,d.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:"Only what the app can open is listed — a page, a table, a picture, a note. Installed packages and tool leftovers are left out, and no folder is measured, so a folder opens as fast as it lists. Reveal folder for everything else."})]}),(0,d.jsxs)(u.Button,{variant:"outline",onClick:b,children:[(0,d.jsx)(m.FolderOpen,{}),"Reveal folder"]})]})}function K({file:a,onGone:b}){let c=a.path,[e]=(0,D.useServerAction)(B.openFileAction),[f,h]=(0,D.useServerAction)(z.deleteWorkspaceFileAction,{okMessage:"File deleted",onOk:()=>{(0,E.revalidate)(t.queryKey.workspace),b()}}),i=async()=>{await v.notify.confirm({title:`Delete ${c.split("/").pop()}?`,description:"It is deleted from disk for good.",okText:"Delete",destructive:!0})&&f(c)};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-b border-border/60 px-6 py-2",children:[(0,d.jsx)(L,{path:c}),(0,d.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:[(0,F.formatBytes)(a.bytes)," · ",(0,C.shortAgo)(a.at)]}),(0,d.jsx)("a",{href:t.queryKey.fileView(c),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,d.jsx)(g.ExternalLink,{className:"size-4"})}),(0,d.jsx)(u.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>e(c),children:(0,d.jsx)(m.FolderOpen,{})}),(0,d.jsx)(u.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:h,className:"text-muted-foreground",onClick:i,children:(0,d.jsx)(q.Trash2,{})})]}),(0,d.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:(0,d.jsx)(y.FilePreview,{path:c,bytes:a.bytes})})]})}function L({path:a}){let b=["workspace",...a.split("/").filter(Boolean)];return(0,d.jsx)("span",{className:"flex min-w-0 flex-1 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:b.map((a,c)=>(0,d.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[c>0&&(0,d.jsx)(f.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,d.jsx)("span",{className:(0,F.cn)("truncate",c===b.length-1&&"text-foreground"),children:a})]},`${c}-${a}`))})}a.s(["WorkspaceSetting",0,function(){let[a,b]=(0,s.useState)(""),[c,f]=(0,s.useState)(w.WORKSPACE_VIEW.rows),[g,h]=(0,s.useState)(null),[i,j]=(0,s.useState)(""),{data:k,isLoading:l,error:n}=(0,E.useServerRoute)(t.queryKey.workspaceFolder(a,c),{keepPreviousData:!0}),o=a=>{b(a),f(w.WORKSPACE_VIEW.rows)},[p,q]=(0,D.useServerAction)(A.emptyScratchAction,{okMessage:"Scratch emptied",onOk:()=>(0,E.revalidate)(t.queryKey.workspace)}),[r]=(0,D.useServerAction)(B.openFileAction),y=async()=>{await v.notify.confirm({title:"Empty scratch?",description:"Everything under scratch/ is deleted for good. artifacts/ and projects/ are untouched.",okText:"Empty",destructive:!0})&&p()};if(l)return(0,d.jsx)(x.SettingPanesSkeleton,{});if(n)return(0,d.jsx)(x.SettingError,{message:n.message});let z=k?.entries??[],C=k?.total??0,F=i.trim().toLowerCase(),G=F?z.filter(a=>a.name.toLowerCase().includes(F)):z,L=G.filter(a=>"dir"===a.kind),M=G.filter(a=>"file"===a.kind),N=z.find(a=>"file"===a.kind&&a.path===g?.path)??g;return(0,d.jsx)(x.SettingPanes,{footer:(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(x.SettingRailNote,{children:(0,d.jsxs)("span",{className:"font-mono",children:[(0,d.jsx)("span",{className:"font-medium text-foreground",children:`.ai-workspace${a?`/${a}`:""}`}),` \xb7 ${function(a,b){let c=a.filter(a=>"dir"===a.kind).length,d=a.length-c,e=[c&&`${c} ${1===c?"folder":"folders"}`,d&&`${d} ${1===d?"file":"files"}`].filter(Boolean);if(!e.length)return"empty";let f=e.join(" · ");return b>a.length?`${f} of ${b.toLocaleString("en")}`:f}(z,C)}`]})}),(0,d.jsxs)(u.Button,{variant:"outline",size:"sm",onClick:()=>r(a||"."),children:[(0,d.jsx)(m.FolderOpen,{}),"Reveal folder"]}),(0,d.jsx)(u.Button,{variant:"outline",size:"sm",loading:q,onClick:y,className:"text-destructive hover:text-destructive",children:"Empty scratch"})]}),left:(0,d.jsxs)("div",{className:"flex flex-col py-2",children:[(0,d.jsx)(x.SettingFilter,{value:i,onChange:j,placeholder:"Filter this folder",className:"mx-2 mb-1.5 w-auto"}),a&&(0,d.jsxs)("button",{type:"button",onClick:()=>o(a.split("/").slice(0,-1).join("/")),className:"mx-2 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,d.jsx)(e.ChevronLeft,{className:"size-3 shrink-0"}),(0,d.jsx)("span",{className:"truncate",children:a.split("/").slice(0,-1).pop()??"workspace"})]}),0===G.length?(0,d.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground/60",children:F?"Nothing matches":"Empty folder"}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(H,{label:"folders",rows:L,children:L.map(a=>(0,d.jsx)(I,{entry:a,onPick:()=>o(a.path)},a.path))}),(0,d.jsx)(H,{label:"files",rows:M,children:M.map(a=>(0,d.jsx)(I,{entry:a,active:a.path===g?.path,onPick:()=>"file"===a.kind&&h(a)},a.path))})]}),C>z.length&&(0,d.jsx)("button",{type:"button",onClick:()=>f(c+w.WORKSPACE_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(w.WORKSPACE_VIEW.rows,C-z.length)} more of ${C.toLocaleString("en")}`})]}),right:N?.kind==="file"?(0,d.jsx)(K,{file:N,onGone:()=>h(null)},N.path):(0,d.jsx)(J,{empty:!a&&0===z.length,onReveal:()=>r(".")})})}]),c()}catch(a){c(a)}},!1),36714,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f88aa9d4f071f0ca59f62a7efd73449ccb68a55fc",b.callServer,void 0,b.findSourceMapURL,"deleteWorkspaceFileAction");a.s(["deleteWorkspaceFileAction",0,c])},608945,a=>{"use strict";var b=a.i(405050);let c=(0,b.createServerReference)("7f5746f90014636cd97f995833f6d8c4cf624f00e5",b.callServer,void 0,b.findSourceMapURL,"emptyScratchAction");a.s(["emptyScratchAction",0,c])},572327,a=>{"use strict";var b=a.i(164831);let c={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};c.node;let d=(0,b.default)(c);a.s(["FileCode2",0,d],572327)},69095,a=>{"use strict";var b=a.i(164831);let c={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};c.node;let d=(0,b.default)(c);a.s(["Folder",0,d],69095)},239025,a=>{"use strict";var b=a.i(164831);let c={name:"sheet",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]};c.node;let d=(0,b.default)(c);a.s(["Sheet",0,d],239025)},951675,a=>{"use strict";var b=a.i(164831);let c={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};c.node;let d=(0,b.default)(c);a.s(["Trash2",0,d],951675)},586446,a=>{"use strict";var b=a.i(164831);let c={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};c.node;let d=(0,b.default)(c);a.s(["Video",0,d],586446)}];
2
-
3
- //# sourceMappingURL=_0mes4s0._.js.map
@@ -1,3 +0,0 @@
1
- module.exports=[545097,a=>{"use strict";var b=a.i(187924),c=a.i(497895);let d={muted:{rest:"text-muted-foreground",under:"text-muted-foreground/60 dark:text-muted-foreground",band:"via-foreground"},waiting:{rest:c.WAITING_INK,under:"text-amber-700/60 dark:text-amber-400",band:"via-amber-950 dark:via-amber-100"}};a.s(["ShinyText",0,function({text:a,tone:e="muted",motion:f="shine",speed:g=2.4,className:h}){let{rest:i,under:j,band:k}=d[e];return"pulse"===f?(0,b.jsx)("span",{"data-slot":"shiny-text",className:(0,c.cn)("inline-block max-w-full animate-pulse motion-reduce:animate-none",i,h),children:a}):(0,b.jsxs)("span",{"data-slot":"shiny-text",className:(0,c.cn)("relative inline-block max-w-full",j,h),children:[a,(0,b.jsx)("span",{"aria-hidden":!0,style:{animationDuration:`${g}s`},className:(0,c.cn)("pointer-events-none absolute inset-0 animate-shine overflow-hidden bg-linear-120 from-transparent from-35% via-50% to-transparent to-65% bg-size-[200%_auto] bg-clip-text text-transparent p-[inherit] select-none [text-overflow:inherit] motion-reduce:hidden",k),children:a})]})}])},862966,a=>{"use strict";var b=a.i(572131),c=a.i(988712),d=a.i(426618),e=a.i(664565),f=a.i(487610),g=a.i(561311);let h=Promise.resolve(),i=(0,e.withMiddleware)(c.u,a=>(c,e,i)=>{let j,k=(0,b.useRef)(!1),{cache:l,initialSize:m=1,revalidateAll:n=!1,persistSize:o=!1,revalidateFirstPage:p=!0,revalidateOnMount:q=!1,parallel:r=!1}=i,[,,,s]=d.a.get(d.o);try{(j=(0,d.s)(c?c(0,null):null)[0])&&(j=g.INFINITE_PREFIX+j)}catch(a){}let[t,u,v]=(0,d.c)(l,j),w=(0,b.useCallback)(()=>(0,d.i)(t()._l)?m:t()._l,[l,j,m]);(0,f.useSyncExternalStore)((0,b.useCallback)(a=>j?v(j,()=>{a()}):()=>{},[l,j]),w,w);let x=(0,b.useCallback)(()=>{let a=t()._l;return(0,d.i)(a)?m:a},[j,m]),y=(0,b.useRef)(x());(0,d.u)(()=>{if(!k.current){k.current=!0;return}j&&u({_l:o?y.current:x()})},[j,l]);let z=q&&!k.current,A=a(j,async a=>{let b=t()._i,f=t()._r,g=d.a.get(l),h=g[8],j=()=>g[8]!==h;u({_r:d.U});let k=[],m=x(),[o]=(0,d.c)(l,a),q=o().data,v=[],w=null;for(let a=0;a<m;++a){let[g,h]=(0,d.s)(c(a,r?null:w));if(!g)break;let[m,o]=(0,d.c)(l,g),t=m().data,u=n||b||(0,d.i)(t)||p&&!a&&!(0,d.i)(q)||z||q&&!(0,d.i)(q[a])&&!i.compare(q[a],t);if(e&&("function"==typeof f?f(t,h):u)){let b=async()=>{if(g in s){let a=s[g];delete s[g],t=await a}else t=await e(h);j()||o({data:t,_k:h}),k[a]=t};r?v.push(b):await b()}else k[a]=t;r||(w=t)}return r&&await Promise.all(v.map(a=>a())),j()||u({_i:d.U}),k},i),B=(0,b.useCallback)(function(a,b){let c="boolean"==typeof b?{revalidate:b}:b||{},e=!1!==c.revalidate;return j?(e&&((0,d.i)(a)?u({_i:!0,_r:c.revalidate}):u({_i:!1,_r:c.revalidate})),arguments.length?A.mutate(a,{...c,revalidate:e}):A.mutate()):h},[j,l]),C=(0,b.useCallback)(a=>{let b;if(!j)return h;let[,e]=(0,d.c)(l,j);if((0,d.e)(a)?b=a(x()):"number"==typeof a&&(b=a),"number"!=typeof b)return h;e({_l:b}),y.current=b;let f=[],[g]=(0,d.c)(l,j),i=null;for(let a=0;a<b;++a){let[b]=(0,d.s)(c(a,i)),[e]=(0,d.c)(l,b),h=b?e().data:d.U;if((0,d.i)(h))return B(g().data);f.push(h),i=h}return B(f)},[j,l,B,x]);return{size:x(),setSize:C,mutate:B,get data(){return A.data},get error(){return A.error},get isValidating(){return A.isValidating},get isLoading(){return A.isLoading}}});var j=a.i(287702),k=a.i(759497);a.s(["useServerPages",0,function(a){let c=a.size??j.PAGE_SIZE,{key:d}=a,{data:e,error:f,isLoading:g,isValidating:h,setSize:l,mutate:m}=i((a,b)=>(0,k.resolveKey)(d(a,b)),k.fetchRoute,{dedupingInterval:500,revalidateOnMount:!0,revalidateOnFocus:!0,revalidateOnReconnect:!0,focusThrottleInterval:1e3,revalidateFirstPage:!1,...a.swr}),n=e??[],o=(0,b.useMemo)(()=>(e??[]).flat(),[e]),p=n.at(-1),q=void 0!==p&&p.length>=c,r=(0,b.useRef)(0),s=h&&n.length>0&&r.current>n.length,t=(0,b.useRef)({isValidating:h,setSize:l,pages:n.length});t.current={isValidating:h,setSize:l,pages:n.length};let u=(0,b.useCallback)(()=>m(),[m]),v=(0,k.resolveKey)(d(0,null)),w="string"==typeof v?v:v?.url;(0,b.useEffect)(()=>{if(w)return(0,k.registerPagedReader)({url:w,refresh:u})},[w,u]);let x=function(a,c={}){let{enabled:d=!0,margin:e="600px",revision:f}=c,g=(0,b.useRef)(a);g.current=a;let h=(0,b.useRef)(null),i=(0,b.useRef)(null),j=(0,b.useCallback)(a=>{h.current=a},[]);return(0,b.useEffect)(()=>{i.current?.disconnect();let a=h.current;if(a&&d)return i.current=new IntersectionObserver(([a])=>{a.isIntersecting&&g.current()},{root:function(a){let b=a.parentElement;for(;b;){let{overflowY:a}=getComputedStyle(b);if(("auto"===a||"scroll"===a)&&b.scrollHeight>b.clientHeight)return b;b=b.parentElement}return null}(a),rootMargin:e}),i.current.observe(a),()=>i.current?.disconnect()},[d,e,f]),j}(()=>{let a=t.current;a.isValidating||(r.current=a.pages+1,a.setSize(a.pages+1))},{enabled:q,revision:`${n.length}:${h}`});return{items:o,isLoading:g,isLoadingMore:s,error:f,hasMore:q,sentinelRef:x,refresh:u}}],862966)},16966,a=>{"use strict";var b=a.i(572131),c=a.i(801811),d=a.i(559539),e=a.i(492403);a.s(["useCompositeItem",0,function(a={}){let{highlightItemOnHover:f,highlightedIndex:g,onHighlightedIndexChange:h}=(0,d.useCompositeRootContext)(),{ref:i,index:j}=(0,e.useCompositeListItem)(a),k=g===j,l=b.useRef(null),m=(0,c.useMergedRefs)(i,l);return{compositeProps:{tabIndex:k?0:-1,onFocus(){h(j)},onMouseMove(){let a=l.current;if(!f||!a)return;let b=a.hasAttribute("disabled")||"true"===a.ariaDisabled;k||b||a.focus()}},compositeRef:m,index:j}}])},579923,a=>{"use strict";var b=a.i(572131),c=a.i(779549),d=a.i(854401),e=a.i(357738),f=a.i(909392),g=a.i(187924);function h(){return new Map}function i(){return new Set}function j(a,b){return a.compareDocumentPosition(b)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}a.s(["CompositeList",0,function(a){let{children:k,elementsRef:l,labelsRef:m,onMapChange:n}=a,o=(0,d.useStableCallback)(n),[,p]=b.useState(!1),q=(0,c.useRefWithInit)(i).current,r=(0,c.useRefWithInit)(h).current,s=b.useRef(0),t=b.useRef(!0),u=b.useRef(null),v=b.useRef(null),w=(0,d.useStableCallback)(()=>{t.current||(t.current=!0,p(a=>!a))}),x=(0,d.useStableCallback)((a,b)=>{r.set(a,b),w()}),y=(0,d.useStableCallback)(a=>{r.delete(a),w()}),z=(0,d.useStableCallback)(a=>{let b=new Map;return l.current.length=0,m&&(m.current.length=0),a.forEach(a=>{b.set(a.element,{...a.registration.metadata??{},index:a.index}),l.current[a.index]=a.element,m&&(m.current[a.index]=void 0!==a.registration.label?a.registration.label:a.registration.textRef?.current?.textContent??a.element.textContent)}),s.current=l.current.length,b}),A=(0,d.useStableCallback)(()=>{var a;let b,c,d,e,[f,g]=(a=r,b=new Set,c=[],d=[],a.forEach((a,e)=>{if(!e.isConnected)return;let f=a.index,g={index:f??-1,element:e,registration:a};null===f?d.push(g):f>=0&&(b.add(f),c.push(g))}),e=0,d.sort((a,b)=>j(a.element,b.element)),d.forEach(a=>{for(;b.has(e);)e+=1;a.index=e,c.push(a),e+=1}),b.size>0&&c.sort((a,b)=>a.index-b.index),[c,d.map(a=>a.element)]),h=z(f),i=u.current,k=!i||i.length!==f.length||f.some((a,b)=>{let c=i[b];return a.index!==c.index||a.element!==c.element||a.registration.index!==c.registration.index||a.registration.metadata!==c.registration.metadata});!function(a){if(v.current?.disconnect(),v.current=null,"function"!=typeof MutationObserver||a.length<2)return;let b=new MutationObserver(c=>{if(!function(a){for(let b of a)for(let a=0;a<b.removedNodes.length;a+=1)if(b.removedNodes[a].isConnected)return!0;return!1}(c))return;let d=null;for(let c of a)if(c.isConnected){if(d&&j(d,c)>0){b.disconnect(),w();return}d=c}});v.current=b;let c=new Set;for(let b=1;b<a.length;b+=1){let d=function(a,b){let c=a.parentElement;for(;c&&!c.contains(b);)c=c.parentElement;return c}(a[b-1],a[b]);d&&c.add(d)}c.forEach(a=>b.observe(a,{childList:!0}))}(g),u.current=f,t.current=!1,k&&(q.forEach(a=>a(h)),o(h))});(0,e.useIsoLayoutEffect)(()=>(!t.current&&u.current&&z(u.current),()=>{l.current=[],m&&(m.current=[])}),[l,m,z]),(0,e.useIsoLayoutEffect)(()=>{t.current&&A()}),(0,e.useIsoLayoutEffect)(()=>()=>{v.current?.disconnect(),t.current=!0},[]);let B=(0,d.useStableCallback)(a=>(q.add(a),()=>{q.delete(a)})),C=b.useMemo(()=>({register:x,unregister:y,subscribeMapChange:B,nextIndexRef:s}),[x,y,B,s]);return(0,g.jsx)(f.CompositeListContext.Provider,{value:C,children:k})}])},909392,a=>{"use strict";var b=a.i(572131);let c=b.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});a.s(["CompositeListContext",0,c,"useCompositeListContext",0,function(){return b.useContext(c)}])},492403,a=>{"use strict";var b=a.i(572131),c=a.i(357738),d=a.i(909392);a.s(["useCompositeListItem",0,function(a={}){let{guess:e,label:f,metadata:g,textRef:h,index:i}=a,{register:j,unregister:k,subscribeMapChange:l,nextIndexRef:m}=(0,d.useCompositeListContext)(),n=b.useRef(-1),[o,p]=b.useState(null==i&&e?()=>{if(-1===n.current){let a=m.current;m.current+=1,n.current=a}return n.current}:-1),q=i??o,r=b.useRef(null),s=b.useCallback(a=>{let b=r.current;b&&k(b),r.current=a,a&&j(a,{metadata:g??null,index:i??null,label:f,textRef:h})},[i,j,k,g,f,h]);return(0,c.useIsoLayoutEffect)(()=>{if(null==i)return l(a=>{let b=r.current?a.get(r.current)?.index:null;null!=b&&p(b)})},[i,l]),{ref:s,index:q}}])},589027,a=>{"use strict";var b=a.i(164831);let c={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};c.node;let d=(0,b.default)(c);a.s(["ChevronDown",0,d],589027)},875160,a=>{"use strict";var b=a.i(702918);a.s(["Loader2",()=>b.default])},474215,a=>{"use strict";var b=a.i(176965);a.s(["X",()=>b.default])}];
2
-
3
- //# sourceMappingURL=_0ya0cb0._.js.map