mirror of
https://bitbucket.org/siakitem/my-pi.git
synced 2026-08-28 08:35:57 +00:00
feat: add routed online search providers
This commit is contained in:
@@ -44,6 +44,23 @@ test("LSP routing covers navigation and post-edit diagnostics", () => {
|
||||
assert.match(section, /post-edit diagnostics/);
|
||||
});
|
||||
|
||||
test("online search routing selects providers by task", () => {
|
||||
const tavily = buildToolRoutingSection(["tavily_web_search", "tavily_web_fetch"]);
|
||||
assert.match(tavily, /broad discovery when keywords are uncertain/);
|
||||
assert.match(tavily, /news\/recent\/trending topics/);
|
||||
assert.doesNotMatch(tavily, /official or API documentation/);
|
||||
|
||||
const exa = buildToolRoutingSection(["exa_web_search", "exa_web_fetch", "exa_web_search_advanced"]);
|
||||
assert.match(exa, /official or API documentation/);
|
||||
assert.match(exa, /explicitly bound the result count and returned text length/);
|
||||
assert.doesNotMatch(exa, /Chinese-language pages/);
|
||||
|
||||
const keenable = buildToolRoutingSection(["keenable_search", "keenable_fetch"]);
|
||||
assert.match(keenable, /Chinese-language pages, policies and government notices/);
|
||||
assert.match(keenable, /site-restricted search/);
|
||||
assert.match(keenable, /publication-date filtering/);
|
||||
});
|
||||
|
||||
test("routing includes only guidance for active optional tools", () => {
|
||||
const section = buildToolRoutingSection(["read"]);
|
||||
|
||||
@@ -52,6 +69,8 @@ test("routing includes only guidance for active optional tools", () => {
|
||||
assert.doesNotMatch(section, /Use Context Mode/);
|
||||
assert.doesNotMatch(section, /ctx_execute_file is confined/);
|
||||
assert.doesNotMatch(section, /fresh LINE#HASH anchors/);
|
||||
assert.doesNotMatch(section, /Choose one online search provider/);
|
||||
assert.doesNotMatch(section, /broad discovery when keywords are uncertain/);
|
||||
assert.match(section, /Use read only when exact source is needed/);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user