if-emotion-ux/types.ts
Danny Stocker 9df51ea38c feat: Update project name and dependencies
This commit updates the project name from 'if.emotion' to 'if-emotion-ux' across configuration files.
It also reconciles the React and related dependencies, ensuring consistent versions and updating CDN import maps in `index.html` to reflect React v18.3.1.
Additionally, the `puppeteer` dev dependency has been removed, and the `advancedMode` setting has been removed from `UserSettings`, simplifying the configuration.
The sidebar now groups sessions by date (Today, Yesterday, Older) for improved organization.
The export modal has been updated with new icons and text based on the selected language, and a title prop has been added.

The removal of `puppeteer` suggests a shift away from end-to-end testing or a similar integration that relied on it. The simplification of settings and the inclusion of more robust session grouping enhance the user experience and maintainability.
2025-11-30 16:50:37 +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';