mirror of
https://github.com/bytedance/deer-flow.git
synced 2026-04-25 11:18:22 +00:00
fix(frontend): stop artifact panel from auto-opening on rehydrated write_file (#2278)
After a page refresh, the artifact panel's autoOpen/autoSelect state is reset to true. Submitting a new question flips thread.isLoading to true, which message-list passes to every MessageGroup — including historical ones. The previous response's last write_file step then satisfies the auto-open condition and re-pops the stale artifact. Gate the auto-open on the tool call having no result yet, so only a write_file that is still streaming in the current response can trigger it; rehydrated tool calls always carry a result and are now skipped. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
2176b2bbfc
commit
4d3038a7b6
@ -336,7 +336,7 @@ function ToolCall({
|
||||
description = t.toolCalls.writeFile;
|
||||
}
|
||||
const path: string | undefined = (args as { path: string })?.path;
|
||||
if (isLoading && isLast && autoOpen && autoSelect && path) {
|
||||
if (isLoading && isLast && autoOpen && autoSelect && path && !result) {
|
||||
setTimeout(() => {
|
||||
const url = new URL(
|
||||
`write-file:${path}?message_id=${messageId}&tool_call_id=${id}`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user