From 292f7eeaa9a60c835b3c2914c3f6c41e0e4a67d7 Mon Sep 17 00:00:00 2001 From: martsforever Date: Wed, 10 Sep 2025 22:48:03 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=AE=8C=E6=88=90=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E7=9A=84=E6=88=90=E6=9C=AC=E5=88=86=E6=9E=90=E6=8A=A5=E5=91=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/tools/tool_project_analysis.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app/tools/tool_project_analysis.py b/app/tools/tool_project_analysis.py index 96d4631..54209a8 100644 --- a/app/tools/tool_project_analysis.py +++ b/app/tools/tool_project_analysis.py @@ -1,3 +1,4 @@ +import json from decimal import Decimal from typing import Annotated, List @@ -88,15 +89,15 @@ async def tool_project_analysis(project_name: Annotated[str, "项目名称"]) -> member_amount = {k: str(v) for k, v in member_amount.items()} cost_amount = {k: str(v) for k, v in cost_amount.items()} - return [ + return json.dumps([ description, { "component": "ProjectCostAnalysis", "props": { "member_amount": member_amount, "cost_amount": cost_amount, - "spent": project_cls.spent, - "balance": project_cls.balance, + "spent": str(project_cls.spent), + "balance": str(project_cls.balance), } } - ] + ], ensure_ascii=False)