diff --git a/src/plus/webviews/graph/graphWebview.ts b/src/plus/webviews/graph/graphWebview.ts index 23aa48d..cd800f6 100644 --- a/src/plus/webviews/graph/graphWebview.ts +++ b/src/plus/webviews/graph/graphWebview.ts @@ -1,5 +1,5 @@ import type { ColorTheme, ConfigurationChangeEvent, Disposable, Event, StatusBarItem } from 'vscode'; -import { EventEmitter, MarkdownString, StatusBarAlignment, ViewColumn, window } from 'vscode'; +import { EventEmitter, MarkdownString, ProgressLocation, StatusBarAlignment, ViewColumn, window } from 'vscode'; import { parseCommandContext } from '../../../commands/base'; import { GitActions } from '../../../commands/gitCommands.actions'; import type { GraphColumnConfig } from '../../../configuration'; @@ -160,7 +160,9 @@ export class GraphWebview extends WebviewBase { } protected override async includeBootstrap(): Promise { - return this.getState(); + return window.withProgress({ location: ProgressLocation.Window, title: 'Loading Commit Graph...' }, async () => + this.getState(), + ); } protected override registerCommands(): Disposable[] { @@ -371,9 +373,11 @@ export class GraphWebview extends WebviewBase { private async notifyDidChangeState() { if (!this.isReady || !this.visible) return false; - return this.notify(DidChangeNotificationType, { - state: await this.getState(), - }); + return window.withProgress({ location: ProgressLocation.Window, title: 'Loading Commit Graph...' }, async () => + this.notify(DidChangeNotificationType, { + state: await this.getState(), + }), + ); } @debug()