Skip to content

Commit 83307db

Browse files
authored
chore(void): remove dead linkSkillsForAgents (#241)
## What This removes the exported linkSkillsForAgents function from packages/void/src/cli/skills.ts and drops the detectAgents import that only that function used. ## Why The function is dead code. linkSkillsForAgents is never called anywhere in the monorepo. It was superseded by linkSkillsForSpecificAgents, which is what void init actually calls, and its own doc comment falsely claimed it was used by void init. With the function gone, the detectAgents import became unused, so it is removed as well. ## Safety There is no behavior change. The function had no callers. The shared helpers parseSkills and linkSkills, the sibling linkSkillsForSpecificAgents, and the getPackageDir, AgentConfig, and log imports are all untouched because they are still used. ## Verification There are zero references to linkSkillsForAgents across packages including tests. The void package typechecks cleanly with tsgo and passes oxlint. The change is one insertion and 26 deletions.
1 parent a0b17ac commit 83307db

1 file changed

Lines changed: 1 addition & 26 deletions

File tree

‎packages/void/src/cli/skills.ts‎

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
} from 'node:fs';
99
import { log } from '@clack/prompts';
1010
import { join, relative } from 'pathe';
11-
import { detectAgents, getPackageDir, type AgentConfig } from './agents.ts';
11+
import { getPackageDir, type AgentConfig } from './agents.ts';
1212

1313
type SkillInfo = {
1414
dirName: string;
@@ -82,31 +82,6 @@ function linkSkills(
8282
return linked;
8383
}
8484

85-
/**
86-
* Link skills for all detected agents. Returns total number of newly linked skills.
87-
* Used by `void init` (interactive flow and `--agents` flag).
88-
*/
89-
export function linkSkillsForAgents(root: string): number {
90-
const packageDir = getPackageDir();
91-
const skillsDir = join(packageDir, 'skills');
92-
const skills = parseSkills(skillsDir);
93-
if (skills.length === 0) {
94-
return 0;
95-
}
96-
97-
const detected = detectAgents(root);
98-
if (detected.length === 0) {
99-
return 0;
100-
}
101-
102-
let totalLinked = 0;
103-
for (const agent of detected) {
104-
log.info(`${agent.displayName} → ${agent.skillsDir}`);
105-
totalLinked += linkSkills(root, skillsDir, skills, agent.skillsDir);
106-
}
107-
return totalLinked;
108-
}
109-
11085
export function linkSkillsForSpecificAgents(root: string, agents: Array<AgentConfig>): number {
11186
const packageDir = getPackageDir();
11287
const skillsDir = join(packageDir, 'skills');

0 commit comments

Comments
 (0)