chat suggestions

This commit is contained in:
colinislit
2025-12-01 17:50:31 +01:00
parent 54f2c36eba
commit 150548bc62
4 changed files with 144 additions and 1 deletions

View File

@@ -7,6 +7,7 @@ import { cn } from '@/lib/utils'
import { ChatInput } from './chat-input'
import { ChatMessages } from './chat-messages'
import { ChatSuggestions } from './chat-suggestions'
import { useDocsChat } from './use-docs-chat'
/**
@@ -105,6 +106,14 @@ export function DocsChatWidget() {
{/* Messages */}
<ChatMessages messages={messages} isStreaming={isStreaming} />
{/* Suggestions - show only when just welcome message */}
{messages.length === 1 && messages[0].id === 'welcome' && (
<ChatSuggestions
onSelect={sendMessage}
disabled={isLoading || isStreaming}
/>
)}
{/* Input */}
<ChatInput
onSend={sendMessage}