Skip to content

Commit 2accbd5

Browse files
fix(amazonq): dont show completion suggestion if it's trigged by deletion (#8124)
## Problem ## Solution --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. --------- Co-authored-by: Boyu <[email protected]>
1 parent 7902e03 commit 2accbd5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/amazonq/src/app/inline/recommendationService.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,9 @@ export class RecommendationService {
189189
})
190190

191191
if (result.items.length > 0 && result.items[0].isInlineEdit === false) {
192+
if (isTriggerByDeletion) {
193+
return []
194+
}
192195
// Completion will not be rendered if an edit suggestion has been active for longer than 1 second
193196
if (EditSuggestionState.isEditSuggestionDisplayingOverOneSecond()) {
194197
const session = this.sessionManager.getActiveSession()

0 commit comments

Comments
 (0)