mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 19:05:11 +00:00
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:
parent
8292d7ce5d
commit
e54dff7efb
8 changed files with 15 additions and 11 deletions
|
|
@ -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" },
|
||||
];
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue