This commit is contained in:
Timothy Jaeryang Baek
2026-07-15 23:55:31 -04:00
parent 2b8ef9340e
commit e389874fe2
2 changed files with 26 additions and 13 deletions
@@ -143,22 +143,10 @@
let noteChatCreating = false;
let selectedContent = null;
let noteChatFiles = [];
let noteAttachmentFiles = [];
let pendingNoteEvent = null;
let pendingNoteEventTimer = null;
let lastLocalContentChangeAt = 0;
$: {
const seen = new Set();
noteChatFiles = note
? (note?.data?.files ?? files ?? []).filter((file) => {
const key = `${file?.type ?? ''}:${file?.id ?? file?.url ?? file?.name ?? ''}`;
if (seen.has(key)) return false;
seen.add(key);
return true;
})
: [];
}
$: noteAttachmentFiles = (files ?? []).filter(
(file) => file?.type !== 'image' && !(file?.content_type ?? '').startsWith('image/')
);
@@ -1482,7 +1470,6 @@ ${content}
chatIdProp={noteChatId ?? ''}
embeddedChats={noteChats}
embeddedDraftKey={noteChatDraftKey}
initialFiles={noteChatFiles}
selectedText={selectedContent?.text ?? ''}
onInsertToNote={insertHandler}
onNewEmbeddedChat={createNoteChat}