Add configuration option to show batch start/completion messages (default enabled) - #20751
Add configuration option to show batch start/completion messages (default enabled)#20751Adam Hartford (adamhartford) wants to merge 3 commits into
Conversation
|
@microsoft-github-policy-service agree |
2eb3692 to
f948e13
Compare
| ); | ||
| resultWebviewState.messages.push(message); | ||
| this.scheduleThrottledUpdate(queryRunner.uri); | ||
| let showBatchMessages: boolean = extConfig.get(Constants.configShowBatchMessages) ?? true; |
There was a problem hiding this comment.
default value in the config definition should handle the ?? true case already
| this.scheduleThrottledUpdate(queryRunner.uri); | ||
| let showBatchMessages: boolean = extConfig.get(Constants.configShowBatchMessages) ?? true; | ||
|
|
||
| if (showBatchMessages) { |
There was a problem hiding this comment.
since checking this flag would be an early bail-out, it'd be a bit cleaner to do
if (showBatchMesssages === false) {
return;
}
and leave the rest untouched
|
Carlos Robles (@croblesm) Karl Burtram (@kburtram) Thoughts on taking this? |
|
Adam Hartford (@adamhartford) looks like the test build is failing due to linter errors; can you clean those up? Should be able to just run the vscode formatter. |
|
Benjin Dubishar (@Benjin) Thanks for the feedback. I've made the changes you suggested and fixed the linter errors. |
|
Hey Adam Hartford (@adamhartford), this fell through the cracks on our end; sorry about that. We're happy to take it, but will need to rebase a lot of code at this point. If you're still interested in contributing this, can you resubmit a new PR? Otherwise, I'll pull it in (and credit you, of course!) |
This PR adds a new configuration option
mssql.showBatchMessagesthat allows users to control the display of batch start and completion messages in the SQL output panel.Problem: When executing large SQL files (thousands of lines), the output panel becomes cluttered with "Started executing query at..." and "Commands completed successfully" messages, making it difficult to spot actual error messages. This differs from SQL Server Management Studio behavior, which doesn't show these verbose batch messages by default.
Solution: Added a configurable option that:
true(preserves current behavior for backward compatibility)false, suppresses batch start/completion messages while preserving all error messages