File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
packages/amazonq/src/app/inline Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -266,7 +266,8 @@ export class AmazonQInlineCompletionItemProvider implements InlineCompletionItem
266266 const prevItemMatchingPrefix = [ ]
267267 for ( const item of this . sessionManager . getActiveRecommendation ( ) ) {
268268 const text = typeof item . insertText === 'string' ? item . insertText : item . insertText . value
269- if ( text . startsWith ( prefix ) && position . isAfterOrEqual ( prevStartPosition ) ) {
269+ // if item is an Edit suggestion, insertText is a diff instead of new code contents, skip the logic to check for prefix.
270+ if ( text . startsWith ( prefix ) && position . isAfterOrEqual ( prevStartPosition ) && ! item . isInlineEdit ) {
270271 item . command = {
271272 command : 'aws.amazonq.acceptInline' ,
272273 title : 'On acceptance' ,
You can’t perform that action at this time.
0 commit comments