feat: 新增主进程功能

This commit is contained in:
DEV_DSW
2025-12-18 16:52:25 +08:00
parent 69a8e9472f
commit 6778c57a0e
25 changed files with 1503 additions and 161 deletions

40
global.d.ts vendored
View File

@@ -81,6 +81,43 @@ declare global {
declare interface Window {
api: WindowApi;
}
type ThemeMode = 'dark' | 'light' | 'system';
// 弹窗类型定义
interface CreateDialogProps {
winId?: string;
title?: string;
content: string;
confirmText?: string;
cancelText?: string;
isModal?: boolean;
onConfirm?: () => void;
onCancel?: () => void;
}
interface CreateDialogueProps {
messages: DialogueMessageProps[];
providerName: string;
selectedModel: string;
messageId: number;
conversationId: number;
}
interface UniversalChunk {
isEnd: boolean;
result: string;
}
interface DialogueBackStream {
messageId: number;
data: UniversalChunk & { isError?: boolean };
}
interface DialogueMessageProps {
role: DialogueMessageRole;
content: string;
}
}
declare module "@store/*";
@@ -100,4 +137,5 @@ declare module '@iconify/vue' {
flip?: string
rotate?: number
}>
}
}