You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(solid): expose terminal focus events via hooks (#811)
Closes#766
The renderer already emits `"focus"` and `"blur"` events when the
terminal window gains/loses focus (via DECSET 1004), but there's no way
to consume them from the SolidJS layer.
This adds three hooks following existing patterns:
- `onFocus(callback)` / `onBlur(callback)` — callback style, mirrors
`onResize`
- `useTerminalFocus()` → `Accessor<boolean>` — signal style, mirrors
`useTerminalDimensions`
Use case: opencode plugins need to know if the user is looking at the
terminal to decide whether to send OS notifications. Currently done via
osascript polling — this replaces it with the event-driven signal the
terminal already provides.
---------
Co-authored-by: Simon Klee <hello@simonklee.dk>
0 commit comments