do not remove form with alert

This commit is contained in:
NicolasMontone
2025-04-01 10:59:30 -03:00
parent fa7f9c80cd
commit dada1c4ba6

View File

@@ -147,17 +147,11 @@ const ToolsTab = ({
</h3>
</div>
<div className="p-4">
{error ? (
<Alert variant="destructive">
<AlertCircle className="h-4 w-4" />
<AlertTitle>Error</AlertTitle>
<AlertDescription>{error}</AlertDescription>
</Alert>
) : selectedTool ? (
{selectedTool ? (
<div className="space-y-4">
<p className="text-sm text-gray-600">
{selectedTool.description}
</p>
<p className="text-sm text-gray-600">
{selectedTool.description}
</p>
{Object.entries(selectedTool.inputSchema.properties ?? []).map(
([key, value]) => {
const prop = value as JsonSchemaType;
@@ -252,6 +246,13 @@ const ToolsTab = ({
Run Tool
</Button>
{toolResult && renderToolResult()}
{error && (
<Alert variant="destructive">
<AlertCircle className="h-4 w-4" />
<AlertTitle>Error</AlertTitle>
<AlertDescription>{error}</AlertDescription>
</Alert>
)}
</div>
) : (
<Alert>