File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
core/src/codewhisperer/commands Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -34,6 +34,7 @@ import {
3434 vsCodeState ,
3535 inlineCompletionsDebounceDelay ,
3636 noInlineSuggestionsMsg ,
37+ ReferenceInlineProvider ,
3738} from 'aws-core-vscode/codewhisperer'
3839import { InlineGeneratingMessage } from './inlineGeneratingMessage'
3940import { LineTracker } from './stateTracker/lineTracker'
@@ -123,6 +124,16 @@ export class InlineCompletionManager implements Disposable {
123124 )
124125 ReferenceLogViewProvider . instance . addReferenceLog ( referenceLog )
125126 ReferenceHoverProvider . instance . addCodeReferences ( item . insertText as string , item . references )
127+
128+ // Show codelense for 5 seconds.
129+ ReferenceInlineProvider . instance . setInlineReference (
130+ startLine ,
131+ item . insertText as string ,
132+ item . references
133+ )
134+ setTimeout ( ( ) => {
135+ ReferenceInlineProvider . instance . removeInlineReference ( )
136+ } , 5000 )
126137 }
127138 if ( item . mostRelevantMissingImports ?. length ) {
128139 await ImportAdderProvider . instance . onAcceptRecommendation ( editor , item , startLine )
Original file line number Diff line number Diff line change @@ -144,7 +144,7 @@ export const showReferenceLog = Commands.declare(
144144 if ( _ !== placeholder ) {
145145 source = 'ellipsesMenu'
146146 }
147- await vscode . commands . executeCommand ( 'workbench.view.extension.aws-codewhisperer-reference-log' )
147+ await vscode . commands . executeCommand ( ` ${ ReferenceLogViewProvider . viewType } .focus` )
148148 }
149149)
150150
You can’t perform that action at this time.
0 commit comments