codexui-android 0.1.108 → 0.1.109

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,7 +1,7 @@
1
- import{_ as In,o as r,c as l,a as u,d as Ns,u as Vs,w as Y,n as bt,b as Us,e as qs,t as h,f as v,F as y,r as b,g as x,h as Ks,i as Q,I as Gs,j as Zs,k as Xs,l as Tn,m as Ge,p as xt,q as Ct,s as ee,v as Mn,T as Js,x as C,y as L,z as Ys,A as Qs,B as ei}from"./index-DfEYiJAK.js";const ti={},ni={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function si(M,xe){return r(),l("svg",ni,[...xe[0]||(xe[0]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2zm-4 4a2 2 0 0 1-2-2V8m4 8h10"},null,-1)])])}const ii=In(ti,[["render",si]]),oi={key:0,class:"conversation-loading"},ai={key:1,class:"conversation-empty"},ri={key:0,class:"conversation-load-more"},li=["disabled"],ci=["data-role","data-message-type"],ui={key:0,class:"message-row","data-role":"system"},di={class:"message-stack","data-role":"system"},fi=["onClick"],hi={class:"cmd-group-label"},pi={class:"cmd-status"},mi={class:"cmd-group-inner"},ki=["onClick"],vi={class:"cmd-label"},gi={class:"cmd-status"},yi={class:"cmd-output-inner"},_i=["textContent"],wi=["onClick"],bi={class:"cmd-label"},xi={class:"cmd-status"},Ci={class:"cmd-output-inner"},$i=["textContent"],Li=["data-role","data-message-type"],Ti=["data-role"],Mi=["data-role"],Ii={key:0,class:"file-change-summary-block"},Si=["onClick"],Pi={class:"file-change-summary-label"},Ai={class:"file-change-summary-status"},Ei=["data-tone"],Bi={class:"file-change-panel-inner"},Fi={class:"file-change-list"},Wi=["data-operation"],Ri=["title","onClick"],Hi={key:0,class:"file-change-arrow"},Oi=["title","onClick"],zi={key:2,class:"file-change-delta"},ji=["data-tone"],Di=["data-role","data-message-type"],Ni=["data-role"],Vi=["data-role"],Ui=["data-role"],qi=["onClick"],Ki=["src","alt"],Gi={key:1,class:"message-file-attachments"},Zi=["href","title"],Xi={key:2,class:"message-skill-attachments"},Ji=["href","title"],Yi={class:"message-skill-chip-name"},Qi=["data-role"],eo={key:0,class:"automation-message-label"},to={key:0},no={key:1,class:"worked-separator-wrap","aria-live":"polite"},so=["onClick"],io={class:"worked-separator-text"},oo={key:0,class:"worked-details"},ao=["onClick"],ro={class:"cmd-label"},lo={class:"cmd-status"},co={class:"cmd-output-inner"},uo=["textContent"],fo=["data-streaming"],ho={class:"plan-card-header"},po={key:0,class:"plan-card-badge"},mo=["innerHTML"],ko={key:1,class:"plan-step-list"},vo=["data-status"],go=["data-status"],yo=["innerHTML"],_o=["innerHTML"],wo={key:3,class:"plan-card-actions"},bo=["onClick"],xo={key:0,class:"message-text"},Co={key:0},$o={key:1,class:"message-bold-text"},Lo={key:2,class:"message-italic-text"},To={key:3,class:"message-strikethrough-text"},Mo=["href","title"],Io=["href","title"],So={key:6,class:"message-inline-code"},Po={key:0},Ao={key:1,class:"message-bold-text"},Eo={key:2,class:"message-italic-text"},Bo={key:3,class:"message-strikethrough-text"},Fo=["href","title"],Wo=["href","title"],Ro={key:6,class:"message-inline-code"},Ho={key:2,class:"message-blockquote"},Oo={key:0},zo={key:1,class:"message-bold-text"},jo={key:2,class:"message-italic-text"},Do={key:3,class:"message-strikethrough-text"},No=["href","title"],Vo=["href","title"],Uo={key:6,class:"message-inline-code"},qo={key:3,class:"message-list message-list-unordered"},Ko=["innerHTML"],Go={key:4,class:"message-list message-task-list"},Zo=["data-checked"],Xo={class:"message-list-item-text"},Jo={key:0},Yo={key:1,class:"message-bold-text"},Qo={key:2,class:"message-italic-text"},ea={key:3,class:"message-strikethrough-text"},ta=["href","title"],na=["href","title"],sa={key:6,class:"message-inline-code"},ia=["start"],oa=["innerHTML"],aa={key:6,class:"message-table-wrap"},ra={class:"message-table"},la={key:0},ca={key:1,class:"message-bold-text"},ua={key:2,class:"message-italic-text"},da={key:3,class:"message-strikethrough-text"},fa=["href","title"],ha=["href","title"],pa={key:6,class:"message-inline-code"},ma={key:0},ka={key:0},va={key:1,class:"message-bold-text"},ga={key:2,class:"message-italic-text"},ya={key:3,class:"message-strikethrough-text"},_a=["href","title"],wa=["href","title"],ba={key:6,class:"message-inline-code"},xa={key:7,class:"message-code-block"},Ca={key:0,class:"message-code-language"},$a={class:"message-code-pre"},La=["innerHTML"],Ta={key:8,class:"message-divider"},Ma={key:9,class:"message-text"},Ia=["onClick"],Sa=["src","alt","onError"],Pa={key:4,class:"file-change-summary-block file-change-summary-block-inline"},Aa=["onClick"],Ea={class:"file-change-summary-label"},Ba={class:"file-change-summary-status"},Fa=["data-tone"],Wa={class:"file-change-panel-inner"},Ra={class:"file-change-list"},Ha=["data-operation"],Oa=["title","onClick"],za={key:0,class:"file-change-arrow"},ja=["title","onClick"],Da={key:2,class:"file-change-delta"},Na=["data-tone"],Va=["data-role"],Ua=["onClick"],qa=["onClick"],Ka=["data-copied","aria-label","title","onClick"],Ga={class:"message-copy-label"},Za={key:1,class:"conversation-item conversation-item-overlay"},Xa={class:"message-row"},Ja={class:"message-stack"},Ya={class:"live-overlay-inline","aria-live":"polite"},Qa={class:"live-overlay-label"},er={key:0,class:"live-overlay-reasoning"},tr={key:1,class:"live-overlay-error"},nr=["src"],sr={key:0,class:"diff-viewer-sidebar"},ir={class:"diff-viewer-sidebar-header"},or={class:"diff-viewer-sidebar-count"},ar={class:"diff-viewer-sidebar-list"},rr=["data-active","onClick"],lr=["data-operation"],cr={class:"diff-viewer-file-label"},ur={key:0,class:"diff-viewer-file-delta"},dr={class:"diff-viewer-main"},fr={class:"diff-viewer-toolbar"},hr={class:"diff-viewer-title-wrap"},pr={class:"diff-viewer-title"},mr={class:"diff-viewer-subtitle"},kr={key:0},vr={class:"diff-viewer-toolbar-actions"},gr={key:0,class:"diff-viewer-empty"},yr={key:1,class:"diff-viewer-panel"},_r={class:"diff-viewer-meta"},wr={class:"diff-viewer-language"},br={class:"diff-viewer-lines"},xr=["data-kind"],Cr={class:"diff-viewer-line-number"},$r={class:"diff-viewer-line-number"},Lr={class:"diff-viewer-line-marker"},Tr=["innerHTML"],Mr={class:"diff-viewer-mobile-sheet-header"},Ir={class:"diff-viewer-sidebar-count"},Sr={class:"diff-viewer-mobile-sheet-list"},Pr=["data-active","onClick"],Ar=["data-operation"],Er={class:"diff-viewer-file-label"},Br={key:0,class:"diff-viewer-file-delta"},Fr=16,Wr=300,Rr=1200,Hr=300,Or=250,$t=50,zr=30,jr=200,Dr=Ns({__name:"ThreadConversation",props:{messages:{},pendingRequests:{},liveOverlay:{},isLoading:{type:Boolean},activeThreadId:{},cwd:{}},emits:["forkThread","rollback","implementPlan","respondServerRequest"],setup(M,{expose:xe,emit:Sn}){const fe=C(new Set),z=C(new Set),he=C(new Set),Ze=C(new Set),pe=C(new Set),Xe=C(null),Ce=C(""),D=C(!1),Lt=C(null),me=C(!1),Tt=C(0),Mt=C(0),Je=C(""),Ye=C(""),{isMobile:$e}=Vs();function Pn(e){var i;const n=e.replace(/\r\n/g,`
1
+ import{_ as In,o as r,c as l,a as u,d as Ns,u as Vs,w as Y,n as bt,b as Us,e as qs,t as h,f as g,F as y,r as b,g as x,h as Ks,i as Q,I as Gs,j as Zs,k as Xs,l as Tn,m as Ge,p as xt,q as Ct,s as ee,v as Mn,T as Js,x as C,y as L,z as Ys,A as Qs,B as ei}from"./index-ZXDbBStq.js";const ti={},ni={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 24 24","aria-hidden":"true"};function si(T,xe){return r(),l("svg",ni,[...xe[0]||(xe[0]=[u("path",{fill:"none",stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2zm-4 4a2 2 0 0 1-2-2V8m4 8h10"},null,-1)])])}const ii=In(ti,[["render",si]]),oi={key:0,class:"conversation-loading"},ai={key:1,class:"conversation-empty"},ri={key:0,class:"conversation-load-more"},li=["disabled"],ci=["data-role","data-message-type"],ui={key:0,class:"message-row","data-role":"system"},di={class:"message-stack","data-role":"system"},fi=["onClick"],hi={class:"cmd-group-label"},pi={class:"cmd-status"},mi={class:"cmd-group-inner"},vi=["onClick"],ki={class:"cmd-label"},gi={class:"cmd-status"},yi={class:"cmd-output-inner"},_i=["textContent"],wi=["onClick"],bi={class:"cmd-label"},xi={class:"cmd-status"},Ci={class:"cmd-output-inner"},$i=["textContent"],Li=["data-role","data-message-type"],Ti=["data-role"],Mi=["data-role"],Ii={key:0,class:"file-change-summary-block"},Pi=["onClick"],Si={class:"file-change-summary-label"},Ai={class:"file-change-summary-status"},Ei=["data-tone"],Bi={class:"file-change-panel-inner"},Fi={class:"file-change-list"},Wi=["data-operation"],Ri=["title","onClick"],Hi={key:0,class:"file-change-arrow"},Oi=["title","onClick"],zi={key:2,class:"file-change-delta"},ji=["data-tone"],Di=["data-role","data-message-type"],Ni=["data-role"],Vi=["data-role"],Ui=["data-role"],qi=["onClick"],Ki=["src","alt"],Gi={key:1,class:"message-file-attachments"},Zi=["href","title"],Xi={key:2,class:"message-skill-attachments"},Ji=["href","title"],Yi={class:"message-skill-chip-name"},Qi=["data-role"],eo={key:0,class:"automation-message-label"},to={key:0},no={key:1,class:"worked-separator-wrap","aria-live":"polite"},so=["onClick"],io={class:"worked-separator-text"},oo={key:0,class:"worked-details"},ao=["onClick"],ro={class:"cmd-label"},lo={class:"cmd-status"},co={class:"cmd-output-inner"},uo=["textContent"],fo=["data-streaming"],ho={class:"plan-card-header"},po={key:0,class:"plan-card-badge"},mo=["innerHTML"],vo={key:1,class:"plan-step-list"},ko=["data-status"],go=["data-status"],yo=["innerHTML"],_o=["innerHTML"],wo={key:3,class:"plan-card-actions"},bo=["onClick"],xo={key:0,class:"message-text"},Co={key:0},$o={key:1,class:"message-bold-text"},Lo={key:2,class:"message-italic-text"},To={key:3,class:"message-strikethrough-text"},Mo=["href","title"],Io=["href","title"],Po={key:6,class:"message-inline-code"},So={key:0},Ao={key:1,class:"message-bold-text"},Eo={key:2,class:"message-italic-text"},Bo={key:3,class:"message-strikethrough-text"},Fo=["href","title"],Wo=["href","title"],Ro={key:6,class:"message-inline-code"},Ho={key:2,class:"message-blockquote"},Oo={key:0},zo={key:1,class:"message-bold-text"},jo={key:2,class:"message-italic-text"},Do={key:3,class:"message-strikethrough-text"},No=["href","title"],Vo=["href","title"],Uo={key:6,class:"message-inline-code"},qo={key:3,class:"message-list message-list-unordered"},Ko=["innerHTML"],Go={key:4,class:"message-list message-task-list"},Zo=["data-checked"],Xo={class:"message-list-item-text"},Jo={key:0},Yo={key:1,class:"message-bold-text"},Qo={key:2,class:"message-italic-text"},ea={key:3,class:"message-strikethrough-text"},ta=["href","title"],na=["href","title"],sa={key:6,class:"message-inline-code"},ia=["start"],oa=["innerHTML"],aa={key:6,class:"message-table-wrap"},ra={class:"message-table"},la={key:0},ca={key:1,class:"message-bold-text"},ua={key:2,class:"message-italic-text"},da={key:3,class:"message-strikethrough-text"},fa=["href","title"],ha=["href","title"],pa={key:6,class:"message-inline-code"},ma={key:0},va={key:0},ka={key:1,class:"message-bold-text"},ga={key:2,class:"message-italic-text"},ya={key:3,class:"message-strikethrough-text"},_a=["href","title"],wa=["href","title"],ba={key:6,class:"message-inline-code"},xa={key:7,class:"message-code-block"},Ca={key:0,class:"message-code-language"},$a={class:"message-code-pre"},La=["innerHTML"],Ta={key:8,class:"message-divider"},Ma={key:9,class:"message-text"},Ia=["onClick"],Pa=["src","alt","onError"],Sa={key:4,class:"file-change-summary-block file-change-summary-block-inline"},Aa=["onClick"],Ea={class:"file-change-summary-label"},Ba={class:"file-change-summary-status"},Fa=["data-tone"],Wa={class:"file-change-panel-inner"},Ra={class:"file-change-list"},Ha=["data-operation"],Oa=["title","onClick"],za={key:0,class:"file-change-arrow"},ja=["title","onClick"],Da={key:2,class:"file-change-delta"},Na=["data-tone"],Va=["data-role"],Ua=["onClick"],qa=["onClick"],Ka=["data-copied","aria-label","title","onClick"],Ga={class:"message-copy-label"},Za={key:1,class:"conversation-item conversation-item-overlay"},Xa={class:"message-row"},Ja={class:"message-stack"},Ya={class:"live-overlay-inline","aria-live":"polite"},Qa={class:"live-overlay-label"},er={key:0,class:"live-overlay-reasoning"},tr={key:1,class:"live-overlay-error"},nr=["src"],sr={key:0,class:"diff-viewer-sidebar"},ir={class:"diff-viewer-sidebar-header"},or={class:"diff-viewer-sidebar-count"},ar={class:"diff-viewer-sidebar-list"},rr=["data-active","onClick"],lr=["data-operation"],cr={class:"diff-viewer-file-label"},ur={key:0,class:"diff-viewer-file-delta"},dr={class:"diff-viewer-main"},fr={class:"diff-viewer-toolbar"},hr={class:"diff-viewer-title-wrap"},pr={class:"diff-viewer-title"},mr={class:"diff-viewer-subtitle"},vr={key:0},kr={class:"diff-viewer-toolbar-actions"},gr={key:0,class:"diff-viewer-empty"},yr={key:1,class:"diff-viewer-panel"},_r={class:"diff-viewer-meta"},wr={class:"diff-viewer-language"},br={class:"diff-viewer-lines"},xr=["data-kind"],Cr={class:"diff-viewer-line-number"},$r={class:"diff-viewer-line-number"},Lr={class:"diff-viewer-line-marker"},Tr=["innerHTML"],Mr={class:"diff-viewer-mobile-sheet-header"},Ir={class:"diff-viewer-sidebar-count"},Pr={class:"diff-viewer-mobile-sheet-list"},Sr=["data-active","onClick"],Ar=["data-operation"],Er={class:"diff-viewer-file-label"},Br={key:0,class:"diff-viewer-file-delta"},Fr=16,Wr=300,Rr=1200,Hr=300,Or=250,$t=50,zr=30,jr=200,Dr=Ns({__name:"ThreadConversation",props:{messages:{},pendingRequests:{},liveOverlay:{},isLoading:{type:Boolean},activeThreadId:{},cwd:{},hasMorePersistedAbove:{type:Boolean},isLoadingPersistedAbove:{type:Boolean},loadEarlierMessages:{type:Function}},emits:["forkThread","rollback","implementPlan","respondServerRequest"],setup(T,{expose:xe,emit:Pn}){const fe=C(new Set),z=C(new Set),he=C(new Set),Ze=C(new Set),pe=C(new Set),Xe=C(null),Ce=C(""),D=C(!1),Lt=C(null),me=C(!1),Tt=C(0),Mt=C(0),Je=C(""),Ye=C(""),{isMobile:$e}=Vs();function Sn(e){var i;const n=e.replace(/\r\n/g,`
2
2
  `).trim();if(!n)return null;const t=[],s=[];for(const a of n.split(`
3
3
  `)){const c=a.trim();if(!c){t.length===0&&s.push("");continue}const o=c.match(/^[-*]\s+\[([ xX~>|-])\]\s+(.+)$/);if(o){const f=(o[1]??" ").toLowerCase();let d="pending";f==="x"&&(d="completed"),(f==="~"||f===">"||f==="-")&&(d="inProgress"),t.push({step:((i=o[2])==null?void 0:i.trim())??"",status:d});continue}s.push(c)}return t.length===0?null:{explanation:s.join(`
4
- `).trim(),steps:t.filter(a=>a.step.length>0)}}function Qe(e){var n;return e.plan&&e.plan.steps.length>0?{explanation:((n=e.plan.explanation)==null?void 0:n.trim())??"",steps:e.plan.steps}:Pn(e.text)}function B(e){return e.messageType==="commandExecution"&&!!e.commandExecution}function et(e){return e.messageType==="plan"||e.messageType==="plan.live"}function An(e){return et(e)&&e.messageType!=="plan.live"&&e.role==="assistant"&&!!e.turnId}function En(e){var t;const n=((t=e.turnId)==null?void 0:t.trim())??"";n&&lt("implementPlan",{turnId:n})}function tt(e){return e.messageType==="fileChange"&&e.fileChangeStatus==="completed"&&Array.isArray(e.fileChanges)&&e.fileChanges.length>0}function Le(e){return e.role==="assistant"&&!B(e)&&e.messageType!=="worked"&&!(e.messageType??"").endsWith(".live")}const nt=L(()=>{var e;for(let n=g.messages.length-1;n>=0;n-=1){const t=g.messages[n];if(t.messageType==="commandExecution"&&((e=t.commandExecution)==null?void 0:e.status)==="inProgress")return t.id}return""}),It=L(()=>g.messages.some(e=>e.role==="assistant"&&e.messageType==="agentMessage.live"&&e.text.trim().length>0)),St=L(()=>!!g.liveOverlay||nt.value.length>0||It.value),st=L(()=>{const e={};for(let n=0;n<g.messages.length;){const t=g.messages[n];if(!B(t)){n+=1;continue}const s=[];for(;n<g.messages.length&&B(g.messages[n]);)s.push(g.messages[n]),n+=1;if(s.length<=1)continue;const i=s[s.length-1];e[i.id]=s.slice(0,-1)}return e}),Bn=L(()=>{const e=new Set;for(const n of Object.values(st.value))for(const t of n)e.add(t.id);return e});function Pt(e){var n;return((n=Qe(e))==null?void 0:n.explanation)??""}function At(e){var n;return((n=Qe(e))==null?void 0:n.steps)??[]}function Fn(e){switch(e){case"completed":return"✓";case"inProgress":return"•";default:return"○"}}function Et(e){return!It.value&&e.id===nt.value}function F(e){return B(e)?fe.value.has(e.id)||!z.value.has(e.id)&&Et(e):!1}function it(e){return B(e)&&St.value}function ot(e){var n;return B(e)&&(St.value||((n=e.commandExecution)==null?void 0:n.status)==="inProgress")}function at(e){if(!B(e))return;const n=new Set(fe.value),t=new Set(z.value),s=Et(e);n.has(e.id)?(n.delete(e.id),s&&t.add(e.id)):s&&!t.has(e.id)?t.add(e.id):(n.add(e.id),t.delete(e.id)),fe.value=n,z.value=t}function Te(e){return st.value[e.id]??[]}function Bt(e){return B(e)?[...Te(e),e]:[]}function Wn(e){if(Te(e).length===0)return;const t=new Set(he.value);t.has(e.id)?t.delete(e.id):t.add(e.id),he.value=t}function rt(e){return he.value.has(e.id)}function Rn(e){var a,c;const t=Bt(e).length,s=((c=(a=e.commandExecution)==null?void 0:a.command)==null?void 0:c.trim())||"(command)";return`${t===1?"1 command":`${t} commands`} · latest: ${s}`}function Hn(e){return Ie(e)}function On(e){const n=new Set(Ze.value);n.has(e.id)?n.delete(e.id):n.add(e.id),Ze.value=n}function Ft(e){return Ze.value.has(e.id)}function Wt(e){const n=new Set(pe.value);n.has(e.id)?n.delete(e.id):n.add(e.id),pe.value=n}function te(e){return pe.value.has(e.id)}function T(e){return`${e.path}\0${e.movedToPath??""}`}function Me(e,n){e&&(Xe.value=e,Ce.value=T(n),D.value=!1)}function Rt(){Xe.value=null,Ce.value="",D.value=!1}function zn(){D.value=!D.value}function jn(){D.value=!1}function Ht(e){Ce.value=T(e),$e.value&&(D.value=!1)}function Ie(e){const n=e.commandExecution;if(!n)return"";const t=it(e);switch(n.status){case"inProgress":return t?"Running":"⟳ Running";case"completed":return n.exitCode===0?t?"Done":"✓ Completed":`Exit ${n.exitCode??"?"}`;case"failed":return t?"Failed":"✗ Failed";case"declined":return t?"Declined":"⊘ Declined";case"interrupted":return t?"Stopped":"⊘ Interrupted";default:return""}}function Se(e){var t,s;const n=(t=e.commandExecution)==null?void 0:t.status;return n==="inProgress"?"cmd-status-running":n==="completed"&&((s=e.commandExecution)==null?void 0:s.exitCode)===0?"cmd-status-ok":"cmd-status-error"}function Pe(e,n){if(e.size===0)return e;const t=new Set;for(const s of e)n.has(s)&&t.add(s);return t.size===e.size?e:t}function Dn(e,n){const t=[];for(let s=n-1;s>=0;s--){const i=e[s];if(i.messageType==="commandExecution")t.unshift(i);else if(i.role==="user"||i.messageType==="worked")break}return t}const g=M,lt=Sn,N=C(null),Ot=C(null),ke=C(""),V=C(""),j=C(!0),zt={js:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",py:"python",rb:"ruby",sh:"bash",shell:"bash",zsh:"bash",yml:"yaml",md:"markdown","c++":"cpp","c#":"csharp",ps1:"powershell"};let U=0,E=0,Ae=0,q=null,ve=null;const jt=new WeakSet,Ee=C(null),ne=C(0),Dt=C(0);let Be=null;const ge=new Map,ye=new Map,se=new Map,ie=new Map;function Fe(e,n,t,s){for(e.has(n)&&e.delete(n),e.set(n,t);e.size>s;){const i=e.keys().next().value;if(i===void 0)break;e.delete(i)}return t}const W=C(0),K=C(!1),Nn=L(()=>g.messages.slice(W.value)),ct=L(()=>W.value>0),Vn=L(()=>!j.value&&(g.messages.length>0||g.pendingRequests.length>0||!!g.liveOverlay));function Un(){return Ee.value?Promise.resolve():(Be||(Be=Ys(()=>import("./common-BeuopZEI.js"),[]).then(e=>{Ee.value=e.default,ie.clear(),se.clear(),ne.value+=1}).finally(()=>{Be=null})),Be)}function qn(e){if(!e||/[\r\n]/u.test(e)||e.endsWith("/")||e.endsWith("\\")||/^[A-Za-z][A-Za-z0-9+.-]*:\/\//u.test(e))return!1;const n=e.startsWith("/"),t=/^[A-Za-z]:[\\/]/u.test(e),s=e.startsWith("./")||e.startsWith("../")||e.startsWith("~/");return n||t||s||/^[A-Za-z0-9._@() -]+\.[A-Za-z0-9]{1,12}$/u.test(e)?!0:/^[A-Za-z0-9._@() -]+(?:[\\/][A-Za-z0-9._@() -]+)+$/u.test(e)}function We(e){return e.replace(/\\/gu,"/").split("/").filter(Boolean).pop()||e}function oe(e){return e.replace(/\\/gu,"/")}function Nt(e){if(!e.startsWith("file://"))return e;let n=e.replace(/^file:\/\//u,"");try{n=decodeURIComponent(n)}catch{}return/^\/[A-Za-z]:\//u.test(n)&&(n=n.slice(1)),n}function Kn(e){const n=oe(e),t=n.match(/^\/Users\/([^/]+)/u);if(t)return`/Users/${t[1]}`;const s=n.match(/^\/home\/([^/]+)/u);return s?`/home/${s[1]}`:""}function ae(e){const n=oe(e);if(!n)return n;let t="",s=n;const i=s.match(/^([A-Za-z]:)(\/.*)?$/u);i?(t=`${i[1]}/`,s=(i[2]??"").replace(/^\/+/u,"")):s.startsWith("/")&&(t="/",s=s.slice(1));const a=s.split("/").filter(Boolean),c=[];for(const f of a)if(f!=="."){if(f===".."){c.length>0&&c.pop();continue}c.push(f)}const o=c.join("/");return t?`${t}${o}`.replace(/\/+$/u,"")||t:o||n}function Vt(e,n){const t=oe(Nt(e.trim()));if(!t)return"";if(t.startsWith("/")||/^[A-Za-z]:\//u.test(t))return ae(t);if(t.startsWith("~/")){const a=Kn(n);if(a)return ae(`${a}/${t.slice(2)}`)}const i=oe(n.trim());return ae(i?`${i.replace(/\/+$/u,"")}/${t}`:t)}function _e(e){if(!e)return null;let n=e.trim();n=Re(n).core.trim();let s=null;const i=n.match(/^(.*)#L(\d+)(?:C\d+)?$/u);if(i)n=i[1],s=Number(i[2]);else{const a=n.match(/^(.*):(\d+)(?::\d+)?$/u);a&&(n=a[1],s=Number(a[2]))}return n=Nt(n),qn(n)?{path:n,line:s}:null}function Re(e){let n=e,t="",s="";const i={"(":")","[":"]","{":"}","<":">",'"':'"',"'":"'","`":"`","“":"”","‘":"’"};for(;n.length>0;){const a=n[0],c=Object.prototype.hasOwnProperty.call(i,a)?i[a]:"";if(!c||!n.endsWith(c))break;t+=a,s+=c,n=n.slice(1,-1)}return{core:n,leading:t,trailing:s}}function ut(e){const n=e.trim();if(!n.startsWith("[")||!n.endsWith(")"))return null;const t=n.indexOf("]");if(t<=1||n[t+1]!=="(")return null;const s=n.slice(1,t).trim(),i=n.slice(t+2,-1).trim();if(s.includes(`
4
+ `).trim(),steps:t.filter(a=>a.step.length>0)}}function Qe(e){var n;return e.plan&&e.plan.steps.length>0?{explanation:((n=e.plan.explanation)==null?void 0:n.trim())??"",steps:e.plan.steps}:Sn(e.text)}function F(e){return e.messageType==="commandExecution"&&!!e.commandExecution}function et(e){return e.messageType==="plan"||e.messageType==="plan.live"}function An(e){return et(e)&&e.messageType!=="plan.live"&&e.role==="assistant"&&!!e.turnId}function En(e){var t;const n=((t=e.turnId)==null?void 0:t.trim())??"";n&&lt("implementPlan",{turnId:n})}function tt(e){return e.messageType==="fileChange"&&e.fileChangeStatus==="completed"&&Array.isArray(e.fileChanges)&&e.fileChanges.length>0}function Le(e){return e.role==="assistant"&&!F(e)&&e.messageType!=="worked"&&!(e.messageType??"").endsWith(".live")}const nt=L(()=>{var e;for(let n=v.messages.length-1;n>=0;n-=1){const t=v.messages[n];if(t.messageType==="commandExecution"&&((e=t.commandExecution)==null?void 0:e.status)==="inProgress")return t.id}return""}),It=L(()=>v.messages.some(e=>e.role==="assistant"&&e.messageType==="agentMessage.live"&&e.text.trim().length>0)),Pt=L(()=>!!v.liveOverlay||nt.value.length>0||It.value),st=L(()=>{const e={};for(let n=0;n<v.messages.length;){const t=v.messages[n];if(!F(t)){n+=1;continue}const s=[];for(;n<v.messages.length&&F(v.messages[n]);)s.push(v.messages[n]),n+=1;if(s.length<=1)continue;const i=s[s.length-1];e[i.id]=s.slice(0,-1)}return e}),Bn=L(()=>{const e=new Set;for(const n of Object.values(st.value))for(const t of n)e.add(t.id);return e});function St(e){var n;return((n=Qe(e))==null?void 0:n.explanation)??""}function At(e){var n;return((n=Qe(e))==null?void 0:n.steps)??[]}function Fn(e){switch(e){case"completed":return"✓";case"inProgress":return"•";default:return"○"}}function Et(e){return!It.value&&e.id===nt.value}function W(e){return F(e)?fe.value.has(e.id)||!z.value.has(e.id)&&Et(e):!1}function it(e){return F(e)&&Pt.value}function ot(e){var n;return F(e)&&(Pt.value||((n=e.commandExecution)==null?void 0:n.status)==="inProgress")}function at(e){if(!F(e))return;const n=new Set(fe.value),t=new Set(z.value),s=Et(e);n.has(e.id)?(n.delete(e.id),s&&t.add(e.id)):s&&!t.has(e.id)?t.add(e.id):(n.add(e.id),t.delete(e.id)),fe.value=n,z.value=t}function Te(e){return st.value[e.id]??[]}function Bt(e){return F(e)?[...Te(e),e]:[]}function Wn(e){if(Te(e).length===0)return;const t=new Set(he.value);t.has(e.id)?t.delete(e.id):t.add(e.id),he.value=t}function rt(e){return he.value.has(e.id)}function Rn(e){var a,c;const t=Bt(e).length,s=((c=(a=e.commandExecution)==null?void 0:a.command)==null?void 0:c.trim())||"(command)";return`${t===1?"1 command":`${t} commands`} · latest: ${s}`}function Hn(e){return Ie(e)}function On(e){const n=new Set(Ze.value);n.has(e.id)?n.delete(e.id):n.add(e.id),Ze.value=n}function Ft(e){return Ze.value.has(e.id)}function Wt(e){const n=new Set(pe.value);n.has(e.id)?n.delete(e.id):n.add(e.id),pe.value=n}function te(e){return pe.value.has(e.id)}function M(e){return`${e.path}\0${e.movedToPath??""}`}function Me(e,n){e&&(Xe.value=e,Ce.value=M(n),D.value=!1)}function Rt(){Xe.value=null,Ce.value="",D.value=!1}function zn(){D.value=!D.value}function jn(){D.value=!1}function Ht(e){Ce.value=M(e),$e.value&&(D.value=!1)}function Ie(e){const n=e.commandExecution;if(!n)return"";const t=it(e);switch(n.status){case"inProgress":return t?"Running":"⟳ Running";case"completed":return n.exitCode===0?t?"Done":"✓ Completed":`Exit ${n.exitCode??"?"}`;case"failed":return t?"Failed":"✗ Failed";case"declined":return t?"Declined":"⊘ Declined";case"interrupted":return t?"Stopped":"⊘ Interrupted";default:return""}}function Pe(e){var t,s;const n=(t=e.commandExecution)==null?void 0:t.status;return n==="inProgress"?"cmd-status-running":n==="completed"&&((s=e.commandExecution)==null?void 0:s.exitCode)===0?"cmd-status-ok":"cmd-status-error"}function Se(e,n){if(e.size===0)return e;const t=new Set;for(const s of e)n.has(s)&&t.add(s);return t.size===e.size?e:t}function Dn(e,n){const t=[];for(let s=n-1;s>=0;s--){const i=e[s];if(i.messageType==="commandExecution")t.unshift(i);else if(i.role==="user"||i.messageType==="worked")break}return t}const v=T,lt=Pn,N=C(null),Ot=C(null),ve=C(""),V=C(""),j=C(!0),zt={js:"javascript",jsx:"jsx",ts:"typescript",tsx:"tsx",py:"python",rb:"ruby",sh:"bash",shell:"bash",zsh:"bash",yml:"yaml",md:"markdown","c++":"cpp","c#":"csharp",ps1:"powershell"};let U=0,E=0,Ae=0,q=null,ke=null;const jt=new WeakSet,Ee=C(null),ne=C(0),Dt=C(0);let Be=null;const ge=new Map,ye=new Map,se=new Map,ie=new Map;function Fe(e,n,t,s){for(e.has(n)&&e.delete(n),e.set(n,t);e.size>s;){const i=e.keys().next().value;if(i===void 0)break;e.delete(i)}return t}const B=C(0),K=C(!1),Nn=L(()=>v.messages.slice(B.value)),ct=L(()=>B.value>0||v.hasMorePersistedAbove===!0),Vn=L(()=>!j.value&&(v.messages.length>0||v.pendingRequests.length>0||!!v.liveOverlay));function Un(){return Ee.value?Promise.resolve():(Be||(Be=Ys(()=>import("./common-BeuopZEI.js"),[]).then(e=>{Ee.value=e.default,ie.clear(),se.clear(),ne.value+=1}).finally(()=>{Be=null})),Be)}function qn(e){if(!e||/[\r\n]/u.test(e)||e.endsWith("/")||e.endsWith("\\")||/^[A-Za-z][A-Za-z0-9+.-]*:\/\//u.test(e))return!1;const n=e.startsWith("/"),t=/^[A-Za-z]:[\\/]/u.test(e),s=e.startsWith("./")||e.startsWith("../")||e.startsWith("~/");return n||t||s||/^[A-Za-z0-9._@() -]+\.[A-Za-z0-9]{1,12}$/u.test(e)?!0:/^[A-Za-z0-9._@() -]+(?:[\\/][A-Za-z0-9._@() -]+)+$/u.test(e)}function We(e){return e.replace(/\\/gu,"/").split("/").filter(Boolean).pop()||e}function oe(e){return e.replace(/\\/gu,"/")}function Nt(e){if(!e.startsWith("file://"))return e;let n=e.replace(/^file:\/\//u,"");try{n=decodeURIComponent(n)}catch{}return/^\/[A-Za-z]:\//u.test(n)&&(n=n.slice(1)),n}function Kn(e){const n=oe(e),t=n.match(/^\/Users\/([^/]+)/u);if(t)return`/Users/${t[1]}`;const s=n.match(/^\/home\/([^/]+)/u);return s?`/home/${s[1]}`:""}function ae(e){const n=oe(e);if(!n)return n;let t="",s=n;const i=s.match(/^([A-Za-z]:)(\/.*)?$/u);i?(t=`${i[1]}/`,s=(i[2]??"").replace(/^\/+/u,"")):s.startsWith("/")&&(t="/",s=s.slice(1));const a=s.split("/").filter(Boolean),c=[];for(const f of a)if(f!=="."){if(f===".."){c.length>0&&c.pop();continue}c.push(f)}const o=c.join("/");return t?`${t}${o}`.replace(/\/+$/u,"")||t:o||n}function Vt(e,n){const t=oe(Nt(e.trim()));if(!t)return"";if(t.startsWith("/")||/^[A-Za-z]:\//u.test(t))return ae(t);if(t.startsWith("~/")){const a=Kn(n);if(a)return ae(`${a}/${t.slice(2)}`)}const i=oe(n.trim());return ae(i?`${i.replace(/\/+$/u,"")}/${t}`:t)}function _e(e){if(!e)return null;let n=e.trim();n=Re(n).core.trim();let s=null;const i=n.match(/^(.*)#L(\d+)(?:C\d+)?$/u);if(i)n=i[1],s=Number(i[2]);else{const a=n.match(/^(.*):(\d+)(?::\d+)?$/u);a&&(n=a[1],s=Number(a[2]))}return n=Nt(n),qn(n)?{path:n,line:s}:null}function Re(e){let n=e,t="",s="";const i={"(":")","[":"]","{":"}","<":">",'"':'"',"'":"'","`":"`","“":"”","‘":"’"};for(;n.length>0;){const a=n[0],c=Object.prototype.hasOwnProperty.call(i,a)?i[a]:"";if(!c||!n.endsWith(c))break;t+=a,s+=c,n=n.slice(1,-1)}return{core:n,leading:t,trailing:s}}function ut(e){const n=e.trim();if(!n.startsWith("[")||!n.endsWith(")"))return null;const t=n.indexOf("]");if(t<=1||n[t+1]!=="(")return null;const s=n.slice(1,t).trim(),i=n.slice(t+2,-1).trim();if(s.includes(`
5
5
  `)||i.includes(`
6
6
  `))return null;const a=Re(s).core.trim()||s,c=Re(i).core.trim();return c?{label:a,target:c}:null}function Ut(e){const n=Math.min(6,Math.max(1,Math.trunc(e)));return`h${String(n)}`}function qt(e){switch(Math.min(6,Math.max(1,Math.trunc(e)))){case 1:return"message-heading-h1";case 2:return"message-heading-h2";case 3:return"message-heading-h3";case 4:return"message-heading-h4";case 5:return"message-heading-h5";default:return"message-heading-h6"}}function Gn(e){switch(e){case"completed":return"[x]";case"inProgress":return"[~]";default:return"[ ]"}}function Zn(e){var s;const n=Qe(e);if(!n)return"";const t=[];return(s=n.explanation)!=null&&s.trim()&&t.push(n.explanation.trim()),n.steps.length>0&&t.push(n.steps.map(i=>`- ${Gn(i.status)} ${i.step}`.trim()).join(`
7
7
  `)),t.join(`
@@ -13,27 +13,27 @@ ${i.join(`
13
13
  ${a.join(`
14
14
  `)}`),n.join(`
15
15
 
16
- `).trim()}const Kt=L(()=>{var t;const e=new Map;for(const s of g.messages){if(!Le(s))continue;const i=Xn(s);if(!i)continue;const a=typeof s.turnIndex=="number"?`turn:${s.turnIndex}`:`message:${s.id}`,c=e.get(a);if(c){c.anchorMessageId=s.id,c.parts.push(i);continue}e.set(a,{anchorMessageId:s.id,parts:[i]})}const n={};for(const s of e.values()){const i=s.parts.join(`
16
+ `).trim()}const Kt=L(()=>{var t;const e=new Map;for(const s of v.messages){if(!Le(s))continue;const i=Xn(s);if(!i)continue;const a=typeof s.turnIndex=="number"?`turn:${s.turnIndex}`:`message:${s.id}`,c=e.get(a);if(c){c.anchorMessageId=s.id,c.parts.push(i);continue}e.set(a,{anchorMessageId:s.id,parts:[i]})}const n={};for(const s of e.values()){const i=s.parts.join(`
17
17
 
18
18
  `).trim();i&&(n[s.anchorMessageId]=i)}for(const[s,i]of Object.entries(He.value)){if(i.source!=="metadata")continue;const a=ss(i);if(!a)continue;const c=(t=n[s])==null?void 0:t.trim();n[s]=c?`${c}
19
19
 
20
- ${a}`:a}return n}),Gt=L(()=>{const e=new Map;for(const t of g.messages){if(!Le(t)||typeof t.turnIndex!="number")continue;const s=`turn:${t.turnIndex}`,i=e.get(s);if(i){i.anchorMessageId=t.id,i.turnIndex=t.turnIndex;continue}e.set(s,{anchorMessageId:t.id,turnIndex:t.turnIndex})}const n={};for(const t of e.values())n[t.anchorMessageId]=t.turnIndex;return n});function Zt(e){return typeof Kt.value[e.id]=="string"}function Jn(e){return typeof Gt.value[e.id]=="number"}function Yn(e,n){return e?!n||e===n?e:`${e}
21
- ${n}`.trim():n}function Qn(e,n){const t=e.operation==="add"||n.operation==="add"?"add":e.operation==="delete"||n.operation==="delete"?"delete":"update";return{path:n.path||e.path,operation:t,movedToPath:n.movedToPath??e.movedToPath??null,diff:Yn(e.diff,n.diff),addedLineCount:e.addedLineCount+n.addedLineCount,removedLineCount:e.removedLineCount+n.removedLineCount}}function es(e,n){const t=e.operation==="add"?0:e.operation==="update"?1:2,s=n.operation==="add"?0:n.operation==="update"?1:2;if(t!==s)return t-s;const i=`${e.path}\0${e.movedToPath??""}`,a=`${n.path}\0${n.movedToPath??""}`;return i.localeCompare(a)}function dt(e){const n=new Map;for(const t of e){const s=`${t.path}\0${t.movedToPath??""}`,i=n.get(s);n.set(s,i?Qn(i,t):{...t})}return Array.from(n.values()).sort(es)}const He=L(()=>{const e=new Map,n=new Map,t=new Map;for(const i of g.messages){if(Le(i)&&typeof i.turnIndex=="number"&&(e.set(`turn:${i.turnIndex}`,i.id),Array.isArray(i.fileChanges)&&i.fileChanges.length>0&&n.set(i.id,{changes:dt(i.fileChanges),sourceMessageIds:[],source:"assistant"})),!tt(i))continue;const a=typeof i.turnIndex=="number"?`turn:${i.turnIndex}`:`message:${i.id}`,c=t.get(a);c?c.push(i):t.set(a,[i])}const s={};for(const[i,a]of t.entries()){const c=e.get(i);c&&(s[c]={changes:dt(a.flatMap(o=>o.fileChanges??[])),sourceMessageIds:a.map(o=>o.id),source:"metadata"})}for(const[i,a]of n.entries())s[i]||(s[i]=a);return s}),ft=L(()=>{const e=new Map,n=new Map;for(const s of g.messages){if(Le(s)&&typeof s.turnIndex=="number"&&e.set(`turn:${s.turnIndex}`,s.id),!tt(s))continue;const i=typeof s.turnIndex=="number"?`turn:${s.turnIndex}`:`message:${s.id}`,a=n.get(i);a?a.push(s):n.set(i,[s])}const t={};for(const[s,i]of n.entries()){if(e.has(s))continue;const a=i[i.length-1];a&&(t[a.id]={changes:dt(i.flatMap(c=>c.fileChanges??[])),sourceMessageIds:i.map(c=>c.id),source:"metadata"})}return t}),ts=L(()=>{const e=new Set;for(const n of Object.values(He.value))for(const t of n.sourceMessageIds)e.add(t);for(const[n,t]of Object.entries(ft.value))for(const s of t.sourceMessageIds)s!==n&&e.add(s);return e});function re(e){return He.value[e.id]??null}function le(e){return ft.value[e.id]??null}function ce(e){return e.operation==="update"&&e.movedToPath?e.addedLineCount>0||e.removedLineCount>0?"Moved + edited":"Moved":e.operation==="add"?"Added":e.operation==="delete"?"Deleted":"Edited"}function Oe(e){return e.operation==="update"&&e.movedToPath?"move":e.operation}function G(e){const n=[];return e.addedLineCount>0&&n.push(`+${e.addedLineCount}`),e.removedLineCount>0&&n.push(`-${e.removedLineCount}`),n.join(" ")}function Xt(e,n,t=""){const s=[];return e>0&&s.push({tone:"add",label:`+${e}`}),n>0&&s.push({tone:"remove",label:`-${n}`}),s.length>0?s:t?[{tone:"neutral",label:t}]:[]}function Jt(e){return Xt(e.addedLineCount,e.removedLineCount)}function ze(e){return e===1?"1 file changed":`${e} files changed`}function ns(e){if(!e||e.changes.length===0)return"";let n=0,t=0,s=0,i=0;for(const c of e.changes){if(c.operation==="add"){n+=1;continue}if(c.operation==="delete"){t+=1;continue}if(c.movedToPath){i+=1;continue}s+=1}const a=[];return s>0&&a.push(`${s} edited`),n>0&&a.push(`${n} added`),t>0&&a.push(`${t} deleted`),i>0&&a.push(`${i} moved`),a.join(", ")}function Yt(e){if(!e||e.changes.length===0)return"Modified files";const n=ze(e.changes.length),t=ns(e);return t?`${n} · ${t}`:n}function Qt(e){if(!e||e.changes.length===0)return[];const n=e.changes.reduce((i,a)=>i+a.addedLineCount,0),t=e.changes.reduce((i,a)=>i+a.removedLineCount,0),s=e.changes.some(i=>i.movedToPath)?"Moved":"Ready";return Xt(n,t,s)}function I(e){const n=Vt(e,g.cwd),t=ae(oe(g.cwd.trim())),s=ae(oe(n));return t&&s.startsWith(`${t}/`)?s.slice(t.length+1):e}function ss(e){return!e||e.changes.length===0?"":`Modified files:
20
+ ${a}`:a}return n}),Gt=L(()=>{const e=new Map;for(const t of v.messages){if(!Le(t)||typeof t.turnIndex!="number")continue;const s=`turn:${t.turnIndex}`,i=e.get(s);if(i){i.anchorMessageId=t.id,i.turnIndex=t.turnIndex;continue}e.set(s,{anchorMessageId:t.id,turnIndex:t.turnIndex})}const n={};for(const t of e.values())n[t.anchorMessageId]=t.turnIndex;return n});function Zt(e){return typeof Kt.value[e.id]=="string"}function Jn(e){return typeof Gt.value[e.id]=="number"}function Yn(e,n){return e?!n||e===n?e:`${e}
21
+ ${n}`.trim():n}function Qn(e,n){const t=e.operation==="add"||n.operation==="add"?"add":e.operation==="delete"||n.operation==="delete"?"delete":"update";return{path:n.path||e.path,operation:t,movedToPath:n.movedToPath??e.movedToPath??null,diff:Yn(e.diff,n.diff),addedLineCount:e.addedLineCount+n.addedLineCount,removedLineCount:e.removedLineCount+n.removedLineCount}}function es(e,n){const t=e.operation==="add"?0:e.operation==="update"?1:2,s=n.operation==="add"?0:n.operation==="update"?1:2;if(t!==s)return t-s;const i=`${e.path}\0${e.movedToPath??""}`,a=`${n.path}\0${n.movedToPath??""}`;return i.localeCompare(a)}function dt(e){const n=new Map;for(const t of e){const s=`${t.path}\0${t.movedToPath??""}`,i=n.get(s);n.set(s,i?Qn(i,t):{...t})}return Array.from(n.values()).sort(es)}const He=L(()=>{const e=new Map,n=new Map,t=new Map;for(const i of v.messages){if(Le(i)&&typeof i.turnIndex=="number"&&(e.set(`turn:${i.turnIndex}`,i.id),Array.isArray(i.fileChanges)&&i.fileChanges.length>0&&n.set(i.id,{changes:dt(i.fileChanges),sourceMessageIds:[],source:"assistant"})),!tt(i))continue;const a=typeof i.turnIndex=="number"?`turn:${i.turnIndex}`:`message:${i.id}`,c=t.get(a);c?c.push(i):t.set(a,[i])}const s={};for(const[i,a]of t.entries()){const c=e.get(i);c&&(s[c]={changes:dt(a.flatMap(o=>o.fileChanges??[])),sourceMessageIds:a.map(o=>o.id),source:"metadata"})}for(const[i,a]of n.entries())s[i]||(s[i]=a);return s}),ft=L(()=>{const e=new Map,n=new Map;for(const s of v.messages){if(Le(s)&&typeof s.turnIndex=="number"&&e.set(`turn:${s.turnIndex}`,s.id),!tt(s))continue;const i=typeof s.turnIndex=="number"?`turn:${s.turnIndex}`:`message:${s.id}`,a=n.get(i);a?a.push(s):n.set(i,[s])}const t={};for(const[s,i]of n.entries()){if(e.has(s))continue;const a=i[i.length-1];a&&(t[a.id]={changes:dt(i.flatMap(c=>c.fileChanges??[])),sourceMessageIds:i.map(c=>c.id),source:"metadata"})}return t}),ts=L(()=>{const e=new Set;for(const n of Object.values(He.value))for(const t of n.sourceMessageIds)e.add(t);for(const[n,t]of Object.entries(ft.value))for(const s of t.sourceMessageIds)s!==n&&e.add(s);return e});function re(e){return He.value[e.id]??null}function le(e){return ft.value[e.id]??null}function ce(e){return e.operation==="update"&&e.movedToPath?e.addedLineCount>0||e.removedLineCount>0?"Moved + edited":"Moved":e.operation==="add"?"Added":e.operation==="delete"?"Deleted":"Edited"}function Oe(e){return e.operation==="update"&&e.movedToPath?"move":e.operation}function G(e){const n=[];return e.addedLineCount>0&&n.push(`+${e.addedLineCount}`),e.removedLineCount>0&&n.push(`-${e.removedLineCount}`),n.join(" ")}function Xt(e,n,t=""){const s=[];return e>0&&s.push({tone:"add",label:`+${e}`}),n>0&&s.push({tone:"remove",label:`-${n}`}),s.length>0?s:t?[{tone:"neutral",label:t}]:[]}function Jt(e){return Xt(e.addedLineCount,e.removedLineCount)}function ze(e){return e===1?"1 file changed":`${e} files changed`}function ns(e){if(!e||e.changes.length===0)return"";let n=0,t=0,s=0,i=0;for(const c of e.changes){if(c.operation==="add"){n+=1;continue}if(c.operation==="delete"){t+=1;continue}if(c.movedToPath){i+=1;continue}s+=1}const a=[];return s>0&&a.push(`${s} edited`),n>0&&a.push(`${n} added`),t>0&&a.push(`${t} deleted`),i>0&&a.push(`${i} moved`),a.join(", ")}function Yt(e){if(!e||e.changes.length===0)return"Modified files";const n=ze(e.changes.length),t=ns(e);return t?`${n} · ${t}`:n}function Qt(e){if(!e||e.changes.length===0)return[];const n=e.changes.reduce((i,a)=>i+a.addedLineCount,0),t=e.changes.reduce((i,a)=>i+a.removedLineCount,0),s=e.changes.some(i=>i.movedToPath)?"Moved":"Ready";return Xt(n,t,s)}function I(e){const n=Vt(e,v.cwd),t=ae(oe(v.cwd.trim())),s=ae(oe(n));return t&&s.startsWith(`${t}/`)?s.slice(t.length+1):e}function ss(e){return!e||e.changes.length===0?"":`Modified files:
22
22
  ${e.changes.map(t=>{const s=I(t.path),i=t.movedToPath?` -> ${I(t.movedToPath)}`:"",a=G(t);return`- ${ce(t)}: ${s}${i}${a?` (${a})`:""}`}).join(`
23
- `)}`.trim()}const ue=L(()=>{var e;return((e=Xe.value)==null?void 0:e.changes)??[]}),S=L(()=>{const e=ue.value;return e.length===0?null:e.find(n=>T(n)===Ce.value)??e[0]});function is(e){var s;const t=((s=(e.movedToPath||e.path).split(".").pop())==null?void 0:s.toLowerCase())??"";return zt[t]??t??""}function os(e){return e.operation==="update"&&/^diff --git |^@@ |^--- |^\+\+\+ |^[ +-]|^\*\*\* (Move to:|End of File)/mu.test(e.diff)}function as(e){const n=e.diff.replace(/\r\n/g,`
23
+ `)}`.trim()}const ue=L(()=>{var e;return((e=Xe.value)==null?void 0:e.changes)??[]}),P=L(()=>{const e=ue.value;return e.length===0?null:e.find(n=>M(n)===Ce.value)??e[0]});function is(e){var s;const t=((s=(e.movedToPath||e.path).split(".").pop())==null?void 0:s.toLowerCase())??"";return zt[t]??t??""}function os(e){return e.operation==="update"&&/^diff --git |^@@ |^--- |^\+\+\+ |^[ +-]|^\*\*\* (Move to:|End of File)/mu.test(e.diff)}function as(e){const n=e.diff.replace(/\r\n/g,`
24
24
  `),t=n.length>0?n.split(`
25
- `):[];return t.length>0&&t[t.length-1]===""&&t.pop(),t.map((s,i)=>({key:`${T(e)}:synthetic:${i}`,kind:e.operation==="delete"?"remove":"add",oldLine:e.operation==="delete"?i+1:null,newLine:e.operation==="delete"?null:i+1,text:s}))}function rs(e){const n=e.diff.replace(/\r\n/g,`
25
+ `):[];return t.length>0&&t[t.length-1]===""&&t.pop(),t.map((s,i)=>({key:`${M(e)}:synthetic:${i}`,kind:e.operation==="delete"?"remove":"add",oldLine:e.operation==="delete"?i+1:null,newLine:e.operation==="delete"?null:i+1,text:s}))}function rs(e){const n=e.diff.replace(/\r\n/g,`
26
26
  `),t=n.length>0?n.split(`
27
- `):[];t.length>0&&t[t.length-1]===""&&t.pop();const s=[];let i=0,a=0;for(const[c,o]of t.entries()){const f=o.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/u);if(f){i=Number(f[1]),a=Number(f[2]),s.push({key:`${T(e)}:hunk:${c}`,kind:"hunk",oldLine:null,newLine:null,text:o});continue}if(o.startsWith("+")&&!o.startsWith("+++")){s.push({key:`${T(e)}:add:${c}`,kind:"add",oldLine:null,newLine:a,text:o.slice(1)}),a+=1;continue}if(o.startsWith("-")&&!o.startsWith("---")){s.push({key:`${T(e)}:remove:${c}`,kind:"remove",oldLine:i,newLine:null,text:o.slice(1)}),i+=1;continue}if(o.startsWith(" ")){s.push({key:`${T(e)}:context:${c}`,kind:"context",oldLine:i,newLine:a,text:o.slice(1)}),i+=1,a+=1;continue}s.push({key:`${T(e)}:meta:${c}`,kind:"meta",oldLine:null,newLine:null,text:o})}return s}function ls(e){return!e||!e.diff.trim()?[]:os(e)?rs(e):as(e)}const cs=L(()=>ls(S.value));function us(e){return!!(e!=null&&e.diff.trim())}function ds(e){return e.kind==="add"?"+":e.kind==="remove"?"-":e.kind==="hunk"?"@@":""}function fs(e){if(typeof document>"u")return!1;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly","true"),n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0",n.style.pointerEvents="none",document.body.appendChild(n),n.focus(),n.select(),n.setSelectionRange(0,e.length);try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(n)}}async function hs(e){var s;const n=Kt.value[e]??"";if(!n)return;let t=!1;if(typeof navigator<"u"&&((s=navigator.clipboard)!=null&&s.writeText))try{await navigator.clipboard.writeText(n),t=!0}catch{t=!1}t||(t=fs(n)),t&&(V.value=e,q&&clearTimeout(q),q=setTimeout(()=>{V.value===e&&(V.value=""),q=null},1800))}function ps(e){const n=Gt.value[e];typeof n=="number"&&g.activeThreadId&&lt("forkThread",{threadId:g.activeThreadId,turnIndex:n})}const en=L(()=>{const e={};for(const n of g.messages){if(n.role!=="user"||typeof n.turnIndex!="number")continue;const t=typeof n.turnId=="string"&&n.turnId.length>0?n.turnId:"";!t||n.text.trim().length===0||(e[n.id]=t)}return e});function tn(e){return typeof en.value[e.id]=="string"}function ms(e){const n=en.value[e];n&&lt("rollback",{turnId:n})}function de(e){const n=[],t=/https?:\/\/[^\s<>"'`,。;:!?、()[\]{}「」『』《》]+|file:\/\/[^\n<>"'`,。;:!?、[\]{}「」『』《》]+|["'](?:[A-Za-z]:[\\/]|~\/|\.{1,2}\/|\/)[^\n"']+["']|`(?:[A-Za-z]:[\\/]|~\/|\.{1,2}\/|\/)[^`\n]+`/gu;let s=0;for(const i of e.matchAll(t)){if(typeof i.index!="number")continue;const a=i.index,c=a+i[0].length;a>s&&n.push({kind:"text",value:e.slice(s,a)});let o=i[0],f="";for(;/[.,;:!?,。;:!?、]$/u.test(o);)f=o.slice(-1)+f,o=o.slice(0,-1);const d=Re(o);o=d.core;const m=d.leading,p=d.trailing+f;if(m&&n.push({kind:"text",value:m}),o.startsWith("**")&&o.endsWith("**")&&o.length>4)n.push({kind:"bold",value:o.slice(2,-2)}),p&&n.push({kind:"text",value:p});else if(/^https?:\/\//u.test(o))n.push({kind:"url",value:o,href:o}),p&&n.push({kind:"text",value:p});else{const k=_e(o);k?(n.push({kind:"file",value:o,path:k.path,displayPath:o,downloadName:We(k.path)}),p&&n.push({kind:"text",value:p})):n.push({kind:"text",value:i[0]})}s=c}return s<e.length&&n.push({kind:"text",value:e.slice(s)}),ks(n)}function ht(e,n){const t=[];let s=!1,i="";const a=c=>{c&&t.push({kind:"text",value:c})};for(const c of e){if(c.kind!=="text"){s&&(a(`${n.marker}${i}`),s=!1,i=""),t.push(c);continue}let o=c.value;for(;o.length>0;){const f=o.indexOf(n.marker);if(f<0){s?i+=o:a(o);break}const d=o.slice(0,f);if(s?i+=d:a(d),o=o.slice(f+n.marker.length),s){const m=i;m.length>0&&(!n.isValidContent||n.isValidContent(m))?t.push({kind:n.kind,value:m}):a(`${n.marker}${m}${n.marker}`),i="",s=!1}else s=!0}}return s&&a(`${n.marker}${i}`),t}function ks(e){const n=s=>s.trim().length>0&&!/^\s/u.test(s)&&!/\s$/u.test(s);let t=ht(e,{marker:"**",kind:"bold",isValidContent:n});return t=ht(t,{marker:"~~",kind:"strikethrough",isValidContent:n}),t=ht(t,{marker:"*",kind:"italic",isValidContent:n}),t}function vs(e){const n=[];let t=0,s=0;const i=(a,c)=>{let o=a.indexOf("[",c);for(;o>=0;){const f=a.indexOf("]",o+1);if(f<0)return null;if(a[f+1]!=="("){o=a.indexOf("[",o+1);continue}let d=1,m=f+2,p=!1;for(;m<a.length;){const k=a[m];if(k===`
28
- `){p=!0;break}if(k==="("&&(d+=1),k===")"&&(d-=1,d===0)){const _=a.slice(o,m+1);if(ut(_))return{start:o,end:m+1,token:_};break}m+=1}if(p){o=a.indexOf("[",o+1);continue}o=a.indexOf("[",o+1)}return null};for(;s<e.length;){const a=i(e,s);if(!a)break;const{start:c,end:o,token:f}=a;c>t&&n.push(...de(e.slice(t,c)));const d=ut(f);if(!d){n.push(...de(e.slice(c,o))),t=o,s=o;continue}const m=d.label,p=d.target;if(/^https?:\/\//u.test(p))n.push({kind:"url",value:m||p,href:p});else{const k=_e(p);k?n.push({kind:"file",value:p,path:k.path,displayPath:m||p,downloadName:We(k.path)}):n.push({kind:"text",value:f})}t=o,s=o}return t<e.length&&n.push(...de(e.slice(t))),n}function gs(e){const n=vs(e);if(!e.includes("`")||!n.some(s=>s.kind==="text"&&s.value.includes("`")))return n;const t=s=>{if(!s.includes("`"))return de(s);const i=[];let a=0,c=0;for(;a<s.length;){if(s[a]!=="`"){a+=1;continue}let o=1;for(;a+o<s.length&&s[a+o]==="`";)o+=1;const f="`".repeat(o);let d=a+o,m=-1;for(;d<s.length;){const k=s.indexOf(f,d);if(k<0)break;const _=k>0&&s[k-1]==="`",P=k+o<s.length&&s[k+o]==="`",w=s.slice(a+o,k).includes(`
29
- `);if(!_&&!P&&!w){m=k;break}d=k+1}if(m<0){a+=o;continue}a>c&&i.push(...de(s.slice(c,a)));const p=s.slice(a+o,m);if(p.length>0){const k=ut(p);if(k)if(/^https?:\/\//u.test(k.target))i.push({kind:"url",value:k.label||k.target,href:k.target});else{const _=_e(k.target);_?i.push({kind:"file",value:k.target,path:_.path,displayPath:k.label||k.target,downloadName:We(_.path)}):i.push({kind:"code",value:p})}else if(/^https?:\/\/[^\s]+$/u.test(p))i.push({kind:"url",value:p,href:p});else{const _=_e(p);if(_){const P=_.line?`${_.path}:${String(_.line)}`:_.path;i.push({kind:"file",value:p,path:_.path,displayPath:P,downloadName:We(_.path)})}else i.push({kind:"code",value:p})}}else i.push({kind:"text",value:`${f}${f}`});a=m+o,c=a}return c<s.length&&i.push(...de(s.slice(c))),i};return n.flatMap(s=>s.kind==="text"?t(s.value):[s])}function Z(e){const n=ye.get(e);return n?(ye.delete(e),ye.set(e,n),n):Fe(ye,e,gs(e),Rr)}function ys(e){const n=e.trim();if(!n)return"";if(n.startsWith("data:")||n.startsWith("blob:")||n.startsWith("http://")||n.startsWith("https://")||n.startsWith("/codex-local-image?"))return n;if(n.startsWith("file://"))return`/codex-local-image?path=${encodeURIComponent(n)}`;const t=n.startsWith("/"),s=/^[A-Za-z]:[\\/]/u.test(n);return t||s?`/codex-local-image?path=${encodeURIComponent(n)}`:n}function R(e){const n=e.trim();if(!n)return"#";const t=c=>c.startsWith("/")||/^[A-Za-z]:[\\/]/u.test(c),s=_e(n),i=(s==null?void 0:s.path)??n,a=Vt(i,g.cwd);if(t(a)){const c=a.startsWith("/")?a:`/${a}`;return`/codex-local-browse${encodeURI(c)}`}return"#"}const _s=L(()=>({left:`${String(Tt.value)}px`,top:`${String(Mt.value)}px`}));function ws(e){const n=e.trim();if(!n)return"";try{const t=new URL(n,window.location.href);return t.pathname.startsWith("/codex-local-browse")?`${`/codex-local-edit${t.pathname.slice(19)}`}${t.search}${t.hash}`:""}catch{return""}}function bs(e){const n=e.target;if(!(n instanceof Element))return;const t=n.closest("a.message-file-link");if(!(t instanceof HTMLAnchorElement))return;const s=(t.getAttribute("href")??"").trim();!s||s==="#"||(e.preventDefault(),e.stopPropagation(),Je.value=s,Ye.value=ws(s),Tt.value=e.clientX,Mt.value=e.clientY,me.value=!0)}function X(){me.value&&(me.value=!1)}function xs(){const e=Je.value;X(),!(!e||e==="#")&&window.open(e,"_blank","noopener,noreferrer")}function Cs(){const e=Ye.value;X(),!(!e||e==="#")&&window.open(e,"_blank","noopener,noreferrer")}async function $s(){const e=Je.value;if(X(),!(!e||e==="#"))try{await navigator.clipboard.writeText(e)}catch{const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly","true"),n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}}function nn(e){if(!me.value)return;const n=Lt.value;if(!n){X();return}const t=e.target;t instanceof Node&&n.contains(t)||X()}function sn(){X()}function on(e){e.key==="Escape"&&X()}function an(e){return e.replace(/\r\n/gu,`
30
- `)}function H(e){var t;return(((t=e.match(/^\s*/u))==null?void 0:t[0])??"").replace(/\t/gu," ").length}function rn(e,n){if(n<=0)return e.trimStart();let t=0,s=0;for(;t<e.length&&s<n;){const i=e[t];s+=i===" "?4:1,t+=1}return e.slice(t)}function O(e){return e.trim().length===0}function pt(e){const n=e.match(/^\s{0,3}(#{1,6})\s+(.+)$/u);return n?{level:n[1].length,value:n[2].trim()}:null}function je(e){const n=e.match(/^\s{0,3}>\s?(.*)$/u);return n?n[1]??"":null}function we(e){var t;const n=e.match(/^\s*[-*+]\s+(.+)$/u);return((t=n==null?void 0:n[1])==null?void 0:t.trim())??null}function Ls(e){var t;const n=e.match(/^(\s*)[-*+]\s+(.+)$/u);return n?{indent:H(n[1]??""),text:((t=n[2])==null?void 0:t.trim())??""}:null}function be(e){var t;const n=e.match(/^\s*[-*+]\s+\[([ xX])\]\s+(.+)$/u);return n?{checked:(n[1]??" ").toLowerCase()==="x",text:((t=n[2])==null?void 0:t.trim())??""}:null}function ln(e){var t;const n=e.match(/^(\s*)[-*+]\s+\[([ xX])\]\s+(.+)$/u);return n?{indent:H(n[1]??""),item:{checked:(n[2]??" ").toLowerCase()==="x",text:((t=n[3])==null?void 0:t.trim())??""}}:null}function cn(e){var t;const n=e.match(/^(\s*)(\d+)[.)]\s+(.+)$/u);return n?{indent:H(n[1]??""),start:Number.parseInt(n[2]??"1",10)||1,text:((t=n[3])==null?void 0:t.trim())??""}:null}function mt(e){var n;return((n=cn(e))==null?void 0:n.text)??null}function un(e){return cn(e)}function kt(e){const n=e.trim();if(!n.includes("|"))return null;let t=n;t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1));const s=[];let i="",a=0;for(let c=0;c<t.length;c+=1){const o=t[c];if(o==="\\"&&t[c+1]==="|"){i+="|",c+=1;continue}if(o==="`"){let f=1;for(;t[c+f]==="`";)f+=1;i+=t.slice(c,c+f),a===0?a=f:a===f&&(a=0),c+=f-1;continue}if(o==="|"&&a===0){s.push(i.trim()),i="";continue}i+=o}return s.push(i.trim()),s.some(c=>c.length>0)?s:null}function Ts(e){const n=kt(e);if(!n||n.length===0)return null;const t=n.map(s=>{const i=s.replace(/\s+/gu,"");if(!/^:?-{3,}:?$/u.test(i))return null;const a=i.startsWith(":"),c=i.endsWith(":");return a&&c?"center":c?"right":a?"left":null});return t.every((s,i)=>s!==null||/^-+$/u.test(n[i].replace(/\s+/gu,"")))?t:null}function dn(e,n){return e.length===n?e:e.length>n?e.slice(0,n):[...e,...Array.from({length:n-e.length},()=>"")]}function fn(e,n){var m;if(n+1>=e.length)return null;const t=e[n],s=e[n+1],i=kt(t),a=Ts(s);if(!i||!a||i.length!==a.length)return null;const c=t.trim();if(!c.startsWith("|")&&(((m=c.match(/\|/gu))==null?void 0:m.length)??0)<2)return null;const o=i.length,f=[];let d=n+2;for(;d<e.length&&!O(e[d]);){const p=kt(e[d]);if(!p)break;f.push(dn(p,o)),d+=1}return{kind:"table",headers:dn(i,o),rows:f,alignments:a}}function Ms(e){return O(e)||De(e)!==null||vt(e)||pt(e)!==null||je(e)!==null||be(e)!==null||we(e)!==null||mt(e)!==null}function Is(e,n,t=-1){const s=[];let i=n;for(;i<e.length&&!(Ms(e[i])||t>=0&&H(e[i])<=t);)s.push(t>=0?rn(e[i],t+1):e[i]),i+=1;const a=s.join(`
31
- `).trim();return a?{value:a,nextIndex:i}:null}function hn(e,n){for(let t=n;t<e.length;t+=1)if(!O(e[t]))return t;return-1}function Ss(e,n,t,s=null,i=!1){const a=[];let c=n;for(;c<e.length;){const o=e[c];if(O(o)){const p=hn(e,c+1);if(p===-1){a.push(""),c=e.length;break}const k=s==null?void 0:s(e[p]);if(k&&k.indent===t||H(e[p])<=t)break;a.push(""),c+=1;continue}const f=s==null?void 0:s(o);if(f&&f.indent===t)break;const d=H(o),m=i&&(be(o)!==null||we(o)!==null);if(d<=t&&!m)break;a.push(d>t?rn(o,t+1):o.trimStart()),c+=1}for(;a.length>0&&O(a[0]);)a.shift();for(;a.length>0&&O(a[a.length-1]);)a.pop();return a.length===0?null:{blocks:Ne(a.join(`
32
- `)),nextIndex:c}}function pn(e,n,t,s=!1){const i=[];let a=n;const c=t(e[n]);if(!c)return null;const o=c.indent;for(;a<e.length;){const f=t(e[a]);if(f===null||f.indent!==o)break;const d=[f.text],m=[];for(a+=1;a<e.length;){if(O(e[a])){const w=hn(e,a+1);if(w===-1){a=e.length;break}const A=t(e[w]);if(A&&A.indent===o){a=w;break}if(H(e[w])<=o){a=w;break}a+=1;continue}const p=t(e[a]);if(p&&p.indent===o)break;const k=H(e[a])>o,_=s&&(be(e[a])!==null||we(e[a])!==null);if(k||_){const w=Ss(e,a,o,t,s);if(w){m.push(...w.blocks),a=w.nextIndex;continue}}if(H(e[a])<=o)break;const P=Is(e,a,o);if(!P)break;d.push(P.value),a=P.nextIndex}i.push(m.length>0?{paragraphs:d,children:m}:{paragraphs:d})}return i.length>0?{items:i,nextIndex:a}:null}function vt(e){return/^\s{0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/u.test(e.trim())}function De(e){const n=e.match(/^\s{0,3}(```+|~~~+)\s*([^\s`~][^`]*)?\s*$/u);return n?{marker:n[1],language:(n[2]??"").trim()}:null}function Ne(e){var a;const t=an(e).split(`
27
+ `):[];t.length>0&&t[t.length-1]===""&&t.pop();const s=[];let i=0,a=0;for(const[c,o]of t.entries()){const f=o.match(/^@@\s+-(\d+)(?:,\d+)?\s+\+(\d+)(?:,\d+)?\s+@@/u);if(f){i=Number(f[1]),a=Number(f[2]),s.push({key:`${M(e)}:hunk:${c}`,kind:"hunk",oldLine:null,newLine:null,text:o});continue}if(o.startsWith("+")&&!o.startsWith("+++")){s.push({key:`${M(e)}:add:${c}`,kind:"add",oldLine:null,newLine:a,text:o.slice(1)}),a+=1;continue}if(o.startsWith("-")&&!o.startsWith("---")){s.push({key:`${M(e)}:remove:${c}`,kind:"remove",oldLine:i,newLine:null,text:o.slice(1)}),i+=1;continue}if(o.startsWith(" ")){s.push({key:`${M(e)}:context:${c}`,kind:"context",oldLine:i,newLine:a,text:o.slice(1)}),i+=1,a+=1;continue}s.push({key:`${M(e)}:meta:${c}`,kind:"meta",oldLine:null,newLine:null,text:o})}return s}function ls(e){return!e||!e.diff.trim()?[]:os(e)?rs(e):as(e)}const cs=L(()=>ls(P.value));function us(e){return!!(e!=null&&e.diff.trim())}function ds(e){return e.kind==="add"?"+":e.kind==="remove"?"-":e.kind==="hunk"?"@@":""}function fs(e){if(typeof document>"u")return!1;const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly","true"),n.style.position="fixed",n.style.left="-9999px",n.style.opacity="0",n.style.pointerEvents="none",document.body.appendChild(n),n.focus(),n.select(),n.setSelectionRange(0,e.length);try{return document.execCommand("copy")}catch{return!1}finally{document.body.removeChild(n)}}async function hs(e){var s;const n=Kt.value[e]??"";if(!n)return;let t=!1;if(typeof navigator<"u"&&((s=navigator.clipboard)!=null&&s.writeText))try{await navigator.clipboard.writeText(n),t=!0}catch{t=!1}t||(t=fs(n)),t&&(V.value=e,q&&clearTimeout(q),q=setTimeout(()=>{V.value===e&&(V.value=""),q=null},1800))}function ps(e){const n=Gt.value[e];typeof n=="number"&&v.activeThreadId&&lt("forkThread",{threadId:v.activeThreadId,turnIndex:n})}const en=L(()=>{const e={};for(const n of v.messages){if(n.role!=="user"||typeof n.turnIndex!="number")continue;const t=typeof n.turnId=="string"&&n.turnId.length>0?n.turnId:"";!t||n.text.trim().length===0||(e[n.id]=t)}return e});function tn(e){return typeof en.value[e.id]=="string"}function ms(e){const n=en.value[e];n&&lt("rollback",{turnId:n})}function de(e){const n=[],t=/https?:\/\/[^\s<>"'`,。;:!?、()[\]{}「」『』《》]+|file:\/\/[^\n<>"'`,。;:!?、[\]{}「」『』《》]+|["'](?:[A-Za-z]:[\\/]|~\/|\.{1,2}\/|\/)[^\n"']+["']|`(?:[A-Za-z]:[\\/]|~\/|\.{1,2}\/|\/)[^`\n]+`/gu;let s=0;for(const i of e.matchAll(t)){if(typeof i.index!="number")continue;const a=i.index,c=a+i[0].length;a>s&&n.push({kind:"text",value:e.slice(s,a)});let o=i[0],f="";for(;/[.,;:!?,。;:!?、]$/u.test(o);)f=o.slice(-1)+f,o=o.slice(0,-1);const d=Re(o);o=d.core;const m=d.leading,p=d.trailing+f;if(m&&n.push({kind:"text",value:m}),o.startsWith("**")&&o.endsWith("**")&&o.length>4)n.push({kind:"bold",value:o.slice(2,-2)}),p&&n.push({kind:"text",value:p});else if(/^https?:\/\//u.test(o))n.push({kind:"url",value:o,href:o}),p&&n.push({kind:"text",value:p});else{const k=_e(o);k?(n.push({kind:"file",value:o,path:k.path,displayPath:o,downloadName:We(k.path)}),p&&n.push({kind:"text",value:p})):n.push({kind:"text",value:i[0]})}s=c}return s<e.length&&n.push({kind:"text",value:e.slice(s)}),vs(n)}function ht(e,n){const t=[];let s=!1,i="";const a=c=>{c&&t.push({kind:"text",value:c})};for(const c of e){if(c.kind!=="text"){s&&(a(`${n.marker}${i}`),s=!1,i=""),t.push(c);continue}let o=c.value;for(;o.length>0;){const f=o.indexOf(n.marker);if(f<0){s?i+=o:a(o);break}const d=o.slice(0,f);if(s?i+=d:a(d),o=o.slice(f+n.marker.length),s){const m=i;m.length>0&&(!n.isValidContent||n.isValidContent(m))?t.push({kind:n.kind,value:m}):a(`${n.marker}${m}${n.marker}`),i="",s=!1}else s=!0}}return s&&a(`${n.marker}${i}`),t}function vs(e){const n=s=>s.trim().length>0&&!/^\s/u.test(s)&&!/\s$/u.test(s);let t=ht(e,{marker:"**",kind:"bold",isValidContent:n});return t=ht(t,{marker:"~~",kind:"strikethrough",isValidContent:n}),t=ht(t,{marker:"*",kind:"italic",isValidContent:n}),t}function ks(e){const n=[];let t=0,s=0;const i=(a,c)=>{let o=a.indexOf("[",c);for(;o>=0;){const f=a.indexOf("]",o+1);if(f<0)return null;if(a[f+1]!=="("){o=a.indexOf("[",o+1);continue}let d=1,m=f+2,p=!1;for(;m<a.length;){const k=a[m];if(k===`
28
+ `){p=!0;break}if(k==="("&&(d+=1),k===")"&&(d-=1,d===0)){const _=a.slice(o,m+1);if(ut(_))return{start:o,end:m+1,token:_};break}m+=1}if(p){o=a.indexOf("[",o+1);continue}o=a.indexOf("[",o+1)}return null};for(;s<e.length;){const a=i(e,s);if(!a)break;const{start:c,end:o,token:f}=a;c>t&&n.push(...de(e.slice(t,c)));const d=ut(f);if(!d){n.push(...de(e.slice(c,o))),t=o,s=o;continue}const m=d.label,p=d.target;if(/^https?:\/\//u.test(p))n.push({kind:"url",value:m||p,href:p});else{const k=_e(p);k?n.push({kind:"file",value:p,path:k.path,displayPath:m||p,downloadName:We(k.path)}):n.push({kind:"text",value:f})}t=o,s=o}return t<e.length&&n.push(...de(e.slice(t))),n}function gs(e){const n=ks(e);if(!e.includes("`")||!n.some(s=>s.kind==="text"&&s.value.includes("`")))return n;const t=s=>{if(!s.includes("`"))return de(s);const i=[];let a=0,c=0;for(;a<s.length;){if(s[a]!=="`"){a+=1;continue}let o=1;for(;a+o<s.length&&s[a+o]==="`";)o+=1;const f="`".repeat(o);let d=a+o,m=-1;for(;d<s.length;){const k=s.indexOf(f,d);if(k<0)break;const _=k>0&&s[k-1]==="`",S=k+o<s.length&&s[k+o]==="`",w=s.slice(a+o,k).includes(`
29
+ `);if(!_&&!S&&!w){m=k;break}d=k+1}if(m<0){a+=o;continue}a>c&&i.push(...de(s.slice(c,a)));const p=s.slice(a+o,m);if(p.length>0){const k=ut(p);if(k)if(/^https?:\/\//u.test(k.target))i.push({kind:"url",value:k.label||k.target,href:k.target});else{const _=_e(k.target);_?i.push({kind:"file",value:k.target,path:_.path,displayPath:k.label||k.target,downloadName:We(_.path)}):i.push({kind:"code",value:p})}else if(/^https?:\/\/[^\s]+$/u.test(p))i.push({kind:"url",value:p,href:p});else{const _=_e(p);if(_){const S=_.line?`${_.path}:${String(_.line)}`:_.path;i.push({kind:"file",value:p,path:_.path,displayPath:S,downloadName:We(_.path)})}else i.push({kind:"code",value:p})}}else i.push({kind:"text",value:`${f}${f}`});a=m+o,c=a}return c<s.length&&i.push(...de(s.slice(c))),i};return n.flatMap(s=>s.kind==="text"?t(s.value):[s])}function Z(e){const n=ye.get(e);return n?(ye.delete(e),ye.set(e,n),n):Fe(ye,e,gs(e),Rr)}function ys(e){const n=e.trim();if(!n)return"";if(n.startsWith("data:")||n.startsWith("blob:")||n.startsWith("http://")||n.startsWith("https://")||n.startsWith("/codex-local-image?"))return n;if(n.startsWith("file://"))return`/codex-local-image?path=${encodeURIComponent(n)}`;const t=n.startsWith("/"),s=/^[A-Za-z]:[\\/]/u.test(n);return t||s?`/codex-local-image?path=${encodeURIComponent(n)}`:n}function R(e){const n=e.trim();if(!n)return"#";const t=c=>c.startsWith("/")||/^[A-Za-z]:[\\/]/u.test(c),s=_e(n),i=(s==null?void 0:s.path)??n,a=Vt(i,v.cwd);if(t(a)){const c=a.startsWith("/")?a:`/${a}`;return`/codex-local-browse${encodeURI(c)}`}return"#"}const _s=L(()=>({left:`${String(Tt.value)}px`,top:`${String(Mt.value)}px`}));function ws(e){const n=e.trim();if(!n)return"";try{const t=new URL(n,window.location.href);return t.pathname.startsWith("/codex-local-browse")?`${`/codex-local-edit${t.pathname.slice(19)}`}${t.search}${t.hash}`:""}catch{return""}}function bs(e){const n=e.target;if(!(n instanceof Element))return;const t=n.closest("a.message-file-link");if(!(t instanceof HTMLAnchorElement))return;const s=(t.getAttribute("href")??"").trim();!s||s==="#"||(e.preventDefault(),e.stopPropagation(),Je.value=s,Ye.value=ws(s),Tt.value=e.clientX,Mt.value=e.clientY,me.value=!0)}function X(){me.value&&(me.value=!1)}function xs(){const e=Je.value;X(),!(!e||e==="#")&&window.open(e,"_blank","noopener,noreferrer")}function Cs(){const e=Ye.value;X(),!(!e||e==="#")&&window.open(e,"_blank","noopener,noreferrer")}async function $s(){const e=Je.value;if(X(),!(!e||e==="#"))try{await navigator.clipboard.writeText(e)}catch{const n=document.createElement("textarea");n.value=e,n.setAttribute("readonly","true"),n.style.position="fixed",n.style.opacity="0",document.body.appendChild(n),n.select(),document.execCommand("copy"),document.body.removeChild(n)}}function nn(e){if(!me.value)return;const n=Lt.value;if(!n){X();return}const t=e.target;t instanceof Node&&n.contains(t)||X()}function sn(){X()}function on(e){e.key==="Escape"&&X()}function an(e){return e.replace(/\r\n/gu,`
30
+ `)}function H(e){var t;return(((t=e.match(/^\s*/u))==null?void 0:t[0])??"").replace(/\t/gu," ").length}function rn(e,n){if(n<=0)return e.trimStart();let t=0,s=0;for(;t<e.length&&s<n;){const i=e[t];s+=i===" "?4:1,t+=1}return e.slice(t)}function O(e){return e.trim().length===0}function pt(e){const n=e.match(/^\s{0,3}(#{1,6})\s+(.+)$/u);return n?{level:n[1].length,value:n[2].trim()}:null}function je(e){const n=e.match(/^\s{0,3}>\s?(.*)$/u);return n?n[1]??"":null}function we(e){var t;const n=e.match(/^\s*[-*+]\s+(.+)$/u);return((t=n==null?void 0:n[1])==null?void 0:t.trim())??null}function Ls(e){var t;const n=e.match(/^(\s*)[-*+]\s+(.+)$/u);return n?{indent:H(n[1]??""),text:((t=n[2])==null?void 0:t.trim())??""}:null}function be(e){var t;const n=e.match(/^\s*[-*+]\s+\[([ xX])\]\s+(.+)$/u);return n?{checked:(n[1]??" ").toLowerCase()==="x",text:((t=n[2])==null?void 0:t.trim())??""}:null}function ln(e){var t;const n=e.match(/^(\s*)[-*+]\s+\[([ xX])\]\s+(.+)$/u);return n?{indent:H(n[1]??""),item:{checked:(n[2]??" ").toLowerCase()==="x",text:((t=n[3])==null?void 0:t.trim())??""}}:null}function cn(e){var t;const n=e.match(/^(\s*)(\d+)[.)]\s+(.+)$/u);return n?{indent:H(n[1]??""),start:Number.parseInt(n[2]??"1",10)||1,text:((t=n[3])==null?void 0:t.trim())??""}:null}function mt(e){var n;return((n=cn(e))==null?void 0:n.text)??null}function un(e){return cn(e)}function vt(e){const n=e.trim();if(!n.includes("|"))return null;let t=n;t.startsWith("|")&&(t=t.slice(1)),t.endsWith("|")&&(t=t.slice(0,-1));const s=[];let i="",a=0;for(let c=0;c<t.length;c+=1){const o=t[c];if(o==="\\"&&t[c+1]==="|"){i+="|",c+=1;continue}if(o==="`"){let f=1;for(;t[c+f]==="`";)f+=1;i+=t.slice(c,c+f),a===0?a=f:a===f&&(a=0),c+=f-1;continue}if(o==="|"&&a===0){s.push(i.trim()),i="";continue}i+=o}return s.push(i.trim()),s.some(c=>c.length>0)?s:null}function Ts(e){const n=vt(e);if(!n||n.length===0)return null;const t=n.map(s=>{const i=s.replace(/\s+/gu,"");if(!/^:?-{3,}:?$/u.test(i))return null;const a=i.startsWith(":"),c=i.endsWith(":");return a&&c?"center":c?"right":a?"left":null});return t.every((s,i)=>s!==null||/^-+$/u.test(n[i].replace(/\s+/gu,"")))?t:null}function dn(e,n){return e.length===n?e:e.length>n?e.slice(0,n):[...e,...Array.from({length:n-e.length},()=>"")]}function fn(e,n){var m;if(n+1>=e.length)return null;const t=e[n],s=e[n+1],i=vt(t),a=Ts(s);if(!i||!a||i.length!==a.length)return null;const c=t.trim();if(!c.startsWith("|")&&(((m=c.match(/\|/gu))==null?void 0:m.length)??0)<2)return null;const o=i.length,f=[];let d=n+2;for(;d<e.length&&!O(e[d]);){const p=vt(e[d]);if(!p)break;f.push(dn(p,o)),d+=1}return{kind:"table",headers:dn(i,o),rows:f,alignments:a}}function Ms(e){return O(e)||De(e)!==null||kt(e)||pt(e)!==null||je(e)!==null||be(e)!==null||we(e)!==null||mt(e)!==null}function Is(e,n,t=-1){const s=[];let i=n;for(;i<e.length&&!(Ms(e[i])||t>=0&&H(e[i])<=t);)s.push(t>=0?rn(e[i],t+1):e[i]),i+=1;const a=s.join(`
31
+ `).trim();return a?{value:a,nextIndex:i}:null}function hn(e,n){for(let t=n;t<e.length;t+=1)if(!O(e[t]))return t;return-1}function Ps(e,n,t,s=null,i=!1){const a=[];let c=n;for(;c<e.length;){const o=e[c];if(O(o)){const p=hn(e,c+1);if(p===-1){a.push(""),c=e.length;break}const k=s==null?void 0:s(e[p]);if(k&&k.indent===t||H(e[p])<=t)break;a.push(""),c+=1;continue}const f=s==null?void 0:s(o);if(f&&f.indent===t)break;const d=H(o),m=i&&(be(o)!==null||we(o)!==null);if(d<=t&&!m)break;a.push(d>t?rn(o,t+1):o.trimStart()),c+=1}for(;a.length>0&&O(a[0]);)a.shift();for(;a.length>0&&O(a[a.length-1]);)a.pop();return a.length===0?null:{blocks:Ne(a.join(`
32
+ `)),nextIndex:c}}function pn(e,n,t,s=!1){const i=[];let a=n;const c=t(e[n]);if(!c)return null;const o=c.indent;for(;a<e.length;){const f=t(e[a]);if(f===null||f.indent!==o)break;const d=[f.text],m=[];for(a+=1;a<e.length;){if(O(e[a])){const w=hn(e,a+1);if(w===-1){a=e.length;break}const A=t(e[w]);if(A&&A.indent===o){a=w;break}if(H(e[w])<=o){a=w;break}a+=1;continue}const p=t(e[a]);if(p&&p.indent===o)break;const k=H(e[a])>o,_=s&&(be(e[a])!==null||we(e[a])!==null);if(k||_){const w=Ps(e,a,o,t,s);if(w){m.push(...w.blocks),a=w.nextIndex;continue}}if(H(e[a])<=o)break;const S=Is(e,a,o);if(!S)break;d.push(S.value),a=S.nextIndex}i.push(m.length>0?{paragraphs:d,children:m}:{paragraphs:d})}return i.length>0?{items:i,nextIndex:a}:null}function kt(e){return/^\s{0,3}(?:-{3,}|\*{3,}|_{3,})\s*$/u.test(e.trim())}function De(e){const n=e.match(/^\s{0,3}(```+|~~~+)\s*([^\s`~][^`]*)?\s*$/u);return n?{marker:n[1],language:(n[2]??"").trim()}:null}function Ne(e){var a;const t=an(e).split(`
33
33
  `),s=[];let i=0;for(;i<t.length;){if(O(t[i])){i+=1;continue}const c=De(t[i]);if(c){i+=1;const w=[];for(;i<t.length;){if(t[i].trim()===c.marker){i+=1;break}w.push(t[i]),i+=1}s.push({kind:"codeBlock",language:c.language,value:w.join(`
34
- `)});continue}if(vt(t[i])){s.push({kind:"thematicBreak"}),i+=1;continue}const o=pt(t[i]);if(o){s.push({kind:"heading",level:o.level,value:o.value}),i+=1;continue}if(je(t[i])!==null){const w=[];for(;i<t.length;){const A=je(t[i]);if(A===null)break;w.push(A),i+=1}s.push({kind:"blockquote",value:w.join(`
35
- `).trim()});continue}const d=fn(t,i);if(d){s.push(d),i+=2+d.rows.length;continue}if(be(t[i])!==null){const w=[],A=((a=ln(t[i]))==null?void 0:a.indent)??0;for(;i<t.length;){const wt=ln(t[i]);if(wt===null||wt.indent!==A)break;w.push(wt.item),i+=1}if(w.length>0){s.push({kind:"taskList",items:w});continue}}const p=we(t[i]);if(p!==null){const w=pn(t,i,Ls);if(w){s.push({kind:"unorderedList",items:w.items}),i=w.nextIndex;continue}if(p.length>0){s.push({kind:"unorderedList",items:[{paragraphs:[p]}]}),i+=1;continue}}const k=mt(t[i]);if(k!==null){const w=un(t[i]),A=pn(t,i,un,!0);if(A){s.push({kind:"orderedList",items:A.items,start:(w==null?void 0:w.start)??1}),i=A.nextIndex;continue}if(k.length>0){s.push({kind:"orderedList",items:[{paragraphs:[k]}],start:(w==null?void 0:w.start)??1}),i+=1;continue}}const _=[];for(;i<t.length&&!(O(t[i])||De(t[i])||vt(t[i])||pt(t[i])||fn(t,i)||je(t[i])!==null||be(t[i])!==null||we(t[i])!==null||mt(t[i])!==null);)_.push(t[i]),i+=1;const P=_.join(`
36
- `).trim();P&&s.push({kind:"paragraph",value:P})}return s}function Ps(e){if(!e.includes("![")||!e.includes("]("))return Ne(e);const n=[],t=/!\[([^\]]*)\]\(([^)\n]+)\)/gu;let s=0;for(const i of e.matchAll(t)){const[a,c,o]=i;if(typeof i.index!="number")continue;const f=i.index,d=f+a.length,m=ys(o.trim());m&&(f>s&&n.push(...Ne(e.slice(s,f))),n.push({kind:"image",url:m,alt:c.trim(),markdown:a}),s=d)}return s<e.length&&n.push(...Ne(e.slice(s))),n}function mn(e){const t=an(e).split(`
34
+ `)});continue}if(kt(t[i])){s.push({kind:"thematicBreak"}),i+=1;continue}const o=pt(t[i]);if(o){s.push({kind:"heading",level:o.level,value:o.value}),i+=1;continue}if(je(t[i])!==null){const w=[];for(;i<t.length;){const A=je(t[i]);if(A===null)break;w.push(A),i+=1}s.push({kind:"blockquote",value:w.join(`
35
+ `).trim()});continue}const d=fn(t,i);if(d){s.push(d),i+=2+d.rows.length;continue}if(be(t[i])!==null){const w=[],A=((a=ln(t[i]))==null?void 0:a.indent)??0;for(;i<t.length;){const wt=ln(t[i]);if(wt===null||wt.indent!==A)break;w.push(wt.item),i+=1}if(w.length>0){s.push({kind:"taskList",items:w});continue}}const p=we(t[i]);if(p!==null){const w=pn(t,i,Ls);if(w){s.push({kind:"unorderedList",items:w.items}),i=w.nextIndex;continue}if(p.length>0){s.push({kind:"unorderedList",items:[{paragraphs:[p]}]}),i+=1;continue}}const k=mt(t[i]);if(k!==null){const w=un(t[i]),A=pn(t,i,un,!0);if(A){s.push({kind:"orderedList",items:A.items,start:(w==null?void 0:w.start)??1}),i=A.nextIndex;continue}if(k.length>0){s.push({kind:"orderedList",items:[{paragraphs:[k]}],start:(w==null?void 0:w.start)??1}),i+=1;continue}}const _=[];for(;i<t.length&&!(O(t[i])||De(t[i])||kt(t[i])||pt(t[i])||fn(t,i)||je(t[i])!==null||be(t[i])!==null||we(t[i])!==null||mt(t[i])!==null);)_.push(t[i]),i+=1;const S=_.join(`
36
+ `).trim();S&&s.push({kind:"paragraph",value:S})}return s}function Ss(e){if(!e.includes("![")||!e.includes("]("))return Ne(e);const n=[],t=/!\[([^\]]*)\]\(([^)\n]+)\)/gu;let s=0;for(const i of e.matchAll(t)){const[a,c,o]=i;if(typeof i.index!="number")continue;const f=i.index,d=f+a.length,m=ys(o.trim());m&&(f>s&&n.push(...Ne(e.slice(s,f))),n.push({kind:"image",url:m,alt:c.trim(),markdown:a}),s=d)}return s<e.length&&n.push(...Ne(e.slice(s))),n}function mn(e){const t=an(e).split(`
37
37
  `),s=[];let i=0,a=0;const c=o=>{if(o<=a)return;const f=t.slice(a,o).join(`
38
- `);s.push(...Ps(f))};for(;i<t.length;){const o=De(t[i]);if(!o){i+=1;continue}c(i),i+=1;const f=[];for(;i<t.length;){if(t[i].trim()===o.marker){i+=1;break}f.push(t[i]),i+=1}s.push({kind:"codeBlock",language:o.language,value:f.join(`
39
- `)}),a=i}return c(t.length),s.length>0?s:[{kind:"paragraph",value:e}]}function As(e){const n=ge.get(e.id);if(n&&n.text===e.text&&n.cwd===g.cwd)return ge.delete(e.id),ge.set(e.id,n),n.blocks;const t=mn(e.text);return Fe(ge,e.id,{text:e.text,cwd:g.cwd,blocks:t},Wr).blocks}function $(e){return e.replace(/&/gu,"&amp;").replace(/</gu,"&lt;").replace(/>/gu,"&gt;").replace(/"/gu,"&quot;").replace(/'/gu,"&#39;")}function kn(e){var t;const n=((t=e.trim().split(/\s+/u)[0])==null?void 0:t.toLowerCase())??"";return n?zt[n]??n:""}function Es(e,n){const t=kn(e);if(!t)return $(n);const s=Ee.value;if(!s)return $(n);try{if(s.getLanguage(t))return s.highlight(n,{language:t,ignoreIllegals:!0}).value}catch{}return $(n)}function vn(e,n){const t=`${ne.value}\0${kn(e)}\0${e}\0${n}`,s=ie.get(t);return s!==void 0?(ie.delete(t),ie.set(t,s),s):Fe(ie,t,Es(e,n),Or)}function J(e){return Z(e).map(n=>n.kind==="text"?$(n.value):n.kind==="bold"?`<strong class="message-bold-text">${$(n.value)}</strong>`:n.kind==="italic"?`<em class="message-italic-text">${$(n.value)}</em>`:n.kind==="strikethrough"?`<s class="message-strikethrough-text">${$(n.value)}</s>`:n.kind==="file"?`<a class="message-file-link" href="${$(R(n.path))}" target="_blank" rel="noopener noreferrer" title="${$(n.path)}">${$(n.displayPath)}</a>`:n.kind==="url"?`<a class="message-file-link" href="${$(n.href)}" target="_blank" rel="noopener noreferrer" title="${$(n.href)}">${$(n.value)}</a>`:`<code class="message-inline-code">${$(n.value)}</code>`).join("")}function Bs(e){return e.paragraphs.map(n=>`<div class="message-list-item-text message-list-item-paragraph">${J(n)}</div>`).join("")}function Ve(e){var s;const n=Bs(e),t=((s=e.children)==null?void 0:s.map(i=>yn(i)).join(""))??"";return n+t}function gn(e){return e?` style="text-align:${e}"`:""}function yn(e){if(e.kind==="paragraph")return`<p class="message-text">${J(e.value)}</p>`;if(e.kind==="heading"){const n=Math.min(6,Math.max(1,Math.trunc(e.level))),t=Ut(n),s=`message-heading ${qt(n)}`;return`<${t} class="${s}">${J(e.value)}</${t}>`}if(e.kind==="blockquote")return`<blockquote class="message-blockquote">${J(e.value)}</blockquote>`;if(e.kind==="unorderedList")return`<ul class="message-list message-list-unordered">${e.items.map(t=>`<li class="message-list-item"><div class="message-list-item-content">${Ve(t)}</div></li>`).join("")}</ul>`;if(e.kind==="taskList")return`<ul class="message-list message-task-list">${e.items.map(t=>`<li class="message-task-item"><span class="message-task-checkbox" data-checked="${t.checked?"true":"false"}">${t.checked?"☑":"☐"}</span><div class="message-list-item-text">${J(t.text)}</div></li>`).join("")}</ul>`;if(e.kind==="orderedList"){const n=e.items.map(t=>`<li class="message-list-item"><div class="message-list-item-content">${Ve(t)}</div></li>`).join("");return`<ol class="message-list message-list-ordered" start="${e.start}">${n}</ol>`}if(e.kind==="table"){const n=e.headers.map((i,a)=>`<th class="message-table-head-cell"${gn(e.alignments[a]??null)}>${J(i)}</th>`).join(""),t=e.rows.map(i=>'<tr class="message-table-body-row">'+i.map((a,c)=>`<td class="message-table-cell"${gn(e.alignments[c]??null)}>${J(a)}</td>`).join("")+"</tr>").join(""),s=t?`<tbody>${t}</tbody>`:"";return`<div class="message-table-wrap"><table class="message-table"><thead><tr>${n}</tr></thead>${s}</table></div>`}return e.kind==="codeBlock"?`<div class="message-code-block">${e.language?`<div class="message-code-language">${$(e.language)}</div>`:""}<pre class="message-code-pre"><code class="hljs">${vn(e.language,e.value)}</code></pre></div>`:e.kind==="thematicBreak"?'<hr class="message-divider">':`<img class="message-image-preview message-markdown-image" src="${$(e.url)}" alt="${$(e.alt||"Embedded message image")}" loading="lazy">`}function gt(e){const n=`${g.cwd}\0${ne.value}\0${e}`,t=se.get(n);if(t&&t.text===e&&t.cwd===g.cwd&&t.highlightVersion===ne.value)return se.delete(n),se.set(n,t),t.html;const s=mn(e).map(i=>yn(i)).join("");return Fe(se,n,{text:e,cwd:g.cwd,highlightVersion:ne.value,html:s},Hr).html}function Fs(){const e=N.value,n=Ot.value;!e||!n||(e.scrollTop=e.scrollHeight,n.scrollIntoView({block:"end"}))}function Ws(e){return e.scrollHeight-(e.scrollTop+e.clientHeight)<=Fr}function Rs(){if(N.value&&j.value){Ue();return}}function Ue(){N.value&&Fs()}function yt(){return j.value}function _n(){if(!yt()){Ae=0,E=0;return}if(Ue(),Ae-=1,Ae<=0){E=0;return}E=requestAnimationFrame(_n)}function qe(e=6){yt()&&(E&&(cancelAnimationFrame(E),E=0),Ae=Math.max(e,1),E=requestAnimationFrame(_n))}function wn(){qe(3)}function bn(){j.value=!0,Ue(),qe(4)}async function xn(){const e=N.value;if(!e||!ct.value||K.value)return;K.value=!0;const n=g.activeThreadId,t=e.scrollHeight,s=e.scrollTop;W.value=Math.max(0,W.value-zr),await bt(),g.activeThreadId===n&&(e.scrollTop=s+(e.scrollHeight-t),K.value=!1)}xe({jumpToLatest:bn});function Hs(){if(!yt())return;const e=N.value;if(!e)return;const n=e.querySelectorAll("img.message-image-preview");for(const t of n)t.complete||jt.has(t)||(jt.add(t),t.addEventListener("load",wn,{once:!0}),t.addEventListener("error",wn,{once:!0}))}async function Ke(){return ve||(ve=bt().then(()=>new Promise(e=>{U&&cancelAnimationFrame(U),U=requestAnimationFrame(()=>{U=0,ve=null,Rs(),Hs(),qe(),e()})})),ve)}function Os(){ge.clear(),ye.clear(),se.clear(),ie.clear()}Y(()=>g.messages,async e=>{if(g.isLoading)return;const n=new Set(e.filter(t=>t.messageType==="commandExecution"&&t.commandExecution).map(t=>t.id));fe.value=Pe(fe.value,n),z.value=Pe(z.value,n),he.value=Pe(he.value,new Set(Object.keys(st.value))),pe.value=Pe(pe.value,new Set([...Object.keys(He.value),...Object.keys(ft.value)])),j.value?W.value=Math.max(0,e.length-$t):W.value=Math.min(W.value,Math.max(0,e.length-1)),await Ke()}),Y(()=>g.messages.some(e=>e.text.includes("```")),e=>{!e||Ee.value||Un()},{immediate:!0}),Y(nt,(e,n)=>{if(!n||n===e||!z.value.has(n))return;const t=new Set(z.value);t.delete(n),z.value=t}),Y(()=>g.pendingRequests,async()=>{g.isLoading||await Ke()},{deep:!0}),Y(()=>g.liveOverlay,async e=>{e&&j.value&&(await bt(),Ue(),qe(8))},{deep:!0}),Y(()=>g.isLoading,async e=>{e||(W.value=Math.max(0,g.messages.length-$t),await Ke())}),Y(()=>g.activeThreadId,async()=>{j.value=!0,ke.value="",K.value=!1,W.value=Math.max(0,g.messages.length-$t),await Ke()},{flush:"post"});function zs(){const e=N.value;!e||g.isLoading||(j.value=Ws(e),ct.value&&!K.value&&e.scrollTop<jr&&xn())}const _t=C(new Set);function Cn(e,n){return`${e}:${n}`}function js(e,n){return _t.value.has(Cn(e,n))}function Ds(e,n){const t=new Set(_t.value);t.add(Cn(e,n)),_t.value=t,Dt.value+=1}function $n(e){ke.value=e}function Ln(){ke.value=""}return Us(()=>{window.addEventListener("pointerdown",nn),window.addEventListener("blur",sn),window.addEventListener("keydown",on)}),qs(()=>{Os(),U&&(cancelAnimationFrame(U),U=0),E&&(cancelAnimationFrame(E),E=0),q&&(clearTimeout(q),q=null),window.removeEventListener("pointerdown",nn),window.removeEventListener("blur",sn),window.removeEventListener("keydown",on)}),(e,n)=>(r(),l("section",{class:"conversation-root",onContextmenuCapture:bs},[M.isLoading?(r(),l("p",oi,"Loading messages...")):M.messages.length===0&&M.pendingRequests.length===0&&!M.liveOverlay?(r(),l("p",ai," No messages in this thread yet. ")):(r(),l("ul",{key:2,ref_key:"conversationListRef",ref:N,class:"conversation-list",onScroll:zs},[ct.value?(r(),l("li",ri,[u("button",{type:"button",class:"load-more-button",disabled:K.value,onClick:xn},h(K.value?"Loading…":"Load earlier messages"),9,li)])):v("",!0),(r(!0),l(y,null,b(Nn.value,t=>{var s,i,a,c;return r(),l(y,{key:t.id},[!Bn.value.has(t.id)&&!ts.value.has(t.id)?(r(),l("li",{key:0,class:"conversation-item","data-role":t.role,"data-message-type":t.messageType||""},[B(t)?(r(),l("div",ui,[u("div",di,[Te(t).length>0?(r(),l("button",{key:0,type:"button",class:x(["cmd-row cmd-row-group cmd-compact",[Se(t),{"cmd-expanded":rt(t)}]]),onClick:o=>Wn(t)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":rt(t)}])},"▶",2),u("span",hi,h(Rn(t)),1),u("span",pi,h(Hn(t)),1)],10,fi)):v("",!0),Te(t).length>0?(r(),l("div",{key:1,class:x(["cmd-group-wrap",{"cmd-group-visible":rt(t)}])},[u("div",mi,[(r(!0),l(y,null,b(Bt(t),o=>{var f,d;return r(),l("div",{key:`grouped-cmd-${o.id}`,class:"worked-cmd-item"},[u("button",{type:"button",class:x(["cmd-row",[Se(o),{"cmd-expanded":F(o),"cmd-compact":!0}]]),onClick:m=>at(o)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":F(o)}])},"▶",2),u("code",vi,h(((f=o.commandExecution)==null?void 0:f.command)||"(command)"),1),u("span",gi,h(Ie(o)),1)],10,ki),u("div",{class:x(["cmd-output-wrap",{"cmd-output-visible":F(o)}])},[u("div",yi,[u("pre",{class:x(["cmd-output",{"cmd-output-condensed":ot(o)}]),textContent:h(((d=o.commandExecution)==null?void 0:d.aggregatedOutput)||"(no output)")},null,10,_i)])],2)])}),128))])],2)):(r(),l(y,{key:2},[u("button",{type:"button",class:x(["cmd-row",[Se(t),{"cmd-expanded":F(t),"cmd-compact":it(t)}]]),onClick:o=>at(t)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":F(t)}])},"▶",2),u("code",bi,h(((s=t.commandExecution)==null?void 0:s.command)||"(command)"),1),u("span",xi,h(Ie(t)),1)],10,wi),u("div",{class:x(["cmd-output-wrap",{"cmd-output-visible":F(t)}])},[u("div",Ci,[u("pre",{class:x(["cmd-output",{"cmd-output-condensed":ot(t)}]),textContent:h(((i=t.commandExecution)==null?void 0:i.aggregatedOutput)||"(no output)")},null,10,$i)])],2)],64))])])):tt(t)?(r(),l("div",{key:1,class:"message-row","data-role":t.role,"data-message-type":t.messageType||""},[u("div",{class:"message-stack","data-role":t.role},[u("article",{class:"message-body","data-role":t.role},[le(t)?(r(),l("section",Ii,[u("button",{type:"button",class:x(["cmd-row cmd-row-group cmd-compact file-change-summary-row",{"cmd-expanded":te(t)}]),onClick:o=>Wt(t)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":te(t)}])},"▶",2),u("span",Pi,h(Yt(le(t))),1),u("span",Ai,[(r(!0),l(y,null,b(Qt(le(t)),o=>(r(),l("span",{key:`summary-status:${t.id}:${o.tone}:${o.label}`,class:"file-change-signed-count","data-tone":o.tone},h(o.label),9,Ei))),128))])],10,Si),u("div",{class:x(["cmd-group-wrap",{"cmd-group-visible":te(t)}])},[u("div",Bi,[u("ul",Fi,[(r(!0),l(y,null,b(((a=le(t))==null?void 0:a.changes)??[],o=>(r(),l("li",{key:`file-change:${t.id}:${o.path}:${o.movedToPath||""}`,class:"file-change-item"},[u("span",{class:"file-change-badge","data-operation":Oe(o)},h(ce(o)),9,Wi),u("button",{type:"button",class:"file-change-path-button",title:o.path,onClick:f=>Me(le(t),o)},h(I(o.path)),9,Ri),o.movedToPath?(r(),l("span",Hi,"→")):v("",!0),o.movedToPath?(r(),l("button",{key:1,type:"button",class:"file-change-path-button",title:o.movedToPath,onClick:f=>Me(le(t),o)},h(I(o.movedToPath)),9,Oi)):v("",!0),o.addedLineCount>0||o.removedLineCount>0?(r(),l("span",zi,[(r(!0),l(y,null,b(Jt(o),f=>(r(),l("span",{key:`change-delta:${t.id}:${o.path}:${f.tone}:${f.label}`,class:"file-change-signed-count","data-tone":f.tone},h(f.label),9,ji))),128))])):v("",!0)]))),128))])])],2)])):v("",!0)],8,Mi)],8,Ti)],8,Li)):(r(),l("div",{key:2,class:"message-row","data-role":t.role,"data-message-type":t.messageType||""},[u("div",{class:"message-stack","data-role":t.role},[u("article",{class:"message-body","data-role":t.role},[t.images&&t.images.length>0?(r(),l("ul",{key:0,class:x(["message-image-list",{"message-generated-image-list":t.messageType==="imageView"}]),"data-role":t.role},[(r(!0),l(y,null,b(t.images,o=>(r(),l("li",{key:o,class:"message-image-item"},[u("button",{class:"message-image-button",type:"button",onClick:f=>$n(o)},[u("img",{class:x(["message-image-preview",{"message-generated-image-preview":t.messageType==="imageView"}]),src:o,alt:t.messageType==="imageView"?"Generated image":"Message image preview",loading:"lazy"},null,10,Ki)],8,qi)]))),128))],10,Ui)):v("",!0),t.fileAttachments&&t.fileAttachments.length>0?(r(),l("div",Gi,[(r(!0),l(y,null,b(t.fileAttachments,o=>(r(),l("span",{key:`${t.id}:${o.path}`,class:"message-file-chip"},[n[5]||(n[5]=u("span",{class:"message-file-chip-icon"},"📄",-1)),u("a",{class:"message-file-link message-file-chip-name",href:R(o.path),target:"_blank",rel:"noopener noreferrer",title:o.path},h(o.label),9,Zi)]))),128))])):v("",!0),t.skills&&t.skills.length>0?(r(),l("div",Xi,[(r(!0),l(y,null,b(t.skills,o=>(r(),l("a",{key:`${t.id}:${o.path}`,class:"message-skill-chip",href:R(o.path),title:o.path},[n[6]||(n[6]=u("span",{class:"message-skill-chip-prefix"},"Skill",-1)),u("span",Yi,h(o.name),1)],8,Ji))),128))])):v("",!0),t.text.length>0?(r(),l("article",{key:3,class:"message-card","data-role":t.role},[t.isAutomationRun?(r(),l("div",eo,[n[7]||(n[7]=u("span",null,"Sent via automation",-1)),t.automationDisplayName?(r(),l("code",to,h(t.automationDisplayName),1)):v("",!0)])):v("",!0),t.messageType==="worked"?(r(),l("div",no,[u("button",{type:"button",class:"worked-separator",onClick:o=>On(t)},[n[8]||(n[8]=u("span",{class:"worked-separator-line","aria-hidden":"true"},null,-1)),u("span",{class:x(["worked-chevron",{"worked-chevron-open":Ft(t)}])},"▶",2),u("p",io,h(t.text),1),n[9]||(n[9]=u("span",{class:"worked-separator-line","aria-hidden":"true"},null,-1))],8,so),Ft(t)?(r(),l("div",oo,[(r(!0),l(y,null,b(Dn(M.messages,M.messages.indexOf(t)),o=>{var f,d;return r(),l("div",{key:`worked-cmd-${o.id}`,class:"worked-cmd-item"},[u("button",{type:"button",class:x(["cmd-row",[Se(o),{"cmd-expanded":F(o),"cmd-compact":it(o)}]]),onClick:m=>at(o)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":F(o)}])},"▶",2),u("code",ro,h(((f=o.commandExecution)==null?void 0:f.command)||"(command)"),1),u("span",lo,h(Ie(o)),1)],10,ao),u("div",{class:x(["cmd-output-wrap",{"cmd-output-visible":F(o)}])},[u("div",co,[u("pre",{class:x(["cmd-output",{"cmd-output-condensed":ot(o)}]),textContent:h(((d=o.commandExecution)==null?void 0:d.aggregatedOutput)||"(no output)")},null,10,uo)])],2)])}),128))])):v("",!0)])):et(t)?(r(),l("div",{key:2,class:"plan-card","data-streaming":t.messageType==="plan.live"},[u("div",ho,[n[10]||(n[10]=u("p",{class:"plan-card-title"},"Plan",-1)),t.messageType==="plan.live"?(r(),l("span",po,"Updating")):v("",!0)]),Pt(t)?(r(),l("div",{key:0,class:"plan-card-explanation plan-card-markdown",innerHTML:gt(Pt(t))},null,8,mo)):v("",!0),At(t).length>0?(r(),l("ol",ko,[(r(!0),l(y,null,b(At(t),(o,f)=>(r(),l("li",{key:`${t.id}:plan-step:${f}`,class:"plan-step-item","data-status":o.status},[u("span",{class:"plan-step-status","data-status":o.status},h(Fn(o.status)),9,go),u("div",{class:"plan-step-text plan-card-markdown",innerHTML:gt(o.step)},null,8,yo)],8,vo))),128))])):(r(),l("div",{key:2,class:"plan-card-markdown",innerHTML:gt(t.text)},null,8,_o)),An(t)?(r(),l("div",wo,[u("button",{type:"button",class:"plan-card-implement-button",onClick:o=>En(t)}," Implement plan ",8,bo)])):v("",!0)],8,fo)):Ks([t.id,t.text,g.cwd,ne.value,Dt.value],()=>(r(),l("div",{key:3,class:"message-text-flow"},[(r(!0),l(y,null,b(As(t),(o,f)=>(r(),l(y,{key:`block-${f}`},[o.kind==="paragraph"?(r(),l("p",xo,[(r(!0),l(y,null,b(Z(o.value),(d,m)=>(r(),l(y,{key:`seg-${f}-${m}`},[d.kind==="text"?(r(),l("span",Co,h(d.value),1)):d.kind==="bold"?(r(),l("strong",$o,h(d.value),1)):d.kind==="italic"?(r(),l("em",Lo,h(d.value),1)):d.kind==="strikethrough"?(r(),l("s",To,h(d.value),1)):d.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(d.path),target:"_blank",rel:"noopener noreferrer",title:d.path},h(d.displayPath),9,Mo)):d.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:d.href,target:"_blank",rel:"noopener noreferrer",title:d.href},h(d.value),9,Io)):(r(),l("code",So,h(d.value),1))],64))),128))])):o.kind==="heading"?(r(),Qs(ei(Ut(o.level)),{key:1,class:x(["message-heading",qt(o.level)])},{default:Mn(()=>[(r(!0),l(y,null,b(Z(o.value),(d,m)=>(r(),l(y,{key:`heading-seg-${f}-${m}`},[d.kind==="text"?(r(),l("span",Po,h(d.value),1)):d.kind==="bold"?(r(),l("strong",Ao,h(d.value),1)):d.kind==="italic"?(r(),l("em",Eo,h(d.value),1)):d.kind==="strikethrough"?(r(),l("s",Bo,h(d.value),1)):d.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(d.path),target:"_blank",rel:"noopener noreferrer",title:d.path},h(d.displayPath),9,Fo)):d.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:d.href,target:"_blank",rel:"noopener noreferrer",title:d.href},h(d.value),9,Wo)):(r(),l("code",Ro,h(d.value),1))],64))),128))]),_:2},1032,["class"])):o.kind==="blockquote"?(r(),l("blockquote",Ho,[(r(!0),l(y,null,b(Z(o.value),(d,m)=>(r(),l(y,{key:`quote-seg-${f}-${m}`},[d.kind==="text"?(r(),l("span",Oo,h(d.value),1)):d.kind==="bold"?(r(),l("strong",zo,h(d.value),1)):d.kind==="italic"?(r(),l("em",jo,h(d.value),1)):d.kind==="strikethrough"?(r(),l("s",Do,h(d.value),1)):d.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(d.path),target:"_blank",rel:"noopener noreferrer",title:d.path},h(d.displayPath),9,No)):d.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:d.href,target:"_blank",rel:"noopener noreferrer",title:d.href},h(d.value),9,Vo)):(r(),l("code",Uo,h(d.value),1))],64))),128))])):o.kind==="unorderedList"?(r(),l("ul",qo,[(r(!0),l(y,null,b(o.items,(d,m)=>(r(),l("li",{key:`ul-${f}-${m}`,class:"message-list-item"},[u("div",{class:"message-list-item-content",innerHTML:Ve(d)},null,8,Ko)]))),128))])):o.kind==="taskList"?(r(),l("ul",Go,[(r(!0),l(y,null,b(o.items,(d,m)=>(r(),l("li",{key:`task-${f}-${m}`,class:"message-task-item"},[u("span",{class:"message-task-checkbox","data-checked":d.checked},h(d.checked?"☑":"☐"),9,Zo),u("div",Xo,[(r(!0),l(y,null,b(Z(d.text),(p,k)=>(r(),l(y,{key:`task-seg-${f}-${m}-${k}`},[p.kind==="text"?(r(),l("span",Jo,h(p.value),1)):p.kind==="bold"?(r(),l("strong",Yo,h(p.value),1)):p.kind==="italic"?(r(),l("em",Qo,h(p.value),1)):p.kind==="strikethrough"?(r(),l("s",ea,h(p.value),1)):p.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(p.path),target:"_blank",rel:"noopener noreferrer",title:p.path},h(p.displayPath),9,ta)):p.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:p.href,target:"_blank",rel:"noopener noreferrer",title:p.href},h(p.value),9,na)):(r(),l("code",sa,h(p.value),1))],64))),128))])]))),128))])):o.kind==="orderedList"?(r(),l("ol",{key:5,class:"message-list message-list-ordered",start:o.start},[(r(!0),l(y,null,b(o.items,(d,m)=>(r(),l("li",{key:`ol-${f}-${m}`,class:"message-list-item"},[u("div",{class:"message-list-item-content",innerHTML:Ve(d)},null,8,oa)]))),128))],8,ia)):o.kind==="table"?(r(),l("div",aa,[u("table",ra,[u("thead",null,[u("tr",null,[(r(!0),l(y,null,b(o.headers,(d,m)=>(r(),l("th",{key:`th-${f}-${m}`,class:"message-table-head-cell",style:xt({textAlign:o.alignments[m]??"left"})},[(r(!0),l(y,null,b(Z(d),(p,k)=>(r(),l(y,{key:`th-seg-${f}-${m}-${k}`},[p.kind==="text"?(r(),l("span",la,h(p.value),1)):p.kind==="bold"?(r(),l("strong",ca,h(p.value),1)):p.kind==="italic"?(r(),l("em",ua,h(p.value),1)):p.kind==="strikethrough"?(r(),l("s",da,h(p.value),1)):p.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(p.path),target:"_blank",rel:"noopener noreferrer",title:p.path},h(p.displayPath),9,fa)):p.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:p.href,target:"_blank",rel:"noopener noreferrer",title:p.href},h(p.value),9,ha)):(r(),l("code",pa,h(p.value),1))],64))),128))],4))),128))])]),o.rows.length>0?(r(),l("tbody",ma,[(r(!0),l(y,null,b(o.rows,(d,m)=>(r(),l("tr",{key:`tr-${f}-${m}`,class:"message-table-body-row"},[(r(!0),l(y,null,b(d,(p,k)=>(r(),l("td",{key:`td-${f}-${m}-${k}`,class:"message-table-cell",style:xt({textAlign:o.alignments[k]??"left"})},[(r(!0),l(y,null,b(Z(p),(_,P)=>(r(),l(y,{key:`td-seg-${f}-${m}-${k}-${P}`},[_.kind==="text"?(r(),l("span",ka,h(_.value),1)):_.kind==="bold"?(r(),l("strong",va,h(_.value),1)):_.kind==="italic"?(r(),l("em",ga,h(_.value),1)):_.kind==="strikethrough"?(r(),l("s",ya,h(_.value),1)):_.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(_.path),target:"_blank",rel:"noopener noreferrer",title:_.path},h(_.displayPath),9,_a)):_.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:_.href,target:"_blank",rel:"noopener noreferrer",title:_.href},h(_.value),9,wa)):(r(),l("code",ba,h(_.value),1))],64))),128))],4))),128))]))),128))])):v("",!0)])])):o.kind==="codeBlock"?(r(),l("div",xa,[o.language?(r(),l("div",Ca,h(o.language),1)):v("",!0),u("pre",$a,[u("code",{class:"hljs",innerHTML:vn(o.language,o.value)},null,8,La)])])):o.kind==="thematicBreak"?(r(),l("hr",Ta)):js(t.id,f)?(r(),l("p",Ma,h(o.markdown),1)):(r(),l("button",{key:10,class:"message-image-button",type:"button",onClick:d=>$n(o.url)},[u("img",{class:"message-image-preview message-markdown-image",src:o.url,alt:o.alt||"Embedded message image",loading:"lazy",onError:d=>Ds(t.id,f)},null,40,Sa)],8,Ia))],64))),128))])),n,0)],8,Qi)):v("",!0),re(t)?(r(),l("section",Pa,[u("button",{type:"button",class:x(["cmd-row cmd-row-group cmd-compact file-change-summary-row",{"cmd-expanded":te(t)}]),onClick:o=>Wt(t)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":te(t)}])},"▶",2),u("span",Ea,h(Yt(re(t))),1),u("span",Ba,[(r(!0),l(y,null,b(Qt(re(t)),o=>(r(),l("span",{key:`summary-status:${t.id}:${o.tone}:${o.label}`,class:"file-change-signed-count","data-tone":o.tone},h(o.label),9,Fa))),128))])],10,Aa),u("div",{class:x(["cmd-group-wrap",{"cmd-group-visible":te(t)}])},[u("div",Wa,[u("ul",Ra,[(r(!0),l(y,null,b(((c=re(t))==null?void 0:c.changes)??[],o=>(r(),l("li",{key:`file-change:inline:${t.id}:${o.path}:${o.movedToPath||""}`,class:"file-change-item"},[u("span",{class:"file-change-badge","data-operation":Oe(o)},h(ce(o)),9,Ha),u("button",{type:"button",class:"file-change-path-button",title:o.path,onClick:f=>Me(re(t),o)},h(I(o.path)),9,Oa),o.movedToPath?(r(),l("span",za,"→")):v("",!0),o.movedToPath?(r(),l("button",{key:1,type:"button",class:"file-change-path-button",title:o.movedToPath,onClick:f=>Me(re(t),o)},h(I(o.movedToPath)),9,ja)):v("",!0),o.addedLineCount>0||o.removedLineCount>0?(r(),l("span",Da,[(r(!0),l(y,null,b(Jt(o),f=>(r(),l("span",{key:`change-delta:inline:${t.id}:${o.path}:${f.tone}:${f.label}`,class:"file-change-signed-count","data-tone":f.tone},h(f.label),9,Na))),128))])):v("",!0)]))),128))])])],2)])):v("",!0),Zt(t)||tn(t)?(r(),l("div",{key:5,class:"message-toolbar","data-role":t.role},[tn(t)?(r(),l("button",{key:0,type:"button",class:"message-edit-button","aria-label":"Edit this message",title:"Edit this message",onClick:o=>ms(t.id)},[Q(Gs,{class:"icon-svg message-edit-icon"}),n[11]||(n[11]=u("span",{class:"message-edit-label"},"Edit message",-1))],8,Ua)):v("",!0),Jn(t)?(r(),l("button",{key:1,type:"button",class:"message-fork-button","aria-label":"Fork thread from this response",title:"Fork thread from this response",onClick:o=>ps(t.id)},[Q(Zs,{class:"icon-svg message-fork-icon"}),n[12]||(n[12]=u("span",{class:"message-fork-label"},"Fork",-1))],8,qa)):v("",!0),Zt(t)?(r(),l("button",{key:2,type:"button",class:"message-copy-button","data-copied":V.value===t.id,"aria-label":V.value===t.id?"Response copied":"Copy response",title:V.value===t.id?"Response copied":"Copy response",onClick:o=>hs(t.id)},[Q(ii,{class:"icon-svg message-copy-icon"}),u("span",Ga,h(V.value===t.id?"Copied":"Copy"),1)],8,Ka)):v("",!0)],8,Va)):v("",!0)],8,Vi)],8,Ni)],8,Di))],8,ci)):v("",!0)],64)}),128)),M.liveOverlay?(r(),l("li",Za,[u("div",Xa,[u("div",Ja,[u("article",Ya,[u("p",Qa,h(M.liveOverlay.activityLabel),1),M.liveOverlay.reasoningText?(r(),l("p",er,h(M.liveOverlay.reasoningText),1)):v("",!0),M.liveOverlay.errorText?(r(),l("p",tr,h(M.liveOverlay.errorText),1)):v("",!0)])])])])):v("",!0),u("li",{ref_key:"bottomAnchorRef",ref:Ot,class:"conversation-bottom-anchor"},null,512)],544)),Vn.value?(r(),l("button",{key:3,type:"button",class:"jump-to-latest-button",title:"Jump to latest","aria-label":"Jump to latest output",onClick:bn},[Q(Xs,{class:"icon-svg jump-to-latest-icon"})])):v("",!0),ke.value.length>0?(r(),l("div",{key:4,class:"image-modal-backdrop",onClick:Ln},[u("div",{class:"image-modal-content",onClick:n[1]||(n[1]=Ge(()=>{},["stop"]))},[u("button",{class:"image-modal-close",type:"button","aria-label":"Close image preview",onClick:Ln},[Q(Tn,{class:"icon-svg"})]),u("img",{class:"image-modal-image",src:ke.value,alt:"Expanded message image"},null,8,nr)])])):v("",!0),me.value?(r(),l("div",{key:5,ref_key:"fileLinkContextMenuRef",ref:Lt,class:"file-link-context-menu",style:xt(_s.value),onClick:n[2]||(n[2]=Ge(()=>{},["stop"]))},[u("button",{type:"button",class:"file-link-context-menu-item",onClick:xs}," Open link "),u("button",{type:"button",class:"file-link-context-menu-item",onClick:$s}," Copy link "),Ye.value?(r(),l("button",{key:0,type:"button",class:"file-link-context-menu-item",onClick:Cs}," Edit file ")):v("",!0)],4)):v("",!0),S.value?(r(),l("div",{key:6,class:"diff-viewer-backdrop",onClick:Rt},[u("div",{class:"diff-viewer-shell",onClick:n[4]||(n[4]=Ge(()=>{},["stop"]))},[Ct($e)?v("",!0):(r(),l("aside",sr,[u("div",ir,[n[13]||(n[13]=u("p",{class:"diff-viewer-sidebar-title"},"Changed files",-1)),u("p",or,h(ze(ue.value.length)),1)]),u("div",ar,[(r(!0),l(y,null,b(ue.value,t=>(r(),l("button",{key:`diff-viewer:${T(t)}`,type:"button",class:"diff-viewer-file-button","data-active":T(t)===T(S.value),onClick:s=>Ht(t)},[u("span",{class:"file-change-badge","data-operation":Oe(t)},h(ce(t)),9,lr),u("span",cr,[ee(h(I(t.path))+" ",1),t.movedToPath?(r(),l(y,{key:0},[ee(" → "+h(I(t.movedToPath)),1)],64)):v("",!0)]),G(t)?(r(),l("span",ur,h(G(t)),1)):v("",!0)],8,rr))),128))])])),u("section",dr,[u("div",fr,[u("div",hr,[u("p",pr,[ee(h(I(S.value.path))+" ",1),S.value.movedToPath?(r(),l(y,{key:0},[ee(" → "+h(I(S.value.movedToPath)),1)],64)):v("",!0)]),u("p",mr,[ee(h(ce(S.value))+" ",1),G(S.value)?(r(),l("span",kr," · "+h(G(S.value)),1)):v("",!0)])]),u("div",vr,[Ct($e)?(r(),l("button",{key:0,type:"button",class:"diff-viewer-mobile-files-button",onClick:zn},h(ze(ue.value.length)),1)):v("",!0),u("button",{class:"image-modal-close diff-viewer-close",type:"button","aria-label":"Close diff viewer",onClick:Rt},[Q(Tn,{class:"icon-svg"})])])]),us(S.value)?(r(),l("div",yr,[u("div",_r,[u("span",wr,h(is(S.value)||"diff"),1)]),u("div",br,[(r(!0),l(y,null,b(cs.value,t=>(r(),l("div",{key:t.key,class:"diff-viewer-line","data-kind":t.kind},[u("span",Cr,h(t.oldLine??""),1),u("span",$r,h(t.newLine??""),1),u("span",Lr,h(ds(t)),1),u("code",{class:"diff-viewer-line-code",innerHTML:$(t.text)||" "},null,8,Tr)],8,xr))),128))])])):(r(),l("div",gr,[...n[14]||(n[14]=[u("p",{class:"diff-viewer-empty-title"},"No diff available",-1),u("p",{class:"diff-viewer-empty-text"},"This summary was restored from the final answer text, but the thread history does not include patch diff content for this file.",-1)])]))]),Q(Js,{name:"diff-viewer-sheet"},{default:Mn(()=>[Ct($e)&&D.value?(r(),l("div",{key:0,class:"diff-viewer-mobile-sheet-backdrop",onClick:jn},[u("div",{class:"diff-viewer-mobile-sheet",onClick:n[3]||(n[3]=Ge(()=>{},["stop"]))},[n[16]||(n[16]=u("div",{class:"diff-viewer-mobile-sheet-handle","aria-hidden":"true"},null,-1)),u("div",Mr,[n[15]||(n[15]=u("p",{class:"diff-viewer-sidebar-title"},"Changed files",-1)),u("p",Ir,h(ze(ue.value.length)),1)]),u("div",Sr,[(r(!0),l(y,null,b(ue.value,t=>(r(),l("button",{key:`diff-viewer-sheet:${T(t)}`,type:"button",class:"diff-viewer-file-button","data-active":T(t)===T(S.value),onClick:s=>Ht(t)},[u("span",{class:"file-change-badge","data-operation":Oe(t)},h(ce(t)),9,Ar),u("span",Er,[ee(h(I(t.path))+" ",1),t.movedToPath?(r(),l(y,{key:0},[ee(" → "+h(I(t.movedToPath)),1)],64)):v("",!0)]),G(t)?(r(),l("span",Br,h(G(t)),1)):v("",!0)],8,Pr))),128))])])])):v("",!0)]),_:1})])])):v("",!0)],32))}}),Vr=In(Dr,[["__scopeId","data-v-2ccead41"]]);export{Vr as default};
38
+ `);s.push(...Ss(f))};for(;i<t.length;){const o=De(t[i]);if(!o){i+=1;continue}c(i),i+=1;const f=[];for(;i<t.length;){if(t[i].trim()===o.marker){i+=1;break}f.push(t[i]),i+=1}s.push({kind:"codeBlock",language:o.language,value:f.join(`
39
+ `)}),a=i}return c(t.length),s.length>0?s:[{kind:"paragraph",value:e}]}function As(e){const n=ge.get(e.id);if(n&&n.text===e.text&&n.cwd===v.cwd)return ge.delete(e.id),ge.set(e.id,n),n.blocks;const t=mn(e.text);return Fe(ge,e.id,{text:e.text,cwd:v.cwd,blocks:t},Wr).blocks}function $(e){return e.replace(/&/gu,"&amp;").replace(/</gu,"&lt;").replace(/>/gu,"&gt;").replace(/"/gu,"&quot;").replace(/'/gu,"&#39;")}function vn(e){var t;const n=((t=e.trim().split(/\s+/u)[0])==null?void 0:t.toLowerCase())??"";return n?zt[n]??n:""}function Es(e,n){const t=vn(e);if(!t)return $(n);const s=Ee.value;if(!s)return $(n);try{if(s.getLanguage(t))return s.highlight(n,{language:t,ignoreIllegals:!0}).value}catch{}return $(n)}function kn(e,n){const t=`${ne.value}\0${vn(e)}\0${e}\0${n}`,s=ie.get(t);return s!==void 0?(ie.delete(t),ie.set(t,s),s):Fe(ie,t,Es(e,n),Or)}function J(e){return Z(e).map(n=>n.kind==="text"?$(n.value):n.kind==="bold"?`<strong class="message-bold-text">${$(n.value)}</strong>`:n.kind==="italic"?`<em class="message-italic-text">${$(n.value)}</em>`:n.kind==="strikethrough"?`<s class="message-strikethrough-text">${$(n.value)}</s>`:n.kind==="file"?`<a class="message-file-link" href="${$(R(n.path))}" target="_blank" rel="noopener noreferrer" title="${$(n.path)}">${$(n.displayPath)}</a>`:n.kind==="url"?`<a class="message-file-link" href="${$(n.href)}" target="_blank" rel="noopener noreferrer" title="${$(n.href)}">${$(n.value)}</a>`:`<code class="message-inline-code">${$(n.value)}</code>`).join("")}function Bs(e){return e.paragraphs.map(n=>`<div class="message-list-item-text message-list-item-paragraph">${J(n)}</div>`).join("")}function Ve(e){var s;const n=Bs(e),t=((s=e.children)==null?void 0:s.map(i=>yn(i)).join(""))??"";return n+t}function gn(e){return e?` style="text-align:${e}"`:""}function yn(e){if(e.kind==="paragraph")return`<p class="message-text">${J(e.value)}</p>`;if(e.kind==="heading"){const n=Math.min(6,Math.max(1,Math.trunc(e.level))),t=Ut(n),s=`message-heading ${qt(n)}`;return`<${t} class="${s}">${J(e.value)}</${t}>`}if(e.kind==="blockquote")return`<blockquote class="message-blockquote">${J(e.value)}</blockquote>`;if(e.kind==="unorderedList")return`<ul class="message-list message-list-unordered">${e.items.map(t=>`<li class="message-list-item"><div class="message-list-item-content">${Ve(t)}</div></li>`).join("")}</ul>`;if(e.kind==="taskList")return`<ul class="message-list message-task-list">${e.items.map(t=>`<li class="message-task-item"><span class="message-task-checkbox" data-checked="${t.checked?"true":"false"}">${t.checked?"☑":"☐"}</span><div class="message-list-item-text">${J(t.text)}</div></li>`).join("")}</ul>`;if(e.kind==="orderedList"){const n=e.items.map(t=>`<li class="message-list-item"><div class="message-list-item-content">${Ve(t)}</div></li>`).join("");return`<ol class="message-list message-list-ordered" start="${e.start}">${n}</ol>`}if(e.kind==="table"){const n=e.headers.map((i,a)=>`<th class="message-table-head-cell"${gn(e.alignments[a]??null)}>${J(i)}</th>`).join(""),t=e.rows.map(i=>'<tr class="message-table-body-row">'+i.map((a,c)=>`<td class="message-table-cell"${gn(e.alignments[c]??null)}>${J(a)}</td>`).join("")+"</tr>").join(""),s=t?`<tbody>${t}</tbody>`:"";return`<div class="message-table-wrap"><table class="message-table"><thead><tr>${n}</tr></thead>${s}</table></div>`}return e.kind==="codeBlock"?`<div class="message-code-block">${e.language?`<div class="message-code-language">${$(e.language)}</div>`:""}<pre class="message-code-pre"><code class="hljs">${kn(e.language,e.value)}</code></pre></div>`:e.kind==="thematicBreak"?'<hr class="message-divider">':`<img class="message-image-preview message-markdown-image" src="${$(e.url)}" alt="${$(e.alt||"Embedded message image")}" loading="lazy">`}function gt(e){const n=`${v.cwd}\0${ne.value}\0${e}`,t=se.get(n);if(t&&t.text===e&&t.cwd===v.cwd&&t.highlightVersion===ne.value)return se.delete(n),se.set(n,t),t.html;const s=mn(e).map(i=>yn(i)).join("");return Fe(se,n,{text:e,cwd:v.cwd,highlightVersion:ne.value,html:s},Hr).html}function Fs(){const e=N.value,n=Ot.value;!e||!n||(e.scrollTop=e.scrollHeight,n.scrollIntoView({block:"end"}))}function Ws(e){return e.scrollHeight-(e.scrollTop+e.clientHeight)<=Fr}function Rs(){if(N.value&&j.value){Ue();return}}function Ue(){N.value&&Fs()}function yt(){return j.value}function _n(){if(!yt()){Ae=0,E=0;return}if(Ue(),Ae-=1,Ae<=0){E=0;return}E=requestAnimationFrame(_n)}function qe(e=6){yt()&&(E&&(cancelAnimationFrame(E),E=0),Ae=Math.max(e,1),E=requestAnimationFrame(_n))}function wn(){qe(3)}function bn(){j.value=!0,Ue(),qe(4)}async function xn(){var i;const e=N.value;if(!e||!ct.value||K.value||v.isLoadingPersistedAbove===!0)return;K.value=!0;const n=v.activeThreadId,t=e.scrollHeight,s=e.scrollTop;try{B.value>0?B.value=Math.max(0,B.value-zr):v.hasMorePersistedAbove===!0&&await((i=v.loadEarlierMessages)==null?void 0:i.call(v,n)),await bt(),v.activeThreadId===n&&(e.scrollTop=s+(e.scrollHeight-t))}finally{K.value=!1}}xe({jumpToLatest:bn});function Hs(){if(!yt())return;const e=N.value;if(!e)return;const n=e.querySelectorAll("img.message-image-preview");for(const t of n)t.complete||jt.has(t)||(jt.add(t),t.addEventListener("load",wn,{once:!0}),t.addEventListener("error",wn,{once:!0}))}async function Ke(){return ke||(ke=bt().then(()=>new Promise(e=>{U&&cancelAnimationFrame(U),U=requestAnimationFrame(()=>{U=0,ke=null,Rs(),Hs(),qe(),e()})})),ke)}function Os(){ge.clear(),ye.clear(),se.clear(),ie.clear()}Y(()=>v.messages,async e=>{if(v.isLoading)return;const n=new Set(e.filter(t=>t.messageType==="commandExecution"&&t.commandExecution).map(t=>t.id));fe.value=Se(fe.value,n),z.value=Se(z.value,n),he.value=Se(he.value,new Set(Object.keys(st.value))),pe.value=Se(pe.value,new Set([...Object.keys(He.value),...Object.keys(ft.value)])),j.value?B.value=Math.max(0,e.length-$t):B.value=Math.min(B.value,Math.max(0,e.length-1)),await Ke()}),Y(()=>v.messages.some(e=>e.text.includes("```")),e=>{!e||Ee.value||Un()},{immediate:!0}),Y(nt,(e,n)=>{if(!n||n===e||!z.value.has(n))return;const t=new Set(z.value);t.delete(n),z.value=t}),Y(()=>v.pendingRequests,async()=>{v.isLoading||await Ke()},{deep:!0}),Y(()=>v.liveOverlay,async e=>{e&&j.value&&(await bt(),Ue(),qe(8))},{deep:!0}),Y(()=>v.isLoading,async e=>{e||(B.value=Math.max(0,v.messages.length-$t),await Ke())}),Y(()=>v.activeThreadId,async()=>{j.value=!0,ve.value="",K.value=!1,B.value=Math.max(0,v.messages.length-$t),await Ke()},{flush:"post"});function zs(){const e=N.value;!e||v.isLoading||(j.value=Ws(e),ct.value&&!K.value&&e.scrollTop<jr&&xn())}const _t=C(new Set);function Cn(e,n){return`${e}:${n}`}function js(e,n){return _t.value.has(Cn(e,n))}function Ds(e,n){const t=new Set(_t.value);t.add(Cn(e,n)),_t.value=t,Dt.value+=1}function $n(e){ve.value=e}function Ln(){ve.value=""}return Us(()=>{window.addEventListener("pointerdown",nn),window.addEventListener("blur",sn),window.addEventListener("keydown",on)}),qs(()=>{Os(),U&&(cancelAnimationFrame(U),U=0),E&&(cancelAnimationFrame(E),E=0),q&&(clearTimeout(q),q=null),window.removeEventListener("pointerdown",nn),window.removeEventListener("blur",sn),window.removeEventListener("keydown",on)}),(e,n)=>(r(),l("section",{class:"conversation-root",onContextmenuCapture:bs},[T.isLoading?(r(),l("p",oi,"Loading messages...")):T.messages.length===0&&T.pendingRequests.length===0&&!T.liveOverlay?(r(),l("p",ai," No messages in this thread yet. ")):(r(),l("ul",{key:2,ref_key:"conversationListRef",ref:N,class:"conversation-list",onScroll:zs},[ct.value?(r(),l("li",ri,[u("button",{type:"button",class:"load-more-button",disabled:K.value||T.isLoadingPersistedAbove,onClick:xn},h(K.value||T.isLoadingPersistedAbove?"Loading…":"Load earlier messages"),9,li)])):g("",!0),(r(!0),l(y,null,b(Nn.value,t=>{var s,i,a,c;return r(),l(y,{key:t.id},[!Bn.value.has(t.id)&&!ts.value.has(t.id)?(r(),l("li",{key:0,class:"conversation-item","data-role":t.role,"data-message-type":t.messageType||""},[F(t)?(r(),l("div",ui,[u("div",di,[Te(t).length>0?(r(),l("button",{key:0,type:"button",class:x(["cmd-row cmd-row-group cmd-compact",[Pe(t),{"cmd-expanded":rt(t)}]]),onClick:o=>Wn(t)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":rt(t)}])},"▶",2),u("span",hi,h(Rn(t)),1),u("span",pi,h(Hn(t)),1)],10,fi)):g("",!0),Te(t).length>0?(r(),l("div",{key:1,class:x(["cmd-group-wrap",{"cmd-group-visible":rt(t)}])},[u("div",mi,[(r(!0),l(y,null,b(Bt(t),o=>{var f,d;return r(),l("div",{key:`grouped-cmd-${o.id}`,class:"worked-cmd-item"},[u("button",{type:"button",class:x(["cmd-row",[Pe(o),{"cmd-expanded":W(o),"cmd-compact":!0}]]),onClick:m=>at(o)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":W(o)}])},"▶",2),u("code",ki,h(((f=o.commandExecution)==null?void 0:f.command)||"(command)"),1),u("span",gi,h(Ie(o)),1)],10,vi),u("div",{class:x(["cmd-output-wrap",{"cmd-output-visible":W(o)}])},[u("div",yi,[u("pre",{class:x(["cmd-output",{"cmd-output-condensed":ot(o)}]),textContent:h(((d=o.commandExecution)==null?void 0:d.aggregatedOutput)||"(no output)")},null,10,_i)])],2)])}),128))])],2)):(r(),l(y,{key:2},[u("button",{type:"button",class:x(["cmd-row",[Pe(t),{"cmd-expanded":W(t),"cmd-compact":it(t)}]]),onClick:o=>at(t)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":W(t)}])},"▶",2),u("code",bi,h(((s=t.commandExecution)==null?void 0:s.command)||"(command)"),1),u("span",xi,h(Ie(t)),1)],10,wi),u("div",{class:x(["cmd-output-wrap",{"cmd-output-visible":W(t)}])},[u("div",Ci,[u("pre",{class:x(["cmd-output",{"cmd-output-condensed":ot(t)}]),textContent:h(((i=t.commandExecution)==null?void 0:i.aggregatedOutput)||"(no output)")},null,10,$i)])],2)],64))])])):tt(t)?(r(),l("div",{key:1,class:"message-row","data-role":t.role,"data-message-type":t.messageType||""},[u("div",{class:"message-stack","data-role":t.role},[u("article",{class:"message-body","data-role":t.role},[le(t)?(r(),l("section",Ii,[u("button",{type:"button",class:x(["cmd-row cmd-row-group cmd-compact file-change-summary-row",{"cmd-expanded":te(t)}]),onClick:o=>Wt(t)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":te(t)}])},"▶",2),u("span",Si,h(Yt(le(t))),1),u("span",Ai,[(r(!0),l(y,null,b(Qt(le(t)),o=>(r(),l("span",{key:`summary-status:${t.id}:${o.tone}:${o.label}`,class:"file-change-signed-count","data-tone":o.tone},h(o.label),9,Ei))),128))])],10,Pi),u("div",{class:x(["cmd-group-wrap",{"cmd-group-visible":te(t)}])},[u("div",Bi,[u("ul",Fi,[(r(!0),l(y,null,b(((a=le(t))==null?void 0:a.changes)??[],o=>(r(),l("li",{key:`file-change:${t.id}:${o.path}:${o.movedToPath||""}`,class:"file-change-item"},[u("span",{class:"file-change-badge","data-operation":Oe(o)},h(ce(o)),9,Wi),u("button",{type:"button",class:"file-change-path-button",title:o.path,onClick:f=>Me(le(t),o)},h(I(o.path)),9,Ri),o.movedToPath?(r(),l("span",Hi,"→")):g("",!0),o.movedToPath?(r(),l("button",{key:1,type:"button",class:"file-change-path-button",title:o.movedToPath,onClick:f=>Me(le(t),o)},h(I(o.movedToPath)),9,Oi)):g("",!0),o.addedLineCount>0||o.removedLineCount>0?(r(),l("span",zi,[(r(!0),l(y,null,b(Jt(o),f=>(r(),l("span",{key:`change-delta:${t.id}:${o.path}:${f.tone}:${f.label}`,class:"file-change-signed-count","data-tone":f.tone},h(f.label),9,ji))),128))])):g("",!0)]))),128))])])],2)])):g("",!0)],8,Mi)],8,Ti)],8,Li)):(r(),l("div",{key:2,class:"message-row","data-role":t.role,"data-message-type":t.messageType||""},[u("div",{class:"message-stack","data-role":t.role},[u("article",{class:"message-body","data-role":t.role},[t.images&&t.images.length>0?(r(),l("ul",{key:0,class:x(["message-image-list",{"message-generated-image-list":t.messageType==="imageView"}]),"data-role":t.role},[(r(!0),l(y,null,b(t.images,o=>(r(),l("li",{key:o,class:"message-image-item"},[u("button",{class:"message-image-button",type:"button",onClick:f=>$n(o)},[u("img",{class:x(["message-image-preview",{"message-generated-image-preview":t.messageType==="imageView"}]),src:o,alt:t.messageType==="imageView"?"Generated image":"Message image preview",loading:"lazy"},null,10,Ki)],8,qi)]))),128))],10,Ui)):g("",!0),t.fileAttachments&&t.fileAttachments.length>0?(r(),l("div",Gi,[(r(!0),l(y,null,b(t.fileAttachments,o=>(r(),l("span",{key:`${t.id}:${o.path}`,class:"message-file-chip"},[n[5]||(n[5]=u("span",{class:"message-file-chip-icon"},"📄",-1)),u("a",{class:"message-file-link message-file-chip-name",href:R(o.path),target:"_blank",rel:"noopener noreferrer",title:o.path},h(o.label),9,Zi)]))),128))])):g("",!0),t.skills&&t.skills.length>0?(r(),l("div",Xi,[(r(!0),l(y,null,b(t.skills,o=>(r(),l("a",{key:`${t.id}:${o.path}`,class:"message-skill-chip",href:R(o.path),title:o.path},[n[6]||(n[6]=u("span",{class:"message-skill-chip-prefix"},"Skill",-1)),u("span",Yi,h(o.name),1)],8,Ji))),128))])):g("",!0),t.text.length>0?(r(),l("article",{key:3,class:"message-card","data-role":t.role},[t.isAutomationRun?(r(),l("div",eo,[n[7]||(n[7]=u("span",null,"Sent via automation",-1)),t.automationDisplayName?(r(),l("code",to,h(t.automationDisplayName),1)):g("",!0)])):g("",!0),t.messageType==="worked"?(r(),l("div",no,[u("button",{type:"button",class:"worked-separator",onClick:o=>On(t)},[n[8]||(n[8]=u("span",{class:"worked-separator-line","aria-hidden":"true"},null,-1)),u("span",{class:x(["worked-chevron",{"worked-chevron-open":Ft(t)}])},"▶",2),u("p",io,h(t.text),1),n[9]||(n[9]=u("span",{class:"worked-separator-line","aria-hidden":"true"},null,-1))],8,so),Ft(t)?(r(),l("div",oo,[(r(!0),l(y,null,b(Dn(T.messages,T.messages.indexOf(t)),o=>{var f,d;return r(),l("div",{key:`worked-cmd-${o.id}`,class:"worked-cmd-item"},[u("button",{type:"button",class:x(["cmd-row",[Pe(o),{"cmd-expanded":W(o),"cmd-compact":it(o)}]]),onClick:m=>at(o)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":W(o)}])},"▶",2),u("code",ro,h(((f=o.commandExecution)==null?void 0:f.command)||"(command)"),1),u("span",lo,h(Ie(o)),1)],10,ao),u("div",{class:x(["cmd-output-wrap",{"cmd-output-visible":W(o)}])},[u("div",co,[u("pre",{class:x(["cmd-output",{"cmd-output-condensed":ot(o)}]),textContent:h(((d=o.commandExecution)==null?void 0:d.aggregatedOutput)||"(no output)")},null,10,uo)])],2)])}),128))])):g("",!0)])):et(t)?(r(),l("div",{key:2,class:"plan-card","data-streaming":t.messageType==="plan.live"},[u("div",ho,[n[10]||(n[10]=u("p",{class:"plan-card-title"},"Plan",-1)),t.messageType==="plan.live"?(r(),l("span",po,"Updating")):g("",!0)]),St(t)?(r(),l("div",{key:0,class:"plan-card-explanation plan-card-markdown",innerHTML:gt(St(t))},null,8,mo)):g("",!0),At(t).length>0?(r(),l("ol",vo,[(r(!0),l(y,null,b(At(t),(o,f)=>(r(),l("li",{key:`${t.id}:plan-step:${f}`,class:"plan-step-item","data-status":o.status},[u("span",{class:"plan-step-status","data-status":o.status},h(Fn(o.status)),9,go),u("div",{class:"plan-step-text plan-card-markdown",innerHTML:gt(o.step)},null,8,yo)],8,ko))),128))])):(r(),l("div",{key:2,class:"plan-card-markdown",innerHTML:gt(t.text)},null,8,_o)),An(t)?(r(),l("div",wo,[u("button",{type:"button",class:"plan-card-implement-button",onClick:o=>En(t)}," Implement plan ",8,bo)])):g("",!0)],8,fo)):Ks([t.id,t.text,v.cwd,ne.value,Dt.value],()=>(r(),l("div",{key:3,class:"message-text-flow"},[(r(!0),l(y,null,b(As(t),(o,f)=>(r(),l(y,{key:`block-${f}`},[o.kind==="paragraph"?(r(),l("p",xo,[(r(!0),l(y,null,b(Z(o.value),(d,m)=>(r(),l(y,{key:`seg-${f}-${m}`},[d.kind==="text"?(r(),l("span",Co,h(d.value),1)):d.kind==="bold"?(r(),l("strong",$o,h(d.value),1)):d.kind==="italic"?(r(),l("em",Lo,h(d.value),1)):d.kind==="strikethrough"?(r(),l("s",To,h(d.value),1)):d.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(d.path),target:"_blank",rel:"noopener noreferrer",title:d.path},h(d.displayPath),9,Mo)):d.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:d.href,target:"_blank",rel:"noopener noreferrer",title:d.href},h(d.value),9,Io)):(r(),l("code",Po,h(d.value),1))],64))),128))])):o.kind==="heading"?(r(),Qs(ei(Ut(o.level)),{key:1,class:x(["message-heading",qt(o.level)])},{default:Mn(()=>[(r(!0),l(y,null,b(Z(o.value),(d,m)=>(r(),l(y,{key:`heading-seg-${f}-${m}`},[d.kind==="text"?(r(),l("span",So,h(d.value),1)):d.kind==="bold"?(r(),l("strong",Ao,h(d.value),1)):d.kind==="italic"?(r(),l("em",Eo,h(d.value),1)):d.kind==="strikethrough"?(r(),l("s",Bo,h(d.value),1)):d.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(d.path),target:"_blank",rel:"noopener noreferrer",title:d.path},h(d.displayPath),9,Fo)):d.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:d.href,target:"_blank",rel:"noopener noreferrer",title:d.href},h(d.value),9,Wo)):(r(),l("code",Ro,h(d.value),1))],64))),128))]),_:2},1032,["class"])):o.kind==="blockquote"?(r(),l("blockquote",Ho,[(r(!0),l(y,null,b(Z(o.value),(d,m)=>(r(),l(y,{key:`quote-seg-${f}-${m}`},[d.kind==="text"?(r(),l("span",Oo,h(d.value),1)):d.kind==="bold"?(r(),l("strong",zo,h(d.value),1)):d.kind==="italic"?(r(),l("em",jo,h(d.value),1)):d.kind==="strikethrough"?(r(),l("s",Do,h(d.value),1)):d.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(d.path),target:"_blank",rel:"noopener noreferrer",title:d.path},h(d.displayPath),9,No)):d.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:d.href,target:"_blank",rel:"noopener noreferrer",title:d.href},h(d.value),9,Vo)):(r(),l("code",Uo,h(d.value),1))],64))),128))])):o.kind==="unorderedList"?(r(),l("ul",qo,[(r(!0),l(y,null,b(o.items,(d,m)=>(r(),l("li",{key:`ul-${f}-${m}`,class:"message-list-item"},[u("div",{class:"message-list-item-content",innerHTML:Ve(d)},null,8,Ko)]))),128))])):o.kind==="taskList"?(r(),l("ul",Go,[(r(!0),l(y,null,b(o.items,(d,m)=>(r(),l("li",{key:`task-${f}-${m}`,class:"message-task-item"},[u("span",{class:"message-task-checkbox","data-checked":d.checked},h(d.checked?"☑":"☐"),9,Zo),u("div",Xo,[(r(!0),l(y,null,b(Z(d.text),(p,k)=>(r(),l(y,{key:`task-seg-${f}-${m}-${k}`},[p.kind==="text"?(r(),l("span",Jo,h(p.value),1)):p.kind==="bold"?(r(),l("strong",Yo,h(p.value),1)):p.kind==="italic"?(r(),l("em",Qo,h(p.value),1)):p.kind==="strikethrough"?(r(),l("s",ea,h(p.value),1)):p.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(p.path),target:"_blank",rel:"noopener noreferrer",title:p.path},h(p.displayPath),9,ta)):p.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:p.href,target:"_blank",rel:"noopener noreferrer",title:p.href},h(p.value),9,na)):(r(),l("code",sa,h(p.value),1))],64))),128))])]))),128))])):o.kind==="orderedList"?(r(),l("ol",{key:5,class:"message-list message-list-ordered",start:o.start},[(r(!0),l(y,null,b(o.items,(d,m)=>(r(),l("li",{key:`ol-${f}-${m}`,class:"message-list-item"},[u("div",{class:"message-list-item-content",innerHTML:Ve(d)},null,8,oa)]))),128))],8,ia)):o.kind==="table"?(r(),l("div",aa,[u("table",ra,[u("thead",null,[u("tr",null,[(r(!0),l(y,null,b(o.headers,(d,m)=>(r(),l("th",{key:`th-${f}-${m}`,class:"message-table-head-cell",style:xt({textAlign:o.alignments[m]??"left"})},[(r(!0),l(y,null,b(Z(d),(p,k)=>(r(),l(y,{key:`th-seg-${f}-${m}-${k}`},[p.kind==="text"?(r(),l("span",la,h(p.value),1)):p.kind==="bold"?(r(),l("strong",ca,h(p.value),1)):p.kind==="italic"?(r(),l("em",ua,h(p.value),1)):p.kind==="strikethrough"?(r(),l("s",da,h(p.value),1)):p.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(p.path),target:"_blank",rel:"noopener noreferrer",title:p.path},h(p.displayPath),9,fa)):p.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:p.href,target:"_blank",rel:"noopener noreferrer",title:p.href},h(p.value),9,ha)):(r(),l("code",pa,h(p.value),1))],64))),128))],4))),128))])]),o.rows.length>0?(r(),l("tbody",ma,[(r(!0),l(y,null,b(o.rows,(d,m)=>(r(),l("tr",{key:`tr-${f}-${m}`,class:"message-table-body-row"},[(r(!0),l(y,null,b(d,(p,k)=>(r(),l("td",{key:`td-${f}-${m}-${k}`,class:"message-table-cell",style:xt({textAlign:o.alignments[k]??"left"})},[(r(!0),l(y,null,b(Z(p),(_,S)=>(r(),l(y,{key:`td-seg-${f}-${m}-${k}-${S}`},[_.kind==="text"?(r(),l("span",va,h(_.value),1)):_.kind==="bold"?(r(),l("strong",ka,h(_.value),1)):_.kind==="italic"?(r(),l("em",ga,h(_.value),1)):_.kind==="strikethrough"?(r(),l("s",ya,h(_.value),1)):_.kind==="file"?(r(),l("a",{key:4,class:"message-file-link",href:R(_.path),target:"_blank",rel:"noopener noreferrer",title:_.path},h(_.displayPath),9,_a)):_.kind==="url"?(r(),l("a",{key:5,class:"message-file-link",href:_.href,target:"_blank",rel:"noopener noreferrer",title:_.href},h(_.value),9,wa)):(r(),l("code",ba,h(_.value),1))],64))),128))],4))),128))]))),128))])):g("",!0)])])):o.kind==="codeBlock"?(r(),l("div",xa,[o.language?(r(),l("div",Ca,h(o.language),1)):g("",!0),u("pre",$a,[u("code",{class:"hljs",innerHTML:kn(o.language,o.value)},null,8,La)])])):o.kind==="thematicBreak"?(r(),l("hr",Ta)):js(t.id,f)?(r(),l("p",Ma,h(o.markdown),1)):(r(),l("button",{key:10,class:"message-image-button",type:"button",onClick:d=>$n(o.url)},[u("img",{class:"message-image-preview message-markdown-image",src:o.url,alt:o.alt||"Embedded message image",loading:"lazy",onError:d=>Ds(t.id,f)},null,40,Pa)],8,Ia))],64))),128))])),n,0)],8,Qi)):g("",!0),re(t)?(r(),l("section",Sa,[u("button",{type:"button",class:x(["cmd-row cmd-row-group cmd-compact file-change-summary-row",{"cmd-expanded":te(t)}]),onClick:o=>Wt(t)},[u("span",{class:x(["cmd-chevron",{"cmd-chevron-open":te(t)}])},"▶",2),u("span",Ea,h(Yt(re(t))),1),u("span",Ba,[(r(!0),l(y,null,b(Qt(re(t)),o=>(r(),l("span",{key:`summary-status:${t.id}:${o.tone}:${o.label}`,class:"file-change-signed-count","data-tone":o.tone},h(o.label),9,Fa))),128))])],10,Aa),u("div",{class:x(["cmd-group-wrap",{"cmd-group-visible":te(t)}])},[u("div",Wa,[u("ul",Ra,[(r(!0),l(y,null,b(((c=re(t))==null?void 0:c.changes)??[],o=>(r(),l("li",{key:`file-change:inline:${t.id}:${o.path}:${o.movedToPath||""}`,class:"file-change-item"},[u("span",{class:"file-change-badge","data-operation":Oe(o)},h(ce(o)),9,Ha),u("button",{type:"button",class:"file-change-path-button",title:o.path,onClick:f=>Me(re(t),o)},h(I(o.path)),9,Oa),o.movedToPath?(r(),l("span",za,"→")):g("",!0),o.movedToPath?(r(),l("button",{key:1,type:"button",class:"file-change-path-button",title:o.movedToPath,onClick:f=>Me(re(t),o)},h(I(o.movedToPath)),9,ja)):g("",!0),o.addedLineCount>0||o.removedLineCount>0?(r(),l("span",Da,[(r(!0),l(y,null,b(Jt(o),f=>(r(),l("span",{key:`change-delta:inline:${t.id}:${o.path}:${f.tone}:${f.label}`,class:"file-change-signed-count","data-tone":f.tone},h(f.label),9,Na))),128))])):g("",!0)]))),128))])])],2)])):g("",!0),Zt(t)||tn(t)?(r(),l("div",{key:5,class:"message-toolbar","data-role":t.role},[tn(t)?(r(),l("button",{key:0,type:"button",class:"message-edit-button","aria-label":"Edit this message",title:"Edit this message",onClick:o=>ms(t.id)},[Q(Gs,{class:"icon-svg message-edit-icon"}),n[11]||(n[11]=u("span",{class:"message-edit-label"},"Edit message",-1))],8,Ua)):g("",!0),Jn(t)?(r(),l("button",{key:1,type:"button",class:"message-fork-button","aria-label":"Fork thread from this response",title:"Fork thread from this response",onClick:o=>ps(t.id)},[Q(Zs,{class:"icon-svg message-fork-icon"}),n[12]||(n[12]=u("span",{class:"message-fork-label"},"Fork",-1))],8,qa)):g("",!0),Zt(t)?(r(),l("button",{key:2,type:"button",class:"message-copy-button","data-copied":V.value===t.id,"aria-label":V.value===t.id?"Response copied":"Copy response",title:V.value===t.id?"Response copied":"Copy response",onClick:o=>hs(t.id)},[Q(ii,{class:"icon-svg message-copy-icon"}),u("span",Ga,h(V.value===t.id?"Copied":"Copy"),1)],8,Ka)):g("",!0)],8,Va)):g("",!0)],8,Vi)],8,Ni)],8,Di))],8,ci)):g("",!0)],64)}),128)),T.liveOverlay?(r(),l("li",Za,[u("div",Xa,[u("div",Ja,[u("article",Ya,[u("p",Qa,h(T.liveOverlay.activityLabel),1),T.liveOverlay.reasoningText?(r(),l("p",er,h(T.liveOverlay.reasoningText),1)):g("",!0),T.liveOverlay.errorText?(r(),l("p",tr,h(T.liveOverlay.errorText),1)):g("",!0)])])])])):g("",!0),u("li",{ref_key:"bottomAnchorRef",ref:Ot,class:"conversation-bottom-anchor"},null,512)],544)),Vn.value?(r(),l("button",{key:3,type:"button",class:"jump-to-latest-button",title:"Jump to latest","aria-label":"Jump to latest output",onClick:bn},[Q(Xs,{class:"icon-svg jump-to-latest-icon"})])):g("",!0),ve.value.length>0?(r(),l("div",{key:4,class:"image-modal-backdrop",onClick:Ln},[u("div",{class:"image-modal-content",onClick:n[1]||(n[1]=Ge(()=>{},["stop"]))},[u("button",{class:"image-modal-close",type:"button","aria-label":"Close image preview",onClick:Ln},[Q(Tn,{class:"icon-svg"})]),u("img",{class:"image-modal-image",src:ve.value,alt:"Expanded message image"},null,8,nr)])])):g("",!0),me.value?(r(),l("div",{key:5,ref_key:"fileLinkContextMenuRef",ref:Lt,class:"file-link-context-menu",style:xt(_s.value),onClick:n[2]||(n[2]=Ge(()=>{},["stop"]))},[u("button",{type:"button",class:"file-link-context-menu-item",onClick:xs}," Open link "),u("button",{type:"button",class:"file-link-context-menu-item",onClick:$s}," Copy link "),Ye.value?(r(),l("button",{key:0,type:"button",class:"file-link-context-menu-item",onClick:Cs}," Edit file ")):g("",!0)],4)):g("",!0),P.value?(r(),l("div",{key:6,class:"diff-viewer-backdrop",onClick:Rt},[u("div",{class:"diff-viewer-shell",onClick:n[4]||(n[4]=Ge(()=>{},["stop"]))},[Ct($e)?g("",!0):(r(),l("aside",sr,[u("div",ir,[n[13]||(n[13]=u("p",{class:"diff-viewer-sidebar-title"},"Changed files",-1)),u("p",or,h(ze(ue.value.length)),1)]),u("div",ar,[(r(!0),l(y,null,b(ue.value,t=>(r(),l("button",{key:`diff-viewer:${M(t)}`,type:"button",class:"diff-viewer-file-button","data-active":M(t)===M(P.value),onClick:s=>Ht(t)},[u("span",{class:"file-change-badge","data-operation":Oe(t)},h(ce(t)),9,lr),u("span",cr,[ee(h(I(t.path))+" ",1),t.movedToPath?(r(),l(y,{key:0},[ee(" → "+h(I(t.movedToPath)),1)],64)):g("",!0)]),G(t)?(r(),l("span",ur,h(G(t)),1)):g("",!0)],8,rr))),128))])])),u("section",dr,[u("div",fr,[u("div",hr,[u("p",pr,[ee(h(I(P.value.path))+" ",1),P.value.movedToPath?(r(),l(y,{key:0},[ee(" → "+h(I(P.value.movedToPath)),1)],64)):g("",!0)]),u("p",mr,[ee(h(ce(P.value))+" ",1),G(P.value)?(r(),l("span",vr," · "+h(G(P.value)),1)):g("",!0)])]),u("div",kr,[Ct($e)?(r(),l("button",{key:0,type:"button",class:"diff-viewer-mobile-files-button",onClick:zn},h(ze(ue.value.length)),1)):g("",!0),u("button",{class:"image-modal-close diff-viewer-close",type:"button","aria-label":"Close diff viewer",onClick:Rt},[Q(Tn,{class:"icon-svg"})])])]),us(P.value)?(r(),l("div",yr,[u("div",_r,[u("span",wr,h(is(P.value)||"diff"),1)]),u("div",br,[(r(!0),l(y,null,b(cs.value,t=>(r(),l("div",{key:t.key,class:"diff-viewer-line","data-kind":t.kind},[u("span",Cr,h(t.oldLine??""),1),u("span",$r,h(t.newLine??""),1),u("span",Lr,h(ds(t)),1),u("code",{class:"diff-viewer-line-code",innerHTML:$(t.text)||" "},null,8,Tr)],8,xr))),128))])])):(r(),l("div",gr,[...n[14]||(n[14]=[u("p",{class:"diff-viewer-empty-title"},"No diff available",-1),u("p",{class:"diff-viewer-empty-text"},"This summary was restored from the final answer text, but the thread history does not include patch diff content for this file.",-1)])]))]),Q(Js,{name:"diff-viewer-sheet"},{default:Mn(()=>[Ct($e)&&D.value?(r(),l("div",{key:0,class:"diff-viewer-mobile-sheet-backdrop",onClick:jn},[u("div",{class:"diff-viewer-mobile-sheet",onClick:n[3]||(n[3]=Ge(()=>{},["stop"]))},[n[16]||(n[16]=u("div",{class:"diff-viewer-mobile-sheet-handle","aria-hidden":"true"},null,-1)),u("div",Mr,[n[15]||(n[15]=u("p",{class:"diff-viewer-sidebar-title"},"Changed files",-1)),u("p",Ir,h(ze(ue.value.length)),1)]),u("div",Pr,[(r(!0),l(y,null,b(ue.value,t=>(r(),l("button",{key:`diff-viewer-sheet:${M(t)}`,type:"button",class:"diff-viewer-file-button","data-active":M(t)===M(P.value),onClick:s=>Ht(t)},[u("span",{class:"file-change-badge","data-operation":Oe(t)},h(ce(t)),9,Ar),u("span",Er,[ee(h(I(t.path))+" ",1),t.movedToPath?(r(),l(y,{key:0},[ee(" → "+h(I(t.movedToPath)),1)],64)):g("",!0)]),G(t)?(r(),l("span",Br,h(G(t)),1)):g("",!0)],8,Sr))),128))])])])):g("",!0)]),_:1})])])):g("",!0)],32))}}),Vr=In(Dr,[["__scopeId","data-v-832916d7"]]);export{Vr as default};
@@ -29,4 +29,4 @@
29
29
  * The original design remains. The terminal itself
