mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 18:08:07 +08:00
Merge branch 'main' into feat/rag-2
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import type { SchemaRoot } from '@/app/components/workflow/nodes/llm/types'
|
||||
|
||||
export type FormValue = Record<string, any>
|
||||
|
||||
export type TypeWithI18N<T = string> = {
|
||||
@ -19,6 +21,8 @@ export enum FormTypeEnum {
|
||||
toolSelector = 'tool-selector',
|
||||
multiToolSelector = 'array[tools]',
|
||||
appSelector = 'app-selector',
|
||||
object = 'object',
|
||||
array = 'array',
|
||||
dynamicSelect = 'dynamic-select',
|
||||
}
|
||||
|
||||
@ -109,6 +113,7 @@ export type FormShowOnObject = {
|
||||
}
|
||||
|
||||
export type CredentialFormSchemaBase = {
|
||||
name: string
|
||||
variable: string
|
||||
label: TypeWithI18N
|
||||
type: FormTypeEnum
|
||||
@ -118,6 +123,7 @@ export type CredentialFormSchemaBase = {
|
||||
show_on: FormShowOnObject[]
|
||||
url?: string
|
||||
scope?: string
|
||||
input_schema?: SchemaRoot
|
||||
}
|
||||
|
||||
export type CredentialFormSchemaTextInput = CredentialFormSchemaBase & {
|
||||
|
||||
@ -54,6 +54,7 @@ type FormProps<
|
||||
nodeId?: string
|
||||
nodeOutputVars?: NodeOutPutVar[],
|
||||
availableNodes?: Node[],
|
||||
canChooseMCPTool?: boolean
|
||||
}
|
||||
|
||||
function Form<
|
||||
@ -79,6 +80,7 @@ function Form<
|
||||
nodeId,
|
||||
nodeOutputVars,
|
||||
availableNodes,
|
||||
canChooseMCPTool,
|
||||
}: FormProps<CustomFormSchema>) {
|
||||
const language = useLanguage()
|
||||
const [changeKey, setChangeKey] = useState('')
|
||||
@ -377,6 +379,7 @@ function Form<
|
||||
value={value[variable] || []}
|
||||
onChange={item => handleFormChange(variable, item as any)}
|
||||
supportCollapse
|
||||
canChooseMCPTool={canChooseMCPTool}
|
||||
/>
|
||||
{fieldMoreInfo?.(formSchema)}
|
||||
{validating && changeKey === variable && <ValidatingTip />}
|
||||
|
||||
@ -79,7 +79,7 @@ const Header = () => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className='flex h-[60px] items-center'>
|
||||
<div className='flex h-[56px] items-center'>
|
||||
<div className='flex min-w-0 flex-[1] items-center pl-3 pr-2 min-[1280px]:pr-3'>
|
||||
<Link href="/apps" className='flex h-8 shrink-0 items-center justify-center px-0.5'>
|
||||
{systemFeatures.branding.enabled && systemFeatures.branding.workspace_logo
|
||||
|
||||
Reference in New Issue
Block a user