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

@ -2883,7 +2883,7 @@ function setAvgBG() {
return `rgba(${rNew.toFixed(0)}, ${gNew.toFixed(0)}, ${bNew.toFixed(0)}, 1)`;
}
return '';
}
async function setThemeCallback(_, text) {
@ -3887,9 +3887,11 @@ $(document).ready(() => {
name: 'random',
callback: doRandomChat,
unnamedArgumentList: [
new SlashCommandArgument(
'optional tag name', [ARGUMENT_TYPE.STRING], false,
),
SlashCommandArgument.fromProps({
description: 'optional tag name',
typeList: [ARGUMENT_TYPE.STRING],
enumProvider: () => tags.filter(tag => Object.values(tag_map).some(x => x.includes(tag.id))).map(tag => new SlashCommandEnumValue(tag.name)),
}),
],
helpString: 'Start a new chat with a random character. If an argument is provided, only considers characters that have the specified tag.',
}));