feat: статья из Discover, локализация, подсказки
- Статья: заголовок + ссылка (truncate), title в URL, articleTitle в Message - Локализация Sources, Research Progress, Answer, шагов, formingAnswer - Подсказки: промпт без жёсткого примера, разнообразие, label 'Что ещё спросить' - embeddedTranslations, countryToLocale, locale инструкция для LLM Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { searchSearxng } from '@/lib/searxng';
|
||||
import { searchSearxng, type SearxngSearchResult } from '@/lib/searxng';
|
||||
import configManager from '@/lib/config';
|
||||
import { getSearxngURL } from '@/lib/config/serverRegistry';
|
||||
|
||||
@@ -206,7 +206,7 @@ export const GET = async (req: Request) => {
|
||||
);
|
||||
const settled = await Promise.allSettled(searchPromises);
|
||||
const allResults = settled
|
||||
.filter((r): r is PromiseFulfilledResult<{ url?: string; title?: string }[]> => r.status === 'fulfilled')
|
||||
.filter((r): r is PromiseFulfilledResult<SearxngSearchResult[]> => r.status === 'fulfilled')
|
||||
.flatMap((r) => r.value);
|
||||
|
||||
data = allResults
|
||||
|
||||
Reference in New Issue
Block a user