mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 18:10:45 +00:00
fix(brave): use canonical docs URL
This commit is contained in:
@@ -2,6 +2,7 @@ import fs from "node:fs";
|
||||
import { validateJsonSchemaValue } from "openclaw/plugin-sdk/config-schema";
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { __testing } from "../test-api.js";
|
||||
import { createBraveWebSearchProvider as createBraveWebSearchContractProvider } from "../web-search-contract-api.js";
|
||||
import { createBraveWebSearchProvider } from "./brave-web-search-provider.js";
|
||||
|
||||
const braveManifest = JSON.parse(
|
||||
@@ -40,6 +41,15 @@ describe("brave web search provider", () => {
|
||||
global.fetch = priorFetch;
|
||||
});
|
||||
|
||||
it("points provider metadata at the canonical Brave docs page", () => {
|
||||
expect(createBraveWebSearchProvider().docsUrl).toBe(
|
||||
"https://docs.openclaw.ai/tools/brave-search",
|
||||
);
|
||||
expect(createBraveWebSearchContractProvider().docsUrl).toBe(
|
||||
"https://docs.openclaw.ai/tools/brave-search",
|
||||
);
|
||||
});
|
||||
|
||||
it("points missing-key users to fetch/browser alternatives", async () => {
|
||||
vi.stubEnv("BRAVE_API_KEY", "");
|
||||
const provider = createBraveWebSearchProvider();
|
||||
|
||||
@@ -137,7 +137,7 @@ export function createBraveWebSearchProvider(): WebSearchProviderPlugin {
|
||||
envVars: ["BRAVE_API_KEY"],
|
||||
placeholder: "BSA...",
|
||||
signupUrl: "https://brave.com/search/api/",
|
||||
docsUrl: "https://docs.openclaw.ai/brave-search",
|
||||
docsUrl: "https://docs.openclaw.ai/tools/brave-search",
|
||||
autoDetectOrder: 10,
|
||||
credentialPath: BRAVE_CREDENTIAL_PATH,
|
||||
...createWebSearchProviderContractFields({
|
||||
|
||||
@@ -15,7 +15,7 @@ export function createBraveWebSearchProvider(): WebSearchProviderPlugin {
|
||||
envVars: ["BRAVE_API_KEY"],
|
||||
placeholder: "BSA...",
|
||||
signupUrl: "https://brave.com/search/api/",
|
||||
docsUrl: "https://docs.openclaw.ai/brave-search",
|
||||
docsUrl: "https://docs.openclaw.ai/tools/brave-search",
|
||||
autoDetectOrder: 10,
|
||||
credentialPath,
|
||||
...createWebSearchProviderContractFields({
|
||||
|
||||
Reference in New Issue
Block a user