@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.
Files changed (2) hide show
  1. package/dist/monitor.js +7 -2
  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 continue
20
- await injectContinue();
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';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tigorhutasuhut/claude-retry",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Monitor Claude CLI in a zellij pane, auto-inject continue on rate-limit",
5
5
  "type": "module",
6
6
  "license": "MIT",