feat: customizable notifications and extension APIs#3
Open
vekexasia wants to merge 3 commits intoferologics:masterfrom
Open
feat: customizable notifications and extension APIs#3vekexasia wants to merge 3 commits intoferologics:masterfrom
vekexasia wants to merge 3 commits intoferologics:masterfrom
Conversation
- Template placeholders ({folder}, {cwd}) in title and body
- PI_NOTIFY_TITLE / PI_NOTIFY_BODY env vars for static defaults
- pi-notify:customize event for dynamic customization from other extensions
- pi-notify:send event so other extensions can trigger notifications
- Terminal focus tracking (CSI ?1004h) — suppress notifications when focused
- pi-notify:focus event for other extensions to track focus state
- force option to bypass focus suppression
- silent option to skip the sound hook
- Updated README with full documentation
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.
Summary
This PR combines the two commits currently in the branch:
feat: customizable notifications, focus tracking, and extension APIfeat: add pause API and remove focus trackingNet result:
pi-notifygains customizable notification content plus extension-facing APIs for sending and pausing notifications. The earlier focus-tracking implementation introduced in the first commit is removed by the second commit, so it is not part of the final behavior of this PR.Included in the final PR
1. Customizable title & body
Notifications can now be customized via environment variables:
PI_NOTIFY_TITLEPI_NOTIFY_BODYBoth support template placeholders resolved at send time:
{cwd}{folder}Example:
2.
pi-notify:customizeeventOther extensions can dynamically modify outgoing notifications before delivery:
3.
pi-notify:sendeventOther extensions can trigger notifications programmatically:
4. Pause / unpause API
Other extensions can now suppress notifications temporarily:
And can observe pause state changes:
While paused, both the default
agent_endnotification and notifications emitted viapi-notify:sendare suppressed.Final behavior change vs. first commit
The first commit added terminal focus tracking and a
forceoption. The second commit removes that design. So the final PR:?1004hfocus reportingpi-notify:focusforceonpi-notify:sendNotifications are sent normally unless they are explicitly paused.
Docs / release
1.5.0