@taejung3852/project-scaffold 0.1.4 → 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 +27 -22
- 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,22 +160,25 @@ export function buildAgentSelectionOptions(detected = []) {
|
|
|
160
160
|
];
|
|
161
161
|
}
|
|
162
162
|
|
|
163
|
-
export function
|
|
164
|
-
const universalNames = universalProjectAgents
|
|
165
|
-
.map((agent) => agentRegistry[agent]?.displayName ?? agent)
|
|
166
|
-
.filter(Boolean);
|
|
163
|
+
export function buildAgentSelectionGroups() {
|
|
167
164
|
const dedicatedAgents = supportedAgentIds.filter((agent) => !isUniversalProjectAgent(agent));
|
|
168
|
-
const
|
|
169
|
-
.
|
|
170
|
-
.
|
|
165
|
+
const universalLabel = [
|
|
166
|
+
"── Universal (.agents/skills) ── always included ────────────",
|
|
167
|
+
...universalProjectAgents.map((agent) => ` • ${agentRegistry[agent]?.displayName ?? agent}`),
|
|
168
|
+
" ...and more",
|
|
169
|
+
].join("\n");
|
|
171
170
|
|
|
172
|
-
return
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
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
|
+
};
|
|
179
182
|
}
|
|
180
183
|
|
|
181
184
|
export function buildAgentSelectionDefaults(detected = []) {
|
|
@@ -210,12 +213,14 @@ export async function chooseAgents(
|
|
|
210
213
|
console.log("\n자동 감지된 에이전트가 없습니다.");
|
|
211
214
|
}
|
|
212
215
|
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
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,
|
|
219
224
|
required: true,
|
|
220
225
|
});
|
|
221
226
|
|
|
@@ -224,7 +229,7 @@ export async function chooseAgents(
|
|
|
224
229
|
process.exit(0);
|
|
225
230
|
}
|
|
226
231
|
|
|
227
|
-
return normalizeAgents(selected);
|
|
232
|
+
return normalizeAgents([...universalProjectAgents, ...selected]);
|
|
228
233
|
}
|
|
229
234
|
|
|
230
235
|
export function configureAgents({ target, agents, force = false, managedFiles = new Set() }) {
|