@vividcodeai/embeddedcowork 0.0.5 → 0.0.8

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.
Files changed (39) hide show
  1. package/dist/config/schema.js +1 -0
  2. package/dist/events/bus.js +2 -0
  3. package/dist/index.js +30 -0
  4. package/dist/opencode-downloader.js +295 -0
  5. package/dist/opencode-paths.js +167 -0
  6. package/dist/server/http-server.js +2 -0
  7. package/dist/server/routes/opencode-status.js +10 -0
  8. package/dist/workspaces/manager.js +68 -56
  9. package/package.json +3 -1
  10. package/public/assets/{ChangesTab-C2DJXDf9.js → ChangesTab-C4_zdV74.js} +2 -2
  11. package/public/assets/{DiffToolbar-De-3SRCF.js → DiffToolbar-BsUPigM5.js} +1 -1
  12. package/public/assets/{FilesTab-BuQ00MEc.js → FilesTab-Drvo30nM.js} +2 -2
  13. package/public/assets/{GitChangesTab-D9bf2jkM.js → GitChangesTab-BhV6qTfP.js} +2 -2
  14. package/public/assets/{SplitFilePanel-B-3h60o2.js → SplitFilePanel-BBrs329I.js} +1 -1
  15. package/public/assets/{StatusTab-D5s19fRN.js → StatusTab-DfYWlTSX.js} +1 -1
  16. package/public/assets/{bundle-full-CdNbUxmo.js → bundle-full-CAZqmV2E.js} +1 -1
  17. package/public/assets/{diff-viewer-B1l_VZc1.js → diff-viewer--UIZ5GEn.js} +1 -1
  18. package/public/assets/{index-C9Tl2tHH.js → index--0EL0_Tu.js} +2 -2
  19. package/public/assets/{index-BErmCqgL.js → index-BLouhjer.js} +1 -1
  20. package/public/assets/{index-ixx_g9gD.js → index-CgjnEdBS.js} +1 -1
  21. package/public/assets/{index-BQeBs108.js → index-ChCPoe9m.js} +1 -1
  22. package/public/assets/{index-B2LsA7hD.js → index-Co-dJ-Xs.js} +1 -1
  23. package/public/assets/index-Ctcq8Rhl.css +1 -0
  24. package/public/assets/{index-BqQARTCd.js → index-Da0V-sLI.js} +1 -1
  25. package/public/assets/{index-BKvZBimW.js → index-hOT6sqTO.js} +1 -1
  26. package/public/assets/{loading-CQjaT4lJ.js → loading-CvW03p4Z.js} +1 -1
  27. package/public/assets/main-ByuKWHRz.js +53 -0
  28. package/public/assets/{markdown-D5eIdNMf.js → markdown-BBFC6uy4.js} +3 -3
  29. package/public/assets/{monaco-viewer-9Byc1Kpy.js → monaco-viewer-DnczYBfh.js} +8 -8
  30. package/public/assets/{todo-uxdyLWei.js → todo-BLpUqy61.js} +1 -1
  31. package/public/assets/{tool-call-C_JEoVSV.js → tool-call-B4Xz6FbC.js} +3 -3
  32. package/public/assets/{unified-picker-ePaJEYDm.js → unified-picker-BrzM_sH6.js} +1 -1
  33. package/public/assets/{wrap-text-S8HH4qqP.js → wrap-text-B1i7zgLk.js} +1 -1
  34. package/public/index.html +4 -4
  35. package/public/loading.html +4 -4
  36. package/public/sw.js +1 -1
  37. package/public/ui-version.json +1 -1
  38. package/public/assets/index-DElsPAzQ.css +0 -1
  39. package/public/assets/main-C1yBw4P8.js +0 -53
@@ -1,65 +1,17 @@
1
1
  import path from "path";
2
- import { spawnSync } from "child_process";
2
+ import os from "os";
3
+ import { createHash } from "crypto";
4
+ import { existsSync, mkdirSync } from "fs";
5
+ import { execSync, spawnSync } from "child_process";
3
6
  import { connect } from "net";
4
7
  import { FileSystemBrowser } from "../filesystem/browser";
5
8
  import { searchWorkspaceFiles } from "../filesystem/search";
6
9
  import { clearWorkspaceSearchCache } from "../filesystem/search-cache";
7
10
  import { WorkspaceRuntime } from "./runtime";
8
11
  import { getOpencodeConfigDir } from "../opencode-config.js";
12
+ import { BIN_DIR, BINARY_NAME, triggerBinaryDownload, resolveBinaryPathFromUserShell } from "../opencode-paths";
9
13
  import { buildOpencodeBasicAuthHeader, DEFAULT_OPENCODE_USERNAME, generateOpencodeServerPassword, OPENCODE_SERVER_PASSWORD_ENV, OPENCODE_SERVER_USERNAME_ENV, } from "./opencode-auth";
10
14
  const STARTUP_STABILITY_DELAY_MS = 1500;
