-
Notifications
You must be signed in to change notification settings - Fork 556
Add configuration option to show batch start/completion messages (default enabled) #20751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@microsoft-github-policy-service agree |
| ); | ||
| resultWebviewState.messages.push(message); | ||
| this.scheduleThrottledUpdate(queryRunner.uri); | ||
| let showBatchMessages: boolean = extConfig.get(Constants.configShowBatchMessages) ?? true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
|
@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 Thanks for the feedback. I've made the changes you suggested and fixed the linter errors. |
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