@mohak34/opencode-notifier 0.1.24 → 0.1.25
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/dist/index.js +7 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -4221,7 +4221,7 @@ function markSessionBusy(sessionID) {
|
|
|
4221
4221
|
bumpSessionIdleSequence(sessionID);
|
|
4222
4222
|
clearPendingIdleTimer(sessionID);
|
|
4223
4223
|
}
|
|
4224
|
-
function shouldSuppressSessionIdle(sessionID) {
|
|
4224
|
+
function shouldSuppressSessionIdle(sessionID, consume = true) {
|
|
4225
4225
|
const errorAt = sessionErrorSuppressionAt.get(sessionID);
|
|
4226
4226
|
if (errorAt === undefined) {
|
|
4227
4227
|
return false;
|
|
@@ -4231,7 +4231,9 @@ function shouldSuppressSessionIdle(sessionID) {
|
|
|
4231
4231
|
sessionErrorSuppressionAt.delete(sessionID);
|
|
4232
4232
|
return false;
|
|
4233
4233
|
}
|
|
4234
|
-
|
|
4234
|
+
if (consume) {
|
|
4235
|
+
sessionErrorSuppressionAt.delete(sessionID);
|
|
4236
|
+
}
|
|
4235
4237
|
return true;
|
|
4236
4238
|
}
|
|
4237
4239
|
async function getElapsedSinceLastPrompt(client, sessionID, nowMs = Date.now()) {
|
|
@@ -4275,6 +4277,9 @@ async function processSessionIdle(client, config, projectName, event, sessionID,
|
|
|
4275
4277
|
if (!hasCurrentSessionIdleSequence(sessionID, sequence)) {
|
|
4276
4278
|
return;
|
|
4277
4279
|
}
|
|
4280
|
+
if (shouldSuppressSessionIdle(sessionID)) {
|
|
4281
|
+
return;
|
|
4282
|
+
}
|
|
4278
4283
|
if (!sessionInfo.isChild) {
|
|
4279
4284
|
await handleEventWithElapsedTime(client, config, "complete", projectName, event, idleReceivedAtMs, sessionInfo.title);
|
|
4280
4285
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mohak34/opencode-notifier",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.25",
|
|
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",
|