mirror of
https://github.com/openai/codex.git
synced 2026-11-18 23:02:23 +00:00
core: migrate standalone web search to extension-owned turn items (#31525)
## Description This PR migrates standalone web search onto the extension-owned turn-item path introduced in #31283. Standalone web search now emits `ExtensionItem::WebSearch` through generic `TurnItem::Extension`, while app-server still exposes the existing typed `ThreadItem::WebSearch` JSON shape. Hosted Responses API web search stays on core-owned `TurnItem::WebSearch`. ## What changed - Added `web_search::WebSearchItem` and `WebSearchAction` to `codex-extension-items` under the stable `web.search` kind. - Collapsed `ExtensionTurnItem` to generic `{ item, legacy_events }` now that no typed extension special cases remain. - Kept the existing `WebSearchBegin` / `WebSearchEnd` compatibility events and canonical-first ordering. - Updated app-server projection/history and generated TypeScript; the app-server JSON schema is unchanged.
This commit is contained in:
1 parent
e212cc95b0
commit
a219b6fdb4
26 files changed
+279
-209
No files matched your search
@@ -9,6 +9,7 @@ use serde::Serialize;
|
||||
use ts_rs::TS;
|
||||
|
||||
pub mod image_generation;
|
||||
pub mod web_search;
|
||||
|
||||
/// Canonical extension-owned turn item carried through core lifecycle events.
|
||||
///
|
||||
@@ -34,6 +35,9 @@ pub enum ExtensionItem {
|
||||
#[serde(rename = "image_gen.generation")]
|
||||
#[ts(rename = "image_gen.generation")]
|
||||
ImageGeneration(image_generation::ImageGenerationItem),
|
||||
#[serde(rename = "web.search")]
|
||||
#[ts(rename = "web.search")]
|
||||
WebSearch(web_search::WebSearchItem),
|
||||
}
|
||||
|
||||
impl ExtensionItem {
|
||||
@@ -42,6 +46,7 @@ impl ExtensionItem {
|
||||
pub fn id(&self) -> &str {
|
||||
match self {
|
||||
Self::ImageGeneration(item) => &item.id,
|
||||
Self::WebSearch(item) => &item.id,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user