Update frontend/js/main.js
Browse files17 unmodified lines181920212223284 unmodified lines30830931031131231321 unmodified lines33533633733833934034134234334434534634734834935035135215 unmodified lines36836937037137237317 unmodified linesthis.isStreaming = false;this.currentMode = null;this.currentResponseElement = null;this.isReasoningMode = false;this._clientTools = {};284 unmodified linesthis.isStreaming = false;this.currentMode = null;this.currentResponseElement = null;this.uiController.updateUIForStreaming(false);this.uiController.hideVideoPreview();21 unmodified linesconst welcome = messagesContainer.querySelector('.system-welcome');if (welcome) welcome.remove();const userElement = document.createElement('div');userElement.className = 'message-row user-message';userElement.innerHTML = `<div class="message-header user-header"><span class="speaker-icon user-icon">👤</span><span class="speaker-label">User</span></div><div class="message-content user-content"><span class="text-payload">${this.escapeHtml(response.text || response.data || '')}</span></div>`;messagesContainer.appendChild(userElement);messagesContainer.scrollTop = messagesContainer.scrollHeight;}break;15 unmodified linescase 'turn_complete':this.currentResponseElement = null;this.isReasoningMode = false;break;17 unmodified lines18192021222324284 unmodified lines30931031131231331431521 unmodified lines33733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636715 unmodified lines38338438538638738838917 unmodified linesthis.isStreaming = false;this.currentMode = null;this.currentResponseElement = null;this.currentUserElement = null;this.isReasoningMode = false;this._clientTools = {};284 unmodified linesthis.isStreaming = false;this.currentMode = null;this.currentResponseElement = null;this.currentUserElement = null;this.uiController.updateUIForStreaming(false);this.uiController.hideVideoPreview();21 unmodified linesconst welcome = messagesContainer.querySelector('.system-welcome');if (welcome) welcome.remove();if (!this.currentUserElement) {this.currentUserElement = document.createElement('div');this.currentUserElement.className = 'message-row user-message';this.currentUserElement.innerHTML = `<div class="message-header user-header"><span class="speaker-icon user-icon">👤</span><span class="speaker-label">User</span></div><div class="message-content user-content"><span class="text-payload"></span></div>`;messagesContainer.appendChild(this.currentUserElement);}const textPayload = this.currentUserElement.querySelector('.text-payload');const newText = response.text !== undefined ? response.text : (response.data || '');if (textPayload && newText) {const currentText = textPayload.textContent;if (newText.startsWith(currentText)) {textPayload.textContent = newText;} else {textPayload.textContent += newText;}}messagesContainer.scrollTop = messagesContainer.scrollHeight;}break;15 unmodified linescase 'turn_complete':this.currentResponseElement = null;this.currentUserElement = null;this.isReasoningMode = false;break;
frontend/js/main.js+28-12