mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-03-10 00:50:11 +01:00
allow /run for quick replies from other presets
/run otherPresetName.quickReplyLabel
This commit is contained in:
parent
6f610204d6
commit
d00861d913
@ -241,7 +241,15 @@ async function executeQuickReplyByName(name) {
|
||||
throw new Error('Quick Reply is disabled');
|
||||
}
|
||||
|
||||
const qr = extension_settings.quickReply.quickReplySlots.find(x => x.label == name);
|
||||
let qr = extension_settings.quickReply.quickReplySlots.find(x => x.label == name);
|
||||
|
||||
if (!qr && name.includes('.')) {
|
||||
const [presetName, qrName] = name.split('.');
|
||||
const preset = presets.find(x => x.name == presetName);
|
||||
if (preset) {
|
||||
qr = preset.quickReplySlots.find(x => x.label == qrName);
|
||||
}
|
||||
}
|
||||
|
||||
if (!qr) {
|
||||
throw new Error(`Quick Reply "${name}" not found`);
|
||||
|
Loading…
x
Reference in New Issue
Block a user