feat(cli): Clear persisted session file with /clear command (#3145)

This commit is contained in:
Jay4242
2025-07-16 11:03:01 -07:00
committed by GitHub
parent 98880c3ec3
commit 6f808da459
+4
View File
@@ -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) => {