fix: introduce codex-protocol crate (#2355)

This commit is contained in:
Michael Bolin
2025-08-15 12:44:40 -07:00
committed by GitHub
parent 7c26c8e091
commit d262244725
23 changed files with 244 additions and 43 deletions

View File

@@ -677,7 +677,10 @@ impl Session {
call_id,
command: command_for_display.clone(),
cwd,
parsed_cmd: parse_command(&command_for_display),
parsed_cmd: parse_command(&command_for_display)
.into_iter()
.map(Into::into)
.collect(),
}),
};
let event = Event {
@@ -1031,8 +1034,8 @@ async fn submission_loop(
Arc::new(per_turn_config),
None,
provider,
effort,
summary,
effort.into(),
summary.into(),
sess.session_id,
);
@@ -1102,7 +1105,13 @@ async fn submission_loop(
crate::protocol::GetHistoryEntryResponseEvent {
offset,
log_id,
entry: entry_opt,
entry: entry_opt.map(|e| {
codex_protocol::message_history::HistoryEntry {
session_id: e.session_id,
ts: e.ts,
text: e.text,
}
}),
},
),
};
@@ -1160,6 +1169,9 @@ async fn submission_loop(
}
break;
}
_ => {
// Ignore unknown ops; enum is non_exhaustive to allow extensions.
}
}
}
debug!("Agent loop exited");