@taejung3852/project-scaffold 0.1.3 → 0.1.5
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/lib/agents.js +31 -6
- package/package.json +1 -1
package/lib/agents.js
CHANGED
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
uniqueProjectSkillDirs,
|
|
12
12
|
} from "./agents-registry.js";
|
|
13
13
|
import {
|
|
14
|
-
|
|
14
|
+
groupMultiselect,
|
|
15
15
|
isCancel,
|
|
16
16
|
cancel,
|
|
17
17
|
} from "@clack/prompts";
|
|
@@ -160,6 +160,27 @@ export function buildAgentSelectionOptions(detected = []) {
|
|
|
160
160
|
];
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
+
export function buildAgentSelectionGroups() {
|
|
164
|
+
const dedicatedAgents = supportedAgentIds.filter((agent) => !isUniversalProjectAgent(agent));
|
|
165
|
+
const universalLabel = [
|
|
166
|
+
"── Universal (.agents/skills) ── always included ────────────",
|
|
167
|
+
...universalProjectAgents.map((agent) => ` • ${agentRegistry[agent]?.displayName ?? agent}`),
|
|
168
|
+
" ...and more",
|
|
169
|
+
].join("\n");
|
|
170
|
+
|
|
171
|
+
return {
|
|
172
|
+
[universalLabel]: [],
|
|
173
|
+
"── Additional agents ─────────────────────────────": dedicatedAgents.map((agent) => {
|
|
174
|
+
const entry = agentRegistry[agent];
|
|
175
|
+
return {
|
|
176
|
+
value: agent,
|
|
177
|
+
label: entry?.displayName ?? agent,
|
|
178
|
+
hint: entry?.projectSkillsDir,
|
|
179
|
+
};
|
|
180
|
+
}),
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
163
184
|
export function buildAgentSelectionDefaults(detected = []) {
|
|
164
185
|
const detectedUniversal = detected.some(isUniversalProjectAgent);
|
|
165
186
|
const dedicatedDetected = detected.filter((agent) => !isUniversalProjectAgent(agent));
|
|
@@ -192,10 +213,14 @@ export async function chooseAgents(
|
|
|
192
213
|
console.log("\n자동 감지된 에이전트가 없습니다.");
|
|
193
214
|
}
|
|
194
215
|
|
|
195
|
-
const selected = await
|
|
196
|
-
message: "
|
|
197
|
-
options:
|
|
198
|
-
initialValues:
|
|
216
|
+
const selected = await groupMultiselect({
|
|
217
|
+
message: "Which agents do you want to install to?",
|
|
218
|
+
options: buildAgentSelectionGroups(),
|
|
219
|
+
initialValues: [
|
|
220
|
+
...defaults.filter((agent) => !isUniversalProjectAgent(agent)),
|
|
221
|
+
],
|
|
222
|
+
selectableGroups: false,
|
|
223
|
+
groupSpacing: 0,
|
|
199
224
|
required: true,
|
|
200
225
|
});
|
|
201
226
|
|
|
@@ -204,7 +229,7 @@ export async function chooseAgents(
|
|
|
204
229
|
process.exit(0);
|
|
205
230
|
}
|
|
206
231
|
|
|
207
|
-
return normalizeAgents(selected);
|
|
232
|
+
return normalizeAgents([...universalProjectAgents, ...selected]);
|
|
208
233
|
}
|
|
209
234
|
|
|
210
235
|
export function configureAgents({ target, agents, force = false, managedFiles = new Set() }) {
|