mirror of
https://github.com/openai/codex.git
synced 2026-11-05 08:28:29 +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
@@ -290,8 +290,8 @@ impl ChatWidget {
|
||||
self.on_patch_apply_begin(file_update_changes_to_display(changes));
|
||||
}
|
||||
item @ ThreadItem::McpToolCall { .. } => self.on_mcp_tool_call_started(item),
|
||||
ThreadItem::WebSearch { id, .. } => {
|
||||
self.on_web_search_begin(id);
|
||||
ThreadItem::WebSearch(item) => {
|
||||
self.on_web_search_begin(item.id);
|
||||
}
|
||||
ThreadItem::ImageGeneration(_) => {
|
||||
self.on_image_generation_begin();
|
||||
|
||||
@@ -139,12 +139,13 @@ impl ChatWidget {
|
||||
..
|
||||
} => self.on_mcp_tool_call_started(item),
|
||||
item @ ThreadItem::McpToolCall { .. } => self.on_mcp_tool_call_completed(item),
|
||||
ThreadItem::WebSearch { id, query, action } => {
|
||||
self.on_web_search_begin(id.clone());
|
||||
ThreadItem::WebSearch(item) => {
|
||||
self.on_web_search_begin(item.id.clone());
|
||||
self.on_web_search_end(
|
||||
id,
|
||||
query,
|
||||
action.unwrap_or(codex_app_server_protocol::WebSearchAction::Other),
|
||||
item.id,
|
||||
item.query,
|
||||
item.action
|
||||
.unwrap_or(codex_app_server_protocol::WebSearchAction::Other),
|
||||
);
|
||||
}
|
||||
ThreadItem::ImageView { id: _, path } => {
|
||||
|
||||
Reference in new issue
Block a user