fix(embed): preserve replies after empty assistant messages - #2482
Open
mameikagou wants to merge 1 commit into
Open
fix(embed): preserve replies after empty assistant messages#2482mameikagou wants to merge 1 commit into
mameikagou wants to merge 1 commit into
Conversation
Contributor
|
Thank you for your contribution! ❤️ Before we can merge this pull request, we need you to sign the LangBot Contributor License Agreement (CLA). You keep full copyright of your code — the CLA grants us a license to use and distribute your contribution. Signing takes 10 seconds and covers all repositories in this organization, permanently. 感谢您的贡献!合并前请阅读并签署贡献者许可协议(CLA)。您保留代码的全部版权,签署仅需回复下方指定内容,一次签署对本组织全部仓库永久有效。 I have read the CLA Document and I hereby sign the CLA You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot. |
Member
|
Hi @mameikagou , 请签署 CLA,否则我们将无法合入此 PR。 |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
Overview
Fixes #2480.
Ignore empty previous assistant content when applying substring deduplication. This keeps the real reply that follows an empty assistant frame while preserving deduplication for identical and contained replies.
Adds regression coverage through the real embed widget WebSocket message path.
Screenshots
Not applicable. The behavior is covered by executable widget regression tests.
Checklist
Tests
pnpm test:unit(58 passed)pnpm lint(0 errors; existing warnings only)pnpm exec tsc --noEmitpnpm buildpnpm exec prettier --check ../src/langbot/templates/embed/widget.js tests/unit/widget-message-dedupe.test.mjs