Added Commands.console

This commit is contained in:
Paul Gauthier 2023-05-10 11:20:25 -07:00
parent c368737e70
commit 6076cd0fb7
2 changed files with 15 additions and 12 deletions

View file

@ -28,7 +28,6 @@ openai.api_key = os.getenv("OPENAI_API_KEY")
class Coder:
fnames = set()
commands = Commands()
last_modified = 0
repo = None
@ -41,6 +40,8 @@ class Coder:
else:
self.console = Console(force_terminal=True, no_color=True)
self.commands = Commands(self.console)
self.main_model = main_model
if main_model == "gpt-3.5-turbo":
self.console.print(
@ -184,7 +185,7 @@ class Coder:
inp = get_input(self.history_file, self.fnames, self.commands)
if inp.startswith("/"):
self.commands.run(inp, self.console)
self.commands.run(inp)
return
self.num_control_c = 0