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

@@ -13,9 +13,10 @@ const schema = z.object({
const uploadsSearchAction: ResearchAction<typeof schema> = {
name: 'uploads_search',
enabled: (config) =>
(config.classification.classification.personalSearch &&
config.hasEmbedding !== false &&
((config.classification.classification.personalSearch &&
config.fileIds.length > 0) ||
config.fileIds.length > 0,
config.fileIds.length > 0),
schema,
getToolDescription: () =>
`Use this tool to perform searches over the user's uploaded files. This is useful when you need to gather information from the user's documents to answer their questions. You can provide up to 3 queries at a time. You will have to use this every single time if this is present and relevant.`,
@@ -27,6 +28,10 @@ const uploadsSearchAction: ResearchAction<typeof schema> = {
Never use this tool to search the web or for information that is not contained within the user's uploaded files.
`,
execute: async (input, additionalConfig) => {
if (!additionalConfig.embedding) {
return { type: 'search_results' as const, results: [] };
}
input.queries = input.queries.slice(0, 3);
const researchBlock = additionalConfig.session.getBlock(