File tree Expand file tree Collapse file tree 2 files changed +32
-1
lines changed
Expand file tree Collapse file tree 2 files changed +32
-1
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,19 @@ func IsCursorExtensionInstalled(extensionID string) (bool, error) {
120120 if err != nil {
121121 return false , breverrors .WrapAndTrace (err )
122122 }
123- return strings .Contains (string (out ), extensionID ), nil
123+
124+ // Check for the original extension ID
125+ if strings .Contains (string (out ), extensionID ) {
126+ return true , nil
127+ }
128+
129+ // Check for Cursor-specific extension ID mappings
130+ cursorEquivalent := mapVSCodeToCursorExtension (extensionID )
131+ if cursorEquivalent != "" && strings .Contains (string (out ), cursorEquivalent ) {
132+ return true , nil
133+ }
134+
135+ return false , nil
124136}
125137
126138func InstallWindsurfExtension (extensionID string ) error {
@@ -268,3 +280,12 @@ var commonWindsurfPaths = []string{
268280 "/usr/local/share/windsurf/bin/windsurf" ,
269281 "/usr/share/windsurf/bin/windsurf" ,
270282}
283+
284+ // mapVSCodeToCursorExtension maps VSCode extension IDs to their Cursor equivalents
285+ func mapVSCodeToCursorExtension (vscodeExtensionID string ) string {
286+ cursorMappings := map [string ]string {
287+ "ms-vscode-remote.remote-ssh" : "anysphere.remote-ssh" ,
288+ // Add more mappings here as we discover them
289+ }
290+ return cursorMappings [vscodeExtensionID ]
291+ }
Original file line number Diff line number Diff line change @@ -21,3 +21,13 @@ func TestBasePath(t *testing.T) {
2121 b := RemoveFileExtenstion (x )
2222 assert .Equal (t , "abc/setup" , b )
2323}
24+
25+ func TestMapVSCodeToCursorExtension (t * testing.T ) {
26+ // Test known mapping
27+ result := mapVSCodeToCursorExtension ("ms-vscode-remote.remote-ssh" )
28+ assert .Equal (t , "anysphere.remote-ssh" , result )
29+
30+ // Test unknown extension (should return empty string)
31+ result = mapVSCodeToCursorExtension ("unknown.extension" )
32+ assert .Equal (t , "" , result )
33+ }
You can’t perform that action at this time.
0 commit comments