feat: Go backend, enhanced search, new widgets, Docker deploy

Major changes:
- Add Go backend (backend/) with microservices architecture
- Enhanced master-agents-svc: reranker, content-classifier, stealth-crawler,
  proxy-manager, media-search, fastClassifier, language detection
- New web-svc widgets: KnowledgeCard, ProductCard, ProfileCard, VideoCard,
  UnifiedCard, CardGallery, InlineImageGallery, SourcesPanel, RelatedQuestions
- Improved discover-svc with discover-db integration
- Docker deployment improvements (Caddyfile, vendor.sh, BUILD.md)
- Library-svc: project_id schema migration
- Remove deprecated finance-svc and travel-svc
- Localization improvements across services

Made-with: Cursor
This commit is contained in:
home
2026-02-27 04:15:32 +03:00
parent 328d968f3f
commit 06fe57c765
285 changed files with 53132 additions and 1871 deletions

View File

@@ -26,6 +26,8 @@ export function getWriterPrompt(
answerMode?: AnswerMode,
responsePrefs?: ResponsePrefs,
learningMode?: boolean,
detectedLanguage?: string,
isArticleSummary?: boolean,
): string {
const memoryBlock = memoryContext?.trim()
? `\n### User memory (personalization)\nUse these stored facts/preferences to personalize when relevant. Do NOT cite as source.\n${memoryContext}\n`
@@ -58,6 +60,26 @@ export function getWriterPrompt(
? `\n### Step-by-step Learning mode\nExplain your reasoning step-by-step. Break down complex concepts. Show the logical flow. Use numbered steps or "First... Then... Finally" structure.\n`
: '';
const articleSummaryBlock = isArticleSummary
? `\n### Article Summary Mode (Discover)
You are synthesizing information from MULTIPLE sources about a news topic.
This is a Perplexity-style multi-source digest. Follow these rules strictly:
- **EVERY sentence** MUST have at least one citation [N] referring to a search_results source.
- Use **ALL** available sources, not just the first one. Distribute citations across all sources.
- Structure the summary as:
1. **Introduction** (2-3 sentences, overview of the topic)
2. **Key Details** (main facts, events, numbers from multiple sources)
3. **Analysis** (expert opinions, implications, different viewpoints)
4. **Implications** (what this means going forward)
- Write 500-1000 words minimum. Be comprehensive.
- After the summary, add a line with "---" followed by exactly 3 follow-up questions, each on its own line prefixed with "> ". These questions should help the user explore the topic deeper.
- Write in Russian (unless the user's locale indicates otherwise).
- Do NOT repeat the same information from different sources — synthesize and combine.
- When sources disagree, present both viewpoints with their respective citations.
`
: '';
return `
You are GooSeek, an AI model skilled in web search and crafting detailed, engaging, and well-structured answers.
@@ -74,10 +96,11 @@ Your task is to provide answers that are:
### Special Instructions
- The context contains two sections: \`search_results\` (web search) and \`widgets_result\` (calculations, weather, stocks). If widgets_result has the answer, USE IT.
- Prioritize information from results that directly answer the user's question. Use multiple sources when available; if sources disagree, mention different viewpoints and cite each [N].
- If BOTH search_results AND widgets_result lack relevant information, say: "Hmm, sorry I could not find any relevant information on this topic."
${mode === 'quality' ? "- QUALITY MODE: Generate very deep, detailed responses. At least 2000 words, cover everything like a research report." : ''}
${mode === 'quality' ? "- QUALITY MODE: Generate very deep, detailed responses. At least 2000 words, cover everything like a research report. Use as many of the provided results as relevant." : ''}
${verticalBlock}${prefsBlock}${learningBlock}
${articleSummaryBlock}${verticalBlock}${prefsBlock}${learningBlock}
### User instructions
${systemInstructions}
${memoryBlock}
@@ -87,6 +110,6 @@ ${context}
</context>
Current date & time (UTC): ${new Date().toISOString()}.
${getLocaleInstruction(locale)}
${getLocaleInstruction(locale, detectedLanguage)}
`;
}