From 7d17b436f948fb450a9da05e219275fabf867d80 Mon Sep 17 00:00:00 2001 From: "Dhanji R. Prasanna" Date: Wed, 14 Jan 2026 04:26:42 +0530 Subject: [PATCH] refactor(g3-core): remove 3 unused Agent constructor variants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove dead code - constructor variants that had no callers: - new_with_readme() - new_autonomous_with_readme() - new_with_quiet() These were thin wrappers around new_with_mode_and_readme() that were never used externally. All 5 remaining constructors have verified callers. Results: - lib.rs reduced from 2817 to 2797 lines (-20 lines) - Eliminated code-path aliasing: 8 constructors → 5 constructors - All g3-core tests pass - Full workspace compiles cleanly Agent: fowler --- crates/g3-core/src/lib.rs | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/crates/g3-core/src/lib.rs b/crates/g3-core/src/lib.rs index 8afc703..410b1c8 100644 --- a/crates/g3-core/src/lib.rs +++ b/crates/g3-core/src/lib.rs @@ -137,30 +137,10 @@ impl Agent { Self::new_with_mode(config, ui_writer, false, false).await } - pub async fn new_with_readme( - config: Config, - ui_writer: W, - readme_content: Option, - ) -> Result { - Self::new_with_mode_and_readme(config, ui_writer, false, readme_content, false, None).await - } - - pub async fn new_autonomous_with_readme( - config: Config, - ui_writer: W, - readme_content: Option, - ) -> Result { - Self::new_with_mode_and_readme(config, ui_writer, true, readme_content, false, None).await - } - pub async fn new_autonomous(config: Config, ui_writer: W) -> Result { Self::new_with_mode(config, ui_writer, true, false).await } - pub async fn new_with_quiet(config: Config, ui_writer: W, quiet: bool) -> Result { - Self::new_with_mode(config, ui_writer, false, quiet).await - } - pub async fn new_with_readme_and_quiet( config: Config, ui_writer: W,