Skip to content

Commit 0950557

Browse files
committed
fix spacing
1 parent c88dee9 commit 0950557

File tree

1 file changed

+18
-18
lines changed

1 file changed

+18
-18
lines changed

modelcontextprotocol/lib/registerComponentTools.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,26 +80,26 @@ export async function registerComponentTools({
8080
continue
8181
} else if (cp.type === "string") {
8282
if (
83-
cp.options &&
84-
Array.isArray(cp.options) &&
85-
cp.options.length > 0 &&
86-
cp.options.some((o) => typeof o === "string")
87-
) {
88-
schema[cp.name] = z.enum(cp.options)
89-
} else {
90-
schema[cp.name] = z.string()
91-
}
83+
cp.options &&
84+
Array.isArray(cp.options) &&
85+
cp.options.length > 0 &&
86+
cp.options.some((o) => typeof o === "string")
87+
) {
88+
schema[cp.name] = z.enum(cp.options)
89+
} else {
90+
schema[cp.name] = z.string()
91+
}
9292
} else if (cp.type === "string[]") {
9393
if (
94-
cp.options &&
95-
Array.isArray(cp.options) &&
96-
cp.options.length > 0 &&
97-
cp.options.some((o) => o.value != null)
98-
) {
99-
schema[cp.name] = z.array(z.enum(cp.options.map((o) => o.value)))
100-
} else {
101-
schema[cp.name] = z.array(z.string())
102-
}
94+
cp.options &&
95+
Array.isArray(cp.options) &&
96+
cp.options.length > 0 &&
97+
cp.options.some((o) => o.value != null)
98+
) {
99+
schema[cp.name] = z.array(z.enum(cp.options.map((o) => o.value)))
100+
} else {
101+
schema[cp.name] = z.array(z.string())
102+
}
103103
configurablePropsDescription += `- ${cp.name}: Return JSON in this format: string[]\n`
104104
} else if (cp.type === "number") {
105105
schema[cp.name] = z.number()

0 commit comments

Comments
 (0)