Proactive suggestions after successful actions - proof of concept. E4.S1 - Protocol Rules (lib/cortex/nudge.ts) - ProtocolRule and ProtocolCondition types - Condition operators: equals, contains, matches, exists - 2 hardcoded rules: wondzorg-controle, medicatie-controle E4.S2 - evaluateNudge Function - evaluateNudge(input) returns NudgeSuggestion[] - checkCondition() helper for rule matching - Priority sorting (high → medium → low) E4.S3 - NudgeToast Component - Countdown progress bar with auto-dismiss (5 min) - Priority-based styling (low/medium/high) - Accept and dismiss buttons - Framer Motion animations E4.S4 - Integration - NudgeToast rendered in CommandCenter (fixed position) - Trigger added in DagnotatieBlock after successful save - Accept opens corresponding artifact with prefilled data Demo flow: 1. Create dagnotitie with "wond" in content 2. Save → NudgeToast appears 3. Click "Ja, inplannen" → Appointment artifact opens 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
14 lines
339 B
TypeScript
14 lines
339 B
TypeScript
/**
|
|
* Cortex Library Barrel Export
|
|
*/
|
|
|
|
export * from './types';
|
|
export * from './use-cortex-voice';
|
|
export * from './intent-classifier';
|
|
export * from './intent-classifier-ai';
|
|
export * from './reflex-classifier';
|
|
export * from './entity-extractor';
|
|
export * from './date-time-parser';
|
|
export * from './logger';
|
|
export * from './nudge';
|