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.
This commit is contained in:
DEV_DSW
2026-04-17 15:38:08 +08:00
parent b1dea9a5c2
commit 79bea4f107
360 changed files with 14495 additions and 30856 deletions

112
src/i18n/messages.ts Normal file
View File

@@ -0,0 +1,112 @@
import type { LanguageCode } from '../types/runtime';
export interface MessageTree {
[key: string]: string | number | MessageTree;
}
export type I18nMessages = Record<LanguageCode, MessageTree>;
export const messages: I18nMessages = {
en: {
app: {
title: 'ZN-AI',
},
window: {
minimize: 'Minimize',
maximize: 'Maximize',
restore: 'Restore',
close: 'Close',
},
dialog: {
cancel: 'Cancel',
confirm: 'Confirm',
},
theme: {
light: 'Light',
dark: 'Dark',
system: 'System',
},
language: {
zh: 'Chinese',
en: 'English',
ja: 'Japanese',
},
common: {
loading: 'Loading...',
retry: 'Retry',
unknownError: 'Unknown error',
},
conversation: {
newConversation: 'New conversation',
emptyState: 'No messages yet',
},
},
zh: {
app: {
title: 'ZN-AI',
},
window: {
minimize: '最小化',
maximize: '最大化',
restore: '还原',
close: '关闭',
},
dialog: {
cancel: '取消',
confirm: '确认',
},
theme: {
light: '浅色',
dark: '深色',
system: '跟随系统',
},
language: {
zh: '中文',
en: '英文',
ja: '日语',
},
common: {
loading: '加载中...',
retry: '重试',
unknownError: '未知错误',
},
conversation: {
newConversation: '新建对话',
emptyState: '暂无消息',
},
},
ja: {
app: {
title: 'ZN-AI',
},
window: {
minimize: '最小化',
maximize: '最大化',
restore: '復元',
close: '閉じる',
},
dialog: {
cancel: 'キャンセル',
confirm: '確認',
},
theme: {
light: 'ライト',
dark: 'ダーク',
system: 'システムに従う',
},
language: {
zh: '中国語',
en: '英語',
ja: '日本語',
},
common: {
loading: '読み込み中...',
retry: '再試行',
unknownError: '不明なエラー',
},
conversation: {
newConversation: '新しい会話',
emptyState: 'メッセージはまだありません',
},
},
};