feat: add optional MindSearch skill orchestration

This commit is contained in:
john
2026-07-15 13:46:17 +08:00
parent 87b03f7848
commit 5f1c4dcaca
17 changed files with 373 additions and 2 deletions
+6
View File
@@ -84,6 +84,12 @@ test('buildAutoChatSkillPrefix enables web for news-like queries', () => {
assert.equal(buildAutoChatSkillPrefix('帮我搜索今天热点新闻', ['search']), '');
});
test('manifest enhanced search route is opt-in and uses the MindSearch skill prompt', () => {
const routes = [{ skillName: 'search-enhanced', promptKey: 'search-enhanced', keywords: ['最新资料'], priority: 30 }];
assert.match(buildAutoChatSkillPrefix('请搜索最新资料:Goose MCP', ['search-enhanced'], { skillRouterV2: true, manifestRoutes: routes }), /tkmind-search/);
assert.equal(buildAutoChatSkillPrefix('请搜索最新资料:Goose MCP', [], { skillRouterV2: true, manifestRoutes: routes }), '');
});
test('buildAutoChatSkillPrefix enables publish for page generation requests', () => {
const prefix = buildAutoChatSkillPrefix('帮我做一个 Hello 糖的 H5 页面', ['static-page-publish']);
assert.match(prefix, /static-page-publish/);