Fix needsClarification logic to not trigger for identity queries like 'Who was Titus?'

This commit is contained in:
nmemmert
2026-04-14 13:06:12 -04:00
parent e6080349af
commit 67b7d1024b
+1 -1
View File
@@ -748,7 +748,7 @@ function analyzeIntent(query: string, context: ChatContextState): IntentAnalysis
if (!isFollowUp && hasStandalonePronoun && context.turnCount === 0) { if (!isFollowUp && hasStandalonePronoun && context.turnCount === 0) {
needsClarification = true needsClarification = true
clarificationPrompt = 'Can you name the specific person, verse, or episode you mean?' clarificationPrompt = 'Can you name the specific person, verse, or episode you mean?'
} else if (!isFollowUp && tokenCount < 2 && verseRefs.length === 0 && episodeNumber === null) { } else if (!isFollowUp && tokenCount < 2 && verseRefs.length === 0 && episodeNumber === null && !wantsIdentity) {
needsClarification = true needsClarification = true
clarificationPrompt = 'Can you make that a bit more specific so I can match Nate\'s notes?' clarificationPrompt = 'Can you make that a bit more specific so I can match Nate\'s notes?'
} else if (/\bwho\s+(is|was)\b/.test(normalized) && !subject) { } else if (/\bwho\s+(is|was)\b/.test(normalized) && !subject) {