feat(ui,api): chat view with live tail and autoscroll, conversation rail with last message previews

This commit is contained in:
hh
2026-08-29 00:18:08 +02:00
parent 8ea4cea3ef
commit 3ca5843868
9 changed files with 532 additions and 334 deletions
+19
View File
@@ -8,6 +8,7 @@ import type {
import { session } from "./session.svelte";
const TAPE_SIZE = 120;
const RELOAD_DEBOUNCE_MS = 1500;
const QUIET = new Set(["stream", "hello"]);
// Gateway-wide live state: the conversation index kept fresh by
@@ -98,10 +99,28 @@ class Gateway {
this.applyLimit(event);
return;
}
case "message.queued":
case "inject.queued":
case "reply": {
this.reloadSoon();
return;
}
default:
}
}
private reloadTimer: ReturnType<typeof setTimeout> | null = null;
private reloadSoon(): void {
if (this.reloadTimer) {
return;
}
this.reloadTimer = setTimeout(() => {
this.reloadTimer = null;
this.load().catch(() => undefined);
}, RELOAD_DEBOUNCE_MS);
}
private applyLimit(event: BusEvent): void {
if (!this.limits || typeof event.window !== "string") {
this.refreshLimits().catch(() => undefined);