thursday-agent 0.9.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +0 -1
- package/.next/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- package/.next/routes-manifest.json +0 -6
- package/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +2 -2
- package/.next/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/artifact/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/keep-working/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/files/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/bot/thread/route.js.nft.json +1 -1
- package/.next/server/app/api/config/route.js.nft.json +1 -1
- package/.next/server/app/api/events/route.js.nft.json +1 -1
- package/.next/server/app/api/favicon/[host]/route.js.nft.json +1 -1
- package/.next/server/app/api/file/[...path]/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/credits/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/route.js.nft.json +1 -1
- package/.next/server/app/api/llm-model/subscription/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/oauth/callback/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/route.js.nft.json +1 -1
- package/.next/server/app/api/mcp/tools/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/edit/route.js.nft.json +1 -1
- package/.next/server/app/api/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/reach/route.js +13 -13
- package/.next/server/app/api/reach/route.js.nft.json +1 -1
- package/.next/server/app/api/routine/route.js.nft.json +1 -1
- package/.next/server/app/api/signins/route.js +1 -1
- package/.next/server/app/api/signins/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/[source]/[name]/route.js.nft.json +1 -1
- package/.next/server/app/api/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/call/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/text/route.js.nft.json +1 -1
- package/.next/server/app/api/thursday/tool-call/route.js +14 -15
- package/.next/server/app/api/thursday/tool-call/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/files/route.js.nft.json +1 -1
- package/.next/server/app/api/workspace/route.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page/server-reference-manifest.json +1 -1
- package/.next/server/app/artifact/[...path]/page.js.nft.json +1 -1
- package/.next/server/app/artifact/[...path]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/favicon.ico/route.js.nft.json +1 -1
- package/.next/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/.next/server/app/page/server-reference-manifest.json +56 -56
- package/.next/server/app/page.js +4 -4
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +0 -1
- package/.next/server/chunks/[root-of-the-server]__014ydvq._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0209ah4._.js +7 -5
- package/.next/server/chunks/[root-of-the-server]__04r4h-2._.js +4 -2
- package/.next/server/chunks/[root-of-the-server]__0542v_d._.js +3 -0
- package/.next/server/chunks/[root-of-the-server]__0gewdg9._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__0mrk2it._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1-swlkw._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__12iddfq._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1ai5lme._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__1cjxw0-._.js +2 -2
- package/.next/server/chunks/{[root-of-the-server]__1fy2g82._.js → [root-of-the-server]__1k3j52n._.js} +1 -1
- package/.next/server/chunks/[root-of-the-server]__1kyjt5m._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__1ygplx1._.js +1 -1
- package/.next/server/chunks/_05v8k21._.js +3 -1
- package/.next/server/chunks/_0awtznl._.js +1 -1
- package/.next/server/chunks/_0na2fj1._.js +1 -1
- package/.next/server/chunks/_0x-ej3f._.js +17 -17
- package/.next/server/chunks/_12-amdu._.js +2 -2
- package/.next/server/chunks/_15740dw._.js +60 -0
- package/.next/server/chunks/_1dc_d1q._.js +3 -3
- package/.next/server/chunks/_1i350l5._.js +3 -1
- package/.next/server/chunks/_1jc5g4p._.js +2 -2
- package/.next/server/chunks/_1jn-aep._.js +4 -4
- package/.next/server/chunks/_1m88lkh._.js +11 -11
- package/.next/server/chunks/_1ogqovh._.js +4 -4
- package/.next/server/chunks/_1uuucy-._.js +1 -1
- package/.next/server/chunks/_1zxp-p6._.js +1 -1
- package/.next/server/chunks/features_0rfvely._.js +5 -3
- package/.next/server/chunks/ssr/{[root-of-the-server]__1se25x0._.js → [root-of-the-server]__0hpp3nw._.js} +29 -13
- package/.next/server/chunks/ssr/[root-of-the-server]__0m7u9j-._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0tzekbl._.js +24 -60
- package/.next/server/chunks/ssr/[root-of-the-server]__1cz2rz5._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0tvavy9._.js → [root-of-the-server]__1iwyp1e._.js} +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1w9hqq8._.js +1 -1
- package/.next/server/chunks/ssr/_097-ljd._.js +1 -1
- package/.next/server/chunks/ssr/{_1tmu8z-._.js → _0btzccu._.js} +2 -2
- package/.next/server/chunks/ssr/_0fqhhwi._.js +1 -1
- package/.next/server/chunks/ssr/_0hjzb5o._.js +3 -0
- package/.next/server/chunks/ssr/_0ld9_qq._.js +1 -1
- package/.next/server/chunks/ssr/{_0urj3mc._.js → _0ouzu9f._.js} +2 -2
- package/.next/server/chunks/ssr/{_1-zyvdb._.js → _0u7ko71._.js} +2 -2
- package/.next/server/chunks/ssr/{_0ltz2q5._.js → _0wd_o8-._.js} +2 -2
- package/.next/server/chunks/ssr/_0ya0cb0._.js +3 -0
- package/.next/server/chunks/ssr/_10yyqtk._.js +67 -0
- package/.next/server/chunks/ssr/{_1uy0xom._.js → _12eyown._.js} +3 -3
- package/.next/server/chunks/ssr/_12mijol._.js +11 -11
- package/.next/server/chunks/ssr/_132qkfz._.js +1 -1
- package/.next/server/chunks/ssr/_184327j._.js +1 -1
- package/.next/server/chunks/ssr/{_1z74dmq._.js → _19ps4p3._.js} +7 -7
- package/.next/server/chunks/ssr/{_1flbs77._.js → _1bhy4yg._.js} +2 -2
- package/.next/server/chunks/ssr/_1d423aj._.js +7 -5
- package/.next/server/chunks/ssr/{_1a-nuxx._.js → _1kd843u._.js} +2 -2
- package/.next/server/chunks/ssr/{_0ital-2._.js → _1kq2ye_._.js} +2 -2
- package/.next/server/chunks/ssr/_1mqn9mc._.js +1 -1
- package/.next/server/chunks/ssr/_1neoj22._.js +1 -1
- package/.next/server/chunks/ssr/_1p8xorg._.js +3 -0
- package/.next/server/chunks/ssr/{_1x-kojb._.js → _1q683w8._.js} +3 -3
- package/.next/server/chunks/ssr/_1tawxu2._.js +3 -0
- package/.next/server/chunks/ssr/{_0scf7xy._.js → _1w2oba6._.js} +2 -2
- package/.next/server/chunks/ssr/_1xoch6f._.js +1 -1
- package/.next/server/chunks/ssr/{_0kjj5ts._.js → _1ybo1hd._.js} +3 -3
- package/.next/server/chunks/ssr/features_bot_0s11m4r._.js +3 -0
- package/.next/server/chunks/ssr/features_connectors_components_mcp-setting_tsx_0jmbgvp._.js +1 -1
- package/.next/server/chunks/ssr/features_memory_components_memory-setting_tsx_0oa43sw._.js +1 -1
- package/.next/server/chunks/ssr/features_routine_components_routine-setting_tsx_055fknz._.js +1 -1
- package/.next/server/chunks/ssr/features_workspace_00jz2hu._.js +1 -1
- package/.next/server/chunks/ssr/{node_modules_1af3w91._.js → node_modules_00pocul._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0th357h._.js → node_modules_02zt4az._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0jljel9._.js → node_modules_05ojmcl._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0wnlddw._.js → node_modules_06i6bli._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06bb4q8._.js → node_modules_09dj429._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_068ws5v._.js → node_modules_0auzgvx._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ogczzz._.js → node_modules_0evjwh1._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13kwejm._.js → node_modules_0gmdur8._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1s-gb-1._.js → node_modules_0j3te-1._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bucjlk._.js → node_modules_0rbaymq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wbkzl9._.js → node_modules_0tf8_1e._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12et8d5._.js → node_modules_0yqy-0b._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1lkix61._.js → node_modules_1-53ebx._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_03d0rfz._.js → node_modules_1-y9aho._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0x630an._.js → node_modules_11bltzp._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0uyh_vb._.js → node_modules_18jn2qo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0dzm4um._.js → node_modules_1_te3bu._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_07rs_p2._.js → node_modules_1c0pg3k._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0sgy-dc._.js → node_modules_1en2jx5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0ubdtk-._.js → node_modules_1p-c8cr._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1z1lrbk._.js → node_modules_1qe-oxg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_04_sbbc._.js → node_modules_1rjt833._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0yvz9e0._.js → node_modules_1tzw5sn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1uwg-gz._.js → node_modules_1x6uwvn._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0t_ez6-._.js → node_modules_1zqddke._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_05ybmta._.js → node_modules_211zgim._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0r443fh._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0y51bqj._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_10wnlbk._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1sc114e._.js} +1 -1
- package/.next/server/middleware-build-manifest.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +57 -57
- package/.next/static/chunks/{13ixzheqw7o-w.js → 03-724sj0nk_z.js} +2 -2
- package/.next/static/chunks/03bhu4mk8en2q.js +1 -0
- package/.next/static/chunks/{3h2e-xv1zxh_f.js → 04imzjhvzw65d.js} +2 -2
- package/.next/static/chunks/{27tvv1i-smrck.js → 0gljzv9fz1g7d.js} +1 -1
- package/.next/static/chunks/{37j27b3e1gt7r.js → 0h0lythv1ql93.js} +1 -1
- package/.next/static/chunks/{2o4dndk0d68do.js → 0hzbj7f48cmx0.js} +1 -1
- package/.next/static/chunks/0lwunwbl7u7pt.js +1 -0
- package/.next/static/chunks/{0u9ae9k_2g7k3.js → 0r6nwxg4dv83t.js} +1 -1
- package/.next/static/chunks/0rn9nbg6aif9f.js +17 -0
- package/.next/static/chunks/{3bbzsitgiltnt.js → 0x_w4shtvrrfg.js} +1 -1
- package/.next/static/chunks/{2sdwbfs1x5skp.js → 0ympuji_ufypd.js} +1 -1
- package/.next/static/chunks/{3t9huugh-5_ps.js → 0zmrz4zfzm4dt.js} +1 -1
- package/.next/static/chunks/{0qmd8n52hp-6v.js → 11tlxkr7a_rpc.js} +1 -1
- package/.next/static/chunks/{2c64drdevdla3.js → 12scesro428m7.js} +2 -2
- package/.next/static/chunks/16s2fx3890_jd.js +65 -0
- package/.next/static/chunks/{0oyz95sujd2c7.js → 1qzfgplyo18tc.js} +1 -1
- package/.next/static/chunks/{04e-e--5lk26x.js → 1r4zajz14jp9-.js} +1 -1
- package/.next/static/chunks/1s6m4cmbn7htf.js +1 -0
- package/.next/static/chunks/1wl9t1-3i-q8p.css +1 -0
- package/.next/static/chunks/2-asot3p1j3yg.js +1 -0
- package/.next/static/chunks/{0u3ktztrzu1fa.js → 2-jn4xscbm-i2.js} +1 -1
- package/.next/static/chunks/22h9gvclqtx_2.js +1 -0
- package/.next/static/chunks/{337g9g_ux2gj-.js → 26-eblxwnykck.js} +1 -1
- package/.next/static/chunks/{43q9cgbuw8krx.js → 2kzwhbuobpkw3.js} +2 -2
- package/.next/static/chunks/2m6jd3586ijb-.js +1 -0
- package/.next/static/chunks/{0_awn8tucznxc.js → 304q9p54tcgm1.js} +1 -1
- package/.next/static/chunks/{1u5i-jti87jbo.js → 35wdx3wt7cg4a.js} +1 -1
- package/.next/static/chunks/37unh9460im7v.js +18 -0
- package/.next/static/chunks/{01xjer0i_e5z5.js → 39gj5vxz1zpm_.js} +1 -1
- package/.next/static/chunks/{427qsc6kahxyo.js → 39vrqy1r_00jc.js} +1 -1
- package/.next/static/chunks/{245hb85nsy6j4.js → 3dipmu0mptqum.js} +1 -1
- package/.next/static/chunks/3gki-squw28yu.js +1 -0
- package/.next/static/chunks/{3obf9n3cxj99k.js → 3jvldk2wvwbge.js} +1 -1
- package/.next/static/chunks/{38301ji-85i30.js → 3nnzdl_te20hv.js} +1 -1
- package/.next/static/chunks/{2m267diam_vib.js → 3tz4dr0_8pq1-.js} +1 -1
- package/.next/static/chunks/{2gocl3dq0_h1s.js → 3x6pggb-2kyrk.js} +1 -1
- package/.next/static/chunks/{025bmrgeukcb2.js → 4440mws9jz3mt.js} +1 -1
- package/README.md +4 -0
- package/app/api/thursday/tool-call/route.ts +1 -15
- package/components/ui/radio-group.tsx +2 -2
- package/docs/images/demo-still.jpg +0 -0
- package/docs/live-calls.md +19 -11
- package/features/ai/prompts/live.prompt.ts +51 -26
- package/features/ai/prompts/prompt-helper.ts +1 -9
- package/features/ai/prompts/thursday.prompt.ts +8 -2
- package/features/bot/bot.run.ts +9 -3
- package/features/bot/bot.seed.ts +35 -91
- package/features/bot/components/bot-room.tsx +0 -6
- package/features/bot/components/bot-setting.tsx +4 -4
- package/features/bot/components/room-pill.tsx +4 -2
- package/features/bot/seed-bots.ts +2 -2
- package/features/intro/components/intro.tsx +2 -3
- package/features/reach/reach.ts +2 -2
- package/features/routine/components/routine-setting.tsx +1 -1
- package/features/signins/signins.query.ts +66 -1
- package/features/thursday/components/side-captions.tsx +31 -8
- package/features/thursday/components/thursday-setting.tsx +5 -5
- package/features/thursday/components/thursday.tsx +97 -39
- package/features/thursday/components/write-line.tsx +28 -17
- package/features/thursday/thursday.action.ts +4 -20
- package/features/thursday/thursday.schema.ts +0 -9
- package/features/thursday/thursday.store.ts +11 -15
- package/features/thursday/thursday.text.ts +10 -8
- package/features/thursday/tool-line.ts +17 -6
- package/features/thursday/use-call-ring.ts +1 -5
- package/features/thursday/use-text-call.ts +37 -21
- package/features/thursday/use-thursday.ts +14 -44
- package/features/workspace/workspace.ts +4 -2
- package/guide/bots.md +13 -3
- package/guide/calls.md +7 -5
- package/knip.json +1 -0
- package/lib/live/live.session.ts +0 -39
- package/package.json +1 -1
- package/scripts/live-session.test.mts +19 -26
- package/seed-skills/analyst/README.md +18 -0
- package/seed-skills/analyst/data-report/SKILL.md +60 -0
- package/seed-skills/analyst/data-report/references/brief.md +31 -0
- package/seed-skills/analyst/data-report/references/company.md +41 -0
- package/seed-skills/analyst/data-report/references/comparison.md +42 -0
- package/seed-skills/analyst/data-report/references/decision.md +28 -0
- package/seed-skills/analyst/data-report/references/market-size.md +49 -0
- package/seed-skills/analyst/data-report/references/price-check.md +33 -0
- package/seed-skills/analyst/data-report/references/sources.md +51 -0
- package/seed-skills/analyst/data-report/references/trend.md +39 -0
- package/seed-skills/analyst/data-report/scripts/fetch.mjs +521 -0
- package/seed-skills/insta/instagram/SKILL.md +36 -0
- package/seed-skills/insta/instagram/references/dm.md +49 -0
- package/seed-skills/insta/instagram/references/post.md +74 -0
- package/seed-skills/insta/instagram/scripts/compose.mjs +333 -0
- package/seed-skills/insta/instagram/scripts/inbox.mjs +163 -0
- package/seed-skills/insta/instagram/scripts/lib.mjs +33 -0
- package/seed-skills/insta/instagram/scripts/media.mjs +104 -0
- package/seed-skills/insta/instagram/scripts/profile.mjs +143 -0
- package/seed-skills/insta/instagram/scripts/read.mjs +244 -0
- package/seed-skills/insta/instagram/scripts/search.mjs +137 -0
- package/seed-skills/insta/instagram/scripts/selectors.mjs +56 -0
- package/seed-skills/insta/instagram/scripts/sheet.mjs +43 -0
- package/seed-skills/insta/instagram/templates/carousel.html +62 -0
- package/seed-skills/marketer/README.md +6 -4
- package/seed-skills/marketer/copywriting/SKILL.md +1 -1
- package/seed-skills/marketer/emails/SKILL.md +1 -1
- package/seed-skills/marketer/launch/SKILL.md +1 -1
- package/seed-skills/marketer/product-marketing/SKILL.md +5 -5
- package/seed-skills/marketer/seo-audit/SKILL.md +1 -1
- package/seed-skills/marketer/social/SKILL.md +1 -1
- package/seed-skills/tutor/picture-book/SKILL.md +16 -0
- package/seed-skills/tutor/picture-book/book/book.css +181 -0
- package/seed-skills/tutor/picture-book/book/book.html +33 -0
- package/seed-skills/tutor/picture-book/book/book.js +60 -0
- package/seed-skills/tutor/picture-book/references/picture-book.md +104 -0
- package/seed-skills/tutor/picture-book/scripts/book-video.mjs +177 -0
- package/seed-skills/tutor/picture-book/scripts/book.mjs +98 -0
- package/skills/browser/SKILL.md +13 -4
- package/skills/browser/references/scripts.md +55 -0
- package/skills/browser/scripts/image-size.mjs +30 -0
- package/skills/browser/scripts/render.mjs +126 -0
- package/skills/browser/scripts/session.mjs +105 -0
- package/skills/browser/scripts/sheet.mjs +97 -0
- package/skills/browser/scripts/webimage.mjs +105 -0
- package/skills/interactive-page/SKILL.md +4 -3
- package/skills/interactive-page/scripts/chart.mjs +679 -0
- package/skills/interactive-page/scripts/page.mjs +1 -0
- package/.next/server/app/api/probe/route/app-paths-manifest.json +0 -3
- package/.next/server/app/api/probe/route/build-manifest.json +0 -12
- package/.next/server/app/api/probe/route/server-reference-manifest.json +0 -4
- package/.next/server/app/api/probe/route.js +0 -10
- package/.next/server/app/api/probe/route.js.map +0 -5
- package/.next/server/app/api/probe/route.js.nft.json +0 -1
- package/.next/server/app/api/probe/route_client-reference-manifest.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__012s2o8._.js +0 -3
- package/.next/server/chunks/[root-of-the-server]__0z0hc1f._.js +0 -4
- package/.next/server/chunks/[root-of-the-server]__1v7-zke._.js +0 -5
- package/.next/server/chunks/_0whlpyi._.js +0 -4
- package/.next/server/chunks/_next-internal_server_app_api_probe_route_actions_0cqd30j.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__0oo-wlv._.js +0 -103
- package/.next/server/chunks/ssr/[root-of-the-server]__0zuns7e._.js +0 -3
- package/.next/server/chunks/ssr/_070nv1_._.js +0 -3
- package/.next/server/chunks/ssr/_0dshsh4._.js +0 -3
- package/.next/server/chunks/ssr/_0l_mcfz._.js +0 -3
- package/.next/server/chunks/ssr/_0u5xv6g._.js +0 -3
- package/.next/server/chunks/ssr/_157yfrk._.js +0 -3
- package/.next/server/chunks/ssr/features_bot_1nr94ks._.js +0 -3
- package/.next/static/chunks/06nt9tatr-dug.js +0 -1
- package/.next/static/chunks/0ge-hx0ed83a1.js +0 -1
- package/.next/static/chunks/0pda_vf-abwvx.js +0 -1
- package/.next/static/chunks/0rowp9rx3qbxu.js +0 -18
- package/.next/static/chunks/1grkt5gr8pbg1.js +0 -17
- package/.next/static/chunks/1yugpvvi8qrbu.js +0 -101
- package/.next/static/chunks/27lkanxvtdn09.js +0 -1
- package/.next/static/chunks/3fec-aeteddr-.js +0 -1
- package/.next/static/chunks/3go3hwp1z2_h2.css +0 -1
- package/.next/static/chunks/3h2bun3hcggg8.js +0 -1
- package/.next/static/chunks/3j1y335o95mj7.js +0 -1
- package/lib/probe.server.ts +0 -17
- package/lib/probe.ts +0 -55
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_buildManifest.js +0 -0
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{u8kJqShUAa49vY7BxAWsw → En1vUPazxcYjPjnnahcN5}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,496336,e=>{"use strict";var t=e.i(843476),n=e.i(716327),a=e.i(271645),s=e.i(647163);e.s(["FoldedText",0,function({text:e,subject:r,clamp:i="line-clamp-3",tall:o="max-h-40",className:l}){let[d,c]=(0,a.useState)(!1),[u,m]=(0,a.useState)(!1),x=(0,a.useRef)(null);return(0,a.useEffect)(()=>c(!1),[e]),(0,a.useEffect)(()=>{let e=x.current;e&&!d&&m(e.scrollHeight>e.clientHeight+1)},[d,e]),(0,t.jsxs)("div",{className:(0,s.cn)("flex items-start gap-1",l),children:[(0,t.jsx)("p",{ref:x,className:(0,s.cn)("min-w-0 flex-1 text-[13px] leading-snug break-keep",d?(0,s.cn)(o,"overflow-y-auto scrollbar-none"):i),children:e}),(u||d)&&(0,t.jsx)("button",{type:"button",onClick:()=>c(e=>!e),"aria-label":d?`Fold the ${r}`:`Read the whole ${r}`,className:"shrink-0 rounded-md p-0.5 opacity-60 outline-none transition-opacity hover:opacity-100 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(n.ChevronDown,{className:(0,s.cn)("size-3.5",d&&"rotate-180")})})]})}])},835878,e=>{"use strict";var t=e.i(843476),n=e.i(635963);e.s(["BotRoster",0,function({bots:e}){return e.length<2?null:(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",title:e.map(e=>e.name).join(", "),children:[(0,t.jsx)("span",{className:"flex items-center gap-0.5",children:e.slice(0,3).map(e=>(0,t.jsx)(n.BotMark,{size:18,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"},e.name))}),(0,t.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground",children:[e.length," bots"]})]})}])},351866,e=>{"use strict";var t=e.i(843476),n=e.i(401851),a=e.i(689664),s=e.i(716327),r=e.i(24071),i=e.i(51481),o=e.i(508734),l=e.i(919191),d=e.i(632781),c=e.i(825398),u=e.i(263676),m=e.i(271645),x=e.i(815731),p=e.i(496336),b=e.i(683408),f=e.i(660302),h=e.i(127341),g=e.i(6799),k=e.i(95187);let j=(0,k.createServerReference)("7f1bea5380a307b807a64d5494b95f438f73b84926",k.callServer,void 0,k.findSourceMapURL,"compactThreadAction");var v=e.i(807038),w=e.i(635963),y=e.i(256604),N=e.i(621285),S=e.i(245629),z=e.i(609856),C=e.i(647163),T=e.i(553429),_=e.i(978411),M=e.i(222055);function B({onClick:e}){return(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":"Fold the room away",className:"grid size-7 shrink-0 place-items-center rounded-full bg-muted text-foreground outline-none transition-colors hover:bg-muted-foreground/20 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(u.X,{className:"size-3.5"})})}function $({thread:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A,{thread:e}),(0,t.jsx)(R,{thread:e}),(0,t.jsx)(I,{thread:e})]})}function A({thread:e}){let{contextTokens:n,tokens:a}=e;return n?(0,t.jsx)("span",{title:`Last step ${(0,C.formatCount)(n)} tokens \xb7 in total in ${(0,C.formatCount)(a.input)} \xb7 out ${(0,C.formatCount)(a.output)}`,className:"shrink-0 font-mono text-[10px] text-muted-foreground/70 tabular-nums",children:(0,C.formatCount)(n)}):null}function R({thread:e}){let{contextTokens:n,contextBudget:a}=e,[s,r]=(0,m.useState)(!1),[i,o]=(0,z.useServerAction)(j,{onOk:()=>r(!0)});if((0,m.useEffect)(()=>r(!1),[n]),!n||!a)return null;let l=Math.min(1,n/a);return(0,t.jsx)("button",{type:"button",disabled:o||s,onClick:()=>void i(e.id,e.bot.name).catch(()=>{}),title:s?"It summarizes itself at its next step":`Context ${(0,C.formatCount)(n)} of ${(0,C.formatCount)(a)} — it summarizes itself at the end of the bar. Press to have it do so at its next step`,"aria-label":"Summarize this thread's context at its next step",className:"-my-2 flex h-6 shrink-0 items-center rounded-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:(0,t.jsx)("span",{className:"block h-[3px] w-9 overflow-hidden rounded-full bg-muted",children:(0,t.jsx)("span",{className:(0,C.cn)("block h-full rounded-full",s?"animate-pulse bg-muted-foreground/40":l>.9?"bg-amber-500/80":"bg-muted-foreground/70"),style:{width:`${Math.max(4,Math.round(100*l))}%`}})})})}let D={working:"text-muted-foreground",waiting:C.WAITING_INK,done:"text-foreground",cancelled:"text-muted-foreground"};function I({thread:e}){let n="done"===e.status&&e.seen?"text-muted-foreground":D[e.status];return"working"===e.status?(0,t.jsx)(f.ShinyText,{text:"working",speed:2.2,className:"shrink-0 font-mono text-[10px]"}):(0,t.jsx)("span",{className:(0,C.cn)("flex shrink-0 items-center gap-1.5 font-mono text-[10px]",n),children:e.status})}function F({thread:e,roster:n,side:a,onPick:s,className:r}){return(0,t.jsx)(h.Tabs,{value:a??e.bot.name,onValueChange:t=>s(t===e.bot.name?null:String(t)),className:(0,C.cn)("shrink-0 gap-0 px-3 pt-1 pb-0.5",r),children:(0,t.jsx)(h.TabsList,{className:"w-full justify-start gap-1 overflow-x-auto rounded-none bg-transparent p-0 scrollbar-none group-data-horizontal/tabs:h-auto",children:n.map(n=>{let a=q(e,n.name);return(0,t.jsxs)(h.TabsTrigger,{value:n.name,className:(0,C.cn)(L,"pl-1.5"),children:[(0,t.jsx)(w.BotMark,{size:16,seed:n.name,color:n.icon?.color,shape:n.icon?.shape,outline:n.icon?.outline,paint:n.icon?.paint,notify:"asking"===a,className:"shrink-0"}),(0,t.jsx)("span",{className:"max-w-28 truncate",children:n.name}),"running"===a&&(0,t.jsx)(d.Loader2,{className:"size-3 animate-spin text-muted-foreground/70"})]},n.name)})})})}let L="h-7 flex-none rounded-full px-3 py-0 text-[12px] text-muted-foreground hover:bg-muted/60 data-active:bg-muted data-active:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-none dark:data-active:border-transparent dark:data-active:bg-muted";function q(e,t){let{room:n}=e;return n.questions.some(e=>e.bot===t)?"asking":"working"===e.status&&n.participants.some(e=>e.bot===t&&"running"===e.state)?"running":null}function E({turn:e,thread:n,self:a}){let s=e.speaker.name===a,r=s?"none":e.speaker.name===Q.name?"dark":"secondary",i=null;return(0,t.jsx)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,t.jsx)(Z,{side:s?"start":"end",name:e.speaker.name,mark:(0,t.jsx)(Y,{bot:e.speaker}),children:e.entries.map(o=>{if("work"===o.kind)return s?(0,t.jsx)(K,{lines:o.lines,trailing:o.open,bot:e.speaker,thread:n},o.key):(0,t.jsx)(O,{lines:o.lines,trailing:o.open,bot:e.speaker,thread:n},o.key);let l=(0,_.heardBy)(o.line),d=l&&l.name!==e.speaker.name&&l.name!==a&&l.name!==Q.name&&l.name!==i?l:null;return l&&(i=l.name),(0,t.jsx)(ee,{line:o.line,surface:r,mention:d},o.key)})})})}function O({lines:e,trailing:n,bot:a,thread:s}){var r;let[i,o]=(0,m.useState)(!1),[l,c]=(0,m.useState)(null),u=n?q(s,a.name):null,x=(r=e,[["tool","step"],["say","note"],["stop","stop"],["note","compaction"]].map(([e,t])=>[r.filter(t=>t.kind===e).length,t]).filter(([e])=>e>0).map(([e,t])=>`${e} ${t}${1===e?"":"s"}`).join(" · ")),p=e.filter(e=>e.tool?.results!==void 0);if(!u&&!x)return null;let b=e.findLast(e=>"tool"===e.kind||"say"===e.kind),h=i&&e.length>0;return(0,t.jsxs)("div",{className:(0,C.cn)("flex min-w-0 flex-col rounded-2xl bg-muted/40 p-1",h?"w-full":"w-fit max-w-full"),children:[(0,t.jsxs)("button",{type:"button",disabled:!e.length,"aria-expanded":h,onClick:()=>{o(e=>!e),c(null)},className:"flex min-w-0 items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none transition-colors enabled:hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50",children:["running"===u&&(0,t.jsx)(d.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground/60"}),u?(0,t.jsx)(f.ShinyText,{text:"asking"===u?"waiting on you":b?G(b):"working",tone:"asking"===u?"waiting":"muted",speed:2.4,className:"min-w-0 truncate text-[12px] leading-4"}):(0,t.jsx)(U,{words:b?G(b):"",facts:[x,function(e){let t=e.flatMap(e=>e.at?[(0,S.toDate)(e.at).getTime()]:[]);if(t.length<2)return"";let n=Math.round((Math.max(...t)-Math.min(...t))/1e3);if(n<1)return"";if(n<60)return`${n}s`;let a=Math.round(n/60);return a<60?`${a} min`:`${Math.floor(a/60)}h ${a%60}m`}(e)].filter(Boolean).join(" · ")}),e.length>0&&(0,t.jsx)(H,{open:h})]}),!h&&p.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1 px-2 pt-0.5 pb-1.5",children:p.map(e=>e.tool&&(0,t.jsx)(M.StepTile,{tool:e.tool,onOpen:()=>{c(e.id),o(!0)}},e.id))}),h&&(0,t.jsx)("div",{className:"flex min-w-0 flex-col gap-0.5 pt-0.5",children:ed(e).map(e=>"tools"===e.kind?e.lines.map(e=>e.tool&&(0,t.jsx)(M.BotTool,{tool:e.tool,threadId:s.id,collapsed:e.id!==l},e.id)):"stops"===e.kind?(0,t.jsx)("div",{className:"px-1.5 py-1",children:(0,t.jsx)(eo,{lines:e.lines})},e.key):e.lines.map(e=>(0,t.jsx)(er,{line:e,inset:!0},e.id)))})]})}function K({lines:e,trailing:n,bot:a,thread:s}){let r=n?q(s,a.name):null,i=e.some(e=>e.tool&&void 0===e.tool.results);return(0,t.jsxs)(t.Fragment,{children:[ed(e).map(e=>"tools"===e.kind?(0,t.jsx)(P,{lines:e.lines,threadId:s.id},e.key):"stops"===e.kind?(0,t.jsx)(eo,{lines:e.lines},e.key):e.lines.map(e=>(0,t.jsx)(er,{line:e},e.id))),r&&!i&&(0,t.jsx)(f.ShinyText,{text:"asking"===r?"waiting on you":"on the next step…",tone:"asking"===r?"waiting":"muted",speed:2.2,className:"block px-1 font-mono text-[10px]"})]})}function P({lines:e,threadId:n}){return(0,t.jsx)("div",{className:"flex w-full flex-col gap-0.5 rounded-2xl bg-muted/40 p-1",children:e.map(e=>e.tool&&(0,t.jsx)(M.BotTool,{tool:e.tool,threadId:n,collapsed:!0},e.id))})}function U({words:e,facts:n,grow:a=!1}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:(0,C.cn)("min-w-0 truncate text-[12.5px] leading-5 text-foreground/80",a&&"flex-1"),children:e}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10.5px] leading-4 text-muted-foreground",children:n})]})}function H({open:e}){return(0,t.jsx)("span",{className:"grid size-5.5 shrink-0 place-items-center rounded-md bg-background text-muted-foreground ring-1 ring-border/60",children:(0,t.jsx)(s.ChevronDown,{className:(0,C.cn)("size-3.5 transition-transform",e&&"rotate-180")})})}function G(e){return"tool"===e.kind&&e.tool?e.tool.note??`${e.tool.name} \xb7 ${e.tool.input}`:(0,C.plainText)(e.text).replace(/\s+/g," ").trim()}function V({thread:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W,{from:Q,to:e.bot}),(0,t.jsx)(Z,{side:"end",name:Q.name,mark:(0,t.jsx)(Y,{bot:Q}),children:(0,t.jsx)(J,{dark:!0,className:"py-2 pr-2 pl-3.5",children:(0,t.jsx)(p.FoldedText,{text:e.request,subject:"request",className:"wrap-anywhere"})})})]})}let Q={name:T.ROOM_THURSDAY};function W({from:e,to:n}){return(0,t.jsx)("div",{className:"flex animate-in justify-center fade-in duration-300",children:(0,t.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)(X,{bot:e}),(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground/70",children:"invited"}),(0,t.jsx)(X,{bot:n})]})})}function X({bot:e}){return(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[e.name===Q.name?(0,t.jsx)(y.ThursdayMark,{size:15,className:"shrink-0"}):(0,t.jsx)(w.BotMark,{size:15,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function Y({bot:e}){return e.name===Q.name?(0,t.jsx)(y.ThursdayMark,{size:26,className:"mt-1 shrink-0"}):(0,t.jsx)(w.BotMark,{size:26,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"mt-1 shrink-0"})}function J({dark:e=!1,children:n,className:a}){return(0,t.jsx)(x.Bubble,{align:"end",variant:e?"default":"secondary",className:"max-w-full",children:(0,t.jsx)(x.BubbleContent,{className:(0,C.cn)("rounded-tr-md px-3.5",a),children:(0,t.jsx)("div",{className:(0,C.cn)("min-w-0",e&&"inverse"),children:n})})})}function Z({side:e,mark:n,name:a,children:s}){return(0,t.jsxs)("div",{className:(0,C.cn)("flex gap-2.5","end"===e&&"flex-row-reverse"),children:[n,(0,t.jsxs)("div",{className:(0,C.cn)("flex min-w-0 flex-1 flex-col gap-1.5 [&>*+*]:max-w-[80%]","end"===e&&"items-end"),children:[(0,t.jsx)("p",{className:"max-w-[80%] truncate px-1 font-mono text-[10px] text-muted-foreground",children:a}),s]})]})}function ee({line:e,surface:n,mention:a}){let s=!!e.question,r="result"===e.kind,i="none"!==n,o=(0,v.shortenPaths)(e.text),d=(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)(es,{}),a?(0,t.jsx)(ea,{bot:a,bubble:i,children:o}):(0,t.jsx)(et,{bubble:i,className:(0,C.cn)(!r&&"leading-snug"),children:o}),(0,t.jsx)(v.Attachments,{text:e.text,onBubble:i,className:"mt-2"})]});return(0,t.jsxs)(t.Fragment,{children:[i?(0,t.jsx)(J,{dark:"dark"===n,children:d}):(0,t.jsx)("div",{className:"min-w-0 max-w-full px-1",children:d}),e.steppedIn&&(0,t.jsxs)("p",{className:"flex items-center gap-1 px-1 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)(l.CornerDownLeft,{className:"size-2.5"}),"stepped in"]}),r&&(0,t.jsx)("div",{className:"flex px-1",children:(0,t.jsx)(ei,{text:e.text})})]})}function et({children:e,bubble:n=!1,className:a}){return(0,t.jsx)(b.Markdown,{className:(0,C.cn)("min-w-0 max-w-full text-[13px] leading-relaxed wrap-anywhere break-keep [&_h1]:text-[15px] [&_h2]:text-[14px] [&_h3]:text-[13px] [&_h3]:font-semibold [&_li]:my-0.5 [&_table]:text-[12px] [&_table]:wrap-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",n&&"[&_[data-streamdown=inline-code]]:text-[12px] [&_[data-streamdown=code-block]]:my-2 [&_[data-streamdown=code-block]]:gap-0 [&_[data-streamdown=code-block]]:rounded-[10px] [&_[data-streamdown=code-block]]:border-0 [&_[data-streamdown=code-block]]:bg-background [&_[data-streamdown=code-block]]:p-0 [&_[data-streamdown=code-block-header]]:h-7 [&_[data-streamdown=code-block-header]]:px-2.5 [&_[data-streamdown=code-block-header]]:text-[11px] [&_[data-streamdown=code-block-body]]:border-0 [&_[data-streamdown=code-block-body]]:bg-transparent! [&_[data-streamdown=code-block-body]]:px-2.5 [&_[data-streamdown=code-block-body]]:pt-0 [&_[data-streamdown=code-block-body]]:pb-2.5 [&_[data-streamdown=code-block-body]]:text-[12.5px] [&_[data-streamdown=code-block]_div:has(>[data-streamdown=code-block-actions])]:-mt-7 [&_[data-streamdown=code-block-actions]]:mr-1 [&_[data-streamdown=code-block-actions]]:border-0 [&_[data-streamdown=code-block-actions]]:bg-transparent!",a),children:e})}function en({bot:e,bubble:n}){return(0,t.jsxs)("span",{className:(0,C.cn)("mr-1.5 inline-flex h-5 max-w-full items-center gap-1 rounded-full pr-2 pl-[3px] align-[-4px] text-[12px] leading-none font-medium whitespace-nowrap text-foreground",n?"bg-background":"bg-muted"),children:[(0,t.jsx)(w.BotMark,{size:14,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function ea({bot:e,bubble:n,children:a}){return(0,t.jsxs)("div",{className:"min-w-0 max-w-full text-[13px] leading-snug",children:[(0,t.jsx)(en,{bot:e,bubble:n}),(0,t.jsx)(et,{bubble:n,className:"contents leading-snug [&>p:first-child]:inline",children:a})]})}function es(){return(0,t.jsxs)("p",{className:"mb-1 flex items-center gap-1.5 text-[12px] leading-4 font-medium text-muted-foreground",children:[(0,t.jsx)(i.CircleQuestionMark,{className:"size-3.5 shrink-0"}),"Question"]})}function er({line:e,inset:n=!1}){return"note"===e.kind?(0,t.jsxs)("details",{className:"w-full px-2 py-1 text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-2.5 outline-none [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,t.jsx)("span",{className:"min-w-0 text-center font-mono text-[10px]",children:"Compacted — it goes on from its summary"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border"})]}),(0,t.jsx)(et,{className:"mt-2 rounded-xl bg-muted/40 px-3 py-2 text-[11px]",children:e.text})]}):(0,t.jsx)(et,{className:(0,C.cn)("text-[12.5px] text-muted-foreground",n?"px-2.5 py-1":"px-1"),children:e.text})}function ei({text:e}){let[n,s]=(0,m.useState)(!1),r=(0,m.useRef)(null);return(0,m.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]),(0,t.jsx)("button",{type:"button","aria-label":"Copy the answer",onClick:async()=>{try{await navigator.clipboard.writeText(e),s(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>s(!1),1400)}catch(e){g.toast.add({type:"error",title:"Could not copy the answer",description:(0,C.errorToString)(e)})}},className:"grid size-5 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:n?(0,t.jsx)(a.Check,{className:"size-3"}):(0,t.jsx)(o.Copy,{className:"size-3"})})}function eo({lines:e}){return(0,t.jsxs)("details",{className:"group min-w-0 px-1 text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-[12.5px] leading-relaxed outline-none [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)(c.RotateCw,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:el(e[0].text)}),e.length>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:["×",e.length]}),(0,t.jsx)(s.ChevronDown,{className:"size-2.5 shrink-0 text-muted-foreground/70 transition-transform group-open:rotate-180"})]}),(0,t.jsx)("div",{className:"mt-1 space-y-1 pl-4.5 text-[11px] leading-relaxed",children:e.map(e=>(0,t.jsxs)("p",{className:"flex gap-2 break-keep",children:[e.at&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-muted-foreground/70 tabular-nums",children:(0,n.format)((0,S.toDate)(e.at),"HH:mm:ss")}),(0,t.jsx)("span",{className:"min-w-0",children:e.text})]},e.id))})]})}let el=e=>e.split(" (")[0].replace(/\.$/,"");function ed(e){let t=[];for(let n of e){let e="tool"===n.kind&&n.tool?"tools":"stop"===n.kind?"stops":"said",a=t.at(-1),s=a?.kind===e&&("stops"!==e||el(a.lines[0].text)===el(n.text));a&&s?a.lines.push(n):t.push({kind:e,key:n.id,lines:[n]})}return t}e.s(["Conversation",0,function({thread:e,tab:n=null,onTab:a,className:s,tabsClassName:r}){let i,o=(0,m.useRef)(null),l=(0,m.useRef)(!0),d=(0,_.rosterOf)(e),c=a&&n!==e.bot.name&&d.some(e=>e.name===n)?n:null,u=c??e.bot.name,x=d.filter(t=>(!c||t.name===c)&&q(e,t.name)),p=(0,_.threadItems)((i=new Set(e.room.questions.map(e=>`${e.bot}
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,496336,e=>{"use strict";var t=e.i(843476),n=e.i(716327),a=e.i(271645),s=e.i(647163);e.s(["FoldedText",0,function({text:e,subject:r,clamp:i="line-clamp-3",tall:o="max-h-40",className:l}){let[d,c]=(0,a.useState)(!1),[u,m]=(0,a.useState)(!1),x=(0,a.useRef)(null);return(0,a.useEffect)(()=>c(!1),[e]),(0,a.useEffect)(()=>{let e=x.current;e&&!d&&m(e.scrollHeight>e.clientHeight+1)},[d,e]),(0,t.jsxs)("div",{className:(0,s.cn)("flex items-start gap-1",l),children:[(0,t.jsx)("p",{ref:x,className:(0,s.cn)("min-w-0 flex-1 text-[13px] leading-snug break-keep",d?(0,s.cn)(o,"overflow-y-auto scrollbar-none"):i),children:e}),(u||d)&&(0,t.jsx)("button",{type:"button",onClick:()=>c(e=>!e),"aria-label":d?`Fold the ${r}`:`Read the whole ${r}`,className:"shrink-0 rounded-md p-0.5 opacity-60 outline-none transition-opacity hover:opacity-100 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(n.ChevronDown,{className:(0,s.cn)("size-3.5",d&&"rotate-180")})})]})}])},835878,e=>{"use strict";var t=e.i(843476),n=e.i(635963);e.s(["BotRoster",0,function({bots:e}){return e.length<2?null:(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1.5",title:e.map(e=>e.name).join(", "),children:[(0,t.jsx)("span",{className:"flex items-center gap-0.5",children:e.slice(0,3).map(e=>(0,t.jsx)(n.BotMark,{size:18,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"},e.name))}),(0,t.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground",children:[e.length," bots"]})]})}])},351866,e=>{"use strict";var t=e.i(843476),n=e.i(401851),a=e.i(689664),s=e.i(716327),r=e.i(24071),i=e.i(51481),o=e.i(508734),l=e.i(919191),d=e.i(632781),c=e.i(825398),u=e.i(263676),m=e.i(271645),x=e.i(815731),p=e.i(496336),b=e.i(683408),h=e.i(660302),f=e.i(127341),g=e.i(6799),k=e.i(95187);let j=(0,k.createServerReference)("7f05e3d437383d248cd09d39f6064c2875137be8f8",k.callServer,void 0,k.findSourceMapURL,"compactThreadAction");var v=e.i(807038),w=e.i(635963),y=e.i(256604),N=e.i(621285),S=e.i(245629),z=e.i(609856),C=e.i(647163),T=e.i(553429),_=e.i(978411),M=e.i(222055);function B({onClick:e}){return(0,t.jsx)("button",{type:"button",onClick:e,"aria-label":"Fold the room away",className:"grid size-7 shrink-0 place-items-center rounded-full bg-muted text-foreground outline-none transition-colors hover:bg-muted-foreground/20 focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(u.X,{className:"size-3.5"})})}function $({thread:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(A,{thread:e}),(0,t.jsx)(R,{thread:e}),(0,t.jsx)(I,{thread:e})]})}function A({thread:e}){let{contextTokens:n,tokens:a}=e;return n?(0,t.jsx)("span",{title:`Last step ${(0,C.formatCount)(n)} tokens \xb7 in total in ${(0,C.formatCount)(a.input)} \xb7 out ${(0,C.formatCount)(a.output)}`,className:"shrink-0 font-mono text-[10px] text-muted-foreground/70 tabular-nums",children:(0,C.formatCount)(n)}):null}function R({thread:e}){let{contextTokens:n,contextBudget:a}=e,[s,r]=(0,m.useState)(!1),[i,o]=(0,z.useServerAction)(j,{onOk:()=>r(!0)});if((0,m.useEffect)(()=>r(!1),[n]),!n||!a)return null;let l=Math.min(1,n/a);return(0,t.jsx)("button",{type:"button",disabled:o||s,onClick:()=>void i(e.id,e.bot.name).catch(()=>{}),title:s?"It summarizes itself at its next step":`Context ${(0,C.formatCount)(n)} of ${(0,C.formatCount)(a)} — it summarizes itself at the end of the bar. Press to have it do so at its next step`,"aria-label":"Summarize this thread's context at its next step",className:"-my-2 flex h-6 shrink-0 items-center rounded-sm outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:(0,t.jsx)("span",{className:"block h-[3px] w-9 overflow-hidden rounded-full bg-muted",children:(0,t.jsx)("span",{className:(0,C.cn)("block h-full rounded-full",s?"animate-pulse bg-muted-foreground/40":l>.9?"bg-amber-500/80":"bg-muted-foreground/70"),style:{width:`${Math.max(4,Math.round(100*l))}%`}})})})}let D={working:"text-muted-foreground",waiting:C.WAITING_INK,done:"text-foreground",cancelled:"text-muted-foreground"};function I({thread:e}){let n="done"===e.status&&e.seen?"text-muted-foreground":D[e.status];return"working"===e.status?(0,t.jsx)(h.ShinyText,{text:"working",speed:2.2,className:"shrink-0 font-mono text-[10px]"}):(0,t.jsx)("span",{className:(0,C.cn)("flex shrink-0 items-center gap-1.5 font-mono text-[10px]",n),children:e.status})}function F({thread:e,roster:n,side:a,onPick:s,className:r}){return(0,t.jsx)(f.Tabs,{value:a??e.bot.name,onValueChange:t=>s(t===e.bot.name?null:String(t)),className:(0,C.cn)("shrink-0 gap-0 px-3 pt-1 pb-0.5",r),children:(0,t.jsx)(f.TabsList,{className:"w-full justify-start gap-1 overflow-x-auto rounded-none bg-transparent p-0 scrollbar-none group-data-horizontal/tabs:h-auto",children:n.map(n=>{let a=q(e,n.name);return(0,t.jsxs)(f.TabsTrigger,{value:n.name,className:(0,C.cn)(L,"pl-1.5"),children:[(0,t.jsx)(w.BotMark,{size:16,seed:n.name,color:n.icon?.color,shape:n.icon?.shape,outline:n.icon?.outline,paint:n.icon?.paint,notify:"asking"===a,className:"shrink-0"}),(0,t.jsx)("span",{className:"max-w-28 truncate",children:n.name}),"running"===a&&(0,t.jsx)(d.Loader2,{className:"size-3 animate-spin text-muted-foreground/70"})]},n.name)})})})}let L="h-7 flex-none rounded-full px-3 py-0 text-[12px] text-muted-foreground hover:bg-muted/60 data-active:bg-muted data-active:text-foreground group-data-[variant=default]/tabs-list:data-active:shadow-none dark:data-active:border-transparent dark:data-active:bg-muted";function q(e,t){let{room:n}=e;return n.questions.some(e=>e.bot===t)?"asking":"working"===e.status&&n.participants.some(e=>e.bot===t&&"running"===e.state)?"running":null}function E({turn:e,thread:n,self:a}){let s=e.speaker.name===a,r=s?"none":e.speaker.name===Q.name?"dark":"secondary",i=null;return(0,t.jsx)("div",{className:"animate-in fade-in slide-in-from-bottom-2 duration-300",children:(0,t.jsx)(Z,{side:s?"start":"end",name:e.speaker.name,mark:(0,t.jsx)(Y,{bot:e.speaker}),children:e.entries.map(o=>{if("work"===o.kind)return s?(0,t.jsx)(K,{lines:o.lines,trailing:o.open,bot:e.speaker,thread:n},o.key):(0,t.jsx)(O,{lines:o.lines,trailing:o.open,bot:e.speaker,thread:n},o.key);let l=(0,_.heardBy)(o.line),d=l&&l.name!==e.speaker.name&&l.name!==a&&l.name!==Q.name&&l.name!==i?l:null;return l&&(i=l.name),(0,t.jsx)(ee,{line:o.line,surface:r,mention:d},o.key)})})})}function O({lines:e,trailing:n,bot:a,thread:s}){var r;let[i,o]=(0,m.useState)(!1),[l,c]=(0,m.useState)(null),u=n?q(s,a.name):null,x=(r=e,[["tool","step"],["say","note"],["stop","stop"],["note","compaction"]].map(([e,t])=>[r.filter(t=>t.kind===e).length,t]).filter(([e])=>e>0).map(([e,t])=>`${e} ${t}${1===e?"":"s"}`).join(" · ")),p=e.filter(e=>e.tool?.results!==void 0);if(!u&&!x)return null;let b=e.findLast(e=>"tool"===e.kind||"say"===e.kind),f=i&&e.length>0;return(0,t.jsxs)("div",{className:(0,C.cn)("flex min-w-0 flex-col rounded-2xl bg-muted/40 p-1",f?"w-full":"w-fit max-w-full"),children:[(0,t.jsxs)("button",{type:"button",disabled:!e.length,"aria-expanded":f,onClick:()=>{o(e=>!e),c(null)},className:"flex min-w-0 items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none transition-colors enabled:hover:bg-muted/60 focus-visible:ring-3 focus-visible:ring-ring/50",children:["running"===u&&(0,t.jsx)(d.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground/60"}),u?(0,t.jsx)(h.ShinyText,{text:"asking"===u?"waiting on you":b?G(b):"working",tone:"asking"===u?"waiting":"muted",speed:2.4,className:"min-w-0 truncate text-[12px] leading-4"}):(0,t.jsx)(U,{words:b?G(b):"",facts:[x,function(e){let t=e.flatMap(e=>e.at?[(0,S.toDate)(e.at).getTime()]:[]);if(t.length<2)return"";let n=Math.round((Math.max(...t)-Math.min(...t))/1e3);if(n<1)return"";if(n<60)return`${n}s`;let a=Math.round(n/60);return a<60?`${a} min`:`${Math.floor(a/60)}h ${a%60}m`}(e)].filter(Boolean).join(" · ")}),e.length>0&&(0,t.jsx)(H,{open:f})]}),!f&&p.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-1 px-2 pt-0.5 pb-1.5",children:p.map(e=>e.tool&&(0,t.jsx)(M.StepTile,{tool:e.tool,onOpen:()=>{c(e.id),o(!0)}},e.id))}),f&&(0,t.jsx)("div",{className:"flex min-w-0 flex-col gap-0.5 pt-0.5",children:ed(e).map(e=>"tools"===e.kind?e.lines.map(e=>e.tool&&(0,t.jsx)(M.BotTool,{tool:e.tool,threadId:s.id,collapsed:e.id!==l},e.id)):"stops"===e.kind?(0,t.jsx)("div",{className:"px-1.5 py-1",children:(0,t.jsx)(eo,{lines:e.lines})},e.key):e.lines.map(e=>(0,t.jsx)(er,{line:e,inset:!0},e.id)))})]})}function K({lines:e,trailing:n,bot:a,thread:s}){let r=n?q(s,a.name):null,i=e.some(e=>e.tool&&void 0===e.tool.results);return(0,t.jsxs)(t.Fragment,{children:[ed(e).map(e=>"tools"===e.kind?(0,t.jsx)(P,{lines:e.lines,threadId:s.id},e.key):"stops"===e.kind?(0,t.jsx)(eo,{lines:e.lines},e.key):e.lines.map(e=>(0,t.jsx)(er,{line:e},e.id))),r&&!i&&(0,t.jsx)(h.ShinyText,{text:"asking"===r?"waiting on you":"on the next step…",tone:"asking"===r?"waiting":"muted",speed:2.2,className:"block px-1 font-mono text-[10px]"})]})}function P({lines:e,threadId:n}){return(0,t.jsx)("div",{className:"flex w-full flex-col gap-0.5 rounded-2xl bg-muted/40 p-1",children:e.map(e=>e.tool&&(0,t.jsx)(M.BotTool,{tool:e.tool,threadId:n,collapsed:!0},e.id))})}function U({words:e,facts:n,grow:a=!1}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:(0,C.cn)("min-w-0 truncate text-[12.5px] leading-5 text-foreground/80",a&&"flex-1"),children:e}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10.5px] leading-4 text-muted-foreground",children:n})]})}function H({open:e}){return(0,t.jsx)("span",{className:"grid size-5.5 shrink-0 place-items-center rounded-md bg-background text-muted-foreground ring-1 ring-border/60",children:(0,t.jsx)(s.ChevronDown,{className:(0,C.cn)("size-3.5 transition-transform",e&&"rotate-180")})})}function G(e){return"tool"===e.kind&&e.tool?e.tool.note??`${e.tool.name} \xb7 ${e.tool.input}`:(0,C.plainText)(e.text).replace(/\s+/g," ").trim()}function V({thread:e}){return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(W,{from:Q,to:e.bot}),(0,t.jsx)(Z,{side:"end",name:Q.name,mark:(0,t.jsx)(Y,{bot:Q}),children:(0,t.jsx)(J,{dark:!0,className:"py-2 pr-2 pl-3.5",children:(0,t.jsx)(p.FoldedText,{text:e.request,subject:"request",className:"wrap-anywhere"})})})]})}let Q={name:T.ROOM_THURSDAY};function W({from:e,to:n}){return(0,t.jsx)("div",{className:"flex animate-in justify-center fade-in duration-300",children:(0,t.jsxs)("span",{className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted px-2.5 py-1 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)(X,{bot:e}),(0,t.jsx)("span",{className:"shrink-0 text-muted-foreground/70",children:"invited"}),(0,t.jsx)(X,{bot:n})]})})}function X({bot:e}){return(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[e.name===Q.name?(0,t.jsx)(y.ThursdayMark,{size:15,className:"shrink-0"}):(0,t.jsx)(w.BotMark,{size:15,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function Y({bot:e}){return e.name===Q.name?(0,t.jsx)(y.ThursdayMark,{size:26,className:"mt-1 shrink-0"}):(0,t.jsx)(w.BotMark,{size:26,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"mt-1 shrink-0"})}function J({dark:e=!1,children:n,className:a}){return(0,t.jsx)(x.Bubble,{align:"end",variant:e?"default":"secondary",className:"max-w-full",children:(0,t.jsx)(x.BubbleContent,{className:(0,C.cn)("rounded-tr-md px-3.5",a),children:(0,t.jsx)("div",{className:(0,C.cn)("min-w-0",e&&"inverse"),children:n})})})}function Z({side:e,mark:n,name:a,children:s}){return(0,t.jsxs)("div",{className:(0,C.cn)("flex gap-2.5","end"===e&&"flex-row-reverse"),children:[n,(0,t.jsxs)("div",{className:(0,C.cn)("flex min-w-0 flex-1 flex-col gap-1.5 [&>*+*]:max-w-[80%]","end"===e&&"items-end"),children:[(0,t.jsx)("p",{className:"max-w-[80%] truncate px-1 font-mono text-[10px] text-muted-foreground",children:a}),s]})]})}function ee({line:e,surface:n,mention:a}){let s=!!e.question,r="result"===e.kind,i="none"!==n,o=(0,v.shortenPaths)(e.text),d=(0,t.jsxs)(t.Fragment,{children:[s&&(0,t.jsx)(es,{}),a?(0,t.jsx)(ea,{bot:a,bubble:i,children:o}):(0,t.jsx)(et,{bubble:i,className:(0,C.cn)(!r&&"leading-snug"),children:o}),(0,t.jsx)(v.Attachments,{text:e.text,onBubble:i,className:"mt-2"})]});return(0,t.jsxs)(t.Fragment,{children:[i?(0,t.jsx)(J,{dark:"dark"===n,children:d}):(0,t.jsx)("div",{className:"min-w-0 max-w-full px-1",children:d}),e.steppedIn&&(0,t.jsxs)("p",{className:"flex items-center gap-1 px-1 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)(l.CornerDownLeft,{className:"size-2.5"}),"stepped in"]}),r&&(0,t.jsx)("div",{className:"flex px-1",children:(0,t.jsx)(ei,{text:e.text})})]})}function et({children:e,bubble:n=!1,className:a}){return(0,t.jsx)(b.Markdown,{className:(0,C.cn)("min-w-0 max-w-full text-[13px] leading-relaxed wrap-anywhere break-keep [&_h1]:text-[15px] [&_h2]:text-[14px] [&_h3]:text-[13px] [&_h3]:font-semibold [&_li]:my-0.5 [&_table]:text-[12px] [&_table]:wrap-normal [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",n&&"[&_[data-streamdown=inline-code]]:text-[12px] [&_[data-streamdown=code-block]]:my-2 [&_[data-streamdown=code-block]]:gap-0 [&_[data-streamdown=code-block]]:rounded-[10px] [&_[data-streamdown=code-block]]:border-0 [&_[data-streamdown=code-block]]:bg-background [&_[data-streamdown=code-block]]:p-0 [&_[data-streamdown=code-block-header]]:h-7 [&_[data-streamdown=code-block-header]]:px-2.5 [&_[data-streamdown=code-block-header]]:text-[11px] [&_[data-streamdown=code-block-body]]:border-0 [&_[data-streamdown=code-block-body]]:bg-transparent! [&_[data-streamdown=code-block-body]]:px-2.5 [&_[data-streamdown=code-block-body]]:pt-0 [&_[data-streamdown=code-block-body]]:pb-2.5 [&_[data-streamdown=code-block-body]]:text-[12.5px] [&_[data-streamdown=code-block]_div:has(>[data-streamdown=code-block-actions])]:-mt-7 [&_[data-streamdown=code-block-actions]]:mr-1 [&_[data-streamdown=code-block-actions]]:border-0 [&_[data-streamdown=code-block-actions]]:bg-transparent!",a),children:e})}function en({bot:e,bubble:n}){return(0,t.jsxs)("span",{className:(0,C.cn)("mr-1.5 inline-flex h-5 max-w-full items-center gap-1 rounded-full pr-2 pl-[3px] align-[-4px] text-[12px] leading-none font-medium whitespace-nowrap text-foreground",n?"bg-background":"bg-muted"),children:[(0,t.jsx)(w.BotMark,{size:14,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]})}function ea({bot:e,bubble:n,children:a}){return(0,t.jsxs)("div",{className:"min-w-0 max-w-full text-[13px] leading-snug",children:[(0,t.jsx)(en,{bot:e,bubble:n}),(0,t.jsx)(et,{bubble:n,className:"contents leading-snug [&>p:first-child]:inline",children:a})]})}function es(){return(0,t.jsxs)("p",{className:"mb-1 flex items-center gap-1.5 text-[12px] leading-4 font-medium text-muted-foreground",children:[(0,t.jsx)(i.CircleQuestionMark,{className:"size-3.5 shrink-0"}),"Question"]})}function er({line:e,inset:n=!1}){return"note"===e.kind?(0,t.jsxs)("details",{className:"w-full px-2 py-1 text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-2.5 outline-none [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border"}),(0,t.jsx)("span",{className:"min-w-0 text-center font-mono text-[10px]",children:"Compacted — it goes on from its summary"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border"})]}),(0,t.jsx)(et,{className:"mt-2 rounded-xl bg-muted/40 px-3 py-2 text-[11px]",children:e.text})]}):(0,t.jsx)(et,{className:(0,C.cn)("text-[12.5px] text-muted-foreground",n?"px-2.5 py-1":"px-1"),children:e.text})}function ei({text:e}){let[n,s]=(0,m.useState)(!1),r=(0,m.useRef)(null);return(0,m.useEffect)(()=>()=>{r.current&&clearTimeout(r.current)},[]),(0,t.jsx)("button",{type:"button","aria-label":"Copy the answer",onClick:async()=>{try{await navigator.clipboard.writeText(e),s(!0),r.current&&clearTimeout(r.current),r.current=setTimeout(()=>s(!1),1400)}catch(e){g.toast.add({type:"error",title:"Could not copy the answer",description:(0,C.errorToString)(e)})}},className:"grid size-5 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:n?(0,t.jsx)(a.Check,{className:"size-3"}):(0,t.jsx)(o.Copy,{className:"size-3"})})}function eo({lines:e}){return(0,t.jsxs)("details",{className:"group min-w-0 px-1 text-muted-foreground",children:[(0,t.jsxs)("summary",{className:"flex cursor-pointer list-none items-center gap-1.5 text-[12.5px] leading-relaxed outline-none [&::-webkit-details-marker]:hidden",children:[(0,t.jsx)(c.RotateCw,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"min-w-0 truncate",children:el(e[0].text)}),e.length>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:["×",e.length]}),(0,t.jsx)(s.ChevronDown,{className:"size-2.5 shrink-0 text-muted-foreground/70 transition-transform group-open:rotate-180"})]}),(0,t.jsx)("div",{className:"mt-1 space-y-1 pl-4.5 text-[11px] leading-relaxed",children:e.map(e=>(0,t.jsxs)("p",{className:"flex gap-2 break-keep",children:[e.at&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-muted-foreground/70 tabular-nums",children:(0,n.format)((0,S.toDate)(e.at),"HH:mm:ss")}),(0,t.jsx)("span",{className:"min-w-0",children:e.text})]},e.id))})]})}let el=e=>e.split(" (")[0].replace(/\.$/,"");function ed(e){let t=[];for(let n of e){let e="tool"===n.kind&&n.tool?"tools":"stop"===n.kind?"stops":"said",a=t.at(-1),s=a?.kind===e&&("stops"!==e||el(a.lines[0].text)===el(n.text));a&&s?a.lines.push(n):t.push({kind:e,key:n.id,lines:[n]})}return t}e.s(["Conversation",0,function({thread:e,tab:n=null,onTab:a,className:s,tabsClassName:r}){let i,o=(0,m.useRef)(null),l=(0,m.useRef)(!0),d=(0,_.rosterOf)(e),c=a&&n!==e.bot.name&&d.some(e=>e.name===n)?n:null,u=c??e.bot.name,x=d.filter(t=>(!c||t.name===c)&&q(e,t.name)),p=(0,_.threadItems)((i=new Set(e.room.questions.map(e=>`${e.bot}
|
|
2
2
|
${e.text.trim()}`))).size?{...e,lines:e.lines.filter(e=>!("ask"===e.kind&&e.question&&e.to?.name===Q.name&&i.has(`${e.bot.name}
|
|
3
|
-
${e.text.trim()}`)))}:e,u,x);return(0,m.useEffect)(()=>{l.current=!0},[e.id,c]),(0,m.useEffect)(()=>{let e=o.current;e&&l.current&&(e.scrollTop=e.scrollHeight)},[e.lines,e.status,c]),(0,t.jsxs)(N.FileViewer,{children:[a&&(0,t.jsx)(F,{thread:e,roster:d,side:c,onPick:a,className:r}),(0,t.jsxs)("div",{ref:o,onScroll:e=>{let t=e.currentTarget;l.current=t.scrollHeight-t.scrollTop-t.clientHeight<24},className:(0,C.cn)("min-w-0 max-h-[64vh] space-y-3 overflow-y-auto px-4 pt-6 pb-4 mask-[linear-gradient(to_bottom,transparent,black_2rem)] scrollbar-none",s),children:[!c&&(0,t.jsx)(V,{thread:e}),p.map(n=>"invite"===n.kind?(0,t.jsx)(W,{from:n.from,to:n.to},n.key):(0,t.jsx)(E,{turn:n,thread:e,self:u},n.key))]})]})},"FoldButton",0,B,"TAB",0,L,"THURSDAY",0,Q,"ThreadFacts",0,$,"ThreadHeader",0,function({thread:e,onBack:n,onClose:a}){return(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":"Back to the list",className:"shrink-0 rounded-md p-1 text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(r.ChevronLeft,{className:"size-4"})}),(0,t.jsx)(w.BotMark,{size:22,seed:e.bot.name,color:e.bot.icon?.color,shape:e.bot.icon?.shape,outline:e.bot.icon?.outline,paint:e.bot.icon?.paint,notify:!1}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium",children:[e.label,(0,t.jsx)("span",{title:e.id,className:"ml-1.5 font-mono text-[10px] font-normal text-muted-foreground/60",children:e.id.slice(0,8)})]}),(0,t.jsx)($,{thread:e}),(0,t.jsx)(B,{onClick:a})]})},"leadOf",0,el,"stepOf",0,G],351866)},399512,709190,e=>{"use strict";var t=e.i(843476),n=e.i(96892),a=e.i(716327),s=e.i(24071),r=e.i(867927),i=e.i(931619),o=e.i(919191),l=e.i(632781),d=e.i(64801),c=e.i(929272),u=e.i(263676),m=e.i(271645),x=e.i(798120),p=e.i(167881),b=e.i(463415),f=e.i(496336),h=e.i(683408),g=e.i(660302),k=e.i(184762),j=e.i(257705),v=e.i(941051),w=e.i(95187);let y=(0,w.createServerReference)("7fafffef7f5ddff042f88ebc845340a5c6cac7bbba",w.callServer,void 0,w.findSourceMapURL,"withdrawStepInAction");var N=e.i(451888),S=e.i(635963),z=e.i(978411),C=e.i(609856),T=e.i(283653),_=e.i(446558);function M({bot:e,onAllowed:n}){let{data:a}=(0,T.useServerRoute)(x.queryKey.signIns),[s,r]=(0,C.useServerAction)(_.setSignInBotAction,{onOk:()=>(0,T.revalidate)(x.queryKey.signIns)}),i=(a??[]).filter(t=>t.asking.includes(e));return i.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:i.map(a=>(0,t.jsxs)(p.Button,{type:"button",size:"sm",loading:r,onClick:()=>void s(a.site,e,!0).then(()=>n(`Yes — you may use my ${a.site} sign-in.`)).catch(()=>{}),children:["Let ",e," use ",a.site," (",a.account,")"]},a.site))}):null}var B=e.i(6799),$=e.i(41533),A=e.i(83928);let R=(0,w.createServerReference)("7fe2d70a70024f0fa498ebfe3c0e167bd1c00b608e",w.callServer,void 0,w.findSourceMapURL,"giveFilesAction");var D=e.i(647163);function I(e){let t=(0,m.useRef)(e?.onKept);t.current=e?.onKept;let[n,a]=(0,m.useState)([]),[s]=(0,C.useServerAction)(R),r=(0,m.useCallback)(async e=>{let r=$.GIVEN_FILES.perMessage-n.length;e.length>r&&B.toast.add({type:"error",title:`At most ${$.GIVEN_FILES.perMessage} files at a time.`});let i=e.slice(0,Math.max(0,r));if(!i.length)return;let o=i.map(e=>({key:crypto.randomUUID(),name:e.name,bytes:e.size,path:null}));a(e=>[...e,...o]);let l=new FormData;for(let e of i)l.append("file",e);try{let e=await s(l),n=t.current?.(e);a(t=>t.map(t=>{let a=o.findIndex(e=>e.key===t.key);return a<0?t:{...t,path:e[a]??null,note:n}}))}catch{a(e=>e.filter(e=>!o.some(t=>t.key===e.key)))}},[n.length,s]);return{files:n,take:r,remove:e=>a(t=>t.filter(t=>t.key!==e)),clear:()=>a([]),arriving:n.some(e=>null===e.path),withPaths:e=>[e.trim(),...n.flatMap(e=>e.path??[])].filter(Boolean).join("\n")}}function F({files:e,onRemove:n,dense:a=!1,children:s,className:r}){let i=a?"size-8 rounded-lg":"size-10 rounded-[9px]";return(0,t.jsxs)("div",{className:(0,D.cn)("flex flex-wrap gap-1.5",r),children:[e.map(e=>(0,t.jsxs)("span",{className:(0,D.cn)("flex max-w-64 items-center bg-muted/70",a?"h-10.5 gap-2 rounded-xl py-1 pr-1.5 pl-1":"h-13 gap-2.5 rounded-[14px] py-1.5 pr-2 pl-1.5"),children:[e.path?(0,t.jsx)(A.FileThumb,{path:e.path,bytes:e.bytes,className:(0,D.cn)("shrink-0 overflow-hidden ring-1 ring-foreground/6",i)}):(0,t.jsx)("span",{className:(0,D.cn)("grid shrink-0 place-items-center bg-background text-muted-foreground ring-1 ring-foreground/6",i),children:(0,t.jsx)(l.Loader2,{className:"size-3.5 animate-spin"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:(0,D.cn)("truncate",a?"text-xs leading-4":"text-[12.5px] leading-4.5"),children:e.name}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[E(e.bytes),e.note&&` \xb7 ${e.note}`]})]}),(0,t.jsx)("button",{type:"button","aria-label":`Take ${e.name} out`,onClick:()=>n(e.key),className:"grid size-5 shrink-0 place-items-center rounded-full text-muted-foreground outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(u.X,{className:"size-3.5"})})]},e.key)),s]})}let L=null,q={claim:e=>(L=e,()=>{L===e&&(L=null)}),offer:(e,t)=>!!L&&!!e?.closest?.("[data-room]")&&(L(t),!0)},E=e=>e<1048576?`${Math.max(1,Math.round(e/1024))} KB`:`${(e/1024/1024).toFixed(1)} MB`;function O({className:e,children:n}){return(0,t.jsx)("div",{className:(0,D.cn)("flex min-w-0 flex-col gap-2.5 rounded-[18px] bg-muted py-2 pr-2 pl-3.5",e),children:n})}function K({bot:e,word:n,children:a}){return(0,t.jsxs)("div",{className:"flex min-h-7 min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{title:e.name,className:"shrink-0 leading-none",children:(0,t.jsx)(G,{bot:e,size:16})}),(0,t.jsx)("span",{className:(0,D.cn)("truncate text-[12px] leading-4 font-medium",D.WAITING_INK),children:n}),a]})}function P({options:e,picked:n,busy:a,onChoose:s}){return(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.map(e=>(0,t.jsxs)(p.Button,{type:"button",size:"sm",variant:"ghost",loading:n===e,disabled:a,onClick:()=>s(e),className:"h-7 gap-1.5 rounded-full bg-background px-3 text-[12.5px] hover:bg-background/60 dark:hover:bg-background/60",children:[e===N.THREAD_CONTINUE&&n!==e&&(0,t.jsx)(i.ChevronsRight,{className:"size-3.5 text-muted-foreground"}),e]},e))})}function U({threadId:e,recipient:a,draftKey:s,send:r,busy:i,placeholder:o,label:c,autoFocus:u=!1,onEscape:x,leading:b,trailing:f,className:h}){let[g,j]=(0,m.useState)(()=>z.threadDrafts.get(e,a,s)),[v,w]=(0,m.useState)(!1),y=t=>{j(t),z.threadDrafts.set(e,a,t,s)},N=I(),S=(0,m.useRef)(null),{take:C}=N;(0,m.useEffect)(()=>q.claim(e=>void C(e)),[C]);let T=!!g.trim()&&!i&&!N.arriving,_=async()=>{T&&(w(!0),await r(N.withPaths(g))&&(y(""),N.clear()),w(!1))};return(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),_()},className:(0,D.cn)("flex min-w-0 flex-wrap items-end gap-1",h),children:[N.files.length>0&&(0,t.jsx)(F,{dense:!0,files:N.files,onRemove:N.remove,className:"w-full pb-1"}),b,(0,t.jsx)(k.Textarea,{value:g,rows:1,disabled:i,autoFocus:u,onChange:e=>y(e.target.value),onPaste:e=>{let t=[...e.clipboardData.files];t.length&&(e.preventDefault(),C(t))},onKeyDown:e=>{"Escape"===e.key&&x?x():"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||229===e.keyCode||(e.preventDefault(),_())},placeholder:o,"aria-label":c,className:"max-h-32 min-h-0 min-w-0 flex-1 resize-none border-0 bg-transparent px-0 py-1 text-[13px] leading-5 shadow-none focus-visible:ring-0 dark:bg-transparent"}),(0,t.jsx)("input",{ref:S,type:"file",multiple:!0,hidden:!0,onChange:e=>{C([...e.target.files??[]]),e.target.value=""}}),(0,t.jsx)(p.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:i,"aria-label":"Add files",onClick:()=>S.current?.click(),className:"rounded-full text-muted-foreground",children:(0,t.jsx)(d.Paperclip,{})}),f,(0,t.jsx)(p.Button,{type:"submit",size:"icon-sm",variant:T?"default":"ghost",disabled:!T,"aria-label":"Send",className:"rounded-full",children:v?(0,t.jsx)(l.Loader2,{className:"animate-spin"}):(0,t.jsx)(n.ArrowUp,{})})]})}function H({current:e,bots:n,disabled:s,onPick:r}){return(0,t.jsxs)(b.DropdownMenu,{children:[(0,t.jsxs)(b.DropdownMenuTrigger,{render:(0,t.jsx)("button",{type:"button",disabled:s,"aria-label":`Message ${e.name}; choose another bot`,className:"mt-1 inline-flex h-5 shrink-0 items-center gap-1 self-start rounded-full bg-muted pr-1.5 pl-[3px] text-[12px] leading-none font-medium outline-none transition-colors hover:bg-muted-foreground/15 focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50"}),children:[(0,t.jsx)(G,{bot:e,size:14}),(0,t.jsx)("span",{className:"max-w-32 truncate",children:e.name}),(0,t.jsx)(a.ChevronDown,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,t.jsx)(b.DropdownMenuContent,{align:"start",children:(0,t.jsx)(b.DropdownMenuGroup,{children:n.map(e=>(0,t.jsxs)(b.DropdownMenuItem,{onClick:()=>r(e.name),children:[(0,t.jsx)(G,{bot:e,size:16}),e.name]},e.name))})})]})}function G({bot:e,size:n}){return(0,t.jsx)(S.BotMark,{size:n,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"})}function V(){let[e,t]=(0,C.useServerAction)(j.answerThreadAction,{onOk:()=>(0,T.revalidate)(x.queryKey.threads)});return[async(t,n,a,s)=>{let r=n.trim();if(!r)return!1;try{let n=await e(t.id,r,a,s);return z.screenActs.announce({kind:"answered",id:n.id,label:n.label,answer:r,recipient:a,replyTo:s}),!0}catch{return!1}},t]}e.s(["GivenFiles",0,F,"roomDrop",0,q,"useGivenFiles",0,I],709190),e.s(["ThreadReply",0,function({thread:e,status:n,faces:a=[],to:i=null,className:d}){let[b,k]=(0,m.useState)(),[j,w]=(0,m.useState)(()=>z.threadDrafts.recipient(e.id)??e.bot),[S,_]=(0,m.useState)(!1),[B,$]=(0,m.useState)(null);(0,m.useEffect)(()=>{w(z.threadDrafts.recipient(e.id)??e.bot),k(void 0),_(!1)},[e.id,e.bot]),(0,m.useEffect)(()=>{i&&(z.threadDrafts.select(e.id,i),w(i))},[e.id,i]);let A=e.room.participants,R=e.room.questions,I=Math.max(0,R.findIndex(e=>e.id===b)),F=R[I],L="waiting"===n?e.ask:null,q=(0,N.isAppStop)(L),E=F?.bot??(A.some(e=>e.bot===j)?j:e.bot),G=F?.id,[Q,W]=V(),[X,Y]=(0,C.useServerAction)(v.cancelThreadAction,{onOk:e=>{(0,T.revalidate)(x.queryKey.threads),z.screenActs.announce({kind:"stopped",id:e.id,label:e.label})}}),J=W||Y,Z=e.room.deliveries.filter(e=>!e.delivered),[ee,et]=(0,C.useServerAction)(y,{onOk:()=>(0,T.revalidate)(x.queryKey.threads)}),en=Z.map(e=>`${e.bot}: ${e.text}`).join(" · "),ea=A.filter(e=>"running"===e.state).map(e=>e.bot).join(", ")||e.bot,es=e=>a.find(t=>t.name===e)??{name:e},er=async t=>{if(J)return!1;let a=await Q(e,t,E,G);return a&&"running"===n&&_(!1),a},ei=async e=>{$(e),await er(e),$(null)},eo="running"===n||"waiting"===n?(0,t.jsx)(p.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:J,onClick:()=>X(e.id),"aria-label":"Stop this thread",title:"Stop this thread",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:Y?(0,t.jsx)(l.Loader2,{className:"animate-spin"}):(0,t.jsx)(c.Square,{className:"size-3"})}):null;if(F){let n=F.options??[],a=F.text;return(0,t.jsxs)(O,{className:d,children:[(0,t.jsx)(K,{bot:es(E),word:"Question",children:R.length>1&&(0,t.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-0.5",children:[(0,t.jsx)(p.Button,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Previous question",disabled:J||0===I,onClick:()=>k(R[I-1].id),children:(0,t.jsx)(s.ChevronLeft,{})}),(0,t.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground tabular-nums","aria-live":"polite",children:[I+1," / ",R.length]}),(0,t.jsx)(p.Button,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Next question",disabled:J||I===R.length-1,onClick:()=>k(R[I+1].id),children:(0,t.jsx)(r.ChevronRight,{})})]})}),a&&(0,t.jsx)("div",{className:"max-h-[min(14rem,30vh)] min-w-0 overflow-y-auto overscroll-contain pr-1.5",children:(0,t.jsx)(h.Markdown,{className:"min-w-0 text-[13px] leading-snug wrap-anywhere break-keep [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:a})}),n.length>0&&(0,t.jsx)(P,{options:n,picked:B,busy:J,onChoose:ei}),(0,t.jsx)(M,{bot:E,onAllowed:er}),(0,t.jsx)(U,{threadId:e.id,recipient:E,draftKey:F.id,send:er,busy:J,placeholder:n.length?"Or write your own answer…":"Your answer…",label:`Answer for ${E}`,trailing:eo},JSON.stringify([e.id,E,F.id]))]})}return q?(0,t.jsxs)(O,{className:d,children:[(0,t.jsx)(K,{bot:es(e.bot),word:"Paused"}),L?.question&&(0,t.jsx)(f.FoldedText,{text:L.question,subject:"message",clamp:"line-clamp-3",tall:"max-h-40"}),(0,t.jsx)(P,{options:L?.options.length?L.options:[N.THREAD_CONTINUE],picked:B,busy:J,onChoose:ei}),(0,t.jsx)(U,{threadId:e.id,recipient:E,send:er,busy:J,placeholder:"Or put it another way…",label:`Message for ${E}`,trailing:eo},JSON.stringify([e.id,E,"paused"]))]}):"running"!==n||S?(0,t.jsxs)("div",{className:(0,D.cn)("flex min-w-0 flex-col gap-1.5",d),children:[(0,t.jsx)(U,{threadId:e.id,recipient:E,send:er,busy:J,autoFocus:"running"===n,onEscape:"running"===n?()=>_(!1):void 0,placeholder:"running"===n?`What's off? ${E} reads this before its next step`:"Anything more? It picks up where it left off",label:`Message for ${E}`,className:"rounded-2xl bg-background py-1.5 pr-1.5 pl-3.5 ring-1 ring-border/80 transition-shadow focus-within:ring-ring/60",leading:A.length>1?(0,t.jsx)(H,{current:es(E),bots:A.map(e=>es(e.bot)),disabled:J,onPick:t=>{z.threadDrafts.select(e.id,t),w(t)}}):null,trailing:"running"===n?(0,t.jsx)(p.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:J,onClick:()=>_(!1),"aria-label":"Never mind",className:"text-muted-foreground",children:(0,t.jsx)(u.X,{})}):null},JSON.stringify([e.id,E])),!!en&&"running"!==n&&(0,t.jsxs)("p",{className:"flex min-w-0 items-center gap-2 px-1 text-xs text-muted-foreground",children:[(0,t.jsx)(l.Loader2,{className:"size-3 shrink-0 animate-spin"}),(0,t.jsxs)("span",{className:"truncate",children:["Sending to ",en]})]})]}):(0,t.jsxs)("div",{className:(0,D.cn)("flex min-w-0 flex-col rounded-2xl bg-muted/40 ring-1 ring-border/50",d),children:[Z.map(n=>(0,t.jsxs)("div",{className:"flex items-start gap-2 border-border/60 border-b py-2.5 pr-1.5 pl-3.5",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,t.jsxs)("p",{className:"flex min-w-0 items-center gap-1.5 font-mono text-[10px] leading-4",children:[(0,t.jsx)(l.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}),(0,t.jsx)(g.ShinyText,{text:`Step-in \xb7 waits for ${n.bot}'s next step`,speed:2.2,className:"min-w-0 truncate"})]}),(0,t.jsx)("p",{className:"whitespace-pre-wrap break-keep text-[13px] leading-snug",children:n.text})]}),(0,t.jsx)(p.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:et,onClick:()=>ee(e.id,n.id),"aria-label":"Take it back",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:(0,t.jsx)(u.X,{})})]},n.id)),(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 py-1.5 pr-1.5 pl-3.5",children:[(0,t.jsx)(g.ShinyText,{text:`${ea} \xb7 Working`,speed:2.4,className:"min-w-0 flex-1 truncate text-[12.5px] leading-5 break-keep"}),(0,t.jsxs)(p.Button,{type:"button",size:"sm",variant:"ghost",disabled:J,onClick:()=>_(!0),className:"h-7 shrink-0 gap-1.5 rounded-full px-2.5 text-[12px]",children:[(0,t.jsx)(o.CornerDownLeft,{className:"size-3.5"}),"Step in"]}),(0,t.jsx)("span",{className:"h-4 w-px shrink-0 bg-border"}),eo]})]})},"useAnswerThread",0,V],399512)},257705,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f528f2137f59470c5f0ef1a3a8db7a60163b5cd11",t.callServer,void 0,t.findSourceMapURL,"answerThreadAction");e.s(["answerThreadAction",0,n])},941051,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f03a72fd8ed1d45bbf0b7f8f4469d10023619ae6f",t.callServer,void 0,t.findSourceMapURL,"cancelThreadAction");e.s(["cancelThreadAction",0,n])},931619,e=>{"use strict";var t=e.i(456420);let n={name:"chevrons-right",size:24,node:[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]};n.node;let a=(0,t.default)(n);e.s(["ChevronsRight",0,a],931619)},51481,e=>{"use strict";var t=e.i(456420);let n={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};n.node;let a=(0,t.default)(n);e.s(["CircleQuestionMark",0,a],51481)},919191,e=>{"use strict";var t=e.i(456420);let n={name:"corner-down-left",size:24,node:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]};n.node;let a=(0,t.default)(n);e.s(["CornerDownLeft",0,a],919191)},64801,e=>{"use strict";var t=e.i(456420);let n={name:"paperclip",size:24,node:[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]};n.node;let a=(0,t.default)(n);e.s(["Paperclip",0,a],64801)},825398,815731,e=>{"use strict";var t=e.i(456420);let n={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};n.node;let a=(0,t.default)(n);e.s(["RotateCw",0,a],825398);var s=e.i(843476),r=e.i(176782),i=e.i(552245),o=e.i(225913),l=e.i(647163);let d=(0,o.cva)("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",{variants:{variant:{default:"*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",secondary:"*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",muted:"*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",tinted:"*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",outline:"*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",ghost:"border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",destructive:"*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"}},defaultVariants:{variant:"default"}});(0,o.cva)("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",{variants:{side:{top:"top-0 -translate-y-3/4",bottom:"bottom-0 translate-y-3/4"},align:{start:"left-3",end:"right-3"}},defaultVariants:{side:"bottom",align:"end"}}),e.s(["Bubble",0,function({variant:e="default",align:t="start",className:n,...a}){return(0,s.jsx)("div",{"data-slot":"bubble","data-variant":e,"data-align":t,className:(0,l.cn)(d({variant:e}),n),...a})},"BubbleContent",0,function({className:e,render:t,...n}){var a;return a={defaultTagName:"div",props:(0,r.mergeProps)({className:(0,l.cn)("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",e)},n),render:t,state:{slot:"bubble-content"}},(0,i.useRenderElement)(a.defaultTagName??"div",a,a)}],815731)},929272,e=>{"use strict";var t=e.i(456420);let n={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};n.node;let a=(0,t.default)(n);e.s(["Square",0,a],929272)}]);
|
|
3
|
+
${e.text.trim()}`)))}:e,u,x);return(0,m.useEffect)(()=>{l.current=!0},[e.id,c]),(0,m.useEffect)(()=>{let e=o.current;e&&l.current&&(e.scrollTop=e.scrollHeight)},[e.lines,e.status,c]),(0,t.jsxs)(N.FileViewer,{children:[a&&(0,t.jsx)(F,{thread:e,roster:d,side:c,onPick:a,className:r}),(0,t.jsxs)("div",{ref:o,onScroll:e=>{let t=e.currentTarget;l.current=t.scrollHeight-t.scrollTop-t.clientHeight<24},className:(0,C.cn)("min-w-0 max-h-[64vh] space-y-3 overflow-y-auto px-4 pt-6 pb-4 mask-[linear-gradient(to_bottom,transparent,black_2rem)] scrollbar-none",s),children:[!c&&(0,t.jsx)(V,{thread:e}),p.map(n=>"invite"===n.kind?(0,t.jsx)(W,{from:n.from,to:n.to},n.key):(0,t.jsx)(E,{turn:n,thread:e,self:u},n.key))]})]})},"FoldButton",0,B,"TAB",0,L,"THURSDAY",0,Q,"ThreadFacts",0,$,"ThreadHeader",0,function({thread:e,onBack:n,onClose:a}){return(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-3 pb-1",children:[(0,t.jsx)("button",{type:"button",onClick:n,"aria-label":"Back to the list",className:"shrink-0 rounded-md p-1 text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(r.ChevronLeft,{className:"size-4"})}),(0,t.jsx)(w.BotMark,{size:22,seed:e.bot.name,color:e.bot.icon?.color,shape:e.bot.icon?.shape,outline:e.bot.icon?.outline,paint:e.bot.icon?.paint,notify:!1}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 truncate text-[13px] font-medium",children:[e.label,(0,t.jsx)("span",{title:e.id,className:"ml-1.5 font-mono text-[10px] font-normal text-muted-foreground/60",children:e.id.slice(0,8)})]}),(0,t.jsx)($,{thread:e}),(0,t.jsx)(B,{onClick:a})]})},"leadOf",0,el,"stepOf",0,G],351866)},399512,709190,e=>{"use strict";var t=e.i(843476),n=e.i(96892),a=e.i(716327),s=e.i(24071),r=e.i(867927),i=e.i(931619),o=e.i(919191),l=e.i(632781),d=e.i(64801),c=e.i(929272),u=e.i(263676),m=e.i(271645),x=e.i(798120),p=e.i(167881),b=e.i(463415),h=e.i(496336),f=e.i(683408),g=e.i(660302),k=e.i(184762),j=e.i(460304),v=e.i(462945),w=e.i(95187);let y=(0,w.createServerReference)("7ff76eeb437dc9a08d59701aca58ea864ac8300a17",w.callServer,void 0,w.findSourceMapURL,"withdrawStepInAction");var N=e.i(451888),S=e.i(635963),z=e.i(978411),C=e.i(609856),T=e.i(283653),_=e.i(328752);function M({bot:e,onAllowed:n}){let{data:a}=(0,T.useServerRoute)(x.queryKey.signIns),[s,r]=(0,C.useServerAction)(_.setSignInBotAction,{onOk:()=>(0,T.revalidate)(x.queryKey.signIns)}),i=(a??[]).filter(t=>t.asking.includes(e));return i.length?(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:i.map(a=>(0,t.jsxs)(p.Button,{type:"button",size:"sm",loading:r,onClick:()=>void s(a.site,e,!0).then(()=>n(`Yes — you may use my ${a.site} sign-in.`)).catch(()=>{}),children:["Let ",e," use ",a.site," (",a.account,")"]},a.site))}):null}var B=e.i(6799),$=e.i(41533),A=e.i(83928);let R=(0,w.createServerReference)("7f3eea94981f7506ef292d2f74a1b89d2278978bf3",w.callServer,void 0,w.findSourceMapURL,"giveFilesAction");var D=e.i(647163);function I(e){let t=(0,m.useRef)(e?.onKept);t.current=e?.onKept;let[n,a]=(0,m.useState)([]),[s]=(0,C.useServerAction)(R),r=(0,m.useCallback)(async e=>{let r=$.GIVEN_FILES.perMessage-n.length;e.length>r&&B.toast.add({type:"error",title:`At most ${$.GIVEN_FILES.perMessage} files at a time.`});let i=e.slice(0,Math.max(0,r));if(!i.length)return;let o=i.map(e=>({key:crypto.randomUUID(),name:e.name,bytes:e.size,path:null}));a(e=>[...e,...o]);let l=new FormData;for(let e of i)l.append("file",e);try{let e=await s(l),n=t.current?.(e);a(t=>t.map(t=>{let a=o.findIndex(e=>e.key===t.key);return a<0?t:{...t,path:e[a]??null,note:n}}))}catch{a(e=>e.filter(e=>!o.some(t=>t.key===e.key)))}},[n.length,s]);return{files:n,take:r,remove:e=>a(t=>t.filter(t=>t.key!==e)),clear:()=>a([]),arriving:n.some(e=>null===e.path),withPaths:e=>[e.trim(),...n.flatMap(e=>e.path??[])].filter(Boolean).join("\n")}}function F({files:e,onRemove:n,dense:a=!1,children:s,className:r}){let i=a?"size-8 rounded-lg":"size-10 rounded-[9px]";return(0,t.jsxs)("div",{className:(0,D.cn)("flex flex-wrap gap-1.5",r),children:[e.map(e=>(0,t.jsxs)("span",{className:(0,D.cn)("flex max-w-64 items-center bg-muted/70",a?"h-10.5 gap-2 rounded-xl py-1 pr-1.5 pl-1":"h-13 gap-2.5 rounded-[14px] py-1.5 pr-2 pl-1.5"),children:[e.path?(0,t.jsx)(A.FileThumb,{path:e.path,bytes:e.bytes,className:(0,D.cn)("shrink-0 overflow-hidden ring-1 ring-foreground/6",i)}):(0,t.jsx)("span",{className:(0,D.cn)("grid shrink-0 place-items-center bg-background text-muted-foreground ring-1 ring-foreground/6",i),children:(0,t.jsx)(l.Loader2,{className:"size-3.5 animate-spin"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col",children:[(0,t.jsx)("span",{className:(0,D.cn)("truncate",a?"text-xs leading-4":"text-[12.5px] leading-4.5"),children:e.name}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[E(e.bytes),e.note&&` \xb7 ${e.note}`]})]}),(0,t.jsx)("button",{type:"button","aria-label":`Take ${e.name} out`,onClick:()=>n(e.key),className:"grid size-5 shrink-0 place-items-center rounded-full text-muted-foreground outline-none hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(u.X,{className:"size-3.5"})})]},e.key)),s]})}let L=null,q={claim:e=>(L=e,()=>{L===e&&(L=null)}),offer:(e,t)=>!!L&&!!e?.closest?.("[data-room]")&&(L(t),!0)},E=e=>e<1048576?`${Math.max(1,Math.round(e/1024))} KB`:`${(e/1024/1024).toFixed(1)} MB`;function O({className:e,children:n}){return(0,t.jsx)("div",{className:(0,D.cn)("flex min-w-0 flex-col gap-2.5 rounded-[18px] bg-muted py-2 pr-2 pl-3.5",e),children:n})}function K({bot:e,word:n,children:a}){return(0,t.jsxs)("div",{className:"flex min-h-7 min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{title:e.name,className:"shrink-0 leading-none",children:(0,t.jsx)(G,{bot:e,size:16})}),(0,t.jsx)("span",{className:(0,D.cn)("truncate text-[12px] leading-4 font-medium",D.WAITING_INK),children:n}),a]})}function P({options:e,picked:n,busy:a,onChoose:s}){return(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.map(e=>(0,t.jsxs)(p.Button,{type:"button",size:"sm",variant:"ghost",loading:n===e,disabled:a,onClick:()=>s(e),className:"h-7 gap-1.5 rounded-full bg-background px-3 text-[12.5px] hover:bg-background/60 dark:hover:bg-background/60",children:[e===N.THREAD_CONTINUE&&n!==e&&(0,t.jsx)(i.ChevronsRight,{className:"size-3.5 text-muted-foreground"}),e]},e))})}function U({threadId:e,recipient:a,draftKey:s,send:r,busy:i,placeholder:o,label:c,autoFocus:u=!1,onEscape:x,leading:b,trailing:h,className:f}){let[g,j]=(0,m.useState)(()=>z.threadDrafts.get(e,a,s)),[v,w]=(0,m.useState)(!1),y=t=>{j(t),z.threadDrafts.set(e,a,t,s)},N=I(),S=(0,m.useRef)(null),{take:C}=N;(0,m.useEffect)(()=>q.claim(e=>void C(e)),[C]);let T=!!g.trim()&&!i&&!N.arriving,_=async()=>{T&&(w(!0),await r(N.withPaths(g))&&(y(""),N.clear()),w(!1))};return(0,t.jsxs)("form",{onSubmit:e=>{e.preventDefault(),_()},className:(0,D.cn)("flex min-w-0 flex-wrap items-end gap-1",f),children:[N.files.length>0&&(0,t.jsx)(F,{dense:!0,files:N.files,onRemove:N.remove,className:"w-full pb-1"}),b,(0,t.jsx)(k.Textarea,{value:g,rows:1,disabled:i,autoFocus:u,onChange:e=>y(e.target.value),onPaste:e=>{let t=[...e.clipboardData.files];t.length&&(e.preventDefault(),C(t))},onKeyDown:e=>{"Escape"===e.key&&x?x():"Enter"!==e.key||e.shiftKey||e.nativeEvent.isComposing||229===e.keyCode||(e.preventDefault(),_())},placeholder:o,"aria-label":c,className:"max-h-32 min-h-0 min-w-0 flex-1 resize-none border-0 bg-transparent px-0 py-1 text-[13px] leading-5 shadow-none focus-visible:ring-0 dark:bg-transparent"}),(0,t.jsx)("input",{ref:S,type:"file",multiple:!0,hidden:!0,onChange:e=>{C([...e.target.files??[]]),e.target.value=""}}),(0,t.jsx)(p.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:i,"aria-label":"Add files",onClick:()=>S.current?.click(),className:"rounded-full text-muted-foreground",children:(0,t.jsx)(d.Paperclip,{})}),h,(0,t.jsx)(p.Button,{type:"submit",size:"icon-sm",variant:T?"default":"ghost",disabled:!T,"aria-label":"Send",className:"rounded-full",children:v?(0,t.jsx)(l.Loader2,{className:"animate-spin"}):(0,t.jsx)(n.ArrowUp,{})})]})}function H({current:e,bots:n,disabled:s,onPick:r}){return(0,t.jsxs)(b.DropdownMenu,{children:[(0,t.jsxs)(b.DropdownMenuTrigger,{render:(0,t.jsx)("button",{type:"button",disabled:s,"aria-label":`Message ${e.name}; choose another bot`,className:"mt-1 inline-flex h-5 shrink-0 items-center gap-1 self-start rounded-full bg-muted pr-1.5 pl-[3px] text-[12px] leading-none font-medium outline-none transition-colors hover:bg-muted-foreground/15 focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50"}),children:[(0,t.jsx)(G,{bot:e,size:14}),(0,t.jsx)("span",{className:"max-w-32 truncate",children:e.name}),(0,t.jsx)(a.ChevronDown,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,t.jsx)(b.DropdownMenuContent,{align:"start",children:(0,t.jsx)(b.DropdownMenuGroup,{children:n.map(e=>(0,t.jsxs)(b.DropdownMenuItem,{onClick:()=>r(e.name),children:[(0,t.jsx)(G,{bot:e,size:16}),e.name]},e.name))})})]})}function G({bot:e,size:n}){return(0,t.jsx)(S.BotMark,{size:n,seed:e.name,color:e.icon?.color,shape:e.icon?.shape,outline:e.icon?.outline,paint:e.icon?.paint,notify:!1,className:"shrink-0"})}function V(){let[e,t]=(0,C.useServerAction)(j.answerThreadAction,{onOk:()=>(0,T.revalidate)(x.queryKey.threads)});return[async(t,n,a,s)=>{let r=n.trim();if(!r)return!1;try{let n=await e(t.id,r,a,s);return z.screenActs.announce({kind:"answered",id:n.id,label:n.label,answer:r,recipient:a,replyTo:s}),!0}catch{return!1}},t]}e.s(["GivenFiles",0,F,"roomDrop",0,q,"useGivenFiles",0,I],709190),e.s(["ThreadReply",0,function({thread:e,status:n,faces:a=[],to:i=null,className:d}){let[b,k]=(0,m.useState)(),[j,w]=(0,m.useState)(()=>z.threadDrafts.recipient(e.id)??e.bot),[S,_]=(0,m.useState)(!1),[B,$]=(0,m.useState)(null);(0,m.useEffect)(()=>{w(z.threadDrafts.recipient(e.id)??e.bot),k(void 0),_(!1)},[e.id,e.bot]),(0,m.useEffect)(()=>{i&&(z.threadDrafts.select(e.id,i),w(i))},[e.id,i]);let A=e.room.participants,R=e.room.questions,I=Math.max(0,R.findIndex(e=>e.id===b)),F=R[I],L="waiting"===n?e.ask:null,q=(0,N.isAppStop)(L),E=F?.bot??(A.some(e=>e.bot===j)?j:e.bot),G=F?.id,[Q,W]=V(),[X,Y]=(0,C.useServerAction)(v.cancelThreadAction,{onOk:e=>{(0,T.revalidate)(x.queryKey.threads),z.screenActs.announce({kind:"stopped",id:e.id,label:e.label})}}),J=W||Y,Z=e.room.deliveries.filter(e=>!e.delivered),[ee,et]=(0,C.useServerAction)(y,{onOk:()=>(0,T.revalidate)(x.queryKey.threads)}),en=Z.map(e=>`${e.bot}: ${e.text}`).join(" · "),ea=A.filter(e=>"running"===e.state).map(e=>e.bot).join(", ")||e.bot,es=e=>a.find(t=>t.name===e)??{name:e},er=async t=>{if(J)return!1;let a=await Q(e,t,E,G);return a&&"running"===n&&_(!1),a},ei=async e=>{$(e),await er(e),$(null)},eo="running"===n||"waiting"===n?(0,t.jsx)(p.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:J,onClick:()=>X(e.id),"aria-label":"Stop this thread",title:"Stop this thread",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:Y?(0,t.jsx)(l.Loader2,{className:"animate-spin"}):(0,t.jsx)(c.Square,{className:"size-3"})}):null;if(F){let n=F.options??[],a=F.text;return(0,t.jsxs)(O,{className:d,children:[(0,t.jsx)(K,{bot:es(E),word:"Question",children:R.length>1&&(0,t.jsxs)("span",{className:"ml-auto flex shrink-0 items-center gap-0.5",children:[(0,t.jsx)(p.Button,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Previous question",disabled:J||0===I,onClick:()=>k(R[I-1].id),children:(0,t.jsx)(s.ChevronLeft,{})}),(0,t.jsxs)("span",{className:"font-mono text-[10px] text-muted-foreground tabular-nums","aria-live":"polite",children:[I+1," / ",R.length]}),(0,t.jsx)(p.Button,{type:"button",variant:"ghost",size:"icon-sm","aria-label":"Next question",disabled:J||I===R.length-1,onClick:()=>k(R[I+1].id),children:(0,t.jsx)(r.ChevronRight,{})})]})}),a&&(0,t.jsx)("div",{className:"max-h-[min(14rem,30vh)] min-w-0 overflow-y-auto overscroll-contain pr-1.5",children:(0,t.jsx)(f.Markdown,{className:"min-w-0 text-[13px] leading-snug wrap-anywhere break-keep [&>*:first-child]:mt-0 [&>*:last-child]:mb-0",children:a})}),n.length>0&&(0,t.jsx)(P,{options:n,picked:B,busy:J,onChoose:ei}),(0,t.jsx)(M,{bot:E,onAllowed:er}),(0,t.jsx)(U,{threadId:e.id,recipient:E,draftKey:F.id,send:er,busy:J,placeholder:n.length?"Or write your own answer…":"Your answer…",label:`Answer for ${E}`,trailing:eo},JSON.stringify([e.id,E,F.id]))]})}return q?(0,t.jsxs)(O,{className:d,children:[(0,t.jsx)(K,{bot:es(e.bot),word:"Paused"}),L?.question&&(0,t.jsx)(h.FoldedText,{text:L.question,subject:"message",clamp:"line-clamp-3",tall:"max-h-40"}),(0,t.jsx)(P,{options:L?.options.length?L.options:[N.THREAD_CONTINUE],picked:B,busy:J,onChoose:ei}),(0,t.jsx)(U,{threadId:e.id,recipient:E,send:er,busy:J,placeholder:"Or put it another way…",label:`Message for ${E}`,trailing:eo},JSON.stringify([e.id,E,"paused"]))]}):"running"!==n||S?(0,t.jsxs)("div",{className:(0,D.cn)("flex min-w-0 flex-col gap-1.5",d),children:[(0,t.jsx)(U,{threadId:e.id,recipient:E,send:er,busy:J,autoFocus:"running"===n,onEscape:"running"===n?()=>_(!1):void 0,placeholder:"running"===n?`What's off? ${E} reads this before its next step`:"Anything more? It picks up where it left off",label:`Message for ${E}`,className:"rounded-2xl bg-background py-1.5 pr-1.5 pl-3.5 ring-1 ring-border/80 transition-shadow focus-within:ring-ring/60",leading:A.length>1?(0,t.jsx)(H,{current:es(E),bots:A.map(e=>es(e.bot)),disabled:J,onPick:t=>{z.threadDrafts.select(e.id,t),w(t)}}):null,trailing:"running"===n?(0,t.jsx)(p.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:J,onClick:()=>_(!1),"aria-label":"Never mind",className:"text-muted-foreground",children:(0,t.jsx)(u.X,{})}):null},JSON.stringify([e.id,E])),!!en&&"running"!==n&&(0,t.jsxs)("p",{className:"flex min-w-0 items-center gap-2 px-1 text-xs text-muted-foreground",children:[(0,t.jsx)(l.Loader2,{className:"size-3 shrink-0 animate-spin"}),(0,t.jsxs)("span",{className:"truncate",children:["Sending to ",en]})]})]}):(0,t.jsxs)("div",{className:(0,D.cn)("flex min-w-0 flex-col rounded-2xl bg-muted/40 ring-1 ring-border/50",d),children:[Z.map(n=>(0,t.jsxs)("div",{className:"flex items-start gap-2 border-border/60 border-b py-2.5 pr-1.5 pl-3.5",children:[(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-col gap-0.5",children:[(0,t.jsxs)("p",{className:"flex min-w-0 items-center gap-1.5 font-mono text-[10px] leading-4",children:[(0,t.jsx)(l.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}),(0,t.jsx)(g.ShinyText,{text:`Step-in \xb7 waits for ${n.bot}'s next step`,speed:2.2,className:"min-w-0 truncate"})]}),(0,t.jsx)("p",{className:"whitespace-pre-wrap break-keep text-[13px] leading-snug",children:n.text})]}),(0,t.jsx)(p.Button,{type:"button",size:"icon-sm",variant:"ghost",disabled:et,onClick:()=>ee(e.id,n.id),"aria-label":"Take it back",className:"shrink-0 text-muted-foreground/60 hover:text-foreground",children:(0,t.jsx)(u.X,{})})]},n.id)),(0,t.jsxs)("div",{className:"flex min-w-0 items-center gap-2 py-1.5 pr-1.5 pl-3.5",children:[(0,t.jsx)(g.ShinyText,{text:`${ea} \xb7 Working`,speed:2.4,className:"min-w-0 flex-1 truncate text-[12.5px] leading-5 break-keep"}),(0,t.jsxs)(p.Button,{type:"button",size:"sm",variant:"ghost",disabled:J,onClick:()=>_(!0),className:"h-7 shrink-0 gap-1.5 rounded-full px-2.5 text-[12px]",children:[(0,t.jsx)(o.CornerDownLeft,{className:"size-3.5"}),"Step in"]}),(0,t.jsx)("span",{className:"h-4 w-px shrink-0 bg-border"}),eo]})]})},"useAnswerThread",0,V],399512)},462945,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f914646fed72199c18504ab03094e85e5a8181ce1",t.callServer,void 0,t.findSourceMapURL,"cancelThreadAction");e.s(["cancelThreadAction",0,n])},460304,e=>{"use strict";var t=e.i(95187);let n=(0,t.createServerReference)("7f60b84689e86474a5fccb306bc0007faa46593649",t.callServer,void 0,t.findSourceMapURL,"answerThreadAction");e.s(["answerThreadAction",0,n])},931619,e=>{"use strict";var t=e.i(456420);let n={name:"chevrons-right",size:24,node:[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]]};n.node;let a=(0,t.default)(n);e.s(["ChevronsRight",0,a],931619)},51481,e=>{"use strict";var t=e.i(456420);let n={name:"circle-question-mark",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],aliases:["help-circle","circle-help"]};n.node;let a=(0,t.default)(n);e.s(["CircleQuestionMark",0,a],51481)},919191,e=>{"use strict";var t=e.i(456420);let n={name:"corner-down-left",size:24,node:[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]]};n.node;let a=(0,t.default)(n);e.s(["CornerDownLeft",0,a],919191)},64801,e=>{"use strict";var t=e.i(456420);let n={name:"paperclip",size:24,node:[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]]};n.node;let a=(0,t.default)(n);e.s(["Paperclip",0,a],64801)},825398,815731,e=>{"use strict";var t=e.i(456420);let n={name:"rotate-cw",size:24,node:[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]]};n.node;let a=(0,t.default)(n);e.s(["RotateCw",0,a],825398);var s=e.i(843476),r=e.i(176782),i=e.i(552245),o=e.i(225913),l=e.i(647163);let d=(0,o.cva)("group/bubble relative flex w-fit max-w-[80%] min-w-0 flex-col gap-1 group-data-[align=end]/message:self-end data-[align=end]:self-end data-[variant=ghost]:max-w-full",{variants:{variant:{default:"*:data-[slot=bubble-content]:bg-primary *:data-[slot=bubble-content]:text-primary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-primary/80",secondary:"*:data-[slot=bubble-content]:bg-secondary *:data-[slot=bubble-content]:text-secondary-foreground [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)]",muted:"*:data-[slot=bubble-content]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[color-mix(in_oklch,var(--muted),var(--foreground)_5%)]",tinted:"*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.93_calc(c*0.4)_h)] *:data-[slot=bubble-content]:text-foreground dark:*:data-[slot=bubble-content]:bg-[oklch(from_var(--primary)_0.3_calc(c*0.4)_h)] [&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.88_calc(c*0.5)_h)] dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-[oklch(from_var(--primary)_0.35_calc(c*0.5)_h)]",outline:"*:data-[slot=bubble-content]:border-border *:data-[slot=bubble-content]:bg-background [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-input/30",ghost:"border-none *:data-[slot=bubble-content]:rounded-none *:data-[slot=bubble-content]:bg-transparent *:data-[slot=bubble-content]:p-0 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted [&>[data-slot=bubble-content]:is(button,a):hover]:text-foreground dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-muted/50",destructive:"*:data-[slot=bubble-content]:bg-destructive/10 *:data-[slot=bubble-content]:text-destructive dark:*:data-[slot=bubble-content]:bg-destructive/20 [&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/20 dark:[&>[data-slot=bubble-content]:is(button,a):hover]:bg-destructive/30"}},defaultVariants:{variant:"default"}});(0,o.cva)("absolute z-10 flex w-fit shrink-0 items-center justify-center gap-1 rounded-full bg-muted px-1.5 py-0.5 text-sm ring-3 ring-card has-[button]:p-0",{variants:{side:{top:"top-0 -translate-y-3/4",bottom:"bottom-0 translate-y-3/4"},align:{start:"left-3",end:"right-3"}},defaultVariants:{side:"bottom",align:"end"}}),e.s(["Bubble",0,function({variant:e="default",align:t="start",className:n,...a}){return(0,s.jsx)("div",{"data-slot":"bubble","data-variant":e,"data-align":t,className:(0,l.cn)(d({variant:e}),n),...a})},"BubbleContent",0,function({className:e,render:t,...n}){var a;return a={defaultTagName:"div",props:(0,r.mergeProps)({className:(0,l.cn)("w-fit max-w-full min-w-0 overflow-hidden rounded-xl border border-transparent px-3 py-2 text-sm leading-relaxed wrap-break-word group-data-[align=end]/bubble:self-end [button]:text-left [button,a]:transition-colors [button,a]:outline-none [button,a]:focus-visible:border-ring [button,a]:focus-visible:ring-3 [button,a]:focus-visible:ring-ring/50",e)},n),render:t,state:{slot:"bubble-content"}},(0,i.useRenderElement)(a.defaultTagName??"div",a,a)}],815731)},929272,e=>{"use strict";var t=e.i(456420);let n={name:"square",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]};n.node;let a=(0,t.default)(n);e.s(["Square",0,a],929272)}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,638475,e=>{"use strict";var t=e.i(843476),r=e.i(798120),i=e.i(319036),s=e.i(609856),n=e.i(283653),a=e.i(95187);let o=(0,a.createServerReference)("7f157eae9449c071099b328bc394675b074c81a76c",a.callServer,void 0,a.findSourceMapURL,"setKeepWorkingOnAction"),c="Work while the app is closed";e.s(["KeepWorkingSwitch",0,function(){let{data:e,mutate:a}=(0,n.useServerRoute)(r.queryKey.botKeepWorking),[l]=(0,s.useServerAction)(o,{onOk:()=>(0,n.revalidate)(r.queryKey.botKeepWorking)});return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"shrink-0 text-xs text-muted-foreground",title:"Off, closing the last tab stops running jobs and holds routines until one is open again. On, they run until the server stops.",children:c}),(0,t.jsx)(i.Switch,{checked:e??!1,disabled:void 0===e,onCheckedChange:e=>{a(e,!1),l(e)},"aria-label":c})]})}],638475)},317567,e=>{"use strict";var t=e.i(95187);let r=(0,t.createServerReference)("7f018e766e37c74d20596a96676bff15026135e01b",t.callServer,void 0,t.findSourceMapURL,"deleteWorkspaceFileAction");e.s(["deleteWorkspaceFileAction",0,r])},333999,e=>{"use strict";var t=e.i(271645),r=e.i(647163);e.s(["useObjectState",0,e=>{let[i,s]=(0,t.useState)(e);return[i,(0,t.useMemo)(()=>{let e=e=>{s(t=>{let i=(0,r.isFunction)(e)?e(t):e;return Object.keys(i).some(e=>!Object.is(t[e],i[e]))?{...t,...i}:t})},t=new Map;return new Proxy(e,{get(i,s,n){if("symbol"==typeof s)return Reflect.get(i,s,n);let a=t.get(s);return a||(a=t=>{e(e=>({[s]:(0,r.isFunction)(t)?t(e[s]):t}))},t.set(s,a)),a}})},[])]}])},759659,e=>{"use strict";var t=e.i(456420);let r={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"]};r.node;let i=(0,t.default)(r);e.s(["Trash2",0,i],759659)}]);
|