From c84ad98ede1a2edeab497054d89c0b67ed941626 Mon Sep 17 00:00:00 2001 From: abhraina-aws Date: Wed, 23 Jul 2025 14:33:27 -0700 Subject: [PATCH] fix(amazonq): point to the log file inside the folder --- packages/amazonq/src/lsp/chat/messages.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/amazonq/src/lsp/chat/messages.ts b/packages/amazonq/src/lsp/chat/messages.ts index 71de85f90a7..7b3b130ff85 100644 --- a/packages/amazonq/src/lsp/chat/messages.ts +++ b/packages/amazonq/src/lsp/chat/messages.ts @@ -447,13 +447,15 @@ export function registerMessageListeners( ) // Get the log directory path - const logPath = globals.context.logUri?.fsPath + const logFolderPath = globals.context.logUri?.fsPath const result = { ...message.params, success: false } - if (logPath) { + if (logFolderPath) { // Open the log directory in the OS file explorer directly languageClient.info('[VSCode Client] Opening logs directory') - await vscode.commands.executeCommand('revealFileInOS', vscode.Uri.file(logPath)) + const path = require('path') + const logFilePath = path.join(logFolderPath, 'Amazon Q Logs.log') + await vscode.commands.executeCommand('revealFileInOS', vscode.Uri.file(logFilePath)) result.success = true } else { // Fallback: show error if log path is not available