agentuity-vscode 0.0.101 → 0.0.102
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/package.json +6 -1
- package/src/core/cliClient.ts +22 -9
- package/src/extension.ts +26 -0
- package/src/features/agentExplorer/agentTreeData.ts +6 -4
- package/src/features/agentExplorer/index.ts +3 -2
- package/src/features/dataExplorer/dataTreeData.ts +2 -2
- package/src/features/dataExplorer/index.ts +3 -3
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "agentuity-vscode",
|
|
3
3
|
"displayName": "Agentuity VSCode Extension",
|
|
4
4
|
"description": "Build, deploy, and manage AI agents with Agentuity",
|
|
5
|
-
"version": "0.0.
|
|
5
|
+
"version": "0.0.102",
|
|
6
6
|
"publisher": "agentuity",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|
|
@@ -196,6 +196,11 @@
|
|
|
196
196
|
"command": "agentuity.createCustomAgents",
|
|
197
197
|
"title": "Create Custom Agents for Background Use",
|
|
198
198
|
"category": "Agentuity"
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"command": "agentuity.generateSkills",
|
|
202
|
+
"title": "Generate AI Skills",
|
|
203
|
+
"category": "Agentuity"
|
|
199
204
|
}
|
|
200
205
|
],
|
|
201
206
|
"viewsContainers": {
|
package/src/core/cliClient.ts
CHANGED
|
@@ -524,15 +524,27 @@ export interface WhoamiResponse {
|
|
|
524
524
|
}
|
|
525
525
|
|
|
526
526
|
// Agent types
|
|
527
|
+
export interface AgentEval {
|
|
528
|
+
id: string;
|
|
529
|
+
name: string;
|
|
530
|
+
description: string | null;
|
|
531
|
+
identifier: string | null;
|
|
532
|
+
devmode: boolean;
|
|
533
|
+
createdAt: string;
|
|
534
|
+
updatedAt: string;
|
|
535
|
+
}
|
|
536
|
+
|
|
527
537
|
export interface Agent {
|
|
528
538
|
id: string;
|
|
529
539
|
name: string;
|
|
530
|
-
description
|
|
531
|
-
identifier
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
540
|
+
description: string | null;
|
|
541
|
+
identifier: string;
|
|
542
|
+
deploymentId: string | null;
|
|
543
|
+
devmode: boolean;
|
|
544
|
+
metadata: Record<string, unknown> | null;
|
|
545
|
+
createdAt: string;
|
|
546
|
+
updatedAt: string;
|
|
547
|
+
evals: AgentEval[];
|
|
536
548
|
}
|
|
537
549
|
|
|
538
550
|
export type AgentListResponse = Agent[];
|
|
@@ -631,10 +643,11 @@ export interface VectorSearchResponse {
|
|
|
631
643
|
|
|
632
644
|
export interface VectorGetResponse {
|
|
633
645
|
exists: boolean;
|
|
634
|
-
key
|
|
635
|
-
id
|
|
636
|
-
document
|
|
646
|
+
key?: string;
|
|
647
|
+
id?: string;
|
|
648
|
+
document?: string;
|
|
637
649
|
metadata?: Record<string, unknown>;
|
|
650
|
+
similarity?: number;
|
|
638
651
|
}
|
|
639
652
|
|
|
640
653
|
// AI types
|
package/src/extension.ts
CHANGED
|
@@ -194,6 +194,32 @@ function registerSetupCommands(context: vscode.ExtensionContext): void {
|
|
|
194
194
|
terminal.show();
|
|
195
195
|
})
|
|
196
196
|
);
|
|
197
|
+
|
|
198
|
+
context.subscriptions.push(
|
|
199
|
+
vscode.commands.registerCommand('agentuity.generateSkills', async () => {
|
|
200
|
+
const workspaceFolder = vscode.workspace.workspaceFolders?.[0];
|
|
201
|
+
if (!workspaceFolder) {
|
|
202
|
+
vscode.window.showErrorMessage('No workspace folder open');
|
|
203
|
+
return;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const outputPath = await vscode.window.showInputBox({
|
|
207
|
+
prompt: 'Output directory for generated skills',
|
|
208
|
+
value: workspaceFolder.uri.fsPath,
|
|
209
|
+
placeHolder: '/path/to/output',
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
if (!outputPath) {
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
const terminal = vscode.window.createTerminal('Agentuity Skills');
|
|
217
|
+
terminal.sendText(`agentuity ai skills generate --output "${outputPath}"`);
|
|
218
|
+
terminal.show();
|
|
219
|
+
|
|
220
|
+
vscode.window.showInformationMessage('Generating AI skills...');
|
|
221
|
+
})
|
|
222
|
+
);
|
|
197
223
|
}
|
|
198
224
|
|
|
199
225
|
function registerDeployCommand(context: vscode.ExtensionContext): void {
|
|
@@ -17,10 +17,11 @@ export class AgentTreeItem extends vscode.TreeItem {
|
|
|
17
17
|
this.iconPath = new vscode.ThemeIcon('robot');
|
|
18
18
|
this.contextValue = 'agent';
|
|
19
19
|
this.tooltip = this.buildAgentTooltip(agentData);
|
|
20
|
-
|
|
20
|
+
const filename = agentData?.metadata?.filename;
|
|
21
|
+
if (typeof filename === 'string') {
|
|
21
22
|
const project = getCurrentProject();
|
|
22
23
|
if (project) {
|
|
23
|
-
const filePath = path.join(project.rootPath,
|
|
24
|
+
const filePath = path.join(project.rootPath, filename);
|
|
24
25
|
this.command = {
|
|
25
26
|
command: 'vscode.open',
|
|
26
27
|
title: 'Open Agent',
|
|
@@ -48,8 +49,9 @@ export class AgentTreeItem extends vscode.TreeItem {
|
|
|
48
49
|
if (agent?.identifier) {
|
|
49
50
|
lines.push(`Identifier: ${agent.identifier}`);
|
|
50
51
|
}
|
|
51
|
-
|
|
52
|
-
|
|
52
|
+
const filename = agent?.metadata?.filename;
|
|
53
|
+
if (typeof filename === 'string') {
|
|
54
|
+
lines.push(`File: ${filename}`);
|
|
53
55
|
}
|
|
54
56
|
lines.push('');
|
|
55
57
|
lines.push('Right-click for more actions');
|
|
@@ -31,7 +31,8 @@ export function registerAgentExplorer(context: vscode.ExtensionContext): AgentTr
|
|
|
31
31
|
|
|
32
32
|
context.subscriptions.push(
|
|
33
33
|
vscode.commands.registerCommand('agentuity.agent.goToFile', async (item: AgentTreeItem) => {
|
|
34
|
-
|
|
34
|
+
const filename = item?.agentData?.metadata?.filename;
|
|
35
|
+
if (typeof filename !== 'string') {
|
|
35
36
|
vscode.window.showWarningMessage('No source file associated with this agent');
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
@@ -42,7 +43,7 @@ export function registerAgentExplorer(context: vscode.ExtensionContext): AgentTr
|
|
|
42
43
|
return;
|
|
43
44
|
}
|
|
44
45
|
|
|
45
|
-
const filePath = path.join(project.rootPath,
|
|
46
|
+
const filePath = path.join(project.rootPath, filename);
|
|
46
47
|
const uri = vscode.Uri.file(filePath);
|
|
47
48
|
|
|
48
49
|
try {
|
|
@@ -383,7 +383,7 @@ export class DataTreeDataProvider implements vscode.TreeDataProvider<DataTreeIte
|
|
|
383
383
|
|
|
384
384
|
return group.results.map((result) => {
|
|
385
385
|
const item = new DataTreeItem(
|
|
386
|
-
result.key,
|
|
386
|
+
result.key ?? '(unknown)',
|
|
387
387
|
vscode.TreeItemCollapsibleState.None,
|
|
388
388
|
'vectorResult',
|
|
389
389
|
'vector',
|
|
@@ -391,7 +391,7 @@ export class DataTreeDataProvider implements vscode.TreeDataProvider<DataTreeIte
|
|
|
391
391
|
result
|
|
392
392
|
);
|
|
393
393
|
item.description = `${(result.similarity * 100).toFixed(1)}%`;
|
|
394
|
-
item.tooltip = `Similarity: ${(result.similarity * 100).toFixed(2)}%\nID: ${result.id}`;
|
|
394
|
+
item.tooltip = `Similarity: ${(result.similarity * 100).toFixed(2)}%\nID: ${result.id ?? '(unknown)'}`;
|
|
395
395
|
return item;
|
|
396
396
|
});
|
|
397
397
|
}
|
|
@@ -210,8 +210,8 @@ async function openVectorDocument(item: DataTreeItem): Promise<void> {
|
|
|
210
210
|
|
|
211
211
|
// Add metadata section
|
|
212
212
|
lines.push('=== Metadata ===');
|
|
213
|
-
lines.push(`Key: ${result.data.key}`);
|
|
214
|
-
lines.push(`ID: ${result.data.id}`);
|
|
213
|
+
lines.push(`Key: ${result.data.key ?? '(unknown)'}`);
|
|
214
|
+
lines.push(`ID: ${result.data.id ?? '(unknown)'}`);
|
|
215
215
|
if (result.data.metadata && Object.keys(result.data.metadata).length > 0) {
|
|
216
216
|
lines.push(`Metadata: ${JSON.stringify(result.data.metadata, null, 2)}`);
|
|
217
217
|
}
|
|
@@ -219,7 +219,7 @@ async function openVectorDocument(item: DataTreeItem): Promise<void> {
|
|
|
219
219
|
lines.push('');
|
|
220
220
|
lines.push('=== Document ===');
|
|
221
221
|
lines.push('');
|
|
222
|
-
lines.push(result.data.document);
|
|
222
|
+
lines.push(result.data.document ?? '(no document)');
|
|
223
223
|
|
|
224
224
|
await openReadonlyDocument(lines.join('\n'), 'plaintext', `vector-${key}`);
|
|
225
225
|
}
|