This commit is contained in:
Wendong-Fan 2025-11-27 16:30:13 +08:00
parent 1bd795a119
commit 20af89f376
3 changed files with 15 additions and 5 deletions

View file

@ -12,7 +12,7 @@ body:
id: version
attributes:
label: What version of eigent are you using?
placeholder: E.g., 0.0.72
placeholder: E.g., 0.0.73
validations:
required: true

View file

@ -207,15 +207,25 @@ export async function startBackend(setPort?: (port: number) => void): Promise<an
log.warn(`Pre-flight check failed, attempting repair: ${testErr}`);
try {
// Attempt to repair by re-syncing the environment
log.info("Attempting to repair environment with uv sync...");
// Attempt to repair the environment
log.info("Attempting to repair environment...");
// Use proxy if in China (simple check based on timezone)
// Add official PyPI as fallback for packages not available on mirror
const timezone = Intl.DateTimeFormat().resolvedOptions().timeZone;
const proxyArgs = timezone === 'Asia/Shanghai'
? ['--default-index', 'https://mirrors.aliyun.com/pypi/simple/']
? [
'--default-index', 'https://mirrors.aliyun.com/pypi/simple/',
'--index', 'https://pypi.org/simple/'
]
: [];
// Step 1: Ensure Python is installed (fixes corrupted/missing Python)
log.info("Step 1: Ensuring Python is installed...");
await execAsync(`${uv_path} python install 3.10`, { cwd: backendPath, env: env });
// Step 2: Sync dependencies
log.info("Step 2: Syncing dependencies...");
const syncArgs = ['sync', '--no-dev', ...proxyArgs];
await execAsync(`${uv_path} ${syncArgs.join(' ')}`, { cwd: backendPath, env: env });

View file

@ -1,6 +1,6 @@
{
"name": "eigent",
"version": "0.0.72",
"version": "0.0.73",
"main": "dist-electron/main/index.js",
"description": "Eigent",
"author": "Eigent.AI",