mirror of
https://github.com/earendil-works/pi.git
synced 2026-06-18 15:54:04 +08:00
21 lines
682 B
JavaScript
21 lines
682 B
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* CLI entry point for the refactored coding agent.
|
|
* Uses main.ts with AgentSession and new mode modules.
|
|
*
|
|
* Test with: npx tsx src/cli-new.ts [args...]
|
|
*/
|
|
import { APP_NAME } from "./config.ts";
|
|
import { configureHttpDispatcher } from "./core/http-dispatcher.ts";
|
|
import { main } from "./main.ts";
|
|
|
|
process.title = APP_NAME;
|
|
process.env.PI_CODING_AGENT = "true";
|
|
process.emitWarning = (() => {}) as typeof process.emitWarning;
|
|
|
|
// Configure undici's global dispatcher before provider SDKs issue requests.
|
|
// Runtime settings are applied once SettingsManager has loaded global/project settings.
|
|
configureHttpDispatcher();
|
|
|
|
main(process.argv.slice(2));
|