mirror of
https://github.com/microsoft/vscode.git
synced 2026-08-14 09:45:55 +01:00
debt - await progress message (#194475)
This commit is contained in:
@@ -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)
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user