mirror of
https://github.com/openai/codex.git
synced 2026-11-13 06:45:07 +00:00
Add a wrapper around raw response items (#5923)
We currently have nested enums when sending raw response items in the app-server protocol. This makes downstream schemas confusing because we need to embed `type`-discriminated enums within each other. This PR adds a small wrapper around the response item so we can keep the schemas separate
This commit is contained in:
1 parent
069a38a06c
commit
39e09c289d
3 files changed
+16
-4
No files matched your search
@@ -542,12 +542,17 @@ pub enum EventMsg {
|
||||
/// Exited review mode with an optional final result to apply.
|
||||
ExitedReviewMode(ExitedReviewModeEvent),
|
||||
|
||||
RawResponseItem(ResponseItem),
|
||||
RawResponseItem(RawResponseItemEvent),
|
||||
|
||||
ItemStarted(ItemStartedEvent),
|
||||
ItemCompleted(ItemCompletedEvent),
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, TS, JsonSchema)]
|
||||
pub struct RawResponseItemEvent {
|
||||
pub item: ResponseItem,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Deserialize, Serialize, TS, JsonSchema)]
|
||||
pub struct ItemStartedEvent {
|
||||
pub thread_id: ConversationId,
|
||||
|
||||
Reference in new issue
Block a user