Skip to content

Self-evolving Context Database for AI Agents. Unify Agent Memory, Knowledge RAG and Skills.

1.1 KB
Raw Blame
import { useTranslation } from 'react-i18next'

import { Button } from '#/components/ui/button'
import {
  Dialog,
  DialogContent,
  DialogDescription,
  DialogHeader,
  DialogTitle,
} from '#/components/ui/dialog'
import { CrossDeviceVerifyForm } from '#/components/cross-device-verify-form'

export function CrossDeviceVerifyDialog({
  open,
  onOpenChange,
}: {
  open: boolean
  onOpenChange: (open: boolean) => void
}) {
  const { t } = useTranslation(['oauth', 'common'])
  return (
    <Dialog open={open} onOpenChange={onOpenChange}>
      <DialogContent className="max-w-lg">
        <DialogHeader>
          <DialogTitle>{t('verify.title', { ns: 'oauth' })}</DialogTitle>
          <DialogDescription>
            {t('verify.description', { ns: 'oauth' })}
          </DialogDescription>
        </DialogHeader>
        <CrossDeviceVerifyForm
          secondaryAction={
            <Button
              type="button"
              variant="outline"
              onClick={() => onOpenChange(false)}
            >
              {t('action.cancel', { ns: 'common' })}
            </Button>
          }
        />
      </DialogContent>
    </Dialog>
  )
}