From a7f2da156c0692121e35dbe20bdacc76baadd5c4 Mon Sep 17 00:00:00 2001 From: sigoden Date: Thu, 9 Mar 2023 08:26:35 +0800 Subject: feat: add role info to readline indicator (#47) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ``` coder〉 ``` --- src/repl/mod.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/repl/mod.rs') diff --git a/src/repl/mod.rs b/src/repl/mod.rs index b5fee57..e9a0b51 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -4,6 +4,7 @@ mod init; pub use self::abort::*; pub use self::handler::*; +pub use self::init::Repl; use crate::client::ChatGptClient; use crate::config::SharedConfig; @@ -11,7 +12,7 @@ use crate::print_now; use crate::term; use anyhow::{Context, Result}; -use reedline::{DefaultPrompt, Reedline, Signal}; +use reedline::Signal; use std::sync::Arc; pub const REPL_COMMANDS: [(&str, &str, bool); 10] = [ @@ -27,11 +28,6 @@ pub const REPL_COMMANDS: [(&str, &str, bool); 10] = [ (".exit", "Exit the REPL", false), ]; -pub struct Repl { - editor: Reedline, - prompt: DefaultPrompt, -} - impl Repl { pub fn run(&mut self, client: ChatGptClient, config: SharedConfig) -> Result<()> { let abort = AbortSignal::new(); -- cgit v1.2.3