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

Method setupMemoryAutoIncludeToggle

chat/components/ChatInput.js:1547–1561  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1545 deletedSpan.parentNode.insertBefore(textNode, nextSibling);
1546 nextRange.setStart(textNode, 0);
1547 }
1548 } else {
1549 let prevSibling = deletedSpan.previousSibling;
1550 if (prevSibling?.nodeType === Node.TEXT_NODE) {
1551 nextRange.setStart(prevSibling, prevSibling.nodeValue?.length || 0);
1552 } else {
1553 const textNode = document.createTextNode('');
1554 deletedSpan.parentNode.insertBefore(textNode, deletedSpan);
1555 nextRange.setStart(textNode, textNode.nodeValue?.length || 0);
1556 }
1557 }
1558 nextRange.collapse(true);
1559 selection.removeAllRanges();
1560 selection.addRange(nextRange);
1561 }
1562
1563 showOriginalPromptPreview(originalText) {
1564 if (this.scrubberDiffState.originalTooltipVisible) return;

Callers 1

setupEventListenersMethod · 0.95

Calls 2

setMemoryAutoIncludeMethod · 0.80

Tested by

no test coverage detected