Skip to content

Commit 991bb70

Browse files
committed
remove redundant constructor
1 parent 276b2f3 commit 991bb70

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

packages/amazonq/src/lsp/autoDebug/activation.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,16 @@ export class AutoDebugFeature implements vscode.Disposable {
3131
// Initialize the controller first
3232
this.controller = new AutoDebugController()
3333

34-
// Initialize commands and pass the controller
35-
this.autoDebugCommands = new AutoDebugCommands(this.controller)
36-
this.autoDebugCommands.registerCommands(this.context)
34+
// Initialize commands and register them with the controller
35+
this.autoDebugCommands = new AutoDebugCommands()
36+
this.autoDebugCommands.registerCommands(this.context, this.controller)
3737

3838
// Initialize code actions provider
3939
this.codeActionsProvider = new AutoDebugCodeActionsProvider()
4040
this.context.subscriptions.push(this.codeActionsProvider)
4141

4242
// Add all to disposables
4343
this.disposables.push(this.controller, this.autoDebugCommands, this.codeActionsProvider)
44-
this.logger.info('AutoDebugFeature: Auto debug feature activated successfully')
4544
} catch (error) {
4645
this.logger.error('AutoDebugFeature: Failed to activate auto debug feature: %s', error)
4746
throw error

packages/amazonq/src/lsp/autoDebug/commands.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,13 @@ import { AutoDebugController } from './controller'
1414
export class AutoDebugCommands implements vscode.Disposable {
1515
private readonly logger = getLogger()
1616
private readonly disposables: vscode.Disposable[] = []
17-
18-
constructor(private readonly controller: AutoDebugController) {
19-
this.logger.debug('AutoDebugCommands: Initializing auto debug commands')
20-
}
17+
private controller!: AutoDebugController
2118

2219
/**
2320
* Register all auto debug commands
2421
*/
25-
registerCommands(context: vscode.ExtensionContext): void {
22+
registerCommands(context: vscode.ExtensionContext, controller: AutoDebugController): void {
23+
this.controller = controller
2624
this.disposables.push(
2725
// Fix with Amazon Q command
2826
Commands.register(

0 commit comments

Comments
 (0)