@neuralnomads/codenomad-dev 0.19.0-dev-20260819-719dccf0 → 0.19.0-dev-20260827-14586cb3
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 +1 -1
- package/public/assets/{FilesTab-BIjmldaR.js → FilesTab-n9w8AZ0r.js} +1 -1
- package/public/assets/{GitChangesTab-D_NRGNhn.js → GitChangesTab-LGePkXA7.js} +1 -1
- package/public/assets/{SplitFilePanel-C_Bcle0r.js → SplitFilePanel-De3dOmQ0.js} +1 -1
- package/public/assets/{StatusTab-Dgl1u9NZ.js → StatusTab-CKS4wjbz.js} +1 -1
- package/public/assets/{align-justify-B0Rx-B0X.js → align-justify-DtnLX79D.js} +1 -1
- package/public/assets/{diff-viewer-MrTRKTQS.js → diff-viewer-4JNE-Upi.js} +1 -1
- package/public/assets/{index-Dqg2UVvS.js → index-B4WKXHw1.js} +1 -1
- package/public/assets/{index-BHlYVddm.js → index-BCgrqQTT.js} +1 -1
- package/public/assets/index-BbVHiicu.js +1 -0
- package/public/assets/{index-C0caoeJg.js → index-Bo3qYvKZ.js} +1 -1
- package/public/assets/{index-yEcajWX_.js → index-CHIYwJhC.js} +1 -1
- package/public/assets/{index-wEqeBwqT.js → index-Ch8PlYMe.js} +1 -1
- package/public/assets/{index-it6EGJV6.js → index-Cl2vAK1x.js} +1 -1
- package/public/assets/{index-Best16ZB.js → index-DzWXCPie.js} +2 -2
- package/public/assets/{index-Boq37ErX.js → index-RMD6cFHn.js} +1 -1
- package/public/assets/{index-ppe6yWaU.js → index-dzQ1t-Eh.js} +1 -1
- package/public/assets/{loading-CbUWFqQ_.js → loading-Ad5r1aAx.js} +1 -1
- package/public/assets/{main-CH1BlYsd.js → main-DeyDNsRN.js} +7 -7
- package/public/assets/{markdown-D8ZIHn0t.js → markdown-CmlcN8P7.js} +1 -1
- package/public/assets/{terminal-square-BUI6BEmg.js → terminal-square-Xk9nk6Ob.js} +1 -1
- package/public/assets/{tool-call-CG8Ji4Dt.js → tool-call-C_pV7qf1.js} +3 -3
- package/public/assets/{unified-picker-CvJXD-j8.js → unified-picker-q2KAByTO.js} +1 -1
- package/public/assets/{wrap-text-Bk9Xqwls.js → wrap-text-Dx_zrh8v.js} +1 -1
- package/public/index.html +2 -2
- package/public/loading.html +2 -2
- package/public/sw.js +1 -1
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-NKl8kwH2.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{a9 as Y,m as $,t as u,i as o,d as v,a as W,u as Z,_ as ee,f as te}from"./monaco-viewer-NKl8kwH2.js";import{d as j,b as F,c as C,n as s,S as w,a as g,z as ne,A as le,F as ae}from"./git-diff-vendor-CYS3ApzA.js";import{S as re}from"./SplitFilePanel-C_Bcle0r.js";import{R,ay as ie,M as se,az as oe,A as ce,C as q,aA as K,aB as V,aC as de,e as he,aD as N,aE as ue}from"./main-CH1BlYsd.js";import{W as fe}from"./wrap-text-Bk9Xqwls.js";import{T as ve}from"./terminal-square-BUI6BEmg.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-Best16ZB.js";var we=u('<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>'),ge=u("<div class=file-list-header><span class=file-list-title></span><span class=file-list-count>"),Q=u('<div class="p-3 text-xs text-secondary">'),Se=u("<div class=file-list-item><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text>.."),me=u('<div class="p-3 text-xs text-error">'),be=u("<div>"),$e=u('<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">'),ye=u("<button type=button class=git-change-row-action>"),M=u("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),_e=u('<div class="file-viewer-panel flex-1"><div>'),ke=u('<div class="h-full outline-none"tabindex=0>'),xe=u("<span>"),Ce=u("<div class=files-tab-stats><span class=files-tab-stat><span class=files-tab-selected-path><span class=file-path-text>"),Pe=u("<button type=button style=margin-inline-start:auto>"),Ee=u("<button type=button>"),B=u("<button type=button class=files-header-icon-button>"),Le=u("<span class=text-error>");const We=le(()=>ee(()=>import("./monaco-viewer-NKl8kwH2.js").then(e=>e.ax),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer}))),H=typeof navigator<"u"&&/windows/i.test(navigator.userAgent),Me=typeof navigator<"u"&&/macintosh|mac os x/i.test(navigator.userAgent),De=new Set(["7z","avi","bmp","c","cc","cfg","conf","cpp","cs","css","csv","dart","diff","docx","env","flac","fs","fsx","gif","go","gz","h","hpp","htm","html","ini","java","jpeg","jpg","json","jsonc","jsx","kt","kts","less","lock","log","lua","md","markdown","mkv","mov","mp3","mp4","ogg","patch","pdf","png","pptx","r","rar","rmd","rs","scss","sql","svg","svelte","swift","tar","toml","ts","tsx","txt","vue","wav","webm","webp","xlsx","xml","yaml","yml","zip"]),Fe=new Set(["bat","cmd","js","jse","pl","ps1","psd1","psm1","py","pyw","rb","reg","vbe","vbs","wsf","wsh"]);function Te(e){const y=e.split(/[\\/]/).pop()??"",_=y.lastIndexOf("."),m=_>0?y.slice(_+1).toLowerCase():"";return!H||m&&De.has(m)?"open":m&&Fe.has(m)?"edit":"choose"}function Ae(e){return e?/\.(md|markdown|mdown|mkdn)$/i.test(e):!1}const Be=e=>{const[y,_]=j(""),{isDark:m}=Y(),[p,T]=j(!1);let S;F(()=>{e.browserPath(),_("")});const G=C(()=>[...e.browserEntries()||[]].sort((r,c)=>{const l=r.type==="directory"?0:1,n=c.type==="directory"?0:1;return l!==n?l-n:String(r.name||"").localeCompare(String(c.name||""))})),A=C(()=>y().trim().toLowerCase()),D=C(()=>{const t=A(),r=G();return t?r.filter(c=>String(c.name||"").toLowerCase().includes(t)):r}),P=()=>e.browserLoading()&&e.browserEntries()===null,J=()=>A()?e.t("instanceShell.filesShell.search.empty"):e.t("instanceShell.filesShell.listEmpty"),E=C(()=>Ae(e.browserSelectedPath())),b=C(()=>E()&&p());F(()=>{E()||T(!1)});const z=()=>{const t=e.browserSelectedContent();t!=null&&e.onSave(t)},I=async(t,r)=>{r==null||r.stopPropagation();const c=await he(t);N({message:c?e.t("instanceShell.filesShell.toast.copyPathSuccess"):e.t("instanceShell.filesShell.toast.copyPathError"),variant:c?"success":"error"})},L=async(t,r)=>{try{await ue({target:t,instanceId:e.instanceId,worktreeSlug:e.worktreeSlug(),path:r})}catch(c){N({message:e.t("instanceShell.filesShell.toast.openError",{message:c instanceof Error?c.message:String(c)}),variant:"error"})}},U=t=>{const r=[];if(K())if(t.type==="directory"){const c=Me&&t.path.toLowerCase().endsWith(".app");r.push({key:"open-folder",label:e.t(c?"instanceShell.filesShell.actions.showInFolder":"instanceShell.filesShell.actions.openFolder"),icon:s(V,{class:"w-3.5 h-3.5"}),onSelect:()=>L(c?"reveal":"default",t.path)},{key:"open-terminal",label:e.t("instanceShell.filesShell.actions.openTerminal"),icon:s(ve,{class:"w-3.5 h-3.5"}),onSelect:()=>L("terminal",t.path)})}else H&&r.push({key:"open-default",label:e.t({open:"instanceShell.filesShell.actions.openDefault",edit:"instanceShell.filesShell.actions.editDefault",choose:"instanceShell.filesShell.actions.chooseApplication"}[Te(t.path)]),icon:s(de,{class:"w-3.5 h-3.5"}),onSelect:()=>L("default",t.path)}),r.push({key:"show-in-folder",label:e.t("instanceShell.filesShell.actions.showInFolder"),icon:s(V,{class:"w-3.5 h-3.5"}),onSelect:()=>L("reveal",t.path)});return r.push({key:"copy-path",label:e.t("instanceShell.filesShell.actions.copyPath"),icon:s(q,{class:"w-3.5 h-3.5"}),onSelect:()=>I(t.path)}),r};F(()=>{b()&&requestAnimationFrame(()=>S==null?void 0:S.focus())});const O=()=>[(()=>{var t=we(),r=t.firstChild,c=r.firstChild,l=c.nextSibling;return o(c,s(oe,{class:"w-4 h-4"})),l.$$input=n=>_(n.currentTarget.value),g(n=>{var i=e.t("instanceShell.filesShell.search.placeholder"),a=e.t("instanceShell.filesShell.search.ariaLabel");return i!==n.e&&v(l,"placeholder",n.e=i),a!==n.t&&v(l,"aria-label",n.t=a),n},{e:void 0,t:void 0}),g(()=>l.value=y()),t})(),(()=>{var t=ge(),r=t.firstChild,c=r.nextSibling;return o(r,()=>e.t("instanceShell.filesShell.fileListTitle")),o(c,()=>D().length),t})(),s(w,{get when(){return e.parentPath()},children:t=>(()=>{var r=Se(),c=r.firstChild,l=c.firstChild;return r.$$click=()=>e.onLoadEntries(t()),g(()=>v(l,"title",t())),r})()}),s(w,{get when(){return P()},get children(){var t=Q();return o(t,()=>e.t("instanceInfo.loading")),t}}),s(w,{get when(){return $(()=>!e.browserError()&&!P())()&&D().length>0},get fallback(){return $(()=>!P())()?$(()=>!!e.browserError())()?(()=>{var t=me();return o(t,()=>e.browserError()),t})():(()=>{var t=Q();return o(t,J),t})():void 0},get children(){return s(ae,{get each(){return D()},children:t=>(()=>{var r=$e(),c=r.firstChild,l=c.firstChild,n=l.firstChild,i=l.nextSibling,a=i.firstChild,h=a.firstChild;return r.$$click=()=>{if(t.type==="directory"){e.onLoadEntries(t.path);return}e.onRequestOpenFile(t.path)},o(n,()=>t.name),o(h,()=>t.type),o(i,s(w,{get when(){return K()},get fallback(){return(()=>{var d=ye();return d.$$click=f=>void I(t.path,f),o(d,s(q,{class:"w-3 h-3"})),g(f=>{var k=e.t("instanceShell.filesShell.actions.copyPath"),x=e.t("instanceShell.filesShell.actions.copyPath");return k!==f.e&&v(d,"title",f.e=k),x!==f.t&&v(d,"aria-label",f.t=x),f},{e:void 0,t:void 0}),d})()},get children(){var d=be();return d.$$pointerdown=f=>f.stopPropagation(),d.$$click=f=>f.stopPropagation(),o(d,s(ce,{get items(){return U(t)},get label(){return e.t("instanceShell.filesShell.actions.more",{name:t.name})},triggerClass:"git-change-row-action file-row-action-menu"})),d}}),null),g(d=>{var f=`file-list-item ${e.browserSelectedPath()===t.path?"file-list-item-active":""}`,k=t.path,x=t.path;return f!==d.e&&W(r,d.e=f),k!==d.t&&v(r,"title",d.t=k),x!==d.a&&v(l,"title",d.a=x),d},{e:void 0,t:void 0,a:void 0}),r})()})}})],X=t=>{!(t.ctrlKey||t.metaKey)||t.key.toLowerCase()!=="s"||e.browserSelectedSaving()||!e.browserSelectedDirty()||(t.preventDefault(),z())};return $(()=>{const t=()=>e.browserSelectedPath()||e.browserPath(),r=()=>P()?e.t("instanceInfo.loading"):e.t("instanceShell.filesShell.viewerEmpty"),c=()=>(()=>{var l=_e(),n=l.firstChild;return o(n,s(w,{get when(){return e.browserSelectedLoading()},get fallback(){return s(w,{get when(){return e.browserSelectedError()},get fallback(){return s(w,{get when(){return $(()=>!!(e.browserSelectedPath()&&e.browserSelectedContent()!==null))()?{path:e.browserSelectedPath(),content:e.browserSelectedContent()}:null},get fallback(){return(()=>{var i=M(),a=i.firstChild;return o(a,r),i})()},children:i=>s(w,{get when(){return b()},get fallback(){return s(ne,{get fallback(){return(()=>{var a=M(),h=a.firstChild;return o(h,()=>e.t("instanceInfo.loading")),a})()},get children(){return s(We,{get scopeKey(){return e.scopeKey()},get path(){return i().path},get content(){return i().content},get wordWrap(){return e.wordWrapMode()},get onSave(){return e.onSave},get onContentChange(){return e.onContentChange}})}})},get children(){var a=ke();a.$$mousedown=()=>S==null?void 0:S.focus(),a.$$keydown=X;var h=S;return typeof h=="function"?Z(h,a):S=a,o(a,s(se,{get part(){return{type:"text",text:i().content}},get isDark(){return m()},escapeRawHtml:!0})),a}})})},children:i=>(()=>{var a=M(),h=a.firstChild;return o(h,i),a})()})},get children(){var i=M(),a=i.firstChild;return o(a,()=>e.t("instanceInfo.loading")),i}})),g(()=>W(n,b()?"file-viewer-content":"file-viewer-content file-viewer-content--monaco")),l})();return s(re,{get header(){return[(()=>{var l=Ce(),n=l.firstChild,i=n.firstChild,a=i.firstChild;return o(a,t),o(l,s(w,{get when(){return e.browserLoading()},get children(){var h=xe();return o(h,()=>e.t("instanceInfo.loading")),h}}),null),o(l,s(w,{get when(){return e.browserError()},children:h=>(()=>{var d=Le();return o(d,h),d})()}),null),g(()=>v(i,"title",t())),l})(),(()=>{var l=Pe();return l.$$click=()=>E()&&T(n=>!n),o(l,(()=>{var n=$(()=>!!b());return()=>n()?e.t("instanceShell.filesShell.showSource"):e.t("instanceShell.filesShell.previewMarkdown")})()),g(n=>{var i=`file-viewer-toolbar-button${b()?" active":""}`,a=!E();return i!==n.e&&W(l,n.e=i),a!==n.t&&(l.disabled=n.t=a),n},{e:void 0,t:void 0}),l})(),(()=>{var l=Ee();return l.$$click=()=>e.onWordWrapModeChange(e.wordWrapMode()==="on"?"off":"on"),o(l,s(fe,{class:"h-4 w-4"})),g(n=>{var i=`file-viewer-toolbar-icon-button${e.wordWrapMode()==="on"?" active":""}`,a=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),h=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),d=b();return i!==n.e&&W(l,n.e=i),a!==n.t&&v(l,"title",n.t=a),h!==n.a&&v(l,"aria-label",n.a=h),d!==n.o&&(l.disabled=n.o=d),n},{e:void 0,t:void 0,a:void 0,o:void 0}),l})(),(()=>{var l=B();return l.$$click=z,o(l,s(w,{get when(){return e.browserSelectedSaving()},get fallback(){return s(ie,{class:"h-4 w-4"})},get children(){return s(R,{class:"h-4 w-4 animate-spin"})}})),g(n=>{var i=e.t("instanceShell.rightPanel.actions.save")||"Save (Ctrl+S)",a=e.t("instanceShell.rightPanel.actions.save")||"Save",h=e.browserSelectedSaving()||!e.browserSelectedDirty();return i!==n.e&&v(l,"title",n.e=i),a!==n.t&&v(l,"aria-label",n.t=a),h!==n.a&&(l.disabled=n.a=h),n},{e:void 0,t:void 0,a:void 0}),l})(),(()=>{var l=B();return l.$$click=()=>e.onRefresh(),o(l,s(R,{get class(){return`h-4 w-4${e.browserLoading()?" animate-spin":""}`}})),g(n=>{var i=e.t("instanceShell.rightPanel.actions.refresh"),a=e.t("instanceShell.rightPanel.actions.refresh"),h=e.browserLoading();return i!==n.e&&v(l,"title",n.e=i),a!==n.t&&v(l,"aria-label",n.t=a),h!==n.a&&(l.disabled=n.a=h),n},{e:void 0,t:void 0,a:void 0}),l})()]},list:{panel:()=>s(O,{}),overlay:()=>s(O,{})},get viewer(){return c()},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")}})})};te(["input","click","pointerdown","keydown","mousedown"]);export{Be as default};
|
|
2
|
+
import{a9 as Y,m as $,t as u,i as o,d as v,a as W,u as Z,_ as ee,f as te}from"./monaco-viewer-NKl8kwH2.js";import{d as j,b as F,c as C,n as s,S as w,a as g,z as ne,A as le,F as ae}from"./git-diff-vendor-CYS3ApzA.js";import{S as re}from"./SplitFilePanel-De3dOmQ0.js";import{R,ay as ie,M as se,az as oe,A as ce,C as q,aA as K,aB as V,aC as de,e as he,aD as N,aE as ue}from"./main-DeyDNsRN.js";import{W as fe}from"./wrap-text-Dx_zrh8v.js";import{T as ve}from"./terminal-square-Xk9nk6Ob.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-DzWXCPie.js";var we=u('<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>'),ge=u("<div class=file-list-header><span class=file-list-title></span><span class=file-list-count>"),Q=u('<div class="p-3 text-xs text-secondary">'),Se=u("<div class=file-list-item><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text>.."),me=u('<div class="p-3 text-xs text-error">'),be=u("<div>"),$e=u('<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">'),ye=u("<button type=button class=git-change-row-action>"),M=u("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),_e=u('<div class="file-viewer-panel flex-1"><div>'),ke=u('<div class="h-full outline-none"tabindex=0>'),xe=u("<span>"),Ce=u("<div class=files-tab-stats><span class=files-tab-stat><span class=files-tab-selected-path><span class=file-path-text>"),Pe=u("<button type=button style=margin-inline-start:auto>"),Ee=u("<button type=button>"),B=u("<button type=button class=files-header-icon-button>"),Le=u("<span class=text-error>");const We=le(()=>ee(()=>import("./monaco-viewer-NKl8kwH2.js").then(e=>e.ax),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer}))),H=typeof navigator<"u"&&/windows/i.test(navigator.userAgent),Me=typeof navigator<"u"&&/macintosh|mac os x/i.test(navigator.userAgent),De=new Set(["7z","avi","bmp","c","cc","cfg","conf","cpp","cs","css","csv","dart","diff","docx","env","flac","fs","fsx","gif","go","gz","h","hpp","htm","html","ini","java","jpeg","jpg","json","jsonc","jsx","kt","kts","less","lock","log","lua","md","markdown","mkv","mov","mp3","mp4","ogg","patch","pdf","png","pptx","r","rar","rmd","rs","scss","sql","svg","svelte","swift","tar","toml","ts","tsx","txt","vue","wav","webm","webp","xlsx","xml","yaml","yml","zip"]),Fe=new Set(["bat","cmd","js","jse","pl","ps1","psd1","psm1","py","pyw","rb","reg","vbe","vbs","wsf","wsh"]);function Te(e){const y=e.split(/[\\/]/).pop()??"",_=y.lastIndexOf("."),m=_>0?y.slice(_+1).toLowerCase():"";return!H||m&&De.has(m)?"open":m&&Fe.has(m)?"edit":"choose"}function Ae(e){return e?/\.(md|markdown|mdown|mkdn)$/i.test(e):!1}const Be=e=>{const[y,_]=j(""),{isDark:m}=Y(),[p,T]=j(!1);let S;F(()=>{e.browserPath(),_("")});const G=C(()=>[...e.browserEntries()||[]].sort((r,c)=>{const l=r.type==="directory"?0:1,n=c.type==="directory"?0:1;return l!==n?l-n:String(r.name||"").localeCompare(String(c.name||""))})),A=C(()=>y().trim().toLowerCase()),D=C(()=>{const t=A(),r=G();return t?r.filter(c=>String(c.name||"").toLowerCase().includes(t)):r}),P=()=>e.browserLoading()&&e.browserEntries()===null,J=()=>A()?e.t("instanceShell.filesShell.search.empty"):e.t("instanceShell.filesShell.listEmpty"),E=C(()=>Ae(e.browserSelectedPath())),b=C(()=>E()&&p());F(()=>{E()||T(!1)});const z=()=>{const t=e.browserSelectedContent();t!=null&&e.onSave(t)},I=async(t,r)=>{r==null||r.stopPropagation();const c=await he(t);N({message:c?e.t("instanceShell.filesShell.toast.copyPathSuccess"):e.t("instanceShell.filesShell.toast.copyPathError"),variant:c?"success":"error"})},L=async(t,r)=>{try{await ue({target:t,instanceId:e.instanceId,worktreeSlug:e.worktreeSlug(),path:r})}catch(c){N({message:e.t("instanceShell.filesShell.toast.openError",{message:c instanceof Error?c.message:String(c)}),variant:"error"})}},U=t=>{const r=[];if(K())if(t.type==="directory"){const c=Me&&t.path.toLowerCase().endsWith(".app");r.push({key:"open-folder",label:e.t(c?"instanceShell.filesShell.actions.showInFolder":"instanceShell.filesShell.actions.openFolder"),icon:s(V,{class:"w-3.5 h-3.5"}),onSelect:()=>L(c?"reveal":"default",t.path)},{key:"open-terminal",label:e.t("instanceShell.filesShell.actions.openTerminal"),icon:s(ve,{class:"w-3.5 h-3.5"}),onSelect:()=>L("terminal",t.path)})}else H&&r.push({key:"open-default",label:e.t({open:"instanceShell.filesShell.actions.openDefault",edit:"instanceShell.filesShell.actions.editDefault",choose:"instanceShell.filesShell.actions.chooseApplication"}[Te(t.path)]),icon:s(de,{class:"w-3.5 h-3.5"}),onSelect:()=>L("default",t.path)}),r.push({key:"show-in-folder",label:e.t("instanceShell.filesShell.actions.showInFolder"),icon:s(V,{class:"w-3.5 h-3.5"}),onSelect:()=>L("reveal",t.path)});return r.push({key:"copy-path",label:e.t("instanceShell.filesShell.actions.copyPath"),icon:s(q,{class:"w-3.5 h-3.5"}),onSelect:()=>I(t.path)}),r};F(()=>{b()&&requestAnimationFrame(()=>S==null?void 0:S.focus())});const O=()=>[(()=>{var t=we(),r=t.firstChild,c=r.firstChild,l=c.nextSibling;return o(c,s(oe,{class:"w-4 h-4"})),l.$$input=n=>_(n.currentTarget.value),g(n=>{var i=e.t("instanceShell.filesShell.search.placeholder"),a=e.t("instanceShell.filesShell.search.ariaLabel");return i!==n.e&&v(l,"placeholder",n.e=i),a!==n.t&&v(l,"aria-label",n.t=a),n},{e:void 0,t:void 0}),g(()=>l.value=y()),t})(),(()=>{var t=ge(),r=t.firstChild,c=r.nextSibling;return o(r,()=>e.t("instanceShell.filesShell.fileListTitle")),o(c,()=>D().length),t})(),s(w,{get when(){return e.parentPath()},children:t=>(()=>{var r=Se(),c=r.firstChild,l=c.firstChild;return r.$$click=()=>e.onLoadEntries(t()),g(()=>v(l,"title",t())),r})()}),s(w,{get when(){return P()},get children(){var t=Q();return o(t,()=>e.t("instanceInfo.loading")),t}}),s(w,{get when(){return $(()=>!e.browserError()&&!P())()&&D().length>0},get fallback(){return $(()=>!P())()?$(()=>!!e.browserError())()?(()=>{var t=me();return o(t,()=>e.browserError()),t})():(()=>{var t=Q();return o(t,J),t})():void 0},get children(){return s(ae,{get each(){return D()},children:t=>(()=>{var r=$e(),c=r.firstChild,l=c.firstChild,n=l.firstChild,i=l.nextSibling,a=i.firstChild,h=a.firstChild;return r.$$click=()=>{if(t.type==="directory"){e.onLoadEntries(t.path);return}e.onRequestOpenFile(t.path)},o(n,()=>t.name),o(h,()=>t.type),o(i,s(w,{get when(){return K()},get fallback(){return(()=>{var d=ye();return d.$$click=f=>void I(t.path,f),o(d,s(q,{class:"w-3 h-3"})),g(f=>{var k=e.t("instanceShell.filesShell.actions.copyPath"),x=e.t("instanceShell.filesShell.actions.copyPath");return k!==f.e&&v(d,"title",f.e=k),x!==f.t&&v(d,"aria-label",f.t=x),f},{e:void 0,t:void 0}),d})()},get children(){var d=be();return d.$$pointerdown=f=>f.stopPropagation(),d.$$click=f=>f.stopPropagation(),o(d,s(ce,{get items(){return U(t)},get label(){return e.t("instanceShell.filesShell.actions.more",{name:t.name})},triggerClass:"git-change-row-action file-row-action-menu"})),d}}),null),g(d=>{var f=`file-list-item ${e.browserSelectedPath()===t.path?"file-list-item-active":""}`,k=t.path,x=t.path;return f!==d.e&&W(r,d.e=f),k!==d.t&&v(r,"title",d.t=k),x!==d.a&&v(l,"title",d.a=x),d},{e:void 0,t:void 0,a:void 0}),r})()})}})],X=t=>{!(t.ctrlKey||t.metaKey)||t.key.toLowerCase()!=="s"||e.browserSelectedSaving()||!e.browserSelectedDirty()||(t.preventDefault(),z())};return $(()=>{const t=()=>e.browserSelectedPath()||e.browserPath(),r=()=>P()?e.t("instanceInfo.loading"):e.t("instanceShell.filesShell.viewerEmpty"),c=()=>(()=>{var l=_e(),n=l.firstChild;return o(n,s(w,{get when(){return e.browserSelectedLoading()},get fallback(){return s(w,{get when(){return e.browserSelectedError()},get fallback(){return s(w,{get when(){return $(()=>!!(e.browserSelectedPath()&&e.browserSelectedContent()!==null))()?{path:e.browserSelectedPath(),content:e.browserSelectedContent()}:null},get fallback(){return(()=>{var i=M(),a=i.firstChild;return o(a,r),i})()},children:i=>s(w,{get when(){return b()},get fallback(){return s(ne,{get fallback(){return(()=>{var a=M(),h=a.firstChild;return o(h,()=>e.t("instanceInfo.loading")),a})()},get children(){return s(We,{get scopeKey(){return e.scopeKey()},get path(){return i().path},get content(){return i().content},get wordWrap(){return e.wordWrapMode()},get onSave(){return e.onSave},get onContentChange(){return e.onContentChange}})}})},get children(){var a=ke();a.$$mousedown=()=>S==null?void 0:S.focus(),a.$$keydown=X;var h=S;return typeof h=="function"?Z(h,a):S=a,o(a,s(se,{get part(){return{type:"text",text:i().content}},get isDark(){return m()},escapeRawHtml:!0})),a}})})},children:i=>(()=>{var a=M(),h=a.firstChild;return o(h,i),a})()})},get children(){var i=M(),a=i.firstChild;return o(a,()=>e.t("instanceInfo.loading")),i}})),g(()=>W(n,b()?"file-viewer-content":"file-viewer-content file-viewer-content--monaco")),l})();return s(re,{get header(){return[(()=>{var l=Ce(),n=l.firstChild,i=n.firstChild,a=i.firstChild;return o(a,t),o(l,s(w,{get when(){return e.browserLoading()},get children(){var h=xe();return o(h,()=>e.t("instanceInfo.loading")),h}}),null),o(l,s(w,{get when(){return e.browserError()},children:h=>(()=>{var d=Le();return o(d,h),d})()}),null),g(()=>v(i,"title",t())),l})(),(()=>{var l=Pe();return l.$$click=()=>E()&&T(n=>!n),o(l,(()=>{var n=$(()=>!!b());return()=>n()?e.t("instanceShell.filesShell.showSource"):e.t("instanceShell.filesShell.previewMarkdown")})()),g(n=>{var i=`file-viewer-toolbar-button${b()?" active":""}`,a=!E();return i!==n.e&&W(l,n.e=i),a!==n.t&&(l.disabled=n.t=a),n},{e:void 0,t:void 0}),l})(),(()=>{var l=Ee();return l.$$click=()=>e.onWordWrapModeChange(e.wordWrapMode()==="on"?"off":"on"),o(l,s(fe,{class:"h-4 w-4"})),g(n=>{var i=`file-viewer-toolbar-icon-button${e.wordWrapMode()==="on"?" active":""}`,a=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),h=e.wordWrapMode()==="on"?e.t("instanceShell.filesShell.disableWordWrap"):e.t("instanceShell.filesShell.enableWordWrap"),d=b();return i!==n.e&&W(l,n.e=i),a!==n.t&&v(l,"title",n.t=a),h!==n.a&&v(l,"aria-label",n.a=h),d!==n.o&&(l.disabled=n.o=d),n},{e:void 0,t:void 0,a:void 0,o:void 0}),l})(),(()=>{var l=B();return l.$$click=z,o(l,s(w,{get when(){return e.browserSelectedSaving()},get fallback(){return s(ie,{class:"h-4 w-4"})},get children(){return s(R,{class:"h-4 w-4 animate-spin"})}})),g(n=>{var i=e.t("instanceShell.rightPanel.actions.save")||"Save (Ctrl+S)",a=e.t("instanceShell.rightPanel.actions.save")||"Save",h=e.browserSelectedSaving()||!e.browserSelectedDirty();return i!==n.e&&v(l,"title",n.e=i),a!==n.t&&v(l,"aria-label",n.t=a),h!==n.a&&(l.disabled=n.a=h),n},{e:void 0,t:void 0,a:void 0}),l})(),(()=>{var l=B();return l.$$click=()=>e.onRefresh(),o(l,s(R,{get class(){return`h-4 w-4${e.browserLoading()?" animate-spin":""}`}})),g(n=>{var i=e.t("instanceShell.rightPanel.actions.refresh"),a=e.t("instanceShell.rightPanel.actions.refresh"),h=e.browserLoading();return i!==n.e&&v(l,"title",n.e=i),a!==n.t&&v(l,"aria-label",n.t=a),h!==n.a&&(l.disabled=n.a=h),n},{e:void 0,t:void 0,a:void 0}),l})()]},list:{panel:()=>s(O,{}),overlay:()=>s(O,{})},get viewer(){return c()},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")}})})};te(["input","click","pointerdown","keydown","mousedown"]);export{Be as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-NKl8kwH2.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-NKl8kwH2.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-Best16ZB.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-CH1BlYsd.js";import{A as $e}from"./align-justify-B0Rx-B0X.js";import{W as Ce}from"./wrap-text-Bk9Xqwls.js";import{S as we}from"./SplitFilePanel-C_Bcle0r.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-NKl8kwH2.js").then(e=>e.ay),__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-NKl8kwH2.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-DzWXCPie.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-DeyDNsRN.js";import{A as $e}from"./align-justify-DtnLX79D.js";import{W as Ce}from"./wrap-text-Dx_zrh8v.js";import{S as we}from"./SplitFilePanel-De3dOmQ0.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-NKl8kwH2.js").then(e=>e.ay),__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{t as d,i as l,d as m,h as s,m as b,g as _,f as w}from"./monaco-viewer-NKl8kwH2.js";import{a as g,n as r,S as n}from"./git-diff-vendor-CYS3ApzA.js";import{u as S}from"./index-
|
|
1
|
+
import{t as d,i as l,d as m,h as s,m as b,g as _,f as w}from"./monaco-viewer-NKl8kwH2.js";import{a as g,n as r,S as n}from"./git-diff-vendor-CYS3ApzA.js";import{u as S}from"./index-DzWXCPie.js";var y=d("<div class=file-list-overlay role=dialog><div class=file-list-scroll>");const L=e=>(()=>{var t=y(),a=t.firstChild;return l(a,()=>e.children),g(()=>m(t,"aria-label",e.ariaLabel)),t})();var C=d('<div class=files-split><div class=file-list-panel><div class=file-list-scroll></div></div><div class=file-split-handle role=separator aria-orientation=vertical aria-label="Resize file list">'),x=d("<div class=files-tab-container><div class=files-tab-header><div class=files-tab-header-row><button type=button class=files-toggle-button></button></div></div><div class=files-tab-body>");const z=e=>{const{t}=S();return(()=>{var a=x(),c=a.firstChild,o=c.firstChild,u=o.firstChild,h=c.nextSibling;return s(u,"click",e.onToggleList,!0),l(u,(()=>{var i=b(()=>!!e.listOpen);return()=>i()?t("instanceShell.filesShell.hideFiles"):t("instanceShell.filesShell.showFiles")})()),l(o,()=>e.header,null),l(h,r(n,{get when(){return b(()=>!e.isPhoneLayout)()&&e.listOpen},get fallback(){return e.viewer},get children(){var i=C(),v=i.firstChild,$=v.firstChild,f=v.nextSibling;return l($,()=>e.list.panel()),s(f,"touchstart",e.onResizeTouchStart,!0),s(f,"mousedown",e.onResizeMouseDown,!0),l(i,()=>e.viewer,null),g(O=>_(i,"--files-pane-width",`${e.splitWidth}px`)),i}}),null),l(h,r(n,{get when(){return e.isPhoneLayout},get children(){return r(n,{get when(){return e.listOpen},get children(){return r(L,{get ariaLabel(){return e.overlayAriaLabel},get children(){return e.list.overlay()}})}})}}),null),a})()};w(["click","mousedown","touchstart"]);export{z as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{m as ce,P as Ye,O 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-NKl8kwH2.js";import{n as i,m as M,q as de,s as j,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 ye}from"./git-diff-vendor-CYS3ApzA.js";import{I as Ce,Q as Oe,T as W,U as Me,W as Ee,X as xe,Y as nt,Z as me,_ as le,$ as fe,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 ve,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-CH1BlYsd.js";import{u as Ae}from"./index-Best16ZB.js";import{T as _t}from"./terminal-square-BUI6BEmg.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const Dt=[["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"}]],Ot=e=>i(Ce,M(e,{name:"BellRing",iconNode:Dt})),Mt=[["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"}]],Et=e=>i(Ce,M(e,{name:"GripVertical",iconNode:Mt})),Ut=[["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"}]],At=e=>i(Ce,M(e,{name:"XOctagon",iconNode:Ut}));var Rt={};Se(Rt,{Arrow:()=>Oe,Content:()=>Fe,Portal:()=>Le,Root:()=>Ke,Tooltip:()=>ee,Trigger:()=>Be,useTooltipContext:()=>he});var Re=ue();function he(){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=he(),c=W({id:n.generateId("content")},e),[l,t]=j(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,M({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=he();return i(K,{get when(){return n.contentPresent()},get children(){return i(Ye,e)}})}function Ft(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={},Lt=0,G=!1,N,J,Y;function Ke(e){const n=`tooltip-${de()}`,c=`${++Lt}`,l=W({id:n,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,o]=j(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(N),N=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(N),N=void 0,window.clearTimeout(J),J=void 0,window.clearTimeout(Y),Y=void 0},O=()=>{S(),h(),!f.isOpen()&&!N&&!G?N=window.setTimeout(()=>{N=void 0,G=!0,E()},t.openDelay):f.isOpen()||E()},A=(y=!1)=>{!y&&t.openDelay&&t.openDelay>0&&!s&&!Y?O():E()},b=()=>{window.clearTimeout(N),N=void 0,G=!1},R=()=>{window.clearTimeout(s),s=void 0},I=y=>me(m(),y)||me(a(),y),_=y=>{const U=m(),L=a();if(!(!U||!L))return Ft(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=xe();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;me(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:fe(()=>l.id),registerContentId:le(x),isTargetOnTooltip:I,setTriggerRef:u,setContentRef:p};return i(Re.Provider,{value:D,get children(){return i(Ue,M({anchorRef:m,contentRef:a,onCurrentPlacementChange:v},o))}})}function Be(e){let n;const c=he(),[l,t]=j(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,xe(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(()=>{xe(n).removeEventListener("pointerup",x)}),i(ne,M({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}),Kt={};Se(Kt,{Collapsible:()=>Bt,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]=j(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,M({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]=j(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:fe(()=>t.id),registerContentId:le(s)};return i(He.Provider,{value:m,get children(){return i(ne,M({as:"div"},x,t))}})}function Pe(e){const n=oe(),[c,l]=j(e,["onClick"]);return i(it,M({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 Bt=Object.assign($e,{Content:ke,Trigger:Pe}),Q={};Se(Q,{Accordion:()=>Ht,Content:()=>ze,Header:()=>qe,Item:()=>We,Root:()=>Xe,Trigger:()=>Ge,useAccordionContext:()=>Te});var je=ue();function Ne(){const e=ge(je);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function ze(e){const n=Ne(),c=n.generateId("content"),l=W({id:c},e),[t,o]=j(l,["id","style"]);return V(()=>H(n.registerContentId(t.id))),i(ke,M({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,M({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]=j(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:fe(()=>o.id),registerTriggerId:le(d),registerContentId:le(m)};return i(je.Provider,{value:p,get children(){return i($e,M({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]=j(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:fe(()=>t.id)};return i(x,{get children(){return i(Ve.Provider,{value:a,get children(){return i(ne,M({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=Ne(),t=oe(),o=l.generateId("trigger"),s=W({id:o},e),[d,x]=j(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,M({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 Ht=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 Nt=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,O=S.nextSibling,A=O.firstChild,b=A.nextSibling,R=O.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 zt=$('<div><div class="mt-2 truncate text-right text-sm font-semibold text-secondary">'),be=$('<div class="text-xs text-tertiary">'),qt=$("<div class=space-y-2>"),Vt=$('<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>'),Wt=$('<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">'),Xt=$("<span class=text-tertiary aria-hidden=true>·"),Gt=$('<span class="truncate text-[10px] text-tertiary">');const Yt=6e4,Qt=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)},Yt);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=zt(),v=r.firstChild;return g(r,i(K,{get when(){return l()!==void 0},get fallback(){return(()=>{var f=be();return g(f,()=>n("providerUsage.loading")),f})()},get children(){return i(K,{get when(){return l()},get fallback(){return(()=>{var f=be();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=be();return g(C,()=>n(f().supported?f().configured?"providerUsage.unavailable":"providerUsage.notConfigured":"providerUsage.unsupported")),C})()},get children(){var C=qt();return g(C,i(ye,{get each(){return x()},children:([h,S])=>(()=>{var T=Wt(),E=T.firstChild,O=E.firstChild,A=O.nextSibling,b=A.firstChild;return g(O,()=>m(h)),g(b,()=>u(S)),g(A,i(K,{get when(){return a(S.resetAt)},children:R=>[Xt(),(()=>{var I=Gt();return g(I,R),I})()]}),null),g(T,i(K,{get when(){return S.usedPercent!==null},get children(){var R=Vt(),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 Zt=$("<span class=section-left><span class=section-label>"),Jt=$("<div>"),ae=$('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),en=$('<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">'),tn=$('<div class="flex flex-col gap-2">'),nn=$("<span>"),on=$('<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">'),sn=$('<div class="text-xs text-tertiary">'),rn=$('<div class="border border-base bg-surface-secondary px-3 py-2">'),an=$("<div class=status-tab-container>");const ln=e=>{const n=Ct(e.section.id);return(()=>{var c=Jt();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=Zt(),t=l.firstChild;return g(l,i(Et,{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=en(),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=tn();return g(a,i(ye,{each:u,children:p=>(()=>{var r=on(),v=r.firstChild,f=v.firstChild,C=f.nextSibling,h=C.firstChild,S=h.nextSibling,T=v.nextSibling,E=T.firstChild,O=E.nextSibling,A=O.nextSibling;return g(f,()=>p.title),g(h,i(Ot,{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=nn();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(_t,{class:"h-4 w-4"})),O.$$click=()=>e.onStopBackgroundProcess(p.id),g(O,i(At,{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&&(O.disabled=b.s=y),U!==b.h&&B(O,"aria-label",b.h=U),L!==b.r&&B(O,"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=rn();return g(a,i(Qt,{get providerId(){return u.model.providerId},get modelId(){return u.model.modelId}})),a})():(()=>{var a=sn();return g(a,()=>e.t("providerUsage.noSession")),a})()},s=k(()=>[...ht({renderYoloModeSection:c,renderProviderUsage:o,renderPlanSectionContent:l,renderBackgroundProcesses:t,renderMcpStatus:()=>i(ve,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"}),renderLspStatus:()=>i(ve,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"}),renderPluginStatus:()=>i(ve,{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=an();return g(u,i(K,{get when(){return e.activeSession()},children:a=>i(Nt,{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(ye,{get each(){return d()},children:a=>i(ln,{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,O 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-NKl8kwH2.js";import{n as i,m as M,q as de,s as j,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 ye}from"./git-diff-vendor-CYS3ApzA.js";import{I as Ce,Q as Oe,T as W,U as Me,W as Ee,X as xe,Y as nt,Z as me,_ as le,$ as fe,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 ve,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-DeyDNsRN.js";import{u as Ae}from"./index-DzWXCPie.js";import{T as _t}from"./terminal-square-Xk9nk6Ob.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const Dt=[["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"}]],Ot=e=>i(Ce,M(e,{name:"BellRing",iconNode:Dt})),Mt=[["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"}]],Et=e=>i(Ce,M(e,{name:"GripVertical",iconNode:Mt})),Ut=[["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"}]],At=e=>i(Ce,M(e,{name:"XOctagon",iconNode:Ut}));var Rt={};Se(Rt,{Arrow:()=>Oe,Content:()=>Fe,Portal:()=>Le,Root:()=>Ke,Tooltip:()=>ee,Trigger:()=>Be,useTooltipContext:()=>he});var Re=ue();function he(){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=he(),c=W({id:n.generateId("content")},e),[l,t]=j(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,M({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=he();return i(K,{get when(){return n.contentPresent()},get children(){return i(Ye,e)}})}function Ft(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={},Lt=0,G=!1,N,J,Y;function Ke(e){const n=`tooltip-${de()}`,c=`${++Lt}`,l=W({id:n,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,o]=j(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(N),N=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(N),N=void 0,window.clearTimeout(J),J=void 0,window.clearTimeout(Y),Y=void 0},O=()=>{S(),h(),!f.isOpen()&&!N&&!G?N=window.setTimeout(()=>{N=void 0,G=!0,E()},t.openDelay):f.isOpen()||E()},A=(y=!1)=>{!y&&t.openDelay&&t.openDelay>0&&!s&&!Y?O():E()},b=()=>{window.clearTimeout(N),N=void 0,G=!1},R=()=>{window.clearTimeout(s),s=void 0},I=y=>me(m(),y)||me(a(),y),_=y=>{const U=m(),L=a();if(!(!U||!L))return Ft(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=xe();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;me(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:fe(()=>l.id),registerContentId:le(x),isTargetOnTooltip:I,setTriggerRef:u,setContentRef:p};return i(Re.Provider,{value:D,get children(){return i(Ue,M({anchorRef:m,contentRef:a,onCurrentPlacementChange:v},o))}})}function Be(e){let n;const c=he(),[l,t]=j(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,xe(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(()=>{xe(n).removeEventListener("pointerup",x)}),i(ne,M({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}),Kt={};Se(Kt,{Collapsible:()=>Bt,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]=j(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,M({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]=j(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:fe(()=>t.id),registerContentId:le(s)};return i(He.Provider,{value:m,get children(){return i(ne,M({as:"div"},x,t))}})}function Pe(e){const n=oe(),[c,l]=j(e,["onClick"]);return i(it,M({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 Bt=Object.assign($e,{Content:ke,Trigger:Pe}),Q={};Se(Q,{Accordion:()=>Ht,Content:()=>ze,Header:()=>qe,Item:()=>We,Root:()=>Xe,Trigger:()=>Ge,useAccordionContext:()=>Te});var je=ue();function Ne(){const e=ge(je);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function ze(e){const n=Ne(),c=n.generateId("content"),l=W({id:c},e),[t,o]=j(l,["id","style"]);return V(()=>H(n.registerContentId(t.id))),i(ke,M({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,M({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]=j(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:fe(()=>o.id),registerTriggerId:le(d),registerContentId:le(m)};return i(je.Provider,{value:p,get children(){return i($e,M({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]=j(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:fe(()=>t.id)};return i(x,{get children(){return i(Ve.Provider,{value:a,get children(){return i(ne,M({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=Ne(),t=oe(),o=l.generateId("trigger"),s=W({id:o},e),[d,x]=j(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,M({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 Ht=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 Nt=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,O=S.nextSibling,A=O.firstChild,b=A.nextSibling,R=O.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 zt=$('<div><div class="mt-2 truncate text-right text-sm font-semibold text-secondary">'),be=$('<div class="text-xs text-tertiary">'),qt=$("<div class=space-y-2>"),Vt=$('<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>'),Wt=$('<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">'),Xt=$("<span class=text-tertiary aria-hidden=true>·"),Gt=$('<span class="truncate text-[10px] text-tertiary">');const Yt=6e4,Qt=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)},Yt);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=zt(),v=r.firstChild;return g(r,i(K,{get when(){return l()!==void 0},get fallback(){return(()=>{var f=be();return g(f,()=>n("providerUsage.loading")),f})()},get children(){return i(K,{get when(){return l()},get fallback(){return(()=>{var f=be();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=be();return g(C,()=>n(f().supported?f().configured?"providerUsage.unavailable":"providerUsage.notConfigured":"providerUsage.unsupported")),C})()},get children(){var C=qt();return g(C,i(ye,{get each(){return x()},children:([h,S])=>(()=>{var T=Wt(),E=T.firstChild,O=E.firstChild,A=O.nextSibling,b=A.firstChild;return g(O,()=>m(h)),g(b,()=>u(S)),g(A,i(K,{get when(){return a(S.resetAt)},children:R=>[Xt(),(()=>{var I=Gt();return g(I,R),I})()]}),null),g(T,i(K,{get when(){return S.usedPercent!==null},get children(){var R=Vt(),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 Zt=$("<span class=section-left><span class=section-label>"),Jt=$("<div>"),ae=$('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),en=$('<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">'),tn=$('<div class="flex flex-col gap-2">'),nn=$("<span>"),on=$('<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">'),sn=$('<div class="text-xs text-tertiary">'),rn=$('<div class="border border-base bg-surface-secondary px-3 py-2">'),an=$("<div class=status-tab-container>");const ln=e=>{const n=Ct(e.section.id);return(()=>{var c=Jt();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=Zt(),t=l.firstChild;return g(l,i(Et,{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=en(),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=tn();return g(a,i(ye,{each:u,children:p=>(()=>{var r=on(),v=r.firstChild,f=v.firstChild,C=f.nextSibling,h=C.firstChild,S=h.nextSibling,T=v.nextSibling,E=T.firstChild,O=E.nextSibling,A=O.nextSibling;return g(f,()=>p.title),g(h,i(Ot,{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=nn();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(_t,{class:"h-4 w-4"})),O.$$click=()=>e.onStopBackgroundProcess(p.id),g(O,i(At,{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&&(O.disabled=b.s=y),U!==b.h&&B(O,"aria-label",b.h=U),L!==b.r&&B(O,"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=rn();return g(a,i(Qt,{get providerId(){return u.model.providerId},get modelId(){return u.model.modelId}})),a})():(()=>{var a=sn();return g(a,()=>e.t("providerUsage.noSession")),a})()},s=k(()=>[...ht({renderYoloModeSection:c,renderProviderUsage:o,renderPlanSectionContent:l,renderBackgroundProcesses:t,renderMcpStatus:()=>i(ve,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"}),renderLspStatus:()=>i(ve,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"}),renderPluginStatus:()=>i(ve,{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=an();return g(u,i(K,{get when(){return e.activeSession()},children:a=>i(Nt,{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(ye,{get each(){return d()},children:a=>i(ln,{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-
|
|
1
|
+
import{I as n}from"./main-DeyDNsRN.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{aw as _,t as b,i as x,u as E,m as V,k as B}from"./monaco-viewer-NKl8kwH2.js";import{c as L,b as F,n as p,a as D,S as T,E as z,D as G,C as $,G as U}from"./git-diff-vendor-CYS3ApzA.js";import{aH as N,aI as K}from"./main-
|
|
1
|
+
import{aw as _,t as b,i as x,u as E,m as V,k as B}from"./monaco-viewer-NKl8kwH2.js";import{c as L,b as F,n as p,a as D,S as T,E as z,D as G,C as $,G as U}from"./git-diff-vendor-CYS3ApzA.js";import{aH as N,aI as K}from"./main-DeyDNsRN.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./index-DzWXCPie.js";var q=b("<div>"),I=b("<div class=tool-call-diff-viewer>"),P=b("<pre class=tool-call-diff-fallback>");const O=B("session");U();function j(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,j(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,k;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=((k=m==null?void 0:m.textContent)==null?void 0:k.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 F(()=>{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=I();return x(f,p(T,{get when(){return e.cachedHtml},get fallback(){return(()=>{var l=q(),n=o;return typeof n=="function"?E(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=>(O.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"?E(n,l):o=l,D(()=>l.innerHTML=e.cachedHtml),l}})),f})()}export{ne as ToolCallDiffViewer};
|