Hide message on streaming tool calls

90809852c2a7e1ecc133003b536d237908e1f498

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +8 -0Ignore whitespace
public/script.js+8 -0
@@ -2932,6 +2932,13 @@ class StreamingProcessor {
29322932 }
29332933 }
29342934
2935+ #updateMessageBlockVisibility() {
2936+ if (this.messageDom instanceof HTMLElement && Array.isArray(this.toolCalls) && this.toolCalls.length > 0) {
2937+ const shouldHide = ['', '...'].includes(this.result);
2938+ this.messageDom.classList.toggle('displayNone', shouldHide);
2939+ }
2940+ }
2941+
29352942 showMessageButtons(messageId) {
29362943 if (messageId == -1) {
29372944 return;
@@ -2997,6 +3004,7 @@ class StreamingProcessor {
29973004 }
29983005 else {
29993006 this.#checkDomElements(messageId);
3007+ this.#updateMessageBlockVisibility();
30003008 const currentTime = new Date();
30013009 // Don't waste time calculating token count for streaming
30023010 const currentTokenCount = isFinal && power_user.message_token_count_enabled ? getTokenCount(processedText, 0) : 0;