Switched even more to "generating" CSS

48dfee39ae35f942e4036be0eead22b886086bb0

Wolfsblvt <wolfsblvt@gmail.com>

2 files changed, +16 -17Ignore whitespace
public/script.js+10 -14
@@ -3161,15 +3161,11 @@ class StreamingProcessor {
3161 }3161 }
31623162
3163 markUIGenStarted() {3163 markUIGenStarted() {
3164 showStopButton();3164 deactivateSendButtons();
3165 const chatElement = document.getElementById('chat');
3166 chatElement.dataset.generating = 'true';
3167 }3165 }
31683166
3169 markUIGenStopped() {3167 markUIGenStopped() {
3170 hideStopButton();3168 activateSendButtons();
3171 const chatElement = document.getElementById('chat');
3172 delete chatElement.dataset.generating;
3173 }3169 }
31743170
3175 async onStartStreaming(text) {3171 async onStartStreaming(text) {
@@ -6133,20 +6129,21 @@ function extractImageFromMessage(getMessage) {
6133 return { getMessage, image, title };6129 return { getMessage, image, title };
6134}6130}
61356131
6132/**
6133 * A function mainly used to switch 'generating' state - setting it to false and activating the buttons again
6134 */
6136export function activateSendButtons() {6135export function activateSendButtons() {
6137 is_send_press = false;6136 is_send_press = false;
6138 $('#send_but').removeClass('displayNone');
6139 $('#mes_continue').removeClass('displayNone');
6140 $('#mes_impersonate').removeClass('displayNone');
6141 $('.mes_buttons:last').show();
6142 hideStopButton();6137 hideStopButton();
6138 delete document.body.dataset.generating;
6143}6139}
61446140
6141/**
6142 * A function mainly used to switch 'generating' state - setting it to true and deactivating the buttons
6143 */
6145export function deactivateSendButtons() {6144export function deactivateSendButtons() {
6146 $('#send_but').addClass('displayNone');
6147 $('#mes_continue').addClass('displayNone');
6148 $('#mes_impersonate').addClass('displayNone');
6149 showStopButton();6145 showStopButton();
6146 document.body.dataset.generating = 'true';
6150}6147}
61516148
6152export function resetChatState() {6149export function resetChatState() {
@@ -8786,7 +8783,6 @@ const swipe_right = () => {
8786 if (run_generate && !is_send_press && parseInt(chat[chat.length - 1]['swipe_id']) === chat[chat.length - 1]['swipes'].length) {8783 if (run_generate && !is_send_press && parseInt(chat[chat.length - 1]['swipe_id']) === chat[chat.length - 1]['swipes'].length) {
8787 console.debug('caught here 2');8784 console.debug('caught here 2');
8788 is_send_press = true;8785 is_send_press = true;
8789 $('.mes_buttons:last').hide();
8790 await Generate('swipe');8786 await Generate('swipe');
8791 } else {8787 } else {
8792 if (parseInt(chat[chat.length - 1]['swipe_id']) !== chat[chat.length - 1]['swipes'].length) {8788 if (parseInt(chat[chat.length - 1]['swipe_id']) !== chat[chat.length - 1]['swipes'].length) {
public/style.css+6 -3
@@ -434,7 +434,7 @@ input[type='checkbox']:focus-visible {
434}434}
435435
436/** Show "Thinking..." during generation, even if the reasoning is hidden by default */436/** Show "Thinking..." during generation, even if the reasoning is hidden by default */
437#chat[data-generating="true"] .mes.reasoning[data-reasoning-state="hidden"] .mes_reasoning_details {437body[data-generating="true"] .last_mes.reasoning[data-reasoning-state="hidden"] .mes_reasoning_details {
438 display: block;438 display: block;
439}439}
440440
@@ -4336,8 +4336,11 @@ input[type="range"]::-webkit-slider-thumb {
4336 field-sizing: content;4336 field-sizing: content;
4337}4337}
43384338
4339#chat[data-generating="true"] .last_mes .mes_buttons,4339body[data-generating="true"] #send_but,
4340#chat[data-generating="true"] .last_mes .mes_reasoning_actions {4340body[data-generating="true"] #mes_continue,
4341body[data-generating="true"] #mes_impersonate,
4342body[data-generating="true"] #chat .last_mes .mes_buttons,
4343body[data-generating="true"] #chat .last_mes .mes_reasoning_actions {
4341 display: none;4344 display: none;
4342}4345}
43434346