We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1b015e commit 50a65d0Copy full SHA for 50a65d0
client/src/components/ToolsTab.tsx
@@ -6,6 +6,7 @@ import { Label } from "@/components/ui/label";
6
import { TabsContent } from "@/components/ui/tabs";
7
import { Textarea } from "@/components/ui/textarea";
8
import DynamicJsonForm, { JsonSchemaType, JsonValue } from "./DynamicJsonForm";
9
+import { generateDefaultValue } from "@/utils/schemaUtils";
10
import {
11
ListToolsResult,
12
Tool,
@@ -215,8 +216,7 @@ const ToolsTab = ({
215
216
items: prop.items,
217
}}
218
value={
- (params[key] as JsonValue) ??
219
- (prop.type === "array" ? [] : {})
+ (params[key] as JsonValue) ?? generateDefaultValue(prop)
220
}
221
onChange={(newValue: JsonValue) => {
222
setParams({
0 commit comments