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;
|
persistState: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const SKILL_REINJECT_COMMAND_NAMES = ["skill-reinject", "sr", "skills-reinject"] as const;
|
||||||
|
|
||||||
export function registerSkillReinjectCommand(pi: ExtensionAPI, deps: SkillReinjectCommandDeps): void {
|
export function registerSkillReinjectCommand(pi: ExtensionAPI, deps: SkillReinjectCommandDeps): void {
|
||||||
pi.registerCommand("skill-reinject", {
|
const handler = async (args: string, ctx: ExtensionCommandContext) => {
|
||||||
description:
|
await handleSkillReinjectCommand(args, ctx, deps);
|
||||||
"Skill re-inject after compaction (usage: /skill-reinject [on|off|list|now|integration ...])",
|
};
|
||||||
handler: async (args, ctx) => {
|
const description =
|
||||||
await handleSkillReinjectCommand(args, ctx, deps);
|
"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 {
|
function formatEnabledLine(sessionOverride: boolean | null, settings: SkillReinjectSettings): string {
|
||||||
|
|||||||
Reference in New Issue
Block a user