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