@@ -3,7 +3,12 @@ import { Button } from "@/components/ui/button";
33import { Input } from "@/components/ui/input" ;
44import { Label } from "@/components/ui/label" ;
55import { TabsContent } from "@/components/ui/tabs" ;
6- import { CallToolResult , ListToolsResult , Tool } from "@modelcontextprotocol/sdk/types.js" ;
6+ import { Textarea } from "@/components/ui/textarea" ;
7+ import {
8+ CallToolResult ,
9+ ListToolsResult ,
10+ Tool ,
11+ } from "@modelcontextprotocol/sdk/types.js" ;
712import { AlertCircle , Send } from "lucide-react" ;
813import { useState } from "react" ;
914import ListPane from "./ListPane" ;
@@ -123,24 +128,44 @@ const ToolsTab = ({
123128 >
124129 { key }
125130 </ Label >
126- < Input
127- // @ts -expect-error value type is currently unknown
128- type = { value . type === "number" ? "number" : "text" }
129- id = { key }
130- name = { key }
131- // @ts -expect-error value type is currently unknown
132- placeholder = { value . description }
133- onChange = { ( e ) =>
134- setParams ( {
135- ...params ,
136- [ key ] :
137- // @ts -expect-error value type is currently unknown
138- value . type === "number"
139- ? Number ( e . target . value )
140- : e . target . value ,
141- } )
142- }
143- />
131+ {
132+ /* @ts -expect-error value type is currently unknown */
133+ value . type === "string" ? (
134+ < Textarea
135+ id = { key }
136+ name = { key }
137+ // @ts -expect-error value type is currently unknown
138+ placeholder = { value . description }
139+ onChange = { ( e ) =>
140+ setParams ( {
141+ ...params ,
142+ [ key ] : e . target . value ,
143+ } )
144+ }
145+ className = "mt-1"
146+ />
147+ ) : (
148+ < Input
149+ // @ts -expect-error value type is currently unknown
150+ type = { value . type === "number" ? "number" : "text" }
151+ id = { key }
152+ name = { key }
153+ // @ts -expect-error value type is currently unknown
154+ placeholder = { value . description }
155+ onChange = { ( e ) =>
156+ setParams ( {
157+ ...params ,
158+ [ key ] :
159+ // @ts -expect-error value type is currently unknown
160+ value . type === "number"
161+ ? Number ( e . target . value )
162+ : e . target . value ,
163+ } )
164+ }
165+ className = "mt-1"
166+ />
167+ )
168+ }
144169 </ div >
145170 ) ,
146171 ) }
0 commit comments