From 6b34f2e2268352cc707c4ea4c97f84abed62ab0c Mon Sep 17 00:00:00 2001 From: Andrew Phillips Date: Tue, 29 Jul 2025 14:46:57 -0300 Subject: [PATCH] fix: remove duplicate TtyMetaPlugin implementation Co-authored-by: aider (openai/andrew.openrouter.qwen.qwen3-coder) --- src/meta_plugin/system.rs | 39 --------------------------------------- 1 file changed, 39 deletions(-) diff --git a/src/meta_plugin/system.rs b/src/meta_plugin/system.rs index 689b564..5692b25 100644 --- a/src/meta_plugin/system.rs +++ b/src/meta_plugin/system.rs @@ -359,42 +359,3 @@ impl MetaPlugin for FullHostnameMetaPlugin { } } -#[derive(Debug, Clone, Default)] -pub struct TtyMetaPlugin { - meta_name: String, -} - -impl TtyMetaPlugin { - pub fn new() -> TtyMetaPlugin { - TtyMetaPlugin { - meta_name: "tty".to_string(), - } - } -} - -impl MetaPlugin for TtyMetaPlugin { - fn create(&self) -> Result> { - Ok(Box::new(io::sink())) - } - - fn finalize(&mut self) -> io::Result { - // Use isatty::tty_path to get the current TTY path - match isatty::stdout_isatty() { - true => { - match isatty::tty_path() { - Ok(path) => Ok(path.to_string_lossy().to_string()), - Err(_) => Ok("unknown tty".to_string()), - } - }, - false => Ok("not a tty".to_string()), - } - } - - fn update(&mut self, _data: &[u8]) { - // No update needed for TTY - } - - fn meta_name(&mut self) -> String { - self.meta_name.clone() - } -}