Skip to content

fix(agent): avoid promoting tool thoughts as answers#1374

Open
wolfkill wants to merge 1 commit into
Tencent:mainfrom
wolfkill:fix/agent-tool-thinking-final-answer
Open

fix(agent): avoid promoting tool thoughts as answers#1374
wolfkill wants to merge 1 commit into
Tencent:mainfrom
wolfkill:fix/agent-tool-thinking-final-answer

Conversation

@wolfkill
Copy link
Copy Markdown
Contributor

Summary

  • prevent the chat UI from synthesizing a final answer from trailing thinking once agent tools were used
  • keep the existing natural-stop compatibility path for streams that contain only thinking and no tool activity
  • add focused Node tests for the promotion guard

Fixes #1371

Testing

  • node --test src/components/modelEditorSourceState.test.ts src/utils/agentStreamEvents.test.ts
  • npm run build-only

Note

  • npm run type-check currently fails on existing project-wide frontend type errors unrelated to this change, so it is not listed as passing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Agent 的“推理过程”被当成了“最终输出”直接返回给了用户

1 participant