agent-generator 1.0.0 → 1.0.1

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.
Files changed (2) hide show
  1. package/main.js +10 -35
  2. package/package.json +9 -1
package/main.js CHANGED
@@ -1,49 +1,24 @@
1
1
  const vscode = require('vscode');
2
2
 
3
- // Agent objects that will be discovered by Copilot
4
- const agents = [
5
- {
6
- id: 'generators',
7
- name: 'Generators',
8
- description: 'Generator Agent responsible for generating conditional rule-based data',
9
- }
10
- ];
11
-
12
3
  function activate(context) {
13
4
  console.log('Generator Agent is now active!');
14
5
 
15
- // Export agents for Copilot discovery
16
- if (vscode.window && vscode.window.registerChatAgents) {
17
- try {
18
- agents.forEach(agent => {
19
- vscode.window.registerChatAgents(agent.id, agent.name, agent.description);
20
- });
21
- console.log('Agents registered:', agents.length);
22
- } catch (e) {
23
- console.log('Note: registerChatAgents API not available, agents may still work via .agents folder');
24
- }
25
- }
26
-
27
- // Command to trigger the agent
28
- let disposable = vscode.commands.registerCommand(
29
- 'generator.start',
30
- function () {
31
- vscode.window.showInformationMessage('Generator Agent started!');
32
- }
33
- );
6
+ // Register chat participant for Copilot
7
+ const participant = vscode.chat.createChatParticipant('agent-generator.generators', (request, context, stream, token) => {
8
+ stream.markdown('Hello! I am the Generator Agent. I can help you generate conditional rule-based data.');
9
+ return { metadata: { command: 'generators' } };
10
+ });
34
11
 
35
- context.subscriptions.push(disposable);
12
+ participant.iconPath = vscode.Uri.joinPath(context.extensionUri, 'icon.png');
13
+
14
+ context.subscriptions.push(participant);
36
15
 
37
- // Export agents for external access
38
- context.subscriptions.push({
39
- agentsProvided: agents
40
- });
16
+ console.log('Generator Agent chat participant registered!');
41
17
  }
42
18
 
43
19
  function deactivate() { }
44
20
 
45
21
  module.exports = {
46
22
  activate,
47
- deactivate,
48
- agents
23
+ deactivate
49
24
  };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "agent-generator",
3
3
  "displayName": "Generator Agent",
4
4
  "description": "A Copilot Agent for conditional rule-based data generation",
5
- "version": "1.0.0",
5
+ "version": "1.0.1",
6
6
  "publisher": "IshwaryaRamesh",
7
7
  "engines": {
8
8
  "vscode": "^1.80.0"
@@ -12,6 +12,14 @@
12
12
  "onStartupFinished"
13
13
  ],
14
14
  "contributes": {
15
+ "chatParticipants": [
16
+ {
17
+ "id": "agent-generator.generators",
18
+ "name": "generators",
19
+ "description": "Generator Agent responsible for generating conditional rule-based data",
20
+ "isSticky": true
21
+ }
22
+ ],
15
23
  "commands": [
16
24
  {
17
25
  "command": "generator.start",