hunk.code_window: from modules.chat.dto.outputs import GetChatHistoryOutput
   from modules.notification.entity.notification import Notification
   from pydantic import BaseModel, ConfigDict
   class ChatMessage(BaseModel):
       model: str
  
hunk.labels: keep keep keep replace keep keep keep keep
hunk.after_edit: from pydantic import BaseModel
  
hunk.file_path: backend/modules/chat/dto/chats.py
hunk.type: replace
file: import { Fragment } from "react";
  import { useFormContext } from "react-hook-form";
  import { useTranslation } from "react-i18next";
  
  import { EmailAuthContextType } from "@/app/(auth)/login/types";
  import Button from "@/lib/components/ui/Button";
  import { useAuthModes } from "@/lib/hooks/useAuthModes";
  
  import { useMagicLinkLogin } from "./hooks/useMagicLinkLogin";
  
  export const MagicLinkLogin = (): JSX.Element => {
    const { t } = useTranslation(["login", "translation"]);
    const { magicLink } = useAuthModes();
    const { handleMagicLinkLogin } = useMagicLinkLogin();
    const { watch } = useFormContext<EmailAuthContextType>();
  
    if (!magicLink) {
      return <Fragment />;
    }
  
    return (
      <Button
        isLoading={watch("isMagicLinkSubmitting")}
        className="bg-black text-white py-2 font-normal w-full"
        type="submit"
        onClick={() => void handleMagicLinkLogin()}
      >
        {t("magicLink", { ns: "login" })}
      </Button>
    );
  };
  