mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
add /impersonate (aka /imp)
This commit is contained in:
@@ -6786,6 +6786,11 @@ async function importFromURL(items, files) {
|
||||
}
|
||||
}
|
||||
|
||||
async function doImpersonate() {
|
||||
$('#send_textarea').val('');
|
||||
$("#option_impersonate").trigger('click', { fromSlashCommand: true })
|
||||
}
|
||||
|
||||
const isPwaMode = window.navigator.standalone;
|
||||
if (isPwaMode) { $("body").addClass('PWA') }
|
||||
|
||||
@@ -6800,6 +6805,8 @@ $(document).ready(function () {
|
||||
|
||||
registerSlashCommand('dupe', DupeChar, [], "– duplicates the currently selected character", true, true);
|
||||
registerSlashCommand('api', connectAPISlash, [], "(kobold, horde, novel, ooba, oai, claude, poe, windowai) – connect to an API", true, true);
|
||||
registerSlashCommand('impersonate', doImpersonate, ['imp'], "- calls an impersonation response", true, true);
|
||||
|
||||
|
||||
setTimeout(function () {
|
||||
$("#groupControlsToggle").trigger('click');
|
||||
@@ -7531,7 +7538,7 @@ $(document).ready(function () {
|
||||
}
|
||||
|
||||
else if (id == "option_impersonate") {
|
||||
if (is_send_press == false) {
|
||||
if (is_send_press == false || fromSlashCommand) {
|
||||
is_send_press = true;
|
||||
Generate("impersonate");
|
||||
}
|
||||
|
Reference in New Issue
Block a user