Add hybrid research copilot workspace

This commit is contained in:
2026-03-14 19:32:00 -04:00
parent 7a42d73a48
commit 2ee9a549a3
27 changed files with 2864 additions and 323 deletions

View File

@@ -15,6 +15,7 @@ export const queryKeys = {
search: (query: string, ticker: string | null, sources: string[], limit: number) => ['search', query, ticker ?? '', sources.join(','), limit] as const,
report: (accessionNumber: string) => ['report', accessionNumber] as const,
researchWorkspace: (ticker: string) => ['research', 'workspace', ticker] as const,
researchCopilotSession: (ticker: string) => ['research', 'copilot', 'session', ticker] as const,
researchLibrary: (
ticker: string,
q: string,

View File

@@ -5,6 +5,7 @@ import {
getCompanyFinancialStatements,
getLatestPortfolioInsight,
getPortfolioSummary,
getResearchCopilotSession,
searchKnowledge,
getResearchMemo,
getResearchPacket,
@@ -139,6 +140,16 @@ export function researchWorkspaceQueryOptions(ticker: string) {
});
}
export function researchCopilotSessionQueryOptions(ticker: string) {
const normalizedTicker = ticker.trim().toUpperCase();
return queryOptions({
queryKey: queryKeys.researchCopilotSession(normalizedTicker),
queryFn: () => getResearchCopilotSession(normalizedTicker),
staleTime: 10_000
});
}
export function researchLibraryQueryOptions(input: {
ticker: string;
q?: string;