mirror of
https://github.com/langgenius/dify.git
synced 2026-05-05 01:48:04 +08:00
tool selecting in configure
This commit is contained in:
@ -3,7 +3,7 @@ import type { FC, ReactNode } from 'react'
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import cn from '@/utils/classnames'
|
import cn from '@/utils/classnames'
|
||||||
|
|
||||||
export interface IFeaturePanelProps {
|
export type IFeaturePanelProps = {
|
||||||
className?: string
|
className?: string
|
||||||
headerIcon?: ReactNode
|
headerIcon?: ReactNode
|
||||||
title: ReactNode
|
title: ReactNode
|
||||||
@ -23,7 +23,7 @@ const FeaturePanel: FC<IFeaturePanelProps> = ({
|
|||||||
children,
|
children,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<div className={cn('rounded-xl border-t-[0.5px] border-l-[0.5px] bg-background-section-burn pb-3', noBodySpacing && '!pb-0', className)}>
|
<div className={cn('rounded-xl border-t-[0.5px] border-l-[0.5px] bg-background-section-burn pb-3', noBodySpacing && 'pb-0', className)}>
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
<div className={cn('px-3 pt-2', hasHeaderBottomBorder && 'border-b border-divider-subtle')}>
|
<div className={cn('px-3 pt-2', hasHeaderBottomBorder && 'border-b border-divider-subtle')}>
|
||||||
<div className='flex justify-between items-center h-8'>
|
<div className='flex justify-between items-center h-8'>
|
||||||
|
|||||||
@ -92,6 +92,7 @@ const AgentTools: FC = () => {
|
|||||||
tool_name: tool.tool_name,
|
tool_name: tool.tool_name,
|
||||||
tool_label: tool.tool_label,
|
tool_label: tool.tool_label,
|
||||||
tool_parameters: tool.params,
|
tool_parameters: tool.params,
|
||||||
|
notAuthor: !(tool as ToolDefaultValue & { is_team_authorization: boolean }).is_team_authorization,
|
||||||
enabled: true,
|
enabled: true,
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
@ -101,7 +102,7 @@ const AgentTools: FC = () => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Panel
|
<Panel
|
||||||
className="mt-2"
|
className={cn('mt-2', tools.length === 0 && 'pb-2')}
|
||||||
noBodySpacing={tools.length === 0}
|
noBodySpacing={tools.length === 0}
|
||||||
headerIcon={
|
headerIcon={
|
||||||
<RiHammerFill className='w-4 h-4 text-primary-500' />
|
<RiHammerFill className='w-4 h-4 text-primary-500' />
|
||||||
|
|||||||
Reference in New Issue
Block a user