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 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,633669,e=>{"use strict";var t=e.i(843476),n=e.i(818125),a=e.i(647163);e.s(["SourceChips",0,function({sources:e,limit:s,className:l}){let i=e.flatMap(e=>{let t=(0,n.hostOf)(e.url);return t?[{...e,host:t}]:[]}),r=s?i.slice(0,s):i,o=i.length-r.length;return(0,t.jsxs)("span",{className:(0,a.cn)("flex min-w-0 flex-wrap items-center gap-1",l),children:[r.map(e=>(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",title:e.title??e.url,className:"flex h-[22px] min-w-0 items-center gap-1.5 rounded-full bg-muted pr-2 pl-1 text-[11.5px] leading-4 text-foreground/80 outline-none transition-colors hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.SiteIcon,{host:e.host}),(0,t.jsx)("span",{className:"truncate",children:e.host})]},e.url)),o>0&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:["+",o]})]})}])},807038,e=>{"use strict";var t=e.i(843476),n=e.i(456420);let a={name:"file-x",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]]};a.node;let s=(0,n.default)(a);var l=e.i(271645),i=e.i(798120),r=e.i(41533),o=e.i(83928),d=e.i(621285),c=e.i(616172),u=e.i(283653),h=e.i(647163);let p=e=>e.split(".").pop()?.toLowerCase()??"file",m=e=>e.split("/").pop()??e;e.s(["Attachments",0,function({text:e,className:n,onBubble:a=!1}){let f=(0,l.useMemo)(()=>(0,c.pathsIn)(e),[e]),{data:x}=(0,u.useServerRoute)(f.length?i.queryKey.workspaceFiles(f):null),g=(0,l.useMemo)(()=>x??[],[x]),y=(0,l.useMemo)(()=>g.filter(e=>"image"===(0,c.viewKindOf)(e.path)),[g]),b=(0,l.useMemo)(()=>{let e=0;return g.filter(t=>{let n=(0,o.faceOf)(t.path,t.bytes);return"text"===n||"page"===n&&(e+=1)<=r.FILE_THUMB.pages})},[g]),k=g.filter(e=>!y.includes(e)&&!b.includes(e)),j=new Set(g.map(e=>m(e.path))),M=f.filter(e=>!g.some(t=>t.path===e)&&!j.has(m(e)));if(!f.length||!x||!g.length&&!M.length)return null;let N=y.map(e=>e.path),S=y.slice(0,4),v=y.length-S.length,O=y.length+b.length<=2,_=O?"h-40 w-32":"h-26.25 w-21";return(0,t.jsxs)("div",{className:(0,h.cn)("flex min-w-0 flex-col gap-1.5",n),children:[(S.length>0||b.length>0)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-1.5",children:[b.map(e=>(0,t.jsxs)(d.FileLink,{path:e.path,title:`${e.path} — ${(0,h.formatBytes)(e.bytes)}`,className:(0,h.cn)("flex shrink-0 flex-col gap-1 rounded-xl outline-none transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",O?"w-32":"w-21"),children:[(0,t.jsx)(o.FileThumb,{path:e.path,bytes:e.bytes,className:(0,h.cn)("w-full rounded-xl ring-1 ring-foreground/5 ring-inset",_)}),(0,t.jsxs)("span",{className:"flex flex-col items-start px-0.5",children:[(0,t.jsx)("span",{className:"max-w-full truncate text-[11.5px] leading-4",children:m(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[p(e.path)," · ",(0,h.formatBytes)(e.bytes)]})]})]},e.path)),S.map((e,n)=>(0,t.jsxs)(d.FileLink,{path:e.path,group:N,title:`${e.path} — ${(0,h.formatBytes)(e.bytes)}`,className:(0,h.cn)("relative shrink-0 overflow-hidden rounded-xl bg-muted outline-none ring-1 ring-foreground/5 ring-inset transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",_),children:[(0,t.jsx)("img",{src:i.queryKey.file(e.path),alt:m(e.path),loading:"lazy",decoding:"async",className:"size-full object-cover"}),v>0&&n===S.length-1&&(0,t.jsxs)("span",{className:"absolute inset-0 grid place-items-center bg-black/45 text-[14px] font-medium text-white",children:["+",v]})]},e.path))]}),k.map(e=>{let n=(0,o.fileIcon)(e.path);return(0,t.jsxs)(d.FileLink,{path:e.path,title:e.path,className:(0,h.cn)("flex w-fit max-w-full items-center gap-2.5 rounded-xl py-1.5 pr-3 pl-1.5 outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",a?"bg-background/70 hover:bg-background":"bg-muted/70 hover:bg-muted"),children:[(0,t.jsx)("span",{className:(0,h.cn)("grid size-8 shrink-0 place-items-center rounded-lg text-muted-foreground",a?"bg-muted":"bg-background"),children:(0,t.jsx)(n,{className:"size-3.5"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col items-start",children:[(0,t.jsx)("span",{className:"max-w-full truncate text-[12.5px] leading-4.25",children:m(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[p(e.path)," · ",(0,h.formatBytes)(e.bytes)]})]})]},e.path)}),M.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:M.map(e=>(0,t.jsxs)("span",{title:`${e} — not on disk`,className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted/70 py-1 pr-2.5 pl-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(s,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate line-through",children:m(e)})]},e))})]})},"imagePathsIn",0,function(e){return(0,c.pathsIn)(e).filter(e=>"image"===(0,c.viewKindOf)(e))},"shortenPaths",0,function(e){return e.split(/(```[\s\S]*?```)/).map((e,t)=>t%2==1?e:e.replace(/`([^`\n]+)`/g,(e,t)=>{let n=t.trim();if(!n.includes("/"))return e;let[a]=(0,c.pathsIn)(n),s=a?.split("/").pop();return a&&s&&n.endsWith(s)?`\`${s}\``:e})).join("")}],807038)},222055,991322,852116,589128,e=>{"use strict";var t=e.i(843476),n=e.i(518515),a=e.i(689664),s=e.i(716327),l=e.i(482022),i=e.i(772382),r=e.i(60744),o=e.i(226091),d=e.i(91511),c=e.i(758925),u=e.i(218964),h=e.i(632781),p=e.i(468590),m=e.i(928310),f=e.i(730274),x=e.i(604139),g=e.i(747925),y=e.i(271645),b=e.i(798120),k=e.i(660302),j=e.i(818125),M=e.i(671428),N=e.i(633669),S=e.i(213377),v=e.i(807038),O=e.i(456420);let _={name:"cable",size:24,node:[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]};_.node;let w=(0,O.default)(_);e.s(["McpMark",0,w],991322);let A={name:"cpu",size:24,node:[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]};A.node;let E=(0,O.default)(A);e.s(["MemoryMark",0,E],852116);var L=e.i(431594);let T=e.i(856539).BookMarked;e.s(["SkillsMark",0,T],589128);var z=e.i(621285),C=e.i(283653),I=e.i(647163);let F={[S.TOOL_NAMES.web_search]:function({tool:e,threadId:n,collapsed:a}){let s=D(e),l=s.length?[]:Y(e.results);return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep",children:["“",e.input,"”"]}),s.length>0&&(0,t.jsx)(N.SourceChips,{sources:s,className:"px-3 pb-2"}),l.length>0&&(0,t.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:l.map((e,n)=>(0,t.jsxs)("li",{className:"flex gap-2 text-[11.5px] leading-snug text-muted-foreground",children:[(0,t.jsx)("span",{className:"mt-1.25 size-1 shrink-0 rounded-full bg-muted-foreground/50"}),(0,t.jsx)("span",{className:"truncate",children:e})]},`${n}-${e}`))})]})},[S.TOOL_NAMES.bash]:function({tool:e,threadId:n,collapsed:a}){let s=Y(e.results);return(0,t.jsx)(V,{tool:e,threadId:n,collapsed:a,children:(0,t.jsxs)("pre",{className:"mx-3 overflow-x-auto rounded-lg bg-foreground/5 px-2.5 py-1.5 font-mono text-[11px] leading-relaxed scrollbar-none dark:bg-black/25",children:[(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"$ "}),e.input,s.length>0&&(0,t.jsx)("span",{className:"block text-muted-foreground",children:s.join("\n")})]})})},[S.TOOL_NAMES.write_file]:function({tool:e,threadId:n,collapsed:a}){let s=e.path??e.input;return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px]",children:e.input}),(0,t.jsxs)(z.FileLink,{path:s,label:`Open ${s}`,className:"flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:bg-background hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",children:[(0,t.jsx)(l.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,t.jsx)(X,{lines:Y(e.results),mono:!0})]})}},R={[S.TOOL_NAMES.web_search]:d.Globe,[S.TOOL_NAMES.bash]:x.Terminal,[S.TOOL_NAMES.write_file]:r.FilePen,[S.TOOL_NAMES.memory_recall]:E,[S.TOOL_NAMES.memory_remember]:E,[S.TOOL_NAMES.memory_forget]:E,[S.TOOL_NAMES.memory_conversation]:E,[S.TOOL_NAMES.load_skill]:T,[S.TOOL_NAMES.tool_search]:w,[S.TOOL_NAMES.tool_call]:w,[S.TOOL_NAMES.thread_start]:f.Send,[S.TOOL_NAMES.thread_tell]:f.Send,[S.TOOL_NAMES.thread_answer]:f.Send,[S.TOOL_NAMES.thread_status]:u.ListChecks,[S.TOOL_NAMES.thread_cancel]:u.ListChecks,[S.TOOL_NAMES.thread_show]:u.ListChecks,[S.TOOL_NAMES.thread_seen]:u.ListChecks,[S.TOOL_NAMES.send_message]:p.MessageSquare,[S.TOOL_NAMES.look_at]:i.Eye,[S.TOOL_NAMES.sign_in_use]:c.KeyRound,[S.TOOL_NAMES.sign_in_keep]:c.KeyRound,[S.TOOL_NAMES.end_call]:m.PhoneOff,[S.TOOL_NAMES.routine]:L.RoutineMark},$=e=>R[e]??g.Wrench,K=new Set(["cat","sed","head","tail","grep","rg","ls","find","wc","awk","jq"]),P=e=>e.split("/").pop()??e;function D(e){return Y(e.results).flatMap(e=>{let t=/https?:\/\/\S+/.exec(e)?.[0];if(!t)return[];let n=e.slice(0,e.indexOf(t)).replace(/[\s—-]+$/,"");return[{url:t,...n?{title:n}:{}}]})}function q(e){let t=(0,v.imagePathsIn)(`${e.path??""} ${e.input}`)[0];if(e.name===S.TOOL_NAMES.web_search)return{icon:d.Globe,pages:D(e)};if(e.name===S.TOOL_NAMES.write_file)return{icon:r.FilePen,image:t,target:P(e.path??e.input)};if(e.name!==S.TOOL_NAMES.bash)return{icon:$(e.name),image:t};let a=e.input.replace(/^\s*cd\s+\S+\s*&&\s*/,"").trim(),[s=""]=a.split(/\s+/),l=/(?:^|[\s;&|(])playwright-cli((?:\s+-\S+)*)\s+([a-z-]+)/.exec(a);if(l){if("screenshot"===l[2])return{icon:n.Camera,image:t};let e=/https?:\/\/[^\s'"]+/.exec(a)?.[0];return{icon:d.Globe,host:e&&(0,j.hostOf)(e)||void 0,image:t}}return K.has(s)?{icon:o.FileText,image:t,target:e.path?P(e.path):void 0}:{icon:x.Terminal,image:t,target:s||void 0}}function B({face:e}){if(e.pages?.length){let n=[...new Set(e.pages.flatMap(e=>(0,j.hostOf)(e.url)??[]))].slice(0,3);return(0,t.jsx)("span",{className:"flex shrink-0 items-center gap-1",children:n.map(e=>(0,t.jsx)(j.SiteIcon,{host:e},e))})}return e.host?(0,t.jsxs)("span",{className:"flex h-5 shrink-0 items-center gap-1.5 rounded-full bg-muted pr-2 pl-1 text-[11px] text-foreground/80",children:[(0,t.jsx)(j.SiteIcon,{host:e.host}),e.host]}):e.target&&!e.image?(0,t.jsx)("span",{className:"max-w-40 shrink truncate font-mono text-[10.5px] text-muted-foreground",children:e.target}):null}function H({tool:e,threadId:n,collapsed:a}){return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsx)("p",{className:"px-3 pt-1 pb-1.5 text-[12px] leading-snug break-keep",children:e.input}),(0,t.jsx)(X,{lines:Y(e.results)})]})}function V({tool:e,threadId:n,collapsed:l=!1,children:i}){let r=void 0===e.results,o=q(e),d=o.icon,[c,u]=(0,y.useState)(!l),p=c||r,m=n&&e.callId&&((e.results?.length??0)>0||e.more);return(0,t.jsxs)("div",{className:(0,I.cn)("@container w-full overflow-hidden rounded-xl transition-colors",p?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>u(e=>!e),"aria-expanded":p,className:"flex w-full items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-[7px] bg-foreground/8 text-muted-foreground",children:r?(0,t.jsx)(h.Loader2,{className:"size-3 animate-spin"}):(0,t.jsx)(d,{className:"size-3"})}),e.note?(0,t.jsxs)(t.Fragment,{children:[r?(0,t.jsx)(k.ShinyText,{text:e.note,speed:2.4,className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep",children:e.note}),(0,t.jsx)("span",{className:"hidden min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-muted-foreground/85 @lg:block",children:e.input})]}):r?(0,t.jsx)(k.ShinyText,{text:e.input,speed:2.4,className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-foreground/80",children:e.input}),(0,t.jsx)(U,{paths:(0,v.imagePathsIn)(`${e.path??""} ${e.input}`)}),(0,t.jsx)(B,{face:o}),!r&&(0,t.jsx)(a.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,t.jsx)(s.ChevronDown,{className:(0,I.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",p&&"rotate-180")})]}),p&&(0,t.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[i,m&&(0,t.jsx)(J,{threadId:n,callId:e.callId})]})]})}function U({paths:e}){let[n,a]=(0,y.useState)([]),s=e.filter(e=>!n.includes(e)).slice(0,W);return s.length?(0,t.jsx)("span",{className:"flex shrink-0 items-center",children:s.map((e,n)=>(0,t.jsx)("img",{src:b.queryKey.file(e),alt:"",loading:"lazy",decoding:"async",onError:()=>a(t=>[...t,e]),className:(0,I.cn)("size-6 rounded-md bg-muted object-cover ring-2 ring-background",n>0&&"-ml-1.5")},e))}):null}let W=3;function J({threadId:e,callId:n}){let[a,l]=(0,y.useState)(!1),{data:i,isLoading:r}=(0,C.useServerRoute)(a?b.queryKey.toolResult(e,n):null);return(0,t.jsxs)("div",{className:"px-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(e=>!e),className:"flex items-center gap-1 rounded-md py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(s.ChevronDown,{className:(0,I.cn)("size-3",a&&"rotate-180")}),a?"Less":"Everything"]}),a&&(r||!i?(0,t.jsx)(M.Skeleton,{className:"mt-1.5 h-12 w-full rounded-lg"}):(0,t.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[Z(i).map((e,n)=>(0,t.jsx)(G,{src:e},`${n}-${e.length}`)),Y(i).length>0&&(0,t.jsx)("pre",{className:"max-h-72 overflow-auto rounded-lg bg-foreground/5 px-2.5 py-2 font-mono text-[11px] leading-relaxed break-all whitespace-pre-wrap dark:bg-black/25",children:Y(i).join("\n")})]}))]})}function G({src:e}){return(0,t.jsx)("img",{src:e,alt:"",className:"block w-full rounded-lg bg-muted object-contain"})}function X({lines:e,mono:n}){return 0===e.length?null:(0,t.jsx)("ul",{className:"px-3 pb-1.5",children:e.map((e,a)=>(0,t.jsx)("li",{className:(0,I.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",n&&"font-mono"),children:e},`${a}-${e}`))})}let Y=e=>e?.flatMap(e=>"text"===e.type?[e.text]:[])??[],Z=e=>e?.flatMap(e=>"image"===e.type?[e.src]:[])??[];e.s(["BotTool",0,function(e){let n=F[e.tool.name]??H;return(0,t.jsx)(n,{...e})},"StepTile",0,function({tool:e,onOpen:n}){let a=q(e),[s,l]=(0,y.useState)(!1),i=a.icon;return(0,t.jsx)("button",{type:"button",onClick:n,title:e.note??e.input,"aria-label":e.note??e.input,className:"grid size-6 shrink-0 place-items-center overflow-hidden rounded-full bg-background text-muted-foreground outline-none transition-transform hover:scale-110 focus-visible:ring-3 focus-visible:ring-ring/50",children:a.image&&!s?(0,t.jsx)("img",{src:b.queryKey.file(a.image),alt:"",loading:"lazy",decoding:"async",onError:()=>l(!0),className:"size-full object-cover"}):a.host?(0,t.jsx)(j.SiteIcon,{host:a.host,className:"size-3.5 rounded-full",fallback:(0,t.jsx)(i,{className:"size-3"})}):(0,t.jsx)(i,{className:"size-3"})})},"toolIcon",0,$],222055)},256604,567334,933916,671228,762074,e=>{"use strict";var t=e.i(843476),n=e.i(271645);let a=[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],s=["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"],l={A:[".##.","#..#","####","#..#","#..#"],B:["###.","#..#","###.","#..#","###."],C:[".###","#...","#...","#...",".###"],D:["###.","#..#","#..#","#..#","###."],E:["####","#...","###.","#...","####"],F:["####","#...","###.","#...","#..."],G:[".###","#...","#.##","#..#",".###"],H:["#..#","#..#","####","#..#","#..#"],I:["###",".#.",".#.",".#.","###"],J:["..##","...#","...#","#..#",".##."],K:["#..#","#.#.","##..","#.#.","#..#"],L:["#...","#...","#...","#...","####"],M:["#...#","##.##","#.#.#","#...#","#...#"],N:["#..#","##.#","#.##","#..#","#..#"],O:[".##.","#..#","#..#","#..#",".##."],P:["###.","#..#","###.","#...","#..."],Q:[".##.","#..#","#..#","#.#.",".#.#"],R:["###.","#..#","###.","#.#.","#..#"],S:[".###","#...",".##.","...#","###."],T:["###",".#.",".#.",".#.",".#."],U:["#..#","#..#","#..#","#..#",".##."],V:["#...#","#...#",".#.#.",".#.#.","..#.."],W:["#...#","#...#","#.#.#","##.##","#...#"],X:["#..#","#..#",".##.","#..#","#..#"],Y:["#.#","#.#",".#.",".#.",".#."],Z:["####","...#",".##.","#...","####"],0:[".##.","#.##","#..#","##.#",".##."],1:[".#.","##.",".#.",".#.","###"],2:["###.","...#",".##.","#...","####"],3:["###.","...#",".##.","...#","###."],4:["#..#","#..#","####","...#","...#"],5:["####","#...","###.","...#","###."],6:[".##.","#...","###.","#..#",".##."],7:["####","...#","..#.",".#..",".#.."],8:[".##.","#..#",".##.","#..#",".##."],9:[".##.","#..#",".###","...#",".##."],"!":["#","#","#",".","#"],"?":["###.","...#",".##.","....",".#.."],".":[".",".",".",".","#"],",":["..","..","..",".#","#."],"'":["#","#",".",".","."],"-":["...","...","###","...","..."],"+":["...",".#.","###",".#.","..."],":":[".","#",".","#","."],"(":[".#","#.","#.","#.",".#"],")":["#.",".#",".#",".#","#."],"<":["..#",".#.","#..",".#.","..#"],">":["#..",".#.","..#",".#.","#.."],"^":[".#.","#.#","...","...","..."],"~":["....",".#.#","#.#.","....","...."],"♥":[".#.#.","#####","#####",".###.","..#.."]," ":["..","..","..","..",".."]};function i(e,t){let n=43758.5453*Math.sin(127.1*e+311.7*t);return n-Math.floor(n)}Object.keys(l).filter(e=>!/^[A-Z0-9 ]$/.test(e)),e.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_MIN_LEVEL",0,6,"EMOJI_POOL",0,s,"EMOJI_RATIO",0,.11,"FACE_WORD_MAX",0,8,"LETTERS",0,l,"RAMP",0,a,"hash",0,i,"smoothstep",0,function(e,t,n){let a=Math.min(1,Math.max(0,(n-e)/(t-e)));return a*a*(3-2*a)},"undrawable",0,function(e){return Array.from(e.toUpperCase()).find(e=>!(e in l))??null}],567334);var r=e.i(504565),o=e.i(41533),d=e.i(149666),c=e.i(265402);let u=["ascii","emoji","emojiOnly"];e.s(["ASCII_CHARSETS",0,u],933916);var h=e.i(413168);let p=d.LiveSettingsSchema.extend({locale:r.default.string().max(35).nullish()}),m=[{id:"chatgpt",...c.TEXT_MODEL_PROVIDERS.chatgpt},{id:"openai",...c.TEXT_MODEL_PROVIDERS.openai}],f=r.default.object({charset:r.default.enum(u).default(o.ASCII_FACE.charset),fontSize:r.default.number().min(o.ASCII_FACE.fontSize.min).max(o.ASCII_FACE.fontSize.max).default(o.ASCII_FACE.fontSize.default),density:r.default.number().min(o.ASCII_FACE.density.min).max(o.ASCII_FACE.density.max).default(o.ASCII_FACE.density.default)}),x=f.parse({}),g={min:3,max:32},y=r.default.object({enabled:r.default.boolean(),phrase:r.default.string().trim().min(g.min).max(g.max)}),b=r.default.object({enabled:r.default.boolean(),combo:r.default.string().trim().min(1).max(64)}),k=["off","waiting","any"],j=r.default.enum(k),M=["center","sides"],N=r.default.enum(M);r.default.object({id:r.default.string().min(1),role:r.default.enum(["user","assistant","tool"]),tool:r.default.string().nullish(),text:r.default.string(),seq:r.default.number().int().min(0),fragments:r.default.array(h.LiveFragmentSchema).nullish()}),r.default.object({id:r.default.string().min(1),text:r.default.string(),seq:r.default.number().int().min(0)}),e.s(["CALL_BACK_DEFAULT",0,"waiting","CALL_BACK_LABEL",0,{off:"Never",waiting:"When a job needs me",any:"Whenever a job ends"},"CALL_BACK_MODES",0,k,"CAPTION_VIEWS",0,M,"CallBackSchema",0,j,"CaptionViewSchema",0,N,"FACE_DEFAULT",0,x,"HOTKEY_DEFAULT",0,{enabled:!0,combo:"alt+shift+KeyT"},"HotkeySchema",0,b,"ThursdayFaceSchema",0,f,"ThursdaySettingsSchema",0,p,"WAKE_DEFAULT",0,{enabled:!1,phrase:"hey thursday"},"WAKE_PHRASE",0,g,"WakeSchema",0,y,"textCallRunsOn",0,e=>m.find(t=>e(t.apiKeyName))?.id??null],671228);let S="thursday.icon";function v(){try{let e=window.localStorage.getItem(S);return f.parse(e?JSON.parse(e):{})}catch{return x}}let O=v(),_=new Set;function w(){for(let e of _)e()}function A(){return(0,n.useSyncExternalStore)(e=>{_.add(e);let t=e=>{e.key===S&&(O=v(),w())};return window.addEventListener("storage",t),()=>{_.delete(e),window.removeEventListener("storage",t)}},()=>O,()=>x)}e.s(["setThursdayFace",0,function(e){O=e;try{window.localStorage.setItem(S,JSON.stringify(e))}catch{}w()},"useThursdayFace",0,A],762074);let E=240/276,L=new Map,T=new Set,z=null;e.s(["THURSDAY_SEED",0,"thursday","ThursdayMark",0,function({size:e=16,className:l}){let r="ascii"!==A().charset,{cells:o,font:d}=function(e){let t=L.get(e);if(t)return t;let n=e*E,a=(e-n)/2,s=Math.max(2,Math.round(n/4)),l=n/s,r=.98*l,o=[];for(let e=0;e<s;e++)for(let t=0;t<s;t++){let d=3===s&&1!==e&&1!==t?.72:1,c=n/2+l*(t+.5-s/2)*d,u=n/2+l*(e+.5-s/2)*d,h=Math.hypot(c-n/2,u-n/2)/(n/2),p=977*s+e*s+t;!(h+(s>=5?(i(p,1)-.5)*.24:0)>.98)&&(s>=8&&i(p,2)<.02+.24*h**3||o.push({seed:p,x:a+c,y:a+u+.36*r,r:h}))}let d={cells:o,font:r};return L.set(e,d),d}(e),[c,u]=(0,n.useState)(0);return(0,n.useEffect)(()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){if(T.add(u),!z){let e=Date.now();z=setInterval(()=>{let t=Date.now()-e;for(let e of T)e(t)},155)}return()=>{T.delete(u),0===T.size&&z&&(clearInterval(z),z=null)}}},[]),(0,t.jsx)("svg",{viewBox:`0 0 ${e} ${e}`,width:e,height:e,className:l,fill:"currentColor","aria-hidden":!0,children:o.map(e=>(0,t.jsx)("text",{x:e.x,y:e.y,textAnchor:"middle",fontFamily:r?'"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif':"ui-monospace, SFMono-Regular, Menlo, monospace",fontWeight:r?void 0:700,fontSize:d,children:function(e,t,n){let l=Math.floor((t+620*i(e.seed,11)*3)/620);if(n){let t=Math.floor(i(e.seed,17)*s.length);return s[(t+9*l)%s.length]}let r=Math.round(5+4*Math.max(0,1-e.r**2)**.6),o=a[Math.min(a.length-1,r)];return o[Math.floor(i(e.seed,l)*o.length)]??" "}(e,c,r)},e.seed))})}],256604)},518515,772382,60744,218964,468590,928310,730274,604139,e=>{"use strict";var t=e.i(456420);let n={name:"camera",size:24,node:[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]};n.node;let a=(0,t.default)(n);e.s(["Camera",0,a],518515);let s={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};s.node;let l=(0,t.default)(s);e.s(["Eye",0,l],772382);let i={name:"file-pen",size:24,node:[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],aliases:["file-edit"]};i.node;let r=(0,t.default)(i);e.s(["FilePen",0,r],60744);let o={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};o.node;let d=(0,t.default)(o);e.s(["ListChecks",0,d],218964);let c={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};c.node;let u=(0,t.default)(c);e.s(["MessageSquare",0,u],468590);let h={name:"phone-off",size:24,node:[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]]};h.node;let p=(0,t.default)(h);e.s(["PhoneOff",0,p],928310);let m={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};m.node;let f=(0,t.default)(m);e.s(["Send",0,f],730274);let x={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};x.node;let g=(0,t.default)(x);e.s(["Terminal",0,g],604139)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,633669,e=>{"use strict";var t=e.i(843476),n=e.i(818125),a=e.i(647163);e.s(["SourceChips",0,function({sources:e,limit:s,className:l}){let i=e.flatMap(e=>{let t=(0,n.hostOf)(e.url);return t?[{...e,host:t}]:[]}),r=s?i.slice(0,s):i,o=i.length-r.length;return(0,t.jsxs)("span",{className:(0,a.cn)("flex min-w-0 flex-wrap items-center gap-1",l),children:[r.map(e=>(0,t.jsxs)("a",{href:e.url,target:"_blank",rel:"noreferrer",title:e.title??e.url,className:"flex h-[22px] min-w-0 items-center gap-1.5 rounded-full bg-muted pr-2 pl-1 text-[11.5px] leading-4 text-foreground/80 outline-none transition-colors hover:bg-accent focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.SiteIcon,{host:e.host}),(0,t.jsx)("span",{className:"truncate",children:e.host})]},e.url)),o>0&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:["+",o]})]})}])},807038,e=>{"use strict";var t=e.i(843476),n=e.i(456420);let a={name:"file-x",size:24,node:[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m14.5 12.5-5 5",key:"b62r18"}],["path",{d:"m9.5 12.5 5 5",key:"1rk7el"}]]};a.node;let s=(0,n.default)(a);var l=e.i(271645),i=e.i(798120),r=e.i(41533),o=e.i(83928),d=e.i(621285),c=e.i(616172),u=e.i(283653),h=e.i(647163);let p=e=>e.split(".").pop()?.toLowerCase()??"file",m=e=>e.split("/").pop()??e;e.s(["Attachments",0,function({text:e,className:n,onBubble:a=!1}){let f=(0,l.useMemo)(()=>(0,c.pathsIn)(e),[e]),{data:x}=(0,u.useServerRoute)(f.length?i.queryKey.workspaceFiles(f):null),g=(0,l.useMemo)(()=>x??[],[x]),y=(0,l.useMemo)(()=>g.filter(e=>"image"===(0,c.viewKindOf)(e.path)),[g]),b=(0,l.useMemo)(()=>{let e=0;return g.filter(t=>{let n=(0,o.faceOf)(t.path,t.bytes);return"text"===n||"page"===n&&(e+=1)<=r.FILE_THUMB.pages})},[g]),k=g.filter(e=>!y.includes(e)&&!b.includes(e)),j=new Set(g.map(e=>m(e.path))),M=f.filter(e=>!g.some(t=>t.path===e)&&!j.has(m(e)));if(!f.length||!x||!g.length&&!M.length)return null;let N=y.map(e=>e.path),v=y.slice(0,4),S=y.length-v.length,O=y.length+b.length<=2,_=O?"h-40 w-32":"h-26.25 w-21";return(0,t.jsxs)("div",{className:(0,h.cn)("flex min-w-0 flex-col gap-1.5",n),children:[(v.length>0||b.length>0)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-start gap-1.5",children:[b.map(e=>(0,t.jsxs)(d.FileLink,{path:e.path,title:`${e.path} — ${(0,h.formatBytes)(e.bytes)}`,className:(0,h.cn)("flex shrink-0 flex-col gap-1 rounded-xl outline-none transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",O?"w-32":"w-21"),children:[(0,t.jsx)(o.FileThumb,{path:e.path,bytes:e.bytes,className:(0,h.cn)("w-full rounded-xl ring-1 ring-foreground/5 ring-inset",_)}),(0,t.jsxs)("span",{className:"flex flex-col items-start px-0.5",children:[(0,t.jsx)("span",{className:"max-w-full truncate text-[11.5px] leading-4",children:m(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[p(e.path)," · ",(0,h.formatBytes)(e.bytes)]})]})]},e.path)),v.map((e,n)=>(0,t.jsxs)(d.FileLink,{path:e.path,group:N,title:`${e.path} — ${(0,h.formatBytes)(e.bytes)}`,className:(0,h.cn)("relative shrink-0 overflow-hidden rounded-xl bg-muted outline-none ring-1 ring-foreground/5 ring-inset transition-opacity hover:opacity-90 focus-visible:ring-3 focus-visible:ring-ring/50",_),children:[(0,t.jsx)("img",{src:i.queryKey.file(e.path),alt:m(e.path),loading:"lazy",decoding:"async",className:"size-full object-cover"}),S>0&&n===v.length-1&&(0,t.jsxs)("span",{className:"absolute inset-0 grid place-items-center bg-black/45 text-[14px] font-medium text-white",children:["+",S]})]},e.path))]}),k.map(e=>{let n=(0,o.fileIcon)(e.path);return(0,t.jsxs)(d.FileLink,{path:e.path,title:e.path,className:(0,h.cn)("flex w-fit max-w-full items-center gap-2.5 rounded-xl py-1.5 pr-3 pl-1.5 outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",a?"bg-background/70 hover:bg-background":"bg-muted/70 hover:bg-muted"),children:[(0,t.jsx)("span",{className:(0,h.cn)("grid size-8 shrink-0 place-items-center rounded-lg text-muted-foreground",a?"bg-muted":"bg-background"),children:(0,t.jsx)(n,{className:"size-3.5"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col items-start",children:[(0,t.jsx)("span",{className:"max-w-full truncate text-[12.5px] leading-4.25",children:m(e.path)}),(0,t.jsxs)("span",{className:"font-mono text-[10px] leading-3.5 text-muted-foreground",children:[p(e.path)," · ",(0,h.formatBytes)(e.bytes)]})]})]},e.path)}),M.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:M.map(e=>(0,t.jsxs)("span",{title:`${e} — not on disk`,className:"flex max-w-full items-center gap-1.5 rounded-full bg-muted/70 py-1 pr-2.5 pl-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(s,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate line-through",children:m(e)})]},e))})]})},"imagePathsIn",0,function(e){return(0,c.pathsIn)(e).filter(e=>"image"===(0,c.viewKindOf)(e))},"shortenPaths",0,function(e){return e.split(/(```[\s\S]*?```)/).map((e,t)=>t%2==1?e:e.replace(/`([^`\n]+)`/g,(e,t)=>{let n=t.trim();if(!n.includes("/"))return e;let[a]=(0,c.pathsIn)(n),s=a?.split("/").pop();return a&&s&&n.endsWith(s)?`\`${s}\``:e})).join("")}],807038)},222055,991322,852116,589128,e=>{"use strict";var t=e.i(843476),n=e.i(518515),a=e.i(689664),s=e.i(716327),l=e.i(482022),i=e.i(772382),r=e.i(60744),o=e.i(226091),d=e.i(91511),c=e.i(758925),u=e.i(218964),h=e.i(632781),p=e.i(468590),m=e.i(928310),f=e.i(730274),x=e.i(604139),g=e.i(747925),y=e.i(271645),b=e.i(798120),k=e.i(660302),j=e.i(818125),M=e.i(671428),N=e.i(633669),v=e.i(213377),S=e.i(807038),O=e.i(456420);let _={name:"cable",size:24,node:[["path",{d:"M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z",key:"trhst0"}],["path",{d:"M17 21v-2",key:"ds4u3f"}],["path",{d:"M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10",key:"1mo9zo"}],["path",{d:"M21 21v-2",key:"eo0ou"}],["path",{d:"M3 5V3",key:"1k5hjh"}],["path",{d:"M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z",key:"1dd30t"}],["path",{d:"M7 5V3",key:"1t1388"}]]};_.node;let w=(0,O.default)(_);e.s(["McpMark",0,w],991322);let A={name:"cpu",size:24,node:[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]]};A.node;let E=(0,O.default)(A);e.s(["MemoryMark",0,E],852116);var L=e.i(431594);let T=e.i(856539).BookMarked;e.s(["SkillsMark",0,T],589128);var z=e.i(621285),C=e.i(283653),I=e.i(647163);let F={[v.TOOL_NAMES.web_search]:function({tool:e,threadId:n,collapsed:a}){let s=D(e),l=s.length?[]:Y(e.results);return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep",children:["“",e.input,"”"]}),s.length>0&&(0,t.jsx)(N.SourceChips,{sources:s,className:"px-3 pb-2"}),l.length>0&&(0,t.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:l.map((e,n)=>(0,t.jsxs)("li",{className:"flex gap-2 text-[11.5px] leading-snug text-muted-foreground",children:[(0,t.jsx)("span",{className:"mt-1.25 size-1 shrink-0 rounded-full bg-muted-foreground/50"}),(0,t.jsx)("span",{className:"truncate",children:e})]},`${n}-${e}`))})]})},[v.TOOL_NAMES.bash]:function({tool:e,threadId:n,collapsed:a}){let s=Y(e.results);return(0,t.jsx)(V,{tool:e,threadId:n,collapsed:a,children:(0,t.jsxs)("pre",{className:"mx-3 overflow-x-auto rounded-lg bg-foreground/5 px-2.5 py-1.5 font-mono text-[11px] leading-relaxed scrollbar-none dark:bg-black/25",children:[(0,t.jsx)("span",{className:"text-muted-foreground/60",children:"$ "}),e.input,s.length>0&&(0,t.jsx)("span",{className:"block text-muted-foreground",children:s.join("\n")})]})})},[v.TOOL_NAMES.write_file]:function({tool:e,threadId:n,collapsed:a}){let s=e.path??e.input;return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 px-3 pt-1 pb-1.5",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px]",children:e.input}),(0,t.jsxs)(z.FileLink,{path:s,label:`Open ${s}`,className:"flex shrink-0 items-center gap-1 rounded-md px-1.5 py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:bg-background hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50",children:[(0,t.jsx)(l.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,t.jsx)(X,{lines:Y(e.results),mono:!0})]})}},R={[v.TOOL_NAMES.web_search]:d.Globe,[v.TOOL_NAMES.bash]:x.Terminal,[v.TOOL_NAMES.write_file]:r.FilePen,[v.TOOL_NAMES.memory_recall]:E,[v.TOOL_NAMES.memory_remember]:E,[v.TOOL_NAMES.memory_forget]:E,[v.TOOL_NAMES.memory_conversation]:E,[v.TOOL_NAMES.load_skill]:T,[v.TOOL_NAMES.tool_search]:w,[v.TOOL_NAMES.tool_call]:w,[v.TOOL_NAMES.thread_start]:f.Send,[v.TOOL_NAMES.thread_tell]:f.Send,[v.TOOL_NAMES.thread_answer]:f.Send,[v.TOOL_NAMES.thread_status]:u.ListChecks,[v.TOOL_NAMES.thread_cancel]:u.ListChecks,[v.TOOL_NAMES.thread_show]:u.ListChecks,[v.TOOL_NAMES.thread_seen]:u.ListChecks,[v.TOOL_NAMES.send_message]:p.MessageSquare,[v.TOOL_NAMES.look_at]:i.Eye,[v.TOOL_NAMES.sign_in_use]:c.KeyRound,[v.TOOL_NAMES.sign_in_keep]:c.KeyRound,[v.TOOL_NAMES.end_call]:m.PhoneOff,[v.TOOL_NAMES.routine]:L.RoutineMark},$=e=>R[e]??g.Wrench,K=new Set(["cat","sed","head","tail","grep","rg","ls","find","wc","awk","jq"]),P=e=>e.split("/").pop()??e;function D(e){return Y(e.results).flatMap(e=>{let t=/https?:\/\/\S+/.exec(e)?.[0];if(!t)return[];let n=e.slice(0,e.indexOf(t)).replace(/[\s—-]+$/,"");return[{url:t,...n?{title:n}:{}}]})}function q(e){let t=(0,S.imagePathsIn)(`${e.path??""} ${e.input}`)[0];if(e.name===v.TOOL_NAMES.web_search)return{icon:d.Globe,pages:D(e)};if(e.name===v.TOOL_NAMES.write_file)return{icon:r.FilePen,image:t,target:P(e.path??e.input)};if(e.name!==v.TOOL_NAMES.bash)return{icon:$(e.name),image:t};let a=e.input.replace(/^\s*cd\s+\S+\s*&&\s*/,"").trim(),[s=""]=a.split(/\s+/),l=/(?:^|[\s;&|(])playwright-cli((?:\s+-\S+)*)\s+([a-z-]+)/.exec(a);if(l){if("screenshot"===l[2])return{icon:n.Camera,image:t};let e=/https?:\/\/[^\s'"]+/.exec(a)?.[0];return{icon:d.Globe,host:e&&(0,j.hostOf)(e)||void 0,image:t}}return K.has(s)?{icon:o.FileText,image:t,target:e.path?P(e.path):void 0}:{icon:x.Terminal,image:t,target:s||void 0}}function B({face:e}){if(e.pages?.length){let n=[...new Set(e.pages.flatMap(e=>(0,j.hostOf)(e.url)??[]))].slice(0,3);return(0,t.jsx)("span",{className:"flex shrink-0 items-center gap-1",children:n.map(e=>(0,t.jsx)(j.SiteIcon,{host:e},e))})}return e.host?(0,t.jsxs)("span",{className:"flex h-5 shrink-0 items-center gap-1.5 rounded-full bg-muted pr-2 pl-1 text-[11px] text-foreground/80",children:[(0,t.jsx)(j.SiteIcon,{host:e.host}),e.host]}):e.target&&!e.image?(0,t.jsx)("span",{className:"max-w-40 shrink truncate font-mono text-[10.5px] text-muted-foreground",children:e.target}):null}function H({tool:e,threadId:n,collapsed:a}){return(0,t.jsxs)(V,{tool:e,threadId:n,collapsed:a,children:[(0,t.jsx)("p",{className:"px-3 pt-1 pb-1.5 text-[12px] leading-snug break-keep",children:e.input}),(0,t.jsx)(X,{lines:Y(e.results)})]})}function V({tool:e,threadId:n,collapsed:l=!1,children:i}){let r=void 0===e.results,o=q(e),d=o.icon,[c,u]=(0,y.useState)(!l),p=c||r,m=n&&e.callId&&((e.results?.length??0)>0||e.more);return(0,t.jsxs)("div",{className:(0,I.cn)("@container w-full overflow-hidden rounded-xl transition-colors",p?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>u(e=>!e),"aria-expanded":p,className:"flex w-full items-center gap-2 rounded-xl px-2.5 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"grid size-5 shrink-0 place-items-center rounded-[7px] bg-foreground/8 text-muted-foreground",children:r?(0,t.jsx)(h.Loader2,{className:"size-3 animate-spin"}):(0,t.jsx)(d,{className:"size-3"})}),e.note?(0,t.jsxs)(t.Fragment,{children:[r?(0,t.jsx)(k.ShinyText,{text:e.note,speed:2.4,className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-[12px] leading-4 break-keep",children:e.note}),(0,t.jsx)("span",{className:"hidden min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-muted-foreground/85 @lg:block",children:e.input})]}):r?(0,t.jsx)(k.ShinyText,{text:e.input,speed:2.4,className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] leading-4 text-foreground/80",children:e.input}),(0,t.jsx)(U,{paths:(0,S.imagePathsIn)(`${e.path??""} ${e.input}`)}),(0,t.jsx)(B,{face:o}),!r&&(0,t.jsx)(a.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,t.jsx)(s.ChevronDown,{className:(0,I.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",p&&"rotate-180")})]}),p&&(0,t.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[i,m&&(0,t.jsx)(J,{threadId:n,callId:e.callId})]})]})}function U({paths:e}){let[n,a]=(0,y.useState)([]),s=e.filter(e=>!n.includes(e)).slice(0,W);return s.length?(0,t.jsx)("span",{className:"flex shrink-0 items-center",children:s.map((e,n)=>(0,t.jsx)("img",{src:b.queryKey.file(e),alt:"",loading:"lazy",decoding:"async",onError:()=>a(t=>[...t,e]),className:(0,I.cn)("size-6 rounded-md bg-muted object-cover ring-2 ring-background",n>0&&"-ml-1.5")},e))}):null}let W=3;function J({threadId:e,callId:n}){let[a,l]=(0,y.useState)(!1),{data:i,isLoading:r}=(0,C.useServerRoute)(a?b.queryKey.toolResult(e,n):null);return(0,t.jsxs)("div",{className:"px-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>l(e=>!e),className:"flex items-center gap-1 rounded-md py-0.5 font-mono text-[10px] text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(s.ChevronDown,{className:(0,I.cn)("size-3",a&&"rotate-180")}),a?"Less":"Everything"]}),a&&(r||!i?(0,t.jsx)(M.Skeleton,{className:"mt-1.5 h-12 w-full rounded-lg"}):(0,t.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[Z(i).map((e,n)=>(0,t.jsx)(G,{src:e},`${n}-${e.length}`)),Y(i).length>0&&(0,t.jsx)("pre",{className:"max-h-72 overflow-auto rounded-lg bg-foreground/5 px-2.5 py-2 font-mono text-[11px] leading-relaxed break-all whitespace-pre-wrap dark:bg-black/25",children:Y(i).join("\n")})]}))]})}function G({src:e}){return(0,t.jsx)("img",{src:e,alt:"",className:"block w-full rounded-lg bg-muted object-contain"})}function X({lines:e,mono:n}){return 0===e.length?null:(0,t.jsx)("ul",{className:"px-3 pb-1.5",children:e.map((e,a)=>(0,t.jsx)("li",{className:(0,I.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",n&&"font-mono"),children:e},`${a}-${e}`))})}let Y=e=>e?.flatMap(e=>"text"===e.type?[e.text]:[])??[],Z=e=>e?.flatMap(e=>"image"===e.type?[e.src]:[])??[];e.s(["BotTool",0,function(e){let n=F[e.tool.name]??H;return(0,t.jsx)(n,{...e})},"StepTile",0,function({tool:e,onOpen:n}){let a=q(e),[s,l]=(0,y.useState)(!1),i=a.icon;return(0,t.jsx)("button",{type:"button",onClick:n,title:e.note??e.input,"aria-label":e.note??e.input,className:"grid size-6 shrink-0 place-items-center overflow-hidden rounded-full bg-background text-muted-foreground outline-none transition-transform hover:scale-110 focus-visible:ring-3 focus-visible:ring-ring/50",children:a.image&&!s?(0,t.jsx)("img",{src:b.queryKey.file(a.image),alt:"",loading:"lazy",decoding:"async",onError:()=>l(!0),className:"size-full object-cover"}):a.host?(0,t.jsx)(j.SiteIcon,{host:a.host,className:"size-3.5 rounded-full",fallback:(0,t.jsx)(i,{className:"size-3"})}):(0,t.jsx)(i,{className:"size-3"})})},"toolIcon",0,$],222055)},256604,567334,933916,671228,762074,e=>{"use strict";var t=e.i(843476),n=e.i(271645);let a=[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],s=["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"],l={A:[".##.","#..#","####","#..#","#..#"],B:["###.","#..#","###.","#..#","###."],C:[".###","#...","#...","#...",".###"],D:["###.","#..#","#..#","#..#","###."],E:["####","#...","###.","#...","####"],F:["####","#...","###.","#...","#..."],G:[".###","#...","#.##","#..#",".###"],H:["#..#","#..#","####","#..#","#..#"],I:["###",".#.",".#.",".#.","###"],J:["..##","...#","...#","#..#",".##."],K:["#..#","#.#.","##..","#.#.","#..#"],L:["#...","#...","#...","#...","####"],M:["#...#","##.##","#.#.#","#...#","#...#"],N:["#..#","##.#","#.##","#..#","#..#"],O:[".##.","#..#","#..#","#..#",".##."],P:["###.","#..#","###.","#...","#..."],Q:[".##.","#..#","#..#","#.#.",".#.#"],R:["###.","#..#","###.","#.#.","#..#"],S:[".###","#...",".##.","...#","###."],T:["###",".#.",".#.",".#.",".#."],U:["#..#","#..#","#..#","#..#",".##."],V:["#...#","#...#",".#.#.",".#.#.","..#.."],W:["#...#","#...#","#.#.#","##.##","#...#"],X:["#..#","#..#",".##.","#..#","#..#"],Y:["#.#","#.#",".#.",".#.",".#."],Z:["####","...#",".##.","#...","####"],0:[".##.","#.##","#..#","##.#",".##."],1:[".#.","##.",".#.",".#.","###"],2:["###.","...#",".##.","#...","####"],3:["###.","...#",".##.","...#","###."],4:["#..#","#..#","####","...#","...#"],5:["####","#...","###.","...#","###."],6:[".##.","#...","###.","#..#",".##."],7:["####","...#","..#.",".#..",".#.."],8:[".##.","#..#",".##.","#..#",".##."],9:[".##.","#..#",".###","...#",".##."],"!":["#","#","#",".","#"],"?":["###.","...#",".##.","....",".#.."],".":[".",".",".",".","#"],",":["..","..","..",".#","#."],"'":["#","#",".",".","."],"-":["...","...","###","...","..."],"+":["...",".#.","###",".#.","..."],":":[".","#",".","#","."],"(":[".#","#.","#.","#.",".#"],")":["#.",".#",".#",".#","#."],"<":["..#",".#.","#..",".#.","..#"],">":["#..",".#.","..#",".#.","#.."],"^":[".#.","#.#","...","...","..."],"~":["....",".#.#","#.#.","....","...."],"♥":[".#.#.","#####","#####",".###.","..#.."]," ":["..","..","..","..",".."]};function i(e,t){let n=43758.5453*Math.sin(127.1*e+311.7*t);return n-Math.floor(n)}Object.keys(l).filter(e=>!/^[A-Z0-9 ]$/.test(e)),e.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_MIN_LEVEL",0,6,"EMOJI_POOL",0,s,"EMOJI_RATIO",0,.11,"FACE_WORD_MAX",0,8,"LETTERS",0,l,"RAMP",0,a,"hash",0,i,"smoothstep",0,function(e,t,n){let a=Math.min(1,Math.max(0,(n-e)/(t-e)));return a*a*(3-2*a)},"undrawable",0,function(e){return Array.from(e.toUpperCase()).find(e=>!(e in l))??null}],567334);var r=e.i(504565),o=e.i(41533),d=e.i(265402);let c=["ascii","emoji","emojiOnly"];e.s(["ASCII_CHARSETS",0,c],933916);var u=e.i(413168);let h=[{id:"chatgpt",...d.TEXT_MODEL_PROVIDERS.chatgpt},{id:"openai",...d.TEXT_MODEL_PROVIDERS.openai}],p=r.default.object({charset:r.default.enum(c).default(o.ASCII_FACE.charset),fontSize:r.default.number().min(o.ASCII_FACE.fontSize.min).max(o.ASCII_FACE.fontSize.max).default(o.ASCII_FACE.fontSize.default),density:r.default.number().min(o.ASCII_FACE.density.min).max(o.ASCII_FACE.density.max).default(o.ASCII_FACE.density.default)}),m=p.parse({}),f={min:3,max:32},x=r.default.object({enabled:r.default.boolean(),phrase:r.default.string().trim().min(f.min).max(f.max)}),g=r.default.object({enabled:r.default.boolean(),combo:r.default.string().trim().min(1).max(64)}),y=["off","waiting","any"],b=r.default.enum(y),k=["center","sides"],j=r.default.enum(k);r.default.object({id:r.default.string().min(1),role:r.default.enum(["user","assistant","tool"]),tool:r.default.string().nullish(),text:r.default.string(),seq:r.default.number().int().min(0),fragments:r.default.array(u.LiveFragmentSchema).nullish()}),r.default.object({id:r.default.string().min(1),text:r.default.string(),seq:r.default.number().int().min(0)}),e.s(["CALL_BACK_DEFAULT",0,"waiting","CALL_BACK_LABEL",0,{off:"Never",waiting:"When a job needs me",any:"Whenever a job ends"},"CALL_BACK_MODES",0,y,"CAPTION_VIEWS",0,k,"CallBackSchema",0,b,"CaptionViewSchema",0,j,"FACE_DEFAULT",0,m,"HOTKEY_DEFAULT",0,{enabled:!0,combo:"alt+shift+KeyT"},"HotkeySchema",0,g,"ThursdayFaceSchema",0,p,"WAKE_DEFAULT",0,{enabled:!1,phrase:"hey thursday"},"WAKE_PHRASE",0,f,"WakeSchema",0,x,"textCallRunsOn",0,e=>h.find(t=>e(t.apiKeyName))?.id??null],671228);let M="thursday.icon";function N(){try{let e=window.localStorage.getItem(M);return p.parse(e?JSON.parse(e):{})}catch{return m}}let v=N(),S=new Set;function O(){for(let e of S)e()}function _(){return(0,n.useSyncExternalStore)(e=>{S.add(e);let t=e=>{e.key===M&&(v=N(),O())};return window.addEventListener("storage",t),()=>{S.delete(e),window.removeEventListener("storage",t)}},()=>v,()=>m)}e.s(["setThursdayFace",0,function(e){v=e;try{window.localStorage.setItem(M,JSON.stringify(e))}catch{}O()},"useThursdayFace",0,_],762074);let w=240/276,A=new Map,E=new Set,L=null;e.s(["THURSDAY_SEED",0,"thursday","ThursdayMark",0,function({size:e=16,className:l}){let r="ascii"!==_().charset,{cells:o,font:d}=function(e){let t=A.get(e);if(t)return t;let n=e*w,a=(e-n)/2,s=Math.max(2,Math.round(n/4)),l=n/s,r=.98*l,o=[];for(let e=0;e<s;e++)for(let t=0;t<s;t++){let d=3===s&&1!==e&&1!==t?.72:1,c=n/2+l*(t+.5-s/2)*d,u=n/2+l*(e+.5-s/2)*d,h=Math.hypot(c-n/2,u-n/2)/(n/2),p=977*s+e*s+t;!(h+(s>=5?(i(p,1)-.5)*.24:0)>.98)&&(s>=8&&i(p,2)<.02+.24*h**3||o.push({seed:p,x:a+c,y:a+u+.36*r,r:h}))}let d={cells:o,font:r};return A.set(e,d),d}(e),[c,u]=(0,n.useState)(0);return(0,n.useEffect)(()=>{if(!window.matchMedia("(prefers-reduced-motion: reduce)").matches){if(E.add(u),!L){let e=Date.now();L=setInterval(()=>{let t=Date.now()-e;for(let e of E)e(t)},155)}return()=>{E.delete(u),0===E.size&&L&&(clearInterval(L),L=null)}}},[]),(0,t.jsx)("svg",{viewBox:`0 0 ${e} ${e}`,width:e,height:e,className:l,fill:"currentColor","aria-hidden":!0,children:o.map(e=>(0,t.jsx)("text",{x:e.x,y:e.y,textAnchor:"middle",fontFamily:r?'"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", sans-serif':"ui-monospace, SFMono-Regular, Menlo, monospace",fontWeight:r?void 0:700,fontSize:d,children:function(e,t,n){let l=Math.floor((t+620*i(e.seed,11)*3)/620);if(n){let t=Math.floor(i(e.seed,17)*s.length);return s[(t+9*l)%s.length]}let r=Math.round(5+4*Math.max(0,1-e.r**2)**.6),o=a[Math.min(a.length-1,r)];return o[Math.floor(i(e.seed,l)*o.length)]??" "}(e,c,r)},e.seed))})}],256604)},518515,772382,60744,218964,468590,928310,730274,604139,e=>{"use strict";var t=e.i(456420);let n={name:"camera",size:24,node:[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]};n.node;let a=(0,t.default)(n);e.s(["Camera",0,a],518515);let s={name:"eye",size:24,node:[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]};s.node;let l=(0,t.default)(s);e.s(["Eye",0,l],772382);let i={name:"file-pen",size:24,node:[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],aliases:["file-edit"]};i.node;let r=(0,t.default)(i);e.s(["FilePen",0,r],60744);let o={name:"list-checks",size:24,node:[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]]};o.node;let d=(0,t.default)(o);e.s(["ListChecks",0,d],218964);let c={name:"message-square",size:24,node:[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]]};c.node;let u=(0,t.default)(c);e.s(["MessageSquare",0,u],468590);let h={name:"phone-off",size:24,node:[["path",{d:"M10.1 13.9a14 14 0 0 0 3.732 2.668 1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2 18 18 0 0 1-12.728-5.272",key:"1wngk7"}],["path",{d:"M22 2 2 22",key:"y4kqgn"}],["path",{d:"M4.76 13.582A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 .244.473",key:"10hv5p"}]]};h.node;let p=(0,t.default)(h);e.s(["PhoneOff",0,p],928310);let m={name:"send",size:24,node:[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]};m.node;let f=(0,t.default)(m);e.s(["Send",0,f],730274);let x={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};x.node;let g=(0,t.default)(x);e.s(["Terminal",0,g],604139)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,457343,e=>{"use strict";var t=e.i(843476),n=e.i(867927),s=e.i(632781),a=e.i(648119),i=e.i(929272),r=e.i(759659),o=e.i(263676),l=e.i(271645),d=e.i(798120),c=e.i(167881),u=e.i(630374),x=e.i(463415),h=e.i(917162),m=e.i(660302),p=e.i(671428),f=e.i(41533),g=e.i(941051),j=e.i(95187);let b=(0,j.createServerReference)("7f230b0357a8d6818091fb8981f424afd921f99b72",j.callServer,void 0,j.findSourceMapURL,"clearFinishedThreadsAction"),k=(0,j.createServerReference)("7fe4d932b1d57cd266de86cc2481632eafe6603389",j.callServer,void 0,j.findSourceMapURL,"deleteThreadAction");var N=e.i(451888),v=e.i(635963),w=e.i(835878),y=e.i(222055),S=e.i(351866),T=e.i(978411),D=e.i(431594),M=e.i(895836),C=e.i(245629),z=e.i(609856),A=e.i(661504),R=e.i(283653),I=e.i(647163),O=e.i(399512);let $="w-36";function F({thread:e,bots:a,open:i,onOpen:r,onStop:o,onDelete:d}){let c="running"===e.status,u=(0,l.useMemo)(()=>(0,T.threadFromRow)(e,a),[e,a]),x=function(e){let t=e.room.questions[0];if(t)return{text:(0,I.plainText)(t.text),tone:I.WAITING_INK};if("waiting"===e.status&&e.ask)return{text:(0,N.isAppStop)(e.ask)?(0,I.plainText)(e.outcome??e.ask.question):e.ask.question,tone:I.WAITING_INK};let n=e.seen;if("cancelled"===e.status)return{text:"Stopped",tone:"text-muted-foreground"};if("done"===e.status)return{text:(0,I.plainText)(e.outcome??"Done"),tone:n?"text-muted-foreground":"text-foreground/80"};for(let t=e.lines.length-1;t>=0;t--){let n=e.lines[t];if("tool"===n.kind)return{text:n.note??n.input,tone:"text-muted-foreground",tool:n.name,shine:!0};if("text"===n.kind)return{text:n.text,tone:"text-muted-foreground",shine:!0};if("user"===n.kind)break}return{text:`${e.bot} is taking it on…`,tone:"text-muted-foreground italic",shine:!0}}(e),h=e.tokens.input+e.tokens.output;return(0,t.jsxs)("div",{className:(0,I.cn)("group/row relative transition-colors",i?"bg-muted/80":"hover:bg-muted/50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(v.BotMark,{size:40,seed:e.bot,...B(e.bot,a),state:c?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),e.routineId&&(0,t.jsx)("span",{title:"Started by a routine",className:"shrink-0",children:(0,t.jsx)(D.RoutineMark,{className:"size-3 text-muted-foreground/80"})}),(0,t.jsx)(w.BotRoster,{bots:(0,T.rosterOf)(u)}),c&&(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),x&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] leading-snug",children:[x.tool&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:x.tool}),x.shine?(0,t.jsx)(m.ShinyText,{text:x.text,speed:2.2,className:"min-w-0 truncate"}):(0,t.jsx)("span",{className:(0,I.cn)("min-w-0 truncate",x.tone),children:x.text})]})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",$),children:[(0,t.jsx)("span",{children:(0,C.whenOf)(e.updatedAt)}),(0,t.jsxs)("span",{className:"max-w-full truncate text-muted-foreground/70",title:h>0?`${e.id} \xb7 in ${(0,I.formatCount)(e.tokens.input)} \xb7 out ${(0,I.formatCount)(e.tokens.output)}`:e.id,children:[e.bot,h>0&&` \xb7 ${(0,I.formatCount)(h)}`]})]}),(0,t.jsx)(n.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]}),(0,t.jsx)(K,{thread:e,onStop:o,onDelete:d})]}),c&&(0,t.jsx)(P,{thread:e})]})}function K({thread:e,onStop:n,onDelete:s,className:o}){let l="running"===e.status||"waiting"===e.status;return(0,t.jsxs)(x.DropdownMenu,{children:[(0,t.jsx)(x.DropdownMenuTrigger,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost",className:o}),children:(0,t.jsx)(a.MoreHorizontal,{})}),(0,t.jsxs)(x.DropdownMenuContent,{align:"end",children:[l&&(0,t.jsxs)(x.DropdownMenuItem,{onClick:n,children:[(0,t.jsx)(i.Square,{}),"Stop"]}),(0,t.jsxs)(x.DropdownMenuItem,{variant:"destructive",onClick:s,children:[(0,t.jsx)(r.Trash2,{}),"Delete"]})]})]})}function q({thread:e,bots:n,onClose:s,onStop:a,onDelete:i}){let[r,d]=(0,l.useState)(null),x=(0,l.useCallback)(e=>{d(e?.closest("[data-slot=dialog-content]")??null)},[]),[h,m]=(0,l.useState)({}),p=(0,l.useMemo)(()=>e?(0,T.threadFromRow)(e,n):null,[e,n]),f=e?h[e.id]??null:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{ref:x,hidden:!0}),(0,t.jsx)(u.Dialog,{open:!!(e&&r),onOpenChange:e=>!e&&s(),modal:!1,disablePointerDismissal:!0,children:(0,t.jsx)(u.DialogPortal,{container:r,children:(0,t.jsx)(u.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:e&&p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[(0,t.jsx)(v.BotMark,{size:28,seed:e.bot,...B(e.bot,n),state:"running"===e.status?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(u.DialogTitle,{className:"sr-only",children:e.label}),(0,t.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:e.label}),(0,t.jsxs)("div",{className:"mt-0.5 flex min-w-0 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsxs)("span",{title:e.id,className:"min-w-0 truncate",children:[e.bot," · ",(0,C.whenOf)(e.updatedAt)]}),(0,t.jsx)(S.ThreadFacts,{thread:p})]})]}),(0,t.jsx)(K,{thread:e,onStop:()=>a(e),onDelete:()=>i(e),className:"text-muted-foreground"}),(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the thread"}),children:(0,t.jsx)(o.X,{})})]}),(0,t.jsx)(S.Conversation,{thread:p,tab:f,onTab:t=>m(n=>({...n,[e.id]:t})),className:"max-h-none min-h-0 flex-1 px-5",tabsClassName:"px-5"}),(0,t.jsx)("div",{className:"shrink-0 px-5 pt-2 pb-4",children:(0,t.jsx)(O.ThreadReply,{thread:{id:e.id,label:e.label,bot:e.bot,ask:e.ask,room:e.room},status:e.status,faces:(0,T.rosterOf)(p),to:f??e.bot})})]})})})})]})}function B(e,t){let n=t?.find(t=>t.name===e)?.icon;return{color:n?.color,shape:n?.shape,outline:n?.outline,paint:n?.paint}}function P({thread:e}){let n=[];if(e.lines.forEach((t,s)=>{if("tool"!==t.kind)return;let a=e.lines[s+1];n.push({step:t,took:a?(0,C.toDate)(a.at).getTime()-(0,C.toDate)(t.at).getTime():null})}),0===n.length)return null;let a=(0,C.toDate)(e.updatedAt).getTime()-(0,C.toDate)(e.createdAt).getTime();return(0,t.jsxs)("div",{className:"pointer-events-none absolute top-[calc(100%-0.75rem)] left-17 z-20 hidden w-96 max-w-[calc(100%-5rem)] rounded-xl bg-background p-3 pb-2 shadow-xl shadow-black/10 ring-1 ring-border/60 group-hover/row:block",children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)("span",{children:e.bot}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsxs)("span",{children:[n.length," ",1===n.length?"step":"steps"]}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsx)("span",{children:L(a)})]}),n.slice(-6).map(({step:e,took:n})=>{let a=(0,y.toolIcon)(e.name);return(0,t.jsxs)("div",{className:"flex h-5.5 items-center gap-2 font-mono text-[11px]",children:[null===n?(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}):(0,t.jsx)(a,{className:"size-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",children:e.name}),null===n?(0,t.jsx)(m.ShinyText,{text:e.note??e.input,speed:2.2,className:"min-w-0 flex-1 truncate"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:e.note??e.input}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right text-muted-foreground/70 tabular-nums",children:null===n?"":L(n)})]},e.id)})]})}function L(e){let t=Math.max(0,e)/1e3;if(t<10)return`${t.toFixed(1)}s`;if(t<60)return`${Math.round(t)}s`;let n=Math.floor(t/60);return`${n}m ${Math.round(t-60*n)}s`}function E(){return(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)(p.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)(p.Skeleton,{className:"h-3 w-40 max-w-full"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-80 max-w-full"})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-1.5",$),children:[(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-12"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-24"})]}),(0,t.jsx)("span",{className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"size-7 shrink-0"})]})}e.s(["ThreadSetting",0,function(){let[e,n]=(0,l.useState)(null),[s,a]=(0,l.useState)(""),{data:i}=(0,R.useServerRoute)(d.queryKey.bot),{items:r,isLoading:o,isLoadingMore:u,error:x,hasMore:m,sentinelRef:p}=(0,A.useServerPages)({key:(e,t)=>{if(0===e)return d.queryKey.threadHistory(null);let n=t?.at(-1);return n?d.queryKey.threadHistory((0,C.toDate)(n.updatedAt).toISOString()):null},size:f.PAGE_SIZE}),j=r.find(t=>t.id===e);(0,T.useSeenOnDetail)(j);let[N]=(0,z.useServerAction)(g.cancelThreadAction,{onOk:e=>{(0,R.revalidate)(d.queryKey.threads),T.screenActs.announce({kind:"stopped",id:e.id,label:e.label})}}),[v]=(0,z.useServerAction)(k,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),[w]=(0,z.useServerAction)(b,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),y=s.trim().toLowerCase(),S=y?r.filter(e=>[e.label,e.outcome,e.bot].join(" ").toLowerCase().includes(y)):r,D=async()=>{await h.notify.confirm({title:"Clear finished jobs?",description:"Everything done or stopped goes, messages included. Running and waiting jobs stay.",okText:"Clear",destructive:!0})&&w()},I=async t=>{if(!await h.notify.confirm({title:`Delete "${t.label}"?`,description:"Its messages go with it — nothing can be picked back up.",okText:"Delete",destructive:!0}))return;let s=S.findIndex(e=>e.id===t.id),a=S[s+1]??S[s-1];try{await v(t.id)}catch{return}t.id===e&&n(a?.id??null)};if(o)return(0,t.jsx)(M.SettingSkeleton,{rows:3});if(x)return(0,t.jsx)(M.SettingError,{message:x.message});let O=r.filter(e=>"waiting"===e.status).length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.SettingScreen,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(M.SettingRailNote,{children:[r.length," loaded",O>0&&` \xb7 ${O} waiting on you`]}),(0,t.jsx)(c.Button,{variant:"outline",size:"sm",onClick:D,children:"Clear finished"})]}),children:(0,t.jsx)(M.SettingGroup,{filter:(0,t.jsx)(M.SettingFilter,{value:s,onChange:a,placeholder:"Filter by label, bot or word"}),right:y?`${S.length} of ${r.length}`:void 0,children:(0,t.jsxs)(M.SettingItems,{children:[0===S.length?(0,t.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:y?"Nothing loaded matches. Keep scrolling to search further back.":"Nothing yet. When Thursday hands a job to a bot mid-call, it shows up here — while it runs, and after."}):S.map(e=>(0,t.jsx)(F,{thread:e,bots:i,open:e.id===j?.id,onOpen:()=>n(e.id),onStop:()=>N(e.id),onDelete:()=>I(e)},e.id)),(0,t.jsx)(M.SettingMore,{hasMore:m,loading:u,sentinelRef:p,ghost:(0,t.jsx)(E,{}),className:"divide-y divide-border/60"})]})})}),(0,t.jsx)(q,{thread:j,bots:i,onClose:()=>n(null),onStop:e=>N(e.id),onDelete:I})]})}],457343)},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let s=(0,t.default)(n);e.s(["Trash2",0,s],759659)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,457343,e=>{"use strict";var t=e.i(843476),n=e.i(867927),s=e.i(632781),a=e.i(648119),i=e.i(929272),r=e.i(759659),o=e.i(263676),l=e.i(271645),d=e.i(798120),c=e.i(167881),u=e.i(630374),x=e.i(463415),h=e.i(917162),m=e.i(660302),p=e.i(671428),f=e.i(41533),g=e.i(462945),j=e.i(95187);let b=(0,j.createServerReference)("7ff6815900e05d36ea29961dbdd1220d2f2c747e21",j.callServer,void 0,j.findSourceMapURL,"clearFinishedThreadsAction"),k=(0,j.createServerReference)("7f500e0b8018b42ed8661706a7d29c8ff2468b79f2",j.callServer,void 0,j.findSourceMapURL,"deleteThreadAction");var N=e.i(451888),v=e.i(635963),w=e.i(835878),y=e.i(222055),S=e.i(351866),T=e.i(978411),D=e.i(431594),M=e.i(895836),C=e.i(245629),z=e.i(609856),A=e.i(661504),R=e.i(283653),I=e.i(647163),O=e.i(399512);let $="w-36";function F({thread:e,bots:a,open:i,onOpen:r,onStop:o,onDelete:d}){let c="running"===e.status,u=(0,l.useMemo)(()=>(0,T.threadFromRow)(e,a),[e,a]),x=function(e){let t=e.room.questions[0];if(t)return{text:(0,I.plainText)(t.text),tone:I.WAITING_INK};if("waiting"===e.status&&e.ask)return{text:(0,N.isAppStop)(e.ask)?(0,I.plainText)(e.outcome??e.ask.question):e.ask.question,tone:I.WAITING_INK};let n=e.seen;if("cancelled"===e.status)return{text:"Stopped",tone:"text-muted-foreground"};if("done"===e.status)return{text:(0,I.plainText)(e.outcome??"Done"),tone:n?"text-muted-foreground":"text-foreground/80"};for(let t=e.lines.length-1;t>=0;t--){let n=e.lines[t];if("tool"===n.kind)return{text:n.note??n.input,tone:"text-muted-foreground",tool:n.name,shine:!0};if("text"===n.kind)return{text:n.text,tone:"text-muted-foreground",shine:!0};if("user"===n.kind)break}return{text:`${e.bot} is taking it on…`,tone:"text-muted-foreground italic",shine:!0}}(e),h=e.tokens.input+e.tokens.output;return(0,t.jsxs)("div",{className:(0,I.cn)("group/row relative transition-colors",i?"bg-muted/80":"hover:bg-muted/50"),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsxs)("button",{type:"button",onClick:r,className:"flex min-w-0 flex-1 items-center gap-3 rounded-md text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(v.BotMark,{size:40,seed:e.bot,...B(e.bot,a),state:c?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.label}),e.routineId&&(0,t.jsx)("span",{title:"Started by a routine",className:"shrink-0",children:(0,t.jsx)(D.RoutineMark,{className:"size-3 text-muted-foreground/80"})}),(0,t.jsx)(w.BotRoster,{bots:(0,T.rosterOf)(u)}),c&&(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"})]}),x&&(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] leading-snug",children:[x.tool&&(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:x.tool}),x.shine?(0,t.jsx)(m.ShinyText,{text:x.text,speed:2.2,className:"min-w-0 truncate"}):(0,t.jsx)("span",{className:(0,I.cn)("min-w-0 truncate",x.tone),children:x.text})]})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-0.5 font-mono text-[11px] leading-4 text-muted-foreground tabular-nums",$),children:[(0,t.jsx)("span",{children:(0,C.whenOf)(e.updatedAt)}),(0,t.jsxs)("span",{className:"max-w-full truncate text-muted-foreground/70",title:h>0?`${e.id} \xb7 in ${(0,I.formatCount)(e.tokens.input)} \xb7 out ${(0,I.formatCount)(e.tokens.output)}`:e.id,children:[e.bot,h>0&&` \xb7 ${(0,I.formatCount)(h)}`]})]}),(0,t.jsx)(n.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]}),(0,t.jsx)(K,{thread:e,onStop:o,onDelete:d})]}),c&&(0,t.jsx)(P,{thread:e})]})}function K({thread:e,onStop:n,onDelete:s,className:o}){let l="running"===e.status||"waiting"===e.status;return(0,t.jsxs)(x.DropdownMenu,{children:[(0,t.jsx)(x.DropdownMenuTrigger,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost",className:o}),children:(0,t.jsx)(a.MoreHorizontal,{})}),(0,t.jsxs)(x.DropdownMenuContent,{align:"end",children:[l&&(0,t.jsxs)(x.DropdownMenuItem,{onClick:n,children:[(0,t.jsx)(i.Square,{}),"Stop"]}),(0,t.jsxs)(x.DropdownMenuItem,{variant:"destructive",onClick:s,children:[(0,t.jsx)(r.Trash2,{}),"Delete"]})]})]})}function q({thread:e,bots:n,onClose:s,onStop:a,onDelete:i}){let[r,d]=(0,l.useState)(null),x=(0,l.useCallback)(e=>{d(e?.closest("[data-slot=dialog-content]")??null)},[]),[h,m]=(0,l.useState)({}),p=(0,l.useMemo)(()=>e?(0,T.threadFromRow)(e,n):null,[e,n]),f=e?h[e.id]??null:null;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{ref:x,hidden:!0}),(0,t.jsx)(u.Dialog,{open:!!(e&&r),onOpenChange:e=>!e&&s(),modal:!1,disablePointerDismissal:!0,children:(0,t.jsx)(u.DialogPortal,{container:r,children:(0,t.jsx)(u.DialogPopup,{className:"absolute inset-y-0 right-0 z-10 flex w-[min(35rem,calc(100%-13rem))] flex-col border-l border-border/60 bg-popover text-popover-foreground shadow-2xl shadow-black/10 duration-150 data-open:animate-in data-open:fade-in-0 data-open:slide-in-from-right-4 data-closed:animate-out data-closed:fade-out-0 data-closed:slide-out-to-right-4",children:e&&p&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-2.5 pt-3.5 pr-3 pb-1.5 pl-5",children:[(0,t.jsx)(v.BotMark,{size:28,seed:e.bot,...B(e.bot,n),state:"running"===e.status?"thinking":"idle",notify:(0,N.needsThreadReply)(e),crossed:"cancelled"===e.status,className:"shrink-0"}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(u.DialogTitle,{className:"sr-only",children:e.label}),(0,t.jsx)("p",{className:"truncate text-[15px] leading-5 font-semibold",children:e.label}),(0,t.jsxs)("div",{className:"mt-0.5 flex min-w-0 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsxs)("span",{title:e.id,className:"min-w-0 truncate",children:[e.bot," · ",(0,C.whenOf)(e.updatedAt)]}),(0,t.jsx)(S.ThreadFacts,{thread:p})]})]}),(0,t.jsx)(K,{thread:e,onStop:()=>a(e),onDelete:()=>i(e),className:"text-muted-foreground"}),(0,t.jsx)(u.DialogClose,{render:(0,t.jsx)(c.Button,{size:"icon-sm",variant:"ghost","aria-label":"Close the thread"}),children:(0,t.jsx)(o.X,{})})]}),(0,t.jsx)(S.Conversation,{thread:p,tab:f,onTab:t=>m(n=>({...n,[e.id]:t})),className:"max-h-none min-h-0 flex-1 px-5",tabsClassName:"px-5"}),(0,t.jsx)("div",{className:"shrink-0 px-5 pt-2 pb-4",children:(0,t.jsx)(O.ThreadReply,{thread:{id:e.id,label:e.label,bot:e.bot,ask:e.ask,room:e.room},status:e.status,faces:(0,T.rosterOf)(p),to:f??e.bot})})]})})})})]})}function B(e,t){let n=t?.find(t=>t.name===e)?.icon;return{color:n?.color,shape:n?.shape,outline:n?.outline,paint:n?.paint}}function P({thread:e}){let n=[];if(e.lines.forEach((t,s)=>{if("tool"!==t.kind)return;let a=e.lines[s+1];n.push({step:t,took:a?(0,C.toDate)(a.at).getTime()-(0,C.toDate)(t.at).getTime():null})}),0===n.length)return null;let a=(0,C.toDate)(e.updatedAt).getTime()-(0,C.toDate)(e.createdAt).getTime();return(0,t.jsxs)("div",{className:"pointer-events-none absolute top-[calc(100%-0.75rem)] left-17 z-20 hidden w-96 max-w-[calc(100%-5rem)] rounded-xl bg-background p-3 pb-2 shadow-xl shadow-black/10 ring-1 ring-border/60 group-hover/row:block",children:[(0,t.jsxs)("div",{className:"mb-1.5 flex items-center gap-2 font-mono text-[10px] text-muted-foreground",children:[(0,t.jsx)("span",{children:e.bot}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsxs)("span",{children:[n.length," ",1===n.length?"step":"steps"]}),(0,t.jsx)("span",{className:"opacity-50",children:"·"}),(0,t.jsx)("span",{children:L(a)})]}),n.slice(-6).map(({step:e,took:n})=>{let a=(0,y.toolIcon)(e.name);return(0,t.jsxs)("div",{className:"flex h-5.5 items-center gap-2 font-mono text-[11px]",children:[null===n?(0,t.jsx)(s.Loader2,{className:"size-3 shrink-0 animate-spin text-muted-foreground"}):(0,t.jsx)(a,{className:"size-3 shrink-0 text-muted-foreground"}),(0,t.jsx)("span",{className:"w-24 shrink-0 truncate text-muted-foreground",children:e.name}),null===n?(0,t.jsx)(m.ShinyText,{text:e.note??e.input,speed:2.2,className:"min-w-0 flex-1 truncate"}):(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-foreground",children:e.note??e.input}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right text-muted-foreground/70 tabular-nums",children:null===n?"":L(n)})]},e.id)})]})}function L(e){let t=Math.max(0,e)/1e3;if(t<10)return`${t.toFixed(1)}s`;if(t<60)return`${Math.round(t)}s`;let n=Math.floor(t/60);return`${n}m ${Math.round(t-60*n)}s`}function E(){return(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)(p.Skeleton,{className:"size-10 shrink-0 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-2",children:[(0,t.jsx)(p.Skeleton,{className:"h-3 w-40 max-w-full"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-80 max-w-full"})]}),(0,t.jsxs)("span",{className:(0,I.cn)("flex shrink-0 flex-col items-end gap-1.5",$),children:[(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-12"}),(0,t.jsx)(p.Skeleton,{className:"h-2.5 w-24"})]}),(0,t.jsx)("span",{className:"size-4 shrink-0"}),(0,t.jsx)("span",{className:"size-7 shrink-0"})]})}e.s(["ThreadSetting",0,function(){let[e,n]=(0,l.useState)(null),[s,a]=(0,l.useState)(""),{data:i}=(0,R.useServerRoute)(d.queryKey.bot),{items:r,isLoading:o,isLoadingMore:u,error:x,hasMore:m,sentinelRef:p}=(0,A.useServerPages)({key:(e,t)=>{if(0===e)return d.queryKey.threadHistory(null);let n=t?.at(-1);return n?d.queryKey.threadHistory((0,C.toDate)(n.updatedAt).toISOString()):null},size:f.PAGE_SIZE}),j=r.find(t=>t.id===e);(0,T.useSeenOnDetail)(j);let[N]=(0,z.useServerAction)(g.cancelThreadAction,{onOk:e=>{(0,R.revalidate)(d.queryKey.threads),T.screenActs.announce({kind:"stopped",id:e.id,label:e.label})}}),[v]=(0,z.useServerAction)(k,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),[w]=(0,z.useServerAction)(b,{onOk:()=>(0,R.revalidate)(d.queryKey.threads)}),y=s.trim().toLowerCase(),S=y?r.filter(e=>[e.label,e.outcome,e.bot].join(" ").toLowerCase().includes(y)):r,D=async()=>{await h.notify.confirm({title:"Clear finished jobs?",description:"Everything done or stopped goes, messages included. Running and waiting jobs stay.",okText:"Clear",destructive:!0})&&w()},I=async t=>{if(!await h.notify.confirm({title:`Delete "${t.label}"?`,description:"Its messages go with it — nothing can be picked back up.",okText:"Delete",destructive:!0}))return;let s=S.findIndex(e=>e.id===t.id),a=S[s+1]??S[s-1];try{await v(t.id)}catch{return}t.id===e&&n(a?.id??null)};if(o)return(0,t.jsx)(M.SettingSkeleton,{rows:3});if(x)return(0,t.jsx)(M.SettingError,{message:x.message});let O=r.filter(e=>"waiting"===e.status).length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(M.SettingScreen,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(M.SettingRailNote,{children:[r.length," loaded",O>0&&` \xb7 ${O} waiting on you`]}),(0,t.jsx)(c.Button,{variant:"outline",size:"sm",onClick:D,children:"Clear finished"})]}),children:(0,t.jsx)(M.SettingGroup,{filter:(0,t.jsx)(M.SettingFilter,{value:s,onChange:a,placeholder:"Filter by label, bot or word"}),right:y?`${S.length} of ${r.length}`:void 0,children:(0,t.jsxs)(M.SettingItems,{children:[0===S.length?(0,t.jsx)("p",{className:"p-4 text-sm leading-relaxed text-muted-foreground",children:y?"Nothing loaded matches. Keep scrolling to search further back.":"Nothing yet. When Thursday hands a job to a bot mid-call, it shows up here — while it runs, and after."}):S.map(e=>(0,t.jsx)(F,{thread:e,bots:i,open:e.id===j?.id,onOpen:()=>n(e.id),onStop:()=>N(e.id),onDelete:()=>I(e)},e.id)),(0,t.jsx)(M.SettingMore,{hasMore:m,loading:u,sentinelRef:p,ghost:(0,t.jsx)(E,{}),className:"divide-y divide-border/60"})]})})}),(0,t.jsx)(q,{thread:j,bots:i,onClose:()=>n(null),onStop:e=>N(e.id),onDelete:I})]})}],457343)},648119,e=>{"use strict";var t=e.i(560972);e.s(["MoreHorizontal",()=>t.default])},759659,e=>{"use strict";var t=e.i(456420);let n={name:"trash",size:24,node:[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],aliases:["trash-2"]};n.node;let s=(0,t.default)(n);e.s(["Trash2",0,s],759659)}]);
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
stroke: revert;
|
|
13
13
|
stroke-width: revert;
|
|
14
14
|
}
|
|
15
|
-
`,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),a=t.i(419524),r=t.i(
|
|
15
|
+
`,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),a=t.i(419524),r=t.i(779879);t.i(947716);var i=t.i(723685),s=(0,a.__name)((t,e)=>{let a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a},"drawRect"),l=(0,a.__name)((t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),n=(0,a.__name)((t,a)=>{let r=a.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",a.x),i.attr("y",a.y),i.attr("class","legend"),i.style("text-anchor",a.anchor),a.class&&i.attr("class",a.class);let s=i.append("tspan");return s.attr("x",a.x+2*a.textMargin),s.text(r),i},"drawText"),o=(0,a.__name)((t,e,a,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,a.__name)((t,e,a,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,a.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),a=t.i(508324),r=t.i(419524),i=(0,r.__name)((t,r,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,r);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,r);t.attr("viewBox",g),a.log.debug(`viewBox configured: ${g} with padding: ${r}`)},"setupViewPortForSVG"),s=(0,r.__name)((t,e)=>{let a=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*e,height:a.height+2*e,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),l=(0,r.__name)((t,e,a,r,i)=>`${t-i} ${e-i} ${a} ${r}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var a=t.i(723685),r=(0,e.__name)((t,e)=>{let r;return"sandbox"===e&&(r=(0,a.select)("#i"+t)),("sandbox"===e?(0,a.select)(r.nodes()[0].contentDocument.body):(0,a.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,r])},557786,t=>{"use strict";var e=t.i(708664);t.i(248585),t.i(117204),t.i(865264),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324);var a=(0,t.i(419524).__name)(t=>`${(0,e.styles_default)(t)}
|
|
16
16
|
.swimlane.cluster rect {
|
|
17
17
|
stroke: ${t.clusterBorder} !important;
|
|
18
18
|
}
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
stroke: revert;
|
|
13
13
|
stroke-width: revert;
|
|
14
14
|
}
|
|
15
|
-
`,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),r=t.i(419524),a=t.i(
|
|
15
|
+
`,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),r=t.i(419524),a=t.i(779879);t.i(947716);var i=t.i(723685),s=(0,r.__name)((t,e)=>{let r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)r.attr(t,e.attrs[t]);return e.class&&r.attr("class",e.class),r},"drawRect"),l=(0,r.__name)((t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),n=(0,r.__name)((t,r)=>{let a=r.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",r.x),i.attr("y",r.y),i.attr("class","legend"),i.style("text-anchor",r.anchor),r.class&&i.attr("class",r.class);let s=i.append("tspan");return s.attr("x",r.x+2*r.textMargin),s.text(a),i},"drawText"),o=(0,r.__name)((t,e,r,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",r);let l=(0,a.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,r.__name)((t,e,r,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",r);let l=(0,a.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,r.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,r.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,r.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),r=t.i(508324),a=t.i(419524),i=(0,a.__name)((t,a,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,a);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,a);t.attr("viewBox",g),r.log.debug(`viewBox configured: ${g} with padding: ${a}`)},"setupViewPortForSVG"),s=(0,a.__name)((t,e)=>{let r=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:r.width+2*e,height:r.height+2*e,x:r.x,y:r.y}},"calculateDimensionsWithPadding"),l=(0,a.__name)((t,e,r,a,i)=>`${t-i} ${e-i} ${r} ${a}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var r=t.i(723685),a=(0,e.__name)((t,e)=>{let a;return"sandbox"===e&&(a=(0,r.select)("#i"+t)),("sandbox"===e?(0,r.select)(a.nodes()[0].contentDocument.body):(0,r.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,a])},59618,t=>{"use strict";var e=t.i(499272);t.i(248585),t.i(117204),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324);var r=t.i(419524),a={parser:e.classDiagram_default,get db(){return new e.ClassDB},renderer:e.classRenderer_v3_unified_default,styles:e.styles_default,init:(0,r.__name)(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")};t.s(["diagram",0,a])}]);
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
stroke: revert;
|
|
13
13
|
stroke-width: revert;
|
|
14
14
|
}
|
|
15
|
-
`,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),a=t.i(419524),r=t.i(
|
|
15
|
+
`,"getIconStyles");t.s(["getIconStyles",0,e])},58137,t=>{"use strict";var e=t.i(60231),a=t.i(419524),r=t.i(779879);t.i(947716);var i=t.i(723685),s=(0,a.__name)((t,e)=>{let a=t.append("rect");if(a.attr("x",e.x),a.attr("y",e.y),a.attr("fill",e.fill),a.attr("stroke",e.stroke),a.attr("width",e.width),a.attr("height",e.height),e.name&&a.attr("name",e.name),e.rx&&a.attr("rx",e.rx),e.ry&&a.attr("ry",e.ry),void 0!==e.attrs)for(let t in e.attrs)a.attr(t,e.attrs[t]);return e.class&&a.attr("class",e.class),a},"drawRect"),l=(0,a.__name)((t,e)=>{s(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"}).lower()},"drawBackgroundRect"),n=(0,a.__name)((t,a)=>{let r=a.text.replace(e.lineBreakRegex," "),i=t.append("text");i.attr("x",a.x),i.attr("y",a.y),i.attr("class","legend"),i.style("text-anchor",a.anchor),a.class&&i.attr("class",a.class);let s=i.append("tspan");return s.attr("x",a.x+2*a.textMargin),s.text(r),i},"drawText"),o=(0,a.__name)((t,e,a,i)=>{let s=t.append("image");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",l)},"drawImage"),d=(0,a.__name)((t,e,a,i)=>{let s=t.append("use");s.attr("x",e),s.attr("y",a);let l=(0,r.sanitizeUrl)(i);s.attr("xlink:href",`#${l}`)},"drawEmbeddedImage"),c=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),x=(0,a.__name)(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj"),g=(0,a.__name)(()=>{let t=(0,i.select)(".mermaidTooltip");return t.empty()&&(t=(0,i.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0).style("position","absolute").style("text-align","center").style("max-width","200px").style("padding","2px").style("font-size","12px").style("background","#ffffde").style("border","1px solid #333").style("border-radius","2px").style("pointer-events","none").style("z-index","100")),t},"createTooltip");t.s(["createTooltip",0,g,"drawBackgroundRect",0,l,"drawEmbeddedImage",0,d,"drawImage",0,o,"drawRect",0,s,"drawText",0,n,"getNoteRect",0,c,"getTextObj",0,x])},117204,t=>{"use strict";var e=t.i(60231),a=t.i(508324),r=t.i(419524),i=(0,r.__name)((t,r,i,n)=>{t.attr("class",i);let{width:o,height:d,x:c,y:x}=s(t,r);(0,e.configureSvgSize)(t,d,o,n);let g=l(c,x,o,d,r);t.attr("viewBox",g),a.log.debug(`viewBox configured: ${g} with padding: ${r}`)},"setupViewPortForSVG"),s=(0,r.__name)((t,e)=>{let a=t.node()?.getBBox()||{width:0,height:0,x:0,y:0};return{width:a.width+2*e,height:a.height+2*e,x:a.x,y:a.y}},"calculateDimensionsWithPadding"),l=(0,r.__name)((t,e,a,r,i)=>`${t-i} ${e-i} ${a} ${r}`,"createViewBox");t.s(["setupViewPortForSVG",0,i])},248585,t=>{"use strict";var e=t.i(419524);t.i(947716);var a=t.i(723685),r=(0,e.__name)((t,e)=>{let r;return"sandbox"===e&&(r=(0,a.select)("#i"+t)),("sandbox"===e?(0,a.select)(r.nodes()[0].contentDocument.body):(0,a.select)("body")).select(`[id="${t}"]`)},"getDiagramElement");t.s(["getDiagramElement",0,r])},595502,t=>{"use strict";var e=t.i(708664);t.i(248585),t.i(117204),t.i(865264),t.i(121292),t.i(58137),t.i(369110),t.i(382793),t.i(502056),t.i(217248),t.i(224797),t.i(836333),t.i(29836),t.i(447804),t.i(60231),t.i(508324),t.s([],631220),t.i(631220),t.s(["diagram",()=>e.diagram],595502)}]);
|
package/README.md
CHANGED
|
@@ -14,6 +14,10 @@ You talk. Bots take the slow work to a real browser, a shell and your files, and
|
|
|
14
14
|
|
|
15
15
|
[English](README.md) · [한국어](README.ko.md)
|
|
16
16
|
|
|
17
|
+

|
|
18
|
+
|
|
19
|
+
[▶ Watch the 90-second demo, with sound](https://youtu.be/V7fBDY3cYRU)
|
|
20
|
+
|
|
17
21
|
</div>
|
|
18
22
|
|
|
19
23
|
## Quick start
|
|
@@ -2,12 +2,9 @@ import { asSchema } from "ai";
|
|
|
2
2
|
import z from "zod";
|
|
3
3
|
import { loadTools } from "@/features/ai/load-tools";
|
|
4
4
|
import { modelErrorToString } from "@/features/ai/model";
|
|
5
|
-
import { createServerProbe } from "@/lib/probe.server";
|
|
6
5
|
import { serverRoute } from "@/lib/protocol/server-route";
|
|
7
6
|
import { publicError } from "@/lib/public-error";
|
|
8
7
|
|
|
9
|
-
const probe = createServerProbe("server");
|
|
10
|
-
|
|
11
8
|
/**
|
|
12
9
|
* Executes a tool call from the voice session. The page forwards what the model
|
|
13
10
|
* asked for; bots never come through here (they call `execute` directly).
|
|
@@ -58,7 +55,6 @@ export const POST = serverRoute(async (request) => {
|
|
|
58
55
|
);
|
|
59
56
|
}
|
|
60
57
|
|
|
61
|
-
const began = Date.now();
|
|
62
58
|
try {
|
|
63
59
|
const output = await tool.execute(parsed?.value ?? input ?? {}, {
|
|
64
60
|
toolCallId,
|
|
@@ -66,18 +62,8 @@ export const POST = serverRoute(async (request) => {
|
|
|
66
62
|
context: undefined,
|
|
67
63
|
abortSignal: request.signal,
|
|
68
64
|
});
|
|
69
|
-
|
|
70
|
-
probe("tool", {
|
|
71
|
-
callId,
|
|
72
|
-
name,
|
|
73
|
-
input,
|
|
74
|
-
ms: Date.now() - began,
|
|
75
|
-
// The rows keep a tool's arguments only; what it answered is kept here
|
|
76
|
-
output: JSON.stringify(drained)?.slice(0, 3000),
|
|
77
|
-
});
|
|
78
|
-
return { output: drained };
|
|
65
|
+
return { output: await drain(output) };
|
|
79
66
|
} catch (cause) {
|
|
80
|
-
probe("tool.failed", { callId, name, input, error: String(cause) });
|
|
81
67
|
// A tool failure is a line the model reads and recovers from, not a masked server error.
|
|
82
68
|
publicError(`"${name}" failed: ${modelErrorToString(cause)}`);
|
|
83
69
|
}
|
|
@@ -19,7 +19,7 @@ function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
|
19
19
|
<RadioPrimitive.Root
|
|
20
20
|
data-slot="radio-group-item"
|
|
21
21
|
className={cn(
|
|
22
|
-
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-
|
|
22
|
+
"group/radio-group-item peer relative flex aspect-square size-4 shrink-0 rounded-full border border-input outline-none group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-brand data-checked:bg-brand data-checked:text-brand-foreground group-has-[:focus-visible]/field-label:data-checked:border-brand dark:data-checked:bg-brand",
|
|
23
23
|
className,
|
|
24
24
|
)}
|
|
25
25
|
{...props}
|
|
@@ -28,7 +28,7 @@ function RadioGroupItem({ className, ...props }: RadioPrimitive.Root.Props) {
|
|
|
28
28
|
data-slot="radio-group-indicator"
|
|
29
29
|
className="flex size-4 items-center justify-center"
|
|
30
30
|
>
|
|
31
|
-
<span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-
|
|
31
|
+
<span className="absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2 rounded-full bg-brand-foreground" />
|
|
32
32
|
</RadioPrimitive.Indicator>
|
|
33
33
|
</RadioPrimitive.Root>
|
|
34
34
|
);
|
|
Binary file
|
package/docs/live-calls.md
CHANGED
|
@@ -23,17 +23,20 @@ delegation is a different integration: its notification contains metadata, not t
|
|
|
23
23
|
text, so the application would have to reconstruct the request and operate the backend.
|
|
24
24
|
|
|
25
25
|
The voice and the backend are one assistant. Both prompts open with the same identity
|
|
26
|
-
(`thursdayIdentity`)
|
|
26
|
+
(`thursdayIdentity`), each followed by its own rule for ending the call, read the same
|
|
27
27
|
memory, and neither is told it is part of something else. The voice holds conversation and
|
|
28
28
|
memory only. Right under the identity, `## Always` groups what holds on every turn: the ending
|
|
29
29
|
rule (the only line marked `IMPORTANT`), the guide's starter backchannel and interruption
|
|
30
|
-
policies, and
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
30
|
+
policies, and the guide's `Delegation policy` under its three labels: `Backend tools` names
|
|
31
|
+
what the backend can do (end the call, background work, routines, memory, this computer and the
|
|
32
|
+
web) and never how; `Delegate to the backend when` is the user wanting the call to end, anything
|
|
33
|
+
on that list or a change to work already asked for, and whatever the user says about themselves,
|
|
34
|
+
their people, their plans or how they want things done, unless it is already written in the
|
|
35
|
+
prompt; `Do not delegate to the backend when` is greetings, small talk, only wanting her to stop
|
|
36
|
+
talking, what the conversation already answers, and a brief clarification. Live decides by
|
|
37
|
+
itself whether to delegate, and it decides from that list: without it (09-17 to 09-19) a
|
|
38
|
+
hang-up, a stop or a routine was answered and never handed over. It says nothing else about how
|
|
39
|
+
to speak; it sees no tool schema and no tool name but `end_call`, in the ending rule. The backend prompt holds the work: memory (merging a fact that repeats or changes one
|
|
37
40
|
already kept, and tidying with the user past the limits), background work and threads, this
|
|
38
41
|
computer, what to return, and the earlier calls. A request that carries earlier work further goes to
|
|
39
42
|
that thread; one that stands on its own opens a new one; it asks the user only when it could be
|
|
@@ -212,10 +215,15 @@ for a goodbye, which would leave the ending to the model.
|
|
|
212
215
|
|
|
213
216
|
The user wanting the call to end, however they say it, sets everything else aside: the
|
|
214
217
|
voice answers yes and hands it to the backend at once, and the backend runs `end_call`
|
|
215
|
-
without deliberating. The
|
|
216
|
-
|
|
218
|
+
without deliberating. The voice's rule names `end_call` too, the one tool name it holds:
|
|
219
|
+
without it, ending read as something to say rather than do. The two rules say what each
|
|
220
|
+
side can do: while they were one sentence ("forget every other task, answer yes, then use
|
|
221
|
+
the tool"), the voice said yes and went quiet with the line open, four times in five
|
|
222
|
+
(09-20), so its rule says to hand the turn over, and that a yes alone leaves the line open.
|
|
217
223
|
Whether that turn reaches the backend at all is the voice's own decision, and it often
|
|
218
|
-
answers and hands nothing over
|
|
224
|
+
answers and hands nothing over. Ending the call leads the `Backend tools` list for that
|
|
225
|
+
reason: with the list, five calls in seven ended by asking (09-16); without it, one in 21,
|
|
226
|
+
then none in 34 (09-17 to 09-19). The
|
|
219
227
|
quiet hang-up below is what ends such a call.
|
|
220
228
|
The page does not close on `end_call` itself: it waits until her voice has been quiet
|
|
221
229
|
for `CALL_END.quietMs`, or `CALL_END.unsaidMs` when nothing was said, never past
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { TOOL_NAMES } from "@/features/ai/tools/tool-name";
|
|
1
2
|
import {
|
|
2
3
|
listAlwaysLoaded,
|
|
3
4
|
listNoteIndex,
|
|
@@ -10,7 +11,6 @@ import {
|
|
|
10
11
|
type MemoryNoteView,
|
|
11
12
|
} from "@/features/memory/memory.schema";
|
|
12
13
|
import {
|
|
13
|
-
callEnding,
|
|
14
14
|
carriedLines,
|
|
15
15
|
expandedFacts,
|
|
16
16
|
logPromptSize,
|
|
@@ -21,16 +21,15 @@ import {
|
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
23
|
* Everything the Live voice hears: who Thursday is and how a call ends (the words the backend
|
|
24
|
-
* opens with too), the guide's starter backchannel and interruption policies,
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* hands everything but conversation over and answers from what
|
|
28
|
-
* call, never cached.
|
|
24
|
+
* opens with too), the guide's starter backchannel and interruption policies, its delegation
|
|
25
|
+
* policy (what the backend can do, when to hand over and when not), and what she knows about
|
|
26
|
+
* the user. How the work is done, earlier calls and tidying memory are the backend's
|
|
27
|
+
* (thursday.prompt): the voice hands everything but conversation over and answers from what
|
|
28
|
+
* comes back. Assembled on every call, never cached.
|
|
29
29
|
*/
|
|
30
30
|
export async function loadLivePrompt(options: {
|
|
31
31
|
/** Settings › Thursday › Voice instructions; added to, never replacing, what is below. */
|
|
32
32
|
voicePrompt?: string | null;
|
|
33
|
-
locale?: string | null;
|
|
34
33
|
/** The page placed this call because background work waits on the user (call-back). */
|
|
35
34
|
calledBack?: boolean;
|
|
36
35
|
/** The last call is in the conversation ahead of the opening (call-last). */
|
|
@@ -45,11 +44,6 @@ export async function loadLivePrompt(options: {
|
|
|
45
44
|
|
|
46
45
|
const first = !open.notes.find((note) => note.path === "profile")?.facts
|
|
47
46
|
.length;
|
|
48
|
-
// Only the first-call greeting reads it: before they have said anything, the
|
|
49
|
-
// browser's locale is the one sign of their language
|
|
50
|
-
const language = options.locale
|
|
51
|
-
? `the language of \`${options.locale}\`, their browser's setting`
|
|
52
|
-
: "the language they use";
|
|
53
47
|
|
|
54
48
|
const text = [
|
|
55
49
|
thursdayIdentity(),
|
|
@@ -69,7 +63,7 @@ export async function loadLivePrompt(options: {
|
|
|
69
63
|
opening: options.calledBack
|
|
70
64
|
? "You placed this call because background work has something for the user; it comes in next. Speak first: greet them in one line and say that is why you called."
|
|
71
65
|
: first
|
|
72
|
-
?
|
|
66
|
+
? "Open the call now: say who you are and what you are here to do for them, in a line or two, then ask what to call them. Then stop and listen."
|
|
73
67
|
: options.remembers
|
|
74
68
|
? "The call has just started. Speak first: greet the user naturally, in one line, as someone who remembers the last call."
|
|
75
69
|
: "The call has just started. Speak first: greet the user naturally, in one line.",
|
|
@@ -79,40 +73,71 @@ export async function loadLivePrompt(options: {
|
|
|
79
73
|
/**
|
|
80
74
|
* The rules for every turn, together right under the identity, where the model weighs most.
|
|
81
75
|
* One heading marks them; `IMPORTANT` stays on the ending rule alone, the one that failed
|
|
82
|
-
* without it (09-17), so stamping it on all
|
|
76
|
+
* without it (09-17), so stamping it on all of them would thin it out.
|
|
83
77
|
*/
|
|
84
78
|
const always = () => `## Always
|
|
85
79
|
|
|
86
|
-
${
|
|
80
|
+
${ending()}
|
|
87
81
|
|
|
88
82
|
${speaking()}
|
|
89
83
|
|
|
90
84
|
${delegation()}`;
|
|
91
85
|
|
|
86
|
+
/**
|
|
87
|
+
* How a call ends, as the voice can end it: it holds no tools, so it says yes and hands the turn
|
|
88
|
+
* over, and the backend runs the tool. The rule both prompts shared until 09-20 ("forget every
|
|
89
|
+
* other task, answer yes, then use the tool") left the voice saying yes and going quiet with the
|
|
90
|
+
* line still open, four times in five. The tool is still named, the one name the voice sees, so
|
|
91
|
+
* ending reads as something done rather than said.
|
|
92
|
+
*/
|
|
93
|
+
const ending = () =>
|
|
94
|
+
`IMPORTANT — always follow this: when the user wants the call to end, however they say it, answer yes in one word of their language and hand it to the backend at once. Only the backend can end the line, with the ${TOOL_NAMES.end_call} tool; saying yes alone leaves it open.`;
|
|
95
|
+
|
|
92
96
|
/**
|
|
93
97
|
* The guide's starter lines on listening and interruptions, labels kept as it says. The
|
|
94
98
|
* backchannel line is the one it invites changing: a long turn heard in silence reads as
|
|
95
|
-
* nobody listening.
|
|
99
|
+
* nobody listening. The language is the one being spoken, never the browser's: a first call
|
|
100
|
+
* opened in the browser's language kept an English speaker in Korean.
|
|
96
101
|
*/
|
|
97
102
|
function speaking(): string {
|
|
98
103
|
return `Backchannel policy: Use moderate backchannels. When the user speaks at length, acknowledge now and then with a short listening sound so they know you are following, without competing with the main response.
|
|
99
104
|
|
|
100
|
-
Interruption policy: Stop speaking when the user interrupts. Listen to what they say
|
|
105
|
+
Interruption policy: Stop speaking when the user interrupts. Listen to what they say.
|
|
106
|
+
|
|
107
|
+
Speak the language the user is speaking, whatever language came before; when they switch, switch with them.`;
|
|
101
108
|
}
|
|
102
109
|
|
|
103
110
|
/**
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
*
|
|
107
|
-
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
111
|
+
* The guide's three labels, as it asks: Live decides for itself whether to hand a turn over,
|
|
112
|
+
* and reads that from what the list says the backend can do. Without the list (09-17 to 09-19)
|
|
113
|
+
* it said "yes" to a hang-up, a stop or a routine and handed nothing over: 1 `end_call` in 21
|
|
114
|
+
* calls, then none in 34, where the list had drawn 5 in 7. The list names what can be done,
|
|
115
|
+
* never how: tools, bots and threads stay the backend's. What they say about themselves is
|
|
116
|
+
* its own line: nothing is kept that is not handed over, and it is rarely a request. The voice
|
|
117
|
+
* sees only profile and preferences whole, so "already written" is a rough filter; the backend
|
|
118
|
+
* merges the rest (thursday.prompt memory). Stopping her voice is not stopping a job (the
|
|
119
|
+
* guide's interruptions): the one is hers, the other the backend's.
|
|
110
120
|
*/
|
|
111
121
|
function delegation(): string {
|
|
112
122
|
return `Delegation policy:
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
123
|
+
Backend tools:
|
|
124
|
+
- Ending the call: hangs up the line.
|
|
125
|
+
- Background work: hands a job to a bot, passes words on, stops or changes a job, answers a bot's question, says how the work stands.
|
|
126
|
+
- Routines: jobs that start by themselves later.
|
|
127
|
+
- Memory: keeps what the user tells you about themselves, and looks it up.
|
|
128
|
+
- This computer and the web: runs a command, searches.
|
|
129
|
+
|
|
130
|
+
Delegate to the backend when:
|
|
131
|
+
- The user wants the call to end.
|
|
132
|
+
- They ask for anything on that list, or change or stop work already asked for.
|
|
133
|
+
- They tell you about themselves, the people in their life, their plans or how they want things done, however small, unless it is already written below.
|
|
134
|
+
|
|
135
|
+
Do not delegate to the backend when:
|
|
136
|
+
- They greet you, make small talk, or only want you to stop talking.
|
|
137
|
+
- You can answer from the conversation or a result still current.
|
|
138
|
+
- You need a brief clarification to understand the request.
|
|
139
|
+
|
|
140
|
+
Delegate before giving an answer that depends on backend work. Do not guess the result while waiting.`;
|
|
116
141
|
}
|
|
117
142
|
|
|
118
143
|
/**
|