From c672a1963b391c97bda16cabc73e00426d6c9d9f Mon Sep 17 00:00:00 2001
From: Adam <2363879+adamdotdevin@users.noreply.github.com>
Date: Tue, 11 Nov 2025 09:35:08 -0600
Subject: fix(desktop): prompt clearing inconsistent

---
 packages/desktop/src/components/prompt-input.tsx | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

(limited to 'packages/desktop/src/components/prompt-input.tsx')

diff --git a/packages/desktop/src/components/prompt-input.tsx b/packages/desktop/src/components/prompt-input.tsx
index 063822148..41ec71cfa 100644
--- a/packages/desktop/src/components/prompt-input.tsx
+++ b/packages/desktop/src/components/prompt-input.tsx
@@ -319,7 +319,9 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
 
     session.layout.setActiveTab(undefined)
     session.messages.setActive(undefined)
-    session.prompt.set(DEFAULT_PROMPT, 0)
+    // Clear the editor DOM directly to ensure it's empty
+    editorRef.innerHTML = ""
+    session.prompt.set([{ type: "text", content: "", start: 0, end: 0 }], 0)
 
     sdk.client.session.prompt({
       path: { id: existing.id },
-- 
cgit v1.2.3

