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

Method getMessageTextFromDOM

chat/components/ChatArea.js:874–885  ·  view source on GitHub ↗

* Gets visible text content from a message element in the DOM. * @param {string} messageId - The message ID * @returns {string|null} The text content or null

(messageId)

Source from the content-addressed store, hash-verified

872
873 detachQuickAskWindowForRender(sessionId) {
874 if (!this.shouldPreserveQuickAskWindowForRender(sessionId)) return null;
875 const panel = this.quickAsk.window;
876 if (panel.isConnected) {
877 panel.remove();
878 }
879 return panel;
880 }
881
882 restoreQuickAskWindowAfterRender(panel, sessionId) {
883 if (!panel || panel !== this.quickAsk.window) return;
884 if (!this.shouldPreserveQuickAskWindowForRender(sessionId)) return;
885
886 if (!panel.isConnected ||
887 panel.parentElement !== document.body) {
888 document.body.appendChild(panel);

Callers 1

handleCopyMessageMethod · 0.95

Calls 1

removeMethod · 0.45

Tested by

no test coverage detected