diff options
| author | sigoden <sigoden@gmail.com> | 2023-05-04 22:42:50 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-05-04 22:42:50 +0800 |
| commit | 00ce1575715329a21726a506b13c0c2aef7f3f82 (patch) | |
| tree | 766da2bf873b8f37936e1f5a385fc19d191bc193 /src/repl/mod.rs | |
| parent | cf03952c7bd44a3ad94a675b846cdfafb2af1c75 (diff) | |
| download | aichat-00ce1575715329a21726a506b13c0c2aef7f3f82.tar.gz | |
feat: add `.copy` command (#119)
Diffstat (limited to 'src/repl/mod.rs')
| -rw-r--r-- | src/repl/mod.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/repl/mod.rs b/src/repl/mod.rs index 6bedfa3..8f3d184 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -19,7 +19,7 @@ use reedline::Signal; use std::borrow::Cow; use std::sync::Arc; -pub const REPL_COMMANDS: [(&str, &str); 12] = [ +pub const REPL_COMMANDS: [(&str, &str); 13] = [ (".info", "Print system-wide information"), (".set", "Modify the configuration temporarily"), (".model", "Choose a model"), @@ -28,6 +28,7 @@ pub const REPL_COMMANDS: [(&str, &str); 12] = [ (".clear role", "Clear the currently selected role"), (".conversation", "Start a conversation."), (".clear conversation", "End current conversation."), + (".copy", "Copy the last output to the clipboard"), (".history", "Print the history"), (".clear history", "Clear the history"), (".help", "Print this help message"), @@ -138,6 +139,9 @@ impl Repl { ".conversation" => { handler.handle(ReplCmd::StartConversation)?; } + ".copy" => { + handler.handle(ReplCmd::Copy)?; + } _ => dump_unknown_command(), }, None => { |
