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

@ -16,13 +16,13 @@ export default function commandsExtension(pi: ExtensionAPI) {
pi.registerCommand("commands", {
description: "List available slash commands",
getArgumentCompletions: (prefix) => {
const sources = ["extension", "template", "skill"];
const sources = ["extension", "prompt", "skill"];
const filtered = sources.filter((s) => s.startsWith(prefix));
return filtered.length > 0 ? filtered.map((s) => ({ value: s, label: s })) : null;
},
handler: async (args, ctx) => {
const commands = pi.getCommands();
const sourceFilter = args.trim() as "extension" | "template" | "skill" | "";
const sourceFilter = args.trim() as "extension" | "prompt" | "skill" | "";
// Filter by source if specified
const filtered = sourceFilter ? commands.filter((c) => c.source === sourceFilter) : commands;
@ -39,9 +39,9 @@ export default function commandsExtension(pi: ExtensionAPI) {
};
const items: string[] = [];
const sources: Array<{ key: "extension" | "template" | "skill"; label: string }> = [
const sources: Array<{ key: "extension" | "prompt" | "skill"; label: string }> = [
{ key: "extension", label: "Extensions" },
{ key: "template", label: "Templates" },
{ key: "prompt", label: "Prompts" },
{ key: "skill", label: "Skills" },
];