mirror of
https://github.com/openai/codex.git
synced 2026-04-24 22:54:54 +00:00
add missing fields to WebSearchAction and update app-server types (#10276)
- add `WebSearchAction` to app-server v2 types - add `queries` to `WebSearchAction::Search` type Updated tests.
This commit is contained in:
@@ -620,6 +620,9 @@ pub enum WebSearchAction {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
query: Option<String>,
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
#[ts(optional)]
|
||||
queries: Option<Vec<String>>,
|
||||
},
|
||||
OpenPage {
|
||||
#[serde(default, skip_serializing_if = "Option::is_none")]
|
||||
@@ -1132,12 +1135,14 @@ mod tests {
|
||||
"status": "completed",
|
||||
"action": {
|
||||
"type": "search",
|
||||
"query": "weather seattle"
|
||||
"query": "weather seattle",
|
||||
"queries": ["weather seattle", "seattle weather now"]
|
||||
}
|
||||
}"#,
|
||||
None,
|
||||
Some(WebSearchAction::Search {
|
||||
query: Some("weather seattle".into()),
|
||||
queries: Some(vec!["weather seattle".into(), "seattle weather now".into()]),
|
||||
}),
|
||||
Some("completed".into()),
|
||||
true,
|
||||
|
||||
@@ -2469,6 +2469,7 @@ mod tests {
|
||||
query: "find docs".into(),
|
||||
action: WebSearchAction::Search {
|
||||
query: Some("find docs".into()),
|
||||
queries: None,
|
||||
},
|
||||
}),
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user