Conversation
* refactor: 优化消息格式化逻辑,改进文件路径处理和字符串拼接性能
添加了_file_uri_to_path方法,用于更稳健地将file:// URI转换为本地路径。
在outline_message_list方法中,不再使用isinstance判断,而是统一使用component_type字符串判断。
性能优化:使用列表收集消息部分,最后用join连接,替代字符串累加。
对回复组件的格式化进行了调整,增加了时间显示,并修改了显示格式。
一些细节调整,如分割线简化、属性获取方式等。
* Fix private chat history storage id
* fix: 修复私聊中bot消息存储路径错误
根因:create_bot_message() 将 sender.user_id 设为 bot 自身 ID,
save_message() 以此作为 chat_id,导致私聊中 bot 消息存入
private/{bot_id}.json 而非 private/{user_id}.json,用户看不到
bot 说过的话。
修复:为 save_message() 添加 chat_id_override 可选参数,
在 save_bot_message_from_chain() 中传入正确的会话 ID
(私聊用 event.get_sender_id(),群聊用 event.get_group_id())。
移除原 PR 中对 message_utils.py 的非必要重构,还原为 dev 基线。
Closes #87
---------
Co-authored-by: 23q3 <2335125256@qq.com>
23q3
approved these changes
Feb 24, 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.
Release v2.1.11
This PR was automatically created by the release workflow.
Changes
Files Updated
metadata.yaml- version updatedmain.py- version in @register decorator updatedREADME.md- badge and latest version section updatedAfter merging, a tag will be automatically created and a GitHub Release will be published.