fix: restrict auto-fill to first page fetch

This commit is contained in:
Aaron Ji 2025-03-14 13:06:24 +08:00
parent dd76cf3866
commit 02a219a470

View File

@ -152,9 +152,15 @@ export class SearcherHost extends RPCHost {
const crawlOpts = await this.crawler.configure(crawlerOptions);
const searchQuery = searchExplicitOperators.addTo(q || noSlashPath);
let fetchNum = count;
if ((page ?? 1) === 1) {
fetchNum = count > 10 ? 30 : 20;
}
const r = await this.cachedWebSearch({
q: searchQuery,
num: count > 10 ? 30 : 20,
num: fetchNum,
gl,
hl,
location,