mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
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:
@ -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.',
|
||||
}));
|
||||
|
Reference in New Issue
Block a user