fix agent image rerun preserving prompt input
Some checks failed
Lint / build (20) (push) Has been cancelled
Playwright Tests / test (push) Has been cancelled

This commit is contained in:
Your Name 2026-03-25 23:52:04 +08:00
parent 80d862258b
commit 519239bcd3

View File

@ -2494,7 +2494,9 @@ export function AgentGenerationWorkspaceDarkV2({
});
try {
sendMessage({ role: "user", parts });
setInput("");
if (selectedAgentPreset?.type !== "image") {
setInput("");
}
} catch (error) {
generationRequestSnapshotRef.current = {
hiddenPrompt: null,