Co-authored-by: StyleZhang <jasonapring2015@outlook.com> Co-authored-by: crazywoola <427733928@qq.com>tags/0.5.3
| @@ -11,7 +11,7 @@ help: | |||
| en_US: How to integrate with Ollama | |||
| zh_Hans: 如何集成 Ollama | |||
| url: | |||
| en_US: https://docs.dify.ai/advanced/model-configuration/ollama | |||
| en_US: https://docs.dify.ai/tutorials/model-configuration/ollama | |||
| supported_model_types: | |||
| - llm | |||
| - text-embedding | |||
| @@ -35,6 +35,7 @@ import FloatPopoverContainer from '@/app/components/base/float-popover-container | |||
| import DatasetDetailContext from '@/context/dataset-detail' | |||
| import { DataSourceType } from '@/models/datasets' | |||
| import useBreakpoints, { MediaType } from '@/hooks/use-breakpoints' | |||
| import { LanguagesSupported, getModelRuntimeSupported } from '@/utils/language' | |||
| export type IAppDetailLayoutProps = { | |||
| children: React.ReactNode | |||
| @@ -104,6 +105,7 @@ type IExtraInfoProps = { | |||
| const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => { | |||
| const locale = getLocaleOnClient() | |||
| const language = getModelRuntimeSupported(locale) | |||
| const [isShowTips, { toggle: toggleTips, set: setShowTips }] = useBoolean(!isMobile) | |||
| const { t } = useTranslation() | |||
| @@ -147,7 +149,11 @@ const ExtraInfo = ({ isMobile, relatedApps }: IExtraInfoProps) => { | |||
| <div className='text-xs text-gray-500 mt-2'>{t('common.datasetMenus.emptyTip')}</div> | |||
| <a | |||
| className='inline-flex items-center text-xs text-primary-600 mt-2 cursor-pointer' | |||
| href={`https://docs.dify.ai/${locale === 'zh-Hans' ? 'v/zh-hans' : ''}/application/prompt-engineering`} | |||
| href={ | |||
| language === LanguagesSupported[1] | |||
| ? 'https://docs.dify.ai/v/zh-hans/guides/application-design/prompt-engineering' | |||
| : 'https://docs.dify.ai/user-guide/creating-dify-apps/prompt-engineering' | |||
| } | |||
| target='_blank' | |||
| > | |||
| <BookOpenIcon className='mr-1' /> | |||
| @@ -207,7 +207,7 @@ const ActivateForm = () => { | |||
| <Link | |||
| className='text-primary-600' | |||
| target={'_blank'} | |||
| href={`https://docs.dify.ai/${language !== LanguagesSupportedUnderscore[1] ? '' : `v/${locale.toLowerCase()}`}/community/open-source`} | |||
| href={`https://docs.dify.ai/${language !== LanguagesSupportedUnderscore[1] ? 'user-agreement' : `v/${locale.toLowerCase()}/policies`}/open-source`} | |||
| >{t('login.license.link')}</Link> | |||
| </div> | |||
| </div> | |||
| @@ -7,6 +7,7 @@ import OperationBtn from '@/app/components/app/configuration/base/operation-btn' | |||
| import Panel from '@/app/components/app/configuration/base/feature-panel' | |||
| import { MessageClockCircle } from '@/app/components/base/icons/src/vender/solid/general' | |||
| import I18n from '@/context/i18n' | |||
| import { LanguagesSupported, getModelRuntimeSupported } from '@/utils/language' | |||
| type Props = { | |||
| showWarning: boolean | |||
| @@ -19,6 +20,7 @@ const HistoryPanel: FC<Props> = ({ | |||
| }) => { | |||
| const { t } = useTranslation() | |||
| const { locale } = useContext(I18n) | |||
| const language = getModelRuntimeSupported(locale) | |||
| return ( | |||
| <Panel | |||
| @@ -43,7 +45,14 @@ const HistoryPanel: FC<Props> = ({ | |||
| > | |||
| {showWarning && ( | |||
| <div className='flex justify-between py-2 px-3 rounded-b-xl bg-[#FFFAEB] text-xs text-gray-700'> | |||
| <div>{t('appDebug.feature.conversationHistory.tip')} <a href={`https://docs.dify.ai/${locale === 'zh-Hans' ? 'v/zh-hans/' : ''}advanced/prompt-engineering`} target='_blank' className='text-[#155EEF]'>{t('appDebug.feature.conversationHistory.learnMore')}</a></div> | |||
| <div>{t('appDebug.feature.conversationHistory.tip')} | |||
| <a href={`${language === LanguagesSupported[1] | |||
| ? 'https://docs.dify.ai/v/zh-hans/guides/application-design/prompt-engineering' | |||
| : 'https://docs.dify.ai/features/prompt-engineering'}`} | |||
| target='_blank' | |||
| className='text-[#155EEF]'>{t('appDebug.feature.conversationHistory.learnMore')} | |||
| </a> | |||
| </div> | |||
| </div> | |||
| )} | |||
| </Panel> | |||
| @@ -163,7 +163,7 @@ const SettingsModal: FC<SettingsModalProps> = ({ | |||
| className='block px-3 py-2 w-full h-[88px] rounded-lg bg-gray-100 text-sm outline-none appearance-none resize-none' | |||
| placeholder={t('datasetSettings.form.descPlaceholder') || ''} | |||
| /> | |||
| <a className='mt-2 flex items-center h-[18px] px-3 text-xs text-gray-500' href="https://docs.dify.ai/advanced/datasets#how-to-write-a-good-dataset-description" target='_blank'> | |||
| <a className='mt-2 flex items-center h-[18px] px-3 text-xs text-gray-500' href="https://docs.dify.ai/features/datasets#how-to-write-a-good-dataset-description" target='_blank'> | |||
| <BookOpenIcon className='w-3 h-[18px] mr-1' /> | |||
| {t('datasetSettings.form.descWrite')} | |||
| </a> | |||
| @@ -226,7 +226,7 @@ const SettingsModal: FC<SettingsModalProps> = ({ | |||
| <div> | |||
| <div>{t('datasetSettings.form.retrievalSetting.title')}</div> | |||
| <div className='leading-[18px] text-xs font-normal text-gray-500'> | |||
| <a target='_blank' href='https://docs.dify.ai/advanced/retrieval-augment' className='text-[#155eef]'>{t('datasetSettings.form.retrievalSetting.learnMore')}</a> | |||
| <a target='_blank' href='https://docs.dify.ai/features/retrieval-augment' className='text-[#155eef]'>{t('datasetSettings.form.retrievalSetting.learnMore')}</a> | |||
| {t('datasetSettings.form.retrievalSetting.description')} | |||
| </div> | |||
| </div> | |||
| @@ -5,7 +5,7 @@ import { useTranslation } from 'react-i18next' | |||
| import { useContext } from 'use-context-selector' | |||
| import I18n from '@/context/i18n' | |||
| import { FlipBackward } from '@/app/components/base/icons/src/vender/line/arrows' | |||
| import { LanguagesSupported, getModelRuntimeSupported } from '@/utils/language' | |||
| type Props = { | |||
| onReturnToSimpleMode: () => void | |||
| } | |||
| @@ -15,6 +15,7 @@ const AdvancedModeWarning: FC<Props> = ({ | |||
| }) => { | |||
| const { t } = useTranslation() | |||
| const { locale } = useContext(I18n) | |||
| const language = getModelRuntimeSupported(locale) | |||
| const [show, setShow] = React.useState(true) | |||
| if (!show) | |||
| return null | |||
| @@ -26,7 +27,7 @@ const AdvancedModeWarning: FC<Props> = ({ | |||
| <span className='text-gray-700'>{t('appDebug.promptMode.advancedWarning.description')}</span> | |||
| <a | |||
| className='font-medium text-[#155EEF]' | |||
| href={`https://docs.dify.ai/${locale === 'zh-Hans' ? 'v/zh-hans/' : ''}advanced/prompt-engineering`} | |||
| href={`https://docs.dify.ai/${language === LanguagesSupported[1] ? 'v/zh-hans/guides/application-design/prompt-engineering' : 'features/prompt-engineering'}`} | |||
| target='_blank' | |||
| > | |||
| {t('appDebug.promptMode.advancedWarning.learnMore')} | |||
| @@ -100,7 +100,16 @@ const CustomizeModal: FC<IShareLinkProps> = ({ | |||
| <p className='mt-2 text-base font-medium text-gray-800'>{t(`${prefixCustomize}.way2.name`)}</p> | |||
| <Button | |||
| className='w-36 mt-2' | |||
| onClick={() => window.open(`https://docs.dify.ai/${language !== LanguagesSupportedUnderscore[1] ? '' : `v/${locale.toLowerCase()}`}/application/developing-with-apis`, '_blank')} | |||
| onClick={() => | |||
| window.open( | |||
| `https://docs.dify.ai/${ | |||
| language !== LanguagesSupportedUnderscore[1] | |||
| ? 'user-guide/launching-dify-apps/developing-with-apis' | |||
| : `v/${locale.toLowerCase()}/guides/application-publishing/developing-with-apis` | |||
| }`, | |||
| '_blank', | |||
| ) | |||
| } | |||
| > | |||
| <span className='text-sm text-gray-800'>{t(`${prefixCustomize}.way2.operation`)}</span> | |||
| <ArrowTopRightOnSquareIcon className='w-4 h-4 ml-1 text-gray-800 shrink-0' /> | |||
| @@ -738,7 +738,7 @@ const StepTwo = ({ | |||
| <div className={s.label}> | |||
| {t('datasetSettings.form.retrievalSetting.title')} | |||
| <div className='leading-[18px] text-xs font-normal text-gray-500'> | |||
| <a target='_blank' href='https://docs.dify.ai/advanced/retrieval-augment' className='text-[#155eef]'>{t('datasetSettings.form.retrievalSetting.learnMore')}</a> | |||
| <a target='_blank' href='https://docs.dify.ai/features/retrieval-augment' className='text-[#155eef]'>{t('datasetSettings.form.retrievalSetting.learnMore')}</a> | |||
| {t('datasetSettings.form.retrievalSetting.longDescription')} | |||
| </div> | |||
| </div> | |||
| @@ -76,7 +76,7 @@ const ModifyRetrievalModal: FC<Props> = ({ | |||
| <div className='text-base font-semibold text-gray-900'> | |||
| <div>{t('datasetSettings.form.retrievalSetting.title')}</div> | |||
| <div className='leading-[18px] text-xs font-normal text-gray-500'> | |||
| <a target='_blank' href='https://docs.dify.ai/advanced/retrieval-augment' className='text-[#155eef]'>{t('datasetSettings.form.retrievalSetting.learnMore')}</a> | |||
| <a target='_blank' href='https://docs.dify.ai/features/retrieval-augment' className='text-[#155eef]'>{t('datasetSettings.form.retrievalSetting.learnMore')}</a> | |||
| {t('datasetSettings.form.retrievalSetting.description')} | |||
| </div> | |||
| </div> | |||
| @@ -146,7 +146,7 @@ const Form = () => { | |||
| value={description} | |||
| onChange={e => setDescription(e.target.value)} | |||
| /> | |||
| <a className='flex items-center h-[18px] px-3 text-xs text-gray-500' href="https://docs.dify.ai/advanced/datasets#how-to-write-a-good-dataset-description" target='_blank'> | |||
| <a className='flex items-center h-[18px] px-3 text-xs text-gray-500' href="https://docs.dify.ai/features/datasets#how-to-write-a-good-dataset-description" target='_blank'> | |||
| <BookOpenIcon className='w-3 h-[18px] mr-1' /> | |||
| {t('datasetSettings.form.descWrite')} | |||
| </a> | |||
| @@ -209,7 +209,7 @@ const Form = () => { | |||
| <div> | |||
| <div>{t('datasetSettings.form.retrievalSetting.title')}</div> | |||
| <div className='leading-[18px] text-xs font-normal text-gray-500'> | |||
| <a target='_blank' href='https://docs.dify.ai/advanced/retrieval-augment' className='text-[#155eef]'>{t('datasetSettings.form.retrievalSetting.learnMore')}</a> | |||
| <a target='_blank' href='https://docs.dify.ai/features/retrieval-augment' className='text-[#155eef]'>{t('datasetSettings.form.retrievalSetting.learnMore')}</a> | |||
| {t('datasetSettings.form.retrievalSetting.description')} | |||
| </div> | |||
| </div> | |||
| @@ -345,7 +345,7 @@ const translation = { | |||
| apiBasedExtension: { | |||
| title: 'API extensions provide centralized API management, simplifying configuration for easy use across Dify\'s applications.', | |||
| link: 'Learn how to develop your own API Extension.', | |||
| linkUrl: 'https://docs.dify.ai/advanced/api_based_extension', | |||
| linkUrl: 'https://docs.dify.ai/features/extension/api_based_extension', | |||
| add: 'Add API Extension', | |||
| selector: { | |||
| title: 'API Extension', | |||
| @@ -174,7 +174,7 @@ const translation = { | |||
| apiBasedExtension: { | |||
| title: 'As extensões de API fornecem gerenciamento centralizado de API, simplificando a configuração para uso fácil em aplicativos da Dify.', | |||
| link: 'Saiba como desenvolver sua própria Extensão de API.', | |||
| linkUrl: 'https://docs.dify.ai/advanced/api_based_extension', | |||
| linkUrl: 'https://docs.dify.ai/features/extension/api_based_extension', | |||
| add: 'Adicionar Extensão de API', | |||
| selector: { | |||
| title: 'Extensão de API', | |||