openfox 2.0.8 → 2.0.10
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/dist/{chunk-NVMGZPN2.js → chunk-GVPBKD3I.js} +2 -2
- package/dist/{chunk-22ZTEMW6.js → chunk-R5YHUBOM.js} +2 -2
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/package.json +1 -1
- package/dist/{serve-KRO3CDHT.js → serve-VQE7ONYQ.js} +2 -2
- package/dist/server/index.js +1 -1
- package/dist/web/assets/{index-BBA0xZ_3.js → index-B1rz1oo1.js} +1 -1
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
|
@@ -196,7 +196,7 @@ async function runCli(options) {
|
|
|
196
196
|
if (!configExists) {
|
|
197
197
|
await runNetworkSetup(mode);
|
|
198
198
|
}
|
|
199
|
-
const { runServe } = await import("./serve-
|
|
199
|
+
const { runServe } = await import("./serve-VQE7ONYQ.js");
|
|
200
200
|
const serveOptions = { mode };
|
|
201
201
|
if (values.port) serveOptions.port = parseInt(values.port);
|
|
202
202
|
if (values["no-browser"] === true) serveOptions.openBrowser = false;
|
|
@@ -208,4 +208,4 @@ async function runCli(options) {
|
|
|
208
208
|
export {
|
|
209
209
|
runCli
|
|
210
210
|
};
|
|
211
|
-
//# sourceMappingURL=chunk-
|
|
211
|
+
//# sourceMappingURL=chunk-GVPBKD3I.js.map
|
|
@@ -5818,7 +5818,7 @@ import { Router as Router6 } from "express";
|
|
|
5818
5818
|
import { spawn as spawn5 } from "child_process";
|
|
5819
5819
|
|
|
5820
5820
|
// src/constants.ts
|
|
5821
|
-
var VERSION = "2.0.
|
|
5821
|
+
var VERSION = "2.0.10";
|
|
5822
5822
|
|
|
5823
5823
|
// src/server/routes/auto-update.ts
|
|
5824
5824
|
var updateInProgress = false;
|
|
@@ -7052,4 +7052,4 @@ export {
|
|
|
7052
7052
|
createServerHandle,
|
|
7053
7053
|
createServer
|
|
7054
7054
|
};
|
|
7055
|
-
//# sourceMappingURL=chunk-
|
|
7055
|
+
//# sourceMappingURL=chunk-R5YHUBOM.js.map
|
package/dist/cli/dev.js
CHANGED
package/dist/cli/index.js
CHANGED
package/dist/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION,
|
|
3
3
|
createServer
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-R5YHUBOM.js";
|
|
5
5
|
import "./chunk-NZCKCJH5.js";
|
|
6
6
|
import "./chunk-LIOHT26X.js";
|
|
7
7
|
import "./chunk-KGZMKMEZ.js";
|
|
@@ -188,4 +188,4 @@ async function runServe(options) {
|
|
|
188
188
|
export {
|
|
189
189
|
runServe
|
|
190
190
|
};
|
|
191
|
-
//# sourceMappingURL=serve-
|
|
191
|
+
//# sourceMappingURL=serve-VQE7ONYQ.js.map
|
package/dist/server/index.js
CHANGED
|
@@ -86,7 +86,7 @@ WARNING: This link could potentially be dangerous`)){const S=window.open();if(S)
|
|
|
86
86
|
transition-all duration-300 ease-in-out
|
|
87
87
|
${t?"translate-x-0":"-translate-x-full"}
|
|
88
88
|
`,children:[o.jsxs("div",{className:"p-4 border-b border-border flex gap-2",children:[o.jsx(qn,{href:`/p/${e}/new`,className:"flex-1 block text-center rounded font-medium transition-colors bg-accent-primary/25 text-text-primary hover:bg-accent-primary/40 px-3 py-1.5 text-sm","data-testid":"sidebar-new-session-button",children:"+ New Session"}),o.jsx(xl,{items:[{label:"Edit project settings",onClick:()=>l(!0)},{label:"Delete all sessions",onClick:E,danger:!0}],trigger:o.jsx("button",{className:"flex-shrink-0 p-2.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors",title:"Options",children:o.jsx(op,{})})}),n&&o.jsx(yl,{onClick:n,className:"md:hidden",variant:"sidebar",size:"md"})]}),w&&o.jsx(EN,{isOpen:a,onClose:()=>l(!1),project:w}),o.jsx("div",{className:"flex-1 overflow-y-auto",children:S.length===0?o.jsx("div",{className:"p-4 text-center text-text-muted text-xs",children:"No sessions"}):o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"divide-y divide-border",children:TN(S,c,h,v,y,e)}),x&&o.jsx("div",{className:"p-4 text-center text-text-muted text-xs",children:"Loading more..."}),o.jsx("div",{ref:k,className:"h-px"})]})})]})]})}function TN(e,t,n,s,a,l){const u=IS(e);return Array.from(u).map(([c,h])=>{const f=h[0];return f?o.jsxs("div",{children:[o.jsx("div",{className:"px-4 py-2 bg-bg-tertiary/30 text-text-muted text-xs font-medium",children:OS(f.updatedAt)}),h.map(p=>{const m=(t==null?void 0:t.id)===p.id,_=n.includes(p.id),x=p.isRunning;return o.jsx("div",{className:`w-full px-4 py-3 text-left hover:bg-bg-tertiary/50 transition-colors group ${m?"bg-bg-tertiary":""}`,children:o.jsxs(qn,{href:`/p/${l}/s/${p.id}`,className:`block ${m?"text-accent-primary":"text-text-primary"} hover:text-accent-primary`,children:[o.jsxs("div",{className:"flex justify-between items-center mb-1",children:[o.jsx("span",{className:`font-medium truncate text-sm ${m?"text-accent-primary":"text-text-primary"}`,children:p.title??p.id.slice(0,6)}),o.jsx(xl,{items:[{label:"Rename session",onClick:w=>a(p.id,w)},{label:"Delete session",onClick:w=>s(p.id,w),danger:!0}],trigger:o.jsx("button",{onClick:w=>w.preventDefault(),className:"p-1.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-all",title:"Options",children:o.jsx(op,{})})})]}),o.jsxs("div",{className:"flex items-center gap-2 mt-1",children:[x?o.jsx(jj,{}):_&&!m?o.jsx("span",{"aria-label":"Unread activity",title:"Unread activity",className:"w-2 h-2 rounded-full bg-amber-400 flex-shrink-0"}):null,o.jsx("span",{className:"text-text-muted text-xs flex-shrink-0",children:Uu(p.updatedAt)}),o.jsxs("span",{className:"text-text-muted text-xs flex-shrink-0",children:[p.messageCount," messages"]})]})]})},p.id)})]},c):null})}const Bv=["⠋","⠙","⠹","⠸","⠼","⠴"];function AN(){var c;const e=Rt(h=>h.currentProject),t=we(h=>h.currentSession),n=Pu(),s=!1,a=D.useRef(0),l=D.useRef(null);D.useEffect(()=>(n?(l.current=window.setInterval(()=>{a.current=(a.current+1)%Bv.length,u()},150),u()):(l.current&&(clearInterval(l.current),l.current=null),u()),()=>{l.current&&(clearInterval(l.current),l.current=null)}),[n,e,t,s]);const u=()=>{var m;const f=(m=t==null?void 0:t.metadata)==null?void 0:m.title,p=n?`${Bv[a.current]} `:"";e&&f?document.title=`${p}${e.name} - ${f} | OpenFox`:e?document.title=`${p}${e.name} | OpenFox`:document.title=`${p}OpenFox`};return typeof window<"u"&&((c=t==null?void 0:t.metadata)!=null&&c.title)&&window.document.documentElement.setAttribute("data-session-title",t.metadata.title),null}function BS(e,t=28){if(e.length<=t)return e;const n=e.split("/").filter(Boolean);if(n.length<=2)return e;const s=n[0],a=n[n.length-1],l=n.slice(1,-1).join("/"),u=t-s.length-a.length-3;if(u<0)return e;const c=l.slice(0,Math.floor(u/2)),h=l.slice(-Math.ceil(u/2));return`/${s}/${c}...${h}/${a}`}function zS({isOpen:e,onClose:t,projectName:n,onConfirm:s}){const a=()=>{s(),t()};return o.jsx(It,{isOpen:e,onClose:t,title:"Delete Project",size:"sm",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("p",{className:"text-text-secondary",children:["This will permanently delete the project"," ",o.jsx("span",{className:"font-semibold text-text-primary",children:n})," and all its sessions from OpenFox. The project files on disk will remain untouched."]}),o.jsxs("div",{className:"flex justify-end gap-2",children:[o.jsx(it,{variant:"secondary",onClick:t,children:"Cancel"}),o.jsx(it,{variant:"danger",onClick:a,children:"Delete"})]})]})})}function LN({isOpen:e,onClose:t}){const[,n]=dr(),[s,a]=D.useState(!1),l=RS(),[u,c]=D.useState(!1),h=Rt(R=>R.projects),f=Rt(R=>R.createProject),p=Rt(R=>R.listProjects),m=Rt(R=>R.deleteProject),[_,x]=D.useState(null),[w,k]=D.useState(null),[b,S]=D.useState(null);D.useEffect(()=>{e&&p()},[e,p]);const v=R=>{n(`/p/${R}`),t()},y=(R,B)=>{B.stopPropagation(),x(R)},E=()=>{_&&(m(_.id),x(null))},T=async R=>{const B=R.split("/").filter(Boolean).pop()??"",q=await f(B,R);return p(),k(R),N(q)?(S(q.error.path||R),!1):!0};function N(R){return R!=null&&typeof R=="object"&&"error"in R&&R.error!=null&&typeof R.error=="object"&&"code"in R.error&&R.error.code==="EACCES"}const L=D.useCallback(()=>{S(null)},[]),A=D.useCallback(async()=>{if(S(null),w){const R=w.split("/").filter(Boolean).pop()??"",B=await f(R,w);p(),k(w),N(B)&&S(B.error.path||w)}},[w,f,p,S]);return D.useEffect(()=>{if(w){const R=h.find(B=>B.workdir===w);R&&(n(`/p/${R.id}`),t(),k(null))}},[h,w,n,t]),e?o.jsxs(It,{isOpen:e,onClose:t,title:"Open Project",size:"xl",footer:o.jsx("div",{className:"flex justify-end gap-2",children:o.jsx(it,{variant:"secondary",onClick:t,children:"Close"})}),children:[o.jsxs("div",{className:"flex flex-col sm:flex-row flex-1 -m-4",children:[o.jsxs("div",{className:"w-full sm:w-1/2 border-b sm:border-b-0 sm:border-r border-border flex flex-col max-h-[40vh] sm:max-h-[50vh]",children:[o.jsx("div",{className:"p-3 border-b border-border bg-bg-tertiary/30 shrink-0",children:o.jsx("h3",{className:"font-medium text-sm text-text-secondary",children:"Recent Projects"})}),o.jsx("div",{className:"flex-1 overflow-y-auto",children:h.length===0?o.jsxs("div",{className:"p-6 text-center text-text-muted text-sm",children:[o.jsx("p",{className:"mb-2",children:"No recent projects"}),o.jsx("p",{className:"text-xs",children:'Click "Create new project" to add one'})]}):o.jsx("div",{className:"divide-y divide-border",children:h.map(R=>o.jsxs("div",{className:"group flex items-center gap-3 p-3 hover:bg-bg-tertiary/50 transition-colors",children:[o.jsxs("button",{onClick:()=>v(R.id),className:"flex-1 flex items-center gap-3 text-left",children:[o.jsx(Bu,{className:"w-5 h-5 text-accent-primary"}),o.jsxs("div",{className:"flex-1 min-w-0",children:[o.jsx("div",{className:"font-medium truncate",children:R.name}),o.jsx("div",{className:"text-xs text-text-muted truncate",children:BS(R.workdir,32)})]})]}),o.jsx("button",{onClick:B=>y(R,B),className:"text-accent-error/70 hover:text-accent-error p-1",title:"Delete project",children:o.jsx(pl,{className:"w-4 h-4"})})]},R.id))})})]}),o.jsx("div",{className:"w-full sm:w-1/2 flex flex-col items-center justify-center p-6 sm:p-8 text-center",children:o.jsxs("div",{className:"flex flex-col gap-3 w-full max-w-sm",children:[o.jsx(it,{variant:"primary",onClick:()=>c(!0),children:"Select existing project"}),o.jsx(it,{variant:"secondary",onClick:()=>a(!0),"data-testid":"open-project-create-button",children:"Create new project"})]})})]}),s&&o.jsx(DS,{isOpen:s,onClose:()=>a(!1)}),_&&o.jsx(zS,{isOpen:!0,onClose:()=>x(null),projectName:_.name,onConfirm:E}),u&&o.jsx(xp,{initialPath:l??void 0,onSelect:R=>{T(R).then(B=>{B&&c(!1)})},onClose:()=>c(!1)}),b&&o.jsx(LS,{isOpen:!0,onClose:L,path:b,onRetry:A})]}):null}function DN(){const[e,t]=D.useState(!1),[n,s]=D.useState(null),a=we(w=>w.sessions),l=Rt(w=>w.projects),u=Rt(w=>w.loading),c=Rt(w=>w.listProjects),h=we(w=>w.listSessions),f=Rt(w=>w.deleteProject),p=we(w=>w.connectionStatus);D.useEffect(()=>{p==="connected"&&(c(),h())},[p,c,h]);const m=[...l].sort((w,k)=>{const b=a.filter(E=>E.workdir.startsWith(w.workdir)),S=a.filter(E=>E.workdir.startsWith(k.workdir)),v=b.length>0?new Date(b.reduce((E,T)=>new Date(T.updatedAt)>new Date(E.updatedAt)?T:E).updatedAt).getTime():new Date(w.updatedAt).getTime();return(S.length>0?new Date(S.reduce((E,T)=>new Date(T.updatedAt)>new Date(E.updatedAt)?T:E).updatedAt).getTime():new Date(k.updatedAt).getTime())-v}),_=w=>{const k=l.find(b=>b.id===w);return k?a.filter(b=>b.workdir.startsWith(k.workdir)).sort((b,S)=>new Date(S.updatedAt).getTime()-new Date(b.updatedAt).getTime()).slice(0,5):[]},x=()=>{t(!0)};return o.jsxs("div",{className:"flex-1 flex flex-col overflow-y-auto bg-primary",children:[o.jsxs("div",{className:"max-w-5xl mx-auto w-full p-4 md:p-8",children:[o.jsxs("div",{className:"mb-6 md:mb-8 flex items-center justify-between",children:[o.jsxs("div",{children:[o.jsx("h1",{className:"text-3xl font-bold text-accent-primary",children:"OpenFox"}),o.jsx("p",{className:"text-text-secondary",children:"Local LLM-powered coding assistant with contract-driven execution"})]}),o.jsx(it,{variant:"primary",onClick:x,children:"Open Project"})]}),m.map(w=>{const k=_(w.id);return o.jsx("div",{className:"mb-6 md:mb-8",children:o.jsxs("div",{className:"bg-bg-secondary border border-border rounded-lg overflow-hidden",children:[o.jsxs("div",{className:"p-3 md:p-4 border-b border-border flex items-center justify-between gap-2",children:[o.jsxs(qn,{href:`/p/${w.id}`,className:"flex items-center gap-2 cursor-pointer hover:opacity-80 transition-opacity flex-1",children:[o.jsx(Bu,{className:"w-5 h-5 text-accent-primary flex-shrink-0"}),o.jsx("span",{className:"text-text-primary font-semibold",children:w.name})]}),o.jsx(qn,{href:`/p/${w.id}/new`,className:"rounded font-medium transition-colors bg-accent-primary/25 text-text-primary hover:bg-accent-primary/40 px-1.5 py-1 text-xs",children:"+ New Session"}),o.jsx("button",{type:"button",onClick:()=>s({id:w.id,name:w.name}),className:"p-1.5 rounded text-text-muted hover:text-accent-error hover:bg-accent-error/10 transition-colors",title:"Delete project",children:o.jsx(pl,{className:"w-4 h-4"})})]}),o.jsx("div",{className:"divide-y divide-border",children:k.length>0?k.map(b=>{const S=l.find(y=>b.workdir.startsWith(y.workdir)),v=S?`/p/${S.id}/s/${b.id}`:"#";return o.jsx(qn,{href:v,className:"block p-3 md:p-4 hover:bg-bg-tertiary/50 cursor-pointer transition-colors",children:o.jsxs("div",{className:"flex items-center justify-between gap-2",children:[o.jsx("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:o.jsx("div",{className:"flex-1 min-w-0",children:o.jsx("div",{className:"text-sm text-text-muted truncate",children:b.title??b.id.slice(0,8)})})}),o.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[o.jsx("span",{className:"text-text-muted text-xs",children:yN(b.updatedAt)}),o.jsxs("span",{className:"text-text-muted text-xs",children:[b.messageCount," msgs"]})]})]})},b.id)}):o.jsx("div",{className:"p-3 md:p-4 text-text-muted text-sm",children:"No sessions yet"})})]})},w.id)}),m.length===0&&!u&&o.jsx("div",{className:"text-center py-12 text-text-muted",children:"No projects yet. Open a project to get started."}),u&&o.jsx("div",{className:"flex justify-center py-12",children:o.jsx(_l,{})})]}),e&&o.jsx(LN,{isOpen:e,onClose:()=>t(!1)}),n&&o.jsx(zS,{isOpen:!0,onClose:()=>s(null),projectName:n.name,onConfirm:()=>f(n.id)})]})}function RN(){const[,e]=sp("/p/:projectId/new"),[,t]=dr(),n=e==null?void 0:e.projectId,s=we(u=>u.createSession),a=we(u=>u.resetPendingSessionCreate),l=D.useCallback(async()=>{if(!n)return;const u=await s(n);u?(t(`/p/${n}/s/${u.id}`),a()):(t(`/p/${n}`),a())},[n,s,t,a]);return D.useEffect(()=>{l()},[l]),o.jsx("div",{className:"flex-1 flex items-center justify-center",children:o.jsx(_l,{})})}function ON(){const e=Rt(t=>t.currentProject);return o.jsx("div",{className:"h-full flex flex-col items-center justify-center p-8 text-center",children:o.jsxs("div",{className:"max-w-md",children:[o.jsx("h2",{className:"text-xl font-semibold text-text-primary mb-2",children:(e==null?void 0:e.name)??"Project"}),o.jsx("p",{className:"text-text-secondary mb-6",children:"No session selected"}),o.jsxs("div",{className:"flex flex-col gap-3",children:[e&&o.jsx(qn,{href:`/p/${e.id}/new`,"data-testid":"create-new-session-button",className:"block w-full rounded font-medium transition-colors bg-accent-primary/25 text-text-primary hover:bg-accent-primary/40 px-3 py-2 text-center",children:"Create New Session"}),o.jsx("p",{className:"text-sm text-text-muted",children:"Or select an existing session from the sidebar"})]})]})})}const Uo=e=>Math.round(e*10)/10;function MN(e){return typeof e.totalTime=="number"&&!Number.isNaN(e.totalTime)}function Cm(e){return{providerId:e.providerId,providerName:e.providerName,backend:e.backend,model:e.model}}function IN(e){return`${e.providerId}::${e.model}`}function PN(e){return`${e.providerName} > ${e.model}`}function zv(e){let t=0,n=0,s=0,a=0,l=0,u=0;const c=[],h=[];let f=0;for(const[_,x]of e.entries()){const w=x.stats,k=Cm(w);t+=w.totalTime,n+=w.toolTime,s+=w.prefillTokens,a+=w.generationTokens;const b=w.prefillSpeed>0?w.prefillTokens/w.prefillSpeed:0,S=w.generationSpeed>0?w.generationTokens/w.generationSpeed:0;l+=b,u+=S,c.push({messageId:x.id,timestamp:x.timestamp,...k,mode:w.mode,responseIndex:_+1,prefillTokens:w.prefillTokens,generationTokens:w.generationTokens,prefillSpeed:w.prefillSpeed,generationSpeed:w.generationSpeed,totalTime:w.totalTime,aiTime:w.totalTime-w.toolTime,toolTime:w.toolTime});const v=w.llmCalls??[];for(const y of v)f+=1,h.push({messageId:x.id,timestamp:y.timestamp??x.timestamp,providerId:y.providerId,providerName:y.providerName,backend:y.backend,model:y.model,mode:w.mode,responseIndex:_+1,sessionCallIndex:f,callIndex:y.callIndex,promptTokens:y.promptTokens,completionTokens:y.completionTokens,ttft:y.ttft,completionTime:y.completionTime,prefillSpeed:y.prefillSpeed,generationSpeed:y.generationSpeed,totalTime:y.totalTime,...y.temperature!==void 0&&{temperature:y.temperature},...y.topP!==void 0&&{topP:y.topP},...y.topK!==void 0&&{topK:y.topK},...y.maxTokens!==void 0&&{maxTokens:y.maxTokens}})}const p=l>0?Uo(s/l):0,m=u>0?Uo(a/u):0;return{totalTime:Uo(t),aiTime:Uo(t-n),toolTime:Uo(n),prefillTokens:s,generationTokens:a,avgPrefillSpeed:p,avgGenerationSpeed:m,responseCount:e.length,llmCallCount:h.length,dataPoints:c,callDataPoints:h}}function BN(e){const t=e.filter(a=>a.stats!==void 0&&a.stats!==null&&MN(a.stats)).sort((a,l)=>new Date(a.timestamp).getTime()-new Date(l.timestamp).getTime());if(t.length===0)return null;const n=new Map;for(const a of t){const l=IN(Cm(a.stats)),u=n.get(l)??[];n.set(l,[...u,a])}const s=Array.from(n.entries()).map(([a,l])=>{const u=Cm(l[0].stats),c=zv(l);return{...u,key:a,label:PN(u),...c}});return{...zv(t),modelGroups:s}}function zN(e){return D.useMemo(()=>BN(e),[e])}function HS(){var a;const e=we(l=>l.gitStatus),t=we(l=>l.currentSession),[n,s]=D.useState(!0);return D.useEffect(()=>{t!=null&&t.workdir&&s(!1)},[t==null?void 0:t.workdir]),{branch:(e==null?void 0:e.branch)??null,diff:{files:((a=e==null?void 0:e.diff)==null?void 0:a.files)??[],loading:n,error:null}}}function hu(e){return e.toLocaleString("en-US").replace(/,/g," ")}function Hv(e){return Number.isFinite(e)?e>=1e3?`${(e/1e3).toFixed(1)}k`:e.toFixed(1):"0"}function HN(e){if(!Number.isFinite(e))return"0s";if(e<60)return`${e.toFixed(1)}s`;const t=Math.floor(e/60),n=Math.round(e%60);return`${t}m${n}s`}const $v=["▁","▂","▃","▄","▅","▆","▇","█"];function $N(e,t,n){if(n===t)return 4;const s=(e-t)/(n-t);return Math.min(7,Math.max(0,Math.round(s*7)))}function UN(e,t){if(e===t){const a=Math.max(Math.abs(e)*.05,1);return{minY:e-a,maxY:t+a}}const n=t-e,s=Math.max(n*.1,.1);return{minY:e-s,maxY:t+s}}function FN(e,t){if(e.length===0||t<=0)return{blocks:"",minX:0,maxX:0,minY:0,maxY:0};const n=[...e].sort((m,_)=>m.x-_.x),s=n[0].x,a=n[n.length-1].x,l=Math.min(...n.map(m=>m.y)),u=Math.max(...n.map(m=>m.y)),{minY:c,maxY:h}=UN(l,u),f=Array.from({length:t},()=>" "),p=new Map;for(const m of n){const _=a===s?0:Math.round((m.x-s)/(a-s)*(t-1)),x=p.get(_)??[];p.set(_,[...x,m.y])}for(const[m,_]of p){const x=Math.max(..._);f[m]=$v[$N(x,c,h)]??$v[0]}return{blocks:f.join(""),minX:s,maxX:a,minY:c,maxY:h}}function Uv(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:e.toFixed(1)}function Fv({data:e,width:t=60,height:n=78,label:s,xLabel:a,yLabel:l,showAxes:u=!0,formatY:c=Uv,formatX:h=Uv}){const f=D.useMemo(()=>{const p=FN(e,t),m=Math.max(t*6,240),_=10,x=8,k=[...e].sort((y,E)=>y.x-E.x).map(y=>{const E=p.maxX===p.minX?m/2:_+(y.x-p.minX)/(p.maxX-p.minX)*(m-_*2),T=p.maxY===p.minY?n/2:x+(p.maxY-y.y)/(p.maxY-p.minY)*(n-x*2);return{...y,cx:E,cy:T,leftPercent:E/m*100,topPercent:T/n*100}}),b=k.map((y,E)=>`${E===0?"M":"L"} ${y.cx.toFixed(1)} ${y.cy.toFixed(1)}`).join(" "),v=[p.maxY,(p.maxY+p.minY)/2,p.minY].map(y=>({value:y,y:p.maxY===p.minY?n/2:x+(p.maxY-y)/(p.maxY-p.minY)*(n-x*2)}));return{...p,chartWidth:m,points:k,path:b,gridLines:v}},[e,n,t]);return e.length===0?o.jsxs("div",{className:"font-mono text-text-muted text-xs",children:[s&&o.jsx("div",{className:"mb-1",children:s}),o.jsx("div",{children:"No data"})]}):o.jsxs("div",{className:"font-mono text-xs",children:[s&&o.jsx("div",{className:"text-text-secondary mb-2",children:s}),o.jsxs("div",{className:"flex gap-3",children:[u&&o.jsx("div",{className:"w-12 h-[78px] flex flex-col justify-between text-right text-text-muted",children:f.gridLines.map(p=>o.jsx("span",{children:c(p.value)},`${p.value}-${p.y}`))}),o.jsx("div",{className:"flex-1 min-w-0",children:o.jsxs("div",{className:"relative h-[78px]",children:[o.jsxs("svg",{viewBox:`0 0 ${f.chartWidth} ${n}`,className:"w-full h-[78px] overflow-visible",preserveAspectRatio:"none","aria-hidden":"true",children:[f.gridLines.map(p=>o.jsx("line",{x1:"0",x2:f.chartWidth,y1:p.y,y2:p.y,stroke:"currentColor",strokeDasharray:"3 4",className:"text-border/60"},`grid-${p.y}`)),f.points.map(p=>o.jsx("line",{x1:p.cx,x2:p.cx,y1:n-4,y2:p.cy,stroke:"currentColor",className:"text-border/40"},`guide-${p.cx}-${p.cy}`)),f.points.length>1&&o.jsx("path",{d:f.path,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",className:"text-accent-primary/45"})]}),f.points.map(p=>o.jsx("div",{className:"absolute -translate-x-1/2 -translate-y-1/2",style:{left:`${p.leftPercent}%`,top:`${p.topPercent}%`},title:`${h(p.x)} -> ${c(p.y)}`,children:o.jsx("div",{className:"w-2.5 h-2.5 rounded-full bg-accent-primary/20 flex items-center justify-center",children:o.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-accent-primary"})})},`point-${p.x}-${p.y}`))]})})]}),u&&o.jsxs("div",{className:"flex items-start gap-3 text-text-muted mt-1",children:[o.jsx("span",{className:"w-12"}),o.jsxs("span",{className:"flex-1 flex justify-between",children:[o.jsx("span",{children:h(f.minX)}),o.jsx("span",{children:a}),o.jsx("span",{children:h(f.maxX)})]})]}),l&&u&&o.jsx("div",{className:"text-text-muted mt-1 text-center",children:l})]})}function VN({data:e,prefillLabel:t="Prefill Speed (tok/s) by Response",generationLabel:n="Generation Speed (tok/s) by Response",xLabel:s="response",width:a=60}){const l=e.map(c=>({x:c.x,y:c.ppSpeed})),u=e.map(c=>({x:c.x,y:c.tgSpeed}));return o.jsxs("div",{className:"space-y-5",children:[o.jsx(Fv,{data:l,width:a,label:t,xLabel:s}),o.jsx(Fv,{data:u,width:a,label:n,xLabel:s})]})}function GN(e){const t=new Map;for(const n of e.callDataPoints){const s=t.get(n.messageId)??[];t.set(n.messageId,[...s,n])}return e.dataPoints.map(n=>{const s=[...t.get(n.messageId)??[]].sort((a,l)=>a.callIndex-l.callIndex);return{...n,callCount:s.length,calls:s,isExpandable:s.length>1}})}function WN(e){return{mode:"responses",xLabel:"response",prefillLabel:"Prefill Speed (tok/s) by Response",generationLabel:"Generation Speed (tok/s) by Response",points:e.dataPoints.map(t=>({x:t.responseIndex,ppSpeed:t.prefillSpeed,tgSpeed:t.generationSpeed}))}}function qN(e){return{mode:"calls",xLabel:"context",prefillLabel:"Prefill Speed (tok/s) vs Context",generationLabel:"Generation Speed (tok/s) vs Context",points:e.callDataPoints.map(t=>({x:t.promptTokens,ppSpeed:t.prefillSpeed,tgSpeed:t.generationSpeed}))}}function KN(e){return e.callDataPoints.length>0?qN(e):WN(e)}function Mf(e){if(e<60)return`${e.toFixed(1)}s`;const t=Math.floor(e/60),n=e%60;return`${t}m ${n.toFixed(0)}s`}function Ti(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:e.toString()}function Qo(e){return e>=1e3?`${(e/1e3).toFixed(1)}k`:e.toFixed(1)}function YN(e){if(e.length===0)return"0 ctx";const t=Math.min(...e),n=Math.max(...e);return t===n?`${Ti(t)} ctx`:`${Ti(t)}-${Ti(n)} ctx`}function fu(e){return`${Qo(e)} t/s`}function $S(e){try{return new Date(e).toLocaleTimeString("en-US",{hour12:!1})}catch{return e}}function XN(e){return{exportedAt:new Date().toISOString(),providerId:e.providerId,providerName:e.providerName,backend:e.backend,model:e.model,label:e.label,summary:{totalTime:e.totalTime,aiTime:e.aiTime,toolTime:e.toolTime,prefillTokens:e.prefillTokens,generationTokens:e.generationTokens,avgPrefillSpeed:e.avgPrefillSpeed,avgGenerationSpeed:e.avgGenerationSpeed,responseCount:e.responseCount,llmCallCount:e.llmCallCount},responses:e.dataPoints.map(t=>({responseIndex:t.responseIndex,timestamp:t.timestamp,mode:t.mode,prefillTokens:t.prefillTokens,generationTokens:t.generationTokens,prefillSpeed:t.prefillSpeed,generationSpeed:t.generationSpeed,totalTime:t.totalTime,aiTime:t.aiTime,toolTime:t.toolTime})),llmCalls:e.callDataPoints.map(t=>({sessionCallIndex:t.sessionCallIndex,responseIndex:t.responseIndex,callIndex:t.callIndex,timestamp:t.timestamp,mode:t.mode,promptTokens:t.promptTokens,completionTokens:t.completionTokens,ttft:t.ttft,completionTime:t.completionTime,prefillSpeed:t.prefillSpeed,generationSpeed:t.generationSpeed,totalTime:t.totalTime}))}}function QN({isOpen:e,onClose:t,stats:n}){const s=D.useRef(null),[a,l]=D.useState({}),[u,c]=D.useState(()=>{var w;return((w=n.modelGroups[0])==null?void 0:w.key)??""});D.useEffect(()=>{var w;n.modelGroups.some(k=>k.key===u)||c(((w=n.modelGroups[0])==null?void 0:w.key)??"")},[u,n.modelGroups]);const h=D.useMemo(()=>n.modelGroups.find(w=>w.key===u)??n.modelGroups[0],[u,n.modelGroups]),f=D.useMemo(()=>h?GN(h):[],[h]),p=D.useMemo(()=>h?KN(h):{mode:"responses",xLabel:"response",prefillLabel:"",generationLabel:"",points:[]},[h]),m=D.useCallback(w=>{l(k=>({...k,[w]:!k[w]}))},[]),_=D.useCallback(()=>{if(!h)return;const w=XN(h);navigator.clipboard.writeText(JSON.stringify(w,null,2)).catch(k=>console.error("Failed to copy:",k))},[h]),x=D.useCallback(async()=>{if(s.current)try{const w=(await J(async()=>{const{default:S}=await import("./html2canvas.esm-QH1iLAAe.js");return{default:S}},[])).default,k=await w(s.current,{backgroundColor:"#1a1a1a",scale:2}),b=document.createElement("a");b.download=`openfox-stats-${new Date().toISOString().slice(0,10)}.png`,b.href=k.toDataURL("image/png"),b.click()}catch(w){console.error("Failed to export PNG:",w),_()}},[_]);return o.jsx(It,{isOpen:e,onClose:t,title:"Session Stats",size:"lg",children:o.jsxs("div",{ref:s,className:"space-y-6",children:[o.jsx("section",{children:o.jsx("div",{className:"flex flex-wrap gap-2",children:n.modelGroups.map(w=>o.jsx("button",{onClick:()=>c(w.key),className:`px-3 py-1.5 rounded border text-xs transition-colors ${w.key===(h==null?void 0:h.key)?"border-accent-primary bg-accent-primary/10 text-accent-primary":"border-border text-text-muted hover:text-text-primary hover:bg-bg-tertiary/40"}`,title:w.label,children:w.label},w.key))})}),h&&o.jsxs("section",{children:[o.jsx("h3",{className:"text-sm font-semibold text-text-secondary mb-3 uppercase tracking-wide",children:"Summary"}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-5 gap-4",children:[o.jsx(ns,{label:"AI Time",value:Mf(h.aiTime)}),o.jsx(ns,{label:"Total Time",value:Mf(h.totalTime)}),o.jsx(ns,{label:"Tool Time",value:Mf(h.toolTime)}),o.jsx(ns,{label:"Responses",value:h.responseCount.toString()}),o.jsx(ns,{label:"LLM Calls",value:h.llmCallCount.toString()})]}),o.jsxs("div",{className:"grid grid-cols-2 md:grid-cols-4 gap-4 mt-3",children:[o.jsx(ns,{label:"Prefill Tokens",value:Ti(h.prefillTokens),subValue:`@ ${Qo(h.avgPrefillSpeed)} tok/s`}),o.jsx(ns,{label:"Gen Tokens",value:Ti(h.generationTokens),subValue:`@ ${Qo(h.avgGenerationSpeed)} tok/s`}),o.jsx(ns,{label:"Avg PP Speed",value:`${Qo(h.avgPrefillSpeed)}`,subValue:"tok/s"}),o.jsx(ns,{label:"Avg TG Speed",value:`${Qo(h.avgGenerationSpeed)}`,subValue:"tok/s"})]})]}),h&&p.points.length>1&&o.jsxs("section",{children:[o.jsxs("div",{className:"flex items-center justify-between mb-3",children:[o.jsx("h3",{className:"text-sm font-semibold text-text-secondary uppercase tracking-wide",children:"Performance Progression"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:_,className:"px-2 py-1 text-xs text-text-muted hover:text-text-primary hover:bg-bg-tertiary rounded transition-colors",children:"Copy JSON"}),o.jsx("button",{onClick:x,className:"px-2 py-1 text-xs text-text-muted hover:text-text-primary hover:bg-bg-tertiary rounded transition-colors",children:"Save PNG"})]})]}),o.jsx("div",{className:"bg-bg-tertiary/50 rounded p-4",children:o.jsx(VN,{data:p.points,width:50,prefillLabel:p.prefillLabel,generationLabel:p.generationLabel,xLabel:p.xLabel})})]}),h&&o.jsxs("section",{children:[o.jsxs("h3",{className:"text-sm font-semibold text-text-secondary mb-3 uppercase tracking-wide",children:["Response Log (",h.responseCount," responses)"]}),o.jsx("div",{className:"overflow-y-auto bg-bg-tertiary/30 rounded",children:o.jsxs("table",{className:"w-full table-fixed border-separate border-spacing-0 text-xs",children:[o.jsxs("colgroup",{children:[o.jsx("col",{className:"w-[7%]"}),o.jsx("col",{className:"w-[14%]"}),o.jsx("col",{className:"w-[10%]"}),o.jsx("col",{className:"w-[14%]"}),o.jsx("col",{className:"w-[14%]"}),o.jsx("col",{className:"w-[14%]"}),o.jsx("col",{className:"w-[11%]"}),o.jsx("col",{className:"w-[2%]"})]}),o.jsx("thead",{children:o.jsxs("tr",{className:"text-[10px] uppercase tracking-wide text-text-muted/80",children:[o.jsx("th",{className:"px-3 py-2 text-center font-medium",children:"#"}),o.jsx("th",{className:"px-2 py-2 text-center font-medium",children:"At"}),o.jsx("th",{className:"px-2 py-2 text-center font-medium",children:"Time"}),o.jsx("th",{className:"px-2 py-2 text-center font-medium",children:"Context"}),o.jsx("th",{className:"px-2 py-2 text-center font-medium",children:"PP t/s"}),o.jsx("th",{className:"px-2 py-2 text-center font-medium",children:"TG t/s"}),o.jsx("th",{className:"px-2 py-2 text-center font-medium",children:"Calls"}),o.jsx("th",{className:"px-2 py-2"})]})}),o.jsx("tbody",{children:f.map((w,k)=>o.jsxs(D.Fragment,{children:[o.jsx(JN,{row:w,index:k,isExpanded:a[w.messageId]??!1,onToggle:w.isExpandable?()=>m(w.messageId):void 0}),(a[w.messageId]??!1)&&w.calls.map((b,S)=>o.jsx(ZN,{dataPoint:b,index:S},`${b.messageId}-${b.callIndex}`))]},w.messageId))})]})})]})]})})}function ns({label:e,value:t,subValue:n}){return o.jsxs("div",{className:"bg-bg-tertiary/50 rounded p-3",children:[o.jsx("div",{className:"text-text-muted text-xs mb-1",children:e}),o.jsx("div",{className:"text-text-primary text-lg font-semibold",children:t}),n&&o.jsx("div",{className:"text-text-muted text-xs",children:n})]})}function JN({row:e,index:t,isExpanded:n,onToggle:s}){const a=e.calls.length>0?YN(e.calls.map(l=>l.promptTokens)):`${Ti(e.prefillTokens)} ctx`;return o.jsxs("tr",{onClick:s,className:`${t%2===0?"bg-bg-tertiary/20":""} ${s?"cursor-pointer hover:bg-bg-tertiary/35 transition-colors":""}`,children:[o.jsx("td",{className:"px-3 py-2 text-center text-text-muted align-middle",children:e.responseIndex}),o.jsx("td",{className:"px-2 py-2 text-center text-text-muted font-mono align-middle whitespace-nowrap",children:$S(e.timestamp)}),o.jsxs("td",{className:"px-2 py-2 text-center text-text-muted align-middle whitespace-nowrap",children:[e.totalTime.toFixed(1),"s"]}),o.jsx("td",{className:"px-2 py-2 text-center text-text-primary font-mono align-middle whitespace-nowrap",children:a.replace(/ ctx$/,"")}),o.jsx("td",{className:"px-2 py-2 text-center text-text-primary font-mono align-middle whitespace-nowrap",children:fu(e.prefillSpeed)}),o.jsx("td",{className:"px-2 py-2 text-center text-text-primary font-mono align-middle whitespace-nowrap",children:fu(e.generationSpeed)}),o.jsx("td",{className:"px-2 py-2 text-center text-text-muted font-mono align-middle whitespace-nowrap",children:e.callCount}),o.jsx("td",{className:"px-2 py-2 text-center text-text-muted align-middle whitespace-nowrap",children:e.isExpandable?n?"v":">":""})]})}function ZN({dataPoint:e,index:t}){const n=e.temperature!==void 0||e.topP!==void 0||e.topK!==void 0||e.maxTokens!==void 0;return o.jsxs(o.Fragment,{children:[o.jsxs("tr",{className:`${t%2===0?"bg-bg-tertiary/10":"bg-bg-tertiary/5"}`,children:[o.jsxs("td",{className:"px-3 py-2 pl-6 text-center text-text-muted align-middle border-l border-border/60",children:["c",e.callIndex]}),o.jsx("td",{className:"px-2 py-2 text-center text-text-muted font-mono align-middle whitespace-nowrap",children:$S(e.timestamp)}),o.jsxs("td",{className:"px-2 py-2 text-center text-text-muted align-middle whitespace-nowrap",children:[e.totalTime.toFixed(1),"s"]}),o.jsx("td",{className:"px-2 py-2 text-center text-text-primary font-mono align-middle whitespace-nowrap",children:Ti(e.promptTokens)}),o.jsx("td",{className:"px-2 py-2 text-center text-text-primary font-mono align-middle whitespace-nowrap",children:fu(e.prefillSpeed)}),o.jsx("td",{className:"px-2 py-2 text-center text-text-primary font-mono align-middle whitespace-nowrap",children:fu(e.generationSpeed)}),o.jsx("td",{className:"px-2 py-2 text-center text-text-muted font-mono align-middle whitespace-nowrap",children:e.callIndex}),o.jsx("td",{className:"px-2 py-2"})]}),n&&o.jsx("tr",{className:`${t%2===0?"bg-bg-tertiary/5":"bg-bg-tertiary/[2.5%]"}`,children:o.jsx("td",{colSpan:8,className:"px-6 py-1.5 border-l border-border/60",children:o.jsxs("div",{className:"flex flex-wrap gap-x-4 gap-y-1 text-[10px] text-text-muted",children:[e.temperature!==void 0&&o.jsxs("span",{children:["temp: ",e.temperature.toFixed(2)]}),e.topP!==void 0&&o.jsxs("span",{children:["topP: ",e.topP.toFixed(2)]}),e.topK!==void 0&&o.jsxs("span",{children:["topK: ",e.topK]}),e.maxTokens!==void 0&&o.jsxs("span",{children:["maxTok: ",e.maxTokens]})]})})})]})}const eT={passed:{icon:"✓",color:"text-accent-success"},completed:{icon:"◉",color:"text-purple-400"},failed:{icon:"✗",color:"text-accent-error"},resolved:{icon:"✓",color:"text-accent-success"},dismissed:{icon:"–",color:"text-text-muted"},open:{icon:"○",color:"text-accent-warning"},pending:{icon:"○",color:"text-text-muted"},in_progress:{icon:"◌",color:"text-accent-warning"}},tT=["open","in_progress","pending","completed","resolved","dismissed","passed","failed"];function nT(e){return eT[e]??{icon:"○",color:"text-text-muted"}}function US(e){const t=document.createElement("textarea");return t.innerHTML=e,t.value}const Fu=D.memo(function({status:t,className:n="text-xs leading-tight flex-shrink-0"}){const{icon:s,color:a}=nT(t);return o.jsx("span",{className:`${a} ${n}`,children:s})});function Vv({entries:e,title:t}){const n=D.useMemo(()=>e.reduce((s,a)=>(s[a.status]=(s[a.status]??0)+1,s),{}),[e]);return o.jsxs("h3",{className:"text-sm font-semibold text-text-primary mb-2 flex items-center justify-between",children:[o.jsx("span",{children:t}),Object.keys(n).length>0&&o.jsx("span",{className:"font-normal text-xs flex items-center gap-1.5",children:tT.map(s=>{const a=n[s];return a?o.jsxs("span",{className:"flex items-center gap-0.5",children:[o.jsx(Fu,{status:s}),o.jsx("span",{children:a})]},s):null})})]})}const rT=D.memo(function({entries:t,title:n}){return t.length===0?null:o.jsxs("div",{className:"my-1 rounded border border-border bg-secondary overflow-hidden",children:[n&&o.jsx("div",{className:"px-1.5 py-1 border-b border-border bg-secondary",children:o.jsx("span",{className:"text-xs font-medium text-text-muted",children:n})}),o.jsx("div",{className:"bg-primary",children:t.map((s,a)=>o.jsxs("div",{className:`flex items-start gap-1 px-1.5 py-1 ${a>0?"border-t border-border":""}`,children:[o.jsx(Fu,{status:s.status}),o.jsxs("div",{className:"flex-1 min-w-0 text-xs truncate",children:[o.jsxs("span",{className:"text-text-muted",children:["[",s.id,"]"]})," ",US(s.description)]})]},s.id??a))})]})}),sT="#6b7280";function il(e,t){var n;return((n=e.find(s=>s.id===t))==null?void 0:n.color)??sT}const gt=Yn(e=>{const t=async()=>{await hp("/api/agents",e,!0)};return{defaults:[],userItems:[],projectItems:[],loading:!1,fetchAgents:t,fetchAgent:async n=>{try{const s=await Te(`/api/agents/${n}`);return s.ok?await s.json():null}catch{return null}},fetchDefaultContent:async n=>{try{const s=await Te(`/api/agents/defaults/${n}`);return s.ok?await s.json():null}catch{return null}},createAgent:async(n,s)=>{const a=await qs("POST","/api/agents",{...n,destination:s});return a.success&&await t(),a},updateAgent:async(n,s)=>{const a=await qs("PUT",`/api/agents/${n}`,s);return a.success&&await t(),a},deleteAgent:async n=>{try{const s=await Te(`/api/agents/${n}`,{method:"DELETE"}),a=await s.json();return s.ok?(e(l=>({userItems:l.userItems.filter(u=>u.id!==n)})),{success:!0}):{success:!1,error:a.error??"Failed to delete"}}catch{return{success:!1,error:"Network error"}}},duplicateAgent:async(n,s)=>Iu(`/api/agents/${n}/duplicate`,t,s)}}),Nt=Yn((e,t)=>({defaults:[],userItems:[],projectItems:[],activeWorkflowId:"default",loading:!1,templateVariables:[],fetchTemplateVariables:async()=>{try{const s=await(await Te("/api/workflows/template-variables")).json();e({templateVariables:s.variables??[]})}catch{}},fetchWorkflows:async()=>{e({loading:!0});try{const s=await(await Te("/api/workflows")).json();e({defaults:s.defaults??[],userItems:s.userItems??[],projectItems:s.projectItems??[],activeWorkflowId:s.activeWorkflowId??"default",loading:!1})}catch{e({loading:!1})}},fetchWorkflow:async n=>{try{const s=await Te(`/api/workflows/${n}`);return s.ok?await s.json():null}catch{return null}},fetchDefaultContent:async n=>{try{const s=await Te(`/api/workflows/defaults/${n}`);return s.ok?await s.json():null}catch{return null}},createWorkflow:async(n,s)=>{const a=await qs("POST","/api/workflows",{...n,destination:s});return a.success&&await t().fetchWorkflows(),a},updateWorkflow:async(n,s)=>{const a=await qs("PUT",`/api/workflows/${n}`,s);return a.success&&await t().fetchWorkflows(),a},deleteWorkflow:async n=>{try{const s=await Te(`/api/workflows/${n}`,{method:"DELETE"}),a=await s.json();return s.ok?(e(l=>({userItems:l.userItems.filter(u=>u.id!==n)})),{success:!0}):{success:!1,error:a.error??"Failed to delete"}}catch{return{success:!1,error:"Network error"}}},duplicateWorkflow:async(n,s)=>Iu(`/api/workflows/${n}/duplicate`,()=>t().fetchWorkflows(),s)})),iT={pending:"completed",completed:"passed",passed:"failed",failed:"pending"};async function aT(e,t){await Te(`/api/sessions/${e}/criteria`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({criteria:t})})}function Fc({id:e,agents:t}){const n=il(t,e),s=t.find(a=>a.id===e);return o.jsx("span",{className:"font-medium rounded px-1",style:{backgroundColor:`${n}20`,color:n},children:(s==null?void 0:s.name)??e})}function oT({id:e}){const t=Nt(u=>u.defaults),n=Nt(u=>u.userItems),a=D.useMemo(()=>[...t,...n],[t,n]).find(u=>u.id===e),l=(a==null?void 0:a.color)??"#3b82f6";return o.jsx("span",{className:"font-medium rounded px-1",style:{backgroundColor:`${l}20`,color:l},children:(a==null?void 0:a.name)??e})}function lT({entries:e,sessionId:t}){const[n,s]=D.useState(e),[a,l]=D.useState(!1),[u,c]=D.useState(null),[h,f]=D.useState(""),[p,m]=D.useState(""),[_,x]=D.useState(!1),[w,k]=D.useState(!1),b=gt(z=>z.defaults),S=gt(z=>z.userItems),v=gt(z=>z.projectItems),y=D.useMemo(()=>[...b,...S,...v],[b,S,v]),E=D.useRef(null),T=D.useRef(null);D.useEffect(()=>{s(e)},[e]),D.useEffect(()=>{var z;a&&((z=E.current)==null||z.focus())},[a]),D.useEffect(()=>{var z;u&&((z=T.current)==null||z.focus())},[u]);const N=D.useCallback(z=>{s(z),aT(t,z)},[t]),L=D.useCallback(()=>{var U;const z=h.trim();if(!z)return;const X=String(n.length),te=[...n,{id:X,description:z,status:"pending"}];N(te),f(""),(U=E.current)==null||U.focus()},[n,h,N]),A=D.useCallback(()=>{l(!1),f("")},[]),R=D.useCallback((z,X)=>{c(z),m(X)},[]),B=D.useCallback(()=>{if(!u)return;const z=p.trim(),X=n.map(te=>te.id===u?{...te,description:z||te.description}:te);N(X),c(null)},[u,p,n,N]),q=D.useCallback(z=>{const X=n.map(te=>te.id===z?{...te,status:iT[te.status]??"pending"}:te);N(X)},[n,N]),G=D.useCallback(z=>{N(n.filter(X=>X.id!==z))},[n,N]),O=D.useCallback(()=>{N([]),x(!1)},[N]),F=D.useCallback(z=>{z.key==="Enter"&&(z.preventDefault(),L()),z.key==="Escape"&&A()},[L,A]),V=D.useCallback(z=>{z.key==="Enter"&&B(),z.key==="Escape"&&c(null)},[B]);return o.jsxs("div",{className:"my-1 rounded border border-border bg-secondary overflow-hidden",children:[o.jsxs("div",{className:"bg-primary",children:[n.length===0&&!a&&o.jsxs("div",{className:"px-1.5 py-2 text-xs text-text-muted italic text-center",children:["No criteria yet."," ",o.jsx("button",{onClick:()=>k(!0),className:"text-accent-primary hover:underline not-italic cursor-pointer",children:"Learn more"})]}),n.map((z,X)=>{const te=z.status,U=u===z.id;return o.jsxs("div",{className:`flex items-start gap-1 px-1.5 py-1 group ${X>0?"border-t border-border":""}`,children:[o.jsx("button",{onClick:()=>q(z.id),className:"text-xs leading-tight flex-shrink-0 cursor-pointer hover:opacity-70 transition-opacity",title:`Status: ${z.status} (click to cycle)`,children:o.jsx(Fu,{status:te})}),o.jsx("div",{className:"flex-1 min-w-0",children:U?o.jsx("input",{ref:T,value:p,onChange:M=>m(M.target.value),onBlur:B,onKeyDown:V,className:"w-full bg-bg-tertiary text-text-primary text-xs px-1.5 py-0.5 rounded border border-border focus:outline-none focus:border-accent-primary"}):o.jsxs("button",{onClick:()=>R(z.id,z.description),className:"text-xs text-text-primary text-left hover:text-accent-primary transition-colors w-full truncate cursor-pointer",title:"Click to edit",children:["[",z.id,"] ",US(z.description)]})}),o.jsx("button",{onClick:()=>G(z.id),className:"flex-shrink-0 opacity-0 group-hover:opacity-100 text-text-muted hover:text-accent-error transition-all ml-0.5 cursor-pointer flex items-center self-center",title:"Delete criterion",children:o.jsx(gl,{className:"w-4 h-4"})})]},z.id)})]}),a&&o.jsx("div",{className:"px-1.5 py-1 border-t border-border bg-secondary",children:o.jsxs("div",{className:"flex items-center gap-1",children:[o.jsx("span",{className:"text-text-muted text-xs leading-tight flex-shrink-0",children:"○"}),o.jsx("input",{ref:E,value:h,onChange:z=>f(z.target.value),onKeyDown:F,placeholder:"New criterion...",className:"flex-1 bg-bg-tertiary text-text-primary text-xs px-1.5 py-0.5 rounded border border-border focus:outline-none focus:border-accent-primary placeholder-text-muted"})]})}),o.jsxs("div",{className:"px-1.5 py-1 border-t border-border bg-secondary flex items-center gap-2",children:[a?o.jsxs(o.Fragment,{children:[o.jsxs("button",{onClick:L,className:"flex items-center gap-1 text-xs text-accent-primary hover:text-accent-primary/70 transition-colors cursor-pointer",title:"Add criterion",children:[o.jsx(Ks,{className:"w-3 h-3"}),"Add"]}),o.jsx("button",{onClick:A,className:"flex items-center gap-1 text-xs text-text-muted hover:text-text-primary transition-colors cursor-pointer",title:"Cancel",children:"Cancel"})]}):o.jsxs("button",{onClick:()=>l(!0),className:"flex items-center gap-1 text-xs text-text-muted hover:text-accent-primary transition-colors cursor-pointer",title:"Add criterion",children:[o.jsx(Ks,{className:"w-3 h-3"}),"Add"]}),n.length>0&&o.jsxs("button",{onClick:()=>x(!0),className:"flex items-center gap-1 text-xs text-text-muted hover:text-accent-error transition-colors ml-auto cursor-pointer",title:"Clear all criteria",children:[o.jsx(pl,{className:"w-3 h-3"}),"Clear all"]}),o.jsx("button",{onClick:()=>k(!0),className:"flex items-center gap-1 text-xs text-text-muted hover:text-accent-primary transition-colors cursor-pointer",title:"About criteria",children:o.jsx(fS,{className:"w-3 h-3"})})]}),_&&o.jsx("div",{className:"px-1.5 py-1 border-t border-border bg-secondary",children:o.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[o.jsx("span",{className:"text-xs text-accent-error",children:"Clear all criteria?"}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("button",{onClick:O,className:"text-xs text-accent-error hover:text-accent-error/70 transition-colors cursor-pointer",children:"Yes"}),o.jsx("button",{onClick:()=>x(!1),className:"text-xs text-text-muted hover:text-text-primary transition-colors cursor-pointer",children:"No"})]})]})}),o.jsx(It,{isOpen:w,onClose:()=>k(!1),title:"About Acceptance Criteria",size:"md",children:o.jsxs("div",{className:"space-y-3 text-sm text-text-secondary",children:[o.jsx("p",{children:"Each criterion defines a specific requirement that needs to be met."}),o.jsxs("p",{children:["To use this feature, start in ",o.jsx(Fc,{id:"planner",agents:y})," mode and",o.jsxs("strong",{className:"text-text-primary",children:[" ","ask the agent to define acceptance criteria that matches your goal"]}),". Then launch the ",o.jsx(oT,{id:"default"})," builtin workflow to launch the automation part."]}),o.jsx("p",{children:"This workflow will automatically:"}),o.jsxs("ol",{className:"list-decimal list-inside space-y-1",children:[o.jsxs("li",{children:["Launch the ",o.jsx(Fc,{id:"builder",agents:y}),' agent, that will be forced to continue until it marks all criteria as "completed"']}),o.jsxs("li",{children:["Then launch the ",o.jsx(Fc,{id:"verifier",agents:y})," subagent, that will verify each criterion. If every criterion is fulfilled, then it goes to the next step, otherwise, it gives feedback to the main agent until 100% of the criteria are met."]}),o.jsxs("li",{children:["Launch a ",o.jsx(Fc,{id:"code_reviewer",agents:y})," subagent, that will analyze the code to provide actionable feedback to the main agent."]})]}),o.jsx("div",{className:"bg-bg-tertiary rounded p-3 space-y-1.5",children:o.jsx("p",{children:"This lets smaller models follow complex plans to completion and improves the chances that nothing from your plan is missed."})})]})})]})}function cT({isOpen:e,onClose:t}){const n=Or(k=>k.config),s=Or(k=>k.saveConfig),[a,l]=D.useState(""),[u,c]=D.useState(""),[h,f]=D.useState(!1),[p,m]=D.useState(!1),[_,x]=D.useState(!1);D.useEffect(()=>{e&&(l((n==null?void 0:n.command)??""),c((n==null?void 0:n.url)??""),f((n==null?void 0:n.hotReload)??!1),m((n==null?void 0:n.disableInspect)??!1))},[e,n]);const w=async()=>{!a.trim()||!u.trim()||(x(!0),await s({command:a.trim(),url:u.trim(),hotReload:h,disableInspect:p}),x(!1),t())};return o.jsx(It,{isOpen:e,onClose:t,title:"Dev Server Config",size:"sm",children:o.jsxs("div",{className:"space-y-4",children:[o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs text-text-secondary mb-1",children:"Command"}),o.jsx("input",{className:"input w-full",type:"text",value:a,onChange:k=>l(k.target.value),placeholder:"npm run dev"})]}),o.jsxs("div",{children:[o.jsx("label",{className:"block text-xs text-text-secondary mb-1",children:"Dev URL"}),o.jsx("input",{className:"input w-full",type:"text",value:u,onChange:k=>c(k.target.value),placeholder:"http://localhost:3000"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"checkbox",id:"hotReload",checked:h,onChange:k=>f(k.target.checked),className:"rounded border-border bg-bg-tertiary"}),o.jsx("label",{htmlFor:"hotReload",className:"text-xs text-text-secondary",children:"Hot Reload"})]}),o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("input",{type:"checkbox",id:"disableInspect",checked:p,onChange:k=>m(k.target.checked),className:"rounded border-border bg-bg-tertiary"}),o.jsx("label",{htmlFor:"disableInspect",className:"text-xs text-text-secondary",children:"Disable inspect feedback"})]}),o.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[o.jsx("button",{className:"btn btn-secondary",onClick:t,children:"Cancel"}),o.jsx("button",{className:"btn btn-primary",onClick:w,disabled:_||!a.trim()||!u.trim(),children:_?"Saving...":"Save"})]})]})})}const Gv={30:"text-black",31:"text-red-400",32:"text-accent-success",33:"text-accent-warning",34:"text-blue-400",35:"text-purple-400",36:"text-cyan-400",37:"text-gray-300",90:"text-gray-500",91:"text-red-500",92:"text-green-500",93:"text-yellow-400",94:"text-blue-500",95:"text-pink-400",96:"text-cyan-500",97:"text-white"},uT={40:"bg-black",41:"bg-red-900",42:"bg-green-900",43:"bg-yellow-900",44:"bg-blue-900",45:"bg-purple-900",46:"bg-cyan-900",47:"bg-gray-700"},Wv={1:"font-bold",2:"opacity-75",4:"underline",7:"bg-bg-secondary"},dT="text-text-primary";function hT(e){const t=[],n=new RegExp("\x1B\\[([0-9;]+)m","g");let s=0,a="text-text-primary",l;try{for(;(l=n.exec(e))!==null;){if(l.index>s){const f=e.slice(s,l.index);f&&t.push({text:f,className:a})}const u=l[1];if(!u)continue;const c=u.split(";").map(Number);if(c.length===0||c[0]===0){a="text-text-primary";continue}const h=[];for(const f of c)if(f>=30&&f<=37){const p=Gv[f];p&&h.push(p)}else if(f>=40&&f<=47){const p=uT[f];p&&h.push(p)}else if(f>=90&&f<=97){const p=Gv[f];p&&h.push(p)}else if(f in Wv){const p=Wv[f];p&&h.push(p)}else f===39?h.push(dT):f===49&&(a=a.split(" ").filter(p=>!p.startsWith("bg-")).join(" "));h.length>0&&(a=h.join(" ")),s=n.lastIndex}if(s<e.length){const u=e.slice(s);u&&t.push({text:u,className:a})}return t}catch(u){return console.warn("ANSI parsing failed, stripping codes:",u),[{text:fT(e),className:"text-text-primary"}]}}function fT(e){return e.replace(new RegExp("\x1B\\[([0-9;]+)m","g"),"")}function mu(e){const t=hT(e),n=[];return t.forEach((s,a)=>{const l=s.text.split(`
|
|
89
|
-
`);l.forEach((u,c)=>{n.push(Us.createElement("span",{key:`${a}-${c}`,className:s.className,style:{display:"inline-block",whiteSpace:"pre-wrap"}},u)),c<l.length-1&&n.push(Us.createElement("br",{key:`${a}-${c}-br`}))})}),n.length===1?n[0]:n}function FS({logs:e,preRef:t,preClassName:n="text-sm font-mono"}){return o.jsx("pre",{ref:t,className:n,children:e.length===0?o.jsx("span",{className:"text-text-muted",children:"No output yet"}):e.map((s,a)=>o.jsx("span",{className:s.stream==="stderr"?"text-accent-warning":"",children:mu(s.content)},a))})}const VS=D.memo(function({title:t,logs:n,onClose:s,preClassName:a}){const l=D.useRef(null);return D.useEffect(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[n]),o.jsx(It,{isOpen:!0,onClose:s,title:t,size:"full",children:o.jsx(FS,{logs:n,preRef:l,preClassName:a})})}),mT=D.memo(function({logs:t,anchorRef:n,isHiding:s,onExpand:a,onClose:l}){const[u,c]=D.useState(null),h=D.useRef(null);return D.useEffect(()=>{var p;const f=(p=n.current)==null?void 0:p.getBoundingClientRect();f&&c({bottom:window.innerHeight-f.bottom,right:window.innerWidth-f.right,width:f.width,height:f.height})},[n]),D.useEffect(()=>{h.current&&(h.current.scrollTop=h.current.scrollHeight)},[t]),u?o.jsxs("div",{className:"relative",children:[o.jsx("pre",{ref:h,className:"fixed z-50 text-sm font-mono text-text-primary bg-bg-primary p-2 rounded border border-border overflow-auto transition-all duration-150 ease-out select-text",style:{bottom:u.bottom,right:u.right,width:u.width*2,maxHeight:u.height*3,transformOrigin:"bottom right",transform:s?"scale(0.01)":"scale(1)",opacity:s?0:1},children:t.map((f,p)=>o.jsx("span",{className:f.stream==="stderr"?"text-accent-warning":"",children:mu(f.content)},p))}),o.jsx("button",{onClick:()=>{l(),a()},className:"fixed z-50 px-2 py-1 rounded text-xs font-medium bg-accent-primary/30 text-text-primary hover:bg-accent-primary/50 transition-colors duration-150",style:{bottom:u.bottom+8,right:u.right+8},children:"Expand"})]}):null}),pT=D.memo(function({workdir:t}){const n=Or(G=>G.setWorkdir),s=Or(G=>G.status),a=Or(G=>G.config),l=Or(G=>G.logs),u=Or(G=>G.start),c=Or(G=>G.stop),h=Or(G=>G.fetchLogs),f=we(G=>G.currentSession),[p,m]=D.useState(!1),[_,x]=D.useState(!1),[w,k]=D.useState(!1),[b,S]=D.useState(!1),v=D.useRef(null),y=D.useRef(null),E=D.useRef(null),T=D.useRef(null),N=D.useRef(null),L=()=>{const G=s==null?void 0:s.inspectProxyPort;if(!G){s!=null&&s.url&&window.open(s.url,"_blank");return}const O=`${window.location.protocol}//${window.location.hostname}:${G}`,F=window.open(O,"_blank");if(F){N.current=F;const V=()=>{var X;!N.current||N.current.closed||(N.current.postMessage({type:"setFoxSessionId",sessionId:(f==null?void 0:f.id)??null},"*"),N.current.postMessage({type:"setFoxSessionTitle",sessionTitle:((X=f==null?void 0:f.metadata)==null?void 0:X.title)??null},"*"),N.current.postMessage({type:"setFoxInspectEnabled",enabled:!(a!=null&&a.disableInspect)},"*"))},z=setInterval(()=>{V(),(!N.current||N.current.closed)&&clearInterval(z)},500);setTimeout(()=>clearInterval(z),5e3)}},A=(s==null?void 0:s.state)??"off",R=a!==null,B=A==="running"||A==="warning";D.useEffect(()=>{n(t??null)},[t,n]),D.useEffect(()=>{B&&h()},[B,h]),D.useEffect(()=>{E.current&&B&&(E.current.scrollTop=E.current.scrollHeight)},[l,B]);const q=()=>{B?c():u()};return o.jsxs("div",{className:"mt-2 pt-3 border-t border-border space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:`inline-block w-2.5 h-2.5 rounded-full flex-shrink-0 ${A==="running"?"bg-accent-success":A==="warning"?"bg-accent-warning":A==="error"?"bg-accent-error":"bg-text-muted"}`}),o.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:"Dev Server"})]}),o.jsx("button",{onClick:()=>m(!0),className:"p-1.5 rounded hover:bg-bg-tertiary transition-colors text-text-muted",title:"Configure dev server",children:o.jsx(bj,{})})]}),R?o.jsxs(o.Fragment,{children:[A==="running"||A==="warning"?o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("button",{onClick:q,className:"flex-1 flex items-center justify-center gap-1.5 rounded font-medium text-sm px-3 py-1.5 bg-bg-tertiary text-text-primary hover:bg-border transition-colors",children:[o.jsx(pS,{}),"Stop"]}),(s==null?void 0:s.url)&&o.jsxs("button",{onClick:()=>L(),className:"flex-1 flex items-center justify-center gap-1.5 rounded font-medium text-sm px-3 py-1.5 bg-accent-primary/25 text-text-primary hover:bg-accent-primary/40 transition-colors",title:s.url,children:[o.jsx(wj,{}),"Open"]})]}):o.jsx("button",{onClick:q,className:"w-full rounded font-medium text-sm px-3 py-1.5 bg-accent-primary/25 text-text-primary hover:bg-accent-primary/40 transition-colors",children:"Start"}),B&&o.jsxs("div",{ref:T,className:"relative",onMouseEnter:()=>{y.current&&clearTimeout(y.current),v.current=setTimeout(()=>{k(!0),S(!1)},500)},onMouseLeave:()=>{v.current&&clearTimeout(v.current),S(!0),y.current=setTimeout(()=>k(!1),150)},children:[o.jsx(FS,{logs:l,preRef:E,preClassName:"text-sm bg-bg-primary p-2 rounded overflow-auto max-h-[200px] border border-border"}),(w||b)&&T.current&&$a.createPortal(o.jsx(mT,{logs:l,anchorRef:T,isHiding:b,onExpand:()=>x(!0),onClose:()=>k(!1)}),document.body)]})]}):o.jsx("button",{onClick:()=>m(!0),className:"w-full rounded font-medium text-sm px-3 py-1.5 bg-bg-tertiary text-text-muted hover:bg-border transition-colors",children:"Configure"}),o.jsx(cT,{isOpen:p,onClose:()=>m(!1)}),_&&o.jsx(VS,{title:"Dev Server Logs",logs:l,onClose:()=>x(!1)})]})}),gT=D.memo(function({sessionId:t}){var x;const n=Zo(w=>w.processes),s=Zo(w=>w.stopProcess),[a,l]=D.useState(null),[u,c]=D.useState([]),h=n.filter(w=>w.status!=="exited"),f=h.filter(w=>w.status==="running").length;if(n.length===0)return null;const p=w=>{switch(w){case"running":return"bg-accent-success";case"starting":return"bg-accent-warning";case"stopping":return"bg-accent-warning";case"exited":return"bg-text-muted";default:return"bg-text-muted"}},m=w=>{const k=Zo.getState().logs[w]??[];c(k.map(b=>({content:b.content,stream:b.stream}))),l(w)},_=w=>{t&&s(w,t)};return o.jsxs("div",{className:"mt-2 pt-3 border-t border-border space-y-3",children:[o.jsx("div",{className:"flex items-center justify-between",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"inline-block w-2.5 h-2.5 rounded-full flex-shrink-0 bg-accent-primary"}),o.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:"Background"}),o.jsxs("span",{className:"text-xs text-text-muted",children:["(",f," running)"]})]})}),o.jsx("div",{className:"space-y-2",children:h.map(w=>o.jsx("div",{className:"border border-border rounded p-2",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[o.jsx("span",{className:`inline-block w-2 h-2 rounded-full flex-shrink-0 ${p(w.status)}`}),o.jsx("span",{className:"text-sm text-text-primary truncate",title:w.name,children:w.name}),o.jsxs("span",{className:"text-xs text-text-muted",children:["[",w.status,"]"]})]}),o.jsxs("div",{className:"flex gap-1 ml-2",children:[o.jsx("button",{onClick:()=>m(w.id),className:"px-2 py-1 text-xs rounded bg-bg-tertiary hover:bg-border text-text-secondary transition-colors",title:"View logs",children:"Logs"}),o.jsx("button",{onClick:()=>_(w.id),className:"px-2 py-1 text-xs rounded bg-bg-tertiary hover:bg-accent-error/20 text-text-secondary hover:text-accent-error transition-colors",title:"Stop process",children:"Stop"})]})]})},w.id))}),a&&o.jsx(VS,{title:((x=h.find(w=>w.id===a))==null?void 0:x.name)??"",logs:u,onClose:()=>{l(null),c([])}})]})});function xT({isOpen:e,onClose:t,versionInfo:n}){const[s,a]=D.useState("ready"),[l,u]=D.useState(""),[c,h]=D.useState(n),[f,p]=D.useState(!1),[m,_]=D.useState(null),[x,w]=D.useState(null),[k,b]=D.useState(!1);D.useEffect(()=>{if(e){if(n){h(n);return}fetch("/api/auto-update/check").then(E=>E.json()).then(E=>{h({current:E.current,latest:E.latest}),p(E.isService??!1)}).catch(()=>{})}},[e]),D.useEffect(()=>{if(!e||s!=="updating")return;const E=setInterval(()=>{u(T=>T.length>=3?"":T+".")},400);return()=>clearInterval(E)},[e,s]);const S=D.useCallback(async()=>{a("updating"),w(null);try{const T=await(await Te("/api/auto-update",{method:"POST"})).json();if(p(T.isService??!1),T.success){const N=T.version??"unknown";_(N),localStorage.setItem("openfox_updated_to",N),localStorage.setItem("update_pending","true"),a("complete")}else w(T.error??"Update failed"),a("failed")}catch(E){w(E instanceof Error?E.message:"Update request failed"),a("failed")}},[]),v=D.useCallback(async()=>{b(!0);try{await Te("/api/auto-update/restart",{method:"POST"})}catch{}setTimeout(()=>window.location.reload(),1e4)},[]);D.useEffect(()=>{e&&(a("ready"),u(""),_(null),w(null),b(!1))},[e]);const y=s!=="updating";return o.jsxs(It,{isOpen:e,onClose:y?t:void 0,title:s==="failed"?"Update Failed":s==="complete"?"Update Complete":"New OpenFox Version Available",size:"sm",closeOnBackdropClick:y,showCloseButton:y,children:[o.jsxs("div",{className:"flex flex-col gap-4",children:[c&&o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-text-muted",children:"Current version"}),o.jsx("span",{className:"text-text-primary font-mono",children:c.current})]}),c&&o.jsxs("div",{className:"flex justify-between text-sm pb-2",children:[o.jsx("span",{className:"text-text-muted",children:"Latest version"}),o.jsx("span",{className:"text-accent-primary font-mono font-semibold",children:c.latest})]}),s==="updating"&&o.jsxs("div",{className:"flex flex-col gap-2 mt-2",children:[o.jsx("div",{className:"h-1.5 bg-bg-tertiary rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-accent-primary animate-pulse w-full"})}),o.jsxs("p",{className:"text-xs text-text-muted text-center",children:["Updating",l]})]}),s==="complete"&&o.jsxs("div",{className:"flex flex-col gap-3 mt-2",children:[o.jsxs("div",{className:"bg-bg-tertiary rounded px-3 py-2 text-xs text-text-secondary",children:["OpenFox has been updated to v",m??(c==null?void 0:c.latest),".",!f&&" Please restart OpenFox to use the new version."]}),f&&o.jsx("button",{onClick:v,disabled:k,className:"w-full px-3 py-2 text-sm rounded bg-accent-primary hover:brightness-110 transition-all text-white font-medium disabled:opacity-50",children:k?"Restarting in 10s…":"Restart Service"})]}),s==="failed"&&o.jsxs("div",{className:"flex flex-col gap-3 mt-2",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-accent-danger/10 border border-accent-danger/30 rounded text-xs",children:[o.jsx("span",{children:"⚠️"}),o.jsx("p",{className:"text-text-secondary",children:x})]}),o.jsx("div",{className:"bg-bg-tertiary rounded px-3 py-2 text-xs font-mono text-text-secondary",children:"openfox update"}),o.jsx("p",{className:"text-xs text-text-muted",children:"Run this command in your terminal to complete the update."})]})]}),s==="ready"&&o.jsxs("div",{className:"flex flex-col gap-3",children:[f&&o.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-accent-warning/10 border border-accent-warning/30 rounded text-xs",children:[o.jsx("span",{children:"⚠️"}),o.jsx("p",{className:"text-text-secondary",children:"Server will restart to apply this update. Sessions in progress will be interrupted."})]}),o.jsx("button",{onClick:S,className:"w-full px-3 py-2 text-sm rounded bg-accent-primary hover:brightness-110 transition-all text-white font-medium",children:"Update OpenFox"})]}),(s==="complete"||s==="failed")&&o.jsx("button",{onClick:t,className:"w-full px-3 py-2 text-sm rounded bg-bg-tertiary hover:bg-bg-secondary transition-colors text-text-primary font-medium mt-2",children:"Close"})]})}function _T({file:e}){const t=BS(e.path,28),n=e.status==="added"?"text-accent-success":e.status==="deleted"?"text-accent-error":"text-accent-primary",s=e.status==="added"?`+${e.additions}`:e.status==="deleted"?`-${e.deletions}`:e.additions>0||e.deletions>0?`+${e.additions}, -${e.deletions}`:"";return o.jsxs("div",{className:"flex items-center justify-between gap-1 py-0.5 text-xs min-w-0",children:[o.jsx("span",{className:`truncate ${n}`,title:e.path,children:t}),s&&o.jsx("span",{className:`shrink-0 font-mono${e.status==="added"?" text-accent-success":e.status==="deleted"?" text-accent-error":" text-text-muted"}`,children:s})]})}function yT(){const{diff:e}=HS();return e.loading?o.jsx("div",{className:"mt-3",children:o.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-text-muted",children:[o.jsx("span",{className:"w-3 h-3 border border-border border-t-accent-primary rounded-full animate-spin"}),o.jsx("span",{children:"Checking changes..."})]})}):e.files.length===0?o.jsx("div",{className:"mt-3",children:o.jsx("p",{className:"text-xs text-text-muted text-center",children:"No changes"})}):o.jsx("div",{className:"mt-3 max-h-[150px] overflow-y-auto",children:o.jsx("div",{className:"pr-1",children:e.files.map((t,n)=>o.jsx(_T,{file:t},n))})})}function qv({messages:e,workdir:t}){var k,b,S,v;const[n,s]=D.useState(!1),[a,l]=D.useState(!1),[u,c]=D.useState(!1),[h,f]=D.useState(!1),p=zN(e),{branch:m}=HS(),_=zt(y=>y.version),x=we(y=>y.currentSession),w=D.useCallback(async()=>{l(!0);try{const y=await fetch("/api/auto-update/check");if(y.ok){const E=await y.json();c(E.isUpdateAvailable)}}catch{}finally{l(!1)}},[]);return D.useEffect(()=>{w()},[w]),o.jsxs("div",{className:"flex flex-col h-full",children:[p&&o.jsxs("div",{className:"mb-4",children:[o.jsx("button",{onClick:()=>s(!0),className:"w-full flex items-center justify-center px-3 py-2 rounded bg-bg-tertiary hover:bg-bg-secondary transition-colors",title:"View detailed response and call-level stats",children:o.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[o.jsx("span",{className:"text-text-secondary",children:HN(p.aiTime)}),o.jsx("span",{className:"w-px h-3 bg-border"}),o.jsx("span",{className:"text-text-secondary",children:Hv(p.avgPrefillSpeed)}),o.jsx("span",{children:"pp"}),o.jsx("span",{className:"w-px h-3 bg-border"}),o.jsx("span",{className:"text-text-secondary",children:Hv(p.avgGenerationSpeed)}),o.jsx("span",{children:"tg"})]})}),o.jsx(QN,{isOpen:n,onClose:()=>s(!1),stats:p})]}),o.jsx("div",{className:"flex flex-col flex-1 overflow-y-auto",children:o.jsxs("div",{className:"mt-4",children:[o.jsx(Vv,{entries:((k=x==null?void 0:x.metadataEntries)==null?void 0:k.criteria)??[],title:"Acceptance Criteria"}),x&&o.jsx(lT,{entries:((b=x==null?void 0:x.metadataEntries)==null?void 0:b.criteria)??[],sessionId:x.id}),x&&(((v=(S=x.metadataEntries)==null?void 0:S.review_findings)==null?void 0:v.length)??0)>0&&o.jsxs("div",{className:"mt-6",children:[o.jsx(Vv,{entries:x.metadataEntries.review_findings,title:"Review Findings"}),o.jsx(rT,{entries:x.metadataEntries.review_findings})]})]})}),m&&o.jsxs("div",{className:"mt-4 flex items-center gap-2 text-sm",children:[o.jsx(gj,{}),o.jsx("span",{className:"truncate text-text-secondary",title:m,children:m})]}),o.jsx(yT,{}),o.jsx(pT,{workdir:t}),o.jsx(gT,{sessionId:x==null?void 0:x.id}),_&&o.jsxs("div",{className:"mt-4 pt-4 border-t border-border text-center text-xs text-text-muted",children:[o.jsxs("div",{className:"flex items-center justify-center gap-1",children:[o.jsx("a",{href:"https://github.com/co-l/openfox",target:"_blank",rel:"noopener noreferrer",className:"hover:text-accent-primary transition-colors",children:"OpenFox"})," - ",o.jsxs("span",{className:"font-mono",children:["v",_]}),o.jsx("button",{onClick:()=>w(),disabled:a,className:"p-0.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors disabled:opacity-50",title:"Check for updates",children:o.jsx(lp,{className:`w-3 h-3 ${a?"animate-spin":""}`})})]}),u&&o.jsx("button",{onClick:()=>f(!0),className:"text-accent-primary hover:underline mt-1",children:"Update OpenFox →"})]}),o.jsx(xT,{isOpen:h,onClose:()=>f(!1),versionInfo:null})]})}function vT({children:e,criteriaSidebarOpen:t=!0,onCriteriaSidebarToggle:n,messages:s}){const a=we(l=>l.currentSession);return o.jsxs("div",{className:"relative h-full overflow-hidden",children:[t&&o.jsx("div",{className:"fixed md:hidden inset-0 bg-secondary/50 z-40",onClick:n}),o.jsxs("div",{className:"flex h-full",children:[o.jsx("div",{className:"flex-1 min-w-0 flex flex-col overflow-hidden bg-secondary",children:e}),t?o.jsx("aside",{className:"hidden md:block w-[320px] shrink-0 border-l border-border p-4 overflow-y-auto bg-secondary",children:o.jsx(qv,{messages:s,workdir:a==null?void 0:a.workdir})}):o.jsx("aside",{className:"hidden md:block w-0 shrink-0 overflow-hidden border-l-0"}),o.jsx("aside",{className:`
|
|
89
|
+
`);l.forEach((u,c)=>{n.push(Us.createElement("span",{key:`${a}-${c}`,className:s.className,style:{display:"inline-block",whiteSpace:"pre-wrap"}},u)),c<l.length-1&&n.push(Us.createElement("br",{key:`${a}-${c}-br`}))})}),n.length===1?n[0]:n}function FS({logs:e,preRef:t,preClassName:n="text-sm font-mono"}){return o.jsx("pre",{ref:t,className:n,children:e.length===0?o.jsx("span",{className:"text-text-muted",children:"No output yet"}):e.map((s,a)=>o.jsx("span",{className:s.stream==="stderr"?"text-accent-warning":"",children:mu(s.content)},a))})}const VS=D.memo(function({title:t,logs:n,onClose:s,preClassName:a}){const l=D.useRef(null);return D.useEffect(()=>{l.current&&(l.current.scrollTop=l.current.scrollHeight)},[n]),o.jsx(It,{isOpen:!0,onClose:s,title:t,size:"full",children:o.jsx(FS,{logs:n,preRef:l,preClassName:a})})}),mT=D.memo(function({logs:t,anchorRef:n,isHiding:s,onExpand:a,onClose:l}){const[u,c]=D.useState(null),h=D.useRef(null);return D.useEffect(()=>{var p;const f=(p=n.current)==null?void 0:p.getBoundingClientRect();f&&c({bottom:window.innerHeight-f.bottom,right:window.innerWidth-f.right,width:f.width,height:f.height})},[n]),D.useEffect(()=>{h.current&&(h.current.scrollTop=h.current.scrollHeight)},[t]),u?o.jsxs("div",{className:"relative",children:[o.jsx("pre",{ref:h,className:"fixed z-50 text-sm font-mono text-text-primary bg-bg-primary p-2 rounded border border-border overflow-auto transition-all duration-150 ease-out select-text",style:{bottom:u.bottom,right:u.right,width:u.width*2,maxHeight:u.height*3,transformOrigin:"bottom right",transform:s?"scale(0.01)":"scale(1)",opacity:s?0:1},children:t.map((f,p)=>o.jsx("span",{className:f.stream==="stderr"?"text-accent-warning":"",children:mu(f.content)},p))}),o.jsx("button",{onClick:()=>{l(),a()},className:"fixed z-50 px-2 py-1 rounded text-xs font-medium bg-accent-primary/30 text-text-primary hover:bg-accent-primary/50 transition-colors duration-150",style:{bottom:u.bottom+8,right:u.right+8},children:"Expand"})]}):null}),pT=D.memo(function({workdir:t}){const n=Or(G=>G.setWorkdir),s=Or(G=>G.status),a=Or(G=>G.config),l=Or(G=>G.logs),u=Or(G=>G.start),c=Or(G=>G.stop),h=Or(G=>G.fetchLogs),f=we(G=>G.currentSession),[p,m]=D.useState(!1),[_,x]=D.useState(!1),[w,k]=D.useState(!1),[b,S]=D.useState(!1),v=D.useRef(null),y=D.useRef(null),E=D.useRef(null),T=D.useRef(null),N=D.useRef(null),L=()=>{const G=s==null?void 0:s.inspectProxyPort;if(!G){s!=null&&s.url&&window.open(s.url,"_blank");return}const O=`${window.location.protocol}//${window.location.hostname}:${G}`,F=window.open(O,"_blank");if(F){N.current=F;const V=()=>{var X;!N.current||N.current.closed||(N.current.postMessage({type:"setFoxSessionId",sessionId:(f==null?void 0:f.id)??null},"*"),N.current.postMessage({type:"setFoxSessionTitle",sessionTitle:((X=f==null?void 0:f.metadata)==null?void 0:X.title)??null},"*"),N.current.postMessage({type:"setFoxInspectEnabled",enabled:!(a!=null&&a.disableInspect)},"*"))},z=setInterval(()=>{V(),(!N.current||N.current.closed)&&clearInterval(z)},500);setTimeout(()=>clearInterval(z),5e3)}},A=(s==null?void 0:s.state)??"off",R=a!==null,B=A==="running"||A==="warning";D.useEffect(()=>{n(t??null)},[t,n]),D.useEffect(()=>{B&&h()},[B,h]),D.useEffect(()=>{E.current&&B&&(E.current.scrollTop=E.current.scrollHeight)},[l,B]);const q=()=>{B?c():u()};return o.jsxs("div",{className:"mt-2 pt-3 border-t border-border space-y-3",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:`inline-block w-2.5 h-2.5 rounded-full flex-shrink-0 ${A==="running"?"bg-accent-success":A==="warning"?"bg-accent-warning":A==="error"?"bg-accent-error":"bg-text-muted"}`}),o.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:"Dev Server"})]}),o.jsx("button",{onClick:()=>m(!0),className:"p-1.5 rounded hover:bg-bg-tertiary transition-colors text-text-muted",title:"Configure dev server",children:o.jsx(bj,{})})]}),R?o.jsxs(o.Fragment,{children:[A==="running"||A==="warning"?o.jsxs("div",{className:"flex gap-2",children:[o.jsxs("button",{onClick:q,className:"flex-1 flex items-center justify-center gap-1.5 rounded font-medium text-sm px-3 py-1.5 bg-bg-tertiary text-text-primary hover:bg-border transition-colors",children:[o.jsx(pS,{}),"Stop"]}),(s==null?void 0:s.url)&&o.jsxs("button",{onClick:()=>L(),className:"flex-1 flex items-center justify-center gap-1.5 rounded font-medium text-sm px-3 py-1.5 bg-accent-primary/25 text-text-primary hover:bg-accent-primary/40 transition-colors",title:s.url,children:[o.jsx(wj,{}),"Open"]})]}):o.jsx("button",{onClick:q,className:"w-full rounded font-medium text-sm px-3 py-1.5 bg-accent-primary/25 text-text-primary hover:bg-accent-primary/40 transition-colors",children:"Start"}),B&&o.jsxs("div",{ref:T,className:"relative",onMouseEnter:()=>{y.current&&clearTimeout(y.current),v.current=setTimeout(()=>{k(!0),S(!1)},500)},onMouseLeave:()=>{v.current&&clearTimeout(v.current),S(!0),y.current=setTimeout(()=>k(!1),150)},children:[o.jsx(FS,{logs:l,preRef:E,preClassName:"text-sm bg-bg-primary p-2 rounded overflow-auto max-h-[200px] border border-border"}),(w||b)&&T.current&&$a.createPortal(o.jsx(mT,{logs:l,anchorRef:T,isHiding:b,onExpand:()=>x(!0),onClose:()=>k(!1)}),document.body)]})]}):o.jsx("button",{onClick:()=>m(!0),className:"w-full rounded font-medium text-sm px-3 py-1.5 bg-bg-tertiary text-text-muted hover:bg-border transition-colors",children:"Configure"}),o.jsx(cT,{isOpen:p,onClose:()=>m(!1)}),_&&o.jsx(VS,{title:"Dev Server Logs",logs:l,onClose:()=>x(!1)})]})}),gT=D.memo(function({sessionId:t}){var x;const n=Zo(w=>w.processes),s=Zo(w=>w.stopProcess),[a,l]=D.useState(null),[u,c]=D.useState([]),h=n.filter(w=>w.status!=="exited"),f=h.filter(w=>w.status==="running").length;if(n.length===0)return null;const p=w=>{switch(w){case"running":return"bg-accent-success";case"starting":return"bg-accent-warning";case"stopping":return"bg-accent-warning";case"exited":return"bg-text-muted";default:return"bg-text-muted"}},m=w=>{const k=Zo.getState().logs[w]??[];c(k.map(b=>({content:b.content,stream:b.stream}))),l(w)},_=w=>{t&&s(w,t)};return o.jsxs("div",{className:"mt-2 pt-3 border-t border-border space-y-3",children:[o.jsx("div",{className:"flex items-center justify-between",children:o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx("span",{className:"inline-block w-2.5 h-2.5 rounded-full flex-shrink-0 bg-accent-primary"}),o.jsx("h3",{className:"text-sm font-semibold text-text-primary",children:"Background"}),o.jsxs("span",{className:"text-xs text-text-muted",children:["(",f," running)"]})]})}),o.jsx("div",{className:"space-y-2",children:h.map(w=>o.jsx("div",{className:"border border-border rounded p-2",children:o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[o.jsx("span",{className:`inline-block w-2 h-2 rounded-full flex-shrink-0 ${p(w.status)}`}),o.jsx("span",{className:"text-sm text-text-primary truncate",title:w.name,children:w.name}),o.jsxs("span",{className:"text-xs text-text-muted",children:["[",w.status,"]"]})]}),o.jsxs("div",{className:"flex gap-1 ml-2",children:[o.jsx("button",{onClick:()=>m(w.id),className:"px-2 py-1 text-xs rounded bg-bg-tertiary hover:bg-border text-text-secondary transition-colors",title:"View logs",children:"Logs"}),o.jsx("button",{onClick:()=>_(w.id),className:"px-2 py-1 text-xs rounded bg-bg-tertiary hover:bg-accent-error/20 text-text-secondary hover:text-accent-error transition-colors",title:"Stop process",children:"Stop"})]})]})},w.id))}),a&&o.jsx(VS,{title:((x=h.find(w=>w.id===a))==null?void 0:x.name)??"",logs:u,onClose:()=>{l(null),c([])}})]})});function xT({isOpen:e,onClose:t,versionInfo:n}){const[s,a]=D.useState("ready"),[l,u]=D.useState(""),[c,h]=D.useState(n),[f,p]=D.useState(!1),[m,_]=D.useState(null),[x,w]=D.useState(null),[k,b]=D.useState(!1);D.useEffect(()=>{if(e){if(n){h(n);return}fetch("/api/auto-update/check").then(E=>E.json()).then(E=>{h({current:E.current,latest:E.latest}),p(E.isService??!1)}).catch(()=>{})}},[e]),D.useEffect(()=>{if(!e||s!=="updating")return;const E=setInterval(()=>{u(T=>T.length>=3?"":T+".")},400);return()=>clearInterval(E)},[e,s]);const S=D.useCallback(async()=>{a("updating"),w(null);try{const T=await(await Te("/api/auto-update",{method:"POST"})).json();if(p(T.isService??!1),T.success){const N=T.version??"unknown";_(N),localStorage.setItem("openfox_updated_to",N),localStorage.setItem("update_pending","true"),a("complete")}else w(T.error??"Update failed"),a("failed")}catch(E){w(E instanceof Error?E.message:"Update request failed"),a("failed")}},[]),v=D.useCallback(async()=>{b(!0);try{await Te("/api/auto-update/restart",{method:"POST"})}catch{}setTimeout(()=>window.location.reload(),1e4)},[]);D.useEffect(()=>{e&&(a("ready"),u(""),_(null),w(null),b(!1))},[e]);const y=s!=="updating";return o.jsxs(It,{isOpen:e,onClose:y?t:void 0,title:s==="failed"?"Update Failed":s==="complete"?"Update Complete":"New OpenFox Version Available",size:"sm",closeOnBackdropClick:y,showCloseButton:y,children:[o.jsxs("div",{className:"flex flex-col gap-4",children:[c&&o.jsxs("div",{className:"flex justify-between text-sm",children:[o.jsx("span",{className:"text-text-muted",children:"Current version"}),o.jsx("span",{className:"text-text-primary font-mono",children:c.current})]}),c&&o.jsxs("div",{className:"flex justify-between text-sm pb-2",children:[o.jsx("span",{className:"text-text-muted",children:"Latest version"}),o.jsx("span",{className:"text-accent-primary font-mono font-semibold",children:c.latest})]}),s==="updating"&&o.jsxs("div",{className:"flex flex-col gap-2 mt-2",children:[o.jsx("div",{className:"h-1.5 bg-bg-tertiary rounded-full overflow-hidden",children:o.jsx("div",{className:"h-full bg-accent-primary animate-pulse w-full"})}),o.jsxs("p",{className:"text-xs text-text-muted text-center",children:["Updating",l]})]}),s==="complete"&&o.jsxs("div",{className:"flex flex-col gap-3 mt-2",children:[o.jsxs("div",{className:"bg-bg-tertiary rounded px-3 py-2 text-xs text-text-secondary",children:["OpenFox has been updated to v",m??(c==null?void 0:c.latest),".",!f&&" Please restart OpenFox to use the new version."]}),f&&o.jsx("button",{onClick:v,disabled:k,className:"w-full px-3 py-2 text-sm rounded bg-accent-primary hover:brightness-110 transition-all text-white font-medium disabled:opacity-50",children:k?"Reloading in 10s…":"Restart Service"})]}),s==="failed"&&o.jsxs("div",{className:"flex flex-col gap-3 mt-2",children:[o.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 bg-accent-danger/10 border border-accent-danger/30 rounded text-xs",children:[o.jsx("span",{children:"⚠️"}),o.jsx("p",{className:"text-text-secondary",children:x})]}),o.jsx("div",{className:"bg-bg-tertiary rounded px-3 py-2 text-xs font-mono text-text-secondary",children:"openfox update"}),o.jsx("p",{className:"text-xs text-text-muted",children:"Run this command in your terminal to complete the update."})]})]}),s==="ready"&&o.jsx("button",{onClick:S,className:"w-full px-3 py-2 text-sm rounded bg-accent-primary hover:brightness-110 transition-all text-white font-medium",children:"Update OpenFox"}),(s==="complete"||s==="failed")&&o.jsx("button",{onClick:t,className:"w-full px-3 py-2 text-sm rounded bg-bg-tertiary hover:bg-bg-secondary transition-colors text-text-primary font-medium mt-2",children:"Close"})]})}function _T({file:e}){const t=BS(e.path,28),n=e.status==="added"?"text-accent-success":e.status==="deleted"?"text-accent-error":"text-accent-primary",s=e.status==="added"?`+${e.additions}`:e.status==="deleted"?`-${e.deletions}`:e.additions>0||e.deletions>0?`+${e.additions}, -${e.deletions}`:"";return o.jsxs("div",{className:"flex items-center justify-between gap-1 py-0.5 text-xs min-w-0",children:[o.jsx("span",{className:`truncate ${n}`,title:e.path,children:t}),s&&o.jsx("span",{className:`shrink-0 font-mono${e.status==="added"?" text-accent-success":e.status==="deleted"?" text-accent-error":" text-text-muted"}`,children:s})]})}function yT(){const{diff:e}=HS();return e.loading?o.jsx("div",{className:"mt-3",children:o.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-text-muted",children:[o.jsx("span",{className:"w-3 h-3 border border-border border-t-accent-primary rounded-full animate-spin"}),o.jsx("span",{children:"Checking changes..."})]})}):e.files.length===0?o.jsx("div",{className:"mt-3",children:o.jsx("p",{className:"text-xs text-text-muted text-center",children:"No changes"})}):o.jsx("div",{className:"mt-3 max-h-[150px] overflow-y-auto",children:o.jsx("div",{className:"pr-1",children:e.files.map((t,n)=>o.jsx(_T,{file:t},n))})})}function qv({messages:e,workdir:t}){var k,b,S,v;const[n,s]=D.useState(!1),[a,l]=D.useState(!1),[u,c]=D.useState(!1),[h,f]=D.useState(!1),p=zN(e),{branch:m}=HS(),_=zt(y=>y.version),x=we(y=>y.currentSession),w=D.useCallback(async()=>{l(!0);try{const y=await fetch("/api/auto-update/check");if(y.ok){const E=await y.json();c(E.isUpdateAvailable)}}catch{}finally{l(!1)}},[]);return D.useEffect(()=>{w()},[w]),o.jsxs("div",{className:"flex flex-col h-full",children:[p&&o.jsxs("div",{className:"mb-4",children:[o.jsx("button",{onClick:()=>s(!0),className:"w-full flex items-center justify-center px-3 py-2 rounded bg-bg-tertiary hover:bg-bg-secondary transition-colors",title:"View detailed response and call-level stats",children:o.jsxs("div",{className:"flex items-center gap-2 text-sm text-text-muted",children:[o.jsx("span",{className:"text-text-secondary",children:HN(p.aiTime)}),o.jsx("span",{className:"w-px h-3 bg-border"}),o.jsx("span",{className:"text-text-secondary",children:Hv(p.avgPrefillSpeed)}),o.jsx("span",{children:"pp"}),o.jsx("span",{className:"w-px h-3 bg-border"}),o.jsx("span",{className:"text-text-secondary",children:Hv(p.avgGenerationSpeed)}),o.jsx("span",{children:"tg"})]})}),o.jsx(QN,{isOpen:n,onClose:()=>s(!1),stats:p})]}),o.jsx("div",{className:"flex flex-col flex-1 overflow-y-auto",children:o.jsxs("div",{className:"mt-4",children:[o.jsx(Vv,{entries:((k=x==null?void 0:x.metadataEntries)==null?void 0:k.criteria)??[],title:"Acceptance Criteria"}),x&&o.jsx(lT,{entries:((b=x==null?void 0:x.metadataEntries)==null?void 0:b.criteria)??[],sessionId:x.id}),x&&(((v=(S=x.metadataEntries)==null?void 0:S.review_findings)==null?void 0:v.length)??0)>0&&o.jsxs("div",{className:"mt-6",children:[o.jsx(Vv,{entries:x.metadataEntries.review_findings,title:"Review Findings"}),o.jsx(rT,{entries:x.metadataEntries.review_findings})]})]})}),m&&o.jsxs("div",{className:"mt-4 flex items-center gap-2 text-sm",children:[o.jsx(gj,{}),o.jsx("span",{className:"truncate text-text-secondary",title:m,children:m})]}),o.jsx(yT,{}),o.jsx(pT,{workdir:t}),o.jsx(gT,{sessionId:x==null?void 0:x.id}),_&&o.jsxs("div",{className:"mt-4 pt-4 border-t border-border text-center text-xs text-text-muted",children:[o.jsxs("div",{className:"flex items-center justify-center gap-1",children:[o.jsx("a",{href:"https://github.com/co-l/openfox",target:"_blank",rel:"noopener noreferrer",className:"hover:text-accent-primary transition-colors",children:"OpenFox"})," - ",o.jsxs("span",{className:"font-mono",children:["v",_]}),o.jsx("button",{onClick:()=>w(),disabled:a,className:"p-0.5 rounded hover:bg-bg-tertiary text-text-muted hover:text-text-primary transition-colors disabled:opacity-50",title:"Check for updates",children:o.jsx(lp,{className:`w-3 h-3 ${a?"animate-spin":""}`})})]}),u&&o.jsx("button",{onClick:()=>f(!0),className:"text-accent-primary hover:underline mt-1",children:"Update OpenFox →"})]}),o.jsx(xT,{isOpen:h,onClose:()=>f(!1),versionInfo:null})]})}function vT({children:e,criteriaSidebarOpen:t=!0,onCriteriaSidebarToggle:n,messages:s}){const a=we(l=>l.currentSession);return o.jsxs("div",{className:"relative h-full overflow-hidden",children:[t&&o.jsx("div",{className:"fixed md:hidden inset-0 bg-secondary/50 z-40",onClick:n}),o.jsxs("div",{className:"flex h-full",children:[o.jsx("div",{className:"flex-1 min-w-0 flex flex-col overflow-hidden bg-secondary",children:e}),t?o.jsx("aside",{className:"hidden md:block w-[320px] shrink-0 border-l border-border p-4 overflow-y-auto bg-secondary",children:o.jsx(qv,{messages:s,workdir:a==null?void 0:a.workdir})}):o.jsx("aside",{className:"hidden md:block w-0 shrink-0 overflow-hidden border-l-0"}),o.jsx("aside",{className:`
|
|
90
90
|
md:hidden
|
|
91
91
|
p-4 overflow-y-auto bg-secondary
|
|
92
92
|
transition-all duration-300 ease-in-out
|
package/dist/web/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/png" href="/assets/openfox.png" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, height=device-height" />
|
|
7
7
|
<title>OpenFox</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-B1rz1oo1.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-B6xft9Co.css">
|
|
10
10
|
<link rel="manifest" href="/manifest.webmanifest"><script id="vite-plugin-pwa:register-sw" src="/registerSW.js"></script></head>
|
|
11
11
|
<body class="bg-bg-primary text-text-primary font-mono">
|
package/dist/web/sw.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
if(!self.define){let s,l={};const e=(e,r)=>(e=new URL(e+".js",r).href,l[e]||new Promise(l=>{if("document"in self){const s=document.createElement("script");s.src=e,s.onload=l,document.head.appendChild(s)}else s=e,importScripts(e),l()}).then(()=>{let s=l[e];if(!s)throw new Error(`Module ${e} didn’t register its module`);return s}));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(l[n])return;let u={};const a=s=>e(s,n),t={module:{uri:n},exports:u,require:a};l[n]=Promise.all(r.map(s=>t[s]||a(s))).then(s=>(i(...s),u))}}define(["./workbox-8c29f6e4"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"fc7effa1ccb82e75ee200665c3a78829"},{url:"__inspect__.js",revision:"878b477aaf1805c028895f3d3bb4af71"},{url:"assets/zig-VOosw3JB.js",revision:null},{url:"assets/zenscript-DVFEvuxE.js",revision:null},{url:"assets/yaml-Buea-lGh.js",revision:null},{url:"assets/xsl-CtQFsRM5.js",revision:null},{url:"assets/xml-sdJ4AIDG.js",revision:null},{url:"assets/wolfram-lXgVvXCa.js",revision:null},{url:"assets/wit-5i3qLPDT.js",revision:null},{url:"assets/wikitext-BhOHFoWU.js",revision:null},{url:"assets/wgsl-Dx-B1_4e.js",revision:null},{url:"assets/wenyan-BV7otONQ.js",revision:null},{url:"assets/wasm-MzD3tlZU.js",revision:null},{url:"assets/wasm-CG6Dc4jp.js",revision:null},{url:"assets/vyper-CDx5xZoG.js",revision:null},{url:"assets/vue-vine-BoDAl6tE.js",revision:null},{url:"assets/vue-html-AaS7Mt5G.js",revision:null},{url:"assets/vue-D2xRrEX4.js",revision:null},{url:"assets/vitesse-light-CVO1_9PV.js",revision:null},{url:"assets/vitesse-dark-D0r3Knsf.js",revision:null},{url:"assets/vitesse-black-Bkuqu6BP.js",revision:null},{url:"assets/viml-CJc9bBzg.js",revision:null},{url:"assets/vhdl-CeAyd5Ju.js",revision:null},{url:"assets/vesper-DRje8inN.js",revision:null},{url:"assets/verilog-BQ8w6xss.js",revision:null},{url:"assets/vb-D17OF-Vu.js",revision:null},{url:"assets/vala-CsfeWuGM.js",revision:null},{url:"assets/v-BcVCzyr7.js",revision:null},{url:"assets/typst-DHCkPAjA.js",revision:null},{url:"assets/typespec-CAFt9gP4.js",revision:null},{url:"assets/typescript-BPQ3VLAy.js",revision:null},{url:"assets/twig-CW1WmMYd.js",revision:null},{url:"assets/turtle-BsS91CYL.js",revision:null},{url:"assets/tsx-COt5Ahok.js",revision:null},{url:"assets/tsv-B_m7g4N7.js",revision:null},{url:"assets/ts-tags-D351s5mN.js",revision:null},{url:"assets/toml-vGWfd6FD.js",revision:null},{url:"assets/tokyo-night-hegEt444.js",revision:null},{url:"assets/tex-idrVyKtj.js",revision:null},{url:"assets/terraform-BETggiCN.js",revision:null},{url:"assets/templ-DhtptRzy.js",revision:null},{url:"assets/tcl-dwOrl1Do.js",revision:null},{url:"assets/tasl-QIJgUcNo.js",revision:null},{url:"assets/talonscript-CkByrt1z.js",revision:null},{url:"assets/systemd-4A_iFExJ.js",revision:null},{url:"assets/system-verilog-CnnmHF94.js",revision:null},{url:"assets/synthwave-84-CbfX1IO0.js",revision:null},{url:"assets/swift-D82vCrfD.js",revision:null},{url:"assets/svelte-Cy7k_4gC.js",revision:null},{url:"assets/surrealql-Bq5Q-fJD.js",revision:null},{url:"assets/stylus-BEDo0Tqx.js",revision:null},{url:"assets/stata-DI20mbqo.js",revision:null},{url:"assets/ssh-config-_ykCGR6B.js",revision:null},{url:"assets/sql-CRqJ_cUM.js",revision:null},{url:"assets/splunk-BtCnVYZw.js",revision:null},{url:"assets/sparql-rVzFXLq3.js",revision:null},{url:"assets/soy-8wufbnw4.js",revision:null},{url:"assets/solidity-rGO070M0.js",revision:null},{url:"assets/solarized-light-L9t79GZl.js",revision:null},{url:"assets/solarized-dark-DXbdFlpD.js",revision:null},{url:"assets/snazzy-light-Bw305WKR.js",revision:null},{url:"assets/smalltalk-BERRCDM3.js",revision:null},{url:"assets/slack-ochin-DqwNpetd.js",revision:null},{url:"assets/slack-dark-BthQWCQV.js",revision:null},{url:"assets/shellsession-BADoaaVG.js",revision:null},{url:"assets/shellscript-Yzrsuije.js",revision:null},{url:"assets/shaderlab-Dg9Lc6iA.js",revision:null},{url:"assets/sdbl-DVxCFoDh.js",revision:null},{url:"assets/scss-D5BDwBP9.js",revision:null},{url:"assets/scheme-C98Dy4si.js",revision:null},{url:"assets/scala-C151Ov-r.js",revision:null},{url:"assets/sass-Cj5Yp3dK.js",revision:null},{url:"assets/sas-DEy46yEz.js",revision:null},{url:"assets/rust-B1yitclQ.js",revision:null},{url:"assets/ruby-DyJCeAvU.js",revision:null},{url:"assets/rst-CpCqk9r5.js",revision:null},{url:"assets/rosmsg-BJDFO7_C.js",revision:null},{url:"assets/rose-pine-qdsjHGoJ.js",revision:null},{url:"assets/rose-pine-moon-D4_iv3hh.js",revision:null},{url:"assets/rose-pine-dawn-DHQR4-dF.js",revision:null},{url:"assets/ron-D8l8udqQ.js",revision:null},{url:"assets/riscv-BM1_JUlF.js",revision:null},{url:"assets/rel-C3B-1QV4.js",revision:null},{url:"assets/regexp-CDVJQ6XC.js",revision:null},{url:"assets/reg-C-SQnVFl.js",revision:null},{url:"assets/red-bN70gL4F.js",revision:null},{url:"assets/razor-BjBPvh-w.js",revision:null},{url:"assets/raku-DXvB9xmW.js",revision:null},{url:"assets/racket-BqYA7rlc.js",revision:null},{url:"assets/r-Dspwwk_N.js",revision:null},{url:"assets/qss-IeuSbFQv.js",revision:null},{url:"assets/qmldir-C8lEn-DE.js",revision:null},{url:"assets/qml-3beO22l8.js",revision:null},{url:"assets/python-B6aJPvgy.js",revision:null},{url:"assets/purescript-CklMAg4u.js",revision:null},{url:"assets/puppet-BMWR74SV.js",revision:null},{url:"assets/pug-DKIMFp6K.js",revision:null},{url:"assets/proto-C7zT0LnQ.js",revision:null},{url:"assets/prolog-CbFg5uaA.js",revision:null},{url:"assets/prisma-Dd19v3D-.js",revision:null},{url:"assets/powershell-Dpen1YoG.js",revision:null},{url:"assets/powerquery-CEu0bR-o.js",revision:null},{url:"assets/postcss-CXtECtnM.js",revision:null},{url:"assets/polar-C0HS_06l.js",revision:null},{url:"assets/poimandres-CS3Unz2-.js",revision:null},{url:"assets/po-BTJTHyun.js",revision:null},{url:"assets/plsql-ChMvpjG-.js",revision:null},{url:"assets/plastic-3e1v2bzS.js",revision:null},{url:"assets/pkl-u5AG7uiY.js",revision:null},{url:"assets/php-Csjmro_R.js",revision:null},{url:"assets/perl-B9cMNwum.js",revision:null},{url:"assets/pascal-D93ZcfNL.js",revision:null},{url:"assets/openscad-C4EeE6gA.js",revision:null},{url:"assets/one-light-C3Wv6jpd.js",revision:null},{url:"assets/one-dark-pro-DVMEJ2y_.js",revision:null},{url:"assets/odin-BBf5iR-q.js",revision:null},{url:"assets/ocaml-C0hk2d4L.js",revision:null},{url:"assets/objective-cpp-CLxacb5B.js",revision:null},{url:"assets/objective-c-DXmwc3jG.js",revision:null},{url:"assets/nushell-Cz2AlsmD.js",revision:null},{url:"assets/nord-Ddv68eIx.js",revision:null},{url:"assets/nix-CwoSXNpI.js",revision:null},{url:"assets/nim-BIad80T-.js",revision:null},{url:"assets/night-owl-light-CMTm3GFP.js",revision:null},{url:"assets/night-owl-C39BiMTA.js",revision:null},{url:"assets/nginx-BpAMiNFr.js",revision:null},{url:"assets/nextflow-groovy-vE_lwT2v.js",revision:null},{url:"assets/nextflow-C-mBbutL.js",revision:null},{url:"assets/narrat-DRg8JJMk.js",revision:null},{url:"assets/move-IF9eRakj.js",revision:null},{url:"assets/moonbit-_H4v1dQx.js",revision:null},{url:"assets/monokai-D4h5O-jR.js",revision:null},{url:"assets/mojo-rZm6bMo-.js",revision:null},{url:"assets/mipsasm-CKIfxQSi.js",revision:null},{url:"assets/min-light-CTRr51gU.js",revision:null},{url:"assets/min-dark-CafNBF8u.js",revision:null},{url:"assets/mermaid-mWjccvbQ.js",revision:null},{url:"assets/mdx-Cmh6b_Ma.js",revision:null},{url:"assets/mdc-DTYItulj.js",revision:null},{url:"assets/matlab-D7o27uSR.js",revision:null},{url:"assets/material-theme-palenight-Csfq5Kiy.js",revision:null},{url:"assets/material-theme-ocean-CyktbL80.js",revision:null},{url:"assets/material-theme-lighter-B0m2ddpp.js",revision:null},{url:"assets/material-theme-darker-BfHTSMKl.js",revision:null},{url:"assets/material-theme-D5KoaKCx.js",revision:null},{url:"assets/marko-DjSrsDqO.js",revision:null},{url:"assets/markdown-Cvjx9yec.js",revision:null},{url:"assets/make-CHLpvVh8.js",revision:null},{url:"assets/luau-KW6xsasC.js",revision:null},{url:"assets/lua-BaeVxFsk.js",revision:null},{url:"assets/logo-BtOb2qkB.js",revision:null},{url:"assets/log-2UxHyX5q.js",revision:null},{url:"assets/llvm-DjAJT7YJ.js",revision:null},{url:"assets/liquid-C0sCDyMI.js",revision:null},{url:"assets/light-plus-B7mTdjB0.js",revision:null},{url:"assets/less-B1dDrJ26.js",revision:null},{url:"assets/lean-BZvkOJ9d.js",revision:null},{url:"assets/latex-CaSxy8MP.js",revision:null},{url:"assets/laserwave-DUszq2jm.js",revision:null},{url:"assets/kusto-wEQ09or8.js",revision:null},{url:"assets/kotlin-BdnUsdx6.js",revision:null},{url:"assets/kdl-DV7GczEv.js",revision:null},{url:"assets/kanagawa-wave-DWedfzmr.js",revision:null},{url:"assets/kanagawa-lotus-CfQXZHmo.js",revision:null},{url:"assets/kanagawa-dragon-CkXjmgJE.js",revision:null},{url:"assets/just-CUsbIsdP.js",revision:null},{url:"assets/julia-D7OTSIA_.js",revision:null},{url:"assets/jsx-g9-lgVsj.js",revision:null},{url:"assets/jssm-C2t-YnRu.js",revision:null},{url:"assets/jsonnet-DFQXde-d.js",revision:null},{url:"assets/jsonl-DcaNXYhu.js",revision:null},{url:"assets/jsonc-Des-eS-w.js",revision:null},{url:"assets/json5-C9tS-k6U.js",revision:null},{url:"assets/json-Cp-IABpG.js",revision:null},{url:"assets/jison-wvAkD_A8.js",revision:null},{url:"assets/jinja-f2NsQr07.js",revision:null},{url:"assets/javascript-wDzz0qaB.js",revision:null},{url:"assets/java-CylS5w8V.js",revision:null},{url:"assets/ini-BEwlwnbL.js",revision:null},{url:"assets/index-BBA0xZ_3.js",revision:null},{url:"assets/index-B6xft9Co.css",revision:null},{url:"assets/imba-DGztddWO.js",revision:null},{url:"assets/hy-DFXneXwc.js",revision:null},{url:"assets/hxml-Bvhsp5Yf.js",revision:null},{url:"assets/hurl-irOxFIW8.js",revision:null},{url:"assets/http-jrhK8wxY.js",revision:null},{url:"assets/html2canvas.esm-QH1iLAAe.js",revision:null},{url:"assets/html-pp8916En.js",revision:null},{url:"assets/html-derivative-DlHx6ybY.js",revision:null},{url:"assets/houston-DnULxvSX.js",revision:null},{url:"assets/horizon-bright-CUuTKBJd.js",revision:null},{url:"assets/horizon-BUw7H-hv.js",revision:null},{url:"assets/hlsl-D3lLCCz7.js",revision:null},{url:"assets/hjson-D5-asLiD.js",revision:null},{url:"assets/hcl-BWvSN4gD.js",revision:null},{url:"assets/haxe-CzTSHFRz.js",revision:null},{url:"assets/haskell-Df6bDoY_.js",revision:null},{url:"assets/handlebars-BpdQsYii.js",revision:null},{url:"assets/haml-D5jkg6IW.js",revision:null},{url:"assets/hack-DbPARsA_.js",revision:null},{url:"assets/gruvbox-light-soft-hJgmCMqR.js",revision:null},{url:"assets/gruvbox-light-medium-DRw_LuNl.js",revision:null},{url:"assets/gruvbox-light-hard-CH1njM8p.js",revision:null},{url:"assets/gruvbox-dark-soft-CVdnzihN.js",revision:null},{url:"assets/gruvbox-dark-medium-GsRaNv29.js",revision:null},{url:"assets/gruvbox-dark-hard-CFHQjOhq.js",revision:null},{url:"assets/groovy-gcz8RCvz.js",revision:null},{url:"assets/graphql-ChdNCCLP.js",revision:null},{url:"assets/go-C27-OAKa.js",revision:null},{url:"assets/gnuplot-DdkO51Og.js",revision:null},{url:"assets/gn-n2N0HUVH.js",revision:null},{url:"assets/glsl-DplSGwfg.js",revision:null},{url:"assets/glimmer-ts-BfAWNZQY.js",revision:null},{url:"assets/glimmer-js-ByusRIyA.js",revision:null},{url:"assets/gleam-BspZqrRM.js",revision:null},{url:"assets/github-light-high-contrast-BfjtVDDH.js",revision:null},{url:"assets/github-light-default-D7oLnXFd.js",revision:null},{url:"assets/github-light-DAi9KRSo.js",revision:null},{url:"assets/github-dark-high-contrast-E3gJ1_iC.js",revision:null},{url:"assets/github-dark-dimmed-DH5Ifo-i.js",revision:null},{url:"assets/github-dark-default-Cuk6v7N8.js",revision:null},{url:"assets/github-dark-DHJKELXO.js",revision:null},{url:"assets/git-rebase-r7XF79zn.js",revision:null},{url:"assets/git-commit-F4YmCXRG.js",revision:null},{url:"assets/gherkin-DyxjwDmM.js",revision:null},{url:"assets/genie-D0YGMca9.js",revision:null},{url:"assets/gdshader-DkwncUOv.js",revision:null},{url:"assets/gdscript-C5YyOfLZ.js",revision:null},{url:"assets/gdresource-BOOCDP_w.js",revision:null},{url:"assets/fsharp-CXgrBDvD.js",revision:null},{url:"assets/fortran-free-form-BxgE0vQu.js",revision:null},{url:"assets/fortran-fixed-form-CkoXwp7k.js",revision:null},{url:"assets/fluent-C4IJs8-o.js",revision:null},{url:"assets/fish-BvzEVeQv.js",revision:null},{url:"assets/fennel-BYunw83y.js",revision:null},{url:"assets/everforest-light-C8M2exoo.js",revision:null},{url:"assets/everforest-dark-BgDCqdQA.js",revision:null},{url:"assets/erlang-DsQrWhSR.js",revision:null},{url:"assets/erb-Dm6A9KJ5.js",revision:null},{url:"assets/emacs-lisp-CXvaQtF9.js",revision:null},{url:"assets/elm-DbKCFpqz.js",revision:null},{url:"assets/elixir-CkH2-t6x.js",revision:null},{url:"assets/edge-FbVlp4U3.js",revision:null},{url:"assets/dream-maker-BtqSS_iP.js",revision:null},{url:"assets/dracula-soft-BXkSAIEj.js",revision:null},{url:"assets/dracula-BzJJZx-M.js",revision:null},{url:"assets/dotenv-Da5cRb03.js",revision:null},{url:"assets/docker-BcOcwvcX.js",revision:null},{url:"assets/diff-D97Zzqfu.js",revision:null},{url:"assets/desktop-BmXAJ9_W.js",revision:null},{url:"assets/dax-CEL-wOlO.js",revision:null},{url:"assets/dart-bE4Kk8sk.js",revision:null},{url:"assets/dark-plus-C3mMm8J8.js",revision:null},{url:"assets/d-85-TOEBH.js",revision:null},{url:"assets/cypher-COkxafJQ.js",revision:null},{url:"assets/cue-D82EKSYY.js",revision:null},{url:"assets/csv-fuZLfV_i.js",revision:null},{url:"assets/css-CLj8gQPS.js",revision:null},{url:"assets/csharp-DSvCPggb.js",revision:null},{url:"assets/crystal-DGywbUpC.js",revision:null},{url:"assets/cpp-UfJy6YNI.js",revision:null},{url:"assets/coq-DkFqJrB1.js",revision:null},{url:"assets/common-lisp-Cg-RD9OK.js",revision:null},{url:"assets/coffee-Ch7k5sss.js",revision:null},{url:"assets/codeql-DsOJ9woJ.js",revision:null},{url:"assets/codeowners-Bp6g37R7.js",revision:null},{url:"assets/cobol-nBiQ_Alo.js",revision:null},{url:"assets/cmake-D1j8_8rp.js",revision:null},{url:"assets/clojure-P80f7IUj.js",revision:null},{url:"assets/clarity-D53aC0YG.js",revision:null},{url:"assets/catppuccin-mocha-D87Tk5Gz.js",revision:null},{url:"assets/catppuccin-macchiato-DQyhUUbL.js",revision:null},{url:"assets/catppuccin-latte-C9dUb6Cb.js",revision:null},{url:"assets/catppuccin-frappe-DFWUc33u.js",revision:null},{url:"assets/cairo-KRGpt6FW.js",revision:null},{url:"assets/cadence-Bv_4Rxtq.js",revision:null},{url:"assets/c3-MRO5bC_T.js",revision:null},{url:"assets/c-BIGW1oBm.js",revision:null},{url:"assets/bsl-BO_Y6i37.js",revision:null},{url:"assets/blade-2xfisSek.js",revision:null},{url:"assets/bird2-BIv1doCn.js",revision:null},{url:"assets/bicep-Bmn6On1c.js",revision:null},{url:"assets/bibtex-CHM0blh-.js",revision:null},{url:"assets/berry-uYugtg8r.js",revision:null},{url:"assets/beancount-k_qm7-4y.js",revision:null},{url:"assets/bat-BkioyH1T.js",revision:null},{url:"assets/ballerina-BFfxhgS-.js",revision:null},{url:"assets/ayu-mirage-32ctXXKs.js",revision:null},{url:"assets/ayu-light-BA47KaF1.js",revision:null},{url:"assets/ayu-dark-DYE7WIF3.js",revision:null},{url:"assets/awk-DMzUqQB5.js",revision:null},{url:"assets/aurora-x-D-2ljcwZ.js",revision:null},{url:"assets/astro-HNnZUWAn.js",revision:null},{url:"assets/asm-D_Q5rh1f.js",revision:null},{url:"assets/asciidoc-Ve4PFQV2.js",revision:null},{url:"assets/ara-BRHolxvo.js",revision:null},{url:"assets/applescript-Co6uUVPk.js",revision:null},{url:"assets/apl-CORt7UWP.js",revision:null},{url:"assets/apex-Dqspr-GT.js",revision:null},{url:"assets/apache-Pmp26Uib.js",revision:null},{url:"assets/angular-ts-BrjP3tb8.js",revision:null},{url:"assets/angular-html-DA-rfuFy.js",revision:null},{url:"assets/andromeeda-C4gqWexZ.js",revision:null},{url:"assets/ada-bCR0ucgS.js",revision:null},{url:"assets/actionscript-3-CoDkCxhg.js",revision:null},{url:"assets/abap-BdImnpbu.js",revision:null},{url:"assets/openfox-192.png",revision:"79feeb86d692c274854e37959a7dae67"},{url:"assets/openfox-512.png",revision:"fee24b214220594b4f595a467e73036e"},{url:"manifest.webmanifest",revision:"c25f372c782e623ab1e768a8dfe350ca"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))});
|
|
1
|
+
if(!self.define){let s,l={};const e=(e,r)=>(e=new URL(e+".js",r).href,l[e]||new Promise(l=>{if("document"in self){const s=document.createElement("script");s.src=e,s.onload=l,document.head.appendChild(s)}else s=e,importScripts(e),l()}).then(()=>{let s=l[e];if(!s)throw new Error(`Module ${e} didn’t register its module`);return s}));self.define=(r,i)=>{const n=s||("document"in self?document.currentScript.src:"")||location.href;if(l[n])return;let u={};const a=s=>e(s,n),t={module:{uri:n},exports:u,require:a};l[n]=Promise.all(r.map(s=>t[s]||a(s))).then(s=>(i(...s),u))}}define(["./workbox-8c29f6e4"],function(s){"use strict";self.skipWaiting(),s.clientsClaim(),s.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"eb4efc539938aa1f41030d0091157d88"},{url:"__inspect__.js",revision:"878b477aaf1805c028895f3d3bb4af71"},{url:"assets/zig-VOosw3JB.js",revision:null},{url:"assets/zenscript-DVFEvuxE.js",revision:null},{url:"assets/yaml-Buea-lGh.js",revision:null},{url:"assets/xsl-CtQFsRM5.js",revision:null},{url:"assets/xml-sdJ4AIDG.js",revision:null},{url:"assets/wolfram-lXgVvXCa.js",revision:null},{url:"assets/wit-5i3qLPDT.js",revision:null},{url:"assets/wikitext-BhOHFoWU.js",revision:null},{url:"assets/wgsl-Dx-B1_4e.js",revision:null},{url:"assets/wenyan-BV7otONQ.js",revision:null},{url:"assets/wasm-MzD3tlZU.js",revision:null},{url:"assets/wasm-CG6Dc4jp.js",revision:null},{url:"assets/vyper-CDx5xZoG.js",revision:null},{url:"assets/vue-vine-BoDAl6tE.js",revision:null},{url:"assets/vue-html-AaS7Mt5G.js",revision:null},{url:"assets/vue-D2xRrEX4.js",revision:null},{url:"assets/vitesse-light-CVO1_9PV.js",revision:null},{url:"assets/vitesse-dark-D0r3Knsf.js",revision:null},{url:"assets/vitesse-black-Bkuqu6BP.js",revision:null},{url:"assets/viml-CJc9bBzg.js",revision:null},{url:"assets/vhdl-CeAyd5Ju.js",revision:null},{url:"assets/vesper-DRje8inN.js",revision:null},{url:"assets/verilog-BQ8w6xss.js",revision:null},{url:"assets/vb-D17OF-Vu.js",revision:null},{url:"assets/vala-CsfeWuGM.js",revision:null},{url:"assets/v-BcVCzyr7.js",revision:null},{url:"assets/typst-DHCkPAjA.js",revision:null},{url:"assets/typespec-CAFt9gP4.js",revision:null},{url:"assets/typescript-BPQ3VLAy.js",revision:null},{url:"assets/twig-CW1WmMYd.js",revision:null},{url:"assets/turtle-BsS91CYL.js",revision:null},{url:"assets/tsx-COt5Ahok.js",revision:null},{url:"assets/tsv-B_m7g4N7.js",revision:null},{url:"assets/ts-tags-D351s5mN.js",revision:null},{url:"assets/toml-vGWfd6FD.js",revision:null},{url:"assets/tokyo-night-hegEt444.js",revision:null},{url:"assets/tex-idrVyKtj.js",revision:null},{url:"assets/terraform-BETggiCN.js",revision:null},{url:"assets/templ-DhtptRzy.js",revision:null},{url:"assets/tcl-dwOrl1Do.js",revision:null},{url:"assets/tasl-QIJgUcNo.js",revision:null},{url:"assets/talonscript-CkByrt1z.js",revision:null},{url:"assets/systemd-4A_iFExJ.js",revision:null},{url:"assets/system-verilog-CnnmHF94.js",revision:null},{url:"assets/synthwave-84-CbfX1IO0.js",revision:null},{url:"assets/swift-D82vCrfD.js",revision:null},{url:"assets/svelte-Cy7k_4gC.js",revision:null},{url:"assets/surrealql-Bq5Q-fJD.js",revision:null},{url:"assets/stylus-BEDo0Tqx.js",revision:null},{url:"assets/stata-DI20mbqo.js",revision:null},{url:"assets/ssh-config-_ykCGR6B.js",revision:null},{url:"assets/sql-CRqJ_cUM.js",revision:null},{url:"assets/splunk-BtCnVYZw.js",revision:null},{url:"assets/sparql-rVzFXLq3.js",revision:null},{url:"assets/soy-8wufbnw4.js",revision:null},{url:"assets/solidity-rGO070M0.js",revision:null},{url:"assets/solarized-light-L9t79GZl.js",revision:null},{url:"assets/solarized-dark-DXbdFlpD.js",revision:null},{url:"assets/snazzy-light-Bw305WKR.js",revision:null},{url:"assets/smalltalk-BERRCDM3.js",revision:null},{url:"assets/slack-ochin-DqwNpetd.js",revision:null},{url:"assets/slack-dark-BthQWCQV.js",revision:null},{url:"assets/shellsession-BADoaaVG.js",revision:null},{url:"assets/shellscript-Yzrsuije.js",revision:null},{url:"assets/shaderlab-Dg9Lc6iA.js",revision:null},{url:"assets/sdbl-DVxCFoDh.js",revision:null},{url:"assets/scss-D5BDwBP9.js",revision:null},{url:"assets/scheme-C98Dy4si.js",revision:null},{url:"assets/scala-C151Ov-r.js",revision:null},{url:"assets/sass-Cj5Yp3dK.js",revision:null},{url:"assets/sas-DEy46yEz.js",revision:null},{url:"assets/rust-B1yitclQ.js",revision:null},{url:"assets/ruby-DyJCeAvU.js",revision:null},{url:"assets/rst-CpCqk9r5.js",revision:null},{url:"assets/rosmsg-BJDFO7_C.js",revision:null},{url:"assets/rose-pine-qdsjHGoJ.js",revision:null},{url:"assets/rose-pine-moon-D4_iv3hh.js",revision:null},{url:"assets/rose-pine-dawn-DHQR4-dF.js",revision:null},{url:"assets/ron-D8l8udqQ.js",revision:null},{url:"assets/riscv-BM1_JUlF.js",revision:null},{url:"assets/rel-C3B-1QV4.js",revision:null},{url:"assets/regexp-CDVJQ6XC.js",revision:null},{url:"assets/reg-C-SQnVFl.js",revision:null},{url:"assets/red-bN70gL4F.js",revision:null},{url:"assets/razor-BjBPvh-w.js",revision:null},{url:"assets/raku-DXvB9xmW.js",revision:null},{url:"assets/racket-BqYA7rlc.js",revision:null},{url:"assets/r-Dspwwk_N.js",revision:null},{url:"assets/qss-IeuSbFQv.js",revision:null},{url:"assets/qmldir-C8lEn-DE.js",revision:null},{url:"assets/qml-3beO22l8.js",revision:null},{url:"assets/python-B6aJPvgy.js",revision:null},{url:"assets/purescript-CklMAg4u.js",revision:null},{url:"assets/puppet-BMWR74SV.js",revision:null},{url:"assets/pug-DKIMFp6K.js",revision:null},{url:"assets/proto-C7zT0LnQ.js",revision:null},{url:"assets/prolog-CbFg5uaA.js",revision:null},{url:"assets/prisma-Dd19v3D-.js",revision:null},{url:"assets/powershell-Dpen1YoG.js",revision:null},{url:"assets/powerquery-CEu0bR-o.js",revision:null},{url:"assets/postcss-CXtECtnM.js",revision:null},{url:"assets/polar-C0HS_06l.js",revision:null},{url:"assets/poimandres-CS3Unz2-.js",revision:null},{url:"assets/po-BTJTHyun.js",revision:null},{url:"assets/plsql-ChMvpjG-.js",revision:null},{url:"assets/plastic-3e1v2bzS.js",revision:null},{url:"assets/pkl-u5AG7uiY.js",revision:null},{url:"assets/php-Csjmro_R.js",revision:null},{url:"assets/perl-B9cMNwum.js",revision:null},{url:"assets/pascal-D93ZcfNL.js",revision:null},{url:"assets/openscad-C4EeE6gA.js",revision:null},{url:"assets/one-light-C3Wv6jpd.js",revision:null},{url:"assets/one-dark-pro-DVMEJ2y_.js",revision:null},{url:"assets/odin-BBf5iR-q.js",revision:null},{url:"assets/ocaml-C0hk2d4L.js",revision:null},{url:"assets/objective-cpp-CLxacb5B.js",revision:null},{url:"assets/objective-c-DXmwc3jG.js",revision:null},{url:"assets/nushell-Cz2AlsmD.js",revision:null},{url:"assets/nord-Ddv68eIx.js",revision:null},{url:"assets/nix-CwoSXNpI.js",revision:null},{url:"assets/nim-BIad80T-.js",revision:null},{url:"assets/night-owl-light-CMTm3GFP.js",revision:null},{url:"assets/night-owl-C39BiMTA.js",revision:null},{url:"assets/nginx-BpAMiNFr.js",revision:null},{url:"assets/nextflow-groovy-vE_lwT2v.js",revision:null},{url:"assets/nextflow-C-mBbutL.js",revision:null},{url:"assets/narrat-DRg8JJMk.js",revision:null},{url:"assets/move-IF9eRakj.js",revision:null},{url:"assets/moonbit-_H4v1dQx.js",revision:null},{url:"assets/monokai-D4h5O-jR.js",revision:null},{url:"assets/mojo-rZm6bMo-.js",revision:null},{url:"assets/mipsasm-CKIfxQSi.js",revision:null},{url:"assets/min-light-CTRr51gU.js",revision:null},{url:"assets/min-dark-CafNBF8u.js",revision:null},{url:"assets/mermaid-mWjccvbQ.js",revision:null},{url:"assets/mdx-Cmh6b_Ma.js",revision:null},{url:"assets/mdc-DTYItulj.js",revision:null},{url:"assets/matlab-D7o27uSR.js",revision:null},{url:"assets/material-theme-palenight-Csfq5Kiy.js",revision:null},{url:"assets/material-theme-ocean-CyktbL80.js",revision:null},{url:"assets/material-theme-lighter-B0m2ddpp.js",revision:null},{url:"assets/material-theme-darker-BfHTSMKl.js",revision:null},{url:"assets/material-theme-D5KoaKCx.js",revision:null},{url:"assets/marko-DjSrsDqO.js",revision:null},{url:"assets/markdown-Cvjx9yec.js",revision:null},{url:"assets/make-CHLpvVh8.js",revision:null},{url:"assets/luau-KW6xsasC.js",revision:null},{url:"assets/lua-BaeVxFsk.js",revision:null},{url:"assets/logo-BtOb2qkB.js",revision:null},{url:"assets/log-2UxHyX5q.js",revision:null},{url:"assets/llvm-DjAJT7YJ.js",revision:null},{url:"assets/liquid-C0sCDyMI.js",revision:null},{url:"assets/light-plus-B7mTdjB0.js",revision:null},{url:"assets/less-B1dDrJ26.js",revision:null},{url:"assets/lean-BZvkOJ9d.js",revision:null},{url:"assets/latex-CaSxy8MP.js",revision:null},{url:"assets/laserwave-DUszq2jm.js",revision:null},{url:"assets/kusto-wEQ09or8.js",revision:null},{url:"assets/kotlin-BdnUsdx6.js",revision:null},{url:"assets/kdl-DV7GczEv.js",revision:null},{url:"assets/kanagawa-wave-DWedfzmr.js",revision:null},{url:"assets/kanagawa-lotus-CfQXZHmo.js",revision:null},{url:"assets/kanagawa-dragon-CkXjmgJE.js",revision:null},{url:"assets/just-CUsbIsdP.js",revision:null},{url:"assets/julia-D7OTSIA_.js",revision:null},{url:"assets/jsx-g9-lgVsj.js",revision:null},{url:"assets/jssm-C2t-YnRu.js",revision:null},{url:"assets/jsonnet-DFQXde-d.js",revision:null},{url:"assets/jsonl-DcaNXYhu.js",revision:null},{url:"assets/jsonc-Des-eS-w.js",revision:null},{url:"assets/json5-C9tS-k6U.js",revision:null},{url:"assets/json-Cp-IABpG.js",revision:null},{url:"assets/jison-wvAkD_A8.js",revision:null},{url:"assets/jinja-f2NsQr07.js",revision:null},{url:"assets/javascript-wDzz0qaB.js",revision:null},{url:"assets/java-CylS5w8V.js",revision:null},{url:"assets/ini-BEwlwnbL.js",revision:null},{url:"assets/index-B6xft9Co.css",revision:null},{url:"assets/index-B1rz1oo1.js",revision:null},{url:"assets/imba-DGztddWO.js",revision:null},{url:"assets/hy-DFXneXwc.js",revision:null},{url:"assets/hxml-Bvhsp5Yf.js",revision:null},{url:"assets/hurl-irOxFIW8.js",revision:null},{url:"assets/http-jrhK8wxY.js",revision:null},{url:"assets/html2canvas.esm-QH1iLAAe.js",revision:null},{url:"assets/html-pp8916En.js",revision:null},{url:"assets/html-derivative-DlHx6ybY.js",revision:null},{url:"assets/houston-DnULxvSX.js",revision:null},{url:"assets/horizon-bright-CUuTKBJd.js",revision:null},{url:"assets/horizon-BUw7H-hv.js",revision:null},{url:"assets/hlsl-D3lLCCz7.js",revision:null},{url:"assets/hjson-D5-asLiD.js",revision:null},{url:"assets/hcl-BWvSN4gD.js",revision:null},{url:"assets/haxe-CzTSHFRz.js",revision:null},{url:"assets/haskell-Df6bDoY_.js",revision:null},{url:"assets/handlebars-BpdQsYii.js",revision:null},{url:"assets/haml-D5jkg6IW.js",revision:null},{url:"assets/hack-DbPARsA_.js",revision:null},{url:"assets/gruvbox-light-soft-hJgmCMqR.js",revision:null},{url:"assets/gruvbox-light-medium-DRw_LuNl.js",revision:null},{url:"assets/gruvbox-light-hard-CH1njM8p.js",revision:null},{url:"assets/gruvbox-dark-soft-CVdnzihN.js",revision:null},{url:"assets/gruvbox-dark-medium-GsRaNv29.js",revision:null},{url:"assets/gruvbox-dark-hard-CFHQjOhq.js",revision:null},{url:"assets/groovy-gcz8RCvz.js",revision:null},{url:"assets/graphql-ChdNCCLP.js",revision:null},{url:"assets/go-C27-OAKa.js",revision:null},{url:"assets/gnuplot-DdkO51Og.js",revision:null},{url:"assets/gn-n2N0HUVH.js",revision:null},{url:"assets/glsl-DplSGwfg.js",revision:null},{url:"assets/glimmer-ts-BfAWNZQY.js",revision:null},{url:"assets/glimmer-js-ByusRIyA.js",revision:null},{url:"assets/gleam-BspZqrRM.js",revision:null},{url:"assets/github-light-high-contrast-BfjtVDDH.js",revision:null},{url:"assets/github-light-default-D7oLnXFd.js",revision:null},{url:"assets/github-light-DAi9KRSo.js",revision:null},{url:"assets/github-dark-high-contrast-E3gJ1_iC.js",revision:null},{url:"assets/github-dark-dimmed-DH5Ifo-i.js",revision:null},{url:"assets/github-dark-default-Cuk6v7N8.js",revision:null},{url:"assets/github-dark-DHJKELXO.js",revision:null},{url:"assets/git-rebase-r7XF79zn.js",revision:null},{url:"assets/git-commit-F4YmCXRG.js",revision:null},{url:"assets/gherkin-DyxjwDmM.js",revision:null},{url:"assets/genie-D0YGMca9.js",revision:null},{url:"assets/gdshader-DkwncUOv.js",revision:null},{url:"assets/gdscript-C5YyOfLZ.js",revision:null},{url:"assets/gdresource-BOOCDP_w.js",revision:null},{url:"assets/fsharp-CXgrBDvD.js",revision:null},{url:"assets/fortran-free-form-BxgE0vQu.js",revision:null},{url:"assets/fortran-fixed-form-CkoXwp7k.js",revision:null},{url:"assets/fluent-C4IJs8-o.js",revision:null},{url:"assets/fish-BvzEVeQv.js",revision:null},{url:"assets/fennel-BYunw83y.js",revision:null},{url:"assets/everforest-light-C8M2exoo.js",revision:null},{url:"assets/everforest-dark-BgDCqdQA.js",revision:null},{url:"assets/erlang-DsQrWhSR.js",revision:null},{url:"assets/erb-Dm6A9KJ5.js",revision:null},{url:"assets/emacs-lisp-CXvaQtF9.js",revision:null},{url:"assets/elm-DbKCFpqz.js",revision:null},{url:"assets/elixir-CkH2-t6x.js",revision:null},{url:"assets/edge-FbVlp4U3.js",revision:null},{url:"assets/dream-maker-BtqSS_iP.js",revision:null},{url:"assets/dracula-soft-BXkSAIEj.js",revision:null},{url:"assets/dracula-BzJJZx-M.js",revision:null},{url:"assets/dotenv-Da5cRb03.js",revision:null},{url:"assets/docker-BcOcwvcX.js",revision:null},{url:"assets/diff-D97Zzqfu.js",revision:null},{url:"assets/desktop-BmXAJ9_W.js",revision:null},{url:"assets/dax-CEL-wOlO.js",revision:null},{url:"assets/dart-bE4Kk8sk.js",revision:null},{url:"assets/dark-plus-C3mMm8J8.js",revision:null},{url:"assets/d-85-TOEBH.js",revision:null},{url:"assets/cypher-COkxafJQ.js",revision:null},{url:"assets/cue-D82EKSYY.js",revision:null},{url:"assets/csv-fuZLfV_i.js",revision:null},{url:"assets/css-CLj8gQPS.js",revision:null},{url:"assets/csharp-DSvCPggb.js",revision:null},{url:"assets/crystal-DGywbUpC.js",revision:null},{url:"assets/cpp-UfJy6YNI.js",revision:null},{url:"assets/coq-DkFqJrB1.js",revision:null},{url:"assets/common-lisp-Cg-RD9OK.js",revision:null},{url:"assets/coffee-Ch7k5sss.js",revision:null},{url:"assets/codeql-DsOJ9woJ.js",revision:null},{url:"assets/codeowners-Bp6g37R7.js",revision:null},{url:"assets/cobol-nBiQ_Alo.js",revision:null},{url:"assets/cmake-D1j8_8rp.js",revision:null},{url:"assets/clojure-P80f7IUj.js",revision:null},{url:"assets/clarity-D53aC0YG.js",revision:null},{url:"assets/catppuccin-mocha-D87Tk5Gz.js",revision:null},{url:"assets/catppuccin-macchiato-DQyhUUbL.js",revision:null},{url:"assets/catppuccin-latte-C9dUb6Cb.js",revision:null},{url:"assets/catppuccin-frappe-DFWUc33u.js",revision:null},{url:"assets/cairo-KRGpt6FW.js",revision:null},{url:"assets/cadence-Bv_4Rxtq.js",revision:null},{url:"assets/c3-MRO5bC_T.js",revision:null},{url:"assets/c-BIGW1oBm.js",revision:null},{url:"assets/bsl-BO_Y6i37.js",revision:null},{url:"assets/blade-2xfisSek.js",revision:null},{url:"assets/bird2-BIv1doCn.js",revision:null},{url:"assets/bicep-Bmn6On1c.js",revision:null},{url:"assets/bibtex-CHM0blh-.js",revision:null},{url:"assets/berry-uYugtg8r.js",revision:null},{url:"assets/beancount-k_qm7-4y.js",revision:null},{url:"assets/bat-BkioyH1T.js",revision:null},{url:"assets/ballerina-BFfxhgS-.js",revision:null},{url:"assets/ayu-mirage-32ctXXKs.js",revision:null},{url:"assets/ayu-light-BA47KaF1.js",revision:null},{url:"assets/ayu-dark-DYE7WIF3.js",revision:null},{url:"assets/awk-DMzUqQB5.js",revision:null},{url:"assets/aurora-x-D-2ljcwZ.js",revision:null},{url:"assets/astro-HNnZUWAn.js",revision:null},{url:"assets/asm-D_Q5rh1f.js",revision:null},{url:"assets/asciidoc-Ve4PFQV2.js",revision:null},{url:"assets/ara-BRHolxvo.js",revision:null},{url:"assets/applescript-Co6uUVPk.js",revision:null},{url:"assets/apl-CORt7UWP.js",revision:null},{url:"assets/apex-Dqspr-GT.js",revision:null},{url:"assets/apache-Pmp26Uib.js",revision:null},{url:"assets/angular-ts-BrjP3tb8.js",revision:null},{url:"assets/angular-html-DA-rfuFy.js",revision:null},{url:"assets/andromeeda-C4gqWexZ.js",revision:null},{url:"assets/ada-bCR0ucgS.js",revision:null},{url:"assets/actionscript-3-CoDkCxhg.js",revision:null},{url:"assets/abap-BdImnpbu.js",revision:null},{url:"assets/openfox-192.png",revision:"79feeb86d692c274854e37959a7dae67"},{url:"assets/openfox-512.png",revision:"fee24b214220594b4f595a467e73036e"},{url:"manifest.webmanifest",revision:"c25f372c782e623ab1e768a8dfe350ca"}],{}),s.cleanupOutdatedCaches(),s.registerRoute(new s.NavigationRoute(s.createHandlerBoundToURL("index.html")))});
|