feat(chat-monitor): 缓存消息增加 mq_text 字段,context 端点返回 MessageQueue 完整文本 - #1316
Merged
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 0 |
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
This-is-XiaoDeng
enabled auto-merge
July 30, 2026 03:23
xxtg666
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更内容
点击用户消息时弹窗显示的是重新拼装的上下文(additional_info 手动组装),与真正投递到 MessageQueue 的版本不一致,内容缺失。
修改
types.py:CachedMessage增加mq_text字段processor.py:process_messages()中将投递到 MessageQueue 的完整文本写入msg_dict["mq_text"]helpers.py(chat-monitor):serialize_cached_message()序列化mq_textrouters/sessions.py(chat-monitor):get_message_context优先返回msg.mq_text(含完整 additional_info),旧消息回退到手动构建格式效果
点击用户消息时,modal 显示的是实际投递给 AI 的完整文本(含 Jinja2 模板渲染的 additional_info),而不是后端手动拼装的简化版。
关联 PR