mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-01-20 21:41:32 +01:00
Remove /inject's variable usage in 'id' argument
This commit is contained in:
parent
b8295ac8f5
commit
7cf5a4cb2e
@ -1267,13 +1267,9 @@ SlashCommandParser.addCommandObject(SlashCommand.fromProps({
|
|||||||
SlashCommandNamedArgument.fromProps({
|
SlashCommandNamedArgument.fromProps({
|
||||||
name: 'id',
|
name: 'id',
|
||||||
description: 'injection ID or variable name pointing to ID',
|
description: 'injection ID or variable name pointing to ID',
|
||||||
typeList: [ARGUMENT_TYPE.STRING, ARGUMENT_TYPE.VARIABLE_NAME],
|
typeList: [ARGUMENT_TYPE.STRING],
|
||||||
isRequired: true,
|
isRequired: true,
|
||||||
|
enumProvider: commonEnumProviders.injects,
|
||||||
enumProvider: () => [
|
|
||||||
...commonEnumProviders.injects(),
|
|
||||||
...commonEnumProviders.variables('all')().map(x => { x.description = 'Variable'; return x; }),
|
|
||||||
],
|
|
||||||
}),
|
}),
|
||||||
new SlashCommandNamedArgument(
|
new SlashCommandNamedArgument(
|
||||||
'position', 'injection position', [ARGUMENT_TYPE.STRING], false, false, 'after', ['before', 'after', 'chat'],
|
'position', 'injection position', [ARGUMENT_TYPE.STRING], false, false, 'after', ['before', 'after', 'chat'],
|
||||||
@ -1415,7 +1411,7 @@ function injectCallback(args, value) {
|
|||||||
'assistant': extension_prompt_roles.ASSISTANT,
|
'assistant': extension_prompt_roles.ASSISTANT,
|
||||||
};
|
};
|
||||||
|
|
||||||
const id = resolveVariable(args?.id);
|
const id = args?.id;
|
||||||
const ephemeral = isTrueBoolean(args?.ephemeral);
|
const ephemeral = isTrueBoolean(args?.ephemeral);
|
||||||
|
|
||||||
if (!id) {
|
if (!id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user