mirror of
https://github.com/agent0ai/agent-zero.git
synced 2026-05-06 08:01:31 +00:00
fix: browser screenshot flashing
This commit is contained in:
parent
9dea6efe80
commit
ea078affac
1 changed files with 13 additions and 0 deletions
|
|
@ -1404,6 +1404,19 @@ function updateProcessStep(stepElement, id, type, heading, content, kvps, durati
|
|||
// Update detail content
|
||||
const detailContent = stepElement.querySelector(".process-step-detail-content");
|
||||
if (detailContent) {
|
||||
// For browser, update image src incrementally to avoid flashing
|
||||
if (type === "browser" && kvps?.screenshot) {
|
||||
const existingImg = detailContent.querySelector(".screenshot-img");
|
||||
const newSrc = kvps.screenshot.replace("img://", "/image_get?path=");
|
||||
if (existingImg) {
|
||||
// Only update if src actually changed
|
||||
if (!existingImg.src.endsWith(newSrc.split("?path=")[1])) {
|
||||
existingImg.src = newSrc;
|
||||
}
|
||||
// Skip full re-render to avoid flashing
|
||||
return;
|
||||
}
|
||||
}
|
||||
renderStepDetailContent(detailContent, content, kvps, type);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue