revert: Reverts requested

This commit is contained in:
silentoplayz 2025-08-04 08:42:48 -04:00
parent 7a80e60785
commit 55d3c07d85
2 changed files with 1 additions and 9 deletions

View file

@ -283,7 +283,7 @@
if (chatInput) { if (chatInput) {
if ($settings?.richTextInput ?? true) { if ($settings?.richTextInput ?? true) {
word = getWordAtDocPosFromRichText(); word = chatInputElement?.getWordAtDocPos();
} else { } else {
const cursor = chatInput ? chatInput.selectionStart : prompt.length; const cursor = chatInput ? chatInput.selectionStart : prompt.length;
word = getWordAtCursor(prompt, cursor); word = getWordAtCursor(prompt, cursor);
@ -384,8 +384,6 @@
let chatInputContainerElement; let chatInputContainerElement;
let chatInputElement; let chatInputElement;
let getWordAtDocPosFromRichText = () => '';
let filesInputElement; let filesInputElement;
let commandsElement; let commandsElement;
@ -1094,9 +1092,6 @@
prompt = e.md; prompt = e.md;
command = getCommand(); command = getCommand();
}} }}
getWordAtDocPosCallback={(func) => {
getWordAtDocPosFromRichText = func;
}}
json={true} json={true}
messageInput={true} messageInput={true}
showFormattingButtons={false} showFormattingButtons={false}

View file

@ -168,7 +168,6 @@
}); });
}; };
export let getWordAtDocPosCallback = (func) => {};
export let onSelectionUpdate = (e) => {}; export let onSelectionUpdate = (e) => {};
export let id = ''; export let id = '';
@ -1209,8 +1208,6 @@
if (messageInput) { if (messageInput) {
selectTemplate(); selectTemplate();
} }
getWordAtDocPosCallback(getWordAtDocPos);
}); });
onDestroy(() => { onDestroy(() => {