Skip to content

Auto-Reply: relax regex for reply tags to allow whitespace#560

Merged
steipete merged 2 commits into
openclaw:mainfrom
mcinteerj:fix/reply-tags-whitespace
Jan 9, 2026
Merged

Auto-Reply: relax regex for reply tags to allow whitespace#560
steipete merged 2 commits into
openclaw:mainfrom
mcinteerj:fix/reply-tags-whitespace

Conversation

@mcinteerj

Copy link
Copy Markdown
Contributor

Overview

Relaxed the regex patterns for [[reply_to_current]] and [[reply_to:...]] tags to allow for whitespace characters.

Context

Some models (e.g., gemini-flash-3-preview) may output tags with internal spaces, such as [[ reply_to_current ]] or [[ reply_to: ... ]]. The previous strict regex failed to detect and strip these tags, causing them to appear in the final message sent to users.

Changes

  • Updated extractReplyToTag in src/auto-reply/reply/reply-tags.ts to use \s* in regex patterns.

Testing

  • Validated via vitest with reproduction test cases covering:
    • [[ reply_to_current ]] (spaces inside)
    • [[reply_to: 123]] (spaces around colon)
  • Verified standard cases still work.

@mcinteerj
mcinteerj force-pushed the fix/reply-tags-whitespace branch from e96ae07 to dbccba5 Compare January 9, 2026 09:00
@steipete steipete self-assigned this Jan 9, 2026
@steipete
steipete force-pushed the fix/reply-tags-whitespace branch from dbccba5 to 7d9300e Compare January 9, 2026 16:05
@steipete
steipete merged commit 67af3c3 into openclaw:main Jan 9, 2026
16 of 18 checks passed
@steipete

steipete commented Jan 9, 2026

Copy link
Copy Markdown
Contributor

Landed via temp rebase onto main.\n\n- Gate: pnpm lint && pnpm build && pnpm test\n- Land commit: 7d9300e\n- Merge commit: 67af3c3\n\nThanks @mcinteerj!

heatherstew44-maker pushed a commit to heatherstew44-maker/openclaw that referenced this pull request Mar 8, 2026
)

* Fix race condition when toggling transcription via SIGUSR2

The toggle state was being set to false immediately when stop was called,
but the actual transcription runs asynchronously. If another signal arrived
before transcription completed, a new recording could start while the old
transcription was still running, causing the old text to paste unexpectedly.

Now the toggle state stays true until the async transcription task completes.

* remove import

---------

Co-authored-by: CJ Pais <[email protected]>
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
lovewanwan pushed a commit to lovewanwan/openclaw that referenced this pull request Apr 28, 2026
Auto-Reply: relax regex for reply tags to allow whitespace
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
github-actions Bot pushed a commit to Desicool/openclaw that referenced this pull request May 9, 2026
Auto-Reply: relax regex for reply tags to allow whitespace
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants