fix: 添加 Explore agent 系统提示词模板并优化日志级别

- 添加 exploreAgentSystemPrompt 模板用于匹配 Claude Code Explore 子代理
- 将详细的 prompt 内容从 error 日志移至 warn 级别,减少日志噪音

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
sususu
2025-12-08 10:45:46 +08:00
parent 919501a2f1
commit 909b5ad37f
2 changed files with 7 additions and 3 deletions

View File

@@ -84,6 +84,11 @@ const PROMPT_DEFINITIONS = {
title: 'Claude Code Compact System Prompt', title: 'Claude Code Compact System Prompt',
text: 'You are a helpful AI assistant tasked with summarizing conversations.' text: 'You are a helpful AI assistant tasked with summarizing conversations.'
}, },
exploreAgentSystemPrompt: {
category: 'system',
title: 'Claude Code Explore Agent System Prompt',
text: "You are a file search specialist for Claude Code, Anthropic's official CLI for Claude."
},
outputStyleInsightsPrompt: { outputStyleInsightsPrompt: {
category: 'output_style', category: 'output_style',
title: 'Output Style Insights Addendum', title: 'Output Style Insights Addendum',

View File

@@ -64,9 +64,8 @@ class ClaudeCodeValidator {
const rawText = typeof entry?.text === 'string' ? entry.text : '' const rawText = typeof entry?.text === 'string' ? entry.text : ''
const { bestScore } = bestSimilarityByTemplates(rawText) const { bestScore } = bestSimilarityByTemplates(rawText)
if (bestScore < threshold) { if (bestScore < threshold) {
logger.error( logger.error(`Claude system prompt similarity below threshold: score=${bestScore.toFixed(4)}, threshold=${threshold}`)
`Claude system prompt similarity below threshold: score=${bestScore.toFixed(4)}, threshold=${threshold}, prompt=${rawText}` logger.warn(`Claude system prompt detail: ${rawText}`)
)
return false return false
} }
} }