import { useTranslation } from "react-i18next"; import { ModalBackdrop } from "#/components/shared/modals/modal-backdrop"; import { ModalBody } from "#/components/shared/modals/modal-body"; import { ModalCloseButton } from "#/components/shared/modals/modal-close-button"; import { BaseModalTitle } from "#/components/shared/modals/confirmation-modals/base-modal"; import { I18nKey } from "#/i18n/declaration"; import { Typography } from "#/ui/typography"; import { useConversationPlugins } from "#/hooks/use-conversation-plugins"; import { getPluginDisplayName, getPluginSourceLabel, isLocalPluginSource, pluginReferenceKey, } from "#/utils/plugin-display"; interface PluginsModalProps { onClose: () => void; } /** * Display-only view of the plugins loaded into the current conversation, * captured in client-side metadata at creation (explicitly attached plugins * plus the enabled installed plugins the SDK auto-loads). Mirrors * {@link SkillsModal}. The agent-server doesn't expose a live conversation's * loaded plugins, so this reads that client-side snapshot. */ export function PluginsModal({ onClose }: PluginsModalProps) { const { t } = useTranslation("openhands"); const plugins = useConversationPlugins(); return (
{t(I18nKey.PLUGINS_MODAL$DESCRIPTION)}
{plugins.length === 0 ? (
{t(I18nKey.PLUGINS_MODAL$EMPTY)}
) : (
    {plugins.map((plugin) => (
  • {getPluginDisplayName(plugin)} {isLocalPluginSource(plugin) ? t(I18nKey.PLUGINS_MODAL$SOURCE_LOCAL) : getPluginSourceLabel(plugin)}
  • ))}
)}
); }