From 519239bcd37fc7df503f340e0aa6e2b1ce39e900 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 25 Mar 2026 23:52:04 +0800 Subject: [PATCH] fix agent image rerun preserving prompt input --- components/agents/AgentGenerationWorkspaceDarkV2.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/components/agents/AgentGenerationWorkspaceDarkV2.tsx b/components/agents/AgentGenerationWorkspaceDarkV2.tsx index 53e1e7878..4f6411bba 100644 --- a/components/agents/AgentGenerationWorkspaceDarkV2.tsx +++ b/components/agents/AgentGenerationWorkspaceDarkV2.tsx @@ -2494,7 +2494,9 @@ export function AgentGenerationWorkspaceDarkV2({ }); try { sendMessage({ role: "user", parts }); - setInput(""); + if (selectedAgentPreset?.type !== "image") { + setInput(""); + } } catch (error) { generationRequestSnapshotRef.current = { hiddenPrompt: null,