Commit Graph

23 Commits

Author SHA1 Message Date
Gerkinfeltser
2a824b6d19 fix: properly cleanup Windows process tree on Obsidian exit
### Fixed
- Replaced unreliable taskkill /T with PowerShell Get-CimInstance for child process detection in WindowsProcess.ts
- Fixed orphaned node.exe processes when Obsidian closes by killing child processes before parent
- Added proper cleanup when shell: true creates cmd.exe -> node.exe process tree

### Added
- Static currentProcess field to track active process for cleanup during window close
- Static cleanupHandlerRegistered flag to prevent duplicate event handlers
- beforeunload event handler for synchronous cleanup when Obsidian window closes
- killProcessSync method for immediate process termination without async delays
- registerCleanupHandler method to set up window close event listener

### Changed
- Updated start method to store process reference and register cleanup handler
- Modified stop method to use PowerShell child lookup before killing parent process
- Enhanced error handling with try/catch blocks for PowerShell and taskkill operations
2026-02-23 18:39:32 +01:00
Mateusz Tymek
2c17c9e7f6 Update readme, document 'custom command' 2026-02-15 08:47:50 +01:00
Mateusz Tymek
adc34d31f1 Improved process management 2026-02-14 17:13:11 +01:00
Mateusz Tymek
9683eb0d05 Refactor plugin architecture, isolate Windows-spefic code 2026-02-14 15:53:22 +01:00
Mateusz Tymek
d532a2a490 conditionally set detached to true on non-windows platforms so that OC process can be correctly terminated 2026-02-04 21:16:41 +01:00
Gerkinfeltser
4baf27837e Fix Windows spawn compatibility for .cmd files
- Add shell: true to spawn options for .cmd file execution on Windows
- Add windowsHide: true to prevent console window from appearing
- Remove detached: true which conflicts with shell: true on Windows

Fixes spawn EINVAL error on Windows when launching opencode.cmd
2026-02-04 21:02:46 +01:00
Mateusz Tymek
bf10a5ecd9 Refactor OC shutdown process, make it actually work 2026-02-02 17:57:35 +01:00
Mateusz Tymek
b55fbc9a06 Fix file close and select 2026-02-01 15:07:49 +01:00
Mateusz Tymek
7940371ee2 Code cleanup 2026-02-01 14:55:35 +01:00
Mateusz Tymek
39d1fe5b55 Context injection 2026-02-01 14:14:46 +01:00
Mendi Halpern
b5c5237915 Enable system CA certificate trust for corporate networks
Set NODE_USE_SYSTEM_CA=1 when spawning the opencode server process.
This allows Bun to use the macOS system keychain for TLS validation,
fixing SSL errors for users on corporate VPNs with custom CAs.
2026-01-27 23:16:30 +01:00
Mateusz Tymek
f2a12a24c8 Cleanup 2026-01-11 14:37:01 +01:00
Mateusz Tymek
8345fff6e9 Simplify path logic 2026-01-11 14:06:34 +01:00
Mateusz Tymek
30953b3176 Configurable location for OpenCode: sidebar or main window 2026-01-10 23:11:06 +01:00
Mateusz Tymek
f14cdf15a0 Testing and CI/CD 2026-01-08 11:26:54 +01:00
Mateusz Tymek
ee0e9069c5 Code cleanup
Code cleanup
2026-01-08 10:26:01 +01:00
Mateusz Tymek
9ef9d26021 Cleanup 2026-01-04 22:13:36 +00:00
Mateusz Tymek
fb3692948e Bugfixes 2026-01-04 22:10:56 +00:00
Mateusz Tymek
6a24431c1b Add OpenSpec foudnation 2026-01-04 21:32:03 +00:00
Mateusz Tymek
13dcd8bb5a Use proper OpenCode icon 2026-01-03 20:35:40 +00:00
Mateusz Tymek
c12fa12419 Allow configuring starting dir 2026-01-03 20:28:35 +00:00
Mateusz Tymek
794317dbc7 Start in the vault directory 2026-01-03 16:36:42 +00:00
Mateusz Tymek
d2c90fbd49 Initial commit 2026-01-03 16:08:11 +00:00