@@ -25,8 +25,6 @@ export class AutoDebugCommands implements vscode.Disposable {
2525 * Register all auto debug commands
2626 */
2727 registerCommands ( context : vscode . ExtensionContext ) : void {
28- this . logger . debug ( 'AutoDebugCommands: Registering auto debug commands' )
29-
3028 this . disposables . push (
3129 // Fix with Amazon Q command
3230 Commands . register (
@@ -72,21 +70,15 @@ export class AutoDebugCommands implements vscode.Disposable {
7270
7371 // Add all disposables to context
7472 context . subscriptions . push ( ...this . disposables )
75-
76- this . logger . debug ( 'AutoDebugCommands: All auto debug commands registered successfully' )
7773 }
7874
7975 /**
8076 * Fix with Amazon Q - fixes only the specific issues the user selected
8177 */
8278 private async fixWithAmazonQ ( range ?: vscode . Range , diagnostics ?: vscode . Diagnostic [ ] ) : Promise < void > {
8379 try {
84- this . logger . debug ( 'AutoDebugCommands: Fix with Amazon Q triggered' )
85-
8680 const editor = vscode . window . activeTextEditor
8781 if ( ! editor ) {
88- this . logger . warn ( 'AutoDebugCommands: No active editor for fixWithAmazonQ' )
89- void vscode . window . showWarningMessage ( 'No active editor found' )
9082 return
9183 }
9284
@@ -97,7 +89,9 @@ export class AutoDebugCommands implements vscode.Disposable {
9789 await this . controller . fixSpecificProblems ( range , diagnostics )
9890 } catch ( error ) {
9991 this . logger . error ( 'AutoDebugCommands: Error in Fix with Amazon Q: %s' , error )
100- void vscode . window . showErrorMessage ( 'Failed to fix problems with Amazon Q' )
92+ void vscode . window . showErrorMessage (
93+ 'Amazon Q was not able to fix or explain the problem. Try again shortly'
94+ )
10195 }
10296 }
10397
@@ -106,11 +100,8 @@ export class AutoDebugCommands implements vscode.Disposable {
106100 */
107101 private async fixAllWithAmazonQ ( ) : Promise < void > {
108102 try {
109- this . logger . debug ( 'AutoDebugCommands: Fix All with Amazon Q triggered' )
110-
111103 const editor = vscode . window . activeTextEditor
112104 if ( ! editor ) {
113- void vscode . window . showWarningMessage ( 'No active editor found' )
114105 return
115106 }
116107
@@ -121,7 +112,9 @@ export class AutoDebugCommands implements vscode.Disposable {
121112 await this . controller . fixAllProblemsInFile ( 10 ) // 10 errors per batch
122113 } catch ( error ) {
123114 this . logger . error ( 'AutoDebugCommands: Error in Fix All with Amazon Q: %s' , error )
124- void vscode . window . showErrorMessage ( 'Failed to fix all problems with Amazon Q' )
115+ void vscode . window . showErrorMessage (
116+ 'Amazon Q was not able to fix or explain the problem. Try again shortly'
117+ )
125118 }
126119 }
127120
@@ -130,8 +123,6 @@ export class AutoDebugCommands implements vscode.Disposable {
130123 */
131124 private async explainProblem ( range ?: vscode . Range , diagnostics ?: vscode . Diagnostic [ ] ) : Promise < void > {
132125 try {
133- this . logger . debug ( 'AutoDebugCommands: Explain Problem triggered' )
134-
135126 const editor = vscode . window . activeTextEditor
136127 if ( ! editor ) {
137128 this . logger . warn ( 'AutoDebugCommands: No active editor for explainProblem' )
@@ -145,7 +136,9 @@ export class AutoDebugCommands implements vscode.Disposable {
145136 await this . controller . explainProblems ( range , diagnostics )
146137 } catch ( error ) {
147138 this . logger . error ( 'AutoDebugCommands: Error explaining problem: %s' , error )
148- void vscode . window . showErrorMessage ( 'Failed to explain problem with Amazon Q' )
139+ void vscode . window . showErrorMessage (
140+ 'Amazon Q was not able to fix or explain the problem. Try again shortly'
141+ )
149142 }
150143 }
151144
@@ -158,7 +151,6 @@ export class AutoDebugCommands implements vscode.Disposable {
158151
159152 const editor = vscode . window . activeTextEditor
160153 if ( ! editor ) {
161- void vscode . window . showWarningMessage ( 'No active editor found' )
162154 return
163155 }
164156
@@ -174,7 +166,6 @@ export class AutoDebugCommands implements vscode.Disposable {
174166 * Dispose of all resources
175167 */
176168 dispose ( ) : void {
177- this . logger . debug ( 'AutoDebugCommands: Disposing auto debug commands' )
178169 vscode . Disposable . from ( ...this . disposables ) . dispose ( )
179170 }
180171}
0 commit comments