From 17162bead49870ca026231fb1f53655f8ef711b5 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Fri, 23 Jan 2026 19:50:17 +0800 Subject: [PATCH 1/2] fix: update web_search_tavily handling for webchat platform --- astrbot/core/astr_agent_hooks.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/astrbot/core/astr_agent_hooks.py b/astrbot/core/astr_agent_hooks.py index fa0bb02a9..717d4a3e1 100644 --- a/astrbot/core/astr_agent_hooks.py +++ b/astrbot/core/astr_agent_hooks.py @@ -56,8 +56,10 @@ async def on_tool_end( ) # special handle web_search_tavily + platform_name = run_context.context.event.get_platform_name() if ( - tool.name == "web_search_tavily" + platform_name == "webchat" + and tool.name == "web_search_tavily" and len(run_context.messages) > 0 and tool_result and len(tool_result.content) From 1993680a9a733b691dd4e9da15e2e6ba54ed93de Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Fri, 23 Jan 2026 19:51:41 +0800 Subject: [PATCH 2/2] chore: style consistent --- astrbot/core/pipeline/process_stage/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/astrbot/core/pipeline/process_stage/utils.py b/astrbot/core/pipeline/process_stage/utils.py index 3526efdb0..57e8667af 100644 --- a/astrbot/core/pipeline/process_stage/utils.py +++ b/astrbot/core/pipeline/process_stage/utils.py @@ -41,6 +41,7 @@ "You MUST NOT return an empty response, especially after invoking a tool." "Before calling any tool, provide a brief explanatory message to the user stating the purpose of the tool call." "After the tool call is completed, you must briefly summarize the results returned by the tool for the user." + "Keep the role-play and style consistent throughout the conversation." ) CHATUI_SPECIAL_DEFAULT_PERSONA_PROMPT = (