diff --git a/src/components/ChatWidget.tsx b/src/components/ChatWidget.tsx index d823133..041a543 100644 --- a/src/components/ChatWidget.tsx +++ b/src/components/ChatWidget.tsx @@ -16,6 +16,12 @@ const prefersReducedMotion = window.matchMedia('(prefers-reduced-motion: reduce) const MAX_HISTORY = 10 +const SUGGESTED_QUESTIONS = [ + "What's his NHS experience?", + 'Tell me about his data skills', + 'What projects has he built?', +] + const buttonVariants = { hidden: prefersReducedMotion ? { opacity: 1, y: 0 } @@ -79,8 +85,8 @@ export function ChatWidget({ onAction }: ChatWidgetProps) { } }, [isOpen]) - const handleSubmit = useCallback(async () => { - const trimmed = inputValue.trim() + const handleSubmit = useCallback(async (overrideText?: string) => { + const trimmed = (overrideText ?? inputValue).trim() if (!trimmed || isStreaming) return const userMessage: ChatMessage = { role: 'user', content: trimmed } @@ -303,16 +309,64 @@ export function ChatWidget({ onAction }: ChatWidgetProps) { )} {geminiAvailable && messages.length === 0 && ( -