Compare commits

...

4 Commits

Author SHA1 Message Date
Serhii 19b1a71909
Merge 9e2595503f into f99e192e74 2025-12-05 20:42:45 +02:00
Brian 9e2595503f
Merge branch 'main' into refactor/use-path-basename-consistently 2025-11-19 20:53:58 -06:00
Serhii 28ecbfe9b5
Merge branch 'main' into refactor/use-path-basename-consistently 2025-11-06 21:30:36 +02:00
Serhii 033aa717f4
refactor: use path.basename() consistently for file extensions
Replace .replace('.agent.yaml', '') with path.basename(file, '.agent.yaml')
for consistency and correct handling of edge cases.

Changes:
- buildAllAgents(): line 238
- checkBuildStatus(): line 333
- listAvailableAgents(): line 452

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-05 06:21:16 +02:00
1 changed files with 3 additions and 3 deletions

View File

@ -235,7 +235,7 @@ async function buildAllAgents(projectDir, force = false) {
continue;
}
const agentName = file.replace('.agent.yaml', '');
const agentName = path.basename(file, '.agent.yaml');
const agentYamlPath = path.join(agentsDir, file);
const outputPath = path.join(agentsDir, `${agentName}.md`);
@ -330,7 +330,7 @@ async function checkBuildStatus(projectDir) {
continue;
}
const agentName = file.replace('.agent.yaml', '');
const agentName = path.basename(file, '.agent.yaml');
const agentYamlPath = path.join(agentsDir, file);
const outputPath = path.join(agentsDir, `${agentName}.md`);
@ -449,7 +449,7 @@ async function listAvailableAgents(projectDir) {
for (const file of files) {
if (file.endsWith('.agent.yaml')) {
const agentName = file.replace('.agent.yaml', '');
const agentName = path.basename(file, '.agent.yaml');
console.log(chalk.dim(` - ${agentName} (${module})`));
}
}