chore: update help-texts/warnings in repl

pull/460/head
sigoden 2 months ago
parent 34041a976c
commit 8433b1fcd7

@ -32,7 +32,7 @@ lazy_static! {
ReplCommand::new(".model", "Change the current LLM", State::all()), ReplCommand::new(".model", "Change the current LLM", State::all()),
ReplCommand::new( ReplCommand::new(
".prompt", ".prompt",
"Create a temporary role using a custom prompt", "Create a temporary role using a prompt",
State::able_change_role() State::able_change_role()
), ),
ReplCommand::new( ReplCommand::new(
@ -116,7 +116,7 @@ impl Repl {
} }
Ok(Signal::CtrlC) => { Ok(Signal::CtrlC) => {
self.abort.set_ctrlc(); self.abort.set_ctrlc();
println!("(To exit, press Ctrl+D or type .exit)\n"); println!("(To exit, press Ctrl+D or enter \".exit\")\n");
} }
Ok(Signal::CtrlD) => { Ok(Signal::CtrlD) => {
self.abort.set_ctrld(); self.abort.set_ctrld();
@ -293,7 +293,7 @@ impl Repl {
let version = env!("CARGO_PKG_VERSION"); let version = env!("CARGO_PKG_VERSION");
print!( print!(
r#"Welcome to aichat {version} r#"Welcome to aichat {version}
Type ".help" for more information. Type ".help" for additional help.
"# "#
) )
} }
@ -410,7 +410,7 @@ impl Validator for ReplValidator {
} }
fn unknown_command() -> Result<()> { fn unknown_command() -> Result<()> {
bail!(r#"Unknown command. Type ".help" for more information."#); bail!(r#"Unknown command. Type ".help" for additional help."#);
} }
fn dump_repl_help() { fn dump_repl_help() {
@ -423,8 +423,8 @@ fn dump_repl_help() {
r###"{head} r###"{head}
Type ::: to start multi-line editing, type ::: to finish it. Type ::: to start multi-line editing, type ::: to finish it.
Press Ctrl+O to open an editor to edit line input. Press Ctrl+O to open an editor for editing the input buffer.
Press Ctrl+C to cancel the response, Ctrl+D to exit the REPL"###, Press Ctrl+C to cancel the response, Ctrl+D to exit the REPL."###,
); );
} }

Loading…
Cancel
Save