fix(coding-agent): rename SlashCommandSource "template" to "prompt" for consistency

BREAKING CHANGE: RPC get_commands response and SlashCommandSource type
now use "prompt" instead of "template" to match the rest of the codebase.
This commit is contained in:
Mario Zechner 2026-02-03 12:27:45 +01:00
parent 8292d7ce5d
commit e54dff7efb
8 changed files with 15 additions and 11 deletions

View file

@ -958,7 +958,7 @@ Each entry has this shape:
{
name: string; // Command name without the leading slash
description?: string;
source: "extension" | "template" | "skill";
source: "extension" | "prompt" | "skill";
location?: "user" | "project" | "path"; // For templates and skills
path?: string; // Files backing templates, skills, and extensions
}

View file

@ -651,7 +651,7 @@ Response:
"data": {
"commands": [
{"name": "session-name", "description": "Set or clear session name", "source": "extension", "path": "/home/user/.pi/agent/extensions/session.ts"},
{"name": "fix-tests", "description": "Fix failing tests", "source": "template", "location": "project", "path": "/home/user/myproject/.pi/agent/prompts/fix-tests.md"},
{"name": "fix-tests", "description": "Fix failing tests", "source": "prompt", "location": "project", "path": "/home/user/myproject/.pi/agent/prompts/fix-tests.md"},
{"name": "skill:brave-search", "description": "Web search via Brave API", "source": "skill", "location": "user", "path": "/home/user/.pi/agent/skills/brave-search/SKILL.md"}
]
}
@ -663,7 +663,7 @@ Each command has:
- `description`: Human-readable description (optional for extension commands)
- `source`: What kind of command:
- `"extension"`: Registered via `pi.registerCommand()` in an extension
- `"template"`: Loaded from a prompt template `.md` file
- `"prompt"`: Loaded from a prompt template `.md` file
- `"skill"`: Loaded from a skill directory (name is prefixed with `skill:`)
- `location`: Where it was loaded from (optional, not present for extensions):
- `"user"`: User-level (`~/.pi/agent/`)