diff options
| author | sigoden <sigoden@gmail.com> | 2023-03-09 08:26:35 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-09 08:26:35 +0800 |
| commit | a7f2da156c0692121e35dbe20bdacc76baadd5c4 (patch) | |
| tree | 0b25540ce1676b262525122232fc1d438f6df7c4 /src/repl/mod.rs | |
| parent | e78b5f7c58fa3b6dff71042da2bbf6003c78184d (diff) | |
| download | aichat-a7f2da156c0692121e35dbe20bdacc76baadd5c4.tar.gz | |
feat: add role info to readline indicator (#47)
```
coder〉
```
Diffstat (limited to 'src/repl/mod.rs')
| -rw-r--r-- | src/repl/mod.rs | 8 |
1 files changed, 2 insertions, 6 deletions
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(); |
