refactor(cortex): consistente datumbepaling met referenceDate parameter
SOC: Parser en entity-extractor accepteren nu optionele referenceDate parameter. Caller bepaalt wat "nu" is, niet de functies intern. Wijzigingen: - parseRelativeDate(input, referenceDate?) - referenceDate parameter - extractEntities(input, intent, referenceDate?) - doorgeeft aan parser - API routes gebruiken new Date() als referenceDate Verwijderd (YAGNI): - lib/utils/server-date.ts - wrapper om new Date() was overbodig 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -95,7 +95,7 @@ export async function POST(request: NextRequest) {
|
||||
};
|
||||
} else {
|
||||
// High confidence local result - extract entities locally
|
||||
const entities = extractEntities(input, localResult.intent);
|
||||
const entities = extractEntities(input, localResult.intent, new Date());
|
||||
|
||||
finalResult = {
|
||||
intent: localResult.intent,
|
||||
|
||||
Reference in New Issue
Block a user