@neuralnomads/codenomad-dev 0.18.0-dev-20260809-67cb394e → 0.18.0-dev-20260813-7f16057f

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neuralnomads/codenomad-dev",
3
- "version": "0.18.0-dev-20260809-67cb394e",
3
+ "version": "0.18.0-dev-20260813-7f16057f",
4
4
  "description": "CodeNomad Server",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-BSlOM5Le.js","assets/git-diff-vendor-CYS3ApzA.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
2
- import{a8 as J,m,t as h,i as s,d as u,a as C,u as U,_ as X,f as Y}from"./monaco-viewer-BSlOM5Le.js";import{d as K,b as P,c as $,n as o,S as g,a as w,z as Z,A as p,F as ee}from"./git-diff-vendor-CYS3ApzA.js";import{S as te}from"./SplitFilePanel-Cd76S2b9.js";import{R as V,ay as le,M as ne,az as re,C as ae,e as ie,aA as se}from"./main-DxKSa1-Y.js";import{W as oe}from"./wrap-text-CusvDWcP.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-BSA3SyyP.js";var ce=h('<div class="px-2 py-2 border-b border-base"><div class=selector-input-group><div class="flex items-center gap-2 px-3 text-muted"></div><input type=text class=selector-input>'),de=h("<div class=file-list-header><span class=file-list-title></span><span class=file-list-count>"),O=h('<div class="p-3 text-xs text-secondary">'),he=h("<div class=file-list-item><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text>.."),ue=h('<div class="p-3 text-xs text-error">'),ve=h('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class="flex items-center gap-2 shrink-0"><div class=file-list-item-stats><span class="text-[10px] text-secondary"></span></div><button type=button class=git-change-row-action>'),x=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),fe=h('<div class="file-viewer-panel flex-1"><div>'),ge=h('<div class="h-full outline-none"tabindex=0>'),we=h("<span>"),be=h("<div class=files-tab-stats><span class=files-tab-stat><span class=files-tab-selected-path><span class=file-path-text>"),Se=h("<button type=button style=margin-inline-start:auto>"),me=h("<button type=button>"),q=h("<button type=button class=files-header-icon-button>"),$e=h("<span class=text-error>");const ye=p(()=>X(()=>import("./monaco-viewer-BSlOM5Le.js").then(e=>e.at),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer})));function _e(e){return e?/\.(md|markdown|mdown|mkdn)$/i.test(e):!1}const Te=e=>{const[E,L]=K(""),{isDark:Q}=J(),[N,M]=K(!1);let b;P(()=>{e.browserPath(),L("")});const H=$(()=>[...e.browserEntries()||[]].sort((i,d)=>{const l=i.type==="directory"?0:1,t=d.type==="directory"?0:1;return l!==t?l-t:String(i.name||"").localeCompare(String(d.name||""))})),W=$(()=>E().trim().toLowerCase()),k=$(()=>{const n=W(),i=H();return n?i.filter(d=>String(d.name||"").toLowerCase().includes(n)):i}),y=()=>e.browserLoading()&&e.browserEntries()===null,j=()=>W()?e.t("instanceShell.filesShell.search.empty"):e.t("instanceShell.filesShell.listEmpty"),_=$(()=>_e(e.browserSelectedPath())),S=$(()=>_()&&N());P(()=>{_()||M(!1)});const D=()=>{const n=e.browserSelectedContent();n!=null&&e.onSave(n)},B=async(n,i)=>{i==null||i.stopPropagation();const d=await ie(n);se({message:d?e.t("instanceShell.filesShell.toast.copyPathSuccess"):e.t("instanceShell.filesShell.toast.copyPathError"),variant:d?"success":"error"})};P(()=>{S()&&requestAnimationFrame(()=>b==null?void 0:b.focus())});const T=()=>[(()=>{var n=ce(),i=n.firstChild,d=i.firstChild,l=d.nextSibling;return s(d,o(re,{class:"w-4 h-4"})),l.$$input=t=>L(t.currentTarget.value),w(t=>{var a=e.t("instanceShell.filesShell.search.placeholder"),r=e.t("instanceShell.filesShell.search.ariaLabel");return a!==t.e&&u(l,"placeholder",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),t},{e:void 0,t:void 0}),w(()=>l.value=E()),n})(),(()=>{var n=de(),i=n.firstChild,d=i.nextSibling;return s(i,()=>e.t("instanceShell.filesShell.fileListTitle")),s(d,()=>k().length),n})(),o(g,{get when(){return e.parentPath()},children:n=>(()=>{var i=he(),d=i.firstChild,l=d.firstChild;return i.$$click=()=>e.onLoadEntries(n()),w(()=>u(l,"title",n())),i})()}),o(g,{get when(){return y()},get children(){var n=O();return s(n,()=>e.t("instanceInfo.loading")),n}}),o(g,{get when(){return m(()=>!e.browserError()&&!y())()&&k().length>0},get fallback(){return m(()=>!y())()?m(()=>!!e.browserError())()?(()=>{var n=ue();return s(n,()=>e.browserError()),n})():(()=>{var n=O();return s(n,j),n})():void 0},get children(){return o(ee,{get each(){return k()},children:n=>(()=>{var i=ve(),d=i.firstChild,l=d.firstChild,t=l.firstChild,a=l.nextSibling,r=a.firstChild,c=r.firstChild,f=r.nextSibling;return i.$$click=()=>{if(n.type==="directory"){e.onLoadEntries(n.path);return}e.onRequestOpenFile(n.path)},s(t,()=>n.name),s(c,()=>n.type),f.$$click=v=>void B(n.path,v),s(f,o(ae,{class:"w-3 h-3"})),w(v=>{var F=`file-list-item ${e.browserSelectedPath()===n.path?"file-list-item-active":""}`,z=n.path,R=n.path,A=e.t("instanceShell.filesShell.actions.copyPath"),I=e.t("instanceShell.filesShell.actions.copyPath");return F!==v.e&&C(i,v.e=F),z!==v.t&&u(i,"title",v.t=z),R!==v.a&&u(l,"title",v.a=R),A!==v.o&&u(f,"title",v.o=A),I!==v.i&&u(f,"aria-label",v.i=I),v},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),i})()})}})],G=n=>{!(n.ctrlKey||n.metaKey)||n.key.toLowerCase()!=="s"||e.browserSelectedSaving()||!e.browserSelectedDirty()||(n.preventDefault(),D())};return m(()=>{const n=()=>e.browserSelectedPath()||e.browserPath(),i=()=>y()?e.t("instanceInfo.loading"):e.t("instanceShell.filesShell.viewerEmpty"),d=()=>(()=>{var l=fe(),t=l.firstChild;return s(t,o(g,{get when(){return e.browserSelectedLoading()},get fallback(){return o(g,{get when(){return e.browserSelectedError()},get fallback(){return o(g,{get when(){return m(()=>!!(e.browserSelectedPath()&&e.browserSelectedContent()!==null))()?{path:e.browserSelectedPath(),content:e.browserSelectedContent()}:null},get fallback(){return(()=>{var a=x(),r=a.firstChild;return s(r,i),a})()},children:a=>o(g,{get when(){return S()},get fallback(){return o(Z,{get fallback(){return(()=>{var r=x(),c=r.firstChild;return s(c,()=>e.t("instanceInfo.loading")),r})()},get children(){return o(ye,{get scopeKey(){return e.scopeKey()},get path(){return a().path},get content(){return a().content},get wordWrap(){return e.wordWrapMode()},get onSave(){return e.onSave},get onContentChange(){return e.onContentChange}})}})},get children(){var r=ge();r.$$mousedown=()=>b==null?void 0:b.focus(),r.$$keydown=G;var c=b;return typeof c=="function"?U(c,r):b=r,s(r,o(ne,{get part(){return{type:"text",text:a().content}},get isDark(){return Q()},escapeRawHtml:!0})),r}})})},children:a=>(()=>{var r=x(),c=r.firstChild;return s(c,a),r})()})},get children(){var a=x(),r=a.firstChild;return s(r,()=>e.t("instanceInfo.loading")),a}})),w(()=>C(t,S()?"file-viewer-content":"file-viewer-content file-viewer-content--monaco")),l})();return o(te,{get header(){return[(()=>{var l=be(),t=l.firstChild,a=t.firstChild,r=a.firstChild;return s(r,n),s(l,o(g,{get when(){return e.browserLoading()},get children(){var c=we();return s(c,()=>e.t("instanceInfo.loading")),c}}),null),s(l,o(g,{get when(){return e.browserError()},children:c=>(()=>{var f=$e();return s(f,c),f})()}),null),w(()=>u(a,"title",n())),l})(),(()=>{var l=Se();return l.$$click=()=>_()&&M(t=>!t),s(l,(()=>{var t=m(()=>!!S());return()=>t()?e.t("instanceShell.filesShell.showSource"):e.t("instanceShell.filesShell.previewMarkdown")})()),w(t=>{var a=`file-viewer-toolbar-button${S()?" active":""}`,r=!_();return a!==t.e&&C(l,t.e=a),r!==t.t&&(l.disabled=t.t=r),t},{e:void 0,t:void 0}),l})(),(()=>{var l=me();return l.$$click=()=>e.onWordWrapModeChange(e.wordWrapMode()==="on"?"off":"on"),s(l,o(oe,{class:"h-4 w-4"})),w(t=>{var a=`file-viewer-toolbar-icon-button${e.wordWrapMode()==="on"?" active":""}`,r=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),c=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),f=S();return a!==t.e&&C(l,t.e=a),r!==t.t&&u(l,"title",t.t=r),c!==t.a&&u(l,"aria-label",t.a=c),f!==t.o&&(l.disabled=t.o=f),t},{e:void 0,t:void 0,a:void 0,o:void 0}),l})(),(()=>{var l=q();return l.$$click=D,s(l,o(g,{get when(){return e.browserSelectedSaving()},get fallback(){return o(le,{class:"h-4 w-4"})},get children(){return o(V,{class:"h-4 w-4 animate-spin"})}})),w(t=>{var a=e.t("instanceShell.rightPanel.actions.save")||"Save (Ctrl+S)",r=e.t("instanceShell.rightPanel.actions.save")||"Save",c=e.browserSelectedSaving()||!e.browserSelectedDirty();return a!==t.e&&u(l,"title",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),c!==t.a&&(l.disabled=t.a=c),t},{e:void 0,t:void 0,a:void 0}),l})(),(()=>{var l=q();return l.$$click=()=>e.onRefresh(),s(l,o(V,{get class(){return`h-4 w-4${e.browserLoading()?" animate-spin":""}`}})),w(t=>{var a=e.t("instanceShell.rightPanel.actions.refresh"),r=e.t("instanceShell.rightPanel.actions.refresh"),c=e.browserLoading();return a!==t.e&&u(l,"title",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),c!==t.a&&(l.disabled=t.a=c),t},{e:void 0,t:void 0,a:void 0}),l})()]},list:{panel:()=>o(T,{}),overlay:()=>o(T,{})},get viewer(){return d()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.files")}})})};Y(["input","click","keydown","mousedown"]);export{Te as default};
2
+ import{a8 as J,m,t as h,i as s,d as u,a as C,u as U,_ as X,f as Y}from"./monaco-viewer-BSlOM5Le.js";import{d as K,b as P,c as $,n as o,S as g,a as w,z as Z,A as p,F as ee}from"./git-diff-vendor-CYS3ApzA.js";import{S as te}from"./SplitFilePanel-Cd76S2b9.js";import{R as V,ay as le,M as ne,az as re,C as ae,e as ie,aA as se}from"./main-C_vh9cYf.js";import{W as oe}from"./wrap-text-BXH2SDgZ.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-BSA3SyyP.js";var ce=h('<div class="px-2 py-2 border-b border-base"><div class=selector-input-group><div class="flex items-center gap-2 px-3 text-muted"></div><input type=text class=selector-input>'),de=h("<div class=file-list-header><span class=file-list-title></span><span class=file-list-count>"),O=h('<div class="p-3 text-xs text-secondary">'),he=h("<div class=file-list-item><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text>.."),ue=h('<div class="p-3 text-xs text-error">'),ve=h('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class="flex items-center gap-2 shrink-0"><div class=file-list-item-stats><span class="text-[10px] text-secondary"></span></div><button type=button class=git-change-row-action>'),x=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),fe=h('<div class="file-viewer-panel flex-1"><div>'),ge=h('<div class="h-full outline-none"tabindex=0>'),we=h("<span>"),be=h("<div class=files-tab-stats><span class=files-tab-stat><span class=files-tab-selected-path><span class=file-path-text>"),Se=h("<button type=button style=margin-inline-start:auto>"),me=h("<button type=button>"),q=h("<button type=button class=files-header-icon-button>"),$e=h("<span class=text-error>");const ye=p(()=>X(()=>import("./monaco-viewer-BSlOM5Le.js").then(e=>e.at),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer})));function _e(e){return e?/\.(md|markdown|mdown|mkdn)$/i.test(e):!1}const Te=e=>{const[E,L]=K(""),{isDark:Q}=J(),[N,M]=K(!1);let b;P(()=>{e.browserPath(),L("")});const H=$(()=>[...e.browserEntries()||[]].sort((i,d)=>{const l=i.type==="directory"?0:1,t=d.type==="directory"?0:1;return l!==t?l-t:String(i.name||"").localeCompare(String(d.name||""))})),W=$(()=>E().trim().toLowerCase()),k=$(()=>{const n=W(),i=H();return n?i.filter(d=>String(d.name||"").toLowerCase().includes(n)):i}),y=()=>e.browserLoading()&&e.browserEntries()===null,j=()=>W()?e.t("instanceShell.filesShell.search.empty"):e.t("instanceShell.filesShell.listEmpty"),_=$(()=>_e(e.browserSelectedPath())),S=$(()=>_()&&N());P(()=>{_()||M(!1)});const D=()=>{const n=e.browserSelectedContent();n!=null&&e.onSave(n)},B=async(n,i)=>{i==null||i.stopPropagation();const d=await ie(n);se({message:d?e.t("instanceShell.filesShell.toast.copyPathSuccess"):e.t("instanceShell.filesShell.toast.copyPathError"),variant:d?"success":"error"})};P(()=>{S()&&requestAnimationFrame(()=>b==null?void 0:b.focus())});const T=()=>[(()=>{var n=ce(),i=n.firstChild,d=i.firstChild,l=d.nextSibling;return s(d,o(re,{class:"w-4 h-4"})),l.$$input=t=>L(t.currentTarget.value),w(t=>{var a=e.t("instanceShell.filesShell.search.placeholder"),r=e.t("instanceShell.filesShell.search.ariaLabel");return a!==t.e&&u(l,"placeholder",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),t},{e:void 0,t:void 0}),w(()=>l.value=E()),n})(),(()=>{var n=de(),i=n.firstChild,d=i.nextSibling;return s(i,()=>e.t("instanceShell.filesShell.fileListTitle")),s(d,()=>k().length),n})(),o(g,{get when(){return e.parentPath()},children:n=>(()=>{var i=he(),d=i.firstChild,l=d.firstChild;return i.$$click=()=>e.onLoadEntries(n()),w(()=>u(l,"title",n())),i})()}),o(g,{get when(){return y()},get children(){var n=O();return s(n,()=>e.t("instanceInfo.loading")),n}}),o(g,{get when(){return m(()=>!e.browserError()&&!y())()&&k().length>0},get fallback(){return m(()=>!y())()?m(()=>!!e.browserError())()?(()=>{var n=ue();return s(n,()=>e.browserError()),n})():(()=>{var n=O();return s(n,j),n})():void 0},get children(){return o(ee,{get each(){return k()},children:n=>(()=>{var i=ve(),d=i.firstChild,l=d.firstChild,t=l.firstChild,a=l.nextSibling,r=a.firstChild,c=r.firstChild,f=r.nextSibling;return i.$$click=()=>{if(n.type==="directory"){e.onLoadEntries(n.path);return}e.onRequestOpenFile(n.path)},s(t,()=>n.name),s(c,()=>n.type),f.$$click=v=>void B(n.path,v),s(f,o(ae,{class:"w-3 h-3"})),w(v=>{var F=`file-list-item ${e.browserSelectedPath()===n.path?"file-list-item-active":""}`,z=n.path,R=n.path,A=e.t("instanceShell.filesShell.actions.copyPath"),I=e.t("instanceShell.filesShell.actions.copyPath");return F!==v.e&&C(i,v.e=F),z!==v.t&&u(i,"title",v.t=z),R!==v.a&&u(l,"title",v.a=R),A!==v.o&&u(f,"title",v.o=A),I!==v.i&&u(f,"aria-label",v.i=I),v},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),i})()})}})],G=n=>{!(n.ctrlKey||n.metaKey)||n.key.toLowerCase()!=="s"||e.browserSelectedSaving()||!e.browserSelectedDirty()||(n.preventDefault(),D())};return m(()=>{const n=()=>e.browserSelectedPath()||e.browserPath(),i=()=>y()?e.t("instanceInfo.loading"):e.t("instanceShell.filesShell.viewerEmpty"),d=()=>(()=>{var l=fe(),t=l.firstChild;return s(t,o(g,{get when(){return e.browserSelectedLoading()},get fallback(){return o(g,{get when(){return e.browserSelectedError()},get fallback(){return o(g,{get when(){return m(()=>!!(e.browserSelectedPath()&&e.browserSelectedContent()!==null))()?{path:e.browserSelectedPath(),content:e.browserSelectedContent()}:null},get fallback(){return(()=>{var a=x(),r=a.firstChild;return s(r,i),a})()},children:a=>o(g,{get when(){return S()},get fallback(){return o(Z,{get fallback(){return(()=>{var r=x(),c=r.firstChild;return s(c,()=>e.t("instanceInfo.loading")),r})()},get children(){return o(ye,{get scopeKey(){return e.scopeKey()},get path(){return a().path},get content(){return a().content},get wordWrap(){return e.wordWrapMode()},get onSave(){return e.onSave},get onContentChange(){return e.onContentChange}})}})},get children(){var r=ge();r.$$mousedown=()=>b==null?void 0:b.focus(),r.$$keydown=G;var c=b;return typeof c=="function"?U(c,r):b=r,s(r,o(ne,{get part(){return{type:"text",text:a().content}},get isDark(){return Q()},escapeRawHtml:!0})),r}})})},children:a=>(()=>{var r=x(),c=r.firstChild;return s(c,a),r})()})},get children(){var a=x(),r=a.firstChild;return s(r,()=>e.t("instanceInfo.loading")),a}})),w(()=>C(t,S()?"file-viewer-content":"file-viewer-content file-viewer-content--monaco")),l})();return o(te,{get header(){return[(()=>{var l=be(),t=l.firstChild,a=t.firstChild,r=a.firstChild;return s(r,n),s(l,o(g,{get when(){return e.browserLoading()},get children(){var c=we();return s(c,()=>e.t("instanceInfo.loading")),c}}),null),s(l,o(g,{get when(){return e.browserError()},children:c=>(()=>{var f=$e();return s(f,c),f})()}),null),w(()=>u(a,"title",n())),l})(),(()=>{var l=Se();return l.$$click=()=>_()&&M(t=>!t),s(l,(()=>{var t=m(()=>!!S());return()=>t()?e.t("instanceShell.filesShell.showSource"):e.t("instanceShell.filesShell.previewMarkdown")})()),w(t=>{var a=`file-viewer-toolbar-button${S()?" active":""}`,r=!_();return a!==t.e&&C(l,t.e=a),r!==t.t&&(l.disabled=t.t=r),t},{e:void 0,t:void 0}),l})(),(()=>{var l=me();return l.$$click=()=>e.onWordWrapModeChange(e.wordWrapMode()==="on"?"off":"on"),s(l,o(oe,{class:"h-4 w-4"})),w(t=>{var a=`file-viewer-toolbar-icon-button${e.wordWrapMode()==="on"?" active":""}`,r=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),c=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),f=S();return a!==t.e&&C(l,t.e=a),r!==t.t&&u(l,"title",t.t=r),c!==t.a&&u(l,"aria-label",t.a=c),f!==t.o&&(l.disabled=t.o=f),t},{e:void 0,t:void 0,a:void 0,o:void 0}),l})(),(()=>{var l=q();return l.$$click=D,s(l,o(g,{get when(){return e.browserSelectedSaving()},get fallback(){return o(le,{class:"h-4 w-4"})},get children(){return o(V,{class:"h-4 w-4 animate-spin"})}})),w(t=>{var a=e.t("instanceShell.rightPanel.actions.save")||"Save (Ctrl+S)",r=e.t("instanceShell.rightPanel.actions.save")||"Save",c=e.browserSelectedSaving()||!e.browserSelectedDirty();return a!==t.e&&u(l,"title",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),c!==t.a&&(l.disabled=t.a=c),t},{e:void 0,t:void 0,a:void 0}),l})(),(()=>{var l=q();return l.$$click=()=>e.onRefresh(),s(l,o(V,{get class(){return`h-4 w-4${e.browserLoading()?" animate-spin":""}`}})),w(t=>{var a=e.t("instanceShell.rightPanel.actions.refresh"),r=e.t("instanceShell.rightPanel.actions.refresh"),c=e.browserLoading();return a!==t.e&&u(l,"title",t.e=a),r!==t.t&&u(l,"aria-label",t.t=r),c!==t.a&&(l.disabled=t.a=c),t},{e:void 0,t:void 0,a:void 0}),l})()]},list:{panel:()=>o(T,{}),overlay:()=>o(T,{})},get viewer(){return d()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.files")}})})};Y(["input","click","keydown","mousedown"]);export{Te as default};
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-BSlOM5Le.js","assets/git-diff-vendor-CYS3ApzA.js","assets/fast-diff-vendor-DgdwVvTQ.js","assets/highlight-vendor-8FKMu9os.js","assets/git-diff-vendor-HAZkIolJ.css"])))=>i.map(i=>d[i]);
2
- import{t as u,i as n,m as D,d as g,a as q,f as ae,h as ee,_ as re}from"./monaco-viewer-BSlOM5Le.js";import{n as i,m as ce,a as P,c as b,S as k,F as te,z as oe,A as de}from"./git-diff-vendor-CYS3ApzA.js";import{u as he}from"./index-BSA3SyyP.js";import{I as ge,S as ue,H as fe,J as ve,R as me,K as ne,N as ie,O as be}from"./main-DxKSa1-Y.js";import{A as $e}from"./align-justify-DYMhLgIY.js";import{W as Ce}from"./wrap-text-CusvDWcP.js";import{S as we}from"./SplitFilePanel-Cd76S2b9.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const _e=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],Se=e=>i(ge,ce(e,{name:"UnfoldVertical",iconNode:_e}));var ye=u("<div class=file-viewer-toolbar><button type=button class=file-viewer-toolbar-icon-button></button><button type=button class=file-viewer-toolbar-icon-button></button><button type=button>");const xe=e=>{const{t:S}=he(),L=()=>e.viewMode==="split"?"unified":"split",V=()=>e.contextMode==="collapsed"?"expanded":"collapsed",F=()=>e.wordWrapMode==="on"?"off":"on",w=()=>L()==="split"?S("instanceShell.diff.switchToSplit"):S("instanceShell.diff.switchToUnified"),K=()=>V()==="collapsed"?S("instanceShell.diff.hideUnchanged"):S("instanceShell.diff.showFull"),O=()=>F()==="on"?S("instanceShell.diff.enableWordWrap"):S("instanceShell.diff.disableWordWrap");return(()=>{var U=ye(),T=U.firstChild,E=T.nextSibling,I=E.nextSibling;return T.$$click=()=>e.onViewModeChange(L()),n(T,(()=>{var c=D(()=>L()==="split");return()=>c()?i(ue,{class:"h-4 w-4","aria-hidden":"true"}):i($e,{class:"h-4 w-4","aria-hidden":"true"})})()),E.$$click=()=>e.onContextModeChange(V()),n(E,(()=>{var c=D(()=>V()==="collapsed");return()=>c()?i(fe,{class:"h-4 w-4","aria-hidden":"true"}):i(Se,{class:"h-4 w-4","aria-hidden":"true"})})()),I.$$click=()=>e.onWordWrapModeChange(F()),n(I,i(Ce,{class:"h-4 w-4","aria-hidden":"true"})),P(c=>{var N=w(),o=w(),d=K(),y=K(),x=`file-viewer-toolbar-icon-button${e.wordWrapMode==="on"?" active":""}`,W=O(),G=O();return N!==c.e&&g(T,"aria-label",c.e=N),o!==c.t&&g(T,"title",c.t=o),d!==c.a&&g(E,"aria-label",c.a=d),y!==c.o&&g(E,"title",c.o=y),x!==c.i&&q(I,c.i=x),W!==c.n&&g(I,"aria-label",c.n=W),G!==c.s&&g(I,"title",c.s=G),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),U})()};ae(["click"]);var H=u("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Me=u('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),ke=u('<div class="p-3 text-xs text-secondary">'),Ie=u('<span class="git-change-row-action-bar git-change-row-action-bar-vertical">'),We=u('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=git-change-list-item-right><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-</span></div></div></div><div class=git-change-list-item-actions-zone><div class=git-change-list-item-actions><button type=button class=git-change-row-action><span aria-hidden=true><span class="git-change-row-action-bar git-change-row-action-bar-horizontal">'),Le=u("<div class=git-change-section-items>"),Ve=u("<div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title></span></span><span class=git-change-section-count>"),Te=u('<div class=git-change-section-items><div class=git-change-commit-box><div class=git-change-commit-input-wrap><textarea class=git-change-commit-input rows=1></textarea><button type=button class="git-change-commit-button git-change-commit-button-overlay">'),Ee=u("<div class=git-change-sections><div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title-row><span class=git-change-section-title></span></span></span><span class=git-change-section-count>"),Ae=u('<span class="status-indicator session-status-list worktree-indicator git-change-section-badge"><span class=worktree-indicator-label>'),Pe=u("<span class=files-tab-selected-path><span class=file-path-text>"),Re=u('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),ze=u("<button type=button class=files-header-icon-button style=margin-left:auto>"),De=u("<span class=text-error>");const Oe=de(()=>re(()=>import("./monaco-viewer-BSlOM5Le.js").then(e=>e.au),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),je=e=>{const S=b(()=>e.activeSessionId()),L=b(()=>!!(S()&&S()!=="info")),V=b(()=>L()?e.entries():null),F=b(()=>{const o=V();return Array.isArray(o)?[...o].sort((d,y)=>String(d.path||"").localeCompare(String(y.path||""))):[]}),w=b(()=>ve(F())),K=b(()=>w().reduce((o,d)=>(o.additions+=typeof d.additions=="number"?d.additions:0,o.deletions+=typeof d.deletions=="number"?d.deletions:0,o),{additions:0,deletions:0})),O=b(()=>w().filter(o=>o.section==="staged")),U=b(()=>w().filter(o=>o.section==="unstaged")),T=b(()=>O().length>0&&e.commitMessage().trim().length>0&&!e.commitSubmitting()),E=b(()=>{const o=w(),d=e.selectedItemId(),y=e.mostChangedItemId(),x=o.find(W=>W.id===d)||(y?o.find(W=>W.id===y):void 0);return(x==null?void 0:x.entry)??null}),I=b(()=>L()?V()===null?e.t("instanceShell.gitChanges.loading"):w().length===0?e.t("instanceShell.gitChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty"):e.t("instanceShell.gitChanges.noSessionSelected")),c=b(()=>e.selectedError()===e.t("instanceShell.gitChanges.binaryViewer"));return D(()=>{const o=K(),d=E(),y=w(),x=O(),W=U(),G=()=>(()=>{var t=Me(),r=t.firstChild;return n(r,i(k,{get when(){return e.selectedLoading()},get fallback(){return i(k,{get when(){return e.selectedError()},get fallback(){return i(k,{get when(){return D(()=>!!(d&&e.selectedBefore()!==null&&e.selectedAfter()!==null))()?{path:d.path,before:e.selectedBefore(),after:e.selectedAfter()}:null},get fallback(){return(()=>{var a=H(),s=a.firstChild;return n(s,I),a})()},children:a=>i(oe,{get fallback(){return(()=>{var s=H(),l=s.firstChild;return n(l,()=>e.t("instanceInfo.loading")),s})()},get children(){return i(Oe,{get scopeKey(){return e.scopeKey()},get path(){return String(a().path||"")},get before(){return String(a().before||"")},get after(){return String(a().after||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()},get insertContextLabel(){return e.t("instanceShell.gitChanges.actions.insertContext")},get onRequestInsertContext(){return c()?void 0:s=>{const l=e.selectedItemId();if(!l)return;const f=w().find(v=>v.id===l);f&&e.onInsertContext(f,s)}}})}})})},children:a=>(()=>{var s=H(),l=s.firstChild;return n(l,a),s})()})},get children(){var a=H(),s=a.firstChild;return n(s,()=>e.t("instanceInfo.loading")),a}})),t})(),le=()=>(()=>{var t=ke();return n(t,I),t})(),J=t=>{const r=b(()=>e.selectedBulkItemIds().has(t.id)),a=t.section==="staged"?e.t("instanceShell.gitChanges.actions.unstage"):e.t("instanceShell.gitChanges.actions.stage"),s=()=>{t.section==="staged"?e.onUnstageFile(t):e.onStageFile(t)};return(()=>{var l=We(),f=l.firstChild,v=f.firstChild,R=v.firstChild,$=v.nextSibling,_=$.firstChild,C=_.firstChild;C.firstChild;var M=C.nextSibling;M.firstChild;var B=f.nextSibling,m=B.firstChild,A=m.firstChild,z=A.firstChild;return z.firstChild,l.$$click=h=>e.onRowClick(t,h),l.$$mousedown=h=>{(h.shiftKey||h.ctrlKey||h.metaKey)&&h.preventDefault()},n(R,()=>t.path),n(C,()=>t.additions,null),n(M,()=>t.deletions,null),A.$$click=h=>{h.stopPropagation(),s()},g(A,"title",a),g(A,"aria-label",a),n(z,i(k,{get when(){return t.section!=="staged"},get children(){return Ie()}}),null),P(h=>{var Q=`file-list-item git-change-list-item ${e.selectedItemId()===t.id?"file-list-item-active":""} ${r()?"git-change-list-item-bulk-selected":""}`,X=t.path,Y=t.path,Z=t.path,p=`git-change-row-action-glyph ${t.section==="staged"?"git-change-row-action-glyph-minus":"git-change-row-action-glyph-plus"}`;return Q!==h.e&&q(l,h.e=Q),X!==h.t&&g(l,"title",h.t=X),Y!==h.a&&g(f,"title",h.a=Y),Z!==h.o&&g(v,"title",h.o=Z),p!==h.i&&q(z,h.i=p),h},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()},se=(t,r,a,s)=>(()=>{var l=Ve(),f=l.firstChild,v=f.firstChild,R=v.firstChild,$=R.nextSibling,_=v.nextSibling;return ee(f,"click",s,!0),n(R,a?i(ne,{class:"h-3.5 w-3.5"}):i(ie,{class:"h-3.5 w-3.5"})),n($,t),n(_,()=>r.length),n(l,i(k,{when:a,get children(){var C=Le();return n(C,i(te,{each:r,children:M=>J(M)})),C}}),null),l})(),j=()=>i(k,{get when(){return y.length>0},get fallback(){return le()},get children(){var t=Ee(),r=t.firstChild,a=r.firstChild,s=a.firstChild,l=s.firstChild,f=l.nextSibling,v=f.firstChild,R=s.nextSibling;return ee(a,"click",e.onToggleStagedOpen,!0),n(l,(()=>{var $=D(()=>!!e.stagedOpen());return()=>$()?i(ne,{class:"h-3.5 w-3.5"}):i(ie,{class:"h-3.5 w-3.5"})})()),n(v,()=>e.t("instanceShell.gitChanges.sections.staged")),n(f,i(k,{get when(){return e.branchLabel()},children:$=>(()=>{var _=Ae(),C=_.firstChild;return n(_,i(be,{class:"w-3.5 h-3.5","aria-hidden":"true"}),C),n(C,$),P(()=>g(_,"title",`Branch: ${$()}`)),_})()}),null),n(R,()=>x.length),n(r,i(k,{get when(){return e.stagedOpen()},get children(){var $=Te(),_=$.firstChild,C=_.firstChild,M=C.firstChild,B=M.nextSibling;return M.$$input=m=>e.onCommitMessageInput(m.currentTarget.value),B.$$click=()=>e.onSubmitCommit(),n(B,(()=>{var m=D(()=>!!e.commitSubmitting());return()=>m()?e.t("instanceShell.gitChanges.commit.submitting"):e.t("instanceShell.gitChanges.commit.submit")})()),n($,i(te,{each:x,children:m=>J(m)}),null),P(m=>{var A=e.t("instanceShell.gitChanges.commit.placeholder"),z=!T();return A!==m.e&&g(M,"placeholder",m.e=A),z!==m.t&&(B.disabled=m.t=z),m},{e:void 0,t:void 0}),P(()=>M.value=e.commitMessage()),$}}),null),n(t,()=>se(e.t("instanceShell.gitChanges.sections.unstaged"),W,e.unstagedOpen(),e.onToggleUnstagedOpen),null),t}});return i(we,{get header(){return[(()=>{var t=Pe(),r=t.firstChild;return n(r,()=>(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges")),P(()=>g(t,"title",(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges"))),t})(),(()=>{var t=Re(),r=t.firstChild,a=r.firstChild;a.firstChild;var s=r.nextSibling,l=s.firstChild;return l.firstChild,n(a,()=>o.additions,null),n(l,()=>o.deletions,null),n(t,i(k,{get when(){return e.statusError()},children:f=>(()=>{var v=De();return n(v,f),v})()}),null),t})(),(()=>{var t=ze();return t.$$click=()=>e.onRefresh(),n(t,i(me,{get class(){return`h-4 w-4${e.statusLoading()?" animate-spin":""}`}})),P(r=>{var a=e.t("instanceShell.rightPanel.actions.refresh"),s=e.t("instanceShell.rightPanel.actions.refresh"),l=!L()||e.statusLoading()||V()===null;return a!==r.e&&g(t,"title",r.e=a),s!==r.t&&g(t,"aria-label",r.t=s),l!==r.a&&(t.disabled=r.a=l),r},{e:void 0,t:void 0,a:void 0}),t})(),i(xe,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})]},list:{panel:j,overlay:j},get viewer(){return G()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.gitChanges")}})})};ae(["mousedown","click","input"]);export{je as default};
2
+ import{t as u,i as n,m as D,d as g,a as q,f as ae,h as ee,_ as re}from"./monaco-viewer-BSlOM5Le.js";import{n as i,m as ce,a as P,c as b,S as k,F as te,z as oe,A as de}from"./git-diff-vendor-CYS3ApzA.js";import{u as he}from"./index-BSA3SyyP.js";import{I as ge,S as ue,H as fe,J as ve,R as me,K as ne,N as ie,O as be}from"./main-C_vh9cYf.js";import{A as $e}from"./align-justify-BOz1AEzj.js";import{W as Ce}from"./wrap-text-BXH2SDgZ.js";import{S as we}from"./SplitFilePanel-Cd76S2b9.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const _e=[["path",{d:"M12 22v-6",key:"6o8u61"}],["path",{d:"M12 8V2",key:"1wkif3"}],["path",{d:"M4 12H2",key:"rhcxmi"}],["path",{d:"M10 12H8",key:"s88cx1"}],["path",{d:"M16 12h-2",key:"10asgb"}],["path",{d:"M22 12h-2",key:"14jgyd"}],["path",{d:"m15 19-3 3-3-3",key:"11eu04"}],["path",{d:"m15 5-3-3-3 3",key:"itvq4r"}]],Se=e=>i(ge,ce(e,{name:"UnfoldVertical",iconNode:_e}));var ye=u("<div class=file-viewer-toolbar><button type=button class=file-viewer-toolbar-icon-button></button><button type=button class=file-viewer-toolbar-icon-button></button><button type=button>");const xe=e=>{const{t:S}=he(),L=()=>e.viewMode==="split"?"unified":"split",V=()=>e.contextMode==="collapsed"?"expanded":"collapsed",F=()=>e.wordWrapMode==="on"?"off":"on",w=()=>L()==="split"?S("instanceShell.diff.switchToSplit"):S("instanceShell.diff.switchToUnified"),K=()=>V()==="collapsed"?S("instanceShell.diff.hideUnchanged"):S("instanceShell.diff.showFull"),O=()=>F()==="on"?S("instanceShell.diff.enableWordWrap"):S("instanceShell.diff.disableWordWrap");return(()=>{var U=ye(),T=U.firstChild,E=T.nextSibling,I=E.nextSibling;return T.$$click=()=>e.onViewModeChange(L()),n(T,(()=>{var c=D(()=>L()==="split");return()=>c()?i(ue,{class:"h-4 w-4","aria-hidden":"true"}):i($e,{class:"h-4 w-4","aria-hidden":"true"})})()),E.$$click=()=>e.onContextModeChange(V()),n(E,(()=>{var c=D(()=>V()==="collapsed");return()=>c()?i(fe,{class:"h-4 w-4","aria-hidden":"true"}):i(Se,{class:"h-4 w-4","aria-hidden":"true"})})()),I.$$click=()=>e.onWordWrapModeChange(F()),n(I,i(Ce,{class:"h-4 w-4","aria-hidden":"true"})),P(c=>{var N=w(),o=w(),d=K(),y=K(),x=`file-viewer-toolbar-icon-button${e.wordWrapMode==="on"?" active":""}`,W=O(),G=O();return N!==c.e&&g(T,"aria-label",c.e=N),o!==c.t&&g(T,"title",c.t=o),d!==c.a&&g(E,"aria-label",c.a=d),y!==c.o&&g(E,"title",c.o=y),x!==c.i&&q(I,c.i=x),W!==c.n&&g(I,"aria-label",c.n=W),G!==c.s&&g(I,"title",c.s=G),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),U})()};ae(["click"]);var H=u("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Me=u('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),ke=u('<div class="p-3 text-xs text-secondary">'),Ie=u('<span class="git-change-row-action-bar git-change-row-action-bar-vertical">'),We=u('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=git-change-list-item-right><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-</span></div></div></div><div class=git-change-list-item-actions-zone><div class=git-change-list-item-actions><button type=button class=git-change-row-action><span aria-hidden=true><span class="git-change-row-action-bar git-change-row-action-bar-horizontal">'),Le=u("<div class=git-change-section-items>"),Ve=u("<div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title></span></span><span class=git-change-section-count>"),Te=u('<div class=git-change-section-items><div class=git-change-commit-box><div class=git-change-commit-input-wrap><textarea class=git-change-commit-input rows=1></textarea><button type=button class="git-change-commit-button git-change-commit-button-overlay">'),Ee=u("<div class=git-change-sections><div class=git-change-section><button type=button class=git-change-section-header><span class=git-change-section-header-main><span class=git-change-section-chevron></span><span class=git-change-section-title-row><span class=git-change-section-title></span></span></span><span class=git-change-section-count>"),Ae=u('<span class="status-indicator session-status-list worktree-indicator git-change-section-badge"><span class=worktree-indicator-label>'),Pe=u("<span class=files-tab-selected-path><span class=file-path-text>"),Re=u('<div class=files-tab-stats style="flex:0 0 auto"><span class="files-tab-stat files-tab-stat-additions"><span class=files-tab-stat-value>+</span></span><span class="files-tab-stat files-tab-stat-deletions"><span class=files-tab-stat-value>-'),ze=u("<button type=button class=files-header-icon-button style=margin-left:auto>"),De=u("<span class=text-error>");const Oe=de(()=>re(()=>import("./monaco-viewer-BSlOM5Le.js").then(e=>e.au),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),je=e=>{const S=b(()=>e.activeSessionId()),L=b(()=>!!(S()&&S()!=="info")),V=b(()=>L()?e.entries():null),F=b(()=>{const o=V();return Array.isArray(o)?[...o].sort((d,y)=>String(d.path||"").localeCompare(String(y.path||""))):[]}),w=b(()=>ve(F())),K=b(()=>w().reduce((o,d)=>(o.additions+=typeof d.additions=="number"?d.additions:0,o.deletions+=typeof d.deletions=="number"?d.deletions:0,o),{additions:0,deletions:0})),O=b(()=>w().filter(o=>o.section==="staged")),U=b(()=>w().filter(o=>o.section==="unstaged")),T=b(()=>O().length>0&&e.commitMessage().trim().length>0&&!e.commitSubmitting()),E=b(()=>{const o=w(),d=e.selectedItemId(),y=e.mostChangedItemId(),x=o.find(W=>W.id===d)||(y?o.find(W=>W.id===y):void 0);return(x==null?void 0:x.entry)??null}),I=b(()=>L()?V()===null?e.t("instanceShell.gitChanges.loading"):w().length===0?e.t("instanceShell.gitChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty"):e.t("instanceShell.gitChanges.noSessionSelected")),c=b(()=>e.selectedError()===e.t("instanceShell.gitChanges.binaryViewer"));return D(()=>{const o=K(),d=E(),y=w(),x=O(),W=U(),G=()=>(()=>{var t=Me(),r=t.firstChild;return n(r,i(k,{get when(){return e.selectedLoading()},get fallback(){return i(k,{get when(){return e.selectedError()},get fallback(){return i(k,{get when(){return D(()=>!!(d&&e.selectedBefore()!==null&&e.selectedAfter()!==null))()?{path:d.path,before:e.selectedBefore(),after:e.selectedAfter()}:null},get fallback(){return(()=>{var a=H(),s=a.firstChild;return n(s,I),a})()},children:a=>i(oe,{get fallback(){return(()=>{var s=H(),l=s.firstChild;return n(l,()=>e.t("instanceInfo.loading")),s})()},get children(){return i(Oe,{get scopeKey(){return e.scopeKey()},get path(){return String(a().path||"")},get before(){return String(a().before||"")},get after(){return String(a().after||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()},get insertContextLabel(){return e.t("instanceShell.gitChanges.actions.insertContext")},get onRequestInsertContext(){return c()?void 0:s=>{const l=e.selectedItemId();if(!l)return;const f=w().find(v=>v.id===l);f&&e.onInsertContext(f,s)}}})}})})},children:a=>(()=>{var s=H(),l=s.firstChild;return n(l,a),s})()})},get children(){var a=H(),s=a.firstChild;return n(s,()=>e.t("instanceInfo.loading")),a}})),t})(),le=()=>(()=>{var t=ke();return n(t,I),t})(),J=t=>{const r=b(()=>e.selectedBulkItemIds().has(t.id)),a=t.section==="staged"?e.t("instanceShell.gitChanges.actions.unstage"):e.t("instanceShell.gitChanges.actions.stage"),s=()=>{t.section==="staged"?e.onUnstageFile(t):e.onStageFile(t)};return(()=>{var l=We(),f=l.firstChild,v=f.firstChild,R=v.firstChild,$=v.nextSibling,_=$.firstChild,C=_.firstChild;C.firstChild;var M=C.nextSibling;M.firstChild;var B=f.nextSibling,m=B.firstChild,A=m.firstChild,z=A.firstChild;return z.firstChild,l.$$click=h=>e.onRowClick(t,h),l.$$mousedown=h=>{(h.shiftKey||h.ctrlKey||h.metaKey)&&h.preventDefault()},n(R,()=>t.path),n(C,()=>t.additions,null),n(M,()=>t.deletions,null),A.$$click=h=>{h.stopPropagation(),s()},g(A,"title",a),g(A,"aria-label",a),n(z,i(k,{get when(){return t.section!=="staged"},get children(){return Ie()}}),null),P(h=>{var Q=`file-list-item git-change-list-item ${e.selectedItemId()===t.id?"file-list-item-active":""} ${r()?"git-change-list-item-bulk-selected":""}`,X=t.path,Y=t.path,Z=t.path,p=`git-change-row-action-glyph ${t.section==="staged"?"git-change-row-action-glyph-minus":"git-change-row-action-glyph-plus"}`;return Q!==h.e&&q(l,h.e=Q),X!==h.t&&g(l,"title",h.t=X),Y!==h.a&&g(f,"title",h.a=Y),Z!==h.o&&g(v,"title",h.o=Z),p!==h.i&&q(z,h.i=p),h},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),l})()},se=(t,r,a,s)=>(()=>{var l=Ve(),f=l.firstChild,v=f.firstChild,R=v.firstChild,$=R.nextSibling,_=v.nextSibling;return ee(f,"click",s,!0),n(R,a?i(ne,{class:"h-3.5 w-3.5"}):i(ie,{class:"h-3.5 w-3.5"})),n($,t),n(_,()=>r.length),n(l,i(k,{when:a,get children(){var C=Le();return n(C,i(te,{each:r,children:M=>J(M)})),C}}),null),l})(),j=()=>i(k,{get when(){return y.length>0},get fallback(){return le()},get children(){var t=Ee(),r=t.firstChild,a=r.firstChild,s=a.firstChild,l=s.firstChild,f=l.nextSibling,v=f.firstChild,R=s.nextSibling;return ee(a,"click",e.onToggleStagedOpen,!0),n(l,(()=>{var $=D(()=>!!e.stagedOpen());return()=>$()?i(ne,{class:"h-3.5 w-3.5"}):i(ie,{class:"h-3.5 w-3.5"})})()),n(v,()=>e.t("instanceShell.gitChanges.sections.staged")),n(f,i(k,{get when(){return e.branchLabel()},children:$=>(()=>{var _=Ae(),C=_.firstChild;return n(_,i(be,{class:"w-3.5 h-3.5","aria-hidden":"true"}),C),n(C,$),P(()=>g(_,"title",`Branch: ${$()}`)),_})()}),null),n(R,()=>x.length),n(r,i(k,{get when(){return e.stagedOpen()},get children(){var $=Te(),_=$.firstChild,C=_.firstChild,M=C.firstChild,B=M.nextSibling;return M.$$input=m=>e.onCommitMessageInput(m.currentTarget.value),B.$$click=()=>e.onSubmitCommit(),n(B,(()=>{var m=D(()=>!!e.commitSubmitting());return()=>m()?e.t("instanceShell.gitChanges.commit.submitting"):e.t("instanceShell.gitChanges.commit.submit")})()),n($,i(te,{each:x,children:m=>J(m)}),null),P(m=>{var A=e.t("instanceShell.gitChanges.commit.placeholder"),z=!T();return A!==m.e&&g(M,"placeholder",m.e=A),z!==m.t&&(B.disabled=m.t=z),m},{e:void 0,t:void 0}),P(()=>M.value=e.commitMessage()),$}}),null),n(t,()=>se(e.t("instanceShell.gitChanges.sections.unstaged"),W,e.unstagedOpen(),e.onToggleUnstagedOpen),null),t}});return i(we,{get header(){return[(()=>{var t=Pe(),r=t.firstChild;return n(r,()=>(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges")),P(()=>g(t,"title",(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges"))),t})(),(()=>{var t=Re(),r=t.firstChild,a=r.firstChild;a.firstChild;var s=r.nextSibling,l=s.firstChild;return l.firstChild,n(a,()=>o.additions,null),n(l,()=>o.deletions,null),n(t,i(k,{get when(){return e.statusError()},children:f=>(()=>{var v=De();return n(v,f),v})()}),null),t})(),(()=>{var t=ze();return t.$$click=()=>e.onRefresh(),n(t,i(me,{get class(){return`h-4 w-4${e.statusLoading()?" animate-spin":""}`}})),P(r=>{var a=e.t("instanceShell.rightPanel.actions.refresh"),s=e.t("instanceShell.rightPanel.actions.refresh"),l=!L()||e.statusLoading()||V()===null;return a!==r.e&&g(t,"title",r.e=a),s!==r.t&&g(t,"aria-label",r.t=s),l!==r.a&&(t.disabled=r.a=l),r},{e:void 0,t:void 0,a:void 0}),t})(),i(xe,{get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrapMode(){return e.diffWordWrapMode()},get onViewModeChange(){return e.onViewModeChange},get onContextModeChange(){return e.onContextModeChange},get onWordWrapModeChange(){return e.onWordWrapModeChange}})]},list:{panel:j,overlay:j},get viewer(){return G()},get listOpen(){return e.listOpen()},get onToggleList(){return e.onToggleList},get splitWidth(){return e.splitWidth()},get onResizeMouseDown(){return e.onResizeMouseDown},get onResizeTouchStart(){return e.onResizeTouchStart},get isPhoneLayout(){return e.isPhoneLayout()},get overlayAriaLabel(){return e.t("instanceShell.rightPanel.tabs.gitChanges")}})})};ae(["mousedown","click","input"]);export{je as default};
@@ -1 +1 @@
1
- import{m as ce,P as Ye,N as Qe,t as $,i as g,a as De,g as Ie,d as B,j as Ze,u as Je,f as et}from"./monaco-viewer-BSlOM5Le.js";import{n as i,m as O,q as de,s as N,d as F,b as V,o as H,c as k,k as ue,S as K,l as ge,t as tt,w as _e,a as pe,F as xe}from"./git-diff-vendor-CYS3ApzA.js";import{I as fe,Q as Oe,T as W,U as Me,W as Ee,X as Ce,Y as nt,Z as ve,_ as le,$ as he,a0 as Ue,a1 as te,a2 as ne,a3 as ot,a4 as we,a5 as st,a6 as rt,a7 as z,a8 as Se,a9 as it,aa as at,ab as lt,ac as ct,ad as q,ae as dt,af as ut,ag as gt,ah as pt,ai as ft,aj as Z,ak as ht,al as mt,am as vt,an as bt,ao as yt,ap as xt,aq as be,ar as Ct,K as wt,as as St,at as kt,au as $t,av as Pt,aw as Tt,ax as It}from"./main-DxKSa1-Y.js";import{u as Ae}from"./index-BSA3SyyP.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const _t=[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]],Dt=e=>i(fe,O(e,{name:"BellRing",iconNode:_t})),Ot=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Mt=e=>i(fe,O(e,{name:"GripVertical",iconNode:Ot})),Et=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Ut=e=>i(fe,O(e,{name:"TerminalSquare",iconNode:Et})),At=[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Rt=e=>i(fe,O(e,{name:"XOctagon",iconNode:At}));var Ft={};Se(Ft,{Arrow:()=>Oe,Content:()=>Fe,Portal:()=>Le,Root:()=>Ke,Tooltip:()=>ee,Trigger:()=>Be,useTooltipContext:()=>me});var Re=ue();function me(){const e=ge(Re);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Fe(e){const n=me(),c=W({id:n.generateId("content")},e),[l,t]=N(c,["ref","style"]);return V(()=>H(n.registerContentId(t.id))),i(K,{get when(){return n.contentPresent()},get children(){return i(Ue.Positioner,{get children(){return i(ot,O({ref(o){var s=te(d=>{n.setContentRef(d)},l.ref);typeof s=="function"&&s(o)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return we({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onFocusOutside:o=>o.preventDefault(),onDismiss:()=>n.hideTooltip(!0)},()=>n.dataset(),t))}})}})}function Le(e){const n=me();return i(K,{get when(){return n.contentPresent()},get children(){return i(Ye,e)}})}function Lt(e,n,c){const l=e.split("-")[0],t=n.getBoundingClientRect(),o=c.getBoundingClientRect(),s=[],d=t.left+t.width/2,x=t.top+t.height/2;switch(l){case"top":s.push([t.left,x]),s.push([o.left,o.bottom]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([t.right,x]);break;case"right":s.push([d,t.top]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]),s.push([d,t.bottom]);break;case"bottom":s.push([t.left,x]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([o.right,o.top]),s.push([t.right,x]);break;case"left":s.push([d,t.top]),s.push([o.right,o.top]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([d,t.bottom]);break}return s}var X={},Kt=0,G=!1,j,J,Y;function Ke(e){const n=`tooltip-${de()}`,c=`${++Kt}`,l=W({id:n,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,o]=N(l,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[d,x]=F(),[m,u]=F(),[a,p]=F(),[r,v]=F(o.placement),f=Me({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:y=>{var U;return(U=t.onOpenChange)==null?void 0:U.call(t,y)}}),{present:C}=Ee({show:()=>t.forceMount||f.isOpen(),element:()=>a()??null}),h=()=>{X[c]=T},S=()=>{for(const y in X)y!==c&&(X[y](!0),delete X[y])},T=(y=!1)=>{y||t.closeDelay&&t.closeDelay<=0?(window.clearTimeout(s),s=void 0,f.close()):s||(s=window.setTimeout(()=>{s=void 0,f.close()},t.closeDelay)),window.clearTimeout(j),j=void 0,t.skipDelayDuration&&t.skipDelayDuration>=0&&(Y=window.setTimeout(()=>{window.clearTimeout(Y),Y=void 0},t.skipDelayDuration)),G&&(window.clearTimeout(J),J=window.setTimeout(()=>{delete X[c],J=void 0,G=!1},t.closeDelay))},E=()=>{clearTimeout(s),s=void 0,S(),h(),G=!0,f.open(),window.clearTimeout(j),j=void 0,window.clearTimeout(J),J=void 0,window.clearTimeout(Y),Y=void 0},M=()=>{S(),h(),!f.isOpen()&&!j&&!G?j=window.setTimeout(()=>{j=void 0,G=!0,E()},t.openDelay):f.isOpen()||E()},A=(y=!1)=>{!y&&t.openDelay&&t.openDelay>0&&!s&&!Y?M():E()},b=()=>{window.clearTimeout(j),j=void 0,G=!1},R=()=>{window.clearTimeout(s),s=void 0},I=y=>ve(m(),y)||ve(a(),y),_=y=>{const U=m(),L=a();if(!(!U||!L))return Lt(y,U,L)},w=y=>{const U=y.target;if(I(U)){R();return}if(!t.ignoreSafeArea){const L=_(r());if(L&&st(rt(y),L)){R();return}}s||T()};V(()=>{if(!f.isOpen())return;const y=Ce();y.addEventListener("pointermove",w,!0),H(()=>{y.removeEventListener("pointermove",w,!0)})}),V(()=>{const y=m();if(!y||!f.isOpen())return;const U=se=>{const re=se.target;ve(re,y)&&T(!0)},L=nt();L.addEventListener("scroll",U,{capture:!0}),H(()=>{L.removeEventListener("scroll",U,{capture:!0})})}),H(()=>{clearTimeout(s),X[c]&&delete X[c]});const D={dataset:k(()=>({"data-expanded":f.isOpen()?"":void 0,"data-closed":f.isOpen()?void 0:""})),isOpen:f.isOpen,isDisabled:()=>t.disabled??!1,triggerOnFocusOnly:()=>t.triggerOnFocusOnly??!1,contentId:d,contentPresent:C,openTooltip:A,hideTooltip:T,cancelOpening:b,generateId:he(()=>l.id),registerContentId:le(x),isTargetOnTooltip:I,setTriggerRef:u,setContentRef:p};return i(Re.Provider,{value:D,get children(){return i(Ue,O({anchorRef:m,contentRef:a,onCurrentPlacementChange:v},o))}})}function Be(e){let n;const c=me(),[l,t]=N(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let o=!1,s=!1,d=!1;const x=()=>{o=!1},m=()=>{!c.isOpen()&&(s||d)&&c.openTooltip(d)},u=h=>{c.isOpen()&&!s&&!d&&c.hideTooltip(h)},a=h=>{z(h,l.onPointerEnter),!(h.pointerType==="touch"||c.triggerOnFocusOnly()||c.isDisabled()||h.defaultPrevented)&&(s=!0,m())},p=h=>{z(h,l.onPointerLeave),h.pointerType!=="touch"&&(s=!1,d=!1,c.isOpen()?u():c.cancelOpening())},r=h=>{z(h,l.onPointerDown),o=!0,Ce(n).addEventListener("pointerup",x,{once:!0})},v=h=>{z(h,l.onClick),s=!1,d=!1,u(!0)},f=h=>{z(h,l.onFocus),!(c.isDisabled()||h.defaultPrevented||o)&&(d=!0,m())},C=h=>{z(h,l.onBlur);const S=h.relatedTarget;c.isTargetOnTooltip(S)||(s=!1,d=!1,u(!0))};return H(()=>{Ce(n).removeEventListener("pointerup",x)}),i(ne,O({as:"button",ref(h){var S=te(T=>{c.setTriggerRef(T),n=T},l.ref);typeof S=="function"&&S(h)},get"aria-describedby"(){return ce(()=>!!c.isOpen())()?c.contentId():void 0},onPointerEnter:a,onPointerLeave:p,onPointerDown:r,onClick:v,onFocus:f,onBlur:C},()=>c.dataset(),t))}var ee=Object.assign(Ke,{Arrow:Oe,Content:Fe,Portal:Le,Trigger:Be}),Bt={};Se(Bt,{Collapsible:()=>Ht,Content:()=>ke,Root:()=>$e,Trigger:()=>Pe,useCollapsibleContext:()=>oe});var He=ue();function oe(){const e=ge(He);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function ke(e){const[n,c]=F(),l=oe(),t=W({id:l.generateId("content")},e),[o,s]=N(t,["ref","id","style"]),{present:d}=Ee({show:l.shouldMount,element:()=>n()??null}),[x,m]=F(0),[u,a]=F(0);let r=l.isOpen()||d();return tt(()=>{const v=requestAnimationFrame(()=>{r=!1});H(()=>{cancelAnimationFrame(v)})}),V(_e(d,()=>{if(!n())return;n().style.transitionDuration="0s",n().style.animationName="none";const v=n().getBoundingClientRect();m(v.height),a(v.width),r||(n().style.transitionDuration="",n().style.animationName="")})),V(_e(l.isOpen,v=>{!v&&n()&&(n().style.transitionDuration="",n().style.animationName="")},{defer:!0})),V(()=>H(l.registerContentId(o.id))),i(K,{get when(){return d()},get children(){return i(ne,O({as:"div",ref(v){var f=te(c,o.ref);typeof f=="function"&&f(v)},get id(){return o.id},get style(){return we({"--kb-collapsible-content-height":x()?`${x()}px`:void 0,"--kb-collapsible-content-width":u()?`${u()}px`:void 0},o.style)}},()=>l.dataset(),s))}})}function $e(e){const n=`collapsible-${de()}`,c=W({id:n},e),[l,t]=N(c,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,s]=F(),d=Me({open:()=>l.open,defaultOpen:()=>l.defaultOpen,onOpenChange:u=>{var a;return(a=l.onOpenChange)==null?void 0:a.call(l,u)}}),x=k(()=>({"data-expanded":d.isOpen()?"":void 0,"data-closed":d.isOpen()?void 0:"","data-disabled":l.disabled?"":void 0})),m={dataset:x,isOpen:d.isOpen,disabled:()=>l.disabled??!1,shouldMount:()=>l.forceMount||d.isOpen(),contentId:o,toggle:d.toggle,generateId:he(()=>t.id),registerContentId:le(s)};return i(He.Provider,{value:m,get children(){return i(ne,O({as:"div"},x,t))}})}function Pe(e){const n=oe(),[c,l]=N(e,["onClick"]);return i(it,O({get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return ce(()=>!!n.isOpen())()?n.contentId():void 0},get disabled(){return n.disabled()},onClick:o=>{z(o,c.onClick),n.toggle()}},()=>n.dataset(),l))}var Ht=Object.assign($e,{Content:ke,Trigger:Pe}),Q={};Se(Q,{Accordion:()=>Nt,Content:()=>ze,Header:()=>qe,Item:()=>We,Root:()=>Xe,Trigger:()=>Ge,useAccordionContext:()=>Te});var Ne=ue();function je(){const e=ge(Ne);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function ze(e){const n=je(),c=n.generateId("content"),l=W({id:c},e),[t,o]=N(l,["id","style"]);return V(()=>H(n.registerContentId(t.id))),i(ke,O({role:"region",get"aria-labelledby"(){return n.triggerId()},get style(){return we({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},t.style)}},o))}function qe(e){const n=oe();return i(ne,O({as:"h3"},()=>n.dataset(),e))}var Ve=ue();function Te(){const e=ge(Ve);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function We(e){const n=Te(),c=`${n.generateId("item")}-${de()}`,l=W({id:c},e),[t,o]=N(l,["value","disabled"]),[s,d]=F(),[x,m]=F(),u=()=>n.listState().selectionManager(),a=()=>u().isSelected(t.value),p={value:()=>t.value,triggerId:s,contentId:x,generateId:he(()=>o.id),registerTriggerId:le(d),registerContentId:le(m)};return i(Ne.Provider,{value:p,get children(){return i($e,O({get open(){return a()},get disabled(){return t.disabled}},o))}})}function Xe(e){let n;const c=`accordion-${de()}`,l=W({id:c,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[t,o]=N(l,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[s,d]=F([]),{DomCollectionProvider:x}=at({items:s,onItemsChange:d}),m=lt({selectedKeys:()=>t.value,defaultSelectedKeys:()=>t.defaultValue,onSelectionChange:p=>{var r;return(r=t.onChange)==null?void 0:r.call(t,Array.from(p))},disallowEmptySelection:()=>!t.multiple&&!t.collapsible,selectionMode:()=>t.multiple?"multiple":"single",dataSource:s});m.selectionManager().setFocusedKey("item-1");const u=ct({selectionManager:()=>m.selectionManager(),collection:()=>m.collection(),disallowEmptySelection:()=>m.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>t.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>n),a={listState:()=>m,generateId:he(()=>t.id)};return i(x,{get children(){return i(Ve.Provider,{value:a,get children(){return i(ne,O({as:"div",get id(){return t.id},ref(p){var r=te(v=>n=v,t.ref);typeof r=="function"&&r(p)},get onKeyDown(){return q([t.onKeyDown,u.onKeyDown])},get onMouseDown(){return q([t.onMouseDown,u.onMouseDown])},get onFocusIn(){return q([t.onFocusIn])},get onFocusOut(){return q([t.onFocusOut,u.onFocusOut])}},o))}})}})}function Ge(e){let n;const c=Te(),l=je(),t=oe(),o=l.generateId("trigger"),s=W({id:o},e),[d,x]=N(s,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);dt({getItem:()=>({ref:()=>n,type:"item",key:l.value(),textValue:"",disabled:t.disabled()})});const m=ut({key:()=>l.value(),selectionManager:()=>c.listState().selectionManager(),disabled:()=>t.disabled(),shouldSelectOnPressUp:!0},()=>n),u=a=>{["Enter"," "].includes(a.key)&&a.preventDefault(),z(a,d.onKeyDown),z(a,m.onKeyDown)};return V(()=>H(l.registerTriggerId(x.id))),i(Pe,O({ref(a){var p=te(r=>n=r,d.ref);typeof p=="function"&&p(a)},get"data-key"(){return m.dataKey()},get onPointerDown(){return q([d.onPointerDown,m.onPointerDown])},get onPointerUp(){return q([d.onPointerUp,m.onPointerUp])},get onClick(){return q([d.onClick,m.onClick])},onKeyDown:u,get onMouseDown(){return q([d.onMouseDown,m.onMouseDown])},get onFocus(){return q([d.onFocus,m.onFocus])}},x))}var Nt=Object.assign(Xe,{Content:ze,Header:qe,Item:We,Trigger:Ge}),ie=$('<div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">'),jt=$('<div><div class="flex flex-wrap items-center gap-2 text-xs text-primary"><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">');const zt=e=>{const{t:n}=Ae(),{preferences:c}=Qe(),l=k(()=>c().showUsageMetrics??!0),t=k(()=>gt(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),o=k(()=>pt(e.instanceId,e.sessionId)),s=k(()=>o().length>0),d=k(()=>s()?ft(e.instanceId,e.sessionId)??{cost:0,inputTokens:0,outputTokens:0,reasoningTokens:0}:{cost:0,inputTokens:0,outputTokens:0,reasoningTokens:0}),x=k(()=>`$${d().cost.toFixed(2)}`),m=k(()=>d().inputTokens),u=k(()=>d().outputTokens),a=k(()=>d().reasoningTokens),p=k(()=>t().inputTokens??0),r=k(()=>t().outputTokens??0),v=k(()=>{const C=t().isSubscriptionModel?0:t().cost;return C>0?C:0}),f=k(()=>t().isSubscriptionModel?n("contextUsagePanel.included"):`$${v().toFixed(2)}`);return(()=>{var C=jt(),h=C.firstChild,S=h.firstChild,T=S.firstChild,E=T.nextSibling,M=S.nextSibling,A=M.firstChild,b=A.nextSibling,R=M.nextSibling,I=R.firstChild,_=I.nextSibling;return g(T,()=>n("contextUsagePanel.labels.input")),g(E,()=>Z(p())),g(A,()=>n("contextUsagePanel.labels.output")),g(b,()=>Z(r())),g(I,()=>n("contextUsagePanel.labels.cost")),g(_,f),g(h,i(K,{get when(){return ce(()=>!!s())()&&l()},get children(){return[(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalInput")),g(D,()=>Z(m())),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalOutput")),g(D,()=>Z(u())),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalCost")),g(D,x),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalReasoning")),g(D,()=>Z(a())),w})()]}}),null),pe(()=>De(C,`session-context-panel px-4 py-2 ${e.class??""}`)),C})()};var qt=$('<div><div class="mt-2 truncate text-right text-sm font-semibold text-secondary">'),ye=$('<div class="text-xs text-tertiary">'),Vt=$("<div class=space-y-2>"),Wt=$('<div class="h-2 overflow-hidden border border-base"style=background-color:var(--surface-base)><div class="h-full transition-[width] duration-300"role=progressbar aria-valuemin=0 aria-valuemax=100>'),Xt=$('<div><div class="mb-1 flex items-baseline justify-between gap-2 text-[11px] text-primary"><span class=font-medium></span><div class="flex min-w-0 items-baseline gap-1.5 text-right"><span class="shrink-0 font-medium">'),Gt=$("<span class=text-tertiary aria-hidden=true>·"),Yt=$('<span class="truncate text-[10px] text-tertiary">');const Qt=6e4,Zt=e=>{const{t:n}=Ae(),c=k(()=>{const r=e.providerId.trim();return r?{providerId:r,modelId:e.modelId.trim()}:null}),[l,t]=F();let o=0;const s=async(r,v,f)=>{const C=++o;f&&t(void 0);try{const h=await Ze.fetchProviderUsage(r,v);C===o&&t(h)}catch{C===o&&l()===void 0&&t(null)}};V(()=>{const r=c();if(!r){o+=1,t(void 0);return}s(r.providerId,r.modelId,!0)});const d=setInterval(()=>{const r=c();r&&s(r.providerId,r.modelId,!1)},Qt);H(()=>{o+=1,clearInterval(d)});const x=k(()=>{var r;return Object.entries(((r=l())==null?void 0:r.windows)??{})}),m=r=>{const v={"5h":"fiveHours","7d":"sevenDays","7d-sonnet":"sevenDaysSonnet","7d-opus":"sevenDaysOpus",weekly:"weekly",daily:"daily",monthly:"monthly",credits:"credits",billing_cycle:"billingCycle",session:"session",premium:"premium",chat:"chat",completions:"completions","mcp-tools":"mcpTools"}[r];return v?n(`providerUsage.windows.${v}`):r},u=r=>r.valueLabel?r.valueLabel:r.usedPercent===null?n("providerUsage.unavailableValue"):n("providerUsage.usedPercent",{percent:Math.round(r.usedPercent)}),a=r=>{if(!r)return null;const v=new Date(r);return Number.isFinite(v.getTime())?n("providerUsage.resets",{time:v.toLocaleString([],{dateStyle:"short",timeStyle:"short"})}):null},p=r=>r!==null&&r>=80?"var(--status-error)":r!==null&&r>=50?"var(--status-warning)":"var(--status-success)";return(()=>{var r=qt(),v=r.firstChild;return g(r,i(K,{get when(){return l()!==void 0},get fallback(){return(()=>{var f=ye();return g(f,()=>n("providerUsage.loading")),f})()},get children(){return i(K,{get when(){return l()},get fallback(){return(()=>{var f=ye();return g(f,()=>n("providerUsage.unavailable")),f})()},children:f=>i(K,{get when(){return ce(()=>!!(f().supported&&f().configured&&f().ok))()&&x().length>0},get fallback(){return(()=>{var C=ye();return g(C,()=>n(f().supported?f().configured?"providerUsage.unavailable":"providerUsage.notConfigured":"providerUsage.unsupported")),C})()},get children(){var C=Vt();return g(C,i(xe,{get each(){return x()},children:([h,S])=>(()=>{var T=Xt(),E=T.firstChild,M=E.firstChild,A=M.nextSibling,b=A.firstChild;return g(M,()=>m(h)),g(b,()=>u(S)),g(A,i(K,{get when(){return a(S.resetAt)},children:R=>[Gt(),(()=>{var I=Yt();return g(I,R),I})()]}),null),g(T,i(K,{get when(){return S.usedPercent!==null},get children(){var R=Wt(),I=R.firstChild;return pe(_=>{var w=`${Math.max(0,Math.min(100,S.usedPercent??0))}%`,P=p(S.usedPercent),D=n("providerUsage.progressLabel",{window:m(h)}),y=Math.round(S.usedPercent??0);return w!==_.e&&Ie(I,"width",_.e=w),P!==_.t&&Ie(I,"background-color",_.t=P),D!==_.a&&B(I,"aria-label",_.a=D),y!==_.o&&B(I,"aria-valuenow",_.o=y),_},{e:void 0,t:void 0,a:void 0,o:void 0}),R}}),null),T})()})),C}})})}}),v),g(v,()=>{var f;return((f=l())==null?void 0:f.providerName)??e.providerId}),r})()};var Jt=$("<span class=section-left><span class=section-label>"),en=$("<div>"),ae=$('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),tn=$('<div class="flex items-center justify-between gap-2 border border-base bg-surface-secondary px-3 py-2"><p class="min-w-0 text-xs leading-5 text-secondary"></p><div class="-mr-2 shrink-0">'),nn=$('<div class="flex flex-col gap-2">'),on=$("<span>"),sn=$('<div class=status-process-card><div class=status-process-header><span class=status-process-title></span><div class=status-process-meta><span></span><span></span></div></div><div class=status-process-actions><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center">'),rn=$('<div class="text-xs text-tertiary">'),an=$('<div class="border border-base bg-surface-secondary px-3 py-2">'),ln=$("<div class=status-tab-container>");const cn=e=>{const n=Ct(e.section.id);return(()=>{var c=en();return Je(n,c),g(c,i(Q.Item,{get value(){return e.section.id},class:"right-panel-accordion-item",get children(){return[i(Q.Header,{class:"right-panel-accordion-header-row",get children(){return[i(Q.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var l=Jt(),t=l.firstChild;return g(l,i(Mt,{class:"h-3.5 w-3.5 text-tertiary","aria-hidden":"true"}),t),g(t,()=>e.t(e.section.labelKey)),l})(),i(wt,{get class(){return`right-panel-accordion-chevron ${e.expanded?"right-panel-accordion-chevron-expanded":""}`}})]}}),i(ee,{openDelay:200,gutter:4,placement:"top",get children(){return[i(ee.Trigger,{as:"button",type:"button",class:"section-info-trigger",get"aria-label"(){return e.t(e.section.tooltipKey)},get children(){return i(St,{class:"section-info-icon"})}}),i(ee.Portal,{get children(){return i(ee.Content,{class:"section-info-tooltip",get children(){return e.t(e.section.tooltipKey)}})}})]}})]}}),i(Q.Content,{class:"right-panel-accordion-content",get children(){return e.section.render()}})]}})),pe(()=>De(c,`right-panel-section-draggable ${n.isActiveDraggable?"right-panel-section-draggable-active":""}`)),c})()},mn=e=>{const n=u=>e.expandedItems().includes(u),c=()=>{const u=e.activeSession();return u?(()=>{var a=tn(),p=a.firstChild,r=p.nextSibling;return g(p,()=>e.t("instanceShell.yoloMode.description")),g(r,i(It,{get checked(){return Tt(e.instanceId,u.id)},color:"warning",size:"small",get inputProps(){return{"aria-label":e.t("instanceShell.yoloMode.title")}},onChange:()=>Pt(e.instanceId,u.id)})),a})():(()=>{var a=ae(),p=a.firstChild;return g(p,()=>e.t("instanceShell.yoloMode.noSessionSelected")),a})()},l=()=>{const u=e.activeSessionId();if(!u||u==="info")return(()=>{var p=ae(),r=p.firstChild;return g(r,()=>e.t("instanceShell.plan.noSessionSelected")),p})();const a=e.latestTodoState();return a?i($t,{state:a,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var p=ae(),r=p.firstChild;return g(r,()=>e.t("instanceShell.plan.empty")),p})()},t=()=>{const u=e.backgroundProcessList();return u.length===0?(()=>{var a=ae(),p=a.firstChild;return g(p,()=>e.t("instanceShell.backgroundProcesses.empty")),a})():(()=>{var a=nn();return g(a,i(xe,{each:u,children:p=>(()=>{var r=sn(),v=r.firstChild,f=v.firstChild,C=f.nextSibling,h=C.firstChild,S=h.nextSibling,T=v.nextSibling,E=T.firstChild,M=E.nextSibling,A=M.nextSibling;return g(f,()=>p.title),g(h,i(Dt,{class:"h-3.5 w-3.5"})),g(S,()=>e.t("instanceShell.backgroundProcesses.status",{status:p.status})),g(C,i(K,{get when(){return typeof p.outputSizeBytes=="number"},get children(){var b=on();return g(b,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((p.outputSizeBytes??0)/1024)})),b}}),null),E.$$click=()=>e.onOpenBackgroundOutput(p),g(E,i(Ut,{class:"h-4 w-4"})),M.$$click=()=>e.onStopBackgroundProcess(p.id),g(M,i(Rt,{class:"h-4 w-4"})),A.$$click=()=>e.onTerminateBackgroundProcess(p.id),g(A,i(kt,{class:"h-4 w-4"})),pe(b=>{var R=!!p.notifyEnabled,I=!p.notifyEnabled,_=e.t(p.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),w=e.t(p.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),P=e.t("instanceShell.backgroundProcesses.actions.output"),D=e.t("instanceShell.backgroundProcesses.actions.output"),y=p.status!=="running",U=e.t("instanceShell.backgroundProcesses.actions.stop"),L=e.t("instanceShell.backgroundProcesses.actions.stop"),se=e.t("instanceShell.backgroundProcesses.actions.terminate"),re=e.t("instanceShell.backgroundProcesses.actions.terminate");return R!==b.e&&h.classList.toggle("text-success",b.e=R),I!==b.t&&h.classList.toggle("text-tertiary",b.t=I),_!==b.a&&B(h,"aria-label",b.a=_),w!==b.o&&B(h,"title",b.o=w),P!==b.i&&B(E,"aria-label",b.i=P),D!==b.n&&B(E,"title",b.n=D),y!==b.s&&(M.disabled=b.s=y),U!==b.h&&B(M,"aria-label",b.h=U),L!==b.r&&B(M,"title",b.r=L),se!==b.d&&B(A,"aria-label",b.d=se),re!==b.l&&B(A,"title",b.l=re),b},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),r})()})),a})()},o=()=>{const u=e.activeSession();return u?(()=>{var a=an();return g(a,i(Zt,{get providerId(){return u.model.providerId},get modelId(){return u.model.modelId}})),a})():(()=>{var a=rn();return g(a,()=>e.t("providerUsage.noSession")),a})()},s=k(()=>[...ht({renderYoloModeSection:c,renderProviderUsage:o,renderPlanSectionContent:l,renderBackgroundProcesses:t,renderMcpStatus:()=>i(be,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"}),renderLspStatus:()=>i(be,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"}),renderPluginStatus:()=>i(be,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}).statusSections??[],...e.extraSections??[]]),d=k(()=>mt(s(),e.customization().statusSectionOrder,e.customization().hiddenStatusSectionIds)),x=(u,a)=>{if(!u||u===a)return;const p=d().map(h=>h.id),r=p.indexOf(u),v=p.indexOf(a);if(r===-1||v===-1)return;const f=[...p],[C]=f.splice(r,1);f.splice(v,0,C),e.onCustomizationChange(h=>({...h,statusSectionOrder:f}))},m=({draggable:u,droppable:a})=>{a&&x(String(u.id),String(a.id))};return(()=>{var u=ln();return g(u,i(K,{get when(){return e.activeSession()},children:a=>i(zt,{get instanceId(){return e.instanceId},get sessionId(){return a().id},class:"status-tab-context-panel"})}),null),g(u,i(Q.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return i(vt,{collisionDetector:bt,onDragEnd:m,get children(){return i(yt,{get children(){return i(xt,{get ids(){return d().map(a=>a.id)},get children(){return i(xe,{get each(){return d()},children:a=>i(cn,{section:a,get expanded(){return n(a.id)},get t(){return e.t}})})}})}})}})}}),null),u})()};et(["click"]);export{mn as default};
1
+ import{m as ce,P as Ye,N as Qe,t as $,i as g,a as De,g as Ie,d as B,j as Ze,u as Je,f as et}from"./monaco-viewer-BSlOM5Le.js";import{n as i,m as O,q as de,s as N,d as F,b as V,o as H,c as k,k as ue,S as K,l as ge,t as tt,w as _e,a as pe,F as xe}from"./git-diff-vendor-CYS3ApzA.js";import{I as fe,Q as Oe,T as W,U as Me,W as Ee,X as Ce,Y as nt,Z as ve,_ as le,$ as he,a0 as Ue,a1 as te,a2 as ne,a3 as ot,a4 as we,a5 as st,a6 as rt,a7 as z,a8 as Se,a9 as it,aa as at,ab as lt,ac as ct,ad as q,ae as dt,af as ut,ag as gt,ah as pt,ai as ft,aj as Z,ak as ht,al as mt,am as vt,an as bt,ao as yt,ap as xt,aq as be,ar as Ct,K as wt,as as St,at as kt,au as $t,av as Pt,aw as Tt,ax as It}from"./main-C_vh9cYf.js";import{u as Ae}from"./index-BSA3SyyP.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const _t=[["path",{d:"M6 8a6 6 0 0 1 12 0c0 7 3 9 3 9H3s3-2 3-9",key:"1qo2s2"}],["path",{d:"M10.3 21a1.94 1.94 0 0 0 3.4 0",key:"qgo35s"}],["path",{d:"M4 2C2.8 3.7 2 5.7 2 8",key:"tap9e0"}],["path",{d:"M22 8c0-2.3-.8-4.3-2-6",key:"5bb3ad"}]],Dt=e=>i(fe,O(e,{name:"BellRing",iconNode:_t})),Ot=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],Mt=e=>i(fe,O(e,{name:"GripVertical",iconNode:Ot})),Et=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],Ut=e=>i(fe,O(e,{name:"TerminalSquare",iconNode:Et})),At=[["polygon",{points:"7.86 2 16.14 2 22 7.86 22 16.14 16.14 22 7.86 22 2 16.14 2 7.86 7.86 2",key:"h1p8hx"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Rt=e=>i(fe,O(e,{name:"XOctagon",iconNode:At}));var Ft={};Se(Ft,{Arrow:()=>Oe,Content:()=>Fe,Portal:()=>Le,Root:()=>Ke,Tooltip:()=>ee,Trigger:()=>Be,useTooltipContext:()=>me});var Re=ue();function me(){const e=ge(Re);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Fe(e){const n=me(),c=W({id:n.generateId("content")},e),[l,t]=N(c,["ref","style"]);return V(()=>H(n.registerContentId(t.id))),i(K,{get when(){return n.contentPresent()},get children(){return i(Ue.Positioner,{get children(){return i(ot,O({ref(o){var s=te(d=>{n.setContentRef(d)},l.ref);typeof s=="function"&&s(o)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return we({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},l.style)},onFocusOutside:o=>o.preventDefault(),onDismiss:()=>n.hideTooltip(!0)},()=>n.dataset(),t))}})}})}function Le(e){const n=me();return i(K,{get when(){return n.contentPresent()},get children(){return i(Ye,e)}})}function Lt(e,n,c){const l=e.split("-")[0],t=n.getBoundingClientRect(),o=c.getBoundingClientRect(),s=[],d=t.left+t.width/2,x=t.top+t.height/2;switch(l){case"top":s.push([t.left,x]),s.push([o.left,o.bottom]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([t.right,x]);break;case"right":s.push([d,t.top]),s.push([o.left,o.top]),s.push([o.right,o.top]),s.push([o.right,o.bottom]),s.push([o.left,o.bottom]),s.push([d,t.bottom]);break;case"bottom":s.push([t.left,x]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([o.right,o.top]),s.push([t.right,x]);break;case"left":s.push([d,t.top]),s.push([o.right,o.top]),s.push([o.left,o.top]),s.push([o.left,o.bottom]),s.push([o.right,o.bottom]),s.push([d,t.bottom]);break}return s}var X={},Kt=0,G=!1,j,J,Y;function Ke(e){const n=`tooltip-${de()}`,c=`${++Kt}`,l=W({id:n,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,o]=N(l,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[d,x]=F(),[m,u]=F(),[a,p]=F(),[r,v]=F(o.placement),f=Me({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:y=>{var U;return(U=t.onOpenChange)==null?void 0:U.call(t,y)}}),{present:C}=Ee({show:()=>t.forceMount||f.isOpen(),element:()=>a()??null}),h=()=>{X[c]=T},S=()=>{for(const y in X)y!==c&&(X[y](!0),delete X[y])},T=(y=!1)=>{y||t.closeDelay&&t.closeDelay<=0?(window.clearTimeout(s),s=void 0,f.close()):s||(s=window.setTimeout(()=>{s=void 0,f.close()},t.closeDelay)),window.clearTimeout(j),j=void 0,t.skipDelayDuration&&t.skipDelayDuration>=0&&(Y=window.setTimeout(()=>{window.clearTimeout(Y),Y=void 0},t.skipDelayDuration)),G&&(window.clearTimeout(J),J=window.setTimeout(()=>{delete X[c],J=void 0,G=!1},t.closeDelay))},E=()=>{clearTimeout(s),s=void 0,S(),h(),G=!0,f.open(),window.clearTimeout(j),j=void 0,window.clearTimeout(J),J=void 0,window.clearTimeout(Y),Y=void 0},M=()=>{S(),h(),!f.isOpen()&&!j&&!G?j=window.setTimeout(()=>{j=void 0,G=!0,E()},t.openDelay):f.isOpen()||E()},A=(y=!1)=>{!y&&t.openDelay&&t.openDelay>0&&!s&&!Y?M():E()},b=()=>{window.clearTimeout(j),j=void 0,G=!1},R=()=>{window.clearTimeout(s),s=void 0},I=y=>ve(m(),y)||ve(a(),y),_=y=>{const U=m(),L=a();if(!(!U||!L))return Lt(y,U,L)},w=y=>{const U=y.target;if(I(U)){R();return}if(!t.ignoreSafeArea){const L=_(r());if(L&&st(rt(y),L)){R();return}}s||T()};V(()=>{if(!f.isOpen())return;const y=Ce();y.addEventListener("pointermove",w,!0),H(()=>{y.removeEventListener("pointermove",w,!0)})}),V(()=>{const y=m();if(!y||!f.isOpen())return;const U=se=>{const re=se.target;ve(re,y)&&T(!0)},L=nt();L.addEventListener("scroll",U,{capture:!0}),H(()=>{L.removeEventListener("scroll",U,{capture:!0})})}),H(()=>{clearTimeout(s),X[c]&&delete X[c]});const D={dataset:k(()=>({"data-expanded":f.isOpen()?"":void 0,"data-closed":f.isOpen()?void 0:""})),isOpen:f.isOpen,isDisabled:()=>t.disabled??!1,triggerOnFocusOnly:()=>t.triggerOnFocusOnly??!1,contentId:d,contentPresent:C,openTooltip:A,hideTooltip:T,cancelOpening:b,generateId:he(()=>l.id),registerContentId:le(x),isTargetOnTooltip:I,setTriggerRef:u,setContentRef:p};return i(Re.Provider,{value:D,get children(){return i(Ue,O({anchorRef:m,contentRef:a,onCurrentPlacementChange:v},o))}})}function Be(e){let n;const c=me(),[l,t]=N(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let o=!1,s=!1,d=!1;const x=()=>{o=!1},m=()=>{!c.isOpen()&&(s||d)&&c.openTooltip(d)},u=h=>{c.isOpen()&&!s&&!d&&c.hideTooltip(h)},a=h=>{z(h,l.onPointerEnter),!(h.pointerType==="touch"||c.triggerOnFocusOnly()||c.isDisabled()||h.defaultPrevented)&&(s=!0,m())},p=h=>{z(h,l.onPointerLeave),h.pointerType!=="touch"&&(s=!1,d=!1,c.isOpen()?u():c.cancelOpening())},r=h=>{z(h,l.onPointerDown),o=!0,Ce(n).addEventListener("pointerup",x,{once:!0})},v=h=>{z(h,l.onClick),s=!1,d=!1,u(!0)},f=h=>{z(h,l.onFocus),!(c.isDisabled()||h.defaultPrevented||o)&&(d=!0,m())},C=h=>{z(h,l.onBlur);const S=h.relatedTarget;c.isTargetOnTooltip(S)||(s=!1,d=!1,u(!0))};return H(()=>{Ce(n).removeEventListener("pointerup",x)}),i(ne,O({as:"button",ref(h){var S=te(T=>{c.setTriggerRef(T),n=T},l.ref);typeof S=="function"&&S(h)},get"aria-describedby"(){return ce(()=>!!c.isOpen())()?c.contentId():void 0},onPointerEnter:a,onPointerLeave:p,onPointerDown:r,onClick:v,onFocus:f,onBlur:C},()=>c.dataset(),t))}var ee=Object.assign(Ke,{Arrow:Oe,Content:Fe,Portal:Le,Trigger:Be}),Bt={};Se(Bt,{Collapsible:()=>Ht,Content:()=>ke,Root:()=>$e,Trigger:()=>Pe,useCollapsibleContext:()=>oe});var He=ue();function oe(){const e=ge(He);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function ke(e){const[n,c]=F(),l=oe(),t=W({id:l.generateId("content")},e),[o,s]=N(t,["ref","id","style"]),{present:d}=Ee({show:l.shouldMount,element:()=>n()??null}),[x,m]=F(0),[u,a]=F(0);let r=l.isOpen()||d();return tt(()=>{const v=requestAnimationFrame(()=>{r=!1});H(()=>{cancelAnimationFrame(v)})}),V(_e(d,()=>{if(!n())return;n().style.transitionDuration="0s",n().style.animationName="none";const v=n().getBoundingClientRect();m(v.height),a(v.width),r||(n().style.transitionDuration="",n().style.animationName="")})),V(_e(l.isOpen,v=>{!v&&n()&&(n().style.transitionDuration="",n().style.animationName="")},{defer:!0})),V(()=>H(l.registerContentId(o.id))),i(K,{get when(){return d()},get children(){return i(ne,O({as:"div",ref(v){var f=te(c,o.ref);typeof f=="function"&&f(v)},get id(){return o.id},get style(){return we({"--kb-collapsible-content-height":x()?`${x()}px`:void 0,"--kb-collapsible-content-width":u()?`${u()}px`:void 0},o.style)}},()=>l.dataset(),s))}})}function $e(e){const n=`collapsible-${de()}`,c=W({id:n},e),[l,t]=N(c,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,s]=F(),d=Me({open:()=>l.open,defaultOpen:()=>l.defaultOpen,onOpenChange:u=>{var a;return(a=l.onOpenChange)==null?void 0:a.call(l,u)}}),x=k(()=>({"data-expanded":d.isOpen()?"":void 0,"data-closed":d.isOpen()?void 0:"","data-disabled":l.disabled?"":void 0})),m={dataset:x,isOpen:d.isOpen,disabled:()=>l.disabled??!1,shouldMount:()=>l.forceMount||d.isOpen(),contentId:o,toggle:d.toggle,generateId:he(()=>t.id),registerContentId:le(s)};return i(He.Provider,{value:m,get children(){return i(ne,O({as:"div"},x,t))}})}function Pe(e){const n=oe(),[c,l]=N(e,["onClick"]);return i(it,O({get"aria-expanded"(){return n.isOpen()},get"aria-controls"(){return ce(()=>!!n.isOpen())()?n.contentId():void 0},get disabled(){return n.disabled()},onClick:o=>{z(o,c.onClick),n.toggle()}},()=>n.dataset(),l))}var Ht=Object.assign($e,{Content:ke,Trigger:Pe}),Q={};Se(Q,{Accordion:()=>Nt,Content:()=>ze,Header:()=>qe,Item:()=>We,Root:()=>Xe,Trigger:()=>Ge,useAccordionContext:()=>Te});var Ne=ue();function je(){const e=ge(Ne);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function ze(e){const n=je(),c=n.generateId("content"),l=W({id:c},e),[t,o]=N(l,["id","style"]);return V(()=>H(n.registerContentId(t.id))),i(ke,O({role:"region",get"aria-labelledby"(){return n.triggerId()},get style(){return we({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},t.style)}},o))}function qe(e){const n=oe();return i(ne,O({as:"h3"},()=>n.dataset(),e))}var Ve=ue();function Te(){const e=ge(Ve);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function We(e){const n=Te(),c=`${n.generateId("item")}-${de()}`,l=W({id:c},e),[t,o]=N(l,["value","disabled"]),[s,d]=F(),[x,m]=F(),u=()=>n.listState().selectionManager(),a=()=>u().isSelected(t.value),p={value:()=>t.value,triggerId:s,contentId:x,generateId:he(()=>o.id),registerTriggerId:le(d),registerContentId:le(m)};return i(Ne.Provider,{value:p,get children(){return i($e,O({get open(){return a()},get disabled(){return t.disabled}},o))}})}function Xe(e){let n;const c=`accordion-${de()}`,l=W({id:c,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[t,o]=N(l,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[s,d]=F([]),{DomCollectionProvider:x}=at({items:s,onItemsChange:d}),m=lt({selectedKeys:()=>t.value,defaultSelectedKeys:()=>t.defaultValue,onSelectionChange:p=>{var r;return(r=t.onChange)==null?void 0:r.call(t,Array.from(p))},disallowEmptySelection:()=>!t.multiple&&!t.collapsible,selectionMode:()=>t.multiple?"multiple":"single",dataSource:s});m.selectionManager().setFocusedKey("item-1");const u=ct({selectionManager:()=>m.selectionManager(),collection:()=>m.collection(),disallowEmptySelection:()=>m.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>t.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>n),a={listState:()=>m,generateId:he(()=>t.id)};return i(x,{get children(){return i(Ve.Provider,{value:a,get children(){return i(ne,O({as:"div",get id(){return t.id},ref(p){var r=te(v=>n=v,t.ref);typeof r=="function"&&r(p)},get onKeyDown(){return q([t.onKeyDown,u.onKeyDown])},get onMouseDown(){return q([t.onMouseDown,u.onMouseDown])},get onFocusIn(){return q([t.onFocusIn])},get onFocusOut(){return q([t.onFocusOut,u.onFocusOut])}},o))}})}})}function Ge(e){let n;const c=Te(),l=je(),t=oe(),o=l.generateId("trigger"),s=W({id:o},e),[d,x]=N(s,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);dt({getItem:()=>({ref:()=>n,type:"item",key:l.value(),textValue:"",disabled:t.disabled()})});const m=ut({key:()=>l.value(),selectionManager:()=>c.listState().selectionManager(),disabled:()=>t.disabled(),shouldSelectOnPressUp:!0},()=>n),u=a=>{["Enter"," "].includes(a.key)&&a.preventDefault(),z(a,d.onKeyDown),z(a,m.onKeyDown)};return V(()=>H(l.registerTriggerId(x.id))),i(Pe,O({ref(a){var p=te(r=>n=r,d.ref);typeof p=="function"&&p(a)},get"data-key"(){return m.dataKey()},get onPointerDown(){return q([d.onPointerDown,m.onPointerDown])},get onPointerUp(){return q([d.onPointerUp,m.onPointerUp])},get onClick(){return q([d.onClick,m.onClick])},onKeyDown:u,get onMouseDown(){return q([d.onMouseDown,m.onMouseDown])},get onFocus(){return q([d.onFocus,m.onFocus])}},x))}var Nt=Object.assign(Xe,{Content:ze,Header:qe,Item:We,Trigger:Ge}),ie=$('<div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">'),jt=$('<div><div class="flex flex-wrap items-center gap-2 text-xs text-primary"><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary"></span></div><div class="inline-flex items-center gap-1 rounded-full border border-base px-2 py-0.5 text-xs text-primary"><span class="uppercase text-[10px] tracking-wide text-muted"></span><span class="font-semibold text-primary">');const zt=e=>{const{t:n}=Ae(),{preferences:c}=Qe(),l=k(()=>c().showUsageMetrics??!0),t=k(()=>gt(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),o=k(()=>pt(e.instanceId,e.sessionId)),s=k(()=>o().length>0),d=k(()=>s()?ft(e.instanceId,e.sessionId)??{cost:0,inputTokens:0,outputTokens:0,reasoningTokens:0}:{cost:0,inputTokens:0,outputTokens:0,reasoningTokens:0}),x=k(()=>`$${d().cost.toFixed(2)}`),m=k(()=>d().inputTokens),u=k(()=>d().outputTokens),a=k(()=>d().reasoningTokens),p=k(()=>t().inputTokens??0),r=k(()=>t().outputTokens??0),v=k(()=>{const C=t().isSubscriptionModel?0:t().cost;return C>0?C:0}),f=k(()=>t().isSubscriptionModel?n("contextUsagePanel.included"):`$${v().toFixed(2)}`);return(()=>{var C=jt(),h=C.firstChild,S=h.firstChild,T=S.firstChild,E=T.nextSibling,M=S.nextSibling,A=M.firstChild,b=A.nextSibling,R=M.nextSibling,I=R.firstChild,_=I.nextSibling;return g(T,()=>n("contextUsagePanel.labels.input")),g(E,()=>Z(p())),g(A,()=>n("contextUsagePanel.labels.output")),g(b,()=>Z(r())),g(I,()=>n("contextUsagePanel.labels.cost")),g(_,f),g(h,i(K,{get when(){return ce(()=>!!s())()&&l()},get children(){return[(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalInput")),g(D,()=>Z(m())),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalOutput")),g(D,()=>Z(u())),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalCost")),g(D,x),w})(),(()=>{var w=ie(),P=w.firstChild,D=P.nextSibling;return g(P,()=>n("contextUsagePanel.labels.totalReasoning")),g(D,()=>Z(a())),w})()]}}),null),pe(()=>De(C,`session-context-panel px-4 py-2 ${e.class??""}`)),C})()};var qt=$('<div><div class="mt-2 truncate text-right text-sm font-semibold text-secondary">'),ye=$('<div class="text-xs text-tertiary">'),Vt=$("<div class=space-y-2>"),Wt=$('<div class="h-2 overflow-hidden border border-base"style=background-color:var(--surface-base)><div class="h-full transition-[width] duration-300"role=progressbar aria-valuemin=0 aria-valuemax=100>'),Xt=$('<div><div class="mb-1 flex items-baseline justify-between gap-2 text-[11px] text-primary"><span class=font-medium></span><div class="flex min-w-0 items-baseline gap-1.5 text-right"><span class="shrink-0 font-medium">'),Gt=$("<span class=text-tertiary aria-hidden=true>·"),Yt=$('<span class="truncate text-[10px] text-tertiary">');const Qt=6e4,Zt=e=>{const{t:n}=Ae(),c=k(()=>{const r=e.providerId.trim();return r?{providerId:r,modelId:e.modelId.trim()}:null}),[l,t]=F();let o=0;const s=async(r,v,f)=>{const C=++o;f&&t(void 0);try{const h=await Ze.fetchProviderUsage(r,v);C===o&&t(h)}catch{C===o&&l()===void 0&&t(null)}};V(()=>{const r=c();if(!r){o+=1,t(void 0);return}s(r.providerId,r.modelId,!0)});const d=setInterval(()=>{const r=c();r&&s(r.providerId,r.modelId,!1)},Qt);H(()=>{o+=1,clearInterval(d)});const x=k(()=>{var r;return Object.entries(((r=l())==null?void 0:r.windows)??{})}),m=r=>{const v={"5h":"fiveHours","7d":"sevenDays","7d-sonnet":"sevenDaysSonnet","7d-opus":"sevenDaysOpus",weekly:"weekly",daily:"daily",monthly:"monthly",credits:"credits",billing_cycle:"billingCycle",session:"session",premium:"premium",chat:"chat",completions:"completions","mcp-tools":"mcpTools"}[r];return v?n(`providerUsage.windows.${v}`):r},u=r=>r.valueLabel?r.valueLabel:r.usedPercent===null?n("providerUsage.unavailableValue"):n("providerUsage.usedPercent",{percent:Math.round(r.usedPercent)}),a=r=>{if(!r)return null;const v=new Date(r);return Number.isFinite(v.getTime())?n("providerUsage.resets",{time:v.toLocaleString([],{dateStyle:"short",timeStyle:"short"})}):null},p=r=>r!==null&&r>=80?"var(--status-error)":r!==null&&r>=50?"var(--status-warning)":"var(--status-success)";return(()=>{var r=qt(),v=r.firstChild;return g(r,i(K,{get when(){return l()!==void 0},get fallback(){return(()=>{var f=ye();return g(f,()=>n("providerUsage.loading")),f})()},get children(){return i(K,{get when(){return l()},get fallback(){return(()=>{var f=ye();return g(f,()=>n("providerUsage.unavailable")),f})()},children:f=>i(K,{get when(){return ce(()=>!!(f().supported&&f().configured&&f().ok))()&&x().length>0},get fallback(){return(()=>{var C=ye();return g(C,()=>n(f().supported?f().configured?"providerUsage.unavailable":"providerUsage.notConfigured":"providerUsage.unsupported")),C})()},get children(){var C=Vt();return g(C,i(xe,{get each(){return x()},children:([h,S])=>(()=>{var T=Xt(),E=T.firstChild,M=E.firstChild,A=M.nextSibling,b=A.firstChild;return g(M,()=>m(h)),g(b,()=>u(S)),g(A,i(K,{get when(){return a(S.resetAt)},children:R=>[Gt(),(()=>{var I=Yt();return g(I,R),I})()]}),null),g(T,i(K,{get when(){return S.usedPercent!==null},get children(){var R=Wt(),I=R.firstChild;return pe(_=>{var w=`${Math.max(0,Math.min(100,S.usedPercent??0))}%`,P=p(S.usedPercent),D=n("providerUsage.progressLabel",{window:m(h)}),y=Math.round(S.usedPercent??0);return w!==_.e&&Ie(I,"width",_.e=w),P!==_.t&&Ie(I,"background-color",_.t=P),D!==_.a&&B(I,"aria-label",_.a=D),y!==_.o&&B(I,"aria-valuenow",_.o=y),_},{e:void 0,t:void 0,a:void 0,o:void 0}),R}}),null),T})()})),C}})})}}),v),g(v,()=>{var f;return((f=l())==null?void 0:f.providerName)??e.providerId}),r})()};var Jt=$("<span class=section-left><span class=section-label>"),en=$("<div>"),ae=$('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),tn=$('<div class="flex items-center justify-between gap-2 border border-base bg-surface-secondary px-3 py-2"><p class="min-w-0 text-xs leading-5 text-secondary"></p><div class="-mr-2 shrink-0">'),nn=$('<div class="flex flex-col gap-2">'),on=$("<span>"),sn=$('<div class=status-process-card><div class=status-process-header><span class=status-process-title></span><div class=status-process-meta><span></span><span></span></div></div><div class=status-process-actions><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center"></button><button type=button class="button-tertiary w-full p-1 inline-flex items-center justify-center">'),rn=$('<div class="text-xs text-tertiary">'),an=$('<div class="border border-base bg-surface-secondary px-3 py-2">'),ln=$("<div class=status-tab-container>");const cn=e=>{const n=Ct(e.section.id);return(()=>{var c=en();return Je(n,c),g(c,i(Q.Item,{get value(){return e.section.id},class:"right-panel-accordion-item",get children(){return[i(Q.Header,{class:"right-panel-accordion-header-row",get children(){return[i(Q.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var l=Jt(),t=l.firstChild;return g(l,i(Mt,{class:"h-3.5 w-3.5 text-tertiary","aria-hidden":"true"}),t),g(t,()=>e.t(e.section.labelKey)),l})(),i(wt,{get class(){return`right-panel-accordion-chevron ${e.expanded?"right-panel-accordion-chevron-expanded":""}`}})]}}),i(ee,{openDelay:200,gutter:4,placement:"top",get children(){return[i(ee.Trigger,{as:"button",type:"button",class:"section-info-trigger",get"aria-label"(){return e.t(e.section.tooltipKey)},get children(){return i(St,{class:"section-info-icon"})}}),i(ee.Portal,{get children(){return i(ee.Content,{class:"section-info-tooltip",get children(){return e.t(e.section.tooltipKey)}})}})]}})]}}),i(Q.Content,{class:"right-panel-accordion-content",get children(){return e.section.render()}})]}})),pe(()=>De(c,`right-panel-section-draggable ${n.isActiveDraggable?"right-panel-section-draggable-active":""}`)),c})()},mn=e=>{const n=u=>e.expandedItems().includes(u),c=()=>{const u=e.activeSession();return u?(()=>{var a=tn(),p=a.firstChild,r=p.nextSibling;return g(p,()=>e.t("instanceShell.yoloMode.description")),g(r,i(It,{get checked(){return Tt(e.instanceId,u.id)},color:"warning",size:"small",get inputProps(){return{"aria-label":e.t("instanceShell.yoloMode.title")}},onChange:()=>Pt(e.instanceId,u.id)})),a})():(()=>{var a=ae(),p=a.firstChild;return g(p,()=>e.t("instanceShell.yoloMode.noSessionSelected")),a})()},l=()=>{const u=e.activeSessionId();if(!u||u==="info")return(()=>{var p=ae(),r=p.firstChild;return g(r,()=>e.t("instanceShell.plan.noSessionSelected")),p})();const a=e.latestTodoState();return a?i($t,{state:a,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var p=ae(),r=p.firstChild;return g(r,()=>e.t("instanceShell.plan.empty")),p})()},t=()=>{const u=e.backgroundProcessList();return u.length===0?(()=>{var a=ae(),p=a.firstChild;return g(p,()=>e.t("instanceShell.backgroundProcesses.empty")),a})():(()=>{var a=nn();return g(a,i(xe,{each:u,children:p=>(()=>{var r=sn(),v=r.firstChild,f=v.firstChild,C=f.nextSibling,h=C.firstChild,S=h.nextSibling,T=v.nextSibling,E=T.firstChild,M=E.nextSibling,A=M.nextSibling;return g(f,()=>p.title),g(h,i(Dt,{class:"h-3.5 w-3.5"})),g(S,()=>e.t("instanceShell.backgroundProcesses.status",{status:p.status})),g(C,i(K,{get when(){return typeof p.outputSizeBytes=="number"},get children(){var b=on();return g(b,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((p.outputSizeBytes??0)/1024)})),b}}),null),E.$$click=()=>e.onOpenBackgroundOutput(p),g(E,i(Ut,{class:"h-4 w-4"})),M.$$click=()=>e.onStopBackgroundProcess(p.id),g(M,i(Rt,{class:"h-4 w-4"})),A.$$click=()=>e.onTerminateBackgroundProcess(p.id),g(A,i(kt,{class:"h-4 w-4"})),pe(b=>{var R=!!p.notifyEnabled,I=!p.notifyEnabled,_=e.t(p.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),w=e.t(p.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),P=e.t("instanceShell.backgroundProcesses.actions.output"),D=e.t("instanceShell.backgroundProcesses.actions.output"),y=p.status!=="running",U=e.t("instanceShell.backgroundProcesses.actions.stop"),L=e.t("instanceShell.backgroundProcesses.actions.stop"),se=e.t("instanceShell.backgroundProcesses.actions.terminate"),re=e.t("instanceShell.backgroundProcesses.actions.terminate");return R!==b.e&&h.classList.toggle("text-success",b.e=R),I!==b.t&&h.classList.toggle("text-tertiary",b.t=I),_!==b.a&&B(h,"aria-label",b.a=_),w!==b.o&&B(h,"title",b.o=w),P!==b.i&&B(E,"aria-label",b.i=P),D!==b.n&&B(E,"title",b.n=D),y!==b.s&&(M.disabled=b.s=y),U!==b.h&&B(M,"aria-label",b.h=U),L!==b.r&&B(M,"title",b.r=L),se!==b.d&&B(A,"aria-label",b.d=se),re!==b.l&&B(A,"title",b.l=re),b},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0,h:void 0,r:void 0,d:void 0,l:void 0}),r})()})),a})()},o=()=>{const u=e.activeSession();return u?(()=>{var a=an();return g(a,i(Zt,{get providerId(){return u.model.providerId},get modelId(){return u.model.modelId}})),a})():(()=>{var a=rn();return g(a,()=>e.t("providerUsage.noSession")),a})()},s=k(()=>[...ht({renderYoloModeSection:c,renderProviderUsage:o,renderPlanSectionContent:l,renderBackgroundProcesses:t,renderMcpStatus:()=>i(be,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"}),renderLspStatus:()=>i(be,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"}),renderPluginStatus:()=>i(be,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}).statusSections??[],...e.extraSections??[]]),d=k(()=>mt(s(),e.customization().statusSectionOrder,e.customization().hiddenStatusSectionIds)),x=(u,a)=>{if(!u||u===a)return;const p=d().map(h=>h.id),r=p.indexOf(u),v=p.indexOf(a);if(r===-1||v===-1)return;const f=[...p],[C]=f.splice(r,1);f.splice(v,0,C),e.onCustomizationChange(h=>({...h,statusSectionOrder:f}))},m=({draggable:u,droppable:a})=>{a&&x(String(u.id),String(a.id))};return(()=>{var u=ln();return g(u,i(K,{get when(){return e.activeSession()},children:a=>i(zt,{get instanceId(){return e.instanceId},get sessionId(){return a().id},class:"status-tab-context-panel"})}),null),g(u,i(Q.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return i(vt,{collisionDetector:bt,onDragEnd:m,get children(){return i(yt,{get children(){return i(xt,{get ids(){return d().map(a=>a.id)},get children(){return i(xe,{get each(){return d()},children:a=>i(cn,{section:a,get expanded(){return n(a.id)},get t(){return e.t}})})}})}})}})}}),null),u})()};et(["click"]);export{mn as default};
@@ -1 +1 @@
1
- import{I as n}from"./main-DxKSa1-Y.js";import{n as o,m as y}from"./git-diff-vendor-CYS3ApzA.js";const i=[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["line",{x1:"3",x2:"21",y1:"12",y2:"12",key:"10d38w"}],["line",{x1:"3",x2:"21",y1:"18",y2:"18",key:"kwyyxn"}]],t=e=>o(n,y(e,{name:"AlignJustify",iconNode:i}));export{t as A};
1
+ import{I as n}from"./main-C_vh9cYf.js";import{n as o,m as y}from"./git-diff-vendor-CYS3ApzA.js";const i=[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["line",{x1:"3",x2:"21",y1:"12",y2:"12",key:"10d38w"}],["line",{x1:"3",x2:"21",y1:"18",y2:"18",key:"kwyyxn"}]],t=e=>o(n,y(e,{name:"AlignJustify",iconNode:i}));export{t as A};
@@ -1 +1 @@
1
- import{as as _,t as b,i as x,u as k,m as V,k as B}from"./monaco-viewer-BSlOM5Le.js";import{c as L,b as D,n as p,a as F,S as T,E as z,D as G,C as $,G as U}from"./git-diff-vendor-CYS3ApzA.js";import{aD as N,aE as K}from"./main-DxKSa1-Y.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-BSA3SyyP.js";var q=b("<div>"),O=b("<div class=tool-call-diff-viewer>"),P=b("<pre class=tool-call-diff-fallback>");const j=B("session");U();function I(e,s,o){const a=window.getComputedStyle(o),i=document.createElement("span");i.textContent=s||"",i.style.position="absolute",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.display="inline-block",i.style.width="auto",i.style.maxWidth="none",i.style.whiteSpace="nowrap",i.style.fontFamily=a.fontFamily,i.style.fontSize=a.fontSize,i.style.fontWeight=a.fontWeight,i.style.fontStyle=a.fontStyle,i.style.letterSpacing=a.letterSpacing,i.style.fontVariant=a.fontVariant,i.style.textTransform=a.textTransform,i.style.lineHeight=a.lineHeight,e.appendChild(i);const f=Math.ceil(i.getBoundingClientRect().width);return i.remove(),f}function M(e,s,o=40){const a=s.reduce((l,n)=>Math.max(l,I(e,n.text,n.source)),0),i=s.reduce((l,n)=>Math.max(l,n.text.length),1),f=Math.round(i*7+4);return Math.max(2,Math.min(o,a>0?a+2:f))}function J(e,s){const o=e.querySelector(".unified-diff-table-wrapper"),a=e.querySelector(".unified-diff-table"),i=e.querySelector(".unified-diff-table-num-col"),f=e.querySelectorAll(".diff-line-num"),l=e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper"),n=[];a&&(s?(a.classList.add("table-fixed"),a.style.tableLayout="fixed",a.style.width="100%",a.style.minWidth="100%"):(a.classList.remove("table-fixed"),a.style.tableLayout="auto",a.style.width="max-content",a.style.minWidth="100%")),f.forEach(r=>{var v,E;const c=r.querySelector("[data-line-old-num]"),m=r.querySelector("[data-line-new-num]"),W=r.querySelector(".shrink-0"),S=r.querySelector(":scope > .flex"),C=r.querySelector(":scope > .tool-call-diff-compact-line-number"),y=((v=c==null?void 0:c.textContent)==null?void 0:v.trim())??"",w=((E=m==null?void 0:m.textContent)==null?void 0:E.trim())??"",H=w.length>0&&w!=="0",R=y.length>0&&y!=="0",g=H?w:R?y:w||y;S&&(S.style.display="none"),W&&(W.style.display="none"),c&&(c.style.display="none",c.style.width="auto"),m&&(m.style.display="none",m.style.width="auto"),r.style.paddingLeft="1px",r.style.paddingRight="1px",r.style.textAlign="left";const u=C??document.createElement("span");u.className="tool-call-diff-compact-line-number",u.textContent=g,u.setAttribute("aria-hidden",g?"false":"true"),C||r.appendChild(u),n.push({gutter:r,label:u,text:g})});const t=M(e,n.map(r=>({text:r.text,source:r.label}))),d=`${t}px`,h=`${Math.max(8,t-10)}px`;o&&(o.style.setProperty("--diff-aside-width",h),o.style.setProperty("--diff-aside-width--",h)),i&&(i.style.width=d),n.forEach(({gutter:r,label:c})=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,c.style.width="auto",c.style.maxWidth="none"}),l.forEach(r=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,r.style.paddingLeft="0",r.style.paddingRight="0"})}function Q(e){const s=e.querySelector(".old-diff-table-wrapper"),o=e.querySelector(".new-diff-table-wrapper"),a=Array.from(e.querySelectorAll(".diff-line-old-num, .diff-line-new-num")),i=Array.from(e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper")),f=a.map(t=>({cell:t,span:t.querySelector("[data-line-num]")})).filter(t=>!!t.span),n=`${M(e,f.map(({span:t})=>{var d;return{text:((d=t.textContent)==null?void 0:d.trim())??"",source:t}}),64)}px`;[s,o].forEach(t=>{t&&t.style.setProperty("--diff-aside-width",n)}),a.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="2px",t.style.paddingRight="2px",t.style.textAlign="left",t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),f.forEach(({span:t})=>{t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),i.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="0",t.style.paddingRight="0"})}function A(e,s,o=!1){if(s==="unified"){J(e,o);return}s==="split"&&Q(e)}function ne(e){const s=L(()=>{const f=_(e.diffText);if(!f)return null;const l=N(e.filePath)||"text",n=e.filePath||"diff";return{oldFile:{fileName:n,fileLang:l},newFile:{fileName:n,fileLang:l},hunks:[f]}});let o,a;const i=L(()=>s()?`${e.theme}|${e.mode}|${e.wrap?"wrap":"nowrap"}|${e.diffText}`:"");return D(()=>{var n;if(e.cachedHtml){o&&A(o,e.mode,!!e.wrap),(n=e.onRendered)==null||n.call(e);return}const l=i();l&&o&&a!==l&&requestAnimationFrame(()=>{var d;if(!o)return;A(o,e.mode,!!e.wrap);const t=o.innerHTML;t&&(a=l,e.cacheEntryParams&&K(e.cacheEntryParams,{text:e.diffText,html:t,theme:e.theme,mode:e.mode,wrap:e.wrap}),(d=e.onRendered)==null||d.call(e))})}),(()=>{var f=O();return x(f,p(T,{get when(){return e.cachedHtml},get fallback(){return(()=>{var l=q(),n=o;return typeof n=="function"?k(n,l):o=l,x(l,p(T,{get when(){return s()},get fallback(){return(()=>{var t=P();return x(t,()=>e.diffText),t})()},children:t=>p(z,{fallback:d=>(j.warn("Failed to render diff view",d),(()=>{var h=P();return x(h,()=>e.diffText),h})()),get children(){return p(G,{get data(){return t()},get diffViewMode(){return V(()=>e.mode==="split")()?$.Split:$.Unified},get diffViewTheme(){return e.theme},diffViewHighlight:!0,get diffViewWrap(){return!!e.wrap},diffViewFontSize:13})}})})),l})()},get children(){var l=q(),n=o;return typeof n=="function"?k(n,l):o=l,F(()=>l.innerHTML=e.cachedHtml),l}})),f})()}export{ne as ToolCallDiffViewer};
1
+ import{as as _,t as b,i as x,u as k,m as V,k as B}from"./monaco-viewer-BSlOM5Le.js";import{c as L,b as D,n as p,a as F,S as T,E as z,D as G,C as $,G as U}from"./git-diff-vendor-CYS3ApzA.js";import{aD as N,aE as K}from"./main-C_vh9cYf.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-BSA3SyyP.js";var q=b("<div>"),O=b("<div class=tool-call-diff-viewer>"),P=b("<pre class=tool-call-diff-fallback>");const j=B("session");U();function I(e,s,o){const a=window.getComputedStyle(o),i=document.createElement("span");i.textContent=s||"",i.style.position="absolute",i.style.visibility="hidden",i.style.pointerEvents="none",i.style.display="inline-block",i.style.width="auto",i.style.maxWidth="none",i.style.whiteSpace="nowrap",i.style.fontFamily=a.fontFamily,i.style.fontSize=a.fontSize,i.style.fontWeight=a.fontWeight,i.style.fontStyle=a.fontStyle,i.style.letterSpacing=a.letterSpacing,i.style.fontVariant=a.fontVariant,i.style.textTransform=a.textTransform,i.style.lineHeight=a.lineHeight,e.appendChild(i);const f=Math.ceil(i.getBoundingClientRect().width);return i.remove(),f}function M(e,s,o=40){const a=s.reduce((l,n)=>Math.max(l,I(e,n.text,n.source)),0),i=s.reduce((l,n)=>Math.max(l,n.text.length),1),f=Math.round(i*7+4);return Math.max(2,Math.min(o,a>0?a+2:f))}function J(e,s){const o=e.querySelector(".unified-diff-table-wrapper"),a=e.querySelector(".unified-diff-table"),i=e.querySelector(".unified-diff-table-num-col"),f=e.querySelectorAll(".diff-line-num"),l=e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper"),n=[];a&&(s?(a.classList.add("table-fixed"),a.style.tableLayout="fixed",a.style.width="100%",a.style.minWidth="100%"):(a.classList.remove("table-fixed"),a.style.tableLayout="auto",a.style.width="max-content",a.style.minWidth="100%")),f.forEach(r=>{var v,E;const c=r.querySelector("[data-line-old-num]"),m=r.querySelector("[data-line-new-num]"),W=r.querySelector(".shrink-0"),S=r.querySelector(":scope > .flex"),C=r.querySelector(":scope > .tool-call-diff-compact-line-number"),y=((v=c==null?void 0:c.textContent)==null?void 0:v.trim())??"",w=((E=m==null?void 0:m.textContent)==null?void 0:E.trim())??"",H=w.length>0&&w!=="0",R=y.length>0&&y!=="0",g=H?w:R?y:w||y;S&&(S.style.display="none"),W&&(W.style.display="none"),c&&(c.style.display="none",c.style.width="auto"),m&&(m.style.display="none",m.style.width="auto"),r.style.paddingLeft="1px",r.style.paddingRight="1px",r.style.textAlign="left";const u=C??document.createElement("span");u.className="tool-call-diff-compact-line-number",u.textContent=g,u.setAttribute("aria-hidden",g?"false":"true"),C||r.appendChild(u),n.push({gutter:r,label:u,text:g})});const t=M(e,n.map(r=>({text:r.text,source:r.label}))),d=`${t}px`,h=`${Math.max(8,t-10)}px`;o&&(o.style.setProperty("--diff-aside-width",h),o.style.setProperty("--diff-aside-width--",h)),i&&(i.style.width=d),n.forEach(({gutter:r,label:c})=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,c.style.width="auto",c.style.maxWidth="none"}),l.forEach(r=>{r.style.width=d,r.style.minWidth=d,r.style.maxWidth=d,r.style.paddingLeft="0",r.style.paddingRight="0"})}function Q(e){const s=e.querySelector(".old-diff-table-wrapper"),o=e.querySelector(".new-diff-table-wrapper"),a=Array.from(e.querySelectorAll(".diff-line-old-num, .diff-line-new-num")),i=Array.from(e.querySelectorAll(".diff-line-hunk-action, .diff-line-widget-wrapper, .diff-line-extend-wrapper")),f=a.map(t=>({cell:t,span:t.querySelector("[data-line-num]")})).filter(t=>!!t.span),n=`${M(e,f.map(({span:t})=>{var d;return{text:((d=t.textContent)==null?void 0:d.trim())??"",source:t}}),64)}px`;[s,o].forEach(t=>{t&&t.style.setProperty("--diff-aside-width",n)}),a.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="2px",t.style.paddingRight="2px",t.style.textAlign="left",t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),f.forEach(({span:t})=>{t.style.whiteSpace="nowrap",t.style.overflowWrap="normal",t.style.wordBreak="normal"}),i.forEach(t=>{t.style.width=n,t.style.minWidth=n,t.style.maxWidth=n,t.style.paddingLeft="0",t.style.paddingRight="0"})}function A(e,s,o=!1){if(s==="unified"){J(e,o);return}s==="split"&&Q(e)}function ne(e){const s=L(()=>{const f=_(e.diffText);if(!f)return null;const l=N(e.filePath)||"text",n=e.filePath||"diff";return{oldFile:{fileName:n,fileLang:l},newFile:{fileName:n,fileLang:l},hunks:[f]}});let o,a;const i=L(()=>s()?`${e.theme}|${e.mode}|${e.wrap?"wrap":"nowrap"}|${e.diffText}`:"");return D(()=>{var n;if(e.cachedHtml){o&&A(o,e.mode,!!e.wrap),(n=e.onRendered)==null||n.call(e);return}const l=i();l&&o&&a!==l&&requestAnimationFrame(()=>{var d;if(!o)return;A(o,e.mode,!!e.wrap);const t=o.innerHTML;t&&(a=l,e.cacheEntryParams&&K(e.cacheEntryParams,{text:e.diffText,html:t,theme:e.theme,mode:e.mode,wrap:e.wrap}),(d=e.onRendered)==null||d.call(e))})}),(()=>{var f=O();return x(f,p(T,{get when(){return e.cachedHtml},get fallback(){return(()=>{var l=q(),n=o;return typeof n=="function"?k(n,l):o=l,x(l,p(T,{get when(){return s()},get fallback(){return(()=>{var t=P();return x(t,()=>e.diffText),t})()},children:t=>p(z,{fallback:d=>(j.warn("Failed to render diff view",d),(()=>{var h=P();return x(h,()=>e.diffText),h})()),get children(){return p(G,{get data(){return t()},get diffViewMode(){return V(()=>e.mode==="split")()?$.Split:$.Unified},get diffViewTheme(){return e.theme},diffViewHighlight:!0,get diffViewWrap(){return!!e.wrap},diffViewFontSize:13})}})})),l})()},get children(){var l=q(),n=o;return typeof n=="function"?k(n,l):o=l,F(()=>l.innerHTML=e.cachedHtml),l}})),f})()}export{ne as ToolCallDiffViewer};