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/types/index.ts | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) (limited to 'ui/src/types/index.ts') diff --git a/ui/src/types/index.ts b/ui/src/types/index.ts index 83e7f9e..6471869 100644 --- a/ui/src/types/index.ts +++ b/ui/src/types/index.ts @@ -1,4 +1,4 @@ -export type ViewType = "home" | "versions" | "settings"; +export type ViewType = "home" | "versions" | "settings" | "guide"; export interface Version { id: string; @@ -26,6 +26,31 @@ export interface DeviceCodeResponse { message?: string; } +export interface AssistantConfig { + enabled: boolean; + llm_provider: "ollama" | "openai"; + // Ollama settings + ollama_endpoint: string; + ollama_model: string; + // OpenAI settings + openai_api_key?: string; + openai_endpoint: string; + openai_model: string; + // Common settings + system_prompt: string; + response_language: string; + // TTS settings + tts_enabled: boolean; + tts_provider: string; +} + +export interface ModelInfo { + id: string; + name: string; + size?: string; + details?: string; +} + export interface LauncherConfig { min_memory: number; max_memory: number; @@ -40,6 +65,7 @@ export interface LauncherConfig { theme: string; log_upload_service: "paste.rs" | "pastebin.com"; pastebin_api_key?: string; + assistant: AssistantConfig; } export interface JavaInstallation { -- cgit v1.2.3-70-g09d2