diff options
| author | sigoden <sigoden@gmail.com> | 2023-03-10 07:13:22 +0800 |
|---|---|---|
| committer | sigoden <sigoden@gmail.com> | 2023-03-10 07:13:22 +0800 |
| commit | 899c4af9ea4dedd295a909f6ddc968b20157a505 (patch) | |
| tree | e58cf09678b12c99d87778420ebb3b591d9ee89c /src/repl/handler.rs | |
| parent | ff00426c2c9d7d16de9221644e4f276f7e24d74a (diff) | |
| download | aichat-899c4af9ea4dedd295a909f6ddc968b20157a505.tar.gz | |
fix: forbid .clear role in middle of conversation
Diffstat (limited to 'src/repl/handler.rs')
| -rw-r--r-- | src/repl/handler.rs | 2 |
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) => { |
