Add hybrid research copilot workspace
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user