summaryrefslogtreecommitdiffstats
path: root/src/repl/handler.rs
diff options
context:
space:
mode:
authorshane s <stephenson.shane.a@gmail.com>2023-05-04 09:22:12 -0400
committerGitHub <noreply@github.com>2023-05-04 21:22:12 +0800
commitcf03952c7bd44a3ad94a675b846cdfafb2af1c75 (patch)
tree8c7cffe33e8650580635553b24efeceaafba6eaa /src/repl/handler.rs
parent2489e34993986251a56dbc6dfe2233d85b02ac0e (diff)
downloadaichat-cf03952c7bd44a3ad94a675b846cdfafb2af1c75.tar.gz
feat: add `config.auto_copy` (#102)
* added config option to copy all ChatGPT output to clipboard * formatted with * updates --------- Co-authored-by: sigoden <sigoden@gmail.com>
Diffstat (limited to 'src/repl/handler.rs')
-rw-r--r--src/repl/handler.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/repl/handler.rs b/src/repl/handler.rs
index 8d51439..c38f607 100644
--- a/src/repl/handler.rs
+++ b/src/repl/handler.rs
@@ -64,6 +64,7 @@ impl ReplCmdHandler {
wg.wait();
let buffer = ret?;
self.config.read().save_message(&input, &buffer)?;
+ let _ = self.config.read().copy_message(&buffer);
self.config.write().save_conversation(&input, &buffer)?;
*self.reply.borrow_mut() = buffer;
}