Hide message on streaming tool calls
| @@ -2932,6 +2932,13 @@ class StreamingProcessor { | |||
| 2932 | } | 2932 | } |
| 2933 | } | 2933 | } |
| 2934 | 2934 | ||
| 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 | |||
| 2935 | showMessageButtons(messageId) { | 2942 | showMessageButtons(messageId) { |
| 2936 | if (messageId == -1) { | 2943 | if (messageId == -1) { |
| 2937 | return; | 2944 | return; |
| @@ -2997,6 +3004,7 @@ class StreamingProcessor { | |||
| 2997 | } | 3004 | } |
| 2998 | else { | 3005 | else { |
| 2999 | this.#checkDomElements(messageId); | 3006 | this.#checkDomElements(messageId); |
| 3007 | this.#updateMessageBlockVisibility(); | ||
| 3000 | const currentTime = new Date(); | 3008 | const currentTime = new Date(); |
| 3001 | // Don't waste time calculating token count for streaming | 3009 | // Don't waste time calculating token count for streaming |
| 3002 | const currentTokenCount = isFinal && power_user.message_token_count_enabled ? getTokenCount(processedText, 0) : 0; | 3010 | const currentTokenCount = isFinal && power_user.message_token_count_enabled ? getTokenCount(processedText, 0) : 0; |