From d0e7da7ec7745be3d34efe3949c0592f6723136a Mon Sep 17 00:00:00 2001 From: HsiangNianian Date: Fri, 16 Jan 2026 14:16:42 +0800 Subject: feat: implement assistant state management and messaging functionality Added a new module for managing the assistant's state, including message handling, health checks, and streaming responses. Introduced interfaces for message structure and generation statistics. Enhanced the logs state by removing unnecessary listener setup during initialization. Updated the types to include assistant configuration options. --- ui/src/stores/logs.svelte.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'ui/src/stores/logs.svelte.ts') diff --git a/ui/src/stores/logs.svelte.ts b/ui/src/stores/logs.svelte.ts index 5df9abc..c9d4acc 100644 --- a/ui/src/stores/logs.svelte.ts +++ b/ui/src/stores/logs.svelte.ts @@ -39,7 +39,6 @@ export class LogsState { constructor() { this.addLog("info", "Launcher", "Logs initialized"); - this.setupListeners(); } addLog(level: LogEntry["level"], source: string, message: string) { @@ -95,7 +94,12 @@ export class LogsState { .join("\n"); } - private async setupListeners() { + private initialized = false; + + async init() { + if (this.initialized) return; + this.initialized = true; + // General Launcher Logs await listen("launcher-log", (e) => { this.addLog("info", "Launcher", e.payload); -- cgit v1.2.3-70-g09d2