Skip to content

Conversation

@jmandel
Copy link

@jmandel jmandel commented Jan 11, 2026

When navigating to a URL that triggers a download (PDF, binary files, etc.), the browser now captures the download and saves it to /tmp/shelley-downloads/ instead of failing.

Changes:

  • Configure Chrome's download behavior on browser initialization
  • Listen for download events (EventDownloadWillBegin, EventDownloadProgress)
  • Use page.Navigate to detect downloads via the isDownload return flag
  • Save files with browser-style naming: file.pdf, file (1).pdf, file (2).pdf, etc.
  • Return clear message: "File downloaded to: /path/file.pdf (1234 bytes)"

This allows the LLM to:

  1. Navigate to pages with content protection (CAPTCHAs, login walls)
  2. Interact with the page as needed
  3. Download files that are behind protection
  4. Use other tools (pdftotext, etc.) to process the downloaded files

The file is saved directly to disk, avoiding the need to base64-encode large files through the LLM's context window.

Fixes #7

@cla-bot
Copy link

cla-bot bot commented Jan 11, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: exe.dev user.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@jmandel jmandel force-pushed the browser-download-support branch from e64e071 to 6427e39 Compare January 11, 2026 23:02
@cla-bot
Copy link

cla-bot bot commented Jan 11, 2026

We require contributors to sign our Contributor License Agreement, and we don't have you on file. In order for us to review and merge your code, please contact @crawshaw to get yourself added.

When navigating to a URL that triggers a download (PDF, binary files, etc.),
the browser now captures the download and saves it to /tmp/shelley-downloads/
instead of failing.

Changes:
- Configure Chrome's download behavior on browser initialization
- Listen for download events (EventDownloadWillBegin, EventDownloadProgress)
- Use page.Navigate to detect downloads via the isDownload return flag
- Save files with browser-style naming: file.pdf, file (1).pdf, file (2).pdf, etc.
- Return clear message: "File downloaded to: /path/file.pdf (1234 bytes)"

This allows the LLM to:
1. Navigate to pages with content protection (CAPTCHAs, login walls)
2. Interact with the page as needed
3. Download files that are behind protection
4. Use other tools (pdftotext, etc.) to process the downloaded files

The file is saved directly to disk, avoiding the need to base64-encode
large files through the LLM's context window.

Fixes boldsoftware#7

Co-authored-by: Shelley <shelley@exe.dev>
@jmandel jmandel force-pushed the browser-download-support branch from 6427e39 to a548398 Compare January 11, 2026 23:16
@cla-bot
Copy link

cla-bot bot commented Jan 11, 2026

We require contributors to sign our Contributor License Agreement, and we don't have you on file. In order for us to review and merge your code, please contact @crawshaw to get yourself added.

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.

Browser tool can't access PDFs

1 participant