From 1229e49dbebd6b10e77eb4ebc8d9cd1f41ab95eb Mon Sep 17 00:00:00 2001 From: hub-gif <2487812171@qq.com> Date: Fri, 17 Apr 2026 16:44:15 +0800 Subject: [PATCH] =?UTF-8?q?refactor(frontend):=20=E7=AD=96=E7=95=A5?= =?UTF-8?q?=E7=94=9F=E6=88=90=E9=BB=98=E8=AE=A4=E5=A4=A7=E6=A8=A1=E5=9E=8B?= =?UTF-8?q?=EF=BC=8C=E4=BB=85=E4=BF=9D=E7=95=99=E3=80=8C=E6=9C=AC=E6=AC=A1?= =?UTF-8?q?=E8=A7=84=E5=88=99=E7=A8=BF=E3=80=8D=E9=80=89=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除「使用大模型」与保存策略偏好;buildPayload 默认 generator=llm;勾选本次仅规则稿时走 rules。后端默认 use_llm_default 改为 true。 Made-with: Cursor --- backend/pipeline/jd/runner.py | 4 +- backend/pipeline/serializers.py | 2 +- .../pipeline/tests/test_strategy_config.py | 2 +- frontend/src/views/jd/JdStrategyBuildView.vue | 111 +----------------- 4 files changed, 10 insertions(+), 109 deletions(-) diff --git a/backend/pipeline/jd/runner.py b/backend/pipeline/jd/runner.py index 7a1979d..068a0d3 100644 --- a/backend/pipeline/jd/runner.py +++ b/backend/pipeline/jd/runner.py @@ -194,8 +194,8 @@ def get_default_report_config() -> dict[str, Any]: def get_default_strategy_config() -> dict[str, Any]: """策略生成页独立默认(与 ``report_config`` 无关),供前端回填与 PATCH 合并。""" return { - # 打开页面时是否默认勾选「使用大模型生成」 - "use_llm_default": False, + # 默认走大模型润色;用户可在单次生成时勾选「仅规则稿」取消 + "use_llm_default": True, } diff --git a/backend/pipeline/serializers.py b/backend/pipeline/serializers.py index bf843c4..b165830 100644 --- a/backend/pipeline/serializers.py +++ b/backend/pipeline/serializers.py @@ -87,7 +87,7 @@ def validate_report_config_body(value: dict) -> dict: _STRATEGY_CONFIG_ALLOWED_KEYS = frozenset({"use_llm_default"}) -_DEFAULT_STRATEGY_CONFIG: dict[str, bool] = {"use_llm_default": False} +_DEFAULT_STRATEGY_CONFIG: dict[str, bool] = {"use_llm_default": True} def validate_strategy_config_body(value: dict) -> dict: diff --git a/backend/pipeline/tests/test_strategy_config.py b/backend/pipeline/tests/test_strategy_config.py index f87f2bb..be717ae 100644 --- a/backend/pipeline/tests/test_strategy_config.py +++ b/backend/pipeline/tests/test_strategy_config.py @@ -9,7 +9,7 @@ from pipeline.serializers import validate_strategy_config_body def test_validate_strategy_config_merges_default() -> None: out = validate_strategy_config_body({}) - assert out["use_llm_default"] is False + assert out["use_llm_default"] is True def test_validate_strategy_config_unknown_key() -> None: diff --git a/frontend/src/views/jd/JdStrategyBuildView.vue b/frontend/src/views/jd/JdStrategyBuildView.vue index 5f1fb4e..ab05a62 100644 --- a/frontend/src/views/jd/JdStrategyBuildView.vue +++ b/frontend/src/views/jd/JdStrategyBuildView.vue @@ -1,12 +1,7 @@