mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Switch /input command definition to fromProps
This commit is contained in:
@ -1287,26 +1287,42 @@ export function initDefaultSlashCommands() {
|
|||||||
callback: inputCallback,
|
callback: inputCallback,
|
||||||
returns: 'user input',
|
returns: 'user input',
|
||||||
namedArgumentList: [
|
namedArgumentList: [
|
||||||
new SlashCommandNamedArgument(
|
SlashCommandNamedArgument.fromProps({
|
||||||
'default', 'default value of the input field', [ARGUMENT_TYPE.STRING], false, false, '"string"',
|
name: 'default',
|
||||||
),
|
description: 'default value of the input field',
|
||||||
new SlashCommandNamedArgument(
|
typeList: [ARGUMENT_TYPE.STRING],
|
||||||
'large', 'show large input field', [ARGUMENT_TYPE.BOOLEAN], false, false, 'off', commonEnumProviders.boolean('onOff')(),
|
}),
|
||||||
),
|
SlashCommandNamedArgument.fromProps({
|
||||||
new SlashCommandNamedArgument(
|
name: 'large',
|
||||||
'wide', 'show wide input field', [ARGUMENT_TYPE.BOOLEAN], false, false, 'off', commonEnumProviders.boolean('onOff')(),
|
description: 'show large input field',
|
||||||
),
|
typeList: [ARGUMENT_TYPE.BOOLEAN],
|
||||||
new SlashCommandNamedArgument(
|
defaultValue: 'off',
|
||||||
'okButton', 'text for the ok button', [ARGUMENT_TYPE.STRING], false,
|
enumList: commonEnumProviders.boolean('onOff')(),
|
||||||
),
|
}),
|
||||||
new SlashCommandNamedArgument(
|
SlashCommandNamedArgument.fromProps({
|
||||||
'rows', 'number of rows for the input field', [ARGUMENT_TYPE.NUMBER], false,
|
name: 'wide',
|
||||||
),
|
description: 'show wide input field',
|
||||||
|
typeList: [ARGUMENT_TYPE.BOOLEAN],
|
||||||
|
defaultValue: 'off',
|
||||||
|
enumList: commonEnumProviders.boolean('onOff')(),
|
||||||
|
}),
|
||||||
|
SlashCommandNamedArgument.fromProps({
|
||||||
|
name: 'okButton',
|
||||||
|
description: 'text for the ok button',
|
||||||
|
typeList: [ARGUMENT_TYPE.STRING],
|
||||||
|
defaultValue: 'Ok',
|
||||||
|
}),
|
||||||
|
SlashCommandNamedArgument.fromProps({
|
||||||
|
name: 'rows',
|
||||||
|
description: 'number of rows for the input field',
|
||||||
|
typeList: [ARGUMENT_TYPE.NUMBER],
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
unnamedArgumentList: [
|
unnamedArgumentList: [
|
||||||
new SlashCommandArgument(
|
SlashCommandArgument.fromProps({
|
||||||
'text to display', [ARGUMENT_TYPE.STRING], false,
|
description: 'text to display',
|
||||||
),
|
typeList: [ARGUMENT_TYPE.STRING],
|
||||||
|
}),
|
||||||
],
|
],
|
||||||
helpString: `
|
helpString: `
|
||||||
<div>
|
<div>
|
||||||
|
Reference in New Issue
Block a user