mirror of
https://github.com/openai/codex.git
synced 2026-10-31 19:28:49 +00:00
Consolidate thread startup around StartThreadOptions (#34814)
## What changed - Add `StartThreadOptions::new` to provide the standard configuration for a new thread. - Make `ThreadManager::start_thread` the single thread-start entry point and migrate callers from the previous convenience methods. - Derive default environment selections when `environments` is `None`, while preserving explicit selections, including an empty list. GitOrigin-RevId: 8977dc11aed54c5e1215a81eaed2b2cf5fc6087a
This commit is contained in:
@@ -45,6 +45,7 @@ use codex_core_api::RealtimeAudioConfig;
|
||||
use codex_core_api::RealtimeConfig;
|
||||
use codex_core_api::SessionPickerViewMode;
|
||||
use codex_core_api::SessionSource;
|
||||
use codex_core_api::StartThreadOptions;
|
||||
use codex_core_api::TerminalResizeReflowConfig;
|
||||
use codex_core_api::ThreadManager;
|
||||
use codex_core_api::ThreadStoreConfig;
|
||||
@@ -152,7 +153,7 @@ async fn run_main(arg0_paths: Arg0DispatchPaths) -> anyhow::Result<()> {
|
||||
let NewThread {
|
||||
thread_id, thread, ..
|
||||
} = thread_manager
|
||||
.start_thread(config)
|
||||
.start_thread(StartThreadOptions::new(config))
|
||||
.await
|
||||
.context("start Codex thread")?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user