Repository navigation
fix(desktop): mark the truncated head of a bot group-chat turn delta - #114352
Closed
liuhao1024 wants to merge 1 commit into
Closed
liuhao1024 wants to merge 1 commit into
liuhao1024 wants to merge 1 commit into
Conversation
Collaborator
|
Thanks @liuhao1024 — the work in this PR has landed on
Your contribution is credited there (cherry-picked authorship / co-author trailer or credit in the PR body; see the linked PR for what was kept and what was trimmed). Closing this one as landed / superseded so the backlog reflects reality. If something in your original diff is still missing on current |
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.
What does this PR do?
In a Bot Mode group chat, a member's turn prompt is rendered from only the last
GROUP_CHAT_HISTORY_LIMIT(24) entries of its delta, but the successful-turn path advances the member's watermark past the entire turn tail. When more than 24 entries accumulate since a member's last turn, the head of the delta — typically the user's instruction that started the exchange — is never rendered, and because the watermark skips past it, it is never delivered on any later turn either. The drop is completely silent: the member cannot tell its view of the room is partial (#114341).This PR makes the cut visible. When the delta exceeds the render window, the prompt's message list now opens with an explicit marker line:
This is the smallest of the fix directions the issue proposes: it deliberately keeps the watermark semantics unchanged (not advancing past unrendered entries would let an over-long delta grow unboundedly and stall watermark progress) and keeps the limit fixed (a per-room configurable limit is a feature decision left to maintainers, see #98616).
Related Issue
Fixes #114341
Type of Change
Changes Made
apps/desktop/src/plugins/hermes-bots/group-round-prompt.ts: newformatGroupDeltaLines()helper that renders the lastGROUP_CHAT_HISTORY_LIMITdelta lines and prepends an… N earlier room messages omitted since your last turnmarker when entries were cut from the head.apps/desktop/src/plugins/hermes-bots/group-round-members.ts: the member turn prompt (and, through the sharedrunGroupRoundMemberentry, the continuation path) now builds itsdeltaLinesvia the helper instead of a bareslice(-GROUP_CHAT_HISTORY_LIMIT).apps/desktop/src/plugins/hermes-bots/group-rounds.test.ts: two regression tests — the marker appears with the exact omitted count and the correct rendered window when the delta is over-long, and no marker when the delta fits.How to Test
cd apps/desktop && npx vitest run src/plugins/hermes-bots/group-rounds.test.ts60 passed (60), including the two new#114341cases.2 failed | 58 passed), confirming they pin the marker behavior.Checklist
Code
fix(scope):,feat(scope):, etc.)pytest:vitest run src/plugins/hermes-bots/group-rounds.test.ts→ 60 passed; affected neighbours (group-chat,cross-connection-bots) → 111 passed;tsc -p . --noEmitclean;eslintandprettier --checkclean on the changed filesDocumentation & Housekeeping
docs/, docstrings) — N/A (behavior-preserving marker addition)cli-config.yaml.exampleif I added/changed config keys — N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — N/AScreenshots / Logs
Not applicable — the change is in the turn prompt text, covered by the unit tests above.