Spaces:
Sleeping
Sleeping
fix(tools): increase limits on input sizes
Browse files
src/lib/server/tools/index.ts
CHANGED
|
@@ -36,23 +36,23 @@ const IOType = z.union([z.literal("str"), z.literal("int"), z.literal("float"),
|
|
| 36 |
|
| 37 |
const toolInputBaseSchema = z.union([
|
| 38 |
z.object({
|
| 39 |
-
name: z.string().min(1).max(
|
| 40 |
-
description: z.string().max(
|
| 41 |
paramType: z.literal("required"),
|
| 42 |
}),
|
| 43 |
z.object({
|
| 44 |
-
name: z.string().min(1).max(
|
| 45 |
-
description: z.string().max(
|
| 46 |
paramType: z.literal("optional"),
|
| 47 |
default: z
|
| 48 |
-
.union([z.string().max(
|
| 49 |
.transform((val) => (val === undefined ? "" : val)),
|
| 50 |
}),
|
| 51 |
z.object({
|
| 52 |
-
name: z.string().min(1).max(
|
| 53 |
paramType: z.literal("fixed"),
|
| 54 |
value: z
|
| 55 |
-
.union([z.string().max(
|
| 56 |
.transform((val) => (val === undefined ? "" : val)),
|
| 57 |
}),
|
| 58 |
]);
|
|
|
|
| 36 |
|
| 37 |
const toolInputBaseSchema = z.union([
|
| 38 |
z.object({
|
| 39 |
+
name: z.string().min(1).max(80),
|
| 40 |
+
description: z.string().max(200).optional(),
|
| 41 |
paramType: z.literal("required"),
|
| 42 |
}),
|
| 43 |
z.object({
|
| 44 |
+
name: z.string().min(1).max(80),
|
| 45 |
+
description: z.string().max(200).optional(),
|
| 46 |
paramType: z.literal("optional"),
|
| 47 |
default: z
|
| 48 |
+
.union([z.string().max(120), z.number(), z.boolean(), z.undefined()])
|
| 49 |
.transform((val) => (val === undefined ? "" : val)),
|
| 50 |
}),
|
| 51 |
z.object({
|
| 52 |
+
name: z.string().min(1).max(80),
|
| 53 |
paramType: z.literal("fixed"),
|
| 54 |
value: z
|
| 55 |
+
.union([z.string().max(120), z.number(), z.boolean(), z.undefined()])
|
| 56 |
.transform((val) => (val === undefined ? "" : val)),
|
| 57 |
}),
|
| 58 |
]);
|