mirror of
https://github.com/openai/codex.git
synced 2026-11-19 23:05:23 +00:00
Add fork snapshot modes (#15239)
## Summary - add `ForkSnapshotMode` to `ThreadManager::fork_thread` so callers can request either a committed snapshot or an interrupted snapshot - share the model-visible `<turn_aborted>` history marker between the live interrupt path and interrupted forks - update the small set of direct fork callsites to pass `ForkSnapshotMode::Committed` Note: this enables /btw to work similarly as Esc to interrupt (hopefully somewhat in distribution) --------- Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
1 parent
84fb180eeb
commit
f547b79bd0
15 files changed
+823
-52
No files matched your search
@@ -57,6 +57,7 @@ use codex_app_server_protocol::RequestId;
|
||||
use codex_arg0::Arg0DispatchPaths;
|
||||
use codex_core::AuthManager;
|
||||
use codex_core::CodexAuth;
|
||||
use codex_core::ForkSnapshot;
|
||||
use codex_core::ThreadManager;
|
||||
use codex_core::config::Config;
|
||||
use codex_core::config::ConfigBuilder;
|
||||
@@ -2502,7 +2503,7 @@ impl App {
|
||||
);
|
||||
let forked = thread_manager
|
||||
.fork_thread(
|
||||
usize::MAX,
|
||||
ForkSnapshot::Interrupted,
|
||||
config.clone(),
|
||||
target_session.path.clone(),
|
||||
/*persist_extended_history*/ false,
|
||||
@@ -2925,7 +2926,7 @@ impl App {
|
||||
match self
|
||||
.server
|
||||
.fork_thread(
|
||||
usize::MAX,
|
||||
ForkSnapshot::Interrupted,
|
||||
self.config.clone(),
|
||||
path.clone(),
|
||||
/*persist_extended_history*/ false,
|
||||
|
||||
Reference in new issue
Block a user