Skip to content

Commit 49828d7

Browse files
fix(codewhisperer): empty suggestion UI notification not shown (#4563)
* fix empty response UI prompt not being shown * changelog * fix linter error irrelated to this PR * Update .changes/next-release/Bug Fix-123af990-5e29-4d3a-aa38-63676e0b215c.json --------- Co-authored-by: Justin M. Keyes <[email protected]>
1 parent 2c4ea65 commit 49828d7

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
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: UI notification \"no suggestion\" not shown correctly"
4+
}

packages/core/src/codewhisperer/service/inlineCompletionService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,9 @@ export class InlineCompletionService {
137137
if (RecommendationHandler.instance.checkAndResetCancellationTokens()) {
138138
RecommendationHandler.instance.reportUserDecisions(-1)
139139
await vscode.commands.executeCommand('aws.codeWhisperer.refreshStatusBar')
140+
if (triggerType === 'OnDemand' && session.recommendations.length === 0) {
141+
void showTimedMessage(response.errorMessage ? response.errorMessage : noSuggestions, 2000)
142+
}
140143
return {
141144
result: 'Failed',
142145
errorMessage: 'cancelled',

0 commit comments

Comments
 (0)