1202
1203
const parsedRequest = this.parseChatRequest(sessionResource, request, location, options);
1204
>
const silentAgent = options?.agentIdSilent ? this.chatAgentService.getAgent(options.agentIdSilent) : undefined;
chatServiceImpl.ts
1205
>
const agent = silentAgent ?? parsedRequest.parts.find((r): r is ChatRequestAgentPart => r instanceof ChatRequestAgentPart)?.agent ?? defaultAgent;
1206
>
const agentSlashCommandPart = parsedRequest.parts.find((r): r is ChatRequestAgentSubcommandPart => r instanceof ChatRequestAgentSubcommandPart);
1207
>
1208
>
// This method is only returning whether the request was accepted - don't block on the actual request
1209
>
return {
1210
>
kind: 'sent',
1211
>
newSessionResource,
1212
>
data: {
1213
>
...this._sendRequestAsync(model, sessionResource, parsedRequest, attempt, !options?.noCommandDetection, silentAgent ?? defaultAgent, location, options),
1214
>
agent,
1215
>
slashCommand: agentSlashCommandPart?.command,
1216
>
},
1217
>
};
1218
>
}
1219
1220
/**