feat: expand skill command registration

This commit is contained in:
Peter Steinberger
2026-01-16 20:11:01 +00:00
parent 69761e8a51
commit 38b49aa0f6
21 changed files with 311 additions and 45 deletions

View File

@@ -0,0 +1,48 @@
import { describe, expect, it } from "vitest";
import { resolveNativeSkillsEnabled } from "./commands.js";
describe("resolveNativeSkillsEnabled", () => {
it("uses provider defaults for auto", () => {
expect(
resolveNativeSkillsEnabled({
providerId: "discord",
globalSetting: "auto",
}),
).toBe(true);
expect(
resolveNativeSkillsEnabled({
providerId: "telegram",
globalSetting: "auto",
}),
).toBe(true);
expect(
resolveNativeSkillsEnabled({
providerId: "slack",
globalSetting: "auto",
}),
).toBe(false);
expect(
resolveNativeSkillsEnabled({
providerId: "whatsapp",
globalSetting: "auto",
}),
).toBe(false);
});
it("honors explicit provider settings", () => {
expect(
resolveNativeSkillsEnabled({
providerId: "slack",
providerSetting: true,
globalSetting: "auto",
}),
).toBe(true);
expect(
resolveNativeSkillsEnabled({
providerId: "discord",
providerSetting: false,
globalSetting: true,
}),
).toBe(false);
});
});