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>> {
1014
1014
1015
1015
const executeRun = async ( ) => {
1016
1016
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.
1023
1019
await saveStreamInputToSession ( session , sessionOriginalInput ) ;
1024
- return streamResult ;
1020
+ return this . #runIndividualStream ( agent , preparedInput , resolvedOptions ) ;
1025
1021
}
1026
1022
const runResult = await this . #runIndividualNonStream(
1027
1023
agent ,
You can’t perform that action at this time.
0 commit comments