feat: make Chromium install configurable #2192
Merged
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.
Description
Addresses user feedback from #2166.
By default, we no longer download and install Chromium for our docs service.
Instead, this PR introduces a new experimental configuration,
useChromiumForDocsCrawling
, that is used to control installation.If this config is set to
true
, and Chromium is not installed, we will attempt to install Chromium. If a user attempts to crawl a doc site using the default crawler and fails, we give them the option to install Chromium, set this config totrue
, and attemp to re-crawl the docs using Chromium.Checklist
dev
, rather thanmain
Testing
Installing Chromium
rm -rf ~/.continue/.utils
to remove any existing Chromium installation"experimental": {"useChromiumForDocsCrawling": true}
Disabling Chromium
"experimental": {"useChromiumForDocsCrawling": false}
"docs": [{"startUrl": "[https://amplified.dev/","title](https://amplified.dev/%22,%22title)": "Amplified.dev"}]
Attempt crawl using Cheerio, error, install Chromium, retry
rm -rf ~/.continue/.utils
to remove any existing Chromium installationuseChromiumForDocsCrawling
from config.jsoncrawlPage()
inCheerioCrawler
to emulate an error being thrown while crawling, e.g. add athrow new Error("")
to the top of the try/catch