From b7cb6f89f137e20f1d6dbb1f66e40f319c978a45 Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 8 Mar 2023 11:27:51 +0800 Subject: fix: repl set save true not work if not rerun(#34) --- src/main.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/main.rs') diff --git a/src/main.rs b/src/main.rs index dfce165..7d79b07 100644 --- a/src/main.rs +++ b/src/main.rs @@ -70,7 +70,6 @@ fn start_directive( input: &str, no_stream: bool, ) -> Result<()> { - let mut file = config.borrow().open_message_file()?; let prompt = config.borrow().get_prompt(); let highlight = config.borrow().highlight && stdout().is_terminal(); let output = if no_stream { @@ -94,7 +93,7 @@ fn start_directive( wg.wait(); output }; - config.borrow().save_message(file.as_mut(), input, &output) + config.borrow().save_message(input, &output) } fn start_interactive(client: ChatGptClient, config: SharedConfig) -> Result<()> { -- cgit v1.2.3