mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-05-16 13:55:28 +08:00
Merge pull request #5171 from jxxghp/cursor/check-for-ai-prefix-before-processing-message-composer-1-29f2
This commit is contained in:
@@ -943,7 +943,10 @@ class MessageChain(ChainBase):
|
|||||||
return
|
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:
|
if not user_message:
|
||||||
self.post_message(Notification(
|
self.post_message(Notification(
|
||||||
channel=channel,
|
channel=channel,
|
||||||
|
|||||||
Reference in New Issue
Block a user