11
- function defaultShellPath() {
12
- const configured = process.env.SHELL?.trim();
13
- if (configured) {
14
- return configured;
15
- }
16
- return process.platform === "darwin" ? "/bin/zsh" : "/bin/bash";
17
- }
18
- function shellEscape(input) {
19
- if (!input)
20
- return "''";
21
- return `'${input.replace(/'/g, `'\\''`)}'`;
22
- }
23
- function wrapCommandForShell(command, shellPath) {
24
- const shellName = path.basename(shellPath).toLowerCase();
25
- if (shellName.includes("bash")) {
26
- return `if [ -f ~/.bashrc ]; then source ~/.bashrc >/dev/null 2>&1; fi; ${command}`;
27
- }
28
- if (shellName.includes("zsh")) {
29
- return `if [ -f ~/.zshrc ]; then source ~/.zshrc >/dev/null 2>&1; fi; ${command}`;
30
- }
31
- return command;
32
- }
33
- function buildShellArgs(shellPath, command) {
34
- const shellName = path.basename(shellPath).toLowerCase();
35
- if (shellName.includes("zsh")) {
36
- return ["-l", "-i", "-c", command];
37
- }
38
- return ["-l", "-c", command];
39
- }
40
- function resolveBinaryPathFromUserShell(identifier) {
41
- if (process.platform === "win32") {
42
- return null;
43
- }
44
- const shellPath = defaultShellPath();
45
- const lookupCommand = wrapCommandForShell(`command -v ${shellEscape(identifier)}`, shellPath);
46
- const result = spawnSync(shellPath, buildShellArgs(shellPath, lookupCommand), {
47
- encoding: "utf8",
48
- env: {
49
- ...process.env,
50
- npm_config_prefix: undefined,
51
- NPM_CONFIG_PREFIX: undefined,
52
- },
53
- });
54
- if (result.status !== 0) {
55
- return null;
56
- }
57
- const resolved = String(result.stdout ?? "")
58
- .split(/\r?\n/)
59
- .map((line) => line.trim())
60
- .find((line) => line.length > 0);
61
- return resolved ?? null;
62
- }
63
15
  export class WorkspaceManager {
64
16
  constructor(options) {
65
17
  this.options = options;
@@ -104,11 +56,40 @@ export class WorkspaceManager {
104
56
  const browser = new FileSystemBrowser({ rootDir: workspace.path });
105
57
  browser.writeFile(relativePath, contents);
106
58
  }
59
+ /**
60
+ * Compute a deterministic workspace ID based on the folder's content identity.
61
+ *
62
+ * - If the folder is inside a git repository: ID is derived from the git root
63
+ * commit hash + the folder's relative path from git root. This ensures the
64
+ * ID stays the same when the folder is moved/renamed within the repo.
65
+ * - Otherwise: fall back to hashing the absolute path.
66
+ */
67
+ computeWorkspaceId(folder) {
68
+ const absPath = path.resolve(folder);
69
+ // Attempt git-based identity
70
+ try {
71
+ const topLevel = execSync("git rev-parse --show-toplevel", { cwd: absPath, encoding: "utf8", timeout: 5000 }).trim();
72
+ const rootHash = execSync("git rev-list --max-parents=0 HEAD", { cwd: absPath, encoding: "utf8", timeout: 5000 })
73
+ .trim()
74
+ .split("\n")
75
+ .filter(Boolean)
76
+ .sort()[0];
77
+ if (rootHash) {
78
+ const relPath = path.relative(topLevel, absPath) || "/";
79
+ return createHash("sha256").update(`${rootHash}:${relPath}`).digest("hex").slice(0, 12);
80
+ }
81
+ }
82
+ catch {
83
+ // Not a git repo or git unavailable — fall through
84
+ }
85
+ // Fallback: use absolute path hash
86
+ return createHash("sha256").update(absPath).digest("hex").slice(0, 12);
87
+ }
107
88
  async create(folder, name) {
108
- const id = `${Date.now().toString(36)}`;
109
- const binary = this.options.binaryResolver.resolveDefault();
110
- const resolvedBinaryPath = this.resolveBinaryPath(binary.path);
111
89
  const workspacePath = path.isAbsolute(folder) ? folder : path.resolve(this.options.rootDir, folder);
90
+ const id = this.computeWorkspaceId(workspacePath);
91
+ const binary = this.options.binaryResolver.resolveDefault();
92
+ let resolvedBinaryPath = this.resolveBinaryPath(binary.path);
112
93
  clearWorkspaceSearchCache(workspacePath);
113
94
  this.options.logger.info({ workspaceId: id, folder: workspacePath, binary: resolvedBinaryPath }, "Creating workspace");
114
95
  const proxyPath = `/workspaces/${id}/worktrees/root/instance`;
@@ -126,6 +107,17 @@ export class WorkspaceManager {
126
107
  };
127
108
  this.workspaces.set(id, descriptor);
128
109
  this.options.eventBus.publish({ type: "workspace.created", workspace: descriptor });
110
+ if (!existsSync(resolvedBinaryPath)) {
111
+ this.options.logger.info({ workspaceId: id, binary: resolvedBinaryPath }, "Binary not found, waiting for download");
112
+ await triggerBinaryDownload(this.options.logger);
113
+ resolvedBinaryPath = this.resolveBinaryPath(binary.path);
114
+ if (!existsSync(resolvedBinaryPath)) {
115
+ throw new Error(`OpenCode binary still not found after auto-download: ${resolvedBinaryPath}`);
116
+ }
117
+ descriptor.binaryId = resolvedBinaryPath;
118
+ descriptor.binaryLabel = "auto-downloaded";
119
+ this.options.logger.info({ workspaceId: id, path: resolvedBinaryPath }, "Binary ready after auto-download");
120
+ }
129
121
  const serverConfig = this.options.settings.getOwner("config", "server");
130
122
  const envVars = serverConfig?.environmentVariables;
131
123
  const userEnvironment = envVars && typeof envVars === "object" && !Array.isArray(envVars) ? envVars : {};
@@ -136,9 +128,24 @@ export class WorkspaceManager {
136
128
  throw new Error("Failed to build OpenCode auth header");
137
129
  }
138
130
  this.opencodeAuth.set(id, { username: opencodeUsername, password: opencodePassword, authorization });
131
+ // Determine session database path based on user preference.
132
+ // - "project": place DB inside the workspace folder so it travels with the project
133
+ // - "global": place DB in a centralized directory keyed by workspaceId
134
+ const sessionStorageMode = serverConfig?.sessionStorageMode ?? "project";
135
+ let dbPath;
136
+ if (sessionStorageMode === "global") {
137
+ dbPath = path.join(os.homedir(), ".embeddedcowork", "session-data", `${id}.db`);
138
+ }
139
+ else {
140
+ dbPath = path.join(workspacePath, ".embeddedcowork", "session", "data.db");
141
+ }
142
+ // Ensure parent directory exists before opencode starts; Database(path, { create: true })
143
+ // only creates the file, not intermediate directories.
144
+ mkdirSync(path.dirname(dbPath), { recursive: true });
139
145
  const environment = {
140
146
  ...userEnvironment,
141
147
  OPENCODE_CONFIG_DIR: this.opencodeConfigDir,
148
+ OPENCODE_DB: dbPath,
142
149
  EMBEDDEDCOWORK_INSTANCE_ID: id,
143
150
  EMBEDDEDCOWORK_BASE_URL: this.options.getServerBaseUrl(),
144
151
  ...(this.options.nodeExtraCaCertsPath ? { NODE_EXTRA_CA_CERTS: this.options.nodeExtraCaCertsPath } : {}),
@@ -257,6 +264,11 @@ export class WorkspaceManager {
257
264
  this.options.logger.debug({ identifier, resolved: shellResolved }, "Resolved binary path from user shell");
258
265
  return shellResolved;
259
266
  }
267
+ const installedPath = path.join(BIN_DIR, BINARY_NAME);
268
+ if (existsSync(installedPath)) {
269
+ this.options.logger.debug({ identifier, resolved: installedPath }, "Resolved binary path from installed directory");
270
+ return installedPath;
271
+ }
260
272
  return identifier;
261
273
  }
262
274
  pickBinaryCandidate(candidates) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vividcodeai/embeddedcowork",
3
- "version": "0.0.5",
3
+ "version": "0.0.8",
4
4
  "description": "EmbeddedCowork Server",
5
5
  "license": "MIT",
6
6
  "author": {
@@ -40,6 +40,7 @@
40
40
  "node-forge": "^1.3.3",
41
41
  "openai": "^6.27.0",
42
42
  "pino": "^9.4.0",
43
+ "tar": "^6.2.1",
43
44
  "undici": "^8.1.0",
44
45
  "yaml": "^2.4.2",
45
46
  "yauzl": "^2.10.0",
@@ -47,6 +48,7 @@
47
48
  },
48
49
  "devDependencies": {
49
50
  "@types/node-forge": "^1.3.14",
51
+ "@types/tar": "^6.1.13",
50
52
  "@types/yauzl": "^2.10.0",
51
53
  "bun": "^1.3.13",
52
54
  "cross-env": "^7.0.3",
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-9Byc1Kpy.js","assets/git-diff-vendor-CSgooKT_.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-C9Tl2tHH.js";import{m as B,t as g,i as a,d as w,a as z,f as N}from"./monaco-viewer-9Byc1Kpy.js";import{c as f,n as c,a as L,F,S as W,z as j,A as q}from"./git-diff-vendor-CSgooKT_.js";import{D as G}from"./DiffToolbar-De-3SRCF.js";import{S as H}from"./SplitFilePanel-B-3h60o2.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./main-C1yBw4P8.js";import"./core-DhEqZVGG.js";import"./event-DjZVAIBO.js";import"./wrap-text-S8HH4qqP.js";var J=g('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),T=g("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Q=g('<div class="p-3 text-xs text-secondary">'),E=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-9Byc1Kpy.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),ue=e=>{const M=f(()=>e.activeSessionId()),S=f(()=>!!(M()&&M()!=="info")),D=f(()=>S()?e.activeSessionDiffs():null),m=f(()=>{const n=D();return Array.isArray(n)?[...n].sort((i,l)=>String(i.file||"").localeCompare(String(l.file||""))):[]}),R=f(()=>m().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})),I=f(()=>{const n=m();return n.length===0?null:n.reduce((i,l)=>{const v=typeof(i==null?void 0:i.additions)=="number"?i.additions:0,y=typeof(i==null?void 0:i.deletions)=="number"?i.deletions:0,x=v+y,p=typeof(l==null?void 0:l.additions)=="number"?l.additions:0,t=typeof(l==null?void 0:l.deletions)=="number"?l.deletions:0,r=p+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=m();if(n){const l=i.find(v=>v.file===n);if(l)return l}return I()}),O=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=m(),i=R(),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 d=T(),s=d.firstChild;return a(s,V),d})()},children:d=>c(j,{get fallback(){return(()=>{var s=T(),u=s.firstChild;return a(u,()=>e.t("instanceInfo.loading")),s})()},get children(){return c(Z,{get scopeKey(){return O()},get path(){return String(d().file||"")},get patch(){return String(d().patch||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()}})}})})),t})(),y=()=>(()=>{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,d=r.firstChild;d.firstChild;var s=r.nextSibling,u=s.firstChild;return u.firstChild,a(d,()=>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 y()},get children(){return c(F,{each:n,children:t=>(()=>{var r=E(),d=r.firstChild,s=d.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(o=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file;return _!==o.e&&z(r,o.e=_),$!==o.t&&w(s,"title",o.t=$),o},{e:void 0,t:void 0}),r})()})}}),overlay:()=>c(W,{get when(){return n.length>0},get fallback(){return y()},get children(){return c(F,{each:n,children:t=>(()=>{var r=E(),d=r.firstChild,s=d.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(o=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file,k=t.file;return _!==o.e&&z(r,o.e=_),$!==o.t&&w(r,"title",o.t=$),k!==o.a&&w(s,"title",o.a=k),o},{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{ue as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-DnczYBfh.js","assets/git-diff-vendor-CSgooKT_.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--0EL0_Tu.js";import{m as B,t as g,i as a,d as w,a as z,f as N}from"./monaco-viewer-DnczYBfh.js";import{c as f,n as c,a as L,F,S as W,z as j,A as q}from"./git-diff-vendor-CSgooKT_.js";import{D as G}from"./DiffToolbar-BsUPigM5.js";import{S as H}from"./SplitFilePanel-BBrs329I.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./main-ByuKWHRz.js";import"./core-DhEqZVGG.js";import"./event-DjZVAIBO.js";import"./wrap-text-B1i7zgLk.js";var J=g('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),T=g("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Q=g('<div class="p-3 text-xs text-secondary">'),E=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-DnczYBfh.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),ue=e=>{const M=f(()=>e.activeSessionId()),S=f(()=>!!(M()&&M()!=="info")),D=f(()=>S()?e.activeSessionDiffs():null),m=f(()=>{const n=D();return Array.isArray(n)?[...n].sort((i,l)=>String(i.file||"").localeCompare(String(l.file||""))):[]}),R=f(()=>m().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})),I=f(()=>{const n=m();return n.length===0?null:n.reduce((i,l)=>{const v=typeof(i==null?void 0:i.additions)=="number"?i.additions:0,y=typeof(i==null?void 0:i.deletions)=="number"?i.deletions:0,x=v+y,p=typeof(l==null?void 0:l.additions)=="number"?l.additions:0,t=typeof(l==null?void 0:l.deletions)=="number"?l.deletions:0,r=p+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=m();if(n){const l=i.find(v=>v.file===n);if(l)return l}return I()}),O=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=m(),i=R(),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 d=T(),s=d.firstChild;return a(s,V),d})()},children:d=>c(j,{get fallback(){return(()=>{var s=T(),u=s.firstChild;return a(u,()=>e.t("instanceInfo.loading")),s})()},get children(){return c(Z,{get scopeKey(){return O()},get path(){return String(d().file||"")},get patch(){return String(d().patch||"")},get viewMode(){return e.diffViewMode()},get contextMode(){return e.diffContextMode()},get wordWrap(){return e.diffWordWrapMode()}})}})})),t})(),y=()=>(()=>{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,d=r.firstChild;d.firstChild;var s=r.nextSibling,u=s.firstChild;return u.firstChild,a(d,()=>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 y()},get children(){return c(F,{each:n,children:t=>(()=>{var r=E(),d=r.firstChild,s=d.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(o=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file;return _!==o.e&&z(r,o.e=_),$!==o.t&&w(s,"title",o.t=$),o},{e:void 0,t:void 0}),r})()})}}),overlay:()=>c(W,{get when(){return n.length>0},get fallback(){return y()},get children(){return c(F,{each:n,children:t=>(()=>{var r=E(),d=r.firstChild,s=d.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(o=>{var _=`file-list-item ${(l==null?void 0:l.file)===t.file?"file-list-item-active":""}`,$=t.file,k=t.file;return _!==o.e&&z(r,o.e=_),$!==o.t&&w(r,"title",o.t=$),k!==o.a&&w(s,"title",o.a=k),o},{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{ue as default};
@@ -1 +1 @@
1
- import{t as g,i as c,m as W,d as i,a as S,f as T}from"./monaco-viewer-9Byc1Kpy.js";import{u as C}from"./index-C9Tl2tHH.js";import{n as o,m as $,a as V}from"./git-diff-vendor-CSgooKT_.js";import{I as U,S as A,T as I}from"./main-C1yBw4P8.js";import{A as D,W as E}from"./wrap-text-S8HH4qqP.js";const F=[["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"}]],H=t=>o(U,$(t,{name:"UnfoldVertical",iconNode:F}));var N=g("<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 z=t=>{const{t:a}=C(),r=()=>t.viewMode==="split"?"unified":"split",s=()=>t.contextMode==="collapsed"?"expanded":"collapsed",h=()=>t.wordWrapMode==="on"?"off":"on",f=()=>r()==="split"?a("instanceShell.diff.switchToSplit"):a("instanceShell.diff.switchToUnified"),v=()=>s()==="collapsed"?a("instanceShell.diff.hideUnchanged"):a("instanceShell.diff.showFull"),u=()=>h()==="on"?a("instanceShell.diff.enableWordWrap"):a("instanceShell.diff.disableWordWrap");return(()=>{var b=N(),n=b.firstChild,l=n.nextSibling,d=l.nextSibling;return n.$$click=()=>t.onViewModeChange(r()),c(n,(()=>{var e=W(()=>r()==="split");return()=>e()?o(A,{class:"h-4 w-4","aria-hidden":"true"}):o(D,{class:"h-4 w-4","aria-hidden":"true"})})()),l.$$click=()=>t.onContextModeChange(s()),c(l,(()=>{var e=W(()=>s()==="collapsed");return()=>e()?o(I,{class:"h-4 w-4","aria-hidden":"true"}):o(H,{class:"h-4 w-4","aria-hidden":"true"})})()),d.$$click=()=>t.onWordWrapModeChange(h()),c(d,o(E,{class:"h-4 w-4","aria-hidden":"true"})),V(e=>{var m=f(),w=f(),M=v(),p=v(),x=`file-viewer-toolbar-icon-button${t.wordWrapMode==="on"?" active":""}`,k=u(),y=u();return m!==e.e&&i(n,"aria-label",e.e=m),w!==e.t&&i(n,"title",e.t=w),M!==e.a&&i(l,"aria-label",e.a=M),p!==e.o&&i(l,"title",e.o=p),x!==e.i&&S(d,e.i=x),k!==e.n&&i(d,"aria-label",e.n=k),y!==e.s&&i(d,"title",e.s=y),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),b})()};T(["click"]);export{z as D};
1
+ import{t as g,i as c,m as W,d as i,a as S,f as T}from"./monaco-viewer-DnczYBfh.js";import{u as C}from"./index--0EL0_Tu.js";import{n as o,m as $,a as V}from"./git-diff-vendor-CSgooKT_.js";import{I as U,S as A,T as I}from"./main-ByuKWHRz.js";import{A as D,W as E}from"./wrap-text-B1i7zgLk.js";const F=[["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"}]],H=t=>o(U,$(t,{name:"UnfoldVertical",iconNode:F}));var N=g("<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 z=t=>{const{t:a}=C(),r=()=>t.viewMode==="split"?"unified":"split",s=()=>t.contextMode==="collapsed"?"expanded":"collapsed",h=()=>t.wordWrapMode==="on"?"off":"on",f=()=>r()==="split"?a("instanceShell.diff.switchToSplit"):a("instanceShell.diff.switchToUnified"),v=()=>s()==="collapsed"?a("instanceShell.diff.hideUnchanged"):a("instanceShell.diff.showFull"),u=()=>h()==="on"?a("instanceShell.diff.enableWordWrap"):a("instanceShell.diff.disableWordWrap");return(()=>{var b=N(),n=b.firstChild,l=n.nextSibling,d=l.nextSibling;return n.$$click=()=>t.onViewModeChange(r()),c(n,(()=>{var e=W(()=>r()==="split");return()=>e()?o(A,{class:"h-4 w-4","aria-hidden":"true"}):o(D,{class:"h-4 w-4","aria-hidden":"true"})})()),l.$$click=()=>t.onContextModeChange(s()),c(l,(()=>{var e=W(()=>s()==="collapsed");return()=>e()?o(I,{class:"h-4 w-4","aria-hidden":"true"}):o(H,{class:"h-4 w-4","aria-hidden":"true"})})()),d.$$click=()=>t.onWordWrapModeChange(h()),c(d,o(E,{class:"h-4 w-4","aria-hidden":"true"})),V(e=>{var m=f(),w=f(),M=v(),p=v(),x=`file-viewer-toolbar-icon-button${t.wordWrapMode==="on"?" active":""}`,k=u(),y=u();return m!==e.e&&i(n,"aria-label",e.e=m),w!==e.t&&i(n,"title",e.t=w),M!==e.a&&i(l,"aria-label",e.a=M),p!==e.o&&i(l,"title",e.o=p),x!==e.i&&S(d,e.i=x),k!==e.n&&i(d,"aria-label",e.n=k),y!==e.s&&i(d,"title",e.s=y),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0,n:void 0,s:void 0}),b})()};T(["click"]);export{z as D};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-9Byc1Kpy.js","assets/git-diff-vendor-CSgooKT_.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-C9Tl2tHH.js";import{m as _,t as o,i as s,d as c,a as z,f as I}from"./monaco-viewer-9Byc1Kpy.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-CSgooKT_.js";import{S as T}from"./SplitFilePanel-B-3h60o2.js";import{I as A,R as y}from"./main-C1yBw4P8.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./core-DhEqZVGG.js";import"./event-DjZVAIBO.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-9Byc1Kpy.js").then(e=>e.ae),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer}))),se=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(),m=()=>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})(),w=()=>[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,m),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",m())),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:w,overlay:w},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{se as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-DnczYBfh.js","assets/git-diff-vendor-CSgooKT_.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--0EL0_Tu.js";import{m as _,t as o,i as s,d as c,a as z,f as I}from"./monaco-viewer-DnczYBfh.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-CSgooKT_.js";import{S as T}from"./SplitFilePanel-BBrs329I.js";import{I as A,R as y}from"./main-ByuKWHRz.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./core-DhEqZVGG.js";import"./event-DjZVAIBO.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-DnczYBfh.js").then(e=>e.ae),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoFileViewer}))),se=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(),m=()=>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})(),w=()=>[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,m),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",m())),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:w,overlay:w},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{se as default};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-9Byc1Kpy.js","assets/git-diff-vendor-CSgooKT_.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 se}from"./index-C9Tl2tHH.js";import{m as R,t as h,i as n,d as b,h as U,a as Q,f as le}from"./monaco-viewer-9Byc1Kpy.js";import{n as r,m as re,c as m,a as L,S as w,F as j,z as ce,A as oe}from"./git-diff-vendor-CSgooKT_.js";import{D as de}from"./DiffToolbar-De-3SRCF.js";import{S as ge}from"./SplitFilePanel-B-3h60o2.js";import{I as he,O as ue,R as fe,P as H,Q as J}from"./main-C1yBw4P8.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./wrap-text-S8HH4qqP.js";import"./core-DhEqZVGG.js";import"./event-DjZVAIBO.js";const me=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],ve=e=>r(he,re(e,{name:"GitBranch",iconNode:me}));var V=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Ce=h('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),$e=h('<div class="p-3 text-xs text-secondary">'),be=h('<span class="git-change-row-action-bar git-change-row-action-bar-vertical">'),_e=h('<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">'),we=h("<div class=git-change-section-items>"),Se=h("<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>"),ye=h('<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">'),xe=h("<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>"),Ie=h('<span class="status-indicator session-status-list worktree-indicator git-change-section-badge"><span class=worktree-indicator-label>'),Me=h("<span class=files-tab-selected-path><span class=file-path-text>"),ke=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>-'),Le=h("<button type=button class=files-header-icon-button style=margin-left:auto>"),Ee=h("<span class=text-error>");const Pe=oe(()=>se(()=>import("./monaco-viewer-9Byc1Kpy.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),qe=e=>{const T=m(()=>e.activeSessionId()),W=m(()=>!!(T()&&T()!=="info")),A=m(()=>W()?e.entries():null),X=m(()=>{const o=A();return Array.isArray(o)?[...o].sort((d,x)=>String(d.path||"").localeCompare(String(x.path||""))):[]}),S=m(()=>ue(X())),Y=m(()=>S().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})),z=m(()=>S().filter(o=>o.section==="staged")),Z=m(()=>S().filter(o=>o.section==="unstaged")),p=m(()=>z().length>0&&e.commitMessage().trim().length>0&&!e.commitSubmitting()),ee=m(()=>{const o=S(),d=e.selectedItemId(),x=e.mostChangedItemId(),I=o.find(E=>E.id===d)||(x?o.find(E=>E.id===x):void 0);return(I==null?void 0:I.entry)??null}),D=m(()=>W()?A()===null?e.t("instanceShell.gitChanges.loading"):S().length===0?e.t("instanceShell.gitChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty"):e.t("instanceShell.gitChanges.noSessionSelected")),te=m(()=>e.selectedError()===e.t("instanceShell.gitChanges.binaryViewer"));return R(()=>{const o=Y(),d=ee(),x=S(),I=z(),E=Z(),ne=()=>(()=>{var t=Ce(),l=t.firstChild;return n(l,r(w,{get when(){return e.selectedLoading()},get fallback(){return r(w,{get when(){return e.selectedError()},get fallback(){return r(w,{get when(){return R(()=>!!(d&&e.selectedBefore()!==null&&e.selectedAfter()!==null))()?{path:d.path,before:e.selectedBefore(),after:e.selectedAfter()}:null},get fallback(){return(()=>{var i=V(),s=i.firstChild;return n(s,D),i})()},children:i=>r(ce,{get fallback(){return(()=>{var s=V(),a=s.firstChild;return n(a,()=>e.t("instanceInfo.loading")),s})()},get children(){return r(Pe,{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()},get insertContextLabel(){return e.t("instanceShell.gitChanges.actions.insertContext")},get onRequestInsertContext(){return te()?void 0:s=>{const a=e.selectedItemId();if(!a)return;const g=S().find(u=>u.id===a);g&&e.onInsertContext(g,s)}}})}})})},children:i=>(()=>{var s=V(),a=s.firstChild;return n(a,i),s})()})},get children(){var i=V(),s=i.firstChild;return n(s,()=>e.t("instanceInfo.loading")),i}})),t})(),ie=()=>(()=>{var t=$e();return n(t,D),t})(),B=t=>{const l=m(()=>e.selectedBulkItemIds().has(t.id)),i=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 a=_e(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=u.nextSibling,$=v.firstChild,C=$.firstChild;C.firstChild;var _=C.nextSibling;_.firstChild;var P=g.nextSibling,f=P.firstChild,y=f.firstChild,k=y.firstChild;return k.firstChild,a.$$click=c=>e.onRowClick(t,c),a.$$mousedown=c=>{(c.shiftKey||c.ctrlKey||c.metaKey)&&c.preventDefault()},n(M,()=>t.path),n(C,()=>t.additions,null),n(_,()=>t.deletions,null),y.$$click=c=>{c.stopPropagation(),s()},b(y,"title",i),b(y,"aria-label",i),n(k,r(w,{get when(){return t.section!=="staged"},get children(){return be()}}),null),L(c=>{var F=`file-list-item git-change-list-item ${e.selectedItemId()===t.id?"file-list-item-active":""} ${l()?"git-change-list-item-bulk-selected":""}`,G=t.path,K=t.path,q=t.path,N=`git-change-row-action-glyph ${t.section==="staged"?"git-change-row-action-glyph-minus":"git-change-row-action-glyph-plus"}`;return F!==c.e&&Q(a,c.e=F),G!==c.t&&b(a,"title",c.t=G),K!==c.a&&b(g,"title",c.a=K),q!==c.o&&b(u,"title",c.o=q),N!==c.i&&Q(k,c.i=N),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()},ae=(t,l,i,s)=>(()=>{var a=Se(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=M.nextSibling,$=u.nextSibling;return U(g,"click",s,!0),n(M,i?r(H,{class:"h-3.5 w-3.5"}):r(J,{class:"h-3.5 w-3.5"})),n(v,t),n($,()=>l.length),n(a,r(w,{when:i,get children(){var C=we();return n(C,r(j,{each:l,children:_=>B(_)})),C}}),null),a})(),O=()=>r(w,{get when(){return x.length>0},get fallback(){return ie()},get children(){var t=xe(),l=t.firstChild,i=l.firstChild,s=i.firstChild,a=s.firstChild,g=a.nextSibling,u=g.firstChild,M=s.nextSibling;return U(i,"click",e.onToggleStagedOpen,!0),n(a,(()=>{var v=R(()=>!!e.stagedOpen());return()=>v()?r(H,{class:"h-3.5 w-3.5"}):r(J,{class:"h-3.5 w-3.5"})})()),n(u,()=>e.t("instanceShell.gitChanges.sections.staged")),n(g,r(w,{get when(){return e.branchLabel()},children:v=>(()=>{var $=Ie(),C=$.firstChild;return n($,r(ve,{class:"w-3.5 h-3.5","aria-hidden":"true"}),C),n(C,v),L(()=>b($,"title",`Branch: ${v()}`)),$})()}),null),n(M,()=>I.length),n(l,r(w,{get when(){return e.stagedOpen()},get children(){var v=ye(),$=v.firstChild,C=$.firstChild,_=C.firstChild,P=_.nextSibling;return _.$$input=f=>e.onCommitMessageInput(f.currentTarget.value),P.$$click=()=>e.onSubmitCommit(),n(P,(()=>{var f=R(()=>!!e.commitSubmitting());return()=>f()?e.t("instanceShell.gitChanges.commit.submitting"):e.t("instanceShell.gitChanges.commit.submit")})()),n(v,r(j,{each:I,children:f=>B(f)}),null),L(f=>{var y=e.t("instanceShell.gitChanges.commit.placeholder"),k=!p();return y!==f.e&&b(_,"placeholder",f.e=y),k!==f.t&&(P.disabled=f.t=k),f},{e:void 0,t:void 0}),L(()=>_.value=e.commitMessage()),v}}),null),n(t,()=>ae(e.t("instanceShell.gitChanges.sections.unstaged"),E,e.unstagedOpen(),e.onToggleUnstagedOpen),null),t}});return r(ge,{get header(){return[(()=>{var t=Me(),l=t.firstChild;return n(l,()=>(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges")),L(()=>b(t,"title",(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges"))),t})(),(()=>{var t=ke(),l=t.firstChild,i=l.firstChild;i.firstChild;var s=l.nextSibling,a=s.firstChild;return a.firstChild,n(i,()=>o.additions,null),n(a,()=>o.deletions,null),n(t,r(w,{get when(){return e.statusError()},children:g=>(()=>{var u=Ee();return n(u,g),u})()}),null),t})(),(()=>{var t=Le();return t.$$click=()=>e.onRefresh(),n(t,r(fe,{get class(){return`h-4 w-4${e.statusLoading()?" animate-spin":""}`}})),L(l=>{var i=e.t("instanceShell.rightPanel.actions.refresh"),s=e.t("instanceShell.rightPanel.actions.refresh"),a=!W()||e.statusLoading()||A()===null;return i!==l.e&&b(t,"title",l.e=i),s!==l.t&&b(t,"aria-label",l.t=s),a!==l.a&&(t.disabled=l.a=a),l},{e:void 0,t:void 0,a:void 0}),t})(),r(de,{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:O,overlay:O},get viewer(){return ne()},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")}})})};le(["mousedown","click","input"]);export{qe as default};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/monaco-viewer-DnczYBfh.js","assets/git-diff-vendor-CSgooKT_.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 se}from"./index--0EL0_Tu.js";import{m as R,t as h,i as n,d as b,h as U,a as Q,f as le}from"./monaco-viewer-DnczYBfh.js";import{n as r,m as re,c as m,a as L,S as w,F as j,z as ce,A as oe}from"./git-diff-vendor-CSgooKT_.js";import{D as de}from"./DiffToolbar-BsUPigM5.js";import{S as ge}from"./SplitFilePanel-BBrs329I.js";import{I as he,O as ue,R as fe,P as H,Q as J}from"./main-ByuKWHRz.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./wrap-text-B1i7zgLk.js";import"./core-DhEqZVGG.js";import"./event-DjZVAIBO.js";const me=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],ve=e=>r(he,re(e,{name:"GitBranch",iconNode:me}));var V=h("<div class=file-viewer-empty><span class=file-viewer-empty-text>"),Ce=h('<div class="file-viewer-panel flex-1"><div class="file-viewer-content file-viewer-content--monaco">'),$e=h('<div class="p-3 text-xs text-secondary">'),be=h('<span class="git-change-row-action-bar git-change-row-action-bar-vertical">'),_e=h('<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">'),we=h("<div class=git-change-section-items>"),Se=h("<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>"),ye=h('<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">'),xe=h("<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>"),Ie=h('<span class="status-indicator session-status-list worktree-indicator git-change-section-badge"><span class=worktree-indicator-label>'),Me=h("<span class=files-tab-selected-path><span class=file-path-text>"),ke=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>-'),Le=h("<button type=button class=files-header-icon-button style=margin-left:auto>"),Ee=h("<span class=text-error>");const Pe=oe(()=>se(()=>import("./monaco-viewer-DnczYBfh.js").then(e=>e.ad),__vite__mapDeps([0,1,2,3,4])).then(e=>({default:e.MonacoDiffViewer}))),qe=e=>{const T=m(()=>e.activeSessionId()),W=m(()=>!!(T()&&T()!=="info")),A=m(()=>W()?e.entries():null),X=m(()=>{const o=A();return Array.isArray(o)?[...o].sort((d,x)=>String(d.path||"").localeCompare(String(x.path||""))):[]}),S=m(()=>ue(X())),Y=m(()=>S().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})),z=m(()=>S().filter(o=>o.section==="staged")),Z=m(()=>S().filter(o=>o.section==="unstaged")),p=m(()=>z().length>0&&e.commitMessage().trim().length>0&&!e.commitSubmitting()),ee=m(()=>{const o=S(),d=e.selectedItemId(),x=e.mostChangedItemId(),I=o.find(E=>E.id===d)||(x?o.find(E=>E.id===x):void 0);return(I==null?void 0:I.entry)??null}),D=m(()=>W()?A()===null?e.t("instanceShell.gitChanges.loading"):S().length===0?e.t("instanceShell.gitChanges.empty"):e.t("instanceShell.filesShell.viewerEmpty"):e.t("instanceShell.gitChanges.noSessionSelected")),te=m(()=>e.selectedError()===e.t("instanceShell.gitChanges.binaryViewer"));return R(()=>{const o=Y(),d=ee(),x=S(),I=z(),E=Z(),ne=()=>(()=>{var t=Ce(),l=t.firstChild;return n(l,r(w,{get when(){return e.selectedLoading()},get fallback(){return r(w,{get when(){return e.selectedError()},get fallback(){return r(w,{get when(){return R(()=>!!(d&&e.selectedBefore()!==null&&e.selectedAfter()!==null))()?{path:d.path,before:e.selectedBefore(),after:e.selectedAfter()}:null},get fallback(){return(()=>{var i=V(),s=i.firstChild;return n(s,D),i})()},children:i=>r(ce,{get fallback(){return(()=>{var s=V(),a=s.firstChild;return n(a,()=>e.t("instanceInfo.loading")),s})()},get children(){return r(Pe,{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()},get insertContextLabel(){return e.t("instanceShell.gitChanges.actions.insertContext")},get onRequestInsertContext(){return te()?void 0:s=>{const a=e.selectedItemId();if(!a)return;const g=S().find(u=>u.id===a);g&&e.onInsertContext(g,s)}}})}})})},children:i=>(()=>{var s=V(),a=s.firstChild;return n(a,i),s})()})},get children(){var i=V(),s=i.firstChild;return n(s,()=>e.t("instanceInfo.loading")),i}})),t})(),ie=()=>(()=>{var t=$e();return n(t,D),t})(),B=t=>{const l=m(()=>e.selectedBulkItemIds().has(t.id)),i=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 a=_e(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=u.nextSibling,$=v.firstChild,C=$.firstChild;C.firstChild;var _=C.nextSibling;_.firstChild;var P=g.nextSibling,f=P.firstChild,y=f.firstChild,k=y.firstChild;return k.firstChild,a.$$click=c=>e.onRowClick(t,c),a.$$mousedown=c=>{(c.shiftKey||c.ctrlKey||c.metaKey)&&c.preventDefault()},n(M,()=>t.path),n(C,()=>t.additions,null),n(_,()=>t.deletions,null),y.$$click=c=>{c.stopPropagation(),s()},b(y,"title",i),b(y,"aria-label",i),n(k,r(w,{get when(){return t.section!=="staged"},get children(){return be()}}),null),L(c=>{var F=`file-list-item git-change-list-item ${e.selectedItemId()===t.id?"file-list-item-active":""} ${l()?"git-change-list-item-bulk-selected":""}`,G=t.path,K=t.path,q=t.path,N=`git-change-row-action-glyph ${t.section==="staged"?"git-change-row-action-glyph-minus":"git-change-row-action-glyph-plus"}`;return F!==c.e&&Q(a,c.e=F),G!==c.t&&b(a,"title",c.t=G),K!==c.a&&b(g,"title",c.a=K),q!==c.o&&b(u,"title",c.o=q),N!==c.i&&Q(k,c.i=N),c},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),a})()},ae=(t,l,i,s)=>(()=>{var a=Se(),g=a.firstChild,u=g.firstChild,M=u.firstChild,v=M.nextSibling,$=u.nextSibling;return U(g,"click",s,!0),n(M,i?r(H,{class:"h-3.5 w-3.5"}):r(J,{class:"h-3.5 w-3.5"})),n(v,t),n($,()=>l.length),n(a,r(w,{when:i,get children(){var C=we();return n(C,r(j,{each:l,children:_=>B(_)})),C}}),null),a})(),O=()=>r(w,{get when(){return x.length>0},get fallback(){return ie()},get children(){var t=xe(),l=t.firstChild,i=l.firstChild,s=i.firstChild,a=s.firstChild,g=a.nextSibling,u=g.firstChild,M=s.nextSibling;return U(i,"click",e.onToggleStagedOpen,!0),n(a,(()=>{var v=R(()=>!!e.stagedOpen());return()=>v()?r(H,{class:"h-3.5 w-3.5"}):r(J,{class:"h-3.5 w-3.5"})})()),n(u,()=>e.t("instanceShell.gitChanges.sections.staged")),n(g,r(w,{get when(){return e.branchLabel()},children:v=>(()=>{var $=Ie(),C=$.firstChild;return n($,r(ve,{class:"w-3.5 h-3.5","aria-hidden":"true"}),C),n(C,v),L(()=>b($,"title",`Branch: ${v()}`)),$})()}),null),n(M,()=>I.length),n(l,r(w,{get when(){return e.stagedOpen()},get children(){var v=ye(),$=v.firstChild,C=$.firstChild,_=C.firstChild,P=_.nextSibling;return _.$$input=f=>e.onCommitMessageInput(f.currentTarget.value),P.$$click=()=>e.onSubmitCommit(),n(P,(()=>{var f=R(()=>!!e.commitSubmitting());return()=>f()?e.t("instanceShell.gitChanges.commit.submitting"):e.t("instanceShell.gitChanges.commit.submit")})()),n(v,r(j,{each:I,children:f=>B(f)}),null),L(f=>{var y=e.t("instanceShell.gitChanges.commit.placeholder"),k=!p();return y!==f.e&&b(_,"placeholder",f.e=y),k!==f.t&&(P.disabled=f.t=k),f},{e:void 0,t:void 0}),L(()=>_.value=e.commitMessage()),v}}),null),n(t,()=>ae(e.t("instanceShell.gitChanges.sections.unstaged"),E,e.unstagedOpen(),e.onToggleUnstagedOpen),null),t}});return r(ge,{get header(){return[(()=>{var t=Me(),l=t.firstChild;return n(l,()=>(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges")),L(()=>b(t,"title",(d==null?void 0:d.path)||e.t("instanceShell.rightPanel.tabs.gitChanges"))),t})(),(()=>{var t=ke(),l=t.firstChild,i=l.firstChild;i.firstChild;var s=l.nextSibling,a=s.firstChild;return a.firstChild,n(i,()=>o.additions,null),n(a,()=>o.deletions,null),n(t,r(w,{get when(){return e.statusError()},children:g=>(()=>{var u=Ee();return n(u,g),u})()}),null),t})(),(()=>{var t=Le();return t.$$click=()=>e.onRefresh(),n(t,r(fe,{get class(){return`h-4 w-4${e.statusLoading()?" animate-spin":""}`}})),L(l=>{var i=e.t("instanceShell.rightPanel.actions.refresh"),s=e.t("instanceShell.rightPanel.actions.refresh"),a=!W()||e.statusLoading()||A()===null;return i!==l.e&&b(t,"title",l.e=i),s!==l.t&&b(t,"aria-label",l.t=s),a!==l.a&&(t.disabled=l.a=a),l},{e:void 0,t:void 0,a:void 0}),t})(),r(de,{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:O,overlay:O},get viewer(){return ne()},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")}})})};le(["mousedown","click","input"]);export{qe 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-9Byc1Kpy.js";import{a as g,n as r,S as n}from"./git-diff-vendor-CSgooKT_.js";import{u as S}from"./index-C9Tl2tHH.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
+ import{t as d,i as l,d as m,h as s,m as b,g as _,f as w}from"./monaco-viewer-DnczYBfh.js";import{a as g,n as r,S as n}from"./git-diff-vendor-CSgooKT_.js";import{u as S}from"./index--0EL0_Tu.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 $e,P as Ge,t as E,i as f,a as Ze,u as Je,h as ke,d as M,f as Qe}from"./monaco-viewer-9Byc1Kpy.js";import{n as c,m as P,b as O,o as $,k as te,l as ne,q as ue,s as A,d as D,c as z,S as ee,t as et,w as Ie,a as ae,F as he}from"./git-diff-vendor-CSgooKT_.js";import{I as ge,U as tt,V as B,W as ce,X as nt,Y as ot,Z as De,_ as Oe,$ as _e,a0 as st,a1 as me,a2 as de,a3 as fe,a4 as Me,a5 as oe,a6 as se,a7 as it,a8 as ve,a9 as rt,aa as lt,ab as K,ac as ye,ad as at,ae as ct,af as dt,ag as L,ah as ut,ai as gt,aj as Te,ak as ft,P as pt,al as be,am as ht,an as mt,ao as bt,ap as vt}from"./main-C1yBw4P8.js";import{u as yt}from"./index-C9Tl2tHH.js";import{T as xt}from"./todo-uxdyLWei.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./core-DhEqZVGG.js";import"./event-DjZVAIBO.js";const Ct=[["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"}]],wt=e=>c(ge,P(e,{name:"BellRing",iconNode:Ct})),St=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Pt=e=>c(ge,P(e,{name:"Info",iconNode:St})),kt=[["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"}]],It=e=>c(ge,P(e,{name:"TerminalSquare",iconNode:kt})),Tt=[["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"}]],$t=e=>c(ge,P(e,{name:"XOctagon",iconNode:Tt}));var Ee=te();function Dt(){return ne(Ee)}function Ot(){const e=Dt();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function Ae(e,o){return!!(o.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function _t(e,o){var t;const r=o.ref();if(!r)return-1;let i=e.length;if(!i)return-1;for(;i--;){const n=(t=e[i])==null?void 0:t.ref();if(n&&Ae(n,r))return i+1}return 0}function Mt(e){const o=e.map((i,t)=>[t,i]);let r=!1;return o.sort(([i,t],[n,s])=>{const l=t.ref(),m=s.ref();return l===m||!l||!m?0:Ae(l,m)?(i>n&&(r=!0),-1):(i<n&&(r=!0),1)}),r?o.map(([i,t])=>t):e}function Fe(e,o){const r=Mt(e);e!==r&&o(r)}function Et(e){var t,n;const o=e[0],r=(t=e[e.length-1])==null?void 0:t.ref();let i=(n=o==null?void 0:o.ref())==null?void 0:n.parentElement;for(;i;){if(r&&i.contains(r))return i;i=i.parentElement}return ce(i).body}function At(e,o){O(()=>{const r=setTimeout(()=>{Fe(e(),o)});$(()=>clearTimeout(r))})}function Ft(e,o){if(typeof IntersectionObserver!="function"){At(e,o);return}let r=[];O(()=>{const i=()=>{const s=!!r.length;r=e(),s&&Fe(e(),o)},t=Et(e()),n=new IntersectionObserver(i,{root:t});for(const s of e()){const l=s.ref();l&&n.observe(l)}$(()=>n.disconnect())})}function Rt(e={}){const[o,r]=tt({value:()=>ot(e.items),onChange:n=>{var s;return(s=e.onItemsChange)==null?void 0:s.call(e,n)}});Ft(o,r);const i=n=>(r(s=>{const l=_t(s,n);return nt(s,n,l)}),()=>{r(s=>{const l=s.filter(m=>m.ref()!==n.ref());return s.length===l.length?s:l})});return{DomCollectionProvider:n=>c(Ee.Provider,{value:{registerItem:i},get children(){return n.children}})}}function Kt(e){const o=Ot(),r=B({shouldRegisterItem:!0},e);O(()=>{if(!r.shouldRegisterItem)return;const i=o.registerItem(r.getItem());$(i)})}var Lt={};ye(Lt,{Arrow:()=>De,Content:()=>Ke,Portal:()=>Le,Root:()=>Be,Tooltip:()=>Q,Trigger:()=>He,useTooltipContext:()=>pe});var Re=te();function pe(){const e=ne(Re);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Ke(e){const o=pe(),r=B({id:o.generateId("content")},e),[i,t]=A(r,["ref","style"]);return O(()=>$(o.registerContentId(t.id))),c(ee,{get when(){return o.contentPresent()},get children(){return c(Me.Positioner,{get children(){return c(it,P({ref(n){var s=oe(l=>{o.setContentRef(l)},i.ref);typeof s=="function"&&s(n)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return ve({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},i.style)},onFocusOutside:n=>n.preventDefault(),onDismiss:()=>o.hideTooltip(!0)},()=>o.dataset(),t))}})}})}function Le(e){const o=pe();return c(ee,{get when(){return o.contentPresent()},get children(){return c(Ge,e)}})}function Bt(e,o,r){const i=e.split("-")[0],t=o.getBoundingClientRect(),n=r.getBoundingClientRect(),s=[],l=t.left+t.width/2,m=t.top+t.height/2;switch(i){case"top":s.push([t.left,m]),s.push([n.left,n.bottom]),s.push([n.left,n.top]),s.push([n.right,n.top]),s.push([n.right,n.bottom]),s.push([t.right,m]);break;case"right":s.push([l,t.top]),s.push([n.left,n.top]),s.push([n.right,n.top]),s.push([n.right,n.bottom]),s.push([n.left,n.bottom]),s.push([l,t.bottom]);break;case"bottom":s.push([t.left,m]),s.push([n.left,n.top]),s.push([n.left,n.bottom]),s.push([n.right,n.bottom]),s.push([n.right,n.top]),s.push([t.right,m]);break;case"left":s.push([l,t.top]),s.push([n.right,n.top]),s.push([n.left,n.top]),s.push([n.left,n.bottom]),s.push([n.right,n.bottom]),s.push([l,t.bottom]);break}return s}var W={},Ht=0,Y=!1,R,J,G;function Be(e){const o=`tooltip-${ue()}`,r=`${++Ht}`,i=B({id:o,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,n]=A(i,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[l,m]=D(),[b,C]=D(),[d,g]=D(),[a,v]=D(n.placement),u=Oe({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:h=>{var S;return(S=t.onOpenChange)==null?void 0:S.call(t,h)}}),{present:x}=_e({show:()=>t.forceMount||u.isOpen(),element:()=>d()??null}),y=()=>{W[r]=I},w=()=>{for(const h in W)h!==r&&(W[h](!0),delete W[h])},I=(h=!1)=>{h||t.closeDelay&&t.closeDelay<=0?(window.clearTimeout(s),s=void 0,u.close()):s||(s=window.setTimeout(()=>{s=void 0,u.close()},t.closeDelay)),window.clearTimeout(R),R=void 0,t.skipDelayDuration&&t.skipDelayDuration>=0&&(G=window.setTimeout(()=>{window.clearTimeout(G),G=void 0},t.skipDelayDuration)),Y&&(window.clearTimeout(J),J=window.setTimeout(()=>{delete W[r],J=void 0,Y=!1},t.closeDelay))},N=()=>{clearTimeout(s),s=void 0,w(),y(),Y=!0,u.open(),window.clearTimeout(R),R=void 0,window.clearTimeout(J),J=void 0,window.clearTimeout(G),G=void 0},F=()=>{w(),y(),!u.isOpen()&&!R&&!Y?R=window.setTimeout(()=>{R=void 0,Y=!0,N()},t.openDelay):u.isOpen()||N()},_=(h=!1)=>{!h&&t.openDelay&&t.openDelay>0&&!s&&!G?F():N()},T=()=>{window.clearTimeout(R),R=void 0,Y=!1},p=()=>{window.clearTimeout(s),s=void 0},U=h=>me(b(),h)||me(d(),h),H=h=>{const S=b(),k=d();if(!(!S||!k))return Bt(h,S,k)},j=h=>{const S=h.target;if(U(S)){p();return}if(!t.ignoreSafeArea){const k=H(a());if(k&&rt(lt(h),k)){p();return}}s||I()};O(()=>{if(!u.isOpen())return;const h=ce();h.addEventListener("pointermove",j,!0),$(()=>{h.removeEventListener("pointermove",j,!0)})}),O(()=>{const h=b();if(!h||!u.isOpen())return;const S=re=>{const le=re.target;me(le,h)&&I(!0)},k=st();k.addEventListener("scroll",S,{capture:!0}),$(()=>{k.removeEventListener("scroll",S,{capture:!0})})}),$(()=>{clearTimeout(s),W[r]&&delete W[r]});const X={dataset:z(()=>({"data-expanded":u.isOpen()?"":void 0,"data-closed":u.isOpen()?void 0:""})),isOpen:u.isOpen,isDisabled:()=>t.disabled??!1,triggerOnFocusOnly:()=>t.triggerOnFocusOnly??!1,contentId:l,contentPresent:x,openTooltip:_,hideTooltip:I,cancelOpening:T,generateId:fe(()=>i.id),registerContentId:de(m),isTargetOnTooltip:U,setTriggerRef:C,setContentRef:g};return c(Re.Provider,{value:X,get children(){return c(Me,P({anchorRef:b,contentRef:d,onCurrentPlacementChange:v},n))}})}function He(e){let o;const r=pe(),[i,t]=A(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let n=!1,s=!1,l=!1;const m=()=>{n=!1},b=()=>{!r.isOpen()&&(s||l)&&r.openTooltip(l)},C=y=>{r.isOpen()&&!s&&!l&&r.hideTooltip(y)},d=y=>{K(y,i.onPointerEnter),!(y.pointerType==="touch"||r.triggerOnFocusOnly()||r.isDisabled()||y.defaultPrevented)&&(s=!0,b())},g=y=>{K(y,i.onPointerLeave),y.pointerType!=="touch"&&(s=!1,l=!1,r.isOpen()?C():r.cancelOpening())},a=y=>{K(y,i.onPointerDown),n=!0,ce(o).addEventListener("pointerup",m,{once:!0})},v=y=>{K(y,i.onClick),s=!1,l=!1,C(!0)},u=y=>{K(y,i.onFocus),!(r.isDisabled()||y.defaultPrevented||n)&&(l=!0,b())},x=y=>{K(y,i.onBlur);const w=y.relatedTarget;r.isTargetOnTooltip(w)||(s=!1,l=!1,C(!0))};return $(()=>{ce(o).removeEventListener("pointerup",m)}),c(se,P({as:"button",ref(y){var w=oe(I=>{r.setTriggerRef(I),o=I},i.ref);typeof w=="function"&&w(y)},get"aria-describedby"(){return $e(()=>!!r.isOpen())()?r.contentId():void 0},onPointerEnter:d,onPointerLeave:g,onPointerDown:a,onClick:v,onFocus:u,onBlur:x},()=>r.dataset(),t))}var Q=Object.assign(Be,{Arrow:De,Content:Ke,Portal:Le,Trigger:He}),Nt={};ye(Nt,{Collapsible:()=>Ut,Content:()=>xe,Root:()=>Ce,Trigger:()=>we,useCollapsibleContext:()=>ie});var Ne=te();function ie(){const e=ne(Ne);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function xe(e){const[o,r]=D(),i=ie(),t=B({id:i.generateId("content")},e),[n,s]=A(t,["ref","id","style"]),{present:l}=_e({show:i.shouldMount,element:()=>o()??null}),[m,b]=D(0),[C,d]=D(0);let a=i.isOpen()||l();return et(()=>{const v=requestAnimationFrame(()=>{a=!1});$(()=>{cancelAnimationFrame(v)})}),O(Ie(l,()=>{if(!o())return;o().style.transitionDuration="0s",o().style.animationName="none";const v=o().getBoundingClientRect();b(v.height),d(v.width),a||(o().style.transitionDuration="",o().style.animationName="")})),O(Ie(i.isOpen,v=>{!v&&o()&&(o().style.transitionDuration="",o().style.animationName="")},{defer:!0})),O(()=>$(i.registerContentId(n.id))),c(ee,{get when(){return l()},get children(){return c(se,P({as:"div",ref(v){var u=oe(r,n.ref);typeof u=="function"&&u(v)},get id(){return n.id},get style(){return ve({"--kb-collapsible-content-height":m()?`${m()}px`:void 0,"--kb-collapsible-content-width":C()?`${C()}px`:void 0},n.style)}},()=>i.dataset(),s))}})}function Ce(e){const o=`collapsible-${ue()}`,r=B({id:o},e),[i,t]=A(r,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[n,s]=D(),l=Oe({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:C=>{var d;return(d=i.onOpenChange)==null?void 0:d.call(i,C)}}),m=z(()=>({"data-expanded":l.isOpen()?"":void 0,"data-closed":l.isOpen()?void 0:"","data-disabled":i.disabled?"":void 0})),b={dataset:m,isOpen:l.isOpen,disabled:()=>i.disabled??!1,shouldMount:()=>i.forceMount||l.isOpen(),contentId:n,toggle:l.toggle,generateId:fe(()=>t.id),registerContentId:de(s)};return c(Ne.Provider,{value:b,get children(){return c(se,P({as:"div"},m,t))}})}function we(e){const o=ie(),[r,i]=A(e,["onClick"]);return c(at,P({get"aria-expanded"(){return o.isOpen()},get"aria-controls"(){return $e(()=>!!o.isOpen())()?o.contentId():void 0},get disabled(){return o.disabled()},onClick:n=>{K(n,r.onClick),o.toggle()}},()=>o.dataset(),i))}var Ut=Object.assign(Ce,{Content:xe,Trigger:we}),Z={};ye(Z,{Accordion:()=>jt,Content:()=>We,Header:()=>qe,Item:()=>Ve,Root:()=>Xe,Trigger:()=>Ye,useAccordionContext:()=>Se});var Ue=te();function je(){const e=ne(Ue);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function We(e){const o=je(),r=o.generateId("content"),i=B({id:r},e),[t,n]=A(i,["id","style"]);return O(()=>$(o.registerContentId(t.id))),c(xe,P({role:"region",get"aria-labelledby"(){return o.triggerId()},get style(){return ve({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},t.style)}},n))}function qe(e){const o=ie();return c(se,P({as:"h3"},()=>o.dataset(),e))}var ze=te();function Se(){const e=ne(ze);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function Ve(e){const o=Se(),r=`${o.generateId("item")}-${ue()}`,i=B({id:r},e),[t,n]=A(i,["value","disabled"]),[s,l]=D(),[m,b]=D(),C=()=>o.listState().selectionManager(),d=()=>C().isSelected(t.value),g={value:()=>t.value,triggerId:s,contentId:m,generateId:fe(()=>n.id),registerTriggerId:de(l),registerContentId:de(b)};return c(Ue.Provider,{value:g,get children(){return c(Ce,P({get open(){return d()},get disabled(){return t.disabled}},n))}})}function Xe(e){let o;const r=`accordion-${ue()}`,i=B({id:r,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[t,n]=A(i,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[s,l]=D([]),{DomCollectionProvider:m}=Rt({items:s,onItemsChange:l}),b=ct({selectedKeys:()=>t.value,defaultSelectedKeys:()=>t.defaultValue,onSelectionChange:g=>{var a;return(a=t.onChange)==null?void 0:a.call(t,Array.from(g))},disallowEmptySelection:()=>!t.multiple&&!t.collapsible,selectionMode:()=>t.multiple?"multiple":"single",dataSource:s});b.selectionManager().setFocusedKey("item-1");const C=dt({selectionManager:()=>b.selectionManager(),collection:()=>b.collection(),disallowEmptySelection:()=>b.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>t.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>o),d={listState:()=>b,generateId:fe(()=>t.id)};return c(m,{get children(){return c(ze.Provider,{value:d,get children(){return c(se,P({as:"div",get id(){return t.id},ref(g){var a=oe(v=>o=v,t.ref);typeof a=="function"&&a(g)},get onKeyDown(){return L([t.onKeyDown,C.onKeyDown])},get onMouseDown(){return L([t.onMouseDown,C.onMouseDown])},get onFocusIn(){return L([t.onFocusIn])},get onFocusOut(){return L([t.onFocusOut,C.onFocusOut])}},n))}})}})}function Ye(e){let o;const r=Se(),i=je(),t=ie(),n=i.generateId("trigger"),s=B({id:n},e),[l,m]=A(s,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);Kt({getItem:()=>({ref:()=>o,type:"item",key:i.value(),textValue:"",disabled:t.disabled()})});const b=ut({key:()=>i.value(),selectionManager:()=>r.listState().selectionManager(),disabled:()=>t.disabled(),shouldSelectOnPressUp:!0},()=>o),C=d=>{["Enter"," "].includes(d.key)&&d.preventDefault(),K(d,l.onKeyDown),K(d,b.onKeyDown)};return O(()=>$(i.registerTriggerId(m.id))),c(we,P({ref(d){var g=oe(a=>o=a,l.ref);typeof g=="function"&&g(d)},get"data-key"(){return b.dataKey()},get onPointerDown(){return L([l.onPointerDown,b.onPointerDown])},get onPointerUp(){return L([l.onPointerUp,b.onPointerUp])},get onClick(){return L([l.onClick,b.onClick])},onKeyDown:C,get onMouseDown(){return L([l.onMouseDown,b.onMouseDown])},get onFocus(){return L([l.onFocus,b.onFocus])}},m))}var jt=Object.assign(Xe,{Content:We,Header:qe,Item:Ve,Trigger:Ye}),Wt=E('<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 qt=e=>{const{t:o}=yt(),r=z(()=>gt(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),i=z(()=>r().inputTokens??0),t=z(()=>r().outputTokens??0),n=z(()=>{const l=r().isSubscriptionModel?0:r().cost;return l>0?l:0}),s=z(()=>`$${n().toFixed(2)}`);return(()=>{var l=Wt(),m=l.firstChild,b=m.firstChild,C=b.firstChild,d=C.nextSibling,g=b.nextSibling,a=g.firstChild,v=a.nextSibling,u=g.nextSibling,x=u.firstChild,y=x.nextSibling;return f(C,()=>o("contextUsagePanel.labels.input")),f(d,()=>Te(i())),f(a,()=>o("contextUsagePanel.labels.output")),f(v,()=>Te(t())),f(x,()=>o("contextUsagePanel.labels.cost")),f(y,s),ae(()=>Ze(l,`session-context-panel px-4 py-2 ${e.class??""}`)),l})()};var q=E('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),zt=E('<div class="rounded-md border border-base bg-surface-secondary px-3 py-2"><div class="flex items-start justify-between gap-3"><div class=min-w-0><div class="text-sm font-medium text-primary"></div><p class="mt-1 text-xs text-secondary">'),Vt=E('<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="session-changes-scroll rounded-md border border-base bg-surface-secondary p-2 max-h-[40vh] overflow-y-auto"><div class="flex flex-col">'),Xt=E('<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)>'),Yt=E('<div class="flex flex-col gap-2">'),Gt=E("<span>"),Zt=E('<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">'),Jt=E("<div class=status-tab-container>"),Qt=E("<span class=section-left><span class=section-label>");const dn=e=>{let o;const{isHovered:r,handleMouseEnter:i,handleMouseLeave:t}=ft(()=>o),n=d=>e.expandedItems().includes(d),C=[{id:"yolo-mode",labelKey:"instanceShell.rightPanel.sections.yoloMode",tooltipKey:"instanceShell.rightPanel.sections.yoloMode.tooltip",render:()=>{const d=e.activeSession();return d?(()=>{var g=zt(),a=g.firstChild,v=a.firstChild,u=v.firstChild,x=u.nextSibling;return f(u,()=>e.t("instanceShell.yoloMode.title")),f(x,()=>e.t("instanceShell.yoloMode.description")),f(a,c(bt,{get checked(){return mt(e.instanceId,d.id)},color:"warning",size:"small",get inputProps(){return{"aria-label":e.t("instanceShell.yoloMode.title")}},onChange:()=>ht(e.instanceId,d.id)}),null),g})():(()=>{var g=q(),a=g.firstChild;return f(a,()=>e.t("instanceShell.yoloMode.noSessionSelected")),g})()}},{id:"session-changes",labelKey:"instanceShell.rightPanel.sections.sessionChanges",tooltipKey:"instanceShell.rightPanel.sections.sessionChanges.tooltip",render:()=>{const d=e.activeSessionId();if(!d||d==="info")return(()=>{var u=q(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.noSessionSelected")),u})();const g=e.activeSessionDiffs();if(g===void 0)return(()=>{var u=q(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.loading")),u})();if(!Array.isArray(g)||g.length===0)return(()=>{var u=q(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.empty")),u})();const a=[...g].sort((u,x)=>String(u.file||"").localeCompare(String(x.file||""))),v=a.reduce((u,x)=>(u.additions+=typeof x.additions=="number"?x.additions:0,u.deletions+=typeof x.deletions=="number"?x.deletions:0,u),{additions:0,deletions:0});return(()=>{var u=Vt(),x=u.firstChild,y=x.firstChild,w=y.nextSibling,I=w.firstChild,N=I.nextSibling,F=x.nextSibling,_=F.firstChild;return f(y,()=>e.t("instanceShell.sessionChanges.filesChanged",{count:a.length})),f(I,()=>`+${v.additions}`),f(N,()=>`-${v.deletions}`),f(_,c(he,{each:a,children:T=>(()=>{var p=Xt(),U=p.firstChild,H=U.firstChild,j=H.nextSibling,V=j.firstChild,X=V.nextSibling;return p.$$click=()=>e.onOpenChangesTab(T.file),f(H,()=>T.file),f(V,()=>`+${T.additions}`),f(X,()=>`-${T.deletions}`),ae(h=>{var S=e.t("instanceShell.sessionChanges.actions.show"),k=T.file;return S!==h.e&&M(p,"title",h.e=S),k!==h.t&&M(H,"title",h.t=k),h},{e:void 0,t:void 0}),p})()})),u})()}},{id:"plan",labelKey:"instanceShell.rightPanel.sections.plan",tooltipKey:"instanceShell.rightPanel.sections.plan.tooltip",render:()=>{const d=e.activeSessionId();if(!d||d==="info")return(()=>{var a=q(),v=a.firstChild;return f(v,()=>e.t("instanceShell.plan.noSessionSelected")),a})();const g=e.latestTodoState();return g?c(xt,{state:g,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var a=q(),v=a.firstChild;return f(v,()=>e.t("instanceShell.plan.empty")),a})()}},{id:"background-processes",labelKey:"instanceShell.rightPanel.sections.backgroundProcesses",tooltipKey:"instanceShell.rightPanel.sections.backgroundProcesses.tooltip",render:()=>{const d=e.backgroundProcessList();return d.length===0?(()=>{var g=q(),a=g.firstChild;return f(a,()=>e.t("instanceShell.backgroundProcesses.empty")),g})():(()=>{var g=Yt();return f(g,c(he,{each:d,children:a=>(()=>{var v=Zt(),u=v.firstChild,x=u.firstChild,y=x.nextSibling,w=y.firstChild,I=w.nextSibling,N=u.nextSibling,F=N.firstChild,_=F.nextSibling,T=_.nextSibling;return f(x,()=>a.title),f(w,c(wt,{class:"h-3.5 w-3.5"})),f(I,()=>e.t("instanceShell.backgroundProcesses.status",{status:a.status})),f(y,c(ee,{get when(){return typeof a.outputSizeBytes=="number"},get children(){var p=Gt();return f(p,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((a.outputSizeBytes??0)/1024)})),p}}),null),F.$$click=()=>e.onOpenBackgroundOutput(a),f(F,c(It,{class:"h-4 w-4"})),_.$$click=()=>e.onStopBackgroundProcess(a.id),f(_,c($t,{class:"h-4 w-4"})),T.$$click=()=>e.onTerminateBackgroundProcess(a.id),f(T,c(vt,{class:"h-4 w-4"})),ae(p=>{var U=!!a.notifyEnabled,H=!a.notifyEnabled,j=e.t(a.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),V=e.t(a.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),X=e.t("instanceShell.backgroundProcesses.actions.output"),h=e.t("instanceShell.backgroundProcesses.actions.output"),S=a.status!=="running",k=e.t("instanceShell.backgroundProcesses.actions.stop"),re=e.t("instanceShell.backgroundProcesses.actions.stop"),le=e.t("instanceShell.backgroundProcesses.actions.terminate"),Pe=e.t("instanceShell.backgroundProcesses.actions.terminate");return U!==p.e&&w.classList.toggle("text-success",p.e=U),H!==p.t&&w.classList.toggle("text-tertiary",p.t=H),j!==p.a&&M(w,"aria-label",p.a=j),V!==p.o&&M(w,"title",p.o=V),X!==p.i&&M(F,"aria-label",p.i=X),h!==p.n&&M(F,"title",p.n=h),S!==p.s&&(_.disabled=p.s=S),k!==p.h&&M(_,"aria-label",p.h=k),re!==p.r&&M(_,"title",p.r=re),le!==p.d&&M(T,"aria-label",p.d=le),Pe!==p.l&&M(T,"title",p.l=Pe),p},{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}),v})()})),g})()}},{id:"mcp",labelKey:"instanceShell.rightPanel.sections.mcp",tooltipKey:"instanceShell.rightPanel.sections.mcp.tooltip",render:()=>c(be,{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(be,{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(be,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}];return(()=>{var d=Jt(),g=o;return typeof g=="function"?Je(g,d):o=d,ke(d,"mouseleave",t),ke(d,"mouseenter",i),f(d,c(ee,{get when(){return e.activeSession()},children:a=>c(qt,{get instanceId(){return e.instanceId},get sessionId(){return a().id},class:"status-tab-context-panel"})}),null),f(d,c(Z.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return c(he,{each:C,children:a=>c(Z.Item,{get value(){return a.id},class:"right-panel-accordion-item",get children(){return[c(Z.Header,{class:"right-panel-accordion-header-row",get children(){return[c(Z.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var v=Qt(),u=v.firstChild;return f(u,()=>e.t(a.labelKey)),v})(),c(pt,{get class(){return`right-panel-accordion-chevron ${n(a.id)?"right-panel-accordion-chevron-expanded":""}`}})]}}),c(Q,{openDelay:200,gutter:4,placement:"top",get children(){return[c(Q.Trigger,{as:"button",type:"button",class:"section-info-trigger",get"aria-label"(){return e.t(a.tooltipKey)},get children(){return c(Pt,{class:"section-info-icon"})}}),c(Q.Portal,{get children(){return c(Q.Content,{class:"section-info-tooltip",get children(){return e.t(a.tooltipKey)}})}})]}})]}}),c(Z.Content,{class:"right-panel-accordion-content",get children(){return a.render()}})]}})})}}),null),ae(()=>d.classList.toggle("status-tab-container--scroll-hover",!!r())),d})()};Qe(["click"]);export{dn as default};
1
+ import{m as $e,P as Ge,t as E,i as f,a as Ze,u as Je,h as ke,d as M,f as Qe}from"./monaco-viewer-DnczYBfh.js";import{n as c,m as P,b as O,o as $,k as te,l as ne,q as ue,s as A,d as D,c as z,S as ee,t as et,w as Ie,a as ae,F as he}from"./git-diff-vendor-CSgooKT_.js";import{I as ge,U as tt,V as B,W as ce,X as nt,Y as ot,Z as De,_ as Oe,$ as _e,a0 as st,a1 as me,a2 as de,a3 as fe,a4 as Me,a5 as oe,a6 as se,a7 as it,a8 as ve,a9 as rt,aa as lt,ab as K,ac as ye,ad as at,ae as ct,af as dt,ag as L,ah as ut,ai as gt,aj as Te,ak as ft,P as pt,al as be,am as ht,an as mt,ao as bt,ap as vt}from"./main-ByuKWHRz.js";import{u as yt}from"./index--0EL0_Tu.js";import{T as xt}from"./todo-BLpUqy61.js";import"./fast-diff-vendor-DgdwVvTQ.js";import"./highlight-vendor-8FKMu9os.js";import"./core-DhEqZVGG.js";import"./event-DjZVAIBO.js";const Ct=[["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"}]],wt=e=>c(ge,P(e,{name:"BellRing",iconNode:Ct})),St=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Pt=e=>c(ge,P(e,{name:"Info",iconNode:St})),kt=[["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"}]],It=e=>c(ge,P(e,{name:"TerminalSquare",iconNode:kt})),Tt=[["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"}]],$t=e=>c(ge,P(e,{name:"XOctagon",iconNode:Tt}));var Ee=te();function Dt(){return ne(Ee)}function Ot(){const e=Dt();if(e===void 0)throw new Error("[kobalte]: `useDomCollectionContext` must be used within a `DomCollectionProvider` component");return e}function Ae(e,o){return!!(o.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_PRECEDING)}function _t(e,o){var t;const r=o.ref();if(!r)return-1;let i=e.length;if(!i)return-1;for(;i--;){const n=(t=e[i])==null?void 0:t.ref();if(n&&Ae(n,r))return i+1}return 0}function Mt(e){const o=e.map((i,t)=>[t,i]);let r=!1;return o.sort(([i,t],[n,s])=>{const l=t.ref(),m=s.ref();return l===m||!l||!m?0:Ae(l,m)?(i>n&&(r=!0),-1):(i<n&&(r=!0),1)}),r?o.map(([i,t])=>t):e}function Fe(e,o){const r=Mt(e);e!==r&&o(r)}function Et(e){var t,n;const o=e[0],r=(t=e[e.length-1])==null?void 0:t.ref();let i=(n=o==null?void 0:o.ref())==null?void 0:n.parentElement;for(;i;){if(r&&i.contains(r))return i;i=i.parentElement}return ce(i).body}function At(e,o){O(()=>{const r=setTimeout(()=>{Fe(e(),o)});$(()=>clearTimeout(r))})}function Ft(e,o){if(typeof IntersectionObserver!="function"){At(e,o);return}let r=[];O(()=>{const i=()=>{const s=!!r.length;r=e(),s&&Fe(e(),o)},t=Et(e()),n=new IntersectionObserver(i,{root:t});for(const s of e()){const l=s.ref();l&&n.observe(l)}$(()=>n.disconnect())})}function Rt(e={}){const[o,r]=tt({value:()=>ot(e.items),onChange:n=>{var s;return(s=e.onItemsChange)==null?void 0:s.call(e,n)}});Ft(o,r);const i=n=>(r(s=>{const l=_t(s,n);return nt(s,n,l)}),()=>{r(s=>{const l=s.filter(m=>m.ref()!==n.ref());return s.length===l.length?s:l})});return{DomCollectionProvider:n=>c(Ee.Provider,{value:{registerItem:i},get children(){return n.children}})}}function Kt(e){const o=Ot(),r=B({shouldRegisterItem:!0},e);O(()=>{if(!r.shouldRegisterItem)return;const i=o.registerItem(r.getItem());$(i)})}var Lt={};ye(Lt,{Arrow:()=>De,Content:()=>Ke,Portal:()=>Le,Root:()=>Be,Tooltip:()=>Q,Trigger:()=>He,useTooltipContext:()=>pe});var Re=te();function pe(){const e=ne(Re);if(e===void 0)throw new Error("[kobalte]: `useTooltipContext` must be used within a `Tooltip` component");return e}function Ke(e){const o=pe(),r=B({id:o.generateId("content")},e),[i,t]=A(r,["ref","style"]);return O(()=>$(o.registerContentId(t.id))),c(ee,{get when(){return o.contentPresent()},get children(){return c(Me.Positioner,{get children(){return c(it,P({ref(n){var s=oe(l=>{o.setContentRef(l)},i.ref);typeof s=="function"&&s(n)},role:"tooltip",disableOutsidePointerEvents:!1,get style(){return ve({"--kb-tooltip-content-transform-origin":"var(--kb-popper-content-transform-origin)",position:"relative"},i.style)},onFocusOutside:n=>n.preventDefault(),onDismiss:()=>o.hideTooltip(!0)},()=>o.dataset(),t))}})}})}function Le(e){const o=pe();return c(ee,{get when(){return o.contentPresent()},get children(){return c(Ge,e)}})}function Bt(e,o,r){const i=e.split("-")[0],t=o.getBoundingClientRect(),n=r.getBoundingClientRect(),s=[],l=t.left+t.width/2,m=t.top+t.height/2;switch(i){case"top":s.push([t.left,m]),s.push([n.left,n.bottom]),s.push([n.left,n.top]),s.push([n.right,n.top]),s.push([n.right,n.bottom]),s.push([t.right,m]);break;case"right":s.push([l,t.top]),s.push([n.left,n.top]),s.push([n.right,n.top]),s.push([n.right,n.bottom]),s.push([n.left,n.bottom]),s.push([l,t.bottom]);break;case"bottom":s.push([t.left,m]),s.push([n.left,n.top]),s.push([n.left,n.bottom]),s.push([n.right,n.bottom]),s.push([n.right,n.top]),s.push([t.right,m]);break;case"left":s.push([l,t.top]),s.push([n.right,n.top]),s.push([n.left,n.top]),s.push([n.left,n.bottom]),s.push([n.right,n.bottom]),s.push([l,t.bottom]);break}return s}var W={},Ht=0,Y=!1,R,J,G;function Be(e){const o=`tooltip-${ue()}`,r=`${++Ht}`,i=B({id:o,openDelay:700,closeDelay:300,skipDelayDuration:300},e),[t,n]=A(i,["id","open","defaultOpen","onOpenChange","disabled","triggerOnFocusOnly","openDelay","closeDelay","skipDelayDuration","ignoreSafeArea","forceMount"]);let s;const[l,m]=D(),[b,C]=D(),[d,g]=D(),[a,v]=D(n.placement),u=Oe({open:()=>t.open,defaultOpen:()=>t.defaultOpen,onOpenChange:h=>{var S;return(S=t.onOpenChange)==null?void 0:S.call(t,h)}}),{present:x}=_e({show:()=>t.forceMount||u.isOpen(),element:()=>d()??null}),y=()=>{W[r]=I},w=()=>{for(const h in W)h!==r&&(W[h](!0),delete W[h])},I=(h=!1)=>{h||t.closeDelay&&t.closeDelay<=0?(window.clearTimeout(s),s=void 0,u.close()):s||(s=window.setTimeout(()=>{s=void 0,u.close()},t.closeDelay)),window.clearTimeout(R),R=void 0,t.skipDelayDuration&&t.skipDelayDuration>=0&&(G=window.setTimeout(()=>{window.clearTimeout(G),G=void 0},t.skipDelayDuration)),Y&&(window.clearTimeout(J),J=window.setTimeout(()=>{delete W[r],J=void 0,Y=!1},t.closeDelay))},N=()=>{clearTimeout(s),s=void 0,w(),y(),Y=!0,u.open(),window.clearTimeout(R),R=void 0,window.clearTimeout(J),J=void 0,window.clearTimeout(G),G=void 0},F=()=>{w(),y(),!u.isOpen()&&!R&&!Y?R=window.setTimeout(()=>{R=void 0,Y=!0,N()},t.openDelay):u.isOpen()||N()},_=(h=!1)=>{!h&&t.openDelay&&t.openDelay>0&&!s&&!G?F():N()},T=()=>{window.clearTimeout(R),R=void 0,Y=!1},p=()=>{window.clearTimeout(s),s=void 0},U=h=>me(b(),h)||me(d(),h),H=h=>{const S=b(),k=d();if(!(!S||!k))return Bt(h,S,k)},j=h=>{const S=h.target;if(U(S)){p();return}if(!t.ignoreSafeArea){const k=H(a());if(k&&rt(lt(h),k)){p();return}}s||I()};O(()=>{if(!u.isOpen())return;const h=ce();h.addEventListener("pointermove",j,!0),$(()=>{h.removeEventListener("pointermove",j,!0)})}),O(()=>{const h=b();if(!h||!u.isOpen())return;const S=re=>{const le=re.target;me(le,h)&&I(!0)},k=st();k.addEventListener("scroll",S,{capture:!0}),$(()=>{k.removeEventListener("scroll",S,{capture:!0})})}),$(()=>{clearTimeout(s),W[r]&&delete W[r]});const X={dataset:z(()=>({"data-expanded":u.isOpen()?"":void 0,"data-closed":u.isOpen()?void 0:""})),isOpen:u.isOpen,isDisabled:()=>t.disabled??!1,triggerOnFocusOnly:()=>t.triggerOnFocusOnly??!1,contentId:l,contentPresent:x,openTooltip:_,hideTooltip:I,cancelOpening:T,generateId:fe(()=>i.id),registerContentId:de(m),isTargetOnTooltip:U,setTriggerRef:C,setContentRef:g};return c(Re.Provider,{value:X,get children(){return c(Me,P({anchorRef:b,contentRef:d,onCurrentPlacementChange:v},n))}})}function He(e){let o;const r=pe(),[i,t]=A(e,["ref","onPointerEnter","onPointerLeave","onPointerDown","onClick","onFocus","onBlur"]);let n=!1,s=!1,l=!1;const m=()=>{n=!1},b=()=>{!r.isOpen()&&(s||l)&&r.openTooltip(l)},C=y=>{r.isOpen()&&!s&&!l&&r.hideTooltip(y)},d=y=>{K(y,i.onPointerEnter),!(y.pointerType==="touch"||r.triggerOnFocusOnly()||r.isDisabled()||y.defaultPrevented)&&(s=!0,b())},g=y=>{K(y,i.onPointerLeave),y.pointerType!=="touch"&&(s=!1,l=!1,r.isOpen()?C():r.cancelOpening())},a=y=>{K(y,i.onPointerDown),n=!0,ce(o).addEventListener("pointerup",m,{once:!0})},v=y=>{K(y,i.onClick),s=!1,l=!1,C(!0)},u=y=>{K(y,i.onFocus),!(r.isDisabled()||y.defaultPrevented||n)&&(l=!0,b())},x=y=>{K(y,i.onBlur);const w=y.relatedTarget;r.isTargetOnTooltip(w)||(s=!1,l=!1,C(!0))};return $(()=>{ce(o).removeEventListener("pointerup",m)}),c(se,P({as:"button",ref(y){var w=oe(I=>{r.setTriggerRef(I),o=I},i.ref);typeof w=="function"&&w(y)},get"aria-describedby"(){return $e(()=>!!r.isOpen())()?r.contentId():void 0},onPointerEnter:d,onPointerLeave:g,onPointerDown:a,onClick:v,onFocus:u,onBlur:x},()=>r.dataset(),t))}var Q=Object.assign(Be,{Arrow:De,Content:Ke,Portal:Le,Trigger:He}),Nt={};ye(Nt,{Collapsible:()=>Ut,Content:()=>xe,Root:()=>Ce,Trigger:()=>we,useCollapsibleContext:()=>ie});var Ne=te();function ie(){const e=ne(Ne);if(e===void 0)throw new Error("[kobalte]: `useCollapsibleContext` must be used within a `Collapsible.Root` component");return e}function xe(e){const[o,r]=D(),i=ie(),t=B({id:i.generateId("content")},e),[n,s]=A(t,["ref","id","style"]),{present:l}=_e({show:i.shouldMount,element:()=>o()??null}),[m,b]=D(0),[C,d]=D(0);let a=i.isOpen()||l();return et(()=>{const v=requestAnimationFrame(()=>{a=!1});$(()=>{cancelAnimationFrame(v)})}),O(Ie(l,()=>{if(!o())return;o().style.transitionDuration="0s",o().style.animationName="none";const v=o().getBoundingClientRect();b(v.height),d(v.width),a||(o().style.transitionDuration="",o().style.animationName="")})),O(Ie(i.isOpen,v=>{!v&&o()&&(o().style.transitionDuration="",o().style.animationName="")},{defer:!0})),O(()=>$(i.registerContentId(n.id))),c(ee,{get when(){return l()},get children(){return c(se,P({as:"div",ref(v){var u=oe(r,n.ref);typeof u=="function"&&u(v)},get id(){return n.id},get style(){return ve({"--kb-collapsible-content-height":m()?`${m()}px`:void 0,"--kb-collapsible-content-width":C()?`${C()}px`:void 0},n.style)}},()=>i.dataset(),s))}})}function Ce(e){const o=`collapsible-${ue()}`,r=B({id:o},e),[i,t]=A(r,["open","defaultOpen","onOpenChange","disabled","forceMount"]),[n,s]=D(),l=Oe({open:()=>i.open,defaultOpen:()=>i.defaultOpen,onOpenChange:C=>{var d;return(d=i.onOpenChange)==null?void 0:d.call(i,C)}}),m=z(()=>({"data-expanded":l.isOpen()?"":void 0,"data-closed":l.isOpen()?void 0:"","data-disabled":i.disabled?"":void 0})),b={dataset:m,isOpen:l.isOpen,disabled:()=>i.disabled??!1,shouldMount:()=>i.forceMount||l.isOpen(),contentId:n,toggle:l.toggle,generateId:fe(()=>t.id),registerContentId:de(s)};return c(Ne.Provider,{value:b,get children(){return c(se,P({as:"div"},m,t))}})}function we(e){const o=ie(),[r,i]=A(e,["onClick"]);return c(at,P({get"aria-expanded"(){return o.isOpen()},get"aria-controls"(){return $e(()=>!!o.isOpen())()?o.contentId():void 0},get disabled(){return o.disabled()},onClick:n=>{K(n,r.onClick),o.toggle()}},()=>o.dataset(),i))}var Ut=Object.assign(Ce,{Content:xe,Trigger:we}),Z={};ye(Z,{Accordion:()=>jt,Content:()=>We,Header:()=>qe,Item:()=>Ve,Root:()=>Xe,Trigger:()=>Ye,useAccordionContext:()=>Se});var Ue=te();function je(){const e=ne(Ue);if(e===void 0)throw new Error("[kobalte]: `useAccordionItemContext` must be used within a `Accordion.Item` component");return e}function We(e){const o=je(),r=o.generateId("content"),i=B({id:r},e),[t,n]=A(i,["id","style"]);return O(()=>$(o.registerContentId(t.id))),c(xe,P({role:"region",get"aria-labelledby"(){return o.triggerId()},get style(){return ve({"--kb-accordion-content-height":"var(--kb-collapsible-content-height)","--kb-accordion-content-width":"var(--kb-collapsible-content-width)"},t.style)}},n))}function qe(e){const o=ie();return c(se,P({as:"h3"},()=>o.dataset(),e))}var ze=te();function Se(){const e=ne(ze);if(e===void 0)throw new Error("[kobalte]: `useAccordionContext` must be used within a `Accordion.Root` component");return e}function Ve(e){const o=Se(),r=`${o.generateId("item")}-${ue()}`,i=B({id:r},e),[t,n]=A(i,["value","disabled"]),[s,l]=D(),[m,b]=D(),C=()=>o.listState().selectionManager(),d=()=>C().isSelected(t.value),g={value:()=>t.value,triggerId:s,contentId:m,generateId:fe(()=>n.id),registerTriggerId:de(l),registerContentId:de(b)};return c(Ue.Provider,{value:g,get children(){return c(Ce,P({get open(){return d()},get disabled(){return t.disabled}},n))}})}function Xe(e){let o;const r=`accordion-${ue()}`,i=B({id:r,multiple:!1,collapsible:!1,shouldFocusWrap:!0},e),[t,n]=A(i,["id","ref","value","defaultValue","onChange","multiple","collapsible","shouldFocusWrap","onKeyDown","onMouseDown","onFocusIn","onFocusOut"]),[s,l]=D([]),{DomCollectionProvider:m}=Rt({items:s,onItemsChange:l}),b=ct({selectedKeys:()=>t.value,defaultSelectedKeys:()=>t.defaultValue,onSelectionChange:g=>{var a;return(a=t.onChange)==null?void 0:a.call(t,Array.from(g))},disallowEmptySelection:()=>!t.multiple&&!t.collapsible,selectionMode:()=>t.multiple?"multiple":"single",dataSource:s});b.selectionManager().setFocusedKey("item-1");const C=dt({selectionManager:()=>b.selectionManager(),collection:()=>b.collection(),disallowEmptySelection:()=>b.selectionManager().disallowEmptySelection(),shouldFocusWrap:()=>t.shouldFocusWrap,disallowTypeAhead:!0,allowsTabNavigation:!0},()=>o),d={listState:()=>b,generateId:fe(()=>t.id)};return c(m,{get children(){return c(ze.Provider,{value:d,get children(){return c(se,P({as:"div",get id(){return t.id},ref(g){var a=oe(v=>o=v,t.ref);typeof a=="function"&&a(g)},get onKeyDown(){return L([t.onKeyDown,C.onKeyDown])},get onMouseDown(){return L([t.onMouseDown,C.onMouseDown])},get onFocusIn(){return L([t.onFocusIn])},get onFocusOut(){return L([t.onFocusOut,C.onFocusOut])}},n))}})}})}function Ye(e){let o;const r=Se(),i=je(),t=ie(),n=i.generateId("trigger"),s=B({id:n},e),[l,m]=A(s,["ref","onPointerDown","onPointerUp","onClick","onKeyDown","onMouseDown","onFocus"]);Kt({getItem:()=>({ref:()=>o,type:"item",key:i.value(),textValue:"",disabled:t.disabled()})});const b=ut({key:()=>i.value(),selectionManager:()=>r.listState().selectionManager(),disabled:()=>t.disabled(),shouldSelectOnPressUp:!0},()=>o),C=d=>{["Enter"," "].includes(d.key)&&d.preventDefault(),K(d,l.onKeyDown),K(d,b.onKeyDown)};return O(()=>$(i.registerTriggerId(m.id))),c(we,P({ref(d){var g=oe(a=>o=a,l.ref);typeof g=="function"&&g(d)},get"data-key"(){return b.dataKey()},get onPointerDown(){return L([l.onPointerDown,b.onPointerDown])},get onPointerUp(){return L([l.onPointerUp,b.onPointerUp])},get onClick(){return L([l.onClick,b.onClick])},onKeyDown:C,get onMouseDown(){return L([l.onMouseDown,b.onMouseDown])},get onFocus(){return L([l.onFocus,b.onFocus])}},m))}var jt=Object.assign(Xe,{Content:We,Header:qe,Item:Ve,Trigger:Ye}),Wt=E('<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 qt=e=>{const{t:o}=yt(),r=z(()=>gt(e.instanceId,e.sessionId)??{cost:0,contextWindow:0,isSubscriptionModel:!1,inputTokens:0,outputTokens:0,reasoningTokens:0,actualUsageTokens:0,modelOutputLimit:0,contextAvailableTokens:null}),i=z(()=>r().inputTokens??0),t=z(()=>r().outputTokens??0),n=z(()=>{const l=r().isSubscriptionModel?0:r().cost;return l>0?l:0}),s=z(()=>`$${n().toFixed(2)}`);return(()=>{var l=Wt(),m=l.firstChild,b=m.firstChild,C=b.firstChild,d=C.nextSibling,g=b.nextSibling,a=g.firstChild,v=a.nextSibling,u=g.nextSibling,x=u.firstChild,y=x.nextSibling;return f(C,()=>o("contextUsagePanel.labels.input")),f(d,()=>Te(i())),f(a,()=>o("contextUsagePanel.labels.output")),f(v,()=>Te(t())),f(x,()=>o("contextUsagePanel.labels.cost")),f(y,s),ae(()=>Ze(l,`session-context-panel px-4 py-2 ${e.class??""}`)),l})()};var q=E('<div class="right-panel-empty right-panel-empty--left"><span class=text-xs>'),zt=E('<div class="rounded-md border border-base bg-surface-secondary px-3 py-2"><div class="flex items-start justify-between gap-3"><div class=min-w-0><div class="text-sm font-medium text-primary"></div><p class="mt-1 text-xs text-secondary">'),Vt=E('<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="session-changes-scroll rounded-md border border-base bg-surface-secondary p-2 max-h-[40vh] overflow-y-auto"><div class="flex flex-col">'),Xt=E('<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)>'),Yt=E('<div class="flex flex-col gap-2">'),Gt=E("<span>"),Zt=E('<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">'),Jt=E("<div class=status-tab-container>"),Qt=E("<span class=section-left><span class=section-label>");const dn=e=>{let o;const{isHovered:r,handleMouseEnter:i,handleMouseLeave:t}=ft(()=>o),n=d=>e.expandedItems().includes(d),C=[{id:"yolo-mode",labelKey:"instanceShell.rightPanel.sections.yoloMode",tooltipKey:"instanceShell.rightPanel.sections.yoloMode.tooltip",render:()=>{const d=e.activeSession();return d?(()=>{var g=zt(),a=g.firstChild,v=a.firstChild,u=v.firstChild,x=u.nextSibling;return f(u,()=>e.t("instanceShell.yoloMode.title")),f(x,()=>e.t("instanceShell.yoloMode.description")),f(a,c(bt,{get checked(){return mt(e.instanceId,d.id)},color:"warning",size:"small",get inputProps(){return{"aria-label":e.t("instanceShell.yoloMode.title")}},onChange:()=>ht(e.instanceId,d.id)}),null),g})():(()=>{var g=q(),a=g.firstChild;return f(a,()=>e.t("instanceShell.yoloMode.noSessionSelected")),g})()}},{id:"session-changes",labelKey:"instanceShell.rightPanel.sections.sessionChanges",tooltipKey:"instanceShell.rightPanel.sections.sessionChanges.tooltip",render:()=>{const d=e.activeSessionId();if(!d||d==="info")return(()=>{var u=q(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.noSessionSelected")),u})();const g=e.activeSessionDiffs();if(g===void 0)return(()=>{var u=q(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.loading")),u})();if(!Array.isArray(g)||g.length===0)return(()=>{var u=q(),x=u.firstChild;return f(x,()=>e.t("instanceShell.sessionChanges.empty")),u})();const a=[...g].sort((u,x)=>String(u.file||"").localeCompare(String(x.file||""))),v=a.reduce((u,x)=>(u.additions+=typeof x.additions=="number"?x.additions:0,u.deletions+=typeof x.deletions=="number"?x.deletions:0,u),{additions:0,deletions:0});return(()=>{var u=Vt(),x=u.firstChild,y=x.firstChild,w=y.nextSibling,I=w.firstChild,N=I.nextSibling,F=x.nextSibling,_=F.firstChild;return f(y,()=>e.t("instanceShell.sessionChanges.filesChanged",{count:a.length})),f(I,()=>`+${v.additions}`),f(N,()=>`-${v.deletions}`),f(_,c(he,{each:a,children:T=>(()=>{var p=Xt(),U=p.firstChild,H=U.firstChild,j=H.nextSibling,V=j.firstChild,X=V.nextSibling;return p.$$click=()=>e.onOpenChangesTab(T.file),f(H,()=>T.file),f(V,()=>`+${T.additions}`),f(X,()=>`-${T.deletions}`),ae(h=>{var S=e.t("instanceShell.sessionChanges.actions.show"),k=T.file;return S!==h.e&&M(p,"title",h.e=S),k!==h.t&&M(H,"title",h.t=k),h},{e:void 0,t:void 0}),p})()})),u})()}},{id:"plan",labelKey:"instanceShell.rightPanel.sections.plan",tooltipKey:"instanceShell.rightPanel.sections.plan.tooltip",render:()=>{const d=e.activeSessionId();if(!d||d==="info")return(()=>{var a=q(),v=a.firstChild;return f(v,()=>e.t("instanceShell.plan.noSessionSelected")),a})();const g=e.latestTodoState();return g?c(xt,{state:g,get emptyLabel(){return e.t("instanceShell.plan.empty")},showStatusLabel:!1}):(()=>{var a=q(),v=a.firstChild;return f(v,()=>e.t("instanceShell.plan.empty")),a})()}},{id:"background-processes",labelKey:"instanceShell.rightPanel.sections.backgroundProcesses",tooltipKey:"instanceShell.rightPanel.sections.backgroundProcesses.tooltip",render:()=>{const d=e.backgroundProcessList();return d.length===0?(()=>{var g=q(),a=g.firstChild;return f(a,()=>e.t("instanceShell.backgroundProcesses.empty")),g})():(()=>{var g=Yt();return f(g,c(he,{each:d,children:a=>(()=>{var v=Zt(),u=v.firstChild,x=u.firstChild,y=x.nextSibling,w=y.firstChild,I=w.nextSibling,N=u.nextSibling,F=N.firstChild,_=F.nextSibling,T=_.nextSibling;return f(x,()=>a.title),f(w,c(wt,{class:"h-3.5 w-3.5"})),f(I,()=>e.t("instanceShell.backgroundProcesses.status",{status:a.status})),f(y,c(ee,{get when(){return typeof a.outputSizeBytes=="number"},get children(){var p=Gt();return f(p,()=>e.t("instanceShell.backgroundProcesses.output",{sizeKb:Math.round((a.outputSizeBytes??0)/1024)})),p}}),null),F.$$click=()=>e.onOpenBackgroundOutput(a),f(F,c(It,{class:"h-4 w-4"})),_.$$click=()=>e.onStopBackgroundProcess(a.id),f(_,c($t,{class:"h-4 w-4"})),T.$$click=()=>e.onTerminateBackgroundProcess(a.id),f(T,c(vt,{class:"h-4 w-4"})),ae(p=>{var U=!!a.notifyEnabled,H=!a.notifyEnabled,j=e.t(a.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),V=e.t(a.notifyEnabled?"instanceShell.backgroundProcesses.notify.enabled":"instanceShell.backgroundProcesses.notify.disabled"),X=e.t("instanceShell.backgroundProcesses.actions.output"),h=e.t("instanceShell.backgroundProcesses.actions.output"),S=a.status!=="running",k=e.t("instanceShell.backgroundProcesses.actions.stop"),re=e.t("instanceShell.backgroundProcesses.actions.stop"),le=e.t("instanceShell.backgroundProcesses.actions.terminate"),Pe=e.t("instanceShell.backgroundProcesses.actions.terminate");return U!==p.e&&w.classList.toggle("text-success",p.e=U),H!==p.t&&w.classList.toggle("text-tertiary",p.t=H),j!==p.a&&M(w,"aria-label",p.a=j),V!==p.o&&M(w,"title",p.o=V),X!==p.i&&M(F,"aria-label",p.i=X),h!==p.n&&M(F,"title",p.n=h),S!==p.s&&(_.disabled=p.s=S),k!==p.h&&M(_,"aria-label",p.h=k),re!==p.r&&M(_,"title",p.r=re),le!==p.d&&M(T,"aria-label",p.d=le),Pe!==p.l&&M(T,"title",p.l=Pe),p},{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}),v})()})),g})()}},{id:"mcp",labelKey:"instanceShell.rightPanel.sections.mcp",tooltipKey:"instanceShell.rightPanel.sections.mcp.tooltip",render:()=>c(be,{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(be,{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(be,{get initialInstance(){return e.instance},sections:["plugins"],showSectionHeadings:!1,class:"space-y-2"})}];return(()=>{var d=Jt(),g=o;return typeof g=="function"?Je(g,d):o=d,ke(d,"mouseleave",t),ke(d,"mouseenter",i),f(d,c(ee,{get when(){return e.activeSession()},children:a=>c(qt,{get instanceId(){return e.instanceId},get sessionId(){return a().id},class:"status-tab-context-panel"})}),null),f(d,c(Z.Root,{class:"right-panel-accordion",collapsible:!0,multiple:!0,get value(){return e.expandedItems()},get onChange(){return e.onExpandedItemsChange},get children(){return c(he,{each:C,children:a=>c(Z.Item,{get value(){return a.id},class:"right-panel-accordion-item",get children(){return[c(Z.Header,{class:"right-panel-accordion-header-row",get children(){return[c(Z.Trigger,{class:"right-panel-accordion-trigger",get children(){return[(()=>{var v=Qt(),u=v.firstChild;return f(u,()=>e.t(a.labelKey)),v})(),c(pt,{get class(){return`right-panel-accordion-chevron ${n(a.id)?"right-panel-accordion-chevron-expanded":""}`}})]}}),c(Q,{openDelay:200,gutter:4,placement:"top",get children(){return[c(Q.Trigger,{as:"button",type:"button",class:"section-info-trigger",get"aria-label"(){return e.t(a.tooltipKey)},get children(){return c(Pt,{class:"section-info-icon"})}}),c(Q.Portal,{get children(){return c(Q.Content,{class:"section-info-tooltip",get children(){return e.t(a.tooltipKey)}})}})]}})]}}),c(Z.Content,{class:"right-panel-accordion-content",get children(){return a.render()}})]}})})}}),null),ae(()=>d.classList.toggle("status-tab-container--scroll-hover",!!r())),d})()};Qe(["click"]);export{dn as default};