feat(cli): Clear persisted session file with /clear command (#3145)
This commit is contained in:
@@ -627,6 +627,10 @@ impl Session {
|
|||||||
&Message::assistant().with_text("Chat context cleared."),
|
&Message::assistant().with_text("Chat context cleared."),
|
||||||
self.debug,
|
self.debug,
|
||||||
);
|
);
|
||||||
|
if self.session_file.exists() {
|
||||||
|
std::fs::remove_file(&self.session_file)?;
|
||||||
|
std::fs::File::create(&self.session_file)?;
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
input::InputResult::PromptCommand(opts) => {
|
input::InputResult::PromptCommand(opts) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user