Merge pull request #2234 from thehunmonkgroup/main

add /editor command
This commit is contained in:
paul-gauthier 2024-11-19 12:22:37 -08:00 committed by GitHub
commit f1306d3301
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 177 additions and 6 deletions

View file

@ -481,14 +481,17 @@ class InputOutput:
log_file.write(f"{role.upper()} {timestamp}\n")
log_file.write(content + "\n")
def display_user_input(self, inp):
if self.pretty and self.user_input_color:
style = dict(style=self.user_input_color)
else:
style = dict()
self.console.print(Text(inp), **style)
def user_input(self, inp, log_only=True):
if not log_only:
if self.pretty and self.user_input_color:
style = dict(style=self.user_input_color)
else:
style = dict()
self.console.print(Text(inp), **style)
self.display_user_input(inp)
prefix = "####"
if inp: