mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-04 06:40:22 +00:00
15 lines
484 B
TypeScript
15 lines
484 B
TypeScript
import { BUNDLED_WEB_SEARCH_PROVIDER_PLUGIN_IDS } from "./bundled-capability-metadata.js";
|
|
|
|
export function resolveBundledWebSearchPluginId(
|
|
providerId: string | undefined,
|
|
): string | undefined {
|
|
if (!providerId) {
|
|
return undefined;
|
|
}
|
|
const normalizedProviderId = providerId.trim().toLowerCase();
|
|
if (!(normalizedProviderId in BUNDLED_WEB_SEARCH_PROVIDER_PLUGIN_IDS)) {
|
|
return undefined;
|
|
}
|
|
return BUNDLED_WEB_SEARCH_PROVIDER_PLUGIN_IDS[normalizedProviderId];
|
|
}
|