diff --git a/src/hooks/use-preset-button.hooks.ts b/src/hooks/use-preset-button.hooks.ts index 8562958..f06be8c 100644 --- a/src/hooks/use-preset-button.hooks.ts +++ b/src/hooks/use-preset-button.hooks.ts @@ -7,14 +7,14 @@ const usePresetButton = () => { const { addMessage, setLoading, updateLastMessage, updateLastReference, updateReferenceDisabled } = useChatStore(); const handleReferenceButtonClick = (references: referenceState[]) => { - let content = '๐Ÿ’ก๋‹ต๋ณ€ ์ถœ์ฒ˜๋ฅผ ์•Œ๋ ค๋“œ๋ฆด๊ฒŒ์š”! ๋งํฌ๋ฅผ ํด๋ฆญํ•˜๋ฉด ๋ชจ์ง‘์š”๊ฐ•์œผ๋กœ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”!\n'; + let content = '๐Ÿ’ก๋‹ต๋ณ€ ์ถœ์ฒ˜๋ฅผ ์•Œ๋ ค๋“œ๋ฆด๊ฒŒ์š”! ์ถœ์ฒ˜๋ฅผ ํด๋ฆญํ•˜๋ฉด ๋ชจ์ง‘์š”๊ฐ•์œผ๋กœ ํ™•์ธํ•  ์ˆ˜ ์žˆ์–ด์š”!\n'; // references๊ฐ€ null, undefined, ๋˜๋Š” ๊ธธ์ด๊ฐ€ 0์ธ ๊ฒฝ์šฐ ์ฒดํฌ if (!references || references.length === 0) { addMessage({ content: '์ถœ์ฒ˜ ์ •๋ณด๊ฐ€ ์—†์Šต๋‹ˆ๋‹ค.', role: 'system' }); return; } references.map((reference, index) => { - content += `\n์ถœ์ฒ˜${index + 1}๋ฒˆ: ${reference.link}\n`; + content += `\n[์ถœ์ฒ˜ ${index + 1}๋ฒˆ](${reference.link})\n`; }); content += '\n๐Ÿ“Œ **๋‹ต๋ณ€์„ ๊ผญ ํ™•์ธํ•ด์ฃผ์„ธ์š”!** '; addMessage({ content: content, role: 'system' }); diff --git a/src/ui/components/atom/chat-card/chat-card.tsx b/src/ui/components/atom/chat-card/chat-card.tsx index ed9a5aa..5bc70b2 100644 --- a/src/ui/components/atom/chat-card/chat-card.tsx +++ b/src/ui/components/atom/chat-card/chat-card.tsx @@ -26,7 +26,22 @@ const ChatCard = ({ content, role, children }: ChatCardProps) => { })} >
- {content === 'loading' ? : {content}} + {content === 'loading' ? ( + + ) : ( + ( + + {props.children} + + ), + }} + > + {content} + + )} {children}