@yourgpt/copilot-sdk 2.1.3 → 2.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-VFV5FVVI.js → chunk-37KEHUCE.js} +12 -8
- package/dist/chunk-37KEHUCE.js.map +1 -0
- package/dist/{chunk-DMBFN7KO.js → chunk-7PKGRYHY.js} +16 -5
- package/dist/chunk-7PKGRYHY.js.map +1 -0
- package/dist/{chunk-R6LKHKAI.cjs → chunk-N6VZ7FOW.cjs} +40 -29
- package/dist/chunk-N6VZ7FOW.cjs.map +1 -0
- package/dist/{chunk-WQSK3Z4K.cjs → chunk-OQPRIB73.cjs} +12 -8
- package/dist/chunk-OQPRIB73.cjs.map +1 -0
- package/dist/core/index.cjs +70 -70
- package/dist/core/index.d.cts +16 -5
- package/dist/core/index.d.ts +16 -5
- package/dist/core/index.js +1 -1
- package/dist/react/index.cjs +47 -47
- package/dist/react/index.d.cts +30 -13
- package/dist/react/index.d.ts +30 -13
- package/dist/react/index.js +2 -2
- package/dist/ui/index.cjs +6 -6
- package/dist/ui/index.js +2 -2
- package/package.json +1 -1
- package/dist/chunk-DMBFN7KO.js.map +0 -1
- package/dist/chunk-R6LKHKAI.cjs.map +0 -1
- package/dist/chunk-VFV5FVVI.js.map +0 -1
- package/dist/chunk-WQSK3Z4K.cjs.map +0 -1
|
@@ -1649,6 +1649,10 @@ function getZodEnumValues(schema) {
|
|
|
1649
1649
|
return null;
|
|
1650
1650
|
}
|
|
1651
1651
|
function zodToJsonSchema(schema) {
|
|
1652
|
+
const result = _zodToJsonSchemaInternal(schema);
|
|
1653
|
+
return result;
|
|
1654
|
+
}
|
|
1655
|
+
function _zodToJsonSchemaInternal(schema) {
|
|
1652
1656
|
if (!isZodSchema(schema)) {
|
|
1653
1657
|
return { type: "string" };
|
|
1654
1658
|
}
|
|
@@ -1690,7 +1694,7 @@ function zodToJsonSchema(schema) {
|
|
|
1690
1694
|
const innerType = getZodInnerType(schema);
|
|
1691
1695
|
const result2 = {
|
|
1692
1696
|
type: "array",
|
|
1693
|
-
items: innerType ?
|
|
1697
|
+
items: innerType ? _zodToJsonSchemaInternal(innerType) : { type: "string" }
|
|
1694
1698
|
};
|
|
1695
1699
|
if (description) result2.description = description;
|
|
1696
1700
|
return result2;
|
|
@@ -1703,7 +1707,7 @@ function zodToJsonSchema(schema) {
|
|
|
1703
1707
|
const properties = {};
|
|
1704
1708
|
const required = [];
|
|
1705
1709
|
for (const [key, value] of Object.entries(shapeObj)) {
|
|
1706
|
-
properties[key] =
|
|
1710
|
+
properties[key] = _zodToJsonSchemaInternal(value);
|
|
1707
1711
|
const fieldTypeName = getZodTypeName(value);
|
|
1708
1712
|
if (fieldTypeName !== "ZodOptional" && fieldTypeName !== "ZodNullable") {
|
|
1709
1713
|
required.push(key);
|
|
@@ -1721,14 +1725,14 @@ function zodToJsonSchema(schema) {
|
|
|
1721
1725
|
case "ZodNullable": {
|
|
1722
1726
|
const innerType = getZodInnerType(schema);
|
|
1723
1727
|
if (innerType) {
|
|
1724
|
-
return
|
|
1728
|
+
return _zodToJsonSchemaInternal(innerType);
|
|
1725
1729
|
}
|
|
1726
1730
|
return { type: "string", description };
|
|
1727
1731
|
}
|
|
1728
1732
|
case "ZodDefault": {
|
|
1729
1733
|
const innerType = getZodInnerType(schema);
|
|
1730
1734
|
if (innerType) {
|
|
1731
|
-
const result2 =
|
|
1735
|
+
const result2 = _zodToJsonSchemaInternal(innerType);
|
|
1732
1736
|
return result2;
|
|
1733
1737
|
}
|
|
1734
1738
|
return { type: "string", description };
|
|
@@ -1767,7 +1771,7 @@ function zodToJsonSchema(schema) {
|
|
|
1767
1771
|
options = def?.options;
|
|
1768
1772
|
}
|
|
1769
1773
|
if (options && options.length > 0) {
|
|
1770
|
-
return
|
|
1774
|
+
return _zodToJsonSchemaInternal(options[0]);
|
|
1771
1775
|
}
|
|
1772
1776
|
return { type: "string", description };
|
|
1773
1777
|
}
|
|
@@ -1778,7 +1782,7 @@ function zodToJsonSchema(schema) {
|
|
|
1778
1782
|
}
|
|
1779
1783
|
}
|
|
1780
1784
|
function zodObjectToInputSchema(schema) {
|
|
1781
|
-
const jsonSchema =
|
|
1785
|
+
const jsonSchema = _zodToJsonSchemaInternal(schema);
|
|
1782
1786
|
if (jsonSchema.type !== "object" || !jsonSchema.properties) {
|
|
1783
1787
|
const typeName = getZodTypeName(schema);
|
|
1784
1788
|
throw new Error(
|
|
@@ -2889,5 +2893,5 @@ exports.stopNetworkCapture = stopNetworkCapture;
|
|
|
2889
2893
|
exports.streamSSE = streamSSE;
|
|
2890
2894
|
exports.zodObjectToInputSchema = zodObjectToInputSchema;
|
|
2891
2895
|
exports.zodToJsonSchema = zodToJsonSchema;
|
|
2892
|
-
//# sourceMappingURL=chunk-
|
|
2893
|
-
//# sourceMappingURL=chunk-
|
|
2896
|
+
//# sourceMappingURL=chunk-OQPRIB73.cjs.map
|
|
2897
|
+
//# sourceMappingURL=chunk-OQPRIB73.cjs.map
|