Fix smart message chunking (keep lists/headers together)#1726
Closed
tyler6204 wants to merge 4 commits intoopenclaw:mainfrom
Closed
Fix smart message chunking (keep lists/headers together)#1726tyler6204 wants to merge 4 commits intoopenclaw:mainfrom
tyler6204 wants to merge 4 commits intoopenclaw:mainfrom
Conversation
Contributor
|
I like this a lot more, thanks! |
steipete
added a commit
that referenced
this pull request
Jan 25, 2026
Thanks @tyler6204 Co-authored-by: Tyler Yust <[email protected]>
Contributor
|
Landed via rebase on main and added a small fix so markdown newline mode does not pre-split long paragraphs before the markdown-aware chunker runs. Changes:
Commit: Thanks again @tyler6204! |
rodrigouroz
pushed a commit
to rodrigouroz/openclaw
that referenced
this pull request
Jan 26, 2026
Thanks @tyler6204 Co-authored-by: Tyler Yust <[email protected]>
dgarson
pushed a commit
to dgarson/clawdbot
that referenced
this pull request
Feb 2, 2026
Thanks @tyler6204 Co-authored-by: Tyler Yust <[email protected]>
trevorgordon981
pushed a commit
to trevorgordon981/openclaw
that referenced
this pull request
Feb 11, 2026
The paragraph-aware chunking introduced in PR openclaw#1726 caused issues with TUI output formatting. TUI messages were having their formatting altered due to overly aggressive trimming and normalization. Changes: - Remove aggressive trimming from extractContentFromMessage() to preserve formatting - Keep content strings exactly as received without modification - Only remove trailing spaces from lines, preserve all newlines - Ensure TUI displays text with original formatting intact This ensures that TUI output (including exec tool results, console.log output, and multi-line agent responses) displays correctly with all newlines preserved.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
chunkMode: "newline"behavior to split on paragraph boundaries (blank lines) instead of every single newlineMotivation
Some channels (notably iMessage/BlueBubbles) use
chunkMode: "newline", which was splitting every single newline into its own outbound message. This caused markdown-style replies like bullet lists or headers followed by content to be delivered as one message per line—noisy and breaks formatting.Behavior examples
Before: Each line was a separate message
After: Paragraphs stay together, only blank lines trigger splits
Input:
→ Now sends as a single message
Input:
→ Splits into 2 messages (at the blank line)
Test plan
chunk.test.tsExample:

🤖 Generated with Claude Code