From a2e8fbcf946452feea14035eadf412b1e5bcf170 Mon Sep 17 00:00:00 2001 From: francy51 Date: Sun, 15 Mar 2026 16:06:49 -0400 Subject: [PATCH] Fix search.ts to use normalizeTickerOrNull for optional ticker --- lib/server/search.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/server/search.ts b/lib/server/search.ts index f6d198d..fc884f1 100644 --- a/lib/server/search.ts +++ b/lib/server/search.ts @@ -17,7 +17,7 @@ import { listResearchJournalEntries, listResearchJournalEntriesForUser } from '@/lib/server/repos/research-journal'; -import { normalizeTicker } from '@/lib/server/utils'; +import { normalizeTickerOrNull } from '@/lib/server/utils'; type SearchDocumentScope = 'global' | 'user'; type SearchDocumentSourceKind = 'filing_document' | 'filing_brief' | 'research_note'; @@ -1201,7 +1201,7 @@ export async function searchKnowledgeBase(input: SearchInput) { } const limit = clampLimit(input.limit); - const normalizedTicker = normalizeTicker(input.ticker); + const normalizedTicker = normalizeTickerOrNull(input.ticker); const includedSources = normalizeSearchSources(input.sources); const client = getSqliteClient(); const [queryEmbedding] = await runAiEmbeddings([normalizedQuery]);