@copilotkit/react-core 1.57.4 → 1.58.0-canary.thread-id-propagation
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/{copilotkit-CtXcs1ea.cjs → copilotkit-B4ouY7qC.cjs} +14 -3
- package/dist/copilotkit-B4ouY7qC.cjs.map +1 -0
- package/dist/copilotkit-BK9CVq9A.d.cts.map +1 -1
- package/dist/{copilotkit-CC8DjOiC.mjs → copilotkit-L4mM_JqG.mjs} +14 -3
- package/dist/copilotkit-L4mM_JqG.mjs.map +1 -0
- package/dist/copilotkit-WlmeVijs.d.mts.map +1 -1
- package/dist/index.cjs +3 -77
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -77
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +15 -78
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/headless.cjs +11 -0
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/headless.d.mts.map +1 -1
- package/dist/v2/headless.mjs +11 -0
- package/dist/v2/headless.mjs.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/index.umd.js +13 -2
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +6 -6
- package/dist/copilotkit-CC8DjOiC.mjs.map +0 -1
- package/dist/copilotkit-CtXcs1ea.cjs.map +0 -1
|
@@ -2127,7 +2127,7 @@ const MCPAppsActivityContentSchema = zod.z.object({
|
|
|
2127
2127
|
resourceUri: zod.z.string(),
|
|
2128
2128
|
serverHash: zod.z.string(),
|
|
2129
2129
|
serverId: zod.z.string().optional(),
|
|
2130
|
-
toolInput: zod.z.record(zod.z.unknown()).optional()
|
|
2130
|
+
toolInput: zod.z.record(zod.z.string(), zod.z.unknown()).optional()
|
|
2131
2131
|
});
|
|
2132
2132
|
function isRequest(msg) {
|
|
2133
2133
|
return "id" in msg && "method" in msg;
|
|
@@ -4159,6 +4159,17 @@ function useAgent({ agentId, updates, throttleMs } = {}) {
|
|
|
4159
4159
|
(0, react.useEffect)(() => {
|
|
4160
4160
|
if (agent instanceof _ag_ui_client.HttpAgent) agent.headers = { ...copilotkit.headers };
|
|
4161
4161
|
}, [agent, JSON.stringify(copilotkit.headers)]);
|
|
4162
|
+
const chatConfig = useCopilotChatConfiguration();
|
|
4163
|
+
const configThreadId = chatConfig?.threadId;
|
|
4164
|
+
const configHasExplicitThreadId = chatConfig?.hasExplicitThreadId;
|
|
4165
|
+
(0, react.useEffect)(() => {
|
|
4166
|
+
if (!configHasExplicitThreadId || !configThreadId) return;
|
|
4167
|
+
agent.threadId = configThreadId;
|
|
4168
|
+
}, [
|
|
4169
|
+
agent,
|
|
4170
|
+
configThreadId,
|
|
4171
|
+
configHasExplicitThreadId
|
|
4172
|
+
]);
|
|
4162
4173
|
return { agent };
|
|
4163
4174
|
}
|
|
4164
4175
|
|
|
@@ -8789,7 +8800,7 @@ const getErrorActions = (error) => {
|
|
|
8789
8800
|
switch (error.code) {
|
|
8790
8801
|
case _copilotkit_shared.CopilotKitErrorCode.MISSING_PUBLIC_API_KEY_ERROR: return { primary: {
|
|
8791
8802
|
label: "Show me how",
|
|
8792
|
-
onClick: () => window.open("https://docs.copilotkit.ai/premium#
|
|
8803
|
+
onClick: () => window.open("https://docs.copilotkit.ai/premium/overview#getting-access", "_blank", "noopener,noreferrer")
|
|
8793
8804
|
} };
|
|
8794
8805
|
case _copilotkit_shared.CopilotKitErrorCode.UPGRADE_REQUIRED_ERROR: return { primary: {
|
|
8795
8806
|
label: "Upgrade",
|
|
@@ -10426,4 +10437,4 @@ Object.defineProperty(exports, 'useToast', {
|
|
|
10426
10437
|
return useToast;
|
|
10427
10438
|
}
|
|
10428
10439
|
});
|
|
10429
|
-
//# sourceMappingURL=copilotkit-
|
|
10440
|
+
//# sourceMappingURL=copilotkit-B4ouY7qC.cjs.map
|