-
Notifications
You must be signed in to change notification settings - Fork 18
fix: preserve literal image marker text #180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -99,39 +99,43 @@ const KNOWN_GENERIC_CLAUDE_CODE_CHAT_MESSAGE_DEBT: &[(&str, usize)] = &[ | |
| ), | ||
| ( | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Synchronize every tracked ChatMessage reference These line numbers do not match the current [RULE] synchronized-line-inventory · |
||
| "crates/tinyagents-harness/src/providers/claude_code/input_builder_tests.rs", | ||
| 178, | ||
| 184, | ||
| ), | ||
| ( | ||
| "crates/tinyagents-harness/src/providers/claude_code/input_builder_tests.rs", | ||
| 179, | ||
| 195, | ||
| ), | ||
| ( | ||
| "crates/tinyagents-harness/src/providers/claude_code/input_builder_tests.rs", | ||
| 180, | ||
| 196, | ||
| ), | ||
| ( | ||
| "crates/tinyagents-harness/src/providers/claude_code/input_builder_tests.rs", | ||
| 197, | ||
| ), | ||
| ( | ||
| "crates/tinyagents-harness/src/providers/claude_code/input_builder_tests.rs", | ||
| 198, | ||
| 214, | ||
| ), | ||
| ( | ||
| "crates/tinyagents-harness/src/providers/claude_code/input_builder_tests.rs", | ||
| 199, | ||
| 215, | ||
| ), | ||
| ( | ||
| "crates/tinyagents-harness/src/providers/claude_code/input_builder_tests.rs", | ||
| 200, | ||
| 216, | ||
| ), | ||
| ( | ||
| "crates/tinyagents-harness/src/providers/claude_code/input_builder_tests.rs", | ||
| 210, | ||
| 217, | ||
| ), | ||
| ( | ||
| "crates/tinyagents-harness/src/providers/claude_code/input_builder_tests.rs", | ||
| 225, | ||
| 227, | ||
| ), | ||
| ( | ||
| "crates/tinyagents-harness/src/providers/claude_code/input_builder_tests.rs", | ||
| 242, | ||
| ), | ||
| ( | ||
| "crates/tinyagents-harness/src/providers/claude_code/mod.rs", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Escape image markers in reasoning blocks
The updated documentation says text and reasoning blocks pass through with internal image-looking text escaped, but only
ContentBlock::Textcallsescape_native_image_markers. A reasoning block containing[OH_IMAGE:data:image/png;base64,QUJD]reachescontent_blocksunchanged and is converted into an image block, changing the reasoning text and potentially causing an unintended attachment to be sent. Apply the same escaping to reasoning text (and any other textual block that can contain user/provider data) before flattening it.[RULE] incomplete-escaping ·