Use performFuzzySearch
| @@ -1,5 +1,4 @@ | ||
| 1 | 1 | import { |
| 2 | - Fuse, | |
| 3 | 2 | moment, |
| 4 | 3 | } from '../lib.js'; |
| 5 | 4 | import { chat, closeMessageEditor, event_types, eventSource, main_api, messageFormatting, saveChatConditional, saveChatDebounced, saveSettingsDebounced, substituteParams, syncMesToSwipe, updateMessageBlock } from '../script.js'; |
| @@ -8,7 +7,7 @@ import { getCurrentLocale, t, translate } from './i18n.js'; | ||
| 8 | 7 | import { MacrosParser } from './macros.js'; |
| 9 | 8 | import { chat_completion_sources, getChatCompletionModel, oai_settings } from './openai.js'; |
| 10 | 9 | import { Popup } from './popup.js'; |
| 11 | 10 | import { performFuzzySearch, power_user } from './power-user.js'; |
| 12 | 11 | import { SlashCommand } from './slash-commands/SlashCommand.js'; |
| 13 | 12 | import { ARGUMENT_TYPE, SlashCommandArgument, SlashCommandNamedArgument } from './slash-commands/SlashCommandArgument.js'; |
| 14 | 13 | import { commonEnumProviders, enumIcons } from './slash-commands/SlashCommandCommonEnumsProvider.js'; |
| @@ -91,7 +90,7 @@ export function extractReasoningFromData(data, { | ||
| 91 | 90 | mainApi = null, |
| 92 | 91 | ignoreShowThoughts = false, |
| 93 | 92 | textGenType = null, |
| 94 | 93 | chatCompletionSource = null, |
| 95 | 94 | } = {}) { |
| 96 | 95 | switch (mainApi ?? main_api) { |
| 97 | 96 | case 'textgenerationwebui': |
| @@ -781,8 +780,7 @@ function selectReasoningTemplateCallback(args, name) { | ||
| 781 | 780 | let foundName = templateNames.find(x => x.toLowerCase() === name.toLowerCase()); |
| 782 | 781 | |
| 783 | 782 | if (!foundName) { |
| 784 | 783 | const fuseresult = new FuseperformFuzzySearch('reasoning-templates', templateNames, [], name); |
| 785 | - const result = fuse.search(name); | |
| 786 | 784 | |
| 787 | 785 | if (result.length === 0) { |
| 788 | 786 | !quiet && toastr.warning(`Reasoning template "${name}" not found`); |