mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Remove the /inject when value is empty
This commit is contained in:
@ -338,13 +338,12 @@ function injectCallback(args, value) {
|
||||
chat_metadata.script_injects = {};
|
||||
}
|
||||
|
||||
chat_metadata.script_injects[id] = {
|
||||
value,
|
||||
position,
|
||||
depth,
|
||||
scan,
|
||||
role,
|
||||
};
|
||||
if (value) {
|
||||
const inject = { value, position, depth, scan, role };
|
||||
chat_metadata.script_injects[id] = inject;
|
||||
} else {
|
||||
delete chat_metadata.script_injects[id];
|
||||
}
|
||||
|
||||
setExtensionPrompt(prefixedId, value, position, depth, scan, role);
|
||||
saveMetadataDebounced();
|
||||
|
Reference in New Issue
Block a user