mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Add type conversion for /setvar commands with index
This commit is contained in:
@ -36,6 +36,8 @@ export const enumIcons = {
|
||||
|
||||
true: '✔️',
|
||||
false: '❌',
|
||||
null: '🚫',
|
||||
undefined: '❓',
|
||||
|
||||
// Value types
|
||||
boolean: '🔲',
|
||||
@ -230,4 +232,19 @@ export const commonEnumProviders = {
|
||||
enumTypes.enum, '💉');
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* Gets somewhat recognizable STscript types.
|
||||
*
|
||||
* @returns {SlashCommandEnumValue[]}
|
||||
*/
|
||||
types: () => [
|
||||
new SlashCommandEnumValue('string', null, enumTypes.type, enumIcons.string),
|
||||
new SlashCommandEnumValue('number', null, enumTypes.type, enumIcons.number),
|
||||
new SlashCommandEnumValue('boolean', null, enumTypes.type, enumIcons.boolean),
|
||||
new SlashCommandEnumValue('array', null, enumTypes.type, enumIcons.array),
|
||||
new SlashCommandEnumValue('object', null, enumTypes.type, enumIcons.dictionary),
|
||||
new SlashCommandEnumValue('null', null, enumTypes.type, enumIcons.null),
|
||||
new SlashCommandEnumValue('undefined', null, enumTypes.type, enumIcons.undefined),
|
||||
],
|
||||
};
|
||||
|
Reference in New Issue
Block a user