mirror of
https://github.com/langgenius/dify.git
synced 2026-04-13 22:57:26 +08:00
fix: step 2 preview ui padding
This commit is contained in:
parent
07f0140d10
commit
6383a64419
@ -113,11 +113,11 @@ const defaultParentChildConfig: ParentChildConfig = {
|
||||
chunkForContext: 'paragraph',
|
||||
parent: {
|
||||
delimiter: '\\n\\n',
|
||||
maxLength: 4000,
|
||||
maxLength: 500,
|
||||
},
|
||||
child: {
|
||||
delimiter: '\\n\\n',
|
||||
maxLength: 4000,
|
||||
maxLength: 200,
|
||||
},
|
||||
}
|
||||
|
||||
@ -922,7 +922,8 @@ const StepTwo = ({
|
||||
<Badge text='276 Estimated chunks' />
|
||||
</div>
|
||||
</PreviewHeader>}
|
||||
className={cn(s.previewWrap, isMobile && s.isMobile, 'relative h-full overflow-y-scroll space-y-4')}
|
||||
className={cn(s.previewWrap, isMobile && s.isMobile, 'relative h-full overflow-y-scroll')}
|
||||
mainClassName='space-y-6'
|
||||
>
|
||||
{docForm === ChuckingMode.qa && estimate?.qa_preview && (
|
||||
estimate?.qa_preview.map(item => (
|
||||
|
||||
@ -4,10 +4,11 @@ import classNames from '@/utils/classnames'
|
||||
|
||||
export type PreviewContainerProps = ComponentProps<'div'> & {
|
||||
header: ReactNode
|
||||
mainClassName?: string
|
||||
}
|
||||
|
||||
export const PreviewContainer: FC<PreviewContainerProps> = forwardRef((props, ref) => {
|
||||
const { children, className, header, ...rest } = props
|
||||
const { children, className, header, mainClassName, ...rest } = props
|
||||
return <div
|
||||
{...rest}
|
||||
ref={ref}
|
||||
@ -19,7 +20,7 @@ export const PreviewContainer: FC<PreviewContainerProps> = forwardRef((props, re
|
||||
<header className='py-4 pl-5 pr-3 border-b border-divider-subtle'>
|
||||
{header}
|
||||
</header>
|
||||
<main className='py-5 px-6 w-full h-full'>
|
||||
<main className={classNames('py-5 px-6 w-full h-full', mainClassName)}>
|
||||
{children}
|
||||
</main>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user