vscode: fix version checks when using Windsurf (#7285)

This commit is contained in:
Bryton Hall
2025-06-16 22:31:03 -04:00
committed by GitHub
parent 0edffd088e
commit 28eef8722d

View File

@@ -438,7 +438,16 @@ in
lib.concatMap toPaths (flatten (mapAttrsToList (n: v: v.extensions) cfg.profiles))
++
lib.optional
((lib.versionAtLeast vscodeVersion "1.74.0" || vscodePname == "cursor") && defaultProfile != { })
(
(
lib.versionAtLeast vscodeVersion "1.74.0"
|| builtins.elem vscodePname [
"cursor"
"windsurf"
]
)
&& defaultProfile != { }
)
{
# Whenever our immutable extensions.json changes, force VSCode to regenerate
# extensions.json with both mutable and immutable extensions.
@@ -461,7 +470,14 @@ in
paths =
(flatten (mapAttrsToList (n: v: v.extensions) cfg.profiles))
++ lib.optional (
(lib.versionAtLeast vscodeVersion "1.74.0" || vscodePname == "cursor") && defaultProfile != { }
(
lib.versionAtLeast vscodeVersion "1.74.0"
|| builtins.elem vscodePname [
"cursor"
"windsurf"
]
)
&& defaultProfile != { }
) (extensionJsonFile "default" (extensionJson defaultProfile.extensions));
};
in