v0.17.22: stop typing indicator animation on abort — greyed-out stopped state
This commit is contained in:
@@ -9,7 +9,7 @@ import logging
|
|||||||
|
|
||||||
log = logging.getLogger("caic")
|
log = logging.getLogger("caic")
|
||||||
|
|
||||||
VERSION = "v0.17.21"
|
VERSION = "v0.17.22"
|
||||||
OLLAMA_BASE = os.environ.get("OLLAMA_BASE", "http://localhost:11434")
|
OLLAMA_BASE = os.environ.get("OLLAMA_BASE", "http://localhost:11434")
|
||||||
LLAMA_SERVER_BASE = os.environ.get("LLAMA_SERVER_BASE", "http://192.168.50.108:8081")
|
LLAMA_SERVER_BASE = os.environ.get("LLAMA_SERVER_BASE", "http://192.168.50.108:8081")
|
||||||
SEARXNG_BASE = "http://localhost:8888"
|
SEARXNG_BASE = "http://localhost:8888"
|
||||||
|
|||||||
@@ -175,6 +175,7 @@ body { font-family: var(--font-body); background: var(--bg-primary); color: var(
|
|||||||
.copy-btn:hover { color:var(--text-primary); }
|
.copy-btn:hover { color:var(--text-primary); }
|
||||||
.typing-indicator { display:inline-flex; gap:4px; padding:4px 0; }
|
.typing-indicator { display:inline-flex; gap:4px; padding:4px 0; }
|
||||||
.typing-indicator span { width:6px; height:6px; background:var(--accent-dim); border-radius:50%; animation:blink 1.4s infinite; }
|
.typing-indicator span { width:6px; height:6px; background:var(--accent-dim); border-radius:50%; animation:blink 1.4s infinite; }
|
||||||
|
.typing-indicator.stopped span { background:var(--text-muted); animation:none; opacity:0.4; }
|
||||||
.typing-indicator span:nth-child(2) { animation-delay:0.2s; }
|
.typing-indicator span:nth-child(2) { animation-delay:0.2s; }
|
||||||
.typing-indicator span:nth-child(3) { animation-delay:0.4s; }
|
.typing-indicator span:nth-child(3) { animation-delay:0.4s; }
|
||||||
@keyframes blink { 0%,80%,100%{opacity:0.3} 40%{opacity:1} }
|
@keyframes blink { 0%,80%,100%{opacity:0.3} 40%{opacity:1} }
|
||||||
@@ -1203,7 +1204,7 @@ async function sendSearch() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.name === 'AbortError') textEl.innerHTML += '<br><em style="color:var(--text-muted)">[stopped]</em>';
|
if (e.name === 'AbortError') textEl.innerHTML = '<div class="typing-indicator stopped"><span></span><span></span><span></span></div><em style="color:var(--text-muted)">[stopped]</em>';
|
||||||
else textEl.textContent = 'Error: ' + e.message;
|
else textEl.textContent = 'Error: ' + e.message;
|
||||||
setStreamingState(false);
|
setStreamingState(false);
|
||||||
}
|
}
|
||||||
@@ -1396,7 +1397,7 @@ async function sendMessage() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.name === 'AbortError') textEl.innerHTML += '<br><em style="color:var(--text-muted)">[stopped]</em>';
|
if (e.name === 'AbortError') textEl.innerHTML = '<div class="typing-indicator stopped"><span></span><span></span><span></span></div><em style="color:var(--text-muted)">[stopped]</em>';
|
||||||
else textEl.textContent = 'Error: ' + e.message;
|
else textEl.textContent = 'Error: ' + e.message;
|
||||||
setStreamingState(false);
|
setStreamingState(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user