Skip to content

Commit 9bab14c

Browse files
authored
deps(amazonq): remove unused code part 2 for flare inline (#7483)
## Problem ## Solution --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent f7af06d commit 9bab14c

File tree

3 files changed

+0
-82
lines changed

3 files changed

+0
-82
lines changed

packages/core/src/codewhisperer/views/activeStateController.ts

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,6 @@ export class ActiveStateController implements vscode.Disposable {
3030

3131
constructor(private readonly container: Container) {
3232
this._disposable = vscode.Disposable.from(
33-
// RecommendationService.instance.suggestionActionEvent(async (e) => {
34-
// await telemetry.withTraceId(async () => {
35-
// await this.onSuggestionActionEvent(e)
36-
// }, TelemetryHelper.instance.traceId)
37-
// }),
38-
// RecommendationHandler.instance.onDidReceiveRecommendation(async (_) => {
39-
// await this.onDidReceiveRecommendation()
40-
// }),
4133
this.container.lineTracker.onDidChangeActiveLines(async (e) => {
4234
await this.onActiveLinesChanged(e)
4335
}),
@@ -66,33 +58,6 @@ export class ActiveStateController implements vscode.Disposable {
6658
await this._refresh(vscode.window.activeTextEditor)
6759
}
6860

69-
// private async onSuggestionActionEvent(e: SuggestionActionEvent) {
70-
// if (!this._isReady) {
71-
// return
72-
// }
73-
74-
// this.clear(e.editor) // do we need this?
75-
// if (e.triggerType === 'OnDemand' && e.isRunning) {
76-
// // if user triggers on demand, immediately update the UI and cancel the previous debounced update if there is one
77-
// this.refreshDebounced.cancel()
78-
// await this._refresh(this._editor)
79-
// } else {
80-
// await this.refreshDebounced.promise(e.editor)
81-
// }
82-
// }
83-
84-
// private async onDidReceiveRecommendation() {
85-
// if (!this._isReady) {
86-
// return
87-
// }
88-
89-
// if (this._editor && this._editor === vscode.window.activeTextEditor) {
90-
// // receives recommendation, immediately update the UI and cacnel the debounced update if there is one
91-
// this.refreshDebounced.cancel()
92-
// await this._refresh(this._editor, false)
93-
// }
94-
// }
95-
9661
private async onActiveLinesChanged(e: LinesChangeEvent) {
9762
if (!this._isReady) {
9863
return

packages/core/src/codewhisperer/views/lineAnnotationController.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,11 @@ import { LineSelection, LinesChangeEvent } from '../tracker/lineTracker'
99
import { isTextEditor } from '../../shared/utilities/editorUtilities'
1010
import { cancellableDebounce } from '../../shared/utilities/functionUtils'
1111
import { subscribeOnce } from '../../shared/utilities/vsCodeUtils'
12-
// import { RecommendationService } from '../service/recommendationService'
1312
import { AnnotationChangeSource, inlinehintKey } from '../models/constants'
1413
import globals from '../../shared/extensionGlobals'
1514
import { Container } from '../service/serviceContainer'
1615
import { telemetry } from '../../shared/telemetry/telemetry'
1716
import { getLogger } from '../../shared/logger/logger'
18-
// import { session } from '../util/codeWhispererSession'
19-
// import { RecommendationHandler } from '../service/recommendationHandler'
2017
import { runtimeLanguageContext } from '../util/runtimeLanguageContext'
2118
import { 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

packages/toolkit/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -255,10 +255,6 @@
255255
"type": "boolean",
256256
"default": false
257257
},
258-
"amazonqLSPInlineChat": {
259-
"type": "boolean",
260-
"default": false
261-
},
262258
"amazonqChatLSP": {
263259
"type": "boolean",
264260
"default": true

0 commit comments

Comments
 (0)