Skip to content

Find pictures on the web for backgrounds and overlays - #57

Merged
davior merged 1 commit into
mainfrom
claude/peaceful-feynman-v19ec2
Nov 20, 2026
Merged

davior merged 1 commit into
mainfrom
claude/peaceful-feynman-v19ec2

Conversation

@davior

@davior davior commented Nov 20, 2026

Copy link
Copy Markdown
Owner

Summary

Find pictures on the web that match the video, for a scene, an overlay or the background, and file the chosen one in GAM. It needs davior/gecko-suite#25 (image search) and davior/gam#79 (import a picture by its address).

Editor: Footage Search gets a Web pictures tab beside Library. It's offered for every picture purpose (a scene, a placeholder, an overlay, the background, the watermark) and never for a sound.

  • It searches through the suite (GET /api/web/images, credited to the project) and shows the sites' thumbnails, with the source page, size, and "who may use this picture is unknown".
  • Choosing a picture calls POST /api/gam/import-image: GAM downloads and files it, and the editor gets a library hit. Every existing way of placing a library picture places it, and a render never reads a web address.

Assistant: find_images(query, segment_id?, use_as: visual | overlay | background | none) leaves up to 12 candidates on a search placeholder and tells the model the person chooses. It never puts a web picture on screen itself: the user chose "it proposes, you pick". The tool is offered only where the suite is, capped at 6 searches a turn, and the prompt says web pictures are never cleared.

Spec (S7): SearchAsset.candidates, a list of WebCandidate (max 12, fields length-capped). Resolving the placeholder drops the shortlist.

Docs: the plan's S7 and GAM-14, and CLAUDE.md's "the web is a reading tool" bullet now names the one exception.

Test plan

  • cd backend && pytest -q: 868 passed. tests/test_web_images.py covers:
    • the tool, for each use_as
    • candidate sanitising (bad URLs dropped, first duplicate kept, cut to 12)
    • nothing found changes nothing
    • the cap, and a bad segment costing no search
    • the tool offered only with a web, and the spec refusing more than 12 candidates
    • a full suite-backed turn
    • the Web route (the suite's sentence passed on, no suite, suite down, empty query)
    • the GAM import as the caller, GAM's 400 sentence, and a GAM without the route
  • cd frontend && npm test && npm run lint && npm run build: 249 tests pass, lint and build are clean. New tests cover search → import → hit, opening on a shortlist without searching again, GAM's refusal shown, no Web for a sound, and resolveSearch dropping the shortlist.
  • Not yet run against a live suite and GAM, and not looked at in a browser.

Deployment

Standard redeploy (backend and frontend). No migration, no new configuration. Needs AI_BACKEND=suite, and an image-capable search backend (Tavily, Brave or SearXNG) set up in Gecko Suite.

  • Deploy gecko-suite#25 and gam#79 first. Without them, the Web tab shows the suite's or GAM's "needs updating" sentence, and everything else works.

Generated by Claude Code

Footage Search gets a Web pictures tab beside the library, for every
picture purpose (a scene, a placeholder, an overlay, the background, the
watermark), never for a sound. It searches through Gecko Suite's image
search (GET /api/web/images), and choosing a picture files it in GAM
(POST /api/gam/import-image, over GAM's import-image) and hands back a
library hit, so every existing way of placing a library picture places it.
A render never reads a web address.

The assistant's find_images tool shortlists: it leaves up to 12 candidates
on a search placeholder (a scene's picture, an overlay or the background)
for the person to choose from, and never puts a web picture on screen
itself. Offered only where the suite is. Resolving the placeholder drops
the shortlist. The Web tab and the prompt say the rights are unknown.

Spec: SearchAsset.candidates (S7). Plan: GAM-14.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01V1geD3rf5gNTeFwCtstRx7
@davior
davior marked this pull request as ready for review November 20, 2026 22:43
@davior
davior merged commit 4952850 into main Nov 20, 2026
3 checks passed
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.

2 participants