Skip to content

Commit b4e6e95

Browse files
committed
should show EDIT as COMPLETION if its add only
1 parent deaefee commit b4e6e95

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,12 @@ export class RecommendationService {
139139
* Edits leverage partialResultToken to achieve EditStreak such that clients can pull all continuous suggestions generated by the model within 1 EOS block.
140140
*/
141141
if (!isTriggerByDeletion && !request.partialResultToken) {
142-
const completionPromise: Promise<InlineCompletionListWithReferences> = languageClient.sendRequest(
143-
inlineCompletionWithReferencesRequestType.method,
144-
request,
145-
token
146-
)
147-
ps.push(completionPromise)
142+
// const completionPromise: Promise<InlineCompletionListWithReferences> = languageClient.sendRequest(
143+
// inlineCompletionWithReferencesRequestType.method,
144+
// request,
145+
// token
146+
// )
147+
// ps.push(completionPromise)
148148
}
149149

150150
/**
@@ -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)