Skip to content

Commit 59176e0

Browse files
Merge branch 'main' into feature/screensharing
2 parents 98c96e5 + 1ef50dd commit 59176e0

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test": "ng test",
1010
"clean-config": "node clean-backend.js",
1111
"inject-backend": "node set-backend.js",
12-
"serve": "npm run clean-config && npm run inject-backend && ng serve"
12+
"serve": "npm run clean-config && npm run inject-backend && ng serve --poll 1000"
1313
},
1414
"private": true,
1515
"dependencies": {

src/app/components/chat/chat.component.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

src/app/components/pending-event-dialog/pending-event-dialog.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export class PendingEventDialogComponent {
7979
'role': 'user',
8080
'parts': [],
8181
},
82+
invocationId: this.data.invocationId
8283
};
8384
if (this.selectedEvent.response) {
8485
req.functionCallEventId = this.functionCallEventId;

src/app/core/models/AgentRunRequest.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ export interface AgentRunRequest {
2929
functionCallEventId?: string;
3030
streaming?: boolean;
3131
stateDelta?: any;
32+
invocationId?: string;
3233
}

0 commit comments

Comments
 (0)