Repository navigation
fix(minimax-bot): 失败的回合说清是哪一种失败 - #122
Merged
MyPrototypeWhat merged 1 commit intoNov 10, 2026
Merged
MyPrototypeWhat merged 1 commit into
MyPrototypeWhat merged 1 commit into
Conversation
Agent 没能启动时不再只说暂时不可用,而是说清这一轮没跑、下一步该试什么。读不懂原因的宿主错误改用插件自己的句子,不再把宿主原文带进聊天。
MyPrototypeWhat
approved these changes
Nov 10, 2026
MyPrototypeWhat
left a comment
Collaborator
There was a problem hiding this comment.
谢谢,改动只涉及失败提示文案和兜底,测试也补齐了,合了。
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.
这个 PR 只做一件事:把失败回合显示的那句话改掉,让它说清发生了什么,而不是笼统地说"try again shortly"。挑出这句话的分支也跟着改了一点。
10-22 那条评审要一份复现,allturk 当天就给了:宿主日志是 legacy_fallback(0.6.12、macOS、0.7.7),几个入口都在 stage=create-session 上失败,管理面一直正常,本地打上 0.7.8 之后回合 status=done。10-23 那条回的是 Mini App 放着不动之后 MCP 连接掉下去那半截,跟这里无关。
Agent 没能起来的回合,现在会说是 Agent 没起来、这一轮没跑、下一步该试什么,依据是 docs/agent.md 对 AGENT_UNAVAILABLE 的写法。插件读不懂原因的那类失败,现在有自己的句子,不再把宿主原文直接摆出来,说这一轮没能完成、原因没能确认。宿主那段文字随后就不见了。回合路径本来就没把它写进日志,改前改后都没有,存下来的消息只留宿主的错误码、不留那段话,所以 session id 或服务名不会出现在聊天里。这一半其实超出了他点的名,是拿诊断信息换界面干净;如果他更想保留宿主原文,撤掉这一半也可以,"Agent 没起来"那句并不依赖它。宿主以结果形式回报失败、而不是抛出来的时候,仍然显示它自己发的那句话。插件自己抛的错误保留自己的 message,已知的错误码各自保留自己的句子。
没有动绑定逻辑,没有动重试语义,没有新增或改名任何错误码。
改了这些文件。
miniapp/node/strings.mjs中英文新句子,外加只在服务端出现的agentError.hostError,页面不查这个键miniapp/client/strings-app.js与服务端逐字相同的agentError.AGENT_UNAVAILABLEminiapp/node/engine.mjs里describeAgentError三步回落,已知码、插件自己的错误消息、宿主那句tests/agent-error-copy.test.mjs新增,14 条断言README.md的一节0.7.25package.json、.minimax-plugin/plugin.json、miniapp/node/mcp.mjs三处版本 0.7.24 改到 0.7.25测法是插件目录里
npm ci --prefix tests --ignore-scripts --no-audit --no-fund然后node --test tests/*.test.mjs,46 个文件 408 条全过,新加的 14 条也在里面。这份新测试在改之前的代码上是红的,14 条里挂 6 条,不是那种怎么都过的测试。仓库根的npm ci && npm run check在干净克隆上也是绿的。测试环境(Tested environment)
MiniMax Code 3.1.2(macOS 与 Windows)与 MiniMax Code 3.1.4(Linux),是这个包 README 里已经写明的环境。这次只改措辞,不需要更新的客户端,这里也没有对着真实宿主跑过。
数据与权限(Data & access)
没有变化。这份 PR 不新增任何文件读、文件写、网络请求、进程、Agent 回合、对话读取、工具调用,也不涉及设备或宿主导航权限,新句子来自插件本来就在加载的字典。
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.