feat: detect Zed as a host editor (closes #18)#21
Merged
Conversation
Adds Zed to notify.sh's editor-detection layer so notifications fired from agents running inside Zed's integrated terminal route correctly: - TERM_PROGRAM=zed → bundle ID dev.zed.Zed (Zed sets this env var since zed-industries/zed#14213, merged 2024-07). - bundle ID dev.zed.Zed → process name Zed (used by System Events for window-title capture and frontmost-window suppression). - Adds Zed to walk_session_chain's terminal-app match list so the panel's session view records Zed correctly when walking the process tree. Zed has no external hook system of its own (hooks are not supported in external agents — see Zed docs), so stack-nudge relies on the agent's own hooks (e.g. ~/.claude/settings.json) firing from inside Zed's terminal. The agent-side wiring is already auto-detected by install.sh; this PR only adds the editor-side recognition for click-to-focus and mute-when-focused suppression. README updated with the supported-apps list + a note explaining the hook flow for Zed users. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #18.
Summary
Adds Zed to `notify.sh`'s editor-detection layer so notifications fired from agents running inside Zed's integrated terminal route correctly.
Why this is the only change needed
Zed has no external hook system of its own (Zed docs explicitly state "hooks are currently not supported in external agents"), so stack-nudge can't wire up a Zed-side `hooks.json` the way it does for Claude Code and Cursor. But the agent's own hooks (e.g. `~/.claude/settings.json`) still fire normally from inside Zed's integrated terminal — `install.sh` already auto-wires those. The only gap was that `notify.sh` didn't know how to map the agent's host editor back to a Zed window, so click-to-focus and mute-when-focused targeted the wrong app.
Test plan