more flexible regex to detect session usage cooldown
This commit is contained in:
+1
-1
@@ -23,7 +23,7 @@ export function stripAnsi(text) {
|
|||||||
// Detection: find a "limit" line and a "resets" line within 6 lines of each other.
|
// Detection: find a "limit" line and a "resets" line within 6 lines of each other.
|
||||||
|
|
||||||
const LIMIT_PATTERNS = [
|
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"
|
/\d+-hour limit/i, // "5-hour limit"
|
||||||
/limit reached/i, // "limit reached"
|
/limit reached/i, // "limit reached"
|
||||||
/usage limit/i, // "usage limit"
|
/usage limit/i, // "usage limit"
|
||||||
|
|||||||
Reference in New Issue
Block a user