Skip to content

Commit 487bb0a

Browse files
committed
refactor: move skill flag param at end
1 parent 3968806 commit 487bb0a

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

packages/cli/lib/commands/ai-config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function configureSkills(agents: AIAgentTarget[]): void {
2929
}
3030
}
3131

32-
export async function configure(agents?: AIAgentTarget[], skills = true, assistants?: AiCodingAssistant[]): Promise<void> {
32+
export async function configure(agents?: AIAgentTarget[], assistants?: AiCodingAssistant[], skills = true): Promise<void> {
3333
if (!agents?.length) {
3434
agents = await promptForAgents();
3535
}
@@ -143,7 +143,7 @@ const command: CommandModule = {
143143
Util.log("No AI configuration selected. Skipping.");
144144
return;
145145
}
146-
await configure(agents, true, assistants);
146+
await configure(agents, assistants);
147147
}
148148
};
149149

packages/cli/lib/commands/new.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ const command: NewCommandType = {
169169
const rawAgents = argv.agents as string[] | undefined;
170170
const filteredAgents = rawAgents?.filter(a => a !== "none") as AIAgentTarget[] | undefined;
171171
if (rawAgents == null || rawAgents.indexOf("none") === -1 || filteredAgents?.length) {
172-
await configure(filteredAgents, true, argv.assistants as AiCodingAssistant[] | undefined);
172+
await configure(filteredAgents, argv.assistants as AiCodingAssistant[] | undefined);
173173
}
174174
process.chdir("..");
175175

spec/unit/new-spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -408,23 +408,23 @@ describe("Unit - New command", () => {
408408

409409
await newCmd.handler({ name: "Test", framework: "jq", agents: ["claude", "cursor"], _: ["new"], $0: "new" });
410410

411-
expect(configureSpy).toHaveBeenCalledWith(["claude", "cursor"], true, undefined);
411+
expect(configureSpy).toHaveBeenCalledWith(["claude", "cursor"], undefined);
412412
});
413413

414414
it("calls configure with undefined when --agents is not provided", async () => {
415415
createProjectMocks();
416416

417417
await newCmd.handler({ name: "Test", framework: "jq", _: ["new"], $0: "new" });
418418

419-
expect(configureSpy).toHaveBeenCalledWith(undefined, true, undefined);
419+
expect(configureSpy).toHaveBeenCalledWith(undefined, undefined);
420420
});
421421

422422
it("calls configure with single agent", async () => {
423423
createProjectMocks();
424424

425425
await newCmd.handler({ name: "Test", framework: "jq", agents: ["generic"], _: ["new"], $0: "new" });
426426

427-
expect(configureSpy).toHaveBeenCalledWith(["generic"], true, undefined);
427+
expect(configureSpy).toHaveBeenCalledWith(["generic"], undefined);
428428
});
429429

430430
it("calls configure before package install", async () => {
@@ -469,7 +469,7 @@ describe("Unit - New command", () => {
469469
await newCmd.handler({ name: "Test", framework: "jq", skipInstall: true, agents: ["claude"], _: ["new"], $0: "new" });
470470

471471
expect(PackageManager.installPackages).not.toHaveBeenCalled();
472-
expect(configureSpy).toHaveBeenCalledWith(["claude"], true, undefined);
472+
expect(configureSpy).toHaveBeenCalledWith(["claude"], undefined);
473473
});
474474

475475
it("does not call configure when project creation fails (bad name)", async () => {

0 commit comments

Comments
 (0)