Skip to content

Return standalone web search previews to clients#31516

Open
alexi-openai wants to merge 1 commit into
codex/web-search-results-clientfrom
codex/web-search-standalone-previews
Open

Return standalone web search previews to clients#31516
alexi-openai wants to merge 1 commit into
codex/web-search-results-clientfrom
codex/web-search-standalone-previews

Conversation

@alexi-openai

Copy link
Copy Markdown
Contributor

Summary

  • parse URL, title, and snippet previews from standalone /alpha/search output
  • deduplicate and bound previews before attaching them to the client-facing web search item
  • persist and restore those previews through the foundation API

Stacked on #31515.

Model-context boundary

The standalone search function output sent back to the model is unchanged. Parsed previews are attached only to WebSearchItem.results for app rendering and persistence; this PR does not change ResponseItem, WebSearchAction, or Responses request construction.

Validation

  • just test -p codex-web-search-extension search_results (red before implementation, green after)
  • just test -p codex-web-search-extension
  • just test -p codex-app-server standalone_web_search_round_trips_output
  • just fix -p codex-web-search-extension -p codex-app-server
  • just fmt

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 93b16cecf3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +201 to +203
while lines
.peek()
.is_some_and(|line| search_result_header(line).is_none())

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Validate result headers before splitting snippets

When a standalone search snippet contains a line ending in ordinary parentheses, such as ... (Reuters), this delimiter treats it as the next result header before any URL validation. The parser then rejects that bogus header later and continues scanning for the next header, which drops that snippet line and any following non-header lines from the rendered preview. Search snippets are arbitrary source text, so only validated http(s) result headers should terminate snippet collection.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant