Fix the highlights - #697
Open
adi07das wants to merge 1 commit into
Open
Conversation
…onses _render_agent_response was applying the active theme's soft foreground (e.g. Tokyo Night's #a9b1d6) to every rendered markdown cell. Any user whose terminal draws its text selection with a pale background color got the classic light-on-light collapse: highlighted text became unreadable while dragging to copy, with only bold cells (headings/code) surviving. The original override existed to work around terminals that ignore OSC 10 and leak their profile's white through Rich resets. That was a cosmetic issue for a subset of terminals; the selection contrast bug hits every terminal + every user + every drag. Flip the default: let the terminal keep its own default foreground so its selection inversion works. Preserve the legacy behavior behind a new 'selection_friendly_transcript' config key (default true, set to false to restore the OSC-10 workaround). Tests: covers both branches by asserting whether Rich console.print receives a 'style' kwarg.
Author
|
@mpfaffenberger - please help review this |
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.
Currently, the users face an issue with the highlight which hides the content being highlighted due the highlight color and the rendered content font colors.
Current:

After the change:
Co-author: aditya.das@walmart.com