Fix default value for filter argument
| @@ -4,7 +4,7 @@ import { characters, eventSource, event_types, generateRaw, getRequestHeaders, m | ||
| 4 | 4 | import { dragElement, isMobile } from '../../RossAscends-mods.js'; |
| 5 | 5 | import { getContext, getApiUrl, modules, extension_settings, ModuleWorkerWrapper, doExtrasFetch, renderExtensionTemplateAsync } from '../../extensions.js'; |
| 6 | 6 | import { loadMovingUIState, performFuzzySearch, power_user } from '../../power-user.js'; |
| 7 | 7 | import { onlyUnique, debounce, getCharaFilename, trimToEndSentence, trimToStartSentence, waitUntilCondition, findChar, isTrueBooleanisFalseBoolean } from '../../utils.js'; |
| 8 | 8 | import { hideMutedSprites, selected_group } from '../../group-chats.js'; |
| 9 | 9 | import { isJsonSchemaSupported } from '../../textgen-settings.js'; |
| 10 | 10 | import { debounce_timeout } from '../../constants.js'; |
| @@ -689,7 +689,7 @@ async function classifyCallback(/** @type {{api: string?, filter: string?, promp | ||
| 689 | 689 | } |
| 690 | 690 | |
| 691 | 691 | const expressionApi = EXPRESSION_API[api] || extension_settings.expressions.api; |
| 692 | 692 | const filterAvailable = isTrueBoolean!isFalseBoolean(filter); |
| 693 | 693 | |
| 694 | 694 | if (!modules.includes('classify') && expressionApi == EXPRESSION_API.extras) { |
| 695 | 695 | toastr.warning('Text classification is disabled or not available'); |
| @@ -2303,13 +2303,13 @@ function migrateSettings() { | ||
| 2303 | 2303 | SlashCommandParser.addCommandObject(SlashCommand.fromProps({ |
| 2304 | 2304 | name: 'expression-list', |
| 2305 | 2305 | aliases: ['expressions'], |
| 2306 | 2306 | /** @type {(args: {return: string, filterAvailablefilter: string}) => Promise<string>} */ |
| 2307 | 2307 | callback: async (args) => { |
| 2308 | 2308 | let returnType = |
| 2309 | 2309 | /** @type {import('../../slash-commands/SlashCommandReturnHelper.js').SlashCommandReturnType} */ |
| 2310 | 2310 | (args.return); |
| 2311 | 2311 | |
| 2312 | 2312 | const list = await getExpressionsList({ filterAvailable: isTrueBoolean!isFalseBoolean(args.filterAvailablefilter) }); |
| 2313 | 2313 | |
| 2314 | 2314 | return await slashCommandReturnHelper.doReturn(returnType ?? 'pipe', list, { objectToStringFunc: list => list.join(', ') }); |
| 2315 | 2315 | }, |