feat: Add support for chat mode in MessageSource component

This commit extends the `MessageSource` component to support the `chat` mode in addition to the existing `rag` mode. This allows the component to handle and display messages from both chat and RAG (Rapid Automated Generation) sources.
This commit is contained in:
n4ze3m 2024-11-16 19:33:20 +05:30
parent 726d3e3427
commit 64e88bd493

View File

@ -13,7 +13,7 @@ type Props = {
} }
export const MessageSource: React.FC<Props> = ({ source, onSourceClick }) => { export const MessageSource: React.FC<Props> = ({ source, onSourceClick }) => {
if (source?.mode === "rag") { if (source?.mode === "rag" || source?.mode === "chat") {
return ( return (
<button <button
onClick={() => { onClick={() => {