mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-03 19:24:59 +00:00
added --assistant-output-color
This commit is contained in:
parent
824ec054c6
commit
d76bf0b8b0
2 changed files with 16 additions and 3 deletions
|
@ -51,6 +51,7 @@ class Coder:
|
|||
verbose=False,
|
||||
openai_api_key=None,
|
||||
openai_api_base=None,
|
||||
assistant_output_color="blue",
|
||||
):
|
||||
if not openai_api_key:
|
||||
raise MissingAPIKeyError("No OpenAI API key provided.")
|
||||
|
@ -69,6 +70,7 @@ class Coder:
|
|||
|
||||
self.auto_commits = auto_commits
|
||||
self.dirty_commits = dirty_commits
|
||||
self.assistant_output_color = assistant_output_color
|
||||
|
||||
self.dry_run = dry_run
|
||||
self.pretty = pretty
|
||||
|
@ -493,7 +495,9 @@ class Coder:
|
|||
show_resp = self.update_files_gpt35(self.resp, mode="diff")
|
||||
except ValueError:
|
||||
pass
|
||||
md = Markdown(show_resp, style="blue", code_theme="default")
|
||||
md = Markdown(
|
||||
show_resp, style=self.assistant_output_color, code_theme="default"
|
||||
)
|
||||
live.update(md)
|
||||
else:
|
||||
sys.stdout.write(text)
|
||||
|
|
|
@ -4,7 +4,7 @@ import sys
|
|||
import configargparse
|
||||
import git
|
||||
|
||||
from aider import models, __version__
|
||||
from aider import __version__, models
|
||||
from aider.coder import Coder
|
||||
from aider.io import InputOutput
|
||||
|
||||
|
@ -38,7 +38,10 @@ def main(args=None, input=None, output=None):
|
|||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--version", action="version", version=f"%(prog)s {__version__}", help="Show the version number and exit"
|
||||
"--version",
|
||||
action="version",
|
||||
version=f"%(prog)s {__version__}",
|
||||
help="Show the version number and exit",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
|
@ -117,6 +120,11 @@ def main(args=None, input=None, output=None):
|
|||
default="red",
|
||||
help="Set the color for tool error messages (default: red)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--assistant-output-color",
|
||||
default="blue",
|
||||
help="Set the color for assistant output (default: blue)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--apply",
|
||||
metavar="FILE",
|
||||
|
@ -232,6 +240,7 @@ def main(args=None, input=None, output=None):
|
|||
verbose=args.verbose,
|
||||
openai_api_key=args.openai_api_key,
|
||||
openai_api_base=args.openai_api_base,
|
||||
assistant_output_color=args.assistant_output_color,
|
||||
)
|
||||
|
||||
if args.dirty_commits:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue