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

@@ -1,23 +1,23 @@
const { execSync } = require('child_process')
const fs = require('fs-extra')
const path = require('path')
function cleanOutRoot() {
const outDir = path.resolve(process.cwd(), 'out')
function cleanBuildDirectories() {
const directoriesToRemove = [
path.resolve(process.cwd(), 'dist'),
path.resolve(process.cwd(), 'dist-electron'),
path.resolve(process.cwd(), 'out'),
]
if (!fs.pathExistsSync(outDir)) {
return
}
fs.removeSync(outDir)
if (fs.pathExistsSync(outDir)) {
execSync(`cmd /c rd /s /q "${outDir}"`, { stdio: 'ignore' })
process.exitCode = 1
for (const dir of directoriesToRemove) {
if (fs.pathExistsSync(dir)) {
try {
fs.removeSync(dir)
console.log(`Removed: ${path.relative(process.cwd(), dir)}`)
} catch (error) {
console.warn(`Failed to remove ${dir}: ${error.message}`)
}
}
}
}
cleanOutRoot()
cleanBuildDirectories()

View File

@@ -1,8 +1,8 @@
const fs = require('fs')
const path = require('path')
const entryPath = path.join(process.cwd(), '.vite/build/main.js')
const jscPath = path.join(process.cwd(), '.vite/build/main.jsc')
const entryPath = path.join(process.cwd(), 'dist-electron/main/main.js')
const jscPath = path.join(process.cwd(), 'dist-electron/main/main.jsc')
if (!fs.existsSync(entryPath)) {
throw new Error('主进程入口未找到,请先构建主进程')
}