generator-agent 1.0.0 → 1.0.2

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.
@@ -6,6 +6,6 @@
6
6
  "description": "Generator Agent responsible for generating generators"
7
7
  }
8
8
  ],
9
- "registeredAt": "2026-02-26T06:44:52.745Z",
9
+ "registeredAt": "2026-02-26T06:56:59.449Z",
10
10
  "installedFrom": "/home/ish-zstk410/Agent"
11
11
  }
@@ -0,0 +1,6 @@
1
+ {
2
+ "github.copilot.chat.experimental.agents": true,
3
+ "github.copilot.chat.experimental.agentLocations": [
4
+ ".vscode/agents.json"
5
+ ]
6
+ }
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.0",
5
+ "version": "1.0.2",
6
6
  "publisher": "zohodesk",
7
7
  "engines": {
8
8
  "vscode": "^1.80.0"
package/post-install.js CHANGED
@@ -11,8 +11,16 @@ const fs = require('fs');
11
11
  console.log('🔧 Generator Agent post-install starting...');
12
12
 
13
13
  try {
14
- // Get current working directory or workspace folder
15
- const cwd = process.cwd();
14
+ // Detect if running from node_modules and get the parent project root
15
+ let cwd = process.cwd();
16
+
17
+ // If we're inside node_modules, go up to the project root
18
+ if (cwd.includes('node_modules')) {
19
+ const nodeModulesIndex = cwd.indexOf('node_modules');
20
+ cwd = cwd.substring(0, nodeModulesIndex - 1); // -1 to remove trailing slash
21
+ console.log('📂 Detected installation in node_modules, registering in parent project');
22
+ }
23
+
16
24
  const agentDir = path.join(cwd, '.vscode');
17
25
 
18
26
  if (!fs.existsSync(agentDir)) {
@@ -35,13 +43,31 @@ try {
35
43
  const configPath = path.join(agentDir, 'agents.json');
36
44
  fs.writeFileSync(configPath, JSON.stringify(agentsConfig, null, 2));
37
45
 
46
+ // Create VS Code settings to enable Copilot agents
47
+ const settingsPath = path.join(agentDir, 'settings.json');
48
+ let settings = {};
49
+
50
+ if (fs.existsSync(settingsPath)) {
51
+ settings = JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
52
+ }
53
+
54
+ // Add GitHub Copilot agent settings
55
+ settings['github.copilot.chat.experimental.agents'] = true;
56
+ settings['github.copilot.chat.experimental.agentLocations'] = [
57
+ '.vscode/agents.json'
58
+ ];
59
+
60
+ fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2));
61
+
38
62
  console.log('✅ Agent registered in:', cwd);
39
63
  console.log('📍 Config saved to:', configPath);
64
+ console.log('⚙️ VS Code settings updated');
40
65
  console.log('');
41
- console.log('⚠️ Reload VS Code window to activate the agent:');
66
+ console.log('🔄 Reload VS Code window to activate the agent:');
42
67
  console.log(' Press Ctrl+Shift+P (or Cmd+Shift+P on Mac)');
43
- console.log(' Type "Reload Window" and press Enter');
68
+ console.log(' Type "Developer: Reload Window" and press Enter');
44
69
  console.log('');
70
+ console.log('💡 Use @Generators in Copilot Chat');
45
71
  console.log('✨ Post-install complete!');
46
72
  process.exit(0);
47
73
  } catch (error) {