feat(reply-quality): 👎 keeps a snapshot of the turn; admin 对话质量记录

A 👎 now saves, server side, the rated turn plus the context window the
model read for it (reconstructed from the stored session with the same
consultationHistoryWindow the consult route uses), model and run facts.
👍 is only counted. Switching to 👍 or clearing deletes the snapshot.
Bodies are blanked after 90 days; the row cascades on session delete
and on account deletion.

- Optional 不满意原因 panel under the answer after a 👎 (five reasons,
  200-char note, "会把这一轮对话发给我们排查").
- Admin 对话质量记录: 👍/👎 stats by day and model, list without text,
  audited snapshot open, 处理状态 + note (support.quality.read/write).
- Privacy draft: what a 👎 keeps, why, 90 days, deletion.
- Migration 20260930050000 is add-only; set_reply_rating() replaced with
  the same signature.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N4f2nya58RoRu4yEmJgRGE
This commit is contained in:
Jesse_Chen
2026-09-30 09:42:11 +08:00
co-authored by Claude Opus 5.5
parent c1b4868cd9
commit 12e315a9bb
30 changed files with 1696 additions and 7 deletions
+6
View File
@@ -112,6 +112,12 @@ Jyotisha 的可见文案是产品的一部分。正确性红线(真实性、
这四句只在活动行里,是「流式生成中」的一部分:不进正文、不进历史、刷新后不出现;只往前走,不回头;不写秒数、不写「请稍候」,不承诺多久。
## 不满意原因(2026-09-30)
- 点 👎 后在该回答下方出现一块小面板,全部选填:标题「哪里不满意?可以不选」;原因「答非所问 / 内容不准 / 太长太空 / 语气不对 / 其他」;输入框占位「补充一句(可不填)」(最多 200 字);底部一句「会把这一轮对话发给我们排查」,按钮「提交」,失败后「再试一次」。
- 成功只说「已收到,谢谢。」,一秒多后自己收起。不道歉、不承诺改进时间、不解释模型。
- 这句告知不能删:👎 那一刻服务器已经保存了这一轮,面板只是补充原因。
## 反馈与投诉(2026-09-30)
- 菜单与弹窗标题「反馈与投诉」;类型「问题反馈 / 内容举报 / 退款与扣点 / 其他」;输入框标签「发生了什么」「联系方式(选填)」;勾选「附上当前对话(只附编号,便于我们查看)」;按钮「提交」,发送中「正在提交…」。