thursday-agent 0.1.0 → 0.1.1
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/build-manifest.json +3 -3
- package/.next/prerender-manifest.json +3 -3
- 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.html +1 -1
- package/.next/server/app/_not-found.rsc +1 -1
- package/.next/server/app/_not-found.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +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/page/server-reference-manifest.json +41 -41
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__0dfwvr4._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1-mnhyd._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__1e-f3gy._.js +3 -0
- package/.next/server/chunks/ssr/{[root-of-the-server]__0ng1y5l._.js → [root-of-the-server]__1ncajna._.js} +2 -2
- package/.next/server/chunks/ssr/_077-g6s._.js +1 -1
- package/.next/server/chunks/ssr/_0ay6b01._.js +1 -1
- package/.next/server/chunks/ssr/_0sf1isi._.js +1 -1
- package/.next/server/chunks/ssr/{_0c2y8ks._.js → _124q1la._.js} +2 -2
- package/.next/server/chunks/ssr/_19eoufz._.js +3 -0
- package/.next/server/chunks/ssr/{_1lz4t71._.js → _1aca4j8._.js} +2 -2
- package/.next/server/chunks/ssr/{_06l25rd._.js → _1b3yex3._.js} +2 -2
- package/.next/server/chunks/ssr/{_0n0wwfo._.js → _1cb_5sv._.js} +2 -2
- package/.next/server/chunks/ssr/{_0vbcev4._.js → _1dnxp2k._.js} +2 -2
- package/.next/server/chunks/ssr/_1e-dgz0._.js +1 -1
- package/.next/server/chunks/ssr/{_1wlc_pv._.js → _1hkvsg0._.js} +2 -2
- package/.next/server/chunks/ssr/{_061oc5l._.js → _1m5popy._.js} +2 -2
- package/.next/server/chunks/ssr/{_0-pwe74._.js → _1r2_qk-._.js} +2 -2
- package/.next/server/chunks/ssr/features_bot_components_bot-setting_tsx_01ajft6._.js +1 -1
- package/.next/server/chunks/ssr/features_config_components_14jqgy4._.js +1 -1
- package/.next/server/chunks/ssr/features_config_components_config-setting_tsx_0xfwqdg._.js +1 -1
- 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/{node_modules_1i1aztk._.js → node_modules_00riwzq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13r64hh._.js → node_modules_012m-mo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01-lnjv._.js → node_modules_01jj5oy._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0cagd-a._.js → node_modules_03f-6up._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0o9cu2m._.js → node_modules_07_oxjr._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06gkc-1._.js → node_modules_0egn4iq._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0510bcb._.js → node_modules_0eqdzva._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12ilj3x._.js → node_modules_0ewynyi._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_18h15oi._.js → node_modules_0i37h34._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_14qjnj6._.js → node_modules_0nh2m35._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_04m323e._.js → node_modules_0nq_p-o._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1hfkkak._.js → node_modules_0sbobpz._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_20oe6vi._.js → node_modules_0xe_k12._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ekezwy._.js → node_modules_14uxpfb._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ci9xpq._.js → node_modules_17c71fz._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1czzodm._.js → node_modules_17ls31t._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0n9m8ww._.js → node_modules_1854ebs._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0okab9u._.js → node_modules_1_w_b81._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0eq4z64._.js → node_modules_1bjm3ch._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bog3e3._.js → node_modules_1euv75v._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0a7_hec._.js → node_modules_1fsvm8f._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0egyezs._.js → node_modules_1kj6swe._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kc8lu9._.js → node_modules_1mnmhse._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wya71n._.js → node_modules_1wsx1pg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0snv8wz._.js → node_modules_1y1m-q4._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_126jgz-._.js → node_modules_1yxkq1s._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0babb8b._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_1f5re6n._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_0jiglry._.js → node_modules_@mermaid-js_parser_dist_chunks_mermaid-parser_core_216aa7f._.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 +42 -42
- package/.next/static/chunks/{1n0rxcrn8v33a.js → 0_6qjj4f3t3j-.js} +1 -1
- package/.next/static/chunks/{16jdhpex5davi.js → 0g2n0xskvyk04.js} +1 -1
- package/.next/static/chunks/{2tab0u1fay-lo.js → 0h7pjyewk7ky-.js} +1 -1
- package/.next/static/chunks/{1ti6qqe8rxjc9.js → 0yn2yol46cj77.js} +1 -1
- package/.next/static/chunks/{3ktulatcmvs36.js → 14s7e14xltx47.js} +1 -1
- package/.next/static/chunks/{1n1_b0m4z2r2l.js → 1lpdcqos7mkek.js} +1 -1
- package/.next/static/chunks/{225bcu0dkzwh9.js → 1rja48de93vvx.js} +1 -1
- package/.next/static/chunks/{3v_k5wbdx5z1e.js → 1u5d-pvhwir9g.js} +1 -1
- package/.next/static/chunks/{3imn63hmy-dvm.js → 261871a8ot1pi.js} +1 -1
- package/.next/static/chunks/{2bd12_uvbr996.js → 2cgzsjzheo2m2.js} +1 -1
- package/.next/static/chunks/{26jl58p1cmfyz.js → 2ka9uwo_evj7a.js} +1 -1
- package/.next/static/chunks/{3a8ieqoovwtgg.js → 2kl3n2d-4-7i5.js} +1 -1
- package/.next/static/chunks/{17yxvpmlyxotg.js → 2qci2z603es_m.js} +1 -1
- package/.next/static/chunks/{07hfxlyqq92v-.js → 2v_vqhmdl8de_.js} +1 -1
- package/.next/static/chunks/{0m28u02ktcwrt.js → 34eu8t79ko6lm.js} +1 -1
- package/.next/static/chunks/{0qwvymwynno3x.js → 35uo6rtl_otbd.js} +1 -1
- package/.next/static/chunks/{0t7ve-t64i24a.js → 3w7-y53xzl2ir.js} +1 -1
- package/.next/static/chunks/{1ma7gsnw16oor.js → 3yan6-5cvpk2o.js} +1 -1
- package/package.json +3 -17
- package/.next/server/chunks/ssr/[root-of-the-server]__1d9rffu._.js +0 -3
- package/.next/server/chunks/ssr/_0g7xsms._.js +0 -3
- package/node_modules/@img/sharp-libvips-linux-x64/README.md +0 -46
- package/node_modules/@img/sharp-libvips-linux-x64/lib/glib-2.0/include/glibconfig.h +0 -219
- package/node_modules/@img/sharp-libvips-linux-x64/lib/index.js +0 -1
- package/node_modules/@img/sharp-libvips-linux-x64/lib/libvips-cpp.so.8.18.6 +0 -0
- package/node_modules/@img/sharp-libvips-linux-x64/package.json +0 -43
- package/node_modules/@img/sharp-libvips-linux-x64/versions.json +0 -30
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/README.md +0 -46
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/glib-2.0/include/glibconfig.h +0 -219
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/index.js +0 -1
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/lib/libvips-cpp.so.8.18.6 +0 -0
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/package.json +0 -43
- package/node_modules/@img/sharp-libvips-linuxmusl-x64/versions.json +0 -30
- package/node_modules/@img/sharp-linux-x64/index.cjs +0 -2
- package/node_modules/@img/sharp-linux-x64/lib/sharp-linux-x64-0.35.4.node +0 -0
- package/node_modules/@img/sharp-linux-x64/package.json +0 -47
- package/node_modules/@img/sharp-linuxmusl-x64/index.cjs +0 -2
- package/node_modules/@img/sharp-linuxmusl-x64/lib/sharp-linuxmusl-x64-0.35.4.node +0 -0
- package/node_modules/@img/sharp-linuxmusl-x64/package.json +0 -47
- package/node_modules/@libsql/linux-x64-gnu/index.node +0 -0
- package/node_modules/@libsql/linux-x64-gnu/package.json +0 -36
- package/node_modules/@libsql/linux-x64-musl/index.node +0 -0
- package/node_modules/@libsql/linux-x64-musl/package.json +0 -36
- package/node_modules/libsql/auth.js +0 -22
- package/node_modules/libsql/index.js +0 -441
- package/node_modules/libsql/node_modules/detect-libc/lib/detect-libc.js +0 -279
- package/node_modules/libsql/node_modules/detect-libc/lib/filesystem.js +0 -41
- package/node_modules/libsql/node_modules/detect-libc/lib/process.js +0 -19
- package/node_modules/libsql/node_modules/detect-libc/package.json +0 -40
- package/node_modules/libsql/package.json +0 -90
- package/node_modules/libsql/sqlite-error.js +0 -21
- package/node_modules/sharp/dist/channel.cjs +0 -177
- package/node_modules/sharp/dist/channel.mjs +0 -177
- package/node_modules/sharp/dist/colour.cjs +0 -199
- package/node_modules/sharp/dist/colour.mjs +0 -199
- package/node_modules/sharp/dist/composite.cjs +0 -213
- package/node_modules/sharp/dist/composite.mjs +0 -213
- package/node_modules/sharp/dist/constructor.cjs +0 -511
- package/node_modules/sharp/dist/constructor.mjs +0 -511
- package/node_modules/sharp/dist/index.cjs +0 -25
- package/node_modules/sharp/dist/index.d.cts +0 -1999
- package/node_modules/sharp/dist/index.d.mts +0 -2046
- package/node_modules/sharp/dist/index.mjs +0 -25
- package/node_modules/sharp/dist/input.cjs +0 -819
- package/node_modules/sharp/dist/input.mjs +0 -819
- package/node_modules/sharp/dist/is.cjs +0 -143
- package/node_modules/sharp/dist/is.mjs +0 -143
- package/node_modules/sharp/dist/libvips.cjs +0 -212
- package/node_modules/sharp/dist/libvips.mjs +0 -212
- package/node_modules/sharp/dist/operation.cjs +0 -1002
- package/node_modules/sharp/dist/operation.mjs +0 -1002
- package/node_modules/sharp/dist/output.cjs +0 -1785
- package/node_modules/sharp/dist/output.mjs +0 -1785
- package/node_modules/sharp/dist/resize.cjs +0 -617
- package/node_modules/sharp/dist/resize.mjs +0 -617
- package/node_modules/sharp/dist/sharp.cjs +0 -174
- package/node_modules/sharp/dist/sharp.mjs +0 -174
- package/node_modules/sharp/dist/utility.cjs +0 -301
- package/node_modules/sharp/dist/utility.mjs +0 -301
- package/node_modules/sharp/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/sharp/node_modules/semver/classes/range.js +0 -577
- package/node_modules/sharp/node_modules/semver/classes/semver.js +0 -350
- package/node_modules/sharp/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/sharp/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/sharp/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/sharp/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/sharp/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/sharp/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/sharp/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/sharp/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/major.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/sharp/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/sharp/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/sharp/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/sharp/node_modules/semver/functions/truncate.js +0 -48
- package/node_modules/sharp/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/sharp/node_modules/semver/index.js +0 -93
- package/node_modules/sharp/node_modules/semver/internal/constants.js +0 -37
- package/node_modules/sharp/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/sharp/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/sharp/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/sharp/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/sharp/node_modules/semver/internal/re.js +0 -223
- package/node_modules/sharp/node_modules/semver/package.json +0 -78
- package/node_modules/sharp/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/sharp/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/sharp/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/sharp/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/sharp/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/sharp/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/sharp/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/sharp/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/sharp/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/sharp/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/sharp/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/sharp/package.json +0 -227
- /package/.next/static/{M8Zkbqz2M4SLzLsE8DC6V → G-9_HnysmzY_Bx9GpDYAO}/_buildManifest.js +0 -0
- /package/.next/static/{M8Zkbqz2M4SLzLsE8DC6V → G-9_HnysmzY_Bx9GpDYAO}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{M8Zkbqz2M4SLzLsE8DC6V → G-9_HnysmzY_Bx9GpDYAO}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,213377,e=>{"use strict";e.s(["TOOL_NAMES",0,{memory_recall:"memory_recall",memory_remember:"memory_remember",memory_forget:"memory_forget",memory_show:"memory_show",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",delegate:"delegate",task:"task",ask_bot:"ask_bot",ask_thursday:"ask_thursday",ask_back:"ask_back",report:"report",end_call:"end_call",tidy_done:"tidy_done"}])},692329,933916,671228,e=>{"use strict";var t=e.i(843476),r=e.i(493801),n=e.i(456420);let a={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};a.node;let s=(0,n.default)(a);var i=e.i(867927),l=e.i(632781);let o={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};o.node;let c=(0,n.default)(o);var d=e.i(751898);let u={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};u.node;let h=(0,n.default)(u);var m=e.i(77071),f=e.i(466787),g=e.i(271645),p=e.i(511769),y=e.i(798120),x=e.i(167881),b=e.i(917162),M=e.i(671428),v=e.i(6799),A=e.i(146538),S=e.i(852116),k=e.i(95187);let w=(0,k.createServerReference)("7f24a4ee425f53aae8b9dff96ef64a59e2d4f7494f",k.callServer,void 0,k.findSourceMapURL,"cancelMemoryTidyAction"),_=(0,k.createServerReference)("7f3927d2fe6551da02ab0f1997ecdba161f28fb9ab",k.callServer,void 0,k.findSourceMapURL,"runMemoryTidyAction"),N=(0,k.createServerReference)("7ff2bed151177713abc9da4632e6016434d41e7fc0",k.callServer,void 0,k.findSourceMapURL,"setMemoryTidyModelAction"),j=(0,k.createServerReference)("7f6f454eb05dd4ab24f3020171ed2bddfe58cccdf6",k.callServer,void 0,k.findSourceMapURL,"setMemoryTidyOnAction");var E=e.i(536015),O=e.i(895836),T=e.i(989409),R=e.i(245629),L=e.i(609856),C=e.i(283653),I=e.i(647163);function P({status:e}){let r=e.current,n=e.last;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"border-t border-border/60",children:[(0,t.jsx)(F,{value:e.model}),(0,t.jsxs)("div",{className:"flex items-center gap-3 border-t border-border/60 py-2",children:[(0,t.jsx)("span",{className:"w-20 shrink-0 text-[13px] text-muted-foreground",children:r?"Reading":"Last read"}),r?(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(l.Loader2,{className:"size-3.5 shrink-0 animate-spin"}),(0,t.jsxs)("span",{className:"truncate",children:["the last ",r.messages," ",1===r.messages?"message":"messages"]})]}):(0,t.jsx)(z,{run:n}),(0,t.jsx)(D,{run:r??n})]})]}),(0,t.jsx)(O.SettingNote,{className:(0,I.cn)(!e.model&&I.WAITING_INK),children:e.model?`Reads back after every ${e.every} messages of talk. ${e.pending} since the last one.`:"Nothing is read back until a model is picked — this never runs on the app default."})]})}function F({value:e}){return(0,t.jsxs)("button",{type:"button",onClick:()=>{var r;return r=e,b.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)($,{current:r,onDone:e})})},className:"flex w-full items-center gap-3 py-2 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"w-20 shrink-0 text-[13px] text-muted-foreground",children:"Model"}),(0,t.jsx)("span",{className:(0,I.cn)("min-w-0 flex-1 truncate font-mono text-[11px]",e?"text-muted-foreground":I.WAITING_INK),children:e??"Not picked"}),(0,t.jsx)(i.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60"})]})}function z({run:e}){if(!e)return(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:"Nothing read back yet"});let n=(0,r.formatDistanceToNowStrict)((0,R.toDate)(e.endedAt??e.startedAt),{addSuffix:!0});return"done"!==e.status?(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-destructive",children:[(0,t.jsx)(f.TriangleAlert,{className:"size-3.5 shrink-0"}),(0,t.jsxs)("span",{className:"truncate font-mono text-[11px]",children:["failed"===e.status?"Failed":"Stopped"," ",n,e.error?` — ${e.error}`:""]})]}):(0,t.jsxs)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:[n," · ",(0,E.tidyTally)(e.changes)]})}function D({run:e}){return e?(0,t.jsx)("button",{type:"button","aria-label":"What the last read changed",onClick:()=>K(),className:"shrink-0 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(i.ChevronRight,{className:"size-4 text-muted-foreground/60"})}):(0,t.jsx)("span",{className:"size-4 shrink-0"})}function $({current:e,onDone:r}){let[n,a]=(0,L.useServerAction)(N,{onOk:()=>{(0,C.revalidate)(y.queryKey.memoryTidy),r()}}),s=e?.split("/")??null,[i,l]=(0,g.useState)({provider:s?.[0]??null,model:s?.slice(1).join("/")??""});return(0,t.jsx)(O.SettingDialogContent,{title:"Model",description:"What re-reads a call. There is no default: without a pick nothing is read back, so a model nobody chose never spends.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Button,{variant:"ghost",onClick:()=>n(""),children:"Clear"}),(0,t.jsx)(x.Button,{loading:a,disabled:!i.provider||!i.model.trim(),onClick:()=>n(`${i.provider}/${i.model.trim()}`),children:"Save"})]}),children:(0,t.jsx)(A.ModelPicker,{provider:i.provider,model:i.model,onChange:l})})}function K(){return b.notify.component({className:"sm:max-w-2xl",renderer:()=>(0,t.jsx)(H,{})})}function H(){let{data:e}=(0,C.useServerRoute)(y.queryKey.memoryTidy),n={onOk:()=>(0,C.revalidate)(y.queryKey.memoryTidy)},[a,s]=(0,L.useServerAction)(_,n),[i,l]=(0,L.useServerAction)(w,n);if(!e)return(0,t.jsx)(O.SettingDialogContent,{title:"What the last read changed",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(M.Skeleton,{className:"h-4 w-2/3"}),(0,t.jsx)(M.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(M.Skeleton,{className:"h-4 w-4/5"})]})});let o=e.current??e.last,c=o?(0,r.formatDistanceToNowStrict)((0,R.toDate)(o.endedAt??o.startedAt),{addSuffix:!0}):"";return(0,t.jsx)(O.SettingDialogContent,{title:"What the last read changed",description:"Memory as it stands after the model read those messages back. Every line here is one it wrote, revised or dropped.",footer:e.current?(0,t.jsx)(x.Button,{variant:"outline",loading:l,onClick:()=>i(),children:"Stop"}):(0,t.jsxs)(x.Button,{variant:"outline",loading:s,disabled:0===e.pending||!e.model,onClick:()=>a(),children:[!s&&(0,t.jsx)(S.MemoryMark,{className:"size-3.5"}),"Read now"]}),children:o?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 text-sm",children:e.current?`Reading the last ${o.messages} messages`:`${o.messages} messages, ${c}`}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:["-"!==o.provider&&o.model,o.inputTokens>0&&` \xb7 ${o.inputTokens.toLocaleString()} in / ${o.outputTokens.toLocaleString()} out`]})]}),o.error&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:o.error}),o.changes.length>0?(0,t.jsx)("ul",{className:"border-b border-border/60",children:o.changes.map((e,r)=>(0,t.jsx)(B,{change:e},`${r}-${e.op}-${e.text}`))}):!e.current&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Nothing needed changing."})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Nothing has been read back yet."})})}let U={add:{icon:m.Plus,label:"added"},replace:{icon:s,label:"revised"},forget:{icon:c,label:"dropped"},carry:{icon:d.Pin,label:"carried into every call"},uncarry:{icon:h,label:"no longer carried"}};function B({change:e}){let{icon:r,label:n}=U[e.op];return(0,t.jsxs)("li",{className:"flex gap-3 border-t border-border/60 py-3",children:[(0,t.jsxs)("span",{className:"flex w-3.5 shrink-0 justify-center pt-1 text-muted-foreground",children:[(0,t.jsx)(r,{className:"size-3.5"}),(0,t.jsx)("span",{className:"sr-only",children:n})]}),(0,t.jsx)("span",{className:"min-w-0 flex-1 text-sm leading-relaxed text-foreground/90",children:e.text}),(0,t.jsx)("span",{className:"shrink-0 pt-0.5 font-mono text-[11px] text-muted-foreground/50",children:e.path})]})}e.s(["MemoryTidyNotice",0,function(){return(0,p.useAppEvent)({"memory-tidied":e=>{v.toast.add({type:e.failed?"error":"success",title:e.failed?"Could not read the call back":"Memory tidied",description:e.tally,actionProps:{children:"Show",onClick:()=>{(0,T.openSettings)("thursday"),K()}}})}}),null},"TidySetting",0,function(){let{data:e}=(0,C.useServerRoute)(y.queryKey.memoryTidy),[r]=(0,L.useServerAction)(j,{onOk:()=>(0,C.revalidate)(y.queryKey.memoryTidy)});return(0,t.jsx)(O.SettingGroup,{label:"After a call",children:(0,t.jsx)(O.SettingToggle,{label:"Read the call back",description:"During a call she saves what she catches between sentences. Afterwards a model reads the whole thing back and fixes what she missed.",checked:e?.on??!1,disabled:!e,onChange:e=>r(e),children:e&&(0,t.jsx)(P,{status:e})})})}],692329);var q=e.i(504565),J=e.i(265402),V=e.i(451888);let W=["mark","ascii"],Y=["ascii","emoji","emojiOnly"];e.s(["ASCII_CHARSETS",0,Y,"FACE_KINDS",0,W],933916);var G=e.i(981203);let Z=q.default.object({systemPrompt:q.default.string().max(G.COMMON_VALIDATE.prompt.max).nullish(),model:J.speachModelRefSchema.nullish(),locale:q.default.string().max(35).nullish()}),Q=V.botIconSchema.extend({kind:q.default.enum(W).default("ascii"),charset:q.default.enum(Y).default("ascii"),fontSize:q.default.number().min(4).max(16).default(8),density:q.default.number().min(.6).max(2).default(1.4)}),X=Q.parse({}),ee={min:3,max:32},et=q.default.object({enabled:q.default.boolean(),phrase:q.default.string().trim().min(ee.min).max(ee.max)}),er=q.default.object({enabled:q.default.boolean(),combo:q.default.string().trim().min(1).max(64)}),en=["off","waiting","any"],ea=q.default.enum(en),es=["center","sides"],ei=q.default.enum(es);q.default.object({id:q.default.string().min(1),role:q.default.enum(["user","assistant","tool"]),tool:q.default.string().nullish(),text:q.default.string(),seq:q.default.number().int().min(0)}),e.s(["CALL_BACK_DEFAULT",0,"off","CALL_BACK_LABEL",0,{off:"Never",waiting:"When a job needs me",any:"Whenever a job ends"},"CALL_BACK_MODES",0,en,"CALL_HISTORY_PAGE",0,10,"CAPTION_VIEWS",0,es,"CallBackSchema",0,ea,"CaptionViewSchema",0,ei,"FACE_DEFAULT",0,X,"HOTKEY_DEFAULT",0,{enabled:!0,combo:"alt+shift+KeyT"},"HotkeySchema",0,er,"ThursdayFaceSchema",0,Q,"ThursdaySettingsSchema",0,Z,"WAKE_DEFAULT",0,{enabled:!0,phrase:"hey thursday"},"WAKE_PHRASE",0,ee,"WakeSchema",0,et],671228)},567334,e=>{"use strict";e.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_MIN_LEVEL",0,6,"EMOJI_POOL",0,["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"],"EMOJI_RATIO",0,.11,"RAMP",0,[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],"hash",0,function(e,t){let r=43758.5453*Math.sin(127.1*e+311.7*t);return r-Math.floor(r)},"smoothstep",0,function(e,t,r){let n=Math.min(1,Math.max(0,(r-e)/(t-e)));return n*n*(3-2*n)}])},333495,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(635963),a=e.i(567334);let s=[235,235,235],i=["████ ███ ███ ██ ███ ","█ █ █ █ █ █ █ █ █","███ ███ ███ █ █ ███ ","█ █ █ █ █ █ █ █ █ ","████ █ █ █ █ ██ █ █"],l={happy:[".....................",".....................","....███.......███....","...█████.....█████...","...█████.....█████...","....███.......███....",".....................",".....................","█...................█",".██...............██.","...███.........███...","......█████████......","....................."],sad:[".....................",".....................","....███.......███....","...█████.....█████...","...█████.....█████...","....███.......███....",".....................",".....................","......█████████......","...███.........███...",".██...............██.","█...................█","....................."],love:[".....................","...██.██.....██.██...","..███████...███████..","..███████...███████..","...█████.....█████...","....███.......███....",".....█.........█.....",".....................","█...................█",".██...............██.","...███.........███...","......█████████......","....................."]};function o(e,t){let r=1-(0,a.smoothstep)(104.50000000000001,190,e.dist);return(.58+.2*Math.sin(.05*e.dist-.4*t)+.07*Math.sin(.35*t))*r}function c(e,t,r,n,s){switch(e){case"idle":return o(t,r)*(0,a.smoothstep)(0,1,Math.min(1,n/1.5));case"connecting":{let e=(0,a.smoothstep)(0,1,Math.min(1,n/1.8)),s=t.dist-235*e;return Math.exp(-(s*s)/6e3)*(.2+.85*(0,a.hash)(Math.floor(t.dist/9),Math.floor(11*t.angle))+.5*(0,a.hash)(137*t.seed,7))*e+o(t,r)*(1-e)}case"speaking":{let e=(0,a.smoothstep)(0,1,Math.min(1,n/.8)),i=190+(58*s.slow+58*s.bob)*e;for(let r=0;r<4;r++)i+=40*s.amp[r]*Math.sin((r+2)*t.angle+s.phase[r])*e;let l=Math.max(130,Math.min(278,i)),o=t.dist-l,c=Math.exp(-(o*o)/900),d=.55*Math.exp(-(t.dist*t.dist)/6e3),u=t.dist<l?.3*(1-t.dist/l)**.6:0,h=0;for(let e=0;e<s.rings.length;e++){let n=s.rings[e],a=r-n.born,i=t.dist-(l+100*a);h+=Math.exp(-(i*i)/2200)*n.power*Math.max(0,1-a/.55)}return c+d+u+.8*h}case"working":{let e=(0,a.smoothstep)(0,1,Math.min(1,n/.7)),s=t.dist-238,i=Math.exp(-(s*s)/1100),l=t.angle-3*r,c=Math.atan2(Math.sin(l),Math.cos(l));return i*Math.exp(-(c*c)/(c<0?2.8:.16))*e+o(t,r)*(1-e)}case"error":{if(t.letter<0)return 0;let e=n%9.2,s=t.letter,i=.12*t.seed;return Math.max(0,(0,a.smoothstep)(0,1,(e-.65*s-i)/.8)-(0,a.smoothstep)(0,1,(e-5.6-.5*s-i)/.7))*(.86+.14*Math.sin(3.5*r+6*t.seed))}}}function d({className:e,mode:n="idle",charset:o="ascii",emotion:u=null,fontSize:h=8,density:m=1.4,size:f=680,color:g=s,getSpectrum:p}){let y=(0,r.useRef)(null),x=(0,r.useRef)(null),b=(0,r.useRef)([]),M=(0,r.useRef)(null),v=(0,r.useRef)(o),A=(0,r.useRef)({cur:[...g],target:g}),S=(0,r.useRef)({cw:1,ch:1,errScale:3,faceScale:3,size:0}),k=(0,r.useRef)({cur:u,prev:null,start:-1/0}),w=(0,r.useRef)(p);w.current=p;let _=(0,r.useRef)({fast:0,mid:0,slow:0,bob:0,bobVel:0,lastOnset:-1/0,amp:[,,,,].fill(0),phase:Array.from({length:4},(e,t)=>2.1*t),rings:[]}),N=(0,r.useRef)({mode:n,start:0}),j=(0,r.useRef)(null),E=(0,r.useRef)(-1/0);return(0,r.useEffect)(()=>{let e=y.current;if(!e)return;let t=.95*h/m,r=1.25*h/m,n=680/f,s=t*n,l=r*n,o=Math.max(1,Math.floor(625.6/(i[0].length*s))),c=Math.max(1,Math.floor(557.6/(21*s)));S.current={cw:s,ch:l,errScale:o,faceScale:c,size:f};let d=[],u=Math.ceil(f/t),g=Math.ceil(f/r);for(let e=0;e<g;e++)for(let c=0;c<u;c++){let u=c*t,h=e*r,m=(u-f/2)*n,g=(h-f/2)*n,p=Math.hypot(m,g),y=function(e,t,r,n,a){let s=i.length,l=Math.floor(e/(r*a)+i[0].length/2),o=Math.floor(t/(n*a)+s/2);if(o<0||o>=s)return -1;let c=i[o];return l<0||l>=c.length||"█"!==c[l]?-1:Math.floor(l/5)}(m,g,s,l,o);y<0&&p>328||d.push({x:u+t/2,y:h+r/2,dx:m,dy:g,dist:p,angle:Math.atan2(g,m),seed:(0,a.hash)(c,e),grain:(0,a.hash)(5.7*c+19,2.3*e+53),gap:.05+.3*(0,a.hash)(7.3*c+11,3.1*e+5),birth:(0,a.hash)(3.1*c+7,5.7*e+2),death:(0,a.hash)(9.4*c+3,2.6*e+8),emoji:(0,a.hash)(2.7*c+31,5.9*e+17)<a.EMOJI_RATIO,letter:y})}b.current=d,M.current={ascii:Array.from({length:a.RAMP.length},()=>new Int32Array(d.length)),emoji:Array.from({length:a.RAMP.length},()=>new Int32Array(d.length)),asciiN:new Int32Array(a.RAMP.length),emojiN:new Int32Array(a.RAMP.length),glyph:Array(d.length)};let p=Math.min(2,window.devicePixelRatio||1);e.width=f*p,e.height=f*p,e.style.width=`${f}px`,e.style.height=`${f}px`;let v=e.getContext("2d");return v&&(v.setTransform(p,0,0,p,0,0),v.font=`700 ${h}px ui-monospace,SFMono-Regular,Menlo,monospace`,v.textAlign="center",v.textBaseline="middle",x.current=v),()=>{v?.clearRect(0,0,f,f),b.current=[],M.current=null}},[h,m,f]),(0,r.useEffect)(()=>{let e=k.current;e.cur!==u&&(k.current={cur:u,prev:e.cur,start:.001*performance.now()})},[u]),(0,r.useEffect)(()=>{v.current=o},[o]),(0,r.useEffect)(()=>{A.current.target=g},[g]),(0,r.useEffect)(()=>{let e=.001*performance.now();N.current.mode!==n?(j.current={...N.current},N.current={mode:n,start:e},E.current=e):N.current={mode:n,start:e}},[n]),(0,r.useEffect)(()=>{let e=0,t=Array(28),r=.001*performance.now(),n=s=>{let i=.001*s,o=Math.min(.05,Math.max(0,i-r));r=i;let d=x.current,u=M.current;if(!d||!u){e=requestAnimationFrame(n);return}let h=v.current,{cw:m,ch:f,faceScale:g,size:p}=S.current;u.asciiN.fill(0),u.emojiN.fill(0);let y=w.current?.();if(y&&y.length>1){let e=y.length-1;for(let r=0;r<28;r++){let n=Math.abs((r/28*2+1)%2-1)*e,a=Math.floor(n),s=Math.min(e,a+1);t[r]=y[a]+(y[s]-y[a])*(n-a)}}else for(let e=0;e<28;e++){let r=.5*Math.sin(1.7*i+1.7*e)+.3*Math.sin(.8*i+.6*e)+.2*Math.sin(3*i+2.9*e);t[e]=.5*r+.5}let O=_.current,T=0;for(let e=0;e<28;e++)T+=t[e];if(T=Math.min(1,T/28*2.6),O.fast+=(T-O.fast)*.3,O.mid+=(T-O.mid)*.06,O.slow+=(T-O.slow)*.02,O.fast>1.25*O.mid+.02&&O.fast>.07&&i-O.lastOnset>.14){O.lastOnset=i;let e=Math.min(1,1.7*O.fast);O.bobVel+=.05*e,O.rings.push({born:i,power:e}),O.rings.length>5&&O.rings.shift()}O.bobVel+=-(.012*O.bob)-.09*O.bobVel,O.bob+=O.bobVel;for(let e=0;e<4;e++){let r=e/4*28|0,n=(e+1)/4*28|0,s=0;for(let e=r;e<n;e++)s+=t[e];s=Math.min(1,s/Math.max(1,n-r)*2.6);let l=.7+.6*(0,a.hash)((.9*i|0)+31*e,e);O.amp[e]+=(s*l-O.amp[e])*(.02+.012*e),O.phase[e]+=o*(.5+.37*e)*(e%2?-1:1)}for(;O.rings.length>0&&i-O.rings[0].born>.55;)O.rings.shift();let R=N.current,L=j.current,C=(0,a.smoothstep)(0,1,Math.min(1,(i-E.current)/1.5)),I=null!==L&&C<1,P="error"===R.mode||I&&L?.mode==="error",F=k.current,z=i-F.start,D=Math.min(1,Math.max(0,z/.36)),$=Math.min(1,Math.max(0,(z-.36-.14)/.95)),K=null!==F.cur||z<1.45,H=(e,t)=>{var r,n;let a,s;return r=t.dx,n=t.dy,a=Math.floor(r/(m*g)+10.5),(s=Math.floor(n/(f*g)+6.5))<0||s>=13||a<0||a>=21||"█"!==l[e][s][a]?0:s<7?1:2},U=(e,t)=>0===e?0:(1===e?1:.88)*(.74+.26*(1-Math.min(1,t.dist/270)))*(.42+.85*(0,a.hash)(Math.floor(.09*t.dx+.25*i),Math.floor(.09*t.dy-.18*i))),B=e=>{if(e.seed<.976)return 0;let t=195+160*(0,a.hash)(311*e.seed,9);return Math.exp(-((e.dist-t)**2)/7e3)*(.5+.5*Math.sin(i*(.5+1.5*(0,a.hash)(47*e.seed,21))+300*e.seed))*.36},q=b.current;for(let e=0;e<q.length;e++){let t=q[e],r=c(R.mode,t,i,i-R.start,O);if(I&&L){let e=c(L.mode,t,i,i-L.start,O);r=e+(r-e)*C}!(P&&t.letter>=0)&&((r*=(.66+.72*t.grain)*(.8+.4*(0,a.hash)(Math.floor(.05*t.dx+.5*i),Math.floor(.05*t.dy-.3*i))))>.3&&(0,a.hash)(31.7*Math.floor(1.6*i),613*t.seed)>.992&&(r=Math.max(r,.9)),r<t.gap+.05*Math.sin(.28*i+6.283*t.seed)&&(r=0));let n=!1;if(K){let e=(0,a.smoothstep)(0,1,(1.1*D-t.death)/.08),s=(0,a.smoothstep)(0,1,(1.1*$-t.birth)/.08),i=F.cur?H(F.cur,t):0,l=F.prev?H(F.prev,t):0,o=B(t);r=(F.prev?U(l,t)+o:r)*(1-e)+(F.cur?U(i,t)+o:r)*s,n=i>0&&s>.05||l>0&&e<.95}let s=(r=r<0?0:r>1?1:r)*(a.RAMP.length-1)|0;if(0===s)continue;let l=i*(n?.75:"emojiOnly"===h?a.EMOJI_CHAR_RATE:a.CHAR_RATE)+7*t.seed|0;if("emojiOnly"===h||"emoji"===h&&t.emoji&&s>=a.EMOJI_MIN_LEVEL){let r=((t.seed*a.EMOJI_POOL.length|0)+l)%a.EMOJI_POOL.length;u.glyph[e]=a.EMOJI_POOL[r],u.emoji[s][u.emojiN[s]++]=e}else{let r=a.RAMP[s],n=((t.seed*r.length|0)+l)%r.length;u.glyph[e]=r[n],u.ascii[s][u.asciiN[s]++]=e}}d.clearRect(0,0,p,p);let J=b.current,V=a.RAMP.length-1,W=A.current;for(let e=0;e<3;e++)W.cur[e]+=(W.target[e]-W.cur[e])*.05;d.fillStyle=`rgb(${0|W.cur[0]},${0|W.cur[1]},${0|W.cur[2]})`;for(let e=1;e<=V;e++){let t=u.asciiN[e];if(0===t)continue;d.globalAlpha=a.ALPHA_TOP*(e/V);let r=u.ascii[e];for(let e=0;e<t;e++){let t=J[r[e]];d.fillText(u.glyph[r[e]],t.x,t.y)}}for(let e=1;e<=V;e++){let t=u.emojiN[e];if(0===t)continue;d.globalAlpha=.35+e/V*.65;let r=u.emoji[e];for(let e=0;e<t;e++){let t=J[r[e]];d.fillText(u.glyph[r[e]],t.x,t.y)}}d.globalAlpha=1,!I&&L&&(j.current=null),e=requestAnimationFrame(n)};return e=requestAnimationFrame(n),()=>cancelAnimationFrame(e)},[]),(0,t.jsx)("canvas",{ref:y,className:e,"aria-hidden":!0,style:{display:"block",pointerEvents:"none"}})}var u=e.i(922521),h=e.i(647163);let m={idle:"idle",connecting:"connecting",listening:"listening",speaking:"speaking",working:"thinking",delegating:"delegating"},f={ripple:14,pulse:0,punch:0,stretch:0},g={idle:"idle",connecting:"connecting",listening:"connecting",speaking:"speaking",working:"working",delegating:"working"},p=[247,247,247],y=[10,10,10],x={mark:{label:"Mark",hint:"A silhouette with eyes. Blinks, glances, leans into a voice.",render:function({status:e,size:r,getSpectrum:a,look:s,className:i}){return(0,t.jsx)(n.BotMark,{size:r,seed:"thursday",color:s.color,shape:s.shape,outline:s.outline,state:m[e],getSpectrum:a,options:f,notify:!1,className:i})}},ascii:{label:"Ascii",hint:"A field of characters. No eyes — the whole orb is the expression.",render:function({status:e,size:r,getSpectrum:n,look:a,className:s}){let i="dark"===(0,u.useResolvedTheme)();return(0,t.jsx)(d,{mode:g[e],size:r,color:i?p:y,getSpectrum:n,charset:a.charset,fontSize:a.fontSize,density:a.density,className:s})}}},b=(0,r.memo)(function({look:e,status:n="idle",size:a=448,className:s,...i}){let l=(0,r.useRef)(null),[o,c]=(0,r.useState)(a),[d,u]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=l.current;if(!e)return;let t=new ResizeObserver(([e])=>{let t=Math.round(e.contentRect.width);t>0&&c(t)});return t.observe(e),()=>t.disconnect()},[]),(0,r.useEffect)(()=>{let e=requestAnimationFrame(()=>u(!0));return()=>cancelAnimationFrame(e)},[]);let m=x[e.kind].render;return(0,t.jsx)("div",{ref:l,className:(0,h.cn)("aspect-square transition-opacity duration-700 ease-out",d?"opacity-100":"opacity-0",s),children:(0,t.jsx)(m,{...i,look:e,status:n,size:o})})});e.s(["FACES",0,x,"Face",0,b],333495)},762074,e=>{"use strict";var t=e.i(271645),r=e.i(671228);let n="thursday.icon";function a(){try{let e=window.localStorage.getItem(n);return r.ThursdayFaceSchema.parse(e?JSON.parse(e):{})}catch{return r.FACE_DEFAULT}}let s=a(),i=new Set;function l(){for(let e of i)e()}e.s(["setThursdayFace",0,function(e){s=e;try{window.localStorage.setItem(n,JSON.stringify(e))}catch{}l()},"useThursdayFace",0,function(){return(0,t.useSyncExternalStore)(e=>{i.add(e);let t=e=>{e.key===n&&(s=a(),l())};return window.addEventListener("storage",t),()=>{i.delete(e),window.removeEventListener("storage",t)}},()=>s,()=>r.FACE_DEFAULT)}])},67045,e=>{"use strict";let t,r;var n=e.i(768834);let a=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>a(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>a(t)(e)}}};var s=e.i(671228);let i=s.ThursdaySettingsSchema.extend({wake:s.WakeSchema.catch(s.WAKE_DEFAULT),hotkey:s.HotkeySchema.catch(s.HOTKEY_DEFAULT),callBack:s.CallBackSchema.catch(s.CALL_BACK_DEFAULT),captionView:s.CaptionViewSchema.catch("center")}),l={systemPrompt:null,model:null,wake:s.WAKE_DEFAULT,hotkey:s.HOTKEY_DEFAULT,callBack:s.CALL_BACK_DEFAULT,captionView:"center"},o=(0,n.create)()((t=e=>({...l,patch:t=>e(t)}),r={name:"thursday.settings",merge:(e,t)=>{let r=i.safeParse(e);return{...t,...r.success?r.data:l}}},(e,n,s)=>{let i,l={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e,void 0),a=null!=(r=t.getItem(e))?r:null;return a instanceof Promise?a.then(n):n(a)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r,void 0)),removeItem:e=>t.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...r},o=!1,c=0,d=new Set,u=new Set,h=l.storage;if(!h)return t((...t)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),e(...t)});let m=()=>{let e=l.partialize({...n()});return h.setItem(l.name,{state:e,version:l.version})},f=s.setState;s.setState=(e,t)=>(f(e,t),m());let g=t((...t)=>(e(...t),m()));s.getInitialState=()=>g;let p=()=>{var t,r;if(!h)return;let s=++c;o=!1,d.forEach(e=>{var t;return e(null!=(t=n())?t:g)});let f=(null==(r=l.onRehydrateStorage)?void 0:r.call(l,null!=(t=n())?t:g))||void 0;return a(h.getItem.bind(h))(l.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===l.version)return[!1,e.state];else{if(l.migrate){let t=l.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(t=>{var r;if(s!==c)return;let[a,o]=t;if(e(i=l.merge(o,null!=(r=n())?r:g),!0),a)return m()}).then(()=>{s===c&&(null==f||f(n(),void 0),i=n(),o=!0,u.forEach(e=>e(i)))}).catch(e=>{s===c&&(null==f||f(void 0,e))})};return s.persist={setOptions:e=>{l={...l,...e},e.storage&&(h=e.storage)},clearStorage:()=>{++c,null==h||h.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:e=>(d.add(e),()=>{d.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},l.skipHydration||p(),i||g}));e.s(["thursdaySettings",0,()=>{let{systemPrompt:e,model:t}=o.getState();return{systemPrompt:e,model:t,locale:"u"<typeof navigator?null:navigator.language??null}},"useThursdayStore",0,o],67045)},561540,e=>{"use strict";var t=e.i(213377);let r={[t.TOOL_NAMES.memory_recall]:"Checking your notes",[t.TOOL_NAMES.memory_remember]:"Noting that down",[t.TOOL_NAMES.memory_forget]:"Forgetting that",[t.TOOL_NAMES.memory_show]:"Putting your notes on screen",[t.TOOL_NAMES.bash]:"Doing it on this computer",[t.TOOL_NAMES.web_search]:"Searching the web",[t.TOOL_NAMES.load_skill]:"Reading how to do this",[t.TOOL_NAMES.end_call]:"Ending the call"};e.s(["toolLine",0,function(e,n){let a;if(e===t.TOOL_NAMES.tool_search||e===t.TOOL_NAMES.tool_call)return"Reaching a connected service";let s=null;if(n)try{let e=JSON.parse(n);e&&"object"==typeof e&&!Array.isArray(e)&&(s=e)}catch{}return(s&&function(e,r){if(e===t.TOOL_NAMES.delegate){let e="string"==typeof r.bot?r.bot.trim():"";return e?`Handing this to ${e}`:"Handing this over"}if(e===t.TOOL_NAMES.task){let e="string"==typeof r.task?r.task.trim():"";return"answer"===r.action?"Passing that back":"cancel"===r.action?"Stopping that":e?`Checking on ${e}`:"Checking the jobs"}return null}(e,s))??r[e]??((a=e.indexOf("__"))<=0?null:`Reaching ${e.slice(0,a).replace(/[-_]/g," ")}`)}])},319841,e=>{"use strict";var t=e.i(271645);let r=["ctrl","alt","meta"],n=/^(Control|Alt|Shift|Meta|OS)/,a=/^(input|textarea|select)$/i;function s(e){let{code:t,ctrlKey:r,altKey:a,shiftKey:s,metaKey:i}=e;if(!t||n.test(t)||!r&&!a&&!i)return null;let l=[];return r&&l.push("ctrl"),a&&l.push("alt"),s&&l.push("shift"),i&&l.push("meta"),[...l,t].join("+")}let i={ctrl:["Ctrl","⌃"],alt:["Alt","⌥"],shift:["Shift","⇧"],meta:["Meta","⌘"]};e.s(["HOTKEY_CAPTURE",0,{"data-hotkey-capture":""},"comboOf",0,s,"isCombo",0,e=>{let t=e.split("+"),a=t.at(-1);return!!(a&&!n.test(a)&&t.slice(0,-1).some(e=>r.includes(e)))},"useHotkey",0,function({enabled:e,combo:r,onPress:n}){let i=(0,t.useRef)(n);i.current=n,(0,t.useEffect)(()=>{if(!e||!r)return;let t=e=>{var t;e.repeat||(t=e.target)&&(a.test(t.tagName)||t.isContentEditable||t.closest?.("[data-hotkey-capture]"))||s(e)===r&&(e.preventDefault(),i.current())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,r])},"useHotkeyLabel",0,function(e){let[r,n]=(0,t.useState)(!1);return(0,t.useEffect)(()=>n(/mac/i.test(navigator.userAgent)),[]),e?function(e,t=!1){let r=e.split("+"),n=r.at(-1)??"",a=r.slice(0,-1).map(e=>i[e]?.[+!!t]??e),s=n.replace(/^(Key|Digit|Numpad)/,"").replace(/([a-z])([A-Z])/g,"$1 $2")||n;return t?[...a,s].join(""):[...a,s].join(" + ")}(e,r):null}])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,213377,e=>{"use strict";e.s(["TOOL_NAMES",0,{memory_recall:"memory_recall",memory_remember:"memory_remember",memory_forget:"memory_forget",memory_show:"memory_show",bash:"bash",write_file:"write_file",tool_search:"tool_search",tool_call:"tool_call",load_skill:"load_skill",web_search:"web_search",delegate:"delegate",task:"task",ask_bot:"ask_bot",ask_thursday:"ask_thursday",ask_back:"ask_back",report:"report",end_call:"end_call",tidy_done:"tidy_done"}])},692329,933916,671228,e=>{"use strict";var t=e.i(843476),r=e.i(493801),n=e.i(456420);let a={name:"arrow-right",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]};a.node;let s=(0,n.default)(a);var i=e.i(867927),l=e.i(632781);let o={name:"minus",size:24,node:[["path",{d:"M5 12h14",key:"1ays0h"}]]};o.node;let c=(0,n.default)(o);var d=e.i(751898);let u={name:"pin-off",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89",key:"znwnzq"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11",key:"c9qhm2"}]]};u.node;let h=(0,n.default)(u);var m=e.i(77071),f=e.i(466787),g=e.i(271645),p=e.i(511769),y=e.i(798120),x=e.i(167881),b=e.i(917162),M=e.i(671428),v=e.i(6799),A=e.i(146538),S=e.i(852116),k=e.i(95187);let w=(0,k.createServerReference)("7fdb8473e59f512984c2436dedd58ac1bdf8f6485b",k.callServer,void 0,k.findSourceMapURL,"cancelMemoryTidyAction"),_=(0,k.createServerReference)("7f7f2e13af3c5904d3e16d58ee40cd2c13ba6e22b8",k.callServer,void 0,k.findSourceMapURL,"runMemoryTidyAction"),N=(0,k.createServerReference)("7f2c778d24b4691627d013873c31cb47eaa8b20aca",k.callServer,void 0,k.findSourceMapURL,"setMemoryTidyModelAction"),j=(0,k.createServerReference)("7f7feb80df7bba657c908ec68cc4b599fe7aab5be2",k.callServer,void 0,k.findSourceMapURL,"setMemoryTidyOnAction");var E=e.i(536015),O=e.i(895836),T=e.i(989409),R=e.i(245629),L=e.i(609856),C=e.i(283653),I=e.i(647163);function P({status:e}){let r=e.current,n=e.last;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"border-t border-border/60",children:[(0,t.jsx)(F,{value:e.model}),(0,t.jsxs)("div",{className:"flex items-center gap-3 border-t border-border/60 py-2",children:[(0,t.jsx)("span",{className:"w-20 shrink-0 text-[13px] text-muted-foreground",children:r?"Reading":"Last read"}),r?(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-2 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(l.Loader2,{className:"size-3.5 shrink-0 animate-spin"}),(0,t.jsxs)("span",{className:"truncate",children:["the last ",r.messages," ",1===r.messages?"message":"messages"]})]}):(0,t.jsx)(z,{run:n}),(0,t.jsx)(D,{run:r??n})]})]}),(0,t.jsx)(O.SettingNote,{className:(0,I.cn)(!e.model&&I.WAITING_INK),children:e.model?`Reads back after every ${e.every} messages of talk. ${e.pending} since the last one.`:"Nothing is read back until a model is picked — this never runs on the app default."})]})}function F({value:e}){return(0,t.jsxs)("button",{type:"button",onClick:()=>{var r;return r=e,b.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)($,{current:r,onDone:e})})},className:"flex w-full items-center gap-3 py-2 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)("span",{className:"w-20 shrink-0 text-[13px] text-muted-foreground",children:"Model"}),(0,t.jsx)("span",{className:(0,I.cn)("min-w-0 flex-1 truncate font-mono text-[11px]",e?"text-muted-foreground":I.WAITING_INK),children:e??"Not picked"}),(0,t.jsx)(i.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60"})]})}function z({run:e}){if(!e)return(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:"Nothing read back yet"});let n=(0,r.formatDistanceToNowStrict)((0,R.toDate)(e.endedAt??e.startedAt),{addSuffix:!0});return"done"!==e.status?(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-1.5 text-destructive",children:[(0,t.jsx)(f.TriangleAlert,{className:"size-3.5 shrink-0"}),(0,t.jsxs)("span",{className:"truncate font-mono text-[11px]",children:["failed"===e.status?"Failed":"Stopped"," ",n,e.error?` — ${e.error}`:""]})]}):(0,t.jsxs)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-muted-foreground",children:[n," · ",(0,E.tidyTally)(e.changes)]})}function D({run:e}){return e?(0,t.jsx)("button",{type:"button","aria-label":"What the last read changed",onClick:()=>K(),className:"shrink-0 outline-none focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(i.ChevronRight,{className:"size-4 text-muted-foreground/60"})}):(0,t.jsx)("span",{className:"size-4 shrink-0"})}function $({current:e,onDone:r}){let[n,a]=(0,L.useServerAction)(N,{onOk:()=>{(0,C.revalidate)(y.queryKey.memoryTidy),r()}}),s=e?.split("/")??null,[i,l]=(0,g.useState)({provider:s?.[0]??null,model:s?.slice(1).join("/")??""});return(0,t.jsx)(O.SettingDialogContent,{title:"Model",description:"What re-reads a call. There is no default: without a pick nothing is read back, so a model nobody chose never spends.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Button,{variant:"ghost",onClick:()=>n(""),children:"Clear"}),(0,t.jsx)(x.Button,{loading:a,disabled:!i.provider||!i.model.trim(),onClick:()=>n(`${i.provider}/${i.model.trim()}`),children:"Save"})]}),children:(0,t.jsx)(A.ModelPicker,{provider:i.provider,model:i.model,onChange:l})})}function K(){return b.notify.component({className:"sm:max-w-2xl",renderer:()=>(0,t.jsx)(H,{})})}function H(){let{data:e}=(0,C.useServerRoute)(y.queryKey.memoryTidy),n={onOk:()=>(0,C.revalidate)(y.queryKey.memoryTidy)},[a,s]=(0,L.useServerAction)(_,n),[i,l]=(0,L.useServerAction)(w,n);if(!e)return(0,t.jsx)(O.SettingDialogContent,{title:"What the last read changed",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(M.Skeleton,{className:"h-4 w-2/3"}),(0,t.jsx)(M.Skeleton,{className:"h-4 w-full"}),(0,t.jsx)(M.Skeleton,{className:"h-4 w-4/5"})]})});let o=e.current??e.last,c=o?(0,r.formatDistanceToNowStrict)((0,R.toDate)(o.endedAt??o.startedAt),{addSuffix:!0}):"";return(0,t.jsx)(O.SettingDialogContent,{title:"What the last read changed",description:"Memory as it stands after the model read those messages back. Every line here is one it wrote, revised or dropped.",footer:e.current?(0,t.jsx)(x.Button,{variant:"outline",loading:l,onClick:()=>i(),children:"Stop"}):(0,t.jsxs)(x.Button,{variant:"outline",loading:s,disabled:0===e.pending||!e.model,onClick:()=>a(),children:[!s&&(0,t.jsx)(S.MemoryMark,{className:"size-3.5"}),"Read now"]}),children:o?(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 text-sm",children:e.current?`Reading the last ${o.messages} messages`:`${o.messages} messages, ${c}`}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground",children:["-"!==o.provider&&o.model,o.inputTokens>0&&` \xb7 ${o.inputTokens.toLocaleString()} in / ${o.outputTokens.toLocaleString()} out`]})]}),o.error&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:o.error}),o.changes.length>0?(0,t.jsx)("ul",{className:"border-b border-border/60",children:o.changes.map((e,r)=>(0,t.jsx)(B,{change:e},`${r}-${e.op}-${e.text}`))}):!e.current&&(0,t.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Nothing needed changing."})]}):(0,t.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Nothing has been read back yet."})})}let U={add:{icon:m.Plus,label:"added"},replace:{icon:s,label:"revised"},forget:{icon:c,label:"dropped"},carry:{icon:d.Pin,label:"carried into every call"},uncarry:{icon:h,label:"no longer carried"}};function B({change:e}){let{icon:r,label:n}=U[e.op];return(0,t.jsxs)("li",{className:"flex gap-3 border-t border-border/60 py-3",children:[(0,t.jsxs)("span",{className:"flex w-3.5 shrink-0 justify-center pt-1 text-muted-foreground",children:[(0,t.jsx)(r,{className:"size-3.5"}),(0,t.jsx)("span",{className:"sr-only",children:n})]}),(0,t.jsx)("span",{className:"min-w-0 flex-1 text-sm leading-relaxed text-foreground/90",children:e.text}),(0,t.jsx)("span",{className:"shrink-0 pt-0.5 font-mono text-[11px] text-muted-foreground/50",children:e.path})]})}e.s(["MemoryTidyNotice",0,function(){return(0,p.useAppEvent)({"memory-tidied":e=>{v.toast.add({type:e.failed?"error":"success",title:e.failed?"Could not read the call back":"Memory tidied",description:e.tally,actionProps:{children:"Show",onClick:()=>{(0,T.openSettings)("thursday"),K()}}})}}),null},"TidySetting",0,function(){let{data:e}=(0,C.useServerRoute)(y.queryKey.memoryTidy),[r]=(0,L.useServerAction)(j,{onOk:()=>(0,C.revalidate)(y.queryKey.memoryTidy)});return(0,t.jsx)(O.SettingGroup,{label:"After a call",children:(0,t.jsx)(O.SettingToggle,{label:"Read the call back",description:"During a call she saves what she catches between sentences. Afterwards a model reads the whole thing back and fixes what she missed.",checked:e?.on??!1,disabled:!e,onChange:e=>r(e),children:e&&(0,t.jsx)(P,{status:e})})})}],692329);var q=e.i(504565),J=e.i(265402),V=e.i(451888);let W=["mark","ascii"],Y=["ascii","emoji","emojiOnly"];e.s(["ASCII_CHARSETS",0,Y,"FACE_KINDS",0,W],933916);var G=e.i(981203);let Z=q.default.object({systemPrompt:q.default.string().max(G.COMMON_VALIDATE.prompt.max).nullish(),model:J.speachModelRefSchema.nullish(),locale:q.default.string().max(35).nullish()}),Q=V.botIconSchema.extend({kind:q.default.enum(W).default("ascii"),charset:q.default.enum(Y).default("ascii"),fontSize:q.default.number().min(4).max(16).default(8),density:q.default.number().min(.6).max(2).default(1.4)}),X=Q.parse({}),ee={min:3,max:32},et=q.default.object({enabled:q.default.boolean(),phrase:q.default.string().trim().min(ee.min).max(ee.max)}),er=q.default.object({enabled:q.default.boolean(),combo:q.default.string().trim().min(1).max(64)}),en=["off","waiting","any"],ea=q.default.enum(en),es=["center","sides"],ei=q.default.enum(es);q.default.object({id:q.default.string().min(1),role:q.default.enum(["user","assistant","tool"]),tool:q.default.string().nullish(),text:q.default.string(),seq:q.default.number().int().min(0)}),e.s(["CALL_BACK_DEFAULT",0,"off","CALL_BACK_LABEL",0,{off:"Never",waiting:"When a job needs me",any:"Whenever a job ends"},"CALL_BACK_MODES",0,en,"CALL_HISTORY_PAGE",0,10,"CAPTION_VIEWS",0,es,"CallBackSchema",0,ea,"CaptionViewSchema",0,ei,"FACE_DEFAULT",0,X,"HOTKEY_DEFAULT",0,{enabled:!0,combo:"alt+shift+KeyT"},"HotkeySchema",0,er,"ThursdayFaceSchema",0,Q,"ThursdaySettingsSchema",0,Z,"WAKE_DEFAULT",0,{enabled:!0,phrase:"hey thursday"},"WAKE_PHRASE",0,ee,"WakeSchema",0,et],671228)},567334,e=>{"use strict";e.s(["ALPHA_TOP",0,.82,"CHAR_RATE",0,2.2,"EMOJI_CHAR_RATE",0,.6,"EMOJI_MIN_LEVEL",0,6,"EMOJI_POOL",0,["🍎","🌹","🍓","❤️","🎈","🧨","🔴","🍊","🔥","🦊","🏀","🧡","🍑","⭐","🍋","🌻","💛","🐥","🌟","🍌","🍀","🌿","🐸","🥝","💚","🌵","🥑","💧","🌊","🫐","🐳","💙","🔵","🧊","🍇","💜","🔮","🟣","🪻","🍆","🌸","🌷","💗","🦩","🩷","🍫","🐻","🌰","🥐","🤍","☁️","🖤","⚪","⚫","🦢","🌈","🦜","🎨","🪩","🦄","✨","🍬","🎡"],"EMOJI_RATIO",0,.11,"RAMP",0,[[" "],[" ",".","`"],[".",",","·","'"],[":",";","-","^"],["=","+","~",'"'],["*","?","◦","j"],["c","v","○","7"],["o","x","◇","い"],["s","y","t","あ"],["e","a","u","な"],["k","w","z","や"],["q","h","n","米"]],"hash",0,function(e,t){let r=43758.5453*Math.sin(127.1*e+311.7*t);return r-Math.floor(r)},"smoothstep",0,function(e,t,r){let n=Math.min(1,Math.max(0,(r-e)/(t-e)));return n*n*(3-2*n)}])},333495,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(635963),a=e.i(567334);let s=[235,235,235],i=["████ ███ ███ ██ ███ ","█ █ █ █ █ █ █ █ █","███ ███ ███ █ █ ███ ","█ █ █ █ █ █ █ █ █ ","████ █ █ █ █ ██ █ █"],l={happy:[".....................",".....................","....███.......███....","...█████.....█████...","...█████.....█████...","....███.......███....",".....................",".....................","█...................█",".██...............██.","...███.........███...","......█████████......","....................."],sad:[".....................",".....................","....███.......███....","...█████.....█████...","...█████.....█████...","....███.......███....",".....................",".....................","......█████████......","...███.........███...",".██...............██.","█...................█","....................."],love:[".....................","...██.██.....██.██...","..███████...███████..","..███████...███████..","...█████.....█████...","....███.......███....",".....█.........█.....",".....................","█...................█",".██...............██.","...███.........███...","......█████████......","....................."]};function o(e,t){let r=1-(0,a.smoothstep)(104.50000000000001,190,e.dist);return(.58+.2*Math.sin(.05*e.dist-.4*t)+.07*Math.sin(.35*t))*r}function c(e,t,r,n,s){switch(e){case"idle":return o(t,r)*(0,a.smoothstep)(0,1,Math.min(1,n/1.5));case"connecting":{let e=(0,a.smoothstep)(0,1,Math.min(1,n/1.8)),s=t.dist-235*e;return Math.exp(-(s*s)/6e3)*(.2+.85*(0,a.hash)(Math.floor(t.dist/9),Math.floor(11*t.angle))+.5*(0,a.hash)(137*t.seed,7))*e+o(t,r)*(1-e)}case"speaking":{let e=(0,a.smoothstep)(0,1,Math.min(1,n/.8)),i=190+(58*s.slow+58*s.bob)*e;for(let r=0;r<4;r++)i+=40*s.amp[r]*Math.sin((r+2)*t.angle+s.phase[r])*e;let l=Math.max(130,Math.min(278,i)),o=t.dist-l,c=Math.exp(-(o*o)/900),d=.55*Math.exp(-(t.dist*t.dist)/6e3),u=t.dist<l?.3*(1-t.dist/l)**.6:0,h=0;for(let e=0;e<s.rings.length;e++){let n=s.rings[e],a=r-n.born,i=t.dist-(l+100*a);h+=Math.exp(-(i*i)/2200)*n.power*Math.max(0,1-a/.55)}return c+d+u+.8*h}case"working":{let e=(0,a.smoothstep)(0,1,Math.min(1,n/.7)),s=t.dist-238,i=Math.exp(-(s*s)/1100),l=t.angle-3*r,c=Math.atan2(Math.sin(l),Math.cos(l));return i*Math.exp(-(c*c)/(c<0?2.8:.16))*e+o(t,r)*(1-e)}case"error":{if(t.letter<0)return 0;let e=n%9.2,s=t.letter,i=.12*t.seed;return Math.max(0,(0,a.smoothstep)(0,1,(e-.65*s-i)/.8)-(0,a.smoothstep)(0,1,(e-5.6-.5*s-i)/.7))*(.86+.14*Math.sin(3.5*r+6*t.seed))}}}function d({className:e,mode:n="idle",charset:o="ascii",emotion:u=null,fontSize:h=8,density:m=1.4,size:f=680,color:g=s,getSpectrum:p}){let y=(0,r.useRef)(null),x=(0,r.useRef)(null),b=(0,r.useRef)([]),M=(0,r.useRef)(null),v=(0,r.useRef)(o),A=(0,r.useRef)({cur:[...g],target:g}),S=(0,r.useRef)({cw:1,ch:1,errScale:3,faceScale:3,size:0}),k=(0,r.useRef)({cur:u,prev:null,start:-1/0}),w=(0,r.useRef)(p);w.current=p;let _=(0,r.useRef)({fast:0,mid:0,slow:0,bob:0,bobVel:0,lastOnset:-1/0,amp:[,,,,].fill(0),phase:Array.from({length:4},(e,t)=>2.1*t),rings:[]}),N=(0,r.useRef)({mode:n,start:0}),j=(0,r.useRef)(null),E=(0,r.useRef)(-1/0);return(0,r.useEffect)(()=>{let e=y.current;if(!e)return;let t=.95*h/m,r=1.25*h/m,n=680/f,s=t*n,l=r*n,o=Math.max(1,Math.floor(625.6/(i[0].length*s))),c=Math.max(1,Math.floor(557.6/(21*s)));S.current={cw:s,ch:l,errScale:o,faceScale:c,size:f};let d=[],u=Math.ceil(f/t),g=Math.ceil(f/r);for(let e=0;e<g;e++)for(let c=0;c<u;c++){let u=c*t,h=e*r,m=(u-f/2)*n,g=(h-f/2)*n,p=Math.hypot(m,g),y=function(e,t,r,n,a){let s=i.length,l=Math.floor(e/(r*a)+i[0].length/2),o=Math.floor(t/(n*a)+s/2);if(o<0||o>=s)return -1;let c=i[o];return l<0||l>=c.length||"█"!==c[l]?-1:Math.floor(l/5)}(m,g,s,l,o);y<0&&p>328||d.push({x:u+t/2,y:h+r/2,dx:m,dy:g,dist:p,angle:Math.atan2(g,m),seed:(0,a.hash)(c,e),grain:(0,a.hash)(5.7*c+19,2.3*e+53),gap:.05+.3*(0,a.hash)(7.3*c+11,3.1*e+5),birth:(0,a.hash)(3.1*c+7,5.7*e+2),death:(0,a.hash)(9.4*c+3,2.6*e+8),emoji:(0,a.hash)(2.7*c+31,5.9*e+17)<a.EMOJI_RATIO,letter:y})}b.current=d,M.current={ascii:Array.from({length:a.RAMP.length},()=>new Int32Array(d.length)),emoji:Array.from({length:a.RAMP.length},()=>new Int32Array(d.length)),asciiN:new Int32Array(a.RAMP.length),emojiN:new Int32Array(a.RAMP.length),glyph:Array(d.length)};let p=Math.min(2,window.devicePixelRatio||1);e.width=f*p,e.height=f*p,e.style.width=`${f}px`,e.style.height=`${f}px`;let v=e.getContext("2d");return v&&(v.setTransform(p,0,0,p,0,0),v.font=`700 ${h}px ui-monospace,SFMono-Regular,Menlo,monospace`,v.textAlign="center",v.textBaseline="middle",x.current=v),()=>{v?.clearRect(0,0,f,f),b.current=[],M.current=null}},[h,m,f]),(0,r.useEffect)(()=>{let e=k.current;e.cur!==u&&(k.current={cur:u,prev:e.cur,start:.001*performance.now()})},[u]),(0,r.useEffect)(()=>{v.current=o},[o]),(0,r.useEffect)(()=>{A.current.target=g},[g]),(0,r.useEffect)(()=>{let e=.001*performance.now();N.current.mode!==n?(j.current={...N.current},N.current={mode:n,start:e},E.current=e):N.current={mode:n,start:e}},[n]),(0,r.useEffect)(()=>{let e=0,t=Array(28),r=.001*performance.now(),n=s=>{let i=.001*s,o=Math.min(.05,Math.max(0,i-r));r=i;let d=x.current,u=M.current;if(!d||!u){e=requestAnimationFrame(n);return}let h=v.current,{cw:m,ch:f,faceScale:g,size:p}=S.current;u.asciiN.fill(0),u.emojiN.fill(0);let y=w.current?.();if(y&&y.length>1){let e=y.length-1;for(let r=0;r<28;r++){let n=Math.abs((r/28*2+1)%2-1)*e,a=Math.floor(n),s=Math.min(e,a+1);t[r]=y[a]+(y[s]-y[a])*(n-a)}}else for(let e=0;e<28;e++){let r=.5*Math.sin(1.7*i+1.7*e)+.3*Math.sin(.8*i+.6*e)+.2*Math.sin(3*i+2.9*e);t[e]=.5*r+.5}let O=_.current,T=0;for(let e=0;e<28;e++)T+=t[e];if(T=Math.min(1,T/28*2.6),O.fast+=(T-O.fast)*.3,O.mid+=(T-O.mid)*.06,O.slow+=(T-O.slow)*.02,O.fast>1.25*O.mid+.02&&O.fast>.07&&i-O.lastOnset>.14){O.lastOnset=i;let e=Math.min(1,1.7*O.fast);O.bobVel+=.05*e,O.rings.push({born:i,power:e}),O.rings.length>5&&O.rings.shift()}O.bobVel+=-(.012*O.bob)-.09*O.bobVel,O.bob+=O.bobVel;for(let e=0;e<4;e++){let r=e/4*28|0,n=(e+1)/4*28|0,s=0;for(let e=r;e<n;e++)s+=t[e];s=Math.min(1,s/Math.max(1,n-r)*2.6);let l=.7+.6*(0,a.hash)((.9*i|0)+31*e,e);O.amp[e]+=(s*l-O.amp[e])*(.02+.012*e),O.phase[e]+=o*(.5+.37*e)*(e%2?-1:1)}for(;O.rings.length>0&&i-O.rings[0].born>.55;)O.rings.shift();let R=N.current,L=j.current,C=(0,a.smoothstep)(0,1,Math.min(1,(i-E.current)/1.5)),I=null!==L&&C<1,P="error"===R.mode||I&&L?.mode==="error",F=k.current,z=i-F.start,D=Math.min(1,Math.max(0,z/.36)),$=Math.min(1,Math.max(0,(z-.36-.14)/.95)),K=null!==F.cur||z<1.45,H=(e,t)=>{var r,n;let a,s;return r=t.dx,n=t.dy,a=Math.floor(r/(m*g)+10.5),(s=Math.floor(n/(f*g)+6.5))<0||s>=13||a<0||a>=21||"█"!==l[e][s][a]?0:s<7?1:2},U=(e,t)=>0===e?0:(1===e?1:.88)*(.74+.26*(1-Math.min(1,t.dist/270)))*(.42+.85*(0,a.hash)(Math.floor(.09*t.dx+.25*i),Math.floor(.09*t.dy-.18*i))),B=e=>{if(e.seed<.976)return 0;let t=195+160*(0,a.hash)(311*e.seed,9);return Math.exp(-((e.dist-t)**2)/7e3)*(.5+.5*Math.sin(i*(.5+1.5*(0,a.hash)(47*e.seed,21))+300*e.seed))*.36},q=b.current;for(let e=0;e<q.length;e++){let t=q[e],r=c(R.mode,t,i,i-R.start,O);if(I&&L){let e=c(L.mode,t,i,i-L.start,O);r=e+(r-e)*C}!(P&&t.letter>=0)&&((r*=(.66+.72*t.grain)*(.8+.4*(0,a.hash)(Math.floor(.05*t.dx+.5*i),Math.floor(.05*t.dy-.3*i))))>.3&&(0,a.hash)(31.7*Math.floor(1.6*i),613*t.seed)>.992&&(r=Math.max(r,.9)),r<t.gap+.05*Math.sin(.28*i+6.283*t.seed)&&(r=0));let n=!1;if(K){let e=(0,a.smoothstep)(0,1,(1.1*D-t.death)/.08),s=(0,a.smoothstep)(0,1,(1.1*$-t.birth)/.08),i=F.cur?H(F.cur,t):0,l=F.prev?H(F.prev,t):0,o=B(t);r=(F.prev?U(l,t)+o:r)*(1-e)+(F.cur?U(i,t)+o:r)*s,n=i>0&&s>.05||l>0&&e<.95}let s=(r=r<0?0:r>1?1:r)*(a.RAMP.length-1)|0;if(0===s)continue;let l=i*(n?.75:"emojiOnly"===h?a.EMOJI_CHAR_RATE:a.CHAR_RATE)+7*t.seed|0;if("emojiOnly"===h||"emoji"===h&&t.emoji&&s>=a.EMOJI_MIN_LEVEL){let r=((t.seed*a.EMOJI_POOL.length|0)+l)%a.EMOJI_POOL.length;u.glyph[e]=a.EMOJI_POOL[r],u.emoji[s][u.emojiN[s]++]=e}else{let r=a.RAMP[s],n=((t.seed*r.length|0)+l)%r.length;u.glyph[e]=r[n],u.ascii[s][u.asciiN[s]++]=e}}d.clearRect(0,0,p,p);let J=b.current,V=a.RAMP.length-1,W=A.current;for(let e=0;e<3;e++)W.cur[e]+=(W.target[e]-W.cur[e])*.05;d.fillStyle=`rgb(${0|W.cur[0]},${0|W.cur[1]},${0|W.cur[2]})`;for(let e=1;e<=V;e++){let t=u.asciiN[e];if(0===t)continue;d.globalAlpha=a.ALPHA_TOP*(e/V);let r=u.ascii[e];for(let e=0;e<t;e++){let t=J[r[e]];d.fillText(u.glyph[r[e]],t.x,t.y)}}for(let e=1;e<=V;e++){let t=u.emojiN[e];if(0===t)continue;d.globalAlpha=.35+e/V*.65;let r=u.emoji[e];for(let e=0;e<t;e++){let t=J[r[e]];d.fillText(u.glyph[r[e]],t.x,t.y)}}d.globalAlpha=1,!I&&L&&(j.current=null),e=requestAnimationFrame(n)};return e=requestAnimationFrame(n),()=>cancelAnimationFrame(e)},[]),(0,t.jsx)("canvas",{ref:y,className:e,"aria-hidden":!0,style:{display:"block",pointerEvents:"none"}})}var u=e.i(922521),h=e.i(647163);let m={idle:"idle",connecting:"connecting",listening:"listening",speaking:"speaking",working:"thinking",delegating:"delegating"},f={ripple:14,pulse:0,punch:0,stretch:0},g={idle:"idle",connecting:"connecting",listening:"connecting",speaking:"speaking",working:"working",delegating:"working"},p=[247,247,247],y=[10,10,10],x={mark:{label:"Mark",hint:"A silhouette with eyes. Blinks, glances, leans into a voice.",render:function({status:e,size:r,getSpectrum:a,look:s,className:i}){return(0,t.jsx)(n.BotMark,{size:r,seed:"thursday",color:s.color,shape:s.shape,outline:s.outline,state:m[e],getSpectrum:a,options:f,notify:!1,className:i})}},ascii:{label:"Ascii",hint:"A field of characters. No eyes — the whole orb is the expression.",render:function({status:e,size:r,getSpectrum:n,look:a,className:s}){let i="dark"===(0,u.useResolvedTheme)();return(0,t.jsx)(d,{mode:g[e],size:r,color:i?p:y,getSpectrum:n,charset:a.charset,fontSize:a.fontSize,density:a.density,className:s})}}},b=(0,r.memo)(function({look:e,status:n="idle",size:a=448,className:s,...i}){let l=(0,r.useRef)(null),[o,c]=(0,r.useState)(a),[d,u]=(0,r.useState)(!1);(0,r.useEffect)(()=>{let e=l.current;if(!e)return;let t=new ResizeObserver(([e])=>{let t=Math.round(e.contentRect.width);t>0&&c(t)});return t.observe(e),()=>t.disconnect()},[]),(0,r.useEffect)(()=>{let e=requestAnimationFrame(()=>u(!0));return()=>cancelAnimationFrame(e)},[]);let m=x[e.kind].render;return(0,t.jsx)("div",{ref:l,className:(0,h.cn)("aspect-square transition-opacity duration-700 ease-out",d?"opacity-100":"opacity-0",s),children:(0,t.jsx)(m,{...i,look:e,status:n,size:o})})});e.s(["FACES",0,x,"Face",0,b],333495)},762074,e=>{"use strict";var t=e.i(271645),r=e.i(671228);let n="thursday.icon";function a(){try{let e=window.localStorage.getItem(n);return r.ThursdayFaceSchema.parse(e?JSON.parse(e):{})}catch{return r.FACE_DEFAULT}}let s=a(),i=new Set;function l(){for(let e of i)e()}e.s(["setThursdayFace",0,function(e){s=e;try{window.localStorage.setItem(n,JSON.stringify(e))}catch{}l()},"useThursdayFace",0,function(){return(0,t.useSyncExternalStore)(e=>{i.add(e);let t=e=>{e.key===n&&(s=a(),l())};return window.addEventListener("storage",t),()=>{i.delete(e),window.removeEventListener("storage",t)}},()=>s,()=>r.FACE_DEFAULT)}])},67045,e=>{"use strict";let t,r;var n=e.i(768834);let a=e=>t=>{try{let r=e(t);if(r instanceof Promise)return r;return{then:e=>a(e)(r),catch(e){return this}}}catch(e){return{then(e){return this},catch:t=>a(t)(e)}}};var s=e.i(671228);let i=s.ThursdaySettingsSchema.extend({wake:s.WakeSchema.catch(s.WAKE_DEFAULT),hotkey:s.HotkeySchema.catch(s.HOTKEY_DEFAULT),callBack:s.CallBackSchema.catch(s.CALL_BACK_DEFAULT),captionView:s.CaptionViewSchema.catch("center")}),l={systemPrompt:null,model:null,wake:s.WAKE_DEFAULT,hotkey:s.HOTKEY_DEFAULT,callBack:s.CALL_BACK_DEFAULT,captionView:"center"},o=(0,n.create)()((t=e=>({...l,patch:t=>e(t)}),r={name:"thursday.settings",merge:(e,t)=>{let r=i.safeParse(e);return{...t,...r.success?r.data:l}}},(e,n,s)=>{let i,l={storage:function(e){let t;try{t=e()}catch(e){return}return{getItem:e=>{var r;let n=e=>null===e?null:JSON.parse(e,void 0),a=null!=(r=t.getItem(e))?r:null;return a instanceof Promise?a.then(n):n(a)},setItem:(e,r)=>t.setItem(e,JSON.stringify(r,void 0)),removeItem:e=>t.removeItem(e)}}(()=>window.localStorage),partialize:e=>e,version:0,merge:(e,t)=>({...t,...e}),...r},o=!1,c=0,d=new Set,u=new Set,h=l.storage;if(!h)return t((...t)=>{console.warn(`[zustand persist middleware] Unable to update item '${l.name}', the given storage is currently unavailable.`),e(...t)});let m=()=>{let e=l.partialize({...n()});return h.setItem(l.name,{state:e,version:l.version})},f=s.setState;s.setState=(e,t)=>(f(e,t),m());let g=t((...t)=>(e(...t),m()));s.getInitialState=()=>g;let p=()=>{var t,r;if(!h)return;let s=++c;o=!1,d.forEach(e=>{var t;return e(null!=(t=n())?t:g)});let f=(null==(r=l.onRehydrateStorage)?void 0:r.call(l,null!=(t=n())?t:g))||void 0;return a(h.getItem.bind(h))(l.name).then(e=>{if(e)if("number"!=typeof e.version||e.version===l.version)return[!1,e.state];else{if(l.migrate){let t=l.migrate(e.state,e.version);return t instanceof Promise?t.then(e=>[!0,e]):[!0,t]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(t=>{var r;if(s!==c)return;let[a,o]=t;if(e(i=l.merge(o,null!=(r=n())?r:g),!0),a)return m()}).then(()=>{s===c&&(null==f||f(n(),void 0),i=n(),o=!0,u.forEach(e=>e(i)))}).catch(e=>{s===c&&(null==f||f(void 0,e))})};return s.persist={setOptions:e=>{l={...l,...e},e.storage&&(h=e.storage)},clearStorage:()=>{++c,null==h||h.removeItem(l.name)},getOptions:()=>l,rehydrate:()=>p(),hasHydrated:()=>o,onHydrate:e=>(d.add(e),()=>{d.delete(e)}),onFinishHydration:e=>(u.add(e),()=>{u.delete(e)})},l.skipHydration||p(),i||g}));e.s(["thursdaySettings",0,()=>{let{systemPrompt:e,model:t}=o.getState();return{systemPrompt:e,model:t,locale:"u"<typeof navigator?null:navigator.language??null}},"useThursdayStore",0,o],67045)},561540,e=>{"use strict";var t=e.i(213377);let r={[t.TOOL_NAMES.memory_recall]:"Checking your notes",[t.TOOL_NAMES.memory_remember]:"Noting that down",[t.TOOL_NAMES.memory_forget]:"Forgetting that",[t.TOOL_NAMES.memory_show]:"Putting your notes on screen",[t.TOOL_NAMES.bash]:"Doing it on this computer",[t.TOOL_NAMES.web_search]:"Searching the web",[t.TOOL_NAMES.load_skill]:"Reading how to do this",[t.TOOL_NAMES.end_call]:"Ending the call"};e.s(["toolLine",0,function(e,n){let a;if(e===t.TOOL_NAMES.tool_search||e===t.TOOL_NAMES.tool_call)return"Reaching a connected service";let s=null;if(n)try{let e=JSON.parse(n);e&&"object"==typeof e&&!Array.isArray(e)&&(s=e)}catch{}return(s&&function(e,r){if(e===t.TOOL_NAMES.delegate){let e="string"==typeof r.bot?r.bot.trim():"";return e?`Handing this to ${e}`:"Handing this over"}if(e===t.TOOL_NAMES.task){let e="string"==typeof r.task?r.task.trim():"";return"answer"===r.action?"Passing that back":"cancel"===r.action?"Stopping that":e?`Checking on ${e}`:"Checking the jobs"}return null}(e,s))??r[e]??((a=e.indexOf("__"))<=0?null:`Reaching ${e.slice(0,a).replace(/[-_]/g," ")}`)}])},319841,e=>{"use strict";var t=e.i(271645);let r=["ctrl","alt","meta"],n=/^(Control|Alt|Shift|Meta|OS)/,a=/^(input|textarea|select)$/i;function s(e){let{code:t,ctrlKey:r,altKey:a,shiftKey:s,metaKey:i}=e;if(!t||n.test(t)||!r&&!a&&!i)return null;let l=[];return r&&l.push("ctrl"),a&&l.push("alt"),s&&l.push("shift"),i&&l.push("meta"),[...l,t].join("+")}let i={ctrl:["Ctrl","⌃"],alt:["Alt","⌥"],shift:["Shift","⇧"],meta:["Meta","⌘"]};e.s(["HOTKEY_CAPTURE",0,{"data-hotkey-capture":""},"comboOf",0,s,"isCombo",0,e=>{let t=e.split("+"),a=t.at(-1);return!!(a&&!n.test(a)&&t.slice(0,-1).some(e=>r.includes(e)))},"useHotkey",0,function({enabled:e,combo:r,onPress:n}){let i=(0,t.useRef)(n);i.current=n,(0,t.useEffect)(()=>{if(!e||!r)return;let t=e=>{var t;e.repeat||(t=e.target)&&(a.test(t.tagName)||t.isContentEditable||t.closest?.("[data-hotkey-capture]"))||s(e)===r&&(e.preventDefault(),i.current())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,r])},"useHotkeyLabel",0,function(e){let[r,n]=(0,t.useState)(!1);return(0,t.useEffect)(()=>n(/mac/i.test(navigator.userAgent)),[]),e?function(e,t=!1){let r=e.split("+"),n=r.at(-1)??"",a=r.slice(0,-1).map(e=>i[e]?.[+!!t]??e),s=n.replace(/^(Key|Digit|Numpad)/,"").replace(/([a-z])([A-Z])/g,"$1 $2")||n;return t?[...a,s].join(""):[...a,s].join(" + ")}(e,r):null}])}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94682,e=>{"use strict";var t=e.i(843476),n=e.i(24071),i=e.i(482022),s=e.i(829600),r=e.i(434322),a=e.i(905015),o=e.i(226091),l=e.i(569644),c=e.i(815170),d=e.i(456420);let u={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};u.node;let m=(0,d.default)(u);var f=e.i(51921),h=e.i(650639),x=e.i(759659),g=e.i(438583),p=e.i(271645),y=e.i(798120),v=e.i(167881),b=e.i(917162),j=e.i(671428),k=e.i(41533),N=e.i(95187);let w=(0,N.createServerReference)("7fdad44e62ddf8a72f8c27c74a9673daded0d24847",N.callServer,void 0,N.findSourceMapURL,"deleteArtifactAction");var S=e.i(895836),A=e.i(621285),C=e.i(492615),F=e.i(245629),$=e.i(609856),z=e.i(283653),T=e.i(647163);let R={markdown:o.FileText,csv:h.Sheet,json:a.FileJson,text:o.FileText,frame:r.FileCode2,image:c.Image,audio:f.Music,video:g.Video,none:s.File};function M({entry:e,active:n,onPick:i}){let s="set"===e.kind?m:R[e.view];return(0,t.jsxs)("button",{type:"button",onClick:i,title:`${e.name} \xb7 ${(0,F.shortAgo)(e.at)}`,className:(0,T.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",n?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,t.jsx)(s,{className:"size-3.5 shrink-0 opacity-70"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/75",children:"set"===e.kind?e.count:(0,T.formatBytes)(e.bytes)})]})}function V({row:e,file:s,onOpen:r,onBack:a,onGone:o}){let[c]=(0,$.useServerAction)(C.openFileAction),[d,u]=(0,$.useServerAction)(w,{okMessage:"Deleted",onOk:()=>{(0,z.revalidate)(y.queryKey.artifacts),s?a():o()}}),m=s?{path:s.path,bytes:s.bytes,at:s.at}:"file"===e.kind?{path:e.path,bytes:e.bytes,at:e.at}:null,f=async e=>{await b.notify.confirm({title:`Delete ${e.split("/").pop()}?`,description:"It is deleted from disk for good.",okText:"Delete",destructive:!0})&&d(e)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-3 border-b border-border/60 px-6",children:[s&&(0,t.jsxs)("button",{type:"button",onClick:a,className:"-ml-1 flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3"}),e.name]}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-foreground",children:m?m.path.split("/").pop()??e.name:e.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:m?`${(0,T.formatBytes)(m.bytes)} \xb7 ${(0,F.shortAgo)(m.at)}`:`${e.count} ${1===e.count?"file":"files"} \xb7 ${(0,F.shortAgo)(e.at)}`}),m&&(0,t.jsx)("a",{href:y.queryKey.fileView(m.path),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(i.ExternalLink,{className:"size-4"})}),(0,t.jsx)(v.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>c(m?.path??e.path),children:(0,t.jsx)(l.FolderOpen,{})}),m&&(0,t.jsx)(v.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:u,className:"text-muted-foreground",onClick:()=>f(m.path),children:(0,t.jsx)(x.Trash2,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:m?(0,t.jsx)(A.FilePreview,{path:m.path,bytes:m.bytes}):(0,t.jsx)(I,{name:e.name,onOpen:r})})]})}function I({name:e,onOpen:n}){let{data:i,isLoading:s,error:r}=(0,z.useServerRoute)(y.queryKey.artifactSet(e,k.ARTIFACT_VIEW.setFiles));if(s)return(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3 p-5",children:Array.from({length:8},(e,n)=>(0,t.jsx)(j.Skeleton,{className:"aspect-4/3 w-full rounded-xl"},n))});if(r)return(0,t.jsx)(S.SettingError,{message:r.message});let a=i?.files??[];return 0===a.length?(0,t.jsx)("p",{className:"p-5 text-xs text-muted-foreground/60",children:"Nothing in here the app can open."}):(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3",children:a.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>n(e),title:`${e.name} \xb7 ${(0,T.formatBytes)(e.bytes)}`,className:"flex flex-col gap-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-2",children:[(0,t.jsx)(L,{file:e}),(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.name})]},e.path))}),i&&i.total>a.length&&(0,t.jsx)("p",{className:"pt-4 font-mono text-[11px] text-muted-foreground/60",children:`${a.length} of ${i.total.toLocaleString("en")} — the rest are in the folder`})]})}function L({file:e}){if("image"===e.view&&e.bytes<=k.WORKSPACE_VIEW.elementMax)return(0,t.jsx)("img",{src:y.queryKey.file(e.path),alt:e.name,loading:"lazy",decoding:"async",className:"aspect-4/3 w-full rounded-xl object-cover"});let n=R[e.view];return(0,t.jsx)("span",{className:"grid aspect-4/3 w-full place-items-center rounded-xl bg-muted/40 text-muted-foreground",children:(0,t.jsx)(n,{className:"size-5"})})}function B({empty:e,onReveal:n}){return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:e?"Nothing finished yet. When a bot ends a job with something to hand over — a page, a report, a set of pictures — it lands here.":"Pick something on the left. A folder a bot filled is one row, and opens as a sheet."}),(0,t.jsxs)(v.Button,{variant:"outline",onClick:n,children:[(0,t.jsx)(l.FolderOpen,{}),"Reveal folder"]})]})}e.s(["ArtifactSetting",0,function(){let[e,n]=(0,p.useState)(null),[i,s]=(0,p.useState)(""),[r,a]=(0,p.useState)(k.ARTIFACT_VIEW.rows),{data:o,isLoading:c,error:d}=(0,z.useServerRoute)(y.queryKey.artifactShelf(r),{keepPreviousData:!0}),[u]=(0,$.useServerAction)(C.openFileAction);if(c)return(0,t.jsx)(S.SettingPanesSkeleton,{});if(d)return(0,t.jsx)(S.SettingError,{message:d.message});let m=o?.entries??[],f=o?.total??0,h=i.trim().toLowerCase(),x=h?m.filter(e=>e.name.toLowerCase().includes(h)):m,g=m.find(t=>t.path===e?.row.path)??e?.row;return(0,t.jsx)(S.SettingPanes,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.SettingRailNote,{children:(0,t.jsxs)("span",{className:"font-mono",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"artifacts"}),` \xb7 ${function(e,t,n){if(0===t)return"empty";let i=t>e.length?`${e.length} of ${t.toLocaleString("en")} artifacts`:`${t} ${1===t?"artifact":"artifacts"}`;return n>t?`${i} \xb7 ${n.toLocaleString("en")} files`:i}(m,f,o?.files??0)}`]})}),(0,t.jsxs)(v.Button,{variant:"outline",size:"sm",onClick:()=>u("artifacts"),children:[(0,t.jsx)(l.FolderOpen,{}),"Reveal folder"]})]}),left:(0,t.jsxs)("div",{className:"flex flex-col py-2",children:[(0,t.jsx)(S.SettingFilter,{value:i,onChange:s,placeholder:"Filter artifacts",className:"mx-2 mb-1.5 w-auto"}),0===x.length?(0,t.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground/60",children:h?"Nothing matches":"Nothing here yet"}):x.map(e=>(0,t.jsx)(M,{entry:e,active:e.path===g?.path,onPick:()=>n({row:e,file:null})},e.path)),f>m.length&&(0,t.jsx)("button",{type:"button",onClick:()=>a(r+k.ARTIFACT_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(k.ARTIFACT_VIEW.rows,f-m.length)} more of ${f.toLocaleString("en")}`})]}),right:g?(0,t.jsx)(V,{row:g,file:e?.file??null,onOpen:e=>n({row:g,file:e}),onBack:()=>n({row:g,file:null}),onGone:()=>n(null)},g.path):(0,t.jsx)(B,{empty:0===f,onReveal:()=>u("artifacts")})})}],94682)},434322,51921,650639,438583,e=>{"use strict";var t=e.i(456420);let n={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};n.node;let i=(0,t.default)(n);e.s(["FileCode2",0,i],434322);let s={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};s.node;let r=(0,t.default)(s);e.s(["Music",0,r],51921);let a={name:"sheet",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]};a.node;let o=(0,t.default)(a);e.s(["Sheet",0,o],650639);let l={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};l.node;let c=(0,t.default)(l);e.s(["Video",0,c],438583)},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 i=(0,t.default)(n);e.s(["Trash2",0,i],759659)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,94682,e=>{"use strict";var t=e.i(843476),n=e.i(24071),i=e.i(482022),s=e.i(829600),r=e.i(434322),a=e.i(905015),o=e.i(226091),l=e.i(569644),c=e.i(815170),d=e.i(456420);let u={name:"images",size:24,node:[["path",{d:"m22 11-1.296-1.296a2.4 2.4 0 0 0-3.408 0L11 16",key:"9kzy35"}],["path",{d:"M4 8a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h10a2 2 0 0 0 2-2",key:"1t0f0t"}],["circle",{cx:"13",cy:"7",r:"1",fill:"currentColor",key:"1obus6"}],["rect",{x:"8",y:"2",width:"14",height:"14",rx:"2",key:"1gvhby"}]]};u.node;let m=(0,d.default)(u);var f=e.i(51921),h=e.i(650639),x=e.i(759659),g=e.i(438583),p=e.i(271645),y=e.i(798120),v=e.i(167881),b=e.i(917162),j=e.i(671428),k=e.i(41533),N=e.i(95187);let w=(0,N.createServerReference)("7fb8137c16531f0b30d68e5fb1b81da2e890990b96",N.callServer,void 0,N.findSourceMapURL,"deleteArtifactAction");var S=e.i(895836),A=e.i(621285),C=e.i(808317),F=e.i(245629),$=e.i(609856),z=e.i(283653),T=e.i(647163);let R={markdown:o.FileText,csv:h.Sheet,json:a.FileJson,text:o.FileText,frame:r.FileCode2,image:c.Image,audio:f.Music,video:g.Video,none:s.File};function M({entry:e,active:n,onPick:i}){let s="set"===e.kind?m:R[e.view];return(0,t.jsxs)("button",{type:"button",onClick:i,title:`${e.name} \xb7 ${(0,F.shortAgo)(e.at)}`,className:(0,T.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",n?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,t.jsx)(s,{className:"size-3.5 shrink-0 opacity-70"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/75",children:"set"===e.kind?e.count:(0,T.formatBytes)(e.bytes)})]})}function V({row:e,file:s,onOpen:r,onBack:a,onGone:o}){let[c]=(0,$.useServerAction)(C.openFileAction),[d,u]=(0,$.useServerAction)(w,{okMessage:"Deleted",onOk:()=>{(0,z.revalidate)(y.queryKey.artifacts),s?a():o()}}),m=s?{path:s.path,bytes:s.bytes,at:s.at}:"file"===e.kind?{path:e.path,bytes:e.bytes,at:e.at}:null,f=async e=>{await b.notify.confirm({title:`Delete ${e.split("/").pop()}?`,description:"It is deleted from disk for good.",okText:"Delete",destructive:!0})&&d(e)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex h-11 shrink-0 items-center gap-3 border-b border-border/60 px-6",children:[s&&(0,t.jsxs)("button",{type:"button",onClick:a,className:"-ml-1 flex shrink-0 items-center gap-1 rounded-md px-1.5 py-1 font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3"}),e.name]}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px] text-foreground",children:m?m.path.split("/").pop()??e.name:e.name}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:m?`${(0,T.formatBytes)(m.bytes)} \xb7 ${(0,F.shortAgo)(m.at)}`:`${e.count} ${1===e.count?"file":"files"} \xb7 ${(0,F.shortAgo)(e.at)}`}),m&&(0,t.jsx)("a",{href:y.queryKey.fileView(m.path),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(i.ExternalLink,{className:"size-4"})}),(0,t.jsx)(v.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>c(m?.path??e.path),children:(0,t.jsx)(l.FolderOpen,{})}),m&&(0,t.jsx)(v.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:u,className:"text-muted-foreground",onClick:()=>f(m.path),children:(0,t.jsx)(x.Trash2,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:m?(0,t.jsx)(A.FilePreview,{path:m.path,bytes:m.bytes}):(0,t.jsx)(I,{name:e.name,onOpen:r})})]})}function I({name:e,onOpen:n}){let{data:i,isLoading:s,error:r}=(0,z.useServerRoute)(y.queryKey.artifactSet(e,k.ARTIFACT_VIEW.setFiles));if(s)return(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3 p-5",children:Array.from({length:8},(e,n)=>(0,t.jsx)(j.Skeleton,{className:"aspect-4/3 w-full rounded-xl"},n))});if(r)return(0,t.jsx)(S.SettingError,{message:r.message});let a=i?.files??[];return 0===a.length?(0,t.jsx)("p",{className:"p-5 text-xs text-muted-foreground/60",children:"Nothing in here the app can open."}):(0,t.jsxs)("div",{className:"p-5",children:[(0,t.jsx)("div",{className:"grid grid-cols-4 gap-3",children:a.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>n(e),title:`${e.name} \xb7 ${(0,T.formatBytes)(e.bytes)}`,className:"flex flex-col gap-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-offset-2",children:[(0,t.jsx)(L,{file:e}),(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.name})]},e.path))}),i&&i.total>a.length&&(0,t.jsx)("p",{className:"pt-4 font-mono text-[11px] text-muted-foreground/60",children:`${a.length} of ${i.total.toLocaleString("en")} — the rest are in the folder`})]})}function L({file:e}){if("image"===e.view&&e.bytes<=k.WORKSPACE_VIEW.elementMax)return(0,t.jsx)("img",{src:y.queryKey.file(e.path),alt:e.name,loading:"lazy",decoding:"async",className:"aspect-4/3 w-full rounded-xl object-cover"});let n=R[e.view];return(0,t.jsx)("span",{className:"grid aspect-4/3 w-full place-items-center rounded-xl bg-muted/40 text-muted-foreground",children:(0,t.jsx)(n,{className:"size-5"})})}function B({empty:e,onReveal:n}){return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:e?"Nothing finished yet. When a bot ends a job with something to hand over — a page, a report, a set of pictures — it lands here.":"Pick something on the left. A folder a bot filled is one row, and opens as a sheet."}),(0,t.jsxs)(v.Button,{variant:"outline",onClick:n,children:[(0,t.jsx)(l.FolderOpen,{}),"Reveal folder"]})]})}e.s(["ArtifactSetting",0,function(){let[e,n]=(0,p.useState)(null),[i,s]=(0,p.useState)(""),[r,a]=(0,p.useState)(k.ARTIFACT_VIEW.rows),{data:o,isLoading:c,error:d}=(0,z.useServerRoute)(y.queryKey.artifactShelf(r),{keepPreviousData:!0}),[u]=(0,$.useServerAction)(C.openFileAction);if(c)return(0,t.jsx)(S.SettingPanesSkeleton,{});if(d)return(0,t.jsx)(S.SettingError,{message:d.message});let m=o?.entries??[],f=o?.total??0,h=i.trim().toLowerCase(),x=h?m.filter(e=>e.name.toLowerCase().includes(h)):m,g=m.find(t=>t.path===e?.row.path)??e?.row;return(0,t.jsx)(S.SettingPanes,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(S.SettingRailNote,{children:(0,t.jsxs)("span",{className:"font-mono",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:"artifacts"}),` \xb7 ${function(e,t,n){if(0===t)return"empty";let i=t>e.length?`${e.length} of ${t.toLocaleString("en")} artifacts`:`${t} ${1===t?"artifact":"artifacts"}`;return n>t?`${i} \xb7 ${n.toLocaleString("en")} files`:i}(m,f,o?.files??0)}`]})}),(0,t.jsxs)(v.Button,{variant:"outline",size:"sm",onClick:()=>u("artifacts"),children:[(0,t.jsx)(l.FolderOpen,{}),"Reveal folder"]})]}),left:(0,t.jsxs)("div",{className:"flex flex-col py-2",children:[(0,t.jsx)(S.SettingFilter,{value:i,onChange:s,placeholder:"Filter artifacts",className:"mx-2 mb-1.5 w-auto"}),0===x.length?(0,t.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground/60",children:h?"Nothing matches":"Nothing here yet"}):x.map(e=>(0,t.jsx)(M,{entry:e,active:e.path===g?.path,onPick:()=>n({row:e,file:null})},e.path)),f>m.length&&(0,t.jsx)("button",{type:"button",onClick:()=>a(r+k.ARTIFACT_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(k.ARTIFACT_VIEW.rows,f-m.length)} more of ${f.toLocaleString("en")}`})]}),right:g?(0,t.jsx)(V,{row:g,file:e?.file??null,onOpen:e=>n({row:g,file:e}),onBack:()=>n({row:g,file:null}),onGone:()=>n(null)},g.path):(0,t.jsx)(B,{empty:0===f,onReveal:()=>u("artifacts")})})}],94682)},434322,51921,650639,438583,e=>{"use strict";var t=e.i(456420);let n={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};n.node;let i=(0,t.default)(n);e.s(["FileCode2",0,i],434322);let s={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};s.node;let r=(0,t.default)(s);e.s(["Music",0,r],51921);let a={name:"sheet",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]};a.node;let o=(0,t.default)(a);e.s(["Sheet",0,o],650639);let l={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};l.node;let c=(0,t.default)(l);e.s(["Video",0,c],438583)},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 i=(0,t.default)(n);e.s(["Trash2",0,i],759659)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,161483,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Swatch",0,function({color:e,picked:s,onPick:r}){return(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":e??"Follow the theme",style:e?{backgroundColor:e}:void 0,className:(0,n.cn)("size-5 rounded-full outline-none transition-transform hover:scale-110 focus-visible:ring-3 focus-visible:ring-ring/50",!e&&"bg-foreground",s&&"ring-2 ring-foreground/40 ring-offset-2 ring-offset-background")})}])},59158,e=>{"use strict";var t=e.i(843476),n=e.i(689664),s=e.i(466787),r=e.i(271645),l=e.i(798120),a=e.i(167881),i=e.i(736185),o=e.i(23750),c=e.i(917162),u=e.i(421429),d=e.i(161483),h=e.i(184762),m=e.i(968978),x=e.i(265402),p=e.i(864723),g=e.i(692329),f=e.i(895836),v=e.i(867927),b=e.i(456420);let y={name:"phone",size:24,node:[["path",{d:"M13.832 16.568a1 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 2A18 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 6.392 6.384",key:"9njp5v"}]]};y.node;let j=(0,b.default)(y);var k=e.i(759659),S=e.i(671428),N=e.i(222055),w=e.i(245629),C=e.i(609856),A=e.i(661504),E=e.i(647163),R=e.i(95187);let T=(0,R.createServerReference)("7f96469475cf559c43940f39f906e60793701249f2",R.callServer,void 0,R.findSourceMapURL,"deleteCallAction");var _=e.i(671228),K=e.i(561540),M=e.i(635963),O=e.i(762074);function z({size:e=16,className:n}){let s=(0,O.useThursdayFace)();return(0,t.jsx)(M.BotMark,{size:e,seed:"thursday",color:s.color,shape:s.shape,outline:s.outline,notify:!1,className:n})}function I(){return(0,t.jsx)(f.SettingGroup,{label:"Transcripts",children:(0,t.jsx)(f.SettingItems,{children:(0,t.jsxs)("button",{type:"button",onClick:()=>c.notify.component({className:"sm:max-w-3xl",renderer:()=>(0,t.jsx)(f.SettingDialogContent,{title:"Call history",description:"Everything said on the line, oldest at the top. Scroll up for older calls.",children:(0,t.jsx)(L,{})})}),className:"flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(j,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block text-sm font-medium",children:"Call history"}),(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:"Every call, word for word — hers and yours"})]}),(0,t.jsx)(v.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]})})})}let P="h-[min(34rem,58vh)] min-h-64 px-1";function L(){let{items:e,isLoading:n,isLoadingMore:s,error:a,hasMore:i,sentinelRef:o,refresh:c}=(0,A.useServerPages)({key:(e,t)=>{if(0===e)return l.queryKey.callHistory(null);let n=t?.at(-1);return n?l.queryKey.callHistory((0,w.toDate)(n.startedAt).toISOString()):null},size:_.CALL_HISTORY_PAGE,swr:{revalidateOnFocus:!1}}),u=(0,r.useMemo)(()=>[...e].reverse(),[e]),d=(0,r.useRef)(null),h=(0,r.useRef)(!1),m=(0,r.useRef)(0);return((0,r.useLayoutEffect)(()=>{let e=d.current;e&&0!==u.length&&(h.current?e.scrollTop=e.scrollHeight-m.current:(h.current=!0,e.scrollTop=e.scrollHeight),m.current=e.scrollHeight-e.scrollTop)},[u]),n)?(0,t.jsx)("div",{className:(0,E.cn)(P,"overflow-hidden"),children:(0,t.jsx)(H,{})}):a?(0,t.jsx)(f.SettingError,{message:a.message}):(0,t.jsx)(t.Fragment,{children:0===u.length?(0,t.jsx)("p",{className:"px-1 text-sm leading-relaxed text-muted-foreground",children:"No calls yet. Everything said on the line is kept here — hers and yours, in the order it was said."}):(0,t.jsxs)("div",{ref:d,onScroll:e=>{let t=e.currentTarget;m.current=t.scrollHeight-t.scrollTop},className:(0,E.cn)(P,"overflow-y-auto overscroll-contain pb-6"),children:[(0,t.jsx)(f.SettingMore,{hasMore:i,loading:s,sentinelRef:o,count:1,ghost:(0,t.jsx)(H,{})}),u.map(e=>(0,t.jsx)(D,{call:e,onDropped:c},e.id))]})})}function H(){return(0,t.jsxs)("div",{className:"space-y-3 pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 py-5",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsx)(S.Skeleton,{className:"h-6 w-36 rounded-full"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsx)("span",{className:"size-7 shrink-0"})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(S.Skeleton,{className:"h-9 w-3/5 rounded-2xl rounded-br-md"})}),(0,t.jsx)(S.Skeleton,{className:"h-5 w-2/3"})]})}function D({call:e,onDropped:n}){let[s,r]=(0,C.useServerAction)(T,{okMessage:"Call deleted",onOk:n}),l=(0,w.toDate)(e.startedAt),i=e.turns.at(-1),o=e.endedAt&&i?function(e,t){let n=Math.max(0,Math.round((t.getTime()-e.getTime())/1e3));if(n<60)return`${n}s`;let s=Math.floor(n/60);return s<60?`${s}m ${String(n%60).padStart(2,"0")}s`:`${Math.floor(s/60)}h ${String(s%60).padStart(2,"0")}m`}(l,(0,w.toDate)(i.at)):"on the line",u=async()=>{await c.notify.confirm({title:`Delete the call from ${(0,w.whenOf)(l)}?`,description:"Every turn of it goes — and she stops reading it back into the next call.",okText:"Delete",destructive:!0})&&s(e.id)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"group flex items-center gap-3 py-5",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsxs)("span",{title:`${e.provider} \xb7 ${e.model}`,className:"flex shrink-0 items-center gap-2 rounded-full bg-muted/60 py-1 pr-3 pl-2.5 ring-1 ring-border/50",children:[(0,t.jsx)(j,{className:"size-3 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-mono text-[11px]",children:(0,w.whenOf)(l)}),(0,t.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:o})]}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center",children:e.endedAt&&(0,t.jsx)(a.Button,{size:"icon-sm",variant:"ghost",loading:r,"aria-label":"Delete this call",onClick:u,className:"text-muted-foreground/60 opacity-0 transition-opacity group-hover:opacity-100 hover:text-destructive focus-visible:opacity-100",children:(0,t.jsx)(k.Trash2,{})})})]}),(function(e){let t=[];for(let n of e){let e=t.at(-1);if(e&&"tool"===n.role&&"tool"===e.turn.role&&e.turn.tool===n.tool&&e.turn.text===n.text){e.repeats+=1;continue}t.push({turn:n,repeats:1})}return t})(e.turns).map(({turn:e,repeats:n},s,r)=>{let l=r[s-1]?.turn,a=r[s+1]?.turn;return(0,t.jsx)(F,{turn:e,repeats:n,opensRun:l?.role!==e.role,closesRun:a?.role!==e.role},e.id)})]})}function F({turn:e,opensRun:n,closesRun:s,repeats:r=1}){if("tool"===e.role)return(0,t.jsx)($,{turn:e,repeats:r});let l="user"===e.role;return(0,t.jsxs)("div",{className:(0,E.cn)("flex items-end gap-2",n?"mt-3":"mt-1",l?"justify-end":"justify-start"),children:[!l&&(0,t.jsx)("span",{className:"mb-0.5 grid size-[18px] shrink-0 place-items-center",children:s&&(0,t.jsx)(z,{size:18})}),(0,t.jsx)("p",{className:(0,E.cn)("max-w-[min(34rem,78%)] px-3.5 py-2 text-[13.5px] leading-relaxed break-keep whitespace-pre-wrap",l?"rounded-2xl bg-muted":"rounded-2xl bg-card ring-1 ring-border/70",s&&(l?"rounded-br-sm":"rounded-bl-sm")),children:e.text})]})}function $({turn:e,repeats:n}){let s=e.tool??"",r=(0,N.toolIcon)(s),l=(0,K.toolLine)(s,e.text);return(0,t.jsx)("div",{className:"mt-3 mb-1 flex justify-center",children:(0,t.jsxs)("span",{className:"flex max-w-full items-center gap-2 rounded-full bg-muted/40 px-2.5 py-1 text-muted-foreground",children:[(0,t.jsx)(r,{className:"size-3 shrink-0"}),l&&(0,t.jsx)("span",{className:"truncate text-[11px] break-keep",children:l}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/60",children:s}),n>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:["×",n]})]})})}var G=e.i(333495),B=e.i(933916);let V=(0,R.createServerReference)("7fe739d073b99898314ca4b143225f3b886ecc1ee1",R.callServer,void 0,R.findSourceMapURL,"resetHistoryAction"),W=(0,R.createServerReference)("7fda60f926ac703cb9ea50e38cc85911ab99246e3d",R.callServer,void 0,R.findSourceMapURL,"setCallSkillsAction");var q=e.i(67045),U=e.i(698570),Y=e.i(319841),X=e.i(981203),Z=e.i(283653);function J(){let{data:e}=(0,Z.useServerRoute)(l.queryKey.callSkills),[n]=(0,C.useServerAction)(W,{onOk:()=>(0,Z.revalidate)(l.queryKey.callSkills)});return(0,t.jsx)(f.SettingGroup,{label:"Skills",children:(0,t.jsx)(f.SettingToggle,{label:"Read a skill herself",description:"A skill is how a thing is done here, written down. On, she opens one mid-call and follows it; off, only bots read them.",checked:e??!1,disabled:void 0===e,onChange:e=>n(e),children:(0,t.jsx)(Q,{})})})}function Q(){let{data:e}=(0,Z.useServerRoute)(l.queryKey.skills);return e?(0,t.jsx)(f.SettingNote,{className:(0,E.cn)(!e.length&&E.WAITING_INK),children:e.length?`The same ${e.length} a bot reads. Each one she opens spends a page of the call on it.`:"Nothing installed yet — there is nothing for her to read."}):null}function ee(){let[e,n]=(0,C.useServerAction)(V,{okMessage:({calls:e,tasks:t,notes:n})=>`Wiped ${e} calls, ${t} jobs, ${n} notes`,onOk:()=>{(0,Z.revalidate)(l.queryKey.memory),(0,Z.revalidate)(l.queryKey.tasks),(0,Z.revalidate)(l.queryKey.callHistory(null))}}),r=async()=>{await c.notify.confirm({title:"Reset history?",description:"Every call, every job and everything she remembers is deleted for good. Keys, bots and connectors stay.",okText:"Reset",destructive:!0})&&e()};return(0,t.jsx)(f.SettingGroup,{label:"Danger zone",note:"Keys, bots and connectors stay.",children:(0,t.jsx)(f.SettingItems,{children:(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(s.TriangleAlert,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block text-sm font-medium",children:"Reset history"}),(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:"Every call, every job and everything she remembers"})]}),(0,t.jsx)(a.Button,{variant:"outline",size:"sm",loading:n,onClick:r,className:"shrink-0 text-destructive hover:text-destructive",children:"Reset"})]})})})}function et({value:e,onChange:n}){let s=t=>n({...e,...t});return(0,t.jsx)(f.SettingGroup,{label:"Face",children:(0,t.jsxs)("div",{className:"space-y-5 py-2",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 pt-2",children:[(0,t.jsx)(G.Face,{look:e,size:176,className:"w-44"}),(0,t.jsx)(u.Segmented,{"aria-label":"Face",options:B.FACE_KINDS.map(e=>({value:e,label:G.FACES[e].label})),value:e.kind,onChange:e=>s({kind:e})}),(0,t.jsx)("p",{className:"max-w-sm text-center text-xs text-muted-foreground",children:G.FACES[e.kind].hint})]}),"mark"===e.kind&&(0,t.jsx)("div",{className:"flex justify-center px-2",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(d.Swatch,{color:null,picked:!e.color,onPick:()=>s({color:void 0})}),(0,t.jsx)("span",{className:"w-2"}),p.MARK_PALETTE_ROWS[0].map(n=>(0,t.jsx)(d.Swatch,{color:n,picked:e.color===n,onPick:()=>s({color:n})},n))]}),(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 pl-9",children:p.MARK_PALETTE_ROWS[1].map(n=>(0,t.jsx)(d.Swatch,{color:n,picked:e.color===n,onPick:()=>s({color:n})},n))})]})}),"mark"===e.kind&&(0,t.jsx)(es,{label:"Shape",children:(0,t.jsx)(u.Segmented,{"aria-label":"Shape",options:p.MARK_SHAPES.map(e=>({value:e,label:(0,t.jsx)("span",{className:"capitalize",children:e})})),value:e.shape??"blob",onChange:e=>s({shape:e})})}),"mark"===e.kind&&(0,t.jsx)(es,{label:"Style",children:(0,t.jsx)(u.Segmented,{"aria-label":"Style",options:[{value:"solid",label:"Solid"},{value:"outline",label:"Outline"}],value:e.outline?"outline":"solid",onChange:e=>s({outline:"outline"===e||void 0})})}),"ascii"===e.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(es,{label:"Glyphs",children:(0,t.jsx)(u.Segmented,{"aria-label":"Glyphs",options:B.ASCII_CHARSETS.map(e=>({value:e,label:en[e]})),value:e.charset,onChange:e=>s({charset:e})})}),(0,t.jsx)(es,{label:"Size",children:(0,t.jsx)(er,{min:4,max:16,step:1,value:e.fontSize,format:e=>`${e}px`,onChange:e=>s({fontSize:e})})}),(0,t.jsx)(es,{label:"Density",children:(0,t.jsx)(er,{min:.6,max:2,step:.1,value:e.density,format:e=>`${e.toFixed(1)}x`,onChange:e=>s({density:e})})})]})]})})}let en={ascii:"Characters",emoji:"Sprinkled",emojiOnly:"All emoji"};function es({label:e,children:n}){return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:"w-16 shrink-0 font-mono text-[11px] text-muted-foreground",children:e}),n]})}function er({value:e,onChange:n,format:s,...r}){return(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,t.jsx)("input",{type:"range",...r,value:e,onChange:e=>n(Number(e.target.value)),className:"min-w-0 flex-1 accent-foreground"}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right font-mono text-[11px] text-muted-foreground tabular-nums",children:s(e)})]})}function el({provider:e,value:r,hasKey:l,onPick:a}){let o=!!r,c=r?.voice??e.defaultVoice,u=r?.model??"";return(0,t.jsxs)("div",{className:(0,E.cn)("p-4",o&&"bg-muted/40"),children:[(0,t.jsxs)("button",{type:"button",disabled:o,onClick:()=>a({voice:null,model:null}),className:"flex w-full items-center gap-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:[(0,t.jsx)(m.ProviderIcon,{provider:e.id,className:"size-4 shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:u||e.models[0].id})]}),l?o&&(0,t.jsx)(n.Check,{className:"size-4 shrink-0"}):(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(s.TriangleAlert,{className:"size-3"}),"No key"]})]}),o&&(0,t.jsxs)("div",{className:"space-y-3 pt-3",children:[(0,t.jsx)(i.Combobox,{value:u,onChange:e=>a({voice:r?.voice??null,model:e||null}),options:e.models.map(e=>({value:e.id,label:e.label,hint:e.id})),"aria-label":`${e.label} realtime model`,placeholder:e.models[0].id,empty:"Not on the list — it still runs"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.voices.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>a({voice:e,model:r?.model??null}),className:(0,E.cn)("rounded-full border px-2.5 py-1 font-mono text-[11px] transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",e===c?"border-foreground/40 text-foreground":"border-border/60 text-muted-foreground hover:text-foreground"),children:e},e))})]})]})}let ea={center:{label:"Her last line",hint:"One caption under the mark — only what she said."},sides:{label:"Last three turns",hint:"Hers on the left, yours on the right, beside the mark."}};function ei({value:e,onChange:n}){return(0,t.jsx)(f.SettingGroup,{label:"Calls you",note:"off"!==e&&"Needs this tab open. A tab that has been silent since it loaded may not be allowed to make a sound — the desktop notification covers that.",children:(0,t.jsx)(f.SettingChoiceRows,{options:_.CALL_BACK_MODES.map(e=>({value:e,label:_.CALL_BACK_LABEL[e],hint:eo[e]})),value:e,onChange:n})})}let eo={off:"Nothing opens a call but you.",waiting:"A job that stopped to ask gets her to ring you.",any:"Anything a bot finishes, she opens a line to tell you."};function ec({value:e,onChange:n}){return(0,t.jsx)(f.SettingGroup,{label:"Captions",children:(0,t.jsx)(f.SettingChoiceRows,{options:_.CAPTION_VIEWS.map(e=>({value:e,label:ea[e].label,hint:ea[e].hint})),value:e,onChange:n})})}function eu({value:e,onChange:n}){let s=(0,U.useDraft)(e.phrase,t=>n({...e,phrase:t}),{min:_.WAKE_PHRASE.min}),r=s.value.trim().split(/\s+/).length<2;return(0,t.jsx)(f.SettingGroup,{label:"Wake",children:(0,t.jsx)(f.SettingToggle,{label:"Answer to her name",description:"Between calls, the browser listens for the phrase below and picks up when it hears it.",checked:e.enabled,onChange:t=>n({...e,enabled:t}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o.Input,{value:s.value,maxLength:_.WAKE_PHRASE.max,spellCheck:!1,onChange:e=>s.set(e.target.value),onBlur:s.commit,onKeyDown:s.onKeyDown,"aria-label":"Wake phrase",className:"font-mono text-sm"}),(0,t.jsx)(f.SettingNote,{children:r?"One word will wake her by accident — say hello first.":"Heard loosely, in English. Near misses count."})]})})})}function ed({value:e,onChange:n}){let[s,l]=(0,r.useState)(!1),[a,i]=(0,r.useState)(!1),o=(0,Y.useHotkeyLabel)((0,Y.isCombo)(e.combo)?e.combo:null);return(0,t.jsx)(f.SettingGroup,{label:"Shortcut",children:(0,t.jsx)(f.SettingToggle,{label:"Answer to a key",description:"With this tab in front, the key below starts a call — and ends the one that is running.",checked:e.enabled,onChange:t=>n({...e,enabled:t}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("button",{type:"button",...Y.HOTKEY_CAPTURE,onClick:()=>{i(!1),l(!0)},onBlur:()=>l(!1),onKeyDown:s?t=>{if("Tab"===t.key)return;if(t.preventDefault(),t.stopPropagation(),"Escape"===t.key)return l(!1);let s=(0,Y.comboOf)(t.nativeEvent);if(!s)return i(!0);i(!1),l(!1),n({...e,combo:s})}:void 0,className:(0,E.cn)("w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",s?"border-foreground/40 text-muted-foreground":"border-border/60 hover:bg-muted/50"),children:s?"Press the keys…":o??"Set a shortcut"}),(0,t.jsx)(f.SettingNote,{children:a?"Hold Ctrl, Alt or Cmd — a plain key is typing.":s?"Esc to keep the one you have.":"Only while this tab has focus. Not while you are typing."})]})})})}function eh({value:e,onSave:n}){let[s,l]=(0,r.useState)(e);return(0,t.jsx)(f.SettingGroup,{label:"Instructions",right:`${s.length}/${X.COMMON_VALIDATE.prompt.max}`,children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(h.Textarea,{value:s,maxLength:X.COMMON_VALIDATE.prompt.max,onChange:e=>l(e.target.value),placeholder:"Anything else she should know before the first word — how to address you, what to skip.",className:"min-h-28"}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(a.Button,{size:"sm",disabled:s===e,onClick:()=>n(s),children:"Save"})})]})})}e.s(["ThursdaySetting",0,function(){let e=(0,q.useThursdayStore)(),n=(0,q.useThursdayStore)(e=>e.patch),{data:s=[],isLoading:r,error:a}=(0,Z.useServerRoute)(l.queryKey.llmModel),i=(0,O.useThursdayFace)();if(r)return(0,t.jsx)(f.SettingSkeleton,{rows:4});if(a)return(0,t.jsx)(f.SettingError,{message:a.message});let o=e.model?.provider??null;return(0,t.jsxs)(f.SettingScreen,{footer:(0,t.jsx)(f.SettingRailNote,{children:"Her prompt is assembled fresh on every call — memory, the roster and your skills go in."}),children:[(0,t.jsx)(et,{value:i,onChange:O.setThursdayFace}),(0,t.jsx)(I,{}),(0,t.jsx)(f.SettingGroup,{label:"Voice",note:!o&&"Nothing picked — calls run on whichever key is set.",children:(0,t.jsx)(f.SettingItems,{children:x.SPEACH_MODEL_PROVIDER_LIST.map(r=>{let l;return(0,t.jsx)(el,{provider:r,value:o===r.id?e.model:null,hasKey:(l=r.apiKeyName,s.some(e=>e.apiKeyName===l&&e.hasKey)),onPick:e=>n({model:{provider:r.id,...e}})},r.id)})})}),(0,t.jsx)(ec,{value:e.captionView,onChange:e=>n({captionView:e})}),(0,t.jsx)(eu,{value:e.wake,onChange:e=>n({wake:e})}),(0,t.jsx)(ei,{value:e.callBack,onChange:e=>n({callBack:e})}),(0,t.jsx)(ed,{value:e.hotkey,onChange:e=>n({hotkey:e})}),(0,t.jsx)(J,{}),(0,t.jsx)(g.TidySetting,{}),(0,t.jsx)(eh,{value:e.systemPrompt??"",onSave:e=>n({systemPrompt:e})}),(0,t.jsx)(ee,{})]})}],59158)},698570,e=>{"use strict";var t=e.i(271645);e.s(["useDraft",0,function(e,n,{min:s=1}={}){let[r,l]=(0,t.useState)(e),[a,i]=(0,t.useState)(e);return e!==a&&(i(e),l(e)),{value:r,set:l,commit:()=>{let t=r.trim();if(t.length<s)return l(e);l(t),t!==e&&n(t)},onKeyDown:e=>{"Enter"!==e.key||e.nativeEvent.isComposing||e.currentTarget.blur()}}}])},661504,e=>{"use strict";var t=e.i(271645),n=e.i(699018),s=e.i(677309),r=e.i(271235),l=e.i(802239),a=e.i(646192);let i=Promise.resolve(),o=(0,r.withMiddleware)(n.u,e=>(n,r,o)=>{let c,u=(0,t.useRef)(!1),{cache:d,initialSize:h=1,revalidateAll:m=!1,persistSize:x=!1,revalidateFirstPage:p=!0,revalidateOnMount:g=!1,parallel:f=!1}=o,[,,,v]=s.a.get(s.o);try{(c=(0,s.s)(n?n(0,null):null)[0])&&(c=a.INFINITE_PREFIX+c)}catch(e){}let[b,y,j]=(0,s.c)(d,c),k=(0,t.useCallback)(()=>(0,s.i)(b()._l)?h:b()._l,[d,c,h]);(0,l.useSyncExternalStore)((0,t.useCallback)(e=>c?j(c,()=>{e()}):()=>{},[d,c]),k,k);let S=(0,t.useCallback)(()=>{let e=b()._l;return(0,s.i)(e)?h:e},[c,h]),N=(0,t.useRef)(S());(0,s.u)(()=>{if(!u.current){u.current=!0;return}c&&y({_l:x?N.current:S()})},[c,d]);let w=g&&!u.current,C=e(c,async e=>{let t=b()._i,l=b()._r,a=s.a.get(d),i=a[8],c=()=>a[8]!==i;y({_r:s.U});let u=[],h=S(),[x]=(0,s.c)(d,e),g=x().data,j=[],k=null;for(let e=0;e<h;++e){let[a,i]=(0,s.s)(n(e,f?null:k));if(!a)break;let[h,x]=(0,s.c)(d,a),b=h().data,y=m||t||(0,s.i)(b)||p&&!e&&!(0,s.i)(g)||w||g&&!(0,s.i)(g[e])&&!o.compare(g[e],b);if(r&&("function"==typeof l?l(b,i):y)){let t=async()=>{if(a in v){let e=v[a];delete v[a],b=await e}else b=await r(i);c()||x({data:b,_k:i}),u[e]=b};f?j.push(t):await t()}else u[e]=b;f||(k=b)}return f&&await Promise.all(j.map(e=>e())),c()||y({_i:s.U}),u},o),A=(0,t.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return c?(r&&((0,s.i)(e)?y({_i:!0,_r:n.revalidate}):y({_i:!1,_r:n.revalidate})),arguments.length?C.mutate(e,{...n,revalidate:r}):C.mutate()):i},[c,d]),E=(0,t.useCallback)(e=>{let t;if(!c)return i;let[,r]=(0,s.c)(d,c);if((0,s.e)(e)?t=e(S()):"number"==typeof e&&(t=e),"number"!=typeof t)return i;r({_l:t}),N.current=t;let l=[],[a]=(0,s.c)(d,c),o=null;for(let e=0;e<t;++e){let[t]=(0,s.s)(n(e,o)),[r]=(0,s.c)(d,t),i=t?r().data:s.U;if((0,s.i)(i))return A(a().data);l.push(i),o=i}return A(l)},[c,d,A,S]);return{size:S(),setSize:E,mutate:A,get data(){return C.data},get error(){return C.error},get isValidating(){return C.isValidating},get isLoading(){return C.isLoading}}});var c=e.i(41533),u=e.i(283653);e.s(["useServerPages",0,function(e){let n=e.size??c.PAGE_SIZE,{key:s}=e,{data:r,error:l,isLoading:a,isValidating:i,setSize:d,mutate:h}=o((e,t)=>(0,u.resolveKey)(s(e,t)),u.fetchRoute,{dedupingInterval:500,revalidateOnMount:!0,revalidateOnFocus:!0,revalidateOnReconnect:!0,focusThrottleInterval:1e3,revalidateFirstPage:!1,...e.swr}),m=r??[],x=m.flat(),p=m.at(-1),g=void 0!==p&&p.length>=n,f=(0,t.useRef)(0),v=i&&m.length>0&&f.current>m.length,b=(0,t.useRef)({isValidating:i,setSize:d,pages:m.length});b.current={isValidating:i,setSize:d,pages:m.length};let y=(0,u.resolveKey)(s(0,null)),j="string"==typeof y?y:y?.url;(0,t.useEffect)(()=>{if(j)return(0,u.registerPagedReader)({url:j,refresh:()=>h()})},[j,h]);let k=function(e,n={}){let{enabled:s=!0,margin:r="600px",revision:l}=n,a=(0,t.useRef)(e);a.current=e;let i=(0,t.useRef)(null),o=(0,t.useRef)(null),c=(0,t.useCallback)(e=>{i.current=e},[]);return(0,t.useEffect)(()=>{o.current?.disconnect();let e=i.current;if(e&&s)return o.current=new IntersectionObserver(([e])=>{e.isIntersecting&&a.current()},{root:function(e){let t=e.parentElement;for(;t;){let{overflowY:e}=getComputedStyle(t);if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}(e),rootMargin:r}),o.current.observe(e),()=>o.current?.disconnect()},[s,r,l]),c}(()=>{let e=b.current;e.isValidating||(f.current=e.pages+1,e.setSize(e.pages+1))},{enabled:g,revision:`${m.length}:${i}`});return{items:x,isLoading:a,isLoadingMore:v,error:l,hasMore:g,sentinelRef:k,refresh:()=>h()}}],661504)},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,161483,e=>{"use strict";var t=e.i(843476),n=e.i(647163);e.s(["Swatch",0,function({color:e,picked:s,onPick:r}){return(0,t.jsx)("button",{type:"button",onClick:r,"aria-label":e??"Follow the theme",style:e?{backgroundColor:e}:void 0,className:(0,n.cn)("size-5 rounded-full outline-none transition-transform hover:scale-110 focus-visible:ring-3 focus-visible:ring-ring/50",!e&&"bg-foreground",s&&"ring-2 ring-foreground/40 ring-offset-2 ring-offset-background")})}])},59158,e=>{"use strict";var t=e.i(843476),n=e.i(689664),s=e.i(466787),r=e.i(271645),l=e.i(798120),a=e.i(167881),i=e.i(736185),o=e.i(23750),c=e.i(917162),u=e.i(421429),d=e.i(161483),h=e.i(184762),m=e.i(968978),x=e.i(265402),p=e.i(864723),g=e.i(692329),f=e.i(895836),v=e.i(867927),b=e.i(456420);let y={name:"phone",size:24,node:[["path",{d:"M13.832 16.568a1 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 2A18 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 6.392 6.384",key:"9njp5v"}]]};y.node;let j=(0,b.default)(y);var k=e.i(759659),S=e.i(671428),N=e.i(222055),w=e.i(245629),C=e.i(609856),A=e.i(661504),E=e.i(647163),R=e.i(95187);let T=(0,R.createServerReference)("7f308b62dee2fc5694c7bd7d65c7a87fa1f283c807",R.callServer,void 0,R.findSourceMapURL,"deleteCallAction");var _=e.i(671228),K=e.i(561540),M=e.i(635963),O=e.i(762074);function z({size:e=16,className:n}){let s=(0,O.useThursdayFace)();return(0,t.jsx)(M.BotMark,{size:e,seed:"thursday",color:s.color,shape:s.shape,outline:s.outline,notify:!1,className:n})}function I(){return(0,t.jsx)(f.SettingGroup,{label:"Transcripts",children:(0,t.jsx)(f.SettingItems,{children:(0,t.jsxs)("button",{type:"button",onClick:()=>c.notify.component({className:"sm:max-w-3xl",renderer:()=>(0,t.jsx)(f.SettingDialogContent,{title:"Call history",description:"Everything said on the line, oldest at the top. Scroll up for older calls.",children:(0,t.jsx)(L,{})})}),className:"flex w-full items-center gap-3 p-4 text-left outline-none transition-colors hover:bg-muted/50 focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(j,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block text-sm font-medium",children:"Call history"}),(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:"Every call, word for word — hers and yours"})]}),(0,t.jsx)(v.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground"})]})})})}let P="h-[min(34rem,58vh)] min-h-64 px-1";function L(){let{items:e,isLoading:n,isLoadingMore:s,error:a,hasMore:i,sentinelRef:o,refresh:c}=(0,A.useServerPages)({key:(e,t)=>{if(0===e)return l.queryKey.callHistory(null);let n=t?.at(-1);return n?l.queryKey.callHistory((0,w.toDate)(n.startedAt).toISOString()):null},size:_.CALL_HISTORY_PAGE,swr:{revalidateOnFocus:!1}}),u=(0,r.useMemo)(()=>[...e].reverse(),[e]),d=(0,r.useRef)(null),h=(0,r.useRef)(!1),m=(0,r.useRef)(0);return((0,r.useLayoutEffect)(()=>{let e=d.current;e&&0!==u.length&&(h.current?e.scrollTop=e.scrollHeight-m.current:(h.current=!0,e.scrollTop=e.scrollHeight),m.current=e.scrollHeight-e.scrollTop)},[u]),n)?(0,t.jsx)("div",{className:(0,E.cn)(P,"overflow-hidden"),children:(0,t.jsx)(H,{})}):a?(0,t.jsx)(f.SettingError,{message:a.message}):(0,t.jsx)(t.Fragment,{children:0===u.length?(0,t.jsx)("p",{className:"px-1 text-sm leading-relaxed text-muted-foreground",children:"No calls yet. Everything said on the line is kept here — hers and yours, in the order it was said."}):(0,t.jsxs)("div",{ref:d,onScroll:e=>{let t=e.currentTarget;m.current=t.scrollHeight-t.scrollTop},className:(0,E.cn)(P,"overflow-y-auto overscroll-contain pb-6"),children:[(0,t.jsx)(f.SettingMore,{hasMore:i,loading:s,sentinelRef:o,count:1,ghost:(0,t.jsx)(H,{})}),u.map(e=>(0,t.jsx)(D,{call:e,onDropped:c},e.id))]})})}function H(){return(0,t.jsxs)("div",{className:"space-y-3 pb-3",children:[(0,t.jsxs)("div",{className:"flex items-center gap-3 py-5",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsx)(S.Skeleton,{className:"h-6 w-36 rounded-full"}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsx)("span",{className:"size-7 shrink-0"})]}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(S.Skeleton,{className:"h-9 w-3/5 rounded-2xl rounded-br-md"})}),(0,t.jsx)(S.Skeleton,{className:"h-5 w-2/3"})]})}function D({call:e,onDropped:n}){let[s,r]=(0,C.useServerAction)(T,{okMessage:"Call deleted",onOk:n}),l=(0,w.toDate)(e.startedAt),i=e.turns.at(-1),o=e.endedAt&&i?function(e,t){let n=Math.max(0,Math.round((t.getTime()-e.getTime())/1e3));if(n<60)return`${n}s`;let s=Math.floor(n/60);return s<60?`${s}m ${String(n%60).padStart(2,"0")}s`:`${Math.floor(s/60)}h ${String(s%60).padStart(2,"0")}m`}(l,(0,w.toDate)(i.at)):"on the line",u=async()=>{await c.notify.confirm({title:`Delete the call from ${(0,w.whenOf)(l)}?`,description:"Every turn of it goes — and she stops reading it back into the next call.",okText:"Delete",destructive:!0})&&s(e.id)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"group flex items-center gap-3 py-5",children:[(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsxs)("span",{title:`${e.provider} \xb7 ${e.model}`,className:"flex shrink-0 items-center gap-2 rounded-full bg-muted/60 py-1 pr-3 pl-2.5 ring-1 ring-border/50",children:[(0,t.jsx)(j,{className:"size-3 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-mono text-[11px]",children:(0,w.whenOf)(l)}),(0,t.jsx)("span",{className:"font-mono text-[10px] text-muted-foreground",children:o})]}),(0,t.jsx)("span",{className:"h-px flex-1 bg-border/60"}),(0,t.jsx)("span",{className:"flex size-7 shrink-0 items-center justify-center",children:e.endedAt&&(0,t.jsx)(a.Button,{size:"icon-sm",variant:"ghost",loading:r,"aria-label":"Delete this call",onClick:u,className:"text-muted-foreground/60 opacity-0 transition-opacity group-hover:opacity-100 hover:text-destructive focus-visible:opacity-100",children:(0,t.jsx)(k.Trash2,{})})})]}),(function(e){let t=[];for(let n of e){let e=t.at(-1);if(e&&"tool"===n.role&&"tool"===e.turn.role&&e.turn.tool===n.tool&&e.turn.text===n.text){e.repeats+=1;continue}t.push({turn:n,repeats:1})}return t})(e.turns).map(({turn:e,repeats:n},s,r)=>{let l=r[s-1]?.turn,a=r[s+1]?.turn;return(0,t.jsx)(F,{turn:e,repeats:n,opensRun:l?.role!==e.role,closesRun:a?.role!==e.role},e.id)})]})}function F({turn:e,opensRun:n,closesRun:s,repeats:r=1}){if("tool"===e.role)return(0,t.jsx)($,{turn:e,repeats:r});let l="user"===e.role;return(0,t.jsxs)("div",{className:(0,E.cn)("flex items-end gap-2",n?"mt-3":"mt-1",l?"justify-end":"justify-start"),children:[!l&&(0,t.jsx)("span",{className:"mb-0.5 grid size-[18px] shrink-0 place-items-center",children:s&&(0,t.jsx)(z,{size:18})}),(0,t.jsx)("p",{className:(0,E.cn)("max-w-[min(34rem,78%)] px-3.5 py-2 text-[13.5px] leading-relaxed break-keep whitespace-pre-wrap",l?"rounded-2xl bg-muted":"rounded-2xl bg-card ring-1 ring-border/70",s&&(l?"rounded-br-sm":"rounded-bl-sm")),children:e.text})]})}function $({turn:e,repeats:n}){let s=e.tool??"",r=(0,N.toolIcon)(s),l=(0,K.toolLine)(s,e.text);return(0,t.jsx)("div",{className:"mt-3 mb-1 flex justify-center",children:(0,t.jsxs)("span",{className:"flex max-w-full items-center gap-2 rounded-full bg-muted/40 px-2.5 py-1 text-muted-foreground",children:[(0,t.jsx)(r,{className:"size-3 shrink-0"}),l&&(0,t.jsx)("span",{className:"truncate text-[11px] break-keep",children:l}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/60",children:s}),n>1&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:["×",n]})]})})}var G=e.i(333495),B=e.i(933916);let V=(0,R.createServerReference)("7fb50eb7cc92aaa810d21b827d1478b0ecce768c02",R.callServer,void 0,R.findSourceMapURL,"resetHistoryAction"),W=(0,R.createServerReference)("7fde28327961c57985f849d431eee93288e0f49c1d",R.callServer,void 0,R.findSourceMapURL,"setCallSkillsAction");var q=e.i(67045),U=e.i(698570),Y=e.i(319841),X=e.i(981203),Z=e.i(283653);function J(){let{data:e}=(0,Z.useServerRoute)(l.queryKey.callSkills),[n]=(0,C.useServerAction)(W,{onOk:()=>(0,Z.revalidate)(l.queryKey.callSkills)});return(0,t.jsx)(f.SettingGroup,{label:"Skills",children:(0,t.jsx)(f.SettingToggle,{label:"Read a skill herself",description:"A skill is how a thing is done here, written down. On, she opens one mid-call and follows it; off, only bots read them.",checked:e??!1,disabled:void 0===e,onChange:e=>n(e),children:(0,t.jsx)(Q,{})})})}function Q(){let{data:e}=(0,Z.useServerRoute)(l.queryKey.skills);return e?(0,t.jsx)(f.SettingNote,{className:(0,E.cn)(!e.length&&E.WAITING_INK),children:e.length?`The same ${e.length} a bot reads. Each one she opens spends a page of the call on it.`:"Nothing installed yet — there is nothing for her to read."}):null}function ee(){let[e,n]=(0,C.useServerAction)(V,{okMessage:({calls:e,tasks:t,notes:n})=>`Wiped ${e} calls, ${t} jobs, ${n} notes`,onOk:()=>{(0,Z.revalidate)(l.queryKey.memory),(0,Z.revalidate)(l.queryKey.tasks),(0,Z.revalidate)(l.queryKey.callHistory(null))}}),r=async()=>{await c.notify.confirm({title:"Reset history?",description:"Every call, every job and everything she remembers is deleted for good. Keys, bots and connectors stay.",okText:"Reset",destructive:!0})&&e()};return(0,t.jsx)(f.SettingGroup,{label:"Danger zone",note:"Keys, bots and connectors stay.",children:(0,t.jsx)(f.SettingItems,{children:(0,t.jsxs)("div",{className:"flex items-center gap-3 p-4",children:[(0,t.jsx)("span",{className:"grid size-10 shrink-0 place-items-center rounded-lg bg-muted text-muted-foreground",children:(0,t.jsx)(s.TriangleAlert,{className:"size-4"})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block text-sm font-medium",children:"Reset history"}),(0,t.jsx)("span",{className:"block text-xs text-muted-foreground",children:"Every call, every job and everything she remembers"})]}),(0,t.jsx)(a.Button,{variant:"outline",size:"sm",loading:n,onClick:r,className:"shrink-0 text-destructive hover:text-destructive",children:"Reset"})]})})})}function et({value:e,onChange:n}){let s=t=>n({...e,...t});return(0,t.jsx)(f.SettingGroup,{label:"Face",children:(0,t.jsxs)("div",{className:"space-y-5 py-2",children:[(0,t.jsxs)("div",{className:"flex flex-col items-center gap-4 pt-2",children:[(0,t.jsx)(G.Face,{look:e,size:176,className:"w-44"}),(0,t.jsx)(u.Segmented,{"aria-label":"Face",options:B.FACE_KINDS.map(e=>({value:e,label:G.FACES[e].label})),value:e.kind,onChange:e=>s({kind:e})}),(0,t.jsx)("p",{className:"max-w-sm text-center text-xs text-muted-foreground",children:G.FACES[e.kind].hint})]}),"mark"===e.kind&&(0,t.jsx)("div",{className:"flex justify-center px-2",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,t.jsx)(d.Swatch,{color:null,picked:!e.color,onPick:()=>s({color:void 0})}),(0,t.jsx)("span",{className:"w-2"}),p.MARK_PALETTE_ROWS[0].map(n=>(0,t.jsx)(d.Swatch,{color:n,picked:e.color===n,onPick:()=>s({color:n})},n))]}),(0,t.jsx)("div",{className:"flex flex-wrap items-center gap-2 pl-9",children:p.MARK_PALETTE_ROWS[1].map(n=>(0,t.jsx)(d.Swatch,{color:n,picked:e.color===n,onPick:()=>s({color:n})},n))})]})}),"mark"===e.kind&&(0,t.jsx)(es,{label:"Shape",children:(0,t.jsx)(u.Segmented,{"aria-label":"Shape",options:p.MARK_SHAPES.map(e=>({value:e,label:(0,t.jsx)("span",{className:"capitalize",children:e})})),value:e.shape??"blob",onChange:e=>s({shape:e})})}),"mark"===e.kind&&(0,t.jsx)(es,{label:"Style",children:(0,t.jsx)(u.Segmented,{"aria-label":"Style",options:[{value:"solid",label:"Solid"},{value:"outline",label:"Outline"}],value:e.outline?"outline":"solid",onChange:e=>s({outline:"outline"===e||void 0})})}),"ascii"===e.kind&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(es,{label:"Glyphs",children:(0,t.jsx)(u.Segmented,{"aria-label":"Glyphs",options:B.ASCII_CHARSETS.map(e=>({value:e,label:en[e]})),value:e.charset,onChange:e=>s({charset:e})})}),(0,t.jsx)(es,{label:"Size",children:(0,t.jsx)(er,{min:4,max:16,step:1,value:e.fontSize,format:e=>`${e}px`,onChange:e=>s({fontSize:e})})}),(0,t.jsx)(es,{label:"Density",children:(0,t.jsx)(er,{min:.6,max:2,step:.1,value:e.density,format:e=>`${e.toFixed(1)}x`,onChange:e=>s({density:e})})})]})]})})}let en={ascii:"Characters",emoji:"Sprinkled",emojiOnly:"All emoji"};function es({label:e,children:n}){return(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("span",{className:"w-16 shrink-0 font-mono text-[11px] text-muted-foreground",children:e}),n]})}function er({value:e,onChange:n,format:s,...r}){return(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 items-center gap-3",children:[(0,t.jsx)("input",{type:"range",...r,value:e,onChange:e=>n(Number(e.target.value)),className:"min-w-0 flex-1 accent-foreground"}),(0,t.jsx)("span",{className:"w-10 shrink-0 text-right font-mono text-[11px] text-muted-foreground tabular-nums",children:s(e)})]})}function el({provider:e,value:r,hasKey:l,onPick:a}){let o=!!r,c=r?.voice??e.defaultVoice,u=r?.model??"";return(0,t.jsxs)("div",{className:(0,E.cn)("p-4",o&&"bg-muted/40"),children:[(0,t.jsxs)("button",{type:"button",disabled:o,onClick:()=>a({voice:null,model:null}),className:"flex w-full items-center gap-3 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 disabled:cursor-default",children:[(0,t.jsx)(m.ProviderIcon,{provider:e.id,className:"size-4 shrink-0"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsx)("span",{className:"block truncate text-sm font-medium",children:e.label}),(0,t.jsx)("span",{className:"block truncate font-mono text-xs text-muted-foreground",children:u||e.models[0].id})]}),l?o&&(0,t.jsx)(n.Check,{className:"size-4 shrink-0"}):(0,t.jsxs)("span",{className:"flex shrink-0 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:[(0,t.jsx)(s.TriangleAlert,{className:"size-3"}),"No key"]})]}),o&&(0,t.jsxs)("div",{className:"space-y-3 pt-3",children:[(0,t.jsx)(i.Combobox,{value:u,onChange:e=>a({voice:r?.voice??null,model:e||null}),options:e.models.map(e=>({value:e.id,label:e.label,hint:e.id})),"aria-label":`${e.label} realtime model`,placeholder:e.models[0].id,empty:"Not on the list — it still runs"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:e.voices.map(e=>(0,t.jsx)("button",{type:"button",onClick:()=>a({voice:e,model:r?.model??null}),className:(0,E.cn)("rounded-full border px-2.5 py-1 font-mono text-[11px] transition-colors outline-none focus-visible:ring-3 focus-visible:ring-ring/50",e===c?"border-foreground/40 text-foreground":"border-border/60 text-muted-foreground hover:text-foreground"),children:e},e))})]})]})}let ea={center:{label:"Her last line",hint:"One caption under the mark — only what she said."},sides:{label:"Last three turns",hint:"Hers on the left, yours on the right, beside the mark."}};function ei({value:e,onChange:n}){return(0,t.jsx)(f.SettingGroup,{label:"Calls you",note:"off"!==e&&"Needs this tab open. A tab that has been silent since it loaded may not be allowed to make a sound — the desktop notification covers that.",children:(0,t.jsx)(f.SettingChoiceRows,{options:_.CALL_BACK_MODES.map(e=>({value:e,label:_.CALL_BACK_LABEL[e],hint:eo[e]})),value:e,onChange:n})})}let eo={off:"Nothing opens a call but you.",waiting:"A job that stopped to ask gets her to ring you.",any:"Anything a bot finishes, she opens a line to tell you."};function ec({value:e,onChange:n}){return(0,t.jsx)(f.SettingGroup,{label:"Captions",children:(0,t.jsx)(f.SettingChoiceRows,{options:_.CAPTION_VIEWS.map(e=>({value:e,label:ea[e].label,hint:ea[e].hint})),value:e,onChange:n})})}function eu({value:e,onChange:n}){let s=(0,U.useDraft)(e.phrase,t=>n({...e,phrase:t}),{min:_.WAKE_PHRASE.min}),r=s.value.trim().split(/\s+/).length<2;return(0,t.jsx)(f.SettingGroup,{label:"Wake",children:(0,t.jsx)(f.SettingToggle,{label:"Answer to her name",description:"Between calls, the browser listens for the phrase below and picks up when it hears it.",checked:e.enabled,onChange:t=>n({...e,enabled:t}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)(o.Input,{value:s.value,maxLength:_.WAKE_PHRASE.max,spellCheck:!1,onChange:e=>s.set(e.target.value),onBlur:s.commit,onKeyDown:s.onKeyDown,"aria-label":"Wake phrase",className:"font-mono text-sm"}),(0,t.jsx)(f.SettingNote,{children:r?"One word will wake her by accident — say hello first.":"Heard loosely, in English. Near misses count."})]})})})}function ed({value:e,onChange:n}){let[s,l]=(0,r.useState)(!1),[a,i]=(0,r.useState)(!1),o=(0,Y.useHotkeyLabel)((0,Y.isCombo)(e.combo)?e.combo:null);return(0,t.jsx)(f.SettingGroup,{label:"Shortcut",children:(0,t.jsx)(f.SettingToggle,{label:"Answer to a key",description:"With this tab in front, the key below starts a call — and ends the one that is running.",checked:e.enabled,onChange:t=>n({...e,enabled:t}),children:(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("button",{type:"button",...Y.HOTKEY_CAPTURE,onClick:()=>{i(!1),l(!0)},onBlur:()=>l(!1),onKeyDown:s?t=>{if("Tab"===t.key)return;if(t.preventDefault(),t.stopPropagation(),"Escape"===t.key)return l(!1);let s=(0,Y.comboOf)(t.nativeEvent);if(!s)return i(!0);i(!1),l(!1),n({...e,combo:s})}:void 0,className:(0,E.cn)("w-full rounded-lg border px-3 py-2 font-mono text-sm outline-none transition-colors focus-visible:ring-3 focus-visible:ring-ring/50",s?"border-foreground/40 text-muted-foreground":"border-border/60 hover:bg-muted/50"),children:s?"Press the keys…":o??"Set a shortcut"}),(0,t.jsx)(f.SettingNote,{children:a?"Hold Ctrl, Alt or Cmd — a plain key is typing.":s?"Esc to keep the one you have.":"Only while this tab has focus. Not while you are typing."})]})})})}function eh({value:e,onSave:n}){let[s,l]=(0,r.useState)(e);return(0,t.jsx)(f.SettingGroup,{label:"Instructions",right:`${s.length}/${X.COMMON_VALIDATE.prompt.max}`,children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)(h.Textarea,{value:s,maxLength:X.COMMON_VALIDATE.prompt.max,onChange:e=>l(e.target.value),placeholder:"Anything else she should know before the first word — how to address you, what to skip.",className:"min-h-28"}),(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsx)(a.Button,{size:"sm",disabled:s===e,onClick:()=>n(s),children:"Save"})})]})})}e.s(["ThursdaySetting",0,function(){let e=(0,q.useThursdayStore)(),n=(0,q.useThursdayStore)(e=>e.patch),{data:s=[],isLoading:r,error:a}=(0,Z.useServerRoute)(l.queryKey.llmModel),i=(0,O.useThursdayFace)();if(r)return(0,t.jsx)(f.SettingSkeleton,{rows:4});if(a)return(0,t.jsx)(f.SettingError,{message:a.message});let o=e.model?.provider??null;return(0,t.jsxs)(f.SettingScreen,{footer:(0,t.jsx)(f.SettingRailNote,{children:"Her prompt is assembled fresh on every call — memory, the roster and your skills go in."}),children:[(0,t.jsx)(et,{value:i,onChange:O.setThursdayFace}),(0,t.jsx)(I,{}),(0,t.jsx)(f.SettingGroup,{label:"Voice",note:!o&&"Nothing picked — calls run on whichever key is set.",children:(0,t.jsx)(f.SettingItems,{children:x.SPEACH_MODEL_PROVIDER_LIST.map(r=>{let l;return(0,t.jsx)(el,{provider:r,value:o===r.id?e.model:null,hasKey:(l=r.apiKeyName,s.some(e=>e.apiKeyName===l&&e.hasKey)),onPick:e=>n({model:{provider:r.id,...e}})},r.id)})})}),(0,t.jsx)(ec,{value:e.captionView,onChange:e=>n({captionView:e})}),(0,t.jsx)(eu,{value:e.wake,onChange:e=>n({wake:e})}),(0,t.jsx)(ei,{value:e.callBack,onChange:e=>n({callBack:e})}),(0,t.jsx)(ed,{value:e.hotkey,onChange:e=>n({hotkey:e})}),(0,t.jsx)(J,{}),(0,t.jsx)(g.TidySetting,{}),(0,t.jsx)(eh,{value:e.systemPrompt??"",onSave:e=>n({systemPrompt:e})}),(0,t.jsx)(ee,{})]})}],59158)},698570,e=>{"use strict";var t=e.i(271645);e.s(["useDraft",0,function(e,n,{min:s=1}={}){let[r,l]=(0,t.useState)(e),[a,i]=(0,t.useState)(e);return e!==a&&(i(e),l(e)),{value:r,set:l,commit:()=>{let t=r.trim();if(t.length<s)return l(e);l(t),t!==e&&n(t)},onKeyDown:e=>{"Enter"!==e.key||e.nativeEvent.isComposing||e.currentTarget.blur()}}}])},661504,e=>{"use strict";var t=e.i(271645),n=e.i(699018),s=e.i(677309),r=e.i(271235),l=e.i(802239),a=e.i(646192);let i=Promise.resolve(),o=(0,r.withMiddleware)(n.u,e=>(n,r,o)=>{let c,u=(0,t.useRef)(!1),{cache:d,initialSize:h=1,revalidateAll:m=!1,persistSize:x=!1,revalidateFirstPage:p=!0,revalidateOnMount:g=!1,parallel:f=!1}=o,[,,,v]=s.a.get(s.o);try{(c=(0,s.s)(n?n(0,null):null)[0])&&(c=a.INFINITE_PREFIX+c)}catch(e){}let[b,y,j]=(0,s.c)(d,c),k=(0,t.useCallback)(()=>(0,s.i)(b()._l)?h:b()._l,[d,c,h]);(0,l.useSyncExternalStore)((0,t.useCallback)(e=>c?j(c,()=>{e()}):()=>{},[d,c]),k,k);let S=(0,t.useCallback)(()=>{let e=b()._l;return(0,s.i)(e)?h:e},[c,h]),N=(0,t.useRef)(S());(0,s.u)(()=>{if(!u.current){u.current=!0;return}c&&y({_l:x?N.current:S()})},[c,d]);let w=g&&!u.current,C=e(c,async e=>{let t=b()._i,l=b()._r,a=s.a.get(d),i=a[8],c=()=>a[8]!==i;y({_r:s.U});let u=[],h=S(),[x]=(0,s.c)(d,e),g=x().data,j=[],k=null;for(let e=0;e<h;++e){let[a,i]=(0,s.s)(n(e,f?null:k));if(!a)break;let[h,x]=(0,s.c)(d,a),b=h().data,y=m||t||(0,s.i)(b)||p&&!e&&!(0,s.i)(g)||w||g&&!(0,s.i)(g[e])&&!o.compare(g[e],b);if(r&&("function"==typeof l?l(b,i):y)){let t=async()=>{if(a in v){let e=v[a];delete v[a],b=await e}else b=await r(i);c()||x({data:b,_k:i}),u[e]=b};f?j.push(t):await t()}else u[e]=b;f||(k=b)}return f&&await Promise.all(j.map(e=>e())),c()||y({_i:s.U}),u},o),A=(0,t.useCallback)(function(e,t){let n="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==n.revalidate;return c?(r&&((0,s.i)(e)?y({_i:!0,_r:n.revalidate}):y({_i:!1,_r:n.revalidate})),arguments.length?C.mutate(e,{...n,revalidate:r}):C.mutate()):i},[c,d]),E=(0,t.useCallback)(e=>{let t;if(!c)return i;let[,r]=(0,s.c)(d,c);if((0,s.e)(e)?t=e(S()):"number"==typeof e&&(t=e),"number"!=typeof t)return i;r({_l:t}),N.current=t;let l=[],[a]=(0,s.c)(d,c),o=null;for(let e=0;e<t;++e){let[t]=(0,s.s)(n(e,o)),[r]=(0,s.c)(d,t),i=t?r().data:s.U;if((0,s.i)(i))return A(a().data);l.push(i),o=i}return A(l)},[c,d,A,S]);return{size:S(),setSize:E,mutate:A,get data(){return C.data},get error(){return C.error},get isValidating(){return C.isValidating},get isLoading(){return C.isLoading}}});var c=e.i(41533),u=e.i(283653);e.s(["useServerPages",0,function(e){let n=e.size??c.PAGE_SIZE,{key:s}=e,{data:r,error:l,isLoading:a,isValidating:i,setSize:d,mutate:h}=o((e,t)=>(0,u.resolveKey)(s(e,t)),u.fetchRoute,{dedupingInterval:500,revalidateOnMount:!0,revalidateOnFocus:!0,revalidateOnReconnect:!0,focusThrottleInterval:1e3,revalidateFirstPage:!1,...e.swr}),m=r??[],x=m.flat(),p=m.at(-1),g=void 0!==p&&p.length>=n,f=(0,t.useRef)(0),v=i&&m.length>0&&f.current>m.length,b=(0,t.useRef)({isValidating:i,setSize:d,pages:m.length});b.current={isValidating:i,setSize:d,pages:m.length};let y=(0,u.resolveKey)(s(0,null)),j="string"==typeof y?y:y?.url;(0,t.useEffect)(()=>{if(j)return(0,u.registerPagedReader)({url:j,refresh:()=>h()})},[j,h]);let k=function(e,n={}){let{enabled:s=!0,margin:r="600px",revision:l}=n,a=(0,t.useRef)(e);a.current=e;let i=(0,t.useRef)(null),o=(0,t.useRef)(null),c=(0,t.useCallback)(e=>{i.current=e},[]);return(0,t.useEffect)(()=>{o.current?.disconnect();let e=i.current;if(e&&s)return o.current=new IntersectionObserver(([e])=>{e.isIntersecting&&a.current()},{root:function(e){let t=e.parentElement;for(;t;){let{overflowY:e}=getComputedStyle(t);if(("auto"===e||"scroll"===e)&&t.scrollHeight>t.clientHeight)return t;t=t.parentElement}return null}(e),rootMargin:r}),o.current.observe(e),()=>o.current?.disconnect()},[s,r,l]),c}(()=>{let e=b.current;e.isValidating||(f.current=e.pages+1,e.setSize(e.pages+1))},{enabled:g,revision:`${m.length}:${i}`});return{items:x,isLoading:a,isLoadingMore:v,error:l,hasMore:g,sentinelRef:k,refresh:()=>h()}}],661504)},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 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,107941,e=>{"use strict";var t=e.i(843476),n=e.i(24071),i=e.i(867927),s=e.i(482022),r=e.i(829600),a=e.i(434322),o=e.i(905015),l=e.i(226091),d=e.i(726067),c=e.i(569644),u=e.i(815170),x=e.i(51921),m=e.i(650639),h=e.i(759659),f=e.i(438583),p=e.i(271645),g=e.i(798120),y=e.i(167881),v=e.i(917162),k=e.i(41533),j=e.i(895836),b=e.i(621285),w=e.i(95187);let N=(0,w.createServerReference)("7f685111d166e51f98a7f055431231056f56d10d90",w.callServer,void 0,w.findSourceMapURL,"deleteWorkspaceFileAction"),S=(0,w.createServerReference)("7fc6a095553bc069c3c13dffc47c27717877d5b375",w.callServer,void 0,w.findSourceMapURL,"emptyScratchAction");var F=e.i(492615),C=e.i(245629),z=e.i(609856),R=e.i(283653),A=e.i(647163);let M={markdown:l.FileText,csv:m.Sheet,json:o.FileJson,text:l.FileText,frame:a.FileCode2,image:u.Image,audio:x.Music,video:f.Video,none:r.File};function $({label:e,rows:n,children:i}){return 0===n.length?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"px-3 pt-3 pb-1 font-mono text-[10px] text-muted-foreground/60",children:e}),i]})}function E({entry:e,active:n,onPick:s}){let r="dir"===e.kind?d.Folder:M[e.view];return(0,t.jsxs)("button",{type:"button",onClick:s,title:"file"===e.kind?`${e.name} \xb7 ${(0,C.shortAgo)(e.at)}`:e.name,className:(0,A.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",n?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,t.jsx)(r,{className:"size-3.5 shrink-0 opacity-70"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.name}),"file"===e.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/75",children:(0,A.formatBytes)(e.bytes)}),(0,t.jsx)("span",{className:"w-3.5 shrink-0"})]}):(0,t.jsx)(i.ChevronRight,{className:"size-3.5 shrink-0 text-muted-foreground/50"})]})}function O({empty:e,onReveal:n}){return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[e?(0,t.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:["Nothing here yet. What a bot writes during a call lands in"," ",(0,t.jsx)("span",{className:"font-mono text-[13px] text-foreground",children:"artifacts/"})," ","— a page, a table, a picture — and shows up here to open."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:"Pick a file on the left."}),(0,t.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:"Only what the app can open is listed — a page, a table, a picture, a note. Installed packages and tool leftovers are left out, and no folder is measured, so a folder opens as fast as it lists. Reveal folder for everything else."})]}),(0,t.jsxs)(y.Button,{variant:"outline",onClick:n,children:[(0,t.jsx)(c.FolderOpen,{}),"Reveal folder"]})]})}function P({file:e,onGone:n}){let i=e.path,[r]=(0,z.useServerAction)(F.openFileAction),[a,o]=(0,z.useServerAction)(N,{okMessage:"File deleted",onOk:()=>{(0,R.revalidate)(g.queryKey.workspace),n()}}),l=async()=>{await v.notify.confirm({title:`Delete ${i.split("/").pop()}?`,description:"It is deleted from disk for good.",okText:"Delete",destructive:!0})&&a(i)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-b border-border/60 px-6 py-2",children:[(0,t.jsx)(V,{path:i}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:[(0,A.formatBytes)(e.bytes)," · ",(0,C.shortAgo)(e.at)]}),(0,t.jsx)("a",{href:g.queryKey.fileView(i),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(s.ExternalLink,{className:"size-4"})}),(0,t.jsx)(y.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>r(i),children:(0,t.jsx)(c.FolderOpen,{})}),(0,t.jsx)(y.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:o,className:"text-muted-foreground",onClick:l,children:(0,t.jsx)(h.Trash2,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:(0,t.jsx)(b.FilePreview,{path:i,bytes:e.bytes})})]})}function V({path:e}){let n=["workspace",...e.split("/").filter(Boolean)];return(0,t.jsx)("span",{className:"flex min-w-0 flex-1 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:n.map((e,s)=>(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[s>0&&(0,t.jsx)(i.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,t.jsx)("span",{className:(0,A.cn)("truncate",s===n.length-1&&"text-foreground"),children:e})]},`${s}-${e}`))})}e.s(["WorkspaceSetting",0,function(){let[e,i]=(0,p.useState)(""),[s,r]=(0,p.useState)(k.WORKSPACE_VIEW.rows),[a,o]=(0,p.useState)(null),[l,d]=(0,p.useState)(""),{data:u,isLoading:x,error:m}=(0,R.useServerRoute)(g.queryKey.workspaceFolder(e,s),{keepPreviousData:!0}),h=e=>{i(e),r(k.WORKSPACE_VIEW.rows)},[f,b]=(0,z.useServerAction)(S,{okMessage:"Scratch emptied",onOk:()=>(0,R.revalidate)(g.queryKey.workspace)}),[w]=(0,z.useServerAction)(F.openFileAction),N=async()=>{await v.notify.confirm({title:"Empty scratch?",description:"Everything under scratch/ is deleted for good. artifacts/ and projects/ are untouched.",okText:"Empty",destructive:!0})&&f()};if(x)return(0,t.jsx)(j.SettingPanesSkeleton,{});if(m)return(0,t.jsx)(j.SettingError,{message:m.message});let C=u?.entries??[],A=u?.total??0,M=l.trim().toLowerCase(),V=M?C.filter(e=>e.name.toLowerCase().includes(M)):C,B=V.filter(e=>"dir"===e.kind),W=V.filter(e=>"file"===e.kind),K=C.find(e=>"file"===e.kind&&e.path===a?.path)??a;return(0,t.jsx)(j.SettingPanes,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.SettingRailNote,{children:(0,t.jsxs)("span",{className:"font-mono",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:`.ai-workspace${e?`/${e}`:""}`}),` \xb7 ${function(e,t){let n=e.filter(e=>"dir"===e.kind).length,i=e.length-n,s=[n&&`${n} ${1===n?"folder":"folders"}`,i&&`${i} ${1===i?"file":"files"}`].filter(Boolean);if(!s.length)return"empty";let r=s.join(" · ");return t>e.length?`${r} of ${t.toLocaleString("en")}`:r}(C,A)}`]})}),(0,t.jsxs)(y.Button,{variant:"outline",size:"sm",onClick:()=>w(e||"."),children:[(0,t.jsx)(c.FolderOpen,{}),"Reveal folder"]}),(0,t.jsx)(y.Button,{variant:"outline",size:"sm",loading:b,onClick:N,className:"text-destructive hover:text-destructive",children:"Empty scratch"})]}),left:(0,t.jsxs)("div",{className:"flex flex-col py-2",children:[(0,t.jsx)(j.SettingFilter,{value:l,onChange:d,placeholder:"Filter this folder",className:"mx-2 mb-1.5 w-auto"}),e&&(0,t.jsxs)("button",{type:"button",onClick:()=>h(e.split("/").slice(0,-1).join("/")),className:"mx-2 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.split("/").slice(0,-1).pop()??"workspace"})]}),0===V.length?(0,t.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground/60",children:M?"Nothing matches":"Empty folder"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($,{label:"folders",rows:B,children:B.map(e=>(0,t.jsx)(E,{entry:e,onPick:()=>h(e.path)},e.path))}),(0,t.jsx)($,{label:"files",rows:W,children:W.map(e=>(0,t.jsx)(E,{entry:e,active:e.path===a?.path,onPick:()=>"file"===e.kind&&o(e)},e.path))})]}),A>C.length&&(0,t.jsx)("button",{type:"button",onClick:()=>r(s+k.WORKSPACE_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(k.WORKSPACE_VIEW.rows,A-C.length)} more of ${A.toLocaleString("en")}`})]}),right:K?.kind==="file"?(0,t.jsx)(P,{file:K,onGone:()=>o(null)},K.path):(0,t.jsx)(O,{empty:!e&&0===C.length,onReveal:()=>w(".")})})}],107941)},434322,51921,650639,438583,e=>{"use strict";var t=e.i(456420);let n={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};n.node;let i=(0,t.default)(n);e.s(["FileCode2",0,i],434322);let s={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};s.node;let r=(0,t.default)(s);e.s(["Music",0,r],51921);let a={name:"sheet",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]};a.node;let o=(0,t.default)(a);e.s(["Sheet",0,o],650639);let l={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};l.node;let d=(0,t.default)(l);e.s(["Video",0,d],438583)},726067,e=>{"use strict";var t=e.i(456420);let n={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};n.node;let i=(0,t.default)(n);e.s(["Folder",0,i],726067)},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 i=(0,t.default)(n);e.s(["Trash2",0,i],759659)}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,107941,e=>{"use strict";var t=e.i(843476),n=e.i(24071),i=e.i(867927),s=e.i(482022),r=e.i(829600),a=e.i(434322),o=e.i(905015),l=e.i(226091),d=e.i(726067),c=e.i(569644),u=e.i(815170),x=e.i(51921),m=e.i(650639),f=e.i(759659),h=e.i(438583),p=e.i(271645),g=e.i(798120),y=e.i(167881),v=e.i(917162),k=e.i(41533),j=e.i(895836),b=e.i(621285),w=e.i(95187);let N=(0,w.createServerReference)("7f61aec1f183f55e877560e41cf04ffb3f33cd9a6d",w.callServer,void 0,w.findSourceMapURL,"deleteWorkspaceFileAction"),S=(0,w.createServerReference)("7fbf128d8083bcd6e67873ab0763c014db0934df2e",w.callServer,void 0,w.findSourceMapURL,"emptyScratchAction");var F=e.i(808317),C=e.i(245629),z=e.i(609856),R=e.i(283653),A=e.i(647163);let M={markdown:l.FileText,csv:m.Sheet,json:o.FileJson,text:l.FileText,frame:a.FileCode2,image:u.Image,audio:x.Music,video:h.Video,none:r.File};function $({label:e,rows:n,children:i}){return 0===n.length?null:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"px-3 pt-3 pb-1 font-mono text-[10px] text-muted-foreground/60",children:e}),i]})}function E({entry:e,active:n,onPick:s}){let r="dir"===e.kind?d.Folder:M[e.view];return(0,t.jsxs)("button",{type:"button",onClick:s,title:"file"===e.kind?`${e.name} \xb7 ${(0,C.shortAgo)(e.at)}`:e.name,className:(0,A.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",n?"bg-secondary font-medium text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground"),children:[(0,t.jsx)(r,{className:"size-3.5 shrink-0 opacity-70"}),(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate",children:e.name}),"file"===e.kind?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/75",children:(0,A.formatBytes)(e.bytes)}),(0,t.jsx)("span",{className:"w-3.5 shrink-0"})]}):(0,t.jsx)(i.ChevronRight,{className:"size-3.5 shrink-0 text-muted-foreground/50"})]})}function O({empty:e,onReveal:n}){return(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[e?(0,t.jsxs)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:["Nothing here yet. What a bot writes during a call lands in"," ",(0,t.jsx)("span",{className:"font-mono text-[13px] text-foreground",children:"artifacts/"})," ","— a page, a table, a picture — and shows up here to open."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:"Pick a file on the left."}),(0,t.jsx)("p",{className:"max-w-lg text-sm leading-relaxed text-muted-foreground",children:"Only what the app can open is listed — a page, a table, a picture, a note. Installed packages and tool leftovers are left out, and no folder is measured, so a folder opens as fast as it lists. Reveal folder for everything else."})]}),(0,t.jsxs)(y.Button,{variant:"outline",onClick:n,children:[(0,t.jsx)(c.FolderOpen,{}),"Reveal folder"]})]})}function P({file:e,onGone:n}){let i=e.path,[r]=(0,z.useServerAction)(F.openFileAction),[a,o]=(0,z.useServerAction)(N,{okMessage:"File deleted",onOk:()=>{(0,R.revalidate)(g.queryKey.workspace),n()}}),l=async()=>{await v.notify.confirm({title:`Delete ${i.split("/").pop()}?`,description:"It is deleted from disk for good.",okText:"Delete",destructive:!0})&&a(i)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-3 border-b border-border/60 px-6 py-2",children:[(0,t.jsx)(V,{path:i}),(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:[(0,A.formatBytes)(e.bytes)," · ",(0,C.shortAgo)(e.at)]}),(0,t.jsx)("a",{href:g.queryKey.fileView(i),target:"_blank",rel:"noreferrer","aria-label":"Open in a new tab",className:"grid size-7 shrink-0 place-items-center rounded-md text-muted-foreground outline-none transition-colors hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:(0,t.jsx)(s.ExternalLink,{className:"size-4"})}),(0,t.jsx)(y.Button,{size:"icon-sm",variant:"ghost","aria-label":"Reveal in the file manager",className:"text-muted-foreground",onClick:()=>r(i),children:(0,t.jsx)(c.FolderOpen,{})}),(0,t.jsx)(y.Button,{size:"icon-sm",variant:"ghost","aria-label":"Delete",loading:o,className:"text-muted-foreground",onClick:l,children:(0,t.jsx)(f.Trash2,{})})]}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:(0,t.jsx)(b.FilePreview,{path:i,bytes:e.bytes})})]})}function V({path:e}){let n=["workspace",...e.split("/").filter(Boolean)];return(0,t.jsx)("span",{className:"flex min-w-0 flex-1 items-center gap-1 font-mono text-[11px] text-muted-foreground",children:n.map((e,s)=>(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1",children:[s>0&&(0,t.jsx)(i.ChevronRight,{className:"size-3 shrink-0 opacity-50"}),(0,t.jsx)("span",{className:(0,A.cn)("truncate",s===n.length-1&&"text-foreground"),children:e})]},`${s}-${e}`))})}e.s(["WorkspaceSetting",0,function(){let[e,i]=(0,p.useState)(""),[s,r]=(0,p.useState)(k.WORKSPACE_VIEW.rows),[a,o]=(0,p.useState)(null),[l,d]=(0,p.useState)(""),{data:u,isLoading:x,error:m}=(0,R.useServerRoute)(g.queryKey.workspaceFolder(e,s),{keepPreviousData:!0}),f=e=>{i(e),r(k.WORKSPACE_VIEW.rows)},[h,b]=(0,z.useServerAction)(S,{okMessage:"Scratch emptied",onOk:()=>(0,R.revalidate)(g.queryKey.workspace)}),[w]=(0,z.useServerAction)(F.openFileAction),N=async()=>{await v.notify.confirm({title:"Empty scratch?",description:"Everything under scratch/ is deleted for good. artifacts/ and projects/ are untouched.",okText:"Empty",destructive:!0})&&h()};if(x)return(0,t.jsx)(j.SettingPanesSkeleton,{});if(m)return(0,t.jsx)(j.SettingError,{message:m.message});let C=u?.entries??[],A=u?.total??0,M=l.trim().toLowerCase(),V=M?C.filter(e=>e.name.toLowerCase().includes(M)):C,B=V.filter(e=>"dir"===e.kind),W=V.filter(e=>"file"===e.kind),K=C.find(e=>"file"===e.kind&&e.path===a?.path)??a;return(0,t.jsx)(j.SettingPanes,{footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(j.SettingRailNote,{children:(0,t.jsxs)("span",{className:"font-mono",children:[(0,t.jsx)("span",{className:"font-medium text-foreground",children:`.ai-workspace${e?`/${e}`:""}`}),` \xb7 ${function(e,t){let n=e.filter(e=>"dir"===e.kind).length,i=e.length-n,s=[n&&`${n} ${1===n?"folder":"folders"}`,i&&`${i} ${1===i?"file":"files"}`].filter(Boolean);if(!s.length)return"empty";let r=s.join(" · ");return t>e.length?`${r} of ${t.toLocaleString("en")}`:r}(C,A)}`]})}),(0,t.jsxs)(y.Button,{variant:"outline",size:"sm",onClick:()=>w(e||"."),children:[(0,t.jsx)(c.FolderOpen,{}),"Reveal folder"]}),(0,t.jsx)(y.Button,{variant:"outline",size:"sm",loading:b,onClick:N,className:"text-destructive hover:text-destructive",children:"Empty scratch"})]}),left:(0,t.jsxs)("div",{className:"flex flex-col py-2",children:[(0,t.jsx)(j.SettingFilter,{value:l,onChange:d,placeholder:"Filter this folder",className:"mx-2 mb-1.5 w-auto"}),e&&(0,t.jsxs)("button",{type:"button",onClick:()=>f(e.split("/").slice(0,-1).join("/")),className:"mx-2 mb-1 flex items-center gap-1 rounded-md px-2 py-1 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:[(0,t.jsx)(n.ChevronLeft,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.split("/").slice(0,-1).pop()??"workspace"})]}),0===V.length?(0,t.jsx)("p",{className:"px-4 py-3 text-xs text-muted-foreground/60",children:M?"Nothing matches":"Empty folder"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)($,{label:"folders",rows:B,children:B.map(e=>(0,t.jsx)(E,{entry:e,onPick:()=>f(e.path)},e.path))}),(0,t.jsx)($,{label:"files",rows:W,children:W.map(e=>(0,t.jsx)(E,{entry:e,active:e.path===a?.path,onPick:()=>"file"===e.kind&&o(e)},e.path))})]}),A>C.length&&(0,t.jsx)("button",{type:"button",onClick:()=>r(s+k.WORKSPACE_VIEW.rows),className:"mx-2 mt-2 rounded-md px-2 py-1.5 text-left font-mono text-[11px] text-muted-foreground outline-none hover:bg-muted/60 hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",children:`Show ${Math.min(k.WORKSPACE_VIEW.rows,A-C.length)} more of ${A.toLocaleString("en")}`})]}),right:K?.kind==="file"?(0,t.jsx)(P,{file:K,onGone:()=>o(null)},K.path):(0,t.jsx)(O,{empty:!e&&0===C.length,onReveal:()=>w(".")})})}],107941)},434322,51921,650639,438583,e=>{"use strict";var t=e.i(456420);let n={name:"file-code-corner",size:24,node:[["path",{d:"M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35",key:"1wthlu"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"m5 16-3 3 3 3",key:"331omg"}],["path",{d:"m9 22 3-3-3-3",key:"lsp7cz"}]],aliases:["file-code-2"]};n.node;let i=(0,t.default)(n);e.s(["FileCode2",0,i],434322);let s={name:"music",size:24,node:[["path",{d:"M9 18V5l12-2v13",key:"1jmyc2"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["circle",{cx:"18",cy:"16",r:"3",key:"1hluhg"}]]};s.node;let r=(0,t.default)(s);e.s(["Music",0,r],51921);let a={name:"sheet",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["line",{x1:"3",x2:"21",y1:"9",y2:"9",key:"1vqk6q"}],["line",{x1:"3",x2:"21",y1:"15",y2:"15",key:"o2sbyz"}],["line",{x1:"9",x2:"9",y1:"9",y2:"21",key:"1ib60c"}],["line",{x1:"15",x2:"15",y1:"9",y2:"21",key:"1n26ft"}]]};a.node;let o=(0,t.default)(a);e.s(["Sheet",0,o],650639);let l={name:"video",size:24,node:[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]};l.node;let d=(0,t.default)(l);e.s(["Video",0,d],438583)},726067,e=>{"use strict";var t=e.i(456420);let n={name:"folder",size:24,node:[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]]};n.node;let i=(0,t.default)(n);e.s(["Folder",0,i],726067)},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 i=(0,t.default)(n);e.s(["Trash2",0,i],759659)}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,222055,589128,e=>{"use strict";var t=e.i(843476),a=e.i(689664),n=e.i(716327),r=e.i(482022),s=e.i(60744),i=e.i(831458),o=e.i(91511),l=e.i(815170),d=e.i(218964),u=e.i(632781),c=e.i(468590),h=e.i(566595),p=e.i(730274),m=e.i(604139),f=e.i(747925),g=e.i(271645),x=e.i(798120),y=e.i(660302),k=e.i(671428),b=e.i(991322),v=e.i(852116);let M=e.i(328256).BookMarked;e.s(["SkillsMark",0,M],589128);var w=e.i(621285),j=e.i(283653),z=e.i(647163);let S={web_search:function({tool:e,taskId:a,collapsed:n}){let r=A(e.results);return(0,t.jsxs)(O,{tool:e,taskId:a,icon:h.Search,collapsed:n,children:[(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep",children:["“",e.input,"”"]}),r.length>0&&(0,t.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:r.map((e,a)=>(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})]},`${a}-${e}`))})]})},bash:function({tool:e,taskId:a,collapsed:n}){let r=A(e.results);return(0,t.jsx)(O,{tool:e,taskId:a,icon:m.Terminal,collapsed:n,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,r.length>0&&(0,t.jsx)("span",{className:"block text-muted-foreground",children:r.join("\n")})]})})},fetch:e=>(0,t.jsx)(C,{icon:o.Globe,...e}),write_file:e=>(0,t.jsx)(D,{icon:s.FilePen,...e}),generate_image:function({tool:e,taskId:a,collapsed:n}){let[s]=A(e.results);return(0,t.jsxs)(O,{tool:e,taskId:a,icon:l.Image,collapsed:n,children:[(0,t.jsx)("p",{className:"px-3 pt-1 text-[12px] leading-snug break-keep",children:e.input}),s&&(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] text-muted-foreground",children:s}),(0,t.jsxs)(w.FileLink,{path:s,label:`Open ${s}`,className:L,children:[(0,t.jsx)(r.ExternalLink,{className:"size-3"}),"Open"]})]})]})}},N={web_search:h.Search,bash:m.Terminal,fetch:o.Globe,write_file:s.FilePen,generate_image:l.Image,memory_recall:v.MemoryMark,memory_remember:v.MemoryMark,memory_forget:v.MemoryMark,memory_show:v.MemoryMark,load_skill:M,tool_search:b.McpMark,tool_call:b.McpMark,delegate:p.Send,task:d.ListChecks,ask_bot:c.MessageSquare,ask_back:c.MessageSquare,ask_thursday:c.MessageSquare,report:i.Flag},I=e=>N[e]??f.Wrench;function C({icon:e,tool:a,taskId:n,collapsed:r}){return(0,t.jsxs)(O,{tool:a,taskId:n,icon:e,collapsed:r,children:[(0,t.jsx)("p",{className:"truncate px-3 pt-1 pb-1.5 font-mono text-[11px]",children:a.input}),(0,t.jsx)(_,{lines:A(a.results),mono:!0})]})}let L="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";function D({icon:e,tool:a,taskId:n,collapsed:s}){let i=a.path??a.input;return(0,t.jsxs)(O,{tool:a,taskId:n,icon:e,collapsed:s,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:a.input}),(0,t.jsxs)(w.FileLink,{path:i,label:`Open ${i}`,className:L,children:[(0,t.jsx)(r.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,t.jsx)(_,{lines:A(a.results),mono:!0})]})}function E({tool:e,taskId:a,collapsed:n}){return(0,t.jsxs)(O,{tool:e,taskId:a,icon:I(e.name),collapsed:n,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)(_,{lines:A(e.results)})]})}function O({tool:e,taskId:r,icon:s,collapsed:i=!1,children:o}){let l=void 0===e.results,[d,c]=(0,g.useState)(!i),h=d||l,p=e.more&&r&&e.callId;return(0,t.jsxs)("div",{className:(0,z.cn)("@container w-full overflow-hidden rounded-xl transition-colors",h?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(e=>!e),"aria-expanded":h,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:l?(0,t.jsx)(u.Loader2,{className:"size-3 animate-spin"}):(0,t.jsx)(s,{className:"size-3"})}),e.note?(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(y.default,{text:e.note,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",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})]}):l?(0,t.jsx)(y.default,{text:e.input,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",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)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:e.name}),!l&&(0,t.jsx)(a.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,t.jsx)(n.ChevronDown,{className:(0,z.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",h&&"rotate-180")})]}),h&&(0,t.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[o,p&&(0,t.jsx)(R,{taskId:r,callId:e.callId})]})]})}function R({taskId:e,callId:a}){let[r,s]=(0,g.useState)(!1),{data:i,isLoading:o}=(0,j.useServerRoute)(r?x.queryKey.toolResult(e,a):null);return(0,t.jsxs)("div",{className:"px-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>s(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)(n.ChevronDown,{className:(0,z.cn)("size-3",r&&"rotate-180")}),r?"Less":"Everything"]}),r&&(o||!i?(0,t.jsx)(k.Skeleton,{className:"mt-1.5 h-12 w-full rounded-lg"}):(0,t.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[q(i).map((e,a)=>(0,t.jsx)(T,{src:e},`${a}-${e.length}`)),A(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:A(i).join("\n")})]}))]})}function T({src:e}){return(0,t.jsx)("img",{src:e,alt:"",className:"block w-full rounded-lg bg-muted object-contain"})}function _({lines:e,mono:a}){return 0===e.length?null:(0,t.jsx)("ul",{className:"px-3 pb-1.5",children:e.map((e,n)=>(0,t.jsx)("li",{className:(0,z.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",a&&"font-mono"),children:e},`${n}-${e}`))})}let A=e=>e?.flatMap(e=>"text"===e.type?[e.text]:[])??[],q=e=>e?.flatMap(e=>"image"===e.type?[e.src]:[])??[];e.s(["BotTool",0,function(e){let a=S[e.tool.name]??E;return(0,t.jsx)(a,{...e})},"toolIcon",0,I],222055)},68685,463625,e=>{"use strict";var t=e.i(95187);let a=(0,t.createServerReference)("7fc8f4e5b32b07762c645b5a30302da8202e398ee7",t.callServer,void 0,t.findSourceMapURL,"createSeedBotsAction");e.s(["createSeedBotsAction",0,a],68685);var n=e.i(41533);e.i(864723);let r=[{name:"Jarvis",description:"Any job — turns it into a plan, hands each part to whoever it belongs to, does the rest, reports one result",icon:{shape:"squircle"},recommended:!0,example:"Set up a Google account just for my bots to use",systemPrompt:"You are Jarvis. A job reaches you as a sentence and leaves as a plan: what it actually needs, in what order, and who does each part. Settle what is still open in one round rather than guessing at it, then send for what the job is made of before you build — a part another bot exists for is theirs, and everything nobody else is for is yours. You hold the whole while they hold pieces: the order the parts run in, the seams where what comes back has to fit together, and the single thing that is handed over at the end. The plan is how the job gets done, not what gets handed back."},{name:"Navigator",description:"The web through a real browser — opens the page itself, signs in, brings back prices, images and links as they stand now",icon:{shape:"poly"},recommended:!0,example:"Find thirty wedding pose photos and put them on one page for me",systemPrompt:`You are Navigator. Every browser job is yours: load the \`${n.BROWSER_SKILL}\` skill first and work through it. A search result says a page exists; you say what is on it right now — so open it, sign in where it asks you to, and keep going past the first screen until you have the thing itself: exact figures, the links that open them, the images off the page. Nothing you did not see goes in what you hand back, and a page that refused you is a fact with a url on it, not a gap to fill in from memory. Whoever asked should never need to open the site after you.`},{name:"Scribe",description:"Writing that gets read — finds out what it is for, researches it, then picks the form: prose, table, or a page",icon:{shape:"blob"},recommended:!0,example:"Write up what we decided today as a one-page brief",systemPrompt:"You are Scribe. Who reads it and what they do next decides everything else, so learn that first, then research before you claim: every number and name you write traces back to something you actually read. Pick the form by the reading — a `.md` for something read once, a `.csv` for what gets sorted, a page (the `interactive-page` skill) for something used or something whose pictures are the point. When the request does not settle which it is — something read once or something used — ask before you write rather than committing a whole draft to a guess. Cut what the reader would skip, and never spend a paragraph where a table or a picture answers in one glance. One page they finish beats five they abandon."}];e.s(["BOT_SEEDS",0,r],463625)},992112,e=>{"use strict";var t=e.i(265402);let a=[...new Set(Object.values(t.SPEACH_MODEL_PROVIDERS).map(e=>e.apiKeyName))],n={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},r={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},s={key:"DEFAULT_MODEL",label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:t.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},i=e=>a.includes(e.apiKeyName),o=e=>({key:e.apiKeyName,label:e.label,provider:e.id}),l=[{id:"voice",title:"voice",hint:"calls run on one of these",section:"keys",require:"any",note:"one is required",entries:t.TEXT_MODEL_PROVIDER_LIST.filter(i).map(o)},{id:"text",title:"models",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:t.TEXT_MODEL_PROVIDER_LIST.filter(e=>!i(e)).map(o)},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own",section:"models",require:"none",entries:[s]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(n).map(e=>({key:n[e],...r[e],kind:e,choices:t.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(l.flatMap(e=>e.entries).map(e=>[e.key,e])),l.flatMap(e=>e.entries.map(e=>e.key)),Object.fromEntries(l.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["CONFIG_GROUPS",0,l,"groupSatisfied",0,function(e,t){return"none"===e.require||(e.requireKeys??e.entries.map(e=>e.key)).some(t)},"isConfigSet",0,function(e,t){return e?.some(e=>e.key===t&&e.set)??!1}])},852116,e=>{"use strict";var t=e.i(456420);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 n=(0,t.default)(a);e.s(["MemoryMark",0,n],852116)},395530,e=>{"use strict";var t=e.i(271645),a=e.i(828918),n=e.i(838452),r=e.i(673553);e.s(["useCompositeItem",0,function(e={}){let{highlightItemOnHover:s,highlightedIndex:i,onHighlightedIndexChange:o}=(0,n.useCompositeRootContext)(),{ref:l,index:d}=(0,r.useCompositeListItem)(e),u=i===d,c=t.useRef(null),h=(0,a.useMergedRefs)(l,c);return{compositeProps:{tabIndex:u?0:-1,onFocus(){o(d)},onMouseMove(){let e=c.current;if(!s||!e)return;let t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;u||t||e.focus()}},compositeRef:h,index:d}}])},53687,e=>{"use strict";var t=e.i(271645),a=e.i(388940),n=e.i(667865),r=e.i(146376),s=e.i(545356),i=e.i(843476);function o(){return new Map}function l(){return new Set}function d(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}e.s(["CompositeList",0,function(e){let{children:u,elementsRef:c,labelsRef:h,onMapChange:p}=e,m=(0,n.useStableCallback)(p),[,f]=t.useState(!1),g=(0,a.useRefWithInit)(l).current,x=(0,a.useRefWithInit)(o).current,y=t.useRef(0),k=t.useRef(!0),b=t.useRef(null),v=t.useRef(null),M=(0,n.useStableCallback)(()=>{k.current||(k.current=!0,f(e=>!e))}),w=(0,n.useStableCallback)((e,t)=>{x.set(e,t),M()}),j=(0,n.useStableCallback)(e=>{x.delete(e),M()}),z=(0,n.useStableCallback)(e=>{let t=new Map;return c.current.length=0,h&&(h.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),c.current[e.index]=e.element,h&&(h.current[e.index]=void 0!==e.registration.label?e.registration.label:e.registration.textRef?.current?.textContent??e.element.textContent)}),y.current=c.current.length,t}),S=(0,n.useStableCallback)(()=>{var e;let t,a,n,r,[s,i]=(e=x,t=new Set,a=[],n=[],e.forEach((e,r)=>{if(!r.isConnected)return;let s=e.index,i={index:s??-1,element:r,registration:e};null===s?n.push(i):s>=0&&(t.add(s),a.push(i))}),r=0,n.sort((e,t)=>d(e.element,t.element)),n.forEach(e=>{for(;t.has(r);)r+=1;e.index=r,a.push(e),r+=1}),t.size>0&&a.sort((e,t)=>e.index-t.index),[a,n.map(e=>e.element)]),o=z(s),l=b.current,u=!l||l.length!==s.length||s.some((e,t)=>{let a=l[t];return e.index!==a.index||e.element!==a.element||e.registration.index!==a.registration.index||e.registration.metadata!==a.registration.metadata});!function(e){if(v.current?.disconnect(),v.current=null,"function"!=typeof MutationObserver||e.length<2)return;let t=new MutationObserver(a=>{if(!function(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}(a))return;let n=null;for(let a of e)if(a.isConnected){if(n&&d(n,a)>0){t.disconnect(),M();return}n=a}});v.current=t;let a=new Set;for(let t=1;t<e.length;t+=1){let n=function(e,t){let a=e.parentElement;for(;a&&!a.contains(t);)a=a.parentElement;return a}(e[t-1],e[t]);n&&a.add(n)}a.forEach(e=>t.observe(e,{childList:!0}))}(i),b.current=s,k.current=!1,u&&(g.forEach(e=>e(o)),m(o))});(0,r.useIsoLayoutEffect)(()=>(!k.current&&b.current&&z(b.current),()=>{c.current=[],h&&(h.current=[])}),[c,h,z]),(0,r.useIsoLayoutEffect)(()=>{k.current&&S()}),(0,r.useIsoLayoutEffect)(()=>()=>{v.current?.disconnect(),k.current=!0},[]);let N=(0,n.useStableCallback)(e=>(g.add(e),()=>{g.delete(e)})),I=t.useMemo(()=>({register:w,unregister:j,subscribeMapChange:N,nextIndexRef:y}),[w,j,N,y]);return(0,i.jsx)(s.CompositeListContext.Provider,{value:I,children:u})}])},545356,e=>{"use strict";e.i(247167);var t=e.i(271645);let a=t.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});e.s(["CompositeListContext",0,a,"useCompositeListContext",0,function(){return t.useContext(a)}])},673553,e=>{"use strict";var t=e.i(271645),a=e.i(146376),n=e.i(545356);e.s(["useCompositeListItem",0,function(e={}){let{guess:r,label:s,metadata:i,textRef:o,index:l}=e,{register:d,unregister:u,subscribeMapChange:c,nextIndexRef:h}=(0,n.useCompositeListContext)(),p=t.useRef(-1),[m,f]=t.useState(null==l&&r?()=>{if(-1===p.current){let e=h.current;h.current+=1,p.current=e}return p.current}:-1),g=l??m,x=t.useRef(null),y=t.useCallback(e=>{let t=x.current;t&&u(t),x.current=e,e&&d(e,{metadata:i??null,index:l??null,label:s,textRef:o})},[l,d,u,i,s,o]);return(0,a.useIsoLayoutEffect)(()=>{if(null==l)return c(e=>{let t=x.current?e.get(x.current)?.index:null;null!=t&&f(t)})},[l,c]),{ref:y,index:g}}])},652225,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(552245);let n=t.forwardRef(function(e,t){let{className:n,render:r,orientation:s="horizontal",style:i,...o}=e;return(0,a.useRenderElement)("div",e,{state:{orientation:s},ref:t,props:[{role:"separator","aria-orientation":s},o]})});e.s(["Separator",0,n])},73364,e=>{"use strict";var t=e.i(343084),a=e.i(229315);e.s(["getCssDimensions",0,function(e){let n=(0,a.getComputedStyle)(e),r=parseFloat(n.width)||0,s=parseFloat(n.height)||0,i=(0,a.isHTMLElement)(e),o=i?e.offsetWidth:r,l=i?e.offsetHeight:s;return((0,t.round)(r)!==o||(0,t.round)(s)!==l)&&(r=o,s=l),{width:r,height:s}}])},493801,751898,536015,e=>{"use strict";var t=e.i(24708),a=e.i(55545),n=e.i(455024),r=e.i(99151),s=e.i(845110),i=e.i(281092),o=e.i(234662);e.s(["formatDistanceToNowStrict",0,function(e,l){return function(e,t,l){var d;let u,c,h=(0,n.getDefaultOptions)(),p=l?.locale??h.locale??a.defaultLocale,m=(c=(0,i.toDate)(e)-(0,i.toDate)(t))<0?-1:c>0?1:c;if(isNaN(m))throw RangeError("Invalid time value");let f=Object.assign({},l,{addSuffix:l?.addSuffix,comparison:m}),[g,x]=(0,s.normalizeDates)(l?.in,...m>0?[t,e]:[e,t]),y=(d=l?.roundingMethod??"round",e=>{let t=(d?Math[d]:Math.trunc)(e);return 0===t?0:t}),k=x.getTime()-g.getTime(),b=k/o.millisecondsInMinute,v=(k-((0,r.getTimezoneOffsetInMilliseconds)(x)-(0,r.getTimezoneOffsetInMilliseconds)(g)))/o.millisecondsInMinute,M=l?.unit;if("second"===(u=M||(b<1?"second":b<60?"minute":b<o.minutesInDay?"hour":v<o.minutesInMonth?"day":v<o.minutesInYear?"month":"year"))){let e=y(k/1e3);return p.formatDistance("xSeconds",e,f)}if("minute"===u){let e=y(b);return p.formatDistance("xMinutes",e,f)}if("hour"===u){let e=y(b/60);return p.formatDistance("xHours",e,f)}if("day"===u){let e=y(v/o.minutesInDay);return p.formatDistance("xDays",e,f)}if("month"===u){let e=y(v/o.minutesInMonth);return 12===e&&"month"!==M?p.formatDistance("xYears",1,f):p.formatDistance("xMonths",e,f)}else{let e=y(v/o.minutesInYear);return p.formatDistance("xYears",e,f)}}(e,(0,t.constructNow)(e),l)}],493801);var l=e.i(456420);let d={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};d.node;let u=(0,l.default)(d);e.s(["Pin",0,u],751898);var c=e.i(681307),h=e.i(245629);let p=c.z.object({id:c.z.number(),text:c.z.string(),alwaysLoad:c.z.boolean(),createdAt:h.DateLikeSchema});c.z.object({id:c.z.number(),path:c.z.string(),description:c.z.string(),aliases:c.z.string().array().nullish(),ownedByUser:c.z.boolean(),hits:c.z.number(),lastReadAt:h.DateLikeSchema.nullable(),createdAt:h.DateLikeSchema,updatedAt:h.DateLikeSchema,factCount:c.z.number(),facts:p.array()});let m=[{path:"profile",of:"The user themselves — who they are, what they do, where, how they live"},{path:"preferences",of:"How they like things done, and said"},{path:"people/",of:"Who someone is to them, and what matters about them"},{path:"projects/",of:"Something they are building or running"},{path:"plans/",of:"A trip, an appointment, a purchase, a deadline"},{path:"topics/",of:"Anything else worth its own note"},{path:"inbox",of:"Nowhere obvious to go"}],f=m.filter(e=>!e.path.endsWith("/")).map(e=>e.path),g=m.filter(e=>e.path.endsWith("/")).map(e=>e.path.slice(0,-1));RegExp(`^(?:${f.join("|")}|(?:${g.join("|")})/.+)$`);let x=["profile","preferences"],y=c.z.object({op:c.z.enum(["add","replace","forget","carry","uncarry"]),path:c.z.string(),text:c.z.string()});c.z.object({id:c.z.string(),status:c.z.enum(["running","done","stopped","failed"]),provider:c.z.string(),model:c.z.string(),callIds:c.z.string().array(),messages:c.z.number(),changes:y.array(),error:c.z.string().nullable(),inputTokens:c.z.number(),outputTokens:c.z.number(),startedAt:h.DateLikeSchema,endedAt:h.DateLikeSchema.nullable()}),e.s(["isFading",0,function(e){let t,a,n;return t=e.path,!x.includes(t)&&.15>(a=(0,h.toDate)(e.lastReadAt??e.createdAt),n=Math.max(0,(Date.now()-a.getTime())/864e5),(e.hits+1)/(1+n))},"noteTitle",0,function(e){let t=e.indexOf("/");return -1===t?e:e.slice(t+1)},"sectionOf",0,function(e){if("profile"===e||"preferences"===e)return"you";let t=e.slice(0,e.indexOf("/"));return g.includes(t)?t:"inbox"},"tidyTally",0,function(e){let t=t=>e.filter(e=>e.op===t).length,a=[[t("add"),"added"],[t("replace"),"revised"],[t("forget"),"dropped"],[t("carry"),"carried"],[t("uncarry"),"uncarried"]].filter(([e])=>e>0).map(([e,t])=>`${e} ${t}`);return a.length?a.join(", "):"nothing to change"}],536015)},328256,e=>{"use strict";var t=e.i(456420);let a={name:"book-marked",size:24,node:[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]};a.node;let n=(0,t.default)(a);e.s(["BookMarked",0,n],328256)},716327,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};a.node;let n=(0,t.default)(a);e.s(["ChevronDown",0,n],716327)},24071,829600,226091,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let n=(0,t.default)(a);e.s(["ChevronLeft",0,n],24071);let r={name:"file",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"}]]};r.node;let s=(0,t.default)(r);e.s(["File",0,s],829600);let i={name:"file-text",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:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};i.node;let o=(0,t.default)(i);e.s(["FileText",0,o],226091)},986253,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let n=(0,t.default)(a);e.s(["default",0,n])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},905015,e=>{"use strict";var t=e.i(456420);let a={name:"file-braces",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:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],aliases:["file-json"]};a.node;let n=(0,t.default)(a);e.s(["FileJson",0,n],905015)},60744,e=>{"use strict";var t=e.i(456420);let a={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"]};a.node;let n=(0,t.default)(a);e.s(["FilePen",0,n],60744)},831458,e=>{"use strict";var t=e.i(456420);let a={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};a.node;let n=(0,t.default)(a);e.s(["Flag",0,n],831458)},569644,e=>{"use strict";var t=e.i(456420);let a={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};a.node;let n=(0,t.default)(a);e.s(["FolderOpen",0,n],569644)},91511,e=>{"use strict";var t=e.i(456420);let a={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};a.node;let n=(0,t.default)(a);e.s(["Globe",0,n],91511)},815170,e=>{"use strict";var t=e.i(456420);let a={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};a.node;let n=(0,t.default)(a);e.s(["Image",0,n],815170)},218964,468590,730274,604139,991322,e=>{"use strict";var t=e.i(456420);let a={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"}]]};a.node;let n=(0,t.default)(a);e.s(["ListChecks",0,n],218964);let r={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"}]]};r.node;let s=(0,t.default)(r);e.s(["MessageSquare",0,s],468590);let i={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"}]]};i.node;let o=(0,t.default)(i);e.s(["Send",0,o],730274);let l={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};l.node;let d=(0,t.default)(l);e.s(["Terminal",0,d],604139);let u={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"}]]};u.node;let c=(0,t.default)(u);e.s(["McpMark",0,c],991322)},632781,e=>{"use strict";var t=e.i(758379);e.s(["Loader2",()=>t.default])},779266,e=>{"use strict";var t=e.i(456420);let a={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};a.node;let n=(0,t.default)(a);e.s(["History",0,n],779266)},466787,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlert",()=>t.default])},263676,e=>{"use strict";var t=e.i(814387);e.s(["X",()=>t.default])}]);
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,222055,589128,e=>{"use strict";var t=e.i(843476),a=e.i(689664),n=e.i(716327),r=e.i(482022),s=e.i(60744),i=e.i(831458),o=e.i(91511),l=e.i(815170),d=e.i(218964),u=e.i(632781),c=e.i(468590),h=e.i(566595),p=e.i(730274),m=e.i(604139),f=e.i(747925),g=e.i(271645),x=e.i(798120),y=e.i(660302),k=e.i(671428),b=e.i(991322),v=e.i(852116);let M=e.i(328256).BookMarked;e.s(["SkillsMark",0,M],589128);var w=e.i(621285),j=e.i(283653),z=e.i(647163);let S={web_search:function({tool:e,taskId:a,collapsed:n}){let r=A(e.results);return(0,t.jsxs)(O,{tool:e,taskId:a,icon:h.Search,collapsed:n,children:[(0,t.jsxs)("p",{className:"px-3 pt-1 pb-1.5 text-[13px] leading-snug break-keep",children:["“",e.input,"”"]}),r.length>0&&(0,t.jsx)("ol",{className:"space-y-0.5 px-3 pb-2",children:r.map((e,a)=>(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})]},`${a}-${e}`))})]})},bash:function({tool:e,taskId:a,collapsed:n}){let r=A(e.results);return(0,t.jsx)(O,{tool:e,taskId:a,icon:m.Terminal,collapsed:n,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,r.length>0&&(0,t.jsx)("span",{className:"block text-muted-foreground",children:r.join("\n")})]})})},fetch:e=>(0,t.jsx)(C,{icon:o.Globe,...e}),write_file:e=>(0,t.jsx)(D,{icon:s.FilePen,...e}),generate_image:function({tool:e,taskId:a,collapsed:n}){let[s]=A(e.results);return(0,t.jsxs)(O,{tool:e,taskId:a,icon:l.Image,collapsed:n,children:[(0,t.jsx)("p",{className:"px-3 pt-1 text-[12px] leading-snug break-keep",children:e.input}),s&&(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] text-muted-foreground",children:s}),(0,t.jsxs)(w.FileLink,{path:s,label:`Open ${s}`,className:L,children:[(0,t.jsx)(r.ExternalLink,{className:"size-3"}),"Open"]})]})]})}},N={web_search:h.Search,bash:m.Terminal,fetch:o.Globe,write_file:s.FilePen,generate_image:l.Image,memory_recall:v.MemoryMark,memory_remember:v.MemoryMark,memory_forget:v.MemoryMark,memory_show:v.MemoryMark,load_skill:M,tool_search:b.McpMark,tool_call:b.McpMark,delegate:p.Send,task:d.ListChecks,ask_bot:c.MessageSquare,ask_back:c.MessageSquare,ask_thursday:c.MessageSquare,report:i.Flag},I=e=>N[e]??f.Wrench;function C({icon:e,tool:a,taskId:n,collapsed:r}){return(0,t.jsxs)(O,{tool:a,taskId:n,icon:e,collapsed:r,children:[(0,t.jsx)("p",{className:"truncate px-3 pt-1 pb-1.5 font-mono text-[11px]",children:a.input}),(0,t.jsx)(_,{lines:A(a.results),mono:!0})]})}let L="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";function D({icon:e,tool:a,taskId:n,collapsed:s}){let i=a.path??a.input;return(0,t.jsxs)(O,{tool:a,taskId:n,icon:e,collapsed:s,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:a.input}),(0,t.jsxs)(w.FileLink,{path:i,label:`Open ${i}`,className:L,children:[(0,t.jsx)(r.ExternalLink,{className:"size-3"}),"Open"]})]}),(0,t.jsx)(_,{lines:A(a.results),mono:!0})]})}function E({tool:e,taskId:a,collapsed:n}){return(0,t.jsxs)(O,{tool:e,taskId:a,icon:I(e.name),collapsed:n,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)(_,{lines:A(e.results)})]})}function O({tool:e,taskId:r,icon:s,collapsed:i=!1,children:o}){let l=void 0===e.results,[d,c]=(0,g.useState)(!i),h=d||l,p=e.more&&r&&e.callId;return(0,t.jsxs)("div",{className:(0,z.cn)("@container w-full overflow-hidden rounded-xl transition-colors",h?"bg-background/80 dark:bg-white/4":"hover:bg-foreground/4"),children:[(0,t.jsxs)("button",{type:"button",onClick:()=>c(e=>!e),"aria-expanded":h,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:l?(0,t.jsx)(u.Loader2,{className:"size-3 animate-spin"}):(0,t.jsx)(s,{className:"size-3"})}),e.note?(0,t.jsxs)(t.Fragment,{children:[l?(0,t.jsx)(y.default,{text:e.note,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",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})]}):l?(0,t.jsx)(y.default,{text:e.input,speed:2.4,color:"var(--muted-foreground)",shineColor:"var(--foreground)",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)("span",{className:"shrink-0 font-mono text-[10px] text-muted-foreground/70",children:e.name}),!l&&(0,t.jsx)(a.Check,{className:"size-3 shrink-0 text-muted-foreground/50"}),(0,t.jsx)(n.ChevronDown,{className:(0,z.cn)("size-3 shrink-0 text-muted-foreground/50 transition-transform",h&&"rotate-180")})]}),h&&(0,t.jsxs)("div",{className:"pb-1.5 pl-[1.625rem]",children:[o,p&&(0,t.jsx)(R,{taskId:r,callId:e.callId})]})]})}function R({taskId:e,callId:a}){let[r,s]=(0,g.useState)(!1),{data:i,isLoading:o}=(0,j.useServerRoute)(r?x.queryKey.toolResult(e,a):null);return(0,t.jsxs)("div",{className:"px-3 pb-1",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>s(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)(n.ChevronDown,{className:(0,z.cn)("size-3",r&&"rotate-180")}),r?"Less":"Everything"]}),r&&(o||!i?(0,t.jsx)(k.Skeleton,{className:"mt-1.5 h-12 w-full rounded-lg"}):(0,t.jsxs)("div",{className:"mt-1.5 space-y-1.5",children:[q(i).map((e,a)=>(0,t.jsx)(T,{src:e},`${a}-${e.length}`)),A(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:A(i).join("\n")})]}))]})}function T({src:e}){return(0,t.jsx)("img",{src:e,alt:"",className:"block w-full rounded-lg bg-muted object-contain"})}function _({lines:e,mono:a}){return 0===e.length?null:(0,t.jsx)("ul",{className:"px-3 pb-1.5",children:e.map((e,n)=>(0,t.jsx)("li",{className:(0,z.cn)("truncate text-[11px] leading-relaxed text-muted-foreground",a&&"font-mono"),children:e},`${n}-${e}`))})}let A=e=>e?.flatMap(e=>"text"===e.type?[e.text]:[])??[],q=e=>e?.flatMap(e=>"image"===e.type?[e.src]:[])??[];e.s(["BotTool",0,function(e){let a=S[e.tool.name]??E;return(0,t.jsx)(a,{...e})},"toolIcon",0,I],222055)},39152,463625,e=>{"use strict";var t=e.i(95187);let a=(0,t.createServerReference)("7f6c0a389e723d17d2e75bda0ac33eb274cb4e12e8",t.callServer,void 0,t.findSourceMapURL,"createSeedBotsAction");e.s(["createSeedBotsAction",0,a],39152);var n=e.i(41533);e.i(864723);let r=[{name:"Jarvis",description:"Any job — turns it into a plan, hands each part to whoever it belongs to, does the rest, reports one result",icon:{shape:"squircle"},recommended:!0,example:"Set up a Google account just for my bots to use",systemPrompt:"You are Jarvis. A job reaches you as a sentence and leaves as a plan: what it actually needs, in what order, and who does each part. Settle what is still open in one round rather than guessing at it, then send for what the job is made of before you build — a part another bot exists for is theirs, and everything nobody else is for is yours. You hold the whole while they hold pieces: the order the parts run in, the seams where what comes back has to fit together, and the single thing that is handed over at the end. The plan is how the job gets done, not what gets handed back."},{name:"Navigator",description:"The web through a real browser — opens the page itself, signs in, brings back prices, images and links as they stand now",icon:{shape:"poly"},recommended:!0,example:"Find thirty wedding pose photos and put them on one page for me",systemPrompt:`You are Navigator. Every browser job is yours: load the \`${n.BROWSER_SKILL}\` skill first and work through it. A search result says a page exists; you say what is on it right now — so open it, sign in where it asks you to, and keep going past the first screen until you have the thing itself: exact figures, the links that open them, the images off the page. Nothing you did not see goes in what you hand back, and a page that refused you is a fact with a url on it, not a gap to fill in from memory. Whoever asked should never need to open the site after you.`},{name:"Scribe",description:"Writing that gets read — finds out what it is for, researches it, then picks the form: prose, table, or a page",icon:{shape:"blob"},recommended:!0,example:"Write up what we decided today as a one-page brief",systemPrompt:"You are Scribe. Who reads it and what they do next decides everything else, so learn that first, then research before you claim: every number and name you write traces back to something you actually read. Pick the form by the reading — a `.md` for something read once, a `.csv` for what gets sorted, a page (the `interactive-page` skill) for something used or something whose pictures are the point. When the request does not settle which it is — something read once or something used — ask before you write rather than committing a whole draft to a guess. Cut what the reader would skip, and never spend a paragraph where a table or a picture answers in one glance. One page they finish beats five they abandon."}];e.s(["BOT_SEEDS",0,r],463625)},992112,e=>{"use strict";var t=e.i(265402);let a=[...new Set(Object.values(t.SPEACH_MODEL_PROVIDERS).map(e=>e.apiKeyName))],n={image:"IMAGE_MODEL",video:"VIDEO_MODEL",speech:"SPEECH_MODEL",transcription:"TRANSCRIPTION_MODEL"},r={image:{label:"Image model",hint:"What bots draw with"},video:{label:"Video model",hint:"What bots film with — minutes a clip"},speech:{label:"Speech model",hint:"What reads text aloud into a file"},transcription:{label:"Transcription model",hint:"What turns a recording into text"}},s={key:"DEFAULT_MODEL",label:"Default model",hint:"What a bot thinks with until it picks its own",text:!0,choices:t.TEXT_MODEL_PROVIDER_LIST.flatMap(e=>e.suggestModels.map(t=>({value:`${e.id}/${t.id}`,label:`${e.label} \xb7 ${t.label}`,needs:e.apiKeyName})))},i=e=>a.includes(e.apiKeyName),o=e=>({key:e.apiKeyName,label:e.label,provider:e.id}),l=[{id:"voice",title:"voice",hint:"calls run on one of these",section:"keys",require:"any",note:"one is required",entries:t.TEXT_MODEL_PROVIDER_LIST.filter(i).map(o)},{id:"text",title:"models",hint:"what bots think with — add any, or none",section:"keys",require:"none",entries:t.TEXT_MODEL_PROVIDER_LIST.filter(e=>!i(e)).map(o)},{id:"bots",title:"Bots",hint:"what a bot runs on when it has not picked its own",section:"models",require:"none",entries:[s]},{id:"studio",title:"Studio",hint:"what a bot draws, films and speaks with — off until you pick one",section:"models",require:"none",entries:Object.keys(n).map(e=>({key:n[e],...r[e],kind:e,choices:t.MEDIA_MODEL_PROVIDER_LIST.flatMap(t=>t.models[e].map(e=>({value:`${t.id}/${e.id}`,label:`${t.label} \xb7 ${e.label}`,needs:t.apiKeyName})))}))}];Object.fromEntries(l.flatMap(e=>e.entries).map(e=>[e.key,e])),l.flatMap(e=>e.entries.map(e=>e.key)),Object.fromEntries(l.flatMap(e=>e.entries).filter(e=>e.choices?.length).map(e=>[e.key,e.choices])),e.s(["CONFIG_GROUPS",0,l,"groupSatisfied",0,function(e,t){return"none"===e.require||(e.requireKeys??e.entries.map(e=>e.key)).some(t)},"isConfigSet",0,function(e,t){return e?.some(e=>e.key===t&&e.set)??!1}])},852116,e=>{"use strict";var t=e.i(456420);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 n=(0,t.default)(a);e.s(["MemoryMark",0,n],852116)},395530,e=>{"use strict";var t=e.i(271645),a=e.i(828918),n=e.i(838452),r=e.i(673553);e.s(["useCompositeItem",0,function(e={}){let{highlightItemOnHover:s,highlightedIndex:i,onHighlightedIndexChange:o}=(0,n.useCompositeRootContext)(),{ref:l,index:d}=(0,r.useCompositeListItem)(e),u=i===d,c=t.useRef(null),h=(0,a.useMergedRefs)(l,c);return{compositeProps:{tabIndex:u?0:-1,onFocus(){o(d)},onMouseMove(){let e=c.current;if(!s||!e)return;let t=e.hasAttribute("disabled")||"true"===e.ariaDisabled;u||t||e.focus()}},compositeRef:h,index:d}}])},53687,e=>{"use strict";var t=e.i(271645),a=e.i(388940),n=e.i(667865),r=e.i(146376),s=e.i(545356),i=e.i(843476);function o(){return new Map}function l(){return new Set}function d(e,t){return e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}e.s(["CompositeList",0,function(e){let{children:u,elementsRef:c,labelsRef:h,onMapChange:p}=e,m=(0,n.useStableCallback)(p),[,f]=t.useState(!1),g=(0,a.useRefWithInit)(l).current,x=(0,a.useRefWithInit)(o).current,y=t.useRef(0),k=t.useRef(!0),b=t.useRef(null),v=t.useRef(null),M=(0,n.useStableCallback)(()=>{k.current||(k.current=!0,f(e=>!e))}),w=(0,n.useStableCallback)((e,t)=>{x.set(e,t),M()}),j=(0,n.useStableCallback)(e=>{x.delete(e),M()}),z=(0,n.useStableCallback)(e=>{let t=new Map;return c.current.length=0,h&&(h.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),c.current[e.index]=e.element,h&&(h.current[e.index]=void 0!==e.registration.label?e.registration.label:e.registration.textRef?.current?.textContent??e.element.textContent)}),y.current=c.current.length,t}),S=(0,n.useStableCallback)(()=>{var e;let t,a,n,r,[s,i]=(e=x,t=new Set,a=[],n=[],e.forEach((e,r)=>{if(!r.isConnected)return;let s=e.index,i={index:s??-1,element:r,registration:e};null===s?n.push(i):s>=0&&(t.add(s),a.push(i))}),r=0,n.sort((e,t)=>d(e.element,t.element)),n.forEach(e=>{for(;t.has(r);)r+=1;e.index=r,a.push(e),r+=1}),t.size>0&&a.sort((e,t)=>e.index-t.index),[a,n.map(e=>e.element)]),o=z(s),l=b.current,u=!l||l.length!==s.length||s.some((e,t)=>{let a=l[t];return e.index!==a.index||e.element!==a.element||e.registration.index!==a.registration.index||e.registration.metadata!==a.registration.metadata});!function(e){if(v.current?.disconnect(),v.current=null,"function"!=typeof MutationObserver||e.length<2)return;let t=new MutationObserver(a=>{if(!function(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}(a))return;let n=null;for(let a of e)if(a.isConnected){if(n&&d(n,a)>0){t.disconnect(),M();return}n=a}});v.current=t;let a=new Set;for(let t=1;t<e.length;t+=1){let n=function(e,t){let a=e.parentElement;for(;a&&!a.contains(t);)a=a.parentElement;return a}(e[t-1],e[t]);n&&a.add(n)}a.forEach(e=>t.observe(e,{childList:!0}))}(i),b.current=s,k.current=!1,u&&(g.forEach(e=>e(o)),m(o))});(0,r.useIsoLayoutEffect)(()=>(!k.current&&b.current&&z(b.current),()=>{c.current=[],h&&(h.current=[])}),[c,h,z]),(0,r.useIsoLayoutEffect)(()=>{k.current&&S()}),(0,r.useIsoLayoutEffect)(()=>()=>{v.current?.disconnect(),k.current=!0},[]);let N=(0,n.useStableCallback)(e=>(g.add(e),()=>{g.delete(e)})),I=t.useMemo(()=>({register:w,unregister:j,subscribeMapChange:N,nextIndexRef:y}),[w,j,N,y]);return(0,i.jsx)(s.CompositeListContext.Provider,{value:I,children:u})}])},545356,e=>{"use strict";e.i(247167);var t=e.i(271645);let a=t.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});e.s(["CompositeListContext",0,a,"useCompositeListContext",0,function(){return t.useContext(a)}])},673553,e=>{"use strict";var t=e.i(271645),a=e.i(146376),n=e.i(545356);e.s(["useCompositeListItem",0,function(e={}){let{guess:r,label:s,metadata:i,textRef:o,index:l}=e,{register:d,unregister:u,subscribeMapChange:c,nextIndexRef:h}=(0,n.useCompositeListContext)(),p=t.useRef(-1),[m,f]=t.useState(null==l&&r?()=>{if(-1===p.current){let e=h.current;h.current+=1,p.current=e}return p.current}:-1),g=l??m,x=t.useRef(null),y=t.useCallback(e=>{let t=x.current;t&&u(t),x.current=e,e&&d(e,{metadata:i??null,index:l??null,label:s,textRef:o})},[l,d,u,i,s,o]);return(0,a.useIsoLayoutEffect)(()=>{if(null==l)return c(e=>{let t=x.current?e.get(x.current)?.index:null;null!=t&&f(t)})},[l,c]),{ref:y,index:g}}])},652225,e=>{"use strict";e.i(247167);var t=e.i(271645),a=e.i(552245);let n=t.forwardRef(function(e,t){let{className:n,render:r,orientation:s="horizontal",style:i,...o}=e;return(0,a.useRenderElement)("div",e,{state:{orientation:s},ref:t,props:[{role:"separator","aria-orientation":s},o]})});e.s(["Separator",0,n])},73364,e=>{"use strict";var t=e.i(343084),a=e.i(229315);e.s(["getCssDimensions",0,function(e){let n=(0,a.getComputedStyle)(e),r=parseFloat(n.width)||0,s=parseFloat(n.height)||0,i=(0,a.isHTMLElement)(e),o=i?e.offsetWidth:r,l=i?e.offsetHeight:s;return((0,t.round)(r)!==o||(0,t.round)(s)!==l)&&(r=o,s=l),{width:r,height:s}}])},493801,751898,536015,e=>{"use strict";var t=e.i(24708),a=e.i(55545),n=e.i(455024),r=e.i(99151),s=e.i(845110),i=e.i(281092),o=e.i(234662);e.s(["formatDistanceToNowStrict",0,function(e,l){return function(e,t,l){var d;let u,c,h=(0,n.getDefaultOptions)(),p=l?.locale??h.locale??a.defaultLocale,m=(c=(0,i.toDate)(e)-(0,i.toDate)(t))<0?-1:c>0?1:c;if(isNaN(m))throw RangeError("Invalid time value");let f=Object.assign({},l,{addSuffix:l?.addSuffix,comparison:m}),[g,x]=(0,s.normalizeDates)(l?.in,...m>0?[t,e]:[e,t]),y=(d=l?.roundingMethod??"round",e=>{let t=(d?Math[d]:Math.trunc)(e);return 0===t?0:t}),k=x.getTime()-g.getTime(),b=k/o.millisecondsInMinute,v=(k-((0,r.getTimezoneOffsetInMilliseconds)(x)-(0,r.getTimezoneOffsetInMilliseconds)(g)))/o.millisecondsInMinute,M=l?.unit;if("second"===(u=M||(b<1?"second":b<60?"minute":b<o.minutesInDay?"hour":v<o.minutesInMonth?"day":v<o.minutesInYear?"month":"year"))){let e=y(k/1e3);return p.formatDistance("xSeconds",e,f)}if("minute"===u){let e=y(b);return p.formatDistance("xMinutes",e,f)}if("hour"===u){let e=y(b/60);return p.formatDistance("xHours",e,f)}if("day"===u){let e=y(v/o.minutesInDay);return p.formatDistance("xDays",e,f)}if("month"===u){let e=y(v/o.minutesInMonth);return 12===e&&"month"!==M?p.formatDistance("xYears",1,f):p.formatDistance("xMonths",e,f)}else{let e=y(v/o.minutesInYear);return p.formatDistance("xYears",e,f)}}(e,(0,t.constructNow)(e),l)}],493801);var l=e.i(456420);let d={name:"pin",size:24,node:[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]};d.node;let u=(0,l.default)(d);e.s(["Pin",0,u],751898);var c=e.i(681307),h=e.i(245629);let p=c.z.object({id:c.z.number(),text:c.z.string(),alwaysLoad:c.z.boolean(),createdAt:h.DateLikeSchema});c.z.object({id:c.z.number(),path:c.z.string(),description:c.z.string(),aliases:c.z.string().array().nullish(),ownedByUser:c.z.boolean(),hits:c.z.number(),lastReadAt:h.DateLikeSchema.nullable(),createdAt:h.DateLikeSchema,updatedAt:h.DateLikeSchema,factCount:c.z.number(),facts:p.array()});let m=[{path:"profile",of:"The user themselves — who they are, what they do, where, how they live"},{path:"preferences",of:"How they like things done, and said"},{path:"people/",of:"Who someone is to them, and what matters about them"},{path:"projects/",of:"Something they are building or running"},{path:"plans/",of:"A trip, an appointment, a purchase, a deadline"},{path:"topics/",of:"Anything else worth its own note"},{path:"inbox",of:"Nowhere obvious to go"}],f=m.filter(e=>!e.path.endsWith("/")).map(e=>e.path),g=m.filter(e=>e.path.endsWith("/")).map(e=>e.path.slice(0,-1));RegExp(`^(?:${f.join("|")}|(?:${g.join("|")})/.+)$`);let x=["profile","preferences"],y=c.z.object({op:c.z.enum(["add","replace","forget","carry","uncarry"]),path:c.z.string(),text:c.z.string()});c.z.object({id:c.z.string(),status:c.z.enum(["running","done","stopped","failed"]),provider:c.z.string(),model:c.z.string(),callIds:c.z.string().array(),messages:c.z.number(),changes:y.array(),error:c.z.string().nullable(),inputTokens:c.z.number(),outputTokens:c.z.number(),startedAt:h.DateLikeSchema,endedAt:h.DateLikeSchema.nullable()}),e.s(["isFading",0,function(e){let t,a,n;return t=e.path,!x.includes(t)&&.15>(a=(0,h.toDate)(e.lastReadAt??e.createdAt),n=Math.max(0,(Date.now()-a.getTime())/864e5),(e.hits+1)/(1+n))},"noteTitle",0,function(e){let t=e.indexOf("/");return -1===t?e:e.slice(t+1)},"sectionOf",0,function(e){if("profile"===e||"preferences"===e)return"you";let t=e.slice(0,e.indexOf("/"));return g.includes(t)?t:"inbox"},"tidyTally",0,function(e){let t=t=>e.filter(e=>e.op===t).length,a=[[t("add"),"added"],[t("replace"),"revised"],[t("forget"),"dropped"],[t("carry"),"carried"],[t("uncarry"),"uncarried"]].filter(([e])=>e>0).map(([e,t])=>`${e} ${t}`);return a.length?a.join(", "):"nothing to change"}],536015)},328256,e=>{"use strict";var t=e.i(456420);let a={name:"book-marked",size:24,node:[["path",{d:"M10 2v8l3-3 3 3V2",key:"sqw3rj"}],["path",{d:"M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20",key:"k3hazp"}]]};a.node;let n=(0,t.default)(a);e.s(["BookMarked",0,n],328256)},716327,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-down",size:24,node:[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]};a.node;let n=(0,t.default)(a);e.s(["ChevronDown",0,n],716327)},24071,829600,226091,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-left",size:24,node:[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]};a.node;let n=(0,t.default)(a);e.s(["ChevronLeft",0,n],24071);let r={name:"file",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"}]]};r.node;let s=(0,t.default)(r);e.s(["File",0,s],829600);let i={name:"file-text",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:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]};i.node;let o=(0,t.default)(i);e.s(["FileText",0,o],226091)},986253,e=>{"use strict";var t=e.i(456420);let a={name:"chevron-right",size:24,node:[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]};a.node;let n=(0,t.default)(a);e.s(["default",0,n])},867927,e=>{"use strict";var t=e.i(986253);e.s(["ChevronRight",()=>t.default])},905015,e=>{"use strict";var t=e.i(456420);let a={name:"file-braces",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:"M10 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1",key:"1oajmo"}],["path",{d:"M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1",key:"mpwhp6"}]],aliases:["file-json"]};a.node;let n=(0,t.default)(a);e.s(["FileJson",0,n],905015)},60744,e=>{"use strict";var t=e.i(456420);let a={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"]};a.node;let n=(0,t.default)(a);e.s(["FilePen",0,n],60744)},831458,e=>{"use strict";var t=e.i(456420);let a={name:"flag",size:24,node:[["path",{d:"M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528",key:"1jaruq"}]]};a.node;let n=(0,t.default)(a);e.s(["Flag",0,n],831458)},569644,e=>{"use strict";var t=e.i(456420);let a={name:"folder-open",size:24,node:[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]]};a.node;let n=(0,t.default)(a);e.s(["FolderOpen",0,n],569644)},91511,e=>{"use strict";var t=e.i(456420);let a={name:"globe",size:24,node:[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]]};a.node;let n=(0,t.default)(a);e.s(["Globe",0,n],91511)},815170,e=>{"use strict";var t=e.i(456420);let a={name:"image",size:24,node:[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]]};a.node;let n=(0,t.default)(a);e.s(["Image",0,n],815170)},218964,468590,730274,604139,991322,e=>{"use strict";var t=e.i(456420);let a={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"}]]};a.node;let n=(0,t.default)(a);e.s(["ListChecks",0,n],218964);let r={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"}]]};r.node;let s=(0,t.default)(r);e.s(["MessageSquare",0,s],468590);let i={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"}]]};i.node;let o=(0,t.default)(i);e.s(["Send",0,o],730274);let l={name:"terminal",size:24,node:[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]]};l.node;let d=(0,t.default)(l);e.s(["Terminal",0,d],604139);let u={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"}]]};u.node;let c=(0,t.default)(u);e.s(["McpMark",0,c],991322)},632781,e=>{"use strict";var t=e.i(758379);e.s(["Loader2",()=>t.default])},779266,e=>{"use strict";var t=e.i(456420);let a={name:"rotate-ccw-clock",size:24,node:[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],aliases:["history"]};a.node;let n=(0,t.default)(a);e.s(["History",0,n],779266)},466787,e=>{"use strict";var t=e.i(755566);e.s(["TriangleAlert",()=>t.default])},263676,e=>{"use strict";var t=e.i(814387);e.s(["X",()=>t.default])}]);
|