dify/web/app/components/workflow/nodes/knowledge-base/hooks/use-settings-display.ts
Stephen Zhou a84c2d36a3
style: format with vp fmt (#38803)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2026-07-12 15:57:46 +00:00

24 lines
887 B
TypeScript

import { useTranslation } from 'react-i18next'
import { IndexMethodEnum, RetrievalSearchMethodEnum } from '../types'
export const useSettingsDisplay = () => {
const { t } = useTranslation()
return {
[IndexMethodEnum.QUALIFIED]: t(($) => $['stepTwo.qualified'], { ns: 'datasetCreation' }),
[IndexMethodEnum.ECONOMICAL]: t(($) => $['form.indexMethodEconomy'], { ns: 'datasetSettings' }),
[RetrievalSearchMethodEnum.semantic]: t(($) => $['retrieval.semantic_search.title'], {
ns: 'dataset',
}),
[RetrievalSearchMethodEnum.fullText]: t(($) => $['retrieval.full_text_search.title'], {
ns: 'dataset',
}),
[RetrievalSearchMethodEnum.hybrid]: t(($) => $['retrieval.hybrid_search.title'], {
ns: 'dataset',
}),
[RetrievalSearchMethodEnum.keywordSearch]: t(($) => $['retrieval.keyword_search.title'], {
ns: 'dataset',
}),
}
}