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

@@ -26,6 +26,8 @@ const ActionSchema = z.object({
'intake_navigeer',
'risico_query',
'diagnose_query',
// No Show casus
'register_no_show',
'unknown',
]),
entities: z.object({
@@ -88,6 +90,8 @@ const ActionSchema = z.object({
'diagnose_query',
'fallback',
'patient-dashboard',
// No Show casus
'register_no_show',
]),
prefill: z.record(z.string(), z.any()),
})
@@ -253,6 +257,9 @@ export function getDefaultConfirmationMessage(intent: CortexIntent, entities: Re
case 'overdracht':
return 'Ik bereid de overdracht voor.';
case 'register_no_show':
return 'Ik registreer de no show en controleer de agenda op declarabiliteit.';
default:
return 'Ik help je verder.';
}
@@ -404,6 +411,11 @@ export function routeIntentToArtifact(
// Returns null to trigger navigation instead of artifact
return null;
case 'register_no_show':
// Artifact opened via handleNoShowRescriptStep in chat-panel.tsx after API calls —
// not via generic routing (needs documentId + rescripted content from API response)
return null;
case 'unknown':
// Unknown intent - show fallback picker
return {