mirror of
https://github.com/openai/codex.git
synced 2026-11-20 22:40:37 +00:00
fix: negotiate disabled fork support before creation
This commit is contained in:
@@ -864,15 +864,8 @@ impl ThreadManager {
|
||||
{
|
||||
let snapshot = snapshot.into();
|
||||
let history = self.initial_history_from_rollout_path(path).await?;
|
||||
self.fork_thread_from_history(
|
||||
snapshot,
|
||||
config,
|
||||
history,
|
||||
MultiAgentRuntimeOverride::Inherit,
|
||||
thread_source,
|
||||
parent_trace,
|
||||
)
|
||||
.await
|
||||
self.fork_thread_from_history(snapshot, config, history, thread_source, parent_trace)
|
||||
.await
|
||||
}
|
||||
|
||||
async fn initial_history_from_rollout_path(
|
||||
@@ -895,6 +888,30 @@ impl ThreadManager {
|
||||
|
||||
/// Fork an existing thread from already-loaded store history.
|
||||
pub async fn fork_thread_from_history<S>(
|
||||
&self,
|
||||
snapshot: S,
|
||||
config: Config,
|
||||
history: InitialHistory,
|
||||
thread_source: Option<ThreadSource>,
|
||||
parent_trace: Option<W3cTraceContext>,
|
||||
) -> CodexResult<NewThread>
|
||||
where
|
||||
S: Into<ForkSnapshot>,
|
||||
{
|
||||
self.fork_thread_from_history_with_runtime_override(
|
||||
snapshot,
|
||||
config,
|
||||
history,
|
||||
MultiAgentRuntimeOverride::Inherit,
|
||||
thread_source,
|
||||
parent_trace,
|
||||
)
|
||||
.await
|
||||
}
|
||||
|
||||
/// Fork an existing thread from already-loaded store history with an
|
||||
/// explicit multi-agent runtime override.
|
||||
pub async fn fork_thread_from_history_with_runtime_override<S>(
|
||||
&self,
|
||||
snapshot: S,
|
||||
config: Config,
|
||||
|
||||
@@ -199,7 +199,6 @@ async fn fork_thread_from_history_does_not_require_source_rollout_path() {
|
||||
history: source_items.clone(),
|
||||
rollout_path: None,
|
||||
}),
|
||||
codex_core::MultiAgentRuntimeOverride::Inherit,
|
||||
/*thread_source*/ None,
|
||||
/*parent_trace*/ None,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user