Repository navigation
fix(minimax-bot): 被截断的任务结果现在会说明自己被截断 - #152
Open
Apageoflove wants to merge 1 commit into
Open
Apageoflove wants to merge 1 commit into
Apageoflove wants to merge 1 commit into
Conversation
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.
任务结果进回执时会被截到 4000 字,截完什么都不说。
这个截断是第二道。settle() 里已经把结果截到 8000 并置了 resultTruncated,batchReport() 拼回执的时候又截一次到 4000,这次完全不看那个标记。读回执的人没法分辨「这就是全部」和「这是前一半」。
实测是一个 9000 字的子任务结果。任务记录里的 result 是 8000 字,resultTruncated 为 true;回执 4065 字,结尾那句标记文本没了,通篇找不到任何被截断的提示。
改法是回执里结果被截断时在末尾补一句截断标记,复用插件里已有的 clip.truncated 文案。短结果一个字不变,全文仍然可以用 get_tasks 读回来。
测试加在 task-lifecycle 里一条。造三个任务:一个记录里已经被截短并且带 resultTruncated,一个比回执窗口长但记录里是完整的,一个够短。三段分别断言前两段带截断标记、短的那段没有而且内容完整。在 0.7.32 上红,在切片上绿。全量 422 条过。
版本号到 0.7.36。0.7.33 到 0.7.35 被另外三条还开着的 PR 占着。
没验证的:真实 Host 和 Electron 没点过,只在 Node 22 上跑,Agent 是模拟的。
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.