feat(search): visual web search — floating photos, article card & reader - #5
Merged
Conversation
…ader
When ATLAS searches the web, the HUD now shows the results visually:
- web_search returns RICH results (related images + top article) threaded to the
frontend via the chat response (router adds `media`; ToolBox stashes it, cleared
each turn).
- Floating related photos scatter around the HUD (click to open the source),
replaced/cleared on the next turn.
- A rich article card for the top result: hero image, title, summary, Open + TLDR.
- New `read_article` tool: fetches + extracts a page's main text (lxml) so ATLAS
can summarize / TLDR / read it aloud on request ("TLDR that"). The card's TLDR
button and a voice request both route through it.
No new dependencies (ddgs images + lxml already present).
Tests: 42 passing offline (+5). Headless-rendered: 6 photos + card, no console errors.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…reader) CI installs a clean env and had neither — ddgs was a pre-existing undeclared runtime dep for web search; lxml is needed by the new read_article extractor. Fixes the CI failure on test_web_search::test_extract_text (lxml missing). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Turns web search into a visual experience on the HUD.
What it does
read_articletool fetches the page and extracts its main text (vialxml), so ATLAS can summarize, TLDR, or read it aloud. The card's TLDR button and a voice ask ("TLDR that") both route through it; with no URL it defaults to the last search's top article.How it's wired
web_search.rich(query)returns{text, images, article}. The model still gets the plain text (with source URLs to cite); theToolBoxstashes the visuals inlast_media.router.chat()clearslast_mediaeach turn and returns it asmediain the/api/chatresponse.renderSearchMedia(media)draws the floating photos + article card; a non-search turn (media: null) clears them.No new dependencies —
ddgs.images()andlxmlwere already installed.Verification
🤖 Generated with Claude Code