if-emotion-ux/types.ts
Danny Stocker aa61ef868a feat: Integrate with Open WebUI for AI
Replaces the Gemini service integration with support for Open WebUI. This change simplifies the AI backend by leveraging an existing solution, allowing for more flexible API connections and reducing direct dependency on specific AI models.

Updated dependencies, including React, to their latest versions to incorporate performance improvements and bug fixes.

Refactored color schemes and typography in the HTML to better align with the application's theme.

Adjusted type definitions for improved clarity and compatibility with the new backend integration.
2025-11-30 05:29:00 +01:00

56 lines
865 B
TypeScript

export enum Role {
USER = 'user',
ASSISTANT = 'assistant',
SYSTEM = 'system'
}
export interface Message {
id: string; // Internal UUID
role: Role;
content: string;
timestamp: Date;
// For UI state
pending?: boolean;
error?: boolean;
reactions?: string[];
}
export interface OpenWebUIMessage {
role: string;
content: string;
}
export interface Session {
id: string;
title: string;
updated_at: number; // Unix timestamp
folder_id?: string;
}
export interface Folder {
id: string;
name: string;
}
export interface OpenWebUIConfig {
baseUrl: string;
apiKey: string;
}
export interface UserSettings {
baseUrl: string;
apiKey: string;
}
export enum Language {
EN = 'en',
ES = 'es',
}
export enum AppMode {
SIMPLE = 'simple',
ADVANCED = 'advanced'
}
export type ExportFormat = 'json' | 'txt' | 'md' | 'pdf';