acp-vscode 0.3.0 → 0.3.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "acp-vscode",
3
- "version": "0.3.0",
3
+ "version": "0.3.2",
4
4
  "description": "CLI to install GitHub Awesome Copilot chatmodes, prompts, and instructions into VS Code workspace or user profile",
5
5
  "bin": {
6
6
  "acp-vscode": "./bin/acp-vscode.js"
@@ -21,12 +21,12 @@
21
21
  "license": "MIT",
22
22
  "repository": {
23
23
  "type": "git",
24
- "url": "git+https://github.com/your-org/acp-vscode.git"
24
+ "url": "git+https://github.com/AndyG-0/awesome-copilot-vscode-cli.git"
25
25
  },
26
26
  "bugs": {
27
- "url": "https://github.com/your-org/acp-vscode/issues"
27
+ "url": "https://github.com/AndyG-0/awesome-copilot-vscode-cli/issues"
28
28
  },
29
- "homepage": "https://github.com/your-org/acp-vscode#readme",
29
+ "homepage": "https://github.com/AndyG-0/awesome-copilot-vscode-cli#readme",
30
30
  "publishConfig": {
31
31
  "access": "public"
32
32
  },
@@ -219,8 +219,8 @@ async function performInstall({ target, type, names, options, workspaceDir = pro
219
219
  continue;
220
220
  }
221
221
 
222
- // If no specific names requested and the type is chatmodes or prompts, confirm installing all
223
- if ((!names || names.length === 0) && (t === 'chatmodes' || t === 'prompts')) {
222
+ // If no specific names requested and the type is chatmodes, prompts, or instructions, confirm installing all
223
+ if ((!names || names.length === 0) && (t === 'chatmodes' || t === 'prompts' || t === 'instructions')) {
224
224
  // When running non-interactively (no TTY), auto-confirm so CI/tests proceed
225
225
  const nonInteractive = !(process.stdin && process.stdin.isTTY);
226
226
  if (!nonInteractive) {
package/src/installer.js CHANGED
@@ -66,26 +66,10 @@ async function installFiles({ items, type, target, workspaceDir }) {
66
66
  return base;
67
67
  }
68
68
 
69
- // user target: write into VS Code User prompts folder if prompts, otherwise create structure under VS Code User/.github
69
+ // user target: write all types into the VS Code User 'prompts' folder so user profile
70
+ // keeps everything together (per user's requested behavior).
70
71
  const userDir = getVsCodeUserDir();
71
- if (type === 'prompts') {
72
- const base = path.join(userDir, 'prompts');
73
- await fs.ensureDir(base);
74
- const idCounts = items.reduce((m, it) => { const k = it.id || it.name || ''; m[k] = (m[k] || 0) + 1; return m; }, {});
75
- for (const item of items) {
76
- let filenameBase = item.id || item.name || `item-${Date.now()}`;
77
- if (idCounts[filenameBase] > 1 && item.repo) filenameBase = `${item.repo}-${filenameBase}`;
78
- const destName = `${filenameBase}${extForType(type)}`;
79
- const dest = path.join(base, destName);
80
- let content = await fetchRawIfNeeded(item) || item.content || JSON.stringify(item, null, 2);
81
- if (typeof content !== 'string') content = JSON.stringify(content, null, 2);
82
- await fs.writeFile(dest, content, 'utf8');
83
- }
84
- return base;
85
- }
86
-
87
- // For other types, create .github subfolder in userDir
88
- const base = path.join(userDir, '.github', type);
72
+ const base = path.join(userDir, 'prompts');
89
73
  await fs.ensureDir(base);
90
74
  // detect duplicates among items to avoid overwriting
91
75
  const idCounts = items.reduce((m, it) => { const k = it.id || it.name || ''; m[k] = (m[k] || 0) + 1; return m; }, {});
@@ -131,7 +115,8 @@ async function removeFiles({ names, type, target, workspaceDir }) {
131
115
  }
132
116
 
133
117
  const userDir = getVsCodeUserDir();
134
- const base = (type === 'prompts') ? path.join(userDir, 'prompts') : path.join(userDir, '.github', type);
118
+ // All user-target files live in the VS Code User 'prompts' folder now
119
+ const base = path.join(userDir, 'prompts');
135
120
  if (!(await fs.pathExists(base))) return 0;
136
121
  const files = await fs.readdir(base);
137
122
  let removed = 0;