Repository navigation
fix(ui): expose Regenerate for failed turns with no assistant output - #2381
Merged
Merged
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.
English
Summary
Root cause
TurnViewmounted the assistant message only when the turn had timeline content or an active live-streaming projection. A request that failed before producing text, thinking, or tool events therefore lost both its failure banner and the footer that owns Regenerate.The recovery surface now follows the durable turn model instead of timeline presence alone. A turn with a real user prompt and a recorded terminal state can render failure or abort presentation plus its recovery actions without assistant output. The evidence and ownership checks deliberately exclude inferred legacy completion and internal operations such as compaction, which do not have a valid conversational regeneration source.
Validation
npm --workspace @maka/ui test— 475 passed, 0 failedgit diff --checkCloses #2372.
简体中文
概要
根因
TurnView过去只在 turn 包含 timeline 内容或存在活跃 live-streaming projection 时挂载 assistant message。请求若在产生 text、thinking 或 tool event 之前失败,failure banner 与承载“重新生成”的 footer 就会一起消失。现在,恢复区域不再只依据 timeline 是否存在,而是遵循持久化 turn 模型。只要 turn 具有真实 user prompt 和已记录的终态,即使 assistant 输出为空,也能渲染失败或中止信息以及恢复操作。证据与所有权检查会明确排除 inferred legacy completion 和 compaction 等内部 operation,因为它们没有有效的对话 regeneration source。
验证
npm --workspace @maka/ui test— 475 项通过,0 项失败git diff --check关闭 #2372。