Skip to content

Commit dada1c4

Browse files
do not remove form with alert
1 parent fa7f9c8 commit dada1c4

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

client/src/components/ToolsTab.tsx

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,17 +147,11 @@ const ToolsTab = ({
147147
</h3>
148148
</div>
149149
<div className="p-4">
150-
{error ? (
151-
<Alert variant="destructive">
152-
<AlertCircle className="h-4 w-4" />
153-
<AlertTitle>Error</AlertTitle>
154-
<AlertDescription>{error}</AlertDescription>
155-
</Alert>
156-
) : selectedTool ? (
150+
{selectedTool ? (
157151
<div className="space-y-4">
158-
<p className="text-sm text-gray-600">
159-
{selectedTool.description}
160-
</p>
152+
<p className="text-sm text-gray-600">
153+
{selectedTool.description}
154+
</p>
161155
{Object.entries(selectedTool.inputSchema.properties ?? []).map(
162156
([key, value]) => {
163157
const prop = value as JsonSchemaType;
@@ -252,6 +246,13 @@ const ToolsTab = ({
252246
Run Tool
253247
</Button>
254248
{toolResult && renderToolResult()}
249+
{error && (
250+
<Alert variant="destructive">
251+
<AlertCircle className="h-4 w-4" />
252+
<AlertTitle>Error</AlertTitle>
253+
<AlertDescription>{error}</AlertDescription>
254+
</Alert>
255+
)}
255256
</div>
256257
) : (
257258
<Alert>

0 commit comments

Comments
 (0)