summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md1
-rw-r--r--config.example.yaml1
-rw-r--r--src/config/mod.rs19
3 files changed, 0 insertions, 21 deletions
diff --git a/README.md b/README.md
index a1adc60..977d7d8 100644
--- a/README.md
+++ b/README.md
@@ -86,7 +86,6 @@ highlight: true # Controls syntax highlighting
light_theme: false # Activates a light color theme when true
wrap: no # Controls text wrapping (no, auto, <max-width>)
wrap_code: false # Enables or disables wrapping of code blocks
-auto_copy: false # Enables or disables automatic copying the last LLM response to the clipboard
keybindings: emacs # Choose keybinding style (emacs, vi)
prelude: null # Set a default role or session to start with (role:<name>, session:<name>)
diff --git a/config.example.yaml b/config.example.yaml
index d3e1ea1..c64ed05 100644
--- a/config.example.yaml
+++ b/config.example.yaml
@@ -7,7 +7,6 @@ highlight: true # Controls syntax highlighting
light_theme: false # Activates a light color theme when true. ENV: AICHAT_LIGHT_THEME
wrap: no # Controls text wrapping (no, auto, <max-width>)
wrap_code: false # Enables or disables wrapping of code blocks
-auto_copy: false # Enables or disables automatic copying the last LLM response to the clipboard
keybindings: emacs # Choose keybinding style (emacs, vi)
prelude: null # Set a default role or session to start with (e.g. role:<name>, session:<name>)
diff --git a/src/config/mod.rs b/src/config/mod.rs
index 6cbbc05..23ee153 100644
--- a/src/config/mod.rs
+++ b/src/config/mod.rs
@@ -93,7 +93,6 @@ pub struct Config {
pub light_theme: bool,
pub wrap: Option<String>,
pub wrap_code: bool,
- pub auto_copy: bool,
pub keybindings: Keybindings,
pub prelude: Option<String>,
pub repl_prelude: Option<String>,
@@ -146,7 +145,6 @@ impl Default for Config {
light_theme: false,
wrap: None,
wrap_code: false,
- auto_copy: false,
keybindings: Default::default(),
prelude: None,
repl_prelude: None,
@@ -450,7 +448,6 @@ impl Config {
("light_theme", self.light_theme.to_string()),
("wrap", wrap),
("wrap_code", self.wrap_code.to_string()),
- ("auto_copy", self.auto_copy.to_string()),
("keybindings", self.keybindings.stringify().into()),
("prelude", format_option_value(&self.prelude)),
("config_file", display_path(&Self::config_file()?)),
@@ -518,10 +515,6 @@ impl Config {
let value = value.parse().with_context(|| "Invalid value")?;
self.dry_run = value;
}
- "auto_copy" => {
- let value = value.parse().with_context(|| "Invalid value")?;
- self.auto_copy = value;
- }
_ => bail!("Unknown key `{key}`"),
}
Ok(())
@@ -1048,7 +1041,6 @@ impl Config {
"save_session",
"highlight",
"dry_run",
- "auto_copy",
]
.into_iter()
.map(|v| (format!("{v} "), None))
@@ -1074,7 +1066,6 @@ impl Config {
}
"highlight" => complete_bool(self.highlight),
"dry_run" => complete_bool(self.dry_run),
- "auto_copy" => complete_bool(self.auto_copy),
_ => vec![],
};
(values.into_iter().map(|v| (v, None)).collect(), args[1])
@@ -1172,9 +1163,6 @@ impl Config {
output.insert("wrap", wrap.clone());
}
}
- if self.auto_copy {
- output.insert("auto_copy", "true".to_string());
- }
if !role.is_derived() {
output.insert("role", role.name().to_string());
}
@@ -1232,7 +1220,6 @@ impl Config {
input.clear_patch_text();
self.last_message = Some((input.clone(), output.to_string(), self.bot.is_some()));
self.save_message(input, output, tool_results)?;
- self.maybe_copy(output);
Ok(())
}
@@ -1281,12 +1268,6 @@ impl Config {
.with_context(|| "Failed to save message")
}
- fn maybe_copy(&self, text: &str) {
- if self.auto_copy {
- let _ = set_text(text);
- }
- }
-
fn open_message_file(&self) -> Result<File> {
let path = self.messages_file()?;
ensure_parent_exists(&path)?;