fix /learn-more/extended-reading/what-is-llmops in history-panel.tsx

pull/20801/head
Bowen Liang 12 months ago
parent c0c3ec8b33
commit f84665b516

@ -1,13 +1,11 @@
'use client' 'use client'
import type { FC } from 'react' import type { FC } from 'react'
import React from 'react' import React from 'react'
import { useContext } from 'use-context-selector'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import OperationBtn from '@/app/components/app/configuration/base/operation-btn' import OperationBtn from '@/app/components/app/configuration/base/operation-btn'
import Panel from '@/app/components/app/configuration/base/feature-panel' import Panel from '@/app/components/app/configuration/base/feature-panel'
import { MessageClockCircle } from '@/app/components/base/icons/src/vender/solid/general' import { MessageClockCircle } from '@/app/components/base/icons/src/vender/solid/general'
import I18n from '@/context/i18n' import { getDocLink } from '@/context/i18n'
import { LanguagesSupported } from '@/i18n/language'
type Props = { type Props = {
showWarning: boolean showWarning: boolean
@ -19,7 +17,6 @@ const HistoryPanel: FC<Props> = ({
onShowEditModal, onShowEditModal,
}) => { }) => {
const { t } = useTranslation() const { t } = useTranslation()
const { locale } = useContext(I18n)
return ( return (
<Panel <Panel
@ -45,9 +42,8 @@ const HistoryPanel: FC<Props> = ({
{showWarning && ( {showWarning && (
<div className='flex justify-between rounded-b-xl bg-background-section-burn px-3 py-2 text-xs text-text-secondary'> <div className='flex justify-between rounded-b-xl bg-background-section-burn px-3 py-2 text-xs text-text-secondary'>
<div>{t('appDebug.feature.conversationHistory.tip')} <div>{t('appDebug.feature.conversationHistory.tip')}
<a href={`${locale === LanguagesSupported[1] <a href={getDocLink('/learn-more/extended-reading/what-is-llmops',
? 'https://docs.dify.ai/zh-hans/learn-more/extended-reading/prompt-engineering/README' { 'zh-hans': '/learn-more/extended-reading/prompt-engineering/README' })}
: 'https://docs.dify.ai/en/features/prompt-engineering'}`}
target='_blank' rel='noopener noreferrer' target='_blank' rel='noopener noreferrer'
className='text-[#155EEF]'>{t('appDebug.feature.conversationHistory.learnMore')} className='text-[#155EEF]'>{t('appDebug.feature.conversationHistory.learnMore')}
</a> </a>

Loading…
Cancel
Save