mirror of
http://112.124.100.131/huang.ze/ebiz-dify-ai.git
synced 2025-12-11 20:06:54 +08:00
Feat/model as tool (#2744)
This commit is contained in:
@@ -6,21 +6,21 @@ import Item from './item'
|
||||
import type { Collection } from '@/app/components/tools/types'
|
||||
type Props = {
|
||||
className?: string
|
||||
currentName: string
|
||||
currentIndex: number
|
||||
list: Collection[]
|
||||
onChosen: (index: number) => void
|
||||
}
|
||||
|
||||
const ToolNavList: FC<Props> = ({
|
||||
className,
|
||||
currentName,
|
||||
currentIndex,
|
||||
list,
|
||||
onChosen,
|
||||
}) => {
|
||||
return (
|
||||
<div className={cn(className)}>
|
||||
{list.map((item, index) => (
|
||||
<Item isCurrent={item.name === currentName} key={item.name} payload={item} onClick={() => onChosen(index)}></Item>
|
||||
<Item isCurrent={index === currentIndex} key={index} payload={item} onClick={() => onChosen(index)}></Item>
|
||||
))}
|
||||
</div>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user