@copilotkit/react-core 1.63.2 → 1.63.3-canary.rc-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-BE1n5tSI.d.mts.map +1 -1
- package/dist/copilotkit-CXvuYw_F.d.cts.map +1 -1
- package/dist/{copilotkit-CN2JVeH3.mjs → copilotkit-DL0LvmwQ.mjs} +69 -65
- package/dist/copilotkit-DL0LvmwQ.mjs.map +1 -0
- package/dist/{copilotkit-DDVfoiRM.cjs → copilotkit-rYTwMndy.cjs} +71 -67
- package/dist/copilotkit-rYTwMndy.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.umd.js +5 -48
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/headless.cjs +79 -45
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.d.cts +30 -2
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/headless.d.mts +19 -3
- package/dist/v2/headless.d.mts.map +1 -1
- package/dist/v2/headless.mjs +83 -57
- 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 +70 -66
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +7 -7
- package/dist/copilotkit-CN2JVeH3.mjs.map +0 -1
- package/dist/copilotkit-DDVfoiRM.cjs.map +0 -1
package/dist/index.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
-
const require_copilotkit = require('./copilotkit-
|
|
4
|
+
const require_copilotkit = require('./copilotkit-rYTwMndy.cjs');
|
|
5
5
|
let react = require("react");
|
|
6
6
|
react = require_copilotkit.__toESM(react);
|
|
7
7
|
let _copilotkit_core = require("@copilotkit/core");
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
|
-
import { Tt as useCopilotKit, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, a as ThreadsProvider, c as CoAgentStateRendersProvider, ct as useRenderCustomMessages, d as shouldShowDevConsole, f as useToast, g as useCopilotContext, h as CopilotContext, i as ThreadsContext, jt as useCopilotChatConfiguration, l as useCoAgentStateRenders, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, nt as useHumanInTheLoop$1, o as useThreads, ot as useFrontendTool$1, p as CopilotMessagesContext, r as CoAgentStateRenderBridge, s as CoAgentStateRendersContext, t as CopilotKit, tt as useAgent, u as useAsyncCallback, ut as defineToolCallRenderer, wt as useRenderToolCall$1 } from "./copilotkit-
|
|
3
|
+
import { Tt as useCopilotKit, X as useConfigureSuggestions, Y as useInterrupt, Z as useSuggestions, a as ThreadsProvider, c as CoAgentStateRendersProvider, ct as useRenderCustomMessages, d as shouldShowDevConsole, f as useToast, g as useCopilotContext, h as CopilotContext, i as ThreadsContext, jt as useCopilotChatConfiguration, l as useCoAgentStateRenders, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, nt as useHumanInTheLoop$1, o as useThreads, ot as useFrontendTool$1, p as CopilotMessagesContext, r as CoAgentStateRenderBridge, s as CoAgentStateRendersContext, t as CopilotKit, tt as useAgent, u as useAsyncCallback, ut as defineToolCallRenderer, wt as useRenderToolCall$1 } from "./copilotkit-DL0LvmwQ.mjs";
|
|
4
4
|
import React, { Fragment, createElement, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
|
|
5
5
|
import { CopilotKitCoreRuntimeConnectionStatus, ToolCallStatus } from "@copilotkit/core";
|
|
6
6
|
import { AGUIConnectNotImplementedError, HttpAgent } from "@ag-ui/client";
|
package/dist/index.umd.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
|
|
3
3
|
(function(global, factory) {
|
|
4
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@copilotkit/core'), require('@ag-ui/client'), require('
|
|
5
|
-
typeof define === 'function' && define.amd ? define(['exports', 'react', '@copilotkit/core', '@ag-ui/client', '
|
|
6
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CopilotKitReactCore = {}), global.React,global.CopilotKitCore,global.AgUIClient,global.
|
|
7
|
-
})(this, function(exports, react, _copilotkit_core, _ag_ui_client,
|
|
4
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('react'), require('@copilotkit/core'), require('@ag-ui/client'), require('@copilotkit/shared'), require('react/jsx-runtime'), require('zod'), require('@lit-labs/react'), require('@copilotkit/a2ui-renderer'), require('zod-to-json-schema'), require('react-dom'), require('react-markdown'), require('@copilotkit/runtime-client-gql')) :
|
|
5
|
+
typeof define === 'function' && define.amd ? define(['exports', 'react', '@copilotkit/core', '@ag-ui/client', '@copilotkit/shared', 'react/jsx-runtime', 'zod', '@lit-labs/react', '@copilotkit/a2ui-renderer', 'zod-to-json-schema', 'react-dom', 'react-markdown', '@copilotkit/runtime-client-gql'], factory) :
|
|
6
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.CopilotKitReactCore = {}), global.React,global.CopilotKitCore,global.AgUIClient,global.CopilotKitShared,global.ReactJsxRuntime,global.Zod,global._lit_labs_react,global.CopilotKitA2UIRenderer,global.zod_to_json_schema,global.ReactDOM,global.ReactMarkdown,global.CopilotKitRuntimeClientGQL));
|
|
7
|
+
})(this, function(exports, react, _copilotkit_core, _ag_ui_client, _copilotkit_shared, react_jsx_runtime, zod, _lit_labs_react, _copilotkit_a2ui_renderer, zod_to_json_schema, react_dom, react_markdown, _copilotkit_runtime_client_gql) {
|
|
8
8
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
9
9
|
//#region \0rolldown/runtime.js
|
|
10
10
|
var __create = Object.create;
|
|
@@ -36,7 +36,7 @@ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
|
36
36
|
react = __toESM(react);
|
|
37
37
|
react_markdown = __toESM(react_markdown);
|
|
38
38
|
|
|
39
|
-
//#region src/v2/lib/
|
|
39
|
+
//#region src/v2/lib/shallow-stable-ref.ts
|
|
40
40
|
/**
|
|
41
41
|
* Shallow equality comparison for objects.
|
|
42
42
|
*/
|
|
@@ -76,49 +76,6 @@ react_markdown = __toESM(react_markdown);
|
|
|
76
76
|
ref.current = value;
|
|
77
77
|
return ref.current;
|
|
78
78
|
}
|
|
79
|
-
/**
|
|
80
|
-
* Check if a value is a React component type (function, class, forwardRef, memo, etc.)
|
|
81
|
-
*/
|
|
82
|
-
function isReactComponentType(value) {
|
|
83
|
-
if (typeof value === "function") return true;
|
|
84
|
-
if (value && typeof value === "object" && "$$typeof" in value && !react.default.isValidElement(value)) return true;
|
|
85
|
-
return false;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Internal function to render a slot value as a React element (non-memoized).
|
|
89
|
-
*/
|
|
90
|
-
function renderSlotElement(slot, DefaultComponent, props) {
|
|
91
|
-
if (typeof slot === "string") {
|
|
92
|
-
const existingClassName = props.className;
|
|
93
|
-
return react.default.createElement(DefaultComponent, {
|
|
94
|
-
...props,
|
|
95
|
-
className: (0, tailwind_merge.twMerge)(existingClassName, slot)
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
if (isReactComponentType(slot)) return react.default.createElement(slot, props);
|
|
99
|
-
if (slot && typeof slot === "object" && !react.default.isValidElement(slot)) return react.default.createElement(DefaultComponent, {
|
|
100
|
-
...props,
|
|
101
|
-
...slot
|
|
102
|
-
});
|
|
103
|
-
return react.default.createElement(DefaultComponent, props);
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* Internal memoized wrapper component for renderSlot.
|
|
107
|
-
* Uses forwardRef to support ref forwarding.
|
|
108
|
-
*/
|
|
109
|
-
const MemoizedSlotWrapper = react.default.memo(react.default.forwardRef(function MemoizedSlotWrapper(props, ref) {
|
|
110
|
-
const { $slot, $component, ...rest } = props;
|
|
111
|
-
return renderSlotElement($slot, $component, ref !== null ? {
|
|
112
|
-
...rest,
|
|
113
|
-
ref
|
|
114
|
-
} : rest);
|
|
115
|
-
}), (prev, next) => {
|
|
116
|
-
if (prev.$slot !== next.$slot) return false;
|
|
117
|
-
if (prev.$component !== next.$component) return false;
|
|
118
|
-
const { $slot: _ps, $component: _pc, ...prevRest } = prev;
|
|
119
|
-
const { $slot: _ns, $component: _nc, ...nextRest } = next;
|
|
120
|
-
return shallowEqual(prevRest, nextRest);
|
|
121
|
-
});
|
|
122
79
|
|
|
123
80
|
//#endregion
|
|
124
81
|
//#region src/v2/providers/CopilotChatConfigurationProvider.tsx
|