@neuralnomads/codenomad-dev 0.13.1-dev-20260328-1b4eff94 → 0.13.1-dev-20260330-37b3f85e
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/dist/filesystem/browser.js +7 -0
- package/dist/server/routes/workspaces.js +14 -0
- package/dist/speech/providers/openai-compatible.js +32 -11
- package/dist/workspaces/manager.js +5 -0
- package/package.json +1 -1
- package/public/assets/{ChangesTab-DdswQ3Ok.js → ChangesTab-DReBtiCD.js} +2 -2
- package/public/assets/{DiffToolbar-Yldqxvj8.js → DiffToolbar-zFp8QctV.js} +1 -1
- package/public/assets/FilesTab-ondRgka_.js +2 -0
- package/public/assets/{GitChangesTab-BZ5PaHzK.js → GitChangesTab-BOcSmEC0.js} +2 -2
- package/public/assets/{SplitFilePanel-DbTPpm8n.js → SplitFilePanel-CclMrjYs.js} +1 -1
- package/public/assets/{StatusTab-CKBp3O9-.js → StatusTab-BVcDbQI8.js} +1 -1
- package/public/assets/{bundle-full-UinVq7HP.js → bundle-full-DaR4-84s.js} +1 -1
- package/public/assets/{diff-viewer-D9gxUZHP.js → diff-viewer-NJrs1tpM.js} +1 -1
- package/public/assets/{index-Cjpfqqyq.js → index-9dJbqHxs.js} +1 -1
- package/public/assets/index-B5yK9f1K.js +1 -0
- package/public/assets/index-BGfH2XEf.js +1 -0
- package/public/assets/index-Bc4VzU8i.js +1 -0
- package/public/assets/index-Bjox8T8a.js +2 -0
- package/public/assets/{index-ENvu-xYE.css → index-C2RrcFJ5.css} +1 -1
- package/public/assets/{index-CdoHjzfy.js → index-C96iOm92.js} +1 -1
- package/public/assets/{index-0Gk1-9Cd.js → index-DWVFDb6o.js} +1 -1
- package/public/assets/index-DahNWccx.js +1 -0
- package/public/assets/index-Dcri1TSs.js +1 -0
- package/public/assets/{loading-D8mHQfQ7.js → loading-DDlbjmrg.js} +1 -1
- package/public/assets/main-By_B3-BG.js +56 -0
- package/public/assets/{markdown-pqPmydDQ.js → markdown-tZ1CDnLU.js} +3 -3
- package/public/assets/{monaco-viewer-BSBw02bx.js → monaco-viewer-DTwkOabu.js} +5 -5
- package/public/assets/{todo-BbZMcvOc.js → todo-CW64L-p2.js} +1 -1
- package/public/assets/{tool-call-BBzW7Hvr.js → tool-call-l0vsLPTC.js} +3 -3
- package/public/assets/{unified-picker-DcafxZRV.js → unified-picker-Dw7fMG5X.js} +1 -1
- package/public/index.html +4 -4
- package/public/loading.html +4 -4
- package/public/sw.js +1 -1
- package/public/assets/FilesTab-7agluNpw.js +0 -2
- package/public/assets/index-BEO8r15M.js +0 -1
- package/public/assets/index-BH7b9sVx.js +0 -1
- package/public/assets/index-CHPcUby9.js +0 -2
- package/public/assets/index-D7Ta2Qha.js +0 -1
- package/public/assets/index-DxTSRG2o.js +0 -1
- package/public/assets/index-YR_aK97-.js +0 -1
- package/public/assets/main-DnH_qzWG.js +0 -56
|
@@ -50,6 +50,13 @@ export class FileSystemBrowser {
|
|
|
50
50
|
fs.mkdirSync(absolutePath);
|
|
51
51
|
return { path: relativePath, absolutePath };
|
|
52
52
|
}
|
|
53
|
+
writeFile(relativePath, contents) {
|
|
54
|
+
if (this.unrestricted) {
|
|
55
|
+
throw new Error("writeFile is not available in unrestricted mode");
|
|
56
|
+
}
|
|
57
|
+
const resolved = this.toRestrictedAbsolute(relativePath);
|
|
58
|
+
fs.writeFileSync(resolved, contents, "utf-8");
|
|
59
|
+
}
|
|
53
60
|
readFile(relativePath) {
|
|
54
61
|
if (this.unrestricted) {
|
|
55
62
|
throw new Error("readFile is not available in unrestricted mode");
|
|
@@ -9,6 +9,9 @@ const WorkspaceFilesQuerySchema = z.object({
|
|
|
9
9
|
const WorkspaceFileContentQuerySchema = z.object({
|
|
10
10
|
path: z.string(),
|
|
11
11
|
});
|
|
12
|
+
const WorkspaceFileContentBodySchema = z.object({
|
|
13
|
+
contents: z.string(),
|
|
14
|
+
});
|
|
12
15
|
const WorkspaceFileSearchQuerySchema = z.object({
|
|
13
16
|
q: z.string().trim().min(1, "Query is required"),
|
|
14
17
|
limit: z.coerce.number().int().positive().max(200).optional(),
|
|
@@ -78,6 +81,17 @@ export function registerWorkspaceRoutes(app, deps) {
|
|
|
78
81
|
return handleWorkspaceError(error, reply);
|
|
79
82
|
}
|
|
80
83
|
});
|
|
84
|
+
app.put("/api/workspaces/:id/files/content", async (request, reply) => {
|
|
85
|
+
try {
|
|
86
|
+
const query = WorkspaceFileContentQuerySchema.parse(request.query ?? {});
|
|
87
|
+
const body = WorkspaceFileContentBodySchema.parse(request.body ?? {});
|
|
88
|
+
deps.workspaceManager.writeFile(request.params.id, query.path, body.contents);
|
|
89
|
+
reply.code(204);
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
return handleWorkspaceError(error, reply);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
81
95
|
}
|
|
82
96
|
function handleWorkspaceError(error, reply) {
|
|
83
97
|
if (error instanceof Error && error.message === "Workspace not found") {
|
|
@@ -110,19 +110,40 @@ export class OpenAICompatibleSpeechProvider {
|
|
|
110
110
|
throw new Error("Speech provider is not configured. Add an API key in Speech settings.");
|
|
111
111
|
}
|
|
112
112
|
const endpoint = new URL("audio/speech", ensureTrailingSlash(settings.baseUrl ?? "https://api.openai.com/v1"));
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
113
|
+
let response;
|
|
114
|
+
try {
|
|
115
|
+
response = await fetch(endpoint, {
|
|
116
|
+
method: "POST",
|
|
117
|
+
headers: {
|
|
118
|
+
Authorization: `Bearer ${settings.apiKey}`,
|
|
119
|
+
"Content-Type": "application/json",
|
|
120
|
+
},
|
|
121
|
+
body: JSON.stringify({
|
|
122
|
+
model: settings.ttsModel,
|
|
123
|
+
voice: settings.ttsVoice,
|
|
124
|
+
input: text,
|
|
125
|
+
response_format: format,
|
|
126
|
+
}),
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
catch (error) {
|
|
130
|
+
const detailedError = error;
|
|
131
|
+
this.options.logger.error({
|
|
132
|
+
err: error,
|
|
133
|
+
endpoint: endpoint.toString(),
|
|
134
|
+
baseUrl: settings.baseUrl,
|
|
120
135
|
model: settings.ttsModel,
|
|
121
136
|
voice: settings.ttsVoice,
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
137
|
+
format,
|
|
138
|
+
cause: detailedError.cause,
|
|
139
|
+
code: detailedError.code,
|
|
140
|
+
errno: detailedError.errno,
|
|
141
|
+
syscall: detailedError.syscall,
|
|
142
|
+
address: detailedError.address,
|
|
143
|
+
port: detailedError.port,
|
|
144
|
+
}, "speech.synthesize fetch failed");
|
|
145
|
+
throw error;
|
|
146
|
+
}
|
|
126
147
|
if (!response.ok) {
|
|
127
148
|
const detail = await response.text();
|
|
128
149
|
throw new Error(detail || `Speech synthesis failed with ${response.status}`);
|
|
@@ -47,6 +47,11 @@ export class WorkspaceManager {
|
|
|
47
47
|
contents,
|
|
48
48
|
};
|
|
49
49
|
}
|
|
50
|
+
writeFile(workspaceId, relativePath, contents) {
|
|
51
|
+
const workspace = this.requireWorkspace(workspaceId);
|
|
52
|
+
const browser = new FileSystemBrowser({ rootDir: workspace.path });
|
|
53
|
+
browser.writeFile(relativePath, contents);
|
|
54
|
+
}
|
|
50
55
|
async create(folder, name) {
|
|
51
56
|
const id = `${Date.now().toString(36)}`;
|
|
52
57
|
const binary = this.options.binaryResolver.resolveDefault();
|
package/package.json
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-
|
|
2
|
-
import{_ as K}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-DTwkOabu.js","assets/git-diff-vendor-CAv-4upN.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{_ as K}from"./index-Bjox8T8a.js";import{m as B,t as g,i as a,d as w,a as F,f as N}from"./monaco-viewer-DTwkOabu.js";import{c as f,n as c,a as L,F as T,S as W,z as j,A as q}from"./git-diff-vendor-CAv-4upN.js";import{D as G}from"./DiffToolbar-zFp8QctV.js";import{S as H}from"./SplitFilePanel-CclMrjYs.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./main-By_B3-BG.js";var J=g('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),E=g("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Q=g('<div class="p-3 text-xs text-secondary">'),R=g("<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=file-list-item-stats><span class=file-list-item-additions>+</span><span class=file-list-item-deletions>-"),U=g("<span class=files-tab-selected-path><span class=file-path-text>"),X=g('<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>-'),Y=g("<div style=margin-left:auto>");const Z=q(()=>K(()=>import("./monaco-viewer-DTwkOabu.js").then(e=>e.aa),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),de=e=>{const M=f(()=>e.activeSessionId()),S=f(()=>!!(M()&&M()!=="info")),D=f(()=>S()?e.activeSessionDiffs():null),y=f(()=>{const n=D();return Array.isArray(n)?[...n].sort((i,l)=>String(i.file||"").localeCompare(String(l.file||""))):[]}),I=f(()=>y().reduce((n,i)=>(n.additions+=typeof i.additions=="number"?i.additions:0,n.deletions+=typeof i.deletions=="number"?i.deletions:0,n),{additions:0,deletions:0})),O=f(()=>{const n=y();return n.length===0?null:n.reduce((i,l)=>{const v=typeof(i==null?void 0:i.additions)=="number"?i.additions:0,m=typeof(i==null?void 0:i.deletions)=="number"?i.deletions:0,x=v+m,k=typeof(l==null?void 0:l.additions)=="number"?l.additions:0,t=typeof(l==null?void 0:l.deletions)=="number"?l.deletions:0,r=k+t;return r>x?l:r<x?i:String(l.file||"").localeCompare(String((i==null?void 0:i.file)||""))<0?l:i},n[0])}),P=f(()=>{const n=e.selectedFile(),i=y();if(n){const l=i.find(v=>v.file===n);if(l)return l}return O()}),p=f(()=>`${e.instanceId}:${S()?M():"no-session"}`),V=f(()=>{if(!S())return e.t("instanceShell.sessionChanges.noSessionSelected");const n=D();return n===void 0?e.t("instanceShell.sessionChanges.loading"):!Array.isArray(n)||n.length===0?e.t("instanceShell.sessionChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty")}),A=f(()=>{const n=P();return n!=null&&n.file?String(n.file):e.t("instanceShell.rightPanel.tabs.changes")});return B(()=>{const n=y(),i=I(),l=P(),v=()=>(()=>{var t=J(),r=t.firstChild;return a(r,c(W,{get when(){return l&&S()&&n.length>0?l:null},get fallback(){return(()=>{var o=E(),s=o.firstChild;return a(s,V),o})()},children:o=>c(j,{get fallback(){return(()=>{var s=E(),u=s.firstChild;return a(u,()=>e.t("instanceInfo.loading")),s})()},get children(){return c(Z,{get scopeKey(){return p()},get path(){return String(o().file||"")},get before(){return String(o().before||"")},get after(){return String(o().after||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()}})}})})),t})(),m=()=>(()=>{var t=Q();return a(t,V),t})();return c(H,{get header(){return[(()=>{var t=U(),r=t.firstChild;return a(r,A),L(()=>w(t,"title",A())),t})(),(()=>{var t=X(),r=t.firstChild,o=r.firstChild;o.firstChild;var s=r.nextSibling,u=s.firstChild;return u.firstChild,a(o,()=>i.additions,null),a(u,()=>i.deletions,null),t})(),(()=>{var t=Y();return a(t,c(G,{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}})),t})()]},list:{panel:()=>c(W,{get when(){return n.length>0},get fallback(){return m()},get children(){return c(T,{each:n,children:t=>(()=>{var r=R(),o=r.firstChild,s=o.firstChild,u=s.firstChild,b=s.nextSibling,h=b.firstChild;h.firstChild;var C=h.nextSibling;return C.firstChild,r.$$click=()=>{e.onSelectFile(t.file,e.isPhoneLayout())},a(u,()=>t.file),a(h,()=>t.additions,null),a(C,()=>t.deletions,null),L(d=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file;return _!==d.e&&F(r,d.e=_),$!==d.t&&w(s,"title",d.t=$),d},{e:void 0,t:void 0}),r})()})}}),overlay:()=>c(W,{get when(){return n.length>0},get fallback(){return m()},get children(){return c(T,{each:n,children:t=>(()=>{var r=R(),o=r.firstChild,s=o.firstChild,u=s.firstChild,b=s.nextSibling,h=b.firstChild;h.firstChild;var C=h.nextSibling;return C.firstChild,r.$$click=()=>{e.onSelectFile(t.file,!0)},a(u,()=>t.file),a(h,()=>t.additions,null),a(C,()=>t.deletions,null),L(d=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file,z=t.file;return _!==d.e&&F(r,d.e=_),$!==d.t&&w(r,"title",d.t=$),z!==d.a&&w(s,"title",d.a=z),d},{e:void 0,t:void 0,a:void 0}),r})()})}})},get viewer(){return v()},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.changes")}})})};N(["click"]);export{de as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as $,i as c,m as S,d as n,a as T,f as C}from"./monaco-viewer-
|
|
1
|
+
import{t as $,i as c,m as S,d as n,a as T,f as C}from"./monaco-viewer-DTwkOabu.js";import{u as N}from"./index-Bjox8T8a.js";import{n as i,m as h,a as V}from"./git-diff-vendor-CAv-4upN.js";import{I as f,J as U,K as A}from"./main-By_B3-BG.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"}]],J=t=>i(f,h(t,{name:"AlignJustify",iconNode:I})),j=[["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"}]],D=t=>i(f,h(t,{name:"UnfoldVertical",iconNode:j})),E=[["line",{x1:"3",x2:"21",y1:"6",y2:"6",key:"4m8b97"}],["path",{d:"M3 12h15a3 3 0 1 1 0 6h-4",key:"1cl7v7"}],["polyline",{points:"16 16 14 18 16 20",key:"1jznyi"}],["line",{x1:"3",x2:"10",y1:"18",y2:"18",key:"1h33wv"}]],F=t=>i(f,h(t,{name:"WrapText",iconNode:E}));var H=$("<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 R=t=>{const{t:o}=N(),s=()=>t.viewMode==="split"?"unified":"split",r=()=>t.contextMode==="collapsed"?"expanded":"collapsed",y=()=>t.wordWrapMode==="on"?"off":"on",v=()=>s()==="split"?o("instanceShell.diff.switchToSplit"):o("instanceShell.diff.switchToUnified"),u=()=>r()==="collapsed"?o("instanceShell.diff.hideUnchanged"):o("instanceShell.diff.showFull"),b=()=>y()==="on"?o("instanceShell.diff.enableWordWrap"):o("instanceShell.diff.disableWordWrap");return(()=>{var x=H(),a=x.firstChild,l=a.nextSibling,d=l.nextSibling;return a.$$click=()=>t.onViewModeChange(s()),c(a,(()=>{var e=S(()=>s()==="split");return()=>e()?i(U,{class:"h-4 w-4","aria-hidden":"true"}):i(J,{class:"h-4 w-4","aria-hidden":"true"})})()),l.$$click=()=>t.onContextModeChange(r()),c(l,(()=>{var e=S(()=>r()==="collapsed");return()=>e()?i(A,{class:"h-4 w-4","aria-hidden":"true"}):i(D,{class:"h-4 w-4","aria-hidden":"true"})})()),d.$$click=()=>t.onWordWrapModeChange(y()),c(d,i(F,{class:"h-4 w-4","aria-hidden":"true"})),V(e=>{var m=v(),w=v(),k=u(),M=u(),p=`file-viewer-toolbar-icon-button${t.wordWrapMode==="on"?" active":""}`,W=b(),g=b();return m!==e.e&&n(a,"aria-label",e.e=m),w!==e.t&&n(a,"title",e.t=w),k!==e.a&&n(l,"aria-label",e.a=k),M!==e.o&&n(l,"title",e.o=M),p!==e.i&&T(d,e.i=p),W!==e.n&&n(d,"aria-label",e.n=W),g!==e.s&&n(d,"title",e.s=g),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),x})()};C(["click"]);export{R as D};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-DTwkOabu.js","assets/git-diff-vendor-CAv-4upN.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{_ as R}from"./index-Bjox8T8a.js";import{m as _,t as o,i as s,d as c,a as z,f as I}from"./monaco-viewer-DTwkOabu.js";import{n as i,m as D,S as d,a as v,F,z as V,A as M}from"./git-diff-vendor-CAv-4upN.js";import{S as T}from"./SplitFilePanel-CclMrjYs.js";import{I as A,R as y}from"./main-By_B3-BG.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const O=[["path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z",key:"1owoqh"}],["polyline",{points:"17 21 17 13 7 13 7 21",key:"1md35c"}],["polyline",{points:"7 3 7 8 15 8",key:"8nz8an"}]],q=e=>i(A,D(e,{name:"Save",iconNode:O}));var g=o("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),K=o('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),N=o('<div class="p-3 text-xs text-secondary">'),W=o("<div class=file-list-item><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text>.."),H=o('<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=file-list-item-stats><span class="text-[10px] text-secondary">'),j=o("<span>"),B=o("<div class=files-tab-stats><span class=files-tab-stat><span class=files-tab-selected-path><span class=file-path-text>"),G=o("<button type=button class=files-header-icon-button style=margin-inline-start:auto>"),J=o("<button type=button class=files-header-icon-button>"),Q=o("<span class=text-error>");const U=M(()=>R(()=>import("./monaco-viewer-DTwkOabu.js").then(e=>e.ab),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer}))),ae=e=>{const C=()=>{const h=e.browserSelectedContent();h!=null&&e.onSave(h)};return _(()=>{const h=e.browserEntries(),P=[...h||[]].sort((t,n)=>{const r=t.type==="directory"?0:1,l=n.type==="directory"?0:1;return r!==l?r-l:String(t.name||"").localeCompare(String(n.name||""))}),L=e.parentPath(),w=()=>e.browserSelectedPath()||e.browserPath(),x=()=>e.browserLoading()&&h===null?e.t("instanceInfo.loading"):e.t("instanceShell.filesShell.viewerEmpty"),k=()=>(()=>{var t=K(),n=t.firstChild;return s(n,i(d,{get when(){return e.browserSelectedLoading()},get fallback(){return i(d,{get when(){return e.browserSelectedError()},get fallback(){return i(d,{get when(){return _(()=>!!(e.browserSelectedPath()&&e.browserSelectedContent()!==null))()?{path:e.browserSelectedPath(),content:e.browserSelectedContent()}:null},get fallback(){return(()=>{var r=g(),l=r.firstChild;return s(l,x),r})()},children:r=>i(V,{get fallback(){return(()=>{var l=g(),a=l.firstChild;return s(a,()=>e.t("instanceInfo.loading")),l})()},get children(){return i(U,{get scopeKey(){return e.scopeKey()},get path(){return r().path},get content(){return r().content},get onSave(){return e.onSave},get onContentChange(){return e.onContentChange}})}})})},children:r=>(()=>{var l=g(),a=l.firstChild;return s(a,r),l})()})},get children(){var r=g(),l=r.firstChild;return s(l,()=>e.t("instanceInfo.loading")),r}})),t})(),m=()=>[i(d,{when:L,children:t=>(()=>{var n=W(),r=n.firstChild,l=r.firstChild;return n.$$click=()=>e.onLoadEntries(t()),v(()=>c(l,"title",t())),n})()}),i(d,{get when(){return e.browserLoading()&&h===null},get children(){var t=N();return s(t,()=>e.t("instanceInfo.loading")),t}}),i(F,{each:P,children:t=>(()=>{var n=H(),r=n.firstChild,l=r.firstChild,a=l.firstChild,f=l.nextSibling,E=f.firstChild;return n.$$click=()=>{if(t.type==="directory"){e.onLoadEntries(t.path);return}e.onRequestOpenFile(t.path)},s(a,()=>t.name),s(E,()=>t.type),v(u=>{var b=`file-list-item ${e.browserSelectedPath()===t.path?"file-list-item-active":""}`,S=t.path,$=t.path;return b!==u.e&&z(n,u.e=b),S!==u.t&&c(n,"title",u.t=S),$!==u.a&&c(l,"title",u.a=$),u},{e:void 0,t:void 0,a:void 0}),n})()})];return i(T,{get header(){return[(()=>{var t=B(),n=t.firstChild,r=n.firstChild,l=r.firstChild;return s(l,w),s(t,i(d,{get when(){return e.browserLoading()},get children(){var a=j();return s(a,()=>e.t("instanceInfo.loading")),a}}),null),s(t,i(d,{get when(){return e.browserError()},children:a=>(()=>{var f=Q();return s(f,a),f})()}),null),v(()=>c(r,"title",w())),t})(),(()=>{var t=G();return t.$$click=C,s(t,i(d,{get when(){return e.browserSelectedSaving()},get fallback(){return i(q,{class:"h-4 w-4"})},get children(){return i(y,{class:"h-4 w-4 animate-spin"})}})),v(n=>{var r=e.t("instanceShell.rightPanel.actions.save")||"Save (Ctrl+S)",l=e.t("instanceShell.rightPanel.actions.save")||"Save",a=e.browserSelectedSaving()||!e.browserSelectedDirty();return r!==n.e&&c(t,"title",n.e=r),l!==n.t&&c(t,"aria-label",n.t=l),a!==n.a&&(t.disabled=n.a=a),n},{e:void 0,t:void 0,a:void 0}),t})(),(()=>{var t=J();return t.$$click=()=>e.onRefresh(),s(t,i(y,{get class(){return`h-4 w-4${e.browserLoading()?" animate-spin":""}`}})),v(n=>{var r=e.t("instanceShell.rightPanel.actions.refresh"),l=e.t("instanceShell.rightPanel.actions.refresh"),a=e.browserLoading();return r!==n.e&&c(t,"title",n.e=r),l!==n.t&&c(t,"aria-label",n.t=l),a!==n.a&&(t.disabled=n.a=a),n},{e:void 0,t:void 0,a:void 0}),t})()]},list:{panel:m,overlay:m},get viewer(){return k()},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")}})})};I(["click"]);export{ae as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-
|
|
2
|
-
import{_ as B}from"./index-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-DTwkOabu.js","assets/git-diff-vendor-CAv-4upN.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{_ as B}from"./index-Bjox8T8a.js";import{m as V,t as h,i as r,d as $,a as D,f as K}from"./monaco-viewer-DTwkOabu.js";import{c as f,n as d,a as w,S as c,F as R,z as G,A as N}from"./git-diff-vendor-CAv-4upN.js";import{D as j}from"./DiffToolbar-zFp8QctV.js";import{S as q}from"./SplitFilePanel-CclMrjYs.js";import{R as H}from"./main-By_B3-BG.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";var S=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),J=h('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),Q=h('<div class="p-3 text-xs text-secondary">'),A=h('<span class="text-[10px] text-secondary">'),z=h("<span class=file-list-item-additions>+"),O=h("<span class=file-list-item-deletions>-"),T=h("<div><div class=file-list-item-content><div class=file-list-item-path><span class=file-path-text></span></div><div class=file-list-item-stats>"),U=h("<span class=files-tab-selected-path><span class=file-path-text>"),X=h('<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>-'),Y=h("<button type=button class=files-header-icon-button style=margin-left:auto>"),Z=h("<span class=text-error>");const p=N(()=>B(()=>import("./monaco-viewer-DTwkOabu.js").then(e=>e.aa),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),he=e=>{const P=f(()=>e.activeSessionId()),y=f(()=>!!(P()&&P()!=="info")),M=f(()=>y()?e.entries():null),b=f(()=>{const o=M();return Array.isArray(o)?[...o].sort((s,g)=>String(s.path||"").localeCompare(String(g.path||""))):[]}),F=f(()=>b().reduce((o,s)=>(o.additions+=typeof s.added=="number"?s.added:0,o.deletions+=typeof s.removed=="number"?s.removed:0,o),{additions:0,deletions:0})),L=f(()=>b().filter(o=>o&&o.status!=="deleted")),I=f(()=>{const o=b(),s=e.selectedPath(),g=e.mostChangedPath();return(o.find(_=>_.path===s)||(g?o.find(_=>_.path===g):void 0))??null}),W=f(()=>y()?M()===null?e.t("instanceShell.gitChanges.loading"):L().length===0?e.t("instanceShell.gitChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty"):e.t("instanceShell.gitChanges.noSessionSelected"));return V(()=>{const o=F(),s=I(),g=b(),x=L(),_=()=>(()=>{var t=J(),l=t.firstChild;return r(l,d(c,{get when(){return e.selectedLoading()},get fallback(){return d(c,{get when(){return e.selectedError()},get fallback(){return d(c,{get when(){return V(()=>!!(s&&e.selectedBefore()!==null&&e.selectedAfter()!==null&&s.status!=="deleted"))()?{path:s.path,before:e.selectedBefore(),after:e.selectedAfter()}:null},get fallback(){return(()=>{var i=S(),a=i.firstChild;return r(a,W),i})()},children:i=>d(G,{get fallback(){return(()=>{var a=S(),u=a.firstChild;return r(u,()=>e.t("instanceInfo.loading")),a})()},get children(){return d(p,{get scopeKey(){return e.scopeKey()},get path(){return String(i().path||"")},get before(){return String(i().before||"")},get after(){return String(i().after||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()}})}})})},children:i=>(()=>{var a=S(),u=a.firstChild;return r(u,i),a})()})},get children(){var i=S(),a=i.firstChild;return r(a,()=>e.t("instanceInfo.loading")),i}})),t})(),k=()=>(()=>{var t=Q();return r(t,W),t})();return d(q,{get header(){return[(()=>{var t=U(),l=t.firstChild;return r(l,()=>(s==null?void 0:s.path)||e.t("instanceShell.rightPanel.tabs.gitChanges")),w(()=>$(t,"title",(s==null?void 0:s.path)||e.t("instanceShell.rightPanel.tabs.gitChanges"))),t})(),(()=>{var t=X(),l=t.firstChild,i=l.firstChild;i.firstChild;var a=l.nextSibling,u=a.firstChild;return u.firstChild,r(i,()=>o.additions,null),r(u,()=>o.deletions,null),r(t,d(c,{get when(){return e.statusError()},children:v=>(()=>{var n=Z();return r(n,v),n})()}),null),t})(),(()=>{var t=Y();return t.$$click=()=>e.onRefresh(),r(t,d(H,{get class(){return`h-4 w-4${e.statusLoading()?" animate-spin":""}`}})),w(l=>{var i=e.t("instanceShell.rightPanel.actions.refresh"),a=e.t("instanceShell.rightPanel.actions.refresh"),u=!y()||e.statusLoading()||M()===null;return i!==l.e&&$(t,"title",l.e=i),a!==l.t&&$(t,"aria-label",l.t=a),u!==l.a&&(t.disabled=l.a=u),l},{e:void 0,t:void 0,a:void 0}),t})(),d(j,{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:()=>d(c,{get when(){return x.length>0},get fallback(){return k()},get children(){return d(R,{each:g,children:t=>(()=>{var l=T(),i=l.firstChild,a=i.firstChild,u=a.firstChild,v=a.nextSibling;return l.$$click=()=>{e.onOpenFile(t.path)},r(u,()=>t.path),r(v,d(c,{get when(){return t.status==="deleted"},get children(){var n=A();return r(n,()=>e.t("instanceShell.gitChanges.deleted")),n}}),null),r(v,d(c,{get when(){return t.status!=="deleted"},get children(){return[(()=>{var n=z();return n.firstChild,r(n,()=>t.added,null),n})(),(()=>{var n=O();return n.firstChild,r(n,()=>t.removed,null),n})()]}}),null),w(n=>{var C=`file-list-item ${e.selectedPath()===t.path?"file-list-item-active":""}`,m=t.path;return C!==n.e&&D(l,n.e=C),m!==n.t&&$(a,"title",n.t=m),n},{e:void 0,t:void 0}),l})()})}}),overlay:()=>d(c,{get when(){return x.length>0},get fallback(){return k()},get children(){return d(R,{each:g,children:t=>(()=>{var l=T(),i=l.firstChild,a=i.firstChild,u=a.firstChild,v=a.nextSibling;return l.$$click=()=>e.onOpenFile(t.path),r(u,()=>t.path),r(v,d(c,{get when(){return t.status==="deleted"},get children(){var n=A();return r(n,()=>e.t("instanceShell.gitChanges.deleted")),n}}),null),r(v,d(c,{get when(){return t.status!=="deleted"},get children(){return[(()=>{var n=z();return n.firstChild,r(n,()=>t.added,null),n})(),(()=>{var n=O();return n.firstChild,r(n,()=>t.removed,null),n})()]}}),null),w(n=>{var C=`file-list-item ${e.selectedPath()===t.path?"file-list-item-active":""}`,m=t.path,E=t.path;return C!==n.e&&D(l,n.e=C),m!==n.t&&$(l,"title",n.t=m),E!==n.a&&$(a,"title",n.a=E),n},{e:void 0,t:void 0,a:void 0}),l})()})}})},get viewer(){return _()},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")}})})};K(["click"]);export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{t as d,i as l,d as m,j as s,m as b,g as _,f as w}from"./monaco-viewer-
|
|
1
|
+
import{t as d,i as l,d as m,j as s,m as b,g as _,f as w}from"./monaco-viewer-DTwkOabu.js";import{a as g,n as r,S as n}from"./git-diff-vendor-CAv-4upN.js";import{u as S}from"./index-Bjox8T8a.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 we,P as Ve,t as M,i as h,a as Xe,d as B,f as Ge}from"./monaco-viewer-BSBw02bx.js";import{n as c,m as P,b as k,o as S,k as Z,l as J,q as re,s as D,d as T,c as H,S as Q,t as Ye,w as xe,a as ge,F as ce}from"./git-diff-vendor-CAv-4upN.js";import{I as pe,N as Qe,O as A,P as se,Q as Ze,T as Je,U as Pe,V as Se,W as Ie,X as et,Y as de,Z as ie,_ as le,$ as Te,a0 as ee,a1 as te,a2 as tt,a3 as fe,a4 as nt,a5 as ot,a6 as _,a7 as he,a8 as st,a9 as it,aa as rt,ab as E,ac as lt,ad as at,ae as Ce,af as ct,ag as ue,ah as dt}from"./main-DnH_qzWG.js";import{u as ut}from"./index-CHPcUby9.js";import{T as gt}from"./todo-BbZMcvOc.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const pt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ft=e=>c(pe,P(e,{name:"Info",iconNode:pt})),ht=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],mt=e=>c(pe,P(e,{name:"TerminalSquare",iconNode:ht})),bt=[["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"}]],vt=e=>c(pe,P(e,{name:"XOctagon",iconNode:bt}));var ke=Z();function yt(){return J(ke)}function xt(){const e=yt();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function $e(e,s){return!!(s.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Ct(e,s){var n;const l=s.ref();if(!l)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=(n=e[r])==null?void 0:n.ref();if(o&&$e(o,l))return r+1}return 0}function wt(e){const s=e.map((r,n)=>[n,r]);let l=!1;return s.sort(([r,n],[o,t])=>{const i=n.ref(),a=t.ref();return i===a||!i||!a?0:$e(i,a)?(r>o&&(l=!0),-1):(r<o&&(l=!0),1)}),l?s.map(([r,n])=>n):e}function De(e,s){const l=wt(e);e!==l&&s(l)}function Pt(e){var n,o;const s=e[0],l=(n=e[e.length-1])==null?void 0:n.ref();let r=(o=s==null?void 0:s.ref())==null?void 0:o.parentElement;for(;r;){if(l&&r.contains(l))return r;r=r.parentElement}return se(r).body}function St(e,s){k(()=>{const l=setTimeout(()=>{De(e(),s)});S(()=>clearTimeout(l))})}function It(e,s){if(typeof IntersectionObserver!="function"){St(e,s);return}let l=[];k(()=>{const r=()=>{const t=!!l.length;l=e(),t&&De(e(),s)},n=Pt(e()),o=new IntersectionObserver(r,{root:n});for(const t of e()){const i=t.ref();i&&o.observe(i)}S(()=>o.disconnect())})}function Tt(e={}){const[s,l]=Qe({value:()=>Je(e.items),onChange:o=>{var t;return(t=e.onItemsChange)==null?void 0:t.call(e,o)}});It(s,l);const r=o=>(l(t=>{const i=Ct(t,o);return Ze(t,o,i)}),()=>{l(t=>{const i=t.filter(a=>a.ref()!==o.ref());return t.length===i.length?t:i})});return{DomCollectionProvider:o=>c(ke.Provider,{value:{registerItem:r},get children(){return o.children}})}}function kt(e){const s=xt(),l=A({shouldRegisterItem:!0},e);k(()=>{if(!l.shouldRegisterItem)return;const r=s.registerItem(l.getItem());S(r)})}var $t={};he($t,{Arrow:()=>Pe,Content:()=>_e,Portal:()=>Ee,Root:()=>Me,Tooltip:()=>Y,Trigger:()=>Ae,useTooltipContext:()=>ae});var Oe=Z();function ae(){const e=J(Oe);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function _e(e){const s=ae(),l=A({id:s.generateId("content")},e),[r,n]=D(l,["ref","style"]);return k(()=>S(s.registerContentId(n.id))),c(Q,{get when(){return s.contentPresent()},get children(){return c(Te.Positioner,{get children(){return c(tt,P({ref(o){var t=ee(i=>{s.setContentRef(i)},r.ref);typeof t=="function"&&t(o)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return fe({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:o=>o.preventDefault(),onDismiss:()=>s.hideTooltip(!0)},()=>s.dataset(),n))}})}})}function Ee(e){const s=ae();return c(Q,{get when(){return s.contentPresent()},get children(){return c(Ve,e)}})}function Dt(e,s,l){const r=e.split("-")[0],n=s.getBoundingClientRect(),o=l.getBoundingClientRect(),t=[],i=n.left+n.width/2,a=n.top+n.height/2;switch(r){case"top":t.push([n.left,a]),t.push([o.left,o.bottom]),t.push([o.left,o.top]),t.push([o.right,o.top]),t.push([o.right,o.bottom]),t.push([n.right,a]);break;case"right":t.push([i,n.top]),t.push([o.left,o.top]),t.push([o.right,o.top]),t.push([o.right,o.bottom]),t.push([o.left,o.bottom]),t.push([i,n.bottom]);break;case"bottom":t.push([n.left,a]),t.push([o.left,o.top]),t.push([o.left,o.bottom]),t.push([o.right,o.bottom]),t.push([o.right,o.top]),t.push([n.right,a]);break;case"left":t.push([i,n.top]),t.push([o.right,o.top]),t.push([o.left,o.top]),t.push([o.left,o.bottom]),t.push([o.right,o.bottom]),t.push([i,n.bottom]);break}return t}var N={},Ot=0,j=!1,O,G,q;function Me(e){const s=`tooltip-${re()}`,l=`${++Ot}`,r=A({id:s,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[n,o]=D(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let t;const[i,a]=T(),[u,d]=T(),[g,v]=T(),[y,x]=T(o.placement),m=Se({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:b=>{var $;return($=n.onOpenChange)==null?void 0:$.call(n,b)}}),{present:C}=Ie({show:()=>n.forceMount||m.isOpen(),element:()=>g()??null}),p=()=>{N[l]=w},f=()=>{for(const b in N)b!==l&&(N[b](!0),delete N[b])},w=(b=!1)=>{b||n.closeDelay&&n.closeDelay<=0?(window.clearTimeout(t),t=void 0,m.close()):t||(t=window.setTimeout(()=>{t=void 0,m.close()},n.closeDelay)),window.clearTimeout(O),O=void 0,n.skipDelayDuration&&n.skipDelayDuration>=0&&(q=window.setTimeout(()=>{window.clearTimeout(q),q=void 0},n.skipDelayDuration)),j&&(window.clearTimeout(G),G=window.setTimeout(()=>{delete N[l],G=void 0,j=!1},n.closeDelay))},F=()=>{clearTimeout(t),t=void 0,f(),p(),j=!0,m.open(),window.clearTimeout(O),O=void 0,window.clearTimeout(G),G=void 0,window.clearTimeout(q),q=void 0},R=()=>{f(),p(),!m.isOpen()&&!O&&!j?O=window.setTimeout(()=>{O=void 0,j=!0,F()},n.openDelay):m.isOpen()||F()},W=(b=!1)=>{!b&&n.openDelay&&n.openDelay>0&&!t&&!q?R():F()},L=()=>{window.clearTimeout(O),O=void 0,j=!1},U=()=>{window.clearTimeout(t),t=void 0},I=b=>de(u(),b)||de(g(),b),oe=b=>{const $=u(),K=g();if(!(!$||!K))return Dt(b,$,K)},X=b=>{const $=b.target;if(I($)){U();return}if(!n.ignoreSafeArea){const K=oe(y());if(K&&nt(ot(b),K)){U();return}}t||w()};k(()=>{if(!m.isOpen())return;const b=se();b.addEventListener("pointermove",X,!0),S(()=>{b.removeEventListener("pointermove",X,!0)})}),k(()=>{const b=u();if(!b||!m.isOpen())return;const $=qe=>{const ze=qe.target;de(ze,b)&&w(!0)},K=et();K.addEventListener("scroll",$,{capture:!0}),S(()=>{K.removeEventListener("scroll",$,{capture:!0})})}),S(()=>{clearTimeout(t),N[l]&&delete N[l]});const je={dataset:H(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>n.disabled??!1,triggerOnFocusOnly:()=>n.triggerOnFocusOnly??!1,contentId:i,contentPresent:C,openTooltip:W,hideTooltip:w,cancelOpening:L,generateId:le(()=>r.id),registerContentId:ie(a),isTargetOnTooltip:I,setTriggerRef:d,setContentRef:v};return c(Oe.Provider,{value:je,get children(){return c(Te,P({anchorRef:u,contentRef:g,onCurrentPlacementChange:x},o))}})}function Ae(e){let s;const l=ae(),[r,n]=D(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let o=!1,t=!1,i=!1;const a=()=>{o=!1},u=()=>{!l.isOpen()&&(t||i)&&l.openTooltip(i)},d=p=>{l.isOpen()&&!t&&!i&&l.hideTooltip(p)},g=p=>{_(p,r.onPointerEnter),!(p.pointerType==="touch"||l.triggerOnFocusOnly()||l.isDisabled()||p.defaultPrevented)&&(t=!0,u())},v=p=>{_(p,r.onPointerLeave),p.pointerType!=="touch"&&(t=!1,i=!1,l.isOpen()?d():l.cancelOpening())},y=p=>{_(p,r.onPointerDown),o=!0,se(s).addEventListener("pointerup",a,{once:!0})},x=p=>{_(p,r.onClick),t=!1,i=!1,d(!0)},m=p=>{_(p,r.onFocus),!(l.isDisabled()||p.defaultPrevented||o)&&(i=!0,u())},C=p=>{_(p,r.onBlur);const f=p.relatedTarget;l.isTargetOnTooltip(f)||(t=!1,i=!1,d(!0))};return S(()=>{se(s).removeEventListener("pointerup",a)}),c(te,P({as:"button",ref(p){var f=ee(w=>{l.setTriggerRef(w),s=w},r.ref);typeof f=="function"&&f(p)},get"aria-describedby"(){return we(()=>!!l.isOpen())()?l.contentId():void 0},onPointerEnter:g,onPointerLeave:v,onPointerDown:y,onClick:x,onFocus:m,onBlur:C},()=>l.dataset(),n))}var Y=Object.assign(Me,{Arrow:Pe,Content:_e,Portal:Ee,Trigger:Ae}),_t={};he(_t,{Collapsible:()=>Et,Content:()=>me,Root:()=>be,Trigger:()=>ve,useCollapsibleContext:()=>ne});var Fe=Z();function ne(){const e=J(Fe);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function me(e){const[s,l]=T(),r=ne(),n=A({id:r.generateId("content")},e),[o,t]=D(n,["ref","id","style"]),{present:i}=Ie({show:r.shouldMount,element:()=>s()??null}),[a,u]=T(0),[d,g]=T(0);let y=r.isOpen()||i();return Ye(()=>{const x=requestAnimationFrame(()=>{y=!1});S(()=>{cancelAnimationFrame(x)})}),k(xe(i,()=>{if(!s())return;s().style.transitionDuration="0s",s().style.animationName="none";const x=s().getBoundingClientRect();u(x.height),g(x.width),y||(s().style.transitionDuration="",s().style.animationName="")})),k(xe(r.isOpen,x=>{!x&&s()&&(s().style.transitionDuration="",s().style.animationName="")},{defer:!0})),k(()=>S(r.registerContentId(o.id))),c(Q,{get when(){return i()},get children(){return c(te,P({as:"div",ref(x){var m=ee(l,o.ref);typeof m=="function"&&m(x)},get id(){return o.id},get style(){return fe({"--kb-collapsible-content-height":a()?`${a()}px`:void 0,"--kb-collapsible-content-width":d()?`${d()}px`:void 0},o.style)}},()=>r.dataset(),t))}})}function be(e){const s=`collapsible-${re()}`,l=A({id:s},e),[r,n]=D(l,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,t]=T(),i=Se({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:d=>{var g;return(g=r.onOpenChange)==null?void 0:g.call(r,d)}}),a=H(()=>({"data-expanded":i.isOpen()?"":void 0,"data-closed":i.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),u={dataset:a,isOpen:i.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||i.isOpen(),contentId:o,toggle:i.toggle,generateId:le(()=>n.id),registerContentId:ie(t)};return c(Fe.Provider,{value:u,get children(){return c(te,P({as:"div"},a,n))}})}function ve(e){const s=ne(),[l,r]=D(e,["onClick"]);return c(st,P({get"aria-expanded"(){return s.isOpen()},get"aria-controls"(){return we(()=>!!s.isOpen())()?s.contentId():void 0},get disabled(){return s.disabled()},onClick:o=>{_(o,l.onClick),s.toggle()}},()=>s.dataset(),r))}var Et=Object.assign(be,{Content:me,Trigger:ve}),V={};he(V,{Accordion:()=>Mt,Content:()=>Be,Header:()=>Le,Item:()=>Ne,Root:()=>He,Trigger:()=>We,useAccordionContext:()=>ye});var Re=Z();function Ke(){const e=J(Re);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function Be(e){const s=Ke(),l=s.generateId("content"),r=A({id:l},e),[n,o]=D(r,["id","style"]);return k(()=>S(s.registerContentId(n.id))),c(me,P({role:"region",get"aria-labelledby"(){return s.triggerId()},get style(){return fe({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},n.style)}},o))}function Le(e){const s=ne();return c(te,P({as:"h3"},()=>s.dataset(),e))}var Ue=Z();function ye(){const e=J(Ue);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function Ne(e){const s=ye(),l=`${s.generateId("item")}-${re()}`,r=A({id:l},e),[n,o]=D(r,["value","disabled"]),[t,i]=T(),[a,u]=T(),d=()=>s.listState().selectionManager(),g=()=>d().isSelected(n.value),v={value:()=>n.value,triggerId:t,contentId:a,generateId:le(()=>o.id),registerTriggerId:ie(i),registerContentId:ie(u)};return c(Re.Provider,{value:v,get children(){return c(be,P({get open(){return g()},get disabled(){return n.disabled}},o))}})}function He(e){let s;const l=`accordion-${re()}`,r=A({id:l,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[n,o]=D(r,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[t,i]=T([]),{DomCollectionProvider:a}=Tt({items:t,onItemsChange:i}),u=it({selectedKeys:()=>n.value,defaultSelectedKeys:()=>n.defaultValue,onSelectionChange:v=>{var y;return(y=n.onChange)==null?void 0:y.call(n,Array.from(v))},disallowEmptySelection:()=>!n.multiple&&!n.collapsible,selectionMode:()=>n.multiple?"multiple":"single",dataSource:t});u.selectionManager().setFocusedKey("item-1");const d=rt({selectionManager:()=>u.selectionManager(),collection:()=>u.collection(),disallowEmptySelection:()=>u.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>n.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>s),g={listState:()=>u,generateId:le(()=>n.id)};return c(a,{get children(){return c(Ue.Provider,{value:g,get children(){return c(te,P({as:"div",get id(){return n.id},ref(v){var y=ee(x=>s=x,n.ref);typeof y=="function"&&y(v)},get onKeyDown(){return E([n.onKeyDown,d.onKeyDown])},get onMouseDown(){return E([n.onMouseDown,d.onMouseDown])},get onFocusIn(){return E([n.onFocusIn])},get onFocusOut(){return E([n.onFocusOut,d.onFocusOut])}},o))}})}})}function We(e){let s;const l=ye(),r=Ke(),n=ne(),o=r.generateId("trigger"),t=A({id:o},e),[i,a]=D(t,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);kt({getItem:()=>({ref:()=>s,type:"item",key:r.value(),textValue:"",disabled:n.disabled()})});const u=lt({key:()=>r.value(),selectionManager:()=>l.listState().selectionManager(),disabled:()=>n.disabled(),shouldSelectOnPressUp:!0},()=>s),d=g=>{["Enter"," "].includes(g.key)&&g.preventDefault(),_(g,i.onKeyDown),_(g,u.onKeyDown)};return k(()=>S(r.registerTriggerId(a.id))),c(ve,P({ref(g){var v=ee(y=>s=y,i.ref);typeof v=="function"&&v(g)},get"data-key"(){return u.dataKey()},get onPointerDown(){return E([i.onPointerDown,u.onPointerDown])},get onPointerUp(){return E([i.onPointerUp,u.onPointerUp])},get onClick(){return E([i.onClick,u.onClick])},onKeyDown:d,get onMouseDown(){return E([i.onMouseDown,u.onMouseDown])},get onFocus(){return E([i.onFocus,u.onFocus])}},a))}var Mt=Object.assign(He,{Content:Be,Header:Le,Item:Ne,Trigger:We}),At=M('<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 Ft=e=>{const{t:s}=ut(),l=H(()=>at(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),r=H(()=>l().inputTokens??0),n=H(()=>l().outputTokens??0),o=H(()=>{const i=l().isSubscriptionModel?0:l().cost;return i>0?i:0}),t=H(()=>`$${o().toFixed(2)}`);return(()=>{var i=At(),a=i.firstChild,u=a.firstChild,d=u.firstChild,g=d.nextSibling,v=u.nextSibling,y=v.firstChild,x=y.nextSibling,m=v.nextSibling,C=m.firstChild,p=C.nextSibling;return h(d,()=>s("contextUsagePanel.labels.input")),h(g,()=>Ce(r())),h(y,()=>s("contextUsagePanel.labels.output")),h(x,()=>Ce(n())),h(C,()=>s("contextUsagePanel.labels.cost")),h(p,t),ge(()=>Xe(i,`session-context-panel px-4 py-2 ${e.class??""}`)),i})()};var z=M('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),Rt=M('<div class="flex flex-col gap-3 min-h-0"><div class="flex items-center justify-between gap-2 text-[11px] text-secondary"><span></span><span class="flex items-center gap-2"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)></span></span></div><div class="rounded-md border border-base bg-surface-secondary p-2 max-h-[40vh] overflow-y-auto"><div class="flex flex-col">'),Kt=M('<button type=button class="border-b border-base last:border-b-0 text-left hover:bg-surface-muted rounded-sm"><div class="flex items-center justify-between gap-3"><div class="text-xs font-mono text-primary min-w-0 flex-1 overflow-hidden whitespace-nowrap"style=text-overflow:ellipsis;direction:rtl;text-align:left;unicode-bidi:plaintext></div><div class="flex items-center gap-2 text-[11px] flex-shrink-0"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)>'),Bt=M('<div class="flex flex-col gap-2">'),Lt=M("<span>"),Ut=M('<div class=status-process-card><div class=status-process-header><span class=status-process-title></span><div class=status-process-meta><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">'),Nt=M("<div class=status-tab-container>"),Ht=M("<span class=section-left><span class=section-label>");const Qt=e=>{const s=t=>e.expandedItems().includes(t),o=[{id:"session-changes",labelKey:"instanceShell.rightPanel.sections.sessionChanges",tooltipKey:"instanceShell.rightPanel.sections.sessionChanges.tooltip",render:()=>{const t=e.activeSessionId();if(!t||t==="info")return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.noSessionSelected")),d})();const i=e.activeSessionDiffs();if(i===void 0)return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.loading")),d})();if(!Array.isArray(i)||i.length===0)return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.empty")),d})();const a=[...i].sort((d,g)=>String(d.file||"").localeCompare(String(g.file||""))),u=a.reduce((d,g)=>(d.additions+=typeof g.additions=="number"?g.additions:0,d.deletions+=typeof g.deletions=="number"?g.deletions:0,d),{additions:0,deletions:0});return(()=>{var d=Rt(),g=d.firstChild,v=g.firstChild,y=v.nextSibling,x=y.firstChild,m=x.nextSibling,C=g.nextSibling,p=C.firstChild;return h(v,()=>e.t("instanceShell.sessionChanges.filesChanged",{count:a.length})),h(x,()=>`+${u.additions}`),h(m,()=>`-${u.deletions}`),h(p,c(ce,{each:a,children:f=>(()=>{var w=Kt(),F=w.firstChild,R=F.firstChild,W=R.nextSibling,L=W.firstChild,U=L.nextSibling;return w.$$click=()=>e.onOpenChangesTab(f.file),h(R,()=>f.file),h(L,()=>`+${f.additions}`),h(U,()=>`-${f.deletions}`),ge(I=>{var oe=e.t("instanceShell.sessionChanges.actions.show"),X=f.file;return oe!==I.e&&B(w,"title",I.e=oe),X!==I.t&&B(R,"title",I.t=X),I},{e:void 0,t:void 0}),w})()})),d})()}},{id:"plan",labelKey:"instanceShell.rightPanel.sections.plan",tooltipKey:"instanceShell.rightPanel.sections.plan.tooltip",render:()=>{const t=e.activeSessionId();if(!t||t==="info")return(()=>{var a=z(),u=a.firstChild;return h(u,()=>e.t("instanceShell.plan.noSessionSelected")),a})();const i=e.latestTodoState();return i?c(gt,{state:i,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var a=z(),u=a.firstChild;return h(u,()=>e.t("instanceShell.plan.empty")),a})()}},{id:"background-processes",labelKey:"instanceShell.rightPanel.sections.backgroundProcesses",tooltipKey:"instanceShell.rightPanel.sections.backgroundProcesses.tooltip",render:()=>{const t=e.backgroundProcessList();return t.length===0?(()=>{var i=z(),a=i.firstChild;return h(a,()=>e.t("instanceShell.backgroundProcesses.empty")),i})():(()=>{var i=Bt();return h(i,c(ce,{each:t,children:a=>(()=>{var u=Ut(),d=u.firstChild,g=d.firstChild,v=g.nextSibling,y=v.firstChild,x=d.nextSibling,m=x.firstChild,C=m.nextSibling,p=C.nextSibling;return h(g,()=>a.title),h(y,()=>e.t("instanceShell.backgroundProcesses.status",{status:a.status})),h(v,c(Q,{get when(){return typeof a.outputSizeBytes=="number"},get children(){var f=Lt();return h(f,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((a.outputSizeBytes??0)/1024)})),f}}),null),m.$$click=()=>e.onOpenBackgroundOutput(a),h(m,c(mt,{class:"h-4 w-4"})),C.$$click=()=>e.onStopBackgroundProcess(a.id),h(C,c(vt,{class:"h-4 w-4"})),p.$$click=()=>e.onTerminateBackgroundProcess(a.id),h(p,c(dt,{class:"h-4 w-4"})),ge(f=>{var w=e.t("instanceShell.backgroundProcesses.actions.output"),F=e.t("instanceShell.backgroundProcesses.actions.output"),R=a.status!=="running",W=e.t("instanceShell.backgroundProcesses.actions.stop"),L=e.t("instanceShell.backgroundProcesses.actions.stop"),U=e.t("instanceShell.backgroundProcesses.actions.terminate"),I=e.t("instanceShell.backgroundProcesses.actions.terminate");return w!==f.e&&B(m,"aria-label",f.e=w),F!==f.t&&B(m,"title",f.t=F),R!==f.a&&(C.disabled=f.a=R),W!==f.o&&B(C,"aria-label",f.o=W),L!==f.i&&B(C,"title",f.i=L),U!==f.n&&B(p,"aria-label",f.n=U),I!==f.s&&B(p,"title",f.s=I),f},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),u})()})),i})()}},{id:"mcp",labelKey:"instanceShell.rightPanel.sections.mcp",tooltipKey:"instanceShell.rightPanel.sections.mcp.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"lsp",labelKey:"instanceShell.rightPanel.sections.lsp",tooltipKey:"instanceShell.rightPanel.sections.lsp.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"plugins",labelKey:"instanceShell.rightPanel.sections.plugins",tooltipKey:"instanceShell.rightPanel.sections.plugins.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}];return(()=>{var t=Nt();return h(t,c(Q,{get when(){return e.activeSession()},children:i=>c(Ft,{get instanceId(){return e.instanceId},get sessionId(){return i().id},class:"status-tab-context-panel"})}),null),h(t,c(V.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return c(ce,{each:o,children:i=>c(V.Item,{get value(){return i.id},class:"right-panel-accordion-item",get children(){return[c(V.Header,{get children(){return c(V.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var a=Ht(),u=a.firstChild;return h(a,c(Y,{openDelay:200,gutter:4,placement:"top",get children(){return[c(Y.Trigger,{class:"section-info-trigger",get"aria-label"(){return e.t(i.tooltipKey)},onClick:d=>d.stopPropagation(),get children(){return c(ft,{class:"section-info-icon"})}}),c(Y.Portal,{get children(){return c(Y.Content,{class:"section-info-tooltip",get children(){return e.t(i.tooltipKey)}})}})]}}),u),h(u,()=>e.t(i.labelKey)),a})(),c(ct,{get class(){return`right-panel-accordion-chevron ${s(i.id)?"right-panel-accordion-chevron-expanded":""}`}})]}})}}),c(V.Content,{class:"right-panel-accordion-content",get children(){return i.render()}})]}})})}}),null),t})()};Ge(["click"]);export{Qt as default};
|
|
1
|
+
import{m as we,P as Ve,t as M,i as h,a as Xe,d as B,f as Ge}from"./monaco-viewer-DTwkOabu.js";import{n as c,m as P,b as k,o as S,k as Z,l as J,q as re,s as D,d as T,c as H,S as Q,t as Ye,w as xe,a as ge,F as ce}from"./git-diff-vendor-CAv-4upN.js";import{I as pe,N as Qe,O as A,P as se,Q as Ze,T as Je,U as Pe,V as Se,W as Ie,X as et,Y as de,Z as ie,_ as le,$ as Te,a0 as ee,a1 as te,a2 as tt,a3 as fe,a4 as nt,a5 as ot,a6 as _,a7 as he,a8 as st,a9 as it,aa as rt,ab as E,ac as lt,ad as at,ae as Ce,af as ct,ag as ue,ah as dt}from"./main-By_B3-BG.js";import{u as ut}from"./index-Bjox8T8a.js";import{T as gt}from"./todo-CW64L-p2.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";const pt=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],ft=e=>c(pe,P(e,{name:"Info",iconNode:pt})),ht=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],mt=e=>c(pe,P(e,{name:"TerminalSquare",iconNode:ht})),bt=[["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"}]],vt=e=>c(pe,P(e,{name:"XOctagon",iconNode:bt}));var ke=Z();function yt(){return J(ke)}function xt(){const e=yt();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function $e(e,s){return!!(s.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function Ct(e,s){var n;const l=s.ref();if(!l)return-1;let r=e.length;if(!r)return-1;for(;r--;){const o=(n=e[r])==null?void 0:n.ref();if(o&&$e(o,l))return r+1}return 0}function wt(e){const s=e.map((r,n)=>[n,r]);let l=!1;return s.sort(([r,n],[o,t])=>{const i=n.ref(),a=t.ref();return i===a||!i||!a?0:$e(i,a)?(r>o&&(l=!0),-1):(r<o&&(l=!0),1)}),l?s.map(([r,n])=>n):e}function De(e,s){const l=wt(e);e!==l&&s(l)}function Pt(e){var n,o;const s=e[0],l=(n=e[e.length-1])==null?void 0:n.ref();let r=(o=s==null?void 0:s.ref())==null?void 0:o.parentElement;for(;r;){if(l&&r.contains(l))return r;r=r.parentElement}return se(r).body}function St(e,s){k(()=>{const l=setTimeout(()=>{De(e(),s)});S(()=>clearTimeout(l))})}function It(e,s){if(typeof IntersectionObserver!="function"){St(e,s);return}let l=[];k(()=>{const r=()=>{const t=!!l.length;l=e(),t&&De(e(),s)},n=Pt(e()),o=new IntersectionObserver(r,{root:n});for(const t of e()){const i=t.ref();i&&o.observe(i)}S(()=>o.disconnect())})}function Tt(e={}){const[s,l]=Qe({value:()=>Je(e.items),onChange:o=>{var t;return(t=e.onItemsChange)==null?void 0:t.call(e,o)}});It(s,l);const r=o=>(l(t=>{const i=Ct(t,o);return Ze(t,o,i)}),()=>{l(t=>{const i=t.filter(a=>a.ref()!==o.ref());return t.length===i.length?t:i})});return{DomCollectionProvider:o=>c(ke.Provider,{value:{registerItem:r},get children(){return o.children}})}}function kt(e){const s=xt(),l=A({shouldRegisterItem:!0},e);k(()=>{if(!l.shouldRegisterItem)return;const r=s.registerItem(l.getItem());S(r)})}var $t={};he($t,{Arrow:()=>Pe,Content:()=>_e,Portal:()=>Ee,Root:()=>Me,Tooltip:()=>Y,Trigger:()=>Ae,useTooltipContext:()=>ae});var Oe=Z();function ae(){const e=J(Oe);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function _e(e){const s=ae(),l=A({id:s.generateId("content")},e),[r,n]=D(l,["ref","style"]);return k(()=>S(s.registerContentId(n.id))),c(Q,{get when(){return s.contentPresent()},get children(){return c(Te.Positioner,{get children(){return c(tt,P({ref(o){var t=ee(i=>{s.setContentRef(i)},r.ref);typeof t=="function"&&t(o)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return fe({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},r.style)},onFocusOutside:o=>o.preventDefault(),onDismiss:()=>s.hideTooltip(!0)},()=>s.dataset(),n))}})}})}function Ee(e){const s=ae();return c(Q,{get when(){return s.contentPresent()},get children(){return c(Ve,e)}})}function Dt(e,s,l){const r=e.split("-")[0],n=s.getBoundingClientRect(),o=l.getBoundingClientRect(),t=[],i=n.left+n.width/2,a=n.top+n.height/2;switch(r){case"top":t.push([n.left,a]),t.push([o.left,o.bottom]),t.push([o.left,o.top]),t.push([o.right,o.top]),t.push([o.right,o.bottom]),t.push([n.right,a]);break;case"right":t.push([i,n.top]),t.push([o.left,o.top]),t.push([o.right,o.top]),t.push([o.right,o.bottom]),t.push([o.left,o.bottom]),t.push([i,n.bottom]);break;case"bottom":t.push([n.left,a]),t.push([o.left,o.top]),t.push([o.left,o.bottom]),t.push([o.right,o.bottom]),t.push([o.right,o.top]),t.push([n.right,a]);break;case"left":t.push([i,n.top]),t.push([o.right,o.top]),t.push([o.left,o.top]),t.push([o.left,o.bottom]),t.push([o.right,o.bottom]),t.push([i,n.bottom]);break}return t}var N={},Ot=0,j=!1,O,G,q;function Me(e){const s=`tooltip-${re()}`,l=`${++Ot}`,r=A({id:s,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[n,o]=D(r,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let t;const[i,a]=T(),[u,d]=T(),[g,v]=T(),[y,x]=T(o.placement),m=Se({open:()=>n.open,defaultOpen:()=>n.defaultOpen,onOpenChange:b=>{var $;return($=n.onOpenChange)==null?void 0:$.call(n,b)}}),{present:C}=Ie({show:()=>n.forceMount||m.isOpen(),element:()=>g()??null}),p=()=>{N[l]=w},f=()=>{for(const b in N)b!==l&&(N[b](!0),delete N[b])},w=(b=!1)=>{b||n.closeDelay&&n.closeDelay<=0?(window.clearTimeout(t),t=void 0,m.close()):t||(t=window.setTimeout(()=>{t=void 0,m.close()},n.closeDelay)),window.clearTimeout(O),O=void 0,n.skipDelayDuration&&n.skipDelayDuration>=0&&(q=window.setTimeout(()=>{window.clearTimeout(q),q=void 0},n.skipDelayDuration)),j&&(window.clearTimeout(G),G=window.setTimeout(()=>{delete N[l],G=void 0,j=!1},n.closeDelay))},F=()=>{clearTimeout(t),t=void 0,f(),p(),j=!0,m.open(),window.clearTimeout(O),O=void 0,window.clearTimeout(G),G=void 0,window.clearTimeout(q),q=void 0},R=()=>{f(),p(),!m.isOpen()&&!O&&!j?O=window.setTimeout(()=>{O=void 0,j=!0,F()},n.openDelay):m.isOpen()||F()},W=(b=!1)=>{!b&&n.openDelay&&n.openDelay>0&&!t&&!q?R():F()},L=()=>{window.clearTimeout(O),O=void 0,j=!1},U=()=>{window.clearTimeout(t),t=void 0},I=b=>de(u(),b)||de(g(),b),oe=b=>{const $=u(),K=g();if(!(!$||!K))return Dt(b,$,K)},X=b=>{const $=b.target;if(I($)){U();return}if(!n.ignoreSafeArea){const K=oe(y());if(K&&nt(ot(b),K)){U();return}}t||w()};k(()=>{if(!m.isOpen())return;const b=se();b.addEventListener("pointermove",X,!0),S(()=>{b.removeEventListener("pointermove",X,!0)})}),k(()=>{const b=u();if(!b||!m.isOpen())return;const $=qe=>{const ze=qe.target;de(ze,b)&&w(!0)},K=et();K.addEventListener("scroll",$,{capture:!0}),S(()=>{K.removeEventListener("scroll",$,{capture:!0})})}),S(()=>{clearTimeout(t),N[l]&&delete N[l]});const je={dataset:H(()=>({"data-expanded":m.isOpen()?"":void 0,"data-closed":m.isOpen()?void 0:""})),isOpen:m.isOpen,isDisabled:()=>n.disabled??!1,triggerOnFocusOnly:()=>n.triggerOnFocusOnly??!1,contentId:i,contentPresent:C,openTooltip:W,hideTooltip:w,cancelOpening:L,generateId:le(()=>r.id),registerContentId:ie(a),isTargetOnTooltip:I,setTriggerRef:d,setContentRef:v};return c(Oe.Provider,{value:je,get children(){return c(Te,P({anchorRef:u,contentRef:g,onCurrentPlacementChange:x},o))}})}function Ae(e){let s;const l=ae(),[r,n]=D(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let o=!1,t=!1,i=!1;const a=()=>{o=!1},u=()=>{!l.isOpen()&&(t||i)&&l.openTooltip(i)},d=p=>{l.isOpen()&&!t&&!i&&l.hideTooltip(p)},g=p=>{_(p,r.onPointerEnter),!(p.pointerType==="touch"||l.triggerOnFocusOnly()||l.isDisabled()||p.defaultPrevented)&&(t=!0,u())},v=p=>{_(p,r.onPointerLeave),p.pointerType!=="touch"&&(t=!1,i=!1,l.isOpen()?d():l.cancelOpening())},y=p=>{_(p,r.onPointerDown),o=!0,se(s).addEventListener("pointerup",a,{once:!0})},x=p=>{_(p,r.onClick),t=!1,i=!1,d(!0)},m=p=>{_(p,r.onFocus),!(l.isDisabled()||p.defaultPrevented||o)&&(i=!0,u())},C=p=>{_(p,r.onBlur);const f=p.relatedTarget;l.isTargetOnTooltip(f)||(t=!1,i=!1,d(!0))};return S(()=>{se(s).removeEventListener("pointerup",a)}),c(te,P({as:"button",ref(p){var f=ee(w=>{l.setTriggerRef(w),s=w},r.ref);typeof f=="function"&&f(p)},get"aria-describedby"(){return we(()=>!!l.isOpen())()?l.contentId():void 0},onPointerEnter:g,onPointerLeave:v,onPointerDown:y,onClick:x,onFocus:m,onBlur:C},()=>l.dataset(),n))}var Y=Object.assign(Me,{Arrow:Pe,Content:_e,Portal:Ee,Trigger:Ae}),_t={};he(_t,{Collapsible:()=>Et,Content:()=>me,Root:()=>be,Trigger:()=>ve,useCollapsibleContext:()=>ne});var Fe=Z();function ne(){const e=J(Fe);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function me(e){const[s,l]=T(),r=ne(),n=A({id:r.generateId("content")},e),[o,t]=D(n,["ref","id","style"]),{present:i}=Ie({show:r.shouldMount,element:()=>s()??null}),[a,u]=T(0),[d,g]=T(0);let y=r.isOpen()||i();return Ye(()=>{const x=requestAnimationFrame(()=>{y=!1});S(()=>{cancelAnimationFrame(x)})}),k(xe(i,()=>{if(!s())return;s().style.transitionDuration="0s",s().style.animationName="none";const x=s().getBoundingClientRect();u(x.height),g(x.width),y||(s().style.transitionDuration="",s().style.animationName="")})),k(xe(r.isOpen,x=>{!x&&s()&&(s().style.transitionDuration="",s().style.animationName="")},{defer:!0})),k(()=>S(r.registerContentId(o.id))),c(Q,{get when(){return i()},get children(){return c(te,P({as:"div",ref(x){var m=ee(l,o.ref);typeof m=="function"&&m(x)},get id(){return o.id},get style(){return fe({"--kb-collapsible-content-height":a()?`${a()}px`:void 0,"--kb-collapsible-content-width":d()?`${d()}px`:void 0},o.style)}},()=>r.dataset(),t))}})}function be(e){const s=`collapsible-${re()}`,l=A({id:s},e),[r,n]=D(l,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[o,t]=T(),i=Se({open:()=>r.open,defaultOpen:()=>r.defaultOpen,onOpenChange:d=>{var g;return(g=r.onOpenChange)==null?void 0:g.call(r,d)}}),a=H(()=>({"data-expanded":i.isOpen()?"":void 0,"data-closed":i.isOpen()?void 0:"","data-disabled":r.disabled?"":void 0})),u={dataset:a,isOpen:i.isOpen,disabled:()=>r.disabled??!1,shouldMount:()=>r.forceMount||i.isOpen(),contentId:o,toggle:i.toggle,generateId:le(()=>n.id),registerContentId:ie(t)};return c(Fe.Provider,{value:u,get children(){return c(te,P({as:"div"},a,n))}})}function ve(e){const s=ne(),[l,r]=D(e,["onClick"]);return c(st,P({get"aria-expanded"(){return s.isOpen()},get"aria-controls"(){return we(()=>!!s.isOpen())()?s.contentId():void 0},get disabled(){return s.disabled()},onClick:o=>{_(o,l.onClick),s.toggle()}},()=>s.dataset(),r))}var Et=Object.assign(be,{Content:me,Trigger:ve}),V={};he(V,{Accordion:()=>Mt,Content:()=>Be,Header:()=>Le,Item:()=>Ne,Root:()=>He,Trigger:()=>We,useAccordionContext:()=>ye});var Re=Z();function Ke(){const e=J(Re);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function Be(e){const s=Ke(),l=s.generateId("content"),r=A({id:l},e),[n,o]=D(r,["id","style"]);return k(()=>S(s.registerContentId(n.id))),c(me,P({role:"region",get"aria-labelledby"(){return s.triggerId()},get style(){return fe({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},n.style)}},o))}function Le(e){const s=ne();return c(te,P({as:"h3"},()=>s.dataset(),e))}var Ue=Z();function ye(){const e=J(Ue);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function Ne(e){const s=ye(),l=`${s.generateId("item")}-${re()}`,r=A({id:l},e),[n,o]=D(r,["value","disabled"]),[t,i]=T(),[a,u]=T(),d=()=>s.listState().selectionManager(),g=()=>d().isSelected(n.value),v={value:()=>n.value,triggerId:t,contentId:a,generateId:le(()=>o.id),registerTriggerId:ie(i),registerContentId:ie(u)};return c(Re.Provider,{value:v,get children(){return c(be,P({get open(){return g()},get disabled(){return n.disabled}},o))}})}function He(e){let s;const l=`accordion-${re()}`,r=A({id:l,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[n,o]=D(r,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[t,i]=T([]),{DomCollectionProvider:a}=Tt({items:t,onItemsChange:i}),u=it({selectedKeys:()=>n.value,defaultSelectedKeys:()=>n.defaultValue,onSelectionChange:v=>{var y;return(y=n.onChange)==null?void 0:y.call(n,Array.from(v))},disallowEmptySelection:()=>!n.multiple&&!n.collapsible,selectionMode:()=>n.multiple?"multiple":"single",dataSource:t});u.selectionManager().setFocusedKey("item-1");const d=rt({selectionManager:()=>u.selectionManager(),collection:()=>u.collection(),disallowEmptySelection:()=>u.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>n.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>s),g={listState:()=>u,generateId:le(()=>n.id)};return c(a,{get children(){return c(Ue.Provider,{value:g,get children(){return c(te,P({as:"div",get id(){return n.id},ref(v){var y=ee(x=>s=x,n.ref);typeof y=="function"&&y(v)},get onKeyDown(){return E([n.onKeyDown,d.onKeyDown])},get onMouseDown(){return E([n.onMouseDown,d.onMouseDown])},get onFocusIn(){return E([n.onFocusIn])},get onFocusOut(){return E([n.onFocusOut,d.onFocusOut])}},o))}})}})}function We(e){let s;const l=ye(),r=Ke(),n=ne(),o=r.generateId("trigger"),t=A({id:o},e),[i,a]=D(t,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);kt({getItem:()=>({ref:()=>s,type:"item",key:r.value(),textValue:"",disabled:n.disabled()})});const u=lt({key:()=>r.value(),selectionManager:()=>l.listState().selectionManager(),disabled:()=>n.disabled(),shouldSelectOnPressUp:!0},()=>s),d=g=>{["Enter"," "].includes(g.key)&&g.preventDefault(),_(g,i.onKeyDown),_(g,u.onKeyDown)};return k(()=>S(r.registerTriggerId(a.id))),c(ve,P({ref(g){var v=ee(y=>s=y,i.ref);typeof v=="function"&&v(g)},get"data-key"(){return u.dataKey()},get onPointerDown(){return E([i.onPointerDown,u.onPointerDown])},get onPointerUp(){return E([i.onPointerUp,u.onPointerUp])},get onClick(){return E([i.onClick,u.onClick])},onKeyDown:d,get onMouseDown(){return E([i.onMouseDown,u.onMouseDown])},get onFocus(){return E([i.onFocus,u.onFocus])}},a))}var Mt=Object.assign(He,{Content:Be,Header:Le,Item:Ne,Trigger:We}),At=M('<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 Ft=e=>{const{t:s}=ut(),l=H(()=>at(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),r=H(()=>l().inputTokens??0),n=H(()=>l().outputTokens??0),o=H(()=>{const i=l().isSubscriptionModel?0:l().cost;return i>0?i:0}),t=H(()=>`$${o().toFixed(2)}`);return(()=>{var i=At(),a=i.firstChild,u=a.firstChild,d=u.firstChild,g=d.nextSibling,v=u.nextSibling,y=v.firstChild,x=y.nextSibling,m=v.nextSibling,C=m.firstChild,p=C.nextSibling;return h(d,()=>s("contextUsagePanel.labels.input")),h(g,()=>Ce(r())),h(y,()=>s("contextUsagePanel.labels.output")),h(x,()=>Ce(n())),h(C,()=>s("contextUsagePanel.labels.cost")),h(p,t),ge(()=>Xe(i,`session-context-panel px-4 py-2 ${e.class??""}`)),i})()};var z=M('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),Rt=M('<div class="flex flex-col gap-3 min-h-0"><div class="flex items-center justify-between gap-2 text-[11px] text-secondary"><span></span><span class="flex items-center gap-2"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)></span></span></div><div class="rounded-md border border-base bg-surface-secondary p-2 max-h-[40vh] overflow-y-auto"><div class="flex flex-col">'),Kt=M('<button type=button class="border-b border-base last:border-b-0 text-left hover:bg-surface-muted rounded-sm"><div class="flex items-center justify-between gap-3"><div class="text-xs font-mono text-primary min-w-0 flex-1 overflow-hidden whitespace-nowrap"style=text-overflow:ellipsis;direction:rtl;text-align:left;unicode-bidi:plaintext></div><div class="flex items-center gap-2 text-[11px] flex-shrink-0"><span style=color:var(--session-status-idle-fg)></span><span style=color:var(--session-status-working-fg)>'),Bt=M('<div class="flex flex-col gap-2">'),Lt=M("<span>"),Ut=M('<div class=status-process-card><div class=status-process-header><span class=status-process-title></span><div class=status-process-meta><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">'),Nt=M("<div class=status-tab-container>"),Ht=M("<span class=section-left><span class=section-label>");const Qt=e=>{const s=t=>e.expandedItems().includes(t),o=[{id:"session-changes",labelKey:"instanceShell.rightPanel.sections.sessionChanges",tooltipKey:"instanceShell.rightPanel.sections.sessionChanges.tooltip",render:()=>{const t=e.activeSessionId();if(!t||t==="info")return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.noSessionSelected")),d})();const i=e.activeSessionDiffs();if(i===void 0)return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.loading")),d})();if(!Array.isArray(i)||i.length===0)return(()=>{var d=z(),g=d.firstChild;return h(g,()=>e.t("instanceShell.sessionChanges.empty")),d})();const a=[...i].sort((d,g)=>String(d.file||"").localeCompare(String(g.file||""))),u=a.reduce((d,g)=>(d.additions+=typeof g.additions=="number"?g.additions:0,d.deletions+=typeof g.deletions=="number"?g.deletions:0,d),{additions:0,deletions:0});return(()=>{var d=Rt(),g=d.firstChild,v=g.firstChild,y=v.nextSibling,x=y.firstChild,m=x.nextSibling,C=g.nextSibling,p=C.firstChild;return h(v,()=>e.t("instanceShell.sessionChanges.filesChanged",{count:a.length})),h(x,()=>`+${u.additions}`),h(m,()=>`-${u.deletions}`),h(p,c(ce,{each:a,children:f=>(()=>{var w=Kt(),F=w.firstChild,R=F.firstChild,W=R.nextSibling,L=W.firstChild,U=L.nextSibling;return w.$$click=()=>e.onOpenChangesTab(f.file),h(R,()=>f.file),h(L,()=>`+${f.additions}`),h(U,()=>`-${f.deletions}`),ge(I=>{var oe=e.t("instanceShell.sessionChanges.actions.show"),X=f.file;return oe!==I.e&&B(w,"title",I.e=oe),X!==I.t&&B(R,"title",I.t=X),I},{e:void 0,t:void 0}),w})()})),d})()}},{id:"plan",labelKey:"instanceShell.rightPanel.sections.plan",tooltipKey:"instanceShell.rightPanel.sections.plan.tooltip",render:()=>{const t=e.activeSessionId();if(!t||t==="info")return(()=>{var a=z(),u=a.firstChild;return h(u,()=>e.t("instanceShell.plan.noSessionSelected")),a})();const i=e.latestTodoState();return i?c(gt,{state:i,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var a=z(),u=a.firstChild;return h(u,()=>e.t("instanceShell.plan.empty")),a})()}},{id:"background-processes",labelKey:"instanceShell.rightPanel.sections.backgroundProcesses",tooltipKey:"instanceShell.rightPanel.sections.backgroundProcesses.tooltip",render:()=>{const t=e.backgroundProcessList();return t.length===0?(()=>{var i=z(),a=i.firstChild;return h(a,()=>e.t("instanceShell.backgroundProcesses.empty")),i})():(()=>{var i=Bt();return h(i,c(ce,{each:t,children:a=>(()=>{var u=Ut(),d=u.firstChild,g=d.firstChild,v=g.nextSibling,y=v.firstChild,x=d.nextSibling,m=x.firstChild,C=m.nextSibling,p=C.nextSibling;return h(g,()=>a.title),h(y,()=>e.t("instanceShell.backgroundProcesses.status",{status:a.status})),h(v,c(Q,{get when(){return typeof a.outputSizeBytes=="number"},get children(){var f=Lt();return h(f,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((a.outputSizeBytes??0)/1024)})),f}}),null),m.$$click=()=>e.onOpenBackgroundOutput(a),h(m,c(mt,{class:"h-4 w-4"})),C.$$click=()=>e.onStopBackgroundProcess(a.id),h(C,c(vt,{class:"h-4 w-4"})),p.$$click=()=>e.onTerminateBackgroundProcess(a.id),h(p,c(dt,{class:"h-4 w-4"})),ge(f=>{var w=e.t("instanceShell.backgroundProcesses.actions.output"),F=e.t("instanceShell.backgroundProcesses.actions.output"),R=a.status!=="running",W=e.t("instanceShell.backgroundProcesses.actions.stop"),L=e.t("instanceShell.backgroundProcesses.actions.stop"),U=e.t("instanceShell.backgroundProcesses.actions.terminate"),I=e.t("instanceShell.backgroundProcesses.actions.terminate");return w!==f.e&&B(m,"aria-label",f.e=w),F!==f.t&&B(m,"title",f.t=F),R!==f.a&&(C.disabled=f.a=R),W!==f.o&&B(C,"aria-label",f.o=W),L!==f.i&&B(C,"title",f.i=L),U!==f.n&&B(p,"aria-label",f.n=U),I!==f.s&&B(p,"title",f.s=I),f},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),u})()})),i})()}},{id:"mcp",labelKey:"instanceShell.rightPanel.sections.mcp",tooltipKey:"instanceShell.rightPanel.sections.mcp.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["mcp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"lsp",labelKey:"instanceShell.rightPanel.sections.lsp",tooltipKey:"instanceShell.rightPanel.sections.lsp.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["lsp"],showSectionHeadings:!1,class:"space-y-2"})},{id:"plugins",labelKey:"instanceShell.rightPanel.sections.plugins",tooltipKey:"instanceShell.rightPanel.sections.plugins.tooltip",render:()=>c(ue,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}];return(()=>{var t=Nt();return h(t,c(Q,{get when(){return e.activeSession()},children:i=>c(Ft,{get instanceId(){return e.instanceId},get sessionId(){return i().id},class:"status-tab-context-panel"})}),null),h(t,c(V.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return c(ce,{each:o,children:i=>c(V.Item,{get value(){return i.id},class:"right-panel-accordion-item",get children(){return[c(V.Header,{get children(){return c(V.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var a=Ht(),u=a.firstChild;return h(a,c(Y,{openDelay:200,gutter:4,placement:"top",get children(){return[c(Y.Trigger,{class:"section-info-trigger",get"aria-label"(){return e.t(i.tooltipKey)},onClick:d=>d.stopPropagation(),get children(){return c(ft,{class:"section-info-icon"})}}),c(Y.Portal,{get children(){return c(Y.Content,{class:"section-info-tooltip",get children(){return e.t(i.tooltipKey)}})}})]}}),u),h(u,()=>e.t(i.labelKey)),a})(),c(ct,{get class(){return`right-panel-accordion-chevron ${s(i.id)?"right-panel-accordion-chevron-expanded":""}`}})]}})}}),c(V.Content,{class:"right-panel-accordion-content",get children(){return i.render()}})]}})})}}),null),t})()};Ge(["click"]);export{Qt as default};
|