Skip to content

Commit 8a1ae26

Browse files
Add setting to disable workspace update notifications (#556)
Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> Co-authored-by: kylecarbs <[email protected]>
1 parent e0adfb8 commit 8a1ae26

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
- Update `/openDevContainer` to support all dev container features when hostPath
66
and configFile are provided.
7+
- Add `coder.disableUpdateNotifications` setting to disable workspace template
8+
update notifications.
79

810
## [v1.9.2](https://github.com/coder/vscode-coder/releases/tag/v1.9.2) 2025-06-25
911

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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,16 @@ export class WorkspaceMonitor implements vscode.Disposable {
171171

172172
private maybeNotifyOutdated(workspace: Workspace) {
173173
if (!this.notifiedOutdated && workspace.outdated) {
174+
// Check if update notifications are disabled
175+
const disableNotifications = vscode.workspace
176+
.getConfiguration("coder")
177+
.get<boolean>("disableUpdateNotifications", false);
178+
if (disableNotifications) {
179+
return;
180+
}
181+
174182
this.notifiedOutdated = true;
183+
175184
this.restClient
176185
.getTemplate(workspace.template_id)
177186
.then((template) => {

0 commit comments

Comments
 (0)