File tree Expand file tree Collapse file tree
src/agents/pi-embedded-runner Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1443,6 +1443,7 @@ export async function runEmbeddedPiAgent(
14431443 skillsSnapshot : params . skillsSnapshot ,
14441444 prompt,
14451445 transcriptPrompt : params . transcriptPrompt ,
1446+ userMessageForPersistence : params . userMessageForPersistence ,
14461447 currentInboundEventKind : params . currentInboundEventKind ,
14471448 currentInboundContext : params . currentInboundContext ,
14481449 images : params . images ,
Original file line number Diff line number Diff line change @@ -2327,6 +2327,7 @@ export async function runEmbeddedAttempt(
23272327 config : params . config ,
23282328 contextWindowTokens : params . contextTokenBudget ,
23292329 inputProvenance : params . inputProvenance ,
2330+ userMessageForPersistence : params . userMessageForPersistence ,
23302331 allowSyntheticToolResults : transcriptPolicy . allowSyntheticToolResults ,
23312332 missingToolResultText :
23322333 params . model . api === "openai-responses" ||
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import type { OpenClawConfig } from "../../../config/types.openclaw.js";
1212import type { PromptImageOrderEntry } from "../../../media/prompt-image-order.js" ;
1313import type { CommandQueueEnqueueFn } from "../../../process/command-queue.types.js" ;
1414import type { InputProvenance } from "../../../sessions/input-provenance.js" ;
15+ import type { PersistedUserTurnMessage } from "../../../sessions/user-turn-transcript.js" ;
1516import type { ExecElevatedDefaults , ExecToolDefaults } from "../../bash-tools.exec-types.js" ;
1617import type { AgentStreamParams , ClientToolDefinition } from "../../command/shared-types.js" ;
1718import type { AgentInternalEvent } from "../../internal-events.js" ;
@@ -106,6 +107,8 @@ export type RunEmbeddedPiAgentParams = {
106107 prompt : string ;
107108 /** User-visible prompt body to submit and persist; runtime context travels separately. */
108109 transcriptPrompt ?: string ;
110+ /** Prepared user transcript message to persist through Pi's normal user append path. */
111+ userMessageForPersistence ?: PersistedUserTurnMessage ;
109112 currentInboundEventKind ?: InboundEventKind ;
110113 currentInboundContext ?: CurrentInboundPromptContext ;
111114 images ?: ImageContent [ ] ;
You can’t perform that action at this time.
0 commit comments