1395
const sendRequestInternal = async () => {
1396
const progressCallback = (progress: IChatProgress[]) => {
1398
return;
1399
}
1401
>
if (!gotProgress) {
1402
>
markChat(sessionResource, ChatPerfMark.FirstToken);
1403
>
}
1404
>
gotProgress = true;
1405
>
1406
>
for (let i = 0; i < progress.length; i++) {
1407
>
const isLast = i === progress.length - 1;
1408
>
const progressItem = progress[i];
1409
>
1410
>
if (progressItem.kind === 'markdownContent') {
1411
this.trace('sendRequest', `Provider returned progress for session ${model.sessionResource}, ${progressItem.content.value.length} chars`);
1413
this.trace('sendRequest', `Provider returned progress: ${JSON.stringify(progressItem)}`);
1414
}
1416
>
if (request) {
1417
>
model.acceptResponseProgress(request, progressItem, !isLast);
1418
>
}
1419
>
}
1420
>
completeResponseCreated();
1421
>
};
1422
1423
let detectedAgent: IChatAgentData | undefined;