Merge branch 't3code/ui-yahoo-finance-description'

This commit is contained in:
2026-03-13 00:28:41 -04:00
3 changed files with 273 additions and 1 deletions

View File

@@ -75,6 +75,7 @@ import { synthesizeCompanyOverview } from '@/lib/server/company-overview-synthes
import { getRecentDevelopments } from '@/lib/server/recent-developments';
import { deriveValuationSnapshot, getSecCompanyProfile, toCompanyProfile } from '@/lib/server/sec-company-profile';
import { getCompanyDescription } from '@/lib/server/sec-description';
import { getYahooCompanyDescription } from '@/lib/server/yahoo-company-profile';
import { answerSearchQuery, searchKnowledgeBase } from '@/lib/server/search';
import {
enqueueTask,
@@ -1449,10 +1450,12 @@ export const app = new Elysia({ prefix: '/api' })
: null
};
const annualFiling = redactedFilings.find((entry) => entry.filing_type === '10-K') ?? null;
const [description, synthesizedDevelopments] = await Promise.all([
const [secDescription, yahooDescription, synthesizedDevelopments] = await Promise.all([
getCompanyDescription(annualFiling),
getYahooCompanyDescription(ticker),
getRecentDevelopments(ticker, { filings: redactedFilings })
]);
const description = yahooDescription ?? secDescription;
const latestFilingSummary = latestFiling
? {
accessionNumber: latestFiling.accession_number,