mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
Extract persisted history types into a dedicated crate (#37871)
## What changed - Add `codex-history` for model-history and persisted-rollout domain types, including `RolloutItem`, `RolloutLine`, `CompactedItem`, and initial/resumed history state. - Re-export the persisted types from `codex-rollout` and update consumers to use the new crate boundary instead of `codex-protocol`. - Preserve existing rollout serialization, including legacy numeric compacted-window IDs. ## Testing - Add `codex-history` tests for rollout JSON round trips, compacted-history compatibility, persisted history modes, and multi-agent version selection. GitOrigin-RevId: 944daa9297ddd231d3aebbdcb05fff4adf8b4e1b
This commit is contained in:
1 parent
a1c88e865d
commit
63002bdb26
127 files changed
+791
-673
No files matched your search
@@ -6,8 +6,8 @@ use codex_core::ThreadManager;
|
||||
use codex_protocol::ThreadId;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
use codex_protocol::protocol::EventMsg;
|
||||
use codex_protocol::protocol::RolloutItem;
|
||||
use codex_protocol::protocol::ThreadMemoryMode;
|
||||
use codex_rollout::RolloutItem;
|
||||
use codex_thread_store::AppendThreadItemsParams;
|
||||
use codex_thread_store::ReadThreadParams;
|
||||
use codex_thread_store::ResumeThreadParams;
|
||||
|
||||
@@ -12,13 +12,13 @@ use codex_protocol::models::ContentItem;
|
||||
use codex_protocol::models::ResponseItem;
|
||||
use codex_protocol::protocol::AgentMessageEvent;
|
||||
use codex_protocol::protocol::EventMsg;
|
||||
use codex_protocol::protocol::RolloutItem;
|
||||
use codex_protocol::protocol::TokenCountEvent;
|
||||
use codex_protocol::protocol::TokenUsage;
|
||||
use codex_protocol::protocol::TokenUsageInfo;
|
||||
use codex_protocol::protocol::TurnCompleteEvent;
|
||||
use codex_protocol::protocol::TurnStartedEvent;
|
||||
use codex_protocol::protocol::UserMessageEvent;
|
||||
use codex_rollout::RolloutItem;
|
||||
use codex_utils_output_truncation::approx_tokens_from_byte_count_i64;
|
||||
use std::collections::BTreeSet;
|
||||
use std::io;
|
||||
|
||||
@@ -9,7 +9,7 @@ pub(crate) mod records_cur;
|
||||
mod title;
|
||||
|
||||
use codex_protocol::ThreadId;
|
||||
use codex_protocol::protocol::RolloutItem;
|
||||
use codex_rollout::RolloutItem;
|
||||
use std::collections::BTreeSet;
|
||||
use std::io;
|
||||
use std::path::Path;
|
||||
|
||||
Reference in new issue
Block a user