mirror of
https://github.com/openai/codex.git
synced 2026-11-14 21:40:39 +00:00
Tighten BTW fork cleanup
- fold interrupted snapshot behavior into the main fork API - trim BTW tests that asserted internal channel/session details - drop the app-server helper test for discard internals Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
co-authored by
Codex
parent
a08e852b05
commit
312076fdf1
@@ -12,6 +12,7 @@ use super::compact::FIRST_REPLY;
|
||||
use super::compact::SUMMARY_TEXT;
|
||||
use anyhow::Result;
|
||||
use codex_core::CodexThread;
|
||||
use codex_core::ForkSnapshot;
|
||||
use codex_core::ThreadManager;
|
||||
use codex_core::compact::SUMMARIZATION_PROMPT;
|
||||
use codex_core::config::Config;
|
||||
@@ -858,8 +859,14 @@ async fn fork_thread(
|
||||
path: std::path::PathBuf,
|
||||
nth_user_message: usize,
|
||||
) -> Arc<CodexThread> {
|
||||
Box::pin(manager.fork_thread(nth_user_message, config.clone(), path, false, None))
|
||||
.await
|
||||
.expect("fork conversation")
|
||||
.thread
|
||||
Box::pin(manager.fork_thread(
|
||||
ForkSnapshot::TruncateBeforeNthUserMessage(nth_user_message),
|
||||
config.clone(),
|
||||
path,
|
||||
/*persist_extended_history*/ false,
|
||||
/*parent_trace*/ None,
|
||||
))
|
||||
.await
|
||||
.expect("fork conversation")
|
||||
.thread
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user