Skip to content

feat(app): add 'Open with OpenCode' option to Windows context menu for folders#15536

Open
alexyaroshuk wants to merge 2 commits intoanomalyco:devfrom
alexyaroshuk:feat/windows-folder-context-menu
Open

feat(app): add 'Open with OpenCode' option to Windows context menu for folders#15536
alexyaroshuk wants to merge 2 commits intoanomalyco:devfrom
alexyaroshuk:feat/windows-folder-context-menu

Conversation

@alexyaroshuk
Copy link
Contributor

Issue for this PR

Closes #15530

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds "Open with OpenCode" to Windows Explorer right-click context menu when you right-click a folder. This launches Opencode app and creates project from this folder, or switches to it if this project has previously been added

image

How:

  • NSIS hooks (windows/hooks.nsh): During install, writes registry keys to HKCU\Software\Classes\Directory\shell\OpenCode. This tells Explorer to show the menu option.
  • Deep link: When clicked, launches app with opencode://open-project?directory=%V URL
  • App handles deep link: The existing deep link handler parses this URL and opens the project
  • Fix: Changed DeepLinkExt import to work on all Windows builds (not just debug)

How did you verify your code works?

manual test: made a release build on windows, compared context menu:
before : no option to open with opencode
after: has option to open with opencode: opens app, and creates new project at this location or switches to it if this project has already been added

Screenshots / recordings

not a ui change

Files changed

File Change
packages/desktop/src-tauri/windows/hooks.nsh Created - NSIS installer hooks for registry entries
packages/desktop/src-tauri/tauri.conf.json added installerHooks config
packages/desktop/src-tauri/src/lib.rs fixed DeepLinkExt import for release builds

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@alexyaroshuk alexyaroshuk marked this pull request as ready for review March 1, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add "Open with OpenCode" to Windows Explorer context menu

1 participant