30
30
  * has been extended to include xterm CSI codes, among
31
31
  * other features.
32
- */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-175dedb7],[data-v-175dedb7]:before,[data-v-175dedb7]:after,[data-v-175dedb7]::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.thread-terminal-panel[data-v-175dedb7]{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-800,oklch(27.4% .006 286.033));background-color:var(--color-black,#000);--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);height:min(34vh,20rem);min-height:13rem;overflow:hidden}.thread-terminal-header[data-v-175dedb7]{height:calc(var(--spacing,.25rem) * 9);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-zinc-800,oklch(27.4% .006 286.033));background-color:var(--color-zinc-950,oklch(14.1% .005 285.823));padding-inline:calc(var(--spacing,.25rem) * 2);justify-content:space-between;align-items:center;display:flex}.thread-terminal-tabs[data-v-175dedb7]{min-width:calc(var(--spacing,.25rem) * 0);align-items:center;gap:calc(var(--spacing,.25rem) * 1);flex:1;display:flex;overflow-x:auto}.thread-terminal-tab[data-v-175dedb7]{height:calc(var(--spacing,.25rem) * 7);max-width:calc(var(--spacing,.25rem) * 36);min-width:calc(var(--spacing,.25rem) * 20);align-items:center;gap:calc(var(--spacing,.25rem) * 2);border-radius:var(--radius-md,.375rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-800,oklch(27.4% .006 286.033));background-color:var(--color-zinc-900,oklch(21% .006 285.885));padding-inline:calc(var(--spacing,.25rem) * 2);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-zinc-300,oklch(87.1% .006 286.286));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));flex-shrink:0;display:flex}@media(hover:hover){.thread-terminal-tab[data-v-175dedb7]:hover{border-color:var(--color-zinc-700,oklch(37% .013 285.805));color:var(--color-white,#fff)}}.thread-terminal-tab.is-active[data-v-175dedb7]{border-color:var(--color-zinc-700,oklch(37% .013 285.805));background-color:var(--color-zinc-800,oklch(27.4% .006 286.033));color:var(--color-zinc-100,oklch(96.7% .001 286.375))}.thread-terminal-dot[data-v-175dedb7]{height:calc(var(--spacing,.25rem) * 2);width:calc(var(--spacing,.25rem) * 2);background-color:var(--color-zinc-500,oklch(55.2% .016 285.938));border-radius:3.40282e38px;flex-shrink:0}.thread-terminal-dot[data-status=attached][data-v-175dedb7]{background-color:var(--color-emerald-400,oklch(76.5% .177 163.223))}.thread-terminal-dot[data-status=error][data-v-175dedb7]{background-color:var(--color-rose-400,oklch(71.2% .194 13.428))}.thread-terminal-title[data-v-175dedb7]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.thread-terminal-actions[data-v-175dedb7]{align-items:center;gap:calc(var(--spacing,.25rem) * 1);flex-shrink:0;display:flex}.thread-terminal-action[data-v-175dedb7]{border-radius:var(--radius-md,.375rem);border-style:var(--tw-border-style);padding-inline:calc(var(--spacing,.25rem) * 2);padding-block:calc(var(--spacing,.25rem) * 1);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-zinc-300,oklch(87.1% .006 286.286));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));border-width:1px;border-color:#0000}@media(hover:hover){.thread-terminal-action[data-v-175dedb7]:hover{border-color:var(--color-zinc-700,oklch(37% .013 285.805));background-color:var(--color-zinc-900,oklch(21% .006 285.885));color:var(--color-white,#fff)}}.thread-terminal-error[data-v-175dedb7]{margin:calc(var(--spacing,.25rem) * 0);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-rose-900,oklch(41% .159 10.272));background-color:var(--color-rose-950,oklch(27.1% .105 12.094));padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 1.5);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-rose-200,oklch(89.2% .058 10.001))}.thread-terminal-host[data-v-175dedb7]{height:calc(100% - 2.25rem);min-height:calc(var(--spacing,.25rem) * 0);width:100%;padding-inline:calc(var(--spacing,.25rem) * 2);padding-block:calc(var(--spacing,.25rem) * 2);overflow:hidden}.thread-terminal-panel.is-error .thread-terminal-host[data-v-175dedb7]{height:calc(100% - 4.625rem)}.thread-terminal-host[data-v-175dedb7] .xterm{height:100%}.thread-terminal-host[data-v-175dedb7] .xterm-viewport{background-color:var(--color-black,#000)}@media(max-width:767px){.thread-terminal-panel[data-v-175dedb7]{height:min(28vh,14rem);min-height:9rem}.thread-terminal-header[data-v-175dedb7]{padding-inline:calc(var(--spacing,.25rem) * 1.5)}.thread-terminal-action[data-v-175dedb7]{padding-inline:calc(var(--spacing,.25rem) * 1.5);font-size:11px}.thread-terminal-host[data-v-175dedb7]{padding-inline:calc(var(--spacing,.25rem) * 1.5);padding-block:calc(var(--spacing,.25rem) * 1.5)}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
32
+ */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{font-family:monospace;-webkit-user-select:text;user-select:text;white-space:pre}.xterm .xterm-accessibility-tree>div{transform-origin:left;width:fit-content}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}.xterm .xterm-scrollable-element>.scrollbar{cursor:default}.xterm .xterm-scrollable-element>.scrollbar>.scra{cursor:pointer;font-size:11px!important}.xterm .xterm-scrollable-element>.visible{opacity:1;background:#0000;transition:opacity .1s linear;z-index:11}.xterm .xterm-scrollable-element>.invisible{opacity:0;pointer-events:none}.xterm .xterm-scrollable-element>.invisible.fade{transition:opacity .8s linear}.xterm .xterm-scrollable-element>.shadow{position:absolute;display:none}.xterm .xterm-scrollable-element>.shadow.top{display:block;top:0;left:3px;height:3px;width:100%;box-shadow:var(--vscode-scrollbar-shadow, #000) 0 6px 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.left{display:block;top:3px;left:0;height:100%;width:3px;box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}.xterm .xterm-scrollable-element>.shadow.top-left-corner{display:block;top:0;left:0;height:3px;width:3px}.xterm .xterm-scrollable-element>.shadow.top.left{box-shadow:var(--vscode-scrollbar-shadow, #000) 6px 0 6px -6px inset}/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){[data-v-175dedb7],[data-v-175dedb7]:before,[data-v-175dedb7]:after,[data-v-175dedb7]::backdrop{--tw-border-style:solid;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000}}}.thread-terminal-panel[data-v-175dedb7]{border-radius:var(--radius-lg,.5rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-800,oklch(27.4% .006 286.033));background-color:var(--color-black,#000);--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow);height:min(34vh,20rem);min-height:13rem;overflow:hidden}.thread-terminal-header[data-v-175dedb7]{height:calc(var(--spacing,.25rem) * 9);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-zinc-800,oklch(27.4% .006 286.033));background-color:var(--color-zinc-950,oklch(14.1% .005 285.823));padding-inline:calc(var(--spacing,.25rem) * 2);justify-content:space-between;align-items:center;display:flex}.thread-terminal-tabs[data-v-175dedb7]{min-width:calc(var(--spacing,.25rem) * 0);align-items:center;gap:calc(var(--spacing,.25rem) * 1);flex:1;display:flex;overflow-x:auto}.thread-terminal-tab[data-v-175dedb7]{height:calc(var(--spacing,.25rem) * 7);max-width:calc(var(--spacing,.25rem) * 36);min-width:calc(var(--spacing,.25rem) * 20);align-items:center;gap:calc(var(--spacing,.25rem) * 2);border-radius:var(--radius-md,.375rem);border-style:var(--tw-border-style);border-width:1px;border-color:var(--color-zinc-800,oklch(27.4% .006 286.033));background-color:var(--color-zinc-900,oklch(21% .006 285.885));padding-inline:calc(var(--spacing,.25rem) * 2);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-zinc-300,oklch(87.1% .006 286.286));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));flex-shrink:0;display:flex}@media(hover:hover){.thread-terminal-tab[data-v-175dedb7]:hover{border-color:var(--color-zinc-700,oklch(37% .013 285.805));color:var(--color-white,#fff)}}.thread-terminal-tab.is-active[data-v-175dedb7]{border-color:var(--color-zinc-700,oklch(37% .013 285.805));background-color:var(--color-zinc-800,oklch(27.4% .006 286.033));color:var(--color-zinc-100,oklch(96.7% .001 286.375))}.thread-terminal-dot[data-v-175dedb7]{height:calc(var(--spacing,.25rem) * 2);width:calc(var(--spacing,.25rem) * 2);background-color:var(--color-zinc-500,oklch(55.2% .016 285.938));border-radius:3.40282e38px;flex-shrink:0}.thread-terminal-dot[data-status=attached][data-v-175dedb7]{background-color:var(--color-emerald-400,oklch(76.5% .177 163.223))}.thread-terminal-dot[data-status=error][data-v-175dedb7]{background-color:var(--color-rose-400,oklch(71.2% .194 13.428))}.thread-terminal-title[data-v-175dedb7]{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.thread-terminal-actions[data-v-175dedb7]{align-items:center;gap:calc(var(--spacing,.25rem) * 1);flex-shrink:0;display:flex}.thread-terminal-action[data-v-175dedb7]{border-radius:var(--radius-md,.375rem);border-style:var(--tw-border-style);padding-inline:calc(var(--spacing,.25rem) * 2);padding-block:calc(var(--spacing,.25rem) * 1);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-zinc-300,oklch(87.1% .006 286.286));transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function,cubic-bezier(.4, 0, .2, 1)));transition-duration:var(--tw-duration,var(--default-transition-duration,.15s));border-width:1px;border-color:#0000}@media(hover:hover){.thread-terminal-action[data-v-175dedb7]:hover{border-color:var(--color-zinc-700,oklch(37% .013 285.805));background-color:var(--color-zinc-900,oklch(21% .006 285.885));color:var(--color-white,#fff)}}.thread-terminal-error[data-v-175dedb7]{margin:calc(var(--spacing,.25rem) * 0);border-bottom-style:var(--tw-border-style);border-bottom-width:1px;border-color:var(--color-rose-900,oklch(41% .159 10.272));background-color:var(--color-rose-950,oklch(27.1% .105 12.094));padding-inline:calc(var(--spacing,.25rem) * 3);padding-block:calc(var(--spacing,.25rem) * 1.5);font-size:var(--text-xs,.75rem);line-height:var(--tw-leading,var(--text-xs--line-height,calc(1 / .75)));color:var(--color-rose-200,oklch(89.2% .058 10.001))}.thread-terminal-host[data-v-175dedb7]{height:calc(100% - 2.25rem);min-height:calc(var(--spacing,.25rem) * 0);width:100%;padding-inline:calc(var(--spacing,.25rem) * 2);padding-block:calc(var(--spacing,.25rem) * 2);overflow:hidden}.thread-terminal-panel.is-error .thread-terminal-host[data-v-175dedb7]{height:calc(100% - 4.625rem)}.thread-terminal-host[data-v-175dedb7] .xterm{height:100%}.thread-terminal-host[data-v-175dedb7] .xterm-viewport{background-color:var(--color-black,#000)}@media(max-width:767px){.thread-terminal-panel[data-v-175dedb7]{height:min(28vh,14rem);min-height:9rem}.thread-terminal-header[data-v-175dedb7]{padding-inline:calc(var(--spacing,.25rem) * 1.5)}.thread-terminal-action[data-v-175dedb7]{padding-inline:calc(var(--spacing,.25rem) * 1.5);font-size:11px}.thread-terminal-host[data-v-175dedb7]{padding-inline:calc(var(--spacing,.25rem) * 1.5);padding-block:calc(var(--spacing,.25rem) * 1.5)}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}
@@ -1,4 +1,4 @@
1
- import{d as dn,x as ct,b as un,C as _n,e as fn,w as pn,D as vs,n as gn,E as vn,G as mn,H as Sn,o as Ht,c as Wt,a as Ke,F as wn,r as bn,g as ms,t as zt,q as Ft,f as yn,J as Cn,K as kn,_ as xn}from"./index-DfEYiJAK.js";/**
1
+ import{d as dn,x as ct,b as un,C as _n,e as fn,w as pn,D as vs,n as gn,E as vn,G as mn,H as Sn,o as Ht,c as Wt,a as Ke,F as wn,r as bn,g as ms,t as zt,q as Ft,f as yn,J as Cn,K as kn,_ as xn}from"./index-ZXDbBStq.js";/**
2
2
  * Copyright (c) 2014-2024 The xterm.js authors. All rights reserved.
3
3
  * @license MIT
4
4
  *