summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-03-06 07:08:51 +0800
committersigoden <sigoden@gmail.com>2023-03-06 07:08:51 +0800
commitc5a2f4603c3c3eb7995f4e77453ab8ca50ff88b8 (patch)
tree16c394645144c2dd102327d08d8c5bdcc7ae3f7b /src/main.rs
parent2152667fc6551129fd0bb14ca9e403728855aea3 (diff)
downloadaichat-c5a2f4603c3c3eb7995f4e77453ab8ca50ff88b8.tar.gz
chore: optimize code
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs
index ec127f5..c7ae56e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -19,7 +19,7 @@ use is_terminal::IsTerminal;
use anyhow::{anyhow, Result};
use clap::Parser;
use render::MarkdownRender;
-use repl::{Repl, ReplCmdHandler};
+use repl::Repl;
fn main() -> Result<()> {
let cli = Cli::parse();
@@ -73,6 +73,5 @@ fn start_directive(client: ChatGptClient, config: SharedConfig, input: &str) ->
fn start_interactive(client: ChatGptClient, config: SharedConfig) -> Result<()> {
let mut repl = Repl::init(config.clone())?;
- let handler = ReplCmdHandler::init(client, config)?;
- repl.run(handler)
+ repl.run(client, config)
}