Files
zn-ai/runtime-shared/lib/types.ts
DEV_DSW 79bea4f107 Refactor UUID generation, remove unused logger and encryption utilities, and clean up request handling
- Updated `generateUUID` function for improved readability and performance.
- Deleted `logger.ts`, `other.ts`, `request.ts`, `storage.ts`, `tansParams.ts`, and `validate.ts` as they were no longer needed.
- Simplified TypeScript configuration by removing unnecessary paths and aliases.
- Enhanced Vite configuration for better project structure and maintainability.
2026-04-17 15:38:08 +08:00

39 lines
1.1 KiB
TypeScript

import type { Task } from './task-types';
import { CONFIG_KEYS, WINDOW_NAMES } from './constants';
export type ThemeMode = 'dark' | 'light' | 'system';
export type WindowNames = `${WINDOW_NAMES}`;
export type ConfigKeys = `${CONFIG_KEYS}`;
export interface IConfig {
[CONFIG_KEYS.THEME_MODE]: ThemeMode;
[CONFIG_KEYS.PRIMARY_COLOR]: string;
[CONFIG_KEYS.LANGUAGE]: 'zh' | 'en';
[CONFIG_KEYS.FONT_SIZE]: number;
[CONFIG_KEYS.MINIMIZE_TO_TRAY]: boolean;
[CONFIG_KEYS.PROVIDER]?: string;
[CONFIG_KEYS.DEFAULT_MODEL]?: string | null;
[CONFIG_KEYS.AUTO_CHECK_UPDATE]?: boolean;
[CONFIG_KEYS.AUTO_DOWNLOAD_UPDATE]?: boolean;
[CONFIG_KEYS.SELECTED_CHANNELS]: Array<{ id: string; channelName: string; channelUrl: string }>;
[CONFIG_KEYS.IMAGE_CACHE]: Array<[string, any]>;
[CONFIG_KEYS.TASK_LIST]?: Task[];
}
export interface Provider {
id: number;
name: string;
visible?: boolean;
title?: string;
type?: 'OpenAI';
openAISetting?: string;
createdAt: number;
updatedAt: number;
models: string[];
}
export interface OpenAISetting {
baseURL?: string;
apiKey?: string;
}