Remove unfinished save_conversation impl
This commit is contained in:
parent
f6597f4bd0
commit
15b25aea05
|
|
@ -295,15 +295,7 @@ class CommandParser:
|
||||||
|
|
||||||
def save_conversation(self, filename='conversation.md'):
|
def save_conversation(self, filename='conversation.md'):
|
||||||
# TODO finish this
|
# TODO finish this
|
||||||
if not filename.endswith('.md'):
|
pass
|
||||||
filename += '.md'
|
|
||||||
base, extension = os.path.splitext(filename)
|
|
||||||
i = 1
|
|
||||||
while os.path.exists(filename):
|
|
||||||
filename = f"{base}_{i}{extension}"
|
|
||||||
i += 1
|
|
||||||
with open(filename, 'w') as f:
|
|
||||||
f.write(conversation)
|
|
||||||
|
|
||||||
def handle_clear(self):
|
def handle_clear(self):
|
||||||
self.assistant.history = [self.assistant.system_prompt()]
|
self.assistant.history = [self.assistant.system_prompt()]
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue