diff --git a/src/components/TopicDetail/TopicDetailAI.tsx b/src/components/TopicDetail/TopicDetailAI.tsx index 699dca2b5..1fa336a90 100644 --- a/src/components/TopicDetail/TopicDetailAI.tsx +++ b/src/components/TopicDetail/TopicDetailAI.tsx @@ -231,16 +231,21 @@ export function TopicDetailAI(props: TopicDetailAIProps) { const testMyKnowledgePrompt = 'Act as an interviewer and test my understanding of this topic'; + const summarizePrompt = 'Summarize this topic in no more than two sentences'; const predefinedMessages = useMemo( () => [ { - label: 'Explain this topic like I am a 5 years old', + label: 'Explain like I am five', message: 'Explain this topic like I am a 5 years old', }, { label: 'Test my Knowledge', message: testMyKnowledgePrompt, }, + { + label: 'Summarize in 2 sentences', + message: summarizePrompt, + }, ], [], ); @@ -377,16 +382,21 @@ export function TopicDetailAI(props: TopicDetailAIProps) { const isTextMyKnowledgePrompt = chat.role === 'user' && chat.content === testMyKnowledgePrompt; + const isTextSummarizePrompt = + chat.role === 'user' && chat.content === summarizePrompt; + + let content = chat.content; + if (isTextMyKnowledgePrompt) { + content = 'Starting Interview'; + } else if (isTextSummarizePrompt) { + content = 'Summarize in 2 sentences'; + } return ( @@ -462,6 +472,7 @@ export function TopicDetailAI(props: TopicDetailAIProps) { autoFocus={true} onKeyDown={(e) => { if (e.key === 'Enter' && !e.shiftKey) { + e.preventDefault(); handleChatSubmit(); } }}