AI review/assistant: strip ASSA override blocks, send actor/style as context (#13927) - #14018
Merged
Conversation
…end actor/style as context (#13927) Leading and trailing {\...} blocks are stripped before a line is sent and restored verbatim around the model's answer, so tag-heavy ASSA lines no longer waste tokens or get their corrections dropped by the tag guard. Pure drawing/tag lines are skipped. The ASSA actor and style name go along as read-only context. Same stripping for the AI assistant's current line and its context lines. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Implements the core of #13927 for AI review and the AI assistant.
{\...}blocks are cut off before a line is sent and glued back verbatim around the model's answer — no more token waste, and no more corrections silently dropped because a small model "normalized"\1c&HFDF9AA&.{\p1}m 0 0 l ...) or tags are skipped entirely (they used to be sent as text to proofread).actorandstyleare sent as read-only context on each line; the protocol text tells the model to use them only as context.{\an8}(nothing to keep any more).Auto-translate (libuilogic
Formatting) already strips leading blocks; trailing blocks + actor/style there would be a separate PR.Tests:
AssaTagStripperTests(round-trips, whitespace, inline, drawing, non-tag braces, actor/style JSON).🤖 Generated with Claude Code