mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Switched even more to "generating" CSS
This commit is contained in:
@ -3161,15 +3161,11 @@ class StreamingProcessor {
|
|||||||
}
|
}
|
||||||
|
|
||||||
markUIGenStarted() {
|
markUIGenStarted() {
|
||||||
showStopButton();
|
deactivateSendButtons();
|
||||||
const chatElement = document.getElementById('chat');
|
|
||||||
chatElement.dataset.generating = 'true';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
markUIGenStopped() {
|
markUIGenStopped() {
|
||||||
hideStopButton();
|
activateSendButtons();
|
||||||
const chatElement = document.getElementById('chat');
|
|
||||||
delete chatElement.dataset.generating;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async onStartStreaming(text) {
|
async onStartStreaming(text) {
|
||||||
@ -6133,20 +6129,21 @@ function extractImageFromMessage(getMessage) {
|
|||||||
return { getMessage, image, title };
|
return { getMessage, image, title };
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A function mainly used to switch 'generating' state - setting it to false and activating the buttons again
|
||||||
|
*/
|
||||||
export function activateSendButtons() {
|
export function activateSendButtons() {
|
||||||
is_send_press = false;
|
is_send_press = false;
|
||||||
$('#send_but').removeClass('displayNone');
|
|
||||||
$('#mes_continue').removeClass('displayNone');
|
|
||||||
$('#mes_impersonate').removeClass('displayNone');
|
|
||||||
$('.mes_buttons:last').show();
|
|
||||||
hideStopButton();
|
hideStopButton();
|
||||||
|
delete document.body.dataset.generating;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A function mainly used to switch 'generating' state - setting it to true and deactivating the buttons
|
||||||
|
*/
|
||||||
export function deactivateSendButtons() {
|
export function deactivateSendButtons() {
|
||||||
$('#send_but').addClass('displayNone');
|
|
||||||
$('#mes_continue').addClass('displayNone');
|
|
||||||
$('#mes_impersonate').addClass('displayNone');
|
|
||||||
showStopButton();
|
showStopButton();
|
||||||
|
document.body.dataset.generating = 'true';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function resetChatState() {
|
export function resetChatState() {
|
||||||
@ -8786,7 +8783,6 @@ const swipe_right = () => {
|
|||||||
if (run_generate && !is_send_press && parseInt(chat[chat.length - 1]['swipe_id']) === chat[chat.length - 1]['swipes'].length) {
|
if (run_generate && !is_send_press && parseInt(chat[chat.length - 1]['swipe_id']) === chat[chat.length - 1]['swipes'].length) {
|
||||||
console.debug('caught here 2');
|
console.debug('caught here 2');
|
||||||
is_send_press = true;
|
is_send_press = true;
|
||||||
$('.mes_buttons:last').hide();
|
|
||||||
await Generate('swipe');
|
await Generate('swipe');
|
||||||
} else {
|
} else {
|
||||||
if (parseInt(chat[chat.length - 1]['swipe_id']) !== chat[chat.length - 1]['swipes'].length) {
|
if (parseInt(chat[chat.length - 1]['swipe_id']) !== chat[chat.length - 1]['swipes'].length) {
|
||||||
|
@ -434,7 +434,7 @@ input[type='checkbox']:focus-visible {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** Show "Thinking..." during generation, even if the reasoning is hidden by default */
|
/** Show "Thinking..." during generation, even if the reasoning is hidden by default */
|
||||||
#chat[data-generating="true"] .mes.reasoning[data-reasoning-state="hidden"] .mes_reasoning_details {
|
body[data-generating="true"] .last_mes.reasoning[data-reasoning-state="hidden"] .mes_reasoning_details {
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4336,8 +4336,11 @@ input[type="range"]::-webkit-slider-thumb {
|
|||||||
field-sizing: content;
|
field-sizing: content;
|
||||||
}
|
}
|
||||||
|
|
||||||
#chat[data-generating="true"] .last_mes .mes_buttons,
|
body[data-generating="true"] #send_but,
|
||||||
#chat[data-generating="true"] .last_mes .mes_reasoning_actions {
|
body[data-generating="true"] #mes_continue,
|
||||||
|
body[data-generating="true"] #mes_impersonate,
|
||||||
|
body[data-generating="true"] #chat .last_mes .mes_buttons,
|
||||||
|
body[data-generating="true"] #chat .last_mes .mes_reasoning_actions {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user