refactor: migration to event log backend for conversation storage - #10077
refactor: migration to event log backend for conversation storage#10077Soulter wants to merge 1 commit into
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
astrbot-docs | bf4b31e | Commit Preview URL Branch Preview URL |
Sep 13 2026, 04:21 PM |
There was a problem hiding this comment.
Sorry @Soulter, your pull request is larger than the review limit of 150,000 diff characters
|
这里想讨论一下 事件记录可以简化为下面这样(为了阅读展开格式;JSONL 落盘时每个对象占一行,ID 使用短名称示意): {
"seq": 14,
"version": 1,
"event_id": "b1",
"created_at": "2026-09-14T12:01:00Z",
"type": "context.rebased",
"payload": {
"reason": "compaction",
"messages": [
{
"id": "summary1",
"message": {
"role": "user",
"content": "此前用户询问北京天气,工具查询结果为晴,25°C,已回答用户。"
}
}
]
}
}这个方案下:
所以 当然,这不是说当前实现中的 我的建议是先确认这两个目标是否属于本次必须支持的能力。如果主要需求是会话持久化、压缩和侧边对话,我更倾向上述线性方案;若共享祖先的分支树是明确需求,则保留父节点链。这个取舍与底层使用 SQLite 还是 JSONL 是两个独立问题。 |
Modifications / 改动点
Screenshots or Test Results / 运行截图或测试结果
Checklist / 检查清单
😊 If there are new features added in the PR, I have discussed it with the authors through issues/emails, etc.
/ 如果 PR 中有新加入的功能,已经通过 Issue / 邮件等方式和作者讨论过。
👀 My changes have been well-tested, and "Verification Steps" and "Screenshots" have been provided above.
/ 我的更改经过了良好的测试,并已在上方提供了“验证步骤”和“运行截图”。
🤓 I have ensured that no new dependencies are introduced, OR if new dependencies are introduced, they have been added to the appropriate locations in
requirements.txtandpyproject.toml./ 我确保没有引入新依赖库,或者引入了新依赖库的同时将其添加到
requirements.txt和pyproject.toml文件相应位置。😮 My changes do not introduce malicious code.
/ 我的更改没有引入恶意代码。