@@ -3,7 +3,12 @@ import { Button } from "@/components/ui/button";
|
|||||||
import { Input } from "@/components/ui/input";
|
import { Input } from "@/components/ui/input";
|
||||||
import { Label } from "@/components/ui/label";
|
import { Label } from "@/components/ui/label";
|
||||||
import { TabsContent } from "@/components/ui/tabs";
|
import { TabsContent } from "@/components/ui/tabs";
|
||||||
import { CallToolResult, ListToolsResult, Tool } from "@modelcontextprotocol/sdk/types.js";
|
import { Textarea } from "@/components/ui/textarea";
|
||||||
|
import {
|
||||||
|
CallToolResult,
|
||||||
|
ListToolsResult,
|
||||||
|
Tool,
|
||||||
|
} from "@modelcontextprotocol/sdk/types.js";
|
||||||
import { AlertCircle, Send } from "lucide-react";
|
import { AlertCircle, Send } from "lucide-react";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import ListPane from "./ListPane";
|
import ListPane from "./ListPane";
|
||||||
@@ -123,24 +128,44 @@ const ToolsTab = ({
|
|||||||
>
|
>
|
||||||
{key}
|
{key}
|
||||||
</Label>
|
</Label>
|
||||||
<Input
|
{
|
||||||
// @ts-expect-error value type is currently unknown
|
/* @ts-expect-error value type is currently unknown */
|
||||||
type={value.type === "number" ? "number" : "text"}
|
value.type === "string" ? (
|
||||||
id={key}
|
<Textarea
|
||||||
name={key}
|
id={key}
|
||||||
// @ts-expect-error value type is currently unknown
|
name={key}
|
||||||
placeholder={value.description}
|
// @ts-expect-error value type is currently unknown
|
||||||
onChange={(e) =>
|
placeholder={value.description}
|
||||||
setParams({
|
onChange={(e) =>
|
||||||
...params,
|
setParams({
|
||||||
[key]:
|
...params,
|
||||||
// @ts-expect-error value type is currently unknown
|
[key]: e.target.value,
|
||||||
value.type === "number"
|
})
|
||||||
? Number(e.target.value)
|
}
|
||||||
: e.target.value,
|
className="mt-1"
|
||||||
})
|
/>
|
||||||
}
|
) : (
|
||||||
/>
|
<Input
|
||||||
|
// @ts-expect-error value type is currently unknown
|
||||||
|
type={value.type === "number" ? "number" : "text"}
|
||||||
|
id={key}
|
||||||
|
name={key}
|
||||||
|
// @ts-expect-error value type is currently unknown
|
||||||
|
placeholder={value.description}
|
||||||
|
onChange={(e) =>
|
||||||
|
setParams({
|
||||||
|
...params,
|
||||||
|
[key]:
|
||||||
|
// @ts-expect-error value type is currently unknown
|
||||||
|
value.type === "number"
|
||||||
|
? Number(e.target.value)
|
||||||
|
: e.target.value,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
className="mt-1"
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
),
|
),
|
||||||
)}
|
)}
|
||||||
|
|||||||
Reference in New Issue
Block a user