mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-11 01:32:22 +03:00
fix(search): nest Exa contents options for /search (#9914)
This commit is contained in:
1
changelog.d/fixes/9914-search-exa-contents.md
Normal file
1
changelog.d/fixes/9914-search-exa-contents.md
Normal file
@@ -0,0 +1 @@
|
||||
- fix(search): nest Exa contents options (text/highlights) for /search API (#9914)
|
||||
@@ -336,8 +336,10 @@ function buildExaRequest(
|
||||
query: params.query,
|
||||
numResults: params.maxResults,
|
||||
type: "auto",
|
||||
text: true,
|
||||
highlights: true,
|
||||
contents: {
|
||||
text: true,
|
||||
highlights: true,
|
||||
},
|
||||
};
|
||||
if (includes.length) body.includeDomains = includes;
|
||||
if (excludes.length) body.excludeDomains = excludes;
|
||||
|
||||
@@ -123,7 +123,7 @@ test("handleSearch builds Brave news requests and normalizes favicon metadata",
|
||||
}
|
||||
});
|
||||
|
||||
test("handleSearch builds Exa requests with include/exclude domains and preserves rich result fields", async () => {
|
||||
test("handleSearch builds Exa requests with contents-nested options, include/exclude domains, and preserves rich result fields", async () => {
|
||||
const originalFetch = globalThis.fetch;
|
||||
let captured;
|
||||
|
||||
@@ -165,8 +165,7 @@ test("handleSearch builds Exa requests with include/exclude domains and preserve
|
||||
query: "agentic workflows",
|
||||
numResults: 5,
|
||||
type: "auto",
|
||||
text: true,
|
||||
highlights: true,
|
||||
contents: { text: true, highlights: true },
|
||||
includeDomains: ["allowed.com"],
|
||||
excludeDomains: ["blocked.com"],
|
||||
category: "news",
|
||||
|
||||
Reference in New Issue
Block a user