feat(dify): 把本地控制台的中文与去外链改动入库
这些界面改动和专家服务草稿停在工作区,没有随上一笔主分支提交进入仓库。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
9c7c80e194
commit
c2cb845a32
211 files changed
+3030
-2794
No files matched your search
@@ -8,7 +8,6 @@ import { useBoolean } from 'ahooks'
|
||||
import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { toast } from '@/app/notifications'
|
||||
import { useDocLink } from '@/context/i18n'
|
||||
import { consoleQuery } from '@/service/console'
|
||||
import { getErrorMessage } from '@/utils/error-message'
|
||||
import EndpointCard from './endpoint-card'
|
||||
@@ -25,8 +24,7 @@ type EndpointListContentProps = Readonly<{
|
||||
|
||||
const EndpointListContent = ({ declaration, detail }: EndpointListContentProps) => {
|
||||
const { t } = useTranslation(['common', 'plugin'])
|
||||
const docLink = useDocLink()
|
||||
const pluginUniqueID = detail.plugin_unique_identifier
|
||||
const pluginUniqueID = detail.plugin_unique_identifier
|
||||
const showTopBorder = detail.declaration.tool
|
||||
const { data } = useQuery(
|
||||
consoleQuery.workspaces.current.endpoints.list.plugin.get.queryOptions({
|
||||
@@ -82,15 +80,6 @@ const EndpointListContent = ({ declaration, detail }: EndpointListContentProps)
|
||||
<div className="system-xs-regular text-text-tertiary">
|
||||
{t(($) => $['detailPanel.endpointsTip'], { ns: 'plugin' })}
|
||||
</div>
|
||||
<a
|
||||
href={docLink('/develop-plugin/getting-started/getting-started-dify-plugin')}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
className="inline-flex cursor-pointer items-center gap-1 system-xs-regular text-text-accent"
|
||||
>
|
||||
<span aria-hidden className="i-ri-book-open-line size-3" />
|
||||
{t(($) => $['detailPanel.endpointsDocLink'], { ns: 'plugin' })}
|
||||
</a>
|
||||
</div>
|
||||
</PopoverContent>
|
||||
</Popover>
|
||||
|
||||
@@ -26,6 +26,7 @@ import * as React from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import Form from '@/app/components/header/account-setting/model-provider-page/model-modal/Form'
|
||||
import { useRenderI18nObject } from '@/hooks/use-i18n'
|
||||
import { isOfficialDifyUrl } from '@/utils/official-link'
|
||||
import { FormTypeEnum } from '../../header/account-setting/model-provider-page/declarations'
|
||||
import { ReadmeEntrance } from '../readme-panel/entrance'
|
||||
|
||||
@@ -214,7 +215,7 @@ const EndpointModal = ({
|
||||
validating={false}
|
||||
inputClassName="bg-components-input-bg-normal hover:bg-components-input-bg-hover"
|
||||
fieldMoreInfo={(item) =>
|
||||
item.url ? (
|
||||
item.url && !isOfficialDifyUrl(item.url) ? (
|
||||
<a
|
||||
href={item.url}
|
||||
target="_blank"
|
||||
|
||||
@@ -12,9 +12,6 @@ import {
|
||||
MenuTrigger,
|
||||
} from '@langgenius/dify-ui/menu'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import { useLocale } from '#i18n'
|
||||
import { useMarketplace } from '@/features/marketplace/client'
|
||||
import useTheme from '@/hooks/use-theme'
|
||||
import { PluginSource } from '../types'
|
||||
|
||||
type OperationMenuProps = Readonly<
|
||||
@@ -37,7 +34,6 @@ type OperationMenuProps = Readonly<
|
||||
|
||||
export function OperationMenu({
|
||||
source,
|
||||
marketplacePlugin,
|
||||
repo,
|
||||
onInfo,
|
||||
onCheckVersion,
|
||||
@@ -53,18 +49,9 @@ export function OperationMenu({
|
||||
showRemove = true,
|
||||
}: OperationMenuProps) {
|
||||
const { t } = useTranslation(['plugin'])
|
||||
const marketplace = useMarketplace()
|
||||
const locale = useLocale()
|
||||
const { theme } = useTheme()
|
||||
const showInfo = source === PluginSource.github
|
||||
const showCheckVersionAction = showCheckVersion && source === PluginSource.github
|
||||
const detailUrl = !marketplace
|
||||
? undefined
|
||||
: source === PluginSource.marketplace && marketplacePlugin
|
||||
? marketplace.plugin(marketplacePlugin, { language: locale, theme })
|
||||
: source === PluginSource.github && repo
|
||||
? `https://github.com/${repo}`
|
||||
: undefined
|
||||
const detailUrl = source === PluginSource.github && repo ? `https://github.com/${repo}` : undefined
|
||||
const showRemoveAction = showRemove
|
||||
const showSeparator = showRemoveAction && (!!detailUrl || !!onViewReadme)
|
||||
|
||||
|
||||
+2
-1
@@ -1,4 +1,5 @@
|
||||
import type { Node } from 'reactflow'
|
||||
import { isOfficialDifyUrl } from '@/utils/official-link'
|
||||
import type { AppSelectorValue } from '@/app/components/plugins/plugin-detail-panel/app-selector'
|
||||
import type { ToolFormSchema } from '@/app/components/tools/utils/to-form-schema'
|
||||
import type { NodeOutPutVar, ValueSelector } from '@/app/components/workflow/types'
|
||||
@@ -331,7 +332,7 @@ export function ReasoningConfigForm({
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
{url && (
|
||||
{url && !isOfficialDifyUrl(url) && (
|
||||
<a
|
||||
href={url}
|
||||
target="_blank"
|
||||
|
||||
Reference in new issue
Block a user