(errorMsg)
| 357 | } |
| 358 | |
| 359 | function handleError(errorMsg) { |
| 360 | if (!currentAssistantMsg) { |
| 361 | appendMessage("assistant", "Error: " + errorMsg).classList.add("error"); |
| 362 | } else { |
| 363 | const errDiv = document.createElement("div"); |
| 364 | errDiv.className = "content error-text"; |
| 365 | errDiv.textContent = "Error: " + errorMsg; |
| 366 | currentAssistantMsg.appendChild(errDiv); |
| 367 | currentAssistantMsg.classList.add("error"); |
| 368 | } |
| 369 | enableInput(); |
| 370 | } |
| 371 | |
| 372 | function handleDone() { |
| 373 | let fullText = ""; |
no test coverage detected