Skip to content

Commit ef6f73f

Browse files
committed
feat(amazonq): basic paginated suggestions using language server
1 parent ee6c3db commit ef6f73f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,24 +103,24 @@ export class InlineCompletionManager implements Disposable {
103103

104104
const prevCommand = Commands.declare('editor.action.inlineSuggest.showPrevious', () => async () => {
105105
SessionManager.instance.decrementActiveIndex()
106+
await commands.executeCommand('editor.action.inlineSuggest.hide')
106107
this.disposable.dispose()
107108
this.disposable = languages.registerInlineCompletionItemProvider(
108109
CodeWhispererConstants.platformLanguageIds,
109110
new AmazonQInlineCompletionItemProvider(this.languageClient, false)
110111
)
111-
await commands.executeCommand('editor.action.inlineSuggest.hide')
112112
await commands.executeCommand('editor.action.inlineSuggest.trigger')
113113
})
114114
prevCommand.register()
115115

116116
const nextCommand = Commands.declare('editor.action.inlineSuggest.showNext', () => async () => {
117117
SessionManager.instance.incrementActiveIndex()
118+
await commands.executeCommand('editor.action.inlineSuggest.hide')
118119
this.disposable.dispose()
119120
this.disposable = languages.registerInlineCompletionItemProvider(
120121
CodeWhispererConstants.platformLanguageIds,
121122
new AmazonQInlineCompletionItemProvider(this.languageClient, false)
122123
)
123-
await commands.executeCommand('editor.action.inlineSuggest.hide')
124124
await commands.executeCommand('editor.action.inlineSuggest.trigger')
125125
})
126126
nextCommand.register()

0 commit comments

Comments
 (0)