feat: add user-invocable skill commands
This commit is contained in:
@@ -45,6 +45,29 @@ describe("commands registry", () => {
|
||||
expect(nativeDisabled.find((spec) => spec.name === "debug")).toBeFalsy();
|
||||
});
|
||||
|
||||
it("appends skill commands when provided", () => {
|
||||
const skillCommands = [
|
||||
{
|
||||
name: "demo_skill",
|
||||
skillName: "demo-skill",
|
||||
description: "Demo skill",
|
||||
},
|
||||
];
|
||||
const commands = listChatCommandsForConfig(
|
||||
{
|
||||
commands: { config: false, debug: false },
|
||||
},
|
||||
{ skillCommands },
|
||||
);
|
||||
expect(commands.find((spec) => spec.nativeName === "demo_skill")).toBeTruthy();
|
||||
|
||||
const native = listNativeCommandSpecsForConfig(
|
||||
{ commands: { config: false, debug: false, native: true } },
|
||||
{ skillCommands },
|
||||
);
|
||||
expect(native.find((spec) => spec.name === "demo_skill")).toBeTruthy();
|
||||
});
|
||||
|
||||
it("detects known text commands", () => {
|
||||
const detection = getCommandDetection();
|
||||
expect(detection.exact.has("/commands")).toBe(true);
|
||||
|
||||
Reference in New Issue
Block a user