mirror of
https://github.com/openai/codex.git
synced 2026-11-25 07:23:22 +00:00
chore: expose codex_home via Config (#941)
This commit is contained in:
1 parent
0b9ef93da5
commit
5fc9fc3e3e
10 files changed
+212
-98
No files matched your search
@@ -2,13 +2,15 @@ use std::time::Duration;
|
||||
|
||||
use codex_core::Codex;
|
||||
use codex_core::ModelProviderInfo;
|
||||
use codex_core::config::Config;
|
||||
use codex_core::exec::CODEX_SANDBOX_NETWORK_DISABLED_ENV_VAR;
|
||||
use codex_core::protocol::ErrorEvent;
|
||||
use codex_core::protocol::EventMsg;
|
||||
use codex_core::protocol::InputItem;
|
||||
use codex_core::protocol::Op;
|
||||
mod test_support;
|
||||
use serde_json::Value;
|
||||
use tempfile::TempDir;
|
||||
use test_support::load_default_config_for_test;
|
||||
use tokio::time::timeout;
|
||||
use wiremock::Match;
|
||||
use wiremock::Mock;
|
||||
@@ -108,7 +110,8 @@ async fn keeps_previous_response_id_between_tasks() {
|
||||
};
|
||||
|
||||
// Init session
|
||||
let mut config = Config::load_default_config_for_test();
|
||||
let codex_home = TempDir::new().unwrap();
|
||||
let mut config = load_default_config_for_test(&codex_home);
|
||||
config.model_provider = model_provider;
|
||||
let ctrl_c = std::sync::Arc::new(tokio::sync::Notify::new());
|
||||
let (codex, _init_id) = Codex::spawn(config, ctrl_c.clone()).await.unwrap();
|
||||
|
||||
Reference in new issue
Block a user