mirror of
https://github.com/openai/codex.git
synced 2026-11-13 14:46:14 +00:00
codex: migrate (more) app-server thread history reads to ThreadStore (#20575)
Migrate token usage replay, rollback responses, and detached review setup (a special case of forking) to be served from ThreadStore reads rather direct rollout files. - replay restored token usage from already-loaded `RolloutItem` history instead of reopening `Thread.path` - rebuild rollback responses from loaded `ThreadStore` snapshots and history - start detached reviews from store-backed parent history and stored review-thread metadata - remove obsolete app-server rollout-summary helper code that became dead after the store-backed migration - preserve response/notification ordering for resume, fork, rollback, and detached review flows - add integration test coverage for the affected paths
This commit is contained in:
11 files changed
+276
-147
No files matched your search
@@ -10,6 +10,7 @@ use crate::AppendThreadItemsParams;
|
||||
use crate::CreateThreadParams;
|
||||
use crate::LoadThreadHistoryParams;
|
||||
use crate::LocalThreadStore;
|
||||
use crate::ReadThreadParams;
|
||||
use crate::ResumeThreadParams;
|
||||
use crate::StoredThread;
|
||||
use crate::StoredThreadHistory;
|
||||
@@ -140,6 +141,20 @@ impl LiveThread {
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn read_thread(
|
||||
&self,
|
||||
include_archived: bool,
|
||||
include_history: bool,
|
||||
) -> ThreadStoreResult<StoredThread> {
|
||||
self.thread_store
|
||||
.read_thread(ReadThreadParams {
|
||||
thread_id: self.thread_id,
|
||||
include_archived,
|
||||
include_history,
|
||||
})
|
||||
.await
|
||||
}
|
||||
|
||||
pub async fn update_memory_mode(
|
||||
&self,
|
||||
mode: ThreadMemoryMode,
|
||||
|
||||
Reference in new issue
Block a user