'use client' import React from 'react' import type { FC } from 'react' import DetailHeader from './detail-header' import EndpointList from './endpoint-list' import ActionList from './action-list' import ModelList from './model-list' import AgentStrategyList from './agent-strategy-list' import Drawer from '@/app/components/base/drawer' import type { PluginDetail } from '@/app/components/plugins/types' import cn from '@/utils/classnames' type Props = { detail?: PluginDetail onUpdate: () => void onHide: () => void } const PluginDetailPanel: FC = ({ detail, onUpdate, onHide, }) => { const handleUpdate = (isDelete = false) => { if (isDelete) onHide() onUpdate() } if (!detail) return null return ( {detail && ( <>
{!!detail.declaration.tool && } {!!detail.declaration.agent_strategy && } {!!detail.declaration.endpoint && } {!!detail.declaration.model && }
)}
) } export default PluginDetailPanel