feat(webui): refresh session titles from live updates

This commit is contained in:
Xubin Ren
2026-05-13 13:10:21 +00:00
parent 79e528119c
commit fb508a302a
8 changed files with 154 additions and 22 deletions
-5
View File
@@ -294,11 +294,6 @@ export function useNanobotStream(
return;
}
if (ev.event === "session_updated") {
onTurnEnd?.();
return;
}
if (ev.event === "message") {
if (
suppressStreamUntilTurnEndRef.current &&
+6
View File
@@ -91,6 +91,12 @@ export function useSessions(): {
void refresh();
}, [refresh]);
useEffect(() => {
return client.onSessionUpdate(() => {
void refresh();
});
}, [client, refresh]);
const createChat = useCallback(async (): Promise<string> => {
const chatId = await client.newChat();
const key = `websocket:${chatId}`;