Fix local variable name

This commit is contained in:
Cohee 2024-09-22 20:00:09 +03:00
parent 3812e3bdcb
commit 5b65448a70

View File

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