Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(provider-pi): show async pi-subagents runs as running subagents #17393

Closedmarianomacri(GitHub profile, opens in a new tab)wants to merge 4 commits intomain fromrefs/pull/17393/headopened View on GitHub

Showing 8 changed files with 153 additions and 3 deletions (loading 5).

x
0 of 8 viewed, 8 left
13 additions and 3 deletionsapps/server/scripts/record-pi-rpc-replay-fixture.tsModified
View file
@@ -70,7 +70,17 @@
​
const piBinary = process.env.T3_PI_BIN ?? "pi";
const [modelProvider, ...modelId] = variant.modelSelection.model.split("/");
-const launchArgs = `--provider ${modelProvider} --model ${modelId.join("/")} ${HERMETIC_LAUNCH_ARGS}`;
+/** Loads a third-party extension, such as pi-subagents, without recording its local path. */
+const recordedExtension = process.env.T3_PI_RECORD_EXTENSION;
+const baseLaunchArgs = `--provider ${modelProvider} --model ${modelId.join("/")} ${HERMETIC_LAUNCH_ARGS}`;
+const launchArgs =
+ recordedExtension === undefined
+ ? baseLaunchArgs
+ : `${baseLaunchArgs} --extension ${JSON.stringify(recordedExtension)}`;
+const transcriptLaunchArgs =
+ recordedExtension === undefined
+ ? baseLaunchArgs
+ : `${baseLaunchArgs} --extension ${PI_REPLAY_ANY}`;
const home = process.env.HOME ?? "";
​
// ── normalization ─────────────────────────────────────────────
@@ -230,7 +240,7 @@
const workspace = yield* Effect.promise(() =>
makeCheckpointWorkspace(`pi-rpc-record-${fixture.name}`, fixtureInput.workspaceFiles),
- yield* fs.makeDirectory(path.join(workspace, ".pi"));
+ yield* fs.makeDirectory(path.join(workspace, ".pi"), { recursive: true });
yield* fs.writeFileString(
path.join(workspace, ".pi", "settings.json"),
encodeJson(WORKSPACE_PI_SETTINGS),