From 909b5ad37fbf79a4e909e05fc518fafba6b95237 Mon Sep 17 00:00:00 2001 From: sususu Date: Mon, 8 Dec 2025 10:45:46 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=B7=BB=E5=8A=A0=20Explore=20agent=20?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E6=8F=90=E7=A4=BA=E8=AF=8D=E6=A8=A1=E6=9D=BF?= =?UTF-8?q?=E5=B9=B6=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E7=BA=A7=E5=88=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 添加 exploreAgentSystemPrompt 模板用于匹配 Claude Code Explore 子代理 - 将详细的 prompt 内容从 error 日志移至 warn 级别,减少日志噪音 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/utils/contents.js | 5 +++++ src/validators/clients/claudeCodeValidator.js | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/utils/contents.js b/src/utils/contents.js index ccf2828e..f1d5ddef 100644 --- a/src/utils/contents.js +++ b/src/utils/contents.js @@ -84,6 +84,11 @@ const PROMPT_DEFINITIONS = { title: 'Claude Code Compact System Prompt', 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: { category: 'output_style', title: 'Output Style Insights Addendum', diff --git a/src/validators/clients/claudeCodeValidator.js b/src/validators/clients/claudeCodeValidator.js index 3b538794..af155f1f 100644 --- a/src/validators/clients/claudeCodeValidator.js +++ b/src/validators/clients/claudeCodeValidator.js @@ -64,9 +64,8 @@ class ClaudeCodeValidator { const rawText = typeof entry?.text === 'string' ? entry.text : '' const { bestScore } = bestSimilarityByTemplates(rawText) if (bestScore < threshold) { - logger.error( - `Claude system prompt similarity below threshold: score=${bestScore.toFixed(4)}, threshold=${threshold}, prompt=${rawText}` - ) + logger.error(`Claude system prompt similarity below threshold: score=${bestScore.toFixed(4)}, threshold=${threshold}`) + logger.warn(`Claude system prompt detail: ${rawText}`) return false } }