From d7d888a20d248a3f7ac565e1657dd811ad999c19 Mon Sep 17 00:00:00 2001 From: kvtodev Date: Fri, 10 Jul 2026 10:57:46 +0800 Subject: [PATCH] update prompt logic in `editor_agent` to clarify tool call behavior and user interaction --- server-rs/crates/api-server/src/editor_agent/agent.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server-rs/crates/api-server/src/editor_agent/agent.rs b/server-rs/crates/api-server/src/editor_agent/agent.rs index 8d1773734..aa2e2f074 100644 --- a/server-rs/crates/api-server/src/editor_agent/agent.rs +++ b/server-rs/crates/api-server/src/editor_agent/agent.rs @@ -167,6 +167,12 @@ fn build_tools_system_prompt(base_prompt: &str, tool_specs: &[ToolPromptSpec]) - prompt.push_str( "return your response immediately without expecting further tool execution. ", ); + prompt.push_str( + "as you see, tool_calls is an array, several tools calls can be executed in one turn concurrently. ", + ); + prompt.push_str( + "some tool calls needs user confirmation or input, so all tool calls are pending, just end turn and tip user", + ); prompt.push_str("For example: `\"reply_text\": \"Task complete. \"`."); prompt.push_str("\n"); prompt.push_str("IMPORTANT: Always respond with valid JSON only. ");