import { Button, Divider, Group, Stack, Text } 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; title?: 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, title, description, annotations, schema, formValues, isExecuting, progress, onFormChange, onExecute, onCancel, }: ToolDetailPanelProps) { const hasAnnotations = annotations && (annotations.audience || annotations.readOnly || annotations.destructive || annotations.longRunning || annotations.hints); return ( {title ?? name} {title && ( {name} )} {hasAnnotations && ( {annotations.audience && ( )} {annotations.readOnly && ( )} {annotations.destructive && ( )} {annotations.longRunning && ( )} {annotations.hints && ( {annotations.hints} )} )} {description && ( {description} )} {progress && ( )} {isExecuting && ( )} ); }