From 1729e1c399a41b4128b5dd7ef0286fae128e6157 Mon Sep 17 00:00:00 2001 From: tanaka takashi Date: Thu, 9 Jul 2026 21:52:16 +0900 Subject: ollama側のレスポンスが空の場合に1回リトライする処理に変更 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit トークン数の累積計算処理削除 --- src/ollama_web/static/app.js | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/ollama_web/static') diff --git a/src/ollama_web/static/app.js b/src/ollama_web/static/app.js index 378e39f..54fb2e0 100644 --- a/src/ollama_web/static/app.js +++ b/src/ollama_web/static/app.js @@ -714,6 +714,17 @@ async function send() { waiting.textContent = ev.message || t("chat.processing"); assistantBody.appendChild(waiting); } + } else if (ev.type === "warning") { + gotError = true; + if (!placeholderCleared) { + assistantBody.innerHTML = ""; + placeholderCleared = true; + } + const span = document.createElement("span"); + span.className = "warning-msg"; + span.style.color = "#f0883e"; + span.textContent = ev.message || t("status.empty_response"); + assistantBody.appendChild(span); } else if (ev.type === "thinking") { if (!thinkingBody) thinkingBody = addThinkingBubble(assistantExtras); thinkingBody.textContent += ev.content; -- cgit v1.2.3