fix: add /skill fallback for native limits

Co-authored-by: thewilloftheshadow <thewilloftheshadow@users.noreply.github.com>
This commit is contained in:
Peter Steinberger
2026-01-20 13:19:55 +00:00
parent 63797e841d
commit 6e17c463ae
9 changed files with 101 additions and 2 deletions

View File

@@ -30,6 +30,24 @@ describe("resolveSkillCommandInvocation", () => {
expect(invocation?.args).toBe("do the thing");
});
it("supports /skill with name argument", () => {
const invocation = resolveSkillCommandInvocation({
commandBodyNormalized: "/skill demo_skill do the thing",
skillCommands: [{ name: "demo_skill", skillName: "demo-skill", description: "Demo" }],
});
expect(invocation?.command.name).toBe("demo_skill");
expect(invocation?.args).toBe("do the thing");
});
it("normalizes /skill lookup names", () => {
const invocation = resolveSkillCommandInvocation({
commandBodyNormalized: "/skill demo-skill",
skillCommands: [{ name: "demo_skill", skillName: "demo-skill", description: "Demo" }],
});
expect(invocation?.command.name).toBe("demo_skill");
expect(invocation?.args).toBeUndefined();
});
it("returns null for unknown commands", () => {
const invocation = resolveSkillCommandInvocation({
commandBodyNormalized: "/unknown arg",