Repository navigation
微信:接龙重建加条数和总长上限,第一行写明条数 - #66
Merged
Merged
Conversation
A note's list is rebuilt from its parts only up to 200 entries (agent-wechat's MAX_ENTRIES) and only while the rebuilt text stays within the size a note's <title> may have; past either cap the note is shown as its <title>. One crafted message could otherwise repeat a 16 KB range per entry without limit. The first line now reads "[接龙] 共 N 条", so a note clipped in an /agent request's history shows it is incomplete; the assistant's instructions say to read it whole with matewechat_messages then. The history's clipping length is unchanged. matewechat-native 0.1.13. Co-Authored-By: Claude Opus 5.5 <[email protected]>
matewechat-native 0.1.13(tag matewechat-native-v0.1.13,SHA-256 538603677ac30d5675f3093e6907b65fac3a20877bf126a8942fdbc850fb46fb)。 Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
做了什么
修 #65 合入后 review 提出的两个 P1(P2 这次不改)。
P1-1:接龙重建没有上限(
native/matewechat-native/src/message.rs)group_notes.rs的MAX_ENTRIES一致):超过就不重建,原样用<title>。NOTE_TITLE_MOST(128 KB):重建时边拼边检查,超过就放弃重建,原样用<title>。之前一条特制消息可以让每个条目都引用 16 KB 的同一段,条目数不限,放大到几十上百 MB。P1-2:长接龙在 /agent 上下文里被截断,助手不知道
<title>原文时(以及 AgentWechat 模式下用正文时)N 是「1. 」这样的编号行数;数不出来就不写条数。assistant/instructions.md:/agent 附带的聊天记录里长消息会截断、末尾是「…」;接龙以「…」结尾或数到的条数和「共 N 条」对不上时,用matewechat_messages读全文。怎么验证的
cargo test --locked(native/matewechat-native):23 个通过。新增group_note_too_many_entries_shows_its_title(200 条重建、201 条退回 title)、group_note_cannot_grow_past_a_title(16 KB title、每条引用整段:7 条放得下、8 条退回 title;200 条退回 title)、numbered_lines_of_a_note。去掉两处上限后这两个新测试失败,确认它们在旧代码上会挂。bash scripts/test.sh:core 950、feishu 419 通过;wechat 191 里只有test_the_pinned_program_is_the_version_of_its_source失败——它要求install.py钉的程序版本等于源码版本,发版提交里编好 0.1.13 并钉上后通过。test_hub.py:AgentWechat 模式的接龙带「共 N 条」;「说明 3. 不算」「12345. 也不算」这样的行不计数。没做什么
🤖 Generated with Claude Code