@copilotkit/react-core 1.56.4-canary.1777531098 → 1.56.4-canary.1777629975
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-OmIUrWym.mjs → copilotkit-Bd0m5HFp.mjs} +79 -120
- package/dist/copilotkit-Bd0m5HFp.mjs.map +1 -0
- package/dist/copilotkit-DFaI4j2r.d.mts.map +1 -1
- package/dist/copilotkit-Dg4r4Gi_.d.cts.map +1 -1
- package/dist/{copilotkit-DMFu29Kx.cjs → copilotkit-tb4zqaMK.cjs} +79 -120
- package/dist/copilotkit-tb4zqaMK.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.umd.js +0 -24
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/index.cjs +1 -1
- package/dist/v2/index.css +1 -1
- package/dist/v2/index.mjs +1 -1
- package/dist/v2/index.umd.js +81 -122
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +8 -8
- package/src/v2/components/chat/CopilotChatAttachmentQueue.tsx +113 -3
- package/src/v2/components/chat/CopilotChatAttachmentRenderer.tsx +6 -26
- package/src/v2/components/chat/CopilotChatUserMessage.tsx +2 -2
- package/src/v2/components/chat/CopilotChatView.tsx +5 -26
- package/src/v2/components/chat/__tests__/CopilotChatView.inputOverlay.test.tsx +0 -92
- package/src/v2/hooks/use-configure-suggestions.tsx +0 -43
- package/dist/copilotkit-DMFu29Kx.cjs.map +0 -1
- package/dist/copilotkit-OmIUrWym.mjs.map +0 -1
- package/src/v2/components/chat/Lightbox.tsx +0 -103
- package/src/v2/components/chat/__tests__/CopilotChat.suggestionsAlways.test.tsx +0 -183
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-tb4zqaMK.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 { B as useConfigureSuggestions, Q as useRenderToolCall$1, U as useHumanInTheLoop$1, V as useSuggestions, Y as useRenderCustomMessages, Z as useAgent, a as ThreadsProvider, c as CoAgentStateRendersProvider, d as shouldShowDevConsole, et as useCopilotKit, f as useToast, g as useCopilotContext, h as CopilotContext, ht as useCopilotChatConfiguration, i as ThreadsContext, l as useCoAgentStateRenders, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, o as useThreads, p as CopilotMessagesContext, q as useFrontendTool$1, r as CoAgentStateRenderBridge, rt as defineToolCallRenderer, s as CoAgentStateRendersContext, t as CopilotKit, u as useAsyncCallback, z as useInterrupt } from "./copilotkit-
|
|
3
|
+
import { B as useConfigureSuggestions, Q as useRenderToolCall$1, U as useHumanInTheLoop$1, V as useSuggestions, Y as useRenderCustomMessages, Z as useAgent, a as ThreadsProvider, c as CoAgentStateRendersProvider, d as shouldShowDevConsole, et as useCopilotKit, f as useToast, g as useCopilotContext, h as CopilotContext, ht as useCopilotChatConfiguration, i as ThreadsContext, l as useCoAgentStateRenders, m as useCopilotMessagesContext, n as defaultCopilotContextCategories, o as useThreads, p as CopilotMessagesContext, q as useFrontendTool$1, r as CoAgentStateRenderBridge, rt as defineToolCallRenderer, s as CoAgentStateRendersContext, t as CopilotKit, u as useAsyncCallback, z as useInterrupt } from "./copilotkit-Bd0m5HFp.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
|
@@ -2838,20 +2838,16 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
2838
2838
|
return consumer;
|
|
2839
2839
|
}, [normalizedConfig, resolvedConsumerAgentId]);
|
|
2840
2840
|
const isGlobalConfig = rawConsumerAgentId === void 0 || rawConsumerAgentId === "*";
|
|
2841
|
-
const isDynamicConfigType = (0, react.useMemo)(() => !!normalizedConfig && "instructions" in normalizedConfig, [normalizedConfig]);
|
|
2842
2841
|
const requestReload = (0, react.useCallback)(() => {
|
|
2843
2842
|
if (!normalizedConfig) return;
|
|
2844
2843
|
if (isGlobalConfig) {
|
|
2845
2844
|
var _copilotkit$agents;
|
|
2846
|
-
const seen = /* @__PURE__ */ new Set();
|
|
2847
2845
|
const agents = Object.values((_copilotkit$agents = copilotkit.agents) !== null && _copilotkit$agents !== void 0 ? _copilotkit$agents : {});
|
|
2848
2846
|
for (const entry of agents) {
|
|
2849
2847
|
const agentId = entry.agentId;
|
|
2850
2848
|
if (!agentId) continue;
|
|
2851
|
-
seen.add(agentId);
|
|
2852
2849
|
if (!entry.isRunning) copilotkit.reloadSuggestions(agentId);
|
|
2853
2850
|
}
|
|
2854
|
-
if (targetAgentId && !seen.has(targetAgentId)) copilotkit.reloadSuggestions(targetAgentId);
|
|
2855
2851
|
return;
|
|
2856
2852
|
}
|
|
2857
2853
|
if (!targetAgentId) return;
|
|
@@ -2896,26 +2892,6 @@ window.parent.postMessage({jsonrpc:"2.0",method:"ui/notifications/sandbox-proxy-
|
|
|
2896
2892
|
requestReload,
|
|
2897
2893
|
...extraDeps
|
|
2898
2894
|
]);
|
|
2899
|
-
(0, react.useEffect)(() => {
|
|
2900
|
-
if (!normalizedConfig || !isDynamicConfigType) return;
|
|
2901
|
-
if (!targetAgentId) return;
|
|
2902
|
-
if (!!copilotkit.getAgent(targetAgentId)) return;
|
|
2903
|
-
const subscription = copilotkit.subscribe({ onAgentsChanged: () => {
|
|
2904
|
-
if (copilotkit.getAgent(targetAgentId)) {
|
|
2905
|
-
requestReload();
|
|
2906
|
-
subscription.unsubscribe();
|
|
2907
|
-
}
|
|
2908
|
-
} });
|
|
2909
|
-
return () => {
|
|
2910
|
-
subscription.unsubscribe();
|
|
2911
|
-
};
|
|
2912
|
-
}, [
|
|
2913
|
-
copilotkit,
|
|
2914
|
-
normalizedConfig,
|
|
2915
|
-
isDynamicConfigType,
|
|
2916
|
-
targetAgentId,
|
|
2917
|
-
requestReload
|
|
2918
|
-
]);
|
|
2919
2895
|
}
|
|
2920
2896
|
function isDynamicConfig(config) {
|
|
2921
2897
|
return "instructions" in config;
|