fix(streaming): keep reasoning out of final text snapshot#302
Merged
liujuanjuan1984 merged 1 commit intomainfrom Mar 23, 2026
Merged
fix(streaming): keep reasoning out of final text snapshot#302liujuanjuan1984 merged 1 commit intomainfrom
liujuanjuan1984 merged 1 commit intomainfrom
Conversation
Collaborator
Author
|
本轮 PR 审查结论:
非阻塞说明:
|
Collaborator
Author
|
第二轮 reviewer 审查结论:未发现新的阻塞问题。 需要明确的非阻塞边界:
|
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.
背景
修复
#300:streaming 完成后,final_snapshot可能把原本只应属于reasoninglane 的内容再次落到textlane,导致刷新后出现重复正文。本次改动
src/opencode_a2a/parts/text.pyextract_text_from_parts()的语义textpartsreasoningparts 拼入最终文本tests/parts/test_parts_text.pyreasoningpartstests/upstream/test_opencode_upstream_client_params.pysend_message()回归测试parts同时包含reasoning + text时,只返回 final text 的场景tests/execution/test_streaming_output_contract_core.pyreasoning,最终 response payload 同时含reasoning + text时,final_snapshot不重复 reasoning 内容验证
uv run pre-commit run --all-filesuv run pytest350 passedcoverage: 91.08%关联
Closes #300