Skip to content

Commit a525b62

Browse files
committed
⚡️ Add "Show Output" action to error message
1 parent 0b6a6b2 commit a525b62

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/commands/createCommandGenerateGitCommitMessage.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,12 @@ export default (context: vscode.ExtensionContext, channel: vscode.OutputChannel)
1919
}
2020
vscode.commands.executeCommand('setContext', 'gptcommit.generating', false);
2121
}).catch((err) => {
22-
vscode.window.showErrorMessage(err);
2322
vscode.commands.executeCommand('setContext', 'gptcommit.generating', false);
24-
channel.show();
23+
vscode.window.showErrorMessage(err, "Show Output").then((choice) => {
24+
if (choice === "Show Output") {
25+
channel.show();
26+
}
27+
});
2528
});
2629
}
2730
);

0 commit comments

Comments
 (0)