@mohak34/opencode-notifier 0.1.27-beta.0 → 0.1.27-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +0 -24
- package/dist/index.js +0 -9
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -142,30 +142,6 @@ Or use true/false for both:
|
|
|
142
142
|
}
|
|
143
143
|
```
|
|
144
144
|
|
|
145
|
-
### Event Filtering
|
|
146
|
-
|
|
147
|
-
Filter which events trigger notifications entirely. Useful when you only want notifications for specific events (e.g., only when OpenCode needs your input):
|
|
148
|
-
|
|
149
|
-
```json
|
|
150
|
-
{
|
|
151
|
-
"enabledEvents": ["permission", "question"]
|
|
152
|
-
}
|
|
153
|
-
```
|
|
154
|
-
|
|
155
|
-
- If `enabledEvents` is not specified or empty, all events are enabled (backward compatible)
|
|
156
|
-
- Valid values: `"permission"`, `"complete"`, `"subagent_complete"`, `"error"`, `"question"`, `"interrupted"`
|
|
157
|
-
- Events not in the list will not trigger sounds, notifications, or custom commands
|
|
158
|
-
|
|
159
|
-
Example: Only notify for permission requests and errors:
|
|
160
|
-
|
|
161
|
-
```json
|
|
162
|
-
{
|
|
163
|
-
"sound": true,
|
|
164
|
-
"notification": true,
|
|
165
|
-
"enabledEvents": ["permission", "error"]
|
|
166
|
-
}
|
|
167
|
-
```
|
|
168
|
-
|
|
169
145
|
### Messages
|
|
170
146
|
|
|
171
147
|
Customize the notification text:
|
package/dist/index.js
CHANGED
|
@@ -3891,12 +3891,6 @@ function isEventSoundEnabled(config, event) {
|
|
|
3891
3891
|
function isEventNotificationEnabled(config, event) {
|
|
3892
3892
|
return config.events[event].notification;
|
|
3893
3893
|
}
|
|
3894
|
-
function isEventEnabled(config, event) {
|
|
3895
|
-
if (!config.enabledEvents || config.enabledEvents.length === 0) {
|
|
3896
|
-
return true;
|
|
3897
|
-
}
|
|
3898
|
-
return config.enabledEvents.includes(event);
|
|
3899
|
-
}
|
|
3900
3894
|
function getMessage(config, event) {
|
|
3901
3895
|
return config.messages[event];
|
|
3902
3896
|
}
|
|
@@ -4166,9 +4160,6 @@ function getNotificationTitle(config, projectName) {
|
|
|
4166
4160
|
return "OpenCode";
|
|
4167
4161
|
}
|
|
4168
4162
|
async function handleEvent(config, eventType, projectName, elapsedSeconds, sessionTitle) {
|
|
4169
|
-
if (!isEventEnabled(config, eventType)) {
|
|
4170
|
-
return;
|
|
4171
|
-
}
|
|
4172
4163
|
const promises = [];
|
|
4173
4164
|
const rawMessage = getMessage(config, eventType);
|
|
4174
4165
|
const message = interpolateMessage(rawMessage, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mohak34/opencode-notifier",
|
|
3
|
-
"version": "0.1.27-beta.
|
|
3
|
+
"version": "0.1.27-beta.1",
|
|
4
4
|
"description": "OpenCode plugin that sends system notifications and plays sounds when permission is needed, generation completes, or errors occur",
|
|
5
5
|
"author": "mohak34",
|
|
6
6
|
"license": "MIT",
|