chore: throw error when no search results found

This commit is contained in:
AnotiaWang
2025-03-23 14:53:09 +08:00
parent c8ae1ece95
commit ff1e79603d
4 changed files with 9 additions and 3 deletions

View File

@ -384,6 +384,9 @@ export async function deepResearch({
maxResults: 5,
lang: languageCode,
})
if (!results.length) {
throw new Error(t('webBrowsing.noSearchResult'))
}
console.log(
`[DeepResearch] Searched "${searchQuery.query}", found ${results.length} contents`,
)