Skip to content

Commit 725e200

Browse files
committed
remove unnecessary logs
1 parent 4518b4a commit 725e200

File tree

5 files changed

+15
-41
lines changed

5 files changed

+15
-41
lines changed

aws-toolkit-vscode.code-workspace

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
{
1313
"path": "packages/amazonq",
1414
},
15+
{
16+
"path": "../language-servers",
17+
},
1518
],
1619
"settings": {
1720
"typescript.tsdk": "node_modules/typescript/lib",

packages/amazonq/.vscode/launch.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
1414
"env": {
1515
"SSMDOCUMENT_LANGUAGESERVER_PORT": "6010",
16-
"WEBPACK_DEVELOPER_SERVER": "http://localhost:8080"
16+
"WEBPACK_DEVELOPER_SERVER": "http://localhost:8080",
1717
// Below allows for overrides used during development
18-
// "__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/agent-standalone.js",
19-
// "__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
18+
"__AMAZONQLSP_PATH": "${workspaceFolder}/../../../language-servers/app/aws-lsp-codewhisperer-runtimes/out/agent-standalone.js",
19+
"__AMAZONQLSP_UI": "${workspaceFolder}/../../../language-servers/chat-client/build/amazonq-ui.js"
2020
},
2121
"envFile": "${workspaceFolder}/.local.env",
2222
"outFiles": ["${workspaceFolder}/dist/**/*.js", "${workspaceFolder}/../core/dist/**/*.js"],

packages/amazonq/src/autoDebug/activation.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,8 @@ export class AutoDebugFeature implements vscode.Disposable {
2929
*/
3030
async activate(): Promise<void> {
3131
try {
32-
this.logger.info('AutoDebugFeature: Activating auto debug feature')
33-
3432
// Initialize the controller first
3533
this.controller = new AutoDebugController()
36-
await this.controller.initialize()
3734

3835
// Initialize commands and pass the controller
3936
this.autoDebugCommands = new AutoDebugCommands(this.controller)
@@ -45,7 +42,6 @@ export class AutoDebugFeature implements vscode.Disposable {
4542

4643
// Add all to disposables
4744
this.disposables.push(this.controller, this.autoDebugCommands, this.codeActionsProvider)
48-
4945
this.logger.info('AutoDebugFeature: Auto debug feature activated successfully')
5046
} catch (error) {
5147
this.logger.error('AutoDebugFeature: Failed to activate auto debug feature: %s', error)
@@ -64,7 +60,6 @@ export class AutoDebugFeature implements vscode.Disposable {
6460
* Dispose of all resources
6561
*/
6662
dispose(): void {
67-
this.logger.debug('AutoDebugFeature: Disposing auto debug feature')
6863
vscode.Disposable.from(...this.disposables).dispose()
6964
}
7065
}

packages/amazonq/src/autoDebug/commands.ts

Lines changed: 9 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -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
}

packages/amazonq/src/autoDebug/controller.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -48,18 +48,6 @@ export class AutoDebugController implements vscode.Disposable {
4848
this.lspClient = new AutoDebugLspClient(client, encryptionKey)
4949
}
5050

51-
/**
52-
* Initialize the controller
53-
*/
54-
async initialize(): Promise<void> {
55-
try {
56-
this.logger.info('AutoDebugController: Initializing auto debug controller')
57-
} catch (error) {
58-
this.logger.error('AutoDebugController: Failed to initialize controller: %s', error)
59-
throw error
60-
}
61-
}
62-
6351
/**
6452
* Creates formatted error contexts for AI debugging
6553
*/
@@ -133,7 +121,6 @@ export class AutoDebugController implements vscode.Disposable {
133121
}
134122

135123
if (!targetDiagnostics || targetDiagnostics.length === 0) {
136-
void vscode.window.showInformationMessage('No problems found in the selected range')
137124
return
138125
}
139126

@@ -166,7 +153,6 @@ export class AutoDebugController implements vscode.Disposable {
166153
}
167154

168155
const filePath = editor.document.uri.fsPath
169-
const fileName = editor.document.fileName
170156

171157
try {
172158
// Get all diagnostics for the current file
@@ -185,7 +171,6 @@ export class AutoDebugController implements vscode.Disposable {
185171
})
186172

187173
if (errorDiagnostics.length === 0) {
188-
void vscode.window.showInformationMessage(`✅ No errors found in ${fileName}`)
189174
return
190175
}
191176

0 commit comments

Comments
 (0)