"use client" import * as React from 'react' import { Drawer, DrawerContent, DrawerHeader, DrawerTitle, DrawerBody, } from '@open-mercato/ui/primitives/drawer' import { Brain } from 'lucide-react' import { Tag } from '@open-mercato/ui/primitives/tag' import { SectionHeader } from '@open-mercato/ui/backend/SectionHeader' import { MarkdownContent } from '@open-mercato/ui/backend/markdown/MarkdownContent' import { useT } from '@open-mercato/shared/lib/i18n/context' import type { SkillDetailView } from './types' export type SkillDrawerProps = { open: boolean onOpenChange: (open: boolean) => void skill: SkillDetailView | null } /** * Right-side panel showing a skill's full instructions (rendered as markdown — * skills are authored as SKILL.md files) plus the read-only tools it contributes. */ export function SkillDrawer({ open, onOpenChange, skill }: SkillDrawerProps) { const t = useT() return ( }> {t('agent_orchestrator.agentDetail.fields.skills')} {skill?.label ?? t('agent_orchestrator.agentDetail.title')} {skill ?

{skill.id}

: null}
{skill?.description ? (

{skill.description}

) : null} {skill && skill.tools.length ? (
{skill.tools.map((tool) => ( {tool} ))}
) : null}
{skill?.instructions ? ( ) : (

{t('agent_orchestrator.agentDetail.defaultValue')}

)}
) } export default SkillDrawer