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:
@@ -15,6 +15,7 @@ import { motion } from 'framer-motion';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { cn } from '@/lib/utils';
|
||||
import type { NudgeSuggestion } from '@/lib/cortex/types';
|
||||
import { useCortexStore } from '@/stores/cortex-store';
|
||||
|
||||
interface NudgeChatMessageProps {
|
||||
suggestion: NudgeSuggestion;
|
||||
@@ -60,6 +61,8 @@ function getAcceptButtonText(intent: string): string {
|
||||
return 'Ja, notitie maken';
|
||||
case 'cancel_appointment':
|
||||
return 'Ja, annuleren';
|
||||
case 'register_no_show':
|
||||
return 'Ja, pas brief aan';
|
||||
default:
|
||||
return 'Ja, uitvoeren';
|
||||
}
|
||||
@@ -71,6 +74,7 @@ export function NudgeChatMessage({
|
||||
onDismiss,
|
||||
}: NudgeChatMessageProps) {
|
||||
const [progress, setProgress] = useState(100);
|
||||
const isNoShowProcessing = useCortexStore((s) => s.isNoShowProcessing);
|
||||
const styles = PRIORITY_STYLES[suggestion.priority];
|
||||
const protocol = suggestion.suggestion.protocol;
|
||||
|
||||
@@ -169,9 +173,10 @@ export function NudgeChatMessage({
|
||||
<Button
|
||||
size="sm"
|
||||
onClick={() => onAccept(suggestion.id)}
|
||||
className="bg-teal-600 hover:bg-teal-700 text-white"
|
||||
disabled={isNoShowProcessing}
|
||||
className="bg-teal-600 hover:bg-teal-700 text-white disabled:opacity-50 disabled:cursor-not-allowed"
|
||||
>
|
||||
{getAcceptButtonText(suggestion.suggestion.intent)}
|
||||
{isNoShowProcessing ? 'Bezig...' : getAcceptButtonText(suggestion.suggestion.intent)}
|
||||
</Button>
|
||||
<Button
|
||||
size="sm"
|
||||
|
||||
Reference in New Issue
Block a user