Phase 11: register /sr and /skills-reinject aliases — SPEC §7.1.
Expose the same handler under optional shorthand command names. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+11
-7
@@ -12,14 +12,18 @@ export interface SkillReinjectCommandDeps {
|
||||
persistState: () => void;
|
||||
}
|
||||
|
||||
const SKILL_REINJECT_COMMAND_NAMES = ["skill-reinject", "sr", "skills-reinject"] as const;
|
||||
|
||||
export function registerSkillReinjectCommand(pi: ExtensionAPI, deps: SkillReinjectCommandDeps): void {
|
||||
pi.registerCommand("skill-reinject", {
|
||||
description:
|
||||
"Skill re-inject after compaction (usage: /skill-reinject [on|off|list|now|integration ...])",
|
||||
handler: async (args, ctx) => {
|
||||
await handleSkillReinjectCommand(args, ctx, deps);
|
||||
},
|
||||
});
|
||||
const handler = async (args: string, ctx: ExtensionCommandContext) => {
|
||||
await handleSkillReinjectCommand(args, ctx, deps);
|
||||
};
|
||||
const description =
|
||||
"Skill re-inject after compaction (usage: /skill-reinject [on|off|list|now|integration ...])";
|
||||
|
||||
for (const name of SKILL_REINJECT_COMMAND_NAMES) {
|
||||
pi.registerCommand(name, { description, handler });
|
||||
}
|
||||
}
|
||||
|
||||
function formatEnabledLine(sessionOverride: boolean | null, settings: SkillReinjectSettings): string {
|
||||
|
||||
Reference in New Issue
Block a user