Rework slash command enum values pt.2

- Fix jsconfig module resolution for imports in frontend scripts
- Add file with common slash command enum values
This commit is contained in:
Wolfsblvt
2024-06-17 03:30:52 +02:00
parent 34e8cf476a
commit 6f7ef25369
13 changed files with 661 additions and 351 deletions

View File

@ -70,6 +70,7 @@ import { saveLogprobsForActiveMessage } from './logprobs.js';
import { SlashCommandParser } from './slash-commands/SlashCommandParser.js';
import { SlashCommand } from './slash-commands/SlashCommand.js';
import { ARGUMENT_TYPE, SlashCommandArgument } from './slash-commands/SlashCommandArgument.js';
import { SlashCommandEnumValue } from './slash-commands/SlashCommandEnumValue.js';
export {
openai_messages_count,
@ -4616,9 +4617,12 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({
returns: 'current proxy',
namedArgumentList: [],
unnamedArgumentList: [
new SlashCommandArgument(
'name', [ARGUMENT_TYPE.STRING], true,
),
SlashCommandArgument.fromProps({
description: 'name',
typeList: [ARGUMENT_TYPE.STRING],
isRequired: true,
enumProvider: () => proxies.map(preset => new SlashCommandEnumValue(preset.name)),
}),
],
helpString: 'Sets a proxy preset by name.',
}));