import { memo, useRef, } from 'react' import { useKeyPress } from 'ahooks' import { useTranslation } from 'react-i18next' import ChatWrapper from './chat-wrapper' import Button from '@/app/components/base/button' import { RefreshCcw01 } from '@/app/components/base/icons/src/vender/line/arrows' export type ChatWrapperRefType = { handleRestart: () => void } const DebugAndPreview = () => { const { t } = useTranslation() const chatRef = useRef({ handleRestart: () => {} }) useKeyPress('shift.r', () => { chatRef.current.handleRestart() }, { exactMatch: true, }) return (
{t('workflow.common.debugAndPreview').toLocaleUpperCase()}
) } export default memo(DebugAndPreview)