mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-01 02:05:00 +00:00
fix: Fix ColorParseError by ensuring hex colors have # prefix
This commit is contained in:
parent
1c7db4da0d
commit
605d8fe59a
2 changed files with 29 additions and 1 deletions
|
@ -963,6 +963,7 @@ class InputOutput:
|
|||
|
||||
if not isinstance(message, Text):
|
||||
message = Text(message)
|
||||
color = ensure_hash_prefix(color) if color else None
|
||||
style = dict(style=color) if self.pretty and color else dict()
|
||||
try:
|
||||
self.console.print(message, **style)
|
||||
|
@ -993,7 +994,7 @@ class InputOutput:
|
|||
style = dict()
|
||||
if self.pretty:
|
||||
if self.tool_output_color:
|
||||
style["color"] = self.tool_output_color
|
||||
style["color"] = ensure_hash_prefix(self.tool_output_color)
|
||||
style["reverse"] = bold
|
||||
|
||||
style = RichStyle(**style)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue