move dom processing to the actual DOM via built scripts
Merged
JE
2y ago+358+358+012345678901234567890123456789-50-50-01234567890123456789
why
- Playwright has a massive overhead to spin up a lot of evaluation promises in the target dom
- We needed more beef here, specifically to rule out hidden but DOM included elements (cough google)
what changed
- We borrow from tarsier here. Build scripts with esbuild
- we load them via playwright
- we execute them in stagehand land
- added more utilities to better filter the dom
- small prompt cleanup
- make sure we build before running examples or evals
test plan
example lets you search google or bing!
evals still pass