Add data attribute during generation - Fix reasoning buttons still appearing - Allow easier customization of HTML elements via CSS that appear during gen

58b8e7908d3e26128f813a7a38ed7caec68f4792

Wolfsblvt <wolfsblvt@gmail.com>

2 files changed, +14 -7Ignore whitespace
public/script.js+9 -7
@@ -3160,14 +3160,16 @@ class StreamingProcessor {
31603160 }
31613161 }
31623162
31633163 showMessageButtonsmarkUIGenStarted(messageId) {
31643164 showStopButton();
3165- $(`#chat .mes[mesid="${messageId}"] .mes_buttons`).css({ 'display': 'none' });
3165+ const chatElement = document.getElementById('chat');
3166+ chatElement.dataset.generating = 'true';
31663167 }
31673168
31683169 hideMessageButtonsmarkUIGenStopped(messageId) {
31693170 hideStopButton();
3170- $(`#chat .mes[mesid="${messageId}"] .mes_buttons`).css({ 'display': 'flex' });
3171+ const chatElement = document.getElementById('chat');
3172+ delete chatElement.dataset.generating;
31713173 }
31723174
31733175 async onStartStreaming(text) {
@@ -3180,7 +3182,7 @@ class StreamingProcessor {
31803182 await saveReply(this.type, text, true, '', [], '');
31813183 messageId = chat.length - 1;
31823184 this.#checkDomElements(messageId);
31833185 this.showMessageButtonsmarkUIGenStarted(messageId);
31843186 }
31853187 hideSwipeButtons();
31863188 scrollChatToBottom();
@@ -3268,7 +3270,7 @@ class StreamingProcessor {
32683270 }
32693271
32703272 async onFinishStreaming(messageId, text) {
32713273 this.hideMessageButtonsmarkUIGenStopped(this.messageId);
32723274 await this.onProgressStreaming(messageId, text, true);
32733275 addCopyToCodeBlocks($(`#chat .mes[mesid="${messageId}"]`));
32743276
@@ -3313,7 +3315,7 @@ class StreamingProcessor {
33133315 this.abortController.abort();
33143316 this.isStopped = true;
33153317
33163318 this.hideMessageButtonsmarkUIGenStopped(this.messageId);
33173319 generatedPromptCache = '';
33183320 unblockGeneration();
33193321
public/style.css+5 -0
@@ -4331,6 +4331,11 @@ input[type="range"]::-webkit-slider-thumb {
43314331 field-sizing: content;
43324332}
43334333
4334+#chat[data-generating="true"] .last_mes .mes_buttons,
4335+#chat[data-generating="true"] .last_mes .mes_reasoning_actions {
4336+ display: none;
4337+}
4338+
43344339#anchor_order {
43354340 margin-bottom: 15px;
43364341}