mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Route ThreadManager rollout path reads through thread store (#21265)
- Route ThreadManager rollout-path resume/fork through ThreadStore history reads. - Add in-memory store coverage proving path-addressed reads are used. This isn't strictly necessary for the ThreadStore migration, since these ThreadManager methods _only_ work for path-based lookups, but I'm trying to migrate all the rollout recorder callsites to use the threadstore were possible for consistency.
This commit is contained in:
@@ -256,10 +256,16 @@ fn stored_thread_from_state(
|
||||
items: history_items.clone(),
|
||||
});
|
||||
let name = state.names.get(&thread_id).cloned().flatten();
|
||||
let rollout_path = state
|
||||
.rollout_paths
|
||||
.iter()
|
||||
.find_map(|(path, mapped_thread_id)| {
|
||||
(*mapped_thread_id == thread_id).then(|| path.clone())
|
||||
});
|
||||
|
||||
Ok(StoredThread {
|
||||
thread_id,
|
||||
rollout_path: None,
|
||||
rollout_path,
|
||||
forked_from_id: created.forked_from_id,
|
||||
preview: String::new(),
|
||||
name,
|
||||
|
||||
Reference in New Issue
Block a user