summaryrefslogtreecommitdiffstats
path: root/src/config
diff options
context:
space:
mode:
Diffstat (limited to 'src/config')
-rw-r--r--src/config/mod.rs2
-rw-r--r--src/config/role.rs6
-rw-r--r--src/config/session.rs2
3 files changed, 5 insertions, 5 deletions
diff --git a/src/config/mod.rs b/src/config/mod.rs
index 695dad5..fbdd5b5 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -58,7 +58,7 @@ pub struct Config {
pub light_theme: bool,
/// Specify the text-wrapping mode (no*, auto, <max-width>)
pub wrap: Option<String>,
- /// Whethter wrap code block
+ /// Whether wrap code block
pub wrap_code: bool,
/// Automatically copy the last output to the clipboard
pub auto_copy: bool,
diff --git a/src/config/role.rs b/src/config/role.rs
index 87aca5e..16a6400 100644
--- a/src/config/role.rs
+++ b/src/config/role.rs
@@ -22,7 +22,7 @@ impl Role {
Ok(output)
}
- pub fn embeded(&self) -> bool {
+ pub fn embedded(&self) -> bool {
self.prompt.contains(INPUT_PLACEHOLDER)
}
@@ -42,7 +42,7 @@ impl Role {
}
pub fn echo_messages(&self, content: &str) -> String {
- if self.embeded() {
+ if self.embedded() {
merge_prompt_content(&self.prompt, content)
} else {
format!("{}\n{content}", self.prompt)
@@ -50,7 +50,7 @@ impl Role {
}
pub fn build_messages(&self, content: &str) -> Vec<Message> {
- if self.embeded() {
+ if self.embedded() {
let content = merge_prompt_content(&self.prompt, content);
vec![Message {
role: MessageRole::User,
diff --git a/src/config/session.rs b/src/config/session.rs
index b2d00bb..75b863f 100644
--- a/src/config/session.rs
+++ b/src/config/session.rs
@@ -44,7 +44,7 @@ impl Session {
let content = read_to_string(path)
.with_context(|| format!("Failed to load session {} at {}", name, path.display()))?;
let mut session: Self =
- serde_yaml::from_str(&content).with_context(|| format!("Invalid sesion {}", name))?;
+ serde_yaml::from_str(&content).with_context(|| format!("Invalid session {}", name))?;
session.name = name.to_string();
session.path = Some(path.display().to_string());