mirror of
https://github.com/open-webui/open-webui.git
synced 2025-12-15 19:37:47 +01:00
refac: placeholder performance
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user