summaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2023-03-08 11:27:51 +0800
committerGitHub <noreply@github.com>2023-03-08 11:27:51 +0800
commitb7cb6f89f137e20f1d6dbb1f66e40f319c978a45 (patch)
tree85ebf416d8ce8b2bbb808237578dca5b5be712e2 /src/main.rs
parentb05fce7bca0e0e69851dc609eb527956304defcf (diff)
downloadaichat-b7cb6f89f137e20f1d6dbb1f66e40f319c978a45.tar.gz
fix: repl set save true not work if not rerun(#34)
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs3
1 files changed, 1 insertions, 2 deletions
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<()> {