diff --git a/app/chain/message.py b/app/chain/message.py index 5162a75d..b1e1912b 100644 --- a/app/chain/message.py +++ b/app/chain/message.py @@ -943,7 +943,10 @@ class MessageChain(ChainBase): return # 提取用户消息 - user_message = text[3:].strip() # 移除 "/ai" 前缀 + if text.lower().startswith("/ai"): + user_message = text[3:].strip() # 移除 "/ai" 前缀(大小写不敏感) + else: + user_message = text.strip() # 按原消息处理 if not user_message: self.post_message(Notification( channel=channel,