diff --git a/CHANGELOG.md b/CHANGELOG.md index f07f13fb..8725a127 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ - Update `/openDevContainer` to support all dev container features when hostPath and configFile are provided. +- Add `coder.disableUpdateNotifications` setting to disable workspace template + update notifications. ## [v1.9.2](https://github.com/coder/vscode-coder/releases/tag/v1.9.2) 2025-06-25 diff --git a/package.json b/package.json index e3e7556a..7896243e 100644 --- a/package.json +++ b/package.json @@ -109,6 +109,11 @@ "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.", "type": "boolean", "default": false + }, + "coder.disableUpdateNotifications": { + "markdownDescription": "Disable notifications when workspace template updates are available.", + "type": "boolean", + "default": false } } }, diff --git a/src/workspaceMonitor.ts b/src/workspaceMonitor.ts index 18df50b2..189d444a 100644 --- a/src/workspaceMonitor.ts +++ b/src/workspaceMonitor.ts @@ -171,7 +171,16 @@ export class WorkspaceMonitor implements vscode.Disposable { private maybeNotifyOutdated(workspace: Workspace) { if (!this.notifiedOutdated && workspace.outdated) { + // Check if update notifications are disabled + const disableNotifications = vscode.workspace + .getConfiguration("coder") + .get("disableUpdateNotifications", false); + if (disableNotifications) { + return; + } + this.notifiedOutdated = true; + this.restClient .getTemplate(workspace.template_id) .then((template) => {