Uh oh!
There was an error while loading. Please reload this page.
fix(slack): bound structured stream chunk fields - #886
Draft
dcbuild3r wants to merge 1 commit into
Draft
Conversation
Signed-off-by: dcbuild3r <dcbuilder@pm.me>
Contributor
@dcbuild3r is attempting to deploy a commit to the Vercel Team on Vercel. A member of the Team first needs to authorize it. |
Comment on lines
+326
to
+328
| const lastCode = value.charCodeAt(end - 1); | ||
| if (lastCode >= 0xd800 && lastCode <= 0xdbff) { | ||
| end -= 1; |
Contributor
There was a problem hiding this comment.
Suggested change
| constlastCode=value.charCodeAt(end-1); | |
| if(lastCode>=0xd800&&lastCode<=0xdbff){ | |
| end-=1; | |
| // Only guard against splitting a surrogate pair when there is a following | |
| // code unit that would be separated. If `end` is already at the end of the | |
| // string, or decrementing would leave an empty segment, keep `end` as-is so | |
| // that `offset` always advances and the loop terminates. | |
| if(end<value.length&&end-1>offset){ | |
| constlastCode=value.charCodeAt(end-1); | |
| if(lastCode>=0xd800&&lastCode<=0xdbff){ | |
| end-=1; | |
| } |
splitStreamChunkField enters an infinite loop when the input string ends with an unpaired high surrogate at the final chunk boundary, hanging the synchronous stream handler and blocking the Node event loop.
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 freeto 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
Slack limits structured task and plan fields to 256 characters. Truncate IDs, titles, and plan titles safely, and split oversized task details/output into stable continuation chunks so large tool results do not make native streaming fail. Preserve the prior part count on subsequent task updates so existing continuation cards can be updated consistently.
Test plan
Checklist