@copilotkit/react-core 1.59.0 → 1.59.1
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-BK9CVq9A.d.cts.map +1 -1
- package/dist/{copilotkit-L4mM_JqG.mjs → copilotkit-CDK5ny-e.mjs} +8 -5
- package/dist/copilotkit-CDK5ny-e.mjs.map +1 -0
- package/dist/{copilotkit-B4ouY7qC.cjs → copilotkit-DKPrBplZ.cjs} +8 -5
- package/dist/copilotkit-DKPrBplZ.cjs.map +1 -0
- package/dist/copilotkit-WlmeVijs.d.mts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.umd.js +4 -1
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/index.umd.js +7 -4
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +6 -6
- package/dist/copilotkit-B4ouY7qC.cjs.map +0 -1
- package/dist/copilotkit-L4mM_JqG.mjs.map +0 -1
|
@@ -3450,6 +3450,9 @@ function A2UICatalogContext({ catalog, includeSchema }) {
|
|
|
3450
3450
|
//#region src/v2/providers/CopilotKitProvider.tsx
|
|
3451
3451
|
const HEADER_NAME = "X-CopilotCloud-Public-Api-Key";
|
|
3452
3452
|
const COPILOT_CLOUD_CHAT_URL$1 = "https://api.cloud.copilotkit.ai/copilotkit/v1";
|
|
3453
|
+
const EMPTY_HEADERS = Object.freeze({});
|
|
3454
|
+
const EMPTY_PROPERTIES = Object.freeze({});
|
|
3455
|
+
const EMPTY_AGENTS = Object.freeze({});
|
|
3453
3456
|
const DEFAULT_DESIGN_SKILL = `When generating UI with generateSandboxedUi, follow these design principles inspired by shadcn/ui:
|
|
3454
3457
|
|
|
3455
3458
|
- Use a minimal, flat aesthetic. Avoid drop shadows and gradients — rely on subtle borders (1px solid, light gray like #e5e7eb) to define surfaces.
|
|
@@ -3470,7 +3473,7 @@ function useStableArrayProp(prop, warningMessage, isMeaningfulChange) {
|
|
|
3470
3473
|
}, [value, warningMessage]);
|
|
3471
3474
|
return value;
|
|
3472
3475
|
}
|
|
3473
|
-
const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp =
|
|
3476
|
+
const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, publicApiKey, publicLicenseKey, licenseToken, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, frontendTools, humanInTheLoop, openGenerativeUI, showDevConsole = false, useSingleEndpoint, onError, a2ui, defaultThrottleMs, inspectorDefaultAnchor, debug }) => {
|
|
3474
3477
|
const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
|
|
3475
3478
|
const [runtimeA2UIEnabled, setRuntimeA2UIEnabled] = (0, react.useState)(false);
|
|
3476
3479
|
const [runtimeOpenGenUIEnabled, setRuntimeOpenGenUIEnabled] = (0, react.useState)(false);
|
|
@@ -7056,14 +7059,14 @@ function CopilotChat({ agentId, threadId, labels, chatView, isModalDefaultOpen,
|
|
|
7056
7059
|
const [lastConnectedThreadId, setLastConnectedThreadId] = (0, react.useState)(null);
|
|
7057
7060
|
const isConnecting = hasExplicitThreadId && lastConnectedThreadId !== resolvedThreadId;
|
|
7058
7061
|
(0, react.useEffect)(() => {
|
|
7062
|
+
agent.threadId = resolvedThreadId;
|
|
7059
7063
|
if (!hasExplicitThreadId) return;
|
|
7060
7064
|
let detached = false;
|
|
7061
7065
|
const connectAbortController = new AbortController();
|
|
7062
7066
|
if (agent instanceof _ag_ui_client.HttpAgent) agent.abortController = connectAbortController;
|
|
7063
|
-
|
|
7064
|
-
const connect = async (agent) => {
|
|
7067
|
+
const connect = async (agentToConnect) => {
|
|
7065
7068
|
try {
|
|
7066
|
-
await copilotkit.connectAgent({ agent });
|
|
7069
|
+
await copilotkit.connectAgent({ agent: agentToConnect });
|
|
7067
7070
|
} catch (error) {
|
|
7068
7071
|
if (detached) return;
|
|
7069
7072
|
console.error("CopilotChat: connectAgent failed", error);
|
|
@@ -10437,4 +10440,4 @@ Object.defineProperty(exports, 'useToast', {
|
|
|
10437
10440
|
return useToast;
|
|
10438
10441
|
}
|
|
10439
10442
|
});
|
|
10440
|
-
//# sourceMappingURL=copilotkit-
|
|
10443
|
+
//# sourceMappingURL=copilotkit-DKPrBplZ.cjs.map
|