mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-16 06:15:23 +00:00
revert: Reverts requested
This commit is contained in:
parent
7a80e60785
commit
55d3c07d85
2 changed files with 1 additions and 9 deletions
|
|
@ -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}
|
||||||
|
|
|
||||||
|
|
@ -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(() => {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue