TypeScript
fix(pi): support persisted sessions in RPC launch (#21511)
Julius Marminge6f8d69271c4c
diff --git a/packages/provider-pi/src/server/mcpInjection.test.ts b/packages/provider-pi/src/server/mcpInjection.test.tsindex 50d21afd32b..dacd4610dec 100644--- a/packages/provider-pi/src/server/mcpInjection.test.ts+++ b/packages/provider-pi/src/server/mcpInjection.test.ts@@ -121,6 +121,7 @@ describe("pi T3 MCP injection", () => {environment: {},mcpSession,extensionPath: "/tmp/cache/pi-t3-mcp-extension.ts",+ sessionPath: "/fake/persisted.jsonl",ephemeral: true,disableExtensions: true,disableTools: true,diff --git a/packages/provider-pi/src/server/mcpInjection.ts b/packages/provider-pi/src/server/mcpInjection.tsindex ccb9eecfde7..2ba0e3dca3b 100644--- a/packages/provider-pi/src/server/mcpInjection.ts+++ b/packages/provider-pi/src/server/mcpInjection.ts@@ -245,6 +245,7 @@ export function buildPiRpcLaunch(input: {readonly environment: NodeJS.ProcessEnv;readonly mcpSession: McpProviderSessionConfig | undefined;readonly extensionPath: string | undefined;+ readonly sessionPath?: string | undefined;readonly ephemeral?: boolean;readonly disableExtensions?: boolean;readonly disableTools?: boolean;@@ -265,7 +266,11 @@ export function buildPiRpcLaunch(input: {const args = ["--mode","rpc",- ...(input.ephemeral === true ? ["--no-session"] : []),+ ...(input.ephemeral === true+ ? ["--no-session"]+ : input.sessionPath !== undefined+ ? ["--session", input.sessionPath]+ : []),...launchArgs,// Restrictions follow user launch args so a configured --tools or// --extension cannot silently re-enable unattended text-generation code.