diff --git a/public/scripts/extensions/expressions/index.js b/public/scripts/extensions/expressions/index.js index eaed37355..98615b6d8 100644 --- a/public/scripts/extensions/expressions/index.js +++ b/public/scripts/extensions/expressions/index.js @@ -2051,7 +2051,7 @@ function migrateSettings() { const isCustom = extension_settings.expressions.custom?.includes(expression); return new SlashCommandEnumValue(expression, null, isCustom ? enumTypes.name : enumTypes.enum, isCustom ? 'C' : 'D'); }), - } + }; SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'sprite', @@ -2088,7 +2088,7 @@ function migrateSettings() { description: 'character name', typeList: [ARGUMENT_TYPE.STRING], isRequired: true, - enumProvider: commonEnumProviders.characters(), + enumProvider: commonEnumProviders.characters('character'), }), ], helpString: 'Returns the last set sprite / expression for the named character.', diff --git a/public/scripts/slash-commands.js b/public/scripts/slash-commands.js index ef164883e..ed9618721 100644 --- a/public/scripts/slash-commands.js +++ b/public/scripts/slash-commands.js @@ -213,7 +213,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'at', description: 'position to insert the message', typeList: [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.VARIABLE_NAME], - enumProvider: commonEnumProviders.messages({ allowIdAfter: true, allowVars: true }) + enumProvider: commonEnumProviders.messages({ allowIdAfter: true, allowVars: true }), }), ], unnamedArgumentList: [ @@ -267,7 +267,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'at', description: 'position to insert the message', typeList: [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.VARIABLE_NAME], - enumProvider: commonEnumProviders.messages({ allowIdAfter: true, allowVars: true }) + enumProvider: commonEnumProviders.messages({ allowIdAfter: true, allowVars: true }), }), ], unnamedArgumentList: [ @@ -452,7 +452,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'at', description: 'position to insert the message', typeList: [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.VARIABLE_NAME], - enumProvider: commonEnumProviders.messages({ allowIdAfter: true, allowVars: true }) + enumProvider: commonEnumProviders.messages({ allowIdAfter: true, allowVars: true }), }), SlashCommandNamedArgument.fromProps({ name: 'name', @@ -461,7 +461,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ defaultValue: '{{user}}', enumProvider: () => [ ...commonEnumProviders.characters('character')(), - ...commonEnumProviders.variables('all')().map(x => { x.description = 'Variable'; return x; }) + ...commonEnumProviders.variables('all')().map(x => { x.description = 'Variable'; return x; }), ], }), ], @@ -1302,7 +1302,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ ...commonEnumProviders.injects(), ...commonEnumProviders.variables('all')().map(x => { x.description = 'Variable'; return x; }), ], - }) + }), ], callback: flushInjectsCallback, helpString: 'Removes a script injection for the current chat. If no ID is provided, removes all script injections.', @@ -1310,7 +1310,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ name: 'tokens', callback: (_, text) => { - if (text instanceof SlashCommandClosure || Array.isArray(text)) throw new Error('Unnamed argument cannot be a closure for command /tokens') + if (text instanceof SlashCommandClosure || Array.isArray(text)) throw new Error('Unnamed argument cannot be a closure for command /tokens'); return getTokenCountAsync(text).then(count => String(count)); }, returns: 'number of tokens', @@ -1359,7 +1359,7 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({ const promptManager = setupChatCompletionPromptManager(oai_settings); const prompts = promptManager.serviceSettings.prompts; return prompts.map(prompt => new SlashCommandEnumValue(prompt.name, prompt.identifier, enumTypes.enum)); - } + }, }), ], unnamedArgumentList: [