cursor-local-remote 0.1.7 → 0.1.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/app-build-manifest.json +28 -21
- package/.next/app-path-routes-manifest.json +7 -6
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +20 -20
- package/.next/required-server-files.json +1 -2
- package/.next/routes-manifest.json +1 -1
- package/.next/server/app/_not-found/page.js +11 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +11 -1
- package/.next/server/app/_not-found.rsc +14 -15
- package/.next/server/app/api/chat/route.js +3 -9
- package/.next/server/app/api/chat/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/git/route.js +6 -0
- package/.next/server/app/api/git/route.js.nft.json +1 -0
- package/.next/server/app/api/git/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/info/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/models/route.js +3 -9
- package/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/projects/route.js +15 -0
- package/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/.next/server/app/api/projects/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/sessions/active/route.js +1 -1
- package/.next/server/app/api/sessions/active/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/history/route.js +1 -1
- package/.next/server/app/api/sessions/history/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/route.js +3 -9
- package/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/sessions/watch/route.js +2 -2
- package/.next/server/app/api/sessions/watch/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/settings/route.js +3 -9
- package/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/.next/server/app/api/upload/route.js +1 -0
- package/.next/server/app/api/upload/route.js.nft.json +1 -0
- package/.next/server/app/api/upload/route_client-reference-manifest.js +1 -0
- package/.next/server/app/index.html +11 -1
- package/.next/server/app/index.rsc +16 -17
- package/.next/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next/server/app/page.js +13 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +7 -6
- package/.next/server/chunks/819.js +1 -0
- package/.next/server/instrumentation.js +1 -1
- package/.next/server/instrumentation.js.nft.json +1 -1
- package/.next/server/middleware-manifest.json +1 -1
- package/.next/server/pages/404.html +11 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/src/middleware.js +1 -1
- package/.next/static/cH5h87qDQAGoVaAIw15pq/_buildManifest.js +1 -0
- package/.next/static/chunks/app/api/chat/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/api/git/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/api/info/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/api/models/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/api/projects/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/api/sessions/active/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/api/sessions/history/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/api/sessions/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/api/sessions/watch/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/api/settings/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/api/upload/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/layout-c1b1bf5b5f175921.js +1 -0
- package/.next/static/chunks/app/manifest.webmanifest/route-4be467a4132150d7.js +1 -0
- package/.next/static/chunks/app/page-cd57aa6c99572600.js +1 -0
- package/.next/static/css/7a31a6ac831a221c.css +1 -0
- package/README.md +18 -25
- package/bin/dev.mjs +98 -0
- package/next.config.mjs +3 -3
- package/package.json +3 -4
- package/public/sw.js +2 -63
- package/.next/server/app/api/push/subscribe/route.js +0 -21
- package/.next/server/app/api/push/subscribe/route.js.nft.json +0 -1
- package/.next/server/app/api/push/subscribe/route_client-reference-manifest.js +0 -1
- package/.next/server/app/api/push/vapid-key/route.js +0 -21
- package/.next/server/app/api/push/vapid-key/route.js.nft.json +0 -1
- package/.next/server/app/api/push/vapid-key/route_client-reference-manifest.js +0 -1
- package/.next/server/chunks/369.js +0 -21
- package/.next/server/chunks/407.js +0 -1
- package/.next/server/chunks/519.js +0 -21
- package/.next/server/chunks/848.js +0 -1
- package/.next/static/FopTfwgkaVjrbw4A5Ol85/_buildManifest.js +0 -1
- package/.next/static/chunks/app/api/chat/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/api/info/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/api/models/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/api/push/subscribe/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/api/push/vapid-key/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/api/sessions/active/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/api/sessions/history/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/api/sessions/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/api/sessions/watch/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/api/settings/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/layout-168baea1ba298a10.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-0de2bc720406b0f8.js +0 -1
- package/.next/static/chunks/app/page-df671bcff0abba4f.js +0 -1
- package/.next/static/css/e600fbf434173a2f.css +0 -1
- /package/.next/static/{FopTfwgkaVjrbw4A5Ol85 → cH5h87qDQAGoVaAIw15pq}/_ssgManifest.js +0 -0
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
(()=>{var a={};a.id=243,a.ids=[243],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1181:a=>{"use strict";a.exports=require("web-push")},2607:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{DELETE:()=>y,POST:()=>x,dynamic:()=>w});var e=c(5736),f=c(9117),g=c(4044),h=c(9326),i=c(2324),j=c(261),k=c(4290),l=c(5328),m=c(8928),n=c(6595),o=c(3421),p=c(7679),q=c(1681),r=c(3446),s=c(6439),t=c(1356),u=c(6806),v=c(7093);let w="force-dynamic";async function x(a){let b=await (0,v.Y2)(a);return b instanceof Response?b:b.endpoint&&"string"==typeof b.endpoint?(await (0,u.$3)(b),Response.json({ok:!0})):(0,v.li)("invalid push subscription: missing endpoint")}async function y(a){let b=await (0,v.Y2)(a);return b instanceof Response?b:b.endpoint&&"string"==typeof b.endpoint?(await (0,u.ig)(b.endpoint),Response.json({ok:!0})):(0,v.li)("endpoint is required")}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/push/subscribe/route",pathname:"/api/push/subscribe",filename:"route",bundlePath:"app/api/push/subscribe/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/jonmakinen/Documents/cursor-local-remote/src/app/api/push/subscribe/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){var d;let e="/api/push/subscribe/route";"/index"===e&&(e="/");let g=await z.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:x,prerenderManifest:y,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D}=g,E=(0,j.normalizeAppPath)(e),F=!!(y.dynamicRoutes[E]||y.routes[D]);if(F&&!x){let a=!!y.routes[D],b=y.dynamicRoutes[E];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let G=null;!F||z.isDev||x||(G="/index"===(G=D)?"/":G);let H=!0===z.isDev||!F,I=F&&!H,J=a.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),M={params:v,prerenderManifest:y,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:H,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:I,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>z.onRequestError(a,b,d,A)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>z.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=K.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${J} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${J} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!F)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:B})},A),b}},l=await z.handleResponse({req:a,nextConfig:w,cacheKey:G,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:y,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:k,waitUntil:c.waitUntil});if(!F)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",B?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),x&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&F||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};L?await g(L):await K.withPropagatedContext(a.headers,()=>K.trace(m.BaseServerSpan.handleRequest,{spanName:`${J} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:B})}),F)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}},3033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3421:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(1237),e=c(5088),f=c(7679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},4870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},5736:(a,b,c)=>{"use strict";a.exports=c(4870)},6293:a=>{"use strict";a.exports=require("sql.js")},6439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},6487:()=>{},6492:(a,b,c)=>{"use strict";c.d(b,{GW:()=>s,Lf:()=>n,ME:()=>t,Nk:()=>v,ag:()=>w,ih:()=>r,zj:()=>u});var d=c(6293),e=c.n(d),f=c(9902),g=c(9439),h=c(9021);let i=(0,f.join)((0,g.homedir)(),".cursor-local-remote"),j=(0,f.join)(i,"sessions.db"),k=null,l=null;function m(){k&&(0,h.writeFileSync)(j,Buffer.from(k.export()))}async function n(){if(k)return k;let{Database:a}=await (!l&&(l=e()()),l);return(0,h.mkdirSync)(i,{recursive:!0}),(k=(0,h.existsSync)(j)?new a((0,h.readFileSync)(j)):new a).run(`
|
|
2
|
-
CREATE TABLE IF NOT EXISTS sessions (
|
|
3
|
-
id TEXT PRIMARY KEY,
|
|
4
|
-
title TEXT NOT NULL,
|
|
5
|
-
workspace TEXT NOT NULL,
|
|
6
|
-
preview TEXT NOT NULL DEFAULT '',
|
|
7
|
-
created_at INTEGER NOT NULL,
|
|
8
|
-
updated_at INTEGER NOT NULL
|
|
9
|
-
)
|
|
10
|
-
`),k.run(`
|
|
11
|
-
CREATE TABLE IF NOT EXISTS config (
|
|
12
|
-
key TEXT PRIMARY KEY,
|
|
13
|
-
value TEXT NOT NULL
|
|
14
|
-
)
|
|
15
|
-
`),k.run(`
|
|
16
|
-
CREATE TABLE IF NOT EXISTS push_subscriptions (
|
|
17
|
-
endpoint TEXT PRIMARY KEY,
|
|
18
|
-
subscription TEXT NOT NULL,
|
|
19
|
-
created_at INTEGER NOT NULL
|
|
20
|
-
)
|
|
21
|
-
`),m(),k}function o(a,b,c){let d=a.prepare(b);try{if(d.bind(c),d.step())return d.getAsObject();return}finally{d.free()}}function p(a,b,c=[]){let d=a.prepare(b);try{d.bind(c);let a=[];for(;d.step();)a.push(d.getAsObject());return a}finally{d.free()}}function q(a){return{id:a.id,title:a.title,workspace:a.workspace,preview:a.preview,createdAt:a.created_at,updatedAt:a.updated_at}}async function r(a,b,c){let d=await n(),e=Date.now(),f=o(d,"SELECT * FROM sessions WHERE id = ?",[a]);if(f){let b=c?c.slice(0,120):f.preview;return d.run("UPDATE sessions SET updated_at = ?, preview = ? WHERE id = ?",[e,b,a]),m(),q({...f,updated_at:e,preview:b})}let g=c.slice(0,60)||"New session",h=c.slice(0,120);return d.run("INSERT INTO sessions (id, title, workspace, preview, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?)",[a,g,b,h,e,e]),m(),{id:a,title:g,workspace:b,preview:h,createdAt:e,updatedAt:e}}async function s(a){let b=await n();return(a?p(b,"SELECT * FROM sessions WHERE workspace = ? ORDER BY updated_at DESC",[a]):p(b,"SELECT * FROM sessions ORDER BY updated_at DESC")).map(q)}async function t(a){(await n()).run("DELETE FROM sessions WHERE id = ?",[a]),m()}async function u(a){let b=o(await n(),"SELECT value FROM config WHERE key = ?",[a]);return b?.value}async function v(a,b){(await n()).run("INSERT OR REPLACE INTO config (key, value) VALUES (?, ?)",[a,b]),m()}async function w(){let a=p(await n(),"SELECT key, value FROM config WHERE key NOT LIKE 'vapid%'"),b={};for(let c of a)b[c.key]=c.value;return b}},6806:(a,b,c)=>{"use strict";c.d(b,{$3:()=>k,HR:()=>j,ig:()=>l});var d=c(1181),e=c.n(d),f=c(6492);async function g(){let a=await (0,f.Lf)(),b=function(a,b,c){let d=a.prepare(b);try{if(d.bind(c),d.step())return d.getAsObject().value;return}finally{d.free()}}(a,"SELECT value FROM config WHERE key = ?",["vapid_keys"]);if(b)return JSON.parse(b);let c=e().generateVAPIDKeys(),d={publicKey:c.publicKey,privateKey:c.privateKey};return a.run("INSERT INTO config (key, value) VALUES (?, ?)",["vapid_keys",JSON.stringify(d)]),d}let h=!1;async function i(){let a=await g();return h||(e().setVapidDetails("mailto:clr@localhost",a.publicKey,a.privateKey),h=!0),a}async function j(){return(await i()).publicKey}async function k(a){(await (0,f.Lf)()).run("INSERT OR REPLACE INTO push_subscriptions (endpoint, subscription, created_at) VALUES (?, ?, ?)",[a.endpoint,JSON.stringify(a),Date.now()])}async function l(a){(await (0,f.Lf)()).run("DELETE FROM push_subscriptions WHERE endpoint = ?",[a])}},7093:(a,b,c)=>{"use strict";function d(a,b){return Response.json({error:a},{status:b})}function e(a){return d(a,400)}function f(a){return d(a,404)}function g(a="Internal server error"){return d(a,500)}function h(a,b){return a instanceof Error&&console.error(a),b}async function i(a){try{return await a.json()}catch{return e("Invalid JSON body")}}c.d(b,{Jo:()=>h,Y2:()=>i,ig:()=>g,li:()=>e,mX:()=>f})},8335:()=>{},9021:a=>{"use strict";a.exports=require("fs")},9294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9439:a=>{"use strict";a.exports=require("os")},9902:a=>{"use strict";a.exports=require("path")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[873],()=>b(b.s=2607));module.exports=c})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../node_modules/agent-base/dist/helpers.js","../../../../../../node_modules/agent-base/dist/index.js","../../../../../../node_modules/agent-base/package.json","../../../../../../node_modules/asn1.js/lib/asn1.js","../../../../../../node_modules/asn1.js/lib/asn1/api.js","../../../../../../node_modules/asn1.js/lib/asn1/base/buffer.js","../../../../../../node_modules/asn1.js/lib/asn1/base/index.js","../../../../../../node_modules/asn1.js/lib/asn1/base/node.js","../../../../../../node_modules/asn1.js/lib/asn1/base/reporter.js","../../../../../../node_modules/asn1.js/lib/asn1/constants/der.js","../../../../../../node_modules/asn1.js/lib/asn1/constants/index.js","../../../../../../node_modules/asn1.js/lib/asn1/decoders/der.js","../../../../../../node_modules/asn1.js/lib/asn1/decoders/index.js","../../../../../../node_modules/asn1.js/lib/asn1/decoders/pem.js","../../../../../../node_modules/asn1.js/lib/asn1/encoders/der.js","../../../../../../node_modules/asn1.js/lib/asn1/encoders/index.js","../../../../../../node_modules/asn1.js/lib/asn1/encoders/pem.js","../../../../../../node_modules/asn1.js/package.json","../../../../../../node_modules/bn.js/lib/bn.js","../../../../../../node_modules/bn.js/package.json","../../../../../../node_modules/buffer-equal-constant-time/index.js","../../../../../../node_modules/buffer-equal-constant-time/package.json","../../../../../../node_modules/debug/package.json","../../../../../../node_modules/debug/src/browser.js","../../../../../../node_modules/debug/src/common.js","../../../../../../node_modules/debug/src/index.js","../../../../../../node_modules/debug/src/node.js","../../../../../../node_modules/ecdsa-sig-formatter/package.json","../../../../../../node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js","../../../../../../node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js","../../../../../../node_modules/has-flag/index.js","../../../../../../node_modules/has-flag/package.json","../../../../../../node_modules/http_ece/ece.js","../../../../../../node_modules/http_ece/package.json","../../../../../../node_modules/https-proxy-agent/dist/index.js","../../../../../../node_modules/https-proxy-agent/dist/parse-proxy-response.js","../../../../../../node_modules/https-proxy-agent/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/jwa/index.js","../../../../../../node_modules/jwa/package.json","../../../../../../node_modules/jws/index.js","../../../../../../node_modules/jws/lib/data-stream.js","../../../../../../node_modules/jws/lib/sign-stream.js","../../../../../../node_modules/jws/lib/tostring.js","../../../../../../node_modules/jws/lib/verify-stream.js","../../../../../../node_modules/jws/package.json","../../../../../../node_modules/minimalistic-assert/index.js","../../../../../../node_modules/minimalistic-assert/package.json","../../../../../../node_modules/ms/index.js","../../../../../../node_modules/ms/package.json","../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/safer-buffer/package.json","../../../../../../node_modules/safer-buffer/safer.js","../../../../../../node_modules/sql.js/dist/sql-wasm.js","../../../../../../node_modules/sql.js/package.json","../../../../../../node_modules/supports-color/index.js","../../../../../../node_modules/supports-color/package.json","../../../../../../node_modules/web-push/package.json","../../../../../../node_modules/web-push/src/encryption-helper.js","../../../../../../node_modules/web-push/src/index.js","../../../../../../node_modules/web-push/src/urlsafe-base64-helper.js","../../../../../../node_modules/web-push/src/vapid-helper.js","../../../../../../node_modules/web-push/src/web-push-constants.js","../../../../../../node_modules/web-push/src/web-push-error.js","../../../../../../node_modules/web-push/src/web-push-lib.js","../../../../../../package.json","../../../../../package.json","../../../../chunks/873.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/push/subscribe/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"622":{"*":{"id":"2146","name":"*","chunks":[],"async":false}},"759":{"*":{"id":"3813","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"1603","name":"*","chunks":[],"async":false}},"2317":{"*":{"id":"1139","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"5170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"2263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"8922","name":"*","chunks":[],"async":false}},"5932":{"*":{"id":"7996","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"4160","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"8495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"9234","name":"*","chunks":[],"async":false}},"9365":{"*":{"id":"9106","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"7526","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/src/app/globals.css":{"id":3673,"name":"*","chunks":["558","static/chunks/app/layout-168baea1ba298a10.js"],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/src/components/pwa-install.tsx":{"id":2317,"name":"*","chunks":["558","static/chunks/app/layout-168baea1ba298a10.js"],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/src/components/sw-register.tsx":{"id":759,"name":"*","chunks":["558","static/chunks/app/layout-168baea1ba298a10.js"],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/src/components/chat-workspace.tsx":{"id":9365,"name":"*","chunks":["391","static/chunks/391-727d95bcfba987c2.js","593","static/chunks/app/page-df671bcff0abba4f.js"],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/src/components/error-boundary.tsx":{"id":5932,"name":"*","chunks":["391","static/chunks/391-727d95bcfba987c2.js","593","static/chunks/app/page-df671bcff0abba4f.js"],"async":false}},"entryCSSFiles":{"/Users/jonmakinen/Documents/cursor-local-remote/src/":[],"/Users/jonmakinen/Documents/cursor-local-remote/src/app/layout":[{"inlined":false,"path":"static/css/e600fbf434173a2f.css"}],"/Users/jonmakinen/Documents/cursor-local-remote/src/app/page":[{"inlined":false,"path":"static/css/5eacd01f773eed7f.css"}],"/Users/jonmakinen/Documents/cursor-local-remote/src/app/api/push/subscribe/route":[]},"rscModuleMapping":{"622":{"*":{"id":"1384","name":"*","chunks":[],"async":false}},"759":{"*":{"id":"6143","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"3597","name":"*","chunks":[],"async":false}},"2317":{"*":{"id":"3257","name":"*","chunks":[],"async":false}},"3673":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"9748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"3041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"5932":{"*":{"id":"1706","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"1170","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"6893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"9576","name":"*","chunks":[],"async":false}},"9365":{"*":{"id":"6873","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"6060","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
(()=>{var a={};a.id=15,a.ids=[15],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},1181:a=>{"use strict";a.exports=require("web-push")},3033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},3421:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(1237),e=c(5088),f=c(7679);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},4870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},5607:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>C,patchFetch:()=>B,routeModule:()=>x,serverHooks:()=>A,workAsyncStorage:()=>y,workUnitAsyncStorage:()=>z});var d={};c.r(d),c.d(d,{GET:()=>w,dynamic:()=>v});var e=c(5736),f=c(9117),g=c(4044),h=c(9326),i=c(2324),j=c(261),k=c(4290),l=c(5328),m=c(8928),n=c(6595),o=c(3421),p=c(7679),q=c(1681),r=c(3446),s=c(6439),t=c(1356),u=c(6806);let v="force-dynamic";async function w(){return Response.json({publicKey:await (0,u.HR)()})}let x=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/push/vapid-key/route",pathname:"/api/push/vapid-key",filename:"route",bundlePath:"app/api/push/vapid-key/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/Users/jonmakinen/Documents/cursor-local-remote/src/app/api/push/vapid-key/route.ts",nextConfigOutput:"",userland:d}),{workAsyncStorage:y,workUnitAsyncStorage:z,serverHooks:A}=x;function B(){return(0,g.patchFetch)({workAsyncStorage:y,workUnitAsyncStorage:z})}async function C(a,b,c){var d;let e="/api/push/vapid-key/route";"/index"===e&&(e="/");let g=await x.prepare(a,b,{srcPage:e,multiZoneDraftMode:!1});if(!g)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:u,params:v,nextConfig:w,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D}=g,E=(0,j.normalizeAppPath)(e),F=!!(z.dynamicRoutes[E]||z.routes[D]);if(F&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[E];if(b&&!1===b.fallback&&!a)throw new s.NoFallbackError}let G=null;!F||x.isDev||y||(G="/index"===(G=D)?"/":G);let H=!0===x.isDev||!F,I=F&&!H,J=a.method||"GET",K=(0,i.getTracer)(),L=K.getActiveScopeSpan(),M={params:v,prerenderManifest:z,renderOpts:{experimental:{cacheComponents:!!w.experimental.cacheComponents,authInterrupts:!!w.experimental.authInterrupts},supportsDynamicResponse:H,incrementalCache:(0,h.getRequestMeta)(a,"incrementalCache"),cacheLifeProfiles:null==(d=w.experimental)?void 0:d.cacheLife,isRevalidate:I,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d)=>x.onRequestError(a,b,d,A)},sharedContext:{buildId:u}},N=new k.NodeNextRequest(a),O=new k.NodeNextResponse(b),P=l.NextRequestAdapter.fromNodeNextRequest(N,(0,l.signalFromNodeResponse)(b));try{let d=async c=>x.handle(P,M).finally(()=>{if(!c)return;c.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let d=K.getRootSpanAttributes();if(!d)return;if(d.get("next.span_type")!==m.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${d.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=d.get("next.route");if(e){let a=`${J} ${e}`;c.setAttributes({"next.route":e,"http.route":e,"next.span_name":a}),c.updateName(a)}else c.updateName(`${J} ${a.url}`)}),g=async g=>{var i,j;let k=async({previousCacheEntry:f})=>{try{if(!(0,h.getRequestMeta)(a,"minimalMode")&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let e=await d(g);a.fetchMetrics=M.renderOpts.fetchMetrics;let i=M.renderOpts.pendingWaitUntil;i&&c.waitUntil&&(c.waitUntil(i),i=void 0);let j=M.renderOpts.collectedTags;if(!F)return await (0,o.I)(N,O,e,M.renderOpts.pendingWaitUntil),null;{let a=await e.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(e.headers);j&&(b[r.NEXT_CACHE_TAGS_HEADER]=j),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==M.renderOpts.collectedRevalidate&&!(M.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&M.renderOpts.collectedRevalidate,d=void 0===M.renderOpts.collectedExpire||M.renderOpts.collectedExpire>=r.INFINITE_CACHE?void 0:M.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:e.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:d}}}}catch(b){throw(null==f?void 0:f.isStale)&&await x.onRequestError(a,b,{routerKind:"App Router",routePath:e,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:B})},A),b}},l=await x.handleResponse({req:a,nextConfig:w,cacheKey:G,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:k,waitUntil:c.waitUntil});if(!F)return null;if((null==l||null==(i=l.value)?void 0:i.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==l||null==(j=l.value)?void 0:j.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,h.getRequestMeta)(a,"minimalMode")||b.setHeader("x-nextjs-cache",B?"REVALIDATED":l.isMiss?"MISS":l.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let m=(0,p.fromNodeOutgoingHttpHeaders)(l.value.headers);return(0,h.getRequestMeta)(a,"minimalMode")&&F||m.delete(r.NEXT_CACHE_TAGS_HEADER),!l.cacheControl||b.getHeader("Cache-Control")||m.get("Cache-Control")||m.set("Cache-Control",(0,q.getCacheControlHeader)(l.cacheControl)),await (0,o.I)(N,O,new Response(l.value.body,{headers:m,status:l.value.status||200})),null};L?await g(L):await K.withPropagatedContext(a.headers,()=>K.trace(m.BaseServerSpan.handleRequest,{spanName:`${J} ${a.url}`,kind:i.SpanKind.SERVER,attributes:{"http.method":J,"http.target":a.url}},g))}catch(b){if(b instanceof s.NoFallbackError||await x.onRequestError(a,b,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,n.c)({isRevalidate:I,isOnDemandRevalidate:B})}),F)throw b;return await (0,o.I)(N,O,new Response(null,{status:500})),null}}},5736:(a,b,c)=>{"use strict";a.exports=c(4870)},6293:a=>{"use strict";a.exports=require("sql.js")},6439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},6487:()=>{},6492:(a,b,c)=>{"use strict";c.d(b,{GW:()=>s,Lf:()=>n,ME:()=>t,Nk:()=>v,ag:()=>w,ih:()=>r,zj:()=>u});var d=c(6293),e=c.n(d),f=c(9902),g=c(9439),h=c(9021);let i=(0,f.join)((0,g.homedir)(),".cursor-local-remote"),j=(0,f.join)(i,"sessions.db"),k=null,l=null;function m(){k&&(0,h.writeFileSync)(j,Buffer.from(k.export()))}async function n(){if(k)return k;let{Database:a}=await (!l&&(l=e()()),l);return(0,h.mkdirSync)(i,{recursive:!0}),(k=(0,h.existsSync)(j)?new a((0,h.readFileSync)(j)):new a).run(`
|
|
2
|
-
CREATE TABLE IF NOT EXISTS sessions (
|
|
3
|
-
id TEXT PRIMARY KEY,
|
|
4
|
-
title TEXT NOT NULL,
|
|
5
|
-
workspace TEXT NOT NULL,
|
|
6
|
-
preview TEXT NOT NULL DEFAULT '',
|
|
7
|
-
created_at INTEGER NOT NULL,
|
|
8
|
-
updated_at INTEGER NOT NULL
|
|
9
|
-
)
|
|
10
|
-
`),k.run(`
|
|
11
|
-
CREATE TABLE IF NOT EXISTS config (
|
|
12
|
-
key TEXT PRIMARY KEY,
|
|
13
|
-
value TEXT NOT NULL
|
|
14
|
-
)
|
|
15
|
-
`),k.run(`
|
|
16
|
-
CREATE TABLE IF NOT EXISTS push_subscriptions (
|
|
17
|
-
endpoint TEXT PRIMARY KEY,
|
|
18
|
-
subscription TEXT NOT NULL,
|
|
19
|
-
created_at INTEGER NOT NULL
|
|
20
|
-
)
|
|
21
|
-
`),m(),k}function o(a,b,c){let d=a.prepare(b);try{if(d.bind(c),d.step())return d.getAsObject();return}finally{d.free()}}function p(a,b,c=[]){let d=a.prepare(b);try{d.bind(c);let a=[];for(;d.step();)a.push(d.getAsObject());return a}finally{d.free()}}function q(a){return{id:a.id,title:a.title,workspace:a.workspace,preview:a.preview,createdAt:a.created_at,updatedAt:a.updated_at}}async function r(a,b,c){let d=await n(),e=Date.now(),f=o(d,"SELECT * FROM sessions WHERE id = ?",[a]);if(f){let b=c?c.slice(0,120):f.preview;return d.run("UPDATE sessions SET updated_at = ?, preview = ? WHERE id = ?",[e,b,a]),m(),q({...f,updated_at:e,preview:b})}let g=c.slice(0,60)||"New session",h=c.slice(0,120);return d.run("INSERT INTO sessions (id, title, workspace, preview, created_at, updated_at) VALUES (?, ?, ?, ?, ?, ?)",[a,g,b,h,e,e]),m(),{id:a,title:g,workspace:b,preview:h,createdAt:e,updatedAt:e}}async function s(a){let b=await n();return(a?p(b,"SELECT * FROM sessions WHERE workspace = ? ORDER BY updated_at DESC",[a]):p(b,"SELECT * FROM sessions ORDER BY updated_at DESC")).map(q)}async function t(a){(await n()).run("DELETE FROM sessions WHERE id = ?",[a]),m()}async function u(a){let b=o(await n(),"SELECT value FROM config WHERE key = ?",[a]);return b?.value}async function v(a,b){(await n()).run("INSERT OR REPLACE INTO config (key, value) VALUES (?, ?)",[a,b]),m()}async function w(){let a=p(await n(),"SELECT key, value FROM config WHERE key NOT LIKE 'vapid%'"),b={};for(let c of a)b[c.key]=c.value;return b}},6806:(a,b,c)=>{"use strict";c.d(b,{$3:()=>k,HR:()=>j,ig:()=>l});var d=c(1181),e=c.n(d),f=c(6492);async function g(){let a=await (0,f.Lf)(),b=function(a,b,c){let d=a.prepare(b);try{if(d.bind(c),d.step())return d.getAsObject().value;return}finally{d.free()}}(a,"SELECT value FROM config WHERE key = ?",["vapid_keys"]);if(b)return JSON.parse(b);let c=e().generateVAPIDKeys(),d={publicKey:c.publicKey,privateKey:c.privateKey};return a.run("INSERT INTO config (key, value) VALUES (?, ?)",["vapid_keys",JSON.stringify(d)]),d}let h=!1;async function i(){let a=await g();return h||(e().setVapidDetails("mailto:clr@localhost",a.publicKey,a.privateKey),h=!0),a}async function j(){return(await i()).publicKey}async function k(a){(await (0,f.Lf)()).run("INSERT OR REPLACE INTO push_subscriptions (endpoint, subscription, created_at) VALUES (?, ?, ?)",[a.endpoint,JSON.stringify(a),Date.now()])}async function l(a){(await (0,f.Lf)()).run("DELETE FROM push_subscriptions WHERE endpoint = ?",[a])}},8335:()=>{},9021:a=>{"use strict";a.exports=require("fs")},9294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},9439:a=>{"use strict";a.exports=require("os")},9902:a=>{"use strict";a.exports=require("path")}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[873],()=>b(b.s=5607));module.exports=c})();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":1,"files":["../../../../../../node_modules/agent-base/dist/helpers.js","../../../../../../node_modules/agent-base/dist/index.js","../../../../../../node_modules/agent-base/package.json","../../../../../../node_modules/asn1.js/lib/asn1.js","../../../../../../node_modules/asn1.js/lib/asn1/api.js","../../../../../../node_modules/asn1.js/lib/asn1/base/buffer.js","../../../../../../node_modules/asn1.js/lib/asn1/base/index.js","../../../../../../node_modules/asn1.js/lib/asn1/base/node.js","../../../../../../node_modules/asn1.js/lib/asn1/base/reporter.js","../../../../../../node_modules/asn1.js/lib/asn1/constants/der.js","../../../../../../node_modules/asn1.js/lib/asn1/constants/index.js","../../../../../../node_modules/asn1.js/lib/asn1/decoders/der.js","../../../../../../node_modules/asn1.js/lib/asn1/decoders/index.js","../../../../../../node_modules/asn1.js/lib/asn1/decoders/pem.js","../../../../../../node_modules/asn1.js/lib/asn1/encoders/der.js","../../../../../../node_modules/asn1.js/lib/asn1/encoders/index.js","../../../../../../node_modules/asn1.js/lib/asn1/encoders/pem.js","../../../../../../node_modules/asn1.js/package.json","../../../../../../node_modules/bn.js/lib/bn.js","../../../../../../node_modules/bn.js/package.json","../../../../../../node_modules/buffer-equal-constant-time/index.js","../../../../../../node_modules/buffer-equal-constant-time/package.json","../../../../../../node_modules/debug/package.json","../../../../../../node_modules/debug/src/browser.js","../../../../../../node_modules/debug/src/common.js","../../../../../../node_modules/debug/src/index.js","../../../../../../node_modules/debug/src/node.js","../../../../../../node_modules/ecdsa-sig-formatter/package.json","../../../../../../node_modules/ecdsa-sig-formatter/src/ecdsa-sig-formatter.js","../../../../../../node_modules/ecdsa-sig-formatter/src/param-bytes-for-alg.js","../../../../../../node_modules/has-flag/index.js","../../../../../../node_modules/has-flag/package.json","../../../../../../node_modules/http_ece/ece.js","../../../../../../node_modules/http_ece/package.json","../../../../../../node_modules/https-proxy-agent/dist/index.js","../../../../../../node_modules/https-proxy-agent/dist/parse-proxy-response.js","../../../../../../node_modules/https-proxy-agent/package.json","../../../../../../node_modules/inherits/inherits.js","../../../../../../node_modules/inherits/inherits_browser.js","../../../../../../node_modules/inherits/package.json","../../../../../../node_modules/jwa/index.js","../../../../../../node_modules/jwa/package.json","../../../../../../node_modules/jws/index.js","../../../../../../node_modules/jws/lib/data-stream.js","../../../../../../node_modules/jws/lib/sign-stream.js","../../../../../../node_modules/jws/lib/tostring.js","../../../../../../node_modules/jws/lib/verify-stream.js","../../../../../../node_modules/jws/package.json","../../../../../../node_modules/minimalistic-assert/index.js","../../../../../../node_modules/minimalistic-assert/package.json","../../../../../../node_modules/ms/index.js","../../../../../../node_modules/ms/package.json","../../../../../../node_modules/next/dist/client/components/app-router-headers.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/index.js","../../../../../../node_modules/next/dist/compiled/@opentelemetry/api/package.json","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/index.js","../../../../../../node_modules/next/dist/compiled/jsonwebtoken/package.json","../../../../../../node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js","../../../../../../node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js","../../../../../../node_modules/next/dist/lib/client-and-server-references.js","../../../../../../node_modules/next/dist/lib/constants.js","../../../../../../node_modules/next/dist/lib/interop-default.js","../../../../../../node_modules/next/dist/lib/is-error.js","../../../../../../node_modules/next/dist/lib/semver-noop.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/action-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/after-task-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/async-local-storage.js","../../../../../../node_modules/next/dist/server/app-render/cache-signal.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.external.js","../../../../../../node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-async-storage.external.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js","../../../../../../node_modules/next/dist/server/app-render/work-unit-async-storage.external.js","../../../../../../node_modules/next/dist/server/lib/cache-handlers/default.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/shared-cache-controls.external.js","../../../../../../node_modules/next/dist/server/lib/incremental-cache/tags-manifest.external.js","../../../../../../node_modules/next/dist/server/lib/lru-cache.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js","../../../../../../node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js","../../../../../../node_modules/next/dist/server/lib/trace/constants.js","../../../../../../node_modules/next/dist/server/lib/trace/tracer.js","../../../../../../node_modules/next/dist/server/load-manifest.external.js","../../../../../../node_modules/next/dist/server/response-cache/types.js","../../../../../../node_modules/next/dist/shared/lib/deep-freeze.js","../../../../../../node_modules/next/dist/shared/lib/invariant-error.js","../../../../../../node_modules/next/dist/shared/lib/is-plain-object.js","../../../../../../node_modules/next/dist/shared/lib/is-thenable.js","../../../../../../node_modules/next/dist/shared/lib/no-fallback-error.external.js","../../../../../../node_modules/next/dist/shared/lib/page-path/ensure-leading-slash.js","../../../../../../node_modules/next/dist/shared/lib/router/utils/app-paths.js","../../../../../../node_modules/next/dist/shared/lib/segment.js","../../../../../../node_modules/next/dist/shared/lib/server-reference-info.js","../../../../../../node_modules/next/package.json","../../../../../../node_modules/safe-buffer/index.js","../../../../../../node_modules/safe-buffer/package.json","../../../../../../node_modules/safer-buffer/package.json","../../../../../../node_modules/safer-buffer/safer.js","../../../../../../node_modules/sql.js/dist/sql-wasm.js","../../../../../../node_modules/sql.js/package.json","../../../../../../node_modules/supports-color/index.js","../../../../../../node_modules/supports-color/package.json","../../../../../../node_modules/web-push/package.json","../../../../../../node_modules/web-push/src/encryption-helper.js","../../../../../../node_modules/web-push/src/index.js","../../../../../../node_modules/web-push/src/urlsafe-base64-helper.js","../../../../../../node_modules/web-push/src/vapid-helper.js","../../../../../../node_modules/web-push/src/web-push-constants.js","../../../../../../node_modules/web-push/src/web-push-error.js","../../../../../../node_modules/web-push/src/web-push-lib.js","../../../../../../package.json","../../../../../package.json","../../../../chunks/873.js","../../../../webpack-runtime.js","route_client-reference-manifest.js"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
globalThis.__RSC_MANIFEST=(globalThis.__RSC_MANIFEST||{});globalThis.__RSC_MANIFEST["/api/push/vapid-key/route"]={"moduleLoading":{"prefix":"/_next/"},"ssrModuleMapping":{"622":{"*":{"id":"2146","name":"*","chunks":[],"async":false}},"759":{"*":{"id":"3813","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"1603","name":"*","chunks":[],"async":false}},"2317":{"*":{"id":"1139","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"5170","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"2263","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"8922","name":"*","chunks":[],"async":false}},"5932":{"*":{"id":"7996","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"4160","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"8495","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"9234","name":"*","chunks":[],"async":false}},"9365":{"*":{"id":"9106","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"7526","name":"*","chunks":[],"async":false}}},"edgeSSRModuleMapping":{},"clientModules":{"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/builtin/global-error.js":{"id":7150,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/client-page.js":{"id":1959,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/client-segment.js":{"id":7989,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/http-access-fallback/error-boundary.js":{"id":3886,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/layout-router.js":{"id":9766,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/metadata/async-metadata.js":{"id":5278,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/client/components/render-from-template-context.js":{"id":8924,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/lib/framework/boundary-components.js":{"id":4431,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/node_modules/next/dist/esm/lib/metadata/generate/icon-mark.js":{"id":622,"name":"*","chunks":[],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/src/app/globals.css":{"id":3673,"name":"*","chunks":["558","static/chunks/app/layout-168baea1ba298a10.js"],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/src/components/pwa-install.tsx":{"id":2317,"name":"*","chunks":["558","static/chunks/app/layout-168baea1ba298a10.js"],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/src/components/sw-register.tsx":{"id":759,"name":"*","chunks":["558","static/chunks/app/layout-168baea1ba298a10.js"],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/src/components/chat-workspace.tsx":{"id":9365,"name":"*","chunks":["391","static/chunks/391-727d95bcfba987c2.js","593","static/chunks/app/page-df671bcff0abba4f.js"],"async":false},"/Users/jonmakinen/Documents/cursor-local-remote/src/components/error-boundary.tsx":{"id":5932,"name":"*","chunks":["391","static/chunks/391-727d95bcfba987c2.js","593","static/chunks/app/page-df671bcff0abba4f.js"],"async":false}},"entryCSSFiles":{"/Users/jonmakinen/Documents/cursor-local-remote/src/":[],"/Users/jonmakinen/Documents/cursor-local-remote/src/app/layout":[{"inlined":false,"path":"static/css/e600fbf434173a2f.css"}],"/Users/jonmakinen/Documents/cursor-local-remote/src/app/page":[{"inlined":false,"path":"static/css/5eacd01f773eed7f.css"}],"/Users/jonmakinen/Documents/cursor-local-remote/src/app/api/push/vapid-key/route":[]},"rscModuleMapping":{"622":{"*":{"id":"1384","name":"*","chunks":[],"async":false}},"759":{"*":{"id":"6143","name":"*","chunks":[],"async":false}},"1959":{"*":{"id":"3597","name":"*","chunks":[],"async":false}},"2317":{"*":{"id":"3257","name":"*","chunks":[],"async":false}},"3673":{"*":{"id":"1135","name":"*","chunks":[],"async":false}},"3886":{"*":{"id":"9748","name":"*","chunks":[],"async":false}},"4431":{"*":{"id":"3041","name":"*","chunks":[],"async":false}},"5278":{"*":{"id":"7184","name":"*","chunks":[],"async":false}},"5932":{"*":{"id":"1706","name":"*","chunks":[],"async":false}},"7150":{"*":{"id":"1170","name":"*","chunks":[],"async":false}},"7989":{"*":{"id":"6893","name":"*","chunks":[],"async":false}},"8924":{"*":{"id":"9576","name":"*","chunks":[],"async":false}},"9365":{"*":{"id":"6873","name":"*","chunks":[],"async":false}},"9766":{"*":{"id":"6060","name":"*","chunks":[],"async":false}}},"edgeRscModuleMapping":{}}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=369,exports.ids=[369,519],exports.modules={1750:(a,b,c)=>{c.d(b,{notifyAllSubscribers:()=>l});var d=c(1181),e=c.n(d),f=c(6519);async function g(){let a=await (0,f.getDb)(),b=function(a,b,c){let d=a.prepare(b);try{if(d.bind(c),d.step())return d.getAsObject().value;return}finally{d.free()}}(a,"SELECT value FROM config WHERE key = ?",["vapid_keys"]);if(b)return JSON.parse(b);let c=e().generateVAPIDKeys(),d={publicKey:c.publicKey,privateKey:c.privateKey};return a.run("INSERT INTO config (key, value) VALUES (?, ?)",["vapid_keys",JSON.stringify(d)]),d}let h=!1;async function i(){let a=await g();return h||(e().setVapidDetails("mailto:clr@localhost",a.publicKey,a.privateKey),h=!0),a}async function j(a){(await (0,f.getDb)()).run("DELETE FROM push_subscriptions WHERE endpoint = ?",[a])}async function k(){let a=(await (0,f.getDb)()).prepare("SELECT endpoint, subscription FROM push_subscriptions");try{let b=[];for(;a.step();){let c=a.getAsObject();b.push({endpoint:c.endpoint,subscription:JSON.parse(c.subscription)})}return b}finally{a.free()}}async function l(a,b){await i();let c=await k();if(0===c.length)return;let d=JSON.stringify({title:a,body:b});await Promise.allSettled(c.map(async({endpoint:a,subscription:b})=>{try{await e().sendNotification(b,d)}catch(c){let b=c.statusCode;404===b||410===b?await j(a):console.error("[push] Failed to send to "+a.slice(0,60)+":",c)}}))}},6519:(a,b,c)=>{c.d(b,{getDb:()=>m});var d=c(6293),e=c.n(d),f=c(9902),g=c(9439),h=c(9021);let i=(0,f.join)((0,g.homedir)(),".cursor-local-remote"),j=(0,f.join)(i,"sessions.db"),k=null,l=null;async function m(){if(k)return k;let{Database:a}=await (!l&&(l=e()()),l);return(0,h.mkdirSync)(i,{recursive:!0}),(k=(0,h.existsSync)(j)?new a((0,h.readFileSync)(j)):new a).run(`
|
|
2
|
-
CREATE TABLE IF NOT EXISTS sessions (
|
|
3
|
-
id TEXT PRIMARY KEY,
|
|
4
|
-
title TEXT NOT NULL,
|
|
5
|
-
workspace TEXT NOT NULL,
|
|
6
|
-
preview TEXT NOT NULL DEFAULT '',
|
|
7
|
-
created_at INTEGER NOT NULL,
|
|
8
|
-
updated_at INTEGER NOT NULL
|
|
9
|
-
)
|
|
10
|
-
`),k.run(`
|
|
11
|
-
CREATE TABLE IF NOT EXISTS config (
|
|
12
|
-
key TEXT PRIMARY KEY,
|
|
13
|
-
value TEXT NOT NULL
|
|
14
|
-
)
|
|
15
|
-
`),k.run(`
|
|
16
|
-
CREATE TABLE IF NOT EXISTS push_subscriptions (
|
|
17
|
-
endpoint TEXT PRIMARY KEY,
|
|
18
|
-
subscription TEXT NOT NULL,
|
|
19
|
-
created_at INTEGER NOT NULL
|
|
20
|
-
)
|
|
21
|
-
`),k&&(0,h.writeFileSync)(j,Buffer.from(k.export())),k}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=407,exports.ids=[407,848],exports.modules={5407:(a,b,c)=>{c.d(b,{registerShutdownHandler:()=>f});var d=c(6848);let e=!1;function f(){if(e)return;e=!0;let a=()=>{(0,d.F2)(),process.exit(0)};process.on("SIGTERM",a),process.on("SIGINT",a)}},6848:(a,b,c)=>{function d(a){}c.d(b,{F2:()=>f,setProcessExitHook:()=>d});let e=new Map;function f(){for(let a of e.values())try{a.child.kill("SIGTERM")}catch{}}}};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=519,exports.ids=[519],exports.modules={6519:(a,b,c)=>{c.d(b,{getDb:()=>m});var d=c(6293),e=c.n(d),f=c(9902),g=c(9439),h=c(9021);let i=(0,f.join)((0,g.homedir)(),".cursor-local-remote"),j=(0,f.join)(i,"sessions.db"),k=null,l=null;async function m(){if(k)return k;let{Database:a}=await (!l&&(l=e()()),l);return(0,h.mkdirSync)(i,{recursive:!0}),(k=(0,h.existsSync)(j)?new a((0,h.readFileSync)(j)):new a).run(`
|
|
2
|
-
CREATE TABLE IF NOT EXISTS sessions (
|
|
3
|
-
id TEXT PRIMARY KEY,
|
|
4
|
-
title TEXT NOT NULL,
|
|
5
|
-
workspace TEXT NOT NULL,
|
|
6
|
-
preview TEXT NOT NULL DEFAULT '',
|
|
7
|
-
created_at INTEGER NOT NULL,
|
|
8
|
-
updated_at INTEGER NOT NULL
|
|
9
|
-
)
|
|
10
|
-
`),k.run(`
|
|
11
|
-
CREATE TABLE IF NOT EXISTS config (
|
|
12
|
-
key TEXT PRIMARY KEY,
|
|
13
|
-
value TEXT NOT NULL
|
|
14
|
-
)
|
|
15
|
-
`),k.run(`
|
|
16
|
-
CREATE TABLE IF NOT EXISTS push_subscriptions (
|
|
17
|
-
endpoint TEXT PRIMARY KEY,
|
|
18
|
-
subscription TEXT NOT NULL,
|
|
19
|
-
created_at INTEGER NOT NULL
|
|
20
|
-
)
|
|
21
|
-
`),k&&(0,h.writeFileSync)(j,Buffer.from(k.export())),k}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";exports.id=848,exports.ids=[848],exports.modules={6848:(a,b,c)=>{function d(a){}c.d(b,{F2:()=>f,setProcessExitHook:()=>d});let e=new Map;function f(){for(let a of e.values())try{a.child.kill("SIGTERM")}catch{}}}};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
self.__BUILD_MANIFEST=function(e,r,t){return{__rewrites:{afterFiles:[],beforeFiles:[],fallback:[]},__routerFilterStatic:{numItems:15,errorRate:1e-4,numBits:288,numHashes:14,bitArray:[1,1,0,r,r,0,r,r,r,e,r,r,r,r,e,e,e,e,e,e,e,e,r,e,e,r,r,e,r,r,r,e,e,e,e,e,e,e,r,r,e,e,e,r,r,e,r,e,r,r,r,r,r,e,e,e,r,e,r,r,r,r,e,r,e,r,r,e,e,r,e,r,e,e,e,e,e,e,e,e,e,e,e,r,r,e,e,e,r,r,e,r,e,r,e,r,e,r,e,e,r,e,e,e,r,e,r,e,e,e,e,r,e,r,r,r,e,e,e,r,r,e,e,r,e,e,e,r,e,e,r,e,e,e,e,e,r,e,e,e,e,r,e,r,e,e,r,r,e,e,e,e,e,e,r,r,e,r,e,r,r,e,r,e,e,r,e,r,r,e,e,r,e,e,r,e,e,r,r,e,r,r,e,e,r,e,e,r,e,r,e,r,r,e,e,e,e,e,e,r,r,r,r,r,r,e,r,e,r,r,r,r,e,r,r,r,e,r,r,e,e,r,r,r,r,e,r,r,r,r,r,r,r,e,r,r,r,r,r,r,e,r,r,r,r,e,r,e,r,r,r,e,r,e,r,e,r,e,r,e,e,r,r,r,r,e,r,e,e,e,r,e,r,r,e,r,r,r,r,r,r,r,e,e,e,r,e,r]},__routerFilterDynamic:{numItems:e,errorRate:1e-4,numBits:e,numHashes:null,bitArray:[]},"/_error":["static/chunks/pages/_error-89cd7530328c75d9.js"],sortedPages:["/_app","/_error"]}}(0,1,1e-4),self.__BUILD_MANIFEST_CB&&self.__BUILD_MANIFEST_CB();
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[558],{759:(e,r,n)=>{"use strict";n.d(r,{SwRegister:()=>t});var s=n(2115);function t(){return(0,s.useEffect)(()=>{"serviceWorker"in navigator&&navigator.serviceWorker.register("/sw.js").catch(e=>console.error("[sw] Registration failed:",e))},[]),null}},2317:(e,r,n)=>{"use strict";n.d(r,{PwaInstall:()=>o});var s=n(5155),t=n(2115);function o(){return(0,t.useEffect)(()=>{n.e(561).then(n.bind(n,9561)).catch(()=>{})},[]),(0,s.jsx)("pwa-install",{"manifest-url":"/manifest.webmanifest",name:"Cursor Local Remote",description:"Control Cursor IDE from any device on your local network",icon:"/apple-touch-icon.png"})}},3673:()=>{},6642:(e,r,n)=>{Promise.resolve().then(n.t.bind(n,3673,23)),Promise.resolve().then(n.bind(n,2317)),Promise.resolve().then(n.bind(n,759))}},e=>{e.O(0,[978,441,255,358],()=>e(e.s=6642)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9,15,26,97,177,243,252,276,337,552,974],{4441:()=>{}},_=>{_.O(0,[441,255,358],()=>_(_.s=4441)),_N_E=_.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[593],{2673:(e,t,s)=>{Promise.resolve().then(s.bind(s,9365)),Promise.resolve().then(s.bind(s,5932))},5932:(e,t,s)=>{"use strict";s.d(t,{ErrorBoundary:()=>l});var r=s(5155),n=s(2115);class l extends n.Component{static getDerivedStateFromError(e){return{error:e}}componentDidCatch(e,t){console.error("Uncaught render error:",e,t.componentStack)}render(){return this.state.error?"inline"===this.props.fallback?(0,r.jsx)("div",{className:"h-full flex items-center justify-center px-6",children:(0,r.jsxs)("div",{className:"text-center max-w-sm",children:[(0,r.jsx)("p",{className:"text-[13px] font-medium text-text mb-2",children:"Something went wrong"}),(0,r.jsx)("p",{className:"text-[11px] text-text-muted mb-3 font-mono break-all",children:this.state.error.message}),(0,r.jsx)("button",{onClick:()=>this.setState({error:null}),className:"px-3 py-1 rounded-lg text-[12px] font-medium bg-bg-surface text-text border border-border hover:bg-bg-hover transition-colors",children:"Try again"})]})}):(0,r.jsx)("div",{className:"h-dvh flex items-center justify-center bg-[#0a0a0b] px-6",children:(0,r.jsxs)("div",{className:"text-center max-w-sm",children:[(0,r.jsx)("p",{className:"text-[14px] font-medium text-[#e8e8e8] mb-2",children:"Something went wrong"}),(0,r.jsx)("p",{className:"text-[12px] text-[#888] mb-4 font-mono break-all",children:this.state.error.message}),(0,r.jsx)("button",{onClick:()=>this.setState({error:null}),className:"px-4 py-1.5 rounded-lg text-[12px] font-medium bg-[#1c1c1c] text-[#e8e8e8] border border-[#2a2a2a] hover:bg-[#252525] transition-colors",children:"Try again"})]})}):this.props.children}constructor(...e){super(...e),this.state={error:null}}}},9365:(e,t,s)=>{"use strict";s.d(t,{ChatWorkspace:()=>ef});var r=s(5155),n=s(2115),l=s(154);function a(){let{trigger:e}=(0,l.Y)();return{tap:()=>e("light"),send:()=>e("success"),select:()=>e("selection"),warn:()=>e("warning"),error:()=>e("error")}}function o(e,t){let s=Error(t);return s.name="ApiError",s.status=e,s.body={error:t},s}let i=new Set([502,503,504]);async function c(e,t,s){let{timeoutMs:r=3e4,retries:n,...l}=t,a=new AbortController,d=setTimeout(()=>a.abort(),r);try{let r=await fetch(e,{...l,credentials:"same-origin",signal:a.signal});if(!r.ok){if(s>0&&i.has(r.status))return await new Promise(e=>setTimeout(e,500)),c(e,t,s-1);let n="HTTP ".concat(r.status);try{let e=await r.json();e.error&&(n=e.error)}catch(e){}throw o(r.status,n)}return r}catch(r){if(r instanceof Error&&"AbortError"===r.name){if(s>0)return await new Promise(e=>setTimeout(e,500)),c(e,t,s-1);throw o(0,"Request timed out")}throw r}finally{clearTimeout(d)}}function d(e){var t;let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return c(e,s,null!=(t=s.retries)?t:2)}function x(){var e;return"function"==typeof(null==(e=globalThis.crypto)?void 0:e.randomUUID)?globalThis.crypto.randomUUID():"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{let t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}async function u(){try{let e=await d("/api/sessions/active");if(!e.ok)return[];return(await e.json()).sessions||[]}catch(e){return[]}}function m(){return"undefined"!=typeof Notification?Notification.permission:"default"}function h(){try{return"1"===localStorage.getItem("clr_sound_muted")}catch(e){return!1}}function p(e){if(e.current)return e.current;try{return e.current=new AudioContext,e.current}catch(e){return null}}function f(e,t,s,r,n){let l=e.createOscillator(),a=e.createGain();l.type="sine",l.frequency.value=t,a.gain.setValueAtTime(n,s),a.gain.exponentialRampToValueAtTime(.001,s+r),l.connect(a),a.connect(e.destination),l.start(s),l.stop(s+r)}function g(e){let t=Math.floor((Date.now()-e)/6e4);if(t<1)return"now";if(t<60)return"".concat(t,"m ago");let s=Math.floor(t/60);if(s<24)return"".concat(s,"h ago");let r=Math.floor(s/24);return"".concat(r,"d ago")}var b=s(6504),j=s(4514),v=s(5225);s(1226);let y={h1:e=>{let{children:t}=e;return(0,r.jsx)("h1",{className:"text-[17px] font-semibold mt-5 mb-2 text-text",children:t})},h2:e=>{let{children:t}=e;return(0,r.jsx)("h2",{className:"text-[15px] font-semibold mt-4 mb-1.5 text-text",children:t})},h3:e=>{let{children:t}=e;return(0,r.jsx)("h3",{className:"text-[14px] font-semibold mt-3 mb-1 text-text",children:t})},h4:e=>{let{children:t}=e;return(0,r.jsx)("h4",{className:"text-[13px] font-semibold mt-2.5 mb-1 text-text",children:t})},h5:e=>{let{children:t}=e;return(0,r.jsx)("h5",{className:"text-[13px] font-medium mt-2 mb-0.5 text-text-secondary",children:t})},h6:e=>{let{children:t}=e;return(0,r.jsx)("h6",{className:"text-[12px] font-medium mt-2 mb-0.5 text-text-secondary",children:t})},p:e=>{let{children:t}=e;return(0,r.jsx)("p",{className:"my-1 text-[13px] leading-[1.6]",children:t})},a:e=>{let{href:t,children:s}=e;return(0,r.jsx)("a",{href:t,target:"_blank",rel:"noopener noreferrer",className:"text-accent underline underline-offset-2 decoration-text-muted/40 hover:decoration-accent transition-colors",children:s})},pre:e=>{let{children:t}=e;return(0,r.jsx)("pre",{className:"my-2 rounded-lg bg-[#0d0d0d] border border-border px-3.5 py-3 overflow-x-auto",children:t})},code:e=>{let{className:t,children:s}=e;return t?(0,r.jsx)("code",{className:"".concat(t," text-[12px] leading-[1.7] font-mono"),children:s}):(0,r.jsx)("code",{className:"px-1.5 py-0.5 rounded bg-[#1c1c1c] text-[#d4d4d4] text-[12px] font-mono",children:s})},ul:e=>{let{children:t}=e;return(0,r.jsx)("ul",{className:"my-1.5 space-y-0.5 list-disc pl-5",children:t})},ol:e=>{let{children:t}=e;return(0,r.jsx)("ol",{className:"my-1.5 space-y-0.5 list-decimal pl-5",children:t})},li:e=>{let{children:t}=e;return(0,r.jsx)("li",{className:"text-[13px] leading-[1.6]",children:t})},hr:()=>(0,r.jsx)("hr",{className:"my-3 border-border"}),blockquote:e=>{let{children:t}=e;return(0,r.jsx)("blockquote",{className:"my-2 pl-3 border-l-2 border-border text-text-secondary italic",children:t})},table:e=>{let{children:t}=e;return(0,r.jsx)("div",{className:"my-2 overflow-x-auto",children:(0,r.jsx)("table",{className:"min-w-full text-[13px] border-collapse",children:t})})},th:e=>{let{children:t}=e;return(0,r.jsx)("th",{className:"px-3 py-1.5 text-left font-semibold border-b border-border text-text",children:t})},td:e=>{let{children:t}=e;return(0,r.jsx)("td",{className:"px-3 py-1.5 border-b border-border/50",children:t})},img:e=>{let{src:t,alt:s}=e;return(0,r.jsx)("img",{src:t,alt:null!=s?s:"",className:"my-2 max-w-full rounded",loading:"lazy"})}},N=(0,n.memo)(function(e){let{content:t}=e;return(0,r.jsx)("div",{className:"text-text",children:(0,r.jsx)(b.oz,{remarkPlugins:[j.A],rehypePlugins:[v.A],components:y,children:t})})}),k={size:14,className:""};function w(e){let{size:t=10,className:s=""}=e;return(0,r.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:s,children:(0,r.jsx)("polyline",{points:"6 9 12 15 18 9"})})}function C(e){let{size:t=k.size,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:s,children:[(0,r.jsx)("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),(0,r.jsx)("line",{x1:"6",y1:"6",x2:"18",y2:"18"})]})}function S(e){let{size:t=12,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:s,children:[(0,r.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,r.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"})]})}function E(e){let{size:t=k.size,className:s=k.className}=e;return(0,r.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:s,children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})})}function W(e){let{size:t=k.size,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:s,children:[(0,r.jsx)("rect",{x:"9",y:"9",width:"13",height:"13",rx:"2",ry:"2"}),(0,r.jsx)("path",{d:"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"})]})}function T(e){let{size:t=20,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:s,children:[(0,r.jsx)("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),(0,r.jsx)("line",{x1:"3",y1:"12",x2:"15",y2:"12"}),(0,r.jsx)("line",{x1:"3",y1:"18",x2:"18",y2:"18"})]})}function A(e){let{size:t=12,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:s,children:[(0,r.jsx)("polyline",{points:"3 6 5 6 21 6"}),(0,r.jsx)("path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"})]})}function M(e){let{size:t=k.size,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:s,children:[(0,r.jsx)("path",{d:"M21 12a9 9 0 1 1-6.22-8.56"}),(0,r.jsx)("polyline",{points:"21 3 21 9 15 9"})]})}function R(e){let{size:t=12,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:s,children:[(0,r.jsx)("line",{x1:"12",y1:"5",x2:"12",y2:"19"}),(0,r.jsx)("polyline",{points:"19 12 12 19 5 12"})]})}function L(e){let{size:t=18,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:s,children:[(0,r.jsx)("line",{x1:"12",y1:"19",x2:"12",y2:"5"}),(0,r.jsx)("polyline",{points:"5 12 12 5 19 12"})]})}function I(e){let{size:t=18,className:s=k.className}=e;return(0,r.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:s,children:(0,r.jsx)("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})})}function z(e){let{className:t="w-3 h-3"}=e;return(0,r.jsx)("span",{className:"inline-block rounded-full border-2 border-text-muted border-t-transparent animate-spin ".concat(t)})}function B(e){let{size:t=10,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:s,children:[(0,r.jsx)("polyline",{points:"1 4 1 10 7 10"}),(0,r.jsx)("path",{d:"M3.51 15a9 9 0 1 0 2.13-9.36L1 10"})]})}function O(e){let{size:t=k.size,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:s,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("polyline",{points:"12 6 12 12 16 14"})]})}function P(e){let{size:t=12,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:s,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,r.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}function D(e){let{size:t=12,className:s=k.className}=e;return(0,r.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",className:s,children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"10"}),(0,r.jsx)("line",{x1:"2",y1:"12",x2:"22",y2:"12"}),(0,r.jsx)("path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z"})]})}function F(e){let{copied:t,onClick:s}=e;return(0,r.jsx)("button",{onClick:s,className:"absolute top-2 right-0 opacity-0 group-hover:opacity-100 transition-opacity p-1 rounded text-text-muted hover:text-text-secondary","aria-label":t?"Copied":"Copy message",children:t?(0,r.jsx)(E,{}):(0,r.jsx)(W,{})})}let H=(0,n.memo)(function(e){let{message:t}=e,s="user"===t.role,[l,o]=(0,n.useState)(!1),i=a(),c=async()=>{try{await navigator.clipboard.writeText(t.content),i.tap(),o(!0),setTimeout(()=>o(!1),1500)}catch(e){}};return s?(0,r.jsxs)("div",{className:"py-3 group relative",children:[(0,r.jsx)("div",{className:"text-[13px] leading-[1.6] text-text whitespace-pre-wrap break-words bg-bg-surface rounded-lg px-3 py-2",children:t.content}),(0,r.jsx)(F,{copied:l,onClick:c})]}):(0,r.jsxs)("div",{className:"py-3 group relative",children:[(0,r.jsx)(N,{content:t.content}),(0,r.jsx)(F,{copied:l,onClick:c})]})}),V=new Set(["edit","write","shell","todo"]);function q(e){let{className:t}=e;return(0,r.jsxs)("svg",{className:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("circle",{cx:"12",cy:"12",r:"3"}),(0,r.jsx)("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1-2.83 2.83l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-4 0v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83-2.83l.06-.06A1.65 1.65 0 0 0 4.68 15a1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1 0-4h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 2.83-2.83l.06.06A1.65 1.65 0 0 0 9 4.68a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 4 0v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 2.83l-.06.06A1.65 1.65 0 0 0 19.4 9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 0 4h-.09a1.65 1.65 0 0 0-1.51 1z"})]})}function Q(e){let{type:t}=e,s="w-3.5 h-3.5 shrink-0";switch(t){case"read":return(0,r.jsxs)("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("path",{d:"M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"}),(0,r.jsx)("polyline",{points:"14 2 14 8 20 8"}),(0,r.jsx)("line",{x1:"16",y1:"13",x2:"8",y2:"13"}),(0,r.jsx)("line",{x1:"16",y1:"17",x2:"8",y2:"17"})]});case"write":case"edit":return(0,r.jsxs)("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("path",{d:"M11 4H4a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7"}),(0,r.jsx)("path",{d:"M18.5 2.5a2.121 2.121 0 0 1 3 3L12 15l-4 1 1-4 9.5-9.5z"})]});case"shell":return(0,r.jsxs)("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("polyline",{points:"4 17 10 11 4 5"}),(0,r.jsx)("line",{x1:"12",y1:"19",x2:"20",y2:"19"})]});case"search":return(0,r.jsxs)("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,r.jsx)("line",{x1:"21",y1:"21",x2:"16.65",y2:"16.65"})]});case"todo":return(0,r.jsxs)("svg",{className:s,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M9 11l3 3L22 4"}),(0,r.jsx)("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]});default:return(0,r.jsx)(q,{className:s})}}function _(e){let t=e.split("/");return t.length<=3?e:".../"+t.slice(-2).join("/")}function U(e){let{status:t}=e,s="w-3 h-3 shrink-0 mt-0.5";return t.includes("COMPLETED")?(0,r.jsx)("svg",{className:"".concat(s," text-text-secondary"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:(0,r.jsx)("polyline",{points:"20 6 9 17 4 12"})}):t.includes("IN_PROGRESS")?(0,r.jsx)(z,{className:s}):(0,r.jsx)("svg",{className:"".concat(s," text-text-muted"),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,r.jsx)("circle",{cx:"12",cy:"12",r:"9"})})}function J(e){let{diff:t,startLine:s}=e,n=t.split("\n"),l=void 0!==s,a=null!=s?s:1,o=null!=s?s:1,i=[];if(l)for(let e of n)e.startsWith("-")?(i.push(String(a)),a++):(e.startsWith("+")?i.push(String(o)):(i.push(String(o)),a++),o++);let c=l?String(Math.max(a,o)).length:0;return(0,r.jsx)("pre",{className:"bg-[#0d0d0d] rounded px-2 py-1.5 text-[11px] whitespace-pre-wrap break-all max-h-[300px] overflow-y-auto",children:n.map((e,t)=>(0,r.jsxs)("span",{className:e.startsWith("+")?"text-green-400/70":e.startsWith("-")?"text-red-400/70":"text-text-muted",children:[l&&(0,r.jsx)("span",{className:"text-text-muted/40 select-none inline-block mr-2",style:{width:"".concat(c,"ch"),textAlign:"right"},children:i[t]}),e,t<n.length-1?"\n":""]},t))})}function K(e){switch(e.type){case"read":return"Reading";case"write":return"Writing";case"edit":return"Editing";case"shell":return"Running";case"search":return"Searching";case"todo":return"Updating";default:return e.name}}function G(e){if("shell"===e.type&&e.command)return e.command;if("search"===e.type&&e.command){let t=e.path?" in ".concat(_(e.path)):"";return'"'.concat(e.command,'"').concat(t)}return"todo"===e.type?"todo list":e.path?_(e.path):e.name}function Y(e){let t={};for(let s of e){let e=s.name||s.type;t[e]=(t[e]||0)+1}return Object.entries(t).map(e=>{let[t,s]=e;return"".concat(s," ").concat(t)}).join(", ")}function $(e){let{toolCalls:t}=e,[s,l]=(0,n.useState)(!1),a=t.every(e=>"completed"===e.status);return(0,r.jsxs)("div",{className:"py-1.5",children:[(0,r.jsxs)("button",{onClick:()=>l(e=>!e),"aria-expanded":s,"aria-label":"Tool call group: ".concat(Y(t)),className:"flex items-center gap-2 text-[12px] text-text-muted hover:text-text-secondary transition-colors w-full text-left",children:[(0,r.jsx)("span",{className:a?"text-text-muted":"text-text-secondary",children:a?(0,r.jsx)(q,{className:"w-3.5 h-3.5 shrink-0"}):(0,r.jsx)(z,{className:"w-3.5 h-3.5"})}),(0,r.jsx)("span",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:(0,r.jsx)("span",{className:"font-mono text-text-muted truncate",children:Y(t)})}),(0,r.jsx)(w,{className:"shrink-0 transition-transform ".concat(s?"rotate-180":"")})]}),s&&(0,r.jsx)("div",{className:"ml-5 pl-3 border-l-2 border-border",children:t.map(e=>(0,r.jsx)(X,{toolCall:e},e.id))})]})}function X(e){let{toolCall:t,defaultExpanded:s}=e,[l,a]=(0,n.useState)(null!=s&&s),o="running"===t.status;return(0,r.jsxs)("div",{className:"py-1.5",children:[(0,r.jsxs)("button",{onClick:()=>a(e=>!e),"aria-expanded":l,"aria-label":"".concat(K(t)," ").concat(G(t)),className:"flex items-center gap-2 text-[12px] text-text-muted hover:text-text-secondary transition-colors w-full text-left",children:[(0,r.jsx)("span",{className:o?"text-text-secondary":"text-text-muted",children:o?(0,r.jsx)(z,{className:"w-3.5 h-3.5"}):(0,r.jsx)(Q,{type:t.type})}),(0,r.jsxs)("span",{className:"flex items-center gap-1.5 min-w-0 flex-1",children:[(0,r.jsx)("span",{className:"font-medium ".concat(o?"text-text-secondary":"text-text-muted"),children:K(t)}),(0,r.jsx)("span",{className:"font-mono truncate",children:G(t)})]}),t.result&&(0,r.jsx)("span",{className:"text-text-muted text-[11px] shrink-0",children:t.result}),(0,r.jsx)(w,{className:"shrink-0 transition-transform ".concat(l?"rotate-180":"")})]}),l&&(0,r.jsxs)("div",{className:"mt-1.5 ml-5 pl-3 border-l-2 border-border text-[11px] font-mono text-text-muted py-1.5 space-y-1 overflow-x-auto",children:[(0,r.jsx)("p",{className:"text-text-secondary",children:t.name}),t.path&&(0,r.jsx)("p",{className:"break-all",children:t.path}),"shell"===t.type&&t.command&&(0,r.jsxs)("pre",{className:"bg-[#0d0d0d] rounded px-2 py-1.5 text-[11px] text-[#c9d1d9] whitespace-pre-wrap break-all",children:["$ ",t.command]}),"search"===t.type&&t.command&&(0,r.jsxs)("p",{children:["pattern: ",(0,r.jsx)("span",{className:"text-text-secondary",children:t.command})]}),t.todos&&t.todos.length>0&&(0,r.jsx)("ul",{className:"space-y-0.5",children:t.todos.map(e=>(0,r.jsxs)("li",{className:"flex items-start gap-1.5",children:[(0,r.jsx)(U,{status:e.status}),(0,r.jsx)("span",{className:e.status.includes("COMPLETED")?"text-text-muted line-through":"text-text-secondary",children:e.content})]},e.id))}),t.diff&&(0,r.jsx)(J,{diff:t.diff,startLine:t.diffStartLine}),!t.diff&&!t.todos&&t.result&&(0,r.jsx)("p",{className:"text-text-secondary",children:t.result}),o&&(0,r.jsx)("p",{className:"text-text-muted animate-pulse",children:"running..."})]})]})}function Z(e){let{toolCall:t}=e,[s,l]=(0,n.useState)(!0),a=t.todos;if(!a||0===a.length)return null;let o=a.filter(e=>e.status.includes("COMPLETED")).length,i=a.filter(e=>e.status.includes("IN_PROGRESS")).length;return(0,r.jsxs)("div",{className:"py-2",children:[(0,r.jsxs)("button",{onClick:()=>l(e=>!e),"aria-expanded":s,"aria-label":"Todo list: ".concat(o,"/").concat(a.length," done"),className:"flex items-center gap-2 text-[12px] text-text-muted hover:text-text-secondary transition-colors w-full text-left",children:[(0,r.jsxs)("svg",{className:"w-3.5 h-3.5 shrink-0",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("path",{d:"M9 11l3 3L22 4"}),(0,r.jsx)("path",{d:"M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11"})]}),(0,r.jsx)("span",{className:"font-medium text-text-secondary",children:"Todo"}),(0,r.jsxs)("span",{className:"text-text-muted text-[11px]",children:[o,"/",a.length," done",i>0?" \xb7 ".concat(i," active"):""]}),(0,r.jsx)(w,{className:"shrink-0 transition-transform ml-auto ".concat(s?"rotate-180":"")})]}),s&&(0,r.jsx)("ul",{className:"mt-1.5 ml-5 pl-3 border-l-2 border-border space-y-0.5 py-1",children:a.map(e=>(0,r.jsxs)("li",{className:"flex items-start gap-1.5 text-[11px] font-mono",children:[(0,r.jsx)(U,{status:e.status}),(0,r.jsx)("span",{className:e.status.includes("COMPLETED")?"text-text-muted line-through":"text-text-secondary",children:e.content})]},e.id))})]})}function ee(e){let{sessions:t,onSelect:s}=e;return 0===t.length?null:(0,r.jsxs)("div",{className:"mt-5 w-full max-w-xs",children:[(0,r.jsx)("p",{className:"text-text-muted text-[11px] font-medium mb-2 uppercase tracking-wider",children:"Recent sessions"}),(0,r.jsx)("div",{className:"space-y-1",children:t.map(e=>(0,r.jsxs)("button",{onClick:()=>s(e.id),className:"w-full text-left px-3 py-2 rounded-lg bg-bg-surface hover:bg-bg-hover border border-border/50 transition-colors group",children:[(0,r.jsx)("p",{className:"text-[12px] text-text-secondary group-hover:text-text truncate",children:e.title}),(0,r.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5",children:g(e.updatedAt)})]},e.id))})]})}function et(e){let{msg:t,onForceSend:s,onEdit:l,onDelete:a}=e,[o,i]=(0,n.useState)(!1),[c,d]=(0,n.useState)(t.content),x=()=>{let e=c.trim();e&&e!==t.content&&l(e),i(!1)},u=()=>{d(t.content),i(!1)};return(0,r.jsxs)("div",{className:"py-2.5 border border-dashed border-text-muted/25 rounded-lg px-3 bg-bg-surface/50",children:[(0,r.jsxs)("div",{className:"flex items-start gap-2",children:[(0,r.jsx)("span",{className:"shrink-0 mt-0.5 text-text-muted/50",children:(0,r.jsx)(O,{})}),(0,r.jsx)("div",{className:"flex-1 min-w-0",children:o?(0,r.jsxs)("div",{className:"flex flex-col gap-1.5",children:[(0,r.jsx)("textarea",{autoFocus:!0,"aria-label":"Edit queued message",value:c,onChange:e=>d(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),x()),"Escape"===e.key&&u()},rows:2,className:"w-full resize-none bg-bg px-2 py-1.5 text-[13px] text-text rounded border border-border focus:outline-none focus:border-text-muted/40"}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsx)("button",{onClick:x,className:"px-2 py-0.5 text-[10px] font-medium rounded bg-bg-active text-text hover:bg-bg-hover transition-colors",children:"Save"}),(0,r.jsx)("button",{onClick:u,className:"px-2 py-0.5 text-[10px] font-medium rounded text-text-muted hover:text-text-secondary transition-colors",children:"Cancel"})]})]}):(0,r.jsx)("p",{className:"text-[13px] text-text-secondary whitespace-pre-wrap break-words",children:t.content})})]}),!o&&(0,r.jsxs)("div",{className:"flex items-center gap-1 mt-1.5 ml-5",children:[(0,r.jsx)("span",{className:"text-[10px] text-text-muted/50 mr-1",children:"Queued"}),(0,r.jsx)("button",{onClick:s,className:"px-2 py-0.5 text-[10px] font-medium rounded bg-bg-active text-text-secondary hover:text-text transition-colors",title:"Stop current and send this now",children:"Send now"}),(0,r.jsx)("button",{onClick:()=>{d(t.content),i(!0)},className:"px-2 py-0.5 text-[10px] font-medium rounded text-text-muted hover:text-text-secondary hover:bg-bg-hover transition-colors",children:"Edit"}),(0,r.jsx)("button",{onClick:a,className:"px-2 py-0.5 text-[10px] font-medium rounded text-text-muted hover:text-error/80 hover:bg-error/5 transition-colors",children:"Delete"})]})]})}function es(e){var t,s;let{messages:l,toolCalls:a,isStreaming:o,isLoadingHistory:i,isWatching:c,recentSessions:d=[],onSelectSession:x,onRetry:u,queuedMessages:m=[],onForceSend:h,onEditQueued:p,onDeleteQueued:f}=e,g=(0,n.useRef)(null),b=(0,n.useRef)(null),[j,v]=(0,n.useState)(!0),y=(0,n.useRef)(!1),N=(0,n.useCallback)(()=>{var e;null==(e=b.current)||e.scrollIntoView({behavior:"smooth"}),v(!0)},[]),k=(0,n.useCallback)(()=>{if(y.current)return;let e=g.current;e&&v(e.scrollHeight-e.scrollTop-e.clientHeight<60)},[]),w=l[l.length-1],C=o&&(null==w?void 0:w.role)==="user",S=(0,n.useRef)(null),E=(0,n.useRef)(!1);(0,n.useEffect)(()=>{var e;if(j||C){if(S.current){E.current=!0;return}y.current=!0,null==(e=b.current)||e.scrollIntoView({behavior:"smooth"}),S.current=setTimeout(()=>{if(S.current=null,y.current=!1,E.current){var e;E.current=!1,null==(e=b.current)||e.scrollIntoView({behavior:"smooth"})}},200)}},[l,a,j,C]);let W=[...l.map(e=>({kind:"message",timestamp:e.timestamp,message:e})),...a.map(e=>({kind:"toolcall",timestamp:e.timestamp,toolCall:e}))].sort((e,t)=>e.timestamp-t.timestamp),T=[],A=[],M=()=>{0!==A.length&&(1===A.length?T.push({kind:"toolcall",timestamp:A[0].timestamp,toolCall:A[0]}):T.push({kind:"toolgroup",timestamp:A[0].timestamp,toolCalls:[...A]}),A=[])};for(let e of W)"toolcall"===e.kind&&e.toolCall&&(s=e.toolCall,!V.has(s.type))?A.push(e.toolCall):(M(),T.push(e));if(M(),i)return(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center",children:(0,r.jsxs)("div",{className:"flex items-center gap-2 text-text-muted text-[13px]",children:[(0,r.jsx)(z,{className:"w-3.5 h-3.5"}),"Loading session..."]})});if(0===T.length)return(0,r.jsx)("div",{className:"flex-1 flex items-center justify-center px-6",children:(0,r.jsxs)("div",{className:"flex flex-col items-center max-w-sm",children:[(0,r.jsx)("p",{className:"text-text-secondary text-[13px] font-medium mb-1",children:"Cursor Remote"}),(0,r.jsx)("p",{className:"text-text-muted text-[12px] leading-relaxed",children:"Send a message to start an agent session."}),x&&(0,r.jsx)(ee,{sessions:d,onSelect:x})]})});let L=a.some(e=>"running"===e.status),I=T[T.length-1],O=(null==I?void 0:I.kind)==="message"&&(null==(t=I.message)?void 0:t.role)==="user",P=o&&!L&&O,D=l[l.length-1],F=!o&&(null==D?void 0:D.role)==="user"&&u;return(0,r.jsxs)("div",{className:"flex-1 overflow-hidden relative",children:[(0,r.jsx)("div",{ref:g,onScroll:k,className:"h-full overflow-y-auto",children:(0,r.jsxs)("div",{className:"px-4 max-w-3xl mx-auto w-full",children:[(0,r.jsx)("div",{className:"divide-y divide-border/50",children:T.map((e,t)=>"message"===e.kind&&e.message?(0,r.jsx)(H,{message:e.message},e.message.id):"toolcall"===e.kind&&e.toolCall?"todo"===e.toolCall.type?(0,r.jsx)(Z,{toolCall:e.toolCall},e.toolCall.id):(0,r.jsx)(X,{toolCall:e.toolCall},e.toolCall.id):"toolgroup"===e.kind&&e.toolCalls?(0,r.jsx)($,{toolCalls:e.toolCalls},"group-".concat(t)):null)}),P&&(0,r.jsxs)("div",{className:"py-3 flex items-center gap-2 text-text-muted text-[12px]",children:[(0,r.jsx)(z,{}),"Thinking..."]}),c&&!o&&T.length>0&&(0,r.jsxs)("div",{className:"py-3 flex items-center gap-2 text-text-muted text-[11px]",children:[(0,r.jsx)("span",{className:"w-1.5 h-1.5 rounded-full bg-success animate-pulse"}),"Watching for updates..."]}),F&&(0,r.jsx)("div",{className:"py-1",children:(0,r.jsxs)("button",{onClick:u,className:"flex items-center gap-1 text-[10px] text-text-muted/60 hover:text-text-muted transition-colors","aria-label":"Retry last message",children:[(0,r.jsx)(B,{}),"Retry last message"]})}),m.length>0&&(0,r.jsx)("div",{className:"space-y-2 py-2",children:m.map(e=>(0,r.jsx)(et,{msg:e,onForceSend:()=>null==h?void 0:h(e.id),onEdit:t=>null==p?void 0:p(e.id,t),onDelete:()=>null==f?void 0:f(e.id)},e.id))}),(0,r.jsx)("div",{ref:b,className:"h-4"})]})}),!j&&T.length>0&&(0,r.jsxs)("button",{onClick:N,"aria-label":"Scroll to bottom",className:"absolute bottom-3 left-1/2 -translate-x-1/2 z-10 flex items-center gap-1.5 px-3 py-1.5 rounded-full bg-bg-elevated border border-border text-text-muted hover:text-text-secondary text-[11px] shadow-lg transition-colors",children:[(0,r.jsx)(R,{}),"Scroll to bottom"]})]})}let er=[{id:"agent",label:"Agent"},{id:"ask",label:"Ask"},{id:"plan",label:"Plan"}];function en(e){var t;let{onSend:s,onStop:l,isStreaming:o,selectedModel:i,selectedMode:c,onModelChange:x,onModeChange:u}=e,[m,h]=(0,n.useState)(""),[p,f]=(0,n.useState)(!1),[g,b]=(0,n.useState)([]),[j,v]=(0,n.useState)(!0),y=(0,n.useRef)(null),N=a();(0,n.useEffect)(()=>{let e=!1;return d("/api/models").then(e=>e.json()).then(t=>{var s;!e&&(null==(s=t.models)?void 0:s.length)>0&&b(t.models)}).catch(e=>console.error("[models] Failed to fetch:",e)).finally(()=>{e||v(!1)}),()=>{e=!0}},[]);let k=(0,n.useCallback)(()=>{let e=m.trim();e&&(N.send(),s(e),h(""),y.current&&(y.current.style.height="auto"))},[m,s,N]),C=(0,n.useCallback)(()=>{N.tap(),null==l||l()},[l,N]),E=(null==(t=g.find(e=>e.id===i))?void 0:t.label)||i,W=g.find(e=>"auto"===e.id),T=g.filter(e=>"auto"!==e.id);return(0,r.jsx)("div",{className:"shrink-0 bg-bg px-4 py-3 safe-bottom",children:(0,r.jsx)("div",{className:"max-w-3xl mx-auto",children:(0,r.jsxs)("div",{className:"relative bg-bg-surface border border-border rounded-xl focus-within:border-text-muted/40 transition-colors",children:[(0,r.jsx)("textarea",{ref:y,value:m,onChange:e=>{h(e.target.value);let t=e.target;t.style.height="auto",t.style.height=Math.min(t.scrollHeight,160)+"px"},onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),k())},placeholder:o?"Type to queue a message...":"Ask Cursor anything...","aria-label":"Message input",rows:1,className:"w-full resize-none bg-transparent px-3.5 pt-2.5 pb-1 pr-10 text-[13px] text-text placeholder:text-text-muted focus:outline-none"}),(0,r.jsxs)("div",{className:"flex items-center justify-between px-2 pb-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1",role:"radiogroup","aria-label":"Agent mode",children:[er.map(e=>(0,r.jsx)("button",{role:"radio","aria-checked":c===e.id,onClick:()=>{N.select(),u(e.id)},className:"px-3 py-1.5 rounded text-[12px] font-medium transition-colors ".concat(c===e.id?"bg-bg-active text-text":"text-text-muted hover:text-text-secondary hover:bg-bg-hover"),children:e.label},e.id)),(0,r.jsx)("span",{className:"hidden sm:inline text-[10px] text-text-muted/50 ml-2 select-none",children:"Enter ↵ send \xb7 Shift+Enter newline"})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsxs)("button",{onClick:()=>{N.tap(),f(!p)},"aria-haspopup":"listbox","aria-expanded":p,"aria-label":"Select model",className:"flex items-center gap-1 px-3 py-1.5 rounded text-[12px] text-text-muted hover:text-text-secondary hover:bg-bg-hover transition-colors",children:[j?(0,r.jsx)(z,{className:"w-2.5 h-2.5"}):(0,r.jsx)("span",{className:"truncate max-w-[150px]",children:E}),(0,r.jsx)(w,{})]}),p&&g.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"fixed inset-0 z-40",onClick:()=>f(!1)}),(0,r.jsxs)("div",{role:"listbox","aria-label":"Models",className:"absolute bottom-full right-0 mb-1 z-50 w-56 bg-bg-elevated border border-border rounded-lg shadow-xl py-1 max-h-80 overflow-y-auto",children:[W&&(0,r.jsx)(el,{model:W,selected:i===W.id,onSelect:()=>{x(W.id),f(!1)}},W.id),T.length>0&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"h-px bg-border mx-2 my-1"}),T.map(e=>(0,r.jsx)(el,{model:e,selected:i===e.id,onSelect:()=>{x(e.id),f(!1)}},e.id))]})]})]})]}),o&&(0,r.jsx)("button",{onClick:C,className:"p-2 rounded-md text-text-muted hover:text-text transition-colors","aria-label":"Stop streaming",children:(0,r.jsx)(I,{})}),(0,r.jsx)("button",{onClick:k,disabled:!m.trim(),className:"p-2 rounded-md text-text-muted hover:text-text disabled:opacity-20 disabled:cursor-not-allowed transition-colors","aria-label":o?"Queue message":"Send message",children:o?(0,r.jsx)(S,{size:18}):(0,r.jsx)(L,{})})]})]})]})})})}function el(e){let{model:t,selected:s,onSelect:n}=e,l=a();return(0,r.jsxs)("button",{role:"option","aria-selected":s,onClick:()=>{l.select(),n()},className:"w-full text-left px-3 py-1.5 text-[12px] flex items-center justify-between gap-2 transition-colors ".concat(s?"text-text bg-bg-active":"text-text-secondary hover:bg-bg-hover hover:text-text"),children:[(0,r.jsx)("span",{className:"truncate",children:t.label}),(0,r.jsxs)("span",{className:"flex items-center gap-1 shrink-0",children:[t.isDefault&&(0,r.jsx)("span",{className:"text-[9px] px-1 py-px rounded bg-bg-hover text-text-secondary font-medium",children:"default"}),t.isCurrent&&(0,r.jsx)("span",{className:"text-[9px] px-1 py-px rounded bg-success/15 text-success font-medium",children:"current"})]})]})}function ea(e){let{initialSessionId:t,onLabelChange:s,onStreamingChange:l,onSessionIdChange:o,onSelectSession:i,onOpenSidebar:c,onOpenSettings:g,onOpenQr:b}=e,{messages:j,toolCalls:v,sessionId:y,isStreaming:N,isLoadingHistory:k,isWatching:w,model:C,selectedModel:S,selectedMode:E,error:W,sendMessage:A,loadSession:M,setSelectedModel:R,setSelectedMode:L,stopStreaming:I,retryLastMessage:z,queuedMessages:B,forceSendQueued:O,editQueued:D,deleteQueued:F}=function(){let[e,t]=(0,n.useState)(null),[s,r]=(0,n.useState)(!1),[l,a]=(0,n.useState)(!1),[o,i]=(0,n.useState)(null),[c,m]=(0,n.useState)("auto"),[h,p]=(0,n.useState)("agent"),[f,g]=(0,n.useState)(null),b=(0,n.useRef)(null),j=(0,n.useRef)(!1),v=(0,n.useRef)(void 0);(0,n.useEffect)(()=>{b.current=e},[e]),(0,n.useEffect)(()=>{j.current=s},[s]);let y=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},[t,s]=(0,n.useState)([]),[r,l]=(0,n.useState)([]),[a,o]=(0,n.useState)(!1),[i,c]=(0,n.useState)(!1),x=(0,n.useRef)(null),u=(0,n.useRef)(0),m=(0,n.useRef)(e.onStreamEnd),h=(0,n.useRef)(e.onStreamStart);(0,n.useEffect)(()=>{m.current=e.onStreamEnd},[e.onStreamEnd]),(0,n.useEffect)(()=>{h.current=e.onStreamStart},[e.onStreamStart]);let p=(0,n.useCallback)(()=>{x.current&&(x.current.close(),x.current=null),o(!1)},[]),f=(0,n.useCallback)(e=>{if(e.modifiedAt&&e.modifiedAt>u.current){var t,r;u.current=e.modifiedAt,(null==(t=e.messages)?void 0:t.length)>0&&s(e.messages),(null==(r=e.toolCalls)?void 0:r.length)>0&&l(e.toolCalls)}},[]),g=(0,n.useCallback)(e=>{p();let t=new EventSource("/api/sessions/watch?id=".concat(encodeURIComponent(e)));x.current=t,t.addEventListener("connected",e=>{o(!0);try{var t,r,n;let a=JSON.parse(e.data);!0===a.isActive?(c(!0),null==(n=h.current)||n.call(h)):c(!1),a.modifiedAt&&(u.current=a.modifiedAt),(null==(t=a.messages)?void 0:t.length)>0&&s(a.messages),(null==(r=a.toolCalls)?void 0:r.length)>0&&l(a.toolCalls)}catch(e){console.error("[watch] Failed to parse connected event")}}),t.addEventListener("update",e=>{try{let s=JSON.parse(e.data);if(f(s),!1===s.isActive){var t;c(!1),null==(t=m.current)||t.call(m)}else!0===s.isActive&&c(!0)}catch(e){console.error("[watch] Failed to parse update event")}}),t.addEventListener("error",()=>{})},[p,f]),b=(0,n.useCallback)(async e=>{try{var t,r;let n=await d("/api/sessions/history?id=".concat(encodeURIComponent(e)));if(!n.ok)return;let a=await n.json();(null==(t=a.messages)?void 0:t.length)>0&&s(a.messages),(null==(r=a.toolCalls)?void 0:r.length)>0&&l(a.toolCalls),a.modifiedAt&&(u.current=a.modifiedAt)}catch(e){console.error("[watch] Failed to refresh from history")}},[]),j=(0,n.useCallback)(()=>{s([]),l([]),c(!1),u.current=0},[]);return(0,n.useEffect)(()=>()=>{p()},[p]),{messages:t,setMessages:s,toolCalls:r,setToolCalls:l,isWatching:a,isActive:i,setIsActive:c,startWatching:g,stopWatching:p,refreshFromHistory:b,resetState:j,lastModifiedRef:u}}({onStreamEnd:(0,n.useCallback)(()=>{r(!1);let e=N.dequeueNext();if(e){let t=e.model||e.mode?{model:e.model,mode:e.mode}:void 0;setTimeout(()=>{var s;null==(s=v.current)||s.call(v,e.content,t)},0)}},[]),onStreamStart:(0,n.useCallback)(()=>r(!0),[])}),N=function(e){let{selectedModel:t,selectedMode:s}=e,[r,l]=(0,n.useState)([]),a=(0,n.useRef)([]);(0,n.useEffect)(()=>{a.current=r},[r]);let o=(0,n.useCallback)(e=>{let r={id:x(),content:e,timestamp:Date.now(),model:t,mode:s};l(e=>[...e,r])},[t,s]),i=(0,n.useCallback)(()=>{let e=a.current;if(0===e.length)return null;let t=e[0];return l(e=>e.slice(1)),t},[]),c=(0,n.useCallback)(e=>{let t=a.current.find(t=>t.id===e);return t?(l(t=>t.filter(t=>t.id!==e)),t):null},[]),d=(0,n.useCallback)((e,t)=>{l(s=>s.map(s=>s.id===e?{...s,content:t}:s))},[]);return{queuedMessages:r,enqueue:o,dequeueNext:i,forceSendQueued:c,editQueued:d,deleteQueued:(0,n.useCallback)(e=>{l(t=>t.filter(t=>t.id!==e))},[]),clearQueue:(0,n.useCallback)(()=>{l([])},[])}}({selectedModel:c,selectedMode:h}),k=(0,n.useCallback)(()=>{y.stopWatching(),y.resetState(),t(null),i(null),g(null),r(!1),N.clearQueue()},[y,N]),w=(0,n.useCallback)(()=>{b.current&&d("/api/sessions/active",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:b.current})}).catch(e=>console.error("[chat] Failed to stop streaming:",e)),r(!1)},[]),C=(0,n.useCallback)(async e=>{y.stopWatching(),y.resetState(),a(!0),g(null),t(e);try{await y.refreshFromHistory(e),y.startWatching(e),(await u()).includes(e)&&r(!0)}catch(e){g(e instanceof Error?e.message:"Failed to load session")}finally{a(!1)}},[y]),S=(0,n.useCallback)(async(e,s)=>{var n,l,a;if(j.current)return void N.enqueue(e);y.stopWatching(),g(null),r(!0);let o={id:x(),role:"user",content:e,timestamp:Date.now()};y.setMessages(e=>[...e,o]);let u=null!=(n=null==s?void 0:s.model)?n:c,m=null!=(l=null==s?void 0:s.mode)?l:h;try{let s=await d("/api/chat",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({prompt:e,sessionId:null!=(a=b.current)?a:void 0,model:"auto"!==u?u:void 0,mode:"agent"!==m?m:void 0})});if(!s.ok){let e=await s.json();throw Error(e.error||"HTTP ".concat(s.status))}let r=await s.json(),n=r.sessionId;b.current=n,t(n),r.model&&i(r.model),y.startWatching(n)}catch(e){if(e instanceof Error&&"AbortError"===e.name)return;g(e instanceof Error?e.message:"Unknown error"),r(!1)}},[c,h,y,N]);(0,n.useEffect)(()=>{v.current=S},[S]),(0,n.useEffect)(()=>{let e=async()=>{if("visible"!==document.visibilityState)return;let e=b.current;if(e)try{await y.refreshFromHistory(e);let t=await u();r(t.includes(e)),g(null),y.isWatching||y.startWatching(e)}catch(e){console.error("[chat] Failed to refresh on visibility change")}};return document.addEventListener("visibilitychange",e),()=>document.removeEventListener("visibilitychange",e)},[y]);let E=(0,n.useCallback)(e=>{let t=N.forceSendQueued(e);if(!t)return;r(!1);let s=t.model||t.mode?{model:t.model,mode:t.mode}:void 0;setTimeout(()=>{var e;null==(e=v.current)||e.call(v,t.content,s)},0)},[N]),W=(0,n.useCallback)(()=>{if(j.current)return;let e=y.messages,t=[...e].reverse().find(e=>"user"===e.role);if(!t)return;let s=t.content,r=e.findIndex(e=>e.id===t.id);r>=0&&y.setMessages(e.slice(0,r)),y.setToolCalls(e=>e.filter(e=>e.timestamp<t.timestamp)),S(s).catch(e=>console.error("[chat] Retry failed:",e))},[y,S]);return{messages:y.messages,toolCalls:y.toolCalls,sessionId:e,isStreaming:s,isLoadingHistory:l,isWatching:y.isWatching,model:o,selectedModel:c,selectedMode:h,error:f,queuedMessages:N.queuedMessages,sendMessage:S,loadSession:C,setSessionId:t,setSelectedModel:m,setSelectedMode:p,clearChat:k,stopStreaming:w,retryLastMessage:W,forceSendQueued:E,editQueued:N.editQueued,deleteQueued:N.deleteQueued}}(),H=a(),V=function(){let[e,t]=(0,n.useState)(m),s=(0,n.useRef)(!1),r=(0,n.useCallback)(async()=>{if(!s.current&&"serviceWorker"in navigator&&"PushManager"in window)try{let e=await navigator.serviceWorker.ready;if(await e.pushManager.getSubscription()){s.current=!0;return}let t=await d("/api/push/vapid-key");if(!t.ok)return;let{publicKey:r}=await t.json(),n=await e.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),s=atob((e+t).replace(/-/g,"+").replace(/_/g,"/")),r=new ArrayBuffer(s.length),n=new Uint8Array(r);for(let e=0;e<s.length;e++)n[e]=s.charCodeAt(e);return r}(r)});await d("/api/push/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(n.toJSON())}),s.current=!0}catch(e){console.error("[push] Subscription failed:",e)}},[]);return{permission:e,requestPermission:(0,n.useCallback)(async()=>{if("undefined"==typeof Notification)return;if("default"!==Notification.permission){t(Notification.permission),"granted"===Notification.permission&&r();return}let e=await Notification.requestPermission();t(e),"granted"===e&&r()},[r]),notify:(0,n.useCallback)((e,t)=>{"undefined"!=typeof Notification&&"granted"===Notification.permission&&document.hidden&&"serviceWorker"in navigator&&navigator.serviceWorker.ready.then(s=>{var r;null==(r=s.active)||r.postMessage({type:"SHOW_NOTIFICATION",title:e,options:{icon:"/icon-192.png",...t}})}).catch(e=>console.error("[notifications] SW notify failed:",e))},[])}}(),q=function(){let e=(0,n.useRef)(null);return{playComplete:(0,n.useCallback)(()=>{if(h())return;let t=p(e);if(!t)return;let s=t.currentTime;f(t,880,s,.12,.15),f(t,1174.66,s+.1,.18,.12)},[]),playError:(0,n.useCallback)(()=>{if(h())return;let t=p(e);if(!t)return;let s=t.currentTime;f(t,330,s,.2,.15),f(t,220,s+.15,.25,.12)},[])}}(),[Q,_]=(0,n.useState)(""),[U,J]=(0,n.useState)([]),K=(0,n.useRef)(0),G=(0,n.useRef)(!1),Y=(0,n.useRef)(!1),$=(0,n.useRef)(0);(0,n.useEffect)(()=>{t&&!G.current&&(G.current=!0,M(t))},[t,M]);let X=(0,n.useCallback)(()=>{d("/api/info").then(e=>e.json()).then(e=>_(e.workspace||"")).catch(e=>console.error("[workspace] Failed to fetch:",e))},[]);(0,n.useEffect)(()=>{X(),d("/api/sessions").then(e=>e.json()).then(e=>{var t;(null==(t=e.sessions)?void 0:t.length)>0&&J(e.sessions.slice(0,3))}).catch(e=>console.error("[sessions] Failed to fetch:",e))},[X]),(0,n.useEffect)(()=>{let e=j.filter(e=>"assistant"===e.role).length;e>K.current&&e>0&&H.tap(),K.current=e},[j,H]),(0,n.useEffect)(()=>{if(N&&!Y.current&&($.current=Date.now(),V.requestPermission()),Y.current&&!N){let e=Date.now()-$.current>3e3;if(W)V.notify("Agent error",{body:W}),(e||document.hidden)&&q.playError();else{let t=[...j].reverse().find(e=>"assistant"===e.role);V.notify("Agent finished",{body:(null==t?void 0:t.content.slice(0,80))||"Response complete"}),(e||document.hidden)&&q.playComplete()}}Y.current=N,null==l||l(N)},[N,W]),(0,n.useEffect)(()=>{null==o||o(y)},[y]),(0,n.useEffect)(()=>{let e=j.find(e=>"user"===e.role);e&&(null==s||s(e.content.slice(0,50)))},[j]);let Z=Q.split("/").filter(Boolean).pop()||"~";return(0,r.jsxs)("div",{className:"h-full flex flex-col",children:[(0,r.jsxs)("header",{className:"shrink-0 flex items-center justify-between h-11 px-3 border-b border-border",children:[(0,r.jsxs)("div",{className:"flex items-center gap-2",children:[(0,r.jsx)("button",{onClick:()=>{H.tap(),null==c||c()},"aria-label":"Open session sidebar",className:"p-2 rounded-md hover:bg-bg-hover transition-colors text-text-muted hover:text-text-secondary",children:(0,r.jsx)(T,{})}),(0,r.jsx)("span",{className:"text-[13px] font-medium text-text-secondary",children:Z}),C&&N&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:"text-text-muted text-[11px]",children:"/"}),(0,r.jsx)("span",{className:"text-[11px] text-text-muted truncate max-w-[120px]",children:C})]})]}),(0,r.jsxs)("div",{className:"flex items-center gap-1",children:[y&&(0,r.jsx)("span",{className:"text-[10px] text-text-muted font-mono mr-1 hidden sm:inline opacity-60",children:y.slice(0,8)}),(0,r.jsx)("button",{onClick:()=>{H.tap(),null==g||g()},className:"p-2 rounded-md hover:bg-bg-hover transition-colors text-text-muted hover:text-text-secondary","aria-label":"Settings",children:(0,r.jsx)(P,{size:16})}),(0,r.jsx)("button",{onClick:()=>{H.tap(),null==b||b()},className:"p-2 rounded-md hover:bg-bg-hover transition-colors text-text-muted hover:text-text-secondary","aria-label":"Connect device",children:(0,r.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,r.jsx)("rect",{x:"3",y:"3",width:"7",height:"7",rx:"1"}),(0,r.jsx)("rect",{x:"14",y:"3",width:"7",height:"7",rx:"1"}),(0,r.jsx)("rect",{x:"3",y:"14",width:"7",height:"7",rx:"1"}),(0,r.jsx)("rect",{x:"14",y:"14",width:"3",height:"3"}),(0,r.jsx)("line",{x1:"21",y1:"14",x2:"21",y2:"14.01"}),(0,r.jsx)("line",{x1:"21",y1:"21",x2:"21",y2:"21.01"})]})})]})]}),W&&(0,r.jsx)("div",{className:"shrink-0 px-4 py-2 border-b border-error/20 text-error text-[12px] bg-error/5",children:W}),(0,r.jsx)(es,{messages:j,toolCalls:v,isStreaming:N,isLoadingHistory:k,isWatching:w,recentSessions:U,onSelectSession:null!=i?i:M,onRetry:z,queuedMessages:B,onForceSend:O,onEditQueued:D,onDeleteQueued:F}),(0,r.jsx)(en,{onSend:A,onStop:I,isStreaming:N,selectedModel:S,selectedMode:E,onModelChange:R,onModeChange:L})]})}function eo(e){let{status:t}=e;return"streaming"===t?(0,r.jsx)("span",{className:"shrink-0 w-2 h-2 rounded-full border-[1.5px] border-success border-t-transparent animate-spin"}):(0,r.jsx)("span",{className:"shrink-0 w-1.5 h-1.5 rounded-full bg-text-muted/40"})}function ei(e){let{open:t,onClose:s,currentSessionId:l,onSelectSession:o,onNewSession:i,activeStatuses:c={}}=e,[x,u]=(0,n.useState)([]),[m,h]=(0,n.useState)(!1),[p,f]=(0,n.useState)(!1),[b,j]=(0,n.useState)(null),[v,y]=(0,n.useState)(null),N=a(),k=(0,n.useCallback)(()=>(y(null),d("/api/sessions"+(p?"?all=true":"")).then(e=>e.json()).then(e=>u(e.sessions||[])).catch(()=>y("Failed to load sessions"))),[p]);(0,n.useEffect)(()=>{if(!t)return;let e=!1;return h(!0),j(null),k().finally(()=>{e||h(!1)}),()=>{e=!0}},[t,k]);let w=(e,t)=>{e.stopPropagation(),b===t?(N.error(),d("/api/sessions",{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify({sessionId:t})}).then(()=>k()).catch(()=>y("Failed to delete session")).finally(()=>j(null))):(N.warn(),j(t))},E=e=>{e.stopPropagation(),j(null)};return(0,r.jsxs)(r.Fragment,{children:[t&&(0,r.jsx)("div",{className:"fixed inset-0 z-40 bg-black/60","aria-hidden":"true",onClick:s}),(0,r.jsxs)("div",{role:"dialog","aria-label":"Session history","aria-hidden":!t,className:"fixed top-0 left-0 z-50 h-full w-[280px] bg-bg-elevated border-r border-border transform transition-transform duration-150 flex flex-col ".concat(t?"translate-x-0":"-translate-x-full"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between h-11 px-3 border-b border-border shrink-0",children:[(0,r.jsx)("span",{className:"text-[13px] font-medium text-text-secondary",children:"Sessions"}),(0,r.jsxs)("div",{className:"flex items-center gap-0.5",children:[(0,r.jsx)("button",{onClick:()=>{N.tap(),h(!0),k().finally(()=>h(!1))},disabled:m,"aria-label":"Refresh sessions",className:"p-1 rounded-md hover:bg-bg-hover text-text-muted hover:text-text-secondary transition-colors disabled:opacity-40",children:(0,r.jsx)(M,{size:14,className:m?"animate-spin":""})}),(0,r.jsx)("button",{onClick:s,"aria-label":"Close sidebar",className:"p-1 rounded-md hover:bg-bg-hover text-text-muted hover:text-text-secondary transition-colors",children:(0,r.jsx)(C,{size:14})})]})]}),(0,r.jsxs)("div",{className:"px-2 pt-2 pb-1 space-y-1 shrink-0",children:[(0,r.jsxs)("button",{onClick:()=>{i(),s()},className:"w-full flex items-center gap-2 px-2.5 py-1.5 rounded-md text-[12px] text-text-muted hover:text-text-secondary hover:bg-bg-hover transition-colors",children:[(0,r.jsx)(S,{}),"New session"]}),(0,r.jsxs)("button",{onClick:()=>{N.tap(),f(e=>!e)},"aria-pressed":p,className:"w-full flex items-center gap-2 px-2.5 py-1.5 rounded-md text-[12px] transition-colors ".concat(p?"text-text bg-bg-active":"text-text-muted hover:text-text-secondary hover:bg-bg-hover"),children:[(0,r.jsx)(D,{}),"All workspaces"]})]}),(0,r.jsxs)("div",{className:"overflow-y-auto flex-1 px-2 pb-2",children:[v&&(0,r.jsx)("div",{className:"mx-1 mb-2 px-2.5 py-2 rounded-md bg-error/10 text-error text-[11px]",children:v}),m?(0,r.jsx)("div",{className:"flex items-center gap-2 justify-center py-8 text-text-muted text-[12px]",children:(0,r.jsx)(z,{})}):0!==x.length||v?x.map(e=>{let t=c[e.id];return(0,r.jsxs)("div",{className:"relative mb-px",children:[(0,r.jsxs)("button",{onClick:()=>{N.select(),o(e.id),s()},"aria-current":e.id===l?"true":void 0,className:"group w-full text-left px-2.5 py-2 rounded-md transition-colors ".concat(e.id===l?"bg-bg-active text-text":"hover:bg-bg-hover text-text-secondary"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,r.jsxs)("div",{className:"flex items-center gap-1.5 flex-1 min-w-0 pr-5",children:[t&&(0,r.jsx)(eo,{status:t}),(0,r.jsx)("p",{className:"text-[12px] truncate",children:e.title})]}),(0,r.jsx)("span",{className:"text-[10px] text-text-muted shrink-0",children:g(e.updatedAt)})]}),p&&(0,r.jsx)("p",{className:"text-[10px] text-text-muted mt-0.5 font-mono truncate",children:e.workspace.split("/").pop()})]}),b===e.id?(0,r.jsxs)("div",{className:"absolute top-1 right-1 flex items-center gap-1",children:[(0,r.jsx)("button",{onClick:t=>w(t,e.id),className:"px-2 py-1 rounded text-[10px] font-medium bg-error/15 text-error hover:bg-error/25 transition-colors",children:"Delete"}),(0,r.jsx)("button",{onClick:E,"aria-label":"Cancel delete",className:"p-1 rounded text-text-muted hover:text-text-secondary hover:bg-bg-hover transition-colors",children:(0,r.jsx)(C,{size:10})})]}):(0,r.jsx)("button",{onClick:t=>w(t,e.id),"aria-label":"Delete session",className:"absolute top-1 right-1 p-1.5 rounded opacity-0 group-hover:opacity-100 hover:bg-bg-surface text-text-muted hover:text-error transition-all",children:(0,r.jsx)(A,{})})]},e.id)}):(0,r.jsx)("p",{className:"text-text-muted text-[12px] text-center py-8",children:"No sessions"})]})]})]})}let ec={trust:!0,notifications:!0,sound:!0},ed={trust:{label:"Workspace trust",description:"Allow the agent to execute code and edit files without asking"},notifications:{label:"Notifications",description:"Show browser notifications when the agent finishes"},sound:{label:"Sound effects",description:"Play sounds on completion and errors"}};function ex(e){let{open:t,onClose:s}=e,[l,a]=(0,n.useState)(ec),[o,i]=(0,n.useState)(!0);(0,n.useEffect)(()=>{if(!t)return;let e=!1;return i(!0),d("/api/settings").then(e=>e.json()).then(t=>{e||a({...ec,...t.settings})}).catch(()=>{}).finally(()=>{e||i(!1)}),()=>{e=!0}},[t]);let c=(0,n.useCallback)(e=>{a(t=>{let s={...t,[e]:!t[e]};return d("/api/settings",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({[e]:s[e]})}).catch(()=>{a(t)}),s})},[]);return(0,r.jsxs)(r.Fragment,{children:[t&&(0,r.jsx)("div",{className:"fixed inset-0 z-40 bg-black/60","aria-hidden":"true",onClick:s}),(0,r.jsxs)("div",{role:"dialog","aria-label":"Settings","aria-hidden":!t,className:"fixed top-0 right-0 z-50 h-full w-[300px] bg-bg-elevated border-l border-border transform transition-transform duration-150 flex flex-col ".concat(t?"translate-x-0":"translate-x-full"),children:[(0,r.jsxs)("div",{className:"flex items-center justify-between h-11 px-3 border-b border-border shrink-0",children:[(0,r.jsx)("span",{className:"text-[13px] font-medium text-text-secondary",children:"Settings"}),(0,r.jsx)("button",{onClick:s,"aria-label":"Close settings",className:"p-1 rounded-md hover:bg-bg-hover text-text-muted hover:text-text-secondary transition-colors",children:(0,r.jsx)(C,{size:14})})]}),(0,r.jsx)("div",{className:"overflow-y-auto flex-1 p-3 space-y-1",children:o?(0,r.jsx)("div",{className:"flex justify-center py-8",children:(0,r.jsx)("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-text-muted border-t-transparent animate-spin"})}):Object.keys(ed).map(e=>(0,r.jsxs)("button",{onClick:()=>c(e),className:"w-full flex items-center justify-between gap-3 px-3 py-2.5 rounded-md hover:bg-bg-hover transition-colors text-left",children:[(0,r.jsxs)("div",{className:"min-w-0",children:[(0,r.jsx)("p",{className:"text-[12px] text-text",children:ed[e].label}),(0,r.jsx)("p",{className:"text-[11px] text-text-muted mt-0.5 leading-tight",children:ed[e].description})]}),(0,r.jsx)("div",{className:"shrink-0 w-8 h-[18px] rounded-full transition-colors relative ".concat(l[e]?"bg-success":"bg-bg-active"),children:(0,r.jsx)("div",{className:"absolute top-[2px] w-[14px] h-[14px] rounded-full bg-white transition-transform ".concat(l[e]?"translate-x-[16px]":"translate-x-[2px]")})})]},e))})]})]})}var eu=s(2834);function em(e){let{open:t,onClose:s}=e,[l,a]=(0,n.useState)(null),[o,i]=(0,n.useState)(null);return((0,n.useEffect)(()=>{if(!t)return;let e=!1;return d("/api/info").then(e=>e.json()).then(t=>{e||a(t)}).catch(()=>{e||i("Could not load network info")}),()=>{e=!0,a(null),i(null)}},[t]),t)?(0,r.jsx)("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black/80",onClick:s,children:(0,r.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":"Connect device via QR code",className:"bg-bg-elevated border border-border rounded-xl p-6 max-w-xs w-full mx-4 text-center",onClick:e=>e.stopPropagation(),children:[(0,r.jsx)("p",{className:"text-[13px] font-medium text-text mb-1",children:"Connect device"}),(0,r.jsx)("p",{className:"text-[12px] text-text-muted mb-5",children:"Scan from any device on your network"}),l?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"bg-white rounded-lg p-3 inline-block mb-3",children:(0,r.jsx)(eu.h,{value:l.authUrl,size:180})}),(0,r.jsx)("p",{className:"font-mono text-[12px] text-text-secondary",children:l.url})]}):o?(0,r.jsx)("div",{className:"py-10 text-error text-[12px]",children:o}):(0,r.jsx)("div",{className:"py-10 text-text-muted text-[12px]",children:(0,r.jsx)(z,{className:"w-3.5 h-3.5"})}),(0,r.jsx)("button",{onClick:s,className:"mt-4 w-full py-1.5 rounded-lg text-[12px] text-text-muted hover:text-text-secondary transition-colors",children:"Close"})]})}):null}var eh=s(5932);function ep(e){return{id:x(),sessionId:null,label:e?"Loading...":"New chat",isStreaming:!1,initialSessionId:e}}function ef(){var e,t;let[s,l]=(0,n.useState)(()=>[ep()]),[o,i]=(0,n.useState)(()=>s[0].id),[c,d]=(0,n.useState)(!1),[x,m]=(0,n.useState)(!1),[h,p]=(0,n.useState)(!1),f=a(),g=(0,n.useRef)(!1);(0,n.useEffect)(()=>{g.current||(g.current=!0,u().then(e=>{0!==e.length&&l(t=>{let s=[...t],r=null;for(let t=0;t<e.length;t++){let n=e[t];if(s.some(e=>e.initialSessionId===n||e.sessionId===n))continue;let l=ep(n);0!==t||1!==s.length||s[0].sessionId||s[0].isStreaming?(s.push(l),r||(r=l.id)):(s[0]=l,r=l.id)}if(r){let e=r;setTimeout(()=>i(e),0)}return s})}))},[]);let b=(0,n.useMemo)(()=>{let e={};for(let t of s)t.sessionId&&(e[t.sessionId]=t.isStreaming?"streaming":"idle");return e},[s]),j=(0,n.useCallback)(()=>{f.tap();let e=s.find(e=>e.id===o);if(e&&!e.sessionId&&!e.isStreaming)return;let t=ep();l(e=>[...e,t]),i(t.id)},[f,s,o]),v=(0,n.useCallback)(e=>{let t=s.find(t=>t.sessionId===e);if(t)return void i(t.id);let r=ep(e),n=s.find(e=>e.id===o);!n||n.sessionId||n.isStreaming?l(e=>[...e,r]):l(e=>e.map(e=>e.id===o?r:e)),i(r.id)},[s,o]),y=(0,n.useCallback)((e,t)=>{l(s=>{let r=s.find(t=>t.id===e);return r&&r.label!==t?s.map(s=>s.id===e?{...s,label:t}:s):s})},[]),N=(0,n.useCallback)((e,t)=>{l(s=>{let r=s.find(t=>t.id===e);return r&&r.isStreaming!==t?s.map(s=>s.id===e?{...s,isStreaming:t}:s):s})},[]),k=(0,n.useCallback)((e,t)=>{l(s=>{let r=s.find(t=>t.id===e);return r&&r.sessionId!==t?s.map(s=>s.id===e?{...s,sessionId:t}:s):s})},[]),w=null!=(t=null==(e=s.find(e=>e.id===o))?void 0:e.sessionId)?t:null;return(0,r.jsxs)("div",{className:"h-dvh",children:[s.map(e=>(0,r.jsx)("div",{className:e.id===o?"h-full":"hidden",children:(0,r.jsx)(eh.ErrorBoundary,{fallback:"inline",children:(0,r.jsx)(ea,{initialSessionId:e.initialSessionId,onLabelChange:t=>y(e.id,t),onStreamingChange:t=>N(e.id,t),onSessionIdChange:t=>k(e.id,t),onSelectSession:v,onOpenSidebar:()=>d(!0),onOpenSettings:()=>m(!0),onOpenQr:()=>p(!0)})})},e.id)),(0,r.jsx)(ei,{open:c,onClose:()=>d(!1),currentSessionId:w,onSelectSession:v,onNewSession:j,activeStatuses:b}),(0,r.jsx)(ex,{open:x,onClose:()=>m(!1)}),(0,r.jsx)(em,{open:h,onClose:()=>p(!1)})]})}}},e=>{e.O(0,[481,391,441,255,358],()=>e(e.s=2673)),_N_E=e.O()}]);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
/*! tailwindcss v4.2.1 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,::backdrop,:after,:before{--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-duration:initial}}}@layer theme{:host,:root{--font-sans:"Inter",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,sans-serif;--font-mono:"SF Mono","Fira Code","Fira Mono",Menlo,Consolas,monospace;--color-red-400:oklch(70.4% .191 22.216);--color-green-400:oklch(79.2% .209 151.711);--color-black:#000;--color-white:#fff;--spacing:.25rem;--container-xs:20rem;--container-sm:24rem;--container-3xl:48rem;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wider:.05em;--leading-tight:1.25;--leading-relaxed:1.625;--radius-md:.375rem;--radius-lg:.5rem;--radius-xl:.75rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4,0,.6,1) infinite;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4,0,.2,1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono);--color-bg:#000;--color-bg-elevated:#0a0a0a;--color-bg-surface:#111;--color-bg-hover:#1a1a1a;--color-bg-active:#222;--color-border:#1e1e1e;--color-text:#e8e8e8;--color-text-secondary:#999;--color-text-muted:#555;--color-accent:#e8e8e8;--color-success:#3dd68c;--color-error:#ef4444}}@layer base{*,::backdrop,:after,:before{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}:host,html{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,pre,samp{font-family:var(--default-mono-font-family,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}menu,ol,ul{list-style:none}audio,canvas,embed,iframe,img,object,svg,video{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,optgroup,select,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit,::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-day-field,::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-hour-field,::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-millisecond-field,::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.inset-0{inset:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.top-0{top:calc(var(--spacing) * 0)}.top-1{top:calc(var(--spacing) * 1)}.top-2{top:calc(var(--spacing) * 2)}.top-\[2px\]{top:2px}.right-0{right:calc(var(--spacing) * 0)}.right-1{right:calc(var(--spacing) * 1)}.bottom-3{bottom:calc(var(--spacing) * 3)}.bottom-full{bottom:100%}.left-0{left:calc(var(--spacing) * 0)}.left-1\/2{left:50%}.z-10{z-index:10}.z-40{z-index:40}.z-50{z-index:50}.mx-1{margin-inline:calc(var(--spacing) * 1)}.mx-2{margin-inline:calc(var(--spacing) * 2)}.mx-4{margin-inline:calc(var(--spacing) * 4)}.mx-auto{margin-inline:auto}.my-1{margin-block:calc(var(--spacing) * 1)}.my-1\.5{margin-block:calc(var(--spacing) * 1.5)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-3{margin-block:calc(var(--spacing) * 3)}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mr-1{margin-right:calc(var(--spacing) * 1)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:calc(var(--spacing) * 1)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-px{margin-bottom:1px}.ml-2{margin-left:calc(var(--spacing) * 2)}.ml-5{margin-left:calc(var(--spacing) * 5)}.ml-auto{margin-left:auto}.flex{display:flex}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.table{display:table}.h-1\.5{height:calc(var(--spacing) * 1.5)}.h-2{height:calc(var(--spacing) * 2)}.h-2\.5{height:calc(var(--spacing) * 2.5)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-11{height:calc(var(--spacing) * 11)}.h-\[14px\]{height:14px}.h-\[18px\]{height:18px}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-\[300px\]{max-height:300px}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\.5{width:calc(var(--spacing) * 2.5)}.w-3{width:calc(var(--spacing) * 3)}.w-3\.5{width:calc(var(--spacing) * 3.5)}.w-8{width:calc(var(--spacing) * 8)}.w-56{width:calc(var(--spacing) * 56)}.w-\[14px\]{width:14px}.w-\[280px\]{width:280px}.w-\[300px\]{width:300px}.w-full{width:100%}.max-w-3xl{max-width:var(--container-3xl)}.max-w-\[120px\]{max-width:120px}.max-w-\[150px\]{max-width:150px}.max-w-full{max-width:100%}.max-w-sm{max-width:var(--container-sm)}.max-w-xs{max-width:var(--container-xs)}.min-w-0{min-width:calc(var(--spacing) * 0)}.min-w-full{min-width:100%}.flex-1{flex:1}.shrink-0{flex-shrink:0}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x:calc(calc(1 / 2 * 100%) * -1)}.-translate-x-1\/2,.-translate-x-full{translate:var(--tw-translate-x) var(--tw-translate-y)}.-translate-x-full{--tw-translate-x:-100%}.translate-x-0{--tw-translate-x:calc(var(--spacing) * 0)}.translate-x-0,.translate-x-\[2px\]{translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-\[2px\]{--tw-translate-x:2px}.translate-x-\[16px\]{--tw-translate-x:16px}.translate-x-\[16px\],.translate-x-full{translate:var(--tw-translate-x) var(--tw-translate-y)}.translate-x-full{--tw-translate-x:100%}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.resize-none{resize:none}.list-decimal{list-style-type:decimal}.list-disc{list-style-type:disc}.flex-col{flex-direction:column}.items-center{align-items:center}.items-start{align-items:flex-start}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-3{gap:calc(var(--spacing) * 3)}:where(.space-y-0\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * .5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * .5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border\/50>:not(:last-child)){border-color:#1e1e1e80}@supports (color:color-mix(in lab,red,red)){:where(.divide-border\/50>:not(:last-child)){border-color:color-mix(in oklab,var(--color-border) 50%,transparent)}}.truncate{text-overflow:ellipsis;white-space:nowrap}.overflow-hidden,.truncate{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.overscroll-none{overscroll-behavior:none}.rounded{border-radius:.25rem}.rounded-full{border-radius:3.40282e+38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-md{border-radius:var(--radius-md)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-r{border-right-style:var(--tw-border-style);border-right-width:1px}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-l{border-left-style:var(--tw-border-style);border-left-width:1px}.border-l-2{border-left-style:var(--tw-border-style);border-left-width:2px}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-\[\#2a2a2a\]{border-color:#2a2a2a}.border-border{border-color:var(--color-border)}.border-border\/50{border-color:#1e1e1e80}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--color-border) 50%,transparent)}}.border-error\/20{border-color:#ef444433}@supports (color:color-mix(in lab,red,red)){.border-error\/20{border-color:color-mix(in oklab,var(--color-error) 20%,transparent)}}.border-success{border-color:var(--color-success)}.border-text-muted{border-color:var(--color-text-muted)}.border-text-muted\/25{border-color:#55555540}@supports (color:color-mix(in lab,red,red)){.border-text-muted\/25{border-color:color-mix(in oklab,var(--color-text-muted) 25%,transparent)}}.border-t-transparent{border-top-color:#0000}.bg-\[\#0a0a0b\]{background-color:#0a0a0b}.bg-\[\#0d0d0d\]{background-color:#0d0d0d}.bg-\[\#1c1c1c\]{background-color:#1c1c1c}.bg-bg{background-color:var(--color-bg)}.bg-bg-active{background-color:var(--color-bg-active)}.bg-bg-elevated{background-color:var(--color-bg-elevated)}.bg-bg-hover{background-color:var(--color-bg-hover)}.bg-bg-surface{background-color:var(--color-bg-surface)}.bg-bg-surface\/50{background-color:#11111180}@supports (color:color-mix(in lab,red,red)){.bg-bg-surface\/50{background-color:color-mix(in oklab,var(--color-bg-surface) 50%,transparent)}}.bg-black\/60{background-color:#0009}@supports (color:color-mix(in lab,red,red)){.bg-black\/60{background-color:color-mix(in oklab,var(--color-black) 60%,transparent)}}.bg-black\/80{background-color:#000c}@supports (color:color-mix(in lab,red,red)){.bg-black\/80{background-color:color-mix(in oklab,var(--color-black) 80%,transparent)}}.bg-border{background-color:var(--color-border)}.bg-error\/5{background-color:#ef44440d}@supports (color:color-mix(in lab,red,red)){.bg-error\/5{background-color:color-mix(in oklab,var(--color-error) 5%,transparent)}}.bg-error\/10{background-color:#ef44441a}@supports (color:color-mix(in lab,red,red)){.bg-error\/10{background-color:color-mix(in oklab,var(--color-error) 10%,transparent)}}.bg-error\/15{background-color:#ef444426}@supports (color:color-mix(in lab,red,red)){.bg-error\/15{background-color:color-mix(in oklab,var(--color-error) 15%,transparent)}}.bg-success{background-color:var(--color-success)}.bg-success\/15{background-color:#3dd68c26}@supports (color:color-mix(in lab,red,red)){.bg-success\/15{background-color:color-mix(in oklab,var(--color-success) 15%,transparent)}}.bg-text-muted\/40{background-color:#5556}@supports (color:color-mix(in lab,red,red)){.bg-text-muted\/40{background-color:color-mix(in oklab,var(--color-text-muted) 40%,transparent)}}.bg-transparent{background-color:#0000}.bg-white{background-color:var(--color-white)}.p-1{padding:calc(var(--spacing) * 1)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-6{padding:calc(var(--spacing) * 6)}.px-1{padding-inline:calc(var(--spacing) * 1)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-6{padding-inline:calc(var(--spacing) * 6)}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:calc(var(--spacing) * 1)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-10{padding-block:calc(var(--spacing) * 10)}.py-px{padding-block:1px}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pr-5{padding-right:calc(var(--spacing) * 5)}.pr-10{padding-right:calc(var(--spacing) * 10)}.pb-1{padding-bottom:calc(var(--spacing) * 1)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pl-3{padding-left:calc(var(--spacing) * 3)}.pl-5{padding-left:calc(var(--spacing) * 5)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-\[9px\]{font-size:9px}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-\[12px\]{font-size:12px}.text-\[13px\]{font-size:13px}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[17px\]{font-size:17px}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.7\]{--tw-leading:1.7;line-height:1.7}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.break-words{overflow-wrap:break-word}.break-all{word-break:break-all}.whitespace-pre-wrap{white-space:pre-wrap}.text-\[\#888\]{color:#888}.text-\[\#c9d1d9\]{color:#c9d1d9}.text-\[\#d4d4d4\]{color:#d4d4d4}.text-\[\#e8e8e8\]{color:#e8e8e8}.text-accent{color:var(--color-accent)}.text-error{color:var(--color-error)}.text-green-400\/70{color:#05df72b3}@supports (color:color-mix(in lab,red,red)){.text-green-400\/70{color:color-mix(in oklab,var(--color-green-400) 70%,transparent)}}.text-red-400\/70{color:#ff6568b3}@supports (color:color-mix(in lab,red,red)){.text-red-400\/70{color:color-mix(in oklab,var(--color-red-400) 70%,transparent)}}.text-success{color:var(--color-success)}.text-text{color:var(--color-text)}.text-text-muted{color:var(--color-text-muted)}.text-text-muted\/40{color:#5556}@supports (color:color-mix(in lab,red,red)){.text-text-muted\/40{color:color-mix(in oklab,var(--color-text-muted) 40%,transparent)}}.text-text-muted\/50{color:#55555580}@supports (color:color-mix(in lab,red,red)){.text-text-muted\/50{color:color-mix(in oklab,var(--color-text-muted) 50%,transparent)}}.text-text-muted\/60{color:#5559}@supports (color:color-mix(in lab,red,red)){.text-text-muted\/60{color:color-mix(in oklab,var(--color-text-muted) 60%,transparent)}}.text-text-secondary{color:var(--color-text-secondary)}.uppercase{text-transform:uppercase}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.decoration-text-muted\/40{text-decoration-color:#5556}@supports (color:color-mix(in lab,red,red)){.decoration-text-muted\/40{-webkit-text-decoration-color:color-mix(in oklab,var(--color-text-muted) 40%,transparent);text-decoration-color:color-mix(in oklab,var(--color-text-muted) 40%,transparent)}}.underline-offset-2{text-underline-offset:2px}.opacity-0{opacity:0}.opacity-60{opacity:.6}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a),0 4px 6px -4px var(--tw-shadow-color,#0000001a)}.shadow-lg,.shadow-xl{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-xl{--tw-shadow:0 20px 25px -5px var(--tw-shadow-color,#0000001a),0 8px 10px -6px var(--tw-shadow-color,#0000001a)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-150{--tw-duration:.15s;transition-duration:.15s}.select-none{-webkit-user-select:none;user-select:none}@media (hover:hover){.group-hover\:text-text:is(:where(.group):hover *){color:var(--color-text)}.group-hover\:opacity-100:is(:where(.group):hover *){opacity:1}}.placeholder\:text-text-muted::placeholder{color:var(--color-text-muted)}.focus-within\:border-text-muted\/40:focus-within{border-color:#5556}@supports (color:color-mix(in lab,red,red)){.focus-within\:border-text-muted\/40:focus-within{border-color:color-mix(in oklab,var(--color-text-muted) 40%,transparent)}}@media (hover:hover){.hover\:bg-\[\#252525\]:hover{background-color:#252525}.hover\:bg-bg-hover:hover{background-color:var(--color-bg-hover)}.hover\:bg-bg-surface:hover{background-color:var(--color-bg-surface)}.hover\:bg-error\/5:hover{background-color:#ef44440d}@supports (color:color-mix(in lab,red,red)){.hover\:bg-error\/5:hover{background-color:color-mix(in oklab,var(--color-error) 5%,transparent)}}.hover\:bg-error\/25:hover{background-color:#ef444440}@supports (color:color-mix(in lab,red,red)){.hover\:bg-error\/25:hover{background-color:color-mix(in oklab,var(--color-error) 25%,transparent)}}.hover\:text-error:hover{color:var(--color-error)}.hover\:text-error\/80:hover{color:#ef4444cc}@supports (color:color-mix(in lab,red,red)){.hover\:text-error\/80:hover{color:color-mix(in oklab,var(--color-error) 80%,transparent)}}.hover\:text-text:hover{color:var(--color-text)}.hover\:text-text-muted:hover{color:var(--color-text-muted)}.hover\:text-text-secondary:hover{color:var(--color-text-secondary)}.hover\:decoration-accent:hover{-webkit-text-decoration-color:var(--color-accent);text-decoration-color:var(--color-accent)}}.focus\:border-text-muted\/40:focus{border-color:#5556}@supports (color:color-mix(in lab,red,red)){.focus\:border-text-muted\/40:focus{border-color:color-mix(in oklab,var(--color-text-muted) 40%,transparent)}}.focus\:outline-none:focus{--tw-outline-style:none;outline-style:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:opacity-20:disabled{opacity:.2}.disabled\:opacity-40:disabled{opacity:.4}@media (min-width:40rem){.sm\:inline{display:inline}}}html{color-scheme:dark}body{background:var(--color-bg);color:var(--color-text);font-family:var(--font-sans);-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}::-webkit-scrollbar{width:4px}::-webkit-scrollbar-track{background:0 0}::-webkit-scrollbar-thumb{background:var(--color-border);border-radius:2px}.safe-bottom{padding-bottom:max(12px,env(safe-area-inset-bottom))}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-duration{syntax:"*";inherits:false}@keyframes spin{to{transform:rotate(1turn)}}@keyframes pulse{50%{opacity:.5}}
|
|
File without changes
|