@@ -22,6 +22,8 @@ import { Menu, MenuItem, MenuPopup, MenuShortcut, MenuTrigger } from "../ui/menu
2222import {
2323 AntigravityIcon ,
2424 CursorIcon ,
25+ FileExplorerIcon ,
26+ FinderIcon ,
2527 Icon ,
2628 KiroIcon ,
2729 TraeIcon ,
@@ -44,7 +46,7 @@ import {
4446 RustRoverIcon ,
4547 WebStormIcon ,
4648} from "../JetBrainsIcons" ;
47- import { cn } from "~/lib/utils" ;
49+ import { cn , isMacPlatform , isWindowsPlatform } from "~/lib/utils" ;
4850import { shellEnvironment } from "~/state/shell" ;
4951import { useAtomCommand } from "~/state/use-atom-command" ;
5052
@@ -55,7 +57,10 @@ type OpenInOption = {
5557 kind : "brand" | "generic" ;
5658} ;
5759
58- const resolveOptions = ( platform : string , availableEditors : ReadonlyArray < EditorId > ) => {
60+ export const resolveOpenInOptions = (
61+ platform : string ,
62+ availableEditors : ReadonlyArray < EditorId > ,
63+ ) => {
5964 const baseOptions : ReadonlyArray < Omit < OpenInOption , "label" > > = [
6065 {
6166 Icon : CursorIcon ,
@@ -158,9 +163,13 @@ const resolveOptions = (platform: string, availableEditors: ReadonlyArray<Editor
158163 kind : "brand" ,
159164 } ,
160165 {
161- Icon : FolderClosedIcon ,
166+ Icon : isMacPlatform ( platform )
167+ ? FinderIcon
168+ : isWindowsPlatform ( platform )
169+ ? FileExplorerIcon
170+ : FolderClosedIcon ,
162171 value : "file-manager" ,
163- kind : "generic" ,
172+ kind : isMacPlatform ( platform ) || isWindowsPlatform ( platform ) ? "brand" : "generic" ,
164173 } ,
165174 ] ;
166175 const availableEditorSet = new Set ( availableEditors ) ;
@@ -198,7 +207,7 @@ export const OpenInPicker = memo(function OpenInPicker({
198207 const effectiveEditors = remote . mode === "local-exec" ? availableEditors : remoteCapableEditors ;
199208 const [ preferredEditor , setPreferredEditor ] = usePreferredEditor ( effectiveEditors ) ;
200209 const options = useMemo (
201- ( ) => resolveOptions ( navigator . platform , effectiveEditors ) ,
210+ ( ) => resolveOpenInOptions ( navigator . platform , effectiveEditors ) ,
202211 [ effectiveEditors ] ,
203212 ) ;
204213 const primaryOption = options . find ( ( { value } ) => value === preferredEditor ) ?? null ;
0 commit comments