feat(cortex): add Intake Blocks MVP for voice/text commands
Adds 4 new intents for intake workflow: - intake_status: shows completion percentage and section checklist - intake_navigeer: navigation to specific intake tabs - risico_query: displays risk assessments with severity indicators - diagnose_query: shows primary/secondary diagnoses New components: - IntakeStatusBlock, RisicoBlock, DiagnoseBlock - Shared block components (BlockLoading, BlockError, BlockEmpty, BlockSection, BlockItem, BlockFooter) - useBlockData and useIntakeContext hooks New API routes: - GET /api/cortex/intake/status - GET /api/cortex/intake/risico - GET /api/cortex/intake/diagnose Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
62
components/cortex/shared/block-section.tsx
Normal file
62
components/cortex/shared/block-section.tsx
Normal file
@@ -0,0 +1,62 @@
|
||||
'use client';
|
||||
|
||||
/**
|
||||
* BlockSection Component
|
||||
*
|
||||
* Groups related content within a Cortex block with a header.
|
||||
*
|
||||
* Epic: E1.S1 - Block Layout
|
||||
*/
|
||||
|
||||
import type { ReactNode } from 'react';
|
||||
import type { LucideIcon } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
|
||||
interface BlockSectionProps {
|
||||
/** Icoon component */
|
||||
icon: LucideIcon;
|
||||
/** Tailwind kleur class voor icoon */
|
||||
iconColor?: string;
|
||||
/** Sectie titel */
|
||||
title: string;
|
||||
/** Optionele count badge */
|
||||
count?: number;
|
||||
/** Sectie inhoud */
|
||||
children: ReactNode;
|
||||
/** Extra CSS classes */
|
||||
className?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Section wrapper for Cortex blocks.
|
||||
* Shows icon + title header with optional count, wraps children content.
|
||||
*/
|
||||
export function BlockSection({
|
||||
icon: Icon,
|
||||
iconColor = 'text-slate-600',
|
||||
title,
|
||||
count,
|
||||
children,
|
||||
className,
|
||||
}: BlockSectionProps) {
|
||||
return (
|
||||
<section
|
||||
className={cn(
|
||||
'bg-white rounded-lg border border-slate-200 p-4',
|
||||
className
|
||||
)}
|
||||
>
|
||||
{/* Header */}
|
||||
<div className="flex items-center gap-2 mb-3">
|
||||
<Icon className={cn('h-4 w-4', iconColor)} />
|
||||
<h3 className="text-sm font-medium text-slate-700">{title}</h3>
|
||||
{count !== undefined && (
|
||||
<span className="text-xs text-slate-500">({count})</span>
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Content */}
|
||||
{children}
|
||||
</section>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user