thursday-agent 0.1.0 → 0.1.2
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]__01id-v3._.js +3 -0
- 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]__0ng1y5l._.js → [root-of-the-server]__185grso._.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/{_1lz4t71._.js → _0j4v8of._.js} +2 -2
- package/.next/server/chunks/ssr/{_061oc5l._.js → _0l81bzy._.js} +2 -2
- package/.next/server/chunks/ssr/{_0-pwe74._.js → _0lc_7c8._.js} +2 -2
- package/.next/server/chunks/ssr/_0nso8tp._.js +3 -0
- package/.next/server/chunks/ssr/{_06l25rd._.js → _0q_2f2x._.js} +2 -2
- package/.next/server/chunks/ssr/_0sf1isi._.js +1 -1
- package/.next/server/chunks/ssr/{_0c2y8ks._.js → _10uvw3l._.js} +2 -2
- package/.next/server/chunks/ssr/{_1wlc_pv._.js → _19_o9d-._.js} +2 -2
- package/.next/server/chunks/ssr/{_0vbcev4._.js → _1dcxzqe._.js} +2 -2
- package/.next/server/chunks/ssr/_1e-dgz0._.js +1 -1
- package/.next/server/chunks/ssr/_1jbv7m1._.js +3 -0
- 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_0okab9u._.js → node_modules_00d6675._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0510bcb._.js → node_modules_043-236._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_13r64hh._.js → node_modules_06kvvuo._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_12ilj3x._.js → node_modules_0_fvxnt._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0n9m8ww._.js → node_modules_0_j7-g4._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1hfkkak._.js → node_modules_0bue6gy._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0o9cu2m._.js → node_modules_0fbw5-u._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_01-lnjv._.js → node_modules_0ipn1ho._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1i1aztk._.js → node_modules_0ls96je._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_18h15oi._.js → node_modules_0xwx4u-._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_04m323e._.js → node_modules_0y2-av4._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1wya71n._.js → node_modules_108wd2o._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1bog3e3._.js → node_modules_13f2md6._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0cagd-a._.js → node_modules_16i4o_3._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ekezwy._.js → node_modules_1_588_4._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_126jgz-._.js → node_modules_1d-is1o._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_20oe6vi._.js → node_modules_1ee8gav._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0kc8lu9._.js → node_modules_1hn_sd5._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1czzodm._.js → node_modules_1jatz7w._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0eq4z64._.js → node_modules_1k29j1j._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0snv8wz._.js → node_modules_1nhw9qg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_06gkc-1._.js → node_modules_1t0y5jt._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_14qjnj6._.js → node_modules_1ub40gk._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_1ci9xpq._.js → node_modules_1v0077l._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0egyezs._.js → node_modules_1y8_3vg._.js} +1 -1
- package/.next/server/chunks/ssr/{node_modules_0a7_hec._.js → node_modules_20ynonm._.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_092s8nx._.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_1nvexgu._.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/{0qwvymwynno3x.js → 0yysv1gzin17t.js} +1 -1
- package/.next/static/chunks/{1ti6qqe8rxjc9.js → 1fr5m75pwtyic.js} +1 -1
- package/.next/static/chunks/{2tab0u1fay-lo.js → 1gy3bbv7usnjo.js} +1 -1
- package/.next/static/chunks/{1n1_b0m4z2r2l.js → 1keib_gt066gc.js} +1 -1
- package/.next/static/chunks/{17yxvpmlyxotg.js → 1khakdu_iuedc.js} +1 -1
- package/.next/static/chunks/{3a8ieqoovwtgg.js → 21rk8w7bda-su.js} +1 -1
- package/.next/static/chunks/{3imn63hmy-dvm.js → 247d-r95j8xs0.js} +1 -1
- package/.next/static/chunks/{3v_k5wbdx5z1e.js → 28g42tw8tsvhd.js} +1 -1
- package/.next/static/chunks/{26jl58p1cmfyz.js → 2fq_86jvq9ymq.js} +1 -1
- package/.next/static/chunks/{1ma7gsnw16oor.js → 2ihkf6l2jowo9.js} +3 -3
- package/.next/static/chunks/{16jdhpex5davi.js → 2wngeetfnzxkp.js} +1 -1
- package/.next/static/chunks/{225bcu0dkzwh9.js → 3aquirz5h71da.js} +1 -1
- package/.next/static/chunks/{3ktulatcmvs36.js → 3fqvc0cg-atq_.js} +1 -1
- package/.next/static/chunks/{0t7ve-t64i24a.js → 3p4egvfjxpatb.js} +1 -1
- package/.next/static/chunks/3qe1w1ei-huhl.js +1 -0
- package/.next/static/chunks/{0m28u02ktcwrt.js → 3xxa2j56-f3nm.js} +1 -1
- package/.next/static/chunks/{1n0rxcrn8v33a.js → 3y40riycdip-i.js} +1 -1
- package/.next/static/chunks/{07hfxlyqq92v-.js → 45a6zbtkelph9.js} +1 -1
- package/README.md +24 -1
- package/bin/thursday.mjs +50 -2
- 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/.next/server/chunks/ssr/_0n0wwfo._.js +0 -3
- package/.next/static/chunks/2bd12_uvbr996.js +0 -1
- 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 → X34BUd9bfdH27ripuwwBm}/_buildManifest.js +0 -0
- /package/.next/static/{M8Zkbqz2M4SLzLsE8DC6V → X34BUd9bfdH27ripuwwBm}/_clientMiddlewareManifest.js +0 -0
- /package/.next/static/{M8Zkbqz2M4SLzLsE8DC6V → X34BUd9bfdH27ripuwwBm}/_ssgManifest.js +0 -0
|
@@ -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),f=e.i(692329),g=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)("7f29328bcf3078dae4a7f684b4ba777765998c955c",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)(g.SettingGroup,{label:"Transcripts",children:(0,t.jsx)(g.SettingItems,{children:(0,t.jsxs)("button",{type:"button",onClick:()=>c.notify.component({className:"sm:max-w-3xl",renderer:()=>(0,t.jsx)(g.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)(g.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)(g.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)("7fe5c884f4fb671d28ff1bab55b744857f55c93328",R.callServer,void 0,R.findSourceMapURL,"resetHistoryAction"),W=(0,R.createServerReference)("7fb6b4fcdb83b1715c04c2cdf86e243fddb9fdecd9",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)(g.SettingGroup,{label:"Skills",children:(0,t.jsx)(g.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)(g.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)(g.SettingGroup,{label:"Danger zone",note:"Keys, bots and connectors stay.",children:(0,t.jsx)(g.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)(g.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)(g.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)(g.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)(g.SettingGroup,{label:"Captions",children:(0,t.jsx)(g.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)(g.SettingGroup,{label:"Wake",children:(0,t.jsx)(g.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)(g.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)(g.SettingGroup,{label:"Shortcut",children:(0,t.jsx)(g.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)(g.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)(g.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)(g.SettingSkeleton,{rows:4});if(a)return(0,t.jsx)(g.SettingError,{message:a.message});let o=e.model?.provider??null;return(0,t.jsxs)(g.SettingScreen,{footer:(0,t.jsx)(g.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)(g.SettingGroup,{label:"Voice",note:!o&&"Nothing picked — calls run on whichever key is set.",children:(0,t.jsx)(g.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)(f.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:f=!1,parallel:g=!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=f&&!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),f=x().data,j=[],k=null;for(let e=0;e<h;++e){let[a,i]=(0,s.s)(n(e,g?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)(f)||w||f&&!(0,s.i)(f[e])&&!o.compare(f[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};g?j.push(t):await t()}else u[e]=b;g||(k=b)}return g&&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),f=void 0!==p&&p.length>=n,g=(0,t.useRef)(0),v=i&&m.length>0&&g.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||(g.current=e.pages+1,e.setSize(e.pages+1))},{enabled:f,revision:`${m.length}:${i}`});return{items:x,isLoading:a,isLoadingMore:v,error:l,hasMore:f,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,2 +1,2 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,556133,e=>{"use strict";var t=e.i(843476),a=e.i(401851),n=e.i(493801),r=e.i(689664),i=e.i(456420);let s={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};s.node;let l=(0,i.default)(s);var o=e.i(751898),c=e.i(77071),d=e.i(759659),u=e.i(263676),f=e.i(271645),x=e.i(798120),m=e.i(167881),h=e.i(986530),p=e.i(23750),g=e.i(917162),v=e.i(671428),y=e.i(127341),j=e.i(184762),b=e.i(41533),k=e.i(95187);let S=(0,k.createServerReference)("
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,556133,e=>{"use strict";var t=e.i(843476),a=e.i(401851),n=e.i(493801),r=e.i(689664),i=e.i(456420);let s={name:"pencil",size:24,node:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]]};s.node;let l=(0,i.default)(s);var o=e.i(751898),c=e.i(77071),d=e.i(759659),u=e.i(263676),f=e.i(271645),x=e.i(798120),m=e.i(167881),h=e.i(986530),p=e.i(23750),g=e.i(917162),v=e.i(671428),y=e.i(127341),j=e.i(184762),b=e.i(41533),k=e.i(95187);let S=(0,k.createServerReference)("7f3b058a712d28a68c87b36a2bf1cd90ab78923a76",k.callServer,void 0,k.findSourceMapURL,"addFactsAction"),N=(0,k.createServerReference)("7fac25c49e4b728e331504596728000b9c0a702269",k.callServer,void 0,k.findSourceMapURL,"createNoteAction"),w=(0,k.createServerReference)("7f8a9265b964646e2350a6e7c0faf9ace9939aa932",k.callServer,void 0,k.findSourceMapURL,"deleteNoteAction"),C=(0,k.createServerReference)("7f8138d0370b6085de577c575484252df73c3fb9b5",k.callServer,void 0,k.findSourceMapURL,"forgetFactAction"),F=(0,k.createServerReference)("7fc08c711a4e4fa288c5ceaa27294b1e39b8660ce4",k.callServer,void 0,k.findSourceMapURL,"reviseFactAction"),R=(0,k.createServerReference)("7ff8642cc5d4e9011d92957244e6812727add309b4",k.callServer,void 0,k.findSourceMapURL,"setFactAlwaysLoadAction"),P=(0,k.createServerReference)("7f1d70ca6d452e70a4bf056025a15917c39531eb09",k.callServer,void 0,k.findSourceMapURL,"updateNoteAction");var A=e.i(536015),M=e.i(895836),T=e.i(698570),L=e.i(609856),E=e.i(661504),z=e.i(283653),D=e.i(647163);let _=[{key:"you",label:"You"},{key:"people",label:"People"},{key:"projects",label:"Projects"},{key:"plans",label:"Plans"},{key:"topics",label:"Topics"},{key:"inbox",label:"Inbox"}];function K({note:e}){let a=e.facts.filter(e=>e.alwaysLoad).length;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px]",children:[e.path," · ",e.hits," ",1===e.hits?"read":"reads"," ·"," ",e.lastReadAt?`last read ${(0,n.formatDistanceToNowStrict)(e.lastReadAt,{addSuffix:!0})}`:"never read back"]}),a>0&&(0,t.jsxs)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:[a," carried into every call"]})]})}function I({note:e,active:a,onPick:n}){return(0,t.jsxs)("button",{type:"button",onClick:n,className:(0,D.cn)("mx-2 flex items-center gap-2 rounded-md px-2 py-1.5 text-left outline-none focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:ring-inset",a?"bg-secondary text-foreground":"text-muted-foreground hover:bg-muted/60 hover:text-foreground",(0,A.isFading)(e)&&!a&&"opacity-55"),children:[(0,t.jsx)("span",{className:(0,D.cn)("min-w-0 flex-1 truncate text-[13px]",a&&"font-medium"),children:(0,A.noteTitle)(e.path)}),(0,t.jsx)("span",{className:"shrink-0 font-mono text-[11px] text-muted-foreground/70",children:e.factCount})]})}function B({note:e}){let[n,i]=(0,f.useState)(!1),[s,u]=(0,f.useState)(""),h={onOk:()=>(0,z.revalidate)(x.queryKey.memory)},[p]=(0,L.useServerAction)(P,h),[v]=(0,L.useServerAction)(S,h),[y]=(0,L.useServerAction)(F,h),[b]=(0,L.useServerAction)(C,h),[k]=(0,L.useServerAction)(R,h),[N,M]=(0,L.useServerAction)(w,h),T=async()=>{let t=s.split("\n").map(e=>e.trim()).filter(Boolean);0!==t.length&&(await v(e.id,t),u(""))},E=async()=>{await g.notify.confirm({title:`Forget ${e.path}?`,description:"Every fact in this note is deleted for good.",okText:"Delete",destructive:!0})&&N(e.id)};return(0,t.jsxs)("div",{className:(0,D.cn)("flex min-h-full flex-col",(0,A.isFading)(e)&&"opacity-55"),children:[(0,t.jsxs)("div",{className:"flex items-center justify-between gap-3 border-b border-border/60 px-6 py-2.5",children:[(0,t.jsx)("span",{className:"truncate font-mono text-[11px] text-muted-foreground",children:e.path}),(0,t.jsxs)("span",{className:"flex shrink-0 gap-1",children:[(0,t.jsx)(m.Button,{size:"icon-sm",variant:n?"secondary":"ghost","aria-label":n?"Done editing":"Edit this note",onClick:()=>i(!n),children:n?(0,t.jsx)(r.Check,{}):(0,t.jsx)(l,{})}),(0,t.jsx)(m.Button,{size:"icon-sm",variant:"ghost","aria-label":"Forget this note",loading:M,onClick:E,children:(0,t.jsx)(d.Trash2,{})})]})]}),(0,t.jsxs)("div",{className:"flex-1 space-y-5 px-6 py-5",children:[(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsx)("p",{className:"text-xl font-semibold",children:(0,A.noteTitle)(e.path)}),n?(0,t.jsx)(O,{text:e.description,onCommit:async t=>{await p(e.id,{description:t})}}):(0,t.jsx)("p",{className:"text-[13px] leading-relaxed text-muted-foreground",children:e.description})]}),n?(0,t.jsxs)("div",{className:"space-y-2",children:[e.facts.map(a=>(0,t.jsx)(U,{text:a.text,alwaysLoad:a.alwaysLoad,onRevise:async t=>{await y(e.id,a.id,t)},onCarry:async t=>{await k(e.id,a.id,t)},onForget:async()=>{await b(e.id,a.id)}},a.id)),(0,t.jsxs)("div",{className:"flex gap-2 pt-1",children:[(0,t.jsx)(j.Textarea,{value:s,onChange:e=>u(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),T())},placeholder:"Add facts — one per line",className:"min-h-9 resize-none py-1.5 text-sm"}),(0,t.jsx)(m.Button,{size:"icon",variant:"outline",disabled:!s.trim(),onClick:T,children:(0,t.jsx)(c.Plus,{})})]})]}):0===e.facts.length?(0,t.jsx)("p",{className:"text-xs text-muted-foreground/70",children:"Nothing saved here yet — the agent adds facts during calls"}):(0,t.jsx)("ul",{className:"divide-y divide-border/60 border-y border-border/60",children:e.facts.map(e=>(0,t.jsxs)("li",{className:"flex gap-3 py-3",children:[(0,t.jsx)("span",{className:"flex w-3.5 shrink-0 justify-center pt-1",children:e.alwaysLoad?(0,t.jsx)(o.Pin,{className:"size-3 text-foreground"}):(0,t.jsx)("span",{className:"text-muted-foreground/50",children:"—"})}),(0,t.jsx)("span",{className:"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:(0,a.format)(e.createdAt,"yyyy.MM.dd")})]},e.id))})]})]})}function O({text:e,onCommit:a}){let n=(0,T.useDraft)(e,a);return(0,t.jsx)(p.Input,{value:n.value,onChange:e=>n.set(e.target.value),onBlur:n.commit,onKeyDown:n.onKeyDown,placeholder:"One-line summary",className:"text-sm text-muted-foreground"})}function U({text:e,alwaysLoad:a,onRevise:n,onCarry:r,onForget:i}){let s=(0,T.useDraft)(e,n);return(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(p.Input,{value:s.value,onChange:e=>s.set(e.target.value),onBlur:s.commit,onKeyDown:s.onKeyDown,className:"text-sm"}),(0,t.jsx)(m.Button,{size:"icon",variant:a?"secondary":"ghost","aria-label":a?"Stop carrying into calls":"Carry into every call",title:"Carried into every call, without opening this note",onClick:()=>r(!a),children:(0,t.jsx)(o.Pin,{className:(0,D.cn)(!a&&"text-muted-foreground/60")})}),(0,t.jsx)(m.Button,{size:"icon",variant:"ghost",onClick:i,children:(0,t.jsx)(u.X,{})})]})}let $=[{key:"people",label:"Person",placeholder:"jihoon",fact:"Moved to the platform team in March"},{key:"projects",label:"Project",placeholder:"thursday",fact:"Ships behind a feature flag until April"},{key:"plans",label:"Plan",placeholder:"japan trip",fact:"Aug 28–31 with Yuri — wedding rings in Ginza"},{key:"topics",label:"Topic",placeholder:"scheduling",fact:"No meetings before 10am"}];function V(){return g.notify.component({className:"sm:max-w-lg",renderer:({close:e})=>(0,t.jsx)(q,{onDone:e})})}function q({onDone:e}){let[a,n]=(0,f.useState)("people"),[r,i]=(0,f.useState)(""),[s,l]=(0,f.useState)(""),[o,d]=(0,f.useState)(""),[u,g,,v]=(0,L.useServerAction)(N,{errorMessage:!1,onOk:()=>{(0,z.revalidate)(x.queryKey.memory),e()}}),b=$.find(e=>e.key===a),k=r.trim()&&s.trim()&&!g,S=()=>{k&&u(`${a}/${r.trim()}`,s.trim(),o.split("\n").map(e=>e.trim()).filter(Boolean))};return(0,t.jsxs)(M.SettingDialogContent,{title:"New note",description:"Where the agent files what it learns about this subject.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m.Button,{variant:"ghost",onClick:e,children:"Cancel"}),(0,t.jsxs)(m.Button,{disabled:!k,loading:g,onClick:S,children:[!g&&(0,t.jsx)(c.Plus,{}),"Create"]})]}),children:[(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(h.Field,{children:[(0,t.jsx)(h.FieldLabel,{children:"Kind"}),(0,t.jsx)(y.Tabs,{value:a,onValueChange:e=>n(e),children:(0,t.jsx)(y.TabsList,{className:"w-full",children:$.map(e=>(0,t.jsx)(y.TabsTrigger,{value:e.key,children:e.label},e.key))})})]}),(0,t.jsxs)(h.Field,{children:[(0,t.jsx)(h.FieldLabel,{htmlFor:"note-name",children:"Name"}),(0,t.jsxs)(h.FieldContent,{children:[(0,t.jsx)(p.Input,{id:"note-name",value:r,onChange:e=>i(e.target.value),placeholder:b?.placeholder,spellCheck:!1,required:!0}),(0,t.jsxs)("p",{className:"font-mono text-[11px] text-muted-foreground",children:[a,"/",r.trim()||"…"]})]})]}),(0,t.jsxs)(h.Field,{children:[(0,t.jsx)(h.FieldLabel,{htmlFor:"note-summary",children:"Summary"}),(0,t.jsx)(h.FieldContent,{children:(0,t.jsx)(p.Input,{id:"note-summary",value:s,onChange:e=>l(e.target.value),onKeyDown:e=>"Enter"===e.key&&S(),placeholder:"One line the agent sees in its note list",required:!0})})]}),(0,t.jsxs)(h.Field,{children:[(0,t.jsx)(h.FieldLabel,{htmlFor:"note-facts",children:"Facts"}),(0,t.jsx)(j.Textarea,{id:"note-facts",value:o,onChange:e=>d(e.target.value),placeholder:`One per line
|
|
2
2
|
${b?.fact??""}`,className:"min-h-24 resize-none text-sm"})]})]}),v&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:v})]})}e.s(["MemorySetting",0,function(){let{items:e,isLoading:a,isLoadingMore:n,error:r,hasMore:i,sentinelRef:s}=(0,E.useServerPages)({key:e=>x.queryKey.memoryPage(e*b.PAGE_SIZE)}),[l,o]=(0,f.useState)(null),d=e.find(e=>e.id===l)??e[0]??null;return a?(0,t.jsx)(M.SettingPanesSkeleton,{}):r?(0,t.jsx)(M.SettingError,{message:r.message}):(0,t.jsx)(M.SettingPanes,{footer:d&&(0,t.jsx)(K,{note:d}),left:(0,t.jsxs)("div",{className:"flex flex-col py-2",children:[(0,t.jsxs)("button",{type:"button",onClick:V,className:"mx-2 mb-1 flex items-center gap-2 rounded-md px-2 py-1.5 text-left text-[13px] 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)(c.Plus,{className:"size-3.5 shrink-0"}),"New note"]}),_.map(({key:a,label:n})=>{let r=e.filter(e=>(0,A.sectionOf)(e.path)===a);return 0===r.length?null:(0,t.jsxs)(f.Fragment,{children:[(0,t.jsxs)("span",{className:"px-3 pt-3 pb-1 font-mono text-[10px] text-muted-foreground/60",children:[n,"inbox"===a&&(0,t.jsx)("span",{className:"pl-1.5 text-muted-foreground/50",children:"waiting to be filed"})]}),r.map(e=>(0,t.jsx)(I,{note:e,active:e.id===d?.id,onPick:()=>o(e.id)},e.id))]},a)}),(0,t.jsx)(M.SettingMore,{hasMore:i,loading:n,sentinelRef:s,count:3,ghost:(0,t.jsxs)("div",{className:"mx-2 flex items-center gap-2 px-2 py-2",children:[(0,t.jsx)(v.Skeleton,{className:"h-3 w-28"}),(0,t.jsx)("span",{className:"flex-1"}),(0,t.jsx)(v.Skeleton,{className:"h-2.5 w-2.5"})]})})]}),right:d?(0,t.jsx)(B,{note:d},d.id):(0,t.jsxs)("div",{className:"space-y-4 p-8",children:[(0,t.jsx)("p",{className:"text-sm leading-relaxed text-muted-foreground",children:"During calls Thursday saves what it picks up — that a teammate moved teams, that you take meetings in the morning — and reads it back before answering. File the first note yourself and it starts the next call already knowing something."}),(0,t.jsxs)(m.Button,{variant:"outline",onClick:V,children:[(0,t.jsx)(c.Plus,{}),"Add note"]})]})})},"openMemoryCreate",0,V],556133)},698570,e=>{"use strict";var t=e.i(271645);e.s(["useDraft",0,function(e,a,{min:n=1}={}){let[r,i]=(0,t.useState)(e),[s,l]=(0,t.useState)(e);return e!==s&&(l(e),i(e)),{value:r,set:i,commit:()=>{let t=r.trim();if(t.length<n)return i(e);i(t),t!==e&&a(t)},onKeyDown:e=>{"Enter"!==e.key||e.nativeEvent.isComposing||e.currentTarget.blur()}}}])},661504,e=>{"use strict";var t=e.i(271645),a=e.i(699018),n=e.i(677309),r=e.i(271235),i=e.i(802239),s=e.i(646192);let l=Promise.resolve(),o=(0,r.withMiddleware)(a.u,e=>(a,r,o)=>{let c,d=(0,t.useRef)(!1),{cache:u,initialSize:f=1,revalidateAll:x=!1,persistSize:m=!1,revalidateFirstPage:h=!0,revalidateOnMount:p=!1,parallel:g=!1}=o,[,,,v]=n.a.get(n.o);try{(c=(0,n.s)(a?a(0,null):null)[0])&&(c=s.INFINITE_PREFIX+c)}catch(e){}let[y,j,b]=(0,n.c)(u,c),k=(0,t.useCallback)(()=>(0,n.i)(y()._l)?f:y()._l,[u,c,f]);(0,i.useSyncExternalStore)((0,t.useCallback)(e=>c?b(c,()=>{e()}):()=>{},[u,c]),k,k);let S=(0,t.useCallback)(()=>{let e=y()._l;return(0,n.i)(e)?f:e},[c,f]),N=(0,t.useRef)(S());(0,n.u)(()=>{if(!d.current){d.current=!0;return}c&&j({_l:m?N.current:S()})},[c,u]);let w=p&&!d.current,C=e(c,async e=>{let t=y()._i,i=y()._r,s=n.a.get(u),l=s[8],c=()=>s[8]!==l;j({_r:n.U});let d=[],f=S(),[m]=(0,n.c)(u,e),p=m().data,b=[],k=null;for(let e=0;e<f;++e){let[s,l]=(0,n.s)(a(e,g?null:k));if(!s)break;let[f,m]=(0,n.c)(u,s),y=f().data,j=x||t||(0,n.i)(y)||h&&!e&&!(0,n.i)(p)||w||p&&!(0,n.i)(p[e])&&!o.compare(p[e],y);if(r&&("function"==typeof i?i(y,l):j)){let t=async()=>{if(s in v){let e=v[s];delete v[s],y=await e}else y=await r(l);c()||m({data:y,_k:l}),d[e]=y};g?b.push(t):await t()}else d[e]=y;g||(k=y)}return g&&await Promise.all(b.map(e=>e())),c()||j({_i:n.U}),d},o),F=(0,t.useCallback)(function(e,t){let a="boolean"==typeof t?{revalidate:t}:t||{},r=!1!==a.revalidate;return c?(r&&((0,n.i)(e)?j({_i:!0,_r:a.revalidate}):j({_i:!1,_r:a.revalidate})),arguments.length?C.mutate(e,{...a,revalidate:r}):C.mutate()):l},[c,u]),R=(0,t.useCallback)(e=>{let t;if(!c)return l;let[,r]=(0,n.c)(u,c);if((0,n.e)(e)?t=e(S()):"number"==typeof e&&(t=e),"number"!=typeof t)return l;r({_l:t}),N.current=t;let i=[],[s]=(0,n.c)(u,c),o=null;for(let e=0;e<t;++e){let[t]=(0,n.s)(a(e,o)),[r]=(0,n.c)(u,t),l=t?r().data:n.U;if((0,n.i)(l))return F(s().data);i.push(l),o=l}return F(i)},[c,u,F,S]);return{size:S(),setSize:R,mutate:F,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),d=e.i(283653);e.s(["useServerPages",0,function(e){let a=e.size??c.PAGE_SIZE,{key:n}=e,{data:r,error:i,isLoading:s,isValidating:l,setSize:u,mutate:f}=o((e,t)=>(0,d.resolveKey)(n(e,t)),d.fetchRoute,{dedupingInterval:500,revalidateOnMount:!0,revalidateOnFocus:!0,revalidateOnReconnect:!0,focusThrottleInterval:1e3,revalidateFirstPage:!1,...e.swr}),x=r??[],m=x.flat(),h=x.at(-1),p=void 0!==h&&h.length>=a,g=(0,t.useRef)(0),v=l&&x.length>0&&g.current>x.length,y=(0,t.useRef)({isValidating:l,setSize:u,pages:x.length});y.current={isValidating:l,setSize:u,pages:x.length};let j=(0,d.resolveKey)(n(0,null)),b="string"==typeof j?j:j?.url;(0,t.useEffect)(()=>{if(b)return(0,d.registerPagedReader)({url:b,refresh:()=>f()})},[b,f]);let k=function(e,a={}){let{enabled:n=!0,margin:r="600px",revision:i}=a,s=(0,t.useRef)(e);s.current=e;let l=(0,t.useRef)(null),o=(0,t.useRef)(null),c=(0,t.useCallback)(e=>{l.current=e},[]);return(0,t.useEffect)(()=>{o.current?.disconnect();let e=l.current;if(e&&n)return o.current=new IntersectionObserver(([e])=>{e.isIntersecting&&s.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()},[n,r,i]),c}(()=>{let e=y.current;e.isValidating||(g.current=e.pages+1,e.setSize(e.pages+1))},{enabled:p,revision:`${x.length}:${l}`});return{items:m,isLoading:s,isLoadingMore:v,error:i,hasMore:p,sentinelRef:k,refresh:()=>f()}}],661504)},759659,e=>{"use strict";var t=e.i(456420);let a={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"]};a.node;let n=(0,t.default)(a);e.s(["Trash2",0,n],759659)}]);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,787800,e=>{"use strict";var t=e.i(843476),n=e.i(689664),s=e.i(716327),r=e.i(867927),o=e.i(456420);let a={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};a.node;let i=(0,o.default)(a);var c=e.i(77071);let l={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};l.node;let d=(0,o.default)(l),m={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};m.node;let p=(0,o.default)(m);var u=e.i(759659),h=e.i(263676),g=e.i(271645),f=e.i(798120),x=e.i(167881),v=e.i(986530),j=e.i(23750),y=e.i(647163);let b=(0,g.memo)(({data:e,name:n,initialExpandDepth:s=2})=>{let r=(0,g.useMemo)(()=>"string"==typeof e?function(e){let t=e.trim();if(!(t.startsWith("{")&&t.endsWith("}"))&&!(t.startsWith("[")&&t.endsWith("]")))return{success:!1,data:e};try{return{success:!0,data:JSON.parse(e)}}catch{return{success:!1,data:e}}}(e).data:e,[e]);return(0,t.jsx)("div",{className:" text-sm transition-all duration-300",children:(0,t.jsx)(N,{data:r,name:n,depth:0,initialExpandDepth:s})})});b.displayName="JsonView";let N=(0,g.memo)(({data:e,name:n,depth:s=0,initialExpandDepth:r})=>{var o;let a=void 0===e?"undefined":Array.isArray(e)?"array":null===e?"null":typeof e,[i,c]=(0,g.useState)("string"!==a&&s<r),l={number:"text-blue-500",boolean:"text-amber-500",null:"text-purple-500",undefined:"text-gray-500",string:"text-foreground break-all whitespace-pre-wrap",default:"text-muted-foreground"};switch(a){case"object":case"array":let d,m,p;return m=(d=(o="array"===a)?e:Object.entries(e)).length,p={open:o?"[":"{",close:o?"]":"}",collapsed:o?"[ ... ]":"{ ... }",empty:o?"[]":"{}"},0===m?(0,t.jsxs)("div",{className:"flex items-center",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:p.empty})]}):(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded cursor-pointer group hover:bg-input/30",onClick:()=>c(!i),children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),i?(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:p.open}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:p.collapsed}),(0,t.jsxs)("span",{className:"ml-1 text-muted-foreground group-hover:text-foreground",children:[m," ",1===m?"item":"items"]})]})]}),i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"pl-2 ml-4 border-l border-border",children:o?d.map((e,n)=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(N,{data:e,name:`${n}`,depth:s+1,initialExpandDepth:r})},n)):d.map(([e,n])=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(N,{data:n,name:e,depth:s+1,initialExpandDepth:r})},e))}),(0,t.jsx)("div",{className:"text-muted-foreground",children:p.close})]})]});case"string":return e.length>100?(0,t.jsxs)("div",{className:"flex mr-1 rounded group hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),(0,t.jsx)("pre",{className:(0,y.cn)(l.string,"cursor-pointer group-hover:text-foreground"),onClick:()=>c(!i),title:i?"Click to collapse":"Click to expand",children:i?`"${e}"`:`"${e.slice(0,100)}..."`})]}):(0,t.jsxs)("div",{className:"flex mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsxs)("pre",{className:l.string,children:['"',e,'"']})]});case"undefined":return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l.undefined,children:"undefined"})]});default:return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l[a]||l.default,children:null===e?"null":String(e)})]})}});N.displayName="JsonNode";var k=e.i(917162),S=e.i(319036),C=e.i(127341),w=e.i(184762),z=e.i(6799),O=e.i(95187);let T=(0,O.createServerReference)("7f5a192ef8096b2b075df879d5ab6cbfd5be7f912c",O.callServer,void 0,O.findSourceMapURL,"callToolAction"),A=(0,O.createServerReference)("7fceb171d46c81de338e79d8c2d4aae8463fc77546",O.callServer,void 0,O.findSourceMapURL,"deleteServerAction"),I=(0,O.createServerReference)("7f3fc1217df939064475e09d962acf376dc47d28f7",O.callServer,void 0,O.findSourceMapURL,"refreshServerAction"),P=(0,O.createServerReference)("7f95e939ee78e6c29abae2f989202989a3645c590d",O.callServer,void 0,O.findSourceMapURL,"registerServerAction");var F=e.i(681307),$=e.i(245629);let M=F.z.object({url:F.z.url(),headers:F.z.record(F.z.string(),F.z.string()).optional(),oauthClient:F.z.object({clientId:F.z.string().min(1),clientSecret:F.z.string().optional()}).optional()}),R=F.z.object({command:F.z.string().min(1),args:F.z.array(F.z.string()).optional(),env:F.z.record(F.z.string(),F.z.string()).optional()}),D=F.z.union([M,R]),E=F.z.object({name:F.z.string(),description:F.z.string().optional(),inputSchema:F.z.looseObject({}).optional(),outputSchema:F.z.looseObject({}).optional()});function L(e){return"url"in e}F.z.object({clientInformation:F.z.looseObject({}).optional(),tokens:F.z.looseObject({}).optional(),authorizationServer:F.z.looseObject({}).optional(),codeVerifier:F.z.string().optional(),state:F.z.string().optional()});let q=F.z.object({name:F.z.string().min(1).max(40),config:D,toolCount:F.z.number().int(),lastError:F.z.string().nullish()}),B=E.extend({id:F.z.number().int(),description:F.z.string().nullish()});q.omit({toolCount:!0}).extend({tools:B.array().default([]),toolsSyncedAt:$.DateLikeSchema});let J=F.z.object({name:F.z.string().min(1,"Name is required").max(40).regex(/^[a-zA-Z0-9_-]+$/,"Only letters, numbers, - and _ are allowed"),config:D}),U=F.z.union([F.z.object({mcpServers:F.z.record(F.z.string(),D)}),F.z.record(F.z.string(),D)]),K=[{name:"notion",icon:"notion.so",description:"Pages, databases, and search",config:{url:"https://mcp.notion.com/mcp"}},{name:"github",icon:"github.com",description:"Repos, issues, PRs — paste a personal access token",config:{url:"https://api.githubcopilot.com/mcp/",headers:{Authorization:"Bearer <your-github-pat>"}}},{name:"linear",icon:"linear.app",description:"Issues, projects, and cycles",config:{url:"https://mcp.linear.app/mcp"}},{name:"slack",icon:"slack.com",description:"Channels, messages, and search",config:{url:"https://mcp.slack.com/mcp"}},{name:"atlassian",icon:"atlassian.com",description:"Jira and Confluence",config:{url:"https://mcp.atlassian.com/v1/mcp"}},{name:"asana",icon:"asana.com",description:"Tasks, projects, and portfolios",config:{url:"https://mcp.asana.com/mcp"}},{name:"monday",icon:"monday.com",description:"Boards, items, and updates",config:{url:"https://mcp.monday.com/mcp"}},{name:"clickup",icon:"clickup.com",description:"Tasks, docs, and spaces",config:{url:"https://mcp.clickup.com/mcp"}},{name:"airtable",icon:"airtable.com",description:"Bases, tables, and records",config:{url:"https://mcp.airtable.com/mcp"}},{name:"box",icon:"box.com",description:"Files, folders, and content search",config:{url:"https://mcp.box.com/mcp"}},{name:"figma",icon:"figma.com",description:"Design files and components",config:{url:"https://mcp.figma.com/mcp"}},{name:"canva",icon:"canva.com",description:"Create and manage designs",config:{url:"https://mcp.canva.com/mcp"}},{name:"sanity",icon:"sanity.io",description:"Structured content and datasets",config:{url:"https://mcp.sanity.io/mcp"}},{name:"webflow",icon:"webflow.com",description:"Sites, pages, and CMS collections",config:{url:"https://mcp.webflow.com/mcp"}},{name:"wix",icon:"wix.com",description:"Sites, stores, and bookings",config:{url:"https://mcp.wix.com/mcp"}},{name:"hubspot",icon:"hubspot.com",description:"Contacts, deals, and companies",config:{url:"https://app.hubspot.com/mcp/v1/http"}},{name:"attio",icon:"attio.com",description:"CRM records and lists",config:{url:"https://mcp.attio.com/mcp"}},{name:"intercom",icon:"intercom.com",description:"Conversations and support tickets",config:{url:"https://mcp.intercom.com/mcp"}},{name:"fireflies",icon:"fireflies.ai",description:"Meeting transcripts and summaries",config:{url:"https://mcp.fireflies.ai/mcp"}},{name:"stripe",icon:"stripe.com",description:"Payments, invoices, and customers",config:{url:"https://mcp.stripe.com"}},{name:"paypal",icon:"paypal.com",description:"Payments and orders",config:{url:"https://mcp.paypal.com/mcp"}},{name:"square",icon:"squareup.com",description:"Payments, catalog, and orders",config:{url:"https://mcp.squareup.com/mcp"}},{name:"ramp",icon:"ramp.com",description:"Spend, cards, and transactions",config:{url:"https://mcp.ramp.com/mcp"}},{name:"vercel",icon:"vercel.com",description:"Deployments and projects",config:{url:"https://mcp.vercel.com"}},{name:"netlify",icon:"netlify.com",description:"Sites, builds, and deploys",config:{url:"https://mcp.netlify.com/mcp"}},{name:"cloudflare",icon:"cloudflare.com",description:"Workers bindings — D1, R2, KV",config:{url:"https://bindings.mcp.cloudflare.com/mcp"}},{name:"supabase",icon:"supabase.com",description:"Projects, tables, and SQL",config:{url:"https://mcp.supabase.com/mcp"}},{name:"neon",icon:"neon.tech",description:"Postgres branches and queries",config:{url:"https://mcp.neon.tech/mcp"}},{name:"prisma",icon:"prisma.io",description:"Postgres databases and schema",config:{url:"https://mcp.prisma.io/mcp"}},{name:"sentry",icon:"sentry.io",description:"Errors and performance issues",config:{url:"https://mcp.sentry.dev/mcp"}},{name:"grafana",icon:"grafana.com",description:"Dashboards, metrics, and alerts",config:{url:"https://mcp.grafana.com/mcp"}},{name:"semgrep",icon:"semgrep.dev",description:"Scan code for security findings",config:{url:"https://mcp.semgrep.ai/mcp"}},{name:"postman",icon:"postman.com",description:"Collections, environments, and requests",config:{url:"https://mcp.postman.com/mcp"}},{name:"resend",icon:"resend.com",description:"Send email and manage audiences",config:{url:"https://mcp.resend.com/mcp"}},{name:"hugging-face",icon:"huggingface.co",description:"Models, datasets, and Spaces",config:{url:"https://huggingface.co/mcp"}},{name:"apify",icon:"apify.com",description:"Run scrapers and automation actors",config:{url:"https://mcp.apify.com"}},{name:"exa",icon:"exa.ai",description:"Web search for agents",config:{url:"https://mcp.exa.ai/mcp"}},{name:"kagi",icon:"kagi.com",description:"Search, summarize, and answer",config:{url:"https://mcp.kagi.com/mcp"}},{name:"context7",icon:"context7.com",description:"Up-to-date library docs",config:{url:"https://mcp.context7.com/mcp"}},{name:"deepwiki",icon:"deepwiki.com",description:"Ask questions about any GitHub repo",config:{url:"https://mcp.deepwiki.com/mcp"}},{name:"microsoft-learn",icon:"learn.microsoft.com",description:"Microsoft and Azure docs — no account",config:{url:"https://learn.microsoft.com/api/mcp"}},{name:"aws-knowledge",icon:"aws.amazon.com",description:"AWS docs and API references — no account",config:{url:"https://knowledge-mcp.global.api.aws"}},{name:"cloudflare-docs",icon:"developers.cloudflare.com",description:"Cloudflare docs — no account",config:{url:"https://docs.mcp.cloudflare.com/mcp"}},{name:"stack-overflow",icon:"stackoverflow.com",description:"Questions, answers, and teams",config:{url:"https://mcp.stackoverflow.com"}},{name:"playwright",icon:"playwright.dev",description:"Drive a real browser",config:{command:"npx",args:["@playwright/mcp@latest"]}},{name:"chrome-devtools",icon:"developer.chrome.com",description:"Inspect and debug Chrome",config:{command:"npx",args:["chrome-devtools-mcp@latest"]}}];var _=e.i(895836),H=e.i(333999),W=e.i(609856),V=e.i(283653);function G({name:e,onDone:n}){let{data:s,isLoading:r}=(0,V.useServerRoute)(f.queryKey.mcpServer(e)),[o,a]=(0,W.useServerAction)(I,{...ec,onOk:t=>{ec.onOk(t),(0,V.revalidate)(f.queryKey.mcpServer(e))}}),[i,c]=(0,W.useServerAction)(A,{okMessage:"Server deleted",onOk:()=>{n(),(0,V.revalidate)(f.queryKey.mcp)}}),l=async()=>{await k.notify.confirm({title:`Delete ${e}?`,description:"Its connection and saved authorization go with it.",okText:"Delete",destructive:!0})&&i(e)};if(r)return(0,t.jsx)(_.SettingSkeleton,{rows:4});if(!s)return null;let m=s.tools.length,p=L(s.config)?"HTTP":"STDIO";return(0,t.jsxs)(_.SettingDialogContent,{title:s.name,description:(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"shrink-0 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:p}),(0,t.jsx)("span",{className:"truncate font-mono",children:ed(s.config)})]}),footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.Button,{variant:"ghost",loading:c,onClick:l,children:[(0,t.jsx)(u.Trash2,{}),"Delete"]}),(0,t.jsxs)(x.Button,{variant:"outline",loading:a,onClick:()=>o(s.name),children:[(0,t.jsx)(d,{}),"Reconnect"]})]}),children:[s.lastError&&(0,t.jsx)("p",{className:"rounded-lg bg-destructive/10 px-3 py-2 font-mono text-xs text-destructive",children:s.lastError}),(0,t.jsxs)("p",{className:"text-right font-mono text-xs text-muted-foreground",children:[m," ",1===m?"tool":"tools"]}),s.tools.map(e=>(0,t.jsx)(Y,{tool:e,serverName:s.name},e.name))]})}function Q({server:e}){let s=e.toolCount,o=e.lastError?"error":s>0?"connected":"idle";return(0,t.jsxs)("button",{type:"button",onClick:()=>{k.notify.component({className:"sm:max-w-3xl",renderer:({close:n})=>(0,t.jsx)(G,{name:e.name,onDone:n})})},className:"group 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)(X,{server:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.name}),"connected"===o&&(0,t.jsx)(n.Check,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:"error"===o?(0,t.jsx)("span",{className:"text-destructive",children:e.lastError}):(0,t.jsxs)(t.Fragment,{children:[s>0?`${s} ${1===s?"tool":"tools"}`:"No tools yet",(0,t.jsxs)("span",{className:"font-mono text-[11px] text-muted-foreground/70",children:[" · ",ed(e.config)]})]})})]}),(0,t.jsx)(r.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function X({server:e}){let n,s=(n=K.find(t=>L(t.config)?L(e.config)&&t.config.url.replace(/\/+$/,"")===e.config.url.replace(/\/+$/,""):!L(e.config)&&t.config.command===e.config.command&&(t.config.args??[]).join(" ")===(e.config.args??[]).join(" "))??K.find(t=>t.name===e.name),n?.icon);return s?(0,t.jsx)("img",{src:(0,y.faviconUrl)(s),alt:"",className:"size-5"}):(0,t.jsx)(p,{className:"size-4"})}function Y({tool:e,serverName:n}){let[o,a]=(0,g.useState)(!1),[i,c]=(0,g.useState)(!1),[l,d]=(0,g.useState)(!1),m=[["inputSchema",e.inputSchema],["outputSchema",e.outputSchema]].filter(([,e])=>e);return(0,t.jsxs)("div",{className:"rounded-xl border border-border/60 bg-background p-4",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate font-mono text-sm",children:e.name}),e.description?(0,t.jsx)("p",{className:(0,y.cn)("text-xs text-muted-foreground",!l&&"line-clamp-2",e.description.length>140&&"cursor-pointer"),onClick:()=>d(!l),children:e.description}):null]}),(0,t.jsxs)("div",{className:"mt-2 flex justify-end gap-1",children:[m.length>0&&(0,t.jsxs)(x.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>a(!o),children:[o?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(r.ChevronRight,{}),"Schema"]}),(0,t.jsxs)(x.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>c(!i),children:[i?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(r.ChevronRight,{}),"Test"]})]}),o?(0,t.jsx)("div",{className:"mt-2 space-y-3 overflow-x-auto rounded-lg border border-input p-3",children:m.map(([e,n])=>(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"block font-mono text-xs text-muted-foreground",children:"inputSchema"===e?"in":"out"}),(0,t.jsx)("pre",{className:"font-mono text-xs leading-relaxed whitespace-pre",children:function e(t,n=0){if(!t||"object"!=typeof t)return"unknown";let s=" ".repeat(n+1),r=" ".repeat(n);if(Array.isArray(t.enum))return t.enum.map(e=>JSON.stringify(e)).join(" | ");let o=t.anyOf??t.oneOf;if(Array.isArray(o))return o.map(t=>e(t,n)).join(" | ");if("array"===t.type){let s=e(t.items,n);return/[|{]/.test(s)?`(${s})[]`:`${s}[]`}if("object"===t.type||t.properties){let o=t.properties;if(!o||0===Object.keys(o).length)return"{}";let a=t.required??[],i=Object.entries(o).map(([t,r])=>{let o=a.includes(t)?"":"?",i=r?.description,c="string"==typeof i&&i.length<=60?` // ${i}`:"";return`${s}${t}${o}: ${e(r,n+1)}${c}`});return`{
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,787800,e=>{"use strict";var t=e.i(843476),n=e.i(689664),s=e.i(716327),r=e.i(867927),o=e.i(456420);let a={name:"play",size:24,node:[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]]};a.node;let i=(0,o.default)(a);var c=e.i(77071);let l={name:"refresh-cw",size:24,node:[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]};l.node;let d=(0,o.default)(l),m={name:"server",size:24,node:[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]};m.node;let p=(0,o.default)(m);var u=e.i(759659),h=e.i(263676),g=e.i(271645),f=e.i(798120),x=e.i(167881),v=e.i(986530),j=e.i(23750),b=e.i(647163);let y=(0,g.memo)(({data:e,name:n,initialExpandDepth:s=2})=>{let r=(0,g.useMemo)(()=>"string"==typeof e?function(e){let t=e.trim();if(!(t.startsWith("{")&&t.endsWith("}"))&&!(t.startsWith("[")&&t.endsWith("]")))return{success:!1,data:e};try{return{success:!0,data:JSON.parse(e)}}catch{return{success:!1,data:e}}}(e).data:e,[e]);return(0,t.jsx)("div",{className:" text-sm transition-all duration-300",children:(0,t.jsx)(N,{data:r,name:n,depth:0,initialExpandDepth:s})})});y.displayName="JsonView";let N=(0,g.memo)(({data:e,name:n,depth:s=0,initialExpandDepth:r})=>{var o;let a=void 0===e?"undefined":Array.isArray(e)?"array":null===e?"null":typeof e,[i,c]=(0,g.useState)("string"!==a&&s<r),l={number:"text-blue-500",boolean:"text-amber-500",null:"text-purple-500",undefined:"text-gray-500",string:"text-foreground break-all whitespace-pre-wrap",default:"text-muted-foreground"};switch(a){case"object":case"array":let d,m,p;return m=(d=(o="array"===a)?e:Object.entries(e)).length,p={open:o?"[":"{",close:o?"]":"}",collapsed:o?"[ ... ]":"{ ... }",empty:o?"[]":"{}"},0===m?(0,t.jsxs)("div",{className:"flex items-center",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:"text-muted-foreground",children:p.empty})]}):(0,t.jsxs)("div",{className:"flex flex-col",children:[(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded cursor-pointer group hover:bg-input/30",onClick:()=>c(!i),children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),i?(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:p.open}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{className:"text-muted-foreground group-hover:text-foreground",children:p.collapsed}),(0,t.jsxs)("span",{className:"ml-1 text-muted-foreground group-hover:text-foreground",children:[m," ",1===m?"item":"items"]})]})]}),i&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"pl-2 ml-4 border-l border-border",children:o?d.map((e,n)=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(N,{data:e,name:`${n}`,depth:s+1,initialExpandDepth:r})},n)):d.map(([e,n])=>(0,t.jsx)("div",{className:"my-1",children:(0,t.jsx)(N,{data:n,name:e,depth:s+1,initialExpandDepth:r})},e))}),(0,t.jsx)("div",{className:"text-muted-foreground",children:p.close})]})]});case"string":return e.length>100?(0,t.jsxs)("div",{className:"flex mr-1 rounded group hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground hover:text-foreground",children:[n,":"]}),(0,t.jsx)("pre",{className:(0,b.cn)(l.string,"cursor-pointer group-hover:text-foreground"),onClick:()=>c(!i),title:i?"Click to collapse":"Click to expand",children:i?`"${e}"`:`"${e.slice(0,100)}..."`})]}):(0,t.jsxs)("div",{className:"flex mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsxs)("pre",{className:l.string,children:['"',e,'"']})]});case"undefined":return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l.undefined,children:"undefined"})]});default:return(0,t.jsxs)("div",{className:"flex items-center mr-1 rounded hover:bg-input/30",children:[n&&(0,t.jsxs)("span",{className:"mr-1 text-muted-foreground",children:[n,":"]}),(0,t.jsx)("span",{className:l[a]||l.default,children:null===e?"null":String(e)})]})}});N.displayName="JsonNode";var k=e.i(917162),S=e.i(319036),C=e.i(127341),w=e.i(184762),z=e.i(6799),O=e.i(95187);let T=(0,O.createServerReference)("7f0319a99086ee3cd1918985c144e87ea4dc20d07e",O.callServer,void 0,O.findSourceMapURL,"callToolAction"),A=(0,O.createServerReference)("7f5032afb7983c1d0f61fd3693eebdadead290f6b7",O.callServer,void 0,O.findSourceMapURL,"deleteServerAction"),I=(0,O.createServerReference)("7f46495bb3a4bf849eb1e2069dbb9063be852be5bd",O.callServer,void 0,O.findSourceMapURL,"refreshServerAction"),P=(0,O.createServerReference)("7f860ba40e6a0fac88f2c4e6b892e39b044b4bcba0",O.callServer,void 0,O.findSourceMapURL,"registerServerAction");var F=e.i(681307),$=e.i(245629);let M=F.z.object({url:F.z.url(),headers:F.z.record(F.z.string(),F.z.string()).optional(),oauthClient:F.z.object({clientId:F.z.string().min(1),clientSecret:F.z.string().optional()}).optional()}),R=F.z.object({command:F.z.string().min(1),args:F.z.array(F.z.string()).optional(),env:F.z.record(F.z.string(),F.z.string()).optional()}),D=F.z.union([M,R]),E=F.z.object({name:F.z.string(),description:F.z.string().optional(),inputSchema:F.z.looseObject({}).optional(),outputSchema:F.z.looseObject({}).optional()});function L(e){return"url"in e}F.z.object({clientInformation:F.z.looseObject({}).optional(),tokens:F.z.looseObject({}).optional(),authorizationServer:F.z.looseObject({}).optional(),codeVerifier:F.z.string().optional(),state:F.z.string().optional()});let q=F.z.object({name:F.z.string().min(1).max(40),config:D,toolCount:F.z.number().int(),lastError:F.z.string().nullish()}),B=E.extend({id:F.z.number().int(),description:F.z.string().nullish()});q.omit({toolCount:!0}).extend({tools:B.array().default([]),toolsSyncedAt:$.DateLikeSchema});let J=F.z.object({name:F.z.string().min(1,"Name is required").max(40).regex(/^[a-zA-Z0-9_-]+$/,"Only letters, numbers, - and _ are allowed"),config:D}),U=F.z.union([F.z.object({mcpServers:F.z.record(F.z.string(),D)}),F.z.record(F.z.string(),D)]),K=[{name:"notion",icon:"notion.so",description:"Pages, databases, and search",config:{url:"https://mcp.notion.com/mcp"}},{name:"github",icon:"github.com",description:"Repos, issues, PRs — paste a personal access token",config:{url:"https://api.githubcopilot.com/mcp/",headers:{Authorization:"Bearer <your-github-pat>"}}},{name:"linear",icon:"linear.app",description:"Issues, projects, and cycles",config:{url:"https://mcp.linear.app/mcp"}},{name:"slack",icon:"slack.com",description:"Channels, messages, and search",config:{url:"https://mcp.slack.com/mcp"}},{name:"atlassian",icon:"atlassian.com",description:"Jira and Confluence",config:{url:"https://mcp.atlassian.com/v1/mcp"}},{name:"asana",icon:"asana.com",description:"Tasks, projects, and portfolios",config:{url:"https://mcp.asana.com/mcp"}},{name:"monday",icon:"monday.com",description:"Boards, items, and updates",config:{url:"https://mcp.monday.com/mcp"}},{name:"clickup",icon:"clickup.com",description:"Tasks, docs, and spaces",config:{url:"https://mcp.clickup.com/mcp"}},{name:"airtable",icon:"airtable.com",description:"Bases, tables, and records",config:{url:"https://mcp.airtable.com/mcp"}},{name:"box",icon:"box.com",description:"Files, folders, and content search",config:{url:"https://mcp.box.com/mcp"}},{name:"figma",icon:"figma.com",description:"Design files and components",config:{url:"https://mcp.figma.com/mcp"}},{name:"canva",icon:"canva.com",description:"Create and manage designs",config:{url:"https://mcp.canva.com/mcp"}},{name:"sanity",icon:"sanity.io",description:"Structured content and datasets",config:{url:"https://mcp.sanity.io/mcp"}},{name:"webflow",icon:"webflow.com",description:"Sites, pages, and CMS collections",config:{url:"https://mcp.webflow.com/mcp"}},{name:"wix",icon:"wix.com",description:"Sites, stores, and bookings",config:{url:"https://mcp.wix.com/mcp"}},{name:"hubspot",icon:"hubspot.com",description:"Contacts, deals, and companies",config:{url:"https://app.hubspot.com/mcp/v1/http"}},{name:"attio",icon:"attio.com",description:"CRM records and lists",config:{url:"https://mcp.attio.com/mcp"}},{name:"intercom",icon:"intercom.com",description:"Conversations and support tickets",config:{url:"https://mcp.intercom.com/mcp"}},{name:"fireflies",icon:"fireflies.ai",description:"Meeting transcripts and summaries",config:{url:"https://mcp.fireflies.ai/mcp"}},{name:"stripe",icon:"stripe.com",description:"Payments, invoices, and customers",config:{url:"https://mcp.stripe.com"}},{name:"paypal",icon:"paypal.com",description:"Payments and orders",config:{url:"https://mcp.paypal.com/mcp"}},{name:"square",icon:"squareup.com",description:"Payments, catalog, and orders",config:{url:"https://mcp.squareup.com/mcp"}},{name:"ramp",icon:"ramp.com",description:"Spend, cards, and transactions",config:{url:"https://mcp.ramp.com/mcp"}},{name:"vercel",icon:"vercel.com",description:"Deployments and projects",config:{url:"https://mcp.vercel.com"}},{name:"netlify",icon:"netlify.com",description:"Sites, builds, and deploys",config:{url:"https://mcp.netlify.com/mcp"}},{name:"cloudflare",icon:"cloudflare.com",description:"Workers bindings — D1, R2, KV",config:{url:"https://bindings.mcp.cloudflare.com/mcp"}},{name:"supabase",icon:"supabase.com",description:"Projects, tables, and SQL",config:{url:"https://mcp.supabase.com/mcp"}},{name:"neon",icon:"neon.tech",description:"Postgres branches and queries",config:{url:"https://mcp.neon.tech/mcp"}},{name:"prisma",icon:"prisma.io",description:"Postgres databases and schema",config:{url:"https://mcp.prisma.io/mcp"}},{name:"sentry",icon:"sentry.io",description:"Errors and performance issues",config:{url:"https://mcp.sentry.dev/mcp"}},{name:"grafana",icon:"grafana.com",description:"Dashboards, metrics, and alerts",config:{url:"https://mcp.grafana.com/mcp"}},{name:"semgrep",icon:"semgrep.dev",description:"Scan code for security findings",config:{url:"https://mcp.semgrep.ai/mcp"}},{name:"postman",icon:"postman.com",description:"Collections, environments, and requests",config:{url:"https://mcp.postman.com/mcp"}},{name:"resend",icon:"resend.com",description:"Send email and manage audiences",config:{url:"https://mcp.resend.com/mcp"}},{name:"hugging-face",icon:"huggingface.co",description:"Models, datasets, and Spaces",config:{url:"https://huggingface.co/mcp"}},{name:"apify",icon:"apify.com",description:"Run scrapers and automation actors",config:{url:"https://mcp.apify.com"}},{name:"exa",icon:"exa.ai",description:"Web search for agents",config:{url:"https://mcp.exa.ai/mcp"}},{name:"kagi",icon:"kagi.com",description:"Search, summarize, and answer",config:{url:"https://mcp.kagi.com/mcp"}},{name:"context7",icon:"context7.com",description:"Up-to-date library docs",config:{url:"https://mcp.context7.com/mcp"}},{name:"deepwiki",icon:"deepwiki.com",description:"Ask questions about any GitHub repo",config:{url:"https://mcp.deepwiki.com/mcp"}},{name:"microsoft-learn",icon:"learn.microsoft.com",description:"Microsoft and Azure docs — no account",config:{url:"https://learn.microsoft.com/api/mcp"}},{name:"aws-knowledge",icon:"aws.amazon.com",description:"AWS docs and API references — no account",config:{url:"https://knowledge-mcp.global.api.aws"}},{name:"cloudflare-docs",icon:"developers.cloudflare.com",description:"Cloudflare docs — no account",config:{url:"https://docs.mcp.cloudflare.com/mcp"}},{name:"stack-overflow",icon:"stackoverflow.com",description:"Questions, answers, and teams",config:{url:"https://mcp.stackoverflow.com"}},{name:"playwright",icon:"playwright.dev",description:"Drive a real browser",config:{command:"npx",args:["@playwright/mcp@latest"]}},{name:"chrome-devtools",icon:"developer.chrome.com",description:"Inspect and debug Chrome",config:{command:"npx",args:["chrome-devtools-mcp@latest"]}}];var _=e.i(895836),H=e.i(333999),W=e.i(609856),V=e.i(283653);function G({name:e,onDone:n}){let{data:s,isLoading:r}=(0,V.useServerRoute)(f.queryKey.mcpServer(e)),[o,a]=(0,W.useServerAction)(I,{...ec,onOk:t=>{ec.onOk(t),(0,V.revalidate)(f.queryKey.mcpServer(e))}}),[i,c]=(0,W.useServerAction)(A,{okMessage:"Server deleted",onOk:()=>{n(),(0,V.revalidate)(f.queryKey.mcp)}}),l=async()=>{await k.notify.confirm({title:`Delete ${e}?`,description:"Its connection and saved authorization go with it.",okText:"Delete",destructive:!0})&&i(e)};if(r)return(0,t.jsx)(_.SettingSkeleton,{rows:4});if(!s)return null;let m=s.tools.length,p=L(s.config)?"HTTP":"STDIO";return(0,t.jsxs)(_.SettingDialogContent,{title:s.name,description:(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"shrink-0 rounded-sm bg-muted px-1.5 py-0.5 font-mono text-[10px]",children:p}),(0,t.jsx)("span",{className:"truncate font-mono",children:ed(s.config)})]}),footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(x.Button,{variant:"ghost",loading:c,onClick:l,children:[(0,t.jsx)(u.Trash2,{}),"Delete"]}),(0,t.jsxs)(x.Button,{variant:"outline",loading:a,onClick:()=>o(s.name),children:[(0,t.jsx)(d,{}),"Reconnect"]})]}),children:[s.lastError&&(0,t.jsx)("p",{className:"rounded-lg bg-destructive/10 px-3 py-2 font-mono text-xs text-destructive",children:s.lastError}),(0,t.jsxs)("p",{className:"text-right font-mono text-xs text-muted-foreground",children:[m," ",1===m?"tool":"tools"]}),s.tools.map(e=>(0,t.jsx)(Y,{tool:e,serverName:s.name},e.name))]})}function Q({server:e}){let s=e.toolCount,o=e.lastError?"error":s>0?"connected":"idle";return(0,t.jsxs)("button",{type:"button",onClick:()=>{k.notify.component({className:"sm:max-w-3xl",renderer:({close:n})=>(0,t.jsx)(G,{name:e.name,onDone:n})})},className:"group 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)(X,{server:e})}),(0,t.jsxs)("span",{className:"min-w-0 flex-1 space-y-0.5",children:[(0,t.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,t.jsx)("span",{className:"truncate text-sm font-medium",children:e.name}),"connected"===o&&(0,t.jsx)(n.Check,{className:"size-3 shrink-0 text-muted-foreground"})]}),(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:"error"===o?(0,t.jsx)("span",{className:"text-destructive",children:e.lastError}):(0,t.jsxs)(t.Fragment,{children:[s>0?`${s} ${1===s?"tool":"tools"}`:"No tools yet",(0,t.jsxs)("span",{className:"font-mono text-[11px] text-muted-foreground/70",children:[" · ",ed(e.config)]})]})})]}),(0,t.jsx)(r.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground/60 transition-colors group-hover:text-foreground"})]})}function X({server:e}){let n,s=(n=K.find(t=>L(t.config)?L(e.config)&&t.config.url.replace(/\/+$/,"")===e.config.url.replace(/\/+$/,""):!L(e.config)&&t.config.command===e.config.command&&(t.config.args??[]).join(" ")===(e.config.args??[]).join(" "))??K.find(t=>t.name===e.name),n?.icon);return s?(0,t.jsx)("img",{src:(0,b.faviconUrl)(s),alt:"",className:"size-5"}):(0,t.jsx)(p,{className:"size-4"})}function Y({tool:e,serverName:n}){let[o,a]=(0,g.useState)(!1),[i,c]=(0,g.useState)(!1),[l,d]=(0,g.useState)(!1),m=[["inputSchema",e.inputSchema],["outputSchema",e.outputSchema]].filter(([,e])=>e);return(0,t.jsxs)("div",{className:"rounded-xl border border-border/60 bg-background p-4",children:[(0,t.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,t.jsx)("span",{className:"block truncate font-mono text-sm",children:e.name}),e.description?(0,t.jsx)("p",{className:(0,b.cn)("text-xs text-muted-foreground",!l&&"line-clamp-2",e.description.length>140&&"cursor-pointer"),onClick:()=>d(!l),children:e.description}):null]}),(0,t.jsxs)("div",{className:"mt-2 flex justify-end gap-1",children:[m.length>0&&(0,t.jsxs)(x.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>a(!o),children:[o?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(r.ChevronRight,{}),"Schema"]}),(0,t.jsxs)(x.Button,{size:"xs",variant:"ghost",className:"font-mono",onClick:()=>c(!i),children:[i?(0,t.jsx)(s.ChevronDown,{}):(0,t.jsx)(r.ChevronRight,{}),"Test"]})]}),o?(0,t.jsx)("div",{className:"mt-2 space-y-3 overflow-x-auto rounded-lg border border-input p-3",children:m.map(([e,n])=>(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("span",{className:"block font-mono text-xs text-muted-foreground",children:"inputSchema"===e?"in":"out"}),(0,t.jsx)("pre",{className:"font-mono text-xs leading-relaxed whitespace-pre",children:function e(t,n=0){if(!t||"object"!=typeof t)return"unknown";let s=" ".repeat(n+1),r=" ".repeat(n);if(Array.isArray(t.enum))return t.enum.map(e=>JSON.stringify(e)).join(" | ");let o=t.anyOf??t.oneOf;if(Array.isArray(o))return o.map(t=>e(t,n)).join(" | ");if("array"===t.type){let s=e(t.items,n);return/[|{]/.test(s)?`(${s})[]`:`${s}[]`}if("object"===t.type||t.properties){let o=t.properties;if(!o||0===Object.keys(o).length)return"{}";let a=t.required??[],i=Object.entries(o).map(([t,r])=>{let o=a.includes(t)?"":"?",i=r?.description,c="string"==typeof i&&i.length<=60?` // ${i}`:"";return`${s}${t}${o}: ${e(r,n+1)}${c}`});return`{
|
|
2
2
|
${i.join("\n")}
|
|
3
|
-
${r}}`}return Array.isArray(t.type)?t.type.join(" | "):"string"==typeof t.type?t.type:"unknown"}(n)})]},e))}):null,i?(0,t.jsx)(Z,{tool:e,serverName:n}):null]})}function Z({tool:e,serverName:n}){let[s,r]=(0,g.useState)(()=>(function(e){let t=e.inputSchema?.properties;if(!t||"object"!=typeof t)return"{}";let n={};for(let[e,s]of Object.entries(t))n[e]=s?.type==="number"||s?.type==="integer"?0:s?.type!=="boolean"&&(s?.type==="array"?[]:s?.type==="object"?{}:"");return JSON.stringify(n,null,2)})(e)),[o,a]=(0,g.useState)(""),[c,l,d,m,p]=(0,W.useServerAction)(T,{errorMessage:!1});return(0,t.jsxs)("div",{className:"mt-2 space-y-2 rounded-lg border border-input p-3",children:[(0,t.jsx)(w.Textarea,{value:s,onChange:e=>r(e.target.value),spellCheck:!1,className:"min-h-24 resize-none font-mono text-xs"}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-xs text-destructive",children:o||m}),(0,t.jsxs)(x.Button,{size:"sm",loading:l,onClick:()=>{let t;try{t=s.trim()?JSON.parse(s):void 0}catch{a("Not valid JSON");return}a(""),p(),c(n,e.name,t)},children:[!l&&(0,t.jsx)(i,{}),"Run"]})]}),void 0!==d&&(0,t.jsx)("div",{className:"overflow-x-auto rounded-lg bg-muted/40 p-3",children:(0,t.jsx)(
|
|
3
|
+
${r}}`}return Array.isArray(t.type)?t.type.join(" | "):"string"==typeof t.type?t.type:"unknown"}(n)})]},e))}):null,i?(0,t.jsx)(Z,{tool:e,serverName:n}):null]})}function Z({tool:e,serverName:n}){let[s,r]=(0,g.useState)(()=>(function(e){let t=e.inputSchema?.properties;if(!t||"object"!=typeof t)return"{}";let n={};for(let[e,s]of Object.entries(t))n[e]=s?.type==="number"||s?.type==="integer"?0:s?.type!=="boolean"&&(s?.type==="array"?[]:s?.type==="object"?{}:"");return JSON.stringify(n,null,2)})(e)),[o,a]=(0,g.useState)(""),[c,l,d,m,p]=(0,W.useServerAction)(T,{errorMessage:!1});return(0,t.jsxs)("div",{className:"mt-2 space-y-2 rounded-lg border border-input p-3",children:[(0,t.jsx)(w.Textarea,{value:s,onChange:e=>r(e.target.value),spellCheck:!1,className:"min-h-24 resize-none font-mono text-xs"}),(0,t.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,t.jsx)("span",{className:"font-mono text-xs text-destructive",children:o||m}),(0,t.jsxs)(x.Button,{size:"sm",loading:l,onClick:()=>{let t;try{t=s.trim()?JSON.parse(s):void 0}catch{a("Not valid JSON");return}a(""),p(),c(n,e.name,t)},children:[!l&&(0,t.jsx)(i,{}),"Run"]})]}),void 0!==d&&(0,t.jsx)("div",{className:"overflow-x-auto rounded-lg bg-muted/40 p-3",children:(0,t.jsx)(y,{data:d,initialExpandDepth:3})})]})}function ee(e){return k.notify.component({className:"sm:max-w-lg",renderer:({close:n})=>(0,t.jsx)(et,{initial:e,onDone:n})})}function et({initial:e,onDone:n}){let s=e&&L(e.config)?e.config:void 0,r=e&&!L(e.config)?e.config:void 0,[o,a]=(0,H.useObjectState)({mode:r?"stdio":"http",name:e?.name??"",url:s?.url??"",headers:er(s?.headers),clientId:s?.oauthClient?.clientId??"",clientSecret:s?.oauthClient?.clientSecret??"",command:r?.command??"",args:(r?.args??[]).join(" "),env:er(r?.env),raw:""}),{mode:i,name:c,url:l,headers:d,clientId:m,clientSecret:p,command:u,args:h,env:f,raw:b}=o,[y,N]=(0,W.useServerAction)(P,{...ec,onOk:e=>{ec.onOk(e),"error"!==e.status&&n()}}),k=(0,g.useMemo)(()=>{var e,t,n,s,r,o,a;let c,g;return"json"===i?function(e){let t,n=e.trim();if(!n)return{value:null,error:""};try{t=JSON.parse(n)}catch{return{value:null,error:"Not valid JSON"}}let s=D.safeParse(t);if(s.success)return{value:{name:null,config:s.data},error:""};let r=U.safeParse(t);if(!r.success)return{value:null,error:"Needs a url or a command"};let o=Object.entries("mcpServers"in r.data?r.data.mcpServers:r.data)[0];return o?{value:{name:o[0],config:o[1]},error:""}:{value:null,error:"No server in there"}}(b):"http"===i?(e=l,t=d,n=m,s=p,(c=M.safeParse({url:e.trim(),headers:eo(t),oauthClient:n.trim()?{clientId:n.trim(),clientSecret:s.trim()}:void 0})).success?{value:{name:null,config:c.data},error:""}:{value:null,error:e.trim()?"Needs a valid url":""}):(r=u,o=h,a=f,(g=R.safeParse({command:r.trim(),args:o.split(/\s+/).filter(Boolean),env:eo(a)})).success?{value:{name:null,config:g.data},error:""}:{value:null,error:r.trim()?"Needs a command":""})},[i,b,l,d,m,p,u,h,f]),z="json"===i?b:JSON.stringify([i,l,d,m,p,u,h,f]),[O,T]=(0,g.useState)(z);(0,g.useEffect)(()=>{let e=setTimeout(()=>T(z),700);return()=>clearTimeout(e)},[z]);let A=O===z?k.error:"",I=c||k.value?.name||"",F=J.safeParse({name:I,config:k.value?.config});function $(e){let t=k.value?.config;return t?"json"===e?a({mode:e,raw:JSON.stringify(t,null,2)}):"http"===e&&L(t)?a({mode:e,url:t.url,headers:er(t.headers),clientId:t.oauthClient?.clientId??"",clientSecret:t.oauthClient?.clientSecret??""}):"stdio"!==e||L(t)?void a({mode:e}):a({mode:e,command:t.command,args:(t.args??[]).join(" "),env:er(t.env)}):a({mode:e})}let E=(0,t.jsxs)("span",{className:"flex items-center gap-2 font-mono text-xs text-muted-foreground",children:["JSON",(0,t.jsx)(S.Switch,{size:"sm",checked:"json"===i,onCheckedChange:e=>{let t;return e?$("json"):void $((t=k.value?.config)&&!L(t)?"stdio":"http")}})]});return(0,t.jsx)(_.SettingDialogContent,{title:"Add MCP server",description:"Its tools become available to Thursday and every sub-agent.",footer:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(x.Button,{variant:"ghost",onClick:n,children:"Cancel"}),(0,t.jsx)(x.Button,{disabled:!F.success,loading:N,onClick:()=>{F.success&&!N&&y(F.data)},children:"Connect"})]}),children:(0,t.jsxs)("div",{className:"space-y-6",children:[(0,t.jsxs)(v.Field,{children:[(0,t.jsx)(v.FieldLabel,{children:"Name"}),(0,t.jsx)(j.Input,{value:I,onChange:e=>a({name:e.target.value}),placeholder:"notion",spellCheck:!1})]}),"json"===i?(0,t.jsxs)(v.Field,{children:[(0,t.jsxs)("div",{className:"flex min-h-6 items-center justify-between gap-2",children:[(0,t.jsx)(v.FieldLabel,{children:"JSON"}),E]}),(0,t.jsx)(w.Textarea,{value:b,onChange:e=>a({raw:e.target.value}),spellCheck:!1,placeholder:ea,className:"min-h-64 resize-none font-mono text-xs"})]}):(0,t.jsxs)(C.Tabs,{value:i,onValueChange:e=>$(e),className:"gap-6",children:[(0,t.jsxs)(v.Field,{children:[(0,t.jsxs)("div",{className:"flex min-h-6 items-center justify-between gap-2",children:[(0,t.jsx)(v.FieldLabel,{children:"Transport"}),E]}),(0,t.jsxs)(C.TabsList,{className:"w-full",children:[(0,t.jsx)(C.TabsTrigger,{value:"http",children:"HTTP"}),(0,t.jsx)(C.TabsTrigger,{value:"stdio",children:"STDIO"})]})]}),(0,t.jsxs)(C.TabsContent,{value:"http",className:"space-y-6",children:[(0,t.jsxs)(v.Field,{children:[(0,t.jsx)(v.FieldLabel,{children:"URL"}),(0,t.jsx)(j.Input,{value:l,onChange:e=>a({url:e.target.value}),placeholder:"https://mcp.notion.com/mcp",spellCheck:!1,className:"font-mono text-xs"})]}),(0,t.jsx)(en,{label:"Headers",pairs:d,onChange:e=>a({headers:e}),keyPlaceholder:"Authorization",valuePlaceholder:"Bearer sk-..."}),(0,t.jsxs)(v.Field,{children:[(0,t.jsx)(v.FieldLabel,{children:"OAuth client"}),(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(j.Input,{value:m,onChange:e=>a({clientId:e.target.value}),placeholder:"Client ID",spellCheck:!1,className:"font-mono text-xs"}),(0,t.jsx)(j.Input,{value:p,onChange:e=>a({clientSecret:e.target.value}),placeholder:"Client secret",spellCheck:!1,type:"password",className:"font-mono text-xs"})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"Only for servers that refuse to register clients on their own, like Figma. Leave empty and one is created during sign-in."})]})]}),(0,t.jsxs)(C.TabsContent,{value:"stdio",className:"space-y-6",children:[(0,t.jsxs)(v.Field,{children:[(0,t.jsx)(v.FieldLabel,{children:"Command"}),(0,t.jsx)(j.Input,{value:u,onChange:e=>a({command:e.target.value}),placeholder:"npx",spellCheck:!1,className:"font-mono text-xs"})]}),(0,t.jsxs)(v.Field,{children:[(0,t.jsx)(v.FieldLabel,{children:"Args"}),(0,t.jsx)(j.Input,{value:h,onChange:e=>a({args:e.target.value}),placeholder:"-y @notionhq/notion-mcp-server",spellCheck:!1,className:"font-mono text-xs"})]}),(0,t.jsx)(en,{label:"Env",pairs:f,onChange:e=>a({env:e}),keyPlaceholder:"NOTION_TOKEN",valuePlaceholder:"ntn_..."})]})]}),A&&(0,t.jsx)("p",{className:"font-mono text-xs text-destructive",children:A})]})})}function en({label:e,pairs:n,onChange:s,keyPlaceholder:r,valuePlaceholder:o}){let a=(e,t)=>s(n.map(n=>n.id===e?{...n,...t}:n));return(0,t.jsxs)(v.Field,{children:[(0,t.jsx)(v.FieldLabel,{children:e}),(0,t.jsxs)("div",{className:"space-y-2",children:[n.map(e=>(0,t.jsxs)("div",{className:"flex gap-2",children:[(0,t.jsx)(j.Input,{value:e.key,onChange:t=>a(e.id,{key:t.target.value}),placeholder:r,spellCheck:!1,className:"font-mono text-xs"}),(0,t.jsx)(j.Input,{value:e.value,onChange:t=>a(e.id,{value:t.target.value}),placeholder:o,spellCheck:!1,className:"font-mono text-xs"}),(0,t.jsx)(x.Button,{variant:"ghost",size:"icon",onClick:()=>s(n.filter(t=>t.id!==e.id)),children:(0,t.jsx)(h.X,{})})]},e.id)),(0,t.jsxs)(x.Button,{variant:"outline",size:"sm",onClick:()=>s([...n,es()]),children:[(0,t.jsx)(c.Plus,{}),"Add"]})]})]})}let es=(e="",t="")=>({id:crypto.randomUUID(),key:e,value:t}),er=e=>Object.entries(e??{}).map(([e,t])=>es(e,t)),eo=e=>{let t=e.filter(e=>e.key.trim());if(t.length)return Object.fromEntries(t.map(e=>[e.key.trim(),e.value]))},ea=`/** STDIO Example */
|
|
4
4
|
{
|
|
5
5
|
"command": "node",
|
|
6
6
|
"args": ["index.js"],
|
|
@@ -15,4 +15,4 @@ ${r}}`}return Array.isArray(t.type)?t.type.join(" | "):"string"==typeof t.type?t
|
|
|
15
15
|
"headers": {
|
|
16
16
|
"Authorization": "Bearer sk-..."
|
|
17
17
|
}
|
|
18
|
-
}`;function ei(e){if("auth_required"===e.status&&e.authorizationUrl){let t=window.open(e.authorizationUrl,"thursday-oauth","popup,width=520,height=720");z.toast.add({title:`${e.name} needs authorization`,description:"Approve access in the window that just opened"});let n=Date.now()+3e5,s=setInterval(()=>{let e=!t||t.closed;!(!e&&Date.now()<n)&&(clearInterval(s),e&&(0,V.revalidate)(f.queryKey.mcp))},700);return}"error"===e.status?z.toast.add({type:"error",title:`${e.name} could not connect`,description:e.error}):z.toast.add({type:"success",title:`${e.name} connected`,description:`${e.toolCount} ${1===e.toolCount?"tool":"tools"} available`})}let ec={onOk:e=>{(0,V.revalidate)(f.queryKey.mcp),ei(e)}};function el({filter:e,onFilter:n,onPreset:s}){let r=e.trim().toLowerCase(),o=K.filter(e=>!r||`${e.name} ${e.description}`.toLowerCase().includes(r));return(0,t.jsx)(_.SettingGroup,{label:"Presets",filter:(0,t.jsx)(_.SettingFilter,{value:e,onChange:n,placeholder:"Filter presets",className:"w-56"}),right:r?`${o.length} of ${K.length}`:void 0,children:(0,t.jsx)("div",{className:"grid grid-cols-[repeat(4,minmax(0,1fr))] gap-3",children:o.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>s(e),className:"group relative flex flex-col gap-2 rounded-xl border border-border/60 p-3 text-left text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(c.Plus,{className:"absolute top-3 right-3 size-3.5 shrink-0 text-muted-foreground/50 group-hover:text-foreground"}),(0,t.jsx)("span",{className:"grid size-6 shrink-0 place-items-center rounded-md bg-muted text-muted-foreground",children:e.icon?(0,t.jsx)("img",{src:(0,
|
|
18
|
+
}`;function ei(e){if("auth_required"===e.status&&e.authorizationUrl){let t=window.open(e.authorizationUrl,"thursday-oauth","popup,width=520,height=720");z.toast.add({title:`${e.name} needs authorization`,description:"Approve access in the window that just opened"});let n=Date.now()+3e5,s=setInterval(()=>{let e=!t||t.closed;!(!e&&Date.now()<n)&&(clearInterval(s),e&&(0,V.revalidate)(f.queryKey.mcp))},700);return}"error"===e.status?z.toast.add({type:"error",title:`${e.name} could not connect`,description:e.error}):z.toast.add({type:"success",title:`${e.name} connected`,description:`${e.toolCount} ${1===e.toolCount?"tool":"tools"} available`})}let ec={onOk:e=>{(0,V.revalidate)(f.queryKey.mcp),ei(e)}};function el({filter:e,onFilter:n,onPreset:s}){let r=e.trim().toLowerCase(),o=K.filter(e=>!r||`${e.name} ${e.description}`.toLowerCase().includes(r));return(0,t.jsx)(_.SettingGroup,{label:"Presets",filter:(0,t.jsx)(_.SettingFilter,{value:e,onChange:n,placeholder:"Filter presets",className:"w-56"}),right:r?`${o.length} of ${K.length}`:void 0,children:(0,t.jsx)("div",{className:"grid grid-cols-[repeat(4,minmax(0,1fr))] gap-3",children:o.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>s(e),className:"group relative flex flex-col gap-2 rounded-xl border border-border/60 p-3 text-left text-muted-foreground outline-none transition-colors hover:bg-accent hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",children:[(0,t.jsx)(c.Plus,{className:"absolute top-3 right-3 size-3.5 shrink-0 text-muted-foreground/50 group-hover:text-foreground"}),(0,t.jsx)("span",{className:"grid size-6 shrink-0 place-items-center rounded-md bg-muted text-muted-foreground",children:e.icon?(0,t.jsx)("img",{src:(0,b.faviconUrl)(e.icon),alt:"",className:"size-4"}):(0,t.jsx)(p,{className:"size-3.5"})}),(0,t.jsxs)("span",{className:"min-w-0",children:[(0,t.jsx)("span",{className:"block truncate font-mono text-xs font-semibold",children:e.name}),(0,t.jsx)("span",{className:"block truncate text-xs",children:e.description})]})]},e.name))})})}function ed(e){return L(e)?e.url:[e.command,...e.args??[]].join(" ")}e.s(["CONNECT_OPTIONS",0,ec,"McpSetting",0,function(){let[e,n]=(0,g.useState)(""),{data:s=[],isLoading:r,error:o}=(0,V.useServerRoute)(f.queryKey.mcp);if(r)return(0,t.jsx)(_.SettingSkeleton,{rows:3});if(o)return(0,t.jsx)(_.SettingError,{message:o.message});let a=s.reduce((e,t)=>e+t.toolCount,0),i=s.filter(e=>e.lastError).length;return(0,t.jsxs)(_.SettingScreen,{footer:(0,t.jsx)(_.SettingRailNote,{children:0===s.length?"Nothing connected yet — a preset is the shortest way in":(0,t.jsxs)(t.Fragment,{children:[s.length," connected · ",a," tools",i>0&&` \xb7 ${i} failed`]})}),children:[(0,t.jsx)(_.SettingGroup,{label:"Connected",children:(0,t.jsx)(_.SettingItems,{addRow:{label:"Add server",onClick:()=>ee()},children:s.map(e=>(0,t.jsx)(Q,{server:e},e.name))})}),(0,t.jsx)(el,{filter:e,onFilter:n,onPreset:ee})]})},"openMcpRegister",0,ee,"reportConnect",0,ei],787800)},333999,e=>{"use strict";var t=e.i(271645),n=e.i(647163);e.s(["useObjectState",0,e=>{let[s,r]=(0,t.useState)(e);return[s,(0,t.useMemo)(()=>{let e=e=>{r(t=>{let s=(0,n.isFunction)(e)?e(t):e;return Object.keys(s).some(e=>!Object.is(t[e],s[e]))?{...t,...s}:t})},t=new Map;return new Proxy(e,{get(s,r,o){if("symbol"==typeof r)return Reflect.get(s,r,o);let a=t.get(r);return a||(a=t=>{e(e=>({[r]:(0,n.isFunction)(t)?t(e[r]):t}))},t.set(r,a)),a}})},[])]}])},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)}]);
|