mirror of
https://github.com/open-webui/open-webui
synced 2025-02-23 05:38:41 +00:00
refac: placeholder performance
This commit is contained in:
parent
fa92abce31
commit
d9ee53b504
@ -42,6 +42,9 @@
|
||||
}
|
||||
|
||||
const getFilteredPrompts = (inputValue) => {
|
||||
if (inputValue.length > 500) {
|
||||
filteredPrompts = [];
|
||||
} else {
|
||||
const newFilteredPrompts = inputValue.trim()
|
||||
? fuse.search(inputValue.trim()).map((result) => result.item)
|
||||
: sortedPrompts;
|
||||
@ -51,6 +54,7 @@
|
||||
if (!arraysEqual(filteredPrompts, newFilteredPrompts)) {
|
||||
filteredPrompts = newFilteredPrompts;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
$: if (suggestionPrompts) {
|
||||
|
Loading…
Reference in New Issue
Block a user