Repository navigation
fix(minimax-bot): 接力交接带上本轮各处的结论,不只是最后一句的尾巴 - #108
MyPrototypeWhat merged 2 commits into
Conversation
MyPrototypeWhat
left a comment
There was a problem hiding this comment.
Approving. This is a clear improvement to the relay hand-over, and using a neutral headline when several Bots spoke is the right call.
Verified
roundEntriesandroundSummary(miniapp/node/relay-guard.mjs) strip protocol marks, collapse whitespace, cap speaker names and skip empty entries.- The same entry list decides the headline, so the headline and content always agree.
- A single-hop round keeps the old text exactly.
- Moving
tailOfintorelay-guard.mjsremoves a duplicate without changing the group note. - The hints in
strings-panels.jsandrelay.handoverRoundinstrings.mjsare updated in Chinese and English. - Version 0.7.23 matches in
package.json,.minimax-plugin/plugin.json, the MCPserverInfoand the README. npm run checkpasses on Node 22 at330e545, includingtests/handover-note.test.mjs, and the GitHubcheckjob is green.
Optional
- The last sentence of
README.md:71says a group with the hand-over on and the note off isn't affected. As I read the code, the round list is built either way, so that group does get the new hand-over. If so, say the hand-over no longer depends on the note, or drop the sentence. HANDOVER_ENTRY_MAXandHANDOVER_SPEAKER_MAXduplicateNOTE_ENTRY_MAXandNOTE_SPEAKER_MAX. Sincegroup-note.mjsalready imports fromrelay-guard.mjs, defining them once there would remove the need to keep two copies in sync.
main now carries 0.7.21 (the mention sign, the admin's seat, the queued work and the clock). This merge keeps that section and this branch's 0.7.23 section, and keeps the version at 0.7.23 in the three places that carry it. It also addresses the two optional points of the review: the README sentence about the note now says what the code does (the hand-over reads the round, which is built whether or not the group keeps a note), and the entry and speaker budgets are defined once in relay-guard.mjs with group-note.mjs importing them.
|
两条 optional 都改了,在合并提交 4eb6f5a 里。 README 那句原来说反了。0.7.20 里交接块本来就不看群纪要,engine 传给 handoverSummary 的 note 一直是空串,所以纪要开关和交接块从来没有关系;这一版读的是本轮,而这一轮开不开纪要都会攒,于是「开着交接、关着纪要」的群同样会拿到新的交接块。现在这句改成:交接块读的是这一轮本身,这一轮不管开不开纪要都会攒;纪要还是原来的定位,是早前几轮的记录,活在每个 Bot 的常驻简报里。 那两个常量删了,换成 relay-guard.mjs 里的 ENTRY_MAX 与 SPEAKER_MAX,group-note.mjs 直接 import 这两个数,NOTE_ENTRY_MAX 与 NOTE_SPEAKER_MAX 改成它们的别名,两处不再各写一份字面量。 顺手把 main 上的 0.7.21 合了进来。README 里 0.7.20、0.7.21、0.7.23 三段并存,版本三处都是 0.7.23。 门禁重跑:插件套件 387 条全过,上游 npm run check 两半也过,这个提交上的 check 是绿的。用的是合并提交,没有强推,所以那条 APPROVED 还挂在原来那个提交上。 合并之后我没有在真实宿主里重新跑一遍群接力,这一点未验证。 |
MyPrototypeWhat
left a comment
There was a problem hiding this comment.
Approving. Thanks for merging main and picking up both notes.
Verified
- The merge of main keeps everything from #106. The diff against main touches only this PR's files, and every line it removes belongs to the old hand-over and the old duplicate cut helper.
- No conflict markers remain. The README has the 0.7.20, 0.7.21 and 0.7.23 sections in order, each once.
- The 0.7.23 README section now says the hand-over reads the round whether or not the group keeps a note, which matches the code.
ENTRY_MAXandSPEAKER_MAXare defined once inrelay-guard.mjs, andgroup-note.mjsimports them.- Version 0.7.23 matches in
package.json,.minimax-plugin/plugin.json, the MCPserverInfoand the README, above main's 0.7.21. npm run checkpasses on Node 22 at4eb6f5a, along with the hand-over, relay-guard, group-note and #106 plugin tests. The GitHubcheckjob is green, and the branch merges cleanly into main.
群里一个 Bot 答完、轮到下一个时,交接块里带的是上一条回复的尾巴(最后 400 字)。一轮里跳了三四个的时候,下一位其实只看得见上一位说了什么,前面几位各自得出了什么结论,得自己回头翻聊天记录。
这一版改成带本轮到目前为止每一位的结论,每条前面标出是谁说的,超出预算就丢掉最旧的几条。真实跑了一遍三个 Bot 的接力:改之前第三位收到的块里只有第二位的尾巴,改之后第一位和第二位的结论都在里面。
只有一位说过的时候仍然是原来那句话,逐字节不变 —— 这一点专门做了对照,第一个接着说的那位收到的块和改之前完全一样。多于一人的时候换个说法,因为几句话不能算成一个人说的,所以块里不再写「上一位说」,改成「本轮到目前为止各位的结论」,并注明这是一份记录、不是已达成的共识。设置面板里那两行提示也跟着改了,免得用户看到的说明和实际行为对不上。
每条最多 240 字,整块最多 600 字,超了整条丢最旧的,不做半条拼接。
新加的一个测试文件里有八条用例:单跳逐字节不变;多跳用新的说法且不出现「上一位」;每条不超过 240 字、整块不超过 600 字、超了丢最旧的;群纪要开不开都不影响交接块;伪造的标记会被洗掉;真跑两轮群聊,第二轮的交接里不出现第一轮的话;第一跳没有交接块。插件自带套件 373 条全过,上游 npm run check 两半也过,这八条在未改的上游代码上有七条是红的。
这套只在本地把三个 Bot 拉起来跑过接力,别人的环境里没验过,这点未验证。一轮里人多的时候更早的结论会被丢掉,这是上面那个 240 字和 600 字决定的。
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.