@surething/cockpit 1.0.239 → 1.0.240
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-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +4 -4
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +2 -2
- package/.next-prod/server/app/_not-found.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/route.js +1 -1
- package/.next-prod/server/app/m/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +4 -4
- package/.next-prod/server/chunks/9658.js +5 -5
- package/.next-prod/server/chunks/9830.js +1 -1
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +2 -2
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/{5408-f7b9470b57c6690e.js → 5408-b31a0bb83ee220ad.js} +3 -3
- package/.next-prod/static/chunks/9530-aac4bba2518aa113.js +15 -0
- package/.next-prod/static/chunks/app/{layout-b8d5256d3bf96b1e.js → layout-95cb81ab4128b70e.js} +1 -1
- package/.next-prod/static/chunks/app/m/{page-149145e4714873de.js → page-54053828af79704f.js} +1 -1
- package/.next-prod/static/chunks/app/{page-497c9c5c75bf40f2.js → page-5969e7f2f5788be2.js} +1 -1
- package/.next-prod/static/chunks/app/project/{page-497c9c5c75bf40f2.js → page-5969e7f2f5788be2.js} +1 -1
- package/.next-prod/trace +13 -13
- package/.next-prod/trace-build +1 -1
- package/dist/{chunk-MNMFPTV4.mjs → chunk-JDX7Z54G.mjs} +58 -30
- package/dist/scheduledTasks.mjs +1 -1
- package/dist/wsServer.mjs +1 -1
- package/package.json +1 -1
- package/.next-prod/static/chunks/543-9c1455693df33cd1.js +0 -15
- /package/.next-prod/static/{c1JrZ4eVs2JR2ujEC_UrJ → ArsrRKOrvluh7oFS0G-Fg}/_buildManifest.js +0 -0
- /package/.next-prod/static/{c1JrZ4eVs2JR2ujEC_UrJ → ArsrRKOrvluh7oFS0G-Fg}/_ssgManifest.js +0 -0
package/.next-prod/static/chunks/app/{layout-b8d5256d3bf96b1e.js → layout-95cb81ab4128b70e.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{7815:e=>{e.exports={style:{fontFamily:"'Lora', 'Lora Fallback'",fontStyle:"normal"},className:"__className_c1a059",variable:"__variable_c1a059"}},36791:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},51743:()=>{},66924:e=>{e.exports={style:{fontFamily:"'JetBrains Mono', 'JetBrains Mono Fallback'",fontStyle:"normal"},className:"__className_3c557b",variable:"__variable_3c557b"}},86343:(e,s,o)=>{Promise.resolve().then(o.t.bind(o,36791,23)),Promise.resolve().then(o.t.bind(o,7815,23)),Promise.resolve().then(o.t.bind(o,66924,23)),Promise.resolve().then(o.bind(o,76288)),Promise.resolve().then(o.bind(o,47617)),Promise.resolve().then(o.bind(o,16121)),Promise.resolve().then(o.bind(o,76043)),Promise.resolve().then(o.bind(o,2228)),Promise.resolve().then(o.bind(o,42701)),Promise.resolve().then(o.bind(o,84310)),Promise.resolve().then(o.bind(o,83678)),Promise.resolve().then(o.bind(o,21484)),Promise.resolve().then(o.bind(o,24058)),Promise.resolve().then(o.bind(o,13304)),Promise.resolve().then(o.bind(o,76412)),Promise.resolve().then(o.bind(o,89039)),Promise.resolve().then(o.bind(o,26520)),Promise.resolve().then(o.t.bind(o,51743,23))}},e=>{e.O(0,[8225,8653,3334,7330,8216,4281,3888,5004,277,1332,7849,1973,6784,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{7815:e=>{e.exports={style:{fontFamily:"'Lora', 'Lora Fallback'",fontStyle:"normal"},className:"__className_c1a059",variable:"__variable_c1a059"}},36791:e=>{e.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},51743:()=>{},66924:e=>{e.exports={style:{fontFamily:"'JetBrains Mono', 'JetBrains Mono Fallback'",fontStyle:"normal"},className:"__className_3c557b",variable:"__variable_3c557b"}},86343:(e,s,o)=>{Promise.resolve().then(o.t.bind(o,36791,23)),Promise.resolve().then(o.t.bind(o,7815,23)),Promise.resolve().then(o.t.bind(o,66924,23)),Promise.resolve().then(o.bind(o,76288)),Promise.resolve().then(o.bind(o,47617)),Promise.resolve().then(o.bind(o,16121)),Promise.resolve().then(o.bind(o,76043)),Promise.resolve().then(o.bind(o,2228)),Promise.resolve().then(o.bind(o,42701)),Promise.resolve().then(o.bind(o,84310)),Promise.resolve().then(o.bind(o,83678)),Promise.resolve().then(o.bind(o,21484)),Promise.resolve().then(o.bind(o,24058)),Promise.resolve().then(o.bind(o,13304)),Promise.resolve().then(o.bind(o,76412)),Promise.resolve().then(o.bind(o,89039)),Promise.resolve().then(o.bind(o,26520)),Promise.resolve().then(o.t.bind(o,51743,23))}},e=>{e.O(0,[8225,8653,3334,7330,8216,4281,3888,5004,277,1332,7849,1973,6784,9530,2032,5408,8441,3794,7358],()=>e(e.s=86343)),_N_E=e.O()}]);
|
package/.next-prod/static/chunks/app/m/{page-149145e4714873de.js → page-54053828af79704f.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4302],{12550:(e,t,s)=>{Promise.resolve().then(s.bind(s,68016))},68016:(e,t,s)=>{"use strict";s.d(t,{default:()=>P});var n=s(95155),a=s(12115),r=s(79114),i=s(90425);let l=(0,i.A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),o=(0,i.A)("bell-off",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]),c=(0,i.A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),d=(0,i.A)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),u=(0,i.A)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);var h=s(3238),f=s(2111),m=s(3292),p=s(34075),x=s(69809);let b="/push-sw.js";function g({onOpen:e,onUseDesktop:t,initialSessions:s}){let{t:i}=(0,r.Bd)(),[w,y]=(0,a.useState)("recent"),[k,j]=(0,a.useState)(()=>s??[]),[N,M]=(0,a.useState)(()=>Date.now()),{pinnedSessions:S}=(0,m.P)(),{supported:C,isSubscribed:E,busy:A,subscribe:I,unsubscribe:R}=function(){let[e,t]=(0,a.useState)(!1),[s,n]=(0,a.useState)("default"),[r,i]=(0,a.useState)(!1),[l,o]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e="serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window;(t(e),e)?(n(Notification.permission),navigator.serviceWorker.getRegistration(b).then(e=>e?.pushManager.getSubscription()).then(e=>i(!!e)).catch(()=>{})):n("unsupported")},[]);let c=(0,a.useCallback)(async()=>{if(e&&!l){o(!0);try{let e=await Notification.requestPermission();if(n(e),"granted"!==e)return;let t=await navigator.serviceWorker.register(b);await navigator.serviceWorker.ready;let s=await fetch("/api/push/public-key");if(!s.ok)throw Error(`public-key HTTP ${s.status}`);let{publicKey:a}=await s.json();if(!a)throw Error("missing VAPID public key");let r=await t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),s=atob((e+t).replace(/-/g,"+").replace(/_/g,"/")),n=new Uint8Array(s.length);for(let e=0;e<s.length;e++)n[e]=s.charCodeAt(e);return n}(a)}),l=await fetch("/api/push/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subscription:r})});if(!l.ok)throw Error(`subscribe HTTP ${l.status}`);i(!0)}catch(e){console.error("push subscribe failed",e),(0,p.oR)(x.A.t("mobile.notifyError",{defaultValue:"Could not enable notifications"}),"error")}finally{o(!1)}}},[e,l]),d=(0,a.useCallback)(async()=>{if(e&&!l){o(!0);try{let e=await navigator.serviceWorker.getRegistration(b),t=await e?.pushManager.getSubscription();t&&(await fetch("/api/push/unsubscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:t.endpoint})}),await t.unsubscribe()),i(!1)}catch(e){console.error("push unsubscribe failed",e)}finally{o(!1)}}},[e,l]);return{supported:e,permission:s,isSubscribed:r,busy:l,subscribe:c,unsubscribe:d}}(),{resolvedTheme:L,setTheme:T}=(0,h.D)(),P=(0,a.useCallback)(e=>{"task-fired"===e.type||e.data&&(j(e.data.sessions||[]),M(Date.now()))},[]);(0,f.h)({url:"/ws/global-state",onMessage:P});let $=(0,a.useCallback)(e=>{let t=Math.floor((N-e)/6e4);if(t<1)return i("common.justNow");if(t<60)return i("common.minutesAgo",{count:t});let s=Math.floor(t/60);return s<24?i("common.hoursAgo",{count:s}):i("common.daysAgo",{count:Math.floor(s/24)})},[N,i]),D=e=>e.split("/").pop()||e,O=k.filter(e=>"loading"===e.status).length,V=(e,t)=>(0,n.jsx)("button",{type:"button",onClick:()=>y(e),className:`flex-1 border-b-2 pb-2 pt-1 text-sm font-medium transition-colors ${w===e?"border-brand text-brand":"border-transparent text-muted-foreground"}`,children:t});return(0,n.jsxs)("div",{className:"flex h-[100dvh] flex-col bg-card",children:[(0,n.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-3 border-b border-border px-3 py-2.5 pt-[max(0.625rem,env(safe-area-inset-top))]",children:[(0,n.jsxs)("div",{className:"flex flex-1 items-center gap-2",children:[V("recent",i("sessions.recentSessions")),V("pinned",i("sessions.pinnedSessions"))]}),C&&(0,n.jsx)("button",{type:"button",onClick:E?R:I,disabled:A,"aria-label":E?i("mobile.disableNotifications",{defaultValue:"Disable notifications"}):i("mobile.enableNotifications",{defaultValue:"Enable notifications"}),className:`flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg active:bg-accent disabled:opacity-40 ${E?"text-brand":"text-muted-foreground"}`,children:E?(0,n.jsx)(l,{className:"h-4 w-4"}):(0,n.jsx)(o,{className:"h-4 w-4"})}),(0,n.jsx)("button",{type:"button",onClick:()=>T("dark"===L?"light":"dark"),"aria-label":i("mobile.toggleTheme",{defaultValue:"Toggle theme"}),className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg text-muted-foreground active:bg-accent",children:"dark"===L?(0,n.jsx)(c,{className:"h-4 w-4"}):(0,n.jsx)(d,{className:"h-4 w-4"})}),(0,n.jsx)("button",{type:"button",onClick:t,className:"flex-shrink-0 rounded-lg px-2 py-1 text-xs text-muted-foreground active:bg-accent",children:i("mobile.useDesktop")})]}),"recent"===w&&O>0&&(0,n.jsx)("div",{className:"flex-shrink-0 border-b border-border/50 px-4 py-1.5 text-xs text-orange-11",children:i("sessions.runningCount",{count:O})}),(0,n.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:"recent"===w?0===k.length?(0,n.jsx)(v,{text:i("sessions.noSessions")}):k.map(t=>(0,n.jsxs)("button",{onClick:()=>e({cwd:t.cwd,sessionId:t.sessionId,title:t.title}),className:"flex w-full items-start gap-3 border-b border-border/50 px-4 py-3.5 text-left active:bg-accent",children:[(0,n.jsx)("span",{className:`mt-1.5 h-2.5 w-2.5 flex-shrink-0 rounded-full ${"loading"===t.status?"animate-pulse bg-orange-9":"unread"===t.status?"bg-red-500":"bg-muted-foreground/30"}`}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:D(t.cwd)}),"loading"===t.status&&(0,n.jsx)("span",{className:"flex-shrink-0 text-xs text-orange-11",children:i("sessions.running")}),"unread"===t.status&&(0,n.jsx)("span",{className:"flex-shrink-0 text-xs text-red-500",children:i("sessions.done")}),(0,n.jsx)("span",{className:"ml-auto flex-shrink-0 text-xs text-muted-foreground",children:$(t.lastActive)})]}),(t.lastUserMessage||t.title)&&(0,n.jsx)("div",{className:"mt-0.5 truncate text-xs text-foreground/70",children:t.lastUserMessage||t.title})]})]},`${t.cwd}-${t.sessionId}`)):0===S.length?(0,n.jsx)(v,{text:i("sessions.noPinnedSessions")}):S.map(t=>(0,n.jsxs)("button",{onClick:()=>e({cwd:t.cwd,sessionId:t.sessionId,title:t.customTitle}),className:"flex w-full items-start gap-3 border-b border-border/50 px-4 py-3.5 text-left active:bg-accent",children:[(0,n.jsx)(u,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-brand"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"truncate text-sm font-medium",children:t.customTitle||D(t.cwd)}),(0,n.jsx)("div",{className:"truncate text-xs text-muted-foreground",children:D(t.cwd)})]})]},`${t.cwd}-${t.sessionId}`))})]})}function v({text:e}){return(0,n.jsx)("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:e})}let w=(0,i.A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var y=s(49433),k=s(86957),j=s(82680),N=s(67589),M=s(20917),S=s(65153),C=s(44266),E=s(36201),A=s(56204);function I({onSend:e,onStop:t,isRunning:s,disabled:i}){let{t:l}=(0,r.Bd)(),[o,c]=(0,a.useState)(""),d=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{let e=d.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,140)}px`)},[o]);let u=(0,a.useCallback)(()=>{let t=o.trim();t&&!i&&(e(t),c(""))},[o,i,e]),h=(0,a.useCallback)(e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&!e.nativeEvent.isComposing&&(e.preventDefault(),u())},[u]);return(0,n.jsxs)("div",{className:"flex items-end gap-2 border-t border-border bg-card px-3 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))]",children:[(0,n.jsx)("textarea",{ref:d,value:o,onChange:e=>c(e.target.value),onKeyDown:h,rows:1,placeholder:l("mobile.messagePlaceholder"),className:"flex-1 resize-none rounded-2xl border border-border bg-background px-4 py-2.5 text-base leading-snug outline-none focus:border-brand"}),s?(0,n.jsx)("button",{type:"button",onClick:t,"aria-label":l("mobile.stop"),className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full bg-red-500 text-white active:scale-95",children:(0,n.jsx)(E.A,{className:"h-5 w-5",fill:"currentColor"})}):(0,n.jsx)("button",{type:"button",onClick:u,disabled:i||!o.trim(),"aria-label":l("mobile.send"),className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full bg-brand text-white active:scale-95 disabled:opacity-40",children:(0,n.jsx)(A.A,{className:"h-5 w-5"})})]})}function R({cwd:e,initialSessionId:t,initialTitle:s,onBack:r,isActive:i=!0}){let[l,o]=(0,a.useState)([]),[c,d]=(0,a.useState)(null),[u,h]=(0,a.useState)(s??""),[f,m]=(0,a.useState)({}),p=(0,a.useRef)(null);(0,a.useEffect)(()=>{let s=y.tryPromise({try:async()=>{let t=await fetch(`/api/project-state?cwd=${encodeURIComponent(e)}`);return t.ok?await t.json():null},catch:e=>new j.uV({message:"loadProjectState failed",cause:e})});k.t4.runPromiseExit(s).then(e=>{if("Success"===e._tag&&e.value){let s=e.value;m({engine:s.engines?.[t],ollamaModel:s.ollamaModels?.[t],deepseekModel:s.deepseekModels?.[t]})}})},[e,t]);let[x,b]=(0,a.useState)(!1),g=(0,a.useRef)(!1);(0,a.useEffect)(()=>{g.current=x},[x]);let{isLoadingHistory:v,isLoadingMore:E,hasMoreHistory:A,loadMoreHistory:L,loadHistoryByCwdAndSessionId:T,loadedSessionId:P,loadedEngine:$}=(0,N.m)(l,o,c,{cwd:e,initialSessionId:t,onSessionId:d,onTitleChange:h,liveRunningRef:g}),D=f.engine??$??void 0,O=(0,a.useCallback)(()=>{},[]),V=(0,a.useRef)(null),{isLoading:W,apiRetryInfo:_,ptyNotice:X,handleSend:z,handleStop:H}=(0,M.e)(l,o,{sessionId:c,cwd:e,engine:D,chatMode:"sdk",planMode:!1,ollamaModel:f.ollamaModel,deepseekModel:f.deepseekModel,onSessionId:d,onFetchTitle:O,onRunComplete:()=>V.current?.()}),B=P||c,U=!W&&!!B;(0,S.u)(B,o,U,D,{onRunningChange:e=>{g.current=e,b(e)},onComplete:()=>{B&&T(e,B,!0)}}),(0,a.useEffect)(()=>{U||b(!1)},[U]),(0,a.useEffect)(()=>{V.current=()=>{B&&T(e,B,!0)}},[e,B,T]);let K=W||x,q=(0,a.useCallback)(e=>{z(e)},[z]);return(0,n.jsxs)("div",{className:"flex h-[100dvh] flex-col bg-card",children:[(0,n.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-1 border-b border-border bg-card px-2 py-2 pt-[max(0.5rem,env(safe-area-inset-top))]",children:[(0,n.jsx)("button",{type:"button",onClick:r,"aria-label":"Back",className:"flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground active:bg-accent",children:(0,n.jsx)(w,{className:"h-6 w-6"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"truncate text-sm font-medium",children:u||"…"}),(0,n.jsx)("div",{className:"truncate text-xs text-muted-foreground",children:e.split("/").pop()})]})]}),v?(0,n.jsx)("div",{className:"flex flex-1 items-center justify-center text-muted-foreground",children:"…"}):(0,n.jsx)(C.M,{ref:p,messages:l,isLoading:K,cwd:e,sessionId:c,engine:D,apiRetryInfo:_,ptyNotice:X,hasMoreHistory:A,isLoadingMore:E,onLoadMore:L,isActive:i}),(0,n.jsx)(I,{onSend:q,onStop:H,isRunning:K,disabled:K})]})}let L="cockpitMobileChat";function T({initialCwd:e,initialSessionId:t,initialSessions:s}){let[r,i]=(0,a.useState)(e&&t?{cwd:e,sessionId:t}:null),[l,o]=(0,a.useState)(!!(e&&t)),[c,d]=(0,a.useState)(0),[u,h]=(0,a.useState)(!1),[f,m]=(0,a.useState)(0),p=(0,a.useRef)(!1),x=(0,a.useRef)(null),b=(0,a.useRef)(l);b.current=l;let v=(0,a.useRef)(r);v.current=r;let w=(0,a.useRef)(f);w.current=f;let y=(0,a.useCallback)(()=>{v.current&&(o(!0),p.current||(window.history.pushState({[L]:v.current},""),p.current=!0))},[]),k=(0,a.useCallback)(()=>{o(!1),p.current&&(p.current=!1,window.history.back())},[]),j=(0,a.useCallback)(e=>{let t={cwd:e.cwd,sessionId:e.sessionId,title:e.title};i(t),o(!0),window.history.pushState({[L]:t},""),p.current=!0},[]),N=(0,a.useCallback)(()=>{try{localStorage.setItem("cockpit-force-desktop","1")}catch{}window.location.href="/"},[]);(0,a.useEffect)(()=>{e&&t&&(window.history.pushState({[L]:{cwd:e,sessionId:t}},""),p.current=!0)},[e,t]),(0,a.useEffect)(()=>{let e=e=>{let t=e.state?.[L];t?(i({cwd:t.cwd,sessionId:t.sessionId,title:t.title}),o(!0),p.current=!0):(o(!1),p.current=!1),d(0)};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,a.useEffect)(()=>{let e=x.current;if(!e)return;let t=new ResizeObserver(e=>{for(let t of e)m(t.contentRect.width)});return m(e.clientWidth),t.observe(e),()=>t.disconnect()},[]),(0,a.useEffect)(()=>{let e=x.current;if(!e)return;let t=0,s=0,n="?",a=e=>{1===e.touches.length&&(t=e.touches[0].clientX,s=e.touches[0].clientY,n="?")},r=a=>{if("v"===n||1!==a.touches.length)return;let r=a.touches[0].clientX-t,i=a.touches[0].clientY-s;if("?"===n){if(8>Math.abs(r)&&8>Math.abs(i)||"h"!=(n=Math.abs(r)>Math.abs(i)?"h":"v"))return;h(!0)}a.preventDefault();let l=w.current||e.clientWidth,o=!!v.current,c=r;b.current?(c<0&&(c=0),c>l&&(c=l)):((c>0||!o)&&(c=0),c<-l&&(c=-l)),d(c)},i=s=>{if("h"!==n){n="?";return}h(!1),d(0);let a=w.current||e.clientWidth,r=(s.changedTouches[0]?.clientX??t)-t,i=.25*a;b.current?r>i&&k():r<-i&&v.current&&y(),n="?"};return e.addEventListener("touchstart",a,{passive:!0}),e.addEventListener("touchmove",r,{passive:!1}),e.addEventListener("touchend",i,{passive:!0}),e.addEventListener("touchcancel",i,{passive:!0}),()=>{e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",r),e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",i)}},[y,k]),(0,a.useEffect)(()=>{let e=x.current;if(!e)return;let t=()=>{0!==e.scrollLeft&&(e.scrollLeft=0)};return e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)},[]);let M=l?-f:0;return(0,n.jsx)("div",{ref:x,className:"relative h-[100dvh] w-full overflow-clip",style:{overscrollBehaviorX:"none",touchAction:"pan-y"},children:(0,n.jsxs)("div",{className:"flex h-full",style:{width:"200%",transform:f?`translateX(${M+c}px)`:l?"translateX(-50%)":"translateX(0)",transition:u?"none":"transform 220ms ease-out",willChange:"transform"},children:[(0,n.jsx)("div",{className:"h-full w-1/2 overflow-hidden",children:(0,n.jsx)(g,{onOpen:j,onUseDesktop:N,initialSessions:s})}),(0,n.jsx)("div",{className:"h-full w-1/2 overflow-hidden",children:r&&(0,n.jsx)(R,{cwd:r.cwd,initialSessionId:r.sessionId,initialTitle:r.title,onBack:k,isActive:l},`${r.cwd}-${r.sessionId}`)})]})})}function P(e){return(0,n.jsx)(T,{...e})}}},e=>{e.O(0,[8653,7330,8216,4281,3888,1332,7849,6784,543,8441,3794,7358],()=>e(e.s=12550)),_N_E=e.O()}]);
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4302],{12550:(e,t,s)=>{Promise.resolve().then(s.bind(s,68016))},68016:(e,t,s)=>{"use strict";s.d(t,{default:()=>P});var n=s(95155),a=s(12115),r=s(79114),i=s(90425);let l=(0,i.A)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]),o=(0,i.A)("bell-off",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M17 17H4a1 1 0 0 1-.74-1.673C4.59 13.956 6 12.499 6 8a6 6 0 0 1 .258-1.742",key:"178tsu"}],["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M8.668 3.01A6 6 0 0 1 18 8c0 2.687.77 4.653 1.707 6.05",key:"1hqiys"}]]),c=(0,i.A)("sun",[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]]),d=(0,i.A)("moon",[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]]),u=(0,i.A)("pin",[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]]);var h=s(3238),f=s(2111),m=s(3292),p=s(34075),x=s(69809);let b="/push-sw.js";function g({onOpen:e,onUseDesktop:t,initialSessions:s}){let{t:i}=(0,r.Bd)(),[w,y]=(0,a.useState)("recent"),[k,j]=(0,a.useState)(()=>s??[]),[N,M]=(0,a.useState)(()=>Date.now()),{pinnedSessions:S}=(0,m.P)(),{supported:C,isSubscribed:E,busy:A,subscribe:I,unsubscribe:R}=function(){let[e,t]=(0,a.useState)(!1),[s,n]=(0,a.useState)("default"),[r,i]=(0,a.useState)(!1),[l,o]=(0,a.useState)(!1);(0,a.useEffect)(()=>{let e="serviceWorker"in navigator&&"PushManager"in window&&"Notification"in window;(t(e),e)?(n(Notification.permission),navigator.serviceWorker.getRegistration(b).then(e=>e?.pushManager.getSubscription()).then(e=>i(!!e)).catch(()=>{})):n("unsupported")},[]);let c=(0,a.useCallback)(async()=>{if(e&&!l){o(!0);try{let e=await Notification.requestPermission();if(n(e),"granted"!==e)return;let t=await navigator.serviceWorker.register(b);await navigator.serviceWorker.ready;let s=await fetch("/api/push/public-key");if(!s.ok)throw Error(`public-key HTTP ${s.status}`);let{publicKey:a}=await s.json();if(!a)throw Error("missing VAPID public key");let r=await t.pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:function(e){let t="=".repeat((4-e.length%4)%4),s=atob((e+t).replace(/-/g,"+").replace(/_/g,"/")),n=new Uint8Array(s.length);for(let e=0;e<s.length;e++)n[e]=s.charCodeAt(e);return n}(a)}),l=await fetch("/api/push/subscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({subscription:r})});if(!l.ok)throw Error(`subscribe HTTP ${l.status}`);i(!0)}catch(e){console.error("push subscribe failed",e),(0,p.oR)(x.A.t("mobile.notifyError",{defaultValue:"Could not enable notifications"}),"error")}finally{o(!1)}}},[e,l]),d=(0,a.useCallback)(async()=>{if(e&&!l){o(!0);try{let e=await navigator.serviceWorker.getRegistration(b),t=await e?.pushManager.getSubscription();t&&(await fetch("/api/push/unsubscribe",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({endpoint:t.endpoint})}),await t.unsubscribe()),i(!1)}catch(e){console.error("push unsubscribe failed",e)}finally{o(!1)}}},[e,l]);return{supported:e,permission:s,isSubscribed:r,busy:l,subscribe:c,unsubscribe:d}}(),{resolvedTheme:L,setTheme:T}=(0,h.D)(),P=(0,a.useCallback)(e=>{"task-fired"===e.type||e.data&&(j(e.data.sessions||[]),M(Date.now()))},[]);(0,f.h)({url:"/ws/global-state",onMessage:P});let $=(0,a.useCallback)(e=>{let t=Math.floor((N-e)/6e4);if(t<1)return i("common.justNow");if(t<60)return i("common.minutesAgo",{count:t});let s=Math.floor(t/60);return s<24?i("common.hoursAgo",{count:s}):i("common.daysAgo",{count:Math.floor(s/24)})},[N,i]),D=e=>e.split("/").pop()||e,O=k.filter(e=>"loading"===e.status).length,V=(e,t)=>(0,n.jsx)("button",{type:"button",onClick:()=>y(e),className:`flex-1 border-b-2 pb-2 pt-1 text-sm font-medium transition-colors ${w===e?"border-brand text-brand":"border-transparent text-muted-foreground"}`,children:t});return(0,n.jsxs)("div",{className:"flex h-[100dvh] flex-col bg-card",children:[(0,n.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-3 border-b border-border px-3 py-2.5 pt-[max(0.625rem,env(safe-area-inset-top))]",children:[(0,n.jsxs)("div",{className:"flex flex-1 items-center gap-2",children:[V("recent",i("sessions.recentSessions")),V("pinned",i("sessions.pinnedSessions"))]}),C&&(0,n.jsx)("button",{type:"button",onClick:E?R:I,disabled:A,"aria-label":E?i("mobile.disableNotifications",{defaultValue:"Disable notifications"}):i("mobile.enableNotifications",{defaultValue:"Enable notifications"}),className:`flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg active:bg-accent disabled:opacity-40 ${E?"text-brand":"text-muted-foreground"}`,children:E?(0,n.jsx)(l,{className:"h-4 w-4"}):(0,n.jsx)(o,{className:"h-4 w-4"})}),(0,n.jsx)("button",{type:"button",onClick:()=>T("dark"===L?"light":"dark"),"aria-label":i("mobile.toggleTheme",{defaultValue:"Toggle theme"}),className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-lg text-muted-foreground active:bg-accent",children:"dark"===L?(0,n.jsx)(c,{className:"h-4 w-4"}):(0,n.jsx)(d,{className:"h-4 w-4"})}),(0,n.jsx)("button",{type:"button",onClick:t,className:"flex-shrink-0 rounded-lg px-2 py-1 text-xs text-muted-foreground active:bg-accent",children:i("mobile.useDesktop")})]}),"recent"===w&&O>0&&(0,n.jsx)("div",{className:"flex-shrink-0 border-b border-border/50 px-4 py-1.5 text-xs text-orange-11",children:i("sessions.runningCount",{count:O})}),(0,n.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto",children:"recent"===w?0===k.length?(0,n.jsx)(v,{text:i("sessions.noSessions")}):k.map(t=>(0,n.jsxs)("button",{onClick:()=>e({cwd:t.cwd,sessionId:t.sessionId,title:t.title}),className:"flex w-full items-start gap-3 border-b border-border/50 px-4 py-3.5 text-left active:bg-accent",children:[(0,n.jsx)("span",{className:`mt-1.5 h-2.5 w-2.5 flex-shrink-0 rounded-full ${"loading"===t.status?"animate-pulse bg-orange-9":"unread"===t.status?"bg-red-500":"bg-muted-foreground/30"}`}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsxs)("div",{className:"flex items-center gap-2",children:[(0,n.jsx)("span",{className:"truncate text-sm font-medium",children:D(t.cwd)}),"loading"===t.status&&(0,n.jsx)("span",{className:"flex-shrink-0 text-xs text-orange-11",children:i("sessions.running")}),"unread"===t.status&&(0,n.jsx)("span",{className:"flex-shrink-0 text-xs text-red-500",children:i("sessions.done")}),(0,n.jsx)("span",{className:"ml-auto flex-shrink-0 text-xs text-muted-foreground",children:$(t.lastActive)})]}),(t.lastUserMessage||t.title)&&(0,n.jsx)("div",{className:"mt-0.5 truncate text-xs text-foreground/70",children:t.lastUserMessage||t.title})]})]},`${t.cwd}-${t.sessionId}`)):0===S.length?(0,n.jsx)(v,{text:i("sessions.noPinnedSessions")}):S.map(t=>(0,n.jsxs)("button",{onClick:()=>e({cwd:t.cwd,sessionId:t.sessionId,title:t.customTitle}),className:"flex w-full items-start gap-3 border-b border-border/50 px-4 py-3.5 text-left active:bg-accent",children:[(0,n.jsx)(u,{className:"mt-0.5 h-4 w-4 flex-shrink-0 text-brand"}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"truncate text-sm font-medium",children:t.customTitle||D(t.cwd)}),(0,n.jsx)("div",{className:"truncate text-xs text-muted-foreground",children:D(t.cwd)})]})]},`${t.cwd}-${t.sessionId}`))})]})}function v({text:e}){return(0,n.jsx)("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:e})}let w=(0,i.A)("chevron-left",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);var y=s(49433),k=s(86957),j=s(82680),N=s(67589),M=s(20917),S=s(65153),C=s(73395),E=s(36201),A=s(56204);function I({onSend:e,onStop:t,isRunning:s,disabled:i}){let{t:l}=(0,r.Bd)(),[o,c]=(0,a.useState)(""),d=(0,a.useRef)(null);(0,a.useLayoutEffect)(()=>{let e=d.current;e&&(e.style.height="auto",e.style.height=`${Math.min(e.scrollHeight,140)}px`)},[o]);let u=(0,a.useCallback)(()=>{let t=o.trim();t&&!i&&(e(t),c(""))},[o,i,e]),h=(0,a.useCallback)(e=>{"Enter"===e.key&&(e.metaKey||e.ctrlKey)&&!e.nativeEvent.isComposing&&(e.preventDefault(),u())},[u]);return(0,n.jsxs)("div",{className:"flex items-end gap-2 border-t border-border bg-card px-3 py-2 pb-[max(0.5rem,env(safe-area-inset-bottom))]",children:[(0,n.jsx)("textarea",{ref:d,value:o,onChange:e=>c(e.target.value),onKeyDown:h,rows:1,placeholder:l("mobile.messagePlaceholder"),className:"flex-1 resize-none rounded-2xl border border-border bg-background px-4 py-2.5 text-base leading-snug outline-none focus:border-brand"}),s?(0,n.jsx)("button",{type:"button",onClick:t,"aria-label":l("mobile.stop"),className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full bg-red-500 text-white active:scale-95",children:(0,n.jsx)(E.A,{className:"h-5 w-5",fill:"currentColor"})}):(0,n.jsx)("button",{type:"button",onClick:u,disabled:i||!o.trim(),"aria-label":l("mobile.send"),className:"flex h-11 w-11 flex-shrink-0 items-center justify-center rounded-full bg-brand text-white active:scale-95 disabled:opacity-40",children:(0,n.jsx)(A.A,{className:"h-5 w-5"})})]})}function R({cwd:e,initialSessionId:t,initialTitle:s,onBack:r,isActive:i=!0}){let[l,o]=(0,a.useState)([]),[c,d]=(0,a.useState)(null),[u,h]=(0,a.useState)(s??""),[f,m]=(0,a.useState)({}),p=(0,a.useRef)(null);(0,a.useEffect)(()=>{let s=y.tryPromise({try:async()=>{let t=await fetch(`/api/project-state?cwd=${encodeURIComponent(e)}`);return t.ok?await t.json():null},catch:e=>new j.uV({message:"loadProjectState failed",cause:e})});k.t4.runPromiseExit(s).then(e=>{if("Success"===e._tag&&e.value){let s=e.value;m({engine:s.engines?.[t],ollamaModel:s.ollamaModels?.[t],deepseekModel:s.deepseekModels?.[t]})}})},[e,t]);let[x,b]=(0,a.useState)(!1),g=(0,a.useRef)(!1);(0,a.useEffect)(()=>{g.current=x},[x]);let{isLoadingHistory:v,isLoadingMore:E,hasMoreHistory:A,loadMoreHistory:L,loadHistoryByCwdAndSessionId:T,loadedSessionId:P,loadedEngine:$}=(0,N.m)(l,o,c,{cwd:e,initialSessionId:t,onSessionId:d,onTitleChange:h,liveRunningRef:g}),D=f.engine??$??void 0,O=(0,a.useCallback)(()=>{},[]),V=(0,a.useRef)(null),{isLoading:W,apiRetryInfo:_,ptyNotice:X,handleSend:z,handleStop:H}=(0,M.e)(l,o,{sessionId:c,cwd:e,engine:D,chatMode:"sdk",planMode:!1,ollamaModel:f.ollamaModel,deepseekModel:f.deepseekModel,onSessionId:d,onFetchTitle:O,onRunComplete:()=>V.current?.()}),B=P||c,U=!W&&!!B;(0,S.u)(B,o,U,D,{onRunningChange:e=>{g.current=e,b(e)},onComplete:()=>{B&&T(e,B,!0)}}),(0,a.useEffect)(()=>{U||b(!1)},[U]),(0,a.useEffect)(()=>{V.current=()=>{B&&T(e,B,!0)}},[e,B,T]);let K=W||x,q=(0,a.useCallback)(e=>{z(e)},[z]);return(0,n.jsxs)("div",{className:"flex h-[100dvh] flex-col bg-card",children:[(0,n.jsxs)("div",{className:"flex flex-shrink-0 items-center gap-1 border-b border-border bg-card px-2 py-2 pt-[max(0.5rem,env(safe-area-inset-top))]",children:[(0,n.jsx)("button",{type:"button",onClick:r,"aria-label":"Back",className:"flex h-9 w-9 items-center justify-center rounded-lg text-muted-foreground active:bg-accent",children:(0,n.jsx)(w,{className:"h-6 w-6"})}),(0,n.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,n.jsx)("div",{className:"truncate text-sm font-medium",children:u||"…"}),(0,n.jsx)("div",{className:"truncate text-xs text-muted-foreground",children:e.split("/").pop()})]})]}),v?(0,n.jsx)("div",{className:"flex flex-1 items-center justify-center text-muted-foreground",children:"…"}):(0,n.jsx)(C.M,{ref:p,messages:l,isLoading:K,cwd:e,sessionId:c,engine:D,apiRetryInfo:_,ptyNotice:X,hasMoreHistory:A,isLoadingMore:E,onLoadMore:L,isActive:i}),(0,n.jsx)(I,{onSend:q,onStop:H,isRunning:K,disabled:K})]})}let L="cockpitMobileChat";function T({initialCwd:e,initialSessionId:t,initialSessions:s}){let[r,i]=(0,a.useState)(e&&t?{cwd:e,sessionId:t}:null),[l,o]=(0,a.useState)(!!(e&&t)),[c,d]=(0,a.useState)(0),[u,h]=(0,a.useState)(!1),[f,m]=(0,a.useState)(0),p=(0,a.useRef)(!1),x=(0,a.useRef)(null),b=(0,a.useRef)(l);b.current=l;let v=(0,a.useRef)(r);v.current=r;let w=(0,a.useRef)(f);w.current=f;let y=(0,a.useCallback)(()=>{v.current&&(o(!0),p.current||(window.history.pushState({[L]:v.current},""),p.current=!0))},[]),k=(0,a.useCallback)(()=>{o(!1),p.current&&(p.current=!1,window.history.back())},[]),j=(0,a.useCallback)(e=>{let t={cwd:e.cwd,sessionId:e.sessionId,title:e.title};i(t),o(!0),window.history.pushState({[L]:t},""),p.current=!0},[]),N=(0,a.useCallback)(()=>{try{localStorage.setItem("cockpit-force-desktop","1")}catch{}window.location.href="/"},[]);(0,a.useEffect)(()=>{e&&t&&(window.history.pushState({[L]:{cwd:e,sessionId:t}},""),p.current=!0)},[e,t]),(0,a.useEffect)(()=>{let e=e=>{let t=e.state?.[L];t?(i({cwd:t.cwd,sessionId:t.sessionId,title:t.title}),o(!0),p.current=!0):(o(!1),p.current=!1),d(0)};return window.addEventListener("popstate",e),()=>window.removeEventListener("popstate",e)},[]),(0,a.useEffect)(()=>{let e=x.current;if(!e)return;let t=new ResizeObserver(e=>{for(let t of e)m(t.contentRect.width)});return m(e.clientWidth),t.observe(e),()=>t.disconnect()},[]),(0,a.useEffect)(()=>{let e=x.current;if(!e)return;let t=0,s=0,n="?",a=e=>{1===e.touches.length&&(t=e.touches[0].clientX,s=e.touches[0].clientY,n="?")},r=a=>{if("v"===n||1!==a.touches.length)return;let r=a.touches[0].clientX-t,i=a.touches[0].clientY-s;if("?"===n){if(8>Math.abs(r)&&8>Math.abs(i)||"h"!=(n=Math.abs(r)>Math.abs(i)?"h":"v"))return;h(!0)}a.preventDefault();let l=w.current||e.clientWidth,o=!!v.current,c=r;b.current?(c<0&&(c=0),c>l&&(c=l)):((c>0||!o)&&(c=0),c<-l&&(c=-l)),d(c)},i=s=>{if("h"!==n){n="?";return}h(!1),d(0);let a=w.current||e.clientWidth,r=(s.changedTouches[0]?.clientX??t)-t,i=.25*a;b.current?r>i&&k():r<-i&&v.current&&y(),n="?"};return e.addEventListener("touchstart",a,{passive:!0}),e.addEventListener("touchmove",r,{passive:!1}),e.addEventListener("touchend",i,{passive:!0}),e.addEventListener("touchcancel",i,{passive:!0}),()=>{e.removeEventListener("touchstart",a),e.removeEventListener("touchmove",r),e.removeEventListener("touchend",i),e.removeEventListener("touchcancel",i)}},[y,k]),(0,a.useEffect)(()=>{let e=x.current;if(!e)return;let t=()=>{0!==e.scrollLeft&&(e.scrollLeft=0)};return e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)},[]);let M=l?-f:0;return(0,n.jsx)("div",{ref:x,className:"relative h-[100dvh] w-full overflow-clip",style:{overscrollBehaviorX:"none",touchAction:"pan-y"},children:(0,n.jsxs)("div",{className:"flex h-full",style:{width:"200%",transform:f?`translateX(${M+c}px)`:l?"translateX(-50%)":"translateX(0)",transition:u?"none":"transform 220ms ease-out",willChange:"transform"},children:[(0,n.jsx)("div",{className:"h-full w-1/2 overflow-hidden",children:(0,n.jsx)(g,{onOpen:j,onUseDesktop:N,initialSessions:s})}),(0,n.jsx)("div",{className:"h-full w-1/2 overflow-hidden",children:r&&(0,n.jsx)(R,{cwd:r.cwd,initialSessionId:r.sessionId,initialTitle:r.title,onBack:k,isActive:l},`${r.cwd}-${r.sessionId}`)})]})})}function P(e){return(0,n.jsx)(T,{...e})}}},e=>{e.O(0,[8653,7330,8216,4281,3888,1332,7849,6784,9530,8441,3794,7358],()=>e(e.s=12550)),_N_E=e.O()}]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6500,8974],{39823:(e,s,n)=>{Promise.resolve().then(n.bind(n,76288)),Promise.resolve().then(n.bind(n,47617)),Promise.resolve().then(n.bind(n,16121)),Promise.resolve().then(n.bind(n,76043)),Promise.resolve().then(n.bind(n,2228)),Promise.resolve().then(n.bind(n,42701)),Promise.resolve().then(n.bind(n,84310)),Promise.resolve().then(n.bind(n,83678)),Promise.resolve().then(n.bind(n,21484)),Promise.resolve().then(n.bind(n,24058)),Promise.resolve().then(n.bind(n,13304)),Promise.resolve().then(n.bind(n,76412)),Promise.resolve().then(n.bind(n,89039)),Promise.resolve().then(n.bind(n,26520))}},e=>{e.O(0,[8653,7330,8216,4281,3888,5004,277,1332,7849,1973,6784,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6500,8974],{39823:(e,s,n)=>{Promise.resolve().then(n.bind(n,76288)),Promise.resolve().then(n.bind(n,47617)),Promise.resolve().then(n.bind(n,16121)),Promise.resolve().then(n.bind(n,76043)),Promise.resolve().then(n.bind(n,2228)),Promise.resolve().then(n.bind(n,42701)),Promise.resolve().then(n.bind(n,84310)),Promise.resolve().then(n.bind(n,83678)),Promise.resolve().then(n.bind(n,21484)),Promise.resolve().then(n.bind(n,24058)),Promise.resolve().then(n.bind(n,13304)),Promise.resolve().then(n.bind(n,76412)),Promise.resolve().then(n.bind(n,89039)),Promise.resolve().then(n.bind(n,26520))}},e=>{e.O(0,[8653,7330,8216,4281,3888,5004,277,1332,7849,1973,6784,9530,2032,5408,8441,3794,7358],()=>e(e.s=39823)),_N_E=e.O()}]);
|
package/.next-prod/static/chunks/app/project/{page-497c9c5c75bf40f2.js → page-5969e7f2f5788be2.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6500,8974],{39823:(e,s,n)=>{Promise.resolve().then(n.bind(n,76288)),Promise.resolve().then(n.bind(n,47617)),Promise.resolve().then(n.bind(n,16121)),Promise.resolve().then(n.bind(n,76043)),Promise.resolve().then(n.bind(n,2228)),Promise.resolve().then(n.bind(n,42701)),Promise.resolve().then(n.bind(n,84310)),Promise.resolve().then(n.bind(n,83678)),Promise.resolve().then(n.bind(n,21484)),Promise.resolve().then(n.bind(n,24058)),Promise.resolve().then(n.bind(n,13304)),Promise.resolve().then(n.bind(n,76412)),Promise.resolve().then(n.bind(n,89039)),Promise.resolve().then(n.bind(n,26520))}},e=>{e.O(0,[8653,7330,8216,4281,3888,5004,277,1332,7849,1973,6784,
|
|
1
|
+
(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6500,8974],{39823:(e,s,n)=>{Promise.resolve().then(n.bind(n,76288)),Promise.resolve().then(n.bind(n,47617)),Promise.resolve().then(n.bind(n,16121)),Promise.resolve().then(n.bind(n,76043)),Promise.resolve().then(n.bind(n,2228)),Promise.resolve().then(n.bind(n,42701)),Promise.resolve().then(n.bind(n,84310)),Promise.resolve().then(n.bind(n,83678)),Promise.resolve().then(n.bind(n,21484)),Promise.resolve().then(n.bind(n,24058)),Promise.resolve().then(n.bind(n,13304)),Promise.resolve().then(n.bind(n,76412)),Promise.resolve().then(n.bind(n,89039)),Promise.resolve().then(n.bind(n,26520))}},e=>{e.O(0,[8653,7330,8216,4281,3888,5004,277,1332,7849,1973,6784,9530,2032,5408,8441,3794,7358],()=>e(e.s=39823)),_N_E=e.O()}]);
|