mirror of
https://github.com/langgenius/dify.git
synced 2026-06-11 02:31:13 +08:00
This commit is contained in:
parent
212b819f1c
commit
50e23f40a4
@ -23,12 +23,12 @@ import { useTranslation } from 'react-i18next'
|
||||
import { Infotip } from '@/app/components/base/infotip'
|
||||
import { AuthHeaderPrefix, AuthType } from '@/app/components/tools/types'
|
||||
|
||||
type Props = {
|
||||
type Props = Readonly<{
|
||||
positionCenter?: boolean
|
||||
credential: Credential
|
||||
onChange: (credential: Credential) => void
|
||||
onHide: () => void
|
||||
}
|
||||
}>
|
||||
|
||||
type ItemProps = {
|
||||
text: string
|
||||
|
||||
@ -15,9 +15,9 @@ import Input from '@/app/components/base/input'
|
||||
import { importSchemaFromURL } from '@/service/tools'
|
||||
import examples from './examples'
|
||||
|
||||
type Props = {
|
||||
type Props = Readonly<{
|
||||
onChange: (value: string) => void
|
||||
}
|
||||
}>
|
||||
|
||||
const GetSchema: FC<Props> = ({
|
||||
onChange,
|
||||
|
||||
@ -33,7 +33,7 @@ import ConfigCredentials from './config-credentials'
|
||||
import GetSchema from './get-schema'
|
||||
import TestApi from './test-api'
|
||||
|
||||
type Props = {
|
||||
type Props = Readonly<{
|
||||
positionLeft?: boolean
|
||||
dialogClassName?: string
|
||||
payload: any
|
||||
@ -41,7 +41,7 @@ type Props = {
|
||||
onAdd?: (payload: CustomCollectionBackend) => void
|
||||
onRemove?: () => void
|
||||
onEdit?: (payload: CustomCollectionBackend) => void
|
||||
}
|
||||
}>
|
||||
// Add and Edit
|
||||
const EditCustomCollectionModal: FC<Props> = ({
|
||||
positionLeft,
|
||||
|
||||
@ -24,12 +24,12 @@ import { getLanguage } from '@/i18n-config/language'
|
||||
import { testAPIAvailable } from '@/service/tools'
|
||||
import ConfigCredentials from './config-credentials'
|
||||
|
||||
type Props = {
|
||||
type Props = Readonly<{
|
||||
positionCenter?: boolean
|
||||
customCollection: CustomCollectionBackend
|
||||
tool: CustomParamSchema
|
||||
onHide: () => void
|
||||
}
|
||||
}>
|
||||
|
||||
const TestApi: FC<Props> = ({
|
||||
positionCenter,
|
||||
|
||||
@ -10,9 +10,9 @@ import EditCustomToolModal from '@/app/components/tools/edit-custom-collection-m
|
||||
import { useAppContext } from '@/context/app-context'
|
||||
import { createCustomCollection } from '@/service/tools'
|
||||
|
||||
type Props = {
|
||||
type Props = Readonly<{
|
||||
onRefreshData: () => void
|
||||
}
|
||||
}>
|
||||
|
||||
const Contribute = ({ onRefreshData }: Props) => {
|
||||
const { t } = useTranslation()
|
||||
|
||||
@ -63,11 +63,11 @@ import { basePath } from '@/utils/var'
|
||||
import { AuthHeaderPrefix, AuthType, CollectionType } from '../types'
|
||||
import ToolItem from './tool-item'
|
||||
|
||||
type Props = {
|
||||
type Props = Readonly<{
|
||||
collection: Collection
|
||||
onHide: () => void
|
||||
onRefreshData: () => void
|
||||
}
|
||||
}>
|
||||
|
||||
const ProviderDetail = ({
|
||||
collection,
|
||||
|
||||
@ -7,10 +7,10 @@ import Link from '@/next/link'
|
||||
import { NoToolPlaceholder } from '../../base/icons/src/vender/other'
|
||||
import { ToolTypeEnum } from '../../workflow/block-selector/types'
|
||||
|
||||
type Props = {
|
||||
type Props = Readonly<{
|
||||
type?: ToolTypeEnum
|
||||
isAgent?: boolean
|
||||
}
|
||||
}>
|
||||
|
||||
const getLink = (type?: ToolTypeEnum) => {
|
||||
switch (type) {
|
||||
|
||||
@ -7,13 +7,13 @@ import SettingBuiltInTool from '@/app/components/app/configuration/config/agent/
|
||||
import { useLocale } from '@/context/i18n'
|
||||
import { getLanguage } from '@/i18n-config/language'
|
||||
|
||||
type Props = {
|
||||
type Props = Readonly<{
|
||||
disabled?: boolean
|
||||
collection: Collection
|
||||
tool: Tool
|
||||
isBuiltIn: boolean
|
||||
isModel: boolean
|
||||
}
|
||||
}>
|
||||
|
||||
const ToolItem = ({
|
||||
disabled,
|
||||
|
||||
@ -26,14 +26,14 @@ import Form from '@/app/components/header/account-setting/model-provider-page/mo
|
||||
import { fetchBuiltInToolCredential, fetchBuiltInToolCredentialSchema } from '@/service/tools'
|
||||
import { addDefaultValue, toolCredentialToFormSchemas } from '../../utils/to-form-schema'
|
||||
|
||||
type Props = {
|
||||
type Props = Readonly<{
|
||||
collection: Collection
|
||||
onCancel: () => void
|
||||
onSaved: (value: Record<string, any>) => void
|
||||
isHideRemoveBtn?: boolean
|
||||
onRemove?: () => void
|
||||
isSaving?: boolean
|
||||
}
|
||||
}>
|
||||
|
||||
const ConfigCredential: FC<Props> = ({
|
||||
collection,
|
||||
|
||||
@ -7,7 +7,7 @@ import Loading from '@/app/components/base/loading'
|
||||
import { useRouter } from '@/next/navigation'
|
||||
import Divider from '../../base/divider'
|
||||
|
||||
type Props = {
|
||||
type Props = Readonly<{
|
||||
disabled: boolean
|
||||
published: boolean
|
||||
isLoading: boolean
|
||||
@ -15,7 +15,7 @@ type Props = {
|
||||
isCurrentWorkspaceManager: boolean
|
||||
onConfigure: () => void
|
||||
disabledReason?: string
|
||||
}
|
||||
}>
|
||||
|
||||
const WorkflowToolConfigureButton = ({
|
||||
disabled,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user