refactor(web): mark Props of datasets/hit-testing components as read-only (#37118)

Co-authored-by: archievi <13202986+archievi@users.noreply.github.com>
This commit is contained in:
Archie 2026-06-05 20:30:26 -04:00 committed by GitHub
parent 6b12152ce8
commit 1c0080be6f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 14 deletions

View File

@ -6,8 +6,8 @@ import { SliceContent } from '../../formatted-text/flavours/shared'
import Score from './score'
type Props = {
payload: HitTestingChildChunk
isShowAll: boolean
readonly payload: HitTestingChildChunk
readonly isShowAll: boolean
}
const ChildChunks: FC<Props> = ({

View File

@ -12,8 +12,8 @@ import ResultItemMeta from './result-item-meta'
const i18nPrefix = ''
type Props = {
payload: ExternalKnowledgeBaseHitTesting
positionId: number
readonly payload: ExternalKnowledgeBaseHitTesting
readonly positionId: number
}
const ResultItemExternal: FC<Props> = ({ payload, positionId }) => {

View File

@ -7,9 +7,9 @@ import { useTranslation } from 'react-i18next'
import FileIcon from '@/app/components/base/file-uploader/file-type-icon'
type Props = {
docType: FileAppearanceTypeEnum
docTitle: string
showDetailModal: () => void
readonly docType: FileAppearanceTypeEnum
readonly docTitle: string
readonly showDetailModal: () => void
}
const i18nPrefix = ''

View File

@ -8,11 +8,11 @@ import { SegmentIndexTag } from '../../documents/detail/completed/common/segment
import Score from './score'
type Props = {
labelPrefix: string
positionId: number
wordCount: number
score: number
className?: string
readonly labelPrefix: string
readonly positionId: number
readonly wordCount: number
readonly score: number
readonly className?: string
}
const ResultItemMeta: FC<Props> = ({

View File

@ -4,8 +4,8 @@ import { cn } from '@langgenius/dify-ui/cn'
import * as React from 'react'
type Props = {
value: number | null
besideChunkName?: boolean
readonly value: number | null
readonly besideChunkName?: boolean
}
const Score: FC<Props> = ({