generator-agent 1.0.3 → 1.0.4

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.
@@ -1,6 +1,6 @@
1
1
  {
2
- "id": "generators",
3
- "name": "Generators",
2
+ "id": "generator",
3
+ "name": "GeneratorAgent",
4
4
  "description": "Generator Agent responsible for generating generators",
5
5
  "scope": "folder",
6
6
  "folderScoped": true
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "agents": [
3
3
  {
4
- "id": "generators",
5
- "name": "Generators",
4
+ "id": "generator",
5
+ "name": "GeneratorAgent",
6
6
  "description": "Generator Agent responsible for generating generators"
7
7
  }
8
8
  ],
9
- "registeredAt": "2026-02-26T07:08:20.032Z",
9
+ "registeredAt": "2026-02-26T07:22:50.850Z",
10
10
  "installedFrom": "/home/ish-zstk410/Agent"
11
11
  }
package/main.js CHANGED
@@ -5,8 +5,8 @@ const fs = require('fs');
5
5
  // Agent objects that will be discovered by Copilot
6
6
  const agents = [
7
7
  {
8
- id: 'generators',
9
- name: 'Generators',
8
+ id: 'generator',
9
+ name: 'GeneratorAgent',
10
10
  description: 'Generator Agent responsible for generating generators',
11
11
  }
12
12
  ];
@@ -40,17 +40,24 @@ function activate(context) {
40
40
 
41
41
  // Register chat participant for Copilot
42
42
  if (vscode.chat && vscode.chat.createChatParticipant) {
43
- const participant = vscode.chat.createChatParticipant('generators', (request, context, stream, token) => {
44
- stream.markdown('👋 Generator Agent activated! Use me to generate API data generators.\n\n');
45
- stream.markdown('Available commands:\n');
46
- stream.markdown('- Create a new generator\n');
47
- stream.markdown('- Analyze OpenAPI specification\n');
48
- stream.markdown('- Generate based on patterns\n');
43
+ const participant = vscode.chat.createChatParticipant('generator', (request, context, stream, token) => {
44
+ const userMessage = request.prompt.toLowerCase();
45
+
46
+ // Default response for generator requests
47
+ stream.markdown('**GeneratorAgent**: Processing...\n\n');
48
+ stream.markdown(`You asked: "${request.prompt}"\n\n`);
49
+ stream.markdown('I can help you generate:\n\n');
50
+ stream.markdown('**Static data** - Fixed values\n');
51
+ stream.markdown('**Dynamic data** - Generated using expressions\n');
52
+ stream.markdown('**Conditional data** - Based on rules\n');
53
+ stream.markdown('**Reference data** - From other fields\n');
54
+ stream.markdown('**Remote data** - From external APIs\n');
55
+
49
56
  return {};
50
57
  });
51
58
  participant.iconPath = vscode.Uri.file(__dirname + '/.agents/generators.json');
52
59
  context.subscriptions.push(participant);
53
- console.log('✅ Chat participant registered: @generators');
60
+ console.log('✅ Chat participant registered: @generator');
54
61
  }
55
62
 
56
63
  // Export agents for Copilot discovery (fallback)
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "generator-agent",
3
3
  "displayName": "GeneratorAgent",
4
4
  "description": "A VS Code extension for conditional rule-based data generation",
5
- "version": "1.0.3",
5
+ "version": "1.0.4",
6
6
  "publisher": "zohodesk",
7
7
  "engines": {
8
8
  "vscode": "^1.80.0"
@@ -29,8 +29,8 @@
29
29
  ],
30
30
  "chatParticipants": [
31
31
  {
32
- "id": "generators",
33
- "name": "Generators",
32
+ "id": "generator",
33
+ "name": "GeneratorAgent",
34
34
  "description": "Generator Agent responsible for generating generators",
35
35
  "isSticky": true
36
36
  }
package/post-install.js CHANGED
@@ -31,8 +31,8 @@ try {
31
31
  const agentsConfig = {
32
32
  agents: [
33
33
  {
34
- id: 'generators',
35
- name: 'Generators',
34
+ id: 'generator',
35
+ name: 'GeneratorAgent',
36
36
  description: 'Generator Agent responsible for generating generators',
37
37
  }
38
38
  ],
@@ -61,7 +61,7 @@ try {
61
61
 
62
62
  // Create extension symlink for VS Code to discover
63
63
  const extensionsDir = path.join(cwd, '.vscode', 'extensions');
64
- const extensionLink = path.join(extensionsDir, 'generator-agent');
64
+ const extensionLink = path.join(extensionsDir, 'zohodesk.generator-agent');
65
65
  const packagePath = path.join(cwd, 'node_modules', 'generator-agent');
66
66
 
67
67
  if (!fs.existsSync(extensionsDir)) {
@@ -70,7 +70,11 @@ try {
70
70
 
71
71
  // Remove old symlink if exists
72
72
  if (fs.existsSync(extensionLink)) {
73
- fs.unlinkSync(extensionLink);
73
+ try {
74
+ fs.unlinkSync(extensionLink);
75
+ } catch (e) {
76
+ // ignore
77
+ }
74
78
  }
75
79
 
76
80
  // Create symlink to make extension discoverable
@@ -79,7 +83,11 @@ try {
79
83
  console.log('🔗 Extension linked to .vscode/extensions/');
80
84
  } catch (e) {
81
85
  console.log('⚠️ Could not create symlink, copying files instead...');
82
- // Fallback: copy instead of symlink
86
+ // Fallback: copy instead of symlink - check if both paths exist first
87
+ if (!fs.existsSync(packagePath)) {
88
+ console.log('⚠️ Package path not found:', packagePath);
89
+ return;
90
+ }
83
91
  const copyDir = (src, dest) => {
84
92
  if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true });
85
93
  const entries = fs.readdirSync(src, { withFileTypes: true });