From 800c9d8344252d34aae81076605fef4ebe18d242 Mon Sep 17 00:00:00 2001 From: Soulter <905617992@qq.com> Date: Tue, 3 Feb 2026 01:28:12 +0800 Subject: [PATCH] fix: update webchat persona handling to avoid default assignment for None --- astrbot/core/astr_main_agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/astrbot/core/astr_main_agent.py b/astrbot/core/astr_main_agent.py index 31a2a2b25..8e43919fb 100644 --- a/astrbot/core/astr_main_agent.py +++ b/astrbot/core/astr_main_agent.py @@ -295,7 +295,7 @@ async def _ensure_persona_and_skills( req.contexts[:0] = begin_dialogs else: # special handling for webchat persona - if event.get_platform_name() == "webchat": + if event.get_platform_name() == "webchat" and persona_id != "[%None]": persona_id = "_chatui_default_" req.system_prompt += CHATUI_SPECIAL_DEFAULT_PERSONA_PROMPT