summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsigoden <sigoden@gmail.com>2024-03-06 01:46:47 +0000
committersigoden <sigoden@gmail.com>2024-03-06 01:46:47 +0000
commit46cb320aa594c41203f0daa67d3e11594e7a3917 (patch)
tree99c9d736fa3eec73bda21d042c556166597fea2b
parentb82ae88a15debd83d646c43755a50678ca4d3891 (diff)
downloadaichat-46cb320aa594c41203f0daa67d3e11594e7a3917.tar.gz
chore: spell check
-rw-r--r--README.md2
-rw-r--r--src/config/mod.rs6
-rw-r--r--src/main.rs4
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 {