From 2e805f163592687e3ede03d3532646383e53ab82 Mon Sep 17 00:00:00 2001 From: ANIRUDDHA ADAK Date: Mon, 7 Sep 2026 15:33:50 +0530 Subject: [PATCH] fix(slides): clear staged attachments on New chat (#234) Co-authored-by: Aniruddha Adak --- apps/slides/src/renderer/ai/AiPanel.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/slides/src/renderer/ai/AiPanel.tsx b/apps/slides/src/renderer/ai/AiPanel.tsx index 469ef05..fa2e7ec 100644 --- a/apps/slides/src/renderer/ai/AiPanel.tsx +++ b/apps/slides/src/renderer/ai/AiPanel.tsx @@ -1873,6 +1873,10 @@ export function AiPanel({ // original message index, so stale entries would re-attach to unrelated // new messages after an index collision. setClarifyAnswers([]) + // Unsent composer attachments would otherwise ride into the next chat's + // file context (availableAttachments merges sent + live), mirroring docs. + setAttachments([]) + setAttachNotice(null) sentAttachmentsRef.current = [] readAttachmentPathsRef.current.clear() inputRef.current?.focus()