diff options
| author | sigoden <sigoden@gmail.com> | 2023-03-08 11:27:51 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-08 11:27:51 +0800 |
| commit | b7cb6f89f137e20f1d6dbb1f66e40f319c978a45 (patch) | |
| tree | 85ebf416d8ce8b2bbb808237578dca5b5be712e2 /src/main.rs | |
| parent | b05fce7bca0e0e69851dc609eb527956304defcf (diff) | |
| download | aichat-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.rs | 3 |
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<()> { |
