File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import { ChatMessage } from '../../types/chat';
1212import { searchChatbotStreamAndUpdate } from '../../services/chatService' ;
1313import { v4 as uuidv4 } from 'uuid' ;
1414import { useNavigate } from 'react-router-dom' ;
15+ import Tag from '../../components/common/Tag' ;
1516
1617interface ChatInputProps {
1718 mode : 'home' | 'chat' | 'search' ;
@@ -26,6 +27,7 @@ const ChatInput: React.FC<ChatInputProps> = ({ mode, onSend }) => {
2627 startKeywordCollection,
2728 chatLogs,
2829 handleSend : sendMessage ,
30+ keywords,
2931 } = useChat ( ) ;
3032 const [ message , setMessage ] = useState ( '' ) ;
3133 const [ isOptionsOpen , setIsOptionsOpen ] = useState ( false ) ;
@@ -286,6 +288,13 @@ const ChatInput: React.FC<ChatInputProps> = ({ mode, onSend }) => {
286288 < div className = 'mt-2 flex items-center gap-3' >
287289 < span className = 'text-xs text-gray-500' > 인식한 키워드</ span >
288290 { message . trim ( ) . length > 0 && < TypingDots /> }
291+ { keywords . length > 0 && (
292+ < div className = 'flex gap-2' >
293+ { keywords . map ( ( keyword : string , index : number ) => (
294+ < Tag key = { index } tagtext = { keyword } />
295+ ) ) }
296+ </ div >
297+ ) }
289298 </ div >
290299 </ div >
291300 ) }
You can’t perform that action at this time.
0 commit comments