New reference panel: duplicate more code-intel-extensions logic
Created by: mrnugget
This implements a bunch of things from https://github.com/sourcegraph/sourcegraph/issues/30970:
-
First search in current repository, at current commit -
Then fallback to repositories that are not current repository, if not on Sourcegraph.com -
Race between indexed/unindexed search -
If basicCodeIntel.indexOnly
is set, do not search unindexed -
Use basicCodeIntel.unindexedSearchTimeout
when searching unindexed search
-
by using 95% copy&pasted code from code-intel-extensions
, which, in this case, is a good thing! Because it means we don't have to duplicate a lot of hairy logic.
Test plan
- Tested locally. With network throttling on/off to check for "racing" between indexed/unindexed. Manually inspected requests.