mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
move closechat/togglepanels to slashcommands
This commit is contained in:
@ -147,7 +147,7 @@
|
|||||||
<i data-preset-manager-update="kobold" class="menu_button fa-solid fa-save" title="Update current preset" data-i18n="[title]Update current preset"></i>
|
<i data-preset-manager-update="kobold" class="menu_button fa-solid fa-save" title="Update current preset" data-i18n="[title]Update current preset"></i>
|
||||||
<i data-preset-manager-new="kobold" class="menu_button fa-solid fa-plus" title="Create new preset" data-i18n="[title]Create new preset"></i>
|
<i data-preset-manager-new="kobold" class="menu_button fa-solid fa-plus" title="Create new preset" data-i18n="[title]Create new preset"></i>
|
||||||
<i data-preset-manager-import="kobold" class="menu_button fa-solid fa-upload" title="Import preset" data-i18n="[title]Import preset"></i>
|
<i data-preset-manager-import="kobold" class="menu_button fa-solid fa-upload" title="Import preset" data-i18n="[title]Import preset"></i>
|
||||||
<i data-preset-manager-export="kobold" class="menu_button fa-solid fa-download"title="Export preset" data-i18n="[title]Export preset"></i>
|
<i data-preset-manager-export="kobold" class="menu_button fa-solid fa-download" title="Export preset" data-i18n="[title]Export preset"></i>
|
||||||
<i data-preset-manager-delete="kobold" class="menu_button fa-solid fa-trash-can" title="Delete the preset" data-i18n="[title]Delete the preset"></i>
|
<i data-preset-manager-delete="kobold" class="menu_button fa-solid fa-trash-can" title="Delete the preset" data-i18n="[title]Delete the preset"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -187,7 +187,7 @@
|
|||||||
<i data-preset-manager-update="textgenerationwebui" class="menu_button fa-solid fa-save" title="Update current preset" data-i18n="[title]Update current preset"></i>
|
<i data-preset-manager-update="textgenerationwebui" class="menu_button fa-solid fa-save" title="Update current preset" data-i18n="[title]Update current preset"></i>
|
||||||
<i data-preset-manager-new="textgenerationwebui" class="menu_button fa-solid fa-plus" title="Create new preset" data-i18n="[title]Create new preset"></i>
|
<i data-preset-manager-new="textgenerationwebui" class="menu_button fa-solid fa-plus" title="Create new preset" data-i18n="[title]Create new preset"></i>
|
||||||
<i data-preset-manager-import="textgenerationwebui" class="menu_button fa-solid fa-upload" title="Import preset" data-i18n="[title]Import preset"></i>
|
<i data-preset-manager-import="textgenerationwebui" class="menu_button fa-solid fa-upload" title="Import preset" data-i18n="[title]Import preset"></i>
|
||||||
<i data-preset-manager-export="textgenerationwebui" class="menu_button fa-solid fa-download"title="Export preset" data-i18n="[title]Export preset"></i>
|
<i data-preset-manager-export="textgenerationwebui" class="menu_button fa-solid fa-download" title="Export preset" data-i18n="[title]Export preset"></i>
|
||||||
<i data-preset-manager-delete="textgenerationwebui" class="menu_button fa-solid fa-trash-can" title="Delete the preset" data-i18n="[title]Delete the preset"></i>
|
<i data-preset-manager-delete="textgenerationwebui" class="menu_button fa-solid fa-trash-can" title="Delete the preset" data-i18n="[title]Delete the preset"></i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -2145,14 +2145,12 @@
|
|||||||
Match whole words
|
Match whole words
|
||||||
</small>
|
</small>
|
||||||
</label>
|
</label>
|
||||||
<label title="Alert if your world info is greater than the allocated budget."
|
<label title="Alert if your world info is greater than the allocated budget." data-i18n="[title]Alert if your world info is greater than the allocated budget." class="checkbox_label">
|
||||||
data-i18n="[title]Alert if your world info is greater than the allocated budget."
|
<input id="world_info_overflow_alert" type="checkbox" />
|
||||||
class="checkbox_label">
|
<small data-i18n="Alert On Overflow">
|
||||||
<input id="world_info_overflow_alert" type="checkbox" />
|
Alert On Overflow
|
||||||
<small data-i18n="Alert On Overflow">
|
</small>
|
||||||
Alert On Overflow
|
</label>
|
||||||
</small>
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -3782,11 +3780,11 @@
|
|||||||
<!-- popups live outside sheld to avoid blur conflicts -->
|
<!-- popups live outside sheld to avoid blur conflicts -->
|
||||||
<div id="options" class="font-family-reset" style="display: none;">
|
<div id="options" class="font-family-reset" style="display: none;">
|
||||||
<div class="options-content">
|
<div class="options-content">
|
||||||
<a id="option_close_chat">
|
<a id="option_close_chat" class="displayNone">
|
||||||
<i class="fa-lg fa-solid fa-times"></i>
|
<i class="fa-lg fa-solid fa-times"></i>
|
||||||
<span data-i18n="Close chat">Close chat</span>
|
<span data-i18n="Close chat">Close chat</span>
|
||||||
</a>
|
</a>
|
||||||
<a id="option_settings">
|
<a id="option_settings" class="displayNone">
|
||||||
<i class="fa-lg fa-solid fa-cog"></i>
|
<i class="fa-lg fa-solid fa-cog"></i>
|
||||||
<span data-i18n="Toggle Panels">Toggle Panels</span>
|
<span data-i18n="Toggle Panels">Toggle Panels</span>
|
||||||
</a>
|
</a>
|
||||||
@ -3895,4 +3893,4 @@
|
|||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
|
|
||||||
</html>
|
</html>
|
@ -2520,13 +2520,13 @@ async function Generate(type, { automatic_trigger, force_name2, resolve, reject,
|
|||||||
|
|
||||||
if (i === arrMes.length - 1 && !item.trim().startsWith(name1 + ":")) {
|
if (i === arrMes.length - 1 && !item.trim().startsWith(name1 + ":")) {
|
||||||
//if (textareaText == "") {
|
//if (textareaText == "") {
|
||||||
// Cohee: I think this was added to allow the model to continue
|
// Cohee: I think this was added to allow the model to continue
|
||||||
// where it left off by removing the trailing newline at the end
|
// where it left off by removing the trailing newline at the end
|
||||||
// that was added by chat2 generator. This causes problems with
|
// that was added by chat2 generator. This causes problems with
|
||||||
// instruct mode that could not have a trailing newline. So we're
|
// instruct mode that could not have a trailing newline. So we're
|
||||||
// removing a newline ONLY at the end of the string if it exists.
|
// removing a newline ONLY at the end of the string if it exists.
|
||||||
item = item.replace(/\n?$/, '');
|
item = item.replace(/\n?$/, '');
|
||||||
//item = item.substr(0, item.length - 1);
|
//item = item.substr(0, item.length - 1);
|
||||||
//}
|
//}
|
||||||
}
|
}
|
||||||
if (is_pygmalion && !isInstruct) {
|
if (is_pygmalion && !isInstruct) {
|
||||||
@ -6954,6 +6954,10 @@ function doCharListDisplaySwitch() {
|
|||||||
updateVisibleDivs('#rm_print_characters_block', true);
|
updateVisibleDivs('#rm_print_characters_block', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function doCloseChat() {
|
||||||
|
$("#option_close_chat").trigger('click')
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Function to handle the deletion of a character, given a specific popup type and character ID.
|
* Function to handle the deletion of a character, given a specific popup type and character ID.
|
||||||
* If popup type equals "del_ch", it will proceed with deletion otherwise it will exit the function.
|
* If popup type equals "del_ch", it will proceed with deletion otherwise it will exit the function.
|
||||||
@ -7020,6 +7024,10 @@ export async function deleteCharacter(name, avatar) {
|
|||||||
saveSettingsDebounced();
|
saveSettingsDebounced();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function doTogglePanels() {
|
||||||
|
$("#option_settings").trigger('click')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function () {
|
||||||
|
|
||||||
@ -7034,6 +7042,9 @@ $(document).ready(function () {
|
|||||||
registerSlashCommand('api', connectAPISlash, [], "(kobold, horde, novel, ooba, oai, claude, windowai) – connect to an API", true, true);
|
registerSlashCommand('api', connectAPISlash, [], "(kobold, horde, novel, ooba, oai, claude, windowai) – connect to an API", true, true);
|
||||||
registerSlashCommand('impersonate', doImpersonate, ['imp'], "- calls an impersonation response", true, true);
|
registerSlashCommand('impersonate', doImpersonate, ['imp'], "- calls an impersonation response", true, true);
|
||||||
registerSlashCommand('delchat', doDeleteChat, [], "- deletes the current chat", true, true);
|
registerSlashCommand('delchat', doDeleteChat, [], "- deletes the current chat", true, true);
|
||||||
|
registerSlashCommand('closechat', doCloseChat, [], "- closes the current chat", true, true);
|
||||||
|
registerSlashCommand('panels', doTogglePanels, ['togglepanels'], "- toggle UI panels on/off", true, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
|
Reference in New Issue
Block a user