agentuity-vscode 0.1.18 → 0.1.20
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/extension.js +18 -13
- package/package.json +1 -1
- package/src/core/cliClient.ts +42 -5
- package/src/core/sandboxManager.ts +22 -7
- package/src/features/chat/agentTools.ts +3 -3
- package/src/features/sandboxExplorer/index.ts +3 -3
- package/src/features/sandboxExplorer/sandboxTreeData.ts +2 -2
- package/src/features/sandboxExplorer/statusBar.ts +2 -2
package/dist/extension.js
CHANGED
|
@@ -8538,11 +8538,16 @@ var SandboxManager = class {
|
|
|
8538
8538
|
if (result.success && result.data) {
|
|
8539
8539
|
const info = result.data;
|
|
8540
8540
|
results.set(link.sandboxId, info);
|
|
8541
|
-
|
|
8541
|
+
const runtimeChanged = info.runtime?.id !== link.runtime?.id || info.runtime?.name !== link.runtime?.name || info.runtime?.iconUrl !== link.runtime?.iconUrl || info.runtime?.brandColor !== link.runtime?.brandColor;
|
|
8542
|
+
if (info.name !== link.name || info.description !== link.description || runtimeChanged) {
|
|
8542
8543
|
link.name = info.name ?? link.name;
|
|
8543
8544
|
link.description = info.description;
|
|
8544
|
-
link.
|
|
8545
|
-
|
|
8545
|
+
link.runtime = info.runtime ? {
|
|
8546
|
+
id: info.runtime.id,
|
|
8547
|
+
name: info.runtime.name,
|
|
8548
|
+
iconUrl: info.runtime.iconUrl,
|
|
8549
|
+
brandColor: info.runtime.brandColor
|
|
8550
|
+
} : void 0;
|
|
8546
8551
|
needsUpdate = true;
|
|
8547
8552
|
}
|
|
8548
8553
|
} else {
|
|
@@ -9910,7 +9915,7 @@ var SandboxTreeItem = class extends vscode16.TreeItem {
|
|
|
9910
9915
|
}
|
|
9911
9916
|
this.contextValue = contextValue;
|
|
9912
9917
|
const statusLabel = status.charAt(0).toUpperCase() + status.slice(1);
|
|
9913
|
-
const runtimeLabel = this.sandboxData.
|
|
9918
|
+
const runtimeLabel = this.sandboxData.runtime?.name ?? this.sandboxData.runtime?.id ?? "bun:1";
|
|
9914
9919
|
let desc2 = `${statusLabel} \xB7 ${runtimeLabel}`;
|
|
9915
9920
|
if (this.sandboxData.url) {
|
|
9916
9921
|
desc2 += " \u{1F310}";
|
|
@@ -9962,7 +9967,7 @@ var SandboxTreeItem = class extends vscode16.TreeItem {
|
|
|
9962
9967
|
}
|
|
9963
9968
|
lines.push(`ID: ${this.sandboxData.sandboxId}`);
|
|
9964
9969
|
lines.push(`Status: ${this.sandboxData.status}`);
|
|
9965
|
-
const runtimeDisplay = this.sandboxData.
|
|
9970
|
+
const runtimeDisplay = this.sandboxData.runtime?.name ?? this.sandboxData.runtime?.id ?? "bun:1";
|
|
9966
9971
|
lines.push(`Runtime: ${runtimeDisplay}`);
|
|
9967
9972
|
if (this.sandboxData.region) {
|
|
9968
9973
|
lines.push(`Region: ${this.sandboxData.region}`);
|
|
@@ -10566,7 +10571,7 @@ function updateStatusBar() {
|
|
|
10566
10571
|
} else if (linked.length === 1) {
|
|
10567
10572
|
const sandbox = linked[0];
|
|
10568
10573
|
const name2 = sandbox.name || sandbox.sandboxId.slice(0, 8);
|
|
10569
|
-
const runtime = sandbox.
|
|
10574
|
+
const runtime = sandbox.runtime?.name ?? sandbox.runtime?.id ?? "bun:1";
|
|
10570
10575
|
statusBarItem.text = `$(vm) ${name2}`;
|
|
10571
10576
|
const tooltipLines = [
|
|
10572
10577
|
`Sandbox: ${sandbox.sandboxId}`,
|
|
@@ -10642,7 +10647,7 @@ async function showSandboxQuickPick() {
|
|
|
10642
10647
|
});
|
|
10643
10648
|
for (const sandbox of linked) {
|
|
10644
10649
|
const name2 = sandbox.name || sandbox.sandboxId.slice(0, 8);
|
|
10645
|
-
const runtime = sandbox.
|
|
10650
|
+
const runtime = sandbox.runtime?.name ?? sandbox.runtime?.id ?? "bun:1";
|
|
10646
10651
|
items.push({
|
|
10647
10652
|
label: `$(vm) ${name2}`,
|
|
10648
10653
|
description: `${runtime} \xB7 ${sandbox.sandboxId.slice(0, 8)}`,
|
|
@@ -11302,7 +11307,7 @@ async function createSandbox(provider) {
|
|
|
11302
11307
|
if (result.success && result.data) {
|
|
11303
11308
|
const info = result.data;
|
|
11304
11309
|
const displayName = info.name || info.sandboxId.slice(0, 12);
|
|
11305
|
-
const runtimeDisplay = info.
|
|
11310
|
+
const runtimeDisplay = info.runtime?.name ?? info.runtime?.id ?? "bun:1";
|
|
11306
11311
|
vscode18.window.showInformationMessage(
|
|
11307
11312
|
`Sandbox "${displayName}" created with runtime ${runtimeDisplay}`
|
|
11308
11313
|
);
|
|
@@ -11344,7 +11349,7 @@ async function createSandboxFromSnapshot(snapshotId, provider) {
|
|
|
11344
11349
|
if (result.success && result.data) {
|
|
11345
11350
|
const info = result.data;
|
|
11346
11351
|
const displayName = info.name || info.sandboxId.slice(0, 12);
|
|
11347
|
-
const runtimeDisplay = info.
|
|
11352
|
+
const runtimeDisplay = info.runtime?.name ?? info.runtime?.id ?? "bun:1";
|
|
11348
11353
|
vscode18.window.showInformationMessage(
|
|
11349
11354
|
`Sandbox "${displayName}" created from snapshot with runtime ${runtimeDisplay}`
|
|
11350
11355
|
);
|
|
@@ -11972,7 +11977,7 @@ async function uploadToSandbox(uri) {
|
|
|
11972
11977
|
const picked = await vscode18.window.showQuickPick(
|
|
11973
11978
|
sandboxes.map((s) => ({
|
|
11974
11979
|
label: s.name || s.sandboxId.slice(0, 12),
|
|
11975
|
-
description: `${s.status} \xB7 ${s.
|
|
11980
|
+
description: `${s.status} \xB7 ${s.runtime?.name ?? s.runtime?.id ?? "base"}`,
|
|
11976
11981
|
detail: s.sandboxId,
|
|
11977
11982
|
sandbox: s
|
|
11978
11983
|
})),
|
|
@@ -13445,8 +13450,8 @@ var ListSandboxesTool = class {
|
|
|
13445
13450
|
name: s.name,
|
|
13446
13451
|
description: s.description,
|
|
13447
13452
|
status: s.status,
|
|
13448
|
-
runtime: s.
|
|
13449
|
-
runtimeId: s.
|
|
13453
|
+
runtime: s.runtime?.name ?? s.runtime?.id,
|
|
13454
|
+
runtimeId: s.runtime?.id,
|
|
13450
13455
|
region: s.region,
|
|
13451
13456
|
createdAt: s.createdAt,
|
|
13452
13457
|
resources: s.resources,
|
|
@@ -13512,7 +13517,7 @@ var CreateSandboxTool = class {
|
|
|
13512
13517
|
`ID: ${info.sandboxId}`,
|
|
13513
13518
|
info.name ? `Name: ${info.name}` : "",
|
|
13514
13519
|
info.description ? `Description: ${info.description}` : "",
|
|
13515
|
-
`Runtime: ${info.
|
|
13520
|
+
`Runtime: ${info.runtime?.name ?? info.runtime?.id ?? "bun:1"}`,
|
|
13516
13521
|
`Status: ${info.status}`,
|
|
13517
13522
|
`Region: ${info.region}`
|
|
13518
13523
|
].filter(Boolean);
|
package/package.json
CHANGED
package/src/core/cliClient.ts
CHANGED
|
@@ -1206,6 +1206,46 @@ export interface SandboxResources {
|
|
|
1206
1206
|
disk?: string;
|
|
1207
1207
|
}
|
|
1208
1208
|
|
|
1209
|
+
export interface SandboxRuntimeInfo {
|
|
1210
|
+
id: string;
|
|
1211
|
+
name: string;
|
|
1212
|
+
iconUrl?: string;
|
|
1213
|
+
brandColor?: string;
|
|
1214
|
+
tags?: string[];
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
export interface SandboxSnapshotUserInfo {
|
|
1218
|
+
id: string;
|
|
1219
|
+
firstName?: string;
|
|
1220
|
+
lastName?: string;
|
|
1221
|
+
}
|
|
1222
|
+
|
|
1223
|
+
export interface SandboxSnapshotOrgInfo {
|
|
1224
|
+
id: string;
|
|
1225
|
+
name: string;
|
|
1226
|
+
slug?: string;
|
|
1227
|
+
}
|
|
1228
|
+
|
|
1229
|
+
export interface SandboxSnapshotInfoPublic {
|
|
1230
|
+
id: string;
|
|
1231
|
+
name?: string;
|
|
1232
|
+
tag?: string | null;
|
|
1233
|
+
fullName?: string;
|
|
1234
|
+
public: true;
|
|
1235
|
+
org: SandboxSnapshotOrgInfo;
|
|
1236
|
+
}
|
|
1237
|
+
|
|
1238
|
+
export interface SandboxSnapshotInfoPrivate {
|
|
1239
|
+
id: string;
|
|
1240
|
+
name?: string;
|
|
1241
|
+
tag?: string | null;
|
|
1242
|
+
fullName?: string;
|
|
1243
|
+
public: false;
|
|
1244
|
+
user: SandboxSnapshotUserInfo;
|
|
1245
|
+
}
|
|
1246
|
+
|
|
1247
|
+
export type SandboxSnapshotInfo = SandboxSnapshotInfoPublic | SandboxSnapshotInfoPrivate;
|
|
1248
|
+
|
|
1209
1249
|
export interface SandboxInfo {
|
|
1210
1250
|
sandboxId: string;
|
|
1211
1251
|
status: SandboxStatus;
|
|
@@ -1215,13 +1255,10 @@ export interface SandboxInfo {
|
|
|
1215
1255
|
resources?: SandboxResources;
|
|
1216
1256
|
stdoutStreamUrl?: string;
|
|
1217
1257
|
stderrStreamUrl?: string;
|
|
1218
|
-
// New fields from sandbox improvements
|
|
1219
1258
|
name?: string;
|
|
1220
1259
|
description?: string;
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
runtimeIconUrl?: string;
|
|
1224
|
-
runtimeBrandColor?: string;
|
|
1260
|
+
runtime?: SandboxRuntimeInfo;
|
|
1261
|
+
snapshot?: SandboxSnapshotInfo;
|
|
1225
1262
|
// Network/URL fields
|
|
1226
1263
|
identifier?: string;
|
|
1227
1264
|
networkPort?: number;
|
|
@@ -11,16 +11,21 @@ export const DEFAULT_SANDBOX_PATH = CliClient.SANDBOX_HOME;
|
|
|
11
11
|
/**
|
|
12
12
|
* Represents a sandbox linked to the current workspace.
|
|
13
13
|
*/
|
|
14
|
+
export interface LinkedSandboxRuntime {
|
|
15
|
+
id: string;
|
|
16
|
+
name: string;
|
|
17
|
+
iconUrl?: string;
|
|
18
|
+
brandColor?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
14
21
|
export interface LinkedSandbox {
|
|
15
22
|
sandboxId: string;
|
|
16
23
|
name?: string;
|
|
17
24
|
linkedAt: string;
|
|
18
25
|
lastSyncedAt?: string;
|
|
19
26
|
remotePath: string;
|
|
20
|
-
// New fields from sandbox improvements
|
|
21
27
|
description?: string;
|
|
22
|
-
|
|
23
|
-
runtimeName?: string;
|
|
28
|
+
runtime?: LinkedSandboxRuntime;
|
|
24
29
|
region?: string;
|
|
25
30
|
}
|
|
26
31
|
|
|
@@ -459,16 +464,26 @@ export class SandboxManager {
|
|
|
459
464
|
results.set(link.sandboxId, info);
|
|
460
465
|
|
|
461
466
|
// Update linked sandbox with new fields from API
|
|
467
|
+
const runtimeChanged =
|
|
468
|
+
info.runtime?.id !== link.runtime?.id ||
|
|
469
|
+
info.runtime?.name !== link.runtime?.name ||
|
|
470
|
+
info.runtime?.iconUrl !== link.runtime?.iconUrl ||
|
|
471
|
+
info.runtime?.brandColor !== link.runtime?.brandColor;
|
|
462
472
|
if (
|
|
463
473
|
info.name !== link.name ||
|
|
464
474
|
info.description !== link.description ||
|
|
465
|
-
|
|
466
|
-
info.runtimeName !== link.runtimeName
|
|
475
|
+
runtimeChanged
|
|
467
476
|
) {
|
|
468
477
|
link.name = info.name ?? link.name;
|
|
469
478
|
link.description = info.description;
|
|
470
|
-
link.
|
|
471
|
-
|
|
479
|
+
link.runtime = info.runtime
|
|
480
|
+
? {
|
|
481
|
+
id: info.runtime.id,
|
|
482
|
+
name: info.runtime.name,
|
|
483
|
+
iconUrl: info.runtime.iconUrl,
|
|
484
|
+
brandColor: info.runtime.brandColor,
|
|
485
|
+
}
|
|
486
|
+
: undefined;
|
|
472
487
|
needsUpdate = true;
|
|
473
488
|
}
|
|
474
489
|
} else {
|
|
@@ -510,8 +510,8 @@ export class ListSandboxesTool implements vscode.LanguageModelTool<ListSandboxes
|
|
|
510
510
|
name: s.name,
|
|
511
511
|
description: s.description,
|
|
512
512
|
status: s.status,
|
|
513
|
-
runtime: s.
|
|
514
|
-
runtimeId: s.
|
|
513
|
+
runtime: s.runtime?.name ?? s.runtime?.id,
|
|
514
|
+
runtimeId: s.runtime?.id,
|
|
515
515
|
region: s.region,
|
|
516
516
|
createdAt: s.createdAt,
|
|
517
517
|
resources: s.resources,
|
|
@@ -617,7 +617,7 @@ export class CreateSandboxTool implements vscode.LanguageModelTool<CreateSandbox
|
|
|
617
617
|
`ID: ${info.sandboxId}`,
|
|
618
618
|
info.name ? `Name: ${info.name}` : '',
|
|
619
619
|
info.description ? `Description: ${info.description}` : '',
|
|
620
|
-
`Runtime: ${info.
|
|
620
|
+
`Runtime: ${info.runtime?.name ?? info.runtime?.id ?? 'bun:1'}`,
|
|
621
621
|
`Status: ${info.status}`,
|
|
622
622
|
`Region: ${info.region}`,
|
|
623
623
|
].filter(Boolean);
|
|
@@ -610,7 +610,7 @@ async function createSandbox(provider: SandboxTreeDataProvider): Promise<void> {
|
|
|
610
610
|
if (result.success && result.data) {
|
|
611
611
|
const info = result.data;
|
|
612
612
|
const displayName = info.name || info.sandboxId.slice(0, 12);
|
|
613
|
-
const runtimeDisplay = info.
|
|
613
|
+
const runtimeDisplay = info.runtime?.name ?? info.runtime?.id ?? 'bun:1';
|
|
614
614
|
vscode.window.showInformationMessage(
|
|
615
615
|
`Sandbox "${displayName}" created with runtime ${runtimeDisplay}`
|
|
616
616
|
);
|
|
@@ -662,7 +662,7 @@ async function createSandboxFromSnapshot(
|
|
|
662
662
|
if (result.success && result.data) {
|
|
663
663
|
const info = result.data;
|
|
664
664
|
const displayName = info.name || info.sandboxId.slice(0, 12);
|
|
665
|
-
const runtimeDisplay = info.
|
|
665
|
+
const runtimeDisplay = info.runtime?.name ?? info.runtime?.id ?? 'bun:1';
|
|
666
666
|
vscode.window.showInformationMessage(
|
|
667
667
|
`Sandbox "${displayName}" created from snapshot with runtime ${runtimeDisplay}`
|
|
668
668
|
);
|
|
@@ -1459,7 +1459,7 @@ async function uploadToSandbox(uri: vscode.Uri): Promise<void> {
|
|
|
1459
1459
|
const picked = await vscode.window.showQuickPick(
|
|
1460
1460
|
sandboxes.map((s) => ({
|
|
1461
1461
|
label: s.name || s.sandboxId.slice(0, 12),
|
|
1462
|
-
description: `${s.status} · ${s.
|
|
1462
|
+
description: `${s.status} · ${s.runtime?.name ?? s.runtime?.id ?? 'base'}`,
|
|
1463
1463
|
detail: s.sandboxId,
|
|
1464
1464
|
sandbox: s,
|
|
1465
1465
|
})),
|
|
@@ -95,7 +95,7 @@ export class SandboxTreeItem extends vscode.TreeItem {
|
|
|
95
95
|
|
|
96
96
|
// Set description with status and runtime
|
|
97
97
|
const statusLabel = status.charAt(0).toUpperCase() + status.slice(1);
|
|
98
|
-
const runtimeLabel = this.sandboxData.
|
|
98
|
+
const runtimeLabel = this.sandboxData.runtime?.name ?? this.sandboxData.runtime?.id ?? 'bun:1';
|
|
99
99
|
let desc = `${statusLabel} · ${runtimeLabel}`;
|
|
100
100
|
if (this.sandboxData.url) {
|
|
101
101
|
desc += ' 🌐';
|
|
@@ -158,7 +158,7 @@ export class SandboxTreeItem extends vscode.TreeItem {
|
|
|
158
158
|
lines.push(`Status: ${this.sandboxData.status}`);
|
|
159
159
|
|
|
160
160
|
// Runtime info
|
|
161
|
-
const runtimeDisplay = this.sandboxData.
|
|
161
|
+
const runtimeDisplay = this.sandboxData.runtime?.name ?? this.sandboxData.runtime?.id ?? 'bun:1';
|
|
162
162
|
lines.push(`Runtime: ${runtimeDisplay}`);
|
|
163
163
|
|
|
164
164
|
if (this.sandboxData.region) {
|
|
@@ -40,7 +40,7 @@ export function updateStatusBar(): void {
|
|
|
40
40
|
} else if (linked.length === 1) {
|
|
41
41
|
const sandbox = linked[0];
|
|
42
42
|
const name = sandbox.name || sandbox.sandboxId.slice(0, 8);
|
|
43
|
-
const runtime = sandbox.
|
|
43
|
+
const runtime = sandbox.runtime?.name ?? sandbox.runtime?.id ?? 'bun:1';
|
|
44
44
|
statusBarItem.text = `$(vm) ${name}`;
|
|
45
45
|
|
|
46
46
|
const tooltipLines = [
|
|
@@ -137,7 +137,7 @@ async function showSandboxQuickPick(): Promise<void> {
|
|
|
137
137
|
|
|
138
138
|
for (const sandbox of linked) {
|
|
139
139
|
const name = sandbox.name || sandbox.sandboxId.slice(0, 8);
|
|
140
|
-
const runtime = sandbox.
|
|
140
|
+
const runtime = sandbox.runtime?.name ?? sandbox.runtime?.id ?? 'bun:1';
|
|
141
141
|
items.push({
|
|
142
142
|
label: `$(vm) ${name}`,
|
|
143
143
|
description: `${runtime} · ${sandbox.sandboxId.slice(0, 8)}`,
|