From 46cb320aa594c41203f0daa67d3e11594e7a3917 Mon Sep 17 00:00:00 2001 From: sigoden Date: Wed, 6 Mar 2024 01:46:47 +0000 Subject: chore: spell check --- README.md | 2 +- src/config/mod.rs | 6 +++--- src/main.rs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index b69c70c..48af88e 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![CI](https://github.com/sigoden/aichat/actions/workflows/ci.yaml/badge.svg)](https://github.com/sigoden/aichat/actions/workflows/ci.yaml) [![Crates](https://img.shields.io/crates/v/aichat.svg)](https://crates.io/crates/aichat) -All in one CLI tool for 10+ AI, supports OpenAI, Gemini, Claude, Mistral, LocalAI, Ollama, VertexAI, Ernie, Qianwen... +All in one CLI tool for 10+ AI, including OpenAI, Gemini, Claude, Mistral, LocalAI, Ollama, VertexAI, Ernie, Qianwen... Command Mode: diff --git a/src/config/mod.rs b/src/config/mod.rs index 909e751..ffdb942 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -682,9 +682,9 @@ impl Config { } pub fn should_compress_session(&mut self) -> bool { - if let Some(sesion) = self.session.as_mut() { - if sesion.need_compress(self.compress_threshold) { - sesion.compressing = true; + if let Some(session) = self.session.as_mut() { + if session.need_compress(self.compress_threshold) { + session.compressing = true; return true; } } diff --git a/src/main.rs b/src/main.rs index f6cafa3..c967611 100644 --- a/src/main.rs +++ b/src/main.rs @@ -167,7 +167,7 @@ fn execute(config: &GlobalConfig, text: &str) -> Result<()> { println!("{}", markdown_render.render(&eval_str).trim()); let mut describe = false; loop { - let anwser = Text::new("[e]xecute, [d]escribe, [a]bort: ") + let answer = Text::new("[e]xecute, [d]escribe, [a]bort: ") .with_default("e") .with_validator(|input: &str| { match matches!(input, "E" | "e" | "D" | "d" | "A" | "a") { @@ -181,7 +181,7 @@ fn execute(config: &GlobalConfig, text: &str) -> Result<()> { println!(); - match anwser.as_str() { + match answer.as_str() { "E" | "e" => { let code = run_command(&eval_str)?; if code != 0 { -- cgit v1.2.3