cogpit 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +30 -0
- package/dist/cli.js +26786 -0
- package/dist/web/apple-touch-icon.png +0 -0
- package/dist/web/assets/CommandPaletteHost-ChH6w0Bx.js +1 -0
- package/dist/web/assets/ConfigBrowser-CPCH7_25.js +1 -0
- package/dist/web/assets/HighlightedEditor-BPmH8BvC.js +2 -0
- package/dist/web/assets/KeyboardShortcutsDialog-CTbXz40Z.js +1 -0
- package/dist/web/assets/MobileFileChanges-C5VoKbje.js +1 -0
- package/dist/web/assets/PreviewPanel-DoAf1W2k.js +1 -0
- package/dist/web/assets/ProjectFilesPanel-v_O7Awnm.js +4 -0
- package/dist/web/assets/ProjectSwitcherModal-CSZrCd3X.js +1 -0
- package/dist/web/assets/TerminalOutput-6GBZ9nXN.css +32 -0
- package/dist/web/assets/TerminalOutput-SImEU6_6.js +51 -0
- package/dist/web/assets/ThemeSelectorModal-rjVBMgWC.js +1 -0
- package/dist/web/assets/WorkflowsPanel-JVqgKAzY.js +1 -0
- package/dist/web/assets/WorktreePanel-D94-oAau.js +1 -0
- package/dist/web/assets/bash-Yzrsuije.js +1 -0
- package/dist/web/assets/c-BIGW1oBm.js +1 -0
- package/dist/web/assets/cpp-BRuaLJcg.js +1 -0
- package/dist/web/assets/css-DPfMkruS.js +1 -0
- package/dist/web/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/web/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/web/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/web/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/web/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/web/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/web/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/web/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/web/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/web/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/web/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/web/assets/github-dark-DHJKELXO.js +1 -0
- package/dist/web/assets/github-light-DAi9KRSo.js +1 -0
- package/dist/web/assets/go-CxLEBnE3.js +1 -0
- package/dist/web/assets/html-GMplVEZG.js +1 -0
- package/dist/web/assets/index-Bif4Kdtn.css +1 -0
- package/dist/web/assets/index-C00ZsBZl.js +1 -0
- package/dist/web/assets/index-C5VcQtkE.js +1 -0
- package/dist/web/assets/index-CNV6e3p0.js +138 -0
- package/dist/web/assets/index-S7UMnH_y.js +5 -0
- package/dist/web/assets/java-CylS5w8V.js +1 -0
- package/dist/web/assets/javascript-wDzz0qaB.js +1 -0
- package/dist/web/assets/json-Cp-IABpG.js +1 -0
- package/dist/web/assets/jsx-g9-lgVsj.js +1 -0
- package/dist/web/assets/kotlin-BdnUsdx6.js +1 -0
- package/dist/web/assets/markdown-Cvjx9yec.js +1 -0
- package/dist/web/assets/php-aq0itWAE.js +1 -0
- package/dist/web/assets/python-B6aJPvgy.js +1 -0
- package/dist/web/assets/ruby-B0Tyh1qT.js +1 -0
- package/dist/web/assets/rust-B1yitclQ.js +1 -0
- package/dist/web/assets/scss-OYdSNvt2.js +1 -0
- package/dist/web/assets/session-parser.worker-BhyaigCR.js +22 -0
- package/dist/web/assets/sql-BLtJtn59.js +1 -0
- package/dist/web/assets/svelte-DZMnMd3x.js +1 -0
- package/dist/web/assets/swift-D82vCrfD.js +1 -0
- package/dist/web/assets/toml-vGWfd6FD.js +1 -0
- package/dist/web/assets/tsx-COt5Ahok.js +1 -0
- package/dist/web/assets/typescript-BPQ3VLAy.js +1 -0
- package/dist/web/assets/vendor-markdown-BE1gYnO9.js +37 -0
- package/dist/web/assets/vendor-react-gGw_S5I_.js +57 -0
- package/dist/web/assets/vendor-shiki-DOn6sF-i.js +144 -0
- package/dist/web/assets/vendor-ui-BmLOQ5Or.js +797 -0
- package/dist/web/assets/vue-DVfSmUF7.js +1 -0
- package/dist/web/assets/xml-D2mA2LmW.js +1 -0
- package/dist/web/assets/yaml-Buea-lGh.js +1 -0
- package/dist/web/cogpit.svg +10 -0
- package/dist/web/index.html +28 -0
- package/dist/web/theme-bootstrap.js +25 -0
- package/package.json +51 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as z,a as Ge,c as B,j as s}from"./vendor-react-gGw_S5I_.js";import{w as Qe,B as V,aG as He,aV as Ie,A as qe,aH as Ke,bb as Me,ad as Ce,ac as Fe,U as Te,bc as We,b1 as Xe,b0 as Je,a$ as Ze,bd as et,be as tt,bf as st,bg as nt,T as ue,bh as it,V as lt,aj as ot,bi as at,bj as rt,bk as ct,v as dt,ae as ut,bl as ft,E as mt,y as xt,z as ht,G as gt,H as pt,ah as bt,p as jt,bm as wt,bn as vt,q as Nt}from"./index-CNV6e3p0.js";import{E as yt,ah as St,ao as Ye,C as De,ap as ye,a2 as It,aq as qt,L as _t,ar as Tt,as as Ct,c as kt,m as At}from"./vendor-ui-BmLOQ5Or.js";import"./vendor-shiki-DOn6sF-i.js";import"./vendor-markdown-BE1gYnO9.js";const Et=4e3;function Rt(){const[l,e]=z.useState([]),[t,n]=z.useState(!1),[i,r]=z.useState(null),o=z.useRef(!1);z.useEffect(()=>(o.current=!1,()=>{o.current=!0}),[]);const c=z.useCallback(async()=>{try{const u=await Qe("/api/mission-control");if(o.current)return;if(!u.ok)throw new Error(`Mission Control request failed (${u.status})`);const x=await u.json();if(o.current)return;e(Array.isArray(x.summaries)?x.summaries:[]),r(null)}catch(u){if(o.current)return;r(u instanceof Error?u.message:"Failed to load Mission Control")}finally{o.current||n(!1)}},[]);z.useEffect(()=>{n(!0);const u=()=>{(typeof document>"u"||document.visibilityState==="visible")&&c()},x=()=>{document.visibilityState==="visible"&&c()};u();const j=setInterval(u,Et);return document.addEventListener("visibilitychange",x),()=>{clearInterval(j),document.removeEventListener("visibilitychange",x)}},[c]);const d=z.useMemo(()=>{const u=new Map;for(const x of l)u.set(x.sessionId,x);return u},[l]),p=z.useCallback(()=>{c()},[c]);return{summaries:d,loading:t,error:i,refresh:p}}const ke="data-view-transition-kind",Mt="(prefers-reduced-motion: reduce)";let de=null,$e=null;function Lt(l,e,t){t===null?l.removeAttribute(e):l.setAttribute(e,t)}function Dt(l,e){const t={root:l,kind:e,previousKind:l.getAttribute(ke)};return l.setAttribute(ke,e),$e=t,t}function Se(l){$e===l&&(l.root.getAttribute(ke)===l.kind&&Lt(l.root,ke,l.previousKind),$e=null)}function $t(){const l=de;if(l){de=null;try{l.transition.skipTransition()}catch{Se(l.tag);return}Se(l.tag)}}function Ft(){if(typeof window>"u"||typeof window.matchMedia!="function")return!1;try{return window.matchMedia(Mt).matches}catch{return!1}}function zt(l,{kind:e}){$t();const t=typeof document>"u"?null:document,n=t==null?void 0:t.startViewTransition;if(!t||!(typeof n=="function")||Ft())return l(),null;const r=Dt(t.documentElement,e);let o=!1,c=!1,d;const p=u=>{if(!o){o=!0;try{u?Ge.flushSync(l):l()}catch(x){throw c=!0,d=x,x}}};try{const u=n.call(t,()=>p(!0)),x={transition:u,tag:r};return de=x,u.ready.catch(()=>{}),u.updateCallbackDone.catch(()=>{}),u.finished.then(()=>{de===x&&(de=null),Se(r)},()=>{de===x&&(de=null),Se(r)}),u}catch{if(Se(r),c)throw d;return p(!1),null}}function Ot(l){const e={};for(const t of l)t.type==="boolean"?e[t.name]=t.defaultValue===!0:t.defaultValue!==void 0?e[t.name]=String(t.defaultValue):e[t.name]="";return e}function Vt(l,e){const t={};for(const n of l){const i=e[n.name];if(typeof i=="boolean"){t[n.name]=i;continue}i!==""&&(t[n.name]=n.type==="number"||n.type==="integer"?Number(i):i)}return t}function Ut(l,e){return l.every(t=>{if(!t.required)return!0;const n=e[t.name];return typeof n=="boolean"?!0:n===""?!1:t.type==="number"||t.type==="integer"?Number.isFinite(Number(n)):!0})}function Yt(l){const e=B.c(64),{request:t,responding:n,onAnswer:i}=l;let r;e[0]!==t.fields?(r=()=>Ot(t.fields),e[0]=t.fields,e[1]=r):r=e[1];const[o,c]=z.useState(r);let d;e[2]!==t.fields||e[3]!==o?(d=Ut(t.fields,o),e[2]=t.fields,e[3]=o,e[4]=d):d=e[4];const p=d,u=t.displayName||t.title||t.serverName;let x;e[5]===Symbol.for("react.memo_cache_sentinel")?(x=(y,q)=>{c(b=>({...b,[y]:q}))},e[5]=x):x=e[5];const j=x;let m;e[6]!==i||e[7]!==t.requestId?(m=()=>i(t.requestId,{action:"decline"}),e[6]=i,e[7]=t.requestId,e[8]=m):m=e[8];const h=m;if(t.mode==="url"&&t.url){const y=t.url;let q;e[9]!==t.message?(q=s.jsx("p",{className:"text-sm leading-relaxed text-foreground",children:t.message}),e[9]=t.message,e[10]=q):q=e[10];let b;e[11]!==y?(b=s.jsx("p",{className:"mt-1 truncate font-mono text-xs text-muted-foreground",title:y,children:y}),e[11]=y,e[12]=b):b=e[12];let M;e[13]!==i||e[14]!==t.requestId||e[15]!==y?(M=()=>{window.open(y,"_blank","noopener,noreferrer"),i(t.requestId,{action:"accept"})},e[13]=i,e[14]=t.requestId,e[15]=y,e[16]=M):M=e[16];let L;e[17]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(yt,{"data-icon":"inline-end"}),e[17]=L):L=e[17];let k;e[18]!==n||e[19]!==M?(k=s.jsxs(V,{size:"sm",disabled:n,onClick:M,children:["Open link",L]}),e[18]=n,e[19]=M,e[20]=k):k=e[20];let D;e[21]!==h||e[22]!==n?(D=s.jsx(V,{variant:"ghost",size:"sm",disabled:n,onClick:h,children:"Decline"}),e[21]=h,e[22]=n,e[23]=D):D=e[23];let E;e[24]!==D||e[25]!==k?(E=s.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[k,D]}),e[24]=D,e[25]=k,e[26]=E):E=e[26];let _;return e[27]!==u||e[28]!==E||e[29]!==q||e[30]!==b?(_=s.jsxs(Oe,{server:u,children:[q,b,E]}),e[27]=u,e[28]=E,e[29]=q,e[30]=b,e[31]=_):_=e[31],_}let a;e[32]!==t.message?(a=s.jsx("p",{className:"text-sm leading-relaxed text-foreground",children:t.message}),e[32]=t.message,e[33]=a):a=e[33];let g;if(e[34]!==t.fields||e[35]!==t.requestId||e[36]!==n||e[37]!==o){let y;e[39]!==t.requestId||e[40]!==n||e[41]!==o?(y=q=>s.jsx(Bt,{id:`elicit-${t.requestId}-${q.name}`,field:q,value:o[q.name],disabled:n,onChange:b=>j(q.name,b)},q.name),e[39]=t.requestId,e[40]=n,e[41]=o,e[42]=y):y=e[42],g=t.fields.map(y),e[34]=t.fields,e[35]=t.requestId,e[36]=n,e[37]=o,e[38]=g}else g=e[38];let f;e[43]!==g?(f=s.jsx("div",{className:"mt-3 flex flex-col gap-3",children:g}),e[43]=g,e[44]=f):f=e[44];const S=n||!p;let I;e[45]!==i||e[46]!==t.fields||e[47]!==t.requestId||e[48]!==o?(I=()=>i(t.requestId,{action:"accept",content:Vt(t.fields,o)}),e[45]=i,e[46]=t.fields,e[47]=t.requestId,e[48]=o,e[49]=I):I=e[49];let C;e[50]!==S||e[51]!==I?(C=s.jsx(V,{size:"sm",disabled:S,onClick:I,children:"Send"}),e[50]=S,e[51]=I,e[52]=C):C=e[52];let T;e[53]!==h||e[54]!==n?(T=s.jsx(V,{variant:"ghost",size:"sm",disabled:n,onClick:h,children:"Decline"}),e[53]=h,e[54]=n,e[55]=T):T=e[55];let v;e[56]!==C||e[57]!==T?(v=s.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[C,T]}),e[56]=C,e[57]=T,e[58]=v):v=e[58];let N;return e[59]!==u||e[60]!==v||e[61]!==a||e[62]!==f?(N=s.jsxs(Oe,{server:u,children:[a,f,v]}),e[59]=u,e[60]=v,e[61]=a,e[62]=f,e[63]=N):N=e[63],N}function Bt(l){const e=B.c(55),{id:t,field:n,value:i,disabled:r,onChange:o}=l;if(n.type==="boolean"){const h=i===!0;let a;e[0]!==o?(a=I=>o(I===!0),e[0]=o,e[1]=a):a=e[1];let g;e[2]!==r||e[3]!==t||e[4]!==h||e[5]!==a?(g=s.jsx(Ke,{id:t,checked:h,disabled:r,onCheckedChange:a}),e[2]=r,e[3]=t,e[4]=h,e[5]=a,e[6]=g):g=e[6];let f;e[7]!==n?(f=s.jsx(Le,{field:n}),e[7]=n,e[8]=f):f=e[8];let S;return e[9]!==t||e[10]!==g||e[11]!==f?(S=s.jsxs(Me,{htmlFor:t,className:"items-start gap-2 font-normal",children:[g,f]}),e[9]=t,e[10]=g,e[11]=f,e[12]=S):S=e[12],S}if(n.type==="enum"){let h;e[13]!==n?(h=s.jsx(Le,{field:n}),e[13]=n,e[14]=h):h=e[14];let a;e[15]!==t||e[16]!==h?(a=s.jsx(Me,{htmlFor:t,children:h}),e[15]=t,e[16]=h,e[17]=a):a=e[17];let g;e[18]!==i?(g=typeof i=="string"&&i?[i]:[],e[18]=i,e[19]=g):g=e[19];let f;e[20]!==o?(f=N=>{N[0]&&o(N[0])},e[20]=o,e[21]=f):f=e[21];const S=n.label;let I;e[22]!==n.options?(I=n.options??[],e[22]=n.options,e[23]=I):I=e[23];let C;if(e[24]!==r||e[25]!==I){let N;e[27]!==r?(N=y=>s.jsx(Ce,{value:y.value,disabled:r,className:"w-full justify-start px-3",children:y.label},y.value),e[27]=r,e[28]=N):N=e[28],C=I.map(N),e[24]=r,e[25]=I,e[26]=C}else C=e[26];let T;e[29]!==n.label||e[30]!==t||e[31]!==g||e[32]!==f||e[33]!==C?(T=s.jsx(Fe,{id:t,value:g,onValueChange:f,orientation:"vertical",variant:"outline",size:"sm",className:"w-full items-stretch","aria-label":S,children:C}),e[29]=n.label,e[30]=t,e[31]=g,e[32]=f,e[33]=C,e[34]=T):T=e[34];let v;return e[35]!==a||e[36]!==T?(v=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[a,T]}),e[35]=a,e[36]=T,e[37]=v):v=e[37],v}let c;e[38]!==n?(c=s.jsx(Le,{field:n}),e[38]=n,e[39]=c):c=e[39];let d;e[40]!==t||e[41]!==c?(d=s.jsx(Me,{htmlFor:t,children:c}),e[40]=t,e[41]=c,e[42]=d):d=e[42];const p=n.type==="string"?"text":"number",u=typeof i=="string"?i:"";let x;e[43]!==o?(x=h=>o(h.target.value),e[43]=o,e[44]=x):x=e[44];let j;e[45]!==r||e[46]!==n.label||e[47]!==t||e[48]!==p||e[49]!==u||e[50]!==x?(j=s.jsx(He,{id:t,"aria-label":n.label,type:p,value:u,disabled:r,onChange:x}),e[45]=r,e[46]=n.label,e[47]=t,e[48]=p,e[49]=u,e[50]=x,e[51]=j):j=e[51];let m;return e[52]!==d||e[53]!==j?(m=s.jsxs("div",{className:"flex flex-col gap-1.5",children:[d,j]}),e[52]=d,e[53]=j,e[54]=m):m=e[54],m}function Le(l){const e=B.c(8),{field:t}=l;let n;e[0]!==t.required?(n=t.required&&s.jsx("span",{className:"ml-0.5 text-warning",children:"*"}),e[0]=t.required,e[1]=n):n=e[1];let i;e[2]!==t.description?(i=t.description&&s.jsx("span",{className:"block text-xs font-normal text-muted-foreground",children:t.description}),e[2]=t.description,e[3]=i):i=e[3];let r;return e[4]!==t.label||e[5]!==n||e[6]!==i?(r=s.jsxs("span",{className:"min-w-0",children:[t.label,n,i]}),e[4]=t.label,e[5]=n,e[6]=i,e[7]=r):r=e[7],r}function Oe(l){const e=B.c(8),{server:t,children:n}=l;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx(St,{className:"text-info"}),e[0]=i):i=e[0];let r;e[1]!==t?(r=s.jsxs(Ie,{children:[t," needs input"]}),e[1]=t,e[2]=r):r=e[2];let o;e[3]!==n?(o=s.jsx("div",{className:"col-start-2 mt-1 min-w-0",children:n}),e[3]=n,e[4]=o):o=e[4];let c;return e[5]!==r||e[6]!==o?(c=s.jsxs(qe,{className:"border-info/40 bg-info/5",children:[i,r,o]}),e[5]=r,e[6]=o,e[7]=c):c=e[7],c}const Pt=["allow","allow_always","deny"],Gt=[{decision:"allow",label:"Allow",variant:"default"},{decision:"deny",label:"Deny",variant:"destructive"},{decision:"allow_always",label:"Always",variant:"outline"}];function Qt(l,e){return(l.availableDecisions??Pt).includes(e)}function Ht(l){const e=B.c(22),{request:t,queued:n,responding:i,onRespond:r}=l;let o;if(e[0]!==r||e[1]!==n||e[2]!==t||e[3]!==i){let c;e[5]!==t?(c=S=>Qt(t,S.decision),e[5]=t,e[6]=c):c=e[6];const d=Gt.filter(c),p=d.some(Kt);let u;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(Ye,{className:"text-warning"}),e[7]=u):u=e[7];const x=t.title||`Allow ${t.toolName}?`;let j;e[8]!==x?(j=s.jsx("span",{className:"min-w-0 flex-1 truncate",children:x}),e[8]=x,e[9]=j):j=e[9];let m;e[10]!==n?(m=n>0&&s.jsxs("span",{className:"shrink-0 font-mono text-xs text-warning",children:["+",n]}),e[10]=n,e[11]=m):m=e[11];let h;e[12]!==j||e[13]!==m?(h=s.jsxs(Ie,{className:"flex min-w-0 items-center gap-2",children:[j,m]}),e[12]=j,e[13]=m,e[14]=h):h=e[14];let a;e[15]!==t.toolName?(a=s.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:t.toolName}),e[15]=t.toolName,e[16]=a):a=e[16];let g;e[17]!==t.summary?(g=t.summary&&s.jsx("code",{className:"min-w-0 flex-1 truncate rounded bg-muted px-2 py-1 font-mono text-xs text-foreground",children:t.summary}),e[17]=t.summary,e[18]=g):g=e[18];let f;e[19]!==a||e[20]!==g?(f=s.jsxs("div",{className:"col-start-2 mt-2 flex min-w-0 items-center gap-2",children:[a,g]}),e[19]=a,e[20]=g,e[21]=f):f=e[21],o=s.jsxs(qe,{className:"border-warning/40 bg-warning/5",children:[u,h,f,p?s.jsx("div",{className:"col-start-2 mt-3 flex items-center gap-2",children:d.map(S=>{const{decision:I,label:C,variant:T}=S;return s.jsx(V,{size:"xs",variant:T,disabled:i,onClick:()=>r(t.requestId,I),children:C},I)})}):s.jsx("p",{className:"col-start-2 mt-2 text-xs text-warning",children:"Resolve this approval in its own provider"})]}),e[0]=r,e[1]=n,e[2]=t,e[3]=i,e[4]=o}else o=e[4];return o}function Kt(l){return l.decision!=="allow_always"}function Wt(l){return l.some(e=>e.options.length===0||e.options.some(t=>t.hasPreview))}function Xt(l){const e=B.c(63),{request:t,responding:n,gone:i,onAnswer:r,onOpenSession:o}=l,c=t.questions,[d,p]=z.useState(0);let u;e[0]===Symbol.for("react.memo_cache_sentinel")?(u={},e[0]=u):u=e[0];const x=z.useRef(u);let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j=new Set,e[1]=j):j=e[1];const[m,h]=z.useState(j);if(c.length===0)return null;if(Wt(c)){let w;e[2]!==c[0].question?(w=s.jsx("p",{className:"text-sm leading-relaxed text-foreground",children:c[0].question}),e[2]=c[0].question,e[3]=w):w=e[3];let $;e[4]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(De,{"data-icon":"inline-end"}),e[4]=$):$=e[4];let A;e[5]!==o?(A=s.jsxs(V,{variant:"outline",size:"sm",onClick:o,className:"mt-3",children:["Open full question",$]}),e[5]=o,e[6]=A):A=e[6];let P;return e[7]!==w||e[8]!==A?(P=s.jsxs(Ve,{children:[w,A]}),e[7]=w,e[8]=A,e[9]=P):P=e[9],P}const a=c[d];let g;e[10]!==a.question||e[11]!==d||e[12]!==r||e[13]!==c.length||e[14]!==t.toolUseId?(g=function($){const A={...x.current,[a.question]:$};if(d+1<c.length){x.current=A,h(new Set),p(d+1);return}r(t.toolUseId,A)},e[10]=a.question,e[11]=d,e[12]=r,e[13]=c.length,e[14]=t.toolUseId,e[15]=g):g=e[15];const f=g;let S;e[16]!==a.header?(S=a.header&&s.jsx(Te,{variant:"outline",className:"border-info/40 text-info",children:a.header}),e[16]=a.header,e[17]=S):S=e[17];let I;e[18]!==d||e[19]!==c.length?(I=c.length>1&&s.jsxs("span",{className:"ml-auto shrink-0 font-mono text-xs text-muted-foreground",children:[d+1," of ",c.length]}),e[18]=d,e[19]=c.length,e[20]=I):I=e[20];let C;e[21]!==S||e[22]!==I?(C=s.jsxs("div",{className:"flex items-baseline gap-1.5",children:[S,I]}),e[21]=S,e[22]=I,e[23]=C):C=e[23];let T;e[24]!==a.question?(T=s.jsx("p",{className:"mt-2 line-clamp-3 text-sm leading-relaxed text-foreground",title:a.question,children:a.question}),e[24]=a.question,e[25]=T):T=e[25];let v;e[26]!==m?(v=[...m],e[26]=m,e[27]=v):v=e[27];let N;e[28]!==f||e[29]!==a.multiSelect?(N=w=>{a.multiSelect?h(new Set(w)):w[0]&&f(w[0])},e[28]=f,e[29]=a.multiSelect,e[30]=N):N=e[30];const y=a.multiSelect,q=a.question;let b;if(e[31]!==a.options||e[32]!==n){let w;e[34]!==n?(w=$=>s.jsx(Jt,{option:$,disabled:n},$.label),e[34]=n,e[35]=w):w=e[35],b=a.options.map(w),e[31]=a.options,e[32]=n,e[33]=b}else b=e[33];let M;e[36]!==a.multiSelect||e[37]!==a.question||e[38]!==b||e[39]!==v||e[40]!==N?(M=s.jsx(Fe,{value:v,onValueChange:N,multiple:y,orientation:"vertical",variant:"outline",size:"sm",className:"mt-3 w-full items-stretch","aria-label":q,children:b}),e[36]=a.multiSelect,e[37]=a.question,e[38]=b,e[39]=v,e[40]=N,e[41]=M):M=e[41];let L;e[42]!==f||e[43]!==a.multiSelect||e[44]!==d||e[45]!==c.length||e[46]!==n||e[47]!==m?(L=a.multiSelect&&s.jsx(V,{size:"sm",disabled:n||m.size===0,onClick:()=>f(We(m)),children:d+1<c.length?"Next":"Send"}),e[42]=f,e[43]=a.multiSelect,e[44]=d,e[45]=c.length,e[46]=n,e[47]=m,e[48]=L):L=e[48];let k;e[49]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx(De,{"data-icon":"inline-end"}),e[49]=k):k=e[49];let D;e[50]!==o?(D=s.jsxs(V,{variant:"ghost",size:"sm",onClick:o,className:"ml-auto text-muted-foreground",children:["Open session",k]}),e[50]=o,e[51]=D):D=e[51];let E;e[52]!==L||e[53]!==D?(E=s.jsxs("div",{className:"mt-3 flex items-center gap-2",children:[L,D]}),e[52]=L,e[53]=D,e[54]=E):E=e[54];let _;e[55]!==i?(_=i&&s.jsx("p",{className:"mt-2 text-xs text-warning",children:"This question may already be answered. Open the session to check."}),e[55]=i,e[56]=_):_=e[56];let O;return e[57]!==M||e[58]!==E||e[59]!==_||e[60]!==C||e[61]!==T?(O=s.jsxs(Ve,{children:[C,T,M,E,_]}),e[57]=M,e[58]=E,e[59]=_,e[60]=C,e[61]=T,e[62]=O):O=e[62],O}function Jt(l){const e=B.c(17),{option:t,disabled:n}=l;let i;e[0]!==t.label?(i=s.jsx("span",{className:"min-w-0 flex-1 truncate text-left",children:t.label}),e[0]=t.label,e[1]=i):i=e[1];const r=i;if(!t.description){let u;return e[2]!==n||e[3]!==r||e[4]!==t.label?(u=s.jsx(Ce,{value:t.label,disabled:n,className:"w-full justify-start px-3",children:r}),e[2]=n,e[3]=r,e[4]=t.label,e[5]=u):u=e[5],u}let o;e[6]!==n||e[7]!==t.label?(o=s.jsx(Ce,{value:t.label,disabled:n,className:"w-full justify-start px-3"}),e[6]=n,e[7]=t.label,e[8]=o):o=e[8];let c;e[9]!==r||e[10]!==o?(c=s.jsx(Je,{render:o,children:r}),e[9]=r,e[10]=o,e[11]=c):c=e[11];let d;e[12]!==t.description?(d=s.jsx(Xe,{side:"right",className:"max-w-72 text-left",children:t.description}),e[12]=t.description,e[13]=d):d=e[13];let p;return e[14]!==c||e[15]!==d?(p=s.jsxs(Ze,{children:[c,d]}),e[14]=c,e[15]=d,e[16]=p):p=e[16],p}function Ve(l){const e=B.c(4),{children:t}=l;let n,i;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ye,{className:"text-info"}),i=s.jsx(Ie,{children:"Answer to continue"}),e[0]=n,e[1]=i):(n=e[0],i=e[1]);let r;return e[2]!==t?(r=s.jsxs(qe,{className:"border-info/40 bg-info/5",children:[n,i,s.jsx("div",{className:"col-start-2 mt-1 min-w-0",children:t})]}),e[2]=t,e[3]=r):r=e[3],r}function Zt(l){const e=B.c(33),{request:t,responding:n,onChoose:i}=l;let r,o;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(Ye,{className:"text-warning"}),o=s.jsx(Ie,{children:"Claude declined this request"}),e[0]=r,e[1]=o):(r=e[0],o=e[1]);let c;e[2]!==t.originalModel?(c=s.jsxs("p",{className:"text-sm leading-relaxed text-foreground",children:[t.originalModel," would not answer. Retrying on a fallback model may work."]}),e[2]=t.originalModel,e[3]=c):c=e[3];let d;e[4]!==t.guidanceText?(d=t.guidanceText&&s.jsx("p",{className:"mt-1 text-sm leading-relaxed text-muted-foreground",children:t.guidanceText}),e[4]=t.guidanceText,e[5]=d):d=e[5];let p;e[6]!==i||e[7]!==t.requestId?(p=()=>i(t.requestId,"retry_fallback"),e[6]=i,e[7]=t.requestId,e[8]=p):p=e[8];let u;e[9]!==t.fallbackModel||e[10]!==n||e[11]!==p?(u=s.jsxs(V,{size:"sm",disabled:n,onClick:p,children:["Retry on ",t.fallbackModel]}),e[9]=t.fallbackModel,e[10]=n,e[11]=p,e[12]=u):u=e[12];let x;e[13]!==i||e[14]!==t.requestId?(x=()=>i(t.requestId,"edit_prompt"),e[13]=i,e[14]=t.requestId,e[15]=x):x=e[15];let j;e[16]!==n||e[17]!==x?(j=s.jsx(V,{variant:"outline",size:"sm",disabled:n,onClick:x,children:"Edit prompt"}),e[16]=n,e[17]=x,e[18]=j):j=e[18];let m;e[19]!==i||e[20]!==t.requestId?(m=()=>i(t.requestId,"cancelled"),e[19]=i,e[20]=t.requestId,e[21]=m):m=e[21];let h;e[22]!==n||e[23]!==m?(h=s.jsx(V,{variant:"ghost",size:"sm",disabled:n,className:"ml-auto text-muted-foreground",onClick:m,children:"Dismiss"}),e[22]=n,e[23]=m,e[24]=h):h=e[24];let a;e[25]!==h||e[26]!==u||e[27]!==j?(a=s.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[u,j,h]}),e[25]=h,e[26]=u,e[27]=j,e[28]=a):a=e[28];let g;return e[29]!==a||e[30]!==c||e[31]!==d?(g=s.jsxs(qe,{className:"border-warning/40 bg-warning/5",children:[r,o,s.jsxs("div",{className:"col-start-2 mt-1 min-w-0",children:[c,d,a]})]}),e[29]=a,e[30]=c,e[31]=d,e[32]=g):g=e[32],g}function Be(l){return l==="awaiting_approval"||l==="awaiting_prompt"||l==="awaiting_question"||l==="awaiting_answer"}function Ae(l){return l==="done"||l==="failed"}const Ue={awaiting_approval:0,awaiting_prompt:1,awaiting_question:2,awaiting_answer:3,running:4,failed:5,done:6};function es(l,e,t,n,i){return t?"awaiting_approval":n?"awaiting_prompt":i?"awaiting_question":l.agentStatus==="deferred"||l.agentStatus==="idle"&&e?"awaiting_answer":l.agentTerminalReason?"failed":e&&l.agentStatus&&st.has(l.agentStatus)?"running":"done"}const ts=6;function ss({sessions:l,procBySession:e,summaries:t,permissionsBySession:n,questionsBySession:i,elicitationsBySession:r,dialogsBySession:o,newlyCompleted:c,finishedLimit:d=ts,now:p=Date.now()}){const u=[];for(const m of et(l)){const h=n.get(m.sessionId)??[],a=i.get(m.sessionId)??[],g=r.get(m.sessionId)??[],f=o.get(m.sessionId)??[],S=h.length+a.length+g.length+f.length;m.teamName&&m.agentName&&S===0||u.push({session:m,state:es(m,tt(m,e,p),h.length>0,g.length>0||f.length>0,a.length>0),summary:t.get(m.sessionId)??null,permissions:h,questions:a,elicitations:g,dialogs:f})}const x=u.filter(m=>Ae(m.state)),j=[...x.filter(m=>c.has(m.session.sessionId)),...x.filter(m=>!c.has(m.session.sessionId))].slice(0,d);return[...u.filter(m=>!Ae(m.state)),...j].sort((m,h)=>Ue[m.state]-Ue[h.state])}function ns(l,e){switch(e){case"running":return l.filter(t=>t.state==="running");case"needs-you":return l.filter(t=>Be(t.state));case"finished":return l.filter(t=>Ae(t.state));default:return l}}function is(l){const e={total:l.length,running:0,needsYou:0,finished:0,failed:0};for(const t of l)t.state==="running"&&e.running++,Be(t.state)&&e.needsYou++,Ae(t.state)&&e.finished++,t.state==="failed"&&e.failed++;return e}function ls(l){return l>=90?"text-destructive":l>=70?"text-warning":"text-muted-foreground"}const os={awaiting_approval:{label:"Waiting for approval",text:"text-warning",shell:"border-warning/40 bg-warning/5",icon:ye},awaiting_prompt:{label:"Waiting for your input",text:"text-info",shell:"border-info/40 bg-info/5",icon:ye},awaiting_question:{label:"Waiting for your answer",text:"text-info",shell:"border-info/40 bg-info/5",icon:ye},awaiting_answer:{label:"Waiting for your answer",text:"text-warning",shell:"border-warning/40 bg-warning/5",icon:ye},running:{label:"Running",text:"text-info",shell:"border-border",icon:null},done:{label:"Done",text:"text-success",shell:"border-border",icon:qt},failed:{label:"Failed",text:"text-destructive",shell:"border-destructive/40",icon:It}};function as(l){const e=B.c(3),{icon:t}=l;if(!t){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("span",{className:"size-2 shrink-0 rounded-full bg-info"}),e[0]=i):i=e[0],i}let n;return e[1]!==t?(n=s.jsx(t,{className:"size-3.5 shrink-0"}),e[1]=t,e[2]=n):n=e[2],n}const rs=z.memo(function(e){const t=B.c(88),{card:n,customName:i,projectLabel:r,responding:o,goneQuestions:c,compact:d,onOpen:p,onRespond:u,onAnswerQuestion:x,onAnswerElicitation:j,onChooseDialog:m}=e,h=d===void 0?!1:d,{session:a,state:g,summary:f,permissions:S,questions:I,elicitations:C,dialogs:T}=n,v=os[g],N=S[0],y=I[0],q=C[0],b=T[0],M=!!(N||y||q||b);let L;t[0]!==i||t[1]!==a?(L=nt(a,i),t[0]=i,t[1]=a,t[2]=L):L=t[2];const k=L,D=h&&"gap-1.5 py-2";let E;t[3]!==v.shell||t[4]!==D?(E=ue("motion-card motion-list-item group flex min-w-0 flex-col gap-2 rounded-lg border bg-card p-3 text-left transition-colors hover:border-foreground/20",v.shell,D),t[3]=v.shell,t[4]=D,t[5]=E):E=t[5];const _=`Open session ${k}`;let O;t[6]!==r?(O=s.jsx("span",{className:"min-w-0 flex-1 truncate font-mono text-xs text-muted-foreground",children:r}),t[6]=r,t[7]=O):O=t[7];let w;t[8]!==f?(w=(f==null?void 0:f.model)&&s.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:it(f.model)}),t[8]=f,t[9]=w):w=t[9];let $;t[10]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(De,{"data-icon":"inline-end",className:"shrink-0 text-transparent transition-colors group-hover:text-muted-foreground"}),t[10]=$):$=t[10];let A;t[11]!==O||t[12]!==w?(A=s.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[O,w,$]}),t[11]=O,t[12]=w,t[13]=A):A=t[13];const P=h?"truncate":"line-clamp-2";let G;t[14]!==P?(G=ue("text-sm font-medium leading-snug text-foreground",P),t[14]=P,t[15]=G):G=t[15];let ne;t[16]!==G||t[17]!==k?(ne=s.jsx("span",{className:G,children:k}),t[16]=G,t[17]=k,t[18]=ne):ne=t[18];let ie;t[19]!==p||t[20]!==ne||t[21]!==_||t[22]!==A?(ie=s.jsxs(V,{variant:"ghost",onClick:p,className:"-m-1 h-auto min-w-0 flex-col items-stretch justify-start gap-1 whitespace-normal p-1 text-left","aria-label":_,children:[A,ne]}),t[19]=p,t[20]=ne,t[21]=_,t[22]=A,t[23]=ie):ie=t[23];let le;t[24]!==v.text?(le=ue("flex items-center gap-1.5 text-xs font-medium",v.text),t[24]=v.text,t[25]=le):le=t[25];let se;t[26]!==v.icon?(se=s.jsx(as,{icon:v.icon}),t[26]=v.icon,t[27]=se):se=t[27];let oe;t[28]!==v.label?(oe=s.jsx("span",{className:"truncate",children:v.label}),t[28]=v.label,t[29]=oe):oe=t[29];const re=a.lastActivityAt||a.lastModified;let ae;t[30]!==re?(ae=lt(re),t[30]=re,t[31]=ae):ae=t[31];let Q;t[32]!==ae?(Q=s.jsx("span",{className:"ml-auto shrink-0 font-mono text-xs font-normal text-muted-foreground",children:ae}),t[32]=ae,t[33]=Q):Q=t[33];let H;t[34]!==le||t[35]!==se||t[36]!==oe||t[37]!==Q?(H=s.jsxs("div",{className:le,children:[se,oe,Q]}),t[34]=le,t[35]=se,t[36]=oe,t[37]=Q,t[38]=H):H=t[38];let K;t[39]!==u||t[40]!==S.length||t[41]!==N||t[42]!==o||t[43]!==a.sessionId?(K=N&&s.jsx(Ht,{request:N,queued:S.length-1,responding:o.has(N.requestId),onRespond:(U,Y)=>u(a.sessionId,U,Y)}),t[39]=u,t[40]=S.length,t[41]=N,t[42]=o,t[43]=a.sessionId,t[44]=K):K=t[44];let W;t[45]!==b||t[46]!==m||t[47]!==N||t[48]!==o||t[49]!==a.sessionId?(W=!N&&b&&s.jsx(Zt,{request:b,responding:o.has(b.requestId),onChoose:(U,Y)=>m(a.sessionId,U,Y)},b.requestId),t[45]=b,t[46]=m,t[47]=N,t[48]=o,t[49]=a.sessionId,t[50]=W):W=t[50];let X;t[51]!==b||t[52]!==q||t[53]!==j||t[54]!==N||t[55]!==o||t[56]!==a.sessionId?(X=!N&&!b&&q&&s.jsx(Yt,{request:q,responding:o.has(q.requestId),onAnswer:(U,Y)=>j(a.sessionId,U,Y)},q.requestId),t[51]=b,t[52]=q,t[53]=j,t[54]=N,t[55]=o,t[56]=a.sessionId,t[57]=X):X=t[57];let J;t[58]!==b||t[59]!==q||t[60]!==c||t[61]!==x||t[62]!==p||t[63]!==y||t[64]!==N||t[65]!==o||t[66]!==a.sessionId?(J=!N&&!b&&!q&&y&&s.jsx(Xt,{request:y,responding:o.has(y.toolUseId),gone:c.has(y.toolUseId),onAnswer:(U,Y)=>x(a.sessionId,U,Y),onOpenSession:p},y.toolUseId),t[58]=b,t[59]=q,t[60]=c,t[61]=x,t[62]=p,t[63]=y,t[64]=N,t[65]=o,t[66]=a.sessionId,t[67]=J):J=t[67];let Z;t[68]!==M||t[69]!==f?(Z=!M&&(f==null?void 0:f.currentTool)&&s.jsx(cs,{tool:f.currentTool}),t[68]=M,t[69]=f,t[70]=Z):Z=t[70];let ee;t[71]!==M||t[72]!==h||t[73]!==f?(ee=!h&&!M&&(f==null?void 0:f.lastAssistantText)&&s.jsx("p",{className:"line-clamp-4 text-sm leading-relaxed text-muted-foreground",children:f.lastAssistantText}),t[71]=M,t[72]=h,t[73]=f,t[74]=ee):ee=t[74];let te;t[75]!==f?(te=f&&s.jsx(ds,{summary:f}),t[75]=f,t[76]=te):te=t[76];let ce;return t[77]!==ie||t[78]!==H||t[79]!==K||t[80]!==W||t[81]!==X||t[82]!==J||t[83]!==Z||t[84]!==ee||t[85]!==te||t[86]!==E?(ce=s.jsxs("div",{className:E,children:[ie,H,K,W,X,J,Z,ee,te]}),t[77]=ie,t[78]=H,t[79]=K,t[80]=W,t[81]=X,t[82]=J,t[83]=Z,t[84]=ee,t[85]=te,t[86]=E,t[87]=ce):ce=t[87],ce});function cs(l){const e=B.c(7),{tool:t}=l;let n;e[0]!==t.name?(n=s.jsx("span",{className:"shrink-0 font-mono text-xs text-muted-foreground",children:t.name}),e[0]=t.name,e[1]=n):n=e[1];let i;e[2]!==t.summary?(i=s.jsx("code",{className:"min-w-0 flex-1 truncate font-mono text-xs text-foreground/80",children:t.summary}),e[2]=t.summary,e[3]=i):i=e[3];let r;return e[4]!==n||e[5]!==i?(r=s.jsxs("div",{className:"flex min-w-0 items-center gap-2 rounded-md bg-muted/50 px-2.5 py-2",children:[n,i]}),e[4]=n,e[5]=i,e[6]=r):r=e[6],r}function ds(l){const e=B.c(11),{summary:t}=l,n=t.filesTotal,i=t.context,r=n.count>0,o=i!==null&&i.used>0;if(!r&&!o)return null;let c;e[0]!==n.additions||e[1]!==n.count||e[2]!==n.deletions||e[3]!==r?(c=r&&s.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[s.jsxs("span",{className:"truncate",children:[n.count," file",n.count===1?"":"s"]}),s.jsx(ot,{add:n.additions,del:n.deletions})]}),e[0]=n.additions,e[1]=n.count,e[2]=n.deletions,e[3]=r,e[4]=c):c=e[4];let d;e[5]!==i||e[6]!==o?(d=o&&s.jsxs("span",{className:ue("ml-auto shrink-0",ls(i.percent)),children:["ctx ",i.percent,"%"]}),e[5]=i,e[6]=o,e[7]=d):d=e[7];let p;return e[8]!==c||e[9]!==d?(p=s.jsxs("div",{className:"mt-auto flex items-center gap-2 border-t pt-2 font-mono text-xs text-muted-foreground",children:[c,d]}),e[8]=c,e[9]=d,e[10]=p):p=e[10],p}const us=8e3,fs=12,ms="Start Claude Code or Codex and every session shows up here",xs=[{id:"all",label:"All"},{id:"running",label:"Running"},{id:"needs-you",label:"Needs you"},{id:"finished",label:"Finished"}],hs=[{id:"grid",label:"Grid layout",Icon:_t},{id:"list",label:"List layout",Icon:Tt}];function vs(l){const e=B.c(117),{onSelectSession:t}=l,{sessions:n,procBySession:i,newlyCompleted:r,refresh:o}=at(),{summaries:c,loading:d,error:p,refresh:u}=Rt(),{permissionsBySession:x,questionsBySession:j,elicitationsBySession:m,dialogsBySession:h,responding:a,respond:g,answerQuestion:f,answerElicitation:S,answerDialog:I,refresh:C}=rt();let T;e[0]===Symbol.for("react.memo_cache_sentinel")?(T=new Set,e[0]=T):T=e[0];const[v,N]=z.useState(T),{names:y}=ct(),{names:q}=dt(),[b,M]=z.useState("all");let L;e[1]===Symbol.for("react.memo_cache_sentinel")?(L=ut("mission-control-layout"),e[1]=L):L=e[1];const[k,D]=ft(L,"grid");let E;e[2]!==h||e[3]!==m||e[4]!==r||e[5]!==x||e[6]!==i||e[7]!==j||e[8]!==n||e[9]!==c?(E=ss({sessions:n,procBySession:i,summaries:c,permissionsBySession:x,questionsBySession:j,elicitationsBySession:m,dialogsBySession:h,newlyCompleted:r}),e[2]=h,e[3]=m,e[4]=r,e[5]=x,e[6]=i,e[7]=j,e[8]=n,e[9]=c,e[10]=E):E=e[10];const _=E;let O;e[11]!==_?(O=is(_),e[11]=_,e[12]=O):O=e[12];const w=O;let $;e[13]!==_||e[14]!==b?($=ns(_,b),e[13]=_,e[14]=b,e[15]=$):$=e[15];const A=$;let P;e[16]!==C||e[17]!==o||e[18]!==u?(P=()=>{o(),u(),C()},e[16]=C,e[17]=o,e[18]=u,e[19]=P):P=e[19];const G=P;let ne,ie;e[20]!==o?(ne=()=>{const F=setInterval(()=>{document.visibilityState==="visible"&&o()},us);return()=>clearInterval(F)},ie=[o],e[20]=o,e[21]=ne,e[22]=ie):(ne=e[21],ie=e[22]),z.useEffect(ne,ie);let le;e[23]!==f?(le=async(F,R,Re)=>{(await f(F,R,Re)).ok||N(Pe=>new Set(Pe).add(R))},e[23]=f,e[24]=le):le=e[24];const se=le;let oe;e[25]!==_.length?(oe=function(R){_.length<=fs?zt(R,{kind:"fade"}):z.startTransition(R)},e[25]=_.length,e[26]=oe):oe=e[26];const re=oe;let ae;e[27]===Symbol.for("react.memo_cache_sentinel")?(ae=s.jsx("h2",{className:"truncate text-sm font-semibold",children:"Mission Control"}),e[27]=ae):ae=e[27];let Q;e[28]!==w.total?(Q=s.jsx(Te,{variant:"secondary",children:w.total}),e[28]=w.total,e[29]=Q):Q=e[29];let H;e[30]!==w.needsYou?(H=w.needsYou>0&&s.jsxs(Te,{variant:"outline",className:"border-warning/40 text-warning",children:[w.needsYou," need you"]}),e[30]=w.needsYou,e[31]=H):H=e[31];let K;e[32]!==w.failed?(K=w.failed>0&&s.jsxs(Te,{variant:"destructive",children:[w.failed," failed"]}),e[32]=w.failed,e[33]=K):K=e[33];let W;e[34]!==Q||e[35]!==H||e[36]!==K?(W=s.jsxs("div",{className:"flex min-w-0 items-center gap-2",children:[ae,Q,H,K]}),e[34]=Q,e[35]=H,e[36]=K,e[37]=W):W=e[37];let X;e[38]!==b?(X=[b],e[38]=b,e[39]=X):X=e[39];let J;e[40]!==b||e[41]!==re?(J=F=>{const R=F.at(-1);R&&R!==b&&re(()=>M(R))},e[40]=b,e[41]=re,e[42]=J):J=e[42];let Z;e[43]!==w.needsYou?(Z=xs.map(F=>s.jsxs(Ce,{value:F.id,"aria-label":`Show ${F.label.toLowerCase()} sessions`,children:[F.label,F.id==="needs-you"&&w.needsYou>0&&s.jsx("span",{className:"font-mono text-warning",children:w.needsYou})]},F.id)),e[43]=w.needsYou,e[44]=Z):Z=e[44];let ee;e[45]!==X||e[46]!==J||e[47]!==Z?(ee=s.jsx(Fe,{value:X,onValueChange:J,variant:"outline",size:"sm",spacing:0,"aria-label":"Filter sessions",children:Z}),e[45]=X,e[46]=J,e[47]=Z,e[48]=ee):ee=e[48];let te;e[49]!==k||e[50]!==D||e[51]!==re?(te=hs.map(F=>{const{id:R,label:Re,Icon:ze}=F;return s.jsx(V,{variant:"ghost",size:"icon-xs","aria-label":Re,"aria-pressed":k===R,onClick:()=>{R!==k&&re(()=>D(R))},className:ue(k===R&&"bg-accent text-accent-foreground"),children:s.jsx(ze,{"data-icon":"inline-start"})},R)}),e[49]=k,e[50]=D,e[51]=re,e[52]=te):te=e[52];const ce=d&&"animate-spin";let U;e[53]!==ce?(U=ue(ce),e[53]=ce,e[54]=U):U=e[54];let Y;e[55]!==U?(Y=s.jsx(kt,{"data-icon":"inline-start",className:U}),e[55]=U,e[56]=Y):Y=e[56];let fe;e[57]!==G||e[58]!==Y?(fe=s.jsx(V,{variant:"ghost",size:"icon-xs","aria-label":"Refresh Mission Control",onClick:G,children:Y}),e[57]=G,e[58]=Y,e[59]=fe):fe=e[59];let me;e[60]!==te||e[61]!==fe?(me=s.jsxs("div",{className:"flex items-center gap-1",children:[te,fe]}),e[60]=te,e[61]=fe,e[62]=me):me=e[62];let xe;e[63]!==ee||e[64]!==me?(xe=s.jsxs("div",{className:"ml-auto flex items-center gap-2",children:[ee,me]}),e[63]=ee,e[64]=me,e[65]=xe):xe=e[65];let he;e[66]!==W||e[67]!==xe?(he=s.jsxs("header",{className:"flex min-h-12 shrink-0 flex-wrap items-center gap-3 border-b px-4 py-2",children:[W,xe]}),e[66]=W,e[67]=xe,e[68]=he):he=e[68];let ge;e[69]!==p||e[70]!==G?(ge=p&&s.jsxs(qe,{variant:"destructive",className:"mb-4",children:[s.jsx(At,{}),s.jsx(Ie,{children:"Mission Control could not refresh"}),s.jsx(jt,{className:"truncate",children:p}),s.jsx(wt,{children:s.jsx(V,{variant:"outline",size:"xs",onClick:G,children:"Retry"})})]}),e[69]=p,e[70]=G,e[71]=ge):ge=e[71];let pe;e[72]!==_.length||e[73]!==b||e[74]!==d||e[75]!==A.length?(pe=A.length===0&&!d&&s.jsx(mt,{className:"min-h-64",children:s.jsxs(xt,{children:[s.jsx(ht,{variant:"icon",children:s.jsx(Ct,{})}),s.jsx(gt,{children:_.length===0?"No live sessions":`Nothing matches "${b}"`}),s.jsx(pt,{children:_.length===0?ms:"Try a different filter."})]})}),e[72]=_.length,e[73]=b,e[74]=d,e[75]=A.length,e[76]=pe):pe=e[76];let be;e[77]!==_.length||e[78]!==d||e[79]!==A.length?(be=A.length===0&&d&&_.length===0&&s.jsxs("div",{className:"flex items-center justify-center gap-2 py-16 text-sm text-muted-foreground",children:[s.jsx(bt,{}),"Loading sessions…"]}),e[77]=_.length,e[78]=d,e[79]=A.length,e[80]=be):be=e[80];const Ee=k==="grid"&&"md:grid-cols-2 2xl:grid-cols-3";let je;e[81]!==Ee?(je=ue("grid grid-cols-1 gap-3",Ee),e[81]=Ee,e[82]=je):je=e[82];let we;if(e[83]!==I||e[84]!==S||e[85]!==v||e[86]!==se||e[87]!==k||e[88]!==t||e[89]!==q||e[90]!==g||e[91]!==a||e[92]!==y||e[93]!==A){let F;e[95]!==I||e[96]!==S||e[97]!==v||e[98]!==se||e[99]!==k||e[100]!==t||e[101]!==q||e[102]!==g||e[103]!==a||e[104]!==y?(F=R=>s.jsx(rs,{card:R,compact:k==="list",customName:y[R.session.sessionId],projectLabel:q[R.session.dirName]??vt(R.session),responding:a,goneQuestions:v,onOpen:()=>t(R.session.dirName,R.session.fileName),onRespond:g,onAnswerQuestion:se,onAnswerElicitation:S,onChooseDialog:I},R.session.sessionId),e[95]=I,e[96]=S,e[97]=v,e[98]=se,e[99]=k,e[100]=t,e[101]=q,e[102]=g,e[103]=a,e[104]=y,e[105]=F):F=e[105],we=A.map(F),e[83]=I,e[84]=S,e[85]=v,e[86]=se,e[87]=k,e[88]=t,e[89]=q,e[90]=g,e[91]=a,e[92]=y,e[93]=A,e[94]=we}else we=e[94];let ve;e[106]!==je||e[107]!==we?(ve=s.jsx("div",{className:je,children:we}),e[106]=je,e[107]=we,e[108]=ve):ve=e[108];let Ne;e[109]!==ge||e[110]!==pe||e[111]!==be||e[112]!==ve?(Ne=s.jsx(Nt,{className:"flex-1",children:s.jsxs("div",{className:"p-4",children:[ge,pe,be,ve]})}),e[109]=ge,e[110]=pe,e[111]=be,e[112]=ve,e[113]=Ne):Ne=e[113];let _e;return e[114]!==he||e[115]!==Ne?(_e=s.jsxs("div",{className:"flex h-full min-h-0 flex-col",children:[he,Ne]}),e[114]=he,e[115]=Ne,e[116]=_e):_e=e[116],_e}export{vs as MissionControl};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{c as Y,j as t,r as h}from"./vendor-react-gGw_S5I_.js";import{T as Ke,a9 as ee,aC as te,aD as Q,m as Re,n as Ge,I as Me,aa as Qe,ab as Ye,aE as Ze,B as be,aF as et,av as tt,aw as st,w as Le,i as it,j as at,k as nt,aG as Be,aH as lt,aI as rt,a8 as ot,am as ct,h as dt,D as ut}from"./index-CNV6e3p0.js";import{Q as mt,U as ft,V as ht,W as xt,i as pt,h as gt,M as vt,Y as jt,_ as wt,F as bt,A as kt,$ as Nt,J as St,a0 as Ue,a1 as yt,a2 as Ct}from"./vendor-ui-BmLOQ5Or.js";import"./vendor-shiki-DOn6sF-i.js";import"./vendor-markdown-BE1gYnO9.js";function _t(s){const e=Y.c(11);let a,l,i;e[0]!==s?({className:a,size:i,...l}=s,e[0]=s,e[1]=a,e[2]=l,e[3]=i):(a=e[1],l=e[2],i=e[3]);const r=i===void 0?"default":i;let o;e[4]!==a?(o=Ke("peer group/switch relative inline-flex shrink-0 items-center rounded-full border border-transparent transition-all outline-none group-has-[:focus-visible]/field-label:border-transparent group-has-[:focus-visible]/field-label:ring-0 after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-[size=default]:h-[18.4px] data-[size=default]:w-[32px] data-[size=sm]:h-[14px] data-[size=sm]:w-[24px] dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:bg-primary data-unchecked:bg-input dark:data-unchecked:bg-input/80 data-disabled:cursor-not-allowed data-disabled:opacity-50",a),e[4]=a,e[5]=o):o=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(ft,{"data-slot":"switch-thumb",className:"pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 group-data-[size=default]/switch:data-checked:translate-x-[calc(100%-2px)] group-data-[size=sm]/switch:data-checked:translate-x-[calc(100%-2px)] dark:data-checked:bg-primary-foreground group-data-[size=default]/switch:data-unchecked:translate-x-0 group-data-[size=sm]/switch:data-unchecked:translate-x-0 dark:data-unchecked:bg-foreground"}),e[6]=u):u=e[6];let c;return e[7]!==l||e[8]!==r||e[9]!==o?(c=t.jsx(mt,{"data-slot":"switch","data-size":r,className:o,...l,children:u}),e[7]=l,e[8]=r,e[9]=o,e[10]=c):c=e[10],c}function At(s){const e=Y.c(3),{name:a}=s,l=a.toLowerCase();if(l.includes("iphone")||l.includes("android")){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(pt,{"data-icon":"inline-start",className:"size-4 text-muted-foreground"}),e[0]=r):r=e[0],r}if(l.includes("ipad")||l.includes("tablet")){let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(gt,{"data-icon":"inline-start",className:"size-4 text-muted-foreground"}),e[1]=r):r=e[1],r}let i;return e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(vt,{"data-icon":"inline-start",className:"size-4 text-muted-foreground"}),e[2]=i):i=e[2],i}function Ee(s){const e=Math.floor((Date.now()-s)/1e3);if(e<60)return"just now";const a=Math.floor(e/60);if(a<60)return`${a}m ago`;const l=Math.floor(a/60);return l<24?`${l}h ago`:`${Math.floor(l/24)}d ago`}function zt(s){const e=[`Shared ${Ee(s.createdAt)}`,s.lastAccessAt>0?`opened ${Ee(s.lastAccessAt)}`:"never opened"];return s.guests>0&&e.push(s.guests===1?"1 guest":`${s.guests} guests`),e.join(" · ")}function It(){const s=Y.c(12),{shares:e,revoke:a,revokeAll:l}=Ze();let i;s[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("p",{className:"text-xs text-muted-foreground",children:"Shared sessions"}),s[0]=i):i=s[0];let r;s[1]!==l||s[2]!==e.length?(r=e.length>0&&t.jsx(be,{variant:"ghost",size:"xs",className:"text-destructive hover:text-destructive",onClick:()=>void l(),children:"Revoke all"}),s[1]=l,s[2]=e.length,s[3]=r):r=s[3];let o;s[4]!==r?(o=t.jsxs("div",{className:"flex h-6 items-center justify-between",children:[i,r]}),s[4]=r,s[5]=o):o=s[5];let u;s[6]!==a||s[7]!==e?(u=e.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:"No sessions are shared."}):t.jsx("div",{className:"flex flex-col gap-1.5",children:e.map(g=>{const f=g.title||g.sessionId;return t.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-lg border px-3 py-2",children:[t.jsxs("div",{className:"min-w-0",children:[t.jsx("p",{className:"truncate text-sm text-foreground",children:f}),t.jsx("p",{className:"text-xs text-muted-foreground",children:zt(g)})]}),t.jsx(be,{variant:"ghost",size:"xs","aria-label":`Revoke share of ${f}`,className:"text-destructive hover:text-destructive",onClick:()=>void a(g.sessionId),children:"Revoke"})]},g.sessionId)})}),s[6]=a,s[7]=e,s[8]=u):u=s[8];let c;return s[9]!==o||s[10]!==u?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[o,u]}),s[9]=o,s[10]=u,s[11]=c):c=s[11],c}function Pt(s){const e=Y.c(30),{networkAccess:a,setNetworkAccess:l,networkPassword:i,setNetworkPassword:r,showNetworkPassword:o,setShowNetworkPassword:u,hasExistingPassword:c,initialNetworkAccess:g,connectedDevices:f,minPasswordLength:v}=s;let k;e[0]!==a?(k=a?t.jsx(jt,{"data-icon":"inline-start",className:"size-4 text-success"}):t.jsx(wt,{"data-icon":"inline-start",className:"size-4 text-muted-foreground"}),e[0]=a,e[1]=k):k=e[1];let S;e[2]===Symbol.for("react.memo_cache_sentinel")?(S=t.jsxs("div",{children:[t.jsx("p",{className:"text-sm font-medium text-foreground",children:"Network Access"}),t.jsx("p",{className:"text-xs text-muted-foreground",children:"Allow other devices to connect"})]}),e[2]=S):S=e[2];let N;e[3]!==k?(N=t.jsxs("div",{className:"flex items-center gap-2",children:[k,S]}),e[3]=k,e[4]=N):N=e[4];let j;e[5]!==l?(j=I=>l(I),e[5]=l,e[6]=j):j=e[6];let x;e[7]!==a||e[8]!==j?(x=t.jsx(_t,{"aria-label":"Network Access",checked:a,onCheckedChange:j}),e[7]=a,e[8]=j,e[9]=x):x=e[9];let w;e[10]!==N||e[11]!==x?(w=t.jsxs("div",{className:"flex items-center justify-between",children:[N,x]}),e[10]=N,e[11]=x,e[12]=w):w=e[12];let p;e[13]!==c||e[14]!==v||e[15]!==a||e[16]!==i||e[17]!==r||e[18]!==u||e[19]!==o?(p=a&&t.jsxs(ee,{"data-invalid":i.length>0&&i.length<v,children:[t.jsx(te,{htmlFor:"network-password",children:"Password"}),t.jsx(Q,{children:c&&i.length===0?"A password is already set. Leave blank to keep it.":`Use at least ${v} characters.`}),t.jsxs(Re,{children:[t.jsx(Ge,{id:"network-password",type:o?"text":"password",value:i,onChange:I=>r(I.target.value),placeholder:c?"Enter new password to change":"Set a password for remote access"}),t.jsx(Me,{align:"inline-end",children:t.jsx(Qe,{size:"icon-xs","aria-label":o?"Hide password":"Show password",onClick:()=>u(!o),children:o?t.jsx(ht,{"data-icon":"inline-start"}):t.jsx(xt,{"data-icon":"inline-start"})})})]}),i.length>0&&i.length<v&&t.jsxs(Ye,{children:["Password must be at least ",v," characters (",i.length,"/",v,")"]}),t.jsx(Q,{children:"Requires app restart. Remote browsers need an HTTPS reverse proxy; port 19384 remains available to Cogpit hubs and device clients."})]}),e[13]=c,e[14]=v,e[15]=a,e[16]=i,e[17]=r,e[18]=u,e[19]=o,e[20]=p):p=e[20];let d;e[21]!==f||e[22]!==g||e[23]!==a?(d=a&&g&&f.length>0&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("p",{className:"text-xs text-muted-foreground",children:"Connected devices"}),t.jsx("div",{className:"flex flex-col gap-1.5",children:f.map(Et)})]}),e[21]=f,e[22]=g,e[23]=a,e[24]=d):d=e[24];let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(It,{}),e[25]=z):z=e[25];let m;return e[26]!==w||e[27]!==p||e[28]!==d?(m=t.jsxs("div",{className:"flex flex-col gap-4 border-t pt-5",children:[w,p,d,z]}),e[26]=w,e[27]=p,e[28]=d,e[29]=m):m=e[29],m}function Et(s,e){return t.jsxs("div",{className:"flex items-center justify-between rounded-lg border px-3 py-2",children:[t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx(At,{name:s.deviceName}),t.jsxs("div",{children:[t.jsx("p",{className:"text-sm text-foreground",children:s.deviceName}),t.jsx("p",{className:"text-xs text-muted-foreground",children:s.ip})]})]}),t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx("span",{className:"size-1.5 rounded-full bg-success"}),t.jsx("span",{className:"text-xs text-muted-foreground",children:Ee(s.lastActivity)})]})]},`${s.ip}-${e}`)}function Dt(s){const e=Y.c(5),{status:a,error:l}=s;if(a==="validating"){let i;return e[0]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t.jsx(Ue,{"data-icon":"inline-start",className:"size-3.5 animate-spin"}),"Checking path..."]}),e[0]=i):i=e[0],i}if(a==="valid"){let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsxs("div",{className:"flex items-center gap-2 text-sm text-success",children:[t.jsx(yt,{"data-icon":"inline-start",className:"size-3.5"}),"Valid .claude directory found"]}),e[1]=i):i=e[1],i}if(a==="invalid"&&l){let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Ct,{"data-icon":"inline-start",className:"size-3.5"}),e[2]=i):i=e[2];let r;return e[3]!==l?(r=t.jsxs("div",{className:"flex items-center gap-2 text-sm text-destructive",children:[i,l]}),e[3]=l,e[4]=r):r=e[4],r}return null}function Ht(s){const e=Y.c(102),{open:a,currentPath:l,onClose:i,onSaved:r}=s,[o,u]=h.useState(l),[c,g]=h.useState(!1),{status:f,error:v,debouncedValidate:k,reset:S,save:N}=et();let j;e[0]===Symbol.for("react.memo_cache_sentinel")?(j=tt(),e[0]=j):j=e[0];const x=j;let w;e[1]===Symbol.for("react.memo_cache_sentinel")?(w=st("configWrite"),e[1]=w):w=e[1];const p=w,[d,z]=h.useState(!1),[m,I]=h.useState(""),[ke,Ve]=h.useState(!1),[y,De]=h.useState(""),[Ne,He]=h.useState(""),[C,$e]=h.useState(""),[Se,Oe]=h.useState(""),[b,Fe]=h.useState(!1),[ye,We]=h.useState(!1),[_,qe]=h.useState(!1),[P,Xe]=h.useState(!1);let se;e[2]===Symbol.for("react.memo_cache_sentinel")?(se=[],e[2]=se):se=e[2];const[Ce,Te]=h.useState(se);let ie,ae;e[3]!==l||e[4]!==a||e[5]!==S?(ie=()=>{a&&(u(l),S(),Le("/api/config").then(Lt).then(n=>{const A=(n==null?void 0:n.networkAccess)||!1;z(A),qe(A),Xe(!!(n!=null&&n.networkPassword)),I("");const we=(n==null?void 0:n.terminalApp)||"";De(we),He(we);const Ie=(n==null?void 0:n.editorApp)||"";$e(Ie),Oe(Ie);const Pe=(n==null?void 0:n.useBuiltInEditor)===!0;Fe(Pe),We(Pe),A&&(n!=null&&n.networkPassword)&&!x?Le("/api/connected-devices").then(Tt).then(Z=>Te((Z==null?void 0:Z.devices)||[])).catch(Ft):Te([])}).catch($t))},ae=[a,l,S,x],e[3]=l,e[4]=a,e[5]=S,e[6]=ie,e[7]=ae):(ie=e[6],ae=e[7]),h.useEffect(ie,ae);let ne;e[8]!==k?(ne=n=>{const A=n.target.value;u(A),k(A)},e[8]=k,e[9]=ne):ne=e[9];const _e=ne;let le;e[10]!==C||e[11]!==_||e[12]!==d||e[13]!==m||e[14]!==r||e[15]!==o||e[16]!==N||e[17]!==y||e[18]!==b?(le=async()=>{g(!0);const n=await N(o,{networkAccess:x?_:d,networkPassword:!x&&d&&m.length>0?m:void 0,terminalApp:y.trim()||void 0,editorApp:C.trim()||void 0,useBuiltInEditor:b});n.success&&n.claudeDir&&r(n.claudeDir),g(!1)},e[10]=C,e[11]=_,e[12]=d,e[13]=m,e[14]=r,e[15]=o,e[16]=N,e[17]=y,e[18]=b,e[19]=le):le=e[19];const E=le;let re;e[20]!==C||e[21]!==P||e[22]!==Se||e[23]!==_||e[24]!==Ne||e[25]!==ye||e[26]!==d||e[27]!==m||e[28]!==f||e[29]!==y||e[30]!==b?(re=function(){if(f==="validating"||f==="invalid")return!1;const A=f==="valid",we=!x&&(d!==_||d&&m.length>0);if(!A&&!we&&!(y!==Ne)&&!(C!==Se||b!==ye))return!1;if(!x&&d){const Z=m.length>0&&m.length<16,Je=!P&&m.length===0;if(Z||Je)return!1}return!0},e[20]=C,e[21]=P,e[22]=Se,e[23]=_,e[24]=Ne,e[25]=ye,e[26]=d,e[27]=m,e[28]=f,e[29]=y,e[30]=b,e[31]=re):re=e[31];const D=re();let $;e[32]!==i?($=n=>{n||i()},e[32]=i,e[33]=$):$=e[33];let oe;e[34]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsxs(it,{children:[t.jsx(at,{className:"text-foreground",children:"Configuration"}),t.jsx(nt,{className:"text-muted-foreground",children:"Manage local paths, preferred apps, and remote access."})]}),e[34]=oe):oe=e[34];let ce,de;e[35]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx(te,{htmlFor:"claude-directory",children:"Claude directory"}),de=t.jsx(Q,{children:"The directory containing your Claude configuration."}),e[35]=ce,e[36]=de):(ce=e[35],de=e[36]);let ue;e[37]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx(Me,{children:t.jsx(bt,{"data-icon":"inline-start"})}),e[37]=ue):ue=e[37];let F;e[38]!==D||e[39]!==E||e[40]!==c?(F=n=>{n.key==="Enter"&&D&&!c&&E()},e[38]=D,e[39]=E,e[40]=c,e[41]=F):F=e[41];let T;e[42]!==_e||e[43]!==o||e[44]!==F?(T=t.jsxs(Re,{children:[ue,t.jsx(Ge,{id:"claude-directory",value:o,onChange:_e,placeholder:"/Users/you/.claude",disabled:!p,onKeyDown:F})]}),e[42]=_e,e[43]=o,e[44]=F,e[45]=T):T=e[45];let L;e[46]!==v||e[47]!==f?(L=t.jsx("div",{"aria-live":"polite",children:t.jsx(Dt,{status:f,error:v})}),e[46]=v,e[47]=f,e[48]=L):L=e[48];let B;e[49]!==T||e[50]!==L?(B=t.jsxs(ee,{children:[ce,de,T,L]}),e[49]=T,e[50]=L,e[51]=B):B=e[51];let me,fe;e[52]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsxs(te,{htmlFor:"terminal-application",children:[t.jsx(kt,{"data-icon":"inline-start",className:"size-4 text-muted-foreground"}),"Terminal application"]}),fe=t.jsx(Q,{children:"Leave blank to use the system default for Ctrl+Cmd+T."}),e[52]=me,e[53]=fe):(me=e[52],fe=e[53]);let he;e[54]===Symbol.for("react.memo_cache_sentinel")?(he=n=>De(n.target.value),e[54]=he):he=e[54];let R;e[55]!==y?(R=t.jsxs(ee,{children:[me,fe,t.jsx(Be,{id:"terminal-application",value:y,onChange:he,placeholder:"Ghostty, iTerm, or /path/to/binary",disabled:!p})]}),e[55]=y,e[56]=R):R=e[56];let xe;e[57]===Symbol.for("react.memo_cache_sentinel")?(xe=n=>Fe(n===!0),e[57]=xe):xe=e[57];let G;e[58]!==b?(G=t.jsx(lt,{id:"use-built-in-editor",checked:b,onCheckedChange:xe,disabled:!p}),e[58]=b,e[59]=G):G=e[59];let pe;e[60]===Symbol.for("react.memo_cache_sentinel")?(pe=t.jsxs(rt,{children:[t.jsxs(te,{htmlFor:"use-built-in-editor",children:[t.jsx(Nt,{"data-icon":"inline-start",className:"size-4 text-muted-foreground"}),"Open files in Cogpit"]}),t.jsx(Q,{children:"Files and diffs open in Cogpit’s file workspace instead of launching an external editor."})]}),e[60]=pe):pe=e[60];let M;e[61]!==G?(M=t.jsxs(ee,{orientation:"horizontal",children:[G,pe]}),e[61]=G,e[62]=M):M=e[62];let ge;e[63]===Symbol.for("react.memo_cache_sentinel")?(ge=t.jsxs(te,{htmlFor:"editor-application",children:[t.jsx(St,{"data-icon":"inline-start",className:"size-4 text-muted-foreground"}),"Editor application"]}),e[63]=ge):ge=e[63];const Ae=b?"Not used while files open in Cogpit.":"Leave blank to use $VISUAL or automatic detection.";let U;e[64]!==Ae?(U=t.jsx(Q,{children:Ae}),e[64]=Ae,e[65]=U):U=e[65];let ve;e[66]===Symbol.for("react.memo_cache_sentinel")?(ve=n=>$e(n.target.value),e[66]=ve):ve=e[66];const ze=!p||b;let V;e[67]!==C||e[68]!==ze?(V=t.jsx(Be,{id:"editor-application",value:C,onChange:ve,placeholder:"cursor, code, zed, or /path/to/binary",disabled:ze}),e[67]=C,e[68]=ze,e[69]=V):V=e[69];let H;e[70]!==U||e[71]!==V?(H=t.jsxs(ee,{children:[ge,U,V]}),e[70]=U,e[71]=V,e[72]=H):H=e[72];let O;e[73]!==Ce||e[74]!==P||e[75]!==_||e[76]!==d||e[77]!==m||e[78]!==ke?(O=!x&&p&&t.jsx(Pt,{networkAccess:d,setNetworkAccess:z,networkPassword:m,setNetworkPassword:I,showNetworkPassword:ke,setShowNetworkPassword:Ve,hasExistingPassword:P,initialNetworkAccess:_,connectedDevices:Ce,minPasswordLength:16}),e[73]=Ce,e[74]=P,e[75]=_,e[76]=d,e[77]=m,e[78]=ke,e[79]=O):O=e[79];let W;e[80]!==B||e[81]!==R||e[82]!==M||e[83]!==H||e[84]!==O?(W=t.jsxs(ot,{children:[B,R,M,H,O]}),e[80]=B,e[81]=R,e[82]=M,e[83]=H,e[84]=O,e[85]=W):W=e[85];let q;e[86]!==i?(q=t.jsx(be,{variant:"outline",onClick:i,children:"Cancel"}),e[86]=i,e[87]=q):q=e[87];let X;e[88]!==D||e[89]!==E||e[90]!==c?(X=p&&t.jsx(be,{disabled:!D||c,onClick:E,children:c?t.jsxs(t.Fragment,{children:[t.jsx(Ue,{"data-icon":"inline-start",className:"size-4 animate-spin"}),"Saving..."]}):"Save"}),e[88]=D,e[89]=E,e[90]=c,e[91]=X):X=e[91];let J;e[92]!==q||e[93]!==X?(J=t.jsxs(ct,{children:[q,X]}),e[92]=q,e[93]=X,e[94]=J):J=e[94];let K;e[95]!==W||e[96]!==J?(K=t.jsxs(dt,{className:"max-h-[calc(100dvh-2rem)] overflow-y-auto sm:max-w-lg",children:[oe,W,J]}),e[95]=W,e[96]=J,e[97]=K):K=e[97];let je;return e[98]!==a||e[99]!==K||e[100]!==$?(je=t.jsx(ut,{open:a,onOpenChange:$,children:K}),e[98]=a,e[99]=K,e[100]=$,e[101]=je):je=e[101],je}function $t(){}function Ft(){}function Tt(s){return s.json()}function Lt(s){return s.json()}export{Ht as ConfigDialog};
|