fix(tools): show all web search results, not just the first#172
Open
cashcon57 wants to merge 2 commits into
Open
fix(tools): show all web search results, not just the first#172cashcon57 wants to merge 2 commits into
cashcon57 wants to merge 2 commits into
Conversation
Exa's web_search_exa packs every result into a single output text block, with results separated by a `---` rule. The presenter rendered one card per output item and parseExaTextEntry only read the first Title/URL, so all results after the first were dropped and the count was wrong. Split each item's text on the separator before parsing so every result becomes its own card. Falls back to the whole string when there is no separator, so the one-result-per-item shape still works.
The renderer capped the display to the first four results (results.slice(0, 4)), so even after the parser fix only four showed. Render every result, constrained to roughly four cards' height with vertical scroll, so large result sets stay compact instead of showing a tall wall of cards.
Collaborator
|
Thank you for your work on this! We’ve integrated your changes while preserving your commits and authorship, and they are planned to ship in the next Atomic Chat release. We really appreciate your contribution! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe Your Changes
The web search tool only rendered the first result even when the search
returned several (the results list showed one card and the subtitle read
"1 result"). There were actually two stacked limits.
1. Presenter dropped all but the first result. Exa's
web_search_exapacksevery result into a single
output[0].textblock, with results separated by a---horizontal rule. The presenter rendered one card per output item, andparseExaTextEntryonly reads the firstTitle:/URL:in each item, soeverything after the first result was dropped and the count was wrong. This
splits each output item's text on the
---separator before parsing, so everyresult becomes its own card. It falls back to the whole string when there is no
separator, so a single result (or the one-result-per-item shape) still works.
I checked several saved searches to confirm the separator is stable: the number
of
---rules is consistently one less than the number of results, so the splitlines up exactly.
2. Renderer capped the display to four. Even with the parser fixed, the
renderer only drew
results.slice(0, 4), so a 5 or 10 result search stillshowed four cards. It now renders every result inside a fixed-height
(
max-h-80)overflow-y-autocontainer, so the block stays about four cardstall and you scroll through the rest rather than getting a wall of cards.
With both fixes, searches that returned 5 and 10 results now show all of them
(scrollable) with an accurate count, instead of 1 then 4.
Added unit tests for the presenter (packed block, single result,
one-result-per-item, empty output). Verified end to end in a local dev build:
live Exa searches now render the full, scrollable result list.
Fixes Issues
New Behavior video:
Screen.Recording.2026-07-13.at.1.11.52.PM.mov
Self Checklist