From ed4609ebe514812a719220180d2ce593f1244360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=B0=B8=E8=B5=AB?= <1259085392@qq.com> Date: Mon, 23 Jun 2025 18:17:37 +0900 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=BB=A3=E7=A0=81=E9=87=8D?= =?UTF-8?q?=E6=9E=84=E9=80=A0=E6=88=90=E7=9A=84=E6=97=A0=E6=B3=95=E5=90=91?= =?UTF-8?q?=E5=89=8D=E5=85=BC=E5=AE=B9=E5=9C=A8node=E4=B8=AD=E5=8F=91?= =?UTF-8?q?=E9=80=81=E7=AE=80=E5=8D=95=E6=96=87=E6=9C=AC=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- astrbot/core/message/components.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/astrbot/core/message/components.py b/astrbot/core/message/components.py index d4dbc12b5..e7b25eacf 100644 --- a/astrbot/core/message/components.py +++ b/astrbot/core/message/components.py @@ -610,6 +610,13 @@ class Node(BaseMessageComponent): "data": {"file": f"base64://{bs64}"}, } ) + elif isinstance(comp, str): + data_content.append( + { + "type": "text", + "data": {"text": comp.strip()} + } + ) elif isinstance(comp, File): # For File segments, we need to handle the file differently d = await comp.to_dict()