From 28c538a72fa1228445e7b176646a9bee01740cbb Mon Sep 17 00:00:00 2001 From: ThearchyHelios Date: Wed, 21 Oct 2026 20:02:41 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B6=8B=E5=8A=BF=E5=88=A4=E6=96=AD=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E7=9A=84=E8=AF=B4=E6=98=8E=E5=BC=80=E5=A4=B4=E6=94=B9?= =?UTF-8?q?=E6=88=90=E5=A5=91=E7=BA=A6=E7=9A=84=E5=8F=AB=E6=B3=95=E3=80=8C?= =?UTF-8?q?=E8=B6=8B=E5=8A=BF=E5=88=A4=E6=96=AD=EF=BC=9A=E3=80=8D=EF=BC=88?= =?UTF-8?q?=E5=8E=9F=E6=9D=A5=E5=86=99=E3=80=8C=E8=B6=8B=E5=8A=BF=EF=BC=9A?= =?UTF-8?q?=E3=80=8D=EF=BC=8C=E5=8F=A6=E5=A4=96=E5=9B=9B=E4=B8=AA=E5=B7=A5?= =?UTF-8?q?=E5=85=B7=E9=83=BD=E4=BB=A5=20OP=5FLABELS=20=E7=9A=84=E5=8F=AB?= =?UTF-8?q?=E6=B3=95=E5=BC=80=E5=A4=B4=EF=BC=89=EF=BC=9B=E6=B5=8B=E8=AF=95?= =?UTF-8?q?=E8=A1=A5=E4=B8=80=E6=9D=A1=EF=BC=9A=E4=BA=94=E4=B8=AA=E5=88=86?= =?UTF-8?q?=E6=9E=90=E5=B7=A5=E5=85=B7=E7=9A=84=E8=AF=B4=E6=98=8E=E9=83=BD?= =?UTF-8?q?=E4=BB=A5=E5=A5=91=E7=BA=A6=E9=87=8C=E8=BF=99=E7=A7=8D=E5=88=86?= =?UTF-8?q?=E6=9E=90=E7=9A=84=E5=8F=AB=E6=B3=95=E5=8A=A0=E3=80=8C=EF=BC=9A?= =?UTF-8?q?=E3=80=8D=E5=BC=80=E5=A4=B4=EF=BC=8C=E5=8A=A9=E6=89=8B=E7=9A=84?= =?UTF-8?q?=E5=B7=A5=E5=85=B7=E6=B8=85=E5=8D=95=E3=80=81=E8=AF=81=E6=8D=AE?= =?UTF-8?q?=E9=9D=A2=E6=9D=BF=E3=80=81=E8=AF=84=E6=B5=8B=E5=86=99=E7=9A=84?= =?UTF-8?q?=E6=98=AF=E5=90=8C=E4=B8=80=E7=A7=8D=E8=AF=B4=E6=B3=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- backend/app/tools/builtin/analysis.py | 2 +- backend/tests/test_analysis_tools.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/app/tools/builtin/analysis.py b/backend/app/tools/builtin/analysis.py index 43efd152..5f58b1d0 100644 --- a/backend/app/tools/builtin/analysis.py +++ b/backend/app/tools/builtin/analysis.py @@ -230,7 +230,7 @@ async def analysis_baseline(ctx: ToolContext, **kwargs: Any) -> dict[str, Any]: @register( name=contract.TOOL_NAMES["trend"], category=CATEGORY, - description="趋势:判断一条按期次排的序列是在持续上升、持续下降,还是没有明显趋势(只是一次波动)。", + description="趋势判断:判断一条按期次排的序列是在持续上升、持续下降,还是没有明显趋势(只是一次波动)。", args_schema=TrendArgs, guide=METHOD_GUIDE, ) diff --git a/backend/tests/test_analysis_tools.py b/backend/tests/test_analysis_tools.py index 96513247..5e676e3d 100644 --- a/backend/tests/test_analysis_tools.py +++ b/backend/tests/test_analysis_tools.py @@ -156,6 +156,8 @@ def test_the_five_tools_take_no_thresholds_and_share_one_method(): props = spec.args_schema.model_json_schema()["properties"] assert not set(props) & set(contract.DEFAULTS), f"{name} 的参数里有阈值:{set(props) & set(contract.DEFAULTS)}" assert spec.args_schema is ARGS[op] and spec.category == "分析" and spec.description + # 说明开头是契约里这种分析的叫法(「趋势判断:……」),助手的工具清单、证据面板、评测写的是同一种说法 + assert spec.description.startswith(f"{contract.OP_LABELS[op]}:"), spec.description[:12] assert spec.guide is METHOD_GUIDE and not spec.dangerous and not spec.writes_state # 不查库:能力登记、出处链都不把它的结果当查询快照 assert not is_platform_query(name)