-
Notifications
You must be signed in to change notification settings - Fork 83
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move client features behind feature flags
Signed-off-by: Naian <[email protected]>
- Loading branch information
1 parent
8386049
commit 77fdaec
Showing
9 changed files
with
49 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,24 @@ | ||
#[cfg(feature = "client_tui")] | ||
use log::info; | ||
/// Aries Agent TUI | ||
#[cfg(feature = "client_tui")] | ||
use mediator::{aries_agent::AgentMaker, tui}; | ||
|
||
#[cfg(feature = "client_tui")] | ||
#[tokio::main] | ||
async fn main() { | ||
fn setup_logging() { | ||
let env = env_logger::Env::default().default_filter_or("info"); | ||
env_logger::init_from_env(env); | ||
} | ||
use mediator::{ | ||
aries_agent::AgentMaker, | ||
tui, | ||
utils::binary_utils::{load_dot_env, setup_logging}, | ||
}; | ||
|
||
fn load_dot_env() { | ||
let _ = dotenvy::dotenv(); | ||
} | ||
info!("TUI initializing!"); | ||
load_dot_env(); | ||
setup_logging(); | ||
log::info!("TUI initializing!"); | ||
let agent = AgentMaker::new_demo_agent().await.unwrap(); | ||
tui::init_tui(agent).await; | ||
} | ||
|
||
#[cfg(not(feature = "client_tui"))] | ||
fn main() { | ||
print!("This is a placeholder binary. Please enable \"client_tui\" feature to to build the functional client_tui binary.") | ||
print!( | ||
"This is a placeholder binary. Please enable \"client_tui\" feature to to build the \ | ||
functional client_tui binary." | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pub fn setup_logging() { | ||
let env = env_logger::Env::default().default_filter_or("info"); | ||
env_logger::init_from_env(env); | ||
} | ||
|
||
pub fn load_dot_env() { | ||
let _ = dotenvy::dotenv(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters