diff --git a/src/renderer/src/pages/settings/AgentSettings/components/InstalledPluginsList.tsx b/src/renderer/src/pages/settings/AgentSettings/components/InstalledPluginsList.tsx index f1578f10af..3b535ba0cc 100644 --- a/src/renderer/src/pages/settings/AgentSettings/components/InstalledPluginsList.tsx +++ b/src/renderer/src/pages/settings/AgentSettings/components/InstalledPluginsList.tsx @@ -1,6 +1,7 @@ -import { Button, Chip, Skeleton, Table, TableBody, TableCell, TableColumn, TableHeader, TableRow } from '@heroui/react' import type { InstalledPlugin } from '@renderer/types/plugin' -import { Trash2 } from 'lucide-react' +import type { TableProps } from 'antd' +import { Button, Skeleton, Table as AntTable, Tag } from 'antd' +import { Dot, Trash2 } from 'lucide-react' import type { FC } from 'react' import { useCallback, useState } from 'react' import { useTranslation } from 'react-i18next' @@ -33,10 +34,10 @@ export const InstalledPluginsList: FC = ({ plugins, o if (loading) { return ( -
- - - +
+ + +
) } @@ -50,50 +51,59 @@ export const InstalledPluginsList: FC = ({ plugins, o ) } - return ( - - - {t('plugins.name')} - {t('plugins.type')} - {t('plugins.category')} - {t('plugins.actions')} - - - {plugins.map((plugin) => ( - - -
- {plugin.metadata.name} - {plugin.metadata.description && ( - {plugin.metadata.description} - )} -
-
- - - {plugin.type} - - - - - {plugin.metadata.category} - - - - - -
- ))} -
-
- ) + const columns: TableProps['columns'] = [ + { + title: t('plugins.name'), + dataIndex: 'name', + key: 'name', + render: (_: any, plugin: InstalledPlugin) => ( +
+ {plugin.metadata.name} + {plugin.metadata.description && ( + {plugin.metadata.description} + )} +
+ ) + }, + { + title: t('plugins.type'), + dataIndex: 'type', + key: 'type', + render: (type: string) => {type} + }, + { + title: t('plugins.category'), + dataIndex: 'category', + key: 'category', + render: (_: any, plugin: InstalledPlugin) => ( + } + style={{ + display: 'flex', + flexDirection: 'row', + alignItems: 'center', + gap: '2px' + }}> + {plugin.metadata.category} + + ) + }, + { + title: t('plugins.actions'), + key: 'actions', + align: 'right' as const, + render: (_: any, plugin: InstalledPlugin) => ( + - - - ) : ( - - )} -
- )} - - {contentLoading ? ( -
- -
- ) : contentError ? ( -
{contentError}
- ) : isEditing ? ( -