Skip to content

Commit 17d34d6

Browse files
Add configuration option to disable workspace update notifications
Adds coder.disableUpdateNotifications setting to allow users to disable the popup notifications when workspace template updates are available. Co-authored-by: kylecarbs <7122116+kylecarbs@users.noreply.github.com>
1 parent e0adfb8 commit 17d34d6

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

package.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,11 @@
109109
"markdownDescription": "Automatically log into the default URL when the extension is activated. coder.defaultUrl is preferred, otherwise the CODER_URL environment variable will be used. This setting has no effect if neither is set.",
110110
"type": "boolean",
111111
"default": false
112+
},
113+
"coder.disableUpdateNotifications": {
114+
"markdownDescription": "Disable notifications when workspace template updates are available.",
115+
"type": "boolean",
116+
"default": false
112117
}
113118
}
114119
},

src/workspaceMonitor.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ export class WorkspaceMonitor implements vscode.Disposable {
172172
private maybeNotifyOutdated(workspace: Workspace) {
173173
if (!this.notifiedOutdated && workspace.outdated) {
174174
this.notifiedOutdated = true;
175+
176+
// Check if update notifications are disabled
177+
const disableNotifications = vscode.workspace.getConfiguration("coder").get<boolean>("disableUpdateNotifications", false);
178+
if (disableNotifications) {
179+
return;
180+
}
181+
175182
this.restClient
176183
.getTemplate(workspace.template_id)
177184
.then((template) => {

0 commit comments

Comments
 (0)