@@ -9,14 +9,11 @@ import { LineSelection, LinesChangeEvent } from '../tracker/lineTracker'
99import { isTextEditor } from '../../shared/utilities/editorUtilities'
1010import { cancellableDebounce } from '../../shared/utilities/functionUtils'
1111import { subscribeOnce } from '../../shared/utilities/vsCodeUtils'
12- // import { RecommendationService } from '../service/recommendationService'
1312import { AnnotationChangeSource , inlinehintKey } from '../models/constants'
1413import globals from '../../shared/extensionGlobals'
1514import { Container } from '../service/serviceContainer'
1615import { telemetry } from '../../shared/telemetry/telemetry'
1716import { getLogger } from '../../shared/logger/logger'
18- // import { session } from '../util/codeWhispererSession'
19- // import { RecommendationHandler } from '../service/recommendationHandler'
2017import { runtimeLanguageContext } from '../util/runtimeLanguageContext'
2118import { setContext } from '../../shared/vscode/setContext'
2219
@@ -73,13 +70,6 @@ export class AutotriggerState implements AnnotationState {
7370 static acceptedCount = 0
7471
7572 updateState ( changeSource : AnnotationChangeSource , force : boolean ) : AnnotationState | undefined {
76- // if (AutotriggerState.acceptedCount < RecommendationService.instance.acceptedSuggestionCount) {
77- // return new ManualtriggerState()
78- // } else if (session.recommendations.length > 0 && RecommendationHandler.instance.isSuggestionVisible()) {
79- // return new PressTabState()
80- // } else {
81- // return this
82- // }
8373 return undefined
8474 }
8575
@@ -267,28 +257,6 @@ export class LineAnnotationController implements vscode.Disposable {
267257 subscribeOnce ( this . container . lineTracker . onReady ) ( async ( _ ) => {
268258 await this . onReady ( )
269259 } ) ,
270- // RecommendationService.instance.suggestionActionEvent(async (e) => {
271- // await telemetry.withTraceId(async () => {
272- // if (!this._isReady) {
273- // return
274- // }
275-
276- // if (this._currentState instanceof ManualtriggerState) {
277- // if (e.triggerType === 'OnDemand' && this._currentState.hasManualTrigger === false) {
278- // this._currentState.hasManualTrigger = true
279- // }
280- // if (
281- // e.response?.recommendationCount !== undefined &&
282- // e.response?.recommendationCount > 0 &&
283- // this._currentState.hasValidResponse === false
284- // ) {
285- // this._currentState.hasValidResponse = true
286- // }
287- // }
288-
289- // await this.refresh(e.editor, 'codewhisperer')
290- // }, TelemetryHelper.instance.traceId)
291- // }),
292260 this . container . lineTracker . onDidChangeActiveLines ( async ( e ) => {
293261 await this . onActiveLinesChanged ( e )
294262 } ) ,
@@ -300,17 +268,6 @@ export class LineAnnotationController implements vscode.Disposable {
300268 this . container . auth . secondaryAuth . onDidChangeActiveConnection ( async ( ) => {
301269 await this . refresh ( vscode . window . activeTextEditor , 'editor' )
302270 } )
303- // Commands.register('aws.amazonq.dismissTutorial', async () => {
304- // const editor = vscode.window.activeTextEditor
305- // if (editor) {
306- // this.clear()
307- // try {
308- // telemetry.ui_click.emit({ elementId: `dismiss_${this._currentState.id}` })
309- // } catch (_) {}
310- // await this.dismissTutorial()
311- // getLogger().debug(`codewhisperer: user dismiss tutorial.`)
312- // }
313- // })
314271 )
315272 }
316273
0 commit comments