Fix local variable name

This commit is contained in:
Cohee 2024-09-22 20:00:09 +03:00
parent 3812e3bdcb
commit 5b65448a70
1 changed files with 3 additions and 3 deletions

View File

@ -126,11 +126,11 @@ function selectSystemPromptCallback(args, name) {
}
const quiet = isTrueBoolean(args?.quiet);
const instructNames = system_prompts.map(preset => preset.name);
let foundName = instructNames.find(x => x.toLowerCase() === name.toLowerCase());
const systemPromptNames = system_prompts.map(preset => preset.name);
let foundName = systemPromptNames.find(x => x.toLowerCase() === name.toLowerCase());
if (!foundName) {
const fuse = new Fuse(instructNames);
const fuse = new Fuse(systemPromptNames);
const result = fuse.search(name);
if (result.length === 0) {