From e6080349afd4eca97a821c4afe9380806c437777 Mon Sep 17 00:00:00 2001 From: nmemmert Date: Tue, 14 Apr 2026 12:55:04 -0400 Subject: [PATCH] Fix identity subject extraction to handle punctuation in questions --- src/App.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 380d3db..8db8a64 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -347,7 +347,7 @@ function sanitizeSubject(value: string): string { } function extractIdentitySubject(normalizedQuery: string): string { - const match = normalizedQuery.match(/\b(?:who\s+(?:is|was)|tell me about)\s+([a-z][a-z\s'-]{1,40})$/i) + const match = normalizedQuery.match(/\b(?:who\s+(?:is|was)|tell me about)\s+([a-z][a-z\s'-]{1,40})\b/i) if (!match) return '' const cleaned = sanitizeSubject(match[1]) const withoutArticles = cleaned.replace(/^(a|an|the)\s+/, '').trim()