new flow for Pi provider/model settings

This commit is contained in:
2026-02-22 20:19:11 +00:00
parent 1372f53782
commit f1e3ce4b76
15 changed files with 249 additions and 460 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
import type { Subprocess } from "bun";
import type { PiEvent, MessageCost } from "./types";
import { readApiKeys } from "../server-settings/pi-mono";
import { PI_CONFIG_DIR } from "../../data-path";
import { logger } from "./logger";
export type PiEventHandler = (event: PiEvent) => void;
@@ -20,7 +21,7 @@ export async function spawnPi(
stdin: 'pipe',
stdout: 'pipe',
stderr: 'pipe',
env: { ...process.env, ...storedKeys },
env: { ...process.env, ...storedKeys, PI_CODING_AGENT_DIR: PI_CONFIG_DIR },
});
// Read stdout JSON event stream (runs in background)