Repository navigation
feat(minimax-bot): 群纪要——清空聊天后群还记得说过什么(默认关闭) - #79
Merged
MyPrototypeWhat merged 1 commit intoOct 26, 2026
Merged
Conversation
MyPrototypeWhat
approved these changes
Oct 26, 2026
MyPrototypeWhat
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed at 76e9b54.
Thanks, this is a tidy, well-scoped feature.
Optional
- Switching the note off keeps the old entries, hidden.
team.mjs:378only flipsnotes;noteEntriesstays in the group record. The panel shows the entries and the Clear button only while the switch is on (panels.js:342), so after switching it off the user can't see or clear them, and switching it back on later puts the old lines straight back into every Bot's brief. Either clearnoteEntrieswhen the switch goes off, or keep the list and Clear button visible while entries exist. README.md:39 could also tell users that what was recorded is kept until they clear it. - Comment at
team.mjs:376-377. The comment atteam.mjs:376says switching off stops the hand-over, but hand-over has its own switch. - Bot text is placed inside the standing brief.
renderNote(group-note.mjs:150-160, injected atengine.mjs:419) puts reply tails inside<minimax-bot-context>.neutralizeMarksremoves only the group-summary/handover marks, matched case-sensitively; it does not remove</minimax-bot-context>(engine.mjs:445), so a reply ending with that tag can appear to close the context block early. Consider adding the context marks to the forged-marks list (or escaping</>in note entries), and matching case-insensitively. The "record, not an agreement" heading is a good mitigation; this is defense in depth. - The tail is cut after neutralizing (
group-note.mjs:69-71).slice(-240)can start in the middle of a word or a partial tag. It's harmless, but trimming to a word boundary would read better. - Prompt growth. Bounded at 6 entries / 1200 characters plus the heading and the two marks (
group-note.mjs:35-42,bound()at 100-112), so about 1.4k characters at most per group brief. That's reasonable; it might help to state the limit in the panel hint so users know older rounds drop off. - Panel renders the raw stored list (
panels.js:345) instead of the bounded/cleanednoteEntries()that the brief uses. They match in normal use, but a hand-edited state file would show entries the Bots never see.
Notes
- All data stays in the group record in
state.jsoninside the Mini App'sdataDir, is removed with the group, and the README's "Data & access" section is updated to say so. - With the switch off, prompts are unchanged: I built the standing brief (group chat and private chat,
zhanden) and the MCPtools/listandlist_teamoutput on 6d1fb27 and on this head, with a group that has the switch off and a stalenoteEntriesvalue in its record. All eight outputs are byte-identical. - MCP:
update_group/create_groupmap their arguments explicitly (mcp.mjsaround 521-537), so a Bot can't passnotesorclearNotes.list_teamdoesn't expose the note. - Clear:
clearNotesemptiesnoteEntries(team.mjs:379). "Start new chat" keeps the note (intended), and deleting the group removes it. - No reading outside
dataDir, and no access to host credentials or sessions, or to other plugins' data. npm run checkpasses on Node 22 (minimax-bot: OK; 69/69 tests). The plugin's own tests pass: 251/251 on Node 22, includingtests/group-note.test.mjs. Nothing was added to repo CI or the roottest/.- Version 0.7.9 → 0.7.10 in
plugin.json,package.jsonand the MCPserverInfo. Another open PR touching minimax-bot, #56, also edits the version lines (0.7.7 → 0.7.8, already behind main). Whichever merges second will need a rebase and a new version number.
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.
给群加一份纪要,是群自己的字段,默认是关的:notes。开关在群设置里,模型改不了——MCP 的
update_group 里没有这个参数,模型即使硬塞也不生效;纪要的内容也只有插件能写,Bot 写不进去。
纪要记的是每轮结束时各 Bot 回复的结尾。它取自这一轮本来就有的回复,只是提示词里的一段文本,
不额外起模型回合、不额外调工具、不写记忆。群里每个 Bot 的常驻简报里都带上这份记录,所以每个
Bot 看到的是同一份。
纪要写在群资料里,不在消息里。这条是关键:群里"新建对话"清掉的是整群消息档案和会话游标,
群自己的记录(名字、公告、成员、接力设置)留着。纪要跟着群记录走,所以清空聊天之后还在,
后来加入的 Bot 也能读到。官方群里现在没有任何跨 Bot 的共享上下文——每个 Bot 只能拿到最近 30 条
群消息,而且只看得到别人的发言,群的共同记忆是一扇会被清空清掉的滑动窗,群设置却留着。
纪要是记录,不是共识:提示词里写明了,免得 Bot 把早先的话当成群里已经定了的事。面板里能看见
记了什么,也能清空。
为什么做这个:问题是我在本地测试里看出来的。我在 mcode 里对官方版跑过一套 8 步对照,群里
没有跨 Bot 的共享上下文,只有最近 30 条群消息这一扇窗;同一轮里官方的 Bot 为了还原"这个
标题是在什么上下文里定的"调了 6 次工具,翻会话列表、找草稿文件、读工作区。它缺的是群说过
的话的落点,这里补的正是这个落点。要说清楚的是:它不能凭空造出从没贴进群的素材——那几次
考古要找的有一部分正是这种素材;它保证的是群里已经说过的结论不会因为一次清空就消失。
测过什么:上游
npm run check的两半都在本地跑了(scripts/validate.mjs对本插件报minimax-bot: OK 和 repository: OK,根目录 69/69 条测试);插件自带套件 251 过、0 挂(改前 236,
我给这个功能补了 15 条用例);开关关着时,群常驻简报中英文都和上游 main 逐字节相同,MCP 目录和
list_team 的返回也没变(与上游 main 6d1fb27 对照)。版本 0.7.9 → 0.7.10。
只在 linux-ubuntu-24.04 + MiniMax Code 3.1.4 上验证过,其他环境未验证。纪要这版是在插件自带的
测试里跑通的(测试用预置回复代替真实模型调用),没在桌面端用真模型跑过。
Need help on this PR? Tag
@codesmith-botwith what you need.