-
Notifications
You must be signed in to change notification settings - Fork 97
GitHub Copilot subagents generated by rulesync lack the required .agent.md extension #1432
Copy link
Copy link
Open
Description
Hello,
I always appreciate rulesync.
I found an issue where the subagent files generated for GitHub Copilot are not being loaded in VSCode Copilot Chat, and I'd like to share it.
Problem
When rulesync generate creates subagents for GitHub Copilot, the generated file names do not match the format supported by VSCode Copilot Chat. Specifically, they lack the .agent.md extension.
Example: For a source file .rulesync/subagents/planner.md
- Incorrect:
.github/agents/planner.md - Correct:
.github/agents/planner.agent.md
Because of this, the custom agents generated by rulesync cannot be utilized in GitHub Copilot.
Evidence
According to the source code of vscode-copilot-chat, the .agent.md extension is explicitly expected for agent files.
export const AGENT_FILE_EXTENSION = '.agent.md';export function getAgentFileNameFromFilePath(filePath: URI): string {
const nameFromFile = basename(filePath);
const indexOfAgentMd = nameFromFile.toLowerCase().indexOf('.agent.md');
const agentName = indexOfAgentMd > 0 ? nameFromFile.substring(0, indexOfAgentMd) : nameFromFile;
return agentName;
}- If
.agent.mdis found -> The string before it becomes the agent name. - If not found -> The entire file name is used as the agent name. While it doesn't cause an error, the glob pattern does not match, so the file is never loaded.
I am planning to create a PR for this myself when I have some free time.
Your confirmation would be appreciated.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels