summaryrefslogtreecommitdiffstats
path: root/src/repl/handler.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/repl/handler.rs')
-rw-r--r--src/repl/handler.rs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/repl/handler.rs b/src/repl/handler.rs
index 159127c..014a851 100644
--- a/src/repl/handler.rs
+++ b/src/repl/handler.rs
@@ -12,6 +12,7 @@ use std::cell::RefCell;
pub enum ReplCmd {
Submit(String),
+ SetModel(String),
SetRole(String),
UpdateConfig(String),
Prompt(String),
@@ -65,6 +66,10 @@ impl ReplCmdHandler {
self.config.write().save_conversation(&input, &buffer)?;
*self.reply.borrow_mut() = buffer;
}
+ ReplCmd::SetModel(name) => {
+ self.config.write().set_model(&name)?;
+ print_now!("\n");
+ }
ReplCmd::SetRole(name) => {
let output = self.config.write().change_role(&name)?;
print_now!("{}\n\n", output.trim_end());