feat(cortex): update chat/nudge flow, deepgram streaming and agenda form

Refines chat panel, nudge messages and artifact rendering, reworks
deepgram token/streaming handling, and adds test tooling deps
(playwright, cypress) to package.json.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
colinislit
2026-07-09 22:37:46 +02:00
parent 6c6dae5eb7
commit cdeea793bd
20 changed files with 1634 additions and 283 deletions

View File

@@ -22,6 +22,8 @@ import { FallbackPicker } from '../blocks/fallback-picker';
import { IntakeStatusBlock } from '../blocks/intake-status-block';
import { RisicoBlock } from '../blocks/risico-block';
import { DiagnoseBlock } from '../blocks/diagnose-block';
// No Show casus
import { NoShowDocumentBlock } from '../blocks/noshow-document-block';
import { APPOINTMENT_TYPES, type AppointmentTypeCode, type LocationClassCode } from '@/app/epd/agenda/types';
import type { Artifact, BlockType } from '@/stores/cortex-store';
import { parseRelativeDate, isDateRange } from '@/lib/cortex/date-time-parser';
@@ -205,6 +207,17 @@ function renderArtifactBlock(artifact: Artifact, onCloseArtifact: (id: string) =
return <RisicoBlock key={artifact.id} prefill={artifact.prefill} />;
case 'diagnose_query':
return <DiagnoseBlock key={artifact.id} prefill={artifact.prefill} />;
// No Show casus
case 'register_no_show': {
const nsPrefill = artifact.prefill as {
documentId: string;
content: string;
title: string;
originalContent?: string;
rescriptWarning?: string;
};
return <NoShowDocumentBlock key={artifact.id} prefill={nsPrefill} />;
}
default:
return (
<div className="p-4 text-slate-500">
@@ -250,6 +263,9 @@ export function getArtifactTitle(type: BlockType, prefill?: any): string {
return 'Risicotaxatie';
case 'diagnose_query':
return 'Diagnoses';
// No Show casus
case 'register_no_show':
return prefill?.title ? `Brief — ${prefill.title}` : 'Huisartsbrief';
default:
return 'Artifact';
}