Files
zn-ai/src-react/lib/constants.ts
duanshuwen b1dea9a5c2 feat: implement task management store with IPC integration
- Added a new task store in `src-react/stores/task.ts` to manage tasks and their statuses.
- Implemented functions for creating, executing, and retrying tasks, along with handling task progress and completion.
- Introduced persistence for tasks using IPC.
- Created utility functions for normalizing room types and building subtasks.
- Added a new CSS file for global styles in `src-react/styles.css`.
- Created runtime types in `src-react/types/runtime.ts` and exported them.
- Updated the main entry points for Vue and React applications to support dynamic framework loading.
- Refactored chat model interfaces and utility functions into `src/shared/chat-model.ts`.
- Updated TypeScript configuration to include paths for React components and types.
- Enhanced Vite configuration to support both Vue and React frameworks.
2026-04-17 07:09:56 +08:00

32 lines
861 B
TypeScript

import { CONFIG_KEYS as RUNTIME_CONFIG_KEYS } from '../types/runtime';
export const IPC_EVENTS = {
HOST_API_FETCH: 'hostapi:fetch',
GATEWAY_RPC: 'gateway:rpc',
GATEWAY_EVENT: 'gateway:event',
GET_CONFIG: 'get-config',
SET_CONFIG: 'set-config',
GET_THEME_MODE: 'get-theme-mode',
SET_THEME_MODE: 'set-theme-mode',
THEME_MODE_UPDATED: 'theme-mode-updated',
GET_WINDOW_ID: 'get-window-id',
TASK_PROGRESS: 'task:progress',
TASK_STARTED: 'task:started',
TASK_COMPLETED: 'task:completed',
OPEN_CHANNEL: 'open-channel',
EXECUTE_SCRIPT: 'execute-script',
} as const;
export const CONFIG_KEYS = RUNTIME_CONFIG_KEYS;
export const WINDOW_NAMES = {
MAIN: 'main',
SETTING: 'setting',
DIALOG: 'dialog',
LOADING: 'loading',
} as const;
export const DEFAULT_THEME_MODE = 'system' as const;
export const DEFAULT_LANGUAGE = 'zh' as const;