@copilotkit/react-core 1.10.4 → 1.10.5-next.0
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/CHANGELOG.md +8 -0
- package/dist/{chunk-DSDAZA3B.mjs → chunk-23SOG4FI.mjs} +4 -4
- package/dist/{chunk-KWS75AOU.mjs → chunk-4JBVPOHK.mjs} +2 -2
- package/dist/{chunk-LLLCUHOO.mjs → chunk-6INCKUL6.mjs} +6 -6
- package/dist/{chunk-5KVEE73R.mjs → chunk-7D4OASUM.mjs} +4 -4
- package/dist/{chunk-6WTWBXEJ.mjs → chunk-7LZXD5RJ.mjs} +11 -11
- package/dist/{chunk-QNJNOZH3.mjs → chunk-AGP7SAEE.mjs} +8 -8
- package/dist/{chunk-JEMBA7PE.mjs → chunk-AR7HJPGU.mjs} +4 -4
- package/dist/{chunk-2QZSAQTX.mjs → chunk-CLQLVMW4.mjs} +4 -4
- package/dist/{chunk-CLAHAV6J.mjs → chunk-FCRODLLL.mjs} +8 -8
- package/dist/{chunk-AALETENN.mjs → chunk-G2GQX4FI.mjs} +65 -4
- package/dist/chunk-G2GQX4FI.mjs.map +1 -0
- package/dist/{chunk-ID5JRMGN.mjs → chunk-HHLBUGRA.mjs} +2 -2
- package/dist/{chunk-HWM2Z3J3.mjs → chunk-KA3NCZEJ.mjs} +2 -2
- package/dist/{chunk-N4VN2B5S.mjs → chunk-L3I57GMV.mjs} +4 -4
- package/dist/{chunk-2MGJO3FY.mjs → chunk-MY2BUA6F.mjs} +6 -6
- package/dist/{chunk-EBSAU46C.mjs → chunk-NALRM7KT.mjs} +5 -5
- package/dist/components/copilot-provider/copilot-messages.mjs +3 -3
- package/dist/components/copilot-provider/copilotkit.js +63 -2
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +10 -10
- package/dist/components/copilot-provider/index.js +63 -2
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +10 -10
- package/dist/components/dev-console/console-trigger.js +63 -2
- package/dist/components/dev-console/console-trigger.js.map +1 -1
- package/dist/components/dev-console/console-trigger.mjs +3 -3
- package/dist/components/dev-console/developer-console-modal.mjs +2 -2
- package/dist/components/error-boundary/error-boundary.mjs +2 -2
- package/dist/components/index.js +63 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +10 -10
- package/dist/context/index.mjs +4 -4
- package/dist/hooks/index.mjs +31 -31
- package/dist/hooks/use-chat.mjs +4 -4
- package/dist/hooks/use-coagent-state-render.mjs +2 -2
- package/dist/hooks/use-coagent.mjs +15 -15
- package/dist/hooks/use-copilot-action.mjs +2 -2
- package/dist/hooks/use-copilot-authenticated-action.mjs +3 -3
- package/dist/hooks/use-copilot-chat-headless_c.mjs +15 -15
- package/dist/hooks/use-copilot-chat.mjs +15 -15
- package/dist/hooks/use-copilot-chat_internal.mjs +14 -14
- package/dist/hooks/use-langgraph-interrupt-render.mjs +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +15 -15
- package/dist/index.js +63 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +35 -35
- package/dist/lib/copilot-task.mjs +12 -12
- package/dist/lib/index.mjs +12 -12
- package/dist/utils/extract.mjs +10 -10
- package/dist/utils/index.mjs +10 -10
- package/dist/utils/suggestions.mjs +10 -10
- package/package.json +3 -3
- package/src/components/dev-console/console-trigger.tsx +66 -2
- package/dist/chunk-AALETENN.mjs.map +0 -1
- /package/dist/{chunk-DSDAZA3B.mjs.map → chunk-23SOG4FI.mjs.map} +0 -0
- /package/dist/{chunk-KWS75AOU.mjs.map → chunk-4JBVPOHK.mjs.map} +0 -0
- /package/dist/{chunk-LLLCUHOO.mjs.map → chunk-6INCKUL6.mjs.map} +0 -0
- /package/dist/{chunk-5KVEE73R.mjs.map → chunk-7D4OASUM.mjs.map} +0 -0
- /package/dist/{chunk-6WTWBXEJ.mjs.map → chunk-7LZXD5RJ.mjs.map} +0 -0
- /package/dist/{chunk-QNJNOZH3.mjs.map → chunk-AGP7SAEE.mjs.map} +0 -0
- /package/dist/{chunk-JEMBA7PE.mjs.map → chunk-AR7HJPGU.mjs.map} +0 -0
- /package/dist/{chunk-2QZSAQTX.mjs.map → chunk-CLQLVMW4.mjs.map} +0 -0
- /package/dist/{chunk-CLAHAV6J.mjs.map → chunk-FCRODLLL.mjs.map} +0 -0
- /package/dist/{chunk-ID5JRMGN.mjs.map → chunk-HHLBUGRA.mjs.map} +0 -0
- /package/dist/{chunk-HWM2Z3J3.mjs.map → chunk-KA3NCZEJ.mjs.map} +0 -0
- /package/dist/{chunk-N4VN2B5S.mjs.map → chunk-L3I57GMV.mjs.map} +0 -0
- /package/dist/{chunk-2MGJO3FY.mjs.map → chunk-MY2BUA6F.mjs.map} +0 -0
- /package/dist/{chunk-EBSAU46C.mjs.map → chunk-NALRM7KT.mjs.map} +0 -0
package/dist/components/index.js
CHANGED
|
@@ -2151,6 +2151,7 @@ function ContextTab({ context }) {
|
|
|
2151
2151
|
|
|
2152
2152
|
// src/components/dev-console/console-trigger.tsx
|
|
2153
2153
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
2154
|
+
var INSPECTOR_HIDE_KEY = "cpk:inspector:hidden";
|
|
2154
2155
|
function ConsoleTrigger({ position = "bottom-right" }) {
|
|
2155
2156
|
const context = useCopilotContext();
|
|
2156
2157
|
const hasApiKey = Boolean(context.copilotApiConfig.publicApiKey);
|
|
@@ -2159,10 +2160,18 @@ function ConsoleTrigger({ position = "bottom-right" }) {
|
|
|
2159
2160
|
const [isDragging, setIsDragging] = (0, import_react10.useState)(false);
|
|
2160
2161
|
const [buttonPosition, setButtonPosition] = (0, import_react10.useState)(null);
|
|
2161
2162
|
const [mounted, setMounted] = (0, import_react10.useState)(false);
|
|
2163
|
+
const [isHidden, setIsHidden] = (0, import_react10.useState)(false);
|
|
2162
2164
|
const dragRef = (0, import_react10.useRef)(null);
|
|
2163
2165
|
const buttonRef = (0, import_react10.useRef)(null);
|
|
2164
2166
|
(0, import_react10.useEffect)(() => {
|
|
2165
2167
|
setMounted(true);
|
|
2168
|
+
try {
|
|
2169
|
+
const hidden = typeof window !== "undefined" ? localStorage.getItem(INSPECTOR_HIDE_KEY) : null;
|
|
2170
|
+
if (hidden === "1" || hidden === "true") {
|
|
2171
|
+
setIsHidden(true);
|
|
2172
|
+
}
|
|
2173
|
+
} catch (e) {
|
|
2174
|
+
}
|
|
2166
2175
|
if (typeof window !== "undefined" && !buttonPosition) {
|
|
2167
2176
|
const buttonSize = 60;
|
|
2168
2177
|
const margin = 24;
|
|
@@ -2214,7 +2223,7 @@ function ConsoleTrigger({ position = "bottom-right" }) {
|
|
|
2214
2223
|
document.removeEventListener("mouseup", handleMouseUp, { capture: true });
|
|
2215
2224
|
};
|
|
2216
2225
|
}, [isDragging]);
|
|
2217
|
-
if (!mounted || !buttonPosition) {
|
|
2226
|
+
if (!mounted || !buttonPosition || isHidden) {
|
|
2218
2227
|
return null;
|
|
2219
2228
|
}
|
|
2220
2229
|
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
|
|
@@ -2222,11 +2231,27 @@ function ConsoleTrigger({ position = "bottom-right" }) {
|
|
|
2222
2231
|
"button",
|
|
2223
2232
|
{
|
|
2224
2233
|
ref: buttonRef,
|
|
2225
|
-
onClick: () => {
|
|
2234
|
+
onClick: (e) => {
|
|
2226
2235
|
if (!isDragging) {
|
|
2236
|
+
if (e.metaKey || e.altKey) {
|
|
2237
|
+
try {
|
|
2238
|
+
localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
|
|
2239
|
+
} catch (e2) {
|
|
2240
|
+
}
|
|
2241
|
+
setIsHidden(true);
|
|
2242
|
+
return;
|
|
2243
|
+
}
|
|
2227
2244
|
setIsModalOpen(true);
|
|
2228
2245
|
}
|
|
2229
2246
|
},
|
|
2247
|
+
onContextMenu: (e) => {
|
|
2248
|
+
e.preventDefault();
|
|
2249
|
+
try {
|
|
2250
|
+
localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
|
|
2251
|
+
} catch (e2) {
|
|
2252
|
+
}
|
|
2253
|
+
setIsHidden(true);
|
|
2254
|
+
},
|
|
2230
2255
|
onMouseDown: handleMouseDown,
|
|
2231
2256
|
onMouseEnter: () => setIsHovered(true),
|
|
2232
2257
|
onMouseLeave: () => setIsHovered(false),
|
|
@@ -2256,6 +2281,42 @@ function ConsoleTrigger({ position = "bottom-right" }) {
|
|
|
2256
2281
|
},
|
|
2257
2282
|
title: hasApiKey ? "Open Inspector (Drag to move)" : "Inspector (License Key Required, Drag to move)",
|
|
2258
2283
|
children: [
|
|
2284
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2285
|
+
"div",
|
|
2286
|
+
{
|
|
2287
|
+
onClick: (e) => {
|
|
2288
|
+
e.preventDefault();
|
|
2289
|
+
e.stopPropagation();
|
|
2290
|
+
try {
|
|
2291
|
+
localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
|
|
2292
|
+
} catch (e2) {
|
|
2293
|
+
}
|
|
2294
|
+
setIsHidden(true);
|
|
2295
|
+
},
|
|
2296
|
+
style: {
|
|
2297
|
+
position: "absolute",
|
|
2298
|
+
bottom: "2px",
|
|
2299
|
+
right: "2px",
|
|
2300
|
+
width: "20px",
|
|
2301
|
+
height: "20px",
|
|
2302
|
+
borderRadius: "50%",
|
|
2303
|
+
background: "#ffffff",
|
|
2304
|
+
color: "#ef4444",
|
|
2305
|
+
fontSize: "14px",
|
|
2306
|
+
lineHeight: "18px",
|
|
2307
|
+
textAlign: "center",
|
|
2308
|
+
boxShadow: "0 2px 6px rgba(0,0,0,0.35)",
|
|
2309
|
+
cursor: "pointer",
|
|
2310
|
+
border: "1px solid #e5e7eb",
|
|
2311
|
+
display: "flex",
|
|
2312
|
+
alignItems: "center",
|
|
2313
|
+
justifyContent: "center",
|
|
2314
|
+
zIndex: 1
|
|
2315
|
+
},
|
|
2316
|
+
title: "Hide Inspector",
|
|
2317
|
+
children: "\xD7"
|
|
2318
|
+
}
|
|
2319
|
+
),
|
|
2259
2320
|
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
2260
2321
|
"div",
|
|
2261
2322
|
{
|