mirror of
https://github.com/stablyai/orca.git
synced 2026-11-17 19:34:29 +00:00
When a linked file's macOS default app is Cursor, VS Code or VS Code Insiders, hand it `--goto path:line:column` with `open -n -g -a <app> --args`, the same LaunchServices hand-off the bundled CLI ends in, minus the CLI's Node startup and `--env` forwarding. The editor sees a desktop (non-Dock) open, so it reuses the file's window as a CLI open would. An empty env keeps Orca's variables out of the editor and lets a cold start resolve the login-shell env. `open` returns once the app has launched, like shell.openPath, so there is no timer; a non-zero exit or spawn error falls back to shell.openPath. Other platforms, other apps, links without a line, and files main reveals instead of opening are unchanged. The IPC location reuses RuntimeFileOpenPosition. Moves the positive safe-integer guard to src/shared so this and its two existing copies share one definition. Fixes #29508 Co-authored-by: Takumi Hara <takumihara1226@gmail.com>