refactor: created a single install_builtins free function to remove from Config::init

This commit is contained in:
2026-04-19 17:54:50 -06:00
parent dba6304f51
commit f1914f6bd4
7 changed files with 186 additions and 21 deletions
+4 -2
View File
@@ -22,8 +22,8 @@ use crate::client::{
use crate::config::paths;
use crate::config::{
Agent, AppConfig, AppState, CODE_ROLE, Config, EXPLAIN_SHELL_ROLE, Input, RequestContext,
SHELL_ROLE, TEMP_SESSION_NAME, WorkingMode, ensure_parent_exists, list_agents, load_env_file,
macro_execute,
SHELL_ROLE, TEMP_SESSION_NAME, WorkingMode, ensure_parent_exists, install_builtins,
list_agents, load_env_file, macro_execute,
};
use crate::render::{prompt_theme, render_error};
use crate::repl::Repl;
@@ -82,6 +82,8 @@ async fn main() -> Result<()> {
let log_path = setup_logger()?;
install_builtins()?;
if let Some(client_arg) = &cli.authenticate {
let config = Config::init_bare()?;
let (client_name, provider) = resolve_oauth_client(client_arg.as_deref(), &config.clients)?;