mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-09 03:28:29 +00:00
docs(auto-reply): align silent token comment with regex
This commit is contained in:
@@ -11,8 +11,8 @@ export function isSilentReplyText(
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const escaped = escapeRegExp(token);
|
const escaped = escapeRegExp(token);
|
||||||
// Only match when the entire response (trimmed) is the silent token,
|
// Match only the exact silent token with optional surrounding whitespace.
|
||||||
// optionally surrounded by whitespace. This prevents
|
// This prevents
|
||||||
// substantive replies ending with NO_REPLY from being suppressed (#19537).
|
// substantive replies ending with NO_REPLY from being suppressed (#19537).
|
||||||
return new RegExp(`^\\s*${escaped}\\s*$`).test(text);
|
return new RegExp(`^\\s*${escaped}\\s*$`).test(text);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user