fix(coding-agent): unify source provenance, closes #1734

This commit is contained in:
Mario Zechner
2026-03-23 02:02:42 +01:00
parent 883862a354
commit 4e5af01d73
26 changed files with 340 additions and 157 deletions

View File

@@ -544,35 +544,30 @@ export async function runRpcMode(session: AgentSession): Promise<never> {
case "get_commands": {
const commands: RpcSlashCommand[] = [];
// Extension commands
for (const command of session.extensionRunner?.getRegisteredCommands() ?? []) {
commands.push({
name: command.name,
description: command.description,
source: "extension",
path: command.extensionPath,
sourceInfo: command.sourceInfo,
});
}
// Prompt templates (source is always "user" | "project" | "path" in coding-agent)
for (const template of session.promptTemplates) {
commands.push({
name: template.name,
description: template.description,
source: "prompt",
location: template.source as RpcSlashCommand["location"],
path: template.filePath,
sourceInfo: template.sourceInfo,
});
}
// Skills (source is always "user" | "project" | "path" in coding-agent)
for (const skill of session.resourceLoader.getSkills().skills) {
commands.push({
name: `skill:${skill.name}`,
description: skill.description,
source: "skill",
location: skill.source as RpcSlashCommand["location"],
path: skill.filePath,
sourceInfo: skill.sourceInfo,
});
}