@copilotkit/react-core 1.10.6-next.2 → 1.10.6-next.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/CHANGELOG.md +16 -0
- package/dist/{chunk-Q3MCVRO3.mjs → chunk-6ESSSQ7Q.mjs} +8 -21
- package/dist/chunk-6ESSSQ7Q.mjs.map +1 -0
- package/dist/{chunk-JMALWN4Z.mjs → chunk-BXXJQ2BL.mjs} +3 -3
- package/dist/{chunk-N3Q6EUTG.mjs → chunk-E3624YDU.mjs} +2 -2
- package/dist/{chunk-CQGHSMOM.mjs → chunk-EDBI5PCJ.mjs} +2 -2
- package/dist/{chunk-KPCLYTU3.mjs → chunk-GGLAHG3I.mjs} +10 -10
- package/dist/{chunk-Z6SYWW3S.mjs → chunk-MIXSWZSB.mjs} +2 -2
- package/dist/{chunk-774NTLIU.mjs → chunk-NSBAWITG.mjs} +3 -3
- package/dist/{chunk-CXXRFRCY.mjs → chunk-OAGAFMUM.mjs} +2 -2
- package/dist/{chunk-GFCDU2YP.mjs → chunk-OT5NHMEC.mjs} +2 -2
- package/dist/components/copilot-provider/copilotkit.js +7 -17
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +6 -6
- package/dist/components/copilot-provider/index.js +7 -17
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +6 -6
- package/dist/components/index.js +7 -17
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +6 -6
- package/dist/hooks/index.js +7 -32
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +12 -12
- package/dist/hooks/use-chat.js +7 -32
- package/dist/hooks/use-chat.js.map +1 -1
- package/dist/hooks/use-chat.mjs +2 -3
- package/dist/hooks/use-coagent.js +7 -32
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +9 -9
- package/dist/hooks/use-copilot-chat-headless_c.js +7 -32
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +9 -9
- package/dist/hooks/use-copilot-chat.js +7 -32
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +9 -9
- package/dist/hooks/use-copilot-chat_internal.js +7 -32
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +8 -8
- package/dist/hooks/use-copilot-runtime-client.js +7 -32
- package/dist/hooks/use-copilot-runtime-client.js.map +1 -1
- package/dist/hooks/use-copilot-runtime-client.mjs +1 -2
- package/dist/hooks/use-langgraph-interrupt.js +7 -32
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +9 -9
- package/dist/index.js +7 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +16 -16
- package/dist/lib/copilot-task.mjs +7 -7
- package/dist/lib/index.mjs +7 -7
- package/dist/utils/extract.mjs +6 -6
- package/dist/utils/index.mjs +9 -9
- package/dist/utils/suggestions.mjs +6 -6
- package/package.json +3 -3
- package/src/hooks/use-copilot-runtime-client.ts +10 -21
- package/dist/chunk-Q3MCVRO3.mjs.map +0 -1
- /package/dist/{chunk-JMALWN4Z.mjs.map → chunk-BXXJQ2BL.mjs.map} +0 -0
- /package/dist/{chunk-N3Q6EUTG.mjs.map → chunk-E3624YDU.mjs.map} +0 -0
- /package/dist/{chunk-CQGHSMOM.mjs.map → chunk-EDBI5PCJ.mjs.map} +0 -0
- /package/dist/{chunk-KPCLYTU3.mjs.map → chunk-GGLAHG3I.mjs.map} +0 -0
- /package/dist/{chunk-Z6SYWW3S.mjs.map → chunk-MIXSWZSB.mjs.map} +0 -0
- /package/dist/{chunk-774NTLIU.mjs.map → chunk-NSBAWITG.mjs.map} +0 -0
- /package/dist/{chunk-CXXRFRCY.mjs.map → chunk-OAGAFMUM.mjs.map} +0 -0
- /package/dist/{chunk-GFCDU2YP.mjs.map → chunk-OT5NHMEC.mjs.map} +0 -0
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
CopilotKit,
|
|
3
3
|
CopilotKitInternal,
|
|
4
4
|
defaultCopilotContextCategories
|
|
5
|
-
} from "../../chunk-
|
|
6
|
-
import "../../chunk-C6IANC2R.mjs";
|
|
7
|
-
import "../../chunk-N4VN2B5S.mjs";
|
|
8
|
-
import "../../chunk-2IDV5OHF.mjs";
|
|
5
|
+
} from "../../chunk-GGLAHG3I.mjs";
|
|
9
6
|
import "../../chunk-DXEQPN43.mjs";
|
|
10
7
|
import "../../chunk-OKCYPO4I.mjs";
|
|
11
8
|
import "../../chunk-PIF5KJYI.mjs";
|
|
9
|
+
import "../../chunk-N4VN2B5S.mjs";
|
|
10
|
+
import "../../chunk-2IDV5OHF.mjs";
|
|
11
|
+
import "../../chunk-C6IANC2R.mjs";
|
|
12
|
+
import "../../chunk-ICIK2BSB.mjs";
|
|
12
13
|
import "../../chunk-RKTVJRK7.mjs";
|
|
13
14
|
import "../../chunk-PMAFHQ7P.mjs";
|
|
14
15
|
import "../../chunk-5FHSUKQL.mjs";
|
|
15
|
-
import "../../chunk-
|
|
16
|
-
import "../../chunk-ICIK2BSB.mjs";
|
|
16
|
+
import "../../chunk-6ESSSQ7Q.mjs";
|
|
17
17
|
import "../../chunk-N4WEHORG.mjs";
|
|
18
18
|
import "../../chunk-O7ARI5CV.mjs";
|
|
19
19
|
import "../../chunk-EFL5OBKN.mjs";
|
|
@@ -1154,15 +1154,10 @@ var useCopilotRuntimeClient = (options) => {
|
|
|
1154
1154
|
const routeError = (gqlError) => {
|
|
1155
1155
|
const extensions = gqlError.extensions;
|
|
1156
1156
|
const visibility = extensions == null ? void 0 : extensions.visibility;
|
|
1157
|
-
const isDev = shouldShowDevConsole(showDevConsole != null ? showDevConsole : false);
|
|
1158
1157
|
if (visibility === import_shared6.ErrorVisibility.SILENT) {
|
|
1159
1158
|
console.error("CopilotKit Silent Error:", gqlError.message);
|
|
1160
1159
|
return;
|
|
1161
1160
|
}
|
|
1162
|
-
if (!isDev) {
|
|
1163
|
-
console.error("CopilotKit Error (hidden in production):", gqlError.message);
|
|
1164
|
-
return;
|
|
1165
|
-
}
|
|
1166
1161
|
const now = Date.now();
|
|
1167
1162
|
const errorMessage = gqlError.message;
|
|
1168
1163
|
if (lastStructuredErrorRef.current && lastStructuredErrorRef.current.message === errorMessage && now - lastStructuredErrorRef.current.timestamp < 150) {
|
|
@@ -1184,17 +1179,12 @@ var useCopilotRuntimeClient = (options) => {
|
|
|
1184
1179
|
};
|
|
1185
1180
|
graphQLErrors.forEach(routeError);
|
|
1186
1181
|
} else {
|
|
1187
|
-
const
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
}
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
code: import_shared6.CopilotKitErrorCode.UNKNOWN
|
|
1194
|
-
});
|
|
1195
|
-
setBannerError(fallbackError);
|
|
1196
|
-
traceUIError(fallbackError, error);
|
|
1197
|
-
}
|
|
1182
|
+
const fallbackError = new import_shared6.CopilotKitError({
|
|
1183
|
+
message: (error == null ? void 0 : error.message) || String(error),
|
|
1184
|
+
code: import_shared6.CopilotKitErrorCode.UNKNOWN
|
|
1185
|
+
});
|
|
1186
|
+
setBannerError(fallbackError);
|
|
1187
|
+
traceUIError(fallbackError, error);
|
|
1198
1188
|
}
|
|
1199
1189
|
},
|
|
1200
1190
|
handleGQLWarning: (message) => {
|
|
@@ -1206,7 +1196,7 @@ var useCopilotRuntimeClient = (options) => {
|
|
|
1206
1196
|
setBannerError(warningError);
|
|
1207
1197
|
}
|
|
1208
1198
|
}));
|
|
1209
|
-
}, [runtimeOptions, setBannerError,
|
|
1199
|
+
}, [runtimeOptions, setBannerError, onError]);
|
|
1210
1200
|
return runtimeClient;
|
|
1211
1201
|
};
|
|
1212
1202
|
function createStructuredError(gqlError) {
|