diff options
| author | sigoden <sigoden@gmail.com> | 2024-03-17 07:29:19 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-17 07:29:19 +0800 |
| commit | 992d5700416cb0e78c898392747e81919dbccac5 (patch) | |
| tree | 458810fc7a95fda5ba0d3bc2f2619fd75328526b /src | |
| parent | 930d8c12abec2860d01f51d495ee587d28c3f5e7 (diff) | |
| download | aichat-992d5700416cb0e78c898392747e81919dbccac5.tar.gz | |
refactor: cleanup the deprecated repl commands (#355)
Diffstat (limited to 'src')
| -rw-r--r-- | src/config/input.rs | 2 | ||||
| -rw-r--r-- | src/repl/mod.rs | 12 |
2 files changed, 1 insertions, 13 deletions
diff --git a/src/config/input.rs b/src/config/input.rs index c5ba1a2..083ee99 100644 --- a/src/config/input.rs +++ b/src/config/input.rs @@ -49,7 +49,7 @@ impl Input { match resolve_path(&file_item) { Some(file_path) => { let file_path = fs::canonicalize(file_path) - .with_context(|| format!("Unable to use file '{file_item}"))?; + .with_context(|| format!("Unable to use file '{file_item}'"))?; if is_image_ext(&file_path) { let data_url = read_media_to_data_url(&file_path)?; data_urls.insert(sha256sum(&data_url), file_path.display().to_string()); diff --git a/src/repl/mod.rs b/src/repl/mod.rs index b04907c..26a3fb4 100644 --- a/src/repl/mod.rs +++ b/src/repl/mod.rs @@ -162,9 +162,6 @@ impl Repl { println!("{}", output); } }, - ".edit" => { - println!(r#"Deprecated. Use ::: instead."#); - } ".model" => match args { Some(name) => { self.config.write().set_model(name)?; @@ -198,9 +195,6 @@ impl Repl { self.copy(config.last_reply()) .with_context(|| "Failed to copy the last output")?; } - ".read" => { - println!(r#"Deprecated. Use '.file' instead."#); - } ".file" => match args { Some(args) => { let (files, text) = match args.split_once(" -- ") { @@ -229,12 +223,6 @@ impl Repl { Some("messages") => { self.config.write().clear_session_messages()?; } - Some("role") => { - println!(r#"Deprecated. Use ".exit role" instead."#); - } - Some("conversation") => { - println!(r#"Deprecated. Use ".exit session" instead."#); - } _ => unknown_command()?, }, _ => unknown_command()?, |
