Conversation
Workflow and function tools already persist a detailed ToolRecord through their post-handlers when execution finishes; the agent stream then wrote a second degraded record (JSON-string input, no execution details) for the same execution from the ToolMessage branch, producing duplicate entries in the tool execution list (issue 1Panel-dev#7053). Skip the degraded insert when a detailed record already exists for this tool/source pair. Fixes 1Panel-dev#7053 Signed-off-by: wangzifei <wangzifei@cit.group.hk>
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.
问题
save_tool_record写入的降级记录(meta.input 是 JSON 字符串、无执行详情)。修复
save_tool_record先查询同一 (tool_id, source_id, source_type) 下是否已存在带details的完整记录,存在则跳过降级落库,消除重复记录;后置处理器未落库的场景(如调试模式仅写缓存)行为不变。Fixes #7053