@cydm/magic-shell-agent-node 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/plugins/claude-code.json +7 -0
- package/dist/plugins/codex.json +7 -0
- package/dist/plugins/echo.json +7 -0
- package/dist/plugins/pie-unity.json +8 -0
- package/dist/workbench/index.html +15 -0
- package/dist/workbench/runtime-control.js +18 -0
- package/dist/workbench/runtime-messages.js +3 -0
- package/package.json +1 -1
|
@@ -2591,6 +2591,17 @@
|
|
|
2591
2591
|
}
|
|
2592
2592
|
}
|
|
2593
2593
|
|
|
2594
|
+
function setSpawnCwd(cwd, { remember = false } = {}) {
|
|
2595
|
+
const next = (cwd || '').trim();
|
|
2596
|
+
const input = document.getElementById('spawnCwd');
|
|
2597
|
+
input.value = next;
|
|
2598
|
+
defaultSpawnCwd = next;
|
|
2599
|
+
localStorage.setItem('spawnCwd', defaultSpawnCwd);
|
|
2600
|
+
if (remember && next) {
|
|
2601
|
+
rememberCwd(next);
|
|
2602
|
+
}
|
|
2603
|
+
}
|
|
2604
|
+
|
|
2594
2605
|
const searchParams = new URLSearchParams(window.location.search);
|
|
2595
2606
|
const inferredRelayUrl = inferDefaultRelayUrl();
|
|
2596
2607
|
document.getElementById('relayUrl').value = inferredRelayUrl;
|
|
@@ -3658,6 +3669,10 @@
|
|
|
3658
3669
|
pushNodeTranscript,
|
|
3659
3670
|
renderWorkers,
|
|
3660
3671
|
syncWorkerPluginPreference,
|
|
3672
|
+
getSpawnCwd() {
|
|
3673
|
+
return (document.getElementById('spawnCwd').value || '').trim();
|
|
3674
|
+
},
|
|
3675
|
+
setSpawnCwd,
|
|
3661
3676
|
setSessionDisplay(value) {
|
|
3662
3677
|
document.getElementById('session-display').textContent = value;
|
|
3663
3678
|
},
|
|
@@ -105,6 +105,18 @@
|
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
function handleControlMessage(msg, ctx) {
|
|
108
|
+
if (msg.controlKind === "result" && msg.controlName === "spawn_worker") {
|
|
109
|
+
if (msg.ok === false) {
|
|
110
|
+
ctx.pendingSpawnSessionId = null;
|
|
111
|
+
ctx.pendingSpawnAutoAttach = true;
|
|
112
|
+
ctx.resetSpawnButton();
|
|
113
|
+
ctx.writeSystemNotice(`SPAWN FAILED: ${msg.payload?.error || msg.error || "Unknown error"}`);
|
|
114
|
+
ctx.renderWorkers();
|
|
115
|
+
return true;
|
|
116
|
+
}
|
|
117
|
+
return false;
|
|
118
|
+
}
|
|
119
|
+
|
|
108
120
|
if (msg.controlKind === "result" && msg.controlName === "get_primary_agent" && msg.payload && msg.payload.primary) {
|
|
109
121
|
ctx.primaryAgent = msg.payload.primary || null;
|
|
110
122
|
ctx.renderNodeHome();
|
|
@@ -145,6 +157,9 @@
|
|
|
145
157
|
ctx.dirBrowserParentPath = msg.payload.parentPath || null;
|
|
146
158
|
ctx.dirBrowserRepoRoot = msg.payload.repoRoot || null;
|
|
147
159
|
ctx.dirBrowserEntries = msg.payload.entries || [];
|
|
160
|
+
if (!ctx.getSpawnCwd?.() && msg.payload.path) {
|
|
161
|
+
ctx.setSpawnCwd?.(msg.payload.path);
|
|
162
|
+
}
|
|
148
163
|
ctx.renderDirBrowser();
|
|
149
164
|
return true;
|
|
150
165
|
}
|
|
@@ -165,6 +180,9 @@
|
|
|
165
180
|
ctx.dirBrowserParentPath = msg.payload.parentPath || null;
|
|
166
181
|
ctx.dirBrowserRepoRoot = msg.payload.repoRoot || null;
|
|
167
182
|
ctx.dirBrowserEntries = msg.payload.entries || [];
|
|
183
|
+
if (!ctx.getSpawnCwd?.() && msg.payload.path) {
|
|
184
|
+
ctx.setSpawnCwd?.(msg.payload.path);
|
|
185
|
+
}
|
|
168
186
|
ctx.renderDirBrowser();
|
|
169
187
|
return true;
|
|
170
188
|
}
|