mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Linter's gonna lint…
This commit is contained in:
committed by
GitHub
parent
cc54158f09
commit
5a2311b806
@@ -786,7 +786,7 @@ router.post('/search', validateAvatarUrlMiddleware, function (request, response)
|
|||||||
// Search through title and messages of the chat
|
// Search through title and messages of the chat
|
||||||
const fragments = query.trim().toLowerCase().split(/\s+/).filter(x => x);
|
const fragments = query.trim().toLowerCase().split(/\s+/).filter(x => x);
|
||||||
const text = [path.parse(chatFile.path).name,
|
const text = [path.parse(chatFile.path).name,
|
||||||
...messages.map(message => message?.mes)].join("\n").toLowerCase();
|
...messages.map(message => message?.mes)].join('\n').toLowerCase();
|
||||||
const hasMatch = fragments.every(fragment => (text).includes(fragment));
|
const hasMatch = fragments.every(fragment => (text).includes(fragment));
|
||||||
|
|
||||||
if (hasMatch) {
|
if (hasMatch) {
|
||||||
|
Reference in New Issue
Block a user