@coreframe/vite 0.2.4 → 0.2.5
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{codexTaskEvents as e}from"@coreframe/dev-contracts/codex-task";import{createContext as t,createElement as n,forwardRef as r,useContext as i,useEffect as a,useRef as o,useState as s,useSyncExternalStore as c}from"react";import{createPortal as l}from"react-dom";import
|
|
1
|
+
import{codexTaskEvents as e}from"@coreframe/dev-contracts/codex-task";import{createContext as t,createElement as n,forwardRef as r,useContext as i,useEffect as a,useRef as o,useState as s,useSyncExternalStore as c}from"react";import{createPortal as l}from"react-dom";import{Fragment as u,jsx as d,jsxs as f}from"react/jsx-runtime";const p=()=>{if(typeof document>`u`)return;let e=document.querySelector(`meta[name="csp-nonce"]`);if(e?.content)return e.content;let t=document.querySelector(`script[nonce]`),n=t?.nonce||t?.getAttribute(`nonce`);if(n)return n},m=(e,t,n)=>{if(typeof document>`u`)return null;let r=`isolet-style-${e}`,i=typeof CSS<`u`&&CSS.escape?CSS.escape(r):r,a=`getElementById`in n?n.getElementById(r):n.querySelector(`#${i}`);if(a)return a.textContent=t,a;let o=document.createElement(`style`);o.id=r;let s=p();return s&&o.setAttribute(`nonce`,s),o.textContent=t,n.appendChild(o),o},h=`data-isolet`,g=(e,t,n={})=>{if(typeof document>`u`)return{host:null,shadowRoot:null,container:t,target:t};let r=n.isolation??`shadow-dom`;if(r===`none`){let r=`[${h}="${e}"]`,i=t.querySelector(r);if(i)return{host:i,shadowRoot:null,container:i,target:t};let a=document.createElement(`div`);if(a.setAttribute(h,e),n.hostAttributes)for(let[e,t]of Object.entries(n.hostAttributes))a.setAttribute(e,t);return _(a,n),n.css&&m(e,n.css,t),t.appendChild(a),{host:a,shadowRoot:null,container:a,target:t}}let i=`[${h}="${e}"]`,a=t.querySelector(i);if(a){if(r===`shadow-dom`&&a.shadowRoot){let e=a.shadowRoot.querySelector(`[${h}-root]`);if(e)return{host:a,shadowRoot:a.shadowRoot,container:e,target:t}}else if(r===`scoped`)return{host:a,shadowRoot:null,container:a,target:t}}let o=document.createElement(`div`);if(o.setAttribute(h,e),n.hostAttributes)for(let[e,t]of Object.entries(n.hostAttributes))o.setAttribute(e,t);if(r===`shadow-dom`){o.style.all=`initial`;let r=o.attachShadow({mode:n.shadowMode??`open`});n.css&&m(e,n.css,r);let i=document.createElement(`div`);return i.setAttribute(`${h}-root`,``),r.appendChild(i),_(o,n),t.appendChild(o),{host:o,shadowRoot:r,container:i,target:t}}return _(o,n),n.css&&m(e,n.css,t),t.appendChild(o),{host:o,shadowRoot:null,container:o,target:t}},_=(e,t)=>{if(t.hostStyles)for(let[n,r]of Object.entries(t.hostStyles))r==null||typeof r==`function`||e.style.setProperty(n.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`),String(r));t.zIndex!=null&&(e.style.zIndex=String(t.zIndex))},v=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),y=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),b=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),x=e=>{
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v1.24.0 - ISC
|
|
4
4
|
*
|
|
@@ -23,21 +23,21 @@ import{codexTaskEvents as e}from"@coreframe/dev-contracts/codex-task";import{cre
|
|
|
23
23
|
* This source code is licensed under the ISC license.
|
|
24
24
|
* See the LICENSE file in the root directory of this source tree.
|
|
25
25
|
*/
|
|
26
|
-
let t=
|
|
26
|
+
let t=b(e);return t.charAt(0).toUpperCase()+t.slice(1)};
|
|
27
27
|
/**
|
|
28
28
|
* @license lucide-react v1.24.0 - ISC
|
|
29
29
|
*
|
|
30
30
|
* This source code is licensed under the ISC license.
|
|
31
31
|
* See the LICENSE file in the root directory of this source tree.
|
|
32
32
|
*/
|
|
33
|
-
var
|
|
33
|
+
var S={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`};
|
|
34
34
|
/**
|
|
35
35
|
* @license lucide-react v1.24.0 - ISC
|
|
36
36
|
*
|
|
37
37
|
* This source code is licensed under the ISC license.
|
|
38
38
|
* See the LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
|
-
const
|
|
40
|
+
const C=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},w=t({}),T=()=>i(w),E=r(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:i,className:a=``,children:o,iconNode:s,...c},l)=>{
|
|
41
41
|
/**
|
|
42
42
|
* @license lucide-react v1.24.0 - ISC
|
|
43
43
|
*
|
|
@@ -50,19 +50,20 @@ const w=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)ret
|
|
|
50
50
|
* This source code is licensed under the ISC license.
|
|
51
51
|
* See the LICENSE file in the root directory of this source tree.
|
|
52
52
|
*/
|
|
53
|
-
let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=
|
|
53
|
+
let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:f=!1,color:p=`currentColor`,className:m=``}=T()??{},h=i??f?Number(r??d)*24/Number(t??u):r??d;return n(`svg`,{ref:l,...S,width:t??u??S.width,height:t??u??S.height,stroke:e??p,strokeWidth:h,className:v(`lucide`,m,a),...!o&&!C(c)&&{"aria-hidden":`true`},...c},[...s.map(([e,t])=>n(e,t)),...Array.isArray(o)?o:[o]])}),D=(e,t)=>{
|
|
54
54
|
/**
|
|
55
55
|
* @license lucide-react v1.24.0 - ISC
|
|
56
56
|
*
|
|
57
57
|
* This source code is licensed under the ISC license.
|
|
58
58
|
* See the LICENSE file in the root directory of this source tree.
|
|
59
59
|
*/
|
|
60
|
-
let i=r(({className:r,...i},a)=>n(
|
|
60
|
+
let i=r(({className:r,...i},a)=>n(E,{ref:a,iconNode:t,className:v(`lucide-${y(x(e))}`,`lucide-${e}`,r),...i}));return i.displayName=x(e),i},O=D(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]])
|
|
61
61
|
/**
|
|
62
62
|
* @license lucide-react v1.24.0 - ISC
|
|
63
63
|
*
|
|
64
64
|
* This source code is licensed under the ISC license.
|
|
65
65
|
* See the LICENSE file in the root directory of this source tree.
|
|
66
66
|
*/
|
|
67
|
-
;function
|
|
68
|
-
|
|
67
|
+
;function k(){return import.meta.hot}var A={actions:`actions`,backdrop:`backdrop`,button:`button`,close:`close`,dialog:`dialog`,error:`error`,form:`form`,header:`header`,hint:`hint`,primary:`primary`,prompt:`prompt`,surface:`surface`,title:`title`,toast:`toast`},j=`[data-isolet-root]{--codex-font-body:"SN Pro Variable", system-ui, sans-serif;color-scheme:light dark;--codex-background:#fff;--codex-border:#dee2e6;--codex-text:#212529;--codex-muted:#495057;--codex-subtle:#868e96;--codex-accent:#228be6;--codex-accent-hover:#1c7ed6;--codex-accent-soft:#e7f5ff;--codex-danger:#c92a2a;--codex-danger-soft:#fff5f5;color:var(--codex-text);font:14px/1.45 var(--codex-font-body)}.surface{pointer-events:none;position:fixed;inset:0}.backdrop{pointer-events:auto;background:#0f172a59;position:fixed;inset:0}.dialog{background:var(--codex-background);border:1px solid var(--codex-border);box-sizing:border-box;color:var(--codex-text);pointer-events:auto;border-radius:14px;width:min(560px,100vw - 32px);max-width:min(560px,100vw - 32px);margin:0;padding:20px;position:fixed;inset:50% auto auto 50%;transform:translate(-50%,-50%);box-shadow:0 18px 60px #0f172a47,0 2px 8px #0f172a1f}.header{justify-content:space-between;align-items:center;gap:12px;display:flex}.title{margin:0;font-size:18px}.close{appearance:none;color:inherit;cursor:pointer;background:0 0;border:0;border-radius:8px;justify-content:center;align-items:center;min-width:32px;min-height:32px;padding:4px;display:inline-flex}.close:hover{background:#f1f3f5}.close:focus-visible,.button:focus-visible,.prompt:focus-visible{outline-offset:2px;outline:3px solid #a5d8ff}.form{gap:12px;margin-top:18px;display:grid}.prompt{background:var(--codex-background);border:1px solid var(--codex-border);box-sizing:border-box;color:inherit;font:inherit;resize:vertical;border-radius:9px;width:100%;min-height:150px;padding:10px 12px}.hint{color:var(--codex-subtle);margin:0;font-size:12px}.error{background:var(--codex-danger-soft);color:var(--codex-danger);border:1px solid #ffc9c9;border-radius:8px;margin:0;padding:8px 10px}.actions{flex-wrap:wrap;justify-content:flex-end;gap:8px;display:flex}.button{appearance:none;border:1px solid var(--codex-border);color:inherit;cursor:pointer;font:inherit;background:0 0;border-radius:8px;justify-content:center;align-items:center;gap:7px;min-height:36px;padding:7px 12px;display:inline-flex}.button:hover{background:#f1f3f5}.primary{background:var(--codex-accent);border-color:var(--codex-accent);color:#fff}.primary:hover{background:var(--codex-accent-hover)}.button:disabled{cursor:not-allowed;opacity:.55}.toast{background:var(--codex-background);border:1px solid var(--codex-border);bottom:calc(20px + env(safe-area-inset-bottom,0px));color:var(--codex-text);pointer-events:auto;border-radius:9px;max-width:min(520px,100vw - 32px);padding:10px 14px;position:fixed;left:50%;transform:translate(-50%);box-shadow:0 8px 24px #0f172a2e}
|
|
68
|
+
`,M=`@font-face{font-family:SN Pro Variable;font-style:normal;font-display:swap;font-weight:200 900;src:url(./files/sn-pro-cyrillic-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+460-52F,U+1C80-1C8A,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:SN Pro Variable;font-style:normal;font-display:swap;font-weight:200 900;src:url(./files/sn-pro-cyrillic-wght-normal.woff2)format("woff2-variations");unicode-range:U+301,U+400-45F,U+490-491,U+4B0-4B1,U+2116}@font-face{font-family:SN Pro Variable;font-style:normal;font-display:swap;font-weight:200 900;src:url(./files/sn-pro-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:SN Pro Variable;font-style:normal;font-display:swap;font-weight:200 900;src:url(./files/sn-pro-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:SN Pro Variable;font-style:normal;font-display:swap;font-weight:200 900;src:url(./files/sn-pro-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
|
69
|
+
`;const N=`${M}\n${j}`;let P=!1,F=0;const I=new Set,L=4e3;function R(){W(!P)}function z(){let e=U(),t=c(G,K,q);return e?l(d(`div`,{className:A.surface,children:d(B,{onClose:()=>W(!1),visible:t})}),e):null}function B({onClose:e,visible:t}){let[n,r]=s();return a(()=>{if(!n)return;let e=setTimeout(()=>r(void 0),L);return()=>clearTimeout(e)},[n]),f(u,{children:[t?f(u,{children:[d(`button`,{"aria-label":`Close Codex task launcher`,className:A.backdrop,onClick:e}),f(`dialog`,{"aria-labelledby":`coreframe-codex-task-title`,className:A.dialog,open:!0,children:[f(`div`,{className:A.header,children:[d(`h2`,{className:A.title,id:`coreframe-codex-task-title`,children:`New Codex task`}),d(`button`,{"aria-label":`Close Codex task launcher`,className:A.close,onClick:e,type:`button`,children:d(O,{"aria-hidden":`true`,size:18})})]}),d(V,{onClose:e,onStarted:r,showToast:!1})]})]}):null,n?d(`div`,{className:A.toast,role:`status`,children:n}):null]})}function V({classNames:e=A,label:t=`Codex task prompt`,onClose:n,onStarted:r,placeholder:i=`Describe what you want Codex to do…`,showToast:a=!0}){let{error:o,pending:s,prompt:c,setPrompt:l,submit:p,toast:m}=H({onClose:n,onStarted:r});return f(u,{children:[f(`form`,{className:e.form,onSubmit:e=>{e.preventDefault(),p()},children:[d(`textarea`,{"aria-label":t,autoFocus:!0,className:e.prompt,disabled:s,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key!==`Enter`||e.shiftKey||(e.preventDefault(),p(e.metaKey||e.ctrlKey))},placeholder:i,value:c}),f(`p`,{className:e.hint,children:[`Enter opens in Codex · `,navigator.platform.includes(`Mac`)?`⌘`:`Ctrl`,`+Enter runs in background · Shift+Enter adds a line`]}),o?d(`p`,{className:e.error,children:o}):null,f(`div`,{className:e.actions,children:[d(`button`,{className:e.button,disabled:s,onClick:n,type:`button`,children:`Cancel`}),d(`button`,{className:e.button,disabled:s||!c.trim(),onClick:()=>p(!1),type:`button`,children:`Open in Codex`}),d(`button`,{className:`${e.button} ${e.primary}`,disabled:s||!c.trim(),onClick:()=>p(!0),type:`button`,children:s?`Starting…`:`Run in background`})]})]}),a&&m?d(`div`,{className:e.toast,role:`status`,children:m}):null]})}function H({onClose:t,onStarted:n}){let[r,i]=s(``),[c,l]=s(),[u,d]=s(!1),[f,p]=s(),m=k(),h=o(void 0);return a(()=>{if(!m)return;let r=e=>{if(e.requestId!==h.current)return;if(h.current=void 0,d(!1),e.error){l(e.error);return}let r=e.warning?`Codex task started. ${e.warning}`:e.openedInCodex?`Codex task started in the Codex app.`:`Codex task started.`;l(void 0),i(``),n?.(r),t(),p(r)};return m.on(e.result,r),()=>m.off(e.result,r)},[m,t,n]),a(()=>{if(!f)return;let e=setTimeout(()=>p(void 0),L);return()=>clearTimeout(e)},[f]),{error:c,pending:u,prompt:r,setPrompt:i,submit:(t=!1)=>{let n=r.trim();if(!n||u)return;if(!m){l(`The Vite HMR connection is unavailable.`);return}let i=String(++F);h.current=i,l(void 0),d(!0),m.send(e.start,{openInBackground:t,prompt:n,requestId:i})},toast:f}}function U(){let[e,t]=s(null);return a(()=>{let e=!0,n=g(`coreframe-codex-task-launcher`,document.body,{css:N,hostAttributes:{"aria-live":`polite`,id:`coreframe-codex-task-launcher`},hostStyles:{inset:`0`,pointerEvents:`none`,position:`fixed`},zIndex:2147483647});return queueMicrotask(()=>{e&&t(n.container)}),()=>{e=!1,n.host?.remove()}},[]),e}function W(e){if(P!==e){P=e;for(let e of I)e()}}function G(e){return I.add(e),()=>I.delete(e)}function K(){return P}function q(){return!1}export{O as a,M as i,V as n,D as o,R as r,g as s,z as t};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{a as e,i as t,n,o as r}from"../codex-task-launcher.js";import{cloneElement as
|
|
1
|
+
import{a as e,i as t,n,o as r,s as i}from"../codex-task-launcher.js";import{cloneElement as a,isValidElement as o,useCallback as s,useEffect as c,useRef as l,useState as u,useSyncExternalStore as d}from"react";import{createPortal as f}from"react-dom";import{Fragment as p,jsx as m,jsxs as h}from"react/jsx-runtime";import{SpinnerInline as g}from"@agilek/cli-loaders";import{developmentControlsEvents as _}from"@coreframe/dev-contracts/development-controls";import{managedDevEvents as v}from"@coreframe/dev-contracts/managed-dev"
|
|
2
2
|
/**
|
|
3
3
|
* @license lucide-react v1.24.0 - ISC
|
|
4
4
|
*
|
|
5
5
|
* This source code is licensed under the ISC license.
|
|
6
6
|
* See the LICENSE file in the root directory of this source tree.
|
|
7
7
|
*/
|
|
8
|
-
;const
|
|
8
|
+
;const y=r(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),b=r(`bug`,[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]),x=r(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),S=r(`circle-off`,[[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M8.35 2.69A10 10 0 0 1 21.3 15.65`,key:`1pfsoa`}],[`path`,{d:`M19.08 19.08A10 10 0 1 1 4.92 4.92`,key:`1ablyi`}]]),C=r(`circle-pause`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`10`,x2:`10`,y1:`15`,y2:`9`,key:`c1nkhi`}],[`line`,{x1:`14`,x2:`14`,y1:`15`,y2:`9`,key:`h65svq`}]]),ee=r(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),te=r(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),w=r(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),T=r(`ellipsis-vertical`,[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`5`,r:`1`,key:`gxeob9`}],[`circle`,{cx:`12`,cy:`19`,r:`1`,key:`lyex9k`}]]),ne=r(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),E=r(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]),D=r(`package`,[[`path`,{d:`M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z`,key:`1a0edw`}],[`path`,{d:`M12 22V12`,key:`d0xqtd`}],[`polyline`,{points:`3.29 7 12 12 20.71 7`,key:`ousv84`}],[`path`,{d:`m7.5 4.27 9 5.15`,key:`1c824w`}]]),O=r(`refresh-cw`,[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`,key:`v9h5vc`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`,key:`3uifl3`}],[`path`,{d:`M8 16H3v5`,key:`1cv678`}]]),k=r(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),A=r(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),j=r(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]])
|
|
9
9
|
/**
|
|
10
10
|
* @license lucide-react v1.24.0 - ISC
|
|
11
11
|
*
|
|
@@ -96,7 +96,8 @@ import{a as e,i as t,n,o as r}from"../codex-task-launcher.js";import{cloneElemen
|
|
|
96
96
|
* This source code is licensed under the ISC license.
|
|
97
97
|
* See the LICENSE file in the root directory of this source tree.
|
|
98
98
|
*/
|
|
99
|
-
;function P(){return import.meta.hot}function F(){return import.meta.hot}var I={actionError:`actionError`,actions:`actions`,actionSuccess:`actionSuccess`,button:`button`,checkbox:`checkbox`,checkCommand:`checkCommand`,checkFailure:`checkFailure`,checkGuidance:`checkGuidance`,codexActions:`codexActions`,codexButton:`codexButton`,codexError:`codexError`,codexForm:`codexForm`,codexHint:`codexHint`,codexHistoryList:`codexHistoryList`,codexHistorySummary:`codexHistorySummary`,codexMessage:`codexMessage`,codexMessageAge:`codexMessageAge`,codexMessageAgent:`codexMessageAgent`,codexMessageHeader:`codexMessageHeader`,codexMessageLabel:`codexMessageLabel`,codexMessageText:`codexMessageText`,codexMessageThought:`codexMessageThought`,codexMessageUser:`codexMessageUser`,codexOutput:`codexOutput`,codexPrimary:`codexPrimary`,codexPrompt:`codexPrompt`,codexToast:`codexToast`,codexTranscript:`codexTranscript`,codexWaiting:`codexWaiting`,codexWorking:`codexWorking`,codexWorkingSpinner:`codexWorkingSpinner`,content:`content`,debugFooter:`debugFooter`,developmentControls:`developmentControls`,developmentControlsDropdown:`developmentControlsDropdown`,dialog:`dialog`,drawerBody:`drawerBody`,errorIcon:`errorIcon`,errorMessage:`errorMessage`,filePath:`filePath`,files:`files`,header:`header`,headerActions:`headerActions`,iconButton:`iconButton`,iconOnly:`iconOnly`,indicatorButton:`indicatorButton`,indicatorDot:`indicatorDot`,message:`message`,paragraph:`paragraph`,pendingCommits:`pendingCommits`,primary:`primary`,radiate:`radiate`,rebaseProgress:`rebaseProgress`,rebaseProgressFill:`rebaseProgressFill`,rebaseProgressLabel:`rebaseProgressLabel`,rebaseProgressTrack:`rebaseProgressTrack`,scenarioButton:`scenarioButton`,scenarioDescription:`scenarioDescription`,scenarioLabel:`scenarioLabel`,scenarioList:`scenarioList`,section:`section`,sectionDescription:`sectionDescription`,sectionHeading:`sectionHeading`,sectionLink:`sectionLink`,sectionTitle:`sectionTitle`,setupFailure:`setupFailure`,successIcon:`successIcon`,surface:`surface`,title:`title`,titleIcon:`titleIcon`,warning:`warning`};const L=`${f}\n${y}\n[data-isolet-root]{--overlay-font-body:"SN Pro Variable", system-ui, sans-serif;--overlay-font-monospace:"Google Sans Code Variable", ui-monospace, monospace;color-scheme:light dark;--oc-white:#fff;--oc-gray-0:#f8f9fa;--oc-gray-1:#f1f3f5;--oc-gray-2:#e9ecef;--oc-gray-3:#dee2e6;--oc-gray-4:#ced4da;--oc-gray-5:#adb5bd;--oc-gray-6:#868e96;--oc-gray-7:#495057;--oc-gray-8:#343a40;--oc-gray-9:#212529;--oc-red-0:#fff5f5;--oc-red-2:#ffc9c9;--oc-red-7:#f03e3e;--oc-red-9:#c92a2a;--oc-grape-0:#f8f0fc;--oc-grape-2:#eebefa;--oc-grape-7:#ae3ec9;--oc-grape-9:#862e9c;--oc-blue-0:#e7f5ff;--oc-blue-2:#a5d8ff;--oc-blue-4:#4dabf7;--oc-blue-6:#228be6;--oc-blue-7:#1c7ed6;--oc-blue-9:#1864ab;--oc-green-0:#ebfbee;--oc-green-2:#b2f2bb;--oc-green-7:#37b24d;--oc-green-9:#2b8a3e;--oc-yellow-0:#fff9db;--oc-yellow-2:#ffec99;--oc-yellow-7:#f59f00;--oc-yellow-9:#e67700;--overlay-background:var(--oc-white);--overlay-surface-subtle:var(--oc-gray-0);--overlay-surface-muted:var(--oc-gray-1);--overlay-border:var(--oc-gray-3);--overlay-border-strong:var(--oc-gray-4);--overlay-text:var(--oc-gray-9);--overlay-text-muted:var(--oc-gray-7);--overlay-text-subtle:var(--oc-gray-6);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:var(--oc-blue-0);--overlay-accent-border:var(--oc-blue-2);--overlay-accent-text:var(--oc-blue-9);--overlay-thought-soft:var(--oc-grape-0);--overlay-thought-border:var(--oc-grape-2);--overlay-thought-text:var(--oc-grape-9);--overlay-success-soft:var(--oc-green-0);--overlay-success-border:var(--oc-green-2);--overlay-success-text:var(--oc-green-9);--overlay-warning-soft:var(--oc-yellow-0);--overlay-warning-border:var(--oc-yellow-2);--overlay-warning-text:var(--oc-yellow-9);--overlay-danger-soft:var(--oc-red-0);--overlay-danger-border:var(--oc-red-2);--overlay-danger-text:var(--oc-red-9);color:var(--overlay-text);font:14px/1.45 var(--overlay-font-body)}.surface{--managed-dev-bottom-offset:0px;--managed-dev-right-offset:0px}.indicatorButton{appearance:none;bottom:calc(10px + env(safe-area-inset-bottom,0px) + var(--managed-dev-bottom-offset));cursor:pointer;pointer-events:auto;height:44px;right:calc(10px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset));background:0 0;border:0;justify-content:center;align-items:center;width:44px;padding:0;display:flex;position:fixed}.indicatorButton:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:-3px}.indicatorDot{background:var(--managed-dev-indicator-color);box-shadow:inset 0 0 0 .5px color-mix(in srgb, var(--overlay-border) 30%, transparent);height:var(--managed-dev-indicator-size);width:var(--managed-dev-indicator-size);border-radius:50%;display:block;position:relative}.indicatorDot:before{border:max(1px, calc(var(--managed-dev-indicator-size) / 9)) solid var(--managed-dev-indicator-color);border-radius:inherit;content:"";animation:1.8s ease-out infinite radiate;position:absolute;inset:0}.dialog{background:var(--overlay-background);border:1px solid var(--overlay-border);box-shadow:0 18px 60px color-mix(in srgb, var(--oc-gray-9) 28%, transparent), 0 2px 8px color-mix(in srgb, var(--oc-gray-9) 12%, transparent);color:var(--overlay-text);box-sizing:border-box;height:auto;bottom:20px;left:unset;overscroll-behavior:contain;pointer-events:auto;border-radius:12px;width:min(520px,100vw - 18px);max-width:min(520px,100vw - 18px);max-height:none;margin:0;padding:12px 18px;position:fixed;right:20px;overflow:hidden}.dialog[open]{flex-direction:column;gap:12px;display:flex}.drawerBody{align-content:start;gap:16px;min-height:80px;display:grid;overflow:auto}.header{justify-content:space-between;align-items:center;gap:12px;display:flex}.headerActions{align-items:center;display:flex}.developmentControlsDropdown{display:flex;position:relative}.title{align-items:center;gap:8px;margin:0;font-size:16px;display:flex}.titleIcon{color:var(--overlay-accent);flex:none}.iconButton{color:inherit;cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;min-width:32px;min-height:32px;padding:4px;display:inline-flex}.iconButton:hover{background:var(--overlay-surface-muted);border-radius:8px}.iconButton:focus-visible,.scenarioButton:focus-visible,.sectionLink:focus-visible,.button:focus-visible,.message:focus-visible,.codexButton:focus-visible,.codexPrompt:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:2px}.content{gap:12px;display:grid}.section{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);border-radius:12px;gap:12px;padding:14px;display:grid}.sectionHeading{justify-content:space-between;align-items:start;gap:12px;display:flex}.sectionTitle{margin:0;font-size:13px}.sectionDescription{color:var(--overlay-text-muted);margin:3px 0 0;font-size:12px}.sectionLink{color:var(--overlay-accent-text);cursor:pointer;font:inherit;background:0 0;border:0;padding:2px;font-size:12px}.debugFooter{background:var(--overlay-thought-soft);border-top:.5px solid var(--overlay-thought-border);color:var(--overlay-thought-text);flex:none;margin:0 -18px -12px;padding:4px 18px;font-size:11px;line-height:1.3}.scenarioList{gap:7px;max-height:min(480px,100dvh - 210px);display:grid;overflow:auto}.scenarioButton{background:var(--overlay-surface-subtle);color:inherit;cursor:pointer;font:inherit;text-align:start;border:1px solid #0000;border-radius:10px;gap:3px;padding:10px;display:grid}.scenarioButton:hover{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.scenarioLabel{font-weight:650}.scenarioDescription{color:var(--overlay-text-muted);font-size:12px}.paragraph{margin:0}.pendingCommits{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);box-sizing:border-box;font:12px/1.5 var(--overlay-font-monospace);white-space:pre-wrap;border-radius:10px;margin:0;padding:10px;overflow:auto}.codexOutput{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);box-sizing:border-box;font:12px/1.5 var(--overlay-font-monospace);white-space:pre-wrap;word-break:break-word;border-radius:10px;max-height:280px;margin:0;padding:10px;overflow:auto}.codexForm{gap:12px;display:grid}.codexPrompt{background:var(--overlay-background);border:1px solid var(--overlay-border-strong);box-sizing:border-box;color:inherit;font:inherit;resize:vertical;border-radius:10px;width:100%;min-height:130px;padding:10px 12px}.codexHint{color:var(--overlay-text-subtle);margin:0;font-size:12px}.codexError{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:9px;margin:0;padding:8px 10px}.codexActions{flex-wrap:wrap;justify-content:end;gap:8px;display:flex}.codexButton{border:1px solid var(--overlay-border-strong);color:inherit;cursor:pointer;font:inherit;background:0 0;border-radius:999px;justify-content:center;align-items:center;min-height:36px;padding:7px 11px;display:inline-flex}.codexButton:hover:not(:disabled){background:var(--overlay-surface-muted)}.codexPrimary{background:var(--overlay-accent);border-color:var(--overlay-accent);color:var(--oc-white)}.codexPrimary:hover:not(:disabled){background:var(--overlay-accent-hover);border-color:var(--overlay-accent-hover)}.codexButton:disabled{cursor:wait;opacity:.55}.codexToast{color:var(--overlay-success-text);font-size:12px}.codexWorking{color:var(--overlay-text-muted);font:12px/1.5 var(--overlay-font-monospace)}.codexWorkingSpinner{color:var(--overlay-accent)}.codexTranscript{gap:10px;max-height:360px;display:grid;overflow:auto}.codexMessage{border:1px solid #0000;border-radius:10px;gap:5px;padding:10px;display:grid}.codexMessageUser{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.codexMessageThought{background:var(--overlay-thought-soft);border-color:var(--overlay-thought-border)}.codexMessageAgent{background:var(--overlay-success-soft);border-color:var(--overlay-success-border)}.codexMessageHeader{justify-content:space-between;align-items:baseline;gap:8px;display:flex}.codexMessageLabel{color:var(--overlay-text-muted);letter-spacing:.04em;text-transform:uppercase;margin:0;font-size:11px;font-weight:650}.codexMessageAge{color:var(--overlay-text-subtle);white-space:nowrap;font-size:11px}.codexMessageText,.codexWaiting{font:12px/1.5 var(--overlay-font-monospace);white-space:pre-wrap;word-break:break-word;margin:0}.codexWaiting{color:var(--overlay-text-subtle)}.rebaseProgress{gap:8px;display:grid}.rebaseProgressLabel{color:var(--overlay-text-muted);justify-content:space-between;align-items:baseline;font-size:12px;display:flex}.rebaseProgressLabel strong{color:var(--overlay-success-text)}.rebaseProgressTrack{background:var(--overlay-surface-muted);border-radius:999px;height:6px;overflow:hidden}.rebaseProgressFill{background:var(--overlay-success-text);border-radius:inherit;height:100%;transition:width .18s;display:block}.codexHistorySummary{cursor:pointer;font-size:12px;font-weight:600}.codexHistoryList{gap:8px;padding-top:8px;display:grid}.files{gap:7px;max-height:190px;display:grid;overflow:auto}.checkbox{overflow-wrap:anywhere;align-items:start;gap:8px;display:flex}.checkbox input{accent-color:var(--overlay-accent)}.filePath{font-family:var(--overlay-font-monospace)}.message{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border-strong);box-sizing:border-box;color:var(--overlay-text);font-family:var(--overlay-font-monospace);resize:vertical;border-radius:10px;width:100%;min-height:92px;padding:10px}.actions{flex-wrap:wrap;justify-content:end;gap:8px;display:flex}.developmentControls{background:var(--overlay-background);border:1px solid var(--overlay-border);box-shadow:0 10px 30px color-mix(in srgb, var(--oc-gray-9) 18%, transparent);box-sizing:border-box;z-index:1;border-radius:10px;gap:4px;min-width:170px;max-width:calc(100vw - 32px);margin:0;padding:4px;display:grid;position:absolute;top:calc(100% + 6px);right:0}.developmentControls .actions{justify-content:stretch;align-items:stretch;gap:0;width:100%;display:grid}.developmentControls .button{text-align:start;white-space:nowrap;justify-content:start;justify-self:stretch;width:100%;min-height:32px}.button{border:1px solid var(--overlay-border-strong);cursor:pointer;font:inherit;background:0 0;border-radius:999px;justify-content:center;align-items:center;gap:6px;padding:7px 11px;transition:opacity .14s;display:inline-flex}.button:hover:not(:disabled){background:var(--overlay-surface-muted)}.primary{background:var(--overlay-accent);border-color:var(--overlay-accent);color:var(--oc-white)}.primary:hover:not(:disabled){background:var(--overlay-accent-hover);border-color:var(--overlay-accent-hover)}.developmentControls .button{color:inherit;background:0 0;border:0}.developmentControls .button:hover:not(:disabled){background:var(--overlay-surface-muted)}.button:disabled{cursor:wait;opacity:.55}.iconOnly{box-sizing:border-box;flex:0 0 32px;width:32px;min-width:32px;height:32px;padding:7px}.warning{color:var(--overlay-warning-text);white-space:pre-wrap}.checkFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.checkCommand{font-family:var(--overlay-font-monospace);margin:0;font-weight:600}.checkGuidance{margin:3px 0 0;font-size:12px}.setupFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.actionError{background:var(--overlay-warning-soft);border:1px solid var(--overlay-warning-border);color:var(--overlay-warning-text);white-space:pre-wrap;border-radius:10px;gap:10px;padding:10px;display:grid}.errorMessage{grid-template-columns:auto 1fr;align-items:start;gap:8px;display:grid}.actionSuccess{background:var(--overlay-success-soft);border:1px solid var(--overlay-success-border);color:var(--overlay-success-text);border-radius:10px;grid-template-columns:auto 1fr;align-items:start;gap:8px;padding:10px;display:grid}.errorIcon,.successIcon{margin-top:1px}@media (prefers-color-scheme:dark){[data-isolet-root]{--overlay-background:var(--oc-gray-9);--overlay-surface-subtle:var(--oc-gray-8);--overlay-surface-muted:var(--oc-gray-7);--overlay-border:var(--oc-gray-7);--overlay-border-strong:var(--oc-gray-6);--overlay-text:var(--oc-gray-0);--overlay-text-muted:var(--oc-gray-4);--overlay-text-subtle:var(--oc-gray-5);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:color-mix(in srgb, var(--oc-blue-9) 32%, var(--overlay-background));--overlay-accent-border:var(--oc-blue-7);--overlay-accent-text:var(--oc-blue-2);--overlay-thought-soft:color-mix(in srgb, var(--oc-grape-9) 30%, var(--overlay-background));--overlay-thought-border:var(--oc-grape-7);--overlay-thought-text:var(--oc-grape-2);--overlay-success-soft:color-mix(in srgb, var(--oc-green-9) 30%, var(--overlay-background));--overlay-success-border:var(--oc-green-7);--overlay-success-text:var(--oc-green-2);--overlay-warning-soft:color-mix(in srgb, var(--oc-yellow-9) 24%, var(--overlay-background));--overlay-warning-border:var(--oc-yellow-7);--overlay-warning-text:var(--oc-yellow-2);--overlay-danger-soft:color-mix(in srgb, var(--oc-red-9) 30%, var(--overlay-background));--overlay-danger-border:var(--oc-red-7);--overlay-danger-text:var(--oc-red-2)}}@keyframes radiate{0%{opacity:.75;transform:scale(1)}to{opacity:0;transform:scale(2.4)}}@media (width<=600px){.dialog{max-width:none;padding:calc(16px + env(safe-area-inset-top,0px)) calc(16px + env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px));border-radius:0;width:auto;inset:0}.debugFooter{margin:0 calc(-16px - env(safe-area-inset-right,0px)) calc(-16px - env(safe-area-inset-bottom,0px)) calc(-16px - env(safe-area-inset-left,0px));padding:4px calc(16px + env(safe-area-inset-right,0px)) calc(4px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px))}.button,.codexButton{min-height:44px}.checkbox{align-items:center;min-height:44px}.iconButton{min-width:44px;min-height:44px}.iconOnly{flex-basis:44px;width:44px;min-width:44px;height:44px}}@media (prefers-reduced-motion:reduce){.indicatorDot:before{opacity:.45;animation:none;transform:scale(1.65)}}
|
|
100
|
-
`;let R=!1,z=0,B=0;const V=new Set;let H=!1;const U=new Set,ne=[{description:`A clean managed checkout with no available updates.`,id:`idle`,label:`No updates`,status:{mode:`managed`,warnings:[]}},{description:`Tracked and untracked files awaiting review.`,id:`local-changes`,label:`Review local changes`,status:{draft:{fingerprint:`debug-local-changes`,tracked:!0,untracked:[`src/web/new-feature.tsx`,`src/web/new-feature.style.ts`]},mode:`managed`,warnings:[]}},{description:`Local changes with a proposed Conventional Commit message.`,id:`confirm-commit`,label:`Confirm commit`,status:{draft:{fingerprint:`debug-confirm-commit`,tracked:!0,untracked:[`src/web/new-feature.tsx`]},mode:`managed`,proposal:`feat: add the new feature`,warnings:[]}},{description:`A newer commit is available from the local dev branch.`,id:`dev-update`,label:`Local dev update`,status:{mode:`managed`,target:{commit:`1234567890abcdef`,commits:[{commit:`fedcba0987654321`,shortCommit:`fedcba098765`,subject:`feat: add managed preview foundations`},{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: update the managed preview`}],shortCommit:`1234567890ab`,source:`dev`,subject:`feat: update the managed preview`},warnings:[]}},{description:`A newer upstream main commit is ready to refresh.`,id:`upstream-update`,label:`Upstream update`,status:{mode:`managed`,target:{commit:`abcdef1234567890`,commits:[{commit:`0123456789abcdef`,shortCommit:`0123456789ab`,subject:`chore: refresh shared dependencies`},{commit:`abcdef1234567890`,shortCommit:`abcdef123456`,subject:`fix: update shared project defaults`}],shortCommit:`abcdef123456`,source:`upstream`,subject:`fix: update shared project defaults`},warnings:[]}},{description:`The accepted update is currently being integrated.`,id:`busy`,label:`Busy integration`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{description:`Managed development is paused until the checkout returns to main.`,id:`paused`,label:`Paused checkout`,status:{message:`Managed synchronization is paused until the primary checkout is back on local main.`,mode:`waiting`,warnings:[]}},{description:`Managed development cannot run from the current checkout.`,id:`unavailable`,label:`Unavailable checkout`,status:{message:`Managed development only runs from the primary checkout.`,mode:`unmanaged`,warnings:[]}},{description:`A managed-development warning requiring attention.`,id:`warning`,label:`Warning`,status:{mode:`managed`,warnings:[`The remote update could not be checked. The last known project state is shown.`]}},{description:`Typechecking failed after synchronization.`,id:`failed-check`,label:`Failed check`,status:{checks:{commit:`1234567890abcdef`,commands:[{command:`pnpm typecheck`,failureId:`debug-typecheck-failure`,output:`src/web/feature.tsx(12,4): error TS2322: Type mismatch.`,status:`failed`},{command:`pnpm test`,status:`passed`}],trigger:`synchronization`},mode:`managed`,warnings:[]}},{description:`Dependency installation failed after synchronization.`,id:`dependency-failure`,label:`Dependency failure`,status:{mode:`managed`,setupFailure:{command:`pnpm install --frozen-lockfile`,commit:`1234567890abcdef`,message:`The project was synchronized, but dependency installation failed. Fix the package or lockfile issue, then retry the install.`,output:`ERR_PNPM_OUTDATED_LOCKFILE Cannot install with a frozen lockfile.`,restartRequired:!0,stage:`dependencies`},warnings:[]}},{description:`Database migration failed and can be reset.`,id:`migration-failure`,label:`Database failure`,status:{mode:`managed`,setupFailure:{command:`pnpm db migrate`,commit:`1234567890abcdef`,message:`The project was synchronized, but its database migration failed. The previous database was restored.`,output:`Migration 0012_add_project_state failed: duplicate column name.`,restartRequired:!1,stage:`migration`},warnings:[]}},{codex:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Inspecting the conflicting layout changes.`},{kind:`thought`,text:`Preserving the behavior introduced on both branches.`}],phase:`running`,requestId:`debug-codex-running`,totalCommits:4},description:`Codex is resolving conflicts with previous thoughts collapsed.`,id:`codex-running`,label:`Codex reasoning`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{codex:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Preserving the behavior introduced on both branches.`},{kind:`agent`,text:`Resolved root.tsx while preserving both the command layer and overlay mounting.`}],phase:`complete`,requestId:`debug-codex-message`,totalCommits:1},description:`Codex has produced its final message while synchronization finishes.`,id:`codex-message`,label:`Codex response`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{codex:{commits:[],messages:[{kind:`user`,text:`Resolve the current Git merge conflicts in src/web/root.tsx.`},{kind:`thought`,text:`The conflict could not be resolved safely.`}],phase:`error`,requestId:`debug-codex-error`},description:`The Codex-assisted conflict resolution failed.`,error:`Codex could not resolve the merge conflicts.`,id:`codex-error`,label:`Codex failure`,status:{mode:`managed`,warnings:[]}},{description:`A durable Codex completion waiting for acknowledgment.`,id:`codex-finished`,label:`Codex finished`,status:{codexCompletion:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],finalMessage:`Resolved root.tsx while preserving both the command layer and overlay mounting.`,id:`debug-completion`,messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Inspecting the conflicting layout changes.`},{kind:`agent`,text:`Resolved root.tsx while preserving both the command layer and overlay mounting.`}],totalCommits:1},mode:`managed`,warnings:[]}},{description:`A successful synchronization result before it auto-dismisses.`,id:`success`,label:`Refresh success`,status:{mode:`managed`,warnings:[]},success:{heading:`Refresh complete`,message:`Your project is up to date.`}}],re=[`codex-running`,`codex-finished`,`codex-message`,`codex-error`,`migration-failure`,`dependency-failure`,`failed-check`,`confirm-commit`,`local-changes`,`upstream-update`,`dev-update`,`busy`,`warning`,`paused`,`unavailable`,`success`,`idle`].map(e=>{let t=ne.find(t=>t.id===e);if(!t)throw Error(`Missing managed dev debug scenario: ${e}`);return t});function ie(){W(!R)}function ae(){G(!0),W(!0)}function W(e){if(R!==e){R=e;for(let e of V)e()}}function G(e){if(H!==e){H=e;for(let e of U)e()}}function oe({bottomOffset:e,codexEnabled:t=!1,debug:n=!1,indicator:r,rightOffset:i}){return n?m(le,{bottomOffset:e,indicator:r,rightOffset:i}):m(se,{bottomOffset:e,codexEnabled:t,indicator:r,rightOffset:i})}function se({bottomOffset:e,codexEnabled:t=!1,indicator:n,rightOffset:r}){let{act:o,checkFailure:c,codex:l,dismissCheckFailure:d,dismissError:f,dismissSuccess:p,error:h,status:g,success:_}=Ae(),v=Oe(),y=u(Me,Fe,Ie);s(()=>{if(!_)return;let e=setTimeout(()=>{p(),W(!1)},1600);return()=>clearTimeout(e)},[p,_]);let b=n??m(q,{}),x=a(b)&&b.type===q?i(b,{paused:!g?.target}):b;return m(ce,{bottomOffset:e,indicator:$(g,c)||t?x:null,rightOffset:r,children:m(fe,{act:o,checkFailure:c,codex:l,codexEnabled:t,codexPromptOpen:y,developmentControls:v,dismissCheckFailure:d,dismissError:f,error:h,onClose:()=>{g?.codexCompletion&&o({id:g.codexCompletion.id,type:`acknowledge-codex`}),G(!1),W(!1)},onCloseCodex:()=>G(!1),onOpenCodex:ae,status:g,success:_})})}function ce({bottomOffset:e,children:t,indicator:n,openOnMount:i=!1,rightOffset:a}){let[o,c]=l(null),f=u(je,Ne,Pe);s(()=>{i&&W(!0);let e=!0,t=r(`coreframe-managed-dev`,document.body,{css:L,hostAttributes:{"aria-live":`polite`,id:`coreframe-managed-dev`},hostStyles:{inset:`0`,pointerEvents:`none`,position:`fixed`},zIndex:2147483647});return queueMicrotask(()=>{e&&c(t.container)}),()=>{e=!1,t.host?.remove()}},[i]);let p={"--managed-dev-bottom-offset":ue(e),"--managed-dev-right-offset":ue(a)};return o?d(h(`div`,{className:I.surface,style:p,children:[n,f?t:null]}),o):null}function le({bottomOffset:e,indicator:t,rightOffset:n}){let[r,o]=l(),[s,c]=l(),[u,d]=l(),f=ne.find(({id:e})=>e===r),p=e=>{o(e),c(void 0),d(void 0)},h=async e=>{if(e.type===`acknowledge-codex`){p(void 0);return}d(ke(e))},g=t??m(q,{}),_={pending:!1,reloadPage:()=>c(`Page reload simulated.`),restartVite:()=>c(`Vite restart simulated.`),success:s};return m(ce,{bottomOffset:e,indicator:a(g)&&g.type===q?i(g,{paused:f?.status.mode===`waiting`}):g,openOnMount:!0,rightOffset:n,children:f?m(fe,{act:h,checkFailure:Q(f.status),codex:f.codex,codexEnabled:!1,codexPromptOpen:!1,developmentControls:_,dismissCheckFailure:()=>void 0,dismissError:()=>void 0,error:f.error,onBack:()=>p(void 0),onClose:()=>W(!1),onCloseCodex:()=>void 0,onOpenCodex:()=>void 0,status:f.status,success:u??f.success},f.id):m(de,{developmentControls:_,onClose:()=>W(!1),onSelect:e=>p(e)})})}function ue(e){return typeof e==`number`?`${e}px`:e??`0px`}function de({developmentControls:e,onClose:t,onSelect:n}){return m(K,{debug:!0,developmentControls:e,icon:x,onClose:t,title:`Managed dev overlay scenarios`,children:m(`div`,{className:I.scenarioList,children:re.map(e=>h(`button`,{className:I.scenarioButton,onClick:()=>n(e.id),type:`button`,children:[m(`span`,{className:I.scenarioLabel,children:e.label}),m(`span`,{className:I.scenarioDescription,children:e.description})]},e.id))})})}function K({children:e,debug:n=!1,developmentControls:r,icon:i,onBack:a,onClose:o,title:u}){let d=c(null),f=c(null),[p,g]=l(!1);return s(()=>{let e=e=>{let t=e.composedPath(),n=f.current;n&&!t.includes(n)&&g(!1);let r=d.current;r&&!t.includes(r)&&o()},t=e=>{e.key===`Escape`&&(e.preventDefault(),o())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[o]),h(`dialog`,{"aria-labelledby":`coreframe-managed-title`,"aria-modal":`true`,className:I.dialog,id:`coreframe-managed-dev-dialog`,open:!0,ref:d,children:[h(`div`,{className:I.header,children:[h(`h2`,{className:I.title,id:`coreframe-managed-title`,children:[m(i,{"aria-hidden":`true`,className:I.titleIcon,size:18}),u]}),h(`div`,{className:I.headerActions,children:[a?m(`button`,{"aria-label":`Back to scenarios`,className:I.iconButton,onClick:a,type:`button`,children:m(b,{"aria-hidden":`true`,size:18})}):null,r?h(`div`,{className:I.developmentControlsDropdown,ref:f,children:[m(`button`,{"aria-expanded":p,"aria-haspopup":`menu`,"aria-label":`Development controls`,className:I.iconButton,onClick:()=>g(e=>!e),type:`button`,children:m(D,{"aria-hidden":`true`,size:18})}),p?m(pe,{controls:r}):null]}):null,m(`button`,{"aria-label":`Close managed development`,className:I.iconButton,onClick:o,type:`button`,children:m(t,{"aria-hidden":`true`,size:18})})]})]}),m(`div`,{className:I.drawerBody,children:e}),n?m(`footer`,{className:I.debugFooter,children:`Debug preview · project actions are simulated locally`}):null]})}function q({color:e=`#228be6`,paused:t=!1,size:n=14,warningColor:r=`#fd7e14`}){let i=u(je,Ne,Pe),a={"--managed-dev-indicator-color":t?r:e,"--managed-dev-indicator-size":typeof n==`number`?`${n}px`:n};return m(`button`,{"aria-controls":`coreframe-managed-dev-dialog`,"aria-expanded":i,"aria-label":`${i?`Hide`:`Show`} Coreframe managed development`,className:I.indicatorButton,onClick:ie,style:a,type:`button`,children:m(`span`,{className:I.indicatorDot})})}function fe({act:e,checkFailure:n,codex:r,codexEnabled:i,codexPromptOpen:a,developmentControls:o,dismissCheckFailure:u,dismissError:d,error:f,onBack:g,onClose:_,onCloseCodex:v,onOpenCodex:y,status:b,success:x}){let[C,w]=l({value:``}),[T,E]=l(()=>({paths:new Set})),D=c(null),[O,k]=l(),P=b?.codexCompletion,F=b?.draft,L=b?.target,R=!P&&!x&&!r,z=T.fingerprint===F?.fingerprint?T.paths:new Set(F?.untracked??[]),B=C.fingerprint===F?.fingerprint&&C.proposal===b?.proposal?C.value:b?.proposal??``,V=!!(F?.untracked.length&&F.untracked.every(e=>z.has(e)));return s(()=>{let e=D.current;e&&r?.phase===`running`&&(e.scrollTop=e.scrollHeight)},[r]),n?h(K,{debug:!!g,developmentControls:o,icon:N,onBack:g,onClose:_,title:`Managed development check failed`,children:[h(`div`,{className:I.content,children:[m(`div`,{className:I.checkFailure,role:`alert`,children:h(`div`,{className:I.checkMessage,children:[h(`p`,{className:I.checkCommand,children:[n.check.command,` failed`]}),m(`p`,{className:I.checkGuidance,children:Te(n)}),m(`p`,{className:I.checkGuidance,children:`Copy the output and paste it into your agent orchestration tool.`})]})}),h(Y,{children:[m(Z,{ariaLabel:`Dismiss error`,icon:t,iconOnly:!0,onClick:()=>u(n),children:`Dismiss`}),m(Z,{ariaLabel:`Copy output for ${n.check.command}`,icon:ee,iconOnly:!0,onClick:()=>void navigator.clipboard.writeText(n.check.output??``),children:`Copy output`})]})]}),m(me,{enabled:i,notice:O,onClose:v,onOpen:y,open:a,onStarted:k})]}):h(K,{debug:!!g,developmentControls:o,icon:Se({codex:r,completion:P,status:b,success:x}),onBack:g,onClose:_,title:P?`Codex conflict resolution finished`:x?.heading??(r?.phase===`complete`?`Finishing synchronization…`:r?.phase===`error`?`Conflict resolution failed.`:r?`Resolving conflicts with Codex…`:xe(b)),children:[h(`div`,{className:I.content,children:[x&&!P?h(`div`,{className:I.actionSuccess,role:`status`,children:[m(S,{"aria-hidden":`true`,className:I.successIcon,size:18}),m(`p`,{className:I.paragraph,children:x.message})]}):null,f?h(p,{children:[m(`div`,{className:I.actionError,role:`alert`,children:m(X,{children:f})}),m(Y,{children:m(Z,{ariaLabel:`Dismiss error`,icon:t,iconOnly:!0,onClick:d,children:`Dismiss`})})]}):null,P||!x&&r?m(he,{commits:P?.commits??r?.commits??[],completion:P,messages:P?.messages??r?.messages??[],outputRef:D,totalCommits:P?.totalCommits??r?.totalCommits,working:r?.phase===`running`}):R&&b?.setupFailure?h(p,{children:[h(`div`,{className:I.setupFailure,role:`alert`,children:[m(X,{children:b.setupFailure.message}),m(`pre`,{className:I.codexOutput,children:b.setupFailure.output})]}),h(Y,{children:[m(Z,{ariaLabel:`Dismiss error`,icon:t,iconOnly:!0,onClick:_,children:`Dismiss`}),m(Z,{ariaLabel:`Copy diagnostics`,busy:b.busy,icon:ee,iconOnly:!0,onClick:()=>void navigator.clipboard.writeText(De(b.setupFailure)),children:`Copy diagnostics`}),b.setupFailure.stage===`dependencies`?m(Z,{ariaLabel:`Retry install`,busy:b.busy,icon:A,iconOnly:!0,onClick:()=>void e({type:`retry-install`}),primary:!0,children:`Retry install`}):m(Z,{busy:b.busy,icon:j,onClick:()=>{window.confirm(`Reset the local database? This permanently deletes its current data, then reapplies migrations and seed scripts.`)&&e({type:`reset-database`})},primary:!0,children:`Reset database`})]})]}):R?m(`p`,{className:I.paragraph,children:b?b.busy||b.message||Ce(b):`Checking managed development status…`}):null,P&&!f?m(Y,{children:m(Z,{busy:b?.busy,icon:S,onClick:()=>void e({id:P.id,type:`acknowledge-codex`}),primary:!0,children:`Continue`})}):null,R&&b?.mode===`waiting`&&b.message?h(`p`,{className:I.paragraph,children:[`To re-enable managed development, run `,m(`code`,{children:`git switch main`}),` in the primary checkout. Synchronization will resume automatically.`]}):null,R&&L&&!F?m(`pre`,{className:I.pendingCommits,children:(L.commits??[L]).map(e=>`${e.shortCommit} ${e.subject}`).join(`
|
|
101
|
-
`)}):null,R?b?.warnings.map((e,t)=>m(`p`,{className:`${I.paragraph} ${I.warning}`,children:e},`${t}-${e}`)):null,R&&F?h(p,{children:[h(`div`,{className:I.files,children:[F.untracked.map(e=>m(be,{checked:z.has(e),label:m(`span`,{className:I.filePath,children:e}),onChange:t=>E(()=>{let n=new Set(z);return t?n.add(e):n.delete(e),{fingerprint:F.fingerprint,paths:n}})},e)),F.untracked.length>0?m(be,{checked:V,label:`Include all untracked files`,onChange:e=>E({fingerprint:F.fingerprint,paths:e?new Set(F.untracked):new Set})}):null]}),b.proposal===void 0?h(Y,{children:[L?m(Z,{busy:b.busy,icon:j,onClick:()=>void e({type:`reject`}),children:`Reject`}):null,m(Z,{busy:b.busy,icon:M,onClick:()=>void e({type:`message`,fingerprint:F.fingerprint,untracked:[...z]}),primary:!0,children:`Generate commit message`})]}):h(p,{children:[m(`textarea`,{"aria-label":`Commit message`,className:I.message,onChange:e=>w({fingerprint:F.fingerprint,proposal:b.proposal,value:e.target.value}),value:B}),h(Y,{children:[L?m(Z,{busy:b.busy,icon:j,onClick:()=>void e({type:`reject`}),children:`Reject`}):null,m(Z,{busy:b.busy,icon:te,onClick:()=>{e(L?{type:`apply`,target:L.commit,fingerprint:F.fingerprint,untracked:[...z],message:B}:{type:`commit`,fingerprint:F.fingerprint,untracked:[...z],message:B})},primary:!0,children:L?`Commit and refresh`:`Commit changes`})]})]})]}):R&&L?m(Y,{children:m(Z,{busy:b.busy,icon:A,onClick:()=>void e({type:`prepare`,target:L.commit}),primary:!0,children:L.source===`upstream`?`Refresh`:String(L.source)===`dev`?`Sync with dev`:`Sync with main`})}):null]}),m(me,{enabled:i,notice:O,onClose:v,onOpen:y,open:a,onStarted:k})]})}function pe({controls:e}){return h(`div`,{"aria-label":`Development controls`,className:I.developmentControls,role:`menu`,children:[h(Y,{children:[m(Z,{immediatelyEnabled:!0,icon:A,onClick:e.reloadPage,role:`menuitem`,children:`Reload page`}),m(Z,{busy:e.pending?`Restarting Vite`:void 0,immediatelyEnabled:!0,icon:j,onClick:e.restartVite,primary:!0,role:`menuitem`,children:e.pending?`Restarting Vite…`:`Restart Vite`})]}),e.error?m(`div`,{className:I.actionError,role:`alert`,children:m(X,{children:`Vite restart failed: ${e.error}`})}):null,e.success?h(`div`,{className:I.actionSuccess,role:`status`,children:[m(S,{"aria-hidden":`true`,className:I.successIcon,size:18}),m(`p`,{className:I.paragraph,children:e.success})]}):null]})}function me({enabled:e,notice:t,onClose:r,onOpen:i,onStarted:a,open:o}){return e?h(`section`,{"aria-labelledby":`coreframe-codex-heading`,className:I.section,children:[h(`div`,{className:I.sectionHeading,children:[h(`div`,{children:[m(`h3`,{className:I.sectionTitle,id:`coreframe-codex-heading`,children:`Codex`}),m(`p`,{className:I.sectionDescription,children:`Start a prompt in the existing Codex task workflow.`})]}),o?m(`button`,{className:I.sectionLink,onClick:r,type:`button`,children:`Close`}):null]}),o?m(n,{classNames:{actions:I.codexActions,button:I.codexButton,error:I.codexError,form:I.codexForm,hint:I.codexHint,primary:I.codexPrimary,prompt:I.codexPrompt,toast:I.codexToast},label:`Codex chat prompt`,onClose:r,onStarted:a,placeholder:`Describe what you want Codex to do…`,showToast:!1}):m(Y,{children:m(Z,{icon:M,onClick:i,primary:!0,children:`New Codex chat`})}),t?h(`div`,{className:I.actionSuccess,role:`status`,children:[m(S,{"aria-hidden":`true`,className:I.successIcon,size:18}),m(`p`,{className:I.paragraph,children:t})]}):null]}):null}function he({commits:e,completion:t,messages:n,outputRef:r,totalCommits:i,working:a}){let o=[...n].reverse().find(e=>e.kind===`user`),s=[...n].reverse().find(e=>e.kind!==`user`),c=t?[...n].reverse().find(e=>e.kind===`agent`&&e.text===t.finalMessage):s,l=n.filter(e=>e.kind!==`user`&&e!==c),u=t?{kind:`agent`,text:t.finalMessage}:s,d=c?`message-${n.lastIndexOf(c)}`:`completion`;return h(p,{children:[a?m(`div`,{className:I.codexWorking,children:m(g,{className:I.codexWorkingSpinner,label:`Codex is resolving conflicts`,children:m(ge,{})})}):null,h(`div`,{"aria-live":t?void 0:`polite`,className:I.codexTranscript,ref:r,role:`log`,children:[o?m(J,{message:o}):null,l.length>0?h(`details`,{children:[h(`summary`,{className:I.codexHistorySummary,children:[`History (`,l.length,`)`]}),m(`div`,{className:I.codexHistoryList,children:l.map((e,t)=>m(J,{message:e},`history-${t}`))})]}):null,u?m(J,{message:u,showAge:!0},d):m(`p`,{className:I.codexWaiting,children:`Waiting for Codex output…`}),i?m(_e,{rebased:e.length,total:i}):null]})]})}function ge(){let e=c(0),[t,n]=l(0);return s(()=>{e.current=Date.now();let t=window.setInterval(()=>{n(Math.floor((Date.now()-e.current)/1e3))},1e3);return()=>window.clearInterval(t)},[]),h(p,{children:[`Working for `,ye(t),`...`]})}function _e({rebased:e,total:t}){let n=Math.min(e,t),r=Math.round(n/t*100);return h(`section`,{"aria-label":`Rebase progress`,className:I.rebaseProgress,children:[h(`div`,{className:I.rebaseProgressLabel,children:[h(`strong`,{children:[r,`% rebased`]}),h(`span`,{children:[n,` of `,t,` commits`]})]}),m(`div`,{"aria-valuemax":t,"aria-valuemin":0,"aria-valuenow":n,className:I.rebaseProgressTrack,role:`progressbar`,children:m(`span`,{className:I.rebaseProgressFill,style:{width:`${r}%`}})})]})}function J({message:e,showAge:t=!1}){let n=e.kind===`user`?`Request`:e.kind===`thought`?`Codex thought`:`Codex`,r=e.kind===`user`?I.codexMessageUser:e.kind===`thought`?I.codexMessageThought:I.codexMessageAgent;return h(`section`,{className:`${I.codexMessage} ${r}`,children:[h(`div`,{className:I.codexMessageHeader,children:[m(`h3`,{className:I.codexMessageLabel,children:n}),t?m(ve,{}):null]}),m(`p`,{className:I.codexMessageText,children:e.text})]})}function ve(){let e=c(0),[t,n]=l(0);return s(()=>{e.current=Date.now();let t=window.setInterval(()=>{n(Math.floor((Date.now()-e.current)/1e3))},1e3);return()=>window.clearInterval(t)},[]),h(`span`,{"aria-hidden":`true`,className:I.codexMessageAge,children:[ye(t),` ago`]})}function ye(e){let t=Math.floor(e/60),n=e%60;return t>0?`${t}m ${n}s`:`${n}s`}function be({checked:e,label:t,onChange:n}){return h(`label`,{className:I.checkbox,children:[m(`input`,{checked:e,onChange:e=>n(e.target.checked),type:`checkbox`}),t]})}function Y({children:e}){return m(`div`,{className:I.actions,children:e})}function X({children:e}){return h(`div`,{className:I.errorMessage,children:[m(N,{"aria-hidden":`true`,className:I.errorIcon,size:18}),m(`p`,{className:I.paragraph,children:e})]})}function Z({ariaLabel:e,busy:t,children:n,icon:r,iconOnly:i=!1,immediatelyEnabled:a=!1,onClick:o,primary:c=!1,role:u}){let[d,f]=l(!a);return s(()=>{if(a)return;let e=window.setTimeout(()=>f(!1),1e3);return()=>window.clearTimeout(e)},[a]),h(`button`,{"aria-label":e,"aria-busy":!!t,className:`${I.button} ${i?I.iconOnly:``} ${c?I.primary:``}`,disabled:d||!!t,onClick:o,role:u,title:i?e:void 0,type:`button`,children:[r?m(r,{"aria-hidden":`true`,size:16}):null,i?null:n]})}function xe(e){return e?e.mode===`waiting`&&e.message?`Managed development paused`:e.mode===`unmanaged`?`Managed development unavailable`:e.mode===`error`?`Managed development stopped`:e.setupFailure?.stage===`dependencies`?`Dependency installation failed`:e.setupFailure?.stage===`migration`?`Database setup failed`:e.draft?e.proposal===void 0?`Review local changes`:`Confirm your commit`:e.target?.source===`upstream`?`Refresh from upstream`:String(e.target?.source)===`dev`?`Sync with local dev`:e.target?`Sync with local main`:e.checks?.commands.some(e=>e.status===`failed`)?`Managed development checks failed`:e.warnings.length>0?`Managed development warning`:`Managed development status`:`Checking managed development`}function Se({codex:e,completion:t,status:n,success:r}){return e||t?M:n?.setupFailure?.stage===`migration`?E:n?.setupFailure?.stage===`dependencies`?k:n?.draft?te:n?.target?.source===`upstream`?T:n?.target?A:n?.checks?.commands.some(e=>e.status===`failed`)?O:r?S:n?n.mode===`waiting`?w:n.mode===`unmanaged`?C:n.mode===`error`||n.warnings.length>0?N:S:A}function Ce(e){return e.mode===`waiting`?`Waiting for managed development to start.`:e.mode===`unmanaged`?`Managed synchronization is unavailable for this session.`:e.mode===`error`?`Managed synchronization stopped.`:e.draft&&!e.target?`Commit the local changes before managed development checks for updates.`:e.target&&e.target.source!==`upstream`?String(e.target?.source)===`dev`?`New changes are available in local dev.`:`New changes are available in local main.`:e.target?`A newer main commit is ready.`:`Managed development is active. No updates are available.`}function we(e){return e.mode!==`managed`||!!(e.busy||e.codexCompletion||e.draft||e.message||e.setupFailure||e.target||e.warnings.length>0)}function Q(e){if(!e?.checks||we(e))return;let t=e.checks.commands.find(e=>e.status===`failed`&&!e.dismissed);return t?{check:t,commit:e.checks.commit,trigger:e.checks.trigger}:void 0}function Te({commit:e,trigger:t}){let n=e.slice(0,12);return t===`dependency-recovery`?`Managed dev ran this check after dependency installation recovered for commit ${n}.`:t===`database-recovery`?`Managed dev ran this check after database setup recovered for commit ${n}.`:`Managed dev ran this check after synchronizing the accepted update at commit ${n}.`}function $(e,t=Q(e)){return e?e.mode===`waiting`?!!e.message:!!(t||we(e)):!1}function Ee(e){let t=new Set(e.filter(e=>e.kind===`user`)),n=[...t].reduce((e,t)=>e+t.text.length,0),r=!1;for(let i of[...e].reverse())if(i.kind!==`user`){if(n+i.text.length>1e5&&r)break;t.add(i),r=!0,n+=i.text.length}return e.filter(e=>t.has(e))}function De(e){return[e.message,`Commit: ${e.commit}`,`Command: ${e.command}`,``,e.output].join(`
|
|
102
|
-
`)}
|
|
99
|
+
;function M(){return import.meta.hot}function N(){return import.meta.hot}var P={actionError:`actionError`,actions:`actions`,actionSuccess:`actionSuccess`,button:`button`,checkbox:`checkbox`,checkCommand:`checkCommand`,checkFailure:`checkFailure`,checkGuidance:`checkGuidance`,codexActions:`codexActions`,codexButton:`codexButton`,codexError:`codexError`,codexForm:`codexForm`,codexHint:`codexHint`,codexHistoryList:`codexHistoryList`,codexHistorySummary:`codexHistorySummary`,codexMessage:`codexMessage`,codexMessageAge:`codexMessageAge`,codexMessageAgent:`codexMessageAgent`,codexMessageHeader:`codexMessageHeader`,codexMessageLabel:`codexMessageLabel`,codexMessageText:`codexMessageText`,codexMessageThought:`codexMessageThought`,codexMessageUser:`codexMessageUser`,codexOutput:`codexOutput`,codexPrimary:`codexPrimary`,codexPrompt:`codexPrompt`,codexToast:`codexToast`,codexTranscript:`codexTranscript`,codexWaiting:`codexWaiting`,codexWorking:`codexWorking`,codexWorkingSpinner:`codexWorkingSpinner`,content:`content`,debugFooter:`debugFooter`,developmentControls:`developmentControls`,developmentControlsDropdown:`developmentControlsDropdown`,dialog:`dialog`,drawerBody:`drawerBody`,errorIcon:`errorIcon`,errorMessage:`errorMessage`,filePath:`filePath`,files:`files`,header:`header`,headerActions:`headerActions`,iconButton:`iconButton`,iconOnly:`iconOnly`,indicatorButton:`indicatorButton`,indicatorDot:`indicatorDot`,message:`message`,paragraph:`paragraph`,pendingCommits:`pendingCommits`,primary:`primary`,radiate:`radiate`,rebaseProgress:`rebaseProgress`,rebaseProgressFill:`rebaseProgressFill`,rebaseProgressLabel:`rebaseProgressLabel`,rebaseProgressTrack:`rebaseProgressTrack`,scenarioButton:`scenarioButton`,scenarioDescription:`scenarioDescription`,scenarioLabel:`scenarioLabel`,scenarioList:`scenarioList`,section:`section`,sectionDescription:`sectionDescription`,sectionHeading:`sectionHeading`,sectionLink:`sectionLink`,sectionTitle:`sectionTitle`,setupFailure:`setupFailure`,successIcon:`successIcon`,surface:`surface`,title:`title`,titleIcon:`titleIcon`,warning:`warning`};const F=`${t}\n@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-adlam-wght-normal.woff2)format("woff2-variations");unicode-range:U+61F,U+640,U+2015,U+201B,U+2020-2021,U+2030,U+204F,U+25CC,U+2E28-2E29,U+2E41,U+1E900-1E95F}@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-canadian-aboriginal-wght-normal.woff2)format("woff2-variations");unicode-range:U+2C7,U+2D8-2D9,U+2DB,U+307,U+1400-167F,U+18B0-18F5,U+25CC,U+11AB?}@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-cherokee-wght-normal.woff2)format("woff2-variations");unicode-range:U+300-302,U+304,U+30B-30C,U+323-324,U+330-331,U+13A0-13FF,U+AB70-ABBF}@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-math-wght-normal.woff2)format("woff2-variations");unicode-range:U+302-303,U+305,U+307-308,U+310,U+312,U+315,U+31A,U+326-327,U+32C,U+32F-330,U+332-333,U+338,U+33A,U+346,U+34D,U+391-3A1,U+3A3-3A9,U+3B1-3C9,U+3D1,U+3D5-3D6,U+3F0-3F1,U+3F4-3F5,U+2016-2017,U+2034-2038,U+203C,U+2040,U+2043,U+2047,U+2050,U+2057,U+205F,U+2070-2071,U+2074-208E,U+2090-209C,U+20D0-20DC,U+20E1,U+20E5-20EF,U+2100-2112,U+2114-2115,U+2117-2121,U+2123-214F,U+2190,U+2192,U+2194-21AE,U+21B0-21E5,U+21F1-21F2,U+21F4-2211,U+2213-2214,U+2216-22FF,U+2308-230B,U+2310,U+2319,U+231C-2321,U+2336-237A,U+237C,U+2395,U+239B-23B7,U+23D0,U+23DC-23E1,U+2474-2475,U+25AF,U+25B3,U+25B7,U+25BD,U+25C1,U+25CA,U+25CC,U+25FB,U+266D-266F,U+27C0-27FF,U+2900-2AFF,U+2B0E-2B11,U+2B30-2B4C,U+2BFE,U+3030,U+FF5B,U+FF5D,U+1D400-1D7FF,U+1EE??}@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-old-permic-wght-normal.woff2)format("woff2-variations");unicode-range:U+300,U+306-308,U+313,U+483,U+20DB,U+25CC,U+10350-1037A}@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-symbols-wght-normal.woff2)format("woff2-variations");unicode-range:U+1-C,U+E-1F,U+7F-9F,U+20DD-20E0,U+20E2-20E4,U+2150-218F,U+2190,U+2192,U+2194-2199,U+21AF,U+21E6-21F0,U+21F3,U+2218-2219,U+2299,U+22C4-22C6,U+2300-243F,U+2440-244A,U+2460-24FF,U+25A0-27BF,U+28??,U+2921-2922,U+2981,U+29BF,U+29EB,U+2B??,U+4DC0-4DFF,U+FFF9-FFFB,U+10140-1018E,U+10190-1019C,U+101A0,U+101D0-101FD,U+102E0-102FB,U+10E60-10E7E,U+1D2C0-1D2D3,U+1D2E0-1D37F,U+1F0??,U+1F100-1F1AD,U+1F1E6-1F1FF,U+1F30D-1F30F,U+1F315,U+1F31C,U+1F31E,U+1F320-1F32C,U+1F336,U+1F378,U+1F37D,U+1F382,U+1F393-1F39F,U+1F3A7-1F3A8,U+1F3AC-1F3AF,U+1F3C2,U+1F3C4-1F3C6,U+1F3CA-1F3CE,U+1F3D4-1F3E0,U+1F3ED,U+1F3F1-1F3F3,U+1F3F5-1F3F7,U+1F408,U+1F415,U+1F41F,U+1F426,U+1F43F,U+1F441-1F442,U+1F444,U+1F446-1F449,U+1F44C-1F44E,U+1F453,U+1F46A,U+1F47D,U+1F4A3,U+1F4B0,U+1F4B3,U+1F4B9,U+1F4BB,U+1F4BF,U+1F4C8-1F4CB,U+1F4D6,U+1F4DA,U+1F4DF,U+1F4E3-1F4E6,U+1F4EA-1F4ED,U+1F4F7,U+1F4F9-1F4FB,U+1F4FD-1F4FE,U+1F503,U+1F507-1F50B,U+1F50D,U+1F512-1F513,U+1F53E-1F54A,U+1F54F-1F5FA,U+1F610,U+1F650-1F67F,U+1F687,U+1F68D,U+1F691,U+1F694,U+1F698,U+1F6AD,U+1F6B2,U+1F6B9-1F6BA,U+1F6BC,U+1F6C6-1F6CF,U+1F6D3-1F6D7,U+1F6E0-1F6EA,U+1F6F0-1F6F3,U+1F6F7-1F6FC,U+1F7??,U+1F800-1F80B,U+1F810-1F847,U+1F850-1F859,U+1F860-1F887,U+1F890-1F8AD,U+1F8B0-1F8BB,U+1F8C0-1F8C1,U+1F900-1F90B,U+1F93B,U+1F946,U+1F984,U+1F996,U+1F9E9,U+1FA00-1FA6F,U+1FA70-1FA7C,U+1FA80-1FA89,U+1FA8F-1FAC6,U+1FACE-1FADC,U+1FADF-1FAE9,U+1FAF0-1FAF8,U+1FB??}@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-symbols2-wght-normal.woff2)format("woff2-variations");unicode-range:U+2000-2001,U+2004-2008,U+200A,U+23B8-23BD,U+2500-259F}@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-syriac-wght-normal.woff2)format("woff2-variations");unicode-range:U+303-304,U+307-308,U+30A,U+320,U+323-325,U+32D-32E,U+330-331,U+60C,U+61B-61C,U+61F,U+621,U+640,U+64B-655,U+660-66C,U+670,U+700-74F,U+860-86A,U+1DF8,U+1DFA,U+200C-200F,U+25CC,U+2670-2671}@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-vietnamese-wght-normal.woff2)format("woff2-variations");unicode-range:U+102-103,U+110-111,U+128-129,U+168-169,U+1A0-1A1,U+1AF-1B0,U+300-301,U+303-304,U+308-309,U+323,U+329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-latin-ext-wght-normal.woff2)format("woff2-variations");unicode-range:U+100-2BA,U+2BD-2C5,U+2C7-2CC,U+2CE-2D7,U+2DD-2FF,U+304,U+308,U+329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Code Variable;font-style:normal;font-display:swap;font-weight:300 800;src:url(./files/google-sans-code-latin-wght-normal.woff2)format("woff2-variations");unicode-range:U+??,U+131,U+152-153,U+2BB-2BC,U+2C6,U+2DA,U+2DC,U+304,U+308,U+329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
|
100
|
+
\n[data-isolet-root]{--overlay-font-body:"SN Pro Variable", system-ui, sans-serif;--overlay-font-monospace:"Google Sans Code Variable", ui-monospace, monospace;color-scheme:light dark;--oc-white:#fff;--oc-gray-0:#f8f9fa;--oc-gray-1:#f1f3f5;--oc-gray-2:#e9ecef;--oc-gray-3:#dee2e6;--oc-gray-4:#ced4da;--oc-gray-5:#adb5bd;--oc-gray-6:#868e96;--oc-gray-7:#495057;--oc-gray-8:#343a40;--oc-gray-9:#212529;--oc-red-0:#fff5f5;--oc-red-2:#ffc9c9;--oc-red-7:#f03e3e;--oc-red-9:#c92a2a;--oc-grape-0:#f8f0fc;--oc-grape-2:#eebefa;--oc-grape-7:#ae3ec9;--oc-grape-9:#862e9c;--oc-blue-0:#e7f5ff;--oc-blue-2:#a5d8ff;--oc-blue-4:#4dabf7;--oc-blue-6:#228be6;--oc-blue-7:#1c7ed6;--oc-blue-9:#1864ab;--oc-green-0:#ebfbee;--oc-green-2:#b2f2bb;--oc-green-7:#37b24d;--oc-green-9:#2b8a3e;--oc-yellow-0:#fff9db;--oc-yellow-2:#ffec99;--oc-yellow-7:#f59f00;--oc-yellow-9:#e67700;--overlay-background:var(--oc-white);--overlay-surface-subtle:var(--oc-gray-0);--overlay-surface-muted:var(--oc-gray-1);--overlay-border:var(--oc-gray-3);--overlay-border-strong:var(--oc-gray-4);--overlay-text:var(--oc-gray-9);--overlay-text-muted:var(--oc-gray-7);--overlay-text-subtle:var(--oc-gray-6);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:var(--oc-blue-0);--overlay-accent-border:var(--oc-blue-2);--overlay-accent-text:var(--oc-blue-9);--overlay-thought-soft:var(--oc-grape-0);--overlay-thought-border:var(--oc-grape-2);--overlay-thought-text:var(--oc-grape-9);--overlay-success-soft:var(--oc-green-0);--overlay-success-border:var(--oc-green-2);--overlay-success-text:var(--oc-green-9);--overlay-warning-soft:var(--oc-yellow-0);--overlay-warning-border:var(--oc-yellow-2);--overlay-warning-text:var(--oc-yellow-9);--overlay-danger-soft:var(--oc-red-0);--overlay-danger-border:var(--oc-red-2);--overlay-danger-text:var(--oc-red-9);color:var(--overlay-text);font:14px/1.45 var(--overlay-font-body)}.surface{--managed-dev-bottom-offset:0px;--managed-dev-right-offset:0px}.indicatorButton{appearance:none;bottom:calc(10px + env(safe-area-inset-bottom,0px) + var(--managed-dev-bottom-offset));cursor:pointer;pointer-events:auto;height:44px;right:calc(10px + env(safe-area-inset-right,0px) + var(--managed-dev-right-offset));background:0 0;border:0;justify-content:center;align-items:center;width:44px;padding:0;display:flex;position:fixed}.indicatorButton:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:-3px}.indicatorDot{background:var(--managed-dev-indicator-color);box-shadow:inset 0 0 0 .5px color-mix(in srgb, var(--overlay-border) 30%, transparent);height:var(--managed-dev-indicator-size);width:var(--managed-dev-indicator-size);border-radius:50%;display:block;position:relative}.indicatorDot:before{border:max(1px, calc(var(--managed-dev-indicator-size) / 9)) solid var(--managed-dev-indicator-color);border-radius:inherit;content:"";animation:1.8s ease-out infinite radiate;position:absolute;inset:0}.dialog{background:var(--overlay-background);border:1px solid var(--overlay-border);box-shadow:0 18px 60px color-mix(in srgb, var(--oc-gray-9) 28%, transparent), 0 2px 8px color-mix(in srgb, var(--oc-gray-9) 12%, transparent);color:var(--overlay-text);box-sizing:border-box;height:auto;bottom:20px;left:unset;overscroll-behavior:contain;pointer-events:auto;border-radius:12px;width:min(520px,100vw - 18px);max-width:min(520px,100vw - 18px);max-height:none;margin:0;padding:12px 18px;position:fixed;right:20px;overflow:hidden}.dialog[open]{flex-direction:column;gap:12px;display:flex}.drawerBody{align-content:start;gap:16px;min-height:80px;display:grid;overflow:auto}.header{justify-content:space-between;align-items:center;gap:12px;display:flex}.headerActions{align-items:center;display:flex}.developmentControlsDropdown{display:flex;position:relative}.title{align-items:center;gap:8px;margin:0;font-size:16px;display:flex}.titleIcon{color:var(--overlay-accent);flex:none}.iconButton{color:inherit;cursor:pointer;background:0 0;border:0;flex:none;justify-content:center;align-items:center;min-width:32px;min-height:32px;padding:4px;display:inline-flex}.iconButton:hover{background:var(--overlay-surface-muted);border-radius:8px}.iconButton:focus-visible,.scenarioButton:focus-visible,.sectionLink:focus-visible,.button:focus-visible,.message:focus-visible,.codexButton:focus-visible,.codexPrompt:focus-visible{outline:3px solid var(--overlay-accent-border);outline-offset:2px}.content{gap:12px;display:grid}.section{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);border-radius:12px;gap:12px;padding:14px;display:grid}.sectionHeading{justify-content:space-between;align-items:start;gap:12px;display:flex}.sectionTitle{margin:0;font-size:13px}.sectionDescription{color:var(--overlay-text-muted);margin:3px 0 0;font-size:12px}.sectionLink{color:var(--overlay-accent-text);cursor:pointer;font:inherit;background:0 0;border:0;padding:2px;font-size:12px}.debugFooter{background:var(--overlay-thought-soft);border-top:.5px solid var(--overlay-thought-border);color:var(--overlay-thought-text);flex:none;margin:0 -18px -12px;padding:4px 18px;font-size:11px;line-height:1.3}.scenarioList{gap:7px;max-height:min(480px,100dvh - 210px);display:grid;overflow:auto}.scenarioButton{background:var(--overlay-surface-subtle);color:inherit;cursor:pointer;font:inherit;text-align:start;border:1px solid #0000;border-radius:10px;gap:3px;padding:10px;display:grid}.scenarioButton:hover{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.scenarioLabel{font-weight:650}.scenarioDescription{color:var(--overlay-text-muted);font-size:12px}.paragraph{margin:0}.pendingCommits{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);box-sizing:border-box;font:12px/1.5 var(--overlay-font-monospace);white-space:pre-wrap;border-radius:10px;margin:0;padding:10px;overflow:auto}.codexOutput{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border);box-sizing:border-box;font:12px/1.5 var(--overlay-font-monospace);white-space:pre-wrap;word-break:break-word;border-radius:10px;max-height:280px;margin:0;padding:10px;overflow:auto}.codexForm{gap:12px;display:grid}.codexPrompt{background:var(--overlay-background);border:1px solid var(--overlay-border-strong);box-sizing:border-box;color:inherit;font:inherit;resize:vertical;border-radius:10px;width:100%;min-height:130px;padding:10px 12px}.codexHint{color:var(--overlay-text-subtle);margin:0;font-size:12px}.codexError{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:9px;margin:0;padding:8px 10px}.codexActions{flex-wrap:wrap;justify-content:end;gap:8px;display:flex}.codexButton{border:1px solid var(--overlay-border-strong);color:inherit;cursor:pointer;font:inherit;background:0 0;border-radius:999px;justify-content:center;align-items:center;min-height:36px;padding:7px 11px;display:inline-flex}.codexButton:hover:not(:disabled){background:var(--overlay-surface-muted)}.codexPrimary{background:var(--overlay-accent);border-color:var(--overlay-accent);color:var(--oc-white)}.codexPrimary:hover:not(:disabled){background:var(--overlay-accent-hover);border-color:var(--overlay-accent-hover)}.codexButton:disabled{cursor:wait;opacity:.55}.codexToast{color:var(--overlay-success-text);font-size:12px}.codexWorking{color:var(--overlay-text-muted);font:12px/1.5 var(--overlay-font-monospace)}.codexWorkingSpinner{color:var(--overlay-accent)}.codexTranscript{gap:10px;max-height:360px;display:grid;overflow:auto}.codexMessage{border:1px solid #0000;border-radius:10px;gap:5px;padding:10px;display:grid}.codexMessageUser{background:var(--overlay-accent-soft);border-color:var(--overlay-accent-border)}.codexMessageThought{background:var(--overlay-thought-soft);border-color:var(--overlay-thought-border)}.codexMessageAgent{background:var(--overlay-success-soft);border-color:var(--overlay-success-border)}.codexMessageHeader{justify-content:space-between;align-items:baseline;gap:8px;display:flex}.codexMessageLabel{color:var(--overlay-text-muted);letter-spacing:.04em;text-transform:uppercase;margin:0;font-size:11px;font-weight:650}.codexMessageAge{color:var(--overlay-text-subtle);white-space:nowrap;font-size:11px}.codexMessageText,.codexWaiting{font:12px/1.5 var(--overlay-font-monospace);white-space:pre-wrap;word-break:break-word;margin:0}.codexWaiting{color:var(--overlay-text-subtle)}.rebaseProgress{gap:8px;display:grid}.rebaseProgressLabel{color:var(--overlay-text-muted);justify-content:space-between;align-items:baseline;font-size:12px;display:flex}.rebaseProgressLabel strong{color:var(--overlay-success-text)}.rebaseProgressTrack{background:var(--overlay-surface-muted);border-radius:999px;height:6px;overflow:hidden}.rebaseProgressFill{background:var(--overlay-success-text);border-radius:inherit;height:100%;transition:width .18s;display:block}.codexHistorySummary{cursor:pointer;font-size:12px;font-weight:600}.codexHistoryList{gap:8px;padding-top:8px;display:grid}.files{gap:7px;max-height:190px;display:grid;overflow:auto}.checkbox{overflow-wrap:anywhere;align-items:start;gap:8px;display:flex}.checkbox input{accent-color:var(--overlay-accent)}.filePath{font-family:var(--overlay-font-monospace)}.message{background:var(--overlay-surface-subtle);border:1px solid var(--overlay-border-strong);box-sizing:border-box;color:var(--overlay-text);font-family:var(--overlay-font-monospace);resize:vertical;border-radius:10px;width:100%;min-height:92px;padding:10px}.actions{flex-wrap:wrap;justify-content:end;gap:8px;display:flex}.developmentControls{background:var(--overlay-background);border:1px solid var(--overlay-border);box-shadow:0 10px 30px color-mix(in srgb, var(--oc-gray-9) 18%, transparent);box-sizing:border-box;z-index:1;border-radius:10px;gap:4px;min-width:170px;max-width:calc(100vw - 32px);margin:0;padding:4px;display:grid;position:absolute;top:calc(100% + 6px);right:0}.developmentControls .actions{justify-content:stretch;align-items:stretch;gap:0;width:100%;display:grid}.developmentControls .button{text-align:start;white-space:nowrap;justify-content:start;justify-self:stretch;width:100%;min-height:32px}.button{border:1px solid var(--overlay-border-strong);cursor:pointer;font:inherit;background:0 0;border-radius:999px;justify-content:center;align-items:center;gap:6px;padding:7px 11px;transition:opacity .14s;display:inline-flex}.button:hover:not(:disabled){background:var(--overlay-surface-muted)}.primary{background:var(--overlay-accent);border-color:var(--overlay-accent);color:var(--oc-white)}.primary:hover:not(:disabled){background:var(--overlay-accent-hover);border-color:var(--overlay-accent-hover)}.developmentControls .button{color:inherit;background:0 0;border:0}.developmentControls .button:hover:not(:disabled){background:var(--overlay-surface-muted)}.button:disabled{cursor:wait;opacity:.55}.iconOnly{box-sizing:border-box;flex:0 0 32px;width:32px;min-width:32px;height:32px;padding:7px}.warning{color:var(--overlay-warning-text);white-space:pre-wrap}.checkFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.checkCommand{font-family:var(--overlay-font-monospace);margin:0;font-weight:600}.checkGuidance{margin:3px 0 0;font-size:12px}.setupFailure{background:var(--overlay-danger-soft);border:1px solid var(--overlay-danger-border);color:var(--overlay-danger-text);border-radius:10px;gap:10px;padding:10px;display:grid}.actionError{background:var(--overlay-warning-soft);border:1px solid var(--overlay-warning-border);color:var(--overlay-warning-text);white-space:pre-wrap;border-radius:10px;gap:10px;padding:10px;display:grid}.errorMessage{grid-template-columns:auto 1fr;align-items:start;gap:8px;display:grid}.actionSuccess{background:var(--overlay-success-soft);border:1px solid var(--overlay-success-border);color:var(--overlay-success-text);border-radius:10px;grid-template-columns:auto 1fr;align-items:start;gap:8px;padding:10px;display:grid}.errorIcon,.successIcon{margin-top:1px}@media (prefers-color-scheme:dark){[data-isolet-root]{--overlay-background:var(--oc-gray-9);--overlay-surface-subtle:var(--oc-gray-8);--overlay-surface-muted:var(--oc-gray-7);--overlay-border:var(--oc-gray-7);--overlay-border-strong:var(--oc-gray-6);--overlay-text:var(--oc-gray-0);--overlay-text-muted:var(--oc-gray-4);--overlay-text-subtle:var(--oc-gray-5);--overlay-accent:var(--oc-blue-6);--overlay-accent-hover:var(--oc-blue-7);--overlay-accent-soft:color-mix(in srgb, var(--oc-blue-9) 32%, var(--overlay-background));--overlay-accent-border:var(--oc-blue-7);--overlay-accent-text:var(--oc-blue-2);--overlay-thought-soft:color-mix(in srgb, var(--oc-grape-9) 30%, var(--overlay-background));--overlay-thought-border:var(--oc-grape-7);--overlay-thought-text:var(--oc-grape-2);--overlay-success-soft:color-mix(in srgb, var(--oc-green-9) 30%, var(--overlay-background));--overlay-success-border:var(--oc-green-7);--overlay-success-text:var(--oc-green-2);--overlay-warning-soft:color-mix(in srgb, var(--oc-yellow-9) 24%, var(--overlay-background));--overlay-warning-border:var(--oc-yellow-7);--overlay-warning-text:var(--oc-yellow-2);--overlay-danger-soft:color-mix(in srgb, var(--oc-red-9) 30%, var(--overlay-background));--overlay-danger-border:var(--oc-red-7);--overlay-danger-text:var(--oc-red-2)}}@keyframes radiate{0%{opacity:.75;transform:scale(1)}to{opacity:0;transform:scale(2.4)}}@media (width<=600px){.dialog{max-width:none;padding:calc(16px + env(safe-area-inset-top,0px)) calc(16px + env(safe-area-inset-right,0px)) calc(16px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px));border-radius:0;width:auto;inset:0}.debugFooter{margin:0 calc(-16px - env(safe-area-inset-right,0px)) calc(-16px - env(safe-area-inset-bottom,0px)) calc(-16px - env(safe-area-inset-left,0px));padding:4px calc(16px + env(safe-area-inset-right,0px)) calc(4px + env(safe-area-inset-bottom,0px)) calc(16px + env(safe-area-inset-left,0px))}.button,.codexButton{min-height:44px}.checkbox{align-items:center;min-height:44px}.iconButton{min-width:44px;min-height:44px}.iconOnly{flex-basis:44px;width:44px;min-width:44px;height:44px}}@media (prefers-reduced-motion:reduce){.indicatorDot:before{opacity:.45;animation:none;transform:scale(1.65)}}
|
|
101
|
+
`;let I=!1,L=0,R=0;const z=new Set;let B=!1;const V=new Set,re=[{description:`A clean managed checkout with no available updates.`,id:`idle`,label:`No updates`,status:{mode:`managed`,warnings:[]}},{description:`Tracked and untracked files awaiting review.`,id:`local-changes`,label:`Review local changes`,status:{draft:{fingerprint:`debug-local-changes`,tracked:!0,untracked:[`src/web/new-feature.tsx`,`src/web/new-feature.style.ts`]},mode:`managed`,warnings:[]}},{description:`Local changes with a proposed Conventional Commit message.`,id:`confirm-commit`,label:`Confirm commit`,status:{draft:{fingerprint:`debug-confirm-commit`,tracked:!0,untracked:[`src/web/new-feature.tsx`]},mode:`managed`,proposal:`feat: add the new feature`,warnings:[]}},{description:`A newer commit is available from the local dev branch.`,id:`dev-update`,label:`Local dev update`,status:{mode:`managed`,target:{commit:`1234567890abcdef`,commits:[{commit:`fedcba0987654321`,shortCommit:`fedcba098765`,subject:`feat: add managed preview foundations`},{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: update the managed preview`}],shortCommit:`1234567890ab`,source:`dev`,subject:`feat: update the managed preview`},warnings:[]}},{description:`A newer upstream main commit is ready to refresh.`,id:`upstream-update`,label:`Upstream update`,status:{mode:`managed`,target:{commit:`abcdef1234567890`,commits:[{commit:`0123456789abcdef`,shortCommit:`0123456789ab`,subject:`chore: refresh shared dependencies`},{commit:`abcdef1234567890`,shortCommit:`abcdef123456`,subject:`fix: update shared project defaults`}],shortCommit:`abcdef123456`,source:`upstream`,subject:`fix: update shared project defaults`},warnings:[]}},{description:`The accepted update is currently being integrated.`,id:`busy`,label:`Busy integration`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{description:`Managed development is paused until the checkout returns to main.`,id:`paused`,label:`Paused checkout`,status:{message:`Managed synchronization is paused until the primary checkout is back on local main.`,mode:`waiting`,warnings:[]}},{description:`Managed development cannot run from the current checkout.`,id:`unavailable`,label:`Unavailable checkout`,status:{message:`Managed development only runs from the primary checkout.`,mode:`unmanaged`,warnings:[]}},{description:`A managed-development warning requiring attention.`,id:`warning`,label:`Warning`,status:{mode:`managed`,warnings:[`The remote update could not be checked. The last known project state is shown.`]}},{description:`Typechecking failed after synchronization.`,id:`failed-check`,label:`Failed check`,status:{checks:{commit:`1234567890abcdef`,commands:[{command:`pnpm typecheck`,failureId:`debug-typecheck-failure`,output:`src/web/feature.tsx(12,4): error TS2322: Type mismatch.`,status:`failed`},{command:`pnpm test`,status:`passed`}],trigger:`synchronization`},mode:`managed`,warnings:[]}},{description:`Dependency installation failed after synchronization.`,id:`dependency-failure`,label:`Dependency failure`,status:{mode:`managed`,setupFailure:{command:`pnpm install --frozen-lockfile`,commit:`1234567890abcdef`,message:`The project was synchronized, but dependency installation failed. Fix the package or lockfile issue, then retry the install.`,output:`ERR_PNPM_OUTDATED_LOCKFILE Cannot install with a frozen lockfile.`,restartRequired:!0,stage:`dependencies`},warnings:[]}},{description:`Database migration failed and can be reset.`,id:`migration-failure`,label:`Database failure`,status:{mode:`managed`,setupFailure:{command:`pnpm db migrate`,commit:`1234567890abcdef`,message:`The project was synchronized, but its database migration failed. The previous database was restored.`,output:`Migration 0012_add_project_state failed: duplicate column name.`,restartRequired:!1,stage:`migration`},warnings:[]}},{codex:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Inspecting the conflicting layout changes.`},{kind:`thought`,text:`Preserving the behavior introduced on both branches.`}],phase:`running`,requestId:`debug-codex-running`,totalCommits:4},description:`Codex is resolving conflicts with previous thoughts collapsed.`,id:`codex-running`,label:`Codex reasoning`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{codex:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Preserving the behavior introduced on both branches.`},{kind:`agent`,text:`Resolved root.tsx while preserving both the command layer and overlay mounting.`}],phase:`complete`,requestId:`debug-codex-message`,totalCommits:1},description:`Codex has produced its final message while synchronization finishes.`,id:`codex-message`,label:`Codex response`,status:{busy:`Integrating accepted update`,mode:`managed`,warnings:[]}},{codex:{commits:[],messages:[{kind:`user`,text:`Resolve the current Git merge conflicts in src/web/root.tsx.`},{kind:`thought`,text:`The conflict could not be resolved safely.`}],phase:`error`,requestId:`debug-codex-error`},description:`The Codex-assisted conflict resolution failed.`,error:`Codex could not resolve the merge conflicts.`,id:`codex-error`,label:`Codex failure`,status:{mode:`managed`,warnings:[]}},{description:`A durable Codex completion waiting for acknowledgment.`,id:`codex-finished`,label:`Codex finished`,status:{codexCompletion:{commits:[{commit:`1234567890abcdef`,shortCommit:`1234567890ab`,subject:`feat: add managed development`}],finalMessage:`Resolved root.tsx while preserving both the command layer and overlay mounting.`,id:`debug-completion`,messages:[{kind:`user`,text:`Resolve the current Git rebase conflicts in src/web/root.tsx.`},{kind:`thought`,text:`Inspecting the conflicting layout changes.`},{kind:`agent`,text:`Resolved root.tsx while preserving both the command layer and overlay mounting.`}],totalCommits:1},mode:`managed`,warnings:[]}},{description:`A successful synchronization result before it auto-dismisses.`,id:`success`,label:`Refresh success`,status:{mode:`managed`,warnings:[]},success:{heading:`Refresh complete`,message:`Your project is up to date.`}}],ie=[`codex-running`,`codex-finished`,`codex-message`,`codex-error`,`migration-failure`,`dependency-failure`,`failed-check`,`confirm-commit`,`local-changes`,`upstream-update`,`dev-update`,`busy`,`warning`,`paused`,`unavailable`,`success`,`idle`].map(e=>{let t=re.find(t=>t.id===e);if(!t)throw Error(`Missing managed dev debug scenario: ${e}`);return t});function ae(){U(!I)}function H(){W(!0),U(!0)}function U(e){if(I!==e){I=e;for(let e of z)e()}}function W(e){if(B!==e){B=e;for(let e of V)e()}}function oe({bottomOffset:e,codexEnabled:t=!1,debug:n=!1,indicator:r,rightOffset:i}){return n?m(le,{bottomOffset:e,indicator:r,rightOffset:i}):m(se,{bottomOffset:e,codexEnabled:t,indicator:r,rightOffset:i})}function se({bottomOffset:e,codexEnabled:t=!1,indicator:n,rightOffset:r}){let{act:i,checkFailure:s,codex:l,dismissCheckFailure:u,dismissError:f,dismissSuccess:p,error:h,status:g,success:_}=Ae(),v=Oe(),y=d(Me,Pe,Fe);c(()=>{if(!_)return;let e=setTimeout(()=>{p(),U(!1)},1600);return()=>clearTimeout(e)},[p,_]);let b=n??m(K,{}),x=o(b)&&b.type===K?a(b,{paused:!g?.target}):b;return m(ce,{bottomOffset:e,indicator:Q(g,s)||t?x:null,rightOffset:r,children:m(fe,{act:i,checkFailure:s,codex:l,codexEnabled:t,codexPromptOpen:y,developmentControls:v,dismissCheckFailure:u,dismissError:f,error:h,onClose:()=>{g?.codexCompletion&&i({id:g.codexCompletion.id,type:`acknowledge-codex`}),W(!1),U(!1)},onCloseCodex:()=>W(!1),onOpenCodex:H,status:g,success:_})})}function ce({bottomOffset:e,children:t,indicator:n,openOnMount:r=!1,rightOffset:a}){let[o,s]=u(null),l=d(je,Ne,$);c(()=>{r&&U(!0);let e=!0,t=i(`coreframe-managed-dev`,document.body,{css:F,hostAttributes:{"aria-live":`polite`,id:`coreframe-managed-dev`},hostStyles:{inset:`0`,pointerEvents:`none`,position:`fixed`},zIndex:2147483647});return queueMicrotask(()=>{e&&s(t.container)}),()=>{e=!1,t.host?.remove()}},[r]);let p={"--managed-dev-bottom-offset":ue(e),"--managed-dev-right-offset":ue(a)};return o?f(h(`div`,{className:P.surface,style:p,children:[n,l?t:null]}),o):null}function le({bottomOffset:e,indicator:t,rightOffset:n}){let[r,i]=u(),[s,c]=u(),[l,d]=u(),f=re.find(({id:e})=>e===r),p=e=>{i(e),c(void 0),d(void 0)},h=async e=>{if(e.type===`acknowledge-codex`){p(void 0);return}d(ke(e))},g=t??m(K,{}),_={pending:!1,reloadPage:()=>c(`Page reload simulated.`),restartVite:()=>c(`Vite restart simulated.`),success:s};return m(ce,{bottomOffset:e,indicator:o(g)&&g.type===K?a(g,{paused:f?.status.mode===`waiting`}):g,openOnMount:!0,rightOffset:n,children:f?m(fe,{act:h,checkFailure:Z(f.status),codex:f.codex,codexEnabled:!1,codexPromptOpen:!1,developmentControls:_,dismissCheckFailure:()=>void 0,dismissError:()=>void 0,error:f.error,onBack:()=>p(void 0),onClose:()=>U(!1),onCloseCodex:()=>void 0,onOpenCodex:()=>void 0,status:f.status,success:l??f.success},f.id):m(de,{developmentControls:_,onClose:()=>U(!1),onSelect:e=>p(e)})})}function ue(e){return typeof e==`number`?`${e}px`:e??`0px`}function de({developmentControls:e,onClose:t,onSelect:n}){return m(G,{debug:!0,developmentControls:e,icon:b,onClose:t,title:`Managed dev overlay scenarios`,children:m(`div`,{className:P.scenarioList,children:ie.map(e=>h(`button`,{className:P.scenarioButton,onClick:()=>n(e.id),type:`button`,children:[m(`span`,{className:P.scenarioLabel,children:e.label}),m(`span`,{className:P.scenarioDescription,children:e.description})]},e.id))})})}function G({children:t,debug:n=!1,developmentControls:r,icon:i,onBack:a,onClose:o,title:s}){let d=l(null),f=l(null),[p,g]=u(!1);return c(()=>{let e=e=>{let t=e.composedPath(),n=f.current;n&&!t.includes(n)&&g(!1);let r=d.current;r&&!t.includes(r)&&o()},t=e=>{e.key===`Escape`&&(e.preventDefault(),o())};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[o]),h(`dialog`,{"aria-labelledby":`coreframe-managed-title`,"aria-modal":`true`,className:P.dialog,id:`coreframe-managed-dev-dialog`,open:!0,ref:d,children:[h(`div`,{className:P.header,children:[h(`h2`,{className:P.title,id:`coreframe-managed-title`,children:[m(i,{"aria-hidden":`true`,className:P.titleIcon,size:18}),s]}),h(`div`,{className:P.headerActions,children:[a?m(`button`,{"aria-label":`Back to scenarios`,className:P.iconButton,onClick:a,type:`button`,children:m(y,{"aria-hidden":`true`,size:18})}):null,r?h(`div`,{className:P.developmentControlsDropdown,ref:f,children:[m(`button`,{"aria-expanded":p,"aria-haspopup":`menu`,"aria-label":`Development controls`,className:P.iconButton,onClick:()=>g(e=>!e),type:`button`,children:m(T,{"aria-hidden":`true`,size:18})}),p?m(pe,{controls:r}):null]}):null,m(`button`,{"aria-label":`Close managed development`,className:P.iconButton,onClick:o,type:`button`,children:m(e,{"aria-hidden":`true`,size:18})})]})]}),m(`div`,{className:P.drawerBody,children:t}),n?m(`footer`,{className:P.debugFooter,children:`Debug preview · project actions are simulated locally`}):null]})}function K({color:e=`#228be6`,paused:t=!1,size:n=14,warningColor:r=`#fd7e14`}){let i=d(je,Ne,$),a={"--managed-dev-indicator-color":t?r:e,"--managed-dev-indicator-size":typeof n==`number`?`${n}px`:n};return m(`button`,{"aria-controls":`coreframe-managed-dev-dialog`,"aria-expanded":i,"aria-label":`${i?`Hide`:`Show`} Coreframe managed development`,className:P.indicatorButton,onClick:ae,style:a,type:`button`,children:m(`span`,{className:P.indicatorDot})})}function fe({act:t,checkFailure:n,codex:r,codexEnabled:i,codexPromptOpen:a,developmentControls:o,dismissCheckFailure:s,dismissError:d,error:f,onBack:g,onClose:_,onCloseCodex:v,onOpenCodex:y,status:b,success:S}){let[C,ee]=u({value:``}),[w,T]=u(()=>({paths:new Set})),E=l(null),[D,M]=u(),N=b?.codexCompletion,F=b?.draft,I=b?.target,L=!N&&!S&&!r,R=w.fingerprint===F?.fingerprint?w.paths:new Set(F?.untracked??[]),z=C.fingerprint===F?.fingerprint&&C.proposal===b?.proposal?C.value:b?.proposal??``,B=!!(F?.untracked.length&&F.untracked.every(e=>R.has(e)));return c(()=>{let e=E.current;e&&r?.phase===`running`&&(e.scrollTop=e.scrollHeight)},[r]),n?h(G,{debug:!!g,developmentControls:o,icon:j,onBack:g,onClose:_,title:`Managed development check failed`,children:[h(`div`,{className:P.content,children:[m(`div`,{className:P.checkFailure,role:`alert`,children:h(`div`,{className:P.checkMessage,children:[h(`p`,{className:P.checkCommand,children:[n.check.command,` failed`]}),m(`p`,{className:P.checkGuidance,children:Te(n)}),m(`p`,{className:P.checkGuidance,children:`Copy the output and paste it into your agent orchestration tool.`})]})}),h(J,{children:[m(X,{ariaLabel:`Dismiss error`,icon:e,iconOnly:!0,onClick:()=>s(n),children:`Dismiss`}),m(X,{ariaLabel:`Copy output for ${n.check.command}`,icon:te,iconOnly:!0,onClick:()=>void navigator.clipboard.writeText(n.check.output??``),children:`Copy output`})]})]}),m(me,{enabled:i,notice:D,onClose:v,onOpen:y,open:a,onStarted:M})]}):h(G,{debug:!!g,developmentControls:o,icon:Se({codex:r,completion:N,status:b,success:S}),onBack:g,onClose:_,title:N?`Codex conflict resolution finished`:S?.heading??(r?.phase===`complete`?`Finishing synchronization…`:r?.phase===`error`?`Conflict resolution failed.`:r?`Resolving conflicts with Codex…`:xe(b)),children:[h(`div`,{className:P.content,children:[S&&!N?h(`div`,{className:P.actionSuccess,role:`status`,children:[m(x,{"aria-hidden":`true`,className:P.successIcon,size:18}),m(`p`,{className:P.paragraph,children:S.message})]}):null,f?h(p,{children:[m(`div`,{className:P.actionError,role:`alert`,children:m(Y,{children:f})}),m(J,{children:m(X,{ariaLabel:`Dismiss error`,icon:e,iconOnly:!0,onClick:d,children:`Dismiss`})})]}):null,N||!S&&r?m(he,{commits:N?.commits??r?.commits??[],completion:N,messages:N?.messages??r?.messages??[],outputRef:E,totalCommits:N?.totalCommits??r?.totalCommits,working:r?.phase===`running`}):L&&b?.setupFailure?h(p,{children:[h(`div`,{className:P.setupFailure,role:`alert`,children:[m(Y,{children:b.setupFailure.message}),m(`pre`,{className:P.codexOutput,children:b.setupFailure.output})]}),h(J,{children:[m(X,{ariaLabel:`Dismiss error`,icon:e,iconOnly:!0,onClick:_,children:`Dismiss`}),m(X,{ariaLabel:`Copy diagnostics`,busy:b.busy,icon:te,iconOnly:!0,onClick:()=>void navigator.clipboard.writeText(De(b.setupFailure)),children:`Copy diagnostics`}),b.setupFailure.stage===`dependencies`?m(X,{ariaLabel:`Retry install`,busy:b.busy,icon:O,iconOnly:!0,onClick:()=>void t({type:`retry-install`}),primary:!0,children:`Retry install`}):m(X,{busy:b.busy,icon:k,onClick:()=>{window.confirm(`Reset the local database? This permanently deletes its current data, then reapplies migrations and seed scripts.`)&&t({type:`reset-database`})},primary:!0,children:`Reset database`})]})]}):L?m(`p`,{className:P.paragraph,children:b?b.busy||b.message||Ce(b):`Checking managed development status…`}):null,N&&!f?m(J,{children:m(X,{busy:b?.busy,icon:x,onClick:()=>void t({id:N.id,type:`acknowledge-codex`}),primary:!0,children:`Continue`})}):null,L&&b?.mode===`waiting`&&b.message?h(`p`,{className:P.paragraph,children:[`To re-enable managed development, run `,m(`code`,{children:`git switch main`}),` in the primary checkout. Synchronization will resume automatically.`]}):null,L&&I&&!F?m(`pre`,{className:P.pendingCommits,children:(I.commits??[I]).map(e=>`${e.shortCommit} ${e.subject}`).join(`
|
|
102
|
+
`)}):null,L?b?.warnings.map((e,t)=>m(`p`,{className:`${P.paragraph} ${P.warning}`,children:e},`${t}-${e}`)):null,L&&F?h(p,{children:[h(`div`,{className:P.files,children:[F.untracked.map(e=>m(be,{checked:R.has(e),label:m(`span`,{className:P.filePath,children:e}),onChange:t=>T(()=>{let n=new Set(R);return t?n.add(e):n.delete(e),{fingerprint:F.fingerprint,paths:n}})},e)),F.untracked.length>0?m(be,{checked:B,label:`Include all untracked files`,onChange:e=>T({fingerprint:F.fingerprint,paths:e?new Set(F.untracked):new Set})}):null]}),b.proposal===void 0?h(J,{children:[I?m(X,{busy:b.busy,icon:k,onClick:()=>void t({type:`reject`}),children:`Reject`}):null,m(X,{busy:b.busy,icon:A,onClick:()=>void t({type:`message`,fingerprint:F.fingerprint,untracked:[...R]}),primary:!0,children:`Generate commit message`})]}):h(p,{children:[m(`textarea`,{"aria-label":`Commit message`,className:P.message,onChange:e=>ee({fingerprint:F.fingerprint,proposal:b.proposal,value:e.target.value}),value:z}),h(J,{children:[I?m(X,{busy:b.busy,icon:k,onClick:()=>void t({type:`reject`}),children:`Reject`}):null,m(X,{busy:b.busy,icon:ne,onClick:()=>{t(I?{type:`apply`,target:I.commit,fingerprint:F.fingerprint,untracked:[...R],message:z}:{type:`commit`,fingerprint:F.fingerprint,untracked:[...R],message:z})},primary:!0,children:I?`Commit and refresh`:`Commit changes`})]})]})]}):L&&I?m(J,{children:m(X,{busy:b.busy,icon:O,onClick:()=>void t({type:`prepare`,target:I.commit}),primary:!0,children:I.source===`upstream`?`Refresh`:String(I.source)===`dev`?`Sync with dev`:`Sync with main`})}):null]}),m(me,{enabled:i,notice:D,onClose:v,onOpen:y,open:a,onStarted:M})]})}function pe({controls:e}){return h(`div`,{"aria-label":`Development controls`,className:P.developmentControls,role:`menu`,children:[h(J,{children:[m(X,{immediatelyEnabled:!0,icon:O,onClick:e.reloadPage,role:`menuitem`,children:`Reload page`}),m(X,{busy:e.pending?`Restarting Vite`:void 0,immediatelyEnabled:!0,icon:k,onClick:e.restartVite,primary:!0,role:`menuitem`,children:e.pending?`Restarting Vite…`:`Restart Vite`})]}),e.error?m(`div`,{className:P.actionError,role:`alert`,children:m(Y,{children:`Vite restart failed: ${e.error}`})}):null,e.success?h(`div`,{className:P.actionSuccess,role:`status`,children:[m(x,{"aria-hidden":`true`,className:P.successIcon,size:18}),m(`p`,{className:P.paragraph,children:e.success})]}):null]})}function me({enabled:e,notice:t,onClose:r,onOpen:i,onStarted:a,open:o}){return e?h(`section`,{"aria-labelledby":`coreframe-codex-heading`,className:P.section,children:[h(`div`,{className:P.sectionHeading,children:[h(`div`,{children:[m(`h3`,{className:P.sectionTitle,id:`coreframe-codex-heading`,children:`Codex`}),m(`p`,{className:P.sectionDescription,children:`Start a prompt in the existing Codex task workflow.`})]}),o?m(`button`,{className:P.sectionLink,onClick:r,type:`button`,children:`Close`}):null]}),o?m(n,{classNames:{actions:P.codexActions,button:P.codexButton,error:P.codexError,form:P.codexForm,hint:P.codexHint,primary:P.codexPrimary,prompt:P.codexPrompt,toast:P.codexToast},label:`Codex chat prompt`,onClose:r,onStarted:a,placeholder:`Describe what you want Codex to do…`,showToast:!1}):m(J,{children:m(X,{icon:A,onClick:i,primary:!0,children:`New Codex chat`})}),t?h(`div`,{className:P.actionSuccess,role:`status`,children:[m(x,{"aria-hidden":`true`,className:P.successIcon,size:18}),m(`p`,{className:P.paragraph,children:t})]}):null]}):null}function he({commits:e,completion:t,messages:n,outputRef:r,totalCommits:i,working:a}){let o=[...n].reverse().find(e=>e.kind===`user`),s=[...n].reverse().find(e=>e.kind!==`user`),c=t?[...n].reverse().find(e=>e.kind===`agent`&&e.text===t.finalMessage):s,l=n.filter(e=>e.kind!==`user`&&e!==c),u=t?{kind:`agent`,text:t.finalMessage}:s,d=c?`message-${n.lastIndexOf(c)}`:`completion`;return h(p,{children:[a?m(`div`,{className:P.codexWorking,children:m(g,{className:P.codexWorkingSpinner,label:`Codex is resolving conflicts`,children:m(ge,{})})}):null,h(`div`,{"aria-live":t?void 0:`polite`,className:P.codexTranscript,ref:r,role:`log`,children:[o?m(q,{message:o}):null,l.length>0?h(`details`,{children:[h(`summary`,{className:P.codexHistorySummary,children:[`History (`,l.length,`)`]}),m(`div`,{className:P.codexHistoryList,children:l.map((e,t)=>m(q,{message:e},`history-${t}`))})]}):null,u?m(q,{message:u,showAge:!0},d):m(`p`,{className:P.codexWaiting,children:`Waiting for Codex output…`}),i?m(_e,{rebased:e.length,total:i}):null]})]})}function ge(){let e=l(0),[t,n]=u(0);return c(()=>{e.current=Date.now();let t=window.setInterval(()=>{n(Math.floor((Date.now()-e.current)/1e3))},1e3);return()=>window.clearInterval(t)},[]),h(p,{children:[`Working for `,ye(t),`...`]})}function _e({rebased:e,total:t}){let n=Math.min(e,t),r=Math.round(n/t*100);return h(`section`,{"aria-label":`Rebase progress`,className:P.rebaseProgress,children:[h(`div`,{className:P.rebaseProgressLabel,children:[h(`strong`,{children:[r,`% rebased`]}),h(`span`,{children:[n,` of `,t,` commits`]})]}),m(`div`,{"aria-valuemax":t,"aria-valuemin":0,"aria-valuenow":n,className:P.rebaseProgressTrack,role:`progressbar`,children:m(`span`,{className:P.rebaseProgressFill,style:{width:`${r}%`}})})]})}function q({message:e,showAge:t=!1}){let n=e.kind===`user`?`Request`:e.kind===`thought`?`Codex thought`:`Codex`,r=e.kind===`user`?P.codexMessageUser:e.kind===`thought`?P.codexMessageThought:P.codexMessageAgent;return h(`section`,{className:`${P.codexMessage} ${r}`,children:[h(`div`,{className:P.codexMessageHeader,children:[m(`h3`,{className:P.codexMessageLabel,children:n}),t?m(ve,{}):null]}),m(`p`,{className:P.codexMessageText,children:e.text})]})}function ve(){let e=l(0),[t,n]=u(0);return c(()=>{e.current=Date.now();let t=window.setInterval(()=>{n(Math.floor((Date.now()-e.current)/1e3))},1e3);return()=>window.clearInterval(t)},[]),h(`span`,{"aria-hidden":`true`,className:P.codexMessageAge,children:[ye(t),` ago`]})}function ye(e){let t=Math.floor(e/60),n=e%60;return t>0?`${t}m ${n}s`:`${n}s`}function be({checked:e,label:t,onChange:n}){return h(`label`,{className:P.checkbox,children:[m(`input`,{checked:e,onChange:e=>n(e.target.checked),type:`checkbox`}),t]})}function J({children:e}){return m(`div`,{className:P.actions,children:e})}function Y({children:e}){return h(`div`,{className:P.errorMessage,children:[m(j,{"aria-hidden":`true`,className:P.errorIcon,size:18}),m(`p`,{className:P.paragraph,children:e})]})}function X({ariaLabel:e,busy:t,children:n,icon:r,iconOnly:i=!1,immediatelyEnabled:a=!1,onClick:o,primary:s=!1,role:l}){let[d,f]=u(!a);return c(()=>{if(a)return;let e=window.setTimeout(()=>f(!1),1e3);return()=>window.clearTimeout(e)},[a]),h(`button`,{"aria-label":e,"aria-busy":!!t,className:`${P.button} ${i?P.iconOnly:``} ${s?P.primary:``}`,disabled:d||!!t,onClick:o,role:l,title:i?e:void 0,type:`button`,children:[r?m(r,{"aria-hidden":`true`,size:16}):null,i?null:n]})}function xe(e){return e?e.mode===`waiting`&&e.message?`Managed development paused`:e.mode===`unmanaged`?`Managed development unavailable`:e.mode===`error`?`Managed development stopped`:e.setupFailure?.stage===`dependencies`?`Dependency installation failed`:e.setupFailure?.stage===`migration`?`Database setup failed`:e.draft?e.proposal===void 0?`Review local changes`:`Confirm your commit`:e.target?.source===`upstream`?`Refresh from upstream`:String(e.target?.source)===`dev`?`Sync with local dev`:e.target?`Sync with local main`:e.checks?.commands.some(e=>e.status===`failed`)?`Managed development checks failed`:e.warnings.length>0?`Managed development warning`:`Managed development status`:`Checking managed development`}function Se({codex:e,completion:t,status:n,success:r}){return e||t?A:n?.setupFailure?.stage===`migration`?w:n?.setupFailure?.stage===`dependencies`?D:n?.draft?ne:n?.target?.source===`upstream`?ee:n?.target?O:n?.checks?.commands.some(e=>e.status===`failed`)?E:r?x:n?n.mode===`waiting`?C:n.mode===`unmanaged`?S:n.mode===`error`||n.warnings.length>0?j:x:O}function Ce(e){return e.mode===`waiting`?`Waiting for managed development to start.`:e.mode===`unmanaged`?`Managed synchronization is unavailable for this session.`:e.mode===`error`?`Managed synchronization stopped.`:e.draft&&!e.target?`Commit the local changes before managed development checks for updates.`:e.target&&e.target.source!==`upstream`?String(e.target?.source)===`dev`?`New changes are available in local dev.`:`New changes are available in local main.`:e.target?`A newer main commit is ready.`:`Managed development is active. No updates are available.`}function we(e){return e.mode!==`managed`||!!(e.busy||e.codexCompletion||e.draft||e.message||e.setupFailure||e.target||e.warnings.length>0)}function Z(e){if(!e?.checks||we(e))return;let t=e.checks.commands.find(e=>e.status===`failed`&&!e.dismissed);return t?{check:t,commit:e.checks.commit,trigger:e.checks.trigger}:void 0}function Te({commit:e,trigger:t}){let n=e.slice(0,12);return t===`dependency-recovery`?`Managed dev ran this check after dependency installation recovered for commit ${n}.`:t===`database-recovery`?`Managed dev ran this check after database setup recovered for commit ${n}.`:`Managed dev ran this check after synchronizing the accepted update at commit ${n}.`}function Q(e,t=Z(e)){return e?e.mode===`waiting`?!!e.message:!!(t||we(e)):!1}function Ee(e){let t=new Set(e.filter(e=>e.kind===`user`)),n=[...t].reduce((e,t)=>e+t.text.length,0),r=!1;for(let i of[...e].reverse())if(i.kind!==`user`){if(n+i.text.length>1e5&&r)break;t.add(i),r=!0,n+=i.text.length}return e.filter(e=>t.has(e))}function De(e){return[e.message,`Commit: ${e.commit}`,`Command: ${e.command}`,``,e.output].join(`
|
|
103
|
+
`)}function Oe(){let[e,t]=u(),[n,r]=u(!1),[i,a]=u(),o=M(),s=l(void 0);return c(()=>{if(!o)return;let e=e=>{if(e.requestId===s.current){if(e.state===`busy`){r(!0);return}if(s.current=void 0,r(!1),e.state===`error`){a(void 0),t(e.error??`The Vite restart failed.`);return}t(void 0),a(`Vite restarted.`)}};return o.on(_.actionResult,e),()=>o.off(_.actionResult,e)},[o]),{error:e,pending:n,reloadPage:()=>globalThis.location.reload(),restartVite:()=>{if(n)return;if(t(void 0),a(void 0),!o){t(`The Vite HMR connection is unavailable.`);return}let e=String(++R);s.current=e,r(!0),o.send(_.action,{action:{type:`restart-vite`},requestId:e})},success:i}}function ke(e){return e.type===`apply`?{heading:`Refresh complete`,message:`Your changes were committed and the project is up to date.`}:e.type===`prepare`?{heading:`Refresh complete`,message:`Your project is up to date.`}:e.type===`commit`?{heading:`Changes committed`,message:`Your local changes are committed. Checking for managed development updates…`,preserveDuringStatus:!0}:e.type===`reject`?{heading:`Update dismissed`,message:`No further action is required.`}:e.type===`retry-install`?{heading:`Setup complete`,message:`Dependencies installed and the project is ready.`}:e.type===`reset-database`?{heading:`Database reset complete`,message:`The database was recreated, migrated, and seeded.`}:{heading:`Action complete`,message:`No further action is required.`}}function Ae(){let[e,t]=u(),[n,r]=u(),[i,a]=u(),[o,d]=u(),f=l(void 0),p=l(void 0),m=l(new Map),h=N();c(()=>{if(!h)return;let e=m.current,n=({status:n})=>{let r=Q(n);t(n),n.codexCompletion&&p.current!==n.codexCompletion.id&&(p.current=n.codexCompletion.id,U(!0));let i=!n.busy&&!n.codexCompletion?[...e.entries()].filter(([,e])=>e.type===`acknowledge-codex`).map(([e])=>e):[];if(i.length>0){for(let t of i)e.delete(t);a(void 0),r||U(!1)}r&&a(e=>e?.preserveDuringStatus?e:void 0)},i=n=>{let i=e.get(n.requestId);i&&(e.delete(n.requestId),n.status&&t(n.status),n.error?(r(n.error),i.type===`acknowledge-codex`&&U(!0)):n.status?.codexCompletion?(p.current=n.status.codexCompletion.id,f.current=void 0,d(void 0),a(void 0),U(!0)):i.type===`acknowledge-codex`||i.type===`dismiss-check`?(a(void 0),n.status&&!Q(n.status)&&U(!1)):n.status&&(i.type===`commit`||!Q(n.status))&&a(ke(i)))},o=t=>{if(!e.has(t.requestId))return;if(t.phase===`start`){let e={commits:t.commits,messages:[t.message],phase:`running`,requestId:t.requestId,totalCommits:t.totalCommits};f.current=e,d(e),U(!0);return}let n=f.current;if(!n||n.requestId!==t.requestId)return;let r=t.phase===`message`?{...n,messages:Ee([...n.messages,t.message])}:t.phase===`complete`?{commits:n.commits,messages:n.messages,phase:`complete`,requestId:t.requestId,totalCommits:n.totalCommits}:t.phase===`progress`?{...n,commits:t.commits,totalCommits:t.totalCommits??n.totalCommits}:{...n,phase:`error`};f.current=r,d(r)};h.on(v.status,n),h.on(v.actionResult,i),h.on(v.codex,o),h.send(v.statusRequest);let s=window.setInterval(()=>{[...e.values()].some(e=>e.type===`acknowledge-codex`)&&h.send(v.statusRequest)},1e3);return()=>{window.clearInterval(s),e.clear(),f.current=void 0,h.off(v.status,n),h.off(v.actionResult,i),h.off(v.codex,o)}},[h]);let g=async e=>{if(e.type===`acknowledge-codex`&&(p.current=e.id),r(void 0),a(void 0),f.current=void 0,d(void 0),!h){r(`The Vite HMR connection is unavailable.`);return}let t=String(++L);m.current.set(t,e),h.send(v.action,{action:e,requestId:t})},_=s(()=>a(void 0),[]);return{act:g,checkFailure:!n&&!i&&!o&&!e?.codexCompletion?Z(e):void 0,codex:o,dismissCheckFailure:e=>{if(!e.check.failureId){U(!1);return}g({failureId:e.check.failureId,type:`dismiss-check`})},dismissError:()=>r(void 0),dismissSuccess:_,error:n,status:e,success:i}}function je(e){return z.add(e),()=>z.delete(e)}function Me(e){return V.add(e),()=>V.delete(e)}function Ne(){return I}function $(){return!1}function Pe(){return B}function Fe(){return!1}export{oe as ManagedDevOverlay,K as ManagedDevOverlayIndicator,H as openManagedDevCodex,ae as toggleManagedDevOverlay};
|
package/dist/plugins/shell.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{resolveCoreframeHost as e,resolveCoreframePlatform as t}from"./index.js";import{realpathSync as n}from"node:fs";import{extname as r,isAbsolute as i,relative as a,resolve as o,sep as s}from"node:path";import{parseSync as c}from"vite";const l=`virtual:coreframe-shell`,u=`\0${l}`,d=`virtual:coreframe-shell/composition`,f=`virtual:coreframe-shell/auth`,p=`\0${f}`,m=`virtual:coreframe-shell/auth-composition`,h=`virtual:coreframe-router`,g=`\0${h}`,_=`virtual:coreframe-router/composition`,v={browser:{auth:`@coreframe/lib/auth-transport/browser`,router:`react-router`,shell:`@coreframe/lib/shell/dom`},flutter:{auth:`@coreframe/flutter-js/client`,router:`@coreframe/flutter-js/router`,shell:`@coreframe/flutter-js/composition`},tauri:{auth:`./src/api/client/tauri-auth.ts`,router:`react-router`,shell:`@coreframe/lib/shell/dom`}};function y(){let n=t(),r=e(process.env,n),i=v[r],a=process.cwd();return{name:`coreframe:shell`,enforce:`pre`,config(){return{define:{"import.meta.env.PLATFORM":JSON.stringify(n)}}},configResolved(e){
|
|
1
|
+
import{resolveCoreframeHost as e,resolveCoreframePlatform as t}from"./index.js";import{realpathSync as n}from"node:fs";import{extname as r,isAbsolute as i,relative as a,resolve as o,sep as s}from"node:path";import{parseSync as c}from"vite";const l=`virtual:coreframe-shell`,u=`\0${l}`,d=`virtual:coreframe-shell/composition`,f=`virtual:coreframe-shell/auth`,p=`\0${f}`,m=`virtual:coreframe-shell/auth-composition`,h=`virtual:coreframe-router`,g=`\0${h}`,_=`virtual:coreframe-router/composition`,v={browser:{auth:`@coreframe/lib/auth-transport/browser`,router:`react-router`,shell:`@coreframe/lib/shell/dom`},flutter:{auth:`@coreframe/flutter-js/client`,router:`@coreframe/flutter-js/router`,shell:`@coreframe/flutter-js/composition`},tauri:{auth:`./src/api/client/tauri-auth.ts`,router:`react-router`,shell:`@coreframe/lib/shell/dom`}};function y(){let n=t(),r=e(process.env,n),i=v[r],a=b(i.shell),s=process.cwd();return{name:`coreframe:shell`,enforce:`pre`,config(){return{define:{"import.meta.env.PLATFORM":JSON.stringify(n)},ssr:{noExternal:[a]}}},configResolved(e){s=e.root},transform(e,t){let n=x(t);if(r!==`flutter`||!w(t,s)||n===void 0)return;let{module:i}=c(t,e,{lang:n});(i.staticImports.some(({moduleRequest:e})=>e.value===`react-router`)||i.staticExports.some(({entries:e})=>e.some(({moduleRequest:e})=>e?.value===`react-router`))||i.dynamicImports.some(({moduleRequest:t})=>S(e.slice(t.start,t.end))))&&C()},resolveId(e){if(e===l)return u;if(e===f)return p;if(e===h)return g;if(e===d)return this.resolve(i.shell,o(s,`vite.config.ts`),{skipSelf:!0});if(e===m)return this.resolve(i.auth,o(s,`vite.config.ts`),{skipSelf:!0});if(e===_)return this.resolve(i.router,o(s,`vite.config.ts`),{skipSelf:!0});if(e===`virtual:coreframe-flutter/application`)return this.resolve(o(s,`src/web/app/flutter-shell/application.ts`),void 0,{skipSelf:!0});if(e===`virtual:coreframe-flutter/native-bridge`)return this.resolve(o(s,`src/web/app/flutter-shell/generated/native-bridge.ts`),void 0,{skipSelf:!0});if(e===`virtual:coreframe-flutter/native-pages`)return this.resolve(o(s,`src/web/app/flutter-shell/generated/native-pages.ts`),void 0,{skipSelf:!0})},load(e){if(e===u)return`export * from ${JSON.stringify(d)};`;if(e===p)return`export { createAuthenticatedFetch, createAuthClient } from ${JSON.stringify(m)};`;if(e===g)return`export * from ${JSON.stringify(_)};`}}}function b(e){let t=e.split(`/`);return e.startsWith(`@`)?t.slice(0,2).join(`/`):t[0]}function x(e){let t=r(e.split(`?`,1)[0]);if(t===`.jsx`)return`jsx`;if(t===`.ts`||t===`.mts`||t===`.cts`)return`ts`;if(t===`.tsx`)return`tsx`;if(t===`.js`||t===`.mjs`||t===`.cjs`)return`js`}function S(e){return e===`"react-router"`||e===`'react-router'`||e==="`react-router`"}function C(){throw Error(`Flutter application modules must import React Router APIs from ${JSON.stringify(h)}; direct ${JSON.stringify(`react-router`)} imports bypass the native navigation contract. Importing ${JSON.stringify(`react-router/dom`)} remains supported.`)}function w(e,t){let r=e.split(`?`,1)[0];if(!i(r))return!1;let o=a(n(t),n(r)),c=o.split(s);return o!==``&&o!==`..`&&!o.startsWith(`..${s}`)&&!i(o)&&!c.includes(`node_modules`)&&c[0]!==`.react-router`}export{y as coreframeShellPlugin};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coreframe/vite",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.5",
|
|
4
4
|
"description": "Vite plugins and build integrations for Coreframe apps",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -57,14 +57,14 @@
|
|
|
57
57
|
"obug": "^2.1.3",
|
|
58
58
|
"unplugin": "^2.3.11",
|
|
59
59
|
"vite-plugin-hashed-favicons": "^2.1.1",
|
|
60
|
+
"@coreframe/assets": "^0.1.5",
|
|
60
61
|
"@coreframe/config": "^0.1.2",
|
|
62
|
+
"@coreframe/dashboard": "^0.3.2",
|
|
61
63
|
"@coreframe/dev": "^0.1.2",
|
|
64
|
+
"@coreframe/dev-contracts": "^0.1.1",
|
|
62
65
|
"@coreframe/flutter-js": "^0.1.4",
|
|
63
66
|
"@coreframe/flutter-tools": "^0.1.5",
|
|
64
|
-
"@coreframe/lib": "^0.2.1"
|
|
65
|
-
"@coreframe/assets": "^0.1.4",
|
|
66
|
-
"@coreframe/dashboard": "^0.3.2",
|
|
67
|
-
"@coreframe/dev-contracts": "^0.1.1"
|
|
67
|
+
"@coreframe/lib": "^0.2.1"
|
|
68
68
|
},
|
|
69
69
|
"devDependencies": {
|
|
70
70
|
"@tsdown/css": "0.22.3",
|