@@ -616,8 +616,8 @@ export class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
616616 }
617617
618618 if ( e ?. longRunningToolIds && e . longRunningToolIds . length > 0 ) {
619- this . getAsyncFunctionsFromParts ( e . longRunningToolIds , e . content . parts ) ;
620- const func = this . longRunningEvents [ 0 ] ;
619+ this . getAsyncFunctionsFromParts ( e . longRunningToolIds , e . content . parts , e . invocationId ) ;
620+ const func = this . longRunningEvents [ 0 ] . function ;
621621 if ( func . args . authConfig &&
622622 func . args . authConfig . exchangedAuthCredential &&
623623 func . args . authConfig . exchangedAuthCredential . oauth2 ) {
@@ -875,11 +875,12 @@ export class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
875875 const dialogRef = this . dialog . open ( PendingEventDialogComponent , {
876876 width : '600px' ,
877877 data : {
878- event : this . longRunningEvents [ 0 ] ,
878+ event : this . longRunningEvents [ 0 ] . function ,
879879 appName : this . appName ,
880880 userId : this . userId ,
881881 sessionId : this . sessionId ,
882882 functionCallEventId : this . functionCallEventId ,
883+ invocationId : this . longRunningEvents [ 0 ] . invocationId
883884 } ,
884885 } ) ;
885886
@@ -1069,10 +1070,10 @@ export class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
10691070 this . isScreenSharing = false ;
10701071 }
10711072
1072- private getAsyncFunctionsFromParts ( pendingIds : any [ ] , parts : any [ ] ) {
1073+ private getAsyncFunctionsFromParts ( pendingIds : any [ ] , parts : any [ ] , invocationId : string ) {
10731074 for ( const part of parts ) {
10741075 if ( part . functionCall && pendingIds . includes ( part . functionCall . id ) ) {
1075- this . longRunningEvents . push ( part . functionCall ) ;
1076+ this . longRunningEvents . push ( { function : part . functionCall , invocationId : invocationId } ) ;
10761077 }
10771078 }
10781079 }
0 commit comments