|
|
|
@ -1,6 +1,6 @@
|
|
|
|
import React, { useMemo } from 'react'
|
|
|
|
import React, { useMemo } from 'react'
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
import { useContext } from 'use-context-selector'
|
|
|
|
import { useDocLink } from '@/context/i18n'
|
|
|
|
import { useBoolean } from 'ahooks'
|
|
|
|
import { useBoolean } from 'ahooks'
|
|
|
|
import {
|
|
|
|
import {
|
|
|
|
RiAddLine,
|
|
|
|
RiAddLine,
|
|
|
|
@ -20,8 +20,6 @@ import {
|
|
|
|
useInvalidateEndpointList,
|
|
|
|
useInvalidateEndpointList,
|
|
|
|
} from '@/service/use-endpoints'
|
|
|
|
} from '@/service/use-endpoints'
|
|
|
|
import type { PluginDetail } from '@/app/components/plugins/types'
|
|
|
|
import type { PluginDetail } from '@/app/components/plugins/types'
|
|
|
|
import { LanguagesSupported } from '@/i18n/language'
|
|
|
|
|
|
|
|
import I18n from '@/context/i18n'
|
|
|
|
|
|
|
|
import cn from '@/utils/classnames'
|
|
|
|
import cn from '@/utils/classnames'
|
|
|
|
|
|
|
|
|
|
|
|
type Props = {
|
|
|
|
type Props = {
|
|
|
|
@ -29,7 +27,7 @@ type Props = {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
const EndpointList = ({ detail }: Props) => {
|
|
|
|
const EndpointList = ({ detail }: Props) => {
|
|
|
|
const { t } = useTranslation()
|
|
|
|
const { t } = useTranslation()
|
|
|
|
const { locale } = useContext(I18n)
|
|
|
|
const docLink = useDocLink()
|
|
|
|
const pluginUniqueID = detail.plugin_unique_identifier
|
|
|
|
const pluginUniqueID = detail.plugin_unique_identifier
|
|
|
|
const declaration = detail.declaration.endpoint
|
|
|
|
const declaration = detail.declaration.endpoint
|
|
|
|
const showTopBorder = detail.declaration.tool
|
|
|
|
const showTopBorder = detail.declaration.tool
|
|
|
|
@ -79,7 +77,7 @@ const EndpointList = ({ detail }: Props) => {
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div className='system-xs-regular text-text-tertiary'>{t('plugin.detailPanel.endpointsTip')}</div>
|
|
|
|
<div className='system-xs-regular text-text-tertiary'>{t('plugin.detailPanel.endpointsTip')}</div>
|
|
|
|
<a
|
|
|
|
<a
|
|
|
|
href={`https://docs.dify.ai/${locale === LanguagesSupported[1] ? 'v/zh-hans/' : ''}plugins/schema-definition/endpoint`}
|
|
|
|
href={docLink('/plugins/schema-definition/endpoint')}
|
|
|
|
target='_blank'
|
|
|
|
target='_blank'
|
|
|
|
rel='noopener noreferrer'
|
|
|
|
rel='noopener noreferrer'
|
|
|
|
>
|
|
|
|
>
|
|
|
|
|