2026-07-30 14:56:39 +08:00
|
|
|
/** Boot the ACP Code Mode overlay. Requires a DeepSeek API key. */
|
2026-07-09 12:16:37 +08:00
|
|
|
import { spawn } from 'node:child_process'
|
|
|
|
|
|
2026-07-30 14:56:39 +08:00
|
|
|
if (process.argv.length > 2) {
|
|
|
|
|
console.error('usage: pnpm run demo:code-mode')
|
2026-07-09 12:16:37 +08:00
|
|
|
process.exit(2)
|
|
|
|
|
}
|
|
|
|
|
|
2026-07-30 14:56:39 +08:00
|
|
|
const child = spawn(process.execPath, [
|
|
|
|
|
'--import',
|
2026-08-23 01:45:44 +08:00
|
|
|
'tsx/esm',
|
|
|
|
|
'apps/cli/src/bin.ts',
|
|
|
|
|
'--profile',
|
|
|
|
|
'acp',
|
|
|
|
|
'--patch',
|
|
|
|
|
'examples/acp-agent/cordis.yml',
|
|
|
|
|
'--patch',
|
2026-07-30 14:56:39 +08:00
|
|
|
'examples/acp-agent/code-mode.cordis.yml',
|
|
|
|
|
], { stdio: 'inherit' })
|
2026-07-09 12:16:37 +08:00
|
|
|
child.on('exit', (code, signal) => { process.exit(signal !== null ? 1 : code ?? 1) })
|