feat: ai 的随机修复

This commit is contained in:
claude-code-best
2026-05-05 19:36:38 +08:00
parent 18d6656a6a
commit 87b96199f9
8 changed files with 217 additions and 2 deletions

View File

@@ -14,7 +14,12 @@ const __dirname = dirname(__filename)
const projectRoot = join(__dirname, '..')
const cliPath = join(projectRoot, 'src/entrypoints/cli.tsx')
const defines = getMacroDefines()
const defines = {
...getMacroDefines(),
// React production mode — prevents 6,889+ _debugStack Error objects
// (12MB) from accumulating during long-running sessions.
'process.env.NODE_ENV': JSON.stringify('production'),
}
const defineArgs = Object.entries(defines).flatMap(([k, v]) => [
'-d',