@tigorhutasuhut/claude-retry 0.1.3 → 0.1.4
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/monitor.js +7 -2
- package/package.json +1 -1
package/dist/monitor.js
CHANGED
|
@@ -16,8 +16,13 @@ async function stepState(state, screenText, now, injectContinue, marginSeconds,
|
|
|
16
16
|
if (now < state.waitUntil) {
|
|
17
17
|
return 'rate-limited';
|
|
18
18
|
}
|
|
19
|
-
// Wait period elapsed — inject
|
|
20
|
-
|
|
19
|
+
// Wait period elapsed — only inject if the limit banner is still present.
|
|
20
|
+
// If it's gone (claude exited, shell prompt, pane reused, user already continued)
|
|
21
|
+
// skip the injection and return to monitoring silently.
|
|
22
|
+
const stillLimited = match(screenText).limited;
|
|
23
|
+
if (stillLimited) {
|
|
24
|
+
await injectContinue();
|
|
25
|
+
}
|
|
21
26
|
state.status = 'monitoring';
|
|
22
27
|
state.waitUntil = 0;
|
|
23
28
|
return 'retried';
|