@copilotkit/react-core 1.72.1-canary.sp-longthread-perf → 1.73.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-D5fPO8hJ.d.cts → copilotkit-C7c_w9iV.d.cts} +88 -9
- package/dist/copilotkit-C7c_w9iV.d.cts.map +1 -0
- package/dist/{copilotkit-BRPxLJnI.d.mts → copilotkit-CfyJ1-Nx.d.mts} +88 -9
- package/dist/copilotkit-CfyJ1-Nx.d.mts.map +1 -0
- package/dist/{copilotkit-B2TZRWwp.mjs → copilotkit-CwVE-0JG.mjs} +154 -99
- package/dist/copilotkit-CwVE-0JG.mjs.map +1 -0
- package/dist/{copilotkit-BV7MguMm.cjs → copilotkit-D_c2dJ9t.cjs} +156 -95
- package/dist/copilotkit-D_c2dJ9t.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- 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 +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +8 -2
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/headless.cjs +101 -2
- package/dist/v2/headless.cjs.map +1 -1
- package/dist/v2/headless.d.cts +53 -1
- package/dist/v2/headless.d.cts.map +1 -1
- package/dist/v2/headless.d.mts +53 -1
- package/dist/v2/headless.d.mts.map +1 -1
- package/dist/v2/headless.mjs +101 -3
- package/dist/v2/headless.mjs.map +1 -1
- package/dist/v2/index.cjs +1285 -55
- package/dist/v2/index.d.cts +2 -4
- package/dist/v2/index.d.mts +2 -4
- package/dist/v2/index.mjs +2 -6
- package/dist/v2/index.umd.js +1439 -155
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +13 -12
- package/dist/copilotkit-B2TZRWwp.mjs.map +0 -1
- package/dist/copilotkit-BRPxLJnI.d.mts.map +0 -1
- package/dist/copilotkit-BV7MguMm.cjs.map +0 -1
- package/dist/copilotkit-D5fPO8hJ.d.cts.map +0 -1
package/dist/index.umd.js
CHANGED
|
@@ -2211,7 +2211,7 @@ react_markdown = __toESM(react_markdown);
|
|
|
2211
2211
|
}, [value, warningMessage]);
|
|
2212
2212
|
return value;
|
|
2213
2213
|
}
|
|
2214
|
-
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, enableInspector, agentId, useSingleEndpoint, onError, a2ui, defaultThrottleMs, debug }) => {
|
|
2214
|
+
const CopilotKitProvider = ({ children, runtimeUrl, headers: headersProp = EMPTY_HEADERS, credentials, messageFilter, publicApiKey, publicLicenseKey, licenseToken, properties = EMPTY_PROPERTIES, agents__unsafe_dev_only: agents = EMPTY_AGENTS, selfManagedAgents = EMPTY_AGENTS, renderToolCalls, renderActivityMessages, renderCustomMessages, frontendTools, humanInTheLoop, openGenerativeUI, enableInspector, agentId, useSingleEndpoint, onError, a2ui, defaultThrottleMs, debug }) => {
|
|
2215
2215
|
const [shouldRenderInspector, setShouldRenderInspector] = (0, react.useState)(false);
|
|
2216
2216
|
const [inspectorVisible, setInspectorVisible] = (0, react.useState)(false);
|
|
2217
2217
|
(0, react.useEffect)(() => {
|
|
@@ -2332,6 +2332,7 @@ react_markdown = __toESM(react_markdown);
|
|
|
2332
2332
|
const processedRenderToolCalls = [];
|
|
2333
2333
|
humanInTheLoopList.forEach((tool) => {
|
|
2334
2334
|
const frontendTool = {
|
|
2335
|
+
type: "human-in-the-loop",
|
|
2335
2336
|
name: tool.name,
|
|
2336
2337
|
description: tool.description,
|
|
2337
2338
|
parameters: tool.parameters,
|
|
@@ -2438,6 +2439,7 @@ react_markdown = __toESM(react_markdown);
|
|
|
2438
2439
|
runtimeTransport: useSingleEndpoint === true ? "single" : useSingleEndpoint === false ? "rest" : "auto",
|
|
2439
2440
|
headers: mergedHeaders,
|
|
2440
2441
|
credentials,
|
|
2442
|
+
messageFilter,
|
|
2441
2443
|
properties,
|
|
2442
2444
|
agents__unsafe_dev_only: mergedAgents,
|
|
2443
2445
|
tools: allTools,
|
|
@@ -2523,6 +2525,9 @@ react_markdown = __toESM(react_markdown);
|
|
|
2523
2525
|
subscription.unsubscribe();
|
|
2524
2526
|
};
|
|
2525
2527
|
}, [copilotkit]);
|
|
2528
|
+
(0, react.useEffect)(() => {
|
|
2529
|
+
copilotkit.setMessageFilter(messageFilter);
|
|
2530
|
+
}, [copilotkit, messageFilter]);
|
|
2526
2531
|
(0, react.useEffect)(() => {
|
|
2527
2532
|
copilotkit.setRuntimeUrl(chatApiEndpoint);
|
|
2528
2533
|
copilotkit.setRuntimeTransport(useSingleEndpoint === true ? "single" : useSingleEndpoint === false ? "rest" : "auto");
|
|
@@ -2675,8 +2680,8 @@ react_markdown = __toESM(react_markdown);
|
|
|
2675
2680
|
if (aHasAgent === (b.agentId !== void 0)) return 0;
|
|
2676
2681
|
return aHasAgent ? -1 : 1;
|
|
2677
2682
|
});
|
|
2678
|
-
if (!customMessageRenderers.length) return null;
|
|
2679
2683
|
return function(params) {
|
|
2684
|
+
if (!customMessageRenderers.length) return null;
|
|
2680
2685
|
const { message, position } = params;
|
|
2681
2686
|
const resolvedRunId = copilotkit.getRunIdForMessage(agentId, threadId, message.id) ?? copilotkit.getRunIdsForThread(agentId, threadId).slice(-1)[0];
|
|
2682
2687
|
const runId = resolvedRunId ?? `missing-run-id:${message.id}`;
|
|
@@ -2820,6 +2825,7 @@ react_markdown = __toESM(react_markdown);
|
|
|
2820
2825
|
]);
|
|
2821
2826
|
useFrontendTool$1({
|
|
2822
2827
|
...tool,
|
|
2828
|
+
type: "human-in-the-loop",
|
|
2823
2829
|
handler,
|
|
2824
2830
|
render: RenderComponent
|
|
2825
2831
|
}, deps);
|