Add DOMPurify for rendering md text. Add a easter egg in the console

This commit is contained in:
sabaimran
2024-07-10 10:03:08 +05:30
parent e358723baa
commit e1a5c17775
7 changed files with 47 additions and 172 deletions

View File

@@ -48,6 +48,7 @@ import { StreamMessage } from '../components/chatMessage/chatMessage';
import { AlertDialog, AlertDialogAction, AlertDialogContent, AlertDialogDescription, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger } from '@/components/ui/alert-dialog';
import { Popover, PopoverContent } from '@/components/ui/popover';
import { PopoverTrigger } from '@radix-ui/react-popover';
import { welcomeConsole } from '../common/utils';
interface ChatInputProps {
sendMessage: (message: string) => void;
@@ -392,6 +393,9 @@ export default function Chat() {
const [isMobileWidth, setIsMobileWidth] = useState(false);
welcomeConsole();
const handleWebSocketMessage = (event: MessageEvent) => {
let chunk = event.data;