mirror of
https://github.com/openai/codex.git
synced 2026-05-01 01:47:18 +00:00
Remote compact for API-key users (#7835)
This commit is contained in:
@@ -150,8 +150,8 @@ pub enum ResponseItem {
|
||||
GhostSnapshot {
|
||||
ghost_commit: GhostCommit,
|
||||
},
|
||||
#[serde(alias = "compaction")]
|
||||
CompactionSummary {
|
||||
#[serde(alias = "compaction_summary")]
|
||||
Compaction {
|
||||
encrypted_content: String,
|
||||
},
|
||||
#[serde(other)]
|
||||
@@ -671,13 +671,13 @@ mod tests {
|
||||
|
||||
#[test]
|
||||
fn deserializes_compaction_alias() -> Result<()> {
|
||||
let json = r#"{"type":"compaction","encrypted_content":"abc"}"#;
|
||||
let json = r#"{"type":"compaction_summary","encrypted_content":"abc"}"#;
|
||||
|
||||
let item: ResponseItem = serde_json::from_str(json)?;
|
||||
|
||||
assert_eq!(
|
||||
item,
|
||||
ResponseItem::CompactionSummary {
|
||||
ResponseItem::Compaction {
|
||||
encrypted_content: "abc".into(),
|
||||
}
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user