chat restart

This commit is contained in:
StyleZhang 2024-03-25 18:42:51 +08:00
parent 07091c9d33
commit a35b5e4fff
2 changed files with 9 additions and 1 deletions

View File

@ -89,7 +89,6 @@ export const NodeTargetHandle = memo(({
hidden absolute left-0 top-0 pointer-events-none
${nodeSelectorClassName}
group-hover:flex
group-hover:scale-150
${open && '!flex'}
`}
availableBlocksTypes={availablePrevNodes}

View File

@ -2,6 +2,7 @@ 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'
@ -14,6 +15,12 @@ const DebugAndPreview = () => {
const { t } = useTranslation()
const chatRef = useRef({ handleRestart: () => {} })
useKeyPress('shift.r', () => {
chatRef.current.handleRestart()
}, {
exactMatch: true,
})
return (
<div
className={`
@ -31,6 +38,8 @@ const DebugAndPreview = () => {
>
<RefreshCcw01 className='mr-1 w-3.5 h-3.5' />
{t('common.operation.refresh')}
<div className='ml-2 px-1 leading-[18px] rounded-md border border-gray-200 bg-gray-50 text-[11px] text-gray-500 font-medium'>Shift</div>
<div className='ml-0.5 px-1 leading-[18px] rounded-md border border-gray-200 bg-gray-50 text-[11px] text-gray-500 font-medium'>R</div>
</Button>
</div>
<div className='grow rounded-b-2xl overflow-y-auto'>