根因:chatStore 的 currentBackgroundId 从 localStorage('selectedBackground') 读取,
但前端从未写入该 key,导致语音/通话会话的 bg_id 始终为默认值 1,
与历史面板查询的实际 backgroundId 不匹配。
修复:
- ChatView 新增 cacheSelectedBackground(),在初始化和加载背景时同步到 localStorage
- chatStore voice/call 初始化函数支持 config.background_id 显式覆盖
- ChatView 中 callConfig 补充 background_id 字段
- 后端 _persist_voice_session_history 异常日志升级为 error + traceback
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
||
|---|---|---|
| .. | ||
| models | ||
| __init__.py | ||
| admin_router.py | ||
| ai_governance_router.py | ||
| background_router.py | ||
| cache_router.py | ||
| chat_router.py | ||
| fullscreen_router.py | ||
| live2d_router.py | ||
| model_config_router.py | ||
| pet_router.py | ||
| scene_editor_router.py | ||
| sms_auth_router.py | ||
| storage_router.py | ||
| user_router.py | ||
| voice_chat_router.py | ||
| voice_chat_router.py.bak2 | ||
| wechat_auth_router.py | ||