@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
|
@@ -1647,6 +1647,10 @@ function getZodEnumValues(schema) {
|
|
|
1647
1647
|
return null;
|
|
1648
1648
|
}
|
|
1649
1649
|
function zodToJsonSchema(schema) {
|
|
1650
|
+
const result = _zodToJsonSchemaInternal(schema);
|
|
1651
|
+
return result;
|
|
1652
|
+
}
|
|
1653
|
+
function _zodToJsonSchemaInternal(schema) {
|
|
1650
1654
|
if (!isZodSchema(schema)) {
|
|
1651
1655
|
return { type: "string" };
|
|
1652
1656
|
}
|
|
@@ -1688,7 +1692,7 @@ function zodToJsonSchema(schema) {
|
|
|
1688
1692
|
const innerType = getZodInnerType(schema);
|
|
1689
1693
|
const result2 = {
|
|
1690
1694
|
type: "array",
|
|
1691
|
-
items: innerType ?
|
|
1695
|
+
items: innerType ? _zodToJsonSchemaInternal(innerType) : { type: "string" }
|
|
1692
1696
|
};
|
|
1693
1697
|
if (description) result2.description = description;
|
|
1694
1698
|
return result2;
|
|
@@ -1701,7 +1705,7 @@ function zodToJsonSchema(schema) {
|
|
|
1701
1705
|
const properties = {};
|
|
1702
1706
|
const required = [];
|
|
1703
1707
|
for (const [key, value] of Object.entries(shapeObj)) {
|
|
1704
|
-
properties[key] =
|
|
1708
|
+
properties[key] = _zodToJsonSchemaInternal(value);
|
|
1705
1709
|
const fieldTypeName = getZodTypeName(value);
|
|
1706
1710
|
if (fieldTypeName !== "ZodOptional" && fieldTypeName !== "ZodNullable") {
|
|
1707
1711
|
required.push(key);
|
|
@@ -1719,14 +1723,14 @@ function zodToJsonSchema(schema) {
|
|
|
1719
1723
|
case "ZodNullable": {
|
|
1720
1724
|
const innerType = getZodInnerType(schema);
|
|
1721
1725
|
if (innerType) {
|
|
1722
|
-
return
|
|
1726
|
+
return _zodToJsonSchemaInternal(innerType);
|
|
1723
1727
|
}
|
|
1724
1728
|
return { type: "string", description };
|
|
1725
1729
|
}
|
|
1726
1730
|
case "ZodDefault": {
|
|
1727
1731
|
const innerType = getZodInnerType(schema);
|
|
1728
1732
|
if (innerType) {
|
|
1729
|
-
const result2 =
|
|
1733
|
+
const result2 = _zodToJsonSchemaInternal(innerType);
|
|
1730
1734
|
return result2;
|
|
1731
1735
|
}
|
|
1732
1736
|
return { type: "string", description };
|
|
@@ -1765,7 +1769,7 @@ function zodToJsonSchema(schema) {
|
|
|
1765
1769
|
options = def?.options;
|
|
1766
1770
|
}
|
|
1767
1771
|
if (options && options.length > 0) {
|
|
1768
|
-
return
|
|
1772
|
+
return _zodToJsonSchemaInternal(options[0]);
|
|
1769
1773
|
}
|
|
1770
1774
|
return { type: "string", description };
|
|
1771
1775
|
}
|
|
@@ -1776,7 +1780,7 @@ function zodToJsonSchema(schema) {
|
|
|
1776
1780
|
}
|
|
1777
1781
|
}
|
|
1778
1782
|
function zodObjectToInputSchema(schema) {
|
|
1779
|
-
const jsonSchema =
|
|
1783
|
+
const jsonSchema = _zodToJsonSchemaInternal(schema);
|
|
1780
1784
|
if (jsonSchema.type !== "object" || !jsonSchema.properties) {
|
|
1781
1785
|
const typeName = getZodTypeName(schema);
|
|
1782
1786
|
throw new Error(
|
|
@@ -2818,5 +2822,5 @@ function createThreadManager(config, callbacks) {
|
|
|
2818
2822
|
}
|
|
2819
2823
|
|
|
2820
2824
|
export { CLOUD_MAX_FILE_SIZE, DEFAULT_YOURGPT_ENDPOINT, SimpleThreadManagerState, ThreadManager, actionToTool, builtinTools, captureCurrentLogs, captureScreenshot, clearConsoleLogs, clearNetworkRequests, consoleLogsTool, createAssistantMessage, createCloudStorage, createConsoleLogsTool, createCustomDetector, createLocalStorageAdapter, createMemoryAdapter, createMessage, createNetworkRequestsTool, createSSEStream, createScreenshotTool, createServerAdapter, createThreadManager, createToolCall, createToolMessage, createUserMessage, defaultSystemMessage, defineClientTool, defineServerTool, defineTool, detectIntent, formatLogsForAI, formatRequestsForAI, formatSSE, generateId, generateMessageId, generateSuggestionReason, generateThreadId, generateThreadTitle, generateToolCallId, getAttachmentTypeFromMime, getConsoleErrors, getConsoleLogs, getConsoleWarnings, getFailedRequests, getNetworkRequests, getPrimaryTool, hasToolCalls, hasToolSuggestions, isConsoleCaptureActive, isNetworkCaptureActive, isScreenshotSupported, isToolResult, localStorageAdapter, networkRequestsTool, noopAdapter, parseSSELine, parseStreamEvent, parseToolCallArgs, processFileToAttachment, resizeScreenshot, screenshotTool, serializeStreamEvent, startConsoleCapture, startNetworkCapture, stopConsoleCapture, stopNetworkCapture, streamSSE, zodObjectToInputSchema, zodToJsonSchema };
|
|
2821
|
-
//# sourceMappingURL=chunk-
|
|
2822
|
-
//# sourceMappingURL=chunk-
|
|
2825
|
+
//# sourceMappingURL=chunk-37KEHUCE.js.map
|
|
2826
|
+
//# sourceMappingURL=chunk-37KEHUCE.js.map
|