mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
Preserve mentions in cloud conversation transcripts (#63237)
## Why The cloud client treated user messages containing mentions as opaque, which prevented those messages from reaching callers as structured transcript items. ## What changed Decode mention names and paths in cloud history and live events, and carry them through to the app-server protocol as `UserInput::Mention`. Malformed or incomplete mentions still leave the containing item opaque. Cloud turn submissions reject mention inputs. ## Testing Extend tests to cover plugin mentions alongside text and images, app mentions in app-server receipts, and malformed or incomplete mention payloads. GitOrigin-RevId: 938cd37a81630ffe4d06f00544972dd9239c0cb3
This commit is contained in:
committed by
copyberry
parent
c9325ea78c
commit
f1fd6c4c35
@@ -137,6 +137,9 @@ pub(super) fn item_summary(item: cloud::ItemSummary) -> Option<protocol::ThreadI
|
||||
}),
|
||||
}
|
||||
}
|
||||
cloud::UserMessageInput::Mention { name, path } => {
|
||||
protocol::UserInput::Mention { name, path }
|
||||
}
|
||||
})
|
||||
.collect(),
|
||||
},
|
||||
|
||||
@@ -4,7 +4,7 @@ use super::*;
|
||||
use pretty_assertions::assert_eq;
|
||||
|
||||
#[test]
|
||||
fn image_receipt_preserves_submission_identity_and_attachment() {
|
||||
fn receipt_preserves_submission_identity_image_and_app_mention() {
|
||||
let label = "[Image #1]";
|
||||
let actual = item_summary(cloud::ItemSummary::UserMessage {
|
||||
id: "item-1".into(),
|
||||
@@ -22,6 +22,10 @@ fn image_receipt_preserves_submission_identity_and_attachment() {
|
||||
placeholder: Some(label.into()),
|
||||
}],
|
||||
},
|
||||
cloud::UserMessageInput::Mention {
|
||||
name: "Example App".into(),
|
||||
path: "app://connector_example".into(),
|
||||
},
|
||||
],
|
||||
});
|
||||
assert_eq!(
|
||||
@@ -47,6 +51,10 @@ fn image_receipt_preserves_submission_identity_and_attachment() {
|
||||
Some(label.into()),
|
||||
)],
|
||||
},
|
||||
protocol::UserInput::Mention {
|
||||
name: "Example App".into(),
|
||||
path: "app://connector_example".into(),
|
||||
},
|
||||
],
|
||||
},
|
||||
))
|
||||
|
||||
Reference in New Issue
Block a user