From 4a1b97fa1a64714cde1eb789e23eba1643078d0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=8F=E6=B5=B7?= <7836246@qq.com> Date: Wed, 4 Mar 2026 15:50:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=98=B2=E6=AD=A2=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=E5=9C=A8=E6=B2=A1=E6=9C=89=E4=BB=BB=E5=8A=A1=E6=97=B6=E6=AD=BB?= =?UTF-8?q?=E5=BE=AA=E7=8E=AF=E6=89=A7=E8=A1=8C=20echo=20ready?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 明确指示如果只要回复或者等待任务时,必须使用 AskFollowupQuestion 或 attempt_completion 这样的交互工具,而不是真的去跑 bash 命令。 --- src/converter.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/converter.ts b/src/converter.ts index 2abf249..d5bda2b 100644 --- a/src/converter.ts +++ b/src/converter.ts @@ -76,7 +76,9 @@ Please output your desired action in EXACTLY this markdown format: Here are the valid ACTION_NAMEs and parameters you can choose from: ${toolList} -Remember, you MUST provide at least one \`\`\`json action ... \`\`\` block in every response.`; +CRITICAL RULES: +1. You MUST provide at least one \`\`\`json action ... \`\`\` block in every response. +2. If you are waiting for me to give you a task, or you want to ask me a question, DO NOT run meaningless terminal commands (like "echo ready"). Instead, use the appropriate communication tool (such as AskFollowupQuestion, ask_followup_question, or attempt_completion).`; } // ==================== 请求转换 ==================== @@ -138,7 +140,7 @@ export function convertToCursorRequest(req: AnthropicRequest): CursorChatRequest // 在每条用户消息末尾追加格式提醒 if (hasTools && msg.role === 'user') { - text += '\n\n[Reminder: Please output a ```json action block for the action you want to take.]'; + text += '\n\n[Reminder: Please output a ```json action block for the action you want to take. If you have no task or want to respond, use AskFollowupQuestion or ask_followup_question or attempt_completion, DO NOT use Bash/execute_command]'; } messages.push({