opencode-notifications 0.1.0 → 0.1.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/LICENSE +1 -1
- package/README.md +1 -1
- package/dist/index.js +2 -5
- package/package.json +4 -4
package/LICENSE
CHANGED
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -201,16 +201,13 @@ function getEventSound(eventType) {
|
|
|
201
201
|
async function playSound(soundId) {
|
|
202
202
|
try {
|
|
203
203
|
await execAsync2(`canberra-gtk-play -i "${soundId}"`, { timeout: 5000 });
|
|
204
|
-
} catch {
|
|
205
|
-
}
|
|
204
|
+
} catch {}
|
|
206
205
|
}
|
|
207
206
|
async function sendNotification(title, body, options) {
|
|
208
207
|
const promises = [];
|
|
209
208
|
const iconArg = options?.icon ? `-i "${escapeShellArg(options.icon)}"` : "";
|
|
210
209
|
const cmd = `notify-send -a "OpenCode" -u normal ${iconArg} "${escapeShellArg(title)}" "${escapeShellArg(body)}"`;
|
|
211
|
-
promises.push(execAsync2(cmd, { timeout: 5000 }).then(() => {
|
|
212
|
-
}).catch(() => {
|
|
213
|
-
}));
|
|
210
|
+
promises.push(execAsync2(cmd, { timeout: 5000 }).then(() => {}).catch(() => {}));
|
|
214
211
|
if (options?.playSound && options?.soundId) {
|
|
215
212
|
promises.push(playSound(options.soundId));
|
|
216
213
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-notifications",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "Smart desktop notifications for OpenCode - only notifies when terminal is not focused (Linux)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -24,12 +24,12 @@
|
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"repository": {
|
|
26
26
|
"type": "git",
|
|
27
|
-
"url": "git+https://github.com/
|
|
27
|
+
"url": "git+https://github.com/pedrordgs/opencode-notifications.git"
|
|
28
28
|
},
|
|
29
29
|
"bugs": {
|
|
30
|
-
"url": "https://github.com/
|
|
30
|
+
"url": "https://github.com/pedrordgs/opencode-notifications/issues"
|
|
31
31
|
},
|
|
32
|
-
"homepage": "https://github.com/
|
|
32
|
+
"homepage": "https://github.com/pedrordgs/opencode-notifications#readme",
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@opencode-ai/plugin": ">=0.0.1"
|
|
35
35
|
},
|