diff --git a/aider/coders/base_coder.py b/aider/coders/base_coder.py index ff8712423..d036f3c03 100755 --- a/aider/coders/base_coder.py +++ b/aider/coders/base_coder.py @@ -390,8 +390,10 @@ class Coder: self.linter.set_linter(lang, cmd) def show_announcements(self): + bold = True for line in self.get_announcements(): - self.io.tool_output(line) + self.io.tool_output(line, bold=bold) + bold = False def find_common_root(self): if len(self.abs_fnames) == 1: diff --git a/aider/io.py b/aider/io.py index bb8041fe4..7f759362f 100644 --- a/aider/io.py +++ b/aider/io.py @@ -15,6 +15,7 @@ from pygments.lexers import MarkdownLexer, guess_lexer_for_filename from pygments.token import Token from pygments.util import ClassNotFound from rich.console import Console +from rich.style import Style as RichStyle from rich.text import Text from .dump import dump # noqa: F401 @@ -402,7 +403,7 @@ class InputOutput: style = dict(style=self.tool_error_color) if self.tool_error_color else dict() self.console.print(message, **style) - def tool_output(self, *messages, log_only=False): + def tool_output(self, *messages, log_only=False, bold=False): if messages: hist = " ".join(messages) hist = f"{hist.strip()}" @@ -410,8 +411,10 @@ class InputOutput: if not log_only: messages = list(map(Text, messages)) - style = dict(style=self.tool_output_color) if self.tool_output_color else dict() - self.console.print(*messages, **style) + style = dict(color=self.tool_output_color) if self.tool_output_color else dict() + style["reverse"] = bold + style = RichStyle(**style) + self.console.print(*messages, style=style) def append_chat_history(self, text, linebreak=False, blockquote=False, strip=True): if blockquote: diff --git a/aider/repo.py b/aider/repo.py index ab98bc081..f17ae101b 100644 --- a/aider/repo.py +++ b/aider/repo.py @@ -130,7 +130,7 @@ class GitRepo: self.repo.git.commit(cmd) commit_hash = self.repo.head.commit.hexsha[:7] - self.io.tool_output(f"Commit {commit_hash} {commit_message}") + self.io.tool_output(f"Commit {commit_hash} {commit_message}", bold=True) # Restore the env