mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 11:10:45 +00:00
feat(searxng): show setup JSON format note
This commit is contained in:
@@ -145,6 +145,13 @@ describe("searxng web search provider", () => {
|
||||
expect(resolveSearxngLanguage(config)).toBe("de");
|
||||
});
|
||||
|
||||
it("exposes a credentialNote with JSON format guidance", () => {
|
||||
const provider = createSearxngWebSearchProvider();
|
||||
|
||||
expect(provider.credentialNote).toContain("json format enabled");
|
||||
expect(provider.credentialNote).toContain("search.formats");
|
||||
});
|
||||
|
||||
it("persists base URL to plugin config via setConfiguredCredentialValue", () => {
|
||||
const provider = createSearxngWebSearchProvider();
|
||||
const config = {} as Record<string, unknown>;
|
||||
|
||||
@@ -56,6 +56,10 @@ export function createSearxngWebSearchProvider(): WebSearchProviderPlugin {
|
||||
configuredCredential: { pluginId: "searxng", field: "baseUrl" },
|
||||
selectionPluginId: "searxng",
|
||||
}),
|
||||
credentialNote: [
|
||||
"For the SearXNG JSON API to work, make sure your SearXNG instance",
|
||||
"has the json format enabled in its settings.yml under search.formats.",
|
||||
].join("\n"),
|
||||
createTool: (ctx) => ({
|
||||
description:
|
||||
"Search the web using a self-hosted SearXNG instance. Returns titles, URLs, and snippets.",
|
||||
|
||||
Reference in New Issue
Block a user