From e8ed2454a1642a5c9ffe36812e44cb2e8759dac9 Mon Sep 17 00:00:00 2001 From: jxxghp Date: Sun, 18 May 2025 13:22:42 +0800 Subject: [PATCH] =?UTF-8?q?feat=EF=BC=9A=E6=B6=88=E6=81=AF=E4=B8=BA?= =?UTF-8?q?=E9=93=BE=E6=8E=A5=E6=97=B6=EF=BC=8C=E4=BA=A4=E7=94=B1=E7=AC=AC?= =?UTF-8?q?=E4=B8=89=E6=96=B9=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/chain/message.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/chain/message.py b/app/chain/message.py index 0e8bff58..c4a99ef7 100644 --- a/app/chain/message.py +++ b/app/chain/message.py @@ -422,13 +422,17 @@ class MessageChain(ChainBase): or text.find("继续") != -1: # 聊天 content = text - action = "chat" + action = "Chat" + elif text.startswith("http"): + # 链接 + content = text + action = "Link" else: # 搜索 content = text action = "Search" - if action != "chat": + if action in ["Search", "ReSearch", "Subscribe", "ReSubscribe"]: # 搜索 meta, medias = self.mediachain.search(content) # 识别