File tree Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Expand file tree Collapse file tree 1 file changed +18
-8
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,25 @@ export class SessionLogViewManager extends Disposable implements vscode.WebviewP
39
39
this . _register ( vscode . window . registerWebviewPanelSerializer ( SessionLogViewManager . viewType , this ) ) ;
40
40
41
41
this . _register ( vscode . commands . registerCommand ( 'codingAgent.openSessionLog' , async ( ) => {
42
- const copilotApi = await getCopilotApi ( credentialStore ) ;
43
- if ( ! copilotApi ) {
44
- vscode . window . showErrorMessage ( vscode . l10n . t ( 'You must be authenticated to view sessions.' ) ) ;
45
- return ;
46
- }
42
+ const allSessions = await vscode . window . withProgress ( {
43
+ location : vscode . ProgressLocation . Window ,
44
+ title : vscode . l10n . t ( 'Loading sessions...' )
45
+ } , async ( ) => {
46
+ const copilotApi = await getCopilotApi ( credentialStore ) ;
47
+ if ( ! copilotApi ) {
48
+ vscode . window . showErrorMessage ( vscode . l10n . t ( 'You must be authenticated to view sessions.' ) ) ;
49
+ return ;
50
+ }
51
+
52
+ const allSessions = await copilotApi . getAllSessions ( undefined ) ;
53
+ if ( ! allSessions ?. length ) {
54
+ vscode . window . showErrorMessage ( vscode . l10n . t ( 'No sessions found.' ) ) ;
55
+ return ;
56
+ }
57
+ return allSessions ;
58
+ } ) ;
47
59
48
- const allSessions = await copilotApi . getAllSessions ( undefined ) ;
49
- if ( ! allSessions . length ) {
50
- vscode . window . showErrorMessage ( vscode . l10n . t ( 'No sessions found.' ) ) ;
60
+ if ( ! allSessions ?. length ) {
51
61
return ;
52
62
}
53
63
You can’t perform that action at this time.
0 commit comments