import { Button, Divider, Group, Stack, Text, Title } from '@mantine/core' import { AnnotationBadge } from '../../atoms/AnnotationBadge/AnnotationBadge' import { ProgressDisplay } from '../../atoms/ProgressDisplay/ProgressDisplay' import { SchemaForm } from '../SchemaForm/SchemaForm' import type { JsonSchema } from '../SchemaForm/SchemaForm' export interface ToolAnnotations { audience?: string readOnly?: boolean destructive?: boolean longRunning?: boolean hints?: string } export interface ToolDetailPanelProps { name: string description?: string annotations?: ToolAnnotations schema: JsonSchema formValues: Record isExecuting: boolean progress?: { percent: number; description?: string } onFormChange: (values: Record) => void onExecute: () => void onCancel: () => void } export function ToolDetailPanel({ name, description, annotations, schema, formValues, isExecuting, progress, onFormChange, onExecute, onCancel, }: ToolDetailPanelProps) { const hasAnnotations = annotations && (annotations.audience || annotations.readOnly || annotations.destructive || annotations.longRunning || annotations.hints) return ( Tool: {name} {description && ( {description} )} {hasAnnotations && ( <> Annotations: {annotations.audience && ( )} {annotations.readOnly && } {annotations.destructive && ( )} {annotations.longRunning && } {annotations.hints && ( {annotations.hints} )} )} {progress && } {isExecuting && ( )} ) }