mirror of
https://github.com/langgenius/dify.git
synced 2026-03-06 16:16:38 +08:00
Merge branch 'feat/mcp-frontend' into deploy/dev
This commit is contained in:
@ -44,6 +44,7 @@ const SchemaModal: FC<Props> = ({
|
||||
<MittProvider>
|
||||
<VisualEditorContextProvider>
|
||||
<VisualEditor
|
||||
className='w-full'
|
||||
schema={schema}
|
||||
rootName={rootName}
|
||||
readOnly
|
||||
|
||||
@ -74,7 +74,7 @@ const ProviderList = () => {
|
||||
className='relative flex grow flex-col overflow-y-auto bg-background-body'
|
||||
>
|
||||
<div className={cn(
|
||||
'sticky top-0 z-20 flex flex-wrap items-center justify-between gap-y-2 bg-background-body px-12 pb-2 pt-4 leading-[56px]',
|
||||
'sticky top-0 z-10 flex flex-wrap items-center justify-between gap-y-2 bg-background-body px-12 pb-2 pt-4 leading-[56px]',
|
||||
currentProviderId && 'pr-6',
|
||||
)}>
|
||||
<TabSliderNew
|
||||
|
||||
@ -231,7 +231,6 @@ const FormInputItem: FC<Props> = ({
|
||||
value={varInput?.value as any}
|
||||
isExpand
|
||||
isInNode
|
||||
height={100}
|
||||
language={CodeLanguage.json}
|
||||
onChange={handleValueChange}
|
||||
className='w-full'
|
||||
|
||||
@ -2,8 +2,10 @@ import type { FC } from 'react'
|
||||
import type { SchemaRoot } from '../../../types'
|
||||
import SchemaNode from './schema-node'
|
||||
import { useSchemaNodeOperations } from './hooks'
|
||||
import cn from '@/utils/classnames'
|
||||
|
||||
export type VisualEditorProps = {
|
||||
className?: string
|
||||
schema: SchemaRoot
|
||||
rootName?: string
|
||||
readOnly?: boolean
|
||||
@ -11,11 +13,11 @@ export type VisualEditorProps = {
|
||||
}
|
||||
|
||||
const VisualEditor: FC<VisualEditorProps> = (props) => {
|
||||
const { schema, readOnly } = props
|
||||
const { className, schema, readOnly } = props
|
||||
useSchemaNodeOperations(props)
|
||||
|
||||
return (
|
||||
<div className='h-full overflow-auto rounded-xl bg-background-section-burn p-1 pl-2'>
|
||||
<div className={cn('h-full overflow-auto rounded-xl bg-background-section-burn p-1 pl-2', className)}>
|
||||
<SchemaNode
|
||||
name={props.rootName || 'structured_output'}
|
||||
schema={schema}
|
||||
|
||||
@ -26,7 +26,7 @@ const CopyFeedbackNew = ({ content }: Props) => {
|
||||
}, 100)
|
||||
|
||||
return (
|
||||
<div className='group flex items-center gap-0.5 pb-0.5' onClick={e => e.stopPropagation()}>
|
||||
<div className='inline-flex pb-0.5' onClick={e => e.stopPropagation()}>
|
||||
<Tooltip
|
||||
popupContent={
|
||||
(isCopied
|
||||
@ -35,12 +35,16 @@ const CopyFeedbackNew = ({ content }: Props) => {
|
||||
}
|
||||
>
|
||||
<div
|
||||
className='system-2xs-regular cursor-pointer text-text-quaternary group-hover:text-text-tertiary'
|
||||
className='group/copy flex items-center gap-0.5 '
|
||||
onClick={onClickCopy}
|
||||
onMouseLeave={onMouseLeave}
|
||||
>{content}</div>
|
||||
>
|
||||
<div
|
||||
className='system-2xs-regular cursor-pointer text-text-quaternary group-hover:text-text-tertiary'
|
||||
>{content}</div>
|
||||
<RiFileCopyLine className='hidden h-3 w-3 text-text-tertiary group-hover/copy:block' />
|
||||
</div>
|
||||
</Tooltip>
|
||||
<RiFileCopyLine className='hidden h-3 w-3 text-text-tertiary group-hover:block' />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user