mirror of
https://github.com/langgenius/dify.git
synced 2026-04-24 00:59:19 +08:00
chore: refactor component exports for consistency (#26033)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
parent
8b74ae683a
commit
fb6ccccc3d
@ -35,7 +35,7 @@ import { useStore as useAppStore } from '@/app/components/app/store'
|
|||||||
import { useAppContext } from '@/context/app-context'
|
import { useAppContext } from '@/context/app-context'
|
||||||
import useTimestamp from '@/hooks/use-timestamp'
|
import useTimestamp from '@/hooks/use-timestamp'
|
||||||
import Tooltip from '@/app/components/base/tooltip'
|
import Tooltip from '@/app/components/base/tooltip'
|
||||||
import { CopyIcon } from '@/app/components/base/copy-icon'
|
import CopyIcon from '@/app/components/base/copy-icon'
|
||||||
import { buildChatItemTree, getThreadMessages } from '@/app/components/base/chat/utils'
|
import { buildChatItemTree, getThreadMessages } from '@/app/components/base/chat/utils'
|
||||||
import { getProcessedFilesFromResponse } from '@/app/components/base/file-uploader/utils'
|
import { getProcessedFilesFromResponse } from '@/app/components/base/file-uploader/utils'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
|
|||||||
@ -15,7 +15,7 @@ type Props = {
|
|||||||
|
|
||||||
const prefixEmbedded = 'appOverview.overview.appInfo.embedded'
|
const prefixEmbedded = 'appOverview.overview.appInfo.embedded'
|
||||||
|
|
||||||
export const CopyIcon = ({ content }: Props) => {
|
const CopyIcon = ({ content }: Props) => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const [isCopied, setIsCopied] = useState<boolean>(false)
|
const [isCopied, setIsCopied] = useState<boolean>(false)
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ const useThinkTimer = (children: any) => {
|
|||||||
return { elapsedTime, isComplete }
|
return { elapsedTime, isComplete }
|
||||||
}
|
}
|
||||||
|
|
||||||
export const ThinkBlock = ({ children, ...props }: any) => {
|
const ThinkBlock = ({ children, ...props }: React.ComponentProps<'details'>) => {
|
||||||
const { elapsedTime, isComplete } = useThinkTimer(children)
|
const { elapsedTime, isComplete } = useThinkTimer(children)
|
||||||
const displayContent = removeEndThink(children)
|
const displayContent = removeEndThink(children)
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
|
|||||||
@ -3,7 +3,7 @@ import { SVG } from '@svgdotjs/svg.js'
|
|||||||
import DOMPurify from 'dompurify'
|
import DOMPurify from 'dompurify'
|
||||||
import ImagePreview from '@/app/components/base/image-uploader/image-preview'
|
import ImagePreview from '@/app/components/base/image-uploader/image-preview'
|
||||||
|
|
||||||
export const SVGRenderer = ({ content }: { content: string }) => {
|
const SVGRenderer = ({ content }: { content: string }) => {
|
||||||
const svgRef = useRef<HTMLDivElement>(null)
|
const svgRef = useRef<HTMLDivElement>(null)
|
||||||
const [imagePreview, setImagePreview] = useState('')
|
const [imagePreview, setImagePreview] = useState('')
|
||||||
const [windowSize, setWindowSize] = useState({
|
const [windowSize, setWindowSize] = useState({
|
||||||
|
|||||||
@ -30,7 +30,7 @@ enum GeneratorView {
|
|||||||
result = 'result',
|
result = 'result',
|
||||||
}
|
}
|
||||||
|
|
||||||
export const JsonSchemaGenerator: FC<JsonSchemaGeneratorProps> = ({
|
const JsonSchemaGenerator: FC<JsonSchemaGeneratorProps> = ({
|
||||||
onApply,
|
onApply,
|
||||||
crossAxisOffset,
|
crossAxisOffset,
|
||||||
}) => {
|
}) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user