File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -1014,14 +1014,10 @@ export class Runner extends RunHooks<any, AgentOutputType<unknown>> {
10141014
10151015 const executeRun = async ( ) => {
10161016 if ( resolvedOptions . stream ) {
1017- const streamResult = await this . #runIndividualStream(
1018- agent ,
1019- preparedInput ,
1020- resolvedOptions ,
1021- ) ;
1022- // for streaming runs, the outputs will be save later on
1017+ // Persist the user's input before streaming outputs so the session
1018+ // transcript preserves the turn order.
10231019 await saveStreamInputToSession ( session , sessionOriginalInput ) ;
1024- return streamResult ;
1020+ return this . #runIndividualStream ( agent , preparedInput , resolvedOptions ) ;
10251021 }
10261022 const runResult = await this . #runIndividualNonStream(
10271023 agent ,
You can’t perform that action at this time.
0 commit comments