Skip to content

Commit 1995722

Browse files
authored
fix(codewhisperer): hide status bar if not connected #3402
1 parent 787d60e commit 1995722

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-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 status bar showing even when not in use"
4+
}

src/codewhisperer/commands/basicCommands.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,9 @@ async function showCodeWhispererWelcomeMessage(context: ExtContext): Promise<voi
147147
export const refreshStatusBar = Commands.declare('aws.codeWhisperer.refreshStatusBar', () => () => {
148148
if (AuthUtil.instance.isConnectionValid()) {
149149
InlineCompletionService.instance.setCodeWhispererStatusBarOk()
150-
} else {
150+
} else if (AuthUtil.instance.isConnectionExpired()) {
151151
InlineCompletionService.instance.setCodeWhispererStatusBarDisconnected()
152+
} else {
153+
InlineCompletionService.instance.hideCodeWhispererStatusBar()
152154
}
153155
})

src/codewhisperer/service/inlineCompletionService.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,7 @@ export class InlineCompletionService {
500500
}
501501

502502
hideCodeWhispererStatusBar() {
503+
this._isPaginationRunning = false
503504
this.statusBar.hide()
504505
}
505506

0 commit comments

Comments
 (0)