chore: restructure project and add i18n support

- Reorganize project structure with new electron and shared directories
- Add comprehensive i18n support with Chinese, English, and Japanese locales
- Update build configurations and TypeScript paths for new structure
- Add various UI components including chat interface and task management
- Include Windows release binaries and localization files
- Update dependencies and fix import paths throughout the codebase
This commit is contained in:
duanshuwen
2026-04-06 14:39:06 +08:00
parent e76b034d50
commit 6615d11dd6
311 changed files with 823682 additions and 4460 deletions

View File

@@ -0,0 +1,53 @@
/// 消息角色枚举
export enum MessageRole {
// 智能体消息
AI = "AI",
// 我发送的消息
ME = "ME",
// 其他消息
OTHER = "OTHER",
};
/// Chat消息模型
export class ChatMessage {
// 消息唯一标识
messageId: string;
// 消息类型
messageRole: MessageRole;
// 消息内容
messageContent: string;
// 消息内容列表(用于流式更新)
messageContentList: string[];
// 是否加载中
isLoading?: boolean;
// 是否完成
finished?: boolean;
// 工具调用信息
toolCall?: any;
// 问题信息
question?: string;
// 时间戳
timestamp?: number;
constructor(
messageId: string,
messageRole: MessageRole,
messageContent: string,
messageContentList: string[] = [],
isLoading: boolean = false,
finished: boolean = false,
toolCall?: any,
question?: any,
timestamp?: number
) {
this.messageId = messageId;
this.messageRole = messageRole;
this.messageContent = messageContent;
this.messageContentList = messageContentList;
this.isLoading = isLoading;
this.finished = finished;
this.toolCall = toolCall;
this.question = question;
this.timestamp = timestamp || Date.now();
}
}