Skip to content

Commit a6c89fd

Browse files
codewhisperer: loading status bar stuck on expired credentials (#3845)
Problem: - The code first sets the CW status bar to loading. - But it will return early if `AuthUtil.instance.isConnectionExpired()` fails. - The issue is when we return early we do not revert the loading status and the status bar is stuck loading. Solution: - Set the status bar to loading after `AuthUtil.instance.isConnectionExpired()` check Signed-off-by: nkomonen <[email protected]>
1 parent cb8be2d commit a6c89fd

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type": "Bug Fix",
3+
"description": "CodeWhisperer: fixed case where 'CodeWhisperer' status bar stuck loading"
4+
}

src/codewhisperer/service/inlineCompletionService.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export class InlineCompletionService {
8585
// Call report user decisions once to report recommendations leftover from last invocation.
8686
RecommendationHandler.instance.reportUserDecisions(-1)
8787

88-
this.setCodeWhispererStatusBarLoading()
8988
if (ClassifierTrigger.instance.shouldInvokeClassifier(editor.document.languageId)) {
9089
ClassifierTrigger.instance.recordClassifierResultForAutoTrigger(editor, autoTriggerType, event)
9190
}
@@ -98,6 +97,9 @@ export class InlineCompletionService {
9897
await AuthUtil.instance.notifyReauthenticate(isAutoTrigger)
9998
return
10099
}
100+
101+
this.setCodeWhispererStatusBarLoading()
102+
101103
TelemetryHelper.instance.setInvocationStartTime(performance.now())
102104
RecommendationHandler.instance.checkAndResetCancellationTokens()
103105
RecommendationHandler.instance.documentUri = editor.document.uri

0 commit comments

Comments
 (0)