




























@@ -85,7 +85,8 @@ const CONTROL_UI_I18N_WORKFLOW = 1;
8585const DEFAULT_OPENAI_MODEL = "gpt-5.5";
8686const DEFAULT_ANTHROPIC_MODEL = "claude-opus-4-6";
8787const DEFAULT_PROVIDER = "openai";
88-const DEFAULT_PI_PACKAGE_VERSION = "0.58.3";
88+export const DEFAULT_PI_PACKAGE_VERSION = "0.74.0";
89+const PI_PACKAGE_NAME = "@earendil-works/pi-coding-agent";
8990const HERE = path.dirname(fileURLToPath(import.meta.url));
9091const ROOT = path.resolve(HERE, "..");
9192const LOCALES_DIR = path.join(ROOT, "ui", "src", "i18n", "locales");
@@ -918,6 +919,14 @@ function getPiRuntimeDir() {
918919);
919920}
920921922+export function resolveLocalPiCommand(root = ROOT): PiCommand | null {
923+const cliPath = path.join(root, "node_modules", ...PI_PACKAGE_NAME.split("/"), "dist", "cli.js");
924+if (!existsSync(cliPath)) {
925+return null;
926+}
927+return { executable: "node", args: [cliPath] };
928+}
929+921930async function resolvePiCommand(): Promise<PiCommand> {
922931const explicitExecutable = process.env[ENV_PI_EXECUTABLE]?.trim();
923932if (explicitExecutable) {
@@ -935,12 +944,16 @@ async function resolvePiCommand(): Promise<PiCommand> {
935944}
936945}
937946947+const localCommand = resolveLocalPiCommand();
948+if (localCommand) {
949+return localCommand;
950+}
951+938952const runtimeDir = getPiRuntimeDir();
939953const cliPath = path.join(
940954runtimeDir,
941955"node_modules",
942-"@mariozechner",
943-"pi-coding-agent",
956+ ...PI_PACKAGE_NAME.split("/"),
944957"dist",
945958"cli.js",
946959);
@@ -953,7 +966,7 @@ async function resolvePiCommand(): Promise<PiCommand> {
953966"--silent",
954967"--no-audit",
955968"--no-fund",
956-`@earendil-works/pi-coding-agent@${resolvePiPackageVersion()}`,
969+`${PI_PACKAGE_NAME}@${resolvePiPackageVersion()}`,
957970],
958971{
959972cwd: runtimeDir,
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。