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:
home
2026-02-21 00:37:06 +03:00
parent f4d945a2b5
commit 3fa83bc605
68 changed files with 2301 additions and 345 deletions

View File

@@ -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