Removed redundant code for handling None input and added check for empty input.

This commit is contained in:
Paul Gauthier 2023-05-10 09:15:22 -07:00
parent 5b8aec7862
commit 1a7732c851

View file

@ -179,8 +179,6 @@ class Coder:
print() print()
inp = get_input(self.history_file, self.fnames) inp = get_input(self.history_file, self.fnames)
if inp is None:
return
self.num_control_c = 0 self.num_control_c = 0
@ -195,6 +193,9 @@ class Coder:
] ]
self.cur_messages = [] self.cur_messages = []
if not inp:
return
self.cur_messages += [ self.cur_messages += [
dict(role="user", content=inp), dict(role="user", content=inp),
] ]