Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
microsoft
GitHub Repository: microsoft/vscode
Path: blob/main/extensions/copilot/src/util/common/progressRecorder.ts
13397 views
1
/*---------------------------------------------------------------------------------------------
2
* Copyright (c) Microsoft Corporation. All rights reserved.
3
* Licensed under the MIT License. See License.txt in the project root for license information.
4
*--------------------------------------------------------------------------------------------*/
5
6
import type * as vscode from 'vscode';
7
8
export class RecordedProgress<T> implements vscode.Progress<T> {
9
private readonly _items: T[] = [];
10
11
public get items(): readonly T[] {
12
return this._items;
13
}
14
15
constructor(
16
private readonly _progress: vscode.Progress<T>,
17
) { }
18
19
report(value: T): void {
20
this._items.push(value);
21
this._progress.report(value);
22
}
23
}
24