mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-19 06:45:50 +00:00
docs: 添加 ToolSearch 设计指南 + 禁用 turn-zero 工具推荐弹窗
- 新增 docs/design/tool-search-design-guide.md,涵盖架构、搜索算法、执行管道、演进历史 - 禁用 getTurnZeroSearchExtraToolsPrefetch,消除用户输入时的频繁弹窗 - inter-turn 发现机制保持不变 Co-Authored-By: glm-5-turbo <zai-org@claude-code-best.win>
This commit is contained in:
@@ -387,11 +387,11 @@ async function countBuiltInToolTokens(
|
||||
}
|
||||
|
||||
// Check if tool search is enabled
|
||||
const { isToolSearchEnabled } = await import('./toolSearch.js')
|
||||
const { isSearchExtraToolsEnabled } = await import('./searchExtraTools.js')
|
||||
const { isDeferredTool } = await import(
|
||||
'@claude-code-best/builtin-tools/tools/ToolSearchTool/prompt.js'
|
||||
'@claude-code-best/builtin-tools/tools/SearchExtraToolsTool/prompt.js'
|
||||
)
|
||||
const isDeferred = await isToolSearchEnabled(
|
||||
const isDeferred = await isSearchExtraToolsEnabled(
|
||||
model ?? '',
|
||||
tools,
|
||||
getToolPermissionContext,
|
||||
@@ -672,13 +672,13 @@ export async function countMcpToolTokens(
|
||||
)
|
||||
|
||||
// Check if tool search is enabled - if so, MCP tools are deferred
|
||||
// isToolSearchEnabled handles threshold calculation internally for TstAuto mode
|
||||
const { isToolSearchEnabled } = await import('./toolSearch.js')
|
||||
// isSearchExtraToolsEnabled handles threshold calculation internally for TstAuto mode
|
||||
const { isSearchExtraToolsEnabled } = await import('./searchExtraTools.js')
|
||||
const { isDeferredTool } = await import(
|
||||
'@claude-code-best/builtin-tools/tools/ToolSearchTool/prompt.js'
|
||||
'@claude-code-best/builtin-tools/tools/SearchExtraToolsTool/prompt.js'
|
||||
)
|
||||
|
||||
const isDeferred = await isToolSearchEnabled(
|
||||
const isDeferred = await isSearchExtraToolsEnabled(
|
||||
model,
|
||||
tools,
|
||||
getToolPermissionContext,
|
||||
@@ -686,7 +686,7 @@ export async function countMcpToolTokens(
|
||||
'analyzeMcp',
|
||||
)
|
||||
|
||||
// Find MCP tools that have been used in messages (loaded via ToolSearchTool)
|
||||
// Find MCP tools that have been used in messages (loaded via SearchExtraToolsTool)
|
||||
const loadedMcpToolNames = new Set<string>()
|
||||
if (isDeferred && messages) {
|
||||
const mcpToolNameSet = new Set(mcpTools.map(t => t.name))
|
||||
|
||||
Reference in New Issue
Block a user