diff --git a/src/converter.ts b/src/converter.ts index 9232cc8..cef8fa0 100644 --- a/src/converter.ts +++ b/src/converter.ts @@ -66,10 +66,10 @@ function buildToolInstructions(tools: AnthropicTool[], hasCommunicationTool: boo const rules = hasCommunicationTool ? `CRITICAL RULES: -1. You MUST provide at least one \`\`\`json action ... \`\`\` block in every response. +1. You MUST provide at least one \`\`\`json action ... \`\`\` block in every response. You can provide multiple blocks to execute actions in parallel. 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. Instead, use the appropriate communication tool (e.g. attempt_completion, ask_followup_question).` : `CRITICAL RULES: -1. If you need to perform an action, provide exactly one \`\`\`json action ... \`\`\` block. +1. If you need to perform actions, you can provide one or multiple \`\`\`json action ... \`\`\` blocks to execute them in parallel. 2. If you have finished your task, are waiting for me to give you a task, or just want to reply/ask a question, DO NOT output any JSON action block! Just reply with normal text. DO NOT run meaningless terminal commands (like "echo ready").`; return `Hi! I need your help. For every step we take, please provide the action I should run formatted as a simple JSON block. @@ -153,9 +153,9 @@ export function convertToCursorRequest(req: AnthropicRequest): CursorChatRequest if (hasTools && msg.role === 'user') { const hasCommunicationTool = req.tools!.some(t => ['attempt_completion', 'ask_followup_question', 'AskFollowupQuestion'].includes(t.name)); if (hasCommunicationTool) { - 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]'; + text += '\n\n[Reminder: You can output multiple ```json action blocks to run tools in parallel. If you want to respond, use AskFollowupQuestion, DO NOT use Bash commands for chat.]'; } else { - text += '\n\n[Reminder: If you need to perform an action, output a ```json action block. If you just want to talk to me or are waiting for a task, DO NOT output any action block, just reply with plain text.]'; + text += '\n\n[Reminder: Output one or multiple ```json action blocks to take actions. To reply with text only, DO NOT output any action block.]'; } }