From 48792bd182b71c6357aa44efe99b52011866d0be Mon Sep 17 00:00:00 2001 From: ideoutrea Date: Fri, 20 Mar 2026 16:09:14 +0800 Subject: [PATCH] fix test --- .../reference/secretref-credential-surface.md | 1 + ...tref-user-supplied-credentials-matrix.json | 21 ++++++++++++------- src/plugins/web-search-providers.test.ts | 5 +++++ 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/docs/reference/secretref-credential-surface.md b/docs/reference/secretref-credential-surface.md index d0a11bc68ef..a8fd8e30c23 100644 --- a/docs/reference/secretref-credential-surface.md +++ b/docs/reference/secretref-credential-surface.md @@ -39,6 +39,7 @@ Scope intent: - `plugins.entries.perplexity.config.webSearch.apiKey` - `plugins.entries.firecrawl.config.webSearch.apiKey` - `plugins.entries.tavily.config.webSearch.apiKey` +- `plugins.entries.baidu.config.webSearch.apiKey` - `tools.web.search.apiKey` - `tools.web.search.gemini.apiKey` - `tools.web.search.grok.apiKey` diff --git a/docs/reference/secretref-user-supplied-credentials-matrix.json b/docs/reference/secretref-user-supplied-credentials-matrix.json index cca7bb38c4b..e35095b6eef 100644 --- a/docs/reference/secretref-user-supplied-credentials-matrix.json +++ b/docs/reference/secretref-user-supplied-credentials-matrix.json @@ -447,6 +447,13 @@ "secretShape": "secret_input", "optIn": true }, + { + "id": "plugins.entries.baidu.config.webSearch.apiKey", + "configFile": "openclaw.json", + "path": "plugins.entries.baidu.config.webSearch.apiKey", + "secretShape": "secret_input", + "optIn": true + }, { "id": "plugins.entries.brave.config.webSearch.apiKey", "configFile": "openclaw.json", @@ -482,6 +489,13 @@ "secretShape": "secret_input", "optIn": true }, + { + "id": "plugins.entries.tavily.config.webSearch.apiKey", + "configFile": "openclaw.json", + "path": "plugins.entries.tavily.config.webSearch.apiKey", + "secretShape": "secret_input", + "optIn": true + }, { "id": "plugins.entries.xai.config.webSearch.apiKey", "configFile": "openclaw.json", @@ -551,13 +565,6 @@ "path": "tools.web.search.perplexity.apiKey", "secretShape": "secret_input", "optIn": true - }, - { - "id": "plugins.entries.tavily.config.webSearch.apiKey", - "configFile": "openclaw.json", - "path": "plugins.entries.tavily.config.webSearch.apiKey", - "secretShape": "secret_input", - "optIn": true } ] } diff --git a/src/plugins/web-search-providers.test.ts b/src/plugins/web-search-providers.test.ts index 87a4da1973c..420ad8e4ab7 100644 --- a/src/plugins/web-search-providers.test.ts +++ b/src/plugins/web-search-providers.test.ts @@ -9,6 +9,7 @@ import { } from "./web-search-providers.js"; const BUNDLED_WEB_SEARCH_PROVIDERS = [ + { pluginId: "baidu", id: "baidu", order: 5 }, { pluginId: "brave", id: "brave", order: 10 }, { pluginId: "google", id: "gemini", order: 20 }, { pluginId: "xai", id: "grok", order: 30 }, @@ -91,6 +92,7 @@ describe("resolvePluginWebSearchProviders", () => { const providers = resolvePluginWebSearchProviders({}); expect(providers.map((provider) => `${provider.pluginId}:${provider.id}`)).toEqual([ + "baidu:baidu", "brave:brave", "google:gemini", "xai:grok", @@ -100,6 +102,7 @@ describe("resolvePluginWebSearchProviders", () => { "tavily:tavily", ]); expect(providers.map((provider) => provider.credentialPath)).toEqual([ + "plugins.entries.baidu.config.webSearch.apiKey", "plugins.entries.brave.config.webSearch.apiKey", "plugins.entries.google.config.webSearch.apiKey", "plugins.entries.xai.config.webSearch.apiKey", @@ -127,6 +130,7 @@ describe("resolvePluginWebSearchProviders", () => { }); expect(providers.map((provider) => provider.pluginId)).toEqual([ + "baidu", "brave", "google", "xai", @@ -181,6 +185,7 @@ describe("resolvePluginWebSearchProviders", () => { }); expect(providers.map((provider) => `${provider.pluginId}:${provider.id}`)).toEqual([ + "baidu:baidu", "brave:brave", "google:gemini", "xai:grok",