From 6c10b36682dcf453c439f8e402c3ffa3be62d1cb Mon Sep 17 00:00:00 2001 From: 2002yy <15135142681@163.com> Date: Sun, 17 May 2026 16:21:06 +0800 Subject: [PATCH] fix: performance budget for after-session messages, USER_GUIDE cleanup - wechat_generator.py: generate_wechat_messages now uses wechat_reply_max_tokens with task_name="wechat_after_session" - USER_GUIDE.md: startup command uses git clone instead of absolute Windows path; doc reference updated to v0.8.0 Co-Authored-By: Claude Opus 4.7 --- USER_GUIDE.md | 5 +++-- config/runtime_state.yaml | 2 +- memory/internal_state.md | 2 +- src/wechat_generator.py | 8 +++++++- 4 files changed, 12 insertions(+), 5 deletions(-) diff --git a/USER_GUIDE.md b/USER_GUIDE.md index 4128ff0..6279a7a 100644 --- a/USER_GUIDE.md +++ b/USER_GUIDE.md @@ -16,7 +16,8 @@ ## 2. 启动 ```powershell -cd "C:\Users\96967\Desktop\study agent" +git clone https://github.com/2002yy/-study-agent.git study-agent +cd study-agent pip install -r requirements.txt pip install -r requirements-dev.txt Copy-Item .env.example .env @@ -178,7 +179,7 @@ python -m pytest -q 当前仓库文档建议这样看: -1. `changelog/README_v0_7_1.md`: 当前版本检查包说明 +1. `changelog/README_v0_8_0.md`: 当前版本发布说明 2. `USER_GUIDE.md`: 当前使用指南 3. `PROJECT_PLAN.md`: 当前阶段规划与里程碑 4. `FUTURE.md`: 下一阶段方向 diff --git a/config/runtime_state.yaml b/config/runtime_state.yaml index b85037c..868b0dd 100644 --- a/config/runtime_state.yaml +++ b/config/runtime_state.yaml @@ -4,7 +4,7 @@ version: active_task: 文档同步 + UI 中文标签 + 性能预算 + 状态模型 + 工程收口 runtime: entry_mode: wechat - performance_mode: standard + performance_mode: deep route_mode: auto_rule memory_mode: preview debug_mode: false diff --git a/memory/internal_state.md b/memory/internal_state.md index 4c8b4fc..615e030 100644 --- a/memory/internal_state.md +++ b/memory/internal_state.md @@ -5,7 +5,7 @@ - route_mode: auto_rule - debug_mode: false - safe_mode: false -- performance_mode: standard +- performance_mode: deep - entry_mode: wechat ## Version diff --git a/src/wechat_generator.py b/src/wechat_generator.py index 0175379..e91c45f 100644 --- a/src/wechat_generator.py +++ b/src/wechat_generator.py @@ -190,7 +190,13 @@ def generate_wechat_messages( "content": f"请生成一版 {style} 风格的微信群消息,每位角色用【角色名】开头。", }, ] - raw = chat(messages, temperature=0.6, model_profile=model_profile).strip() + raw = chat( + messages, + temperature=0.6, + model_profile=model_profile, + max_tokens=wechat_reply_max_tokens(load_runtime_modes().performance_mode), + task_name="wechat_after_session", + ).strip() return _ensure_all_roles_reply(raw)