File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -32,8 +32,8 @@ async function activate(context) {
3232 context . subscriptions . push ( statusBarItem ) ;
3333
3434 context . subscriptions . push (
35- vscode . commands . registerCommand ( 'githubCopilotUsage.refresh' , ( ) => refresh ( ) ) ,
36- vscode . commands . registerCommand ( 'githubCopilotUsage.signIn' , ( ) => refresh ( true ) ) ,
35+ vscode . commands . registerCommand ( 'githubCopilotUsage.refresh' , ( ) => refresh ( false , true ) ) ,
36+ vscode . commands . registerCommand ( 'githubCopilotUsage.signIn' , ( ) => refresh ( true , true ) ) ,
3737 vscode . workspace . onDidChangeConfiguration ( ( e ) => {
3838 if ( e . affectsConfiguration ( 'githubCopilotUsage' ) ) {
3939 resetTimer ( ) ;
@@ -58,16 +58,17 @@ function deactivate() {
5858
5959/**
6060 * @param {boolean } [promptSignIn]
61+ * @param {boolean } [isManual] Only show loading indicator for user-initiated refreshes.
6162 */
62- async function refresh ( promptSignIn = false ) {
63+ async function refresh ( promptSignIn = false , isManual = false ) {
6364 if ( deactivated ) return ;
6465 if ( promptSignIn ) pendingSignIn = true ; // record intent even if in-flight
6566 if ( refreshInFlight ) return ;
6667
6768 const doSignIn = pendingSignIn ;
6869 pendingSignIn = false ;
6970 refreshInFlight = true ;
70- showLoading ( ) ;
71+ if ( isManual ) showLoading ( ) ;
7172 try {
7273 let session ;
7374 try {
You can’t perform that action at this time.
0 commit comments