feat: right-click working directory to open in IDE/Finder with configurable editor#279
Open
linjiejim wants to merge 1 commit intolukilabs:mainfrom
Open
feat: right-click working directory to open in IDE/Finder with configurable editor#279linjiejim wants to merge 1 commit intolukilabs:mainfrom
linjiejim wants to merge 1 commit intolukilabs:mainfrom
Conversation
… in IDE/Finder Add a configurable default editor setting (VS Code/Cursor/Windsurf) in Settings → App → Editor, and a right-click context menu on the working directory badge with "Open in Editor" and "Show in Finder" options. The editor preference is persisted in ~/.craft-agent/config.json and defaults to VS Code. The main process handler tries the editor CLI first, then falls back to macOS `open -a` if the CLI is not in PATH. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Summary
~/.craft-agent/config.jsonMotivation
When working with a project directory, it's common to want to quickly open it in your preferred IDE or reveal it in Finder. Currently there's no way to do this directly from the working directory badge — users have to manually open their editor and navigate to the folder. This feature saves that friction.
Changes
Config storage layer
packages/shared/src/config/config-defaults-schema.ts— adddefaultEditor: stringto defaults typeapps/electron/resources/config-defaults.json— add"defaultEditor": "vscode"defaultpackages/shared/src/config/storage.ts— adddefaultEditortoStoredConfig, addgetDefaultEditor()/setDefaultEditor()IPC channels
apps/electron/src/shared/types.ts— addOPEN_IN_EDITOR,EDITOR_GET_DEFAULT,EDITOR_SET_DEFAULTchannels andElectronAPImethodsapps/electron/src/preload/index.ts— add bridge methodsMain process
apps/electron/src/main/ipc.ts— addOPEN_IN_EDITORhandler (tries CLI first, macOSopen -afallback, 5s timeout), add editor settings handlersRenderer
apps/electron/src/renderer/pages/settings/AppSettingsPage.tsx— add Editor section withSettingsMenuSelectRowapps/electron/src/renderer/components/app-shell/input/FreeFormInput.tsx— wrapWorkingDirectoryBadgewith RadixContextMenu, addstopImmediatePropagationto prevent Electron dev menu overrideTest plan
🤖 Generated with Claude Code