Skip to content

An AI-powered search engine with a generative UI

chore: apply prettier formatting

Yoshiki Miura935fc32fad96
diff --git a/lib/agents/researcher.ts b/lib/agents/researcher.ts
index 32351f30..5772ac29 100644
--- a/lib/agents/researcher.ts
+++ b/lib/agents/researcher.ts
@@ -43,16 +43,34 @@ function wrapSearchToolForQuickMode(
)
// Handle AsyncIterable case
- if (result && typeof result === 'object' && Symbol.asyncIterator in result) {
+ if (
+ result &&
+ typeof result === 'object' &&
+ Symbol.asyncIterator in result
+ ) {
// Collect all results from the async iterable
let searchResults: any = null
for await (const chunk of result) {
searchResults = chunk
}
- return searchResults || { results: [], images: [], query: params.query, number_of_results: 0 }
+ return (
+ searchResults || {
+ results: [],
+ images: [],
+ query: params.query,
+ number_of_results: 0
+ }
+ )
}
- return result || { results: [], images: [], query: params.query, number_of_results: 0 }
+ return (
+ result || {
+ results: [],
+ images: [],
+ query: params.query,
+ number_of_results: 0
+ }
+ )
}
}) as ReturnType<typeof createSearchTool>
}
diff --git a/lib/tools/search.ts b/lib/tools/search.ts
index 22193245..0bf7154c 100644
--- a/lib/tools/search.ts
+++ b/lib/tools/search.ts
@@ -179,7 +179,9 @@ export async function search(
for await (const chunk of result) {
searchResults = chunk
}
- return searchResults ?? { results: [], images: [], query, number_of_results: 0 }
+ return (
+ searchResults ?? { results: [], images: [], query, number_of_results: 0 }
+ )
}
return result as SearchResults