MCPcopy Create free account
hub / github.com/OpenAnonymity/oa-chat / removeFile

Method removeFile

chat/app.js:8844–8850  ·  view source on GitHub ↗
(index)

Source from the content-addressed store, hash-verified

8842 const messages = await chatDB.getSessionMessages(session.id);
8843 if (this.isSessionDeleted(session.id)) return;
8844 const messageIndex = messages.findIndex(m => m.id === messageId);
8845
8846 if (messageIndex === -1) return;
8847
8848 const message = messages[messageIndex];
8849
8850 // Update the message content and attachment set as one committed edit.
8851 message.content = newContent;
8852 message.files = draftFiles.length > 0 ? draftFiles : null;
8853 delete message.pendingFileObjects;

Callers

nothing calls this directly

Calls 3

renderFilePreviewsMethod · 0.95
updateFileCountBadgeMethod · 0.95
updateInputStateMethod · 0.95

Tested by

no test coverage detected