From 389a251ed1e82eef8ae1b0ae339b07148f1bd37c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=BCnecke?= <34032202+SpaceMoehre@users.noreply.github.com> Date: Tue, 26 May 2026 13:09:48 +0200 Subject: [PATCH] more flexible regex to detect session usage cooldown --- src/patterns.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/patterns.js b/src/patterns.js index c10b8df..3a6cffa 100644 --- a/src/patterns.js +++ b/src/patterns.js @@ -23,7 +23,7 @@ export function stripAnsi(text) { // Detection: find a "limit" line and a "resets" line within 6 lines of each other. const LIMIT_PATTERNS = [ - /(?:hit|exceeded|reached).*(?:your|the)\s*(?:\d+-hour\s+)?limit/i, // "hit/exceeded/reached your limit" + /(?:hit|exceeded|reached).*?limit/i // matches: "hit ... limit" with anything in between /\d+-hour limit/i, // "5-hour limit" /limit reached/i, // "limit reached" /usage limit/i, // "usage limit"