Merge branch 'staging' of https://github.com/Cohee1207/SillyTavern into staging

This commit is contained in:
RossAscends 2023-07-31 03:37:52 +09:00
commit 02667d3d1a
4 changed files with 25 additions and 7 deletions

View File

@ -3782,6 +3782,10 @@
<!-- popups live outside sheld to avoid blur conflicts -->
<div id="options" class="font-family-reset" style="display: none;">
<div class="options-content">
<a id="option_close_chat">
<i class="fa-lg fa-solid fa-times"></i>
<span data-i18n="Close chat">Close chat</span>
</a>
<a id="option_settings">
<i class="fa-lg fa-solid fa-cog"></i>
<span data-i18n="Toggle Panels">Toggle Panels</span>

View File

@ -7752,6 +7752,26 @@ $(document).ready(function () {
setTimeout(openMessageDelete, animation_duration);
}
else if (id == "option_close_chat") {
if (is_send_press == false) {
clearChat();
chat.length = 0;
resetSelectedGroup();
setCharacterId(undefined);
setCharacterName('');
setActiveCharacter(null);
setActiveGroup(null);
this_edit_mes_id = undefined;
chat_metadata = {};
selected_button = "characters";
$("#rm_button_selected_ch").children("h2").text('');
select_rm_characters();
sendSystemMessage(system_message_types.WELCOME);
} else {
toastr.info("Please stop the message generation first.");
}
}
else if (id === "option_settings") {
//var checkBox = document.getElementById("waifuMode");
var topBar = document.getElementById("top-bar");

View File

@ -1224,12 +1224,6 @@ async function doMesCut(_, text) {
return
}
//reject attempts to delete firstmes
if (text === '0') {
toastr.error('Cannot delete the First Message')
return
}
let mesIDToCut = Number(text).toFixed(0)
let mesToCut = $("#chat").find(`.mes[mesid=${mesIDToCut}]`)

View File

@ -609,7 +609,7 @@ hr {
display: flex;
column-gap: 10px;
cursor: pointer;
align-items: baseline;
}
#extensionsMenu>div,