mirror of https://github.com/openclaw/openclaw.git
fix(plugins): accept media-understanding id hints
This commit is contained in:
parent
9aafff7378
commit
74cb08bede
|
|
@ -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`
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue