新增: 轮次按发起边界分桶与稳定编号

- 轮号=用户发起消息计数(单一真值来源), 单消息桶不吞号, 编号不再漂移
- 补充注入标 source=inject, 归属当前轮不开新轮(961 轮次语义)
- 压缩摘要/错误气泡归属当前轮, 压缩后不再另起新轮次
- reload 消息透传 source 字段, 轮次导航条自动同口径
This commit is contained in:
lxy
2026-10-11 08:50:35 +08:00
parent 461354d7f4
commit b4b18e351b
4 changed files with 35 additions and 9 deletions
+5
View File
@@ -565,6 +565,11 @@ export interface AiMessage {
id: MessageId
role: 'user' | 'assistant' | 'tool' | 'system'
content: string
/**
* 消息来源(958 溯源/961 轮次归属):undefined=null=桌面本端发起;'inject'=运行中
* 补充注入(961② 轮次分桶判据,归属当前轮不开新轮);'feishu'=飞书入站发起。
*/
source?: { channel: string; message_id: string; chat_id?: string; sender?: string } | null
/**
* 推理过程文本(DeepSeek reasoning_content / Anthropic thinking 同通道,后端落库
* ai_messages.reasoning_content)。undefined=该轮无思考内容。历史消息 reload 时