mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-17 22:05:50 +00:00
feat: 重构 WebSearch/WebFetch,新增 Tavily 适配器及 /web-tools 面板
- WebSearch: 默认 Tavily,适配器优先级 WEB_SEARCH_ADAPTER > settings.webSearchAdapter > tavily - WebFetch: 支持 Tavily /extract 返回 Markdown,移除 domain blacklist 远程检查 - 新增 /web-tools 命令面板(Search/Fetch 双 Tab + 二级配置菜单) - 新增 settings 字段: webSearchAdapter, webFetchAdapter, tavilyEndpointUrl, braveApiKey, exaApiKey, exaEndpointUrl, webFetchHttpTimeoutMs - 适配器联动: Tavily/Exa 从 settings 读取 endpoint 和 API key Co-Authored-By: deepseek-v4-pro <deepseek-ai@claude-code-best.win>
This commit is contained in:
@@ -661,6 +661,54 @@ export const SettingsSchema = lazySchema(() =>
|
||||
.describe(
|
||||
'Skip the WebFetch blocklist check for enterprise environments with restrictive security policies',
|
||||
),
|
||||
webSearchAdapter: z
|
||||
.enum(['api', 'bing', 'brave', 'exa', 'tavily'])
|
||||
.optional()
|
||||
.describe(
|
||||
'Web search backend adapter. "tavily" uses Tavily Search API (default), ' +
|
||||
'"api" uses Anthropic server-side search, "bing" scrapes Bing HTML, ' +
|
||||
'"brave" uses Brave Search API, "exa" uses Exa AI.',
|
||||
),
|
||||
webFetchAdapter: z
|
||||
.enum(['tavily', 'http'])
|
||||
.optional()
|
||||
.describe(
|
||||
'Web fetch backend. "tavily" uses Tavily Extract API which returns Markdown directly (default), ' +
|
||||
'"http" fetches the URL directly via HTTP.',
|
||||
),
|
||||
tavilyEndpointUrl: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe(
|
||||
'Custom Tavily API endpoint URL. Defaults to https://tavily.claude-code-best.win. ' +
|
||||
'Used by both WebSearch and WebFetch when tavily adapter is selected.',
|
||||
),
|
||||
braveApiKey: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe(
|
||||
'Brave Search API key. Required when using the brave web search adapter.',
|
||||
),
|
||||
webFetchHttpTimeoutMs: z
|
||||
.number()
|
||||
.int()
|
||||
.positive()
|
||||
.optional()
|
||||
.describe(
|
||||
'HTTP timeout in milliseconds for the HTTP direct web fetch backend. Defaults to 60000 (60s).',
|
||||
),
|
||||
exaApiKey: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe(
|
||||
'Exa AI API key. Required when using the exa web search adapter.',
|
||||
),
|
||||
exaEndpointUrl: z
|
||||
.string()
|
||||
.optional()
|
||||
.describe(
|
||||
'Custom Exa AI MCP endpoint URL. Defaults to https://mcp.exa.ai/mcp.',
|
||||
),
|
||||
sandbox: SandboxSettingsSchema().optional(),
|
||||
feedbackSurveyRate: z
|
||||
.number()
|
||||
|
||||
Reference in New Issue
Block a user