Skip to content

Commit 2093c59

Browse files
authored
fix(amazonq): point to the log file inside the folder (#7744)
## Problem Log folder was getting highlighted instead of the file. ## Solution Pointed to the file itself instead of the folder. --- - 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 109a674 commit 2093c59

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

packages/amazonq/src/lsp/chat/messages.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -447,13 +447,15 @@ export function registerMessageListeners(
447447
)
448448

449449
// Get the log directory path
450-
const logPath = globals.context.logUri?.fsPath
450+
const logFolderPath = globals.context.logUri?.fsPath
451451
const result = { ...message.params, success: false }
452452

453-
if (logPath) {
453+
if (logFolderPath) {
454454
// Open the log directory in the OS file explorer directly
455455
languageClient.info('[VSCode Client] Opening logs directory')
456-
await vscode.commands.executeCommand('revealFileInOS', vscode.Uri.file(logPath))
456+
const path = require('path')
457+
const logFilePath = path.join(logFolderPath, 'Amazon Q Logs.log')
458+
await vscode.commands.executeCommand('revealFileInOS', vscode.Uri.file(logFilePath))
457459
result.success = true
458460
} else {
459461
// Fallback: show error if log path is not available

0 commit comments

Comments
 (0)