summaryrefslogtreecommitdiffstats
path: root/src/repl
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-03-10 07:13:22 +0800
committersigoden <sigoden@gmail.com>2023-03-10 07:13:22 +0800
commit899c4af9ea4dedd295a909f6ddc968b20157a505 (patch)
treee58cf09678b12c99d87778420ebb3b591d9ee89c /src/repl
parentff00426c2c9d7d16de9221644e4f276f7e24d74a (diff)
downloadaichat-899c4af9ea4dedd295a909f6ddc968b20157a505.tar.gz
fix: forbid .clear role in middle of conversation
Diffstat (limited to 'src/repl')
-rw-r--r--src/repl/handler.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/repl/handler.rs b/src/repl/handler.rs
index 30a75c5..a0b1e5c 100644
--- a/src/repl/handler.rs
+++ b/src/repl/handler.rs
@@ -71,7 +71,7 @@ impl ReplCmdHandler {
print_now!("{}\n\n", output.trim_end());
}
ReplCmd::ClearRole => {
- self.config.lock().role = None;
+ self.config.lock().clear_role()?;
print_now!("\n");
}
ReplCmd::Prompt(prompt) => {