summaryrefslogtreecommitdiffstats
path: root/src/repl/mod.rs
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-06-23 19:31:29 +0800
committerGitHub <noreply@github.com>2024-06-23 19:31:29 +0800
commit777638049b7ea4187b152d70ccc9d38d91948b2e (patch)
treebfa93850191b63159b36c03c45e0a188ef6c2c4b /src/repl/mod.rs
parent6d148c9c53cd4ac7849f52b956aba87e84cc3d4d (diff)
downloadaichat-777638049b7ea4187b152d70ccc9d38d91948b2e.tar.gz
refactor: minor improvement (#638)
Diffstat (limited to 'src/repl/mod.rs')
-rw-r--r--src/repl/mod.rs12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/repl/mod.rs b/src/repl/mod.rs
index 1df3fdb..8083820 100644
--- a/src/repl/mod.rs
+++ b/src/repl/mod.rs
@@ -123,7 +123,7 @@ lazy_static! {
"Include files with the message",
AssertState::pass()
),
- ReplCommand::new(".continue", "Continue response", AssertState::pass()),
+ ReplCommand::new(".continue", "Continue the response", AssertState::pass()),
ReplCommand::new(
".regenerate",
"Regenerate the last response",
@@ -443,6 +443,16 @@ Type ".help" for additional help.
KeyCode::Enter,
ReedlineEvent::Edit(vec![EditCommand::InsertNewline]),
);
+ keybindings.add_binding(
+ KeyModifiers::SHIFT,
+ KeyCode::Enter,
+ ReedlineEvent::Edit(vec![EditCommand::InsertNewline]),
+ );
+ keybindings.add_binding(
+ KeyModifiers::ALT,
+ KeyCode::Enter,
+ ReedlineEvent::Edit(vec![EditCommand::InsertNewline]),
+ );
}
fn create_edit_mode(config: &GlobalConfig) -> Box<dyn EditMode> {