mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-24 00:11:31 +00:00
fix(plugins): accept media-understanding id hints
This commit is contained in:
@@ -503,6 +503,23 @@ describe("loadPluginManifestRegistry", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("accepts media-understanding-style id hints without warning", () => {
|
||||
const dir = makeTempDir();
|
||||
writeManifest(dir, { id: "groq", configSchema: { type: "object" } });
|
||||
|
||||
const registry = loadRegistry([
|
||||
createPluginCandidate({
|
||||
idHint: "groq-media-understanding",
|
||||
rootDir: dir,
|
||||
origin: "bundled",
|
||||
}),
|
||||
]);
|
||||
|
||||
expect(registry.diagnostics.some((diag) => diag.message.includes("plugin id mismatch"))).toBe(
|
||||
false,
|
||||
);
|
||||
});
|
||||
|
||||
it("still warns for unrelated id hint mismatches", () => {
|
||||
const dir = makeTempDir();
|
||||
writeManifest(dir, { id: "openai", configSchema: { type: "object" } });
|
||||
|
||||
@@ -146,7 +146,8 @@ function isCompatiblePluginIdHint(idHint: string | undefined, manifestId: string
|
||||
return (
|
||||
normalizedHint === `${manifestId}-provider` ||
|
||||
normalizedHint === `${manifestId}-plugin` ||
|
||||
normalizedHint === `${manifestId}-sandbox`
|
||||
normalizedHint === `${manifestId}-sandbox` ||
|
||||
normalizedHint === `${manifestId}-media-understanding`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user