style(skills): align formatting cleanup for dedupe changes

This commit is contained in:
Shakker
2026-03-05 04:59:41 +00:00
committed by Shakker
parent fb4f52b710
commit b5a94d274b
3 changed files with 0 additions and 10 deletions

View File

@@ -147,10 +147,8 @@ describe("listSkillCommandsForAgents", () => {
},
});
const names = commands.map((entry) => entry.name);
// demo-skill appears in both workspaces; only the first registration (demo_skill) survives.
expect(names).toContain("demo_skill");
expect(names).not.toContain("demo_skill_2");
// extra-skill is unique to the research workspace and should be present.
expect(names).toContain("extra_skill");
});

View File

@@ -46,10 +46,6 @@ export function listSkillCommandsForWorkspace(params: {
});
}
// Deduplicate skill commands by skillName, keeping the first registration.
// When multiple agents have a skill with the same name (e.g. one with a
// workspace override and one from bundled), the suffix-renamed entries
// (github_2, github_3…) are dropped so every interface sees a clean list.
function dedupeBySkillName(commands: SkillCommandSpec[]): SkillCommandSpec[] {
const seen = new Set<string>();
const out: SkillCommandSpec[] = [];
@@ -129,9 +125,6 @@ export function listSkillCommandsForAgents(params: {
entries.push(command);
}
}
// Dedupe by skillName across workspaces so every interface (Discord, TUI,
// Slack, text) sees a consistent command list without platform-specific
// workarounds.
return dedupeBySkillName(entries);
}

View File

@@ -126,7 +126,6 @@ function formatThreadBindingDurationForConfigLabel(durationMs: number): string {
return label === "disabled" ? "off" : label;
}
function appendPluginCommandSpecs(params: {
commandSpecs: NativeCommandSpec[];
runtime: RuntimeEnv;