@akira-tl/forgerelay 0.8.7 → 0.8.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.
- package/CHANGELOG.md +6 -0
- package/dist/server.js +44 -11
- package/dist/ui/.vite/manifest.json +28 -27
- package/dist/ui/activity-panel-app.html +3 -3
- package/dist/ui/assets/{activity-panel-app-CUAN6zyW.js → activity-panel-app-7AckaxIR.js} +2 -2
- package/dist/ui/assets/{heavy-payload-CgzrutLm.js → heavy-payload-Bol1_mcs.js} +2 -2
- package/dist/ui/assets/{review-payload-BrLbezbq.js → review-payload-BqJp0c5e.js} +1 -1
- package/dist/ui/assets/{scrollbar-CbhpdW05.js → scrollbar-CvE-I-jG.js} +1 -1
- package/dist/ui/assets/{workspace-app-CxwJuZyS.js → workspace-app-BLW7p6IZ.js} +4 -1
- package/dist/ui/assets/workspace-app-BjNqR0en.js +1 -0
- package/dist/ui/assets/workspace-app-CmaYU4DW.js +3 -0
- package/dist/ui/assets/workspace-app-D2bJ5fjt.css +1 -0
- package/dist/ui/assets/workspace-lifecycle-app-BVbI2Ilf.js +1 -0
- package/dist/ui/workspace-app.html +4 -4
- package/dist/ui/workspace-lifecycle-app.html +4 -4
- package/dist/workspaces.js +5 -0
- package/package.json +2 -2
- package/dist/ui/assets/workspace-app-Bhj96tsR.js +0 -1
- package/dist/ui/assets/workspace-app-D6UR0AFl.js +0 -5
- package/dist/ui/assets/workspace-app-ldjBmCJR.css +0 -1
- package/dist/ui/assets/workspace-lifecycle-app-Cqfhx9pV.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable ForgeRelay changes are documented here.
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
## [0.8.8] - 2026-09-02
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Restored the full lightweight Workspace overview across fresh MCP connections and brought rich Read/Edit/Write Activity details back behind lazy per-Activity loading, without reintroducing heavy default polling payloads.
|
|
12
|
+
|
|
7
13
|
## [0.8.7] - 2026-09-02
|
|
8
14
|
|
|
9
15
|
### Changed
|
package/dist/server.js
CHANGED
|
@@ -2105,23 +2105,56 @@ export function createMcpServer(config, workspaces, reviewCheckpoints, processSe
|
|
|
2105
2105
|
instructions: buildServerInstructions(config),
|
|
2106
2106
|
});
|
|
2107
2107
|
const workspacePanelStates = new Map();
|
|
2108
|
+
const liveWorkspacePanelState = (workspace) => {
|
|
2109
|
+
const loadedInstructionPathSet = new Set(workspace.loadedInstructionPaths);
|
|
2110
|
+
const loadedInstructionPaths = [...loadedInstructionPathSet]
|
|
2111
|
+
.map((path) => formatAgentsPath(path, workspace.root));
|
|
2112
|
+
const availableInstructionPaths = [...new Set([...workspace.knownInstructionPathsByDir.values()].flat())]
|
|
2113
|
+
.filter((path) => !loadedInstructionPathSet.has(path))
|
|
2114
|
+
.map((path) => formatAgentsPath(path, workspace.root));
|
|
2115
|
+
const agentProviders = config.subagents ? subagentProviders : [];
|
|
2116
|
+
const agents = workspace.agentProfiles.map((profile) => {
|
|
2117
|
+
const summary = summarizeSubagentProfile(profile);
|
|
2118
|
+
const availability = agentProviders.find((provider) => provider.name === summary.provider);
|
|
2119
|
+
return {
|
|
2120
|
+
...summary,
|
|
2121
|
+
providerAvailable: availability?.available,
|
|
2122
|
+
providerUnavailableReason: availability?.reason,
|
|
2123
|
+
};
|
|
2124
|
+
});
|
|
2125
|
+
const skills = workspace.skills
|
|
2126
|
+
.filter((skill) => !skill.disableModelInvocation)
|
|
2127
|
+
.map((skill) => ({ name: skill.name, description: skill.description }));
|
|
2128
|
+
return compactWorkspacePresentation({
|
|
2129
|
+
workspaceId: workspace.id,
|
|
2130
|
+
root: workspace.root,
|
|
2131
|
+
path: workspace.root,
|
|
2132
|
+
mode: workspace.mode,
|
|
2133
|
+
sourceRoot: workspace.sourceRoot,
|
|
2134
|
+
worktree: workspace.worktree,
|
|
2135
|
+
agentsFiles: loadedInstructionPaths.map((path) => ({ path })),
|
|
2136
|
+
availableAgentsFiles: availableInstructionPaths.map((path) => ({ path })),
|
|
2137
|
+
skills,
|
|
2138
|
+
agentProviders,
|
|
2139
|
+
agents,
|
|
2140
|
+
summary: {
|
|
2141
|
+
mode: workspace.mode,
|
|
2142
|
+
agentsFiles: loadedInstructionPaths.length,
|
|
2143
|
+
availableAgentsFiles: availableInstructionPaths.length,
|
|
2144
|
+
skills: skills.length,
|
|
2145
|
+
agentProviders: agentProviders.length,
|
|
2146
|
+
agents: agents.length,
|
|
2147
|
+
},
|
|
2148
|
+
});
|
|
2149
|
+
};
|
|
2108
2150
|
const workspacePanelState = (workspaceId) => {
|
|
2109
2151
|
const remembered = workspacePanelStates.get(workspaceId);
|
|
2110
2152
|
if (remoteWorkspaces.has(workspaceId) || compositeWorkspaces.has(workspaceId)) {
|
|
2111
2153
|
return remembered;
|
|
2112
2154
|
}
|
|
2113
2155
|
try {
|
|
2114
|
-
const
|
|
2115
|
-
|
|
2116
|
-
return remembered;
|
|
2117
|
-
return compactWorkspacePresentation({
|
|
2118
|
-
workspaceId: workspace.id,
|
|
2119
|
-
root: workspace.root,
|
|
2120
|
-
path: workspace.root,
|
|
2121
|
-
mode: workspace.mode,
|
|
2122
|
-
sourceRoot: workspace.sourceRoot,
|
|
2123
|
-
summary: { mode: workspace.mode },
|
|
2124
|
-
});
|
|
2156
|
+
const live = liveWorkspacePanelState(workspaces.getWorkspace(workspaceId));
|
|
2157
|
+
return remembered ? { ...live, ...remembered } : live;
|
|
2125
2158
|
}
|
|
2126
2159
|
catch {
|
|
2127
2160
|
return undefined;
|
|
@@ -2123,12 +2123,12 @@
|
|
|
2123
2123
|
"_chunk-EyZ2wyi3.js"
|
|
2124
2124
|
]
|
|
2125
2125
|
},
|
|
2126
|
-
"_scrollbar-
|
|
2127
|
-
"file": "assets/scrollbar-
|
|
2126
|
+
"_scrollbar-CvE-I-jG.js": {
|
|
2127
|
+
"file": "assets/scrollbar-CvE-I-jG.js",
|
|
2128
2128
|
"name": "scrollbar",
|
|
2129
2129
|
"imports": [
|
|
2130
2130
|
"_chunk-EyZ2wyi3.js",
|
|
2131
|
-
"_workspace-app-
|
|
2131
|
+
"_workspace-app-BLW7p6IZ.js"
|
|
2132
2132
|
],
|
|
2133
2133
|
"dynamicImports": [
|
|
2134
2134
|
"../../node_modules/@shikijs/langs/dist/abap.mjs",
|
|
@@ -2474,33 +2474,34 @@
|
|
|
2474
2474
|
"_chunk-EyZ2wyi3.js"
|
|
2475
2475
|
]
|
|
2476
2476
|
},
|
|
2477
|
-
"_workspace-app-
|
|
2478
|
-
"file": "assets/workspace-app-
|
|
2477
|
+
"_workspace-app-BLW7p6IZ.js": {
|
|
2478
|
+
"file": "assets/workspace-app-BLW7p6IZ.js",
|
|
2479
2479
|
"name": "workspace-app",
|
|
2480
2480
|
"imports": [
|
|
2481
2481
|
"_chunk-EyZ2wyi3.js"
|
|
2482
2482
|
],
|
|
2483
2483
|
"dynamicImports": [
|
|
2484
|
-
"_workspace-app-
|
|
2484
|
+
"_workspace-app-BLW7p6IZ.js",
|
|
2485
|
+
"heavy-payload.tsx"
|
|
2485
2486
|
],
|
|
2486
2487
|
"css": [
|
|
2487
|
-
"assets/workspace-app-
|
|
2488
|
+
"assets/workspace-app-D2bJ5fjt.css"
|
|
2488
2489
|
]
|
|
2489
2490
|
},
|
|
2490
|
-
"_workspace-app-
|
|
2491
|
-
"file": "assets/workspace-app-
|
|
2491
|
+
"_workspace-app-CmaYU4DW.js": {
|
|
2492
|
+
"file": "assets/workspace-app-CmaYU4DW.js",
|
|
2492
2493
|
"name": "workspace-app",
|
|
2493
2494
|
"imports": [
|
|
2494
|
-
"_workspace-app-
|
|
2495
|
+
"_workspace-app-BLW7p6IZ.js"
|
|
2495
2496
|
],
|
|
2496
2497
|
"dynamicImports": [
|
|
2497
2498
|
"heavy-payload.tsx",
|
|
2498
2499
|
"review-payload.tsx"
|
|
2499
2500
|
]
|
|
2500
2501
|
},
|
|
2501
|
-
"_workspace-app-
|
|
2502
|
-
"file": "assets/workspace-app-
|
|
2503
|
-
"src": "_workspace-app-
|
|
2502
|
+
"_workspace-app-D2bJ5fjt.css": {
|
|
2503
|
+
"file": "assets/workspace-app-D2bJ5fjt.css",
|
|
2504
|
+
"src": "_workspace-app-D2bJ5fjt.css"
|
|
2504
2505
|
},
|
|
2505
2506
|
"_xml-JnmX6vyS.js": {
|
|
2506
2507
|
"file": "assets/xml-JnmX6vyS.js",
|
|
@@ -2518,52 +2519,52 @@
|
|
|
2518
2519
|
]
|
|
2519
2520
|
},
|
|
2520
2521
|
"activity-panel-app.html": {
|
|
2521
|
-
"file": "assets/activity-panel-app-
|
|
2522
|
+
"file": "assets/activity-panel-app-7AckaxIR.js",
|
|
2522
2523
|
"name": "activity-panel-app",
|
|
2523
2524
|
"src": "activity-panel-app.html",
|
|
2524
2525
|
"isEntry": true,
|
|
2525
2526
|
"imports": [
|
|
2526
|
-
"_workspace-app-
|
|
2527
|
+
"_workspace-app-BLW7p6IZ.js"
|
|
2527
2528
|
]
|
|
2528
2529
|
},
|
|
2529
2530
|
"heavy-payload.tsx": {
|
|
2530
|
-
"file": "assets/heavy-payload-
|
|
2531
|
+
"file": "assets/heavy-payload-Bol1_mcs.js",
|
|
2531
2532
|
"name": "heavy-payload",
|
|
2532
2533
|
"src": "heavy-payload.tsx",
|
|
2533
2534
|
"isDynamicEntry": true,
|
|
2534
2535
|
"imports": [
|
|
2535
|
-
"
|
|
2536
|
-
"
|
|
2536
|
+
"_workspace-app-BLW7p6IZ.js",
|
|
2537
|
+
"_scrollbar-CvE-I-jG.js"
|
|
2537
2538
|
]
|
|
2538
2539
|
},
|
|
2539
2540
|
"review-payload.tsx": {
|
|
2540
|
-
"file": "assets/review-payload-
|
|
2541
|
+
"file": "assets/review-payload-BqJp0c5e.js",
|
|
2541
2542
|
"name": "review-payload",
|
|
2542
2543
|
"src": "review-payload.tsx",
|
|
2543
2544
|
"isDynamicEntry": true,
|
|
2544
2545
|
"imports": [
|
|
2545
|
-
"_scrollbar-
|
|
2546
|
-
"_workspace-app-
|
|
2546
|
+
"_scrollbar-CvE-I-jG.js",
|
|
2547
|
+
"_workspace-app-CmaYU4DW.js"
|
|
2547
2548
|
]
|
|
2548
2549
|
},
|
|
2549
2550
|
"workspace-app.html": {
|
|
2550
|
-
"file": "assets/workspace-app-
|
|
2551
|
+
"file": "assets/workspace-app-BjNqR0en.js",
|
|
2551
2552
|
"name": "workspace-app",
|
|
2552
2553
|
"src": "workspace-app.html",
|
|
2553
2554
|
"isEntry": true,
|
|
2554
2555
|
"imports": [
|
|
2555
|
-
"_workspace-app-
|
|
2556
|
-
"_workspace-app-
|
|
2556
|
+
"_workspace-app-BLW7p6IZ.js",
|
|
2557
|
+
"_workspace-app-CmaYU4DW.js"
|
|
2557
2558
|
]
|
|
2558
2559
|
},
|
|
2559
2560
|
"workspace-lifecycle-app.html": {
|
|
2560
|
-
"file": "assets/workspace-lifecycle-app-
|
|
2561
|
+
"file": "assets/workspace-lifecycle-app-BVbI2Ilf.js",
|
|
2561
2562
|
"name": "workspace-lifecycle-app",
|
|
2562
2563
|
"src": "workspace-lifecycle-app.html",
|
|
2563
2564
|
"isEntry": true,
|
|
2564
2565
|
"imports": [
|
|
2565
|
-
"_workspace-app-
|
|
2566
|
-
"_workspace-app-
|
|
2566
|
+
"_workspace-app-BLW7p6IZ.js",
|
|
2567
|
+
"_workspace-app-CmaYU4DW.js"
|
|
2567
2568
|
]
|
|
2568
2569
|
}
|
|
2569
2570
|
}
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>ForgeRelay Panel</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/activity-panel-app-
|
|
7
|
+
<script type="module" crossorigin src="./assets/activity-panel-app-7AckaxIR.js"></script>
|
|
8
8
|
<link rel="modulepreload" crossorigin href="./assets/chunk-EyZ2wyi3.js">
|
|
9
|
-
<link rel="modulepreload" crossorigin href="./assets/workspace-app-
|
|
10
|
-
<link rel="stylesheet" crossorigin href="./assets/workspace-app-
|
|
9
|
+
<link rel="modulepreload" crossorigin href="./assets/workspace-app-BLW7p6IZ.js">
|
|
10
|
+
<link rel="stylesheet" crossorigin href="./assets/workspace-app-D2bJ5fjt.css">
|
|
11
11
|
</head>
|
|
12
12
|
<body>
|
|
13
13
|
<main id="app" class="shell">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
`)||void 0}}),o=
|
|
1
|
+
import{S as e,a as t,b as n,i as r,o as i,t as a,x as o,y as s}from"./workspace-app-BLW7p6IZ.js";function c(e){let t=m(e._meta),n=m(e.structuredContent),r=m(t?.[`forgerelay/activityPanelWorkspace`])??m(n?.[`forgerelay/activityPanelWorkspace`]);if(r&&!(typeof r.workspaceId!=`string`||r.workspaceId.length===0)&&!(typeof r.root!=`string`||r.root.length===0)&&!(r.mode!==void 0&&r.mode!==`checkout`&&r.mode!==`worktree`))return r}var l=class{root;card=null;openInstructionKey=null;showAvailableInstructions=!1;constructor(e){this.root=e}get active(){return this.card!==null}get workspaceId(){return this.card?.workspaceId}accept(e){let t=c(e);return t?(this.card?.workspaceId!==t.workspaceId&&(this.openInstructionKey=null,this.showAvailableInstructions=!1),this.card=t,!0):!1}clear(){this.card=null,this.openInstructionKey=null,this.showAvailableInstructions=!1,this.root.replaceChildren()}render(){return this.card?(this.root.replaceChildren(this.renderPanel(this.card)),!0):!1}renderPanel(e){let n=h(`section`,`workspace-panel`),r=h(`div`,`workspace-panel-header`),a=h(`span`,`workspace-panel-icon`);a.setAttribute(`aria-hidden`,`true`),a.append(t(i.folderOpen,`workspace-panel-icon-svg`));let o=h(`span`,`workspace-panel-title-group`),s=h(`span`,`workspace-panel-title`,`Workspace`),c=h(`span`,`workspace-panel-subtitle`,p(e.root));c.title=e.root,o.append(s,c);let l=h(`span`,`workspace-panel-mode`,e.mode??`workspace`);r.append(a,o,l);let d=h(`div`,`workspace-details`),f=h(`div`,`workspace-rows`);return u(f,`Root`,e.root,i.folderOpen,!0),u(f,`Mode`,e.mode??`workspace`,i.folderTree),e.worktree&&this.appendWorktreeRows(f,e),e.sourceRoot&&e.sourceRoot!==e.root&&u(f,`Source checkout`,e.sourceRoot,i.sourceCheckout,!0),this.appendInstructions(f,e.agentsFiles??[],e.availableAgentsFiles??[]),this.appendSkills(f,e.skills??[]),this.appendAgents(f,e),d.append(f),n.append(r,d),n}appendWorktreeRows(e,n){let r=n.worktree;if(!r)return;let a=[r.baseRef,r.baseSha?.slice(0,8)].filter(e=>!!e);if(a.length>0){let n=h(`span`,`workspace-base-value`),o=h(`span`,`workspace-value`,a.join(` · `));if(o.title=a.join(` · `),n.append(o),r.dirtySource){let e=h(`span`,`workspace-base-warning`);e.title=`The source checkout had uncommitted changes when this worktree was created.`,e.setAttribute(`role`,`img`),e.setAttribute(`aria-label`,`Source checkout changes are not included in this worktree`),e.append(t(i.warning,`workspace-base-warning-svg`)),n.append(e)}d(e,`Base`,n,i.base)}r.branch&&u(e,`Worktree branch`,r.branch,i.gitBranch),r.targetBranch&&u(e,`Merge target`,r.targetBranch,i.gitBranch)}appendInstructions(e,t,n){let r=t.map((e,t)=>({key:`loaded:${t}`,path:e.path,label:e.path??`Loaded instructions`,content:e.content,status:`loaded`})),a=new Set(r.map(e=>e.path).filter(Boolean)),o=n.flatMap((e,t)=>e.path&&a.has(e.path)?[]:[{key:`available:${t}`,path:e.path,label:e.path??`Nested instructions`,status:`available`}]);if(r.length===0&&o.length===0)return;let s=this.showAvailableInstructions?[...r,...o]:r,c=h(`span`,`workspace-instruction-list`);for(let e of s)c.append(this.renderInstruction(e,c));if(o.length>0){let e=h(`button`,`workspace-instructions-toggle`,this.showAvailableInstructions?`Show less`:`View all`);e.type=`button`,e.setAttribute(`aria-expanded`,String(this.showAvailableInstructions)),e.addEventListener(`click`,()=>{this.showAvailableInstructions=!this.showAvailableInstructions,this.showAvailableInstructions||(this.openInstructionKey=null),this.render()}),c.append(e)}let l=h(`div`,`workspace-instructions-content`);l.append(c),d(e,`Instructions`,l,i.instructions,`workspace-instructions-row`)}renderInstruction(e,n){let r=h(`span`,`workspace-instruction-item`);r.dataset.instructionKey=e.key;let a=e.status===`loaded`&&e.content!==void 0,o=h(a?`button`:`span`,`workspace-instruction-header${a?` interactive`:``}`);o instanceof HTMLButtonElement&&(o.type=`button`,o.setAttribute(`aria-expanded`,String(this.openInstructionKey===e.key)));let s=h(`span`,`workspace-instruction-status ${e.status}`);s.setAttribute(`role`,`img`),s.setAttribute(`aria-label`,e.status===`loaded`?`Loaded into the current workspace context`:`Available for a nested directory`),s.append(t(e.status===`loaded`?i.instructionLoaded:i.instructionAvailable,`workspace-instruction-status-svg`));let c=h(`span`,`workspace-instruction-text`),l=p(e.label);if(c.append(h(`span`,`workspace-instruction-name`,l)),e.path&&e.path!==l){let t=h(`span`,`workspace-instruction-path`,e.path);t.title=e.path,c.append(t)}if(o.append(s,c),!a)return r.append(o),r;let u=h(`span`,`workspace-instruction-chevron`);u.setAttribute(`aria-hidden`,`true`),u.append(t(i.chevronDown,`workspace-instruction-chevron-svg`)),o.append(u);let d=h(`pre`,`workspace-instruction-preview`,e.content);return o.addEventListener(`click`,()=>{this.openInstructionKey=this.openInstructionKey===e.key?null:e.key;for(let e of n.querySelectorAll(`.workspace-instruction-item`)){let t=e.querySelector(`.workspace-instruction-header.interactive`),n=e.querySelector(`.workspace-instruction-preview`),r=e.dataset.instructionKey===this.openInstructionKey;e.classList.toggle(`expanded`,r),t?.setAttribute(`aria-expanded`,String(r)),n&&(n.hidden=!r)}}),r.append(o,d),(()=>{let t=this.openInstructionKey===e.key;r.classList.toggle(`expanded`,t),o.setAttribute(`aria-expanded`,String(t)),d.hidden=!t})(),r}appendSkills(e,t){if(t.length===0)return;let n=f(t.map(e=>({label:e.name??`Unnamed skill`,title:e.description||void 0})));n.classList.add(`workspace-skills-list`),d(e,`Skills`,n,i.skills,`workspace-skills-row`)}appendAgents(e,t){let n=t.agentProviders??[],a=(t.agents??[]).map(e=>{let t=e.provider?.trim(),n=e.providerAvailable===!1;return{label:e.name??`Unnamed agent`,logo:t?r(t):void 0,profile:!0,tone:n?`muted`:void 0,title:[e.description,t?`Provider: ${t}`:void 0,e.model?`Model: ${e.model}`:void 0,e.thinking?`Thinking: ${e.thinking}`:void 0,n?e.providerUnavailableReason??`Provider unavailable`:void 0].filter(Boolean).join(`
|
|
2
|
+
`)||void 0}}),o=n.map(e=>{let t=e.name?.trim()||`Unknown provider`,n=r(t);return{label:t,logo:n,bareLogo:!!n,ariaLabel:t,tone:e.available===!1?`muted`:void 0,title:e.available===!1?e.reason??`Provider unavailable`:t}});if(a.length>0){let t=f([...a,...o]);t.classList.add(`workspace-agents-list`),d(e,`Agents`,t,i.agents,`workspace-agents-row`)}else o.length>0&&d(e,`Providers`,f(o),i.providers)}};function u(e,t,n,r,i=!1){let a=h(`span`,`workspace-value${i?` mono`:``}`,n);a.title=n,d(e,t,a,r)}function d(e,n,r,i,a){let o=h(`div`,[`workspace-row`,a].filter(Boolean).join(` `)),s=h(`span`,`workspace-row-icon`);s.setAttribute(`aria-hidden`,`true`),s.append(t(i,`workspace-row-icon-svg`)),o.append(s,h(`span`,`workspace-key`,n),r),e.append(o)}function f(e){let t=h(`span`,`workspace-chip-list`);for(let n of e){let e=!!(n.bareLogo&&n.logo),r=h(`span`,[e?`workspace-provider-logo`:n.profile?`workspace-agent-profile`:`workspace-chip`,n.tone].filter(Boolean).join(` `));if(n.title&&(r.title=n.title),e&&(r.setAttribute(`role`,`img`),r.setAttribute(`aria-label`,n.ariaLabel??n.label)),n.logo){let t=document.createElement(`img`);t.className=e?`workspace-provider-logo-image`:n.profile?`workspace-agent-profile-logo`:`workspace-chip-logo`,t.src=n.logo,t.alt=``,t.setAttribute(`aria-hidden`,`true`),r.append(t)}e||r.append(h(`span`,`workspace-chip-label`,n.label)),t.append(r)}return t}function p(e){return e.replaceAll(`\\`,`/`).split(`/`).filter(Boolean).at(-1)??e}function m(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function h(e,t,n){let r=document.createElement(e);return r.className=t,n!==void 0&&(r.textContent=n),r}document.documentElement.dataset.forgerelayApp=`panel`;var g=document.querySelector(`#app`);if(!g)throw Error(`Missing #app root element.`);var _=g,v=I(`section`,`forgerelay-panel`),y=I(`div`,`workspace-panel-slot`),b=I(`div`,`activity-panel-slot`);v.append(y,b),_.replaceChildren(v);var x=new l(y),S=new a(b,{embedded:!0}),C=null,w,T=!1,E=null,D,O=!1,k;A();async function A(){P(),C=new o({name:`forgerelay-panel`,version:`0.1.0`},{}),C.ontoolinput=e=>{let t=e.arguments?.workspaceId;typeof t==`string`&&t.length>0&&(D=t,T&&!S.active&&M()),P()},C.ontoolresult=e=>{j(e)},C.onhostcontextchanged=e=>{w={...w,...e},N()},C.onteardown=async()=>(T=!1,S.detach(),x.clear(),{});try{await C.connect();let e=C.getHostContext();e&&(w=e),N(),T=!0,S.attach(C),D&&!S.active&&M()}catch(e){E=e instanceof Error?e.message:String(e)}P()}function j(e){x.accept(e)&&(D=x.workspaceId),S.accept(e),P()}async function M(){let e=D;if(!(!C||!T||!e||S.active||O||k===e)&&C.getHostCapabilities()?.serverTools){k=e,O=!0,P();try{let t=await C.callServerTool({name:`activity_snapshot`,arguments:{workspaceId:e}});t.isError||j(t)}finally{O=!1,P()}}}function N(){w?.theme&&e(w.theme),w?.styles?.variables&&n(w.styles.variables),w?.styles?.css?.fonts&&s(w.styles.css.fonts);let t=w?.safeAreaInsets;t&&(document.body.style.padding=`${t.top}px ${t.right}px ${t.bottom}px ${t.left}px`)}function P(){x.render()||F(),S.render()||b.replaceChildren()}function F(){let e=I(`section`,`workspace-panel pending`),t=I(`div`,`workspace-panel-header`),n=I(`span`,`workspace-panel-title-group`);n.append(I(`span`,`workspace-panel-title`,`Workspace`),I(`span`,`workspace-panel-subtitle`,E||(D?O?`Loading workspace…`:D:T?`Waiting for workspace…`:`Connecting to host…`))),t.append(n),e.append(t),y.replaceChildren(e)}function I(e,t,n){let r=document.createElement(e);return r.className=t,n!==void 0&&(r.textContent=n),r}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{_ as e,d as t,g as n,s as r,v as i}from"./workspace-app-BLW7p6IZ.js";import{S as a,_ as o,a as s,b as c,c as l,d as u,f as d,g as f,h as p,i as m,l as h,m as g,n as _,o as v,p as y,r as b,s as x,t as S,u as C,v as w,x as T,y as E}from"./scrollbar-CvE-I-jG.js";var D=new Set,O=null;function k(e){D.add(e),O??=requestAnimationFrame(A)}function A(e){let t=new Set(D);D.clear();for(let n of t)try{n(e)}catch(e){console.error(e)}O=D.size>0?requestAnimationFrame(A):null}var j=class e{options;tokensStable=[];tokensUnstable=[];lastUnstableCodeChunk=``;lastStableGrammarState;constructor(e){this.options=e}async enqueue(e){let t=(this.lastUnstableCodeChunk+e).split(`
|
|
2
2
|
`),n=[],r=[],i=this.tokensUnstable.length;return t.forEach((e,i)=>{let a=i===t.length-1,o=this.options.highlighter.codeToTokens(e,{...this.options,grammarState:this.lastStableGrammarState}),s=o.tokens[0];a||s.push({content:`
|
|
3
3
|
`,offset:0}),a?(r=s,this.lastUnstableCodeChunk=e):(this.lastStableGrammarState=o.grammarState,n.push(...s))}),this.tokensStable.push(...n),this.tokensUnstable=r,{recall:i,stable:n,unstable:r}}close(){let e=this.tokensUnstable;return this.tokensUnstable=[],this.lastUnstableCodeChunk=``,this.lastStableGrammarState=void 0,{stable:e}}clear(){this.tokensStable=[],this.tokensUnstable=[],this.lastUnstableCodeChunk=``,this.lastStableGrammarState=void 0}clone(){let t=new e(this.options);return t.lastUnstableCodeChunk=this.lastUnstableCodeChunk,t.tokensUnstable=this.tokensUnstable,t.tokensStable=this.tokensStable,t.lastStableGrammarState=this.lastStableGrammarState,t}},M=class extends TransformStream{tokenizer;options;constructor(e){let t=new j(e),{allowRecalls:n=!1}=e;super({async transform(e,r){let{stable:i,unstable:a,recall:o}=await t.enqueue(e);n&&o>0&&r.enqueue({recall:o});for(let e of i)r.enqueue(e);if(n)for(let e of a)r.enqueue(e)},async flush(e){let{stable:r}=t.close();if(!n)for(let t of r)e.enqueue(t)}}),this.tokenizer=t,this.options=e}};function N(e){let t=document.createElement(`span`);return t.style=w(e.htmlStyle??o(e)),t.textContent=e.content,t}var P=-1,F=class{__id=`file-stream:${++P}`;highlighter;stream;abortController;fileContainer;pre;code;gutterElement;contentElement;themeCSSStyle;appliedThemeCSS;currentRowCount=0;constructor(e={theme:E}){this.options=e,this.currentLineIndex=this.options.startingLineIndex??1}cleanUp(){this.abortController?.abort(),this.abortController=void 0}setThemeType(e){(this.options.themeType??`system`)!==e&&(this.options={...this.options,themeType:e},!(typeof this.options.theme==`string`||this.fileContainer==null||this.appliedThemeCSS==null)&&this.applyThemeState(this.fileContainer,this.appliedThemeCSS.themeStyles,e,this.appliedThemeCSS.baseThemeType))}async initializeHighlighter(){return this.highlighter=await f(g(this.options.lang,this.options)),this.highlighter}queuedSetupArgs;async setup(e,t){let n=this.queuedSetupArgs!=null;if(this.queuedSetupArgs=[e,t],n)return;this.highlighter??=await this.initializeHighlighter();let[r,i]=this.queuedSetupArgs;this.queuedSetupArgs=void 0;let a=r;this.setupStream(a,i,this.highlighter)}setupStream(e,t,n){let{disableLineNumbers:r=!1,overflow:i=`scroll`,theme:a=E,themeType:o=`system`}=this.options,s=this.getOrCreateFileContainer();s.parentElement??t.appendChild(s),this.pre??=document.createElement(`pre`),this.pre.parentElement??s.shadowRoot?.appendChild(this.pre);let c=typeof a==`string`?n.getTheme(a).type:void 0,u=d({theme:a,highlighter:n});this.applyThemeState(s,u,o,c);let f=l(this.pre,{type:`file`,diffIndicators:`none`,disableBackground:!0,disableLineNumbers:r,overflow:i,split:!1,totalLines:0});f.textContent=``,this.pre=f,this.code=h({code:this.code,pre:f}),this.gutterElement=void 0,this.contentElement=void 0,this.currentRowCount=0,this.currentLineElement=void 0,this.currentLineIndex=this.options.startingLineIndex??1,this.abortController?.abort(),this.abortController=new AbortController;let{onStreamStart:p,onStreamClose:m,onStreamAbort:g}=this.options;this.stream?.cancel().catch(()=>{}),this.stream=e,this.stream.pipeThrough(typeof a==`string`?new M({...this.options,theme:a,highlighter:n,allowRecalls:!0,defaultColor:!1,cssVariablePrefix:y(`token`)}):new M({...this.options,themes:a,highlighter:n,allowRecalls:!0,defaultColor:!1,cssVariablePrefix:y(`token`)})).pipeTo(new WritableStream({start(e){p?.(e)},close(){m?.()},abort(e){g?.(e)},write:this.handleWrite}),{signal:this.abortController.signal}).catch(e=>{e.name!==`AbortError`&&console.error(`FileStream pipe error:`,e)})}queuedTokens=[];handleWrite=e=>{`recall`in e&&this.queuedTokens.length>=e.recall?this.queuedTokens.length=this.queuedTokens.length-e.recall:this.queuedTokens.push(e),k(this.render),this.options.onStreamWrite?.(e)};currentLineIndex;currentLineElement;render=()=>{this.options.onPreRender?.(this);let{gutter:e,content:t}=this.getOrCreateStreamColumns(),n=document.createDocumentFragment(),r=document.createDocumentFragment();for(let e of this.queuedTokens)if(`recall`in e){if(this.currentLineElement==null)throw Error(`FileStream.render: no current line element, shouldnt be possible to get here`);if(e.recall>this.currentLineElement.childNodes.length)throw Error(`FileStream.render: Token recall exceed the current line, there's probably a bug...`);for(let t=0;t<e.recall;t++)this.currentLineElement.lastChild?.remove()}else{let t=N(e);if(this.currentLineElement==null){let{gutterLine:e,contentLine:t}=this.createLine();n.appendChild(e),r.appendChild(t)}if(this.currentLineElement?.appendChild(t),e.content===`
|
|
4
|
-
`){this.currentLineIndex++;let{gutterLine:e,contentLine:t}=this.createLine();n.appendChild(e),r.appendChild(t)}}n.childNodes.length>0&&e.appendChild(n),r.childNodes.length>0&&t.appendChild(r),this.queuedTokens.length=0,this.options.onPostRender?.(this)};getOrCreateStreamColumns(){if(this.code==null)throw Error(`FileStream: expected code element to exist`);if(this.gutterElement!=null&&this.contentElement!=null)return{gutter:this.gutterElement,content:this.contentElement};let e=document.createElement(`div`);e.dataset.gutter=``;let t=document.createElement(`div`);return t.dataset.content=``,this.code.appendChild(e),this.code.appendChild(t),this.gutterElement=e,this.contentElement=t,{gutter:e,content:t}}updateRowSpan(){this.gutterElement!=null&&(this.gutterElement.style.gridRow=`span ${this.currentRowCount}`),this.contentElement!=null&&(this.contentElement.style.gridRow=`span ${this.currentRowCount}`)}createLine(){let e=this.currentLineIndex,t=`${e-1}`,n=document.createElement(`div`);n.dataset.columnNumber=`${e}`,n.dataset.lineType=`context`,n.dataset.lineIndex=t;let r=document.createElement(`span`);r.dataset.lineNumberContent=``,r.textContent=`${e}`,n.appendChild(r);let i=document.createElement(`div`);return i.dataset.line=`${e}`,i.dataset.lineType=`context`,i.dataset.lineIndex=t,this.currentRowCount+=1,this.updateRowSpan(),this.currentLineElement=i,{gutterLine:n,contentLine:i}}getOrCreateFileContainer(e){return e!=null&&e===this.fileContainer||e==null&&this.fileContainer!=null?this.fileContainer:(this.fileContainer!=null&&e!=null&&e!==this.fileContainer&&(this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0),this.fileContainer=e??document.createElement(`diffs-container`),this.fileContainer)}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.options.theme??E,s=typeof o==`string`?o:{...o},c=u(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}this.themeCSSStyle=x({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:C(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}};function I(e){let t=v(e);if(t.length!==1)throw console.error(t),Error(`PatchDiff: Provided patch must include only 1 patch, with 1 diff`);let{files:n}=t[0];if(n.length!==1)throw console.error(n),Error(`FileDiff: Provided patch must contain exactly 1 file diff`);return n[0]}var L=a(),R=s();function z({patch:e,options:t,metrics:n,lineAnnotations:r,selectedLines:i,className:a,style:o,prerenderedHTML:s,renderAnnotation:l,renderCustomHeader:u,renderHeaderPrefix:d,renderHeaderMetadata:f,renderGutterUtility:p,disableWorkerPool:h=!1}){let g=B(e),{ref:v,getHoveredLine:y}=_({fileDiff:g,options:t,metrics:n,lineAnnotations:r,selectedLines:i,prerenderedHTML:s,hasGutterRenderUtility:p!=null,hasCustomHeader:u!=null,disableWorkerPool:h});return(0,R.jsx)(c,{ref:v,className:a,style:o,children:b(m({fileDiff:g,renderCustomHeader:u,renderHeaderPrefix:d,renderHeaderMetadata:f,renderAnnotation:l,lineAnnotations:r,renderGutterUtility:p,getHoveredLine:y}),s)})}function B(e){return(0,L.useMemo)(()=>I(e),[e])}var V=T();function H(e,t){let n=(0,V.createRoot)(e);return n.render((0,R.jsx)(U,{...t})),{update(e){n.render((0,R.jsx)(U,{...e}))},unmount(){n.unmount()}}}function U({card:a,hostContext:o,errorMessage:s=null}){let c=o?.theme===`light`?`light`:`dark`;if(s)return(0,R.jsx)(K,{message:s,tone:`error`});if(
|
|
4
|
+
`){this.currentLineIndex++;let{gutterLine:e,contentLine:t}=this.createLine();n.appendChild(e),r.appendChild(t)}}n.childNodes.length>0&&e.appendChild(n),r.childNodes.length>0&&t.appendChild(r),this.queuedTokens.length=0,this.options.onPostRender?.(this)};getOrCreateStreamColumns(){if(this.code==null)throw Error(`FileStream: expected code element to exist`);if(this.gutterElement!=null&&this.contentElement!=null)return{gutter:this.gutterElement,content:this.contentElement};let e=document.createElement(`div`);e.dataset.gutter=``;let t=document.createElement(`div`);return t.dataset.content=``,this.code.appendChild(e),this.code.appendChild(t),this.gutterElement=e,this.contentElement=t,{gutter:e,content:t}}updateRowSpan(){this.gutterElement!=null&&(this.gutterElement.style.gridRow=`span ${this.currentRowCount}`),this.contentElement!=null&&(this.contentElement.style.gridRow=`span ${this.currentRowCount}`)}createLine(){let e=this.currentLineIndex,t=`${e-1}`,n=document.createElement(`div`);n.dataset.columnNumber=`${e}`,n.dataset.lineType=`context`,n.dataset.lineIndex=t;let r=document.createElement(`span`);r.dataset.lineNumberContent=``,r.textContent=`${e}`,n.appendChild(r);let i=document.createElement(`div`);return i.dataset.line=`${e}`,i.dataset.lineType=`context`,i.dataset.lineIndex=t,this.currentRowCount+=1,this.updateRowSpan(),this.currentLineElement=i,{gutterLine:n,contentLine:i}}getOrCreateFileContainer(e){return e!=null&&e===this.fileContainer||e==null&&this.fileContainer!=null?this.fileContainer:(this.fileContainer!=null&&e!=null&&e!==this.fileContainer&&(this.themeCSSStyle=void 0,this.appliedThemeCSS=void 0),this.fileContainer=e??document.createElement(`diffs-container`),this.fileContainer)}applyThemeState(e,t,n,r){let i=e.shadowRoot??e.attachShadow({mode:`open`}),a=r??n,o=this.options.theme??E,s=typeof o==`string`?o:{...o},c=u(i);if(this.themeCSSStyle?.parentNode===i&&this.appliedThemeCSS?.themeStyles===t&&this.appliedThemeCSS.themeType===a&&this.appliedThemeCSS.scrollbarGutter===c){this.appliedThemeCSS.theme=s;return}this.themeCSSStyle=x({shadowRoot:i,currentNode:this.themeCSSStyle,themeCSS:C(t,a,c)}),this.appliedThemeCSS=this.themeCSSStyle==null?void 0:{theme:s,themeStyles:t,themeType:a,baseThemeType:r,scrollbarGutter:c}}};function I(e){let t=v(e);if(t.length!==1)throw console.error(t),Error(`PatchDiff: Provided patch must include only 1 patch, with 1 diff`);let{files:n}=t[0];if(n.length!==1)throw console.error(n),Error(`FileDiff: Provided patch must contain exactly 1 file diff`);return n[0]}var L=a(),R=s();function z({patch:e,options:t,metrics:n,lineAnnotations:r,selectedLines:i,className:a,style:o,prerenderedHTML:s,renderAnnotation:l,renderCustomHeader:u,renderHeaderPrefix:d,renderHeaderMetadata:f,renderGutterUtility:p,disableWorkerPool:h=!1}){let g=B(e),{ref:v,getHoveredLine:y}=_({fileDiff:g,options:t,metrics:n,lineAnnotations:r,selectedLines:i,prerenderedHTML:s,hasGutterRenderUtility:p!=null,hasCustomHeader:u!=null,disableWorkerPool:h});return(0,R.jsx)(c,{ref:v,className:a,style:o,children:b(m({fileDiff:g,renderCustomHeader:u,renderHeaderPrefix:d,renderHeaderMetadata:f,renderAnnotation:l,lineAnnotations:r,renderGutterUtility:p,getHoveredLine:y}),s)})}function B(e){return(0,L.useMemo)(()=>I(e),[e])}var V=T();function H(e,t){let n=(0,V.createRoot)(e);return n.render((0,R.jsx)(U,{...t})),{update(e){n.render((0,R.jsx)(U,{...e}))},unmount(){n.unmount()}}}function U({card:a,hostContext:o,errorMessage:s=null}){let c=o?.theme===`light`?`light`:`dark`;if(s)return(0,R.jsx)(K,{message:s,tone:`error`});if(r(a.tool)||n(a.tool)){let e=a.payload?.patch||a.payload?.diff;return e?(0,R.jsx)(G,{patch:e,themeType:c}):(0,R.jsx)(K,{message:`Diff payload is not available.`})}let l=e(a.payload);return l?t(a.tool)?(0,R.jsx)(W,{path:a.path??`file`,text:l,startLine:i(a.summary,`offset`)??1,themeType:c}):(0,R.jsx)(`pre`,{className:`text-payload pretty-scrollbar ${a.tool}`,children:l}):(0,R.jsx)(K,{message:`No details available.`})}function W({path:e,text:t,startLine:n,themeType:r}){let i=(0,L.useRef)(null),a=(0,L.useMemo)(()=>({theme:{light:`pierre-light`,dark:`pierre-dark`},themeType:r,overflow:`scroll`,unsafeCSS:S}),[r]);return(0,L.useEffect)(()=>{let r=i.current;if(!r)return;let o=new F({...a,lang:p(e),startingLineIndex:n}),s=new ReadableStream({start(e){e.enqueue(t),e.close()}}),c=!1;return o.setup(s,r).then(()=>{c&&(o.cleanUp(),r.replaceChildren())}),()=>{c=!0,o.cleanUp(),r.replaceChildren()}},[a,e,n,t]),(0,R.jsx)(`div`,{ref:i,className:`pierre-file pretty-scrollbar`})}function G({patch:e,themeType:t}){return(0,R.jsx)(z,{patch:e,options:{theme:{light:`pierre-light`,dark:`pierre-dark`},themeType:t,diffStyle:`unified`,diffIndicators:`bars`,hunkSeparators:`line-info`,lineDiffType:`word-alt`,overflow:`scroll`,unsafeCSS:S,collapsedContextThreshold:4,expansionLineCount:20,stickyHeader:!0,disableFileHeader:!0},className:`pierre-diff pretty-scrollbar`})}function K({message:e,tone:t=`muted`}){return(0,R.jsx)(`div`,{className:`status ${t}`,children:e})}export{H as mountHeavyPayload};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,r as t,t as n}from"./workspace-app-
|
|
1
|
+
import{n as e,r as t,t as n}from"./workspace-app-CmaYU4DW.js";import{S as r,a as i,b as a,i as o,n as s,o as c,r as l,t as u,x as d}from"./scrollbar-CvE-I-jG.js";var f=i();function p({fileDiff:e,options:t,metrics:n,lineAnnotations:r,selectedLines:i,className:c,style:u,prerenderedHTML:d,renderAnnotation:p,renderCustomHeader:m,renderHeaderPrefix:h,renderHeaderMetadata:g,renderGutterUtility:_,disableWorkerPool:v=!1}){let{ref:y,getHoveredLine:b}=s({fileDiff:e,options:t,metrics:n,lineAnnotations:r,selectedLines:i,prerenderedHTML:d,hasGutterRenderUtility:_!=null,hasCustomHeader:m!=null,disableWorkerPool:v});return(0,f.jsx)(a,{ref:y,className:c,style:u,children:l(o({fileDiff:e,renderCustomHeader:m,renderHeaderPrefix:h,renderHeaderMetadata:g,renderAnnotation:p,renderGutterUtility:_,lineAnnotations:r,getHoveredLine:b}),d)})}var m=r(),h=d();function g(e,t){let n=(0,h.createRoot)(e);return n.render((0,f.jsx)(_,{...t})),{update(e){n.render((0,f.jsx)(_,{...e}))},unmount(){n.unmount()}}}function _({card:r,hostContext:i,errorMessage:a=null,visibleFileCount:o}){let s=r.payload?.patch,c=i?.theme===`light`?`light`:`dark`,l=(0,m.useMemo)(()=>y(s),[s]),u=typeof o==`number`?l.slice(0,o):l,[d,h]=(0,m.useState)(()=>new Set);if(a)return(0,f.jsx)(S,{message:a,tone:`error`});if(!s)return(0,f.jsx)(S,{message:`Diff payload is not available.`});if(l.length===0)return(0,f.jsx)(S,{message:`No diff hunks to review.`});let g=x(c);return l.length===1?(0,f.jsx)(`div`,{className:`review-single-file`,children:(0,f.jsx)(p,{fileDiff:l[0],options:g,className:`pierre-diff pretty-scrollbar`})}):(0,f.jsx)(`div`,{className:`review-diff pretty-scrollbar`,children:(0,f.jsx)(`div`,{className:`review-diff-files`,children:u.map((i,a)=>{let o=i.cacheKey??`${i.prevName??``}->${i.name}-${a}`,s=b(i),c=d.has(o),l=e(r.files??[],{path:i.name,previousPath:i.prevName,type:i.type},a),u=t(r.files??[],{path:i.name,previousPath:i.prevName},a);return(0,f.jsxs)(`div`,{className:`review-diff-file`,children:[(0,f.jsxs)(`button`,{type:`button`,className:`review-diff-file-header`,"aria-expanded":c,onClick:()=>{let e=new Set(d);e.has(o)?e.delete(o):e.add(o),h(e)},children:[(0,f.jsx)(`span`,{className:`review-file-kind ${l}`,role:`img`,title:n(l),"aria-label":n(l),children:v(l)}),u?.previous?(0,f.jsxs)(`span`,{className:`review-diff-file-name renamed`,title:u.title,children:[(0,f.jsx)(`span`,{className:`review-diff-file-path previous`,children:u.previous}),(0,f.jsx)(`span`,{className:`review-diff-file-arrow`,children:`→`}),(0,f.jsx)(`span`,{className:`review-diff-file-path current`,children:u.current})]}):(0,f.jsx)(`span`,{className:`review-diff-file-name`,title:u?.title??i.name,children:u?.current??i.name}),(0,f.jsxs)(`span`,{className:`review-diff-file-stats`,children:[(0,f.jsxs)(`span`,{className:`add`,children:[`+`,s.additions]}),(0,f.jsxs)(`span`,{className:`remove`,children:[`-`,s.removals]})]})]}),c?(0,f.jsx)(p,{fileDiff:i,options:g,className:`pierre-diff pretty-scrollbar`}):null]},o)})})})}function v(e){switch(e){case`added`:return`A`;case`edited`:return`M`;case`deleted`:return`D`;case`renamed`:case`renamed-edited`:return`R`;case`unknown`:return`•`}}function y(e){return e?c(e,`review`,!0).flatMap(e=>e.files):[]}function b(e){return e.hunks.reduce((e,t)=>({additions:e.additions+t.additionLines,removals:e.removals+t.deletionLines}),{additions:0,removals:0})}function x(e){return{theme:{light:`pierre-light`,dark:`pierre-dark`},themeType:e,diffStyle:`unified`,diffIndicators:`bars`,hunkSeparators:`line-info`,lineDiffType:`word-alt`,overflow:`scroll`,unsafeCSS:u,collapsedContextThreshold:4,expansionLineCount:20,stickyHeader:!1,disableFileHeader:!0}}function S({message:e,tone:t=`muted`}){return(0,f.jsx)(`div`,{className:`status ${t}`,children:e})}export{g as mountReviewPayload};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./angular-html-BkgDQl-G.js","./chunk-EyZ2wyi3.js","./html-D-C6YZk4.js","./css-DEfus9J5.js","./javascript-DDTjKLlQ.js","./angular-ts-Bxh4-O1-.js","./scss-BfZXsAWQ.js","./apl-BmYHKQ6m.js","./json-Cw91r8h1.js","./xml-JnmX6vyS.js","./java-ppHvycj5.js","./astro-C51vqDKq.js","./postcss-BXeXVLqQ.js","./tsx-CTXzrBkN.js","./typescript--ElHoFkw.js","./blade-CdhVsmwq.js","./html-derivative-DJAQcZyc.js","./sql-Ccv_yeUm.js","./bsl-BkkzgIyY.js","./sdbl-bTVj8UrX.js","./c-IBzBpxAO.js","./cairo-DLTphjLi.js","./python-gzcpVVnB.js","./cobol-Cf6azoN_.js","./coffee-vVdGzlmt.js","./cpp-CVHeO-Jk.js","./glsl-_ooCjaeB.js","./regexp-iC9_nbSI.js","./crystal-5UZy6KIX.js","./shellscript-BC2srNaB.js","./edge-CESgo4ia.js","./elixir-9FKfw4cJ.js","./elm-Dv7A0aLa.js","./erb-DHFmDvM0.js","./ruby-C5zYZIyl.js","./graphql-B9LqP-cY.js","./jsx-04X2FT_1.js","./haml-BU5EoZBn.js","./lua-CiyBp52Y.js","./yaml-OAcZkP-w.js","./erlang-Cphh6RMH.js","./markdown-BYOwaDjH.js","./fortran-fixed-form-DEKoE2YW.js","./fortran-free-form-CYNrtFtB.js","./fsharp-D13ZGOAj.js","./gdresource-C0sCabJj.js","./gdscript-Cp2uCuqX.js","./gdshader-CBce3t8t.js","./git-commit-BSykSTBG.js","./diff-woXpYk--.js","./git-rebase-utbU6CzV.js","./glimmer-js-t2kiCkyB.js","./glimmer-ts-F0Jv5okV.js","./hack-8yjdbaSA.js","./handlebars-BBFEg4Lo.js","./http-Dg5LSYRK.js","./hurl-Y5uYzMZR.js","./csv-Dx-8-gkx.js","./hxml-B0Qn7Nwc.js","./haxe-OTjmBuCE.js","./jinja-Bt30h8Ik.js","./jison-D5uZ1Nyo.js","./julia-76hRaaGz.js","./r-DfFga4si.js","./just-CDE7W0vW.js","./perl-BBhWva19.js","./latex-CVO2Byab.js","./tex-t1rUiQCm.js","./liquid-CA-AS3EX.js","./marko-_BWrPfny.js","./less-DVTAwKKz.js","./mdc-PyJv85eS.js","./nextflow-Bbiyy34d.js","./nextflow-groovy-Dc_ddanL.js","./nginx-DAWVw8yu.js","./nim-CKE1dzpU.js","./php-ChIeaAoF.js","./pug-CMgI5afi.js","./qml-CjxTkcFH.js","./razor-i4DbHr8p.js","./csharp-Ct8U2NOr.js","./rst-oy_97Kl4.js","./cmake-Bj61d0ZC.js","./sas-BnMEh2S3.js","./shaderlab-TOUzSsQk.js","./hlsl-Cvrh5tZx.js","./shellsession-BpE5o7_3.js","./soy-COesmhTY.js","./sparql-D_iOobhT.js","./turtle-ByJddavk.js","./stata-CGQEuSZq.js","./surrealql-Bz4JbU-9.js","./svelte-1jM2ejXj.js","./templ-C-VwELcp.js","./go-BJwz_mda.js","./ts-tags-Bewoa6pS.js","./twig-DVg-vELl.js","./vue-wPQ7UlMy.js","./vue-html-BHtJ8geX.js","./vue-vine-CNSGAWwc.js","./stylus-B6D30XZt.js","./xsl-3_vJ27aE.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{n as e,t}from"./chunk-EyZ2wyi3.js";import{d as n}from"./workspace-app-CxwJuZyS.js";var r=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var D=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},O={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=O,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,D)}catch(e){D(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),i=t(((e,t)=>{t.exports=r()})),a=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(ee)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=ee,te=function(){re.postMessage(null)}}else te=function(){_(ee,0)};function ie(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),o=t(((e,t)=>{t.exports=a()})),s=t((e=>{var t=i();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.6`})),c=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=t((e=>{var t=o(),n=i(),r=c();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return f(i),e;if(o===r)return f(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),te=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),re=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ne:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case te:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k={pending:!1,data:null,method:null,action:null},le=[],ue=-1;function de(e){return{current:e}}function fe(e){0>ue||(e.current=le[ue],le[ue]=null,ue--)}function A(e,t){ue++,le[ue]=e.current,e.current=t}var pe=de(null),me=de(null),he=de(null),ge=de(null);function _e(e,t){switch(A(he,t),A(me,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(pe),A(pe,e)}function ve(){fe(pe),fe(me),fe(he)}function ye(e){e.memoizedState!==null&&A(ge,e);var t=pe.current,n=Hd(t,e.type);t!==n&&(A(me,e),A(pe,n))}function be(e){me.current===e&&(fe(pe),fe(me)),ge.current===e&&(fe(ge),Qf._currentValue=k)}var xe,j;function M(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,j=-1<e.stack.indexOf(`
|
|
2
|
+
import{n as e,t}from"./chunk-EyZ2wyi3.js";import{C as n}from"./workspace-app-BLW7p6IZ.js";var r=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function ee(e,t){return E(e.type,t,e.props)}function te(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function ne(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var re=/\/+/g;function ie(e,t){return typeof e==`object`&&e&&e.key!=null?ne(``+e.key):t.toString(36)}function ae(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function oe(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,oe(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+ie(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(re,`$&/`)+`/`),oe(o,r,i,``,function(e){return e})):o!=null&&(te(o)&&(o=ee(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(re,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+ie(a,u),c+=oe(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+ie(a,u++),c+=oe(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return oe(ae(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function se(e,t,n){if(e==null)return e;var r=[],i=0;return oe(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ce(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var D=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},O={map:se,forEach:function(e,t,n){se(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return se(e,function(){t++}),t},toArray:function(e){return se(e,function(e){return e})||[]},only:function(e){if(!te(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=O,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=te,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:ce}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,D)}catch(e){D(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.6`})),i=t(((e,t)=>{t.exports=r()})),a=t((e=>{function t(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,a=e[r];if(0<i(a,t))e[r]=t,e[n]=a,n=r;else break a}}function n(e){return e.length===0?null:e[0]}function r(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;a:for(var r=0,a=e.length,o=a>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>i(c,n))l<a&&0>i(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<a&&0>i(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function i(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}if(e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var a=performance;e.unstable_now=function(){return a.now()}}else{var o=Date,s=o.now();e.unstable_now=function(){return o.now()-s}}var c=[],l=[],u=1,d=null,f=3,p=!1,m=!1,h=!1,g=!1,_=typeof setTimeout==`function`?setTimeout:null,v=typeof clearTimeout==`function`?clearTimeout:null,y=typeof setImmediate<`u`?setImmediate:null;function b(e){for(var i=n(l);i!==null;){if(i.callback===null)r(l);else if(i.startTime<=e)r(l),i.sortIndex=i.expirationTime,t(c,i);else break;i=n(l)}}function x(e){if(h=!1,b(e),!m)if(n(c)!==null)m=!0,S||(S=!0,te());else{var t=n(l);t!==null&&ie(x,t.startTime-e)}}var S=!1,C=-1,w=5,T=-1;function E(){return g?!0:!(e.unstable_now()-T<w)}function ee(){if(g=!1,S){var t=e.unstable_now();T=t;var i=!0;try{a:{m=!1,h&&(h=!1,v(C),C=-1),p=!0;var a=f;try{b:{for(b(t),d=n(c);d!==null&&!(d.expirationTime>t&&E());){var o=d.callback;if(typeof o==`function`){d.callback=null,f=d.priorityLevel;var s=o(d.expirationTime<=t);if(t=e.unstable_now(),typeof s==`function`){d.callback=s,b(t),i=!0;break b}d===n(c)&&r(c),b(t)}else r(c);d=n(c)}if(d!==null)i=!0;else{var u=n(l);u!==null&&ie(x,u.startTime-t),i=!1}}break a}finally{d=null,f=a,p=!1}i=void 0}}finally{i?te():S=!1}}}var te;if(typeof y==`function`)te=function(){y(ee)};else if(typeof MessageChannel<`u`){var ne=new MessageChannel,re=ne.port2;ne.port1.onmessage=ee,te=function(){re.postMessage(null)}}else te=function(){_(ee,0)};function ie(t,n){C=_(function(){t(e.unstable_now())},n)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(e){e.callback=null},e.unstable_forceFrameRate=function(e){0>e||125<e?console.error(`forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported`):w=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},e.unstable_requestPaint=function(){g=!0},e.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},e.unstable_scheduleCallback=function(r,i,a){var o=e.unstable_now();switch(typeof a==`object`&&a?(a=a.delay,a=typeof a==`number`&&0<a?o+a:o):a=o,r){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=a+s,r={id:u++,callback:i,priorityLevel:r,startTime:a,expirationTime:s,sortIndex:-1},a>o?(r.sortIndex=a,t(l,r),n(c)===null&&r===n(l)&&(h?(v(C),C=-1):h=!0,ie(x,a-o))):(r.sortIndex=s,t(c,r),m||p||(m=!0,S||(S=!0,te()))),r},e.unstable_shouldYield=E,e.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}})),o=t(((e,t)=>{t.exports=a()})),s=t((e=>{var t=i();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var a={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for(`react.portal`);function s(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:r==null?null:``+r,children:e,containerInfo:t,implementation:n}}var c=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return s(e,t,null,r)},e.flushSync=function(e){var t=c.T,n=a.p;try{if(c.T=null,a.p=2,e)return e()}finally{c.T=t,a.p=n,a.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,a.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&a.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin),i=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?a.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n===`script`&&a.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`)if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=l(t.as,t.crossOrigin);a.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})}}else t??a.d.M(e)},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=l(n,t.crossOrigin);a.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`)if(t){var n=l(t.as,t.crossOrigin);a.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0})}else a.d.m(e)},e.requestFormReset=function(e){a.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return c.H.useFormState(e,t,n)},e.useFormStatus=function(){return c.H.useHostTransitionStatus()},e.version=`19.2.6`})),c=t(((e,t)=>{function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!=`function`))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=s()})),l=t((e=>{var t=o(),n=i(),r=c();function a(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function s(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function l(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function u(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function d(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function f(e){if(l(e)!==e)throw Error(a(188))}function p(e){var t=e.alternate;if(!t){if(t=l(e),t===null)throw Error(a(188));return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return f(i),e;if(o===r)return f(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,c=i.child;c;){if(c===n){s=!0,n=i,r=o;break}if(c===r){s=!0,r=i,n=o;break}c=c.sibling}if(!s){for(c=o.child;c;){if(c===n){s=!0,n=o,r=i;break}if(c===r){s=!0,r=o,n=i;break}c=c.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(n.tag!==3)throw Error(a(188));return n.stateNode.current===n?e:t}function m(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=m(e),t!==null)return t;e=e.sibling}return null}var h=Object.assign,g=Symbol.for(`react.element`),_=Symbol.for(`react.transitional.element`),v=Symbol.for(`react.portal`),y=Symbol.for(`react.fragment`),b=Symbol.for(`react.strict_mode`),x=Symbol.for(`react.profiler`),S=Symbol.for(`react.consumer`),C=Symbol.for(`react.context`),w=Symbol.for(`react.forward_ref`),T=Symbol.for(`react.suspense`),E=Symbol.for(`react.suspense_list`),ee=Symbol.for(`react.memo`),te=Symbol.for(`react.lazy`),ne=Symbol.for(`react.activity`),re=Symbol.for(`react.memo_cache_sentinel`),ie=Symbol.iterator;function ae(e){return typeof e!=`object`||!e?null:(e=ie&&e[ie]||e[`@@iterator`],typeof e==`function`?e:null)}var oe=Symbol.for(`react.client.reference`);function se(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===oe?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case y:return`Fragment`;case x:return`Profiler`;case b:return`StrictMode`;case T:return`Suspense`;case E:return`SuspenseList`;case ne:return`Activity`}if(typeof e==`object`)switch(e.$$typeof){case v:return`Portal`;case C:return e.displayName||`Context`;case S:return(e._context.displayName||`Context`)+`.Consumer`;case w:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ee:return t=e.displayName||null,t===null?se(e.type)||`Memo`:t;case te:t=e._payload,e=e._init;try{return se(e(t))}catch{}}return null}var ce=Array.isArray,D=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,O=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,k={pending:!1,data:null,method:null,action:null},le=[],ue=-1;function de(e){return{current:e}}function fe(e){0>ue||(e.current=le[ue],le[ue]=null,ue--)}function A(e,t){ue++,le[ue]=e.current,e.current=t}var pe=de(null),me=de(null),he=de(null),ge=de(null);function _e(e,t){switch(A(he,t),A(me,e),A(pe,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Vd(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Vd(t),e=Hd(t,e);else switch(e){case`svg`:e=1;break;case`math`:e=2;break;default:e=0}}fe(pe),A(pe,e)}function ve(){fe(pe),fe(me),fe(he)}function ye(e){e.memoizedState!==null&&A(ge,e);var t=pe.current,n=Hd(t,e.type);t!==n&&(A(me,e),A(pe,n))}function be(e){me.current===e&&(fe(pe),fe(me)),ge.current===e&&(fe(ge),Qf._currentValue=k)}var xe,j;function M(e){if(xe===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);xe=t&&t[1]||``,j=-1<e.stack.indexOf(`
|
|
3
3
|
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
4
4
|
`+xe+e+j}var Se=!1;function N(e,t){if(!e||Se)return``;Se=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,`name`);i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var a=r.DetermineComponentFrameRoot(),o=a[0],s=a[1];if(o&&s){var c=o.split(`
|
|
5
5
|
`),l=s.split(`
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./heavy-payload-Bol1_mcs.js","./scrollbar-CvE-I-jG.js","./chunk-EyZ2wyi3.js"])))=>i.map(i=>d[i]);
|
|
1
2
|
import{n as e,r as t}from"./chunk-EyZ2wyi3.js";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin===`use-credentials`?t.credentials=`include`:e.crossOrigin===`anonymous`?t.credentials=`omit`:t.credentials=`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var n,r=Object.freeze({status:`aborted`});function i(e,t,n){function r(n,r){if(n._zod||Object.defineProperty(n,"_zod",{value:{def:r,constr:o,traits:new Set},enumerable:!1}),n._zod.traits.has(e))return;n._zod.traits.add(e),t(n,r);let i=o.prototype,a=Object.keys(i);for(let e=0;e<a.length;e++){let t=a[e];t in n||(n[t]=i[t].bind(n))}}let i=n?.Parent??Object;class a extends i{}Object.defineProperty(a,"name",{value:e});function o(e){var t;let i=n?.Parent?new a:this;r(i,e),(t=i._zod).deferred??(t.deferred=[]);for(let e of i._zod.deferred)e();return i}return Object.defineProperty(o,"init",{value:r}),Object.defineProperty(o,Symbol.hasInstance,{value:t=>n?.Parent&&t instanceof n.Parent?!0:t?._zod?.traits?.has(e)}),Object.defineProperty(o,"name",{value:e}),o}var a=Symbol(`zod_brand`),o=class extends Error{constructor(){super(`Encountered Promise during synchronous parse. Use .parseAsync() instead.`)}},s=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name=`ZodEncodeError`}};(n=globalThis).__zod_globalConfig??(n.__zod_globalConfig={});var c=globalThis.__zod_globalConfig;function l(e){return e&&Object.assign(c,e),c}var u=e({BIGINT_FORMAT_RANGES:()=>Me,Class:()=>$e,NUMBER_FORMAT_RANGES:()=>je,aborted:()=>Be,allowsEval:()=>xe,assert:()=>ne,assertEqual:()=>d,assertIs:()=>ee,assertNever:()=>te,assertNotEqual:()=>f,assignProp:()=>de,base64ToUint8Array:()=>qe,base64urlToUint8Array:()=>Ye,cached:()=>ae,captureStackTrace:()=>ye,cleanEnum:()=>Ke,cleanRegex:()=>se,clone:()=>h,cloneDef:()=>pe,createTransparentProxy:()=>ke,defineLazy:()=>m,esc:()=>_e,escapeRegex:()=>Oe,explicitlyAborted:()=>Ve,extend:()=>Fe,finalizeIssue:()=>y,floatSafeRemainder:()=>ce,getElementAtPath:()=>me,getEnumValues:()=>re,getLengthableOrigin:()=>We,getParsedType:()=>Te,getSizableOrigin:()=>Ue,hexToUint8Array:()=>Ze,isObject:()=>be,isPlainObject:()=>Se,issue:()=>Ge,joinValues:()=>p,jsonStringifyReplacer:()=>ie,merge:()=>Le,mergeDefs:()=>fe,normalizeParams:()=>g,nullish:()=>oe,numKeys:()=>we,objectClone:()=>ue,omit:()=>Pe,optionalKeys:()=>Ae,parsedType:()=>b,partial:()=>Re,pick:()=>Ne,prefixIssues:()=>v,primitiveTypes:()=>De,promiseAllObject:()=>he,propertyKeyTypes:()=>Ee,randomString:()=>ge,required:()=>ze,safeExtend:()=>Ie,shallowClone:()=>Ce,slugify:()=>ve,stringifyPrimitive:()=>_,uint8ArrayToBase64:()=>Je,uint8ArrayToBase64url:()=>Xe,uint8ArrayToHex:()=>Qe,unwrapMessage:()=>He});function d(e){return e}function f(e){return e}function ee(e){}function te(e){throw Error(`Unexpected value in exhaustive check`)}function ne(e){}function re(e){let t=Object.values(e).filter(e=>typeof e==`number`);return Object.entries(e).filter(([e,n])=>t.indexOf(+e)===-1).map(([e,t])=>t)}function p(e,t=`|`){return e.map(e=>_(e)).join(t)}function ie(e,t){return typeof t==`bigint`?t.toString():t}function ae(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}throw Error(`cached value already set`)}}}function oe(e){return e==null}function se(e){let t=+!!e.startsWith(`^`),n=e.endsWith(`$`)?e.length-1:e.length;return e.slice(t,n)}function ce(e,t){let n=e/t,r=Math.round(n),i=2**-52*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var le=Symbol(`evaluating`);function m(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==le)return r===void 0&&(r=le,r=n()),r},set(n){Object.defineProperty(e,t,{value:n})},configurable:!0})}function ue(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function de(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function fe(...e){let t={};for(let n of e)Object.assign(t,Object.getOwnPropertyDescriptors(n));return Object.defineProperties({},t)}function pe(e){return fe(e._zod.def)}function me(e,t){return t?t.reduce((e,t)=>e?.[t],e):e}function he(e){let t=Object.keys(e),n=t.map(t=>e[t]);return Promise.all(n).then(e=>{let n={};for(let r=0;r<t.length;r++)n[t[r]]=e[r];return n})}function ge(e=10){let t=``;for(let n=0;n<e;n++)t+=`abcdefghijklmnopqrstuvwxyz`[Math.floor(Math.random()*26)];return t}function _e(e){return JSON.stringify(e)}function ve(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,``).replace(/[\s_-]+/g,`-`).replace(/^-+|-+$/g,``)}var ye=`captureStackTrace`in Error?Error.captureStackTrace:(...e)=>{};function be(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var xe=ae(()=>{if(c.jitless||typeof navigator<`u`&&navigator?.userAgent?.includes(`Cloudflare`))return!1;try{return Function(``),!0}catch{return!1}});function Se(e){if(be(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!=`function`)return!0;let n=t.prototype;return!(be(n)===!1||Object.prototype.hasOwnProperty.call(n,`isPrototypeOf`)===!1)}function Ce(e){return Se(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function we(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var Te=e=>{let t=typeof e;switch(t){case`undefined`:return`undefined`;case`string`:return`string`;case`number`:return Number.isNaN(e)?`nan`:`number`;case`boolean`:return`boolean`;case`function`:return`function`;case`bigint`:return`bigint`;case`symbol`:return`symbol`;case`object`:return Array.isArray(e)?`array`:e===null?`null`:e.then&&typeof e.then==`function`&&e.catch&&typeof e.catch==`function`?`promise`:typeof Map<`u`&&e instanceof Map?`map`:typeof Set<`u`&&e instanceof Set?`set`:typeof Date<`u`&&e instanceof Date?`date`:typeof File<`u`&&e instanceof File?`file`:`object`;default:throw Error(`Unknown data type: ${t}`)}},Ee=new Set([`string`,`number`,`symbol`]),De=new Set([`string`,`number`,`bigint`,`boolean`,`symbol`,`undefined`]);function Oe(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function h(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function g(e){let t=e;if(!t)return{};if(typeof t==`string`)return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error==`string`?{...t,error:()=>t.error}:t}function ke(e){let t;return new Proxy({},{get(n,r,i){return t??=e(),Reflect.get(t,r,i)},set(n,r,i,a){return t??=e(),Reflect.set(t,r,i,a)},has(n,r){return t??=e(),Reflect.has(t,r)},deleteProperty(n,r){return t??=e(),Reflect.deleteProperty(t,r)},ownKeys(n){return t??=e(),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??=e(),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??=e(),Reflect.defineProperty(t,r,i)}})}function _(e){return typeof e==`bigint`?e.toString()+`n`:typeof e==`string`?`"${e}"`:`${e}`}function Ae(e){return Object.keys(e).filter(t=>e[t]._zod.optin===`optional`&&e[t]._zod.optout===`optional`)}var je={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},Me={int64:[BigInt(`-9223372036854775808`),BigInt(`9223372036854775807`)],uint64:[BigInt(0),BigInt(`18446744073709551615`)]};function Ne(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.pick() cannot be used on object schemas containing refinements`);return h(e,fe(e._zod.def,{get shape(){let e={};for(let r in t){if(!(r in n.shape))throw Error(`Unrecognized key: "${r}"`);t[r]&&(e[r]=n.shape[r])}return de(this,`shape`,e),e},checks:[]}))}function Pe(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw Error(`.omit() cannot be used on object schemas containing refinements`);return h(e,fe(e._zod.def,{get shape(){let r={...e._zod.def.shape};for(let e in t){if(!(e in n.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return de(this,`shape`,r),r},checks:[]}))}function Fe(e,t){if(!Se(t))throw Error(`Invalid input to extend: expected a plain object`);let n=e._zod.def.checks;if(n&&n.length>0){let n=e._zod.def.shape;for(let e in t)if(Object.getOwnPropertyDescriptor(n,e)!==void 0)throw Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}return h(e,fe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return de(this,`shape`,n),n}}))}function Ie(e,t){if(!Se(t))throw Error(`Invalid input to safeExtend: expected a plain object`);return h(e,fe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t};return de(this,`shape`,n),n}}))}function Le(e,t){if(e._zod.def.checks?.length)throw Error(`.merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.`);return h(e,fe(e._zod.def,{get shape(){let n={...e._zod.def.shape,...t._zod.def.shape};return de(this,`shape`,n),n},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]}))}function Re(e,t,n){let r=t._zod.def.checks;if(r&&r.length>0)throw Error(`.partial() cannot be used on object schemas containing refinements`);return h(t,fe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in r))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t])}else for(let t in r)i[t]=e?new e({type:`optional`,innerType:r[t]}):r[t];return de(this,`shape`,i),i},checks:[]}))}function ze(e,t,n){return h(t,fe(t._zod.def,{get shape(){let r=t._zod.def.shape,i={...r};if(n)for(let t in n){if(!(t in i))throw Error(`Unrecognized key: "${t}"`);n[t]&&(i[t]=new e({type:`nonoptional`,innerType:r[t]}))}else for(let t in r)i[t]=new e({type:`nonoptional`,innerType:r[t]});return de(this,`shape`,i),i}}))}function Be(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function Ve(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function v(e,t){return t.map(t=>{var n;return(n=t).path??(n.path=[]),t.path.unshift(e),t})}function He(e){return typeof e==`string`?e:e?.message}function y(e,t,n){let r=e.message?e.message:He(e.inst?._zod.def?.error?.(e))??He(t?.error?.(e))??He(n.customError?.(e))??He(n.localeError?.(e))??`Invalid input`,{inst:i,continue:a,input:o,...s}=e;return s.path??=[],s.message=r,t?.reportInput&&(s.input=o),s}function Ue(e){return e instanceof Set?`set`:e instanceof Map?`map`:e instanceof File?`file`:`unknown`}function We(e){return Array.isArray(e)?`array`:typeof e==`string`?`string`:`unknown`}function b(e){let t=typeof e;switch(t){case`number`:return Number.isNaN(e)?`nan`:`number`;case`object`:{if(e===null)return`null`;if(Array.isArray(e))return`array`;let t=e;if(t&&Object.getPrototypeOf(t)!==Object.prototype&&`constructor`in t&&t.constructor)return t.constructor.name}}return t}function Ge(...e){let[t,n,r]=e;return typeof t==`string`?{message:t,code:`custom`,input:n,inst:r}:{...t}}function Ke(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])}function qe(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}function Je(e){let t=``;for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function Ye(e){let t=e.replace(/-/g,`+`).replace(/_/g,`/`);return qe(t+`=`.repeat((4-t.length%4)%4))}function Xe(e){return Je(e).replace(/\+/g,`-`).replace(/\//g,`_`).replace(/=/g,``)}function Ze(e){let t=e.replace(/^0x/,``);if(t.length%2!=0)throw Error(`Invalid hex string length`);let n=new Uint8Array(t.length/2);for(let e=0;e<t.length;e+=2)n[e/2]=Number.parseInt(t.slice(e,e+2),16);return n}function Qe(e){return Array.from(e).map(e=>e.toString(16).padStart(2,`0`)).join(``)}var $e=class{constructor(...e){}},et=(e,t)=>{e.name=`$ZodError`,Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,ie,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},tt=i(`$ZodError`,et),x=i(`$ZodError`,et,{Parent:Error});function nt(e,t=e=>e.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function rt(e,t=e=>e.message){let n={_errors:[]},r=(e,i=[])=>{for(let a of e.issues)if(a.code===`invalid_union`&&a.errors.length)a.errors.map(e=>r({issues:e},[...i,...a.path]));else if(a.code===`invalid_key`)r({issues:a.issues},[...i,...a.path]);else if(a.code===`invalid_element`)r({issues:a.issues},[...i,...a.path]);else{let e=[...i,...a.path];if(e.length===0)n._errors.push(t(a));else{let r=n,i=0;for(;i<e.length;){let n=e[i];i===e.length-1?(r[n]=r[n]||{_errors:[]},r[n]._errors.push(t(a))):r[n]=r[n]||{_errors:[]},r=r[n],i++}}}};return r(e),n}function it(e,t=e=>e.message){let n={errors:[]},r=(e,i=[])=>{var a,o;for(let s of e.issues)if(s.code===`invalid_union`&&s.errors.length)s.errors.map(e=>r({issues:e},[...i,...s.path]));else if(s.code===`invalid_key`)r({issues:s.issues},[...i,...s.path]);else if(s.code===`invalid_element`)r({issues:s.issues},[...i,...s.path]);else{let e=[...i,...s.path];if(e.length===0){n.errors.push(t(s));continue}let r=n,c=0;for(;c<e.length;){let n=e[c],i=c===e.length-1;typeof n==`string`?(r.properties??={},(a=r.properties)[n]??(a[n]={errors:[]}),r=r.properties[n]):(r.items??=[],(o=r.items)[n]??(o[n]={errors:[]}),r=r.items[n]),i&&r.errors.push(t(s)),c++}}};return r(e),n}function at(e){let t=[],n=e.map(e=>typeof e==`object`?e.key:e);for(let e of n)typeof e==`number`?t.push(`[${e}]`):typeof e==`symbol`?t.push(`[${JSON.stringify(String(e))}]`):/[^\w$]/.test(e)?t.push(`[${JSON.stringify(e)}]`):(t.length&&t.push(`.`),t.push(e));return t.join(``)}function ot(e){let t=[],n=[...e.issues].sort((e,t)=>(e.path??[]).length-(t.path??[]).length);for(let e of n)t.push(`✖ ${e.message}`),e.path?.length&&t.push(` → at ${at(e.path)}`);return t.join(`
|
|
2
3
|
`)}var st=e=>(t,n,r,i)=>{let a=r?{...r,async:!1}:{async:!1},s=t._zod.run({value:n,issues:[]},a);if(s instanceof Promise)throw new o;if(s.issues.length){let t=new(i?.Err??e)(s.issues.map(e=>y(e,a,l())));throw ye(t,i?.callee),t}return s.value},ct=st(x),lt=e=>async(t,n,r,i)=>{let a=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},a);if(o instanceof Promise&&(o=await o),o.issues.length){let t=new(i?.Err??e)(o.issues.map(e=>y(e,a,l())));throw ye(t,i?.callee),t}return o.value},ut=lt(x),dt=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},i);if(a instanceof Promise)throw new o;return a.issues.length?{success:!1,error:new(e??tt)(a.issues.map(e=>y(e,i,l())))}:{success:!0,data:a.value}},ft=dt(x),pt=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},i);return a instanceof Promise&&(a=await a),a.issues.length?{success:!1,error:new e(a.issues.map(e=>y(e,i,l())))}:{success:!0,data:a.value}},mt=pt(x),ht=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return st(e)(t,n,i)},gt=ht(x),_t=e=>(t,n,r)=>st(e)(t,n,r),vt=_t(x),yt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return lt(e)(t,n,i)},bt=yt(x),xt=e=>async(t,n,r)=>lt(e)(t,n,r),St=xt(x),Ct=e=>(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return dt(e)(t,n,i)},wt=Ct(x),Tt=e=>(t,n,r)=>dt(e)(t,n,r),Et=Tt(x),Dt=e=>async(t,n,r)=>{let i=r?{...r,direction:`backward`}:{direction:`backward`};return pt(e)(t,n,i)},Ot=Dt(x),kt=e=>async(t,n,r)=>pt(e)(t,n,r),At=kt(x),jt=e({base64:()=>an,base64url:()=>on,bigint:()=>_n,boolean:()=>bn,browserEmail:()=>Xt,cidrv4:()=>nn,cidrv6:()=>rn,cuid:()=>Mt,cuid2:()=>Nt,date:()=>fn,datetime:()=>hn,domain:()=>cn,duration:()=>Rt,e164:()=>un,email:()=>Gt,emoji:()=>Qt,extendedDuration:()=>zt,guid:()=>Bt,hex:()=>Tn,hostname:()=>sn,html5Email:()=>Kt,httpProtocol:()=>ln,idnEmail:()=>Yt,integer:()=>vn,ipv4:()=>$t,ipv6:()=>en,ksuid:()=>It,lowercase:()=>Cn,mac:()=>tn,md5_base64:()=>kn,md5_base64url:()=>An,md5_hex:()=>On,nanoid:()=>Lt,null:()=>xn,number:()=>yn,rfc5322Email:()=>qt,sha1_base64:()=>Mn,sha1_base64url:()=>Nn,sha1_hex:()=>jn,sha256_base64:()=>Fn,sha256_base64url:()=>In,sha256_hex:()=>Pn,sha384_base64:()=>Rn,sha384_base64url:()=>zn,sha384_hex:()=>Ln,sha512_base64:()=>Vn,sha512_base64url:()=>Hn,sha512_hex:()=>Bn,string:()=>gn,time:()=>mn,ulid:()=>Pt,undefined:()=>Sn,unicodeEmail:()=>Jt,uppercase:()=>wn,uuid:()=>Vt,uuid4:()=>Ht,uuid6:()=>Ut,uuid7:()=>Wt,xid:()=>Ft}),Mt=/^[cC][0-9a-z]{6,}$/,Nt=/^[0-9a-z]+$/,Pt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,Ft=/^[0-9a-vA-V]{20}$/,It=/^[A-Za-z0-9]{27}$/,Lt=/^[a-zA-Z0-9_-]{21}$/,Rt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,zt=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Bt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Vt=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,Ht=Vt(4),Ut=Vt(6),Wt=Vt(7),Gt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,Kt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,qt=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,Jt=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,Yt=Jt,Xt=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,Zt=`^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;function Qt(){return new RegExp(Zt,`u`)}var $t=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,en=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,tn=e=>{let t=Oe(e??`:`);return RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},nn=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,rn=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,an=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,on=/^[A-Za-z0-9_-]*$/,sn=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,cn=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,ln=/^https?$/,un=/^\+[1-9]\d{6,14}$/,dn=`(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`,fn=RegExp(`^${dn}$`);function pn(e){let t=`(?:[01]\\d|2[0-3]):[0-5]\\d`;return typeof e.precision==`number`?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function mn(e){return RegExp(`^${pn(e)}$`)}function hn(e){let t=pn({precision:e.precision}),n=[`Z`];e.local&&n.push(``),e.offset&&n.push(`([+-](?:[01]\\d|2[0-3]):[0-5]\\d)`);let r=`${t}(?:${n.join(`|`)})`;return RegExp(`^${dn}T(?:${r})$`)}var gn=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??``}}`:`[\\s\\S]*`;return RegExp(`^${t}$`)},_n=/^-?\d+n?$/,vn=/^-?\d+$/,yn=/^-?\d+(?:\.\d+)?$/,bn=/^(?:true|false)$/i,xn=/^null$/i,Sn=/^undefined$/i,Cn=/^[^A-Z]*$/,wn=/^[^a-z]*$/,Tn=/^[0-9a-fA-F]*$/;function En(e,t){return RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function Dn(e){return RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var On=/^[0-9a-fA-F]{32}$/,kn=En(22,`==`),An=Dn(22),jn=/^[0-9a-fA-F]{40}$/,Mn=En(27,`=`),Nn=Dn(27),Pn=/^[0-9a-fA-F]{64}$/,Fn=En(43,`=`),In=Dn(43),Ln=/^[0-9a-fA-F]{96}$/,Rn=En(64,``),zn=Dn(64),Bn=/^[0-9a-fA-F]{128}$/,Vn=En(86,`==`),Hn=Dn(86),S=i(`$ZodCheck`,(e,t)=>{var n;e._zod??={},e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),Un={number:`number`,bigint:`bigint`,object:`date`},Wn=i(`$ZodCheckLessThan`,(e,t)=>{S.init(e,t);let n=Un[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.maximum:n.exclusiveMaximum)??1/0;t.value<r&&(t.inclusive?n.maximum=t.value:n.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:`too_big`,maximum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Gn=i(`$ZodCheckGreaterThan`,(e,t)=>{S.init(e,t);let n=Un[typeof t.value];e._zod.onattach.push(e=>{let n=e._zod.bag,r=(t.inclusive?n.minimum:n.exclusiveMinimum)??-1/0;t.value>r&&(t.inclusive?n.minimum=t.value:n.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:`too_small`,minimum:typeof t.value==`object`?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),Kn=i(`$ZodCheckMultipleOf`,(e,t)=>{S.init(e,t),e._zod.onattach.push(e=>{var n;(n=e._zod.bag).multipleOf??(n.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw Error(`Cannot mix number and bigint in multiple_of check.`);(typeof n.value==`bigint`?n.value%t.value===BigInt(0):ce(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:`not_multiple_of`,divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),qn=i(`$ZodCheckNumberFormat`,(e,t)=>{S.init(e,t),t.format=t.format||`float64`;let n=t.format?.includes(`int`),r=n?`int`:`number`,[i,a]=je[t.format];e._zod.onattach.push(e=>{let r=e._zod.bag;r.format=t.format,r.minimum=i,r.maximum=a,n&&(r.pattern=vn)}),e._zod.check=o=>{let s=o.value;if(n){if(!Number.isInteger(s)){o.issues.push({expected:r,format:t.format,code:`invalid_type`,continue:!1,input:s,inst:e});return}if(!Number.isSafeInteger(s)){s>0?o.issues.push({input:s,code:`too_big`,maximum:2**53-1,note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort}):o.issues.push({input:s,code:`too_small`,minimum:-(2**53-1),note:`Integers must be within the safe integer range.`,inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}s<i&&o.issues.push({origin:`number`,input:s,code:`too_small`,minimum:i,inclusive:!0,inst:e,continue:!t.abort}),s>a&&o.issues.push({origin:`number`,input:s,code:`too_big`,maximum:a,inclusive:!0,inst:e,continue:!t.abort})}}),Jn=i(`$ZodCheckBigIntFormat`,(e,t)=>{S.init(e,t);let[n,r]=Me[t.format];e._zod.onattach.push(e=>{let i=e._zod.bag;i.format=t.format,i.minimum=n,i.maximum=r}),e._zod.check=i=>{let a=i.value;a<n&&i.issues.push({origin:`bigint`,input:a,code:`too_small`,minimum:n,inclusive:!0,inst:e,continue:!t.abort}),a>r&&i.issues.push({origin:`bigint`,input:a,code:`too_big`,maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),Yn=i(`$ZodCheckMaxSize`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!oe(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;r.size<=t.maximum||n.issues.push({origin:Ue(r),code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Xn=i(`$ZodCheckMinSize`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!oe(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;r.size>=t.minimum||n.issues.push({origin:Ue(r),code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),Zn=i(`$ZodCheckSizeEquals`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!oe(t)&&t.size!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.size,n.maximum=t.size,n.size=t.size}),e._zod.check=n=>{let r=n.value,i=r.size;if(i===t.size)return;let a=i>t.size;n.issues.push({origin:Ue(r),...a?{code:`too_big`,maximum:t.size}:{code:`too_small`,minimum:t.size},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),Qn=i(`$ZodCheckMaxLength`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!oe(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.maximum??1/0;t.maximum<n&&(e._zod.bag.maximum=t.maximum)}),e._zod.check=n=>{let r=n.value;if(r.length<=t.maximum)return;let i=We(r);n.issues.push({origin:i,code:`too_big`,maximum:t.maximum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),$n=i(`$ZodCheckMinLength`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!oe(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag.minimum??-1/0;t.minimum>n&&(e._zod.bag.minimum=t.minimum)}),e._zod.check=n=>{let r=n.value;if(r.length>=t.minimum)return;let i=We(r);n.issues.push({origin:i,code:`too_small`,minimum:t.minimum,inclusive:!0,input:r,inst:e,continue:!t.abort})}}),er=i(`$ZodCheckLengthEquals`,(e,t)=>{var n;S.init(e,t),(n=e._zod.def).when??(n.when=e=>{let t=e.value;return!oe(t)&&t.length!==void 0}),e._zod.onattach.push(e=>{let n=e._zod.bag;n.minimum=t.length,n.maximum=t.length,n.length=t.length}),e._zod.check=n=>{let r=n.value,i=r.length;if(i===t.length)return;let a=We(r),o=i>t.length;n.issues.push({origin:a,...o?{code:`too_big`,maximum:t.length}:{code:`too_small`,minimum:t.length},inclusive:!0,exact:!0,input:n.value,inst:e,continue:!t.abort})}}),tr=i(`$ZodCheckStringFormat`,(e,t)=>{var n,r;S.init(e,t),e._zod.onattach.push(e=>{let n=e._zod.bag;n.format=t.format,t.pattern&&(n.patterns??=new Set,n.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:t.format,input:n.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),nr=i(`$ZodCheckRegex`,(e,t)=>{tr.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:`string`,code:`invalid_format`,format:`regex`,input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),rr=i(`$ZodCheckLowerCase`,(e,t)=>{t.pattern??=Cn,tr.init(e,t)}),ir=i(`$ZodCheckUpperCase`,(e,t)=>{t.pattern??=wn,tr.init(e,t)}),ar=i(`$ZodCheckIncludes`,(e,t)=>{S.init(e,t);let n=Oe(t.includes),r=new RegExp(typeof t.position==`number`?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(r)}),e._zod.check=n=>{n.value.includes(t.includes,t.position)||n.issues.push({origin:`string`,code:`invalid_format`,format:`includes`,includes:t.includes,input:n.value,inst:e,continue:!t.abort})}}),or=i(`$ZodCheckStartsWith`,(e,t)=>{S.init(e,t);let n=RegExp(`^${Oe(t.prefix)}.*`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.startsWith(t.prefix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`starts_with`,prefix:t.prefix,input:n.value,inst:e,continue:!t.abort})}}),sr=i(`$ZodCheckEndsWith`,(e,t)=>{S.init(e,t);let n=RegExp(`.*${Oe(t.suffix)}$`);t.pattern??=n,e._zod.onattach.push(e=>{let t=e._zod.bag;t.patterns??=new Set,t.patterns.add(n)}),e._zod.check=n=>{n.value.endsWith(t.suffix)||n.issues.push({origin:`string`,code:`invalid_format`,format:`ends_with`,suffix:t.suffix,input:n.value,inst:e,continue:!t.abort})}});function cr(e,t,n){e.issues.length&&t.issues.push(...v(n,e.issues))}var lr=i(`$ZodCheckProperty`,(e,t)=>{S.init(e,t),e._zod.check=e=>{let n=t.schema._zod.run({value:e.value[t.property],issues:[]},{});if(n instanceof Promise)return n.then(n=>cr(n,e,t.property));cr(n,e,t.property)}}),ur=i(`$ZodCheckMimeType`,(e,t)=>{S.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(e=>{e._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:`invalid_value`,values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),dr=i(`$ZodCheckOverwrite`,(e,t)=>{S.init(e,t),e._zod.check=e=>{e.value=t.tx(e.value)}}),fr=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e==`function`){e(this,{execution:`sync`}),e(this,{execution:`async`});return}let t=e.split(`
|
|
3
4
|
`).filter(e=>e),n=Math.min(...t.map(e=>e.length-e.trimStart().length)),r=t.map(e=>e.slice(n)).map(e=>` `.repeat(this.indent*2)+e);for(let e of r)this.content.push(e)}compile(){let e=Function,t=this?.args,n=[...(this?.content??[``]).map(e=>` ${e}`)];return new e(...t,n.join(`
|
|
@@ -108,4 +109,6 @@ Boolean requesting whether a visible border and background is provided by the ho
|
|
|
108
109
|
- omitted: host decides border`)}),R({method:U(`ui/request-display-mode`),params:R({mode:Rg.describe(`The display mode being requested.`)})});var e_=R({mode:Rg.describe(`The display mode that was actually set. May differ from requested if not supported.`)}).passthrough(),t_=B([U(`model`),U(`app`)]).describe(`Tool visibility scope - who can access the tool.`);R({resourceUri:M().optional(),visibility:L(t_).optional().describe(`Who can access this tool. Default: ["model", "app"]
|
|
109
110
|
- "model": Tool visible to and callable by the agent
|
|
110
111
|
- "app": Tool callable by the app from this server only`),csp:cf().optional(),permissions:cf().optional()}),R({mimeTypes:L(M()).optional().describe('Array of supported MIME types for UI resources.\nMust include `"text/html;profile=mcp-app"` for MCP Apps support.')}),R({method:U(`ui/download-file`),params:R({contents:L(B([Dh,Oh])).describe(`Resource contents to download — embedded (inline data) or linked (host fetches). Uses standard MCP resource types.`)})}),R({method:U(`ui/message`),params:R({role:U(`user`).describe(`Message role, currently only "user" is supported.`),content:L(kh).describe(`Message content blocks (text, image, etc.).`)})}),R({method:U(`ui/notifications/sandbox-resource-ready`),params:R({html:M().describe(`HTML content to load into the inner iframe.`),sandbox:M().optional().describe(`Optional override for the inner iframe's sandbox attribute.`),csp:Ug.optional().describe(`CSP configuration from resource metadata.`),permissions:Wg.optional().describe(`Sandbox permissions from resource metadata.`)})});var n_=R({method:U(`ui/notifications/tool-result`),params:Rh.describe(`Standard MCP tool execution result.`)}),r_=R({toolInfo:R({id:im.optional().describe(`JSON-RPC id of the tools/call request.`),tool:Fh.describe(`Tool definition including name, inputSchema, etc.`)}).optional().describe(`Metadata of the tool call that instantiated this App.`),theme:Lg.optional().describe(`Current color theme preference.`),styles:Yg.optional().describe(`Style configuration for theming the app.`),displayMode:Rg.optional().describe(`How the UI is currently displayed.`),availableDisplayModes:L(Rg).optional().describe(`Display modes the host supports.`),containerDimensions:B([R({height:P().describe(`Fixed container height in pixels.`)}),R({maxHeight:B([P(),ef()]).optional().describe(`Maximum container height in pixels.`)})]).and(B([R({width:P().describe(`Fixed container width in pixels.`)}),R({maxWidth:B([P(),ef()]).optional().describe(`Maximum container width in pixels.`)})])).optional().describe(`Container dimensions. Represents the dimensions of the iframe or other
|
|
111
|
-
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:M().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:M().optional().describe(`User's timezone in IANA format.`),userAgent:M().optional().describe(`Host application identifier.`),platform:B([U(`web`),U(`desktop`),U(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:R({touch:F().optional().describe(`Whether the device supports touch input.`),hover:F().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:R({top:P().describe(`Top safe area inset in pixels.`),right:P().describe(`Right safe area inset in pixels.`),bottom:P().describe(`Bottom safe area inset in pixels.`),left:P().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),i_=R({method:U(`ui/notifications/host-context-changed`),params:r_.describe(`Partial context update containing only changed fields.`)});R({method:U(`ui/update-model-context`),params:R({content:L(kh).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:V(M(),I().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),R({method:U(`ui/initialize`),params:R({appInfo:ym.describe(`App identification (name and version).`),appCapabilities:$g.describe(`Features and capabilities this app provides.`),protocolVersion:M().describe(`Protocol version this app supports.`)})});var a_=R({protocolVersion:M().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:ym.describe(`Host application identification and version.`),hostCapabilities:Qg.describe(`Features and capabilities provided by the host.`),hostContext:r_.describe(`Rich context about the host environment.`)}).passthrough(),o_={target:`draft-2020-12`};async function s_(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](o_);if(n.vendor===`zod`){let{z:n}=await Ng(async()=>{let{z:e}=await Promise.resolve().then(()=>qp);return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function c_(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function l_(e){let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e}function u_(e,t=document.documentElement){for(let[n,r]of Object.entries(e))r!==void 0&&t.style.setProperty(n,r)}function d_(e){if(document.getElementById(`__mcp-host-fonts`))return;let t=document.createElement(`style`);t.id=`__mcp-host-fonts`,t.textContent=e,document.head.appendChild(t)}var f_=class e extends Pg{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Gg,toolinputpartial:Kg,toolresult:n_,toolcancelled:qg,hostcontextchanged:i_};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||l({jitless:!0}),this.setRequestHandler(km,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=kg(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await c_(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await c_(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await s_(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await s_(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Xg,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Bh,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(Ih,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},Rh,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},lh,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},rh,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?ng:tg;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Hg,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},mm,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Bg,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},Vg,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},e_,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new Ig(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:Fg}},a_,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}},p_={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},m_=([e,t,n])=>{let r=document.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.keys(t).forEach(e=>{r.setAttribute(e,String(t[e]))}),n?.length&&n.forEach(e=>{let t=m_(e);r.appendChild(t)}),r},h_=(e,t={})=>m_([`svg`,{...p_,...t},e]),g_=[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`}]],__=[[`path`,{d:`M12 8V4H8`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}],[`path`,{d:`M2 14h2`}],[`path`,{d:`M20 14h2`}],[`path`,{d:`M15 13v2`}],[`path`,{d:`M9 13v2`}]],v_=[[`path`,{d:`m6 9 6 6 6-6`}]],y_=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]],b_=[[`path`,{d:`M12 20v2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M17 20v2`}],[`path`,{d:`M17 2v2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M2 17h2`}],[`path`,{d:`M2 7h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 17h2`}],[`path`,{d:`M20 7h2`}],[`path`,{d:`M7 20v2`}],[`path`,{d:`M7 2v2`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`}]],x_=[[`path`,{d:`M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`m14 20 2 2 4-4`}]],S_=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M9 10h6`}],[`path`,{d:`M12 13V7`}],[`path`,{d:`M9 17h6`}]],C_=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M9 15h6`}]],w_=[[`path`,{d:`M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z`}],[`path`,{d:`M14.487 7.858A1 1 0 0 1 14 7V2`}],[`path`,{d:`M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516`}],[`path`,{d:`M8 18h1`}]],T_=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M9 15h6`}],[`path`,{d:`M12 18v-6`}]],E_=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]],D_={agents:__,base:[[`circle`,{cx:`12`,cy:`12`,r:`3`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`}]],chevronDown:v_,deleteFile:C_,diff:S_,editFile:w_,files:[[`path`,{d:`M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`}],[`path`,{d:`M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z`}],[`path`,{d:`M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1`}]],folderOpen:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`}]],folderTree:[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`}]],gitBranch:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}]],instructions:E_,instructionAvailable:E_,instructionLoaded:x_,loading:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]],providers:b_,readFile:E_,search:[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]],skills:g_,sourceCheckout:[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`}],[`circle`,{cx:`13`,cy:`12`,r:`2`}],[`circle`,{cx:`20`,cy:`19`,r:`2`}]],terminal:[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]],terminalSquare:[[`path`,{d:`m7 11 2-2-2-2`}],[`path`,{d:`M11 13h4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}]],warning:y_,writeFile:T_},O_={claude:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e`,``+import.meta.url).href,codex:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='260'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20260'%3e%3cpath%20fill='%23fff'%20d='M239.184%20106.203a64.716%2064.716%200%200%200-5.576-53.103C219.452%2028.459%20191%2015.784%20163.213%2021.74A65.586%2065.586%200%200%200%2052.096%2045.22a64.716%2064.716%200%200%200-43.23%2031.36c-14.31%2024.602-11.061%2055.634%208.033%2076.74a64.665%2064.665%200%200%200%205.525%2053.102c14.174%2024.65%2042.644%2037.324%2070.446%2031.36a64.72%2064.72%200%200%200%2048.754%2021.744c28.481.025%2053.714-18.361%2062.414-45.481a64.767%2064.767%200%200%200%2043.229-31.36c14.137-24.558%2010.875-55.423-8.083-76.483Zm-97.56%20136.338a48.397%2048.397%200%200%201-31.105-11.255l1.535-.87%2051.67-29.825a8.595%208.595%200%200%200%204.247-7.367v-72.85l21.845%2012.636c.218.111.37.32.409.563v60.367c-.056%2026.818-21.783%2048.545-48.601%2048.601Zm-104.466-44.61a48.345%2048.345%200%200%201-5.781-32.589l1.534.921%2051.722%2029.826a8.339%208.339%200%200%200%208.441%200l63.181-36.425v25.221a.87.87%200%200%201-.358.665l-52.335%2030.184c-23.257%2013.398-52.97%205.431-66.404-17.803ZM23.549%2085.38a48.499%2048.499%200%200%201%2025.58-21.333v61.39a8.288%208.288%200%200%200%204.195%207.316l62.874%2036.272-21.845%2012.636a.819.819%200%200%201-.767%200L41.353%20151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466%2041.695-63.08-36.63L161.73%2077.86a.819.819%200%200%201%20.768%200l52.233%2030.184a48.6%2048.6%200%200%201-7.316%2087.635v-61.391a8.544%208.544%200%200%200-4.4-7.213Zm21.742-32.69-1.535-.922-51.619-30.081a8.39%208.39%200%200%200-8.492%200L99.98%2099.808V74.587a.716.716%200%200%201%20.307-.665l52.233-30.133a48.652%2048.652%200%200%201%2072.236%2050.391v.205ZM88.061%20139.097l-21.845-12.585a.87.87%200%200%201-.41-.614V65.685a48.652%2048.652%200%200%201%2079.757-37.346l-1.535.87-51.67%2029.825a8.595%208.595%200%200%200-4.246%207.367l-.051%2072.697Zm11.868-25.58%2028.138-16.217%2028.188%2016.218v32.434l-28.086%2016.218-28.188-16.218-.052-32.434Z'/%3e%3c/svg%3e`,``+import.meta.url).href,copilot:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20208'%3e%3cpath%20fill='%23fff'%20d='M205.3%2031.4c14%2014.8%2020%2035.2%2022.5%2063.6%206.6%200%2012.8%201.5%2017%207.2l7.8%2010.6c2.2%203%203.4%206.6%203.4%2010.4v28.7a12%2012%200%200%201-4.8%209.5C215.9%20187.2%20172.3%20208%20128%20208c-49%200-98.2-28.3-123.2-46.6a12%2012%200%200%201-4.8-9.5v-28.7c0-3.8%201.2-7.4%203.4-10.5l7.8-10.5c4.2-5.7%2010.4-7.2%2017-7.2%202.5-28.4%208.4-48.8%2022.5-63.6C77.3%203.2%20112.6%200%20127.6%200h.4c14.7%200%2050.4%202.9%2077.3%2031.4ZM128%2078.7c-3%200-6.5.2-10.3.6a27.1%2027.1%200%200%201-6%2012.1%2045%2045%200%200%201-32%2013c-6.8%200-13.9-1.5-19.7-5.2-5.5%201.9-10.8%204.5-11.2%2011-.5%2012.2-.6%2024.5-.6%2036.8%200%206.1%200%2012.3-.2%2018.5%200%203.6%202.2%206.9%205.5%208.4C79.9%20185.9%20105%20192%20128%20192s48-6%2074.5-18.1a9.4%209.4%200%200%200%205.5-8.4c.3-18.4%200-37-.8-55.3-.4-6.6-5.7-9.1-11.2-11-5.8%203.7-13%205.1-19.7%205.1a45%2045%200%200%201-32-12.9%2027.1%2027.1%200%200%201-6-12.1c-3.4-.4-6.9-.5-10.3-.6Zm-27%2044c5.8%200%2010.5%204.6%2010.5%2010.4v19.2a10.4%2010.4%200%200%201-20.8%200V133c0-5.8%204.6-10.4%2010.4-10.4Zm53.4%200c5.8%200%2010.4%204.6%2010.4%2010.4v19.2a10.4%2010.4%200%200%201-20.8%200V133c0-5.8%204.7-10.4%2010.4-10.4Zm-73-94.4c-11.2%201.1-20.6%204.8-25.4%2010-10.4%2011.3-8.2%2040.1-2.2%2046.2A31.2%2031.2%200%200%200%2075%2091.7c6.8%200%2019.6-1.5%2030.1-12.2%204.7-4.5%207.5-15.7%207.2-27-.3-9.1-2.9-16.7-6.7-19.9-4.2-3.6-13.6-5.2-24.2-4.3Zm69%204.3c-3.8%203.2-6.4%2010.8-6.7%2019.9-.3%2011.3%202.5%2022.5%207.2%2027a41.7%2041.7%200%200%200%2030%2012.2c8.9%200%2017-2.9%2021.3-7.2%206-6.1%208.2-34.9-2.2-46.3-4.8-5-14.2-8.8-25.4-9.9-10.6-1-20%20.7-24.2%204.3ZM128%2056c-2.6%200-5.6.2-9%20.5.4%201.7.5%203.7.7%205.7%200%201.5%200%203-.2%204.5%203.2-.3%206-.3%208.5-.3%202.6%200%205.3%200%208.5.3-.2-1.6-.2-3-.2-4.5.2-2%20.3-4%20.7-5.7-3.4-.3-6.4-.5-9-.5Z'/%3e%3c/svg%3e`,``+import.meta.url).href,cursor:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20466.73%20532.09'%3e%3cpath%20fill='%23edecec'%20d='M457.43%20125.94%20244.42%202.96c-6.84-3.95-15.28-3.95-22.12%200L9.3%20125.94c-5.75%203.32-9.3%209.46-9.3%2016.11v247.99c0%206.65%203.55%2012.79%209.3%2016.11l213.01%20122.98c6.84%203.95%2015.28%203.95%2022.12%200l213.01-122.98c5.75-3.32%209.3-9.46%209.3-16.11V142.05c0-6.65-3.55-12.79-9.3-16.11ZM444.05%20151.99%20238.42%20508.15c-1.39%202.4-5.06%201.42-5.06-1.36V273.58c0-4.66-2.49-8.97-6.53-11.31L24.87%20145.67c-2.4-1.39-1.42-5.06%201.36-5.06h411.26c5.84%200%209.49%206.33%206.57%2011.39Z'/%3e%3c/svg%3e`,``+import.meta.url).href,opencode:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'/%3e%3cpath%20d='M320%20224v128H192V224h128Z'%20fill='%235A5858'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M384%20416H128V96h256v320ZM320%20160H192v192h128V160Z'%20clip-rule='evenodd'/%3e%3c/svg%3e`,``+import.meta.url).href,pi:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20800%20800'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M165.29%20165.29h352.07V400H400v117.36H282.65v117.36H165.29V165.29Zm117.36%20117.36V400H400V282.65H282.65Z'/%3e%3cpath%20fill='%23fff'%20d='M517.36%20400h117.36v234.72H517.36z'/%3e%3c/svg%3e`,``+import.meta.url).href};function k_(e){return O_[e.trim().toLowerCase()]}function A_(e,t=`icon-svg`){return h_(e,{class:t,"aria-hidden":`true`})}var j_=`forgerelay/activityPanelDefaultExpanded`,M_=`forgerelay/activityPanelWorkspace`;function N_(e,t,n){return!n||e!==`working`?null:t<=0?1e3:t===1?2e3:t===2?5e3:1e4}function P_(e){return J_(e)?e[j_]===!0:!1}function F_(e,t){return I_(t)?`activity`:e?`preserve-panel`:`tool-card`}function I_(e){return J_(e)?typeof e.turnId==`string`&&K_(e.revision)&&typeof e.changed==`boolean`&&W_(e.state):!1}function L_(e){return!I_(e)||!J_(e)||!Array.isArray(e.activities)?!1:e.activities.every(U_)}function R_(e){return!J_(e)||!U_(e.activity)?!1:e.error===void 0||typeof e.error==`string`}function z_(e){return!J_(e)||typeof e.outputId!=`string`||typeof e.activityId!=`string`||!q_(e.processId)||typeof e.command!=`string`||typeof e.output!=`string`||!K_(e.cursor)||e.status!==`running`&&e.status!==`done`&&e.status!==`failed`||typeof e.timedOut!=`boolean`||typeof e.startedAt!=`string`||e.exitCode!==void 0&&!Number.isInteger(e.exitCode)||e.signal!==void 0&&typeof e.signal!=`string`?!1:e.finishedAt===void 0||typeof e.finishedAt==`string`}function B_(e,t){if(!t.changed)return e;let n=new Map(t.activities.map(e=>[e.activityId,e])),r=e.map(e=>n.get(e.activityId)??e),i=new Set(e.map(e=>e.activityId));for(let e of t.activities)i.has(e.activityId)||r.push(e);return r}function V_(e){let t=new Set(e.map(e=>e.activityId)),n=new Map;for(let r of e){if(!r.parentActivityId||!t.has(r.parentActivityId))continue;let e=n.get(r.parentActivityId)??[];e.push(r),n.set(r.parentActivityId,e)}return e.flatMap(e=>e.parentActivityId&&t.has(e.parentActivityId)?[]:[{activity:e,children:n.get(e.activityId)??[]}])}function H_(e,t=24){return e.scrollHeight-e.clientHeight-e.scrollTop<=t}function U_(e){return!J_(e)||e.member!==void 0&&typeof e.member!=`string`?!1:typeof e.activityId==`string`&&typeof e.tool==`string`&&typeof e.kind==`string`&&W_(e.status)&&G_(e.state)&&typeof e.title==`string`&&typeof e.target==`string`&&typeof e.detailAvailable==`boolean`&&typeof e.startedAt==`string`}function W_(e){return e===`working`||e===`done`||e===`error`}function G_(e){return e===`executing`||e===`returned`||e===`done`||e===`failed`||e===`blocked`}function K_(e){return typeof e==`number`&&Number.isInteger(e)&&e>=0}function q_(e){return typeof e==`number`&&Number.isInteger(e)&&e>0}function J_(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}var Y_=1e3,X_=class{root;options;app=null;snapshot=null;activities=[];indexRevision;indexLoading=!1;indexInFlight=!1;indexError=null;expanded=!1;refreshTimer=null;refreshInFlight=!1;refreshError=null;unchangedRefreshes=0;visibilityListenerAttached=!1;followTail=!0;scrollTop=0;selectedActivityId=null;details=new Map;detailLoading=new Set;detailErrors=new Map;outputs=new Map;outputLoading=new Set;outputErrors=new Map;outputRefreshTimer=null;handleVisibilityChange=()=>{if(document.hidden){this.stopRefresh(),this.stopOutputRefresh();return}this.snapshot&&(this.stopRefresh(),this.scheduleRefresh(0,!0));let e=this.activities.find(e=>e.activityId===this.selectedActivityId);e&&Z_(e)&&this.outputs.get(e.outputId)?.status===`running`&&this.scheduleOutputRefresh(e,0)};constructor(e,t={}){this.root=e,this.options=t}get active(){return this.snapshot!==null}accept(e){let t=e.structuredContent;if(!I_(t))return!1;let n=this.snapshot?.turnId!==t.turnId;return this.snapshot=t,this.refreshError=null,n?(this.unchangedRefreshes=0,this.expanded=P_(e._meta),this.followTail=!0,this.scrollTop=0,this.activities=[],this.indexRevision=void 0,this.indexError=null,this.resetDetails()):this.unchangedRefreshes=t.changed?0:this.unchangedRefreshes+1,this.stopRefresh(),this.scheduleRefresh(),this.expanded&&t.revision>0&&this.indexRevision!==t.revision&&this.loadIndex(!1),!0}attach(e){this.app=e,this.visibilityListenerAttached||=(document.addEventListener(`visibilitychange`,this.handleVisibilityChange),!0),this.scheduleRefresh()}clear(){this.stopRefresh(),this.snapshot=null,this.activities=[],this.indexRevision=void 0,this.indexLoading=!1,this.indexInFlight=!1,this.indexError=null,this.refreshError=null,this.unchangedRefreshes=0,this.expanded=!1,this.followTail=!0,this.scrollTop=0,this.resetDetails()}detach(){this.clear(),this.visibilityListenerAttached&&=(document.removeEventListener(`visibilitychange`,this.handleVisibilityChange),!1),this.app=null}render(){return this.snapshot?this.snapshot.revision===0?(this.root.replaceChildren(),!0):(this.renderPanel(this.snapshot),!0):!1}scheduleRefresh(e,t=!1){if(!this.app||!this.snapshot||this.refreshTimer!==null||document.hidden)return;let n=e??N_(this.snapshot.state,this.unchangedRefreshes,!0);if(!(!t&&n===null)&&n!==null){if(!this.app.getHostCapabilities()?.serverTools){this.refreshError=`Live Activity refresh is unavailable in this host.`,this.render();return}this.refreshTimer=window.setTimeout(()=>{this.refreshTimer=null,this.refreshSnapshot()},n)}}stopRefresh(){this.refreshTimer!==null&&(window.clearTimeout(this.refreshTimer),this.refreshTimer=null)}async refreshSnapshot(){if(!this.app||!this.snapshot||this.refreshInFlight)return;let e=this.snapshot.turnId,t=this.snapshot.revision;this.refreshInFlight=!0;try{let n=await this.app.callServerTool({name:`activity_snapshot`,arguments:{turnId:e,knownRevision:t}});if(n.isError)throw Error(`Activity snapshot refresh failed.`);let r=n.structuredContent;if(!I_(r)||r.turnId!==e)throw Error(`Activity snapshot refresh returned an invalid Host Turn state.`);if(!this.snapshot||this.snapshot.turnId!==e)return;let i=r.changed||this.refreshError!==null;this.snapshot=r,this.unchangedRefreshes=r.changed?0:this.unchangedRefreshes+1,this.refreshError=null,i&&this.render(),r.changed&&this.expanded&&r.revision>0&&this.loadIndex(!1)}catch(e){this.unchangedRefreshes+=1;let t=e instanceof Error?e.message:`Activity snapshot refresh failed.`;this.refreshError!==t&&(this.refreshError=t,this.render())}finally{this.refreshInFlight=!1,this.scheduleRefresh()}}async loadIndex(e){if(!this.app||!this.snapshot||!this.expanded||this.snapshot.revision===0||this.indexInFlight)return;let t=this.snapshot.turnId,n=this.indexRevision;this.indexInFlight=!0,e&&(this.indexLoading=!0,this.indexError=null,this.render());try{let e=await this.app.callServerTool({name:`activity_index`,arguments:{turnId:t,...n===void 0?{}:{knownRevision:n}}});if(e.isError)throw Error(`Activity index request failed.`);let r=e.structuredContent;if(!L_(r)||r.turnId!==t)throw Error(`Activity index returned an invalid Activity index.`);if(!this.snapshot||this.snapshot.turnId!==t)return;this.activities=B_(this.activities,r),this.indexRevision=r.revision,r.revision>=this.snapshot.revision&&(this.snapshot={turnId:r.turnId,revision:r.revision,changed:r.changed,state:r.state}),this.indexError=null}catch(e){if(!this.snapshot||this.snapshot.turnId!==t)return;this.indexError=e instanceof Error?e.message:`Activity index request failed.`}finally{this.indexLoading=!1,this.indexInFlight=!1,this.snapshot?.turnId===t&&this.render(),this.expanded&&this.snapshot?.turnId===t&&this.indexRevision!==void 0&&this.indexRevision!==this.snapshot.revision&&this.loadIndex(!1)}}resetDetails(){this.stopOutputRefresh(),this.selectedActivityId=null,this.details.clear(),this.detailLoading.clear(),this.detailErrors.clear(),this.outputs.clear(),this.outputLoading.clear(),this.outputErrors.clear()}toggleDetail(e){if(e.detailAvailable){if(this.stopOutputRefresh(),this.selectedActivityId===e.activityId){this.selectedActivityId=null,this.render();return}if(this.selectedActivityId=e.activityId,this.render(),Z_(e)){let t=this.outputs.get(e.outputId);t?.status===`running`&&this.scheduleOutputRefresh(e),!t&&!this.outputLoading.has(e.outputId)&&!this.outputErrors.has(e.outputId)&&this.loadOutput(e,!0);return}!this.details.has(e.activityId)&&!this.detailLoading.has(e.activityId)&&!this.detailErrors.has(e.activityId)&&this.loadDetail(e)}}async loadDetail(e){if(!this.app||!this.snapshot||!e.detailAvailable)return;let t=this.snapshot.turnId,n=e.activityId;this.detailLoading.add(n),this.detailErrors.delete(n),this.render();try{let e=await this.app.callServerTool({name:`activity_detail`,arguments:{turnId:t,activityId:n}});if(e.isError)throw Error(`Activity detail request failed.`);let r=e.structuredContent;if(!R_(r)||r.activity.activityId!==n)throw Error(`Activity detail returned an invalid Activity record.`);if(!this.snapshot||this.snapshot.turnId!==t)return;this.details.set(n,r)}catch(e){if(!this.snapshot||this.snapshot.turnId!==t)return;this.detailErrors.set(n,e instanceof Error?e.message:`Activity detail request failed.`)}finally{this.detailLoading.delete(n),this.snapshot?.turnId===t&&this.render()}}stopOutputRefresh(){this.outputRefreshTimer!==null&&(window.clearTimeout(this.outputRefreshTimer),this.outputRefreshTimer=null)}scheduleOutputRefresh(e,t=Y_){!Z_(e)||this.outputRefreshTimer!==null||document.hidden||this.selectedActivityId===e.activityId&&(this.outputRefreshTimer=window.setTimeout(()=>{this.outputRefreshTimer=null,this.selectedActivityId===e.activityId&&this.loadOutput(e,!1)},t))}async loadOutput(e,t){if(!this.app||!this.snapshot||!Z_(e))return;let n=this.snapshot.turnId,r=e.outputId;t&&this.outputLoading.add(r),this.outputErrors.delete(r),t&&this.render();let i=!1;try{let e=this.outputs.get(r),t=await this.app.callServerTool({name:`activity_output`,arguments:{turnId:n,outputId:r,...e?{cursor:e.cursor}:{}}});if(t.isError)throw Error(`Bash output request failed.`);let a=t.structuredContent;if(!z_(a)||a.outputId!==r)throw Error(`Bash output returned an invalid durable output record.`);if(e&&a.cursor<e.cursor)throw Error(`Bash output cursor moved backwards.`);if(!this.snapshot||this.snapshot.turnId!==n)return;this.outputs.set(r,e?{...a,output:e.output+a.output}:a),i=a.status===`running`}catch(e){if(!this.snapshot||this.snapshot.turnId!==n)return;this.outputErrors.set(r,e instanceof Error?e.message:`Bash output request failed.`)}finally{this.outputLoading.delete(r),this.snapshot?.turnId===n&&this.render(),i&&this.selectedActivityId===e.activityId&&this.scheduleOutputRefresh(e)}}renderActivityEntry(e,t){let n=this.selectedActivityId===e.activityId,r=$(`div`,{className:`activity-entry${n?` expanded`:``}`});return r.append($_(e,t,n,e.detailAvailable?()=>this.toggleDetail(e):void 0)),n&&r.append(this.renderActivityDetail(e)),r}renderActivityDetail(e){if(Z_(e))return this.renderBashOutput(e);let t=$(`div`,{className:`activity-detail`}),n=e.activityId;if(this.detailLoading.has(n))return t.append($(`div`,{className:`activity-detail-status`,text:`Loading details...`})),t;let r=this.detailErrors.get(n);if(r)return t.append($(`div`,{className:`activity-detail-status error`,text:r})),t;let i=this.details.get(n);return i?(i.error&&ev(t,`Error`,i.error,!0),i.request!==void 0&&ev(t,`Request`,i.request),i.result!==void 0&&ev(t,`Result`,i.result),t.childElementCount===0&&t.append($(`div`,{className:`activity-detail-status`,text:`No additional details.`})),t):(t.append($(`div`,{className:`activity-detail-status`,text:`Details unavailable.`})),t)}renderBashOutput(e){let t=$(`div`,{className:`activity-detail activity-terminal`}),n=e.outputId;if(this.outputLoading.has(n))return t.append($(`div`,{className:`activity-detail-status`,text:`Loading terminal output...`})),t;let r=this.outputErrors.get(n);if(r)return t.append($(`div`,{className:`activity-detail-status error`,text:r})),t;let i=this.outputs.get(n);return i?(t.append($(`pre`,{className:`activity-terminal-command`,text:i.command}),$(`pre`,{className:`activity-terminal-output pretty-scrollbar`,text:i.output||`(no output)`}),$(`div`,{className:`activity-terminal-meta status-${i.status}`,text:Q_(i)})),t):(t.append($(`div`,{className:`activity-detail-status`,text:`Terminal output unavailable.`})),t)}renderPanel(e){let t=this.root.querySelector(`.activity-viewport`);t&&(this.scrollTop=t.scrollTop);let n=$(`section`,{className:`activity-panel state-${e.state}`}),r=$(`button`,{className:`activity-panel-header`,type:`button`,ariaExpanded:String(this.expanded)});r.addEventListener(`click`,()=>{this.expanded=!this.expanded,this.expanded||this.stopOutputRefresh(),this.render(),this.expanded&&e.revision>0&&this.indexRevision!==e.revision&&this.loadIndex(!0)});let i=$(`span`,{className:`activity-panel-status state-${e.state}`,ariaHidden:`true`}),a=$(`span`,{className:`activity-panel-title-group`});a.append($(`span`,{className:`activity-panel-title`,text:`Activity`}),$(`span`,{className:`activity-panel-subtitle`,text:`Host Turn · revision ${e.revision}`}));let o=this.activities.length,s=$(`span`,{className:`activity-panel-count state-${e.state}`,text:this.expanded&&this.indexRevision!==void 0?`${o} ${o===1?`activity`:`activities`}`:sv(e.state)});if(r.append(i,a,s,uv(this.expanded)),n.append(r),this.expanded){let e=$(`div`,{className:`activity-panel-body`}),t=$(`div`,{className:`activity-viewport pretty-scrollbar`,ariaLabel:`ForgeRelay Activity Panel`});t.addEventListener(`scroll`,()=>{this.scrollTop=t.scrollTop,this.followTail=H_(t)});let r=V_(this.activities);if(this.indexLoading&&this.indexRevision===void 0)t.append($(`div`,{className:`activity-empty`,text:`Loading Activity index...`}));else if(this.indexError)t.append($(`div`,{className:`activity-empty error`,text:this.indexError}));else if(r.length===0)t.append($(`div`,{className:`activity-empty`,text:`Waiting for ForgeRelay activity...`}));else{let e=$(`div`,{className:`activity-list`});for(let t of r){let n=$(`div`,{className:`activity-group${t.children.length>0?` grouped`:``}`});if(n.append(this.renderActivityEntry(t.activity,!1)),t.children.length>0){let e=$(`div`,{className:`activity-children`});for(let n of t.children)e.append(this.renderActivityEntry(n,!0));n.append(e)}e.append(n)}t.append(e)}this.refreshError&&e.append($(`div`,{className:`activity-refresh-error`,text:this.refreshError})),e.prepend(t),n.append(e),this.replacePanel(n),this.followTail?(t.scrollTop=t.scrollHeight,this.scrollTop=t.scrollTop):t.scrollTop=Math.min(this.scrollTop,Math.max(0,t.scrollHeight-t.clientHeight));return}this.replacePanel(n)}replacePanel(e){if(this.options.embedded){this.root.replaceChildren(e);return}let t=$(`main`,{className:`shell`});t.append(e),this.root.replaceChildren(t)}};function Z_(e){return(e.kind===`shell`||e.kind===`shell-result`)&&typeof e.outputId==`string`&&e.outputId.length>0}function Q_(e){let t=[`Process ${e.processId}`,e.status];return e.timedOut?t.push(`timed out`):e.signal?t.push(`signal ${e.signal}`):e.exitCode!==void 0&&t.push(`exit ${e.exitCode}`),t.join(` · `)}function $_(e,t,n,r){let i=r?$(`button`,{className:[`activity-row`,`interactive`,t?`child`:`parent`,`kind-${av(e)}`,`phase-${ov(e)}`,e.kind===`shell-result`?`shell-result`:void 0].filter(Boolean).join(` `),type:`button`,ariaExpanded:String(n)}):$(`div`,{className:[`activity-row`,t?`child`:`parent`,`kind-${av(e)}`,`phase-${ov(e)}`,e.kind===`shell-result`?`shell-result`:void 0].filter(Boolean).join(` `)});r&&i.addEventListener(`click`,r),i.dataset.activityId=e.activityId;let a=$(`span`,{className:`activity-icon`,ariaHidden:`true`});a.append(A_(iv(e),`activity-icon-svg`));let o=$(`span`,{className:`activity-main`}),s=$(`span`,{className:`activity-title-line`});s.append($(`span`,{className:`activity-title`,text:e.title})),e.member&&s.append($(`span`,{className:`activity-member`,text:e.member,title:`Composite member: ${e.member}`})),s.append($(`span`,{className:`activity-target`,text:e.target,title:e.target})),o.append(s),e.children&&o.append(nv(e.children));let c=$(`span`,{className:`activity-meta`}),l=$(`span`,{className:`activity-phase`,text:cv(e)}),u=lv(e.durationMs);c.append(l),u&&c.append($(`span`,{className:`activity-duration`,text:u}));let d=e.detailAvailable?uv(n):$(`span`,{className:`activity-detail-spacer`,ariaHidden:`true`});return d.classList.add(`activity-detail-chevron`),i.append(a,o,c,d),i}function ev(e,t,n,r=!1){let i=$(`section`,{className:`activity-detail-section${r?` error`:``}`});i.append($(`div`,{className:`activity-detail-label`,text:t}),$(`pre`,{className:`activity-detail-value pretty-scrollbar`,text:tv(n)})),e.append(i)}function tv(e){if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}function nv(e){let t=$(`span`,{className:`activity-progress-wrap`}),n=$(`span`,{className:`activity-progress-counts`,text:rv(e)}),r=$(`span`,{className:`activity-progress-track`,ariaHidden:`true`}),i=$(`span`,{className:`activity-progress-fill`}),a=e.done+e.error;return i.style.width=`${e.total>0?Math.min(100,a/e.total*100):0}%`,r.append(i),t.append(n,r),t}function rv(e){let t=[`${e.done+e.error}/${e.total}`];return e.working>0&&t.push(`${e.working} running`),e.error>0&&t.push(`${e.error} failed`),t.join(` · `)}function iv(e){switch(e.kind){case`read`:return D_.readFile;case`write`:return D_.writeFile;case`edit`:case`rename`:return D_.editFile;case`delete`:return D_.deleteFile;case`shell`:return D_.terminalSquare;case`shell-result`:return D_.terminal;case`capability`:case`batch`:return D_.skills;default:return D_.files}}function av(e){switch(e.kind){case`read`:case`write`:case`edit`:case`rename`:case`delete`:case`shell`:case`shell-result`:case`capability`:case`batch`:return e.kind;default:return`tool`}}function ov(e){return e.bashPhase?e.bashPhase:e.status===`working`?`executing`:e.status===`error`?`error`:`done`}function sv(e){switch(e){case`working`:return`Working`;case`done`:return`Done`;case`error`:return`Error`}}function cv(e){if(e.state===`blocked`)return`Blocked`;switch(ov(e)){case`executing`:return`Running`;case`returned`:return`Returned`;case`done`:return`Done`;case`error`:return`Error`}}function lv(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(+(e<1e4))}s`}function uv(e){let t=$(`span`,{className:`chevron ${e?`expanded`:``}`,ariaHidden:`true`});return t.append(A_(D_.chevronDown)),t}function $(e,t={}){let n=document.createElement(e);return t.className&&(n.className=t.className),t.text!==void 0&&(n.textContent=t.text),t.type!==void 0&&`type`in n&&n.setAttribute(`type`,t.type),t.title!==void 0&&(n.title=t.title),t.ariaHidden!==void 0&&n.setAttribute(`aria-hidden`,t.ariaHidden),t.ariaLabel!==void 0&&n.setAttribute(`aria-label`,t.ariaLabel),t.ariaExpanded!==void 0&&n.setAttribute(`aria-expanded`,t.ariaExpanded),n}export{A_ as a,u_ as c,Ng as d,k_ as i,f_ as l,F_ as n,D_ as o,M_ as r,d_ as s,X_ as t,l_ as u};
|
|
112
|
+
container holding the app. Specify either width or maxWidth, and either height or maxHeight.`),locale:M().optional().describe(`User's language and region preference in BCP 47 format.`),timeZone:M().optional().describe(`User's timezone in IANA format.`),userAgent:M().optional().describe(`Host application identifier.`),platform:B([U(`web`),U(`desktop`),U(`mobile`)]).optional().describe(`Platform type for responsive design decisions.`),deviceCapabilities:R({touch:F().optional().describe(`Whether the device supports touch input.`),hover:F().optional().describe(`Whether the device supports hover interactions.`)}).optional().describe(`Device input capabilities.`),safeAreaInsets:R({top:P().describe(`Top safe area inset in pixels.`),right:P().describe(`Right safe area inset in pixels.`),bottom:P().describe(`Bottom safe area inset in pixels.`),left:P().describe(`Left safe area inset in pixels.`)}).optional().describe(`Mobile safe area boundaries in pixels.`)}).passthrough(),i_=R({method:U(`ui/notifications/host-context-changed`),params:r_.describe(`Partial context update containing only changed fields.`)});R({method:U(`ui/update-model-context`),params:R({content:L(kh).optional().describe(`Context content blocks (text, image, etc.).`),structuredContent:V(M(),I().describe(`Structured content for machine-readable context data.`)).optional().describe(`Structured content for machine-readable context data.`)})}),R({method:U(`ui/initialize`),params:R({appInfo:ym.describe(`App identification (name and version).`),appCapabilities:$g.describe(`Features and capabilities this app provides.`),protocolVersion:M().describe(`Protocol version this app supports.`)})});var a_=R({protocolVersion:M().describe(`Negotiated protocol version string (e.g., "2025-11-21").`),hostInfo:ym.describe(`Host application identification and version.`),hostCapabilities:Qg.describe(`Features and capabilities provided by the host.`),hostContext:r_.describe(`Rich context about the host environment.`)}).passthrough(),o_={target:`draft-2020-12`};async function s_(e,t){let n=e[`~standard`];if(n.jsonSchema)return n.jsonSchema[t](o_);if(n.vendor===`zod`){let{z:n}=await Ng(async()=>{let{z:e}=await Promise.resolve().then(()=>qp);return{z:e}},void 0,import.meta.url);return n.toJSONSchema(e,{io:t})}throw Error(`Schema (vendor: ${n.vendor}) does not implement Standard JSON Schema (~standard.jsonSchema). Use a library that does (zod v4, ArkType, Valibot) or wrap your schema accordingly.`)}async function c_(e,t,n=``){let r=await e[`~standard`].validate(t);if(r.issues){let e=r.issues.map(e=>{let t=e.path?.map(e=>typeof e==`object`?e.key:e).join(`.`);return t?`${t}: ${e.message}`:e.message}).join(`; `);throw Error(n+e)}return r.value}function l_(e){let t=document.documentElement;t.setAttribute(`data-theme`,e),t.style.colorScheme=e}function u_(e,t=document.documentElement){for(let[n,r]of Object.entries(e))r!==void 0&&t.style.setProperty(n,r)}function d_(e){if(document.getElementById(`__mcp-host-fonts`))return;let t=document.createElement(`style`);t.id=`__mcp-host-fonts`,t.textContent=e,document.head.appendChild(t)}var f_=class e extends Pg{_appInfo;_capabilities;options;_hostCapabilities;_hostInfo;_hostContext;_registeredTools={};_initializedSent=!1;_assertInitialized(e){if(this._initializedSent)return;let t=`[ext-apps] App.${e}() called before connect() completed the ui/initialize handshake. Await app.connect() before calling this method, or move data loading to an ontoolresult handler.`;if(this.options?.strict)throw Error(t);console.warn(`${t}. This will throw in a future release.`)}eventSchemas={toolinput:Gg,toolinputpartial:Kg,toolresult:n_,toolcancelled:qg,hostcontextchanged:i_};static ONE_SHOT_EVENTS=new Set([`toolinput`,`toolinputpartial`,`toolresult`,`toolcancelled`]);_everHadListener=new Set;_assertHandlerTiming(t){if(!e.ONE_SHOT_EVENTS.has(t)||this._everHadListener.has(t)||(this._everHadListener.add(t),!this._initializedSent))return;let n=`[ext-apps] "${String(t)}" handler registered after connect() completed the ui/initialize handshake. The host may have already sent this notification. Register handlers before calling app.connect().`;if(this.options?.strict)throw Error(n);console.warn(n)}setEventHandler(e,t){t&&this._assertHandlerTiming(e),super.setEventHandler(e,t)}addEventListener(e,t){this._assertHandlerTiming(e),super.addEventListener(e,t)}onEventDispatch(e,t){e===`hostcontextchanged`&&(this._hostContext={...this._hostContext,...t})}constructor(e,t={},n={autoResize:!0}){super(n),this._appInfo=e,this._capabilities=t,this.options=n,n.allowUnsafeEval||l({jitless:!0}),this.setRequestHandler(km,e=>(console.log(`Received ping:`,e.params),{})),this.setEventHandler(`hostcontextchanged`,void 0)}registerCapabilities(e){if(this.transport)throw Error(`Cannot register capabilities after transport is established`);this._capabilities=kg(this._capabilities,e)}registerTool(e,t,n){if(this._registeredTools[e])throw Error(`Tool ${e} is already registered`);let r=this,i=()=>{r._initializedSent&&r._capabilities.tools?.listChanged&&r.sendToolListChanged()},a=t.inputSchema!==void 0,o={title:t.title,description:t.description,inputSchema:t.inputSchema,outputSchema:t.outputSchema,annotations:t.annotations,_meta:t._meta,enabled:!0,enable(){this.enabled=!0,i()},disable(){this.enabled=!1,i()},update(e){Object.assign(this,e),i()},remove(){r._registeredTools[e]===o&&(delete r._registeredTools[e],i())},handler:async(t,r)=>{if(!o.enabled)throw Error(`Tool ${e} is disabled`);let i;if(a){let a=o.inputSchema;i=await n(a?await c_(a,t??{},`Invalid input for tool ${e}: `):t??{},r)}else i=await n(r);return o.outputSchema&&!i.isError&&(i.structuredContent=await c_(o.outputSchema,i.structuredContent,`Invalid output for tool ${e}: `)),i}};return this._registeredTools[e]=o,!this._capabilities.tools&&!this.transport&&this.registerCapabilities({tools:{listChanged:!0}}),this.ensureToolHandlersInitialized(),i(),o}_toolHandlersInitialized=!1;ensureToolHandlersInitialized(){this._toolHandlersInitialized||(this._toolHandlersInitialized=!0,this.oncalltool=async(e,t)=>{let n=this._registeredTools[e.name];if(!n)throw Error(`Tool ${e.name} not found`);return n.handler(e.arguments,t)},this.onlisttools=async(e,t)=>({tools:await Promise.all(Object.entries(this._registeredTools).filter(([e,t])=>t.enabled).map(async([e,t])=>{let n={name:e,title:t.title,description:t.description,inputSchema:t.inputSchema?await s_(t.inputSchema,`input`):{type:`object`,properties:{}}};return t.outputSchema&&(n.outputSchema=await s_(t.outputSchema,`output`)),t.annotations&&(n.annotations=t.annotations),t._meta&&(n._meta=t._meta),n}))}))}async sendToolListChanged(e={}){this._assertInitialized(`sendToolListChanged`),await this.notification({method:`notifications/tools/list_changed`,params:e})}getHostCapabilities(){return this._hostCapabilities}getHostVersion(){return this._hostInfo}getHostContext(){return this._hostContext}get ontoolinput(){return this.getEventHandler(`toolinput`)}set ontoolinput(e){this.setEventHandler(`toolinput`,e)}get ontoolinputpartial(){return this.getEventHandler(`toolinputpartial`)}set ontoolinputpartial(e){this.setEventHandler(`toolinputpartial`,e)}get ontoolresult(){return this.getEventHandler(`toolresult`)}set ontoolresult(e){this.setEventHandler(`toolresult`,e)}get ontoolcancelled(){return this.getEventHandler(`toolcancelled`)}set ontoolcancelled(e){this.setEventHandler(`toolcancelled`,e)}get onhostcontextchanged(){return this.getEventHandler(`hostcontextchanged`)}set onhostcontextchanged(e){this.setEventHandler(`hostcontextchanged`,e)}_onteardown;get onteardown(){return this._onteardown}set onteardown(e){this.warnIfRequestHandlerReplaced(`onteardown`,this._onteardown,e),this._onteardown=e,this.replaceRequestHandler(Xg,(e,t)=>{if(!this._onteardown)throw Error(`No onteardown handler set`);return this._onteardown(e.params,t)})}_oncalltool;get oncalltool(){return this._oncalltool}set oncalltool(e){this.warnIfRequestHandlerReplaced(`oncalltool`,this._oncalltool,e),this._oncalltool=e,this.replaceRequestHandler(Bh,(e,t)=>{if(!this._oncalltool)throw Error(`No oncalltool handler set`);return this._oncalltool(e.params,t)})}_onlisttools;get onlisttools(){return this._onlisttools}set onlisttools(e){this.warnIfRequestHandlerReplaced(`onlisttools`,this._onlisttools,e),this._onlisttools=e,this.replaceRequestHandler(Ih,(e,t)=>{if(!this._onlisttools)throw Error(`No onlisttools handler set`);return this._onlisttools(e.params,t)})}assertCapabilityForMethod(e){switch(e){case`sampling/createMessage`:if(!this._hostCapabilities?.sampling)throw Error(`Host does not support sampling (required for ${e})`);break}}assertRequestHandlerCapability(e){switch(e){case`tools/call`:case`tools/list`:if(!this._capabilities.tools)throw Error(`Client does not support tool capability (required for ${e})`);return;case`ping`:case`ui/resource-teardown`:return;default:throw Error(`No handler for method ${e} registered`)}}assertNotificationCapability(e){}assertTaskCapability(e){throw Error(`Tasks are not supported in MCP Apps`)}assertTaskHandlerCapability(e){throw Error(`Task handlers are not supported in MCP Apps`)}async callServerTool(e,t){if(this._assertInitialized(`callServerTool`),typeof e==`string`)throw Error(`callServerTool() expects an object as its first argument, but received a string ("${e}"). Did you mean: callServerTool({ name: "${e}", arguments: { ... } })?`);return await this.request({method:`tools/call`,params:e},Rh,{onprogress:()=>{},resetTimeoutOnProgress:!0,...t})}async readServerResource(e,t){return this._assertInitialized(`readServerResource`),await this.request({method:`resources/read`,params:e},lh,t)}async listServerResources(e,t){return this._assertInitialized(`listServerResources`),await this.request({method:`resources/list`,params:e},rh,t)}async createSamplingMessage(e,t){this._assertInitialized(`createSamplingMessage`);let n=e.tools?ng:tg;return await this.request({method:`sampling/createMessage`,params:e},n,t)}sendMessage(e,t){return this._assertInitialized(`sendMessage`),this.request({method:`ui/message`,params:e},Hg,t)}sendLog(e){return this.notification({method:`notifications/message`,params:e})}updateModelContext(e,t){return this._assertInitialized(`updateModelContext`),this.request({method:`ui/update-model-context`,params:e},mm,t)}openLink(e,t){return this._assertInitialized(`openLink`),this.request({method:`ui/open-link`,params:e},Bg,t)}sendOpenLink=this.openLink;downloadFile(e,t){return this._assertInitialized(`downloadFile`),this.request({method:`ui/download-file`,params:e},Vg,t)}requestTeardown(e={}){return this.notification({method:`ui/notifications/request-teardown`,params:e})}requestDisplayMode(e,t){return this._assertInitialized(`requestDisplayMode`),this.request({method:`ui/request-display-mode`,params:e},e_,t)}sendSizeChanged(e){return this.notification({method:`ui/notifications/size-changed`,params:e})}setupSizeChangedNotifications(){let e=!1,t=0,n=0,r=()=>{e||(e=!0,requestAnimationFrame(()=>{e=!1;let r=document.documentElement,i=r.style.height;r.style.height=`max-content`;let a=Math.ceil(r.getBoundingClientRect().height);r.style.height=i;let o=Math.ceil(window.innerWidth);(o!==t||a!==n)&&(t=o,n=a,this.sendSizeChanged({width:o,height:a}))}))};r();let i=new ResizeObserver(r);return i.observe(document.documentElement),i.observe(document.body),()=>i.disconnect()}async connect(e=new Ig(window.parent,window.parent),t){if(this.transport)throw Error(`App is already connected. Call close() before connecting again.`);this._initializedSent=!1,await super.connect(e);try{let e=await this.request({method:`ui/initialize`,params:{appCapabilities:this._capabilities,appInfo:this._appInfo,protocolVersion:Fg}},a_,t);if(e===void 0)throw Error(`Server sent invalid initialize result: ${e}`);this._hostCapabilities=e.hostCapabilities,this._hostInfo=e.hostInfo,this._hostContext=e.hostContext,await this.notification({method:`ui/notifications/initialized`}),this._initializedSent=!0,this.options?.autoResize&&this.setupSizeChangedNotifications()}catch(e){throw this.close(),e}}};function p_(e){return e===`open_workspace`||e===`close_workspace`||e===`capability`||e===`apply_patch`||e===`exec_command`||e===`write_stdin`||e===`read`||e===`write`||e===`edit`||e===`rename`||e===`delete`||e===`grep`||e===`glob`||e===`ls`||e===`bash`}function m_(e){return e===`read`}function h_(e){return e===`write`}function g_(e){return e===`edit`}function __(e){return e===`apply_patch`}function v_(e){return e===`bash`||e===`exec_command`||e===`write_stdin`}function y_(e){return e.tool===`capability`&&e.capabilityName===`review.changes`}function b_(e){return!!(e&&typeof e==`object`)}function x_(e){return e?.content?.map(e=>e.type===`text`?e.text??``:`[${e.mimeType??`image`} image payload]`).filter(Boolean).join(`
|
|
113
|
+
|
|
114
|
+
`)??``}function S_(e,t){let n=e?.[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function C_(e){return e.tool===`open_workspace`?Number(e.summary?.agentsFiles??0)>0||Number(e.summary?.skills??0)>0||Number(e.summary?.agentProviders??0)>0||Number(e.summary?.agents??0)>0||!!e.agentsFiles?.length||!!e.availableAgentsFiles?.length||!!e.skills?.length||!!e.agentProviders?.length||!!e.agents?.length||!!e.worktree||!!e.instruction:y_(e)?!!(e.files?.length||e.payload?.patch):__(e.tool)?!!e.payload?.patch:!!e.payload}function w_(e){return e.tool===`open_workspace`||y_(e)?C_(e):__(e.tool)?e.files?.length===1&&C_(e):!1}var T_={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},E_=([e,t,n])=>{let r=document.createElementNS(`http://www.w3.org/2000/svg`,e);return Object.keys(t).forEach(e=>{r.setAttribute(e,String(t[e]))}),n?.length&&n.forEach(e=>{let t=E_(e);r.appendChild(t)}),r},D_=(e,t={})=>E_([`svg`,{...T_,...t},e]),O_=[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`}]],k_=[[`path`,{d:`M12 8V4H8`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`}],[`path`,{d:`M2 14h2`}],[`path`,{d:`M20 14h2`}],[`path`,{d:`M15 13v2`}],[`path`,{d:`M9 13v2`}]],A_=[[`path`,{d:`m6 9 6 6 6-6`}]],j_=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]],M_=[[`path`,{d:`M12 20v2`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M17 20v2`}],[`path`,{d:`M17 2v2`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M2 17h2`}],[`path`,{d:`M2 7h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`M20 17h2`}],[`path`,{d:`M20 7h2`}],[`path`,{d:`M7 20v2`}],[`path`,{d:`M7 2v2`}],[`rect`,{x:`4`,y:`4`,width:`16`,height:`16`,rx:`2`}],[`rect`,{x:`8`,y:`8`,width:`8`,height:`8`,rx:`1`}]],N_=[[`path`,{d:`M10.5 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`m14 20 2 2 4-4`}]],P_=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M9 10h6`}],[`path`,{d:`M12 13V7`}],[`path`,{d:`M9 17h6`}]],F_=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M9 15h6`}]],I_=[[`path`,{d:`M14.364 13.634a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506l4.013-4.009a1 1 0 0 0-3.004-3.004z`}],[`path`,{d:`M14.487 7.858A1 1 0 0 1 14 7V2`}],[`path`,{d:`M20 19.645V20a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l2.516 2.516`}],[`path`,{d:`M8 18h1`}]],L_=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M9 15h6`}],[`path`,{d:`M12 18v-6`}]],R_=[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]],z_={agents:k_,base:[[`circle`,{cx:`12`,cy:`12`,r:`3`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`}]],chevronDown:A_,deleteFile:F_,diff:P_,editFile:I_,files:[[`path`,{d:`M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8`}],[`path`,{d:`M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z`}],[`path`,{d:`M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1`}]],folderOpen:[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2`}]],folderTree:[[`path`,{d:`M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}],[`path`,{d:`M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z`}],[`path`,{d:`M3 5a2 2 0 0 0 2 2h3`}],[`path`,{d:`M3 3v13a2 2 0 0 0 2 2h3`}]],gitBranch:[[`path`,{d:`M15 6a9 9 0 0 0-9 9V3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`}],[`circle`,{cx:`6`,cy:`18`,r:`3`}]],instructions:R_,instructionAvailable:R_,instructionLoaded:N_,loading:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]],providers:M_,readFile:R_,search:[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]],skills:O_,sourceCheckout:[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`}],[`path`,{d:`M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5`}],[`circle`,{cx:`13`,cy:`12`,r:`2`}],[`circle`,{cx:`20`,cy:`19`,r:`2`}]],terminal:[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]],terminalSquare:[[`path`,{d:`m7 11 2-2-2-2`}],[`path`,{d:`M11 13h4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}]],warning:j_,writeFile:L_},B_={claude:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='257'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20257'%3e%3cpath%20fill='%23D97757'%20d='m50.228%20170.321%2050.357-28.257.843-2.463-.843-1.361h-2.462l-8.426-.518-28.775-.778-24.952-1.037-24.175-1.296-6.092-1.297L0%20125.796l.583-3.759%205.12-3.434%207.324.648%2016.202%201.101%2024.304%201.685%2017.629%201.037%2026.118%202.722h4.148l.583-1.685-1.426-1.037-1.101-1.037-25.147-17.045-27.22-18.017-14.258-10.37-7.713-5.25-3.888-4.925-1.685-10.758%207-7.713%209.397.649%202.398.648%209.527%207.323%2020.35%2015.75L94.817%2091.9l3.889%203.24%201.555-1.102.195-.777-1.75-2.917-14.453-26.118-15.425-26.572-6.87-11.018-1.814-6.61c-.648-2.723-1.102-4.991-1.102-7.778l7.972-10.823L71.42%200%2082.05%201.426l4.472%203.888%206.61%2015.101%2010.694%2023.786%2016.591%2032.34%204.861%209.592%202.592%208.879.973%202.722h1.685v-1.556l1.36-18.211%202.528-22.36%202.463-28.776.843-8.1%204.018-9.722%207.971-5.25%206.222%202.981%205.12%207.324-.713%204.73-3.046%2019.768-5.962%2030.98-3.889%2020.739h2.268l2.593-2.593%2010.499-13.934%2017.628-22.036%207.778-8.749%209.073-9.657%205.833-4.601h11.018l8.1%2012.055-3.628%2012.443-11.342%2014.388-9.398%2012.184-13.48%2018.147-8.426%2014.518.778%201.166%202.01-.194%2030.46-6.481%2016.462-2.982%2019.637-3.37%208.88%204.148.971%204.213-3.5%208.62-20.998%205.184-24.628%204.926-36.682%208.685-.454.324.519.648%2016.526%201.555%207.065.389h17.304l32.21%202.398%208.426%205.574%205.055%206.805-.843%205.184-12.962%206.611-17.498-4.148-40.83-9.721-14-3.5h-1.944v1.167l11.666%2011.406%2021.387%2019.314%2026.767%2024.887%201.36%206.157-3.434%204.86-3.63-.518-23.526-17.693-9.073-7.972-20.545-17.304h-1.36v1.814l4.73%206.935%2025.017%2037.59%201.296%2011.536-1.814%203.76-6.481%202.268-7.13-1.297-14.647-20.544-15.1-23.138-12.185-20.739-1.49.843-7.194%2077.448-3.37%203.953-7.778%202.981-6.48-4.925-3.436-7.972%203.435-15.749%204.148-20.544%203.37-16.333%203.046-20.285%201.815-6.74-.13-.454-1.49.194-15.295%2020.999-23.267%2031.433-18.406%2019.702-4.407%201.75-7.648-3.954.713-7.064%204.277-6.286%2025.47-32.405%2015.36-20.092%209.917-11.6-.065-1.686h-.583L44.07%20198.125l-12.055%201.555-5.185-4.86.648-7.972%202.463-2.593%2020.35-13.999-.064.065Z'/%3e%3c/svg%3e`,``+import.meta.url).href,codex:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='256'%20height='260'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20260'%3e%3cpath%20fill='%23fff'%20d='M239.184%20106.203a64.716%2064.716%200%200%200-5.576-53.103C219.452%2028.459%20191%2015.784%20163.213%2021.74A65.586%2065.586%200%200%200%2052.096%2045.22a64.716%2064.716%200%200%200-43.23%2031.36c-14.31%2024.602-11.061%2055.634%208.033%2076.74a64.665%2064.665%200%200%200%205.525%2053.102c14.174%2024.65%2042.644%2037.324%2070.446%2031.36a64.72%2064.72%200%200%200%2048.754%2021.744c28.481.025%2053.714-18.361%2062.414-45.481a64.767%2064.767%200%200%200%2043.229-31.36c14.137-24.558%2010.875-55.423-8.083-76.483Zm-97.56%20136.338a48.397%2048.397%200%200%201-31.105-11.255l1.535-.87%2051.67-29.825a8.595%208.595%200%200%200%204.247-7.367v-72.85l21.845%2012.636c.218.111.37.32.409.563v60.367c-.056%2026.818-21.783%2048.545-48.601%2048.601Zm-104.466-44.61a48.345%2048.345%200%200%201-5.781-32.589l1.534.921%2051.722%2029.826a8.339%208.339%200%200%200%208.441%200l63.181-36.425v25.221a.87.87%200%200%201-.358.665l-52.335%2030.184c-23.257%2013.398-52.97%205.431-66.404-17.803ZM23.549%2085.38a48.499%2048.499%200%200%201%2025.58-21.333v61.39a8.288%208.288%200%200%200%204.195%207.316l62.874%2036.272-21.845%2012.636a.819.819%200%200%201-.767%200L41.353%20151.53c-23.211-13.454-31.171-43.144-17.804-66.405v.256Zm179.466%2041.695-63.08-36.63L161.73%2077.86a.819.819%200%200%201%20.768%200l52.233%2030.184a48.6%2048.6%200%200%201-7.316%2087.635v-61.391a8.544%208.544%200%200%200-4.4-7.213Zm21.742-32.69-1.535-.922-51.619-30.081a8.39%208.39%200%200%200-8.492%200L99.98%2099.808V74.587a.716.716%200%200%201%20.307-.665l52.233-30.133a48.652%2048.652%200%200%201%2072.236%2050.391v.205ZM88.061%20139.097l-21.845-12.585a.87.87%200%200%201-.41-.614V65.685a48.652%2048.652%200%200%201%2079.757-37.346l-1.535.87-51.67%2029.825a8.595%208.595%200%200%200-4.246%207.367l-.051%2072.697Zm11.868-25.58%2028.138-16.217%2028.188%2016.218v32.434l-28.086%2016.218-28.188-16.218-.052-32.434Z'/%3e%3c/svg%3e`,``+import.meta.url).href,copilot:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20preserveAspectRatio='xMidYMid'%20viewBox='0%200%20256%20208'%3e%3cpath%20fill='%23fff'%20d='M205.3%2031.4c14%2014.8%2020%2035.2%2022.5%2063.6%206.6%200%2012.8%201.5%2017%207.2l7.8%2010.6c2.2%203%203.4%206.6%203.4%2010.4v28.7a12%2012%200%200%201-4.8%209.5C215.9%20187.2%20172.3%20208%20128%20208c-49%200-98.2-28.3-123.2-46.6a12%2012%200%200%201-4.8-9.5v-28.7c0-3.8%201.2-7.4%203.4-10.5l7.8-10.5c4.2-5.7%2010.4-7.2%2017-7.2%202.5-28.4%208.4-48.8%2022.5-63.6C77.3%203.2%20112.6%200%20127.6%200h.4c14.7%200%2050.4%202.9%2077.3%2031.4ZM128%2078.7c-3%200-6.5.2-10.3.6a27.1%2027.1%200%200%201-6%2012.1%2045%2045%200%200%201-32%2013c-6.8%200-13.9-1.5-19.7-5.2-5.5%201.9-10.8%204.5-11.2%2011-.5%2012.2-.6%2024.5-.6%2036.8%200%206.1%200%2012.3-.2%2018.5%200%203.6%202.2%206.9%205.5%208.4C79.9%20185.9%20105%20192%20128%20192s48-6%2074.5-18.1a9.4%209.4%200%200%200%205.5-8.4c.3-18.4%200-37-.8-55.3-.4-6.6-5.7-9.1-11.2-11-5.8%203.7-13%205.1-19.7%205.1a45%2045%200%200%201-32-12.9%2027.1%2027.1%200%200%201-6-12.1c-3.4-.4-6.9-.5-10.3-.6Zm-27%2044c5.8%200%2010.5%204.6%2010.5%2010.4v19.2a10.4%2010.4%200%200%201-20.8%200V133c0-5.8%204.6-10.4%2010.4-10.4Zm53.4%200c5.8%200%2010.4%204.6%2010.4%2010.4v19.2a10.4%2010.4%200%200%201-20.8%200V133c0-5.8%204.7-10.4%2010.4-10.4Zm-73-94.4c-11.2%201.1-20.6%204.8-25.4%2010-10.4%2011.3-8.2%2040.1-2.2%2046.2A31.2%2031.2%200%200%200%2075%2091.7c6.8%200%2019.6-1.5%2030.1-12.2%204.7-4.5%207.5-15.7%207.2-27-.3-9.1-2.9-16.7-6.7-19.9-4.2-3.6-13.6-5.2-24.2-4.3Zm69%204.3c-3.8%203.2-6.4%2010.8-6.7%2019.9-.3%2011.3%202.5%2022.5%207.2%2027a41.7%2041.7%200%200%200%2030%2012.2c8.9%200%2017-2.9%2021.3-7.2%206-6.1%208.2-34.9-2.2-46.3-4.8-5-14.2-8.8-25.4-9.9-10.6-1-20%20.7-24.2%204.3ZM128%2056c-2.6%200-5.6.2-9%20.5.4%201.7.5%203.7.7%205.7%200%201.5%200%203-.2%204.5%203.2-.3%206-.3%208.5-.3%202.6%200%205.3%200%208.5.3-.2-1.6-.2-3-.2-4.5.2-2%20.3-4%20.7-5.7-3.4-.3-6.4-.5-9-.5Z'/%3e%3c/svg%3e`,``+import.meta.url).href,cursor:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20466.73%20532.09'%3e%3cpath%20fill='%23edecec'%20d='M457.43%20125.94%20244.42%202.96c-6.84-3.95-15.28-3.95-22.12%200L9.3%20125.94c-5.75%203.32-9.3%209.46-9.3%2016.11v247.99c0%206.65%203.55%2012.79%209.3%2016.11l213.01%20122.98c6.84%203.95%2015.28%203.95%2022.12%200l213.01-122.98c5.75-3.32%209.3-9.46%209.3-16.11V142.05c0-6.65-3.55-12.79-9.3-16.11ZM444.05%20151.99%20238.42%20508.15c-1.39%202.4-5.06%201.42-5.06-1.36V273.58c0-4.66-2.49-8.97-6.53-11.31L24.87%20145.67c-2.4-1.39-1.42-5.06%201.36-5.06h411.26c5.84%200%209.49%206.33%206.57%2011.39Z'/%3e%3c/svg%3e`,``+import.meta.url).href,opencode:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3e%3crect%20width='512'%20height='512'%20fill='%23131010'/%3e%3cpath%20d='M320%20224v128H192V224h128Z'%20fill='%235A5858'/%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M384%20416H128V96h256v320ZM320%20160H192v192h128V160Z'%20clip-rule='evenodd'/%3e%3c/svg%3e`,``+import.meta.url).href,pi:new URL(`data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20800%20800'%3e%3cpath%20fill='%23fff'%20fill-rule='evenodd'%20d='M165.29%20165.29h352.07V400H400v117.36H282.65v117.36H165.29V165.29Zm117.36%20117.36V400H400V282.65H282.65Z'/%3e%3cpath%20fill='%23fff'%20d='M517.36%20400h117.36v234.72H517.36z'/%3e%3c/svg%3e`,``+import.meta.url).href};function V_(e){return B_[e.trim().toLowerCase()]}function H_(e,t=`icon-svg`){return D_(e,{class:t,"aria-hidden":`true`})}var U_=`forgerelay/activityPanelDefaultExpanded`,W_=`forgerelay/activityPanelWorkspace`;function G_(e,t,n){return!n||e!==`working`?null:t<=0?1e3:t===1?2e3:t===2?5e3:1e4}function K_(e){return ov(e)?e[U_]===!0:!1}function q_(e,t){return J_(t)?`activity`:e?`preserve-panel`:`tool-card`}function J_(e){return ov(e)?typeof e.turnId==`string`&&iv(e.revision)&&typeof e.changed==`boolean`&&nv(e.state):!1}function Y_(e){return!J_(e)||!ov(e)||!Array.isArray(e.activities)?!1:e.activities.every(tv)}function X_(e){return!ov(e)||!tv(e.activity)?!1:e.error===void 0||typeof e.error==`string`}function Z_(e){return!ov(e)||typeof e.outputId!=`string`||typeof e.activityId!=`string`||!av(e.processId)||typeof e.command!=`string`||typeof e.output!=`string`||!iv(e.cursor)||e.status!==`running`&&e.status!==`done`&&e.status!==`failed`||typeof e.timedOut!=`boolean`||typeof e.startedAt!=`string`||e.exitCode!==void 0&&!Number.isInteger(e.exitCode)||e.signal!==void 0&&typeof e.signal!=`string`?!1:e.finishedAt===void 0||typeof e.finishedAt==`string`}function Q_(e,t){if(!t.changed)return e;let n=new Map(t.activities.map(e=>[e.activityId,e])),r=e.map(e=>n.get(e.activityId)??e),i=new Set(e.map(e=>e.activityId));for(let e of t.activities)i.has(e.activityId)||r.push(e);return r}function $_(e){let t=new Set(e.map(e=>e.activityId)),n=new Map;for(let r of e){if(!r.parentActivityId||!t.has(r.parentActivityId))continue;let e=n.get(r.parentActivityId)??[];e.push(r),n.set(r.parentActivityId,e)}return e.flatMap(e=>e.parentActivityId&&t.has(e.parentActivityId)?[]:[{activity:e,children:n.get(e.activityId)??[]}])}function ev(e,t=24){return e.scrollHeight-e.clientHeight-e.scrollTop<=t}function tv(e){return!ov(e)||e.member!==void 0&&typeof e.member!=`string`?!1:typeof e.activityId==`string`&&typeof e.tool==`string`&&typeof e.kind==`string`&&nv(e.status)&&rv(e.state)&&typeof e.title==`string`&&typeof e.target==`string`&&typeof e.detailAvailable==`boolean`&&typeof e.startedAt==`string`}function nv(e){return e===`working`||e===`done`||e===`error`}function rv(e){return e===`executing`||e===`returned`||e===`done`||e===`failed`||e===`blocked`}function iv(e){return typeof e==`number`&&Number.isInteger(e)&&e>=0}function av(e){return typeof e==`number`&&Number.isInteger(e)&&e>0}function ov(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function sv(e){let t=lv(lv(e.result)?._meta),n=lv(t?.card),r=typeof t?.tool==`string`?t.tool:e.activity.tool;if(!n||!p_(r))return;let i=lv(e.request);return{...n,tool:r,...typeof n.workspaceId==`string`?{}:typeof i?.workspaceId==`string`?{workspaceId:i.workspaceId}:{},...typeof n.path==`string`?{}:typeof i?.path==`string`?{path:i.path}:{}}}function cv(e){return g_(e.tool)||h_(e.tool)?!!(e.payload?.patch||e.payload?.diff):m_(e.tool)?x_(e.payload).length>0:!1}function lv(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}var uv=1e3,dv=class{root;options;app=null;snapshot=null;activities=[];indexRevision;indexLoading=!1;indexInFlight=!1;indexError=null;expanded=!1;refreshTimer=null;refreshInFlight=!1;refreshError=null;unchangedRefreshes=0;visibilityListenerAttached=!1;followTail=!0;scrollTop=0;selectedActivityId=null;details=new Map;detailLoading=new Set;detailErrors=new Map;outputs=new Map;outputLoading=new Set;outputErrors=new Map;outputRefreshTimer=null;mountedRichPayload=null;renderGeneration=0;handleVisibilityChange=()=>{if(document.hidden){this.stopRefresh(),this.stopOutputRefresh();return}this.snapshot&&(this.stopRefresh(),this.scheduleRefresh(0,!0));let e=this.activities.find(e=>e.activityId===this.selectedActivityId);e&&fv(e)&&this.outputs.get(e.outputId)?.status===`running`&&this.scheduleOutputRefresh(e,0)};constructor(e,t={}){this.root=e,this.options=t}get active(){return this.snapshot!==null}accept(e){let t=e.structuredContent;if(!J_(t))return!1;let n=this.snapshot?.turnId!==t.turnId;return this.snapshot=t,this.refreshError=null,n?(this.unchangedRefreshes=0,this.expanded=K_(e._meta),this.followTail=!0,this.scrollTop=0,this.activities=[],this.indexRevision=void 0,this.indexError=null,this.resetDetails()):this.unchangedRefreshes=t.changed?0:this.unchangedRefreshes+1,this.stopRefresh(),this.scheduleRefresh(),this.expanded&&t.revision>0&&this.indexRevision!==t.revision&&this.loadIndex(!1),!0}attach(e){this.app=e,this.visibilityListenerAttached||=(document.addEventListener(`visibilitychange`,this.handleVisibilityChange),!0),this.scheduleRefresh()}clear(){this.stopRefresh(),this.snapshot=null,this.activities=[],this.indexRevision=void 0,this.indexLoading=!1,this.indexInFlight=!1,this.indexError=null,this.refreshError=null,this.unchangedRefreshes=0,this.expanded=!1,this.followTail=!0,this.scrollTop=0,this.resetDetails()}detach(){this.clear(),this.visibilityListenerAttached&&=(document.removeEventListener(`visibilitychange`,this.handleVisibilityChange),!1),this.app=null}render(){return this.renderGeneration+=1,this.unmountRichPayload(),this.snapshot?this.snapshot.revision===0?(this.root.replaceChildren(),!0):(this.renderPanel(this.snapshot),!0):!1}scheduleRefresh(e,t=!1){if(!this.app||!this.snapshot||this.refreshTimer!==null||document.hidden)return;let n=e??G_(this.snapshot.state,this.unchangedRefreshes,!0);if(!(!t&&n===null)&&n!==null){if(!this.app.getHostCapabilities()?.serverTools){this.refreshError=`Live Activity refresh is unavailable in this host.`,this.render();return}this.refreshTimer=window.setTimeout(()=>{this.refreshTimer=null,this.refreshSnapshot()},n)}}stopRefresh(){this.refreshTimer!==null&&(window.clearTimeout(this.refreshTimer),this.refreshTimer=null)}async refreshSnapshot(){if(!this.app||!this.snapshot||this.refreshInFlight)return;let e=this.snapshot.turnId,t=this.snapshot.revision;this.refreshInFlight=!0;try{let n=await this.app.callServerTool({name:`activity_snapshot`,arguments:{turnId:e,knownRevision:t}});if(n.isError)throw Error(`Activity snapshot refresh failed.`);let r=n.structuredContent;if(!J_(r)||r.turnId!==e)throw Error(`Activity snapshot refresh returned an invalid Host Turn state.`);if(!this.snapshot||this.snapshot.turnId!==e)return;let i=r.changed||this.refreshError!==null;this.snapshot=r,this.unchangedRefreshes=r.changed?0:this.unchangedRefreshes+1,this.refreshError=null,i&&this.render(),r.changed&&this.expanded&&r.revision>0&&this.loadIndex(!1)}catch(e){this.unchangedRefreshes+=1;let t=e instanceof Error?e.message:`Activity snapshot refresh failed.`;this.refreshError!==t&&(this.refreshError=t,this.render())}finally{this.refreshInFlight=!1,this.scheduleRefresh()}}async loadIndex(e){if(!this.app||!this.snapshot||!this.expanded||this.snapshot.revision===0||this.indexInFlight)return;let t=this.snapshot.turnId,n=this.indexRevision;this.indexInFlight=!0,e&&(this.indexLoading=!0,this.indexError=null,this.render());try{let e=await this.app.callServerTool({name:`activity_index`,arguments:{turnId:t,...n===void 0?{}:{knownRevision:n}}});if(e.isError)throw Error(`Activity index request failed.`);let r=e.structuredContent;if(!Y_(r)||r.turnId!==t)throw Error(`Activity index returned an invalid Activity index.`);if(!this.snapshot||this.snapshot.turnId!==t)return;this.activities=Q_(this.activities,r),this.indexRevision=r.revision,r.revision>=this.snapshot.revision&&(this.snapshot={turnId:r.turnId,revision:r.revision,changed:r.changed,state:r.state}),this.indexError=null}catch(e){if(!this.snapshot||this.snapshot.turnId!==t)return;this.indexError=e instanceof Error?e.message:`Activity index request failed.`}finally{this.indexLoading=!1,this.indexInFlight=!1,this.snapshot?.turnId===t&&this.render(),this.expanded&&this.snapshot?.turnId===t&&this.indexRevision!==void 0&&this.indexRevision!==this.snapshot.revision&&this.loadIndex(!1)}}resetDetails(){this.stopOutputRefresh(),this.unmountRichPayload(),this.selectedActivityId=null,this.details.clear(),this.detailLoading.clear(),this.detailErrors.clear(),this.outputs.clear(),this.outputLoading.clear(),this.outputErrors.clear()}toggleDetail(e){if(e.detailAvailable){if(this.stopOutputRefresh(),this.selectedActivityId===e.activityId){this.selectedActivityId=null,this.render();return}if(this.selectedActivityId=e.activityId,this.render(),fv(e)){let t=this.outputs.get(e.outputId);t?.status===`running`&&this.scheduleOutputRefresh(e),!t&&!this.outputLoading.has(e.outputId)&&!this.outputErrors.has(e.outputId)&&this.loadOutput(e,!0);return}!this.details.has(e.activityId)&&!this.detailLoading.has(e.activityId)&&!this.detailErrors.has(e.activityId)&&this.loadDetail(e)}}async loadDetail(e){if(!this.app||!this.snapshot||!e.detailAvailable)return;let t=this.snapshot.turnId,n=e.activityId;this.detailLoading.add(n),this.detailErrors.delete(n),this.render();try{let e=await this.app.callServerTool({name:`activity_detail`,arguments:{turnId:t,activityId:n}});if(e.isError)throw Error(`Activity detail request failed.`);let r=e.structuredContent;if(!X_(r)||r.activity.activityId!==n)throw Error(`Activity detail returned an invalid Activity record.`);if(!this.snapshot||this.snapshot.turnId!==t)return;this.details.set(n,r)}catch(e){if(!this.snapshot||this.snapshot.turnId!==t)return;this.detailErrors.set(n,e instanceof Error?e.message:`Activity detail request failed.`)}finally{this.detailLoading.delete(n),this.snapshot?.turnId===t&&this.render()}}stopOutputRefresh(){this.outputRefreshTimer!==null&&(window.clearTimeout(this.outputRefreshTimer),this.outputRefreshTimer=null)}scheduleOutputRefresh(e,t=uv){!fv(e)||this.outputRefreshTimer!==null||document.hidden||this.selectedActivityId===e.activityId&&(this.outputRefreshTimer=window.setTimeout(()=>{this.outputRefreshTimer=null,this.selectedActivityId===e.activityId&&this.loadOutput(e,!1)},t))}async loadOutput(e,t){if(!this.app||!this.snapshot||!fv(e))return;let n=this.snapshot.turnId,r=e.outputId;t&&this.outputLoading.add(r),this.outputErrors.delete(r),t&&this.render();let i=!1;try{let e=this.outputs.get(r),t=await this.app.callServerTool({name:`activity_output`,arguments:{turnId:n,outputId:r,...e?{cursor:e.cursor}:{}}});if(t.isError)throw Error(`Bash output request failed.`);let a=t.structuredContent;if(!Z_(a)||a.outputId!==r)throw Error(`Bash output returned an invalid durable output record.`);if(e&&a.cursor<e.cursor)throw Error(`Bash output cursor moved backwards.`);if(!this.snapshot||this.snapshot.turnId!==n)return;this.outputs.set(r,e?{...a,output:e.output+a.output}:a),i=a.status===`running`}catch(e){if(!this.snapshot||this.snapshot.turnId!==n)return;this.outputErrors.set(r,e instanceof Error?e.message:`Bash output request failed.`)}finally{this.outputLoading.delete(r),this.snapshot?.turnId===n&&this.render(),i&&this.selectedActivityId===e.activityId&&this.scheduleOutputRefresh(e)}}renderActivityEntry(e,t){let n=this.selectedActivityId===e.activityId,r=$(`div`,{className:`activity-entry${n?` expanded`:``}`});return r.append(mv(e,t,n,e.detailAvailable?()=>this.toggleDetail(e):void 0)),n&&r.append(this.renderActivityDetail(e)),r}renderActivityDetail(e){if(fv(e))return this.renderBashOutput(e);let t=$(`div`,{className:`activity-detail`}),n=e.activityId;if(this.detailLoading.has(n))return t.append($(`div`,{className:`activity-detail-status`,text:`Loading details...`})),t;let r=this.detailErrors.get(n);if(r)return t.append($(`div`,{className:`activity-detail-status error`,text:r})),t;let i=this.details.get(n);if(!i)return t.append($(`div`,{className:`activity-detail-status`,text:`Details unavailable.`})),t;i.error&&hv(t,`Error`,i.error,!0);let a=sv(i);if(a&&cv(a)){let e=$(`div`,{className:`activity-detail-rich`});return e.append($(`div`,{className:`activity-detail-status`,text:a.tool===`read`?`Loading file view...`:`Loading diff...`})),t.append(e),this.mountRichPayload(n,e,a,this.renderGeneration),t}return i.request!==void 0&&hv(t,`Request`,i.request),i.result!==void 0&&hv(t,`Result`,i.result),t.childElementCount===0&&t.append($(`div`,{className:`activity-detail-status`,text:`No additional details.`})),t}async mountRichPayload(e,t,n,r){try{let{mountHeavyPayload:i}=await Ng(async()=>{let{mountHeavyPayload:e}=await import(`./heavy-payload-Bol1_mcs.js`);return{mountHeavyPayload:e}},__vite__mapDeps([0,1,2]),import.meta.url);if(r!==this.renderGeneration||this.selectedActivityId!==e||!t.isConnected)return;t.replaceChildren(),this.mountedRichPayload=i(t,{card:n,hostContext:this.app?.getHostContext()??void 0})}catch(n){if(r!==this.renderGeneration||this.selectedActivityId!==e||!t.isConnected)return;t.replaceChildren($(`div`,{className:`activity-detail-status error`,text:n instanceof Error?n.message:`Unable to load Activity payload.`}))}}unmountRichPayload(){this.mountedRichPayload?.unmount(),this.mountedRichPayload=null}renderBashOutput(e){let t=$(`div`,{className:`activity-detail activity-terminal`}),n=e.outputId;if(this.outputLoading.has(n))return t.append($(`div`,{className:`activity-detail-status`,text:`Loading terminal output...`})),t;let r=this.outputErrors.get(n);if(r)return t.append($(`div`,{className:`activity-detail-status error`,text:r})),t;let i=this.outputs.get(n);return i?(t.append($(`pre`,{className:`activity-terminal-command`,text:i.command}),$(`pre`,{className:`activity-terminal-output pretty-scrollbar`,text:i.output||`(no output)`}),$(`div`,{className:`activity-terminal-meta status-${i.status}`,text:pv(i)})),t):(t.append($(`div`,{className:`activity-detail-status`,text:`Terminal output unavailable.`})),t)}renderPanel(e){let t=this.root.querySelector(`.activity-viewport`);t&&(this.scrollTop=t.scrollTop);let n=$(`section`,{className:`activity-panel state-${e.state}`}),r=$(`button`,{className:`activity-panel-header`,type:`button`,ariaExpanded:String(this.expanded)});r.addEventListener(`click`,()=>{this.expanded=!this.expanded,this.expanded||this.stopOutputRefresh(),this.render(),this.expanded&&e.revision>0&&this.indexRevision!==e.revision&&this.loadIndex(!0)});let i=$(`span`,{className:`activity-panel-status state-${e.state}`,ariaHidden:`true`}),a=$(`span`,{className:`activity-panel-title-group`});a.append($(`span`,{className:`activity-panel-title`,text:`Activity`}),$(`span`,{className:`activity-panel-subtitle`,text:`Host Turn · revision ${e.revision}`}));let o=this.activities.length,s=$(`span`,{className:`activity-panel-count state-${e.state}`,text:this.expanded&&this.indexRevision!==void 0?`${o} ${o===1?`activity`:`activities`}`:Sv(e.state)});if(r.append(i,a,s,Tv(this.expanded)),n.append(r),this.expanded){let e=$(`div`,{className:`activity-panel-body`}),t=$(`div`,{className:`activity-viewport pretty-scrollbar`,ariaLabel:`ForgeRelay Activity Panel`});t.addEventListener(`scroll`,()=>{this.scrollTop=t.scrollTop,this.followTail=ev(t)});let r=$_(this.activities);if(this.indexLoading&&this.indexRevision===void 0)t.append($(`div`,{className:`activity-empty`,text:`Loading Activity index...`}));else if(this.indexError)t.append($(`div`,{className:`activity-empty error`,text:this.indexError}));else if(r.length===0)t.append($(`div`,{className:`activity-empty`,text:`Waiting for ForgeRelay activity...`}));else{let e=$(`div`,{className:`activity-list`});for(let t of r){let n=$(`div`,{className:`activity-group${t.children.length>0?` grouped`:``}`});if(n.append(this.renderActivityEntry(t.activity,!1)),t.children.length>0){let e=$(`div`,{className:`activity-children`});for(let n of t.children)e.append(this.renderActivityEntry(n,!0));n.append(e)}e.append(n)}t.append(e)}this.refreshError&&e.append($(`div`,{className:`activity-refresh-error`,text:this.refreshError})),e.prepend(t),n.append(e),this.replacePanel(n),this.followTail?(t.scrollTop=t.scrollHeight,this.scrollTop=t.scrollTop):t.scrollTop=Math.min(this.scrollTop,Math.max(0,t.scrollHeight-t.clientHeight));return}this.replacePanel(n)}replacePanel(e){if(this.options.embedded){this.root.replaceChildren(e);return}let t=$(`main`,{className:`shell`});t.append(e),this.root.replaceChildren(t)}};function fv(e){return(e.kind===`shell`||e.kind===`shell-result`)&&typeof e.outputId==`string`&&e.outputId.length>0}function pv(e){let t=[`Process ${e.processId}`,e.status];return e.timedOut?t.push(`timed out`):e.signal?t.push(`signal ${e.signal}`):e.exitCode!==void 0&&t.push(`exit ${e.exitCode}`),t.join(` · `)}function mv(e,t,n,r){let i=r?$(`button`,{className:[`activity-row`,`interactive`,t?`child`:`parent`,`kind-${bv(e)}`,`phase-${xv(e)}`,e.kind===`shell-result`?`shell-result`:void 0].filter(Boolean).join(` `),type:`button`,ariaExpanded:String(n)}):$(`div`,{className:[`activity-row`,t?`child`:`parent`,`kind-${bv(e)}`,`phase-${xv(e)}`,e.kind===`shell-result`?`shell-result`:void 0].filter(Boolean).join(` `)});r&&i.addEventListener(`click`,r),i.dataset.activityId=e.activityId;let a=$(`span`,{className:`activity-icon`,ariaHidden:`true`});a.append(H_(yv(e),`activity-icon-svg`));let o=$(`span`,{className:`activity-main`}),s=$(`span`,{className:`activity-title-line`});s.append($(`span`,{className:`activity-title`,text:e.title})),e.member&&s.append($(`span`,{className:`activity-member`,text:e.member,title:`Composite member: ${e.member}`})),s.append($(`span`,{className:`activity-target`,text:e.target,title:e.target})),o.append(s),e.children&&o.append(_v(e.children));let c=$(`span`,{className:`activity-meta`}),l=$(`span`,{className:`activity-phase`,text:Cv(e)}),u=wv(e.durationMs);c.append(l),u&&c.append($(`span`,{className:`activity-duration`,text:u}));let d=e.detailAvailable?Tv(n):$(`span`,{className:`activity-detail-spacer`,ariaHidden:`true`});return d.classList.add(`activity-detail-chevron`),i.append(a,o,c,d),i}function hv(e,t,n,r=!1){let i=$(`section`,{className:`activity-detail-section${r?` error`:``}`});i.append($(`div`,{className:`activity-detail-label`,text:t}),$(`pre`,{className:`activity-detail-value pretty-scrollbar`,text:gv(n)})),e.append(i)}function gv(e){if(typeof e==`string`)return e;try{return JSON.stringify(e,null,2)??String(e)}catch{return String(e)}}function _v(e){let t=$(`span`,{className:`activity-progress-wrap`}),n=$(`span`,{className:`activity-progress-counts`,text:vv(e)}),r=$(`span`,{className:`activity-progress-track`,ariaHidden:`true`}),i=$(`span`,{className:`activity-progress-fill`}),a=e.done+e.error;return i.style.width=`${e.total>0?Math.min(100,a/e.total*100):0}%`,r.append(i),t.append(n,r),t}function vv(e){let t=[`${e.done+e.error}/${e.total}`];return e.working>0&&t.push(`${e.working} running`),e.error>0&&t.push(`${e.error} failed`),t.join(` · `)}function yv(e){switch(e.kind){case`read`:return z_.readFile;case`write`:return z_.writeFile;case`edit`:case`rename`:return z_.editFile;case`delete`:return z_.deleteFile;case`shell`:return z_.terminalSquare;case`shell-result`:return z_.terminal;case`capability`:case`batch`:return z_.skills;default:return z_.files}}function bv(e){switch(e.kind){case`read`:case`write`:case`edit`:case`rename`:case`delete`:case`shell`:case`shell-result`:case`capability`:case`batch`:return e.kind;default:return`tool`}}function xv(e){return e.bashPhase?e.bashPhase:e.status===`working`?`executing`:e.status===`error`?`error`:`done`}function Sv(e){switch(e){case`working`:return`Working`;case`done`:return`Done`;case`error`:return`Error`}}function Cv(e){if(e.state===`blocked`)return`Blocked`;switch(xv(e)){case`executing`:return`Running`;case`returned`:return`Returned`;case`done`:return`Done`;case`error`:return`Error`}}function wv(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(+(e<1e4))}s`}function Tv(e){let t=$(`span`,{className:`chevron ${e?`expanded`:``}`,ariaHidden:`true`});return t.append(H_(z_.chevronDown)),t}function $(e,t={}){let n=document.createElement(e);return t.className&&(n.className=t.className),t.text!==void 0&&(n.textContent=t.text),t.type!==void 0&&`type`in n&&n.setAttribute(`type`,t.type),t.title!==void 0&&(n.title=t.title),t.ariaHidden!==void 0&&n.setAttribute(`aria-hidden`,t.ariaHidden),t.ariaLabel!==void 0&&n.setAttribute(`aria-label`,t.ariaLabel),t.ariaExpanded!==void 0&&n.setAttribute(`aria-expanded`,t.ariaExpanded),n}export{Ng as C,l_ as S,x_ as _,H_ as a,u_ as b,C_ as c,m_ as d,y_ as f,h_ as g,b_ as h,V_ as i,w_ as l,p_ as m,q_ as n,z_ as o,v_ as p,W_ as r,g_ as s,dv as t,__ as u,S_ as v,f_ as x,d_ as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./workspace-app-BLW7p6IZ.js";import"./workspace-app-CmaYU4DW.js";document.documentElement.dataset.forgerelayApp=`historical-tool-card`;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./heavy-payload-Bol1_mcs.js","./workspace-app-BLW7p6IZ.js","./chunk-EyZ2wyi3.js","./workspace-app-D2bJ5fjt.css","./scrollbar-CvE-I-jG.js","./review-payload-BqJp0c5e.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{C as e,S as t,_ as n,a as r,b as i,c as a,d as o,f as s,g as c,h as l,i as u,l as d,m as f,n as ee,o as p,p as te,s as m,t as ne,u as re,v as h,x as ie,y as ae}from"./workspace-app-BLW7p6IZ.js";var oe={added:`Added`,edited:`Edited`,deleted:`Deleted`,renamed:`Renamed`,"renamed-edited":`Renamed and edited`};function g(e,t={}){let n=e.files??[],r=de(n);if(r===0)return{title:t.emptyTitle??`Applied patch`,tone:`edit`};let i=new Set(n.map(_)),a=i.size===1?[...i][0]:void 0,o={title:fe(a,r),tone:pe(a)};return a&&a!==`unknown`&&(o.iconKind=a),o}function _(e){switch(e.operation){case`add`:return`added`;case`update`:return`edited`;case`delete`:return`deleted`;case`move`:return`renamed`}switch(e.type){case`new`:return`added`;case`change`:return`edited`;case`deleted`:return`deleted`;case`rename-pure`:return`renamed`;case`rename-changed`:return`renamed-edited`;default:return`unknown`}}function se(e,t,n){let r=_(t);if(r!==`edited`&&r!==`unknown`)return r;let i=e[n];return i?.operation===`move`&&(!t.path||i.path===t.path)||e.find(e=>e.operation===`move`&&e.path===t.path&&(!t.previousPath||e.previousPath===t.previousPath))?`renamed`:r===`edited`?`edited`:i?_(i):`unknown`}function ce(e){let t=e.path??e.previousPath;if(!t)return;let n=e.previousPath;if(!n||n===t)return{current:t,title:t};let r=y(n)===y(t);return{current:r?b(t):t,previous:r?b(n):n,title:`${n} → ${t}`}}function le(e,t,n){let r=e[n],i=(r?.path===t.path?r:e.find(e=>e.path===t.path&&(!t.previousPath||!e.previousPath||e.previousPath===t.previousPath)))??r;return ce({path:t.path??i?.path,previousPath:t.previousPath??i?.previousPath})}function ue(e){return e===`unknown`?`Changed`:oe[e]}function de(e){let t=new Set,n=0;for(let r of e){let e=r.path??r.previousPath;e?t.add(e):n+=1}return t.size+n}function fe(e,t){return e&&e!==`unknown`?`${oe[e]} ${t} ${v(t)}`:`Changed ${t} ${v(t)}`}function pe(e){return e===`added`?`write`:e===`deleted`?`delete`:`edit`}function v(e){return e===1?`file`:`files`}function y(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t===-1?``:e.slice(0,t)}function b(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t===-1?e:e.slice(t+1)}function me(e){switch(e.tool){case`open_workspace`:return{icon:e.mode===`worktree`?p.gitBranch:p.folderOpen,title:_e(e),label:e.kind===`composite`?e.name:e.root??e.path,tone:`workspace`};case`close_workspace`:return{icon:e.mode===`worktree`?p.gitBranch:p.folderOpen,title:e.kind===`composite`?`Dissolved composite workspace`:`Closed workspace`,label:e.kind===`composite`?e.name??e.workspaceId:e.sourceRoot??e.root??e.path??e.workspaceId,tone:`workspace`};case`read`:return{icon:p.readFile,title:`Read file`,label:e.path,tone:`read`};case`write`:return{icon:p.writeFile,title:`Wrote file`,label:e.path,tone:`write`};case`edit`:return{icon:p.editFile,title:`Edited file`,label:e.path,tone:`edit`};case`rename`:return{icon:p.editFile,title:`Renamed path`,label:e.path,tone:`edit`};case`delete`:return{icon:p.deleteFile,title:`Deleted path`,label:e.path,tone:`delete`};case`apply_patch`:{let t=g(e);return{icon:ge(t.iconKind),title:t.title,label:x(e),tone:t.tone}}case`grep`:return{icon:p.search,title:`Searched files`,label:ve(e),tone:`search`};case`glob`:return{icon:p.files,title:`Found files`,label:ve(e),tone:`search`};case`ls`:return{icon:p.folderTree,title:`Listed directory`,label:e.path,tone:`directory`};case`bash`:case`exec_command`:return{icon:p.terminalSquare,title:S(e,`command`),label:w(e),tone:`shell`,state:C(e)};case`write_stdin`:return{icon:p.terminal,title:S(e,`process`),label:w(e),tone:`shell`,state:C(e)};case`capability`:if(s(e)){let t=g(e,{emptyTitle:`Changes ready`}),n=e.files?.length??0;return{icon:p.diff,title:n>0||e.payload?.patch?t.title:`No changes`,label:x(e),tone:`review`}}return{icon:p.skills,title:e.capabilityName?`Capability: ${e.capabilityName}`:`Capability completed`,tone:`workspace`}}}function he(e){let t=e.summary??{};if(s(e)||re(e.tool)||m(e.tool)||c(e.tool))return{kind:`diff`,additions:h(t,`additions`)??0,removals:h(t,`removals`)??0};if(e.tool===`open_workspace`){let e=[T(h(t,`agentsFiles`),`instruction`),T(h(t,`skills`),`skill`)].filter(e=>!!e);return e.length>0?{kind:`text`,text:e.join(` · `)}:{kind:`empty`}}if(te(e.tool)){let e=[T(h(t,`lines`),`line`),ye(h(t,`wallTimeMs`))].filter(e=>!!e);return e.length>0?{kind:`text`,text:e.join(` · `)}:{kind:`empty`}}if(e.tool===`grep`||e.tool===`read`||e.tool===`ls`){let e=T(h(t,`lines`),`line`);return e?{kind:`text`,text:e}:{kind:`empty`}}return{kind:`empty`}}function ge(e){return e===`added`?p.writeFile:e===`deleted`?p.deleteFile:e===`renamed`||e===`renamed-edited`?p.files:p.editFile}function _e(e){return e.kind===`composite`?`${e.workspaceReused?`Reused`:`Opened`} composite workspace`:`${e.workspaceReused?`Reused`:`Opened`} workspace`}function x(e){if(e.files?.length===1)return ce(e.files[0])?.title??e.path}function ve(e){let t=e.summary?.pattern,n=e.summary?.scope;return typeof t==`string`?typeof n==`string`&&n!==`.`?`${t} in ${n}`:t:e.path}function S(e,t){if(e.summary?.running===!0)return t===`command`?`Command running`:`Process running`;let n=h(e.summary,`exitCode`);return n!==void 0&&n!==0?t===`command`?`Command failed`:`Process failed`:t===`command`?`Ran command`:`Process finished`}function C(e){if(e.summary?.running===!0)return`running`;let t=h(e.summary,`exitCode`);return t!==void 0&&t!==0?`error`:t===0?`success`:void 0}function w(e){let t=e.summary?.command;if(typeof t==`string`)return t;let n=e.summary?.sessionId;return typeof n==`number`||typeof n==`string`?`Session ${String(n)}`:e.path}function T(e,t){if(e!==void 0)return`${e} ${t}${e===1?``:`s`}`}function ye(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(+(e<1e4))}s`}var E=null,D=!1,O=null,k,A=null,j=!1,M=!1,N=null,P=null,F=null,I=null,L=!1,R=document.querySelector(`#app`);if(!R)throw Error(`Missing #app root element.`);var z=R,B=new ne(z);be();async function be(){H(),E=new ie({name:`forgerelay-tool-cards`,version:`0.1.0`},{}),E.ontoolresult=e=>{let t=ee(B.active,e.structuredContent);if(t===`activity`&&B.accept(e)){A=null,j=!1,M=!1,I=null,L=!1,N=null,H();return}if(t===`preserve-panel`)return;let n=Re(e),r=Le(e),i=r?{...n,...r}:n,a=Ie(e);if(!a||!l(i)){A=null,j=!1,M=!1,I=null,L=!1,N=`No result card is available for this tool result.`,H();return}let o={...i,tool:a};A=o,j=d(o),M=!1,I=null,L=!1,N=null,H()},E.onhostcontextchanged=e=>{k={...k,...e},V(),B.active?B.render():A?.tool!==`open_workspace`&&W()},E.onteardown=async()=>(D=!1,B.detach(),G(),{});try{await E.connect();let e=E.getHostContext();e&&(k=e),V(),D=!0,B.attach(E)}catch(e){O=e instanceof Error?e.message:String(e)}H()}function V(){k?.theme&&t(k.theme),k?.styles?.variables&&i(k.styles.variables),k?.styles?.css?.fonts&&ae(k.styles.css.fonts);let e=k?.safeAreaInsets;e&&(document.body.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`)}function H(){if(G(),O){U(O,`error`);return}if(!D){U(`Connecting to host...`);return}if(B.render())return;if(!A){U(N??`Waiting for a tool result.`,N?`error`:`muted`);return}let e=me(A);if(s(A)){we(A,e);return}let t=a(A),n=$(`main`,{className:`shell`}),i=$(`section`,{className:J(e)}),o=$(`button`,{className:`tool-header`,type:`button`,ariaExpanded:String(j),disabled:!t});t&&o.addEventListener(`click`,()=>{j=!j,H()});let c=$(`span`,{className:`tool-icon`,ariaHidden:`true`});c.append(r(e.icon));let l=$(`span`,{className:`tool-main`}),u=$(`span`,{className:`tool-title`,text:e.title});if(l.append(u),e.label&&l.append($(`span`,{className:`tool-label`,text:e.label,title:e.label})),o.append(c,l,Ce(A),Te(j,t)),i.append(o),j){let e=$(`div`,{className:`tool-body`});F=e,i.append(e)}n.append(i),z.replaceChildren(n),W()}function U(e,t=`muted`){let n=$(`main`,{className:`shell`});n.append($(`section`,{className:`empty ${t}`,text:e})),z.replaceChildren(n)}async function W(){if(!A||!F||!j)return;let t=F;if(N){q(t,N,`error`);return}if(A.tool===`open_workspace`){Ee(t,A);return}if(xe(A)){if(P){P.update({card:A,hostContext:k,errorMessage:N});return}Y(t,!0);try{let{mountHeavyPayload:n}=await e(async()=>{let{mountHeavyPayload:e}=await import(`./heavy-payload-Bol1_mcs.js`);return{mountHeavyPayload:e}},__vite__mapDeps([0,1,2,3,4]),import.meta.url);if(t!==F||!j||!A)return;Y(t,!1),P=n(t,{card:A,hostContext:k,errorMessage:N})}catch(e){if(t!==F||!j)return;Y(t,!1),q(t,e instanceof Error?e.message:`Unable to load details.`,`error`)}return}if(s(A)||re(A.tool)){let n=s(A)&&!M?Math.max(3,(A.files??[]).slice(0,3).length):void 0;if(P){P.update({card:A,hostContext:k,errorMessage:N,visibleFileCount:n});return}q(t,s(A)?`Loading review...`:`Loading diff...`);let{mountReviewPayload:r}=await e(async()=>{let{mountReviewPayload:e}=await import(`./review-payload-BqJp0c5e.js`);return{mountReviewPayload:e}},__vite__mapDeps([5,4,2,1,3]),import.meta.url);if(t!==F||!A)return;P=r(t,{card:A,hostContext:k,errorMessage:N,visibleFileCount:n});return}let r=n(A.payload);if(!r){q(t,`No details available.`);return}Se(t,r,A.tool)}function xe(e){return o(e.tool)||m(e.tool)||c(e.tool)}function G(){K(),P=null,F=null}function K(){P?.unmount(),P=null}function q(e,t,n=`muted`){K(),e.replaceChildren($(`div`,{className:`status ${n}`,text:t}))}function Se(e,t,n){K(),e.replaceChildren($(`pre`,{className:`text-payload pretty-scrollbar ${n}`,text:t}))}function Ce(e){let t=he(e);if(t.kind===`diff`){let e=$(`span`,{className:`stats`});return e.setAttribute(`aria-label`,`Diff statistics`),e.append($(`span`,{className:`add`,text:`+${String(t.additions)}`}),$(`span`,{className:`remove`,text:`-${String(t.removals)}`})),e}let n=$(`span`,{className:`header-meta ${t.kind===`empty`?`empty`:``}`,text:t.kind===`text`?t.text:``});return t.kind===`empty`&&n.setAttribute(`aria-hidden`,`true`),n}function we(e,t){G();let n=e.files??[],i=M?n:n.slice(0,3),o=Math.max(0,n.length-i.length),s=a(e),c=$(`main`,{className:`shell`}),l=$(`section`,{className:J(t)}),u=$(`button`,{className:`tool-header review-header`,type:`button`,ariaExpanded:String(j),disabled:!s});s&&u.addEventListener(`click`,()=>{j=!j,H()});let d=$(`span`,{className:`tool-icon`,ariaHidden:`true`});d.append(r(t.icon));let f=$(`span`,{className:`tool-main review-title-group`});if(f.append($(`span`,{className:`tool-title`,text:t.title})),t.label&&f.append($(`span`,{className:`tool-label`,text:t.label,title:t.label})),u.append(d,f,Ce(e),Te(j,s)),l.append(u),j){let e=$(`div`,{className:`review-summary`}),t=$(`div`,{className:`review-payload`});if(F=t,e.append(t),o>0){let t=$(`button`,{className:`review-more`,type:`button`,text:`Show ${o} more ${o===1?`file`:`files`}`});t.addEventListener(`click`,()=>{M=!0,H()}),e.append(t)}l.append(e)}c.append(l),z.replaceChildren(c),W()}function Te(e,t){let n=$(`span`,{className:t?`chevron ${e?`expanded`:``}`:`chevron`,ariaHidden:`true`});return t&&n.append(r(p.chevronDown)),n}function J(e){return[`tool-card`,e.tone,e.state?`state-${e.state}`:void 0].filter(Boolean).join(` `)}function Y(e,t){let n=e.previousElementSibling,i=n?.querySelector(`.chevron`);if(!i)return;i.classList.toggle(`loading`,t),i.replaceChildren(r(t?p.loading:p.chevronDown));let a=n instanceof HTMLButtonElement?n:null;a&&a.setAttribute(`aria-busy`,String(t))}function Ee(e,t){K();let n=$(`div`,{className:`workspace-details pretty-scrollbar`}),i=$(`div`,{className:`workspace-rows`}),a=t.worktree;if(a){let e=[a.baseRef,a.baseSha?.slice(0,8)].filter(e=>!!e).join(` · `)||`Worktree`,t=$(`span`,{className:`workspace-base-value`});if(t.append($(`span`,{className:`workspace-value`,text:e,title:e})),a.dirtySource){let e=$(`span`,{className:`workspace-base-warning`,title:`The source checkout had uncommitted changes when this worktree was created. Those changes are not included here.`,ariaLabel:`Source checkout changes are not included in this worktree`});e.append(r(p.warning,`workspace-base-warning-svg`)),t.append(e)}Z(i,`Base`,t,p.base),a.branch&&X(i,`Worktree branch`,a.branch,p.gitBranch,!1),a.targetBranch&&X(i,`Merge target`,a.targetBranch,p.gitBranch,!1)}t.sourceRoot&&t.sourceRoot!==t.root&&X(i,`Source checkout`,t.sourceRoot,p.sourceCheckout,!0),De(i,t.agentsFiles??[],t.availableAgentsFiles??[]);let o=t.skills??[];o.length>0&&Pe(i,o);let s=t.agentProviders??[],c=(t.agents??[]).map(e=>{let t=e.name??`Unnamed agent`,n=e.provider?.trim(),r=e.providerAvailable===!1,i=[e.description,n?`Provider: ${n}`:void 0,e.model?`Model: ${e.model}`:void 0,e.thinking?`Thinking: ${e.thinking}`:void 0,r?e.providerUnavailableReason??`Provider unavailable`:void 0].filter(e=>!!e).join(`
|
|
3
|
+
`);return{label:t,logo:n?u(n):void 0,profile:!0,tone:r?`muted`:void 0,title:i||void 0}}),l=s.map(e=>{let t=e.name?.trim()||`Unknown provider`,n=e.available===!1,r=u(t);return{label:t,logo:r,bareLogo:!!r,ariaLabel:t,tone:n?`muted`:void 0,title:n?e.reason??`Provider unavailable`:t}});if(c.length>0){let e=Q([...c,...l]);e.classList.add(`workspace-agents-list`),Z(i,`Agents`,e,p.agents,`workspace-agents-row`)}else l.length>0&&Ne(i,`Providers`,l,p.providers);i.childElementCount>0&&n.append(i),n.childElementCount===0&&n.append($(`div`,{className:`status muted`,text:`No workspace details available.`})),e.replaceChildren(n)}function De(e,t,n){let r=[],i=new Set;for(let[e,n]of t.entries())r.push({key:`loaded:${e}`,path:n.path,label:n.path??`Loaded instructions`,content:n.content,status:`loaded`}),n.path&&i.add(n.path);let a=[];for(let[e,t]of n.entries())t.path&&i.has(t.path)||a.push({key:`available:${e}`,path:t.path,label:t.path??`Nested instructions`,status:`available`});if(r.length===0&&a.length===0)return;let o=Oe(L?[...r,...a]:r);if(a.length>0){let e=L,t=$(`button`,{className:`workspace-instructions-toggle`,type:`button`,text:e?`Show less`:`View all`,ariaLabel:e?`Show only loaded instruction files`:`View all ${a.length} available instruction files`,ariaExpanded:String(e)});t.addEventListener(`click`,()=>{L=!L,L||(I=null),H()}),o.append(t)}let s=$(`div`,{className:`workspace-instructions-content`});s.append(o),Z(e,`Instructions`,s,p.instructions,`workspace-instructions-row`)}function Oe(e){let t=$(`span`,{className:`workspace-instruction-list`});for(let n of e){let e=$(`span`,{className:`workspace-instruction-item`});e.dataset.instructionKey=n.key;let i=n.status===`loaded`&&n.content!==void 0,a=$(i?`button`:`span`,{className:`workspace-instruction-header${i?` interactive`:``}`,type:i?`button`:void 0,ariaLabel:i?`View ${n.label}`:void 0,ariaExpanded:i?`false`:void 0}),o=$(`span`,{className:`workspace-instruction-text`}),s=Me(n.label);if(o.append($(`span`,{className:`workspace-instruction-name`,text:s})),n.path&&n.path!==s&&o.append($(`span`,{className:`workspace-instruction-path`,text:n.path,title:n.path})),a.append(Ae(n.status),o),i){let i=$(`span`,{className:`workspace-instruction-chevron`,ariaHidden:`true`});i.append(r(p.chevronDown,`workspace-instruction-chevron-svg`)),a.append(i),a.addEventListener(`click`,()=>{I=I===n.key?null:n.key,ke(t)});let o=$(`pre`,{className:`workspace-instruction-preview pretty-scrollbar`,text:n.content});o.hidden=!0,e.append(a,o)}else e.append(a);t.append(e)}return ke(t),t}function ke(e){for(let t of e.querySelectorAll(`.workspace-instruction-item`)){let e=t.dataset.instructionKey===I;t.classList.toggle(`expanded`,e),t.querySelector(`.workspace-instruction-header.interactive`)?.setAttribute(`aria-expanded`,String(e));let n=t.querySelector(`.workspace-instruction-preview`);n&&(n.hidden=!e)}}function Ae(e){let t=je(e),n=$(`span`,{className:`workspace-instruction-status ${e}`,title:t,ariaLabel:t});return n.setAttribute(`role`,`img`),n.append(r(e===`loaded`?p.instructionLoaded:p.instructionAvailable,`workspace-instruction-status-svg`)),n}function je(e){return e===`loaded`?`Loaded into the current workspace context`:`Available for a nested directory`}function Me(e){return e.replaceAll(`\\`,`/`).split(`/`).filter(Boolean).at(-1)??e}function X(e,t,n,r,i=!1){Z(e,t,$(`span`,{className:`workspace-value${i?` mono`:``}`,text:n,title:n}),r)}function Ne(e,t,n,r){Z(e,t,Q(n),r)}function Z(e,t,n,r,i){let a=$(`div`,{className:[`workspace-row`,i].filter(Boolean).join(` `)});a.append(Fe(r),$(`span`,{className:`workspace-key`,text:t}),n),e.append(a)}function Pe(e,t){let n=Q(t.map(e=>({label:e.name??`Unnamed skill`,title:e.description||void 0})));n.classList.add(`workspace-skills-list`),Z(e,`Skills`,n,p.skills,`workspace-skills-row`)}function Fe(e){let t=$(`span`,{className:`workspace-row-icon`,ariaHidden:`true`});return t.append(r(e,`workspace-row-icon-svg`)),t}function Q(e){let t=$(`span`,{className:`workspace-chip-list`});for(let n of e){let e=!!(n.bareLogo&&n.logo),r=$(`span`,{className:[e?`workspace-provider-logo`:n.profile?`workspace-agent-profile`:`workspace-chip`,n.tone].filter(Boolean).join(` `),title:n.title});if(e&&(r.setAttribute(`role`,`img`),r.setAttribute(`aria-label`,n.ariaLabel??n.label)),n.logo){let t=document.createElement(`img`);t.className=e?`workspace-provider-logo-image`:n.profile?`workspace-agent-profile-logo`:`workspace-chip-logo`,t.src=n.logo,t.alt=``,t.setAttribute(`aria-hidden`,`true`),r.append(t)}e||r.append($(`span`,{className:`workspace-chip-label`,text:n.label})),t.append(r)}return t}function Ie(e){let t=e._meta?.tool;return f(t)?t:void 0}function Le(e){let t=e._meta?.card;return t&&typeof t==`object`?t:void 0}function Re(e){return e.structuredContent}function $(e,t={}){let n=document.createElement(e);return t.className&&(n.className=t.className),t.text!==void 0&&(n.textContent=t.text),t.type!==void 0&&`type`in n&&n.setAttribute(`type`,t.type),t.title!==void 0&&(n.title=t.title),t.ariaHidden!==void 0&&n.setAttribute(`aria-hidden`,t.ariaHidden),t.ariaLabel!==void 0&&n.setAttribute(`aria-label`,t.ariaLabel),t.ariaExpanded!==void 0&&n.setAttribute(`aria-expanded`,t.ariaExpanded),t.disabled!==void 0&&`disabled`in n&&(n.disabled=t.disabled),n}export{se as n,le as r,ue as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.forgerelay-panel{border:1px solid var(--tool-card-border);background:var(--tool-card-header-bg);width:100%;color:var(--color-text-primary,#f5f5f6);border-radius:12px;overflow:hidden}.workspace-panel{background:var(--tool-card-header-bg);width:100%}.workspace-panel-header{grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:58px;padding:9px 12px;display:grid}.workspace-panel-icon{background:color-mix(in srgb, var(--tool-accent) 9%, transparent);width:22px;height:22px;color:color-mix(in srgb, var(--tool-accent) 72%, var(--color-text-tertiary,#a3a3aa));border-radius:6px;place-items:center;display:grid}.workspace-panel-icon-svg{stroke-width:1.8px;width:14px;height:14px}.workspace-panel-title-group{gap:2px;min-width:0;display:grid}.workspace-panel-title{font-size:var(--font-text-sm-size,14px);font-weight:600;line-height:1.3}.workspace-panel-subtitle,.workspace-panel-mode{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,11px);line-height:1.35}.workspace-panel-subtitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.workspace-panel-mode{border:1px solid color-mix(in srgb, var(--tool-card-divider) 76%, transparent);white-space:nowrap;border-radius:999px;padding:2px 7px}.workspace-panel .workspace-details{border-top:1px solid var(--tool-card-divider);background:var(--tool-card-body-bg);max-height:none}.workspace-panel-pending-dot{background:var(--color-text-info,#38bdf8);width:8px;height:8px;box-shadow:0 0 0 3px color-mix(in srgb, var(--color-text-info,#38bdf8) 12%, transparent);border-radius:999px;justify-self:center}.activity-panel{border:1px solid var(--tool-card-border);background:var(--tool-card-header-bg);width:100%;color:var(--color-text-primary,#f5f5f6);border-radius:12px;overflow:hidden}.forgerelay-panel .activity-panel{border:0;border-top:1px solid var(--tool-card-divider);border-radius:0}.activity-panel-header{width:100%;min-height:58px;color:inherit;cursor:pointer;font:inherit;text-align:left;background:0 0;border:0;grid-template-columns:14px minmax(0,1fr) auto 20px;align-items:center;gap:10px;padding:9px 12px;display:grid}.activity-panel-header:hover{background:var(--tool-card-hover-bg)}.activity-panel-header:focus-visible{outline:2px solid color-mix(in srgb, var(--color-text-info,#38bdf8) 72%, transparent);outline-offset:-2px}.activity-panel-header-pending{cursor:default}.activity-panel-header-pending:hover{background:0 0}.activity-panel-pending-spacer{width:20px}.activity-panel-status{background:var(--color-text-info,#38bdf8);width:8px;height:8px;box-shadow:0 0 0 3px color-mix(in srgb, var(--color-text-info,#38bdf8) 12%, transparent);border-radius:9999px;justify-self:center}.activity-panel-status.state-done{background:var(--color-success-text,#6fda83);box-shadow:0 0 0 3px color-mix(in srgb, var(--color-success-text,#6fda83) 12%, transparent)}.activity-panel-status.state-error{background:var(--color-danger-text,#ee7676);box-shadow:0 0 0 3px color-mix(in srgb, var(--color-danger-text,#ee7676) 12%, transparent)}.activity-panel-title-group{gap:2px;min-width:0;display:grid}.activity-panel-title{font-size:var(--font-text-sm-size,14px);font-weight:600;line-height:1.3}.activity-panel-subtitle,.activity-panel-count{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,11px);line-height:1.35}.activity-panel-count{white-space:nowrap;font-weight:600}.activity-panel-count.state-working{color:var(--color-text-info,#38bdf8)}.activity-panel-count.state-done{color:var(--color-success-text,#6fda83)}.activity-panel-count.state-error{color:var(--color-danger-text,#ee7676)}.activity-panel-body{border-top:1px solid var(--tool-card-divider);background:var(--tool-card-body-bg);display:grid}.activity-viewport{overscroll-behavior:contain;max-height:420px;overflow:hidden auto}.activity-list{display:grid}.activity-group+.activity-group{border-top:1px solid var(--tool-card-divider)}.activity-group.grouped>.activity-row.parent{background:color-mix(in srgb, var(--color-background-secondary,#272727) 54%, transparent)}.activity-children{border-top:1px solid color-mix(in srgb, var(--tool-card-divider) 72%, transparent);display:grid}.activity-row{--activity-accent:var(--color-text-secondary,#b6b6bd);--activity-phase:var(--color-text-tertiary,#a3a3aa);width:100%;min-height:46px;color:inherit;font:inherit;text-align:left;background:0 0;border:0;grid-template-columns:28px minmax(0,1fr) auto 16px;align-items:center;gap:10px;padding:7px 12px;display:grid}.activity-row.interactive{cursor:pointer}.activity-row.interactive:hover{background:var(--tool-card-hover-bg)}.activity-row.interactive:focus-visible{outline:2px solid color-mix(in srgb, var(--activity-accent) 68%, transparent);outline-offset:-2px}.activity-row.child{padding-left:34px;position:relative}.activity-row.child:before{background:color-mix(in srgb, var(--activity-accent) 26%, var(--tool-card-divider));content:"";width:1px;position:absolute;top:0;bottom:0;left:20px}.activity-row.child+.activity-row.child{border-top:1px solid color-mix(in srgb, var(--tool-card-divider) 52%, transparent)}.activity-row.kind-read{--activity-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 32%, #06b6d4 68%)}.activity-row.kind-write{--activity-accent:var(--color-success-text,#6fda83)}.activity-row.kind-edit,.activity-row.kind-rename{--activity-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 28%, #d99742 72%)}.activity-row.kind-delete{--activity-accent:var(--color-danger-text,#ee7676)}.activity-row.kind-shell{--activity-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 42%, #64748b 58%)}.activity-row.kind-shell-result{--activity-accent:color-mix(in srgb, var(--color-success-text,#6fda83) 72%, var(--color-text-secondary,#b6b6bd))}.activity-row.kind-capability{--activity-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 34%, #3b82f6 66%)}.activity-row.kind-batch{--activity-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 34%, #8b5cf6 66%)}.activity-row.phase-executing{--activity-phase:var(--color-text-info,#38bdf8)}.activity-row.phase-returned{--activity-phase:var(--color-warning-text,#e6b566)}.activity-row.phase-done{--activity-phase:var(--color-success-text,#6fda83)}.activity-row.phase-error{--activity-phase:var(--color-danger-text,#ee7676)}.activity-row.phase-executing{box-shadow:inset 2px 0 0 color-mix(in srgb, var(--activity-phase) 76%, transparent);background:color-mix(in srgb, var(--activity-phase) 5%, transparent)}.activity-row.phase-returned{box-shadow:inset 2px 0 0 color-mix(in srgb, var(--activity-phase) 68%, transparent)}.activity-row.phase-error{box-shadow:inset 2px 0 0 color-mix(in srgb, var(--activity-phase) 72%, transparent)}.activity-row.shell-result{box-shadow:inset 2px 0 0 color-mix(in srgb, var(--activity-accent) 68%, transparent)}.activity-icon{border:1px solid color-mix(in srgb, var(--activity-accent) 18%, transparent);background:color-mix(in srgb, var(--activity-accent) 9%, transparent);width:28px;height:28px;color:var(--activity-accent);border-radius:7px;place-items:center;display:grid}.activity-icon-svg{stroke-width:1.8px;width:15px;height:15px}.activity-main{gap:4px;min-width:0;display:grid}.activity-title-line{align-items:baseline;gap:8px;min-width:0;display:flex}.activity-title{color:var(--color-text-primary,#f5f5f6);font-size:var(--font-text-sm-size,12px);flex:none;font-weight:600;line-height:1.35}.activity-member{color:var(--color-text-secondary,#d4d4d8);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,10px);flex:none;line-height:1.4}.activity-target{min-width:0;color:var(--color-text-tertiary,#a3a3aa);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,11px);text-overflow:ellipsis;white-space:nowrap;line-height:1.4;overflow:hidden}.activity-meta{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,10px);font-variant-numeric:tabular-nums;white-space:nowrap;justify-content:flex-end;align-items:center;gap:8px;display:inline-flex}.activity-phase{color:var(--activity-phase);align-items:center;gap:5px;display:inline-flex}.activity-phase:before{content:"";background:currentColor;border-radius:9999px;width:6px;height:6px}.activity-progress-wrap{grid-template-columns:auto minmax(48px,110px);align-items:center;gap:8px;max-width:220px;display:grid}.activity-progress-counts{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,10px);font-variant-numeric:tabular-nums;white-space:nowrap}.activity-progress-track{background:color-mix(in srgb, var(--activity-accent) 14%, var(--tool-card-divider));border-radius:9999px;height:3px;display:block;overflow:hidden}.activity-progress-fill{border-radius:inherit;background:var(--activity-accent);height:100%;display:block}.activity-empty,.activity-refresh-error{color:var(--color-text-secondary,#b7b7bf);font-size:var(--font-text-sm-size,12px);padding:12px}.activity-refresh-error{border-top:1px solid var(--tool-card-divider);color:var(--color-danger-text,#ee7676)}.activity-detail-chevron,.activity-detail-spacer,.activity-detail-chevron.chevron{width:16px;height:16px}.activity-detail-chevron .icon-svg{width:13px;height:13px}.activity-entry.expanded>.activity-row{background:color-mix(in srgb, var(--activity-accent) 6%, transparent)}.activity-detail{border-top:1px solid color-mix(in srgb, var(--tool-card-divider) 72%, transparent);background:color-mix(in srgb, var(--color-background-primary,#101114) 90%, transparent);display:grid}.activity-detail-section+.activity-detail-section{border-top:1px solid color-mix(in srgb, var(--tool-card-divider) 62%, transparent)}.activity-detail-rich{min-width:0;overflow:hidden}.activity-detail-rich .pierre-diff,.activity-detail-rich .pierre-file{border-radius:0}.activity-detail-label{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,10px);letter-spacing:.02em;padding:8px 12px 0;font-weight:600}.activity-detail-section.error .activity-detail-label,.activity-detail-section.error .activity-detail-value{color:var(--color-danger-text,#ee7676)}.activity-detail-value{max-height:260px;color:var(--color-text-secondary,#c7c7ce);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,11px);white-space:pre-wrap;overflow-wrap:break-word;margin:0;padding:6px 12px 10px;line-height:1.5;overflow:auto}.activity-detail-status{color:var(--color-text-secondary,#b7b7bf);font-size:var(--font-text-sm-size,12px);padding:10px 12px}.activity-detail-status.error{color:var(--color-danger-text,#ee7676)}.activity-terminal{background:var(--color-background-primary,#101114)}.activity-terminal-command,.activity-terminal-output{color:var(--color-text-primary,#f5f5f6);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,11px);white-space:pre-wrap;overflow-wrap:break-word;background:0 0;border:0;border-radius:0;margin:0;line-height:1.55}.activity-terminal-command{border-bottom:1px solid color-mix(in srgb, var(--tool-card-divider) 74%, transparent);color:var(--color-text-secondary,#c7c7ce);padding:9px 12px}.activity-terminal-output{max-height:320px;padding:10px 12px;overflow:auto}.activity-terminal-meta{border-top:1px solid color-mix(in srgb, var(--tool-card-divider) 74%, transparent);color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,10px);font-variant-numeric:tabular-nums;padding:7px 12px}.activity-terminal-meta.status-running{color:var(--color-text-info,#38bdf8)}.activity-terminal-meta.status-done{color:var(--color-success-text,#6fda83)}.activity-terminal-meta.status-failed{color:var(--color-danger-text,#ee7676)}@media (width<=520px){.activity-panel-header{grid-template-columns:12px minmax(0,1fr) auto 18px;gap:8px;min-height:54px;padding:8px 10px}.activity-panel-subtitle,.activity-panel-count{font-size:10px}.activity-row{grid-template-columns:26px minmax(0,1fr) 18px;gap:6px 8px;min-height:48px;padding:8px 10px}.activity-row.child{padding-left:28px}.activity-row.child:before{left:16px}.activity-icon{align-self:start;width:26px;height:26px}.activity-title-line{gap:2px;display:grid}.activity-meta{grid-column:2;justify-content:flex-start}.activity-detail-chevron,.activity-detail-spacer{grid-area:1/3/span 2}.activity-progress-wrap{grid-template-columns:auto minmax(40px,1fr);max-width:none}}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;font-family:var(--font-sans,ui-sans-serif, system-ui, sans-serif);color:var(--color-text-primary,#f5f5f6);--tool-card-border:color-mix(in srgb, var(--color-border-primary,#414141) 74%, transparent);--tool-card-header-bg:color-mix(in srgb, var(--color-background-secondary,#272727) 88%, transparent);--tool-card-body-bg:color-mix(in srgb, var(--color-background-primary,#181818) 94%, transparent);--tool-card-hover-bg:color-mix(in srgb, var(--color-background-tertiary,#343434) 46%, transparent);--tool-card-divider:color-mix(in srgb, var(--color-border-primary,#414141) 66%, transparent);--tool-accent:var(--color-text-secondary,#b6b6bd);--scrollbar-thumb:color-mix(in srgb, var(--color-text-tertiary,#8a8a8a) 56%, transparent);--scrollbar-thumb-hover:color-mix(in srgb, var(--color-text-secondary,#a8a8a8) 82%, transparent);background:0 0}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}*{box-sizing:border-box}html,body{background:0 0;margin:0;overflow:hidden}.shell{width:100%;padding:0;overflow:hidden}.empty,.tool-card{--tool-accent-soft:color-mix(in srgb, var(--tool-accent) 12%, transparent);border:1px solid var(--tool-card-border);background:var(--tool-card-header-bg);width:100%;box-shadow:none;color:var(--color-text-primary,#f5f5f6);border-radius:12px;overflow:hidden}.tool-card.workspace,.tool-card.directory{--tool-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 34%, #3b82f6 66%)}.tool-card.read,.tool-card.search{--tool-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 32%, #06b6d4 68%)}.tool-card.write{--tool-accent:var(--color-success-text,#6fda83)}.tool-card.edit,.tool-card.review{--tool-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 28%, #d99742 72%)}.tool-card.delete{--tool-accent:var(--color-danger-text,#ee7676)}.tool-card.shell{--tool-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 42%, #64748b 58%)}.tool-card.state-success{--tool-accent:var(--color-success-text,#6fda83)}.tool-card.state-error{--tool-accent:var(--color-danger-text,#ee7676)}.tool-card.state-running{--tool-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 30%, #38bdf8 70%)}@supports selector(::-webkit-scrollbar){.pretty-scrollbar::-webkit-scrollbar{width:12px;height:12px}.pretty-scrollbar::-webkit-scrollbar-button{width:0;height:0;display:none}.pretty-scrollbar::-webkit-scrollbar-track{background:0 0}.pretty-scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);background-clip:content-box;border:4px solid #0000;border-radius:9999px}.pretty-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover)}.pretty-scrollbar::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-hover)}.pretty-scrollbar::-webkit-scrollbar-corner{background:0 0}}.empty{color:var(--color-text-secondary,#b6b6bd);font-size:var(--font-text-sm-size,13px);padding:14px 16px}.tool-header{width:100%;min-height:64px;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;border-radius:11px;grid-template-columns:40px minmax(0,1fr) auto 20px;align-items:center;gap:12px;padding:10px 12px;display:grid}.tool-header:focus-visible,.review-diff-file-header:focus-visible,.review-more:focus-visible{outline:2px solid color-mix(in srgb, var(--tool-accent) 72%, transparent);outline-offset:-2px}.tool-header:hover:not(:disabled){background:var(--tool-card-hover-bg)}.tool-header:disabled{cursor:default}.tool-icon{border:1px solid color-mix(in srgb, var(--tool-accent) 18%, transparent);background:var(--tool-accent-soft);width:40px;height:40px;color:var(--tool-accent);border-radius:10px;place-items:center;display:grid}.icon-svg{stroke-width:1.8px;width:20px;height:20px;display:block}.tool-main{gap:2px;min-width:0;display:grid}.tool-title{color:var(--color-text-primary,#f5f5f6);font-size:var(--font-text-sm-size,14px);font-weight:550;line-height:1.3}.tool-label{color:var(--color-text-tertiary,#a3a3aa);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,12px);text-overflow:ellipsis;white-space:nowrap;line-height:1.4;overflow:hidden}.stats{font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,12px);font-variant-numeric:tabular-nums;white-space:nowrap;align-items:center;gap:5px;display:inline-flex}.header-meta{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-sm-size,12px);text-align:right;white-space:nowrap;line-height:1.35}.header-meta.empty{width:0}.add{color:var(--color-success-text,#6fda83)}.remove{color:var(--color-danger-text,#ee7676)}.chevron{width:20px;height:20px;color:var(--color-text-tertiary,#a3a3aa);border-radius:7px;place-items:center;transition:background .14s,color .14s,transform .14s;display:grid}.tool-header:hover:not(:disabled) .chevron{color:var(--color-text-primary,#f5f5f6)}.chevron .icon-svg{width:15px;height:15px}.chevron.expanded{transform:rotate(180deg)}.chevron.loading{transform:none}.chevron.loading .icon-svg{fill:none;stroke-linecap:round;stroke-dasharray:38 14;animation:.7s linear infinite payload-spinner}@keyframes payload-spinner{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.chevron.loading .icon-svg{animation:none}}.tool-body{border-top:1px solid var(--tool-card-divider);background:var(--tool-card-body-bg)}.workspace-details{max-height:420px;display:grid;overflow:auto}.workspace-rows{padding:4px 0;display:grid}.workspace-row{--workspace-row-accent:var(--tool-accent);grid-template-columns:22px minmax(116px,.24fr) minmax(0,1fr);align-items:center;gap:10px;min-height:40px;padding:7px 12px;display:grid}.workspace-row-icon{background:color-mix(in srgb, var(--workspace-row-accent) 9%, transparent);width:22px;height:22px;color:color-mix(in srgb, var(--workspace-row-accent) 72%, var(--color-text-tertiary,#a3a3aa));border-radius:6px;place-items:center;display:grid}.workspace-row-icon-svg{stroke-width:1.8px;width:14px;height:14px}.workspace-key{min-height:22px;color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-sm-size,12px);align-items:center;font-weight:500;display:flex}.workspace-value{min-width:0;color:var(--color-text-secondary,#c7c7ce);font-size:var(--font-text-sm-size,12px);text-overflow:ellipsis;white-space:nowrap;line-height:1.45;overflow:hidden}.workspace-value.mono{font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace)}.workspace-base-value{align-items:center;gap:7px;min-width:0;display:flex}.workspace-base-value .workspace-value{flex:0 auto}.workspace-base-warning{width:18px;height:18px;color:var(--color-warning-text,#e6b566);cursor:help;flex:none;place-items:center;display:grid}.workspace-base-warning-svg{stroke-width:2px;width:14px;height:14px}.workspace-chip-list{flex-wrap:nowrap;align-items:center;gap:6px;min-width:0;display:flex;overflow:hidden}.workspace-chip{border:1px solid color-mix(in srgb, var(--tool-accent) 16%, var(--tool-card-divider));background:color-mix(in srgb, var(--tool-accent) 7%, transparent);max-width:100%;min-height:24px;color:var(--color-text-secondary,#c7c7ce);text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;flex:none;align-items:center;gap:5px;padding:3px 8px;font-size:11px;line-height:1.25;display:inline-flex;overflow:hidden}.workspace-chip-logo{object-fit:contain;flex:none;width:13px;height:13px;display:block}.workspace-chip-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.workspace-agent-profile{border:0;border-bottom:1px solid color-mix(in srgb, var(--tool-accent) 34%, var(--tool-card-divider));max-width:100%;min-height:24px;color:var(--color-text-secondary,#c7c7ce);white-space:nowrap;background:0 0;border-radius:0;align-items:center;gap:5px;padding:3px 2px 4px;font-size:11px;line-height:1.25;display:inline-flex;overflow:hidden}.workspace-agent-profile-logo{object-fit:contain;flex:none;width:14px;height:14px;display:block}.workspace-agent-profile:hover{border-bottom-color:var(--tool-accent);color:var(--color-text-primary,#f5f5f6)}.workspace-agent-profile.muted{color:var(--color-text-tertiary,#a3a3aa);opacity:.72;border-bottom-style:dashed}.workspace-provider-logo{cursor:help;flex:none;place-items:center;width:20px;height:24px;display:inline-grid}.workspace-provider-logo-image{object-fit:contain;width:16px;height:16px;display:block}.workspace-provider-logo.muted{opacity:.62}.workspace-chip.muted{color:var(--color-text-tertiary,#a3a3aa);opacity:.72;border-style:dashed}.workspace-skills-row,.workspace-instructions-row,.workspace-agents-row{align-items:start}.workspace-instructions-row{--workspace-row-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 28%, #d99742 72%)}.workspace-skills-row{--workspace-row-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 28%, #14b8a6 72%)}.workspace-agents-row{--workspace-row-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 30%, #8b5cf6 70%)}.workspace-skills-row .workspace-chip,.workspace-agents-row .workspace-chip,.workspace-agents-row .workspace-agent-profile{border-color:color-mix(in srgb, var(--workspace-row-accent) 28%, var(--tool-card-divider))}.workspace-skills-row .workspace-chip{background:color-mix(in srgb, var(--workspace-row-accent) 7%, transparent)}.workspace-skills-list,.workspace-agents-list{flex-wrap:wrap;overflow:visible}.workspace-instruction-status{border-radius:5px;flex:none;place-items:center;width:18px;height:18px;display:grid}.workspace-instruction-status.loaded{background:color-mix(in srgb, var(--color-success-text,#6fda83) 12%, transparent);color:var(--color-success-text,#6fda83)}.workspace-instruction-status.available{background:color-mix(in srgb, var(--color-text-tertiary,#a3a3aa) 9%, transparent);color:var(--color-text-tertiary,#a3a3aa)}.workspace-instruction-status-svg{stroke-width:1.9px;width:12px;height:12px}.workspace-instruction-list{border:1px solid var(--tool-card-divider);background:color-mix(in srgb, var(--tool-card-body-bg) 88%, transparent);border-radius:9px;min-width:0;display:grid;overflow:hidden}.workspace-instructions-content{min-width:0;display:block}.workspace-instructions-toggle{border:0;border-top:1px solid var(--tool-card-divider);background:color-mix(in srgb, var(--tool-card-body-bg) 72%, transparent);width:100%;min-height:32px;color:var(--tool-accent);cursor:pointer;font:inherit;font-size:var(--font-text-sm-size,11px);white-space:nowrap;border-radius:0 0 9px 9px;justify-content:center;align-items:center;padding:6px 10px;font-weight:550;line-height:1.25;display:flex}.workspace-instructions-toggle:hover{background:var(--tool-card-hover-bg)}.workspace-instructions-toggle:focus-visible{outline:2px solid color-mix(in srgb, var(--tool-accent) 72%, transparent);outline-offset:2px}.workspace-instruction-item+.workspace-instruction-item{border-top:1px solid var(--tool-card-divider)}.workspace-instruction-header{width:100%;min-width:0;color:inherit;font:inherit;text-align:left;background:0 0;border:0;grid-template-columns:22px minmax(0,1fr) 18px;align-items:center;gap:9px;padding:8px 10px;display:grid}.workspace-instruction-header.interactive{cursor:pointer}.workspace-instruction-header.interactive:hover{background:var(--tool-card-hover-bg)}.workspace-instruction-header.interactive:focus-visible{outline:2px solid color-mix(in srgb, var(--tool-accent) 72%, transparent);outline-offset:-2px}.workspace-instruction-text{gap:2px;min-width:0;display:grid}.workspace-instruction-name{min-width:0;color:var(--color-text-primary,#f5f5f6);font-size:var(--font-text-sm-size,12px);text-overflow:ellipsis;white-space:nowrap;font-weight:550;overflow:hidden}.workspace-instruction-path{min-width:0;color:var(--color-text-tertiary,#a3a3aa);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.35;overflow:hidden}.workspace-instruction-chevron{width:18px;height:18px;color:var(--color-text-tertiary,#a3a3aa);place-items:center;transition:transform .14s;display:grid}.workspace-instruction-item.expanded .workspace-instruction-chevron{transform:rotate(180deg)}.workspace-instruction-chevron-svg{width:14px;height:14px}.workspace-instruction-preview{border-top:1px solid var(--tool-card-divider);background:color-mix(in srgb, var(--color-background-primary,#101114) 92%, transparent);max-height:300px;color:var(--color-text-secondary,#c7c7ce);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);white-space:pre-wrap;overflow-wrap:break-word;margin:0;padding:10px 12px;font-size:11px;line-height:1.55;overflow:auto}.workspace-instruction-preview[hidden]{display:none}.review-header{grid-template-columns:40px minmax(0,1fr) auto 20px}.review-title-group{gap:3px;min-width:0;display:grid}.review-summary{border-top:1px solid var(--tool-card-divider);background:var(--tool-card-body-bg);display:grid}.review-diff-file-stats{align-items:center;gap:8px;display:flex}.review-empty{color:var(--color-text-secondary,#b7b7bf);font-size:var(--font-text-sm-size,13px)}.review-more{border:0;border-top:1px solid var(--tool-card-divider);width:100%;min-height:40px;color:var(--color-text-tertiary,#a3a3aa);cursor:pointer;font:inherit;font-size:var(--font-text-sm-size,12px);text-align:left;background:0 0;padding:0 12px}.review-more:hover{background:var(--tool-card-hover-bg);color:var(--color-text-primary,#f5f5f6)}.review-diff{max-height:520px;display:grid;overflow:hidden auto}.review-diff-files{gap:0;padding:0;display:grid}.review-diff-file{border:0;border-radius:0;overflow:hidden}.review-diff-file+.review-diff-file{border-top:1px solid var(--tool-card-divider)}.review-diff-file-header{width:100%;min-height:42px;color:var(--color-text-primary,#f5f5f6);cursor:pointer;font:inherit;text-align:left;background:0 0;border:0;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:10px;padding:0 12px;display:grid}.review-file-kind{background:color-mix(in srgb, var(--color-text-tertiary,#a3a3aa) 10%, transparent);width:20px;height:20px;color:var(--color-text-tertiary,#a3a3aa);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);border-radius:6px;align-self:center;place-items:center;font-size:10px;font-weight:700;display:grid}.review-file-kind.added{background:color-mix(in srgb, var(--color-success-text,#6fda83) 12%, transparent);color:var(--color-success-text,#6fda83)}.review-file-kind.edited,.review-file-kind.renamed,.review-file-kind.renamed-edited{background:color-mix(in srgb, var(--color-warning-text,#e6b566) 12%, transparent);color:var(--color-warning-text,#e6b566)}.review-file-kind.deleted{background:color-mix(in srgb, var(--color-danger-text,#ee7676) 12%, transparent);color:var(--color-danger-text,#ee7676)}.review-single-file{overflow:hidden}.review-diff-file-header:hover{background:var(--tool-card-hover-bg)}.review-diff-file-name,.review-diff-file-stats{text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:20px;overflow:hidden}.review-diff-file-name{font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace)}.review-diff-file-name.renamed{text-overflow:clip;align-items:center;gap:6px;min-width:0;display:flex}.review-diff-file-path{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:calc(50% - 10px);overflow:hidden}.review-diff-file-path.previous{color:var(--color-text-tertiary,#a3a3aa)}.review-diff-file-path.current{color:var(--color-text-primary,#f5f5f6)}.review-diff-file-arrow{color:var(--color-text-tertiary,#a3a3aa);font-family:var(--font-sans,ui-sans-serif, system-ui, sans-serif);flex:none}.review-diff-file-stats{font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-sm-size,12px);font-variant-numeric:tabular-nums;justify-content:flex-end;overflow:visible}.status{font-size:var(--font-text-sm-size,12px);padding:10px 12px}.status.muted{color:var(--color-text-secondary,#b7b7bf)}.status.error{color:var(--color-danger-text,#ee7676)}.pierre-diff,.pierre-file{--diffs-bg:var(--tool-payload-bg,var(--color-background-primary,#101114));--diffs-light-bg:var(--color-background-primary,#fff);--diffs-dark-bg:var(--tool-payload-bg,var(--color-background-primary,#101114));--diffs-font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);--diffs-header-font-family:var(--font-sans,ui-sans-serif, system-ui, sans-serif);--diffs-font-size:var(--font-text-sm-size,12px);--diffs-line-height:20px;border-bottom-right-radius:8px;border-bottom-left-radius:8px;max-height:420px;display:block;overflow:auto}.text-payload{max-height:420px;color:var(--color-text-secondary,#c7c7ce);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-sm-size,12px);white-space:pre-wrap;overflow-wrap:break-word;margin:0;padding:10px 12px;line-height:1.55;overflow:auto}.text-payload.bash{color:var(--color-text-primary,#f5f5f6);background:var(--color-background-primary,#101114)}@media (width<=520px){.tool-header{grid-template-columns:36px minmax(0,1fr) auto 18px;gap:9px;min-height:58px;padding:9px 10px}.tool-icon{border-radius:9px;width:36px;height:36px}.chevron{width:18px;height:18px}.review-header{grid-template-columns:36px minmax(0,1fr) auto 18px}.workspace-row{grid-template-columns:22px minmax(0,1fr);gap:2px 8px;padding-block:8px}.workspace-row-icon{grid-row:1/span 2;align-self:start}.workspace-row>.workspace-key,.workspace-row>.workspace-value,.workspace-row>.workspace-chip-list,.workspace-row>.workspace-instructions-content{grid-column:2}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./workspace-app-BLW7p6IZ.js";import"./workspace-app-CmaYU4DW.js";document.documentElement.dataset.forgerelayApp=`workspace-lifecycle-compatibility`;
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>ForgeRelay Diff</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/workspace-app-
|
|
7
|
+
<script type="module" crossorigin src="./assets/workspace-app-BjNqR0en.js"></script>
|
|
8
8
|
<link rel="modulepreload" crossorigin href="./assets/chunk-EyZ2wyi3.js">
|
|
9
|
-
<link rel="modulepreload" crossorigin href="./assets/workspace-app-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/workspace-app-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="./assets/workspace-app-
|
|
9
|
+
<link rel="modulepreload" crossorigin href="./assets/workspace-app-BLW7p6IZ.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/workspace-app-CmaYU4DW.js">
|
|
11
|
+
<link rel="stylesheet" crossorigin href="./assets/workspace-app-D2bJ5fjt.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<main id="app" class="shell">
|
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>ForgeRelay Workspace Lifecycle</title>
|
|
7
|
-
<script type="module" crossorigin src="./assets/workspace-lifecycle-app-
|
|
7
|
+
<script type="module" crossorigin src="./assets/workspace-lifecycle-app-BVbI2Ilf.js"></script>
|
|
8
8
|
<link rel="modulepreload" crossorigin href="./assets/chunk-EyZ2wyi3.js">
|
|
9
|
-
<link rel="modulepreload" crossorigin href="./assets/workspace-app-
|
|
10
|
-
<link rel="modulepreload" crossorigin href="./assets/workspace-app-
|
|
11
|
-
<link rel="stylesheet" crossorigin href="./assets/workspace-app-
|
|
9
|
+
<link rel="modulepreload" crossorigin href="./assets/workspace-app-BLW7p6IZ.js">
|
|
10
|
+
<link rel="modulepreload" crossorigin href="./assets/workspace-app-CmaYU4DW.js">
|
|
11
|
+
<link rel="stylesheet" crossorigin href="./assets/workspace-app-D2bJ5fjt.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body>
|
|
14
14
|
<main id="app" class="shell">
|
package/dist/workspaces.js
CHANGED
|
@@ -700,6 +700,7 @@ export class WorkspaceRegistry {
|
|
|
700
700
|
workspace.scannedInstructionDirs.clear();
|
|
701
701
|
workspace.knownInstructionPathsByDir.clear();
|
|
702
702
|
workspace.loadedInstructionRealPaths.clear();
|
|
703
|
+
workspace.loadedInstructionPaths.clear();
|
|
703
704
|
const agentsFiles = await this.loadInitialAgentsFiles(workspace);
|
|
704
705
|
const availableAgentsFiles = await this.findAvailableAgentsFiles(workspace, agentsFiles);
|
|
705
706
|
const { contextFingerprint, componentFingerprints: bootstrapComponentFingerprints, } = bootstrapContextFingerprints(workspace, agentsFiles, availableAgentsFiles);
|
|
@@ -870,6 +871,7 @@ export class WorkspaceRegistry {
|
|
|
870
871
|
scannedInstructionDirs: new Set(),
|
|
871
872
|
knownInstructionPathsByDir: new Map(),
|
|
872
873
|
loadedInstructionRealPaths: new Set(),
|
|
874
|
+
loadedInstructionPaths: new Set(),
|
|
873
875
|
};
|
|
874
876
|
if (touch)
|
|
875
877
|
this.store?.touchSession(session.id);
|
|
@@ -980,6 +982,7 @@ export class WorkspaceRegistry {
|
|
|
980
982
|
scannedInstructionDirs: new Set(),
|
|
981
983
|
knownInstructionPathsByDir: new Map(),
|
|
982
984
|
loadedInstructionRealPaths: new Set(),
|
|
985
|
+
loadedInstructionPaths: new Set(),
|
|
983
986
|
};
|
|
984
987
|
this.store?.createSession({
|
|
985
988
|
id: workspace.id,
|
|
@@ -1047,6 +1050,7 @@ export class WorkspaceRegistry {
|
|
|
1047
1050
|
path: systemInstructionsPath,
|
|
1048
1051
|
content: systemInstructions,
|
|
1049
1052
|
});
|
|
1053
|
+
workspace.loadedInstructionPaths.add(systemInstructionsPath);
|
|
1050
1054
|
if (systemInstructionsRealPath) {
|
|
1051
1055
|
workspace.loadedInstructionRealPaths.add(systemInstructionsRealPath);
|
|
1052
1056
|
}
|
|
@@ -1162,6 +1166,7 @@ export class WorkspaceRegistry {
|
|
|
1162
1166
|
throw error;
|
|
1163
1167
|
}
|
|
1164
1168
|
workspace.loadedInstructionRealPaths.add(realPath);
|
|
1169
|
+
workspace.loadedInstructionPaths.add(path);
|
|
1165
1170
|
loaded.push({ path, content });
|
|
1166
1171
|
}
|
|
1167
1172
|
return loaded;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akira-tl/forgerelay",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.8",
|
|
4
4
|
"description": "Local development control plane for MCP coding agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"homepage": "https://github.com/Akira-TL/forgerelay#readme",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"release:push-ready": "node scripts/release/push-ready.mjs",
|
|
52
52
|
"postinstall": "node scripts/fix-node-pty-permissions.mjs",
|
|
53
53
|
"start": "node dist/cli.js serve",
|
|
54
|
-
"test": "node --test scripts/debug/runtime.test.mjs scripts/release-proof.test.mjs scripts/release/release-gate.test.mjs scripts/release/push-ready.test.mjs scripts/release/release-version.test.mjs && tsx src/oauth/router.test.ts && tsx src/remote-auth-cli.test.ts && tsx src/remote-ssh-auth-cli.test.ts && tsx src/remote-workspace-relay.test.ts && tsx src/remote-workspace-relay-process.test.ts && tsx src/config.test.ts && tsx src/lsp/language-server-config.test.ts && tsx src/lsp/normalization/hover.test.ts && tsx src/lsp/references.server.test.ts && tsx src/lsp/operations/document-symbols.server.test.ts && tsx src/lsp/operations/workspace-symbols.server.test.ts && tsx src/lsp/operations/diagnostics-push.server.test.ts && tsx src/lsp/operations/diagnostics-pull.server.test.ts && tsx src/lsp/operations/request-hardening.server.test.ts && tsx src/lsp/operations/recovery.server.test.ts && tsx src/lsp/operations/lifecycle.server.test.ts && tsx src/lsp/runtime/semantic-requests.test.ts && tsx src/logger.test.ts && tsx src/proxy-trust.test.ts && tsx src/mcp-app-template.test.ts && tsx src/hooks.test.ts && tsx src/capability-registry.test.ts && tsx src/mcp/server-instructions.test.ts && tsx src/request-meta.test.ts && tsx src/incoming-artifacts.test.ts && tsx src/artifact-download.test.ts && tsx src/ui/card-types.test.ts && tsx src/ui/workspace-lifecycle-app.test.ts && tsx src/ui/activity/model.test.ts && tsx src/ui/patch-display.test.ts && tsx src/ui/tool-display.test.ts && tsx src/apply-patch.test.ts && tsx src/process-platform.test.ts && tsx src/process-sessions.test.ts && tsx src/mcp-sessions.test.ts && tsx src/server-shutdown.test.ts && tsx src/subagents/providers/adapters/codex.test.ts && tsx src/subagents/providers/registry.test.ts && tsx src/subagents/providers/availability.test.ts && tsx src/subagents/profiles.test.ts && tsx src/subagents/cli-target.test.ts && tsx src/subagents/sessions/store.test.ts && tsx src/subagents/sessions/manager.test.ts && tsx src/subagents/sessions/mcp/capability.server.test.ts && tsx src/subagents/sessions/mcp/continuation.server.test.ts && tsx src/subagents/sessions/mcp/lifecycle.server.test.ts && tsx src/subagents/sessions/mcp/reconciliation.server.test.ts && tsx src/subagents/sessions/mcp/routing.server.test.ts && tsx src/roots.test.ts && tsx src/file-mutations.test.ts && tsx src/operations/edit-preflight.test.ts && tsx src/skills.test.ts && tsx src/db/migrations.test.ts && tsx src/workspace-store.test.ts && tsx src/workspace-tasks.test.ts && tsx src/workspace-task-reminders.test.ts && tsx src/activity/audit-store.test.ts && tsx src/activity/bash-output-store.test.ts && tsx src/activity/lifecycle.test.ts && tsx src/activity/query-service.test.ts && tsx src/operations/core-operation-executor.test.ts && tsx src/operations/bulk-mutation.test.ts && tsx src/operations/batch/scheduler.test.ts && tsx src/operations/batch/executor-policy.test.ts && tsx src/workspaces.test.ts && tsx src/workspace-conversation.test.ts && tsx src/review-checkpoints.test.ts && tsx src/lsp/code-intelligence.server.test.ts && npm run build:app && tsx src/server.test.ts && tsx src/oauth-store.test.ts && tsx src/cli.test.ts",
|
|
54
|
+
"test": "node --test scripts/debug/runtime.test.mjs scripts/release-proof.test.mjs scripts/release/release-gate.test.mjs scripts/release/push-ready.test.mjs scripts/release/release-version.test.mjs && tsx src/oauth/router.test.ts && tsx src/remote-auth-cli.test.ts && tsx src/remote-ssh-auth-cli.test.ts && tsx src/remote-workspace-relay.test.ts && tsx src/remote-workspace-relay-process.test.ts && tsx src/config.test.ts && tsx src/lsp/language-server-config.test.ts && tsx src/lsp/normalization/hover.test.ts && tsx src/lsp/references.server.test.ts && tsx src/lsp/operations/document-symbols.server.test.ts && tsx src/lsp/operations/workspace-symbols.server.test.ts && tsx src/lsp/operations/diagnostics-push.server.test.ts && tsx src/lsp/operations/diagnostics-pull.server.test.ts && tsx src/lsp/operations/request-hardening.server.test.ts && tsx src/lsp/operations/recovery.server.test.ts && tsx src/lsp/operations/lifecycle.server.test.ts && tsx src/lsp/runtime/semantic-requests.test.ts && tsx src/logger.test.ts && tsx src/proxy-trust.test.ts && tsx src/mcp-app-template.test.ts && tsx src/hooks.test.ts && tsx src/capability-registry.test.ts && tsx src/mcp/server-instructions.test.ts && tsx src/request-meta.test.ts && tsx src/incoming-artifacts.test.ts && tsx src/artifact-download.test.ts && tsx src/ui/card-types.test.ts && tsx src/ui/workspace-lifecycle-app.test.ts && tsx src/ui/activity/model.test.ts && tsx src/ui/activity/detail-card.test.ts && tsx src/ui/patch-display.test.ts && tsx src/ui/tool-display.test.ts && tsx src/apply-patch.test.ts && tsx src/process-platform.test.ts && tsx src/process-sessions.test.ts && tsx src/mcp-sessions.test.ts && tsx src/server-shutdown.test.ts && tsx src/subagents/providers/adapters/codex.test.ts && tsx src/subagents/providers/registry.test.ts && tsx src/subagents/providers/availability.test.ts && tsx src/subagents/profiles.test.ts && tsx src/subagents/cli-target.test.ts && tsx src/subagents/sessions/store.test.ts && tsx src/subagents/sessions/manager.test.ts && tsx src/subagents/sessions/mcp/capability.server.test.ts && tsx src/subagents/sessions/mcp/continuation.server.test.ts && tsx src/subagents/sessions/mcp/lifecycle.server.test.ts && tsx src/subagents/sessions/mcp/reconciliation.server.test.ts && tsx src/subagents/sessions/mcp/routing.server.test.ts && tsx src/roots.test.ts && tsx src/file-mutations.test.ts && tsx src/operations/edit-preflight.test.ts && tsx src/skills.test.ts && tsx src/db/migrations.test.ts && tsx src/workspace-store.test.ts && tsx src/workspace-tasks.test.ts && tsx src/workspace-task-reminders.test.ts && tsx src/activity/audit-store.test.ts && tsx src/activity/bash-output-store.test.ts && tsx src/activity/lifecycle.test.ts && tsx src/activity/query-service.test.ts && tsx src/operations/core-operation-executor.test.ts && tsx src/operations/bulk-mutation.test.ts && tsx src/operations/batch/scheduler.test.ts && tsx src/operations/batch/executor-policy.test.ts && tsx src/workspaces.test.ts && tsx src/workspace-conversation.test.ts && tsx src/review-checkpoints.test.ts && tsx src/lsp/code-intelligence.server.test.ts && npm run build:app && tsx src/server.test.ts && tsx src/oauth-store.test.ts && tsx src/cli.test.ts",
|
|
55
55
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
56
56
|
"release:check": "node scripts/release-version.mjs check",
|
|
57
57
|
"release:tag-check": "node scripts/release-version.mjs tag",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./workspace-app-CxwJuZyS.js";import"./workspace-app-D6UR0AFl.js";document.documentElement.dataset.forgerelayApp=`historical-tool-card`;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./heavy-payload-CgzrutLm.js","./scrollbar-CbhpdW05.js","./chunk-EyZ2wyi3.js","./workspace-app-CxwJuZyS.js","./workspace-app-ldjBmCJR.css","./review-payload-BrLbezbq.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{a as e,c as t,d as n,i as r,l as i,n as a,o,s,t as c,u as l}from"./workspace-app-CxwJuZyS.js";function u(e){return e===`open_workspace`||e===`close_workspace`||e===`capability`||e===`apply_patch`||e===`exec_command`||e===`write_stdin`||e===`read`||e===`write`||e===`edit`||e===`rename`||e===`delete`||e===`grep`||e===`glob`||e===`ls`||e===`bash`}function d(e){return e===`read`}function f(e){return e===`write`}function p(e){return e===`edit`}function m(e){return e===`apply_patch`}function ee(e){return e===`bash`||e===`exec_command`||e===`write_stdin`}function h(e){return e.tool===`capability`&&e.capabilityName===`review.changes`}function te(e){return!!(e&&typeof e==`object`)}function ne(e){return e?.content?.map(e=>e.type===`text`?e.text??``:`[${e.mimeType??`image`} image payload]`).filter(Boolean).join(`
|
|
3
|
-
|
|
4
|
-
`)??``}function g(e,t){let n=e?.[t];return typeof n==`number`&&Number.isFinite(n)?n:void 0}function _(e){return e.tool===`open_workspace`?Number(e.summary?.agentsFiles??0)>0||Number(e.summary?.skills??0)>0||Number(e.summary?.agentProviders??0)>0||Number(e.summary?.agents??0)>0||!!e.agentsFiles?.length||!!e.availableAgentsFiles?.length||!!e.skills?.length||!!e.agentProviders?.length||!!e.agents?.length||!!e.worktree||!!e.instruction:h(e)?!!(e.files?.length||e.payload?.patch):m(e.tool)?!!e.payload?.patch:!!e.payload}function re(e){return e.tool===`open_workspace`||h(e)?_(e):m(e.tool)?e.files?.length===1&&_(e):!1}var ie={added:`Added`,edited:`Edited`,deleted:`Deleted`,renamed:`Renamed`,"renamed-edited":`Renamed and edited`};function ae(e,t={}){let n=e.files??[],r=le(n);if(r===0)return{title:t.emptyTitle??`Applied patch`,tone:`edit`};let i=new Set(n.map(v)),a=i.size===1?[...i][0]:void 0,o={title:ue(a,r),tone:de(a)};return a&&a!==`unknown`&&(o.iconKind=a),o}function v(e){switch(e.operation){case`add`:return`added`;case`update`:return`edited`;case`delete`:return`deleted`;case`move`:return`renamed`}switch(e.type){case`new`:return`added`;case`change`:return`edited`;case`deleted`:return`deleted`;case`rename-pure`:return`renamed`;case`rename-changed`:return`renamed-edited`;default:return`unknown`}}function oe(e,t,n){let r=v(t);if(r!==`edited`&&r!==`unknown`)return r;let i=e[n];return i?.operation===`move`&&(!t.path||i.path===t.path)||e.find(e=>e.operation===`move`&&e.path===t.path&&(!t.previousPath||e.previousPath===t.previousPath))?`renamed`:r===`edited`?`edited`:i?v(i):`unknown`}function y(e){let t=e.path??e.previousPath;if(!t)return;let n=e.previousPath;if(!n||n===t)return{current:t,title:t};let r=x(n)===x(t);return{current:r?S(t):t,previous:r?S(n):n,title:`${n} → ${t}`}}function se(e,t,n){let r=e[n],i=(r?.path===t.path?r:e.find(e=>e.path===t.path&&(!t.previousPath||!e.previousPath||e.previousPath===t.previousPath)))??r;return y({path:t.path??i?.path,previousPath:t.previousPath??i?.previousPath})}function ce(e){return e===`unknown`?`Changed`:ie[e]}function le(e){let t=new Set,n=0;for(let r of e){let e=r.path??r.previousPath;e?t.add(e):n+=1}return t.size+n}function ue(e,t){return e&&e!==`unknown`?`${ie[e]} ${t} ${b(t)}`:`Changed ${t} ${b(t)}`}function de(e){return e===`added`?`write`:e===`deleted`?`delete`:`edit`}function b(e){return e===1?`file`:`files`}function x(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t===-1?``:e.slice(0,t)}function S(e){let t=Math.max(e.lastIndexOf(`/`),e.lastIndexOf(`\\`));return t===-1?e:e.slice(t+1)}function fe(e){switch(e.tool){case`open_workspace`:return{icon:e.mode===`worktree`?o.gitBranch:o.folderOpen,title:he(e),label:e.kind===`composite`?e.name:e.root??e.path,tone:`workspace`};case`close_workspace`:return{icon:e.mode===`worktree`?o.gitBranch:o.folderOpen,title:e.kind===`composite`?`Dissolved composite workspace`:`Closed workspace`,label:e.kind===`composite`?e.name??e.workspaceId:e.sourceRoot??e.root??e.path??e.workspaceId,tone:`workspace`};case`read`:return{icon:o.readFile,title:`Read file`,label:e.path,tone:`read`};case`write`:return{icon:o.writeFile,title:`Wrote file`,label:e.path,tone:`write`};case`edit`:return{icon:o.editFile,title:`Edited file`,label:e.path,tone:`edit`};case`rename`:return{icon:o.editFile,title:`Renamed path`,label:e.path,tone:`edit`};case`delete`:return{icon:o.deleteFile,title:`Deleted path`,label:e.path,tone:`delete`};case`apply_patch`:{let t=ae(e);return{icon:me(t.iconKind),title:t.title,label:C(e),tone:t.tone}}case`grep`:return{icon:o.search,title:`Searched files`,label:ge(e),tone:`search`};case`glob`:return{icon:o.files,title:`Found files`,label:ge(e),tone:`search`};case`ls`:return{icon:o.folderTree,title:`Listed directory`,label:e.path,tone:`directory`};case`bash`:case`exec_command`:return{icon:o.terminalSquare,title:_e(e,`command`),label:w(e),tone:`shell`,state:ve(e)};case`write_stdin`:return{icon:o.terminal,title:_e(e,`process`),label:w(e),tone:`shell`,state:ve(e)};case`capability`:if(h(e)){let t=ae(e,{emptyTitle:`Changes ready`}),n=e.files?.length??0;return{icon:o.diff,title:n>0||e.payload?.patch?t.title:`No changes`,label:C(e),tone:`review`}}return{icon:o.skills,title:e.capabilityName?`Capability: ${e.capabilityName}`:`Capability completed`,tone:`workspace`}}}function pe(e){let t=e.summary??{};if(h(e)||m(e.tool)||p(e.tool)||f(e.tool))return{kind:`diff`,additions:g(t,`additions`)??0,removals:g(t,`removals`)??0};if(e.tool===`open_workspace`){let e=[T(g(t,`agentsFiles`),`instruction`),T(g(t,`skills`),`skill`)].filter(e=>!!e);return e.length>0?{kind:`text`,text:e.join(` · `)}:{kind:`empty`}}if(ee(e.tool)){let e=[T(g(t,`lines`),`line`),ye(g(t,`wallTimeMs`))].filter(e=>!!e);return e.length>0?{kind:`text`,text:e.join(` · `)}:{kind:`empty`}}if(e.tool===`grep`||e.tool===`read`||e.tool===`ls`){let e=T(g(t,`lines`),`line`);return e?{kind:`text`,text:e}:{kind:`empty`}}return{kind:`empty`}}function me(e){return e===`added`?o.writeFile:e===`deleted`?o.deleteFile:e===`renamed`||e===`renamed-edited`?o.files:o.editFile}function he(e){return e.kind===`composite`?`${e.workspaceReused?`Reused`:`Opened`} composite workspace`:`${e.workspaceReused?`Reused`:`Opened`} workspace`}function C(e){if(e.files?.length===1)return y(e.files[0])?.title??e.path}function ge(e){let t=e.summary?.pattern,n=e.summary?.scope;return typeof t==`string`?typeof n==`string`&&n!==`.`?`${t} in ${n}`:t:e.path}function _e(e,t){if(e.summary?.running===!0)return t===`command`?`Command running`:`Process running`;let n=g(e.summary,`exitCode`);return n!==void 0&&n!==0?t===`command`?`Command failed`:`Process failed`:t===`command`?`Ran command`:`Process finished`}function ve(e){if(e.summary?.running===!0)return`running`;let t=g(e.summary,`exitCode`);return t!==void 0&&t!==0?`error`:t===0?`success`:void 0}function w(e){let t=e.summary?.command;if(typeof t==`string`)return t;let n=e.summary?.sessionId;return typeof n==`number`||typeof n==`string`?`Session ${String(n)}`:e.path}function T(e,t){if(e!==void 0)return`${e} ${t}${e===1?``:`s`}`}function ye(e){if(e!==void 0)return e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(+(e<1e4))}s`}var E=null,D=!1,O=null,k,A=null,j=!1,M=!1,N=null,P=null,F=null,I=null,L=!1,R=document.querySelector(`#app`);if(!R)throw Error(`Missing #app root element.`);var z=R,B=new c(z);be();async function be(){H(),E=new i({name:`forgerelay-tool-cards`,version:`0.1.0`},{}),E.ontoolresult=e=>{let t=a(B.active,e.structuredContent);if(t===`activity`&&B.accept(e)){A=null,j=!1,M=!1,I=null,L=!1,N=null,H();return}if(t===`preserve-panel`)return;let n=Re(e),r=Le(e),i=r?{...n,...r}:n,o=Ie(e);if(!o||!te(i)){A=null,j=!1,M=!1,I=null,L=!1,N=`No result card is available for this tool result.`,H();return}let s={...i,tool:o};A=s,j=re(s),M=!1,I=null,L=!1,N=null,H()},E.onhostcontextchanged=e=>{k={...k,...e},V(),B.active?B.render():A?.tool!==`open_workspace`&&W()},E.onteardown=async()=>(D=!1,B.detach(),G(),{});try{await E.connect();let e=E.getHostContext();e&&(k=e),V(),D=!0,B.attach(E)}catch(e){O=e instanceof Error?e.message:String(e)}H()}function V(){k?.theme&&l(k.theme),k?.styles?.variables&&t(k.styles.variables),k?.styles?.css?.fonts&&s(k.styles.css.fonts);let e=k?.safeAreaInsets;e&&(document.body.style.padding=`${e.top}px ${e.right}px ${e.bottom}px ${e.left}px`)}function H(){if(G(),O){U(O,`error`);return}if(!D){U(`Connecting to host...`);return}if(B.render())return;if(!A){U(N??`Waiting for a tool result.`,N?`error`:`muted`);return}let t=fe(A);if(h(A)){Ce(A,t);return}let n=_(A),r=$(`main`,{className:`shell`}),i=$(`section`,{className:Te(t)}),a=$(`button`,{className:`tool-header`,type:`button`,ariaExpanded:String(j),disabled:!n});n&&a.addEventListener(`click`,()=>{j=!j,H()});let o=$(`span`,{className:`tool-icon`,ariaHidden:`true`});o.append(e(t.icon));let s=$(`span`,{className:`tool-main`}),c=$(`span`,{className:`tool-title`,text:t.title});if(s.append(c),t.label&&s.append($(`span`,{className:`tool-label`,text:t.label,title:t.label})),a.append(o,s,J(A),we(j,n)),i.append(a),j){let e=$(`div`,{className:`tool-body`});F=e,i.append(e)}r.append(i),z.replaceChildren(r),W()}function U(e,t=`muted`){let n=$(`main`,{className:`shell`});n.append($(`section`,{className:`empty ${t}`,text:e})),z.replaceChildren(n)}async function W(){if(!A||!F||!j)return;let e=F;if(N){q(e,N,`error`);return}if(A.tool===`open_workspace`){Ee(e,A);return}if(xe(A)){if(P){P.update({card:A,hostContext:k,errorMessage:N});return}Y(e,!0);try{let{mountHeavyPayload:t}=await n(async()=>{let{mountHeavyPayload:e}=await import(`./heavy-payload-CgzrutLm.js`);return{mountHeavyPayload:e}},__vite__mapDeps([0,1,2,3,4]),import.meta.url);if(e!==F||!j||!A)return;Y(e,!1),P=t(e,{card:A,hostContext:k,errorMessage:N})}catch(t){if(e!==F||!j)return;Y(e,!1),q(e,t instanceof Error?t.message:`Unable to load details.`,`error`)}return}if(h(A)||m(A.tool)){let t=h(A)&&!M?Math.max(3,(A.files??[]).slice(0,3).length):void 0;if(P){P.update({card:A,hostContext:k,errorMessage:N,visibleFileCount:t});return}q(e,h(A)?`Loading review...`:`Loading diff...`);let{mountReviewPayload:r}=await n(async()=>{let{mountReviewPayload:e}=await import(`./review-payload-BrLbezbq.js`);return{mountReviewPayload:e}},__vite__mapDeps([5,1,2,3,4]),import.meta.url);if(e!==F||!A)return;P=r(e,{card:A,hostContext:k,errorMessage:N,visibleFileCount:t});return}let t=ne(A.payload);if(!t){q(e,`No details available.`);return}Se(e,t,A.tool)}function xe(e){return d(e.tool)||p(e.tool)||f(e.tool)}function G(){K(),P=null,F=null}function K(){P?.unmount(),P=null}function q(e,t,n=`muted`){K(),e.replaceChildren($(`div`,{className:`status ${n}`,text:t}))}function Se(e,t,n){K(),e.replaceChildren($(`pre`,{className:`text-payload pretty-scrollbar ${n}`,text:t}))}function J(e){let t=pe(e);if(t.kind===`diff`){let e=$(`span`,{className:`stats`});return e.setAttribute(`aria-label`,`Diff statistics`),e.append($(`span`,{className:`add`,text:`+${String(t.additions)}`}),$(`span`,{className:`remove`,text:`-${String(t.removals)}`})),e}let n=$(`span`,{className:`header-meta ${t.kind===`empty`?`empty`:``}`,text:t.kind===`text`?t.text:``});return t.kind===`empty`&&n.setAttribute(`aria-hidden`,`true`),n}function Ce(t,n){G();let r=t.files??[],i=M?r:r.slice(0,3),a=Math.max(0,r.length-i.length),o=_(t),s=$(`main`,{className:`shell`}),c=$(`section`,{className:Te(n)}),l=$(`button`,{className:`tool-header review-header`,type:`button`,ariaExpanded:String(j),disabled:!o});o&&l.addEventListener(`click`,()=>{j=!j,H()});let u=$(`span`,{className:`tool-icon`,ariaHidden:`true`});u.append(e(n.icon));let d=$(`span`,{className:`tool-main review-title-group`});if(d.append($(`span`,{className:`tool-title`,text:n.title})),n.label&&d.append($(`span`,{className:`tool-label`,text:n.label,title:n.label})),l.append(u,d,J(t),we(j,o)),c.append(l),j){let e=$(`div`,{className:`review-summary`}),t=$(`div`,{className:`review-payload`});if(F=t,e.append(t),a>0){let t=$(`button`,{className:`review-more`,type:`button`,text:`Show ${a} more ${a===1?`file`:`files`}`});t.addEventListener(`click`,()=>{M=!0,H()}),e.append(t)}c.append(e)}s.append(c),z.replaceChildren(s),W()}function we(t,n){let r=$(`span`,{className:n?`chevron ${t?`expanded`:``}`:`chevron`,ariaHidden:`true`});return n&&r.append(e(o.chevronDown)),r}function Te(e){return[`tool-card`,e.tone,e.state?`state-${e.state}`:void 0].filter(Boolean).join(` `)}function Y(t,n){let r=t.previousElementSibling,i=r?.querySelector(`.chevron`);if(!i)return;i.classList.toggle(`loading`,n),i.replaceChildren(e(n?o.loading:o.chevronDown));let a=r instanceof HTMLButtonElement?r:null;a&&a.setAttribute(`aria-busy`,String(n))}function Ee(t,n){K();let i=$(`div`,{className:`workspace-details pretty-scrollbar`}),a=$(`div`,{className:`workspace-rows`}),s=n.worktree;if(s){let t=[s.baseRef,s.baseSha?.slice(0,8)].filter(e=>!!e).join(` · `)||`Worktree`,n=$(`span`,{className:`workspace-base-value`});if(n.append($(`span`,{className:`workspace-value`,text:t,title:t})),s.dirtySource){let t=$(`span`,{className:`workspace-base-warning`,title:`The source checkout had uncommitted changes when this worktree was created. Those changes are not included here.`,ariaLabel:`Source checkout changes are not included in this worktree`});t.append(e(o.warning,`workspace-base-warning-svg`)),n.append(t)}Z(a,`Base`,n,o.base),s.branch&&X(a,`Worktree branch`,s.branch,o.gitBranch,!1),s.targetBranch&&X(a,`Merge target`,s.targetBranch,o.gitBranch,!1)}n.sourceRoot&&n.sourceRoot!==n.root&&X(a,`Source checkout`,n.sourceRoot,o.sourceCheckout,!0),De(a,n.agentsFiles??[],n.availableAgentsFiles??[]);let c=n.skills??[];c.length>0&&Pe(a,c);let l=n.agentProviders??[],u=(n.agents??[]).map(e=>{let t=e.name??`Unnamed agent`,n=e.provider?.trim(),i=e.providerAvailable===!1,a=[e.description,n?`Provider: ${n}`:void 0,e.model?`Model: ${e.model}`:void 0,e.thinking?`Thinking: ${e.thinking}`:void 0,i?e.providerUnavailableReason??`Provider unavailable`:void 0].filter(e=>!!e).join(`
|
|
5
|
-
`);return{label:t,logo:n?r(n):void 0,profile:!0,tone:i?`muted`:void 0,title:a||void 0}}),d=l.map(e=>{let t=e.name?.trim()||`Unknown provider`,n=e.available===!1,i=r(t);return{label:t,logo:i,bareLogo:!!i,ariaLabel:t,tone:n?`muted`:void 0,title:n?e.reason??`Provider unavailable`:t}});if(u.length>0){let e=Q([...u,...d]);e.classList.add(`workspace-agents-list`),Z(a,`Agents`,e,o.agents,`workspace-agents-row`)}else d.length>0&&Ne(a,`Providers`,d,o.providers);a.childElementCount>0&&i.append(a),i.childElementCount===0&&i.append($(`div`,{className:`status muted`,text:`No workspace details available.`})),t.replaceChildren(i)}function De(e,t,n){let r=[],i=new Set;for(let[e,n]of t.entries())r.push({key:`loaded:${e}`,path:n.path,label:n.path??`Loaded instructions`,content:n.content,status:`loaded`}),n.path&&i.add(n.path);let a=[];for(let[e,t]of n.entries())t.path&&i.has(t.path)||a.push({key:`available:${e}`,path:t.path,label:t.path??`Nested instructions`,status:`available`});if(r.length===0&&a.length===0)return;let s=Oe(L?[...r,...a]:r);if(a.length>0){let e=L,t=$(`button`,{className:`workspace-instructions-toggle`,type:`button`,text:e?`Show less`:`View all`,ariaLabel:e?`Show only loaded instruction files`:`View all ${a.length} available instruction files`,ariaExpanded:String(e)});t.addEventListener(`click`,()=>{L=!L,L||(I=null),H()}),s.append(t)}let c=$(`div`,{className:`workspace-instructions-content`});c.append(s),Z(e,`Instructions`,c,o.instructions,`workspace-instructions-row`)}function Oe(t){let n=$(`span`,{className:`workspace-instruction-list`});for(let r of t){let t=$(`span`,{className:`workspace-instruction-item`});t.dataset.instructionKey=r.key;let i=r.status===`loaded`&&r.content!==void 0,a=$(i?`button`:`span`,{className:`workspace-instruction-header${i?` interactive`:``}`,type:i?`button`:void 0,ariaLabel:i?`View ${r.label}`:void 0,ariaExpanded:i?`false`:void 0}),s=$(`span`,{className:`workspace-instruction-text`}),c=Me(r.label);if(s.append($(`span`,{className:`workspace-instruction-name`,text:c})),r.path&&r.path!==c&&s.append($(`span`,{className:`workspace-instruction-path`,text:r.path,title:r.path})),a.append(Ae(r.status),s),i){let i=$(`span`,{className:`workspace-instruction-chevron`,ariaHidden:`true`});i.append(e(o.chevronDown,`workspace-instruction-chevron-svg`)),a.append(i),a.addEventListener(`click`,()=>{I=I===r.key?null:r.key,ke(n)});let s=$(`pre`,{className:`workspace-instruction-preview pretty-scrollbar`,text:r.content});s.hidden=!0,t.append(a,s)}else t.append(a);n.append(t)}return ke(n),n}function ke(e){for(let t of e.querySelectorAll(`.workspace-instruction-item`)){let e=t.dataset.instructionKey===I;t.classList.toggle(`expanded`,e),t.querySelector(`.workspace-instruction-header.interactive`)?.setAttribute(`aria-expanded`,String(e));let n=t.querySelector(`.workspace-instruction-preview`);n&&(n.hidden=!e)}}function Ae(t){let n=je(t),r=$(`span`,{className:`workspace-instruction-status ${t}`,title:n,ariaLabel:n});return r.setAttribute(`role`,`img`),r.append(e(t===`loaded`?o.instructionLoaded:o.instructionAvailable,`workspace-instruction-status-svg`)),r}function je(e){return e===`loaded`?`Loaded into the current workspace context`:`Available for a nested directory`}function Me(e){return e.replaceAll(`\\`,`/`).split(`/`).filter(Boolean).at(-1)??e}function X(e,t,n,r,i=!1){Z(e,t,$(`span`,{className:`workspace-value${i?` mono`:``}`,text:n,title:n}),r)}function Ne(e,t,n,r){Z(e,t,Q(n),r)}function Z(e,t,n,r,i){let a=$(`div`,{className:[`workspace-row`,i].filter(Boolean).join(` `)});a.append(Fe(r),$(`span`,{className:`workspace-key`,text:t}),n),e.append(a)}function Pe(e,t){let n=Q(t.map(e=>({label:e.name??`Unnamed skill`,title:e.description||void 0})));n.classList.add(`workspace-skills-list`),Z(e,`Skills`,n,o.skills,`workspace-skills-row`)}function Fe(t){let n=$(`span`,{className:`workspace-row-icon`,ariaHidden:`true`});return n.append(e(t,`workspace-row-icon-svg`)),n}function Q(e){let t=$(`span`,{className:`workspace-chip-list`});for(let n of e){let e=!!(n.bareLogo&&n.logo),r=$(`span`,{className:[e?`workspace-provider-logo`:n.profile?`workspace-agent-profile`:`workspace-chip`,n.tone].filter(Boolean).join(` `),title:n.title});if(e&&(r.setAttribute(`role`,`img`),r.setAttribute(`aria-label`,n.ariaLabel??n.label)),n.logo){let t=document.createElement(`img`);t.className=e?`workspace-provider-logo-image`:n.profile?`workspace-agent-profile-logo`:`workspace-chip-logo`,t.src=n.logo,t.alt=``,t.setAttribute(`aria-hidden`,`true`),r.append(t)}e||r.append($(`span`,{className:`workspace-chip-label`,text:n.label})),t.append(r)}return t}function Ie(e){let t=e._meta?.tool;return u(t)?t:void 0}function Le(e){let t=e._meta?.card;return t&&typeof t==`object`?t:void 0}function Re(e){return e.structuredContent}function $(e,t={}){let n=document.createElement(e);return t.className&&(n.className=t.className),t.text!==void 0&&(n.textContent=t.text),t.type!==void 0&&`type`in n&&n.setAttribute(`type`,t.type),t.title!==void 0&&(n.title=t.title),t.ariaHidden!==void 0&&n.setAttribute(`aria-hidden`,t.ariaHidden),t.ariaLabel!==void 0&&n.setAttribute(`aria-label`,t.ariaLabel),t.ariaExpanded!==void 0&&n.setAttribute(`aria-expanded`,t.ariaExpanded),t.disabled!==void 0&&`disabled`in n&&(n.disabled=t.disabled),n}export{d as a,g as c,p as i,oe as n,f as o,se as r,ne as s,ce as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
.forgerelay-panel{border:1px solid var(--tool-card-border);background:var(--tool-card-header-bg);width:100%;color:var(--color-text-primary,#f5f5f6);border-radius:12px;overflow:hidden}.workspace-panel{background:var(--tool-card-header-bg);width:100%}.workspace-panel-header{grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:10px;min-height:58px;padding:9px 12px;display:grid}.workspace-panel-icon{background:color-mix(in srgb, var(--tool-accent) 9%, transparent);width:22px;height:22px;color:color-mix(in srgb, var(--tool-accent) 72%, var(--color-text-tertiary,#a3a3aa));border-radius:6px;place-items:center;display:grid}.workspace-panel-icon-svg{stroke-width:1.8px;width:14px;height:14px}.workspace-panel-title-group{gap:2px;min-width:0;display:grid}.workspace-panel-title{font-size:var(--font-text-sm-size,14px);font-weight:600;line-height:1.3}.workspace-panel-subtitle,.workspace-panel-mode{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,11px);line-height:1.35}.workspace-panel-subtitle{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.workspace-panel-mode{border:1px solid color-mix(in srgb, var(--tool-card-divider) 76%, transparent);white-space:nowrap;border-radius:999px;padding:2px 7px}.workspace-panel .workspace-details{border-top:1px solid var(--tool-card-divider);background:var(--tool-card-body-bg);max-height:none}.workspace-panel-pending-dot{background:var(--color-text-info,#38bdf8);width:8px;height:8px;box-shadow:0 0 0 3px color-mix(in srgb, var(--color-text-info,#38bdf8) 12%, transparent);border-radius:999px;justify-self:center}.activity-panel{border:1px solid var(--tool-card-border);background:var(--tool-card-header-bg);width:100%;color:var(--color-text-primary,#f5f5f6);border-radius:12px;overflow:hidden}.forgerelay-panel .activity-panel{border:0;border-top:1px solid var(--tool-card-divider);border-radius:0}.activity-panel-header{width:100%;min-height:58px;color:inherit;cursor:pointer;font:inherit;text-align:left;background:0 0;border:0;grid-template-columns:14px minmax(0,1fr) auto 20px;align-items:center;gap:10px;padding:9px 12px;display:grid}.activity-panel-header:hover{background:var(--tool-card-hover-bg)}.activity-panel-header:focus-visible{outline:2px solid color-mix(in srgb, var(--color-text-info,#38bdf8) 72%, transparent);outline-offset:-2px}.activity-panel-header-pending{cursor:default}.activity-panel-header-pending:hover{background:0 0}.activity-panel-pending-spacer{width:20px}.activity-panel-status{background:var(--color-text-info,#38bdf8);width:8px;height:8px;box-shadow:0 0 0 3px color-mix(in srgb, var(--color-text-info,#38bdf8) 12%, transparent);border-radius:9999px;justify-self:center}.activity-panel-status.state-done{background:var(--color-success-text,#6fda83);box-shadow:0 0 0 3px color-mix(in srgb, var(--color-success-text,#6fda83) 12%, transparent)}.activity-panel-status.state-error{background:var(--color-danger-text,#ee7676);box-shadow:0 0 0 3px color-mix(in srgb, var(--color-danger-text,#ee7676) 12%, transparent)}.activity-panel-title-group{gap:2px;min-width:0;display:grid}.activity-panel-title{font-size:var(--font-text-sm-size,14px);font-weight:600;line-height:1.3}.activity-panel-subtitle,.activity-panel-count{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,11px);line-height:1.35}.activity-panel-count{white-space:nowrap;font-weight:600}.activity-panel-count.state-working{color:var(--color-text-info,#38bdf8)}.activity-panel-count.state-done{color:var(--color-success-text,#6fda83)}.activity-panel-count.state-error{color:var(--color-danger-text,#ee7676)}.activity-panel-body{border-top:1px solid var(--tool-card-divider);background:var(--tool-card-body-bg);display:grid}.activity-viewport{overscroll-behavior:contain;max-height:420px;overflow:hidden auto}.activity-list{display:grid}.activity-group+.activity-group{border-top:1px solid var(--tool-card-divider)}.activity-group.grouped>.activity-row.parent{background:color-mix(in srgb, var(--color-background-secondary,#272727) 54%, transparent)}.activity-children{border-top:1px solid color-mix(in srgb, var(--tool-card-divider) 72%, transparent);display:grid}.activity-row{--activity-accent:var(--color-text-secondary,#b6b6bd);--activity-phase:var(--color-text-tertiary,#a3a3aa);width:100%;min-height:46px;color:inherit;font:inherit;text-align:left;background:0 0;border:0;grid-template-columns:28px minmax(0,1fr) auto 16px;align-items:center;gap:10px;padding:7px 12px;display:grid}.activity-row.interactive{cursor:pointer}.activity-row.interactive:hover{background:var(--tool-card-hover-bg)}.activity-row.interactive:focus-visible{outline:2px solid color-mix(in srgb, var(--activity-accent) 68%, transparent);outline-offset:-2px}.activity-row.child{padding-left:34px;position:relative}.activity-row.child:before{background:color-mix(in srgb, var(--activity-accent) 26%, var(--tool-card-divider));content:"";width:1px;position:absolute;top:0;bottom:0;left:20px}.activity-row.child+.activity-row.child{border-top:1px solid color-mix(in srgb, var(--tool-card-divider) 52%, transparent)}.activity-row.kind-read{--activity-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 32%, #06b6d4 68%)}.activity-row.kind-write{--activity-accent:var(--color-success-text,#6fda83)}.activity-row.kind-edit,.activity-row.kind-rename{--activity-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 28%, #d99742 72%)}.activity-row.kind-delete{--activity-accent:var(--color-danger-text,#ee7676)}.activity-row.kind-shell{--activity-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 42%, #64748b 58%)}.activity-row.kind-shell-result{--activity-accent:color-mix(in srgb, var(--color-success-text,#6fda83) 72%, var(--color-text-secondary,#b6b6bd))}.activity-row.kind-capability{--activity-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 34%, #3b82f6 66%)}.activity-row.kind-batch{--activity-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 34%, #8b5cf6 66%)}.activity-row.phase-executing{--activity-phase:var(--color-text-info,#38bdf8)}.activity-row.phase-returned{--activity-phase:var(--color-warning-text,#e6b566)}.activity-row.phase-done{--activity-phase:var(--color-success-text,#6fda83)}.activity-row.phase-error{--activity-phase:var(--color-danger-text,#ee7676)}.activity-row.phase-executing{box-shadow:inset 2px 0 0 color-mix(in srgb, var(--activity-phase) 76%, transparent);background:color-mix(in srgb, var(--activity-phase) 5%, transparent)}.activity-row.phase-returned{box-shadow:inset 2px 0 0 color-mix(in srgb, var(--activity-phase) 68%, transparent)}.activity-row.phase-error{box-shadow:inset 2px 0 0 color-mix(in srgb, var(--activity-phase) 72%, transparent)}.activity-row.shell-result{box-shadow:inset 2px 0 0 color-mix(in srgb, var(--activity-accent) 68%, transparent)}.activity-icon{border:1px solid color-mix(in srgb, var(--activity-accent) 18%, transparent);background:color-mix(in srgb, var(--activity-accent) 9%, transparent);width:28px;height:28px;color:var(--activity-accent);border-radius:7px;place-items:center;display:grid}.activity-icon-svg{stroke-width:1.8px;width:15px;height:15px}.activity-main{gap:4px;min-width:0;display:grid}.activity-title-line{align-items:baseline;gap:8px;min-width:0;display:flex}.activity-title{color:var(--color-text-primary,#f5f5f6);font-size:var(--font-text-sm-size,12px);flex:none;font-weight:600;line-height:1.35}.activity-member{color:var(--color-text-secondary,#d4d4d8);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,10px);flex:none;line-height:1.4}.activity-target{min-width:0;color:var(--color-text-tertiary,#a3a3aa);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,11px);text-overflow:ellipsis;white-space:nowrap;line-height:1.4;overflow:hidden}.activity-meta{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,10px);font-variant-numeric:tabular-nums;white-space:nowrap;justify-content:flex-end;align-items:center;gap:8px;display:inline-flex}.activity-phase{color:var(--activity-phase);align-items:center;gap:5px;display:inline-flex}.activity-phase:before{content:"";background:currentColor;border-radius:9999px;width:6px;height:6px}.activity-progress-wrap{grid-template-columns:auto minmax(48px,110px);align-items:center;gap:8px;max-width:220px;display:grid}.activity-progress-counts{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,10px);font-variant-numeric:tabular-nums;white-space:nowrap}.activity-progress-track{background:color-mix(in srgb, var(--activity-accent) 14%, var(--tool-card-divider));border-radius:9999px;height:3px;display:block;overflow:hidden}.activity-progress-fill{border-radius:inherit;background:var(--activity-accent);height:100%;display:block}.activity-empty,.activity-refresh-error{color:var(--color-text-secondary,#b7b7bf);font-size:var(--font-text-sm-size,12px);padding:12px}.activity-refresh-error{border-top:1px solid var(--tool-card-divider);color:var(--color-danger-text,#ee7676)}.activity-detail-chevron,.activity-detail-spacer,.activity-detail-chevron.chevron{width:16px;height:16px}.activity-detail-chevron .icon-svg{width:13px;height:13px}.activity-entry.expanded>.activity-row{background:color-mix(in srgb, var(--activity-accent) 6%, transparent)}.activity-detail{border-top:1px solid color-mix(in srgb, var(--tool-card-divider) 72%, transparent);background:color-mix(in srgb, var(--color-background-primary,#101114) 90%, transparent);display:grid}.activity-detail-section+.activity-detail-section{border-top:1px solid color-mix(in srgb, var(--tool-card-divider) 62%, transparent)}.activity-detail-label{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,10px);letter-spacing:.02em;padding:8px 12px 0;font-weight:600}.activity-detail-section.error .activity-detail-label,.activity-detail-section.error .activity-detail-value{color:var(--color-danger-text,#ee7676)}.activity-detail-value{max-height:260px;color:var(--color-text-secondary,#c7c7ce);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,11px);white-space:pre-wrap;overflow-wrap:break-word;margin:0;padding:6px 12px 10px;line-height:1.5;overflow:auto}.activity-detail-status{color:var(--color-text-secondary,#b7b7bf);font-size:var(--font-text-sm-size,12px);padding:10px 12px}.activity-detail-status.error{color:var(--color-danger-text,#ee7676)}.activity-terminal{background:var(--color-background-primary,#101114)}.activity-terminal-command,.activity-terminal-output{color:var(--color-text-primary,#f5f5f6);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,11px);white-space:pre-wrap;overflow-wrap:break-word;background:0 0;border:0;border-radius:0;margin:0;line-height:1.55}.activity-terminal-command{border-bottom:1px solid color-mix(in srgb, var(--tool-card-divider) 74%, transparent);color:var(--color-text-secondary,#c7c7ce);padding:9px 12px}.activity-terminal-output{max-height:320px;padding:10px 12px;overflow:auto}.activity-terminal-meta{border-top:1px solid color-mix(in srgb, var(--tool-card-divider) 74%, transparent);color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-xs-size,10px);font-variant-numeric:tabular-nums;padding:7px 12px}.activity-terminal-meta.status-running{color:var(--color-text-info,#38bdf8)}.activity-terminal-meta.status-done{color:var(--color-success-text,#6fda83)}.activity-terminal-meta.status-failed{color:var(--color-danger-text,#ee7676)}@media (width<=520px){.activity-panel-header{grid-template-columns:12px minmax(0,1fr) auto 18px;gap:8px;min-height:54px;padding:8px 10px}.activity-panel-subtitle,.activity-panel-count{font-size:10px}.activity-row{grid-template-columns:26px minmax(0,1fr) 18px;gap:6px 8px;min-height:48px;padding:8px 10px}.activity-row.child{padding-left:28px}.activity-row.child:before{left:16px}.activity-icon{align-self:start;width:26px;height:26px}.activity-title-line{gap:2px;display:grid}.activity-meta{grid-column:2;justify-content:flex-start}.activity-detail-chevron,.activity-detail-spacer{grid-area:1/3/span 2}.activity-progress-wrap{grid-template-columns:auto minmax(40px,1fr);max-width:none}}:root{--lightningcss-light:initial;--lightningcss-dark: ;color-scheme:light dark;font-family:var(--font-sans,ui-sans-serif, system-ui, sans-serif);color:var(--color-text-primary,#f5f5f6);--tool-card-border:color-mix(in srgb, var(--color-border-primary,#414141) 74%, transparent);--tool-card-header-bg:color-mix(in srgb, var(--color-background-secondary,#272727) 88%, transparent);--tool-card-body-bg:color-mix(in srgb, var(--color-background-primary,#181818) 94%, transparent);--tool-card-hover-bg:color-mix(in srgb, var(--color-background-tertiary,#343434) 46%, transparent);--tool-card-divider:color-mix(in srgb, var(--color-border-primary,#414141) 66%, transparent);--tool-accent:var(--color-text-secondary,#b6b6bd);--scrollbar-thumb:color-mix(in srgb, var(--color-text-tertiary,#8a8a8a) 56%, transparent);--scrollbar-thumb-hover:color-mix(in srgb, var(--color-text-secondary,#a8a8a8) 82%, transparent);background:0 0}@media (prefers-color-scheme:dark){:root{--lightningcss-light: ;--lightningcss-dark:initial}}*{box-sizing:border-box}html,body{background:0 0;margin:0;overflow:hidden}.shell{width:100%;padding:0;overflow:hidden}.empty,.tool-card{--tool-accent-soft:color-mix(in srgb, var(--tool-accent) 12%, transparent);border:1px solid var(--tool-card-border);background:var(--tool-card-header-bg);width:100%;box-shadow:none;color:var(--color-text-primary,#f5f5f6);border-radius:12px;overflow:hidden}.tool-card.workspace,.tool-card.directory{--tool-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 34%, #3b82f6 66%)}.tool-card.read,.tool-card.search{--tool-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 32%, #06b6d4 68%)}.tool-card.write{--tool-accent:var(--color-success-text,#6fda83)}.tool-card.edit,.tool-card.review{--tool-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 28%, #d99742 72%)}.tool-card.delete{--tool-accent:var(--color-danger-text,#ee7676)}.tool-card.shell{--tool-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 42%, #64748b 58%)}.tool-card.state-success{--tool-accent:var(--color-success-text,#6fda83)}.tool-card.state-error{--tool-accent:var(--color-danger-text,#ee7676)}.tool-card.state-running{--tool-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 30%, #38bdf8 70%)}@supports selector(::-webkit-scrollbar){.pretty-scrollbar::-webkit-scrollbar{width:12px;height:12px}.pretty-scrollbar::-webkit-scrollbar-button{width:0;height:0;display:none}.pretty-scrollbar::-webkit-scrollbar-track{background:0 0}.pretty-scrollbar::-webkit-scrollbar-thumb{background-color:var(--scrollbar-thumb);background-clip:content-box;border:4px solid #0000;border-radius:9999px}.pretty-scrollbar::-webkit-scrollbar-thumb:hover{background-color:var(--scrollbar-thumb-hover)}.pretty-scrollbar::-webkit-scrollbar-thumb:active{background-color:var(--scrollbar-thumb-hover)}.pretty-scrollbar::-webkit-scrollbar-corner{background:0 0}}.empty{color:var(--color-text-secondary,#b6b6bd);font-size:var(--font-text-sm-size,13px);padding:14px 16px}.tool-header{width:100%;min-height:64px;color:inherit;cursor:pointer;text-align:left;background:0 0;border:0;border-radius:11px;grid-template-columns:40px minmax(0,1fr) auto 20px;align-items:center;gap:12px;padding:10px 12px;display:grid}.tool-header:focus-visible,.review-diff-file-header:focus-visible,.review-more:focus-visible{outline:2px solid color-mix(in srgb, var(--tool-accent) 72%, transparent);outline-offset:-2px}.tool-header:hover:not(:disabled){background:var(--tool-card-hover-bg)}.tool-header:disabled{cursor:default}.tool-icon{border:1px solid color-mix(in srgb, var(--tool-accent) 18%, transparent);background:var(--tool-accent-soft);width:40px;height:40px;color:var(--tool-accent);border-radius:10px;place-items:center;display:grid}.icon-svg{stroke-width:1.8px;width:20px;height:20px;display:block}.tool-main{gap:2px;min-width:0;display:grid}.tool-title{color:var(--color-text-primary,#f5f5f6);font-size:var(--font-text-sm-size,14px);font-weight:550;line-height:1.3}.tool-label{color:var(--color-text-tertiary,#a3a3aa);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,12px);text-overflow:ellipsis;white-space:nowrap;line-height:1.4;overflow:hidden}.stats{font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-xs-size,12px);font-variant-numeric:tabular-nums;white-space:nowrap;align-items:center;gap:5px;display:inline-flex}.header-meta{color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-sm-size,12px);text-align:right;white-space:nowrap;line-height:1.35}.header-meta.empty{width:0}.add{color:var(--color-success-text,#6fda83)}.remove{color:var(--color-danger-text,#ee7676)}.chevron{width:20px;height:20px;color:var(--color-text-tertiary,#a3a3aa);border-radius:7px;place-items:center;transition:background .14s,color .14s,transform .14s;display:grid}.tool-header:hover:not(:disabled) .chevron{color:var(--color-text-primary,#f5f5f6)}.chevron .icon-svg{width:15px;height:15px}.chevron.expanded{transform:rotate(180deg)}.chevron.loading{transform:none}.chevron.loading .icon-svg{fill:none;stroke-linecap:round;stroke-dasharray:38 14;animation:.7s linear infinite payload-spinner}@keyframes payload-spinner{to{transform:rotate(360deg)}}@media (prefers-reduced-motion:reduce){.chevron.loading .icon-svg{animation:none}}.tool-body{border-top:1px solid var(--tool-card-divider);background:var(--tool-card-body-bg)}.workspace-details{max-height:420px;display:grid;overflow:auto}.workspace-rows{padding:4px 0;display:grid}.workspace-row{--workspace-row-accent:var(--tool-accent);grid-template-columns:22px minmax(116px,.24fr) minmax(0,1fr);align-items:center;gap:10px;min-height:40px;padding:7px 12px;display:grid}.workspace-row-icon{background:color-mix(in srgb, var(--workspace-row-accent) 9%, transparent);width:22px;height:22px;color:color-mix(in srgb, var(--workspace-row-accent) 72%, var(--color-text-tertiary,#a3a3aa));border-radius:6px;place-items:center;display:grid}.workspace-row-icon-svg{stroke-width:1.8px;width:14px;height:14px}.workspace-key{min-height:22px;color:var(--color-text-tertiary,#a3a3aa);font-size:var(--font-text-sm-size,12px);align-items:center;font-weight:500;display:flex}.workspace-value{min-width:0;color:var(--color-text-secondary,#c7c7ce);font-size:var(--font-text-sm-size,12px);text-overflow:ellipsis;white-space:nowrap;line-height:1.45;overflow:hidden}.workspace-value.mono{font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace)}.workspace-base-value{align-items:center;gap:7px;min-width:0;display:flex}.workspace-base-value .workspace-value{flex:0 auto}.workspace-base-warning{width:18px;height:18px;color:var(--color-warning-text,#e6b566);cursor:help;flex:none;place-items:center;display:grid}.workspace-base-warning-svg{stroke-width:2px;width:14px;height:14px}.workspace-chip-list{flex-wrap:nowrap;align-items:center;gap:6px;min-width:0;display:flex;overflow:hidden}.workspace-chip{border:1px solid color-mix(in srgb, var(--tool-accent) 16%, var(--tool-card-divider));background:color-mix(in srgb, var(--tool-accent) 7%, transparent);max-width:100%;min-height:24px;color:var(--color-text-secondary,#c7c7ce);text-overflow:ellipsis;white-space:nowrap;border-radius:9999px;flex:none;align-items:center;gap:5px;padding:3px 8px;font-size:11px;line-height:1.25;display:inline-flex;overflow:hidden}.workspace-chip-logo{object-fit:contain;flex:none;width:13px;height:13px;display:block}.workspace-chip-label{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.workspace-agent-profile{border:0;border-bottom:1px solid color-mix(in srgb, var(--tool-accent) 34%, var(--tool-card-divider));max-width:100%;min-height:24px;color:var(--color-text-secondary,#c7c7ce);white-space:nowrap;background:0 0;border-radius:0;align-items:center;gap:5px;padding:3px 2px 4px;font-size:11px;line-height:1.25;display:inline-flex;overflow:hidden}.workspace-agent-profile-logo{object-fit:contain;flex:none;width:14px;height:14px;display:block}.workspace-agent-profile:hover{border-bottom-color:var(--tool-accent);color:var(--color-text-primary,#f5f5f6)}.workspace-agent-profile.muted{color:var(--color-text-tertiary,#a3a3aa);opacity:.72;border-bottom-style:dashed}.workspace-provider-logo{cursor:help;flex:none;place-items:center;width:20px;height:24px;display:inline-grid}.workspace-provider-logo-image{object-fit:contain;width:16px;height:16px;display:block}.workspace-provider-logo.muted{opacity:.62}.workspace-chip.muted{color:var(--color-text-tertiary,#a3a3aa);opacity:.72;border-style:dashed}.workspace-skills-row,.workspace-instructions-row,.workspace-agents-row{align-items:start}.workspace-instructions-row{--workspace-row-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 28%, #d99742 72%)}.workspace-skills-row{--workspace-row-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 28%, #14b8a6 72%)}.workspace-agents-row{--workspace-row-accent:color-mix(in srgb, var(--color-text-primary,#f5f5f6) 30%, #8b5cf6 70%)}.workspace-skills-row .workspace-chip,.workspace-agents-row .workspace-chip,.workspace-agents-row .workspace-agent-profile{border-color:color-mix(in srgb, var(--workspace-row-accent) 28%, var(--tool-card-divider))}.workspace-skills-row .workspace-chip{background:color-mix(in srgb, var(--workspace-row-accent) 7%, transparent)}.workspace-skills-list,.workspace-agents-list{flex-wrap:wrap;overflow:visible}.workspace-instruction-status{border-radius:5px;flex:none;place-items:center;width:18px;height:18px;display:grid}.workspace-instruction-status.loaded{background:color-mix(in srgb, var(--color-success-text,#6fda83) 12%, transparent);color:var(--color-success-text,#6fda83)}.workspace-instruction-status.available{background:color-mix(in srgb, var(--color-text-tertiary,#a3a3aa) 9%, transparent);color:var(--color-text-tertiary,#a3a3aa)}.workspace-instruction-status-svg{stroke-width:1.9px;width:12px;height:12px}.workspace-instruction-list{border:1px solid var(--tool-card-divider);background:color-mix(in srgb, var(--tool-card-body-bg) 88%, transparent);border-radius:9px;min-width:0;display:grid;overflow:hidden}.workspace-instructions-content{min-width:0;display:block}.workspace-instructions-toggle{border:0;border-top:1px solid var(--tool-card-divider);background:color-mix(in srgb, var(--tool-card-body-bg) 72%, transparent);width:100%;min-height:32px;color:var(--tool-accent);cursor:pointer;font:inherit;font-size:var(--font-text-sm-size,11px);white-space:nowrap;border-radius:0 0 9px 9px;justify-content:center;align-items:center;padding:6px 10px;font-weight:550;line-height:1.25;display:flex}.workspace-instructions-toggle:hover{background:var(--tool-card-hover-bg)}.workspace-instructions-toggle:focus-visible{outline:2px solid color-mix(in srgb, var(--tool-accent) 72%, transparent);outline-offset:2px}.workspace-instruction-item+.workspace-instruction-item{border-top:1px solid var(--tool-card-divider)}.workspace-instruction-header{width:100%;min-width:0;color:inherit;font:inherit;text-align:left;background:0 0;border:0;grid-template-columns:22px minmax(0,1fr) 18px;align-items:center;gap:9px;padding:8px 10px;display:grid}.workspace-instruction-header.interactive{cursor:pointer}.workspace-instruction-header.interactive:hover{background:var(--tool-card-hover-bg)}.workspace-instruction-header.interactive:focus-visible{outline:2px solid color-mix(in srgb, var(--tool-accent) 72%, transparent);outline-offset:-2px}.workspace-instruction-text{gap:2px;min-width:0;display:grid}.workspace-instruction-name{min-width:0;color:var(--color-text-primary,#f5f5f6);font-size:var(--font-text-sm-size,12px);text-overflow:ellipsis;white-space:nowrap;font-weight:550;overflow:hidden}.workspace-instruction-path{min-width:0;color:var(--color-text-tertiary,#a3a3aa);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);text-overflow:ellipsis;white-space:nowrap;font-size:10px;line-height:1.35;overflow:hidden}.workspace-instruction-chevron{width:18px;height:18px;color:var(--color-text-tertiary,#a3a3aa);place-items:center;transition:transform .14s;display:grid}.workspace-instruction-item.expanded .workspace-instruction-chevron{transform:rotate(180deg)}.workspace-instruction-chevron-svg{width:14px;height:14px}.workspace-instruction-preview{border-top:1px solid var(--tool-card-divider);background:color-mix(in srgb, var(--color-background-primary,#101114) 92%, transparent);max-height:300px;color:var(--color-text-secondary,#c7c7ce);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);white-space:pre-wrap;overflow-wrap:break-word;margin:0;padding:10px 12px;font-size:11px;line-height:1.55;overflow:auto}.workspace-instruction-preview[hidden]{display:none}.review-header{grid-template-columns:40px minmax(0,1fr) auto 20px}.review-title-group{gap:3px;min-width:0;display:grid}.review-summary{border-top:1px solid var(--tool-card-divider);background:var(--tool-card-body-bg);display:grid}.review-diff-file-stats{align-items:center;gap:8px;display:flex}.review-empty{color:var(--color-text-secondary,#b7b7bf);font-size:var(--font-text-sm-size,13px)}.review-more{border:0;border-top:1px solid var(--tool-card-divider);width:100%;min-height:40px;color:var(--color-text-tertiary,#a3a3aa);cursor:pointer;font:inherit;font-size:var(--font-text-sm-size,12px);text-align:left;background:0 0;padding:0 12px}.review-more:hover{background:var(--tool-card-hover-bg);color:var(--color-text-primary,#f5f5f6)}.review-diff{max-height:520px;display:grid;overflow:hidden auto}.review-diff-files{gap:0;padding:0;display:grid}.review-diff-file{border:0;border-radius:0;overflow:hidden}.review-diff-file+.review-diff-file{border-top:1px solid var(--tool-card-divider)}.review-diff-file-header{width:100%;min-height:42px;color:var(--color-text-primary,#f5f5f6);cursor:pointer;font:inherit;text-align:left;background:0 0;border:0;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:10px;padding:0 12px;display:grid}.review-file-kind{background:color-mix(in srgb, var(--color-text-tertiary,#a3a3aa) 10%, transparent);width:20px;height:20px;color:var(--color-text-tertiary,#a3a3aa);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);border-radius:6px;align-self:center;place-items:center;font-size:10px;font-weight:700;display:grid}.review-file-kind.added{background:color-mix(in srgb, var(--color-success-text,#6fda83) 12%, transparent);color:var(--color-success-text,#6fda83)}.review-file-kind.edited,.review-file-kind.renamed,.review-file-kind.renamed-edited{background:color-mix(in srgb, var(--color-warning-text,#e6b566) 12%, transparent);color:var(--color-warning-text,#e6b566)}.review-file-kind.deleted{background:color-mix(in srgb, var(--color-danger-text,#ee7676) 12%, transparent);color:var(--color-danger-text,#ee7676)}.review-single-file{overflow:hidden}.review-diff-file-header:hover{background:var(--tool-card-hover-bg)}.review-diff-file-name,.review-diff-file-stats{text-overflow:ellipsis;white-space:nowrap;font-size:13px;line-height:20px;overflow:hidden}.review-diff-file-name{font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace)}.review-diff-file-name.renamed{text-overflow:clip;align-items:center;gap:6px;min-width:0;display:flex}.review-diff-file-path{text-overflow:ellipsis;white-space:nowrap;min-width:0;max-width:calc(50% - 10px);overflow:hidden}.review-diff-file-path.previous{color:var(--color-text-tertiary,#a3a3aa)}.review-diff-file-path.current{color:var(--color-text-primary,#f5f5f6)}.review-diff-file-arrow{color:var(--color-text-tertiary,#a3a3aa);font-family:var(--font-sans,ui-sans-serif, system-ui, sans-serif);flex:none}.review-diff-file-stats{font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-sm-size,12px);font-variant-numeric:tabular-nums;justify-content:flex-end;overflow:visible}.status{font-size:var(--font-text-sm-size,12px);padding:10px 12px}.status.muted{color:var(--color-text-secondary,#b7b7bf)}.status.error{color:var(--color-danger-text,#ee7676)}.pierre-diff,.pierre-file{--diffs-bg:var(--tool-payload-bg,var(--color-background-primary,#101114));--diffs-light-bg:var(--color-background-primary,#fff);--diffs-dark-bg:var(--tool-payload-bg,var(--color-background-primary,#101114));--diffs-font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);--diffs-header-font-family:var(--font-sans,ui-sans-serif, system-ui, sans-serif);--diffs-font-size:var(--font-text-sm-size,12px);--diffs-line-height:20px;border-bottom-right-radius:8px;border-bottom-left-radius:8px;max-height:420px;display:block;overflow:auto}.text-payload{max-height:420px;color:var(--color-text-secondary,#c7c7ce);font-family:var(--font-mono,ui-monospace, SFMono-Regular, monospace);font-size:var(--font-text-sm-size,12px);white-space:pre-wrap;overflow-wrap:break-word;margin:0;padding:10px 12px;line-height:1.55;overflow:auto}.text-payload.bash{color:var(--color-text-primary,#f5f5f6);background:var(--color-background-primary,#101114)}@media (width<=520px){.tool-header{grid-template-columns:36px minmax(0,1fr) auto 18px;gap:9px;min-height:58px;padding:9px 10px}.tool-icon{border-radius:9px;width:36px;height:36px}.chevron{width:18px;height:18px}.review-header{grid-template-columns:36px minmax(0,1fr) auto 18px}.workspace-row{grid-template-columns:22px minmax(0,1fr);gap:2px 8px;padding-block:8px}.workspace-row-icon{grid-row:1/span 2;align-self:start}.workspace-row>.workspace-key,.workspace-row>.workspace-value,.workspace-row>.workspace-chip-list,.workspace-row>.workspace-instructions-content{grid-column:2}}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./workspace-app-CxwJuZyS.js";import"./workspace-app-D6UR0AFl.js";document.documentElement.dataset.forgerelayApp=`workspace-lifecycle-compatibility`;
|