Commit c655c35
committed
fix: improve Windows compatibility and fix event listener issues
Replace platform-specific 'which'/'where' commands with cross-platform Bun.which() API to fix Windows compatibility issues and simplify code.
Fixes:
- #1027: Comment-checker binary crashes on Windows (missing 'check' subcommand)
- #1036: Session-notification listens to non-existent events
- #1033: Infinite loop in session notifications
- #599: Doctor incorrectly reports OpenCode as not installed on Windows
- #1005: PowerShell path detection corruption on Windows
Changes:
- Use Bun.which() instead of spawning 'which'/'where' commands
- Add 'check' subcommand to comment-checker invocation
- Remove non-existent event listeners (session.updated, message.created)
- Prevent notification commands from resetting their own state
- Fix edge case: clear notifiedSessions if activity occurs during notification
All changes are cross-platform compatible and tested on Windows/Linux/macOS.1 parent aead4ae commit c655c35
File tree
5 files changed
+18
-40
lines changed- src
- cli/doctor/checks
- hooks
- comment-checker
5 files changed
+18
-40
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
11 | 9 | | |
12 | 10 | | |
13 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
68 | 61 | | |
69 | 62 | | |
70 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
| 168 | + | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 24 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 25 | + | |
46 | 26 | | |
47 | 27 | | |
48 | 28 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
200 | 200 | | |
201 | 201 | | |
202 | 202 | | |
203 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
204 | 206 | | |
205 | 207 | | |
206 | 208 | | |
| |||
254 | 256 | | |
255 | 257 | | |
256 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
257 | 264 | | |
258 | 265 | | |
259 | 266 | | |
| |||
262 | 269 | | |
263 | 270 | | |
264 | 271 | | |
265 | | - | |
| 272 | + | |
266 | 273 | | |
267 | 274 | | |
268 | 275 | | |
| |||
299 | 306 | | |
300 | 307 | | |
301 | 308 | | |
302 | | - | |
| 309 | + | |
303 | 310 | | |
304 | 311 | | |
305 | 312 | | |
| |||
0 commit comments