Refactor cmd_voice method to use user_input method instead of tool_output.

This commit is contained in:
Paul Gauthier 2023-08-10 16:23:35 -03:00
parent 47144a7e99
commit ec91eb670e
2 changed files with 7 additions and 2 deletions

View file

@ -438,7 +438,7 @@ class Commands:
def cmd_voice(self, args): def cmd_voice(self, args):
"Record and transcribe voice input" "Record and transcribe voice input"
text = record_and_transcribe() text = record_and_transcribe()
self.io.tool_output(text) self.io.user_input(text, log_only=False)
return text return text

View file

@ -231,7 +231,12 @@ class InputOutput:
self.user_input(inp) self.user_input(inp)
return inp return inp
def user_input(self, inp): def user_input(self, inp, log_only=True):
if not log_only:
style = dict(style=self.user_input_color) if self.user_input_color else dict()
self.console.print(inp, **style)
prefix = "####" prefix = "####"
if inp: if inp:
hist = inp.splitlines() hist = inp.splitlines()