fix(sheets): drop staged attachments on New chat (#239)

Co-authored-by: Aniruddha Adak <aniruddhaadak80@users.noreply.github.com>
This commit is contained in:
ANIRUDDHA ADAK
2026-09-07 11:10:00 +08:00
committed by GitHub
co-authored by Aniruddha Adak
parent a612503ad6
commit 4e1c6330d1
+5
View File
@@ -1380,6 +1380,11 @@ export function App(): React.JSX.Element {
setAiBusy(false)
setChat([])
setHistoricChat([])
// Unsent composer attachments would otherwise ride into the next chat's
// file context (availableAttachments merges sent + live) — same as docs
// (#224) and slides. The typed draft itself is kept.
setAttachments([])
setAttachNotice(null)
sentAttachmentsRef.current = []
setPreview(null)
lazyPreviewRef.current = null