mirror of
https://github.com/openai/codex.git
synced 2026-11-16 06:54:36 +00:00
codex: route thread/read persistence through thread store (#18352)
Summary - replace the thread/read persisted-load helper with ThreadStore::read_thread - move SQLite/rollout summary, name, fork metadata, and history loading for persisted reads into LocalThreadStore - leave getConversationSummary unchanged for a later PR Context - Replaces closed stacked PR #18232 after PR #18231 merged and its base branch was deleted.
This commit is contained in:
6 files changed
+853
-86
No files matched your search
@@ -50,6 +50,26 @@ pub(super) fn write_session_file_with(
|
||||
uuid: Uuid,
|
||||
first_user_message: &str,
|
||||
model_provider: Option<&str>,
|
||||
) -> std::io::Result<PathBuf> {
|
||||
write_session_file_with_fork(
|
||||
root,
|
||||
day_dir,
|
||||
ts,
|
||||
uuid,
|
||||
first_user_message,
|
||||
model_provider,
|
||||
/*forked_from_id*/ None,
|
||||
)
|
||||
}
|
||||
|
||||
pub(super) fn write_session_file_with_fork(
|
||||
root: &Path,
|
||||
day_dir: PathBuf,
|
||||
ts: &str,
|
||||
uuid: Uuid,
|
||||
first_user_message: &str,
|
||||
model_provider: Option<&str>,
|
||||
forked_from_id: Option<Uuid>,
|
||||
) -> std::io::Result<PathBuf> {
|
||||
fs::create_dir_all(&day_dir)?;
|
||||
let path = day_dir.join(format!("rollout-{ts}-{uuid}.jsonl"));
|
||||
@@ -59,6 +79,7 @@ pub(super) fn write_session_file_with(
|
||||
"type": "session_meta",
|
||||
"payload": {
|
||||
"id": uuid,
|
||||
"forked_from_id": forked_from_id,
|
||||
"timestamp": ts,
|
||||
"cwd": root,
|
||||
"originator": "test_originator",
|
||||
|
||||
Reference in new issue
Block a user