mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Rename type => cast
This commit is contained in:
@ -909,8 +909,8 @@ export function registerVariableCommands() {
|
|||||||
'index', 'list index', [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.STRING], false,
|
'index', 'list index', [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.STRING], false,
|
||||||
),
|
),
|
||||||
SlashCommandNamedArgument.fromProps({
|
SlashCommandNamedArgument.fromProps({
|
||||||
name: 'type',
|
name: 'cast',
|
||||||
description: 'type of the value when used with index',
|
description: 'change the type of the value when used with index',
|
||||||
forceEnum: true,
|
forceEnum: true,
|
||||||
enumProvider: commonEnumProviders.types,
|
enumProvider: commonEnumProviders.types,
|
||||||
isRequired: false,
|
isRequired: false,
|
||||||
@ -925,7 +925,7 @@ export function registerVariableCommands() {
|
|||||||
helpString: `
|
helpString: `
|
||||||
<div>
|
<div>
|
||||||
Set a local variable value and pass it down the pipe. The <code>index</code> argument is optional.
|
Set a local variable value and pass it down the pipe. The <code>index</code> argument is optional.
|
||||||
To perform a type conversion when using <code>index</code>, use the <code>type</code> argument.
|
To convert the value to a specific JSON type when using <code>index</code>, use the <code>case</code> argument.
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong>Example:</strong>
|
<strong>Example:</strong>
|
||||||
@ -1035,8 +1035,8 @@ export function registerVariableCommands() {
|
|||||||
'index', 'list index', [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.STRING], false,
|
'index', 'list index', [ARGUMENT_TYPE.NUMBER, ARGUMENT_TYPE.STRING], false,
|
||||||
),
|
),
|
||||||
SlashCommandNamedArgument.fromProps({
|
SlashCommandNamedArgument.fromProps({
|
||||||
name: 'type',
|
name: 'cast',
|
||||||
description: 'type of the value when used with index',
|
description: 'change the type of the value when used with index',
|
||||||
forceEnum: true,
|
forceEnum: true,
|
||||||
enumProvider: commonEnumProviders.types,
|
enumProvider: commonEnumProviders.types,
|
||||||
isRequired: false,
|
isRequired: false,
|
||||||
@ -1051,7 +1051,7 @@ export function registerVariableCommands() {
|
|||||||
helpString: `
|
helpString: `
|
||||||
<div>
|
<div>
|
||||||
Set a global variable value and pass it down the pipe. The <code>index</code> argument is optional.
|
Set a global variable value and pass it down the pipe. The <code>index</code> argument is optional.
|
||||||
To perform a type conversion when using <code>index</code>, use the <code>type</code> argument.
|
To convert the value to a specific JSON type when using <code>index</code>, use the <code>cast</code> argument.
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong>Example:</strong>
|
<strong>Example:</strong>
|
||||||
@ -2062,8 +2062,8 @@ export function registerVariableCommands() {
|
|||||||
false, // acceptsMultiple
|
false, // acceptsMultiple
|
||||||
),
|
),
|
||||||
SlashCommandNamedArgument.fromProps({
|
SlashCommandNamedArgument.fromProps({
|
||||||
name: 'type',
|
name: 'cast',
|
||||||
description: 'type of the value when used with index',
|
description: 'change the type of the value when used with index',
|
||||||
forceEnum: true,
|
forceEnum: true,
|
||||||
enumProvider: commonEnumProviders.types,
|
enumProvider: commonEnumProviders.types,
|
||||||
isRequired: false,
|
isRequired: false,
|
||||||
@ -2088,7 +2088,8 @@ export function registerVariableCommands() {
|
|||||||
splitUnnamedArgumentCount: 1,
|
splitUnnamedArgumentCount: 1,
|
||||||
helpString: `
|
helpString: `
|
||||||
<div>
|
<div>
|
||||||
Get or set a variable.
|
Get or set a variable. Use <code>index</code> to access elements of a list or dictionary.
|
||||||
|
To convert the value to a specific JSON type when using with <code>index</code>, use the <code>cast</code> argument.
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<strong>Examples:</strong>
|
<strong>Examples:</strong>
|
||||||
|
Reference in New Issue
Block a user