debt - await progress message (#194475)

This commit is contained in:
Johannes Rieken
2023-09-29 13:20:41 +02:00
committed by GitHub
parent 5eafb0a6f2
commit e8fa82b65f
2 changed files with 3 additions and 3 deletions
@@ -69,7 +69,7 @@ export class MainThreadInlineChat implements MainThreadInlineChatShape {
}
async $handleProgressChunk(requestId: string, chunk: { message?: string | undefined; edits?: TextEdit[] | undefined }): Promise<void> {
this._progresses.get(requestId)?.report(chunk);
await Promise.resolve(this._progresses.get(requestId)?.report(chunk));
}
async $unregisterInteractiveEditorProvider(handle: number): Promise<void> {
@@ -153,7 +153,7 @@ export class ExtHostInteractiveEditor implements ExtHostInlineChatShape {
let done = false;
const progress: vscode.Progress<{ message?: string; edits?: vscode.TextEdit[] }> = {
report: value => {
report: async value => {
if (!request.live) {
throw new Error('Progress reporting is only supported for live sessions');
}
@@ -163,7 +163,7 @@ export class ExtHostInteractiveEditor implements ExtHostInlineChatShape {
if (!value.message && !value.edits) {
return;
}
this._proxy.$handleProgressChunk(request.requestId, {
await this._proxy.$handleProgressChunk(request.requestId, {
message: value.message,
edits: value.edits?.map(typeConvert.TextEdit.from)
});