dify/web/app/components/share/text-generation/result/content.tsx
QuantumGhost a1fc280102
feat: Human Input Node (#32060)
The frontend and backend implementation for the human input node.

Co-authored-by: twwu <twwu@dify.ai>
Co-authored-by: JzoNg <jzongcode@gmail.com>
Co-authored-by: yyh <92089059+lyzno1@users.noreply.github.com>
Co-authored-by: zhsama <torvalds@linux.do>
2026-02-09 14:57:23 +08:00

36 lines
922 B
TypeScript

import type { FC } from 'react'
import type { FeedbackType } from '@/app/components/base/chat/chat/type'
import * as React from 'react'
import { format } from '@/service/base'
import Header from './header'
export type IResultProps = {
content: string
showFeedback: boolean
feedback: FeedbackType
onFeedback: (feedback: FeedbackType) => void
}
const Result: FC<IResultProps> = ({
content,
showFeedback,
feedback,
onFeedback,
}) => {
return (
<div className="h-max basis-3/4">
<Header result={content} showFeedback={showFeedback} feedback={feedback} onFeedback={onFeedback} />
<div
className="mt-4 flex w-full overflow-scroll text-sm font-normal leading-5 text-gray-900"
style={{
maxHeight: '70vh',
}}
dangerouslySetInnerHTML={{
__html: format(content),
}}
>
</div>
</div>
)
}
export default React.memo(Result)