fix: content quality, image format, task monitor, calendar data source, search UI & sort

This commit is contained in:
Yuzhiran Dev
2026-05-26 11:26:10 +08:00
parent b2d043b231
commit ac8644d752
36 changed files with 2294 additions and 873 deletions
+11
View File
@@ -52,6 +52,17 @@ yu-zhi-ran/
- `USE_POSTGRES=false` falls back to SQLite (used in tests)
- Models have timezone-aware `DateTime(timezone=True)` columns
### Prompts (`prompt_configs` table)
- **DB 是唯一来源**,修改 prompt 直接 `UPDATE prompt_configs SET content = '...' WHERE key = '...';`
- 代码 `scripts/prompt_loader.py` 中的 `_PROMPT_DEFAULTS` **仅作种子数据**,第一次写入后就不再生效
- 新增 prompt:在 `_PROMPT_DEFAULTS` 添加定义 → 重启后自动补入 DB(仅当该 key 不存在时)
- 修改 prompt:**直接改 DB,不要改代码**(除非要更新种子供新环境用)
- DB 不可用时回退代码默认值(仅紧急模式)
### Prompt quality checks (`compliance_checker.py`)
- 软质量问题(AI套话/人称混用/阅读体验)只降分、不挡流程(`passed=true`
- 硬合规问题(敏感词/法律/品牌)扣分多且阻塞流程
### LLM
- `call_llm()` in `core/nvidia_client.py` — reads active provider from DB `LLMConfig.is_active`, API key from env
- DeepSeek reasoning models return `reasoning_content` (thinking) + `content` (answer). `call_llm` prefers `content`, falls back to tail of `reasoning_content`