Skip to content

Commit 1d65e43

Browse files
committed
fix(web): exclude project-only remote editors from file actions
1 parent 35a6994 commit 1d65e43

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

‎apps/web/src/fileContextMenu.ts‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import {
22
buildRemoteOpenUrl,
33
EDITORS,
4+
remoteSchemeForEditor,
45
type ContextMenuItem,
56
type EditorId,
67
type EnvironmentId,
@@ -117,10 +118,11 @@ export function useFileContextMenu(environmentId: EnvironmentId | null) {
117118
const isLocal = remote.mode === "local-exec";
118119
// Away from the server's machine, editors open over SSH on this machine, which
119120
// only works for editors with a remote URL scheme and can't reveal files.
121+
// JetBrains SSH URLs open projects rather than individual files.
120122
const availableEditors = isLocal
121123
? (serverConfig?.availableEditors ?? [])
122124
: remote.mode === "remote-links"
123-
? remoteCapableEditors
125+
? remoteCapableEditors.filter((id) => remoteSchemeForEditor(id) !== "jetbrains")
124126
: [];
125127
const [preferredEditor] = usePreferredEditor(availableEditors);
126128
const capabilities: FileContextMenuCapabilities = {

0 commit comments

Comments
 (0)