Use the image generation extension by default (#31596)

This commit is contained in:
Won Park authored and GitHub committed 2026-07-09 12:25:19 +09:00
1 parent 2342b2c2a6
commit a7c72aee8b
33 files changed
+158 -861

No files matched your search

+8 -2
View File
@@ -6,7 +6,7 @@ use codex_core::StateDbHandle;
use codex_core::ThreadManager;
use codex_core::config::Config;
use codex_exec_server::EnvironmentManager;
use codex_extension_api::empty_extension_registry;
use codex_extension_api::ExtensionRegistryBuilder;
use codex_home::CodexHomeUserInstructionsProvider;
use codex_login::AuthManager;
use codex_login::default_client::USER_AGENT_SUFFIX;
@@ -66,12 +66,18 @@ impl MessageProcessor {
let user_instructions_provider = Arc::new(CodexHomeUserInstructionsProvider::new(
config.codex_home.clone(),
));
let mut extensions = ExtensionRegistryBuilder::<Config>::new();
codex_image_generation_extension::install(
&mut extensions,
auth_manager.clone(),
|config: &Config| Some(config.codex_home.clone()),
);
let thread_manager = Arc::new(ThreadManager::new(
config.as_ref(),
auth_manager,
SessionSource::Mcp,
environment_manager,
empty_extension_registry(),
Arc::new(extensions.build()),
user_instructions_provider,
/*analytics_events_client*/ None,
codex_core::thread_store_from_config(config.as_ref(), state_db.clone()),