diff options
Diffstat (limited to 'src/repl')
| -rw-r--r-- | src/repl/handler.rs | 5 | ||||
| -rw-r--r-- | src/repl/mod.rs | 11 |
2 files changed, 1 insertions, 15 deletions
diff --git a/src/repl/handler.rs b/src/repl/handler.rs index bafad14..ff6cf56 100644 --- a/src/repl/handler.rs +++ b/src/repl/handler.rs @@ -18,7 +18,6 @@ pub enum ReplCmd { SetModel(String), SetRole(String), UpdateConfig(String), - Prompt(String), ClearRole, ViewInfo, StartSession(Option<String>), @@ -79,10 +78,6 @@ impl ReplCmdHandler { self.config.write().clear_role()?; print_now!("\n"); } - ReplCmd::Prompt(prompt) => { - self.config.write().add_prompt(&prompt)?; - print_now!("\n"); - } ReplCmd::ViewInfo => { let output = self.config.read().info()?; print_now!("{}\n\n", output.trim_end()); diff --git a/src/repl/mod.rs b/src/repl/mod.rs index fadb81f..46d0cca 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -19,11 +19,10 @@ use lazy_static::lazy_static; use reedline::Signal; use std::rc::Rc; -pub const REPL_COMMANDS: [(&str, &str); 15] = [ +pub const REPL_COMMANDS: [(&str, &str); 14] = [ (".info", "Print system-wide information"), (".set", "Modify the configuration temporarily"), (".model", "Choose a model"), - (".prompt", "Add a GPT prompt"), (".role", "Select a role"), (".clear role", "Clear the currently selected role"), (".session", "Start a session"), @@ -134,14 +133,6 @@ impl Repl { handler.handle(ReplCmd::UpdateConfig(args.unwrap_or_default().to_string()))?; self.prompt.sync_config(); } - ".prompt" => { - let text = args.unwrap_or_default().to_string(); - if text.is_empty() { - print_now!("Usage: .prompt <text>.\n\n"); - } else { - handler.handle(ReplCmd::Prompt(text))?; - } - } ".session" => { handler.handle(ReplCmd::StartSession(args.map(|v| v.to_string())))?; } |
