import { afterEach, beforeEach, describe, expect, it } from "vitest"; import type { ChannelPlugin } from "../channels/plugins/types.js"; import { setActivePluginRegistry } from "../plugins/runtime.js"; import { createTestRegistry } from "../test-utils/channel-plugins.js"; import { resolveChannelCapabilities } from "./channel-capabilities.js"; import type { OpenClawConfig } from "./config.js";
it("handles object-format capabilities gracefully (e.g., { inlineButtons: 'dm' })", () => { const cfg = {
channels: {
telegram: { // Object format - used for granular control like inlineButtons scope. // Channel-specific handlers (resolveTelegramInlineButtonsScope) process these.
capabilities: { inlineButtons: "dm" },
},
},
} as unknown as Partial<OpenClawConfig>;
// Should return undefined (not crash), allowing channel-specific handlers to process it.
expect(
resolveChannelCapabilities({
cfg,
channel: "telegram",
}),
).toBeUndefined();
});
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.