Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test": "ng test",
"clean-config": "node clean-backend.js",
"inject-backend": "node set-backend.js",
"serve": "npm run clean-config && npm run inject-backend && ng serve"
"serve": "npm run clean-config && npm run inject-backend && ng serve --poll 1000"
},
"private": true,
"dependencies": {
Expand Down
11 changes: 6 additions & 5 deletions src/app/components/chat/chat.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -615,8 +615,8 @@ export class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
}

if (e?.longRunningToolIds && e.longRunningToolIds.length > 0) {
this.getAsyncFunctionsFromParts(e.longRunningToolIds, e.content.parts);
const func = this.longRunningEvents[0];
this.getAsyncFunctionsFromParts(e.longRunningToolIds, e.content.parts, e.invocationId);
const func = this.longRunningEvents[0].function;
if (func.args.authConfig &&
func.args.authConfig.exchangedAuthCredential &&
func.args.authConfig.exchangedAuthCredential.oauth2) {
Expand Down Expand Up @@ -874,11 +874,12 @@ export class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
const dialogRef = this.dialog.open(PendingEventDialogComponent, {
width: '600px',
data: {
event: this.longRunningEvents[0],
event: this.longRunningEvents[0].function,
appName: this.appName,
userId: this.userId,
sessionId: this.sessionId,
functionCallEventId: this.functionCallEventId,
invocationId: this.longRunningEvents[0].invocationId
},
});

Expand Down Expand Up @@ -1028,10 +1029,10 @@ export class ChatComponent implements OnInit, AfterViewInit, OnDestroy {
this.isVideoRecording = false;
}

private getAsyncFunctionsFromParts(pendingIds: any[], parts: any[]) {
private getAsyncFunctionsFromParts(pendingIds: any[], parts: any[], invocationId: string) {
for (const part of parts) {
if (part.functionCall && pendingIds.includes(part.functionCall.id)) {
this.longRunningEvents.push(part.functionCall);
this.longRunningEvents.push({function: part.functionCall, invocationId: invocationId});
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export class PendingEventDialogComponent {
'role': 'user',
'parts': [],
},
invocationId: this.data.invocationId
};
if (this.selectedEvent.response) {
req.functionCallEventId = this.functionCallEventId;
Expand Down
1 change: 1 addition & 0 deletions src/app/core/models/AgentRunRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,4 +29,5 @@ export interface AgentRunRequest {
functionCallEventId?: string;
streaming?: boolean;
stateDelta?: any;
invocationId?: string;
}