Skip to content

Conversation

aymeric-roucher
Copy link
Collaborator

No description provided.

@@ -131,7 +131,7 @@ class AgentLogger:
def __init__(self, level: LogLevel = LogLevel.INFO, console: Console | None = None):
self.level = level
if console is None:
self.console = Console()
self.console = Console(highlight=False)
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This prevents automatic number highlighting, such as the highlighting of "Step {step_number}" in rules. It does not affect code highlighting. To test it, run this script:

from rich import box
from rich.console import Console
from rich.markdown import Markdown
from rich.panel import Panel
from rich.syntax import Syntax


console = Console()

# Disable automatic syntax highlighting for numbers
console = Console(highlight=False)

# You can still use markdown
markdown = Markdown("**Bold** and *italic* text")
console.print(markdown)

# Regular text won't have syntax highlighting
console.print("Numbers 123 and 456 won't be colored")


console.print(
    Panel(
        Syntax(
            "print('Hello, world!')",
            lexer="python",
            theme="monokai",
            word_wrap=True,
        ),
        title="[bold]" + "Example",
        title_align="left",
        box=box.HORIZONTALS,
    )
)

Copy link
Member

@albertvillanova albertvillanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@albertvillanova albertvillanova merged commit 5354e4f into main Jul 28, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants