@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.
Files changed (69) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/{chunk-DSDAZA3B.mjs → chunk-23SOG4FI.mjs} +4 -4
  3. package/dist/{chunk-KWS75AOU.mjs → chunk-4JBVPOHK.mjs} +2 -2
  4. package/dist/{chunk-LLLCUHOO.mjs → chunk-6INCKUL6.mjs} +6 -6
  5. package/dist/{chunk-5KVEE73R.mjs → chunk-7D4OASUM.mjs} +4 -4
  6. package/dist/{chunk-6WTWBXEJ.mjs → chunk-7LZXD5RJ.mjs} +11 -11
  7. package/dist/{chunk-QNJNOZH3.mjs → chunk-AGP7SAEE.mjs} +8 -8
  8. package/dist/{chunk-JEMBA7PE.mjs → chunk-AR7HJPGU.mjs} +4 -4
  9. package/dist/{chunk-2QZSAQTX.mjs → chunk-CLQLVMW4.mjs} +4 -4
  10. package/dist/{chunk-CLAHAV6J.mjs → chunk-FCRODLLL.mjs} +8 -8
  11. package/dist/{chunk-AALETENN.mjs → chunk-G2GQX4FI.mjs} +65 -4
  12. package/dist/chunk-G2GQX4FI.mjs.map +1 -0
  13. package/dist/{chunk-ID5JRMGN.mjs → chunk-HHLBUGRA.mjs} +2 -2
  14. package/dist/{chunk-HWM2Z3J3.mjs → chunk-KA3NCZEJ.mjs} +2 -2
  15. package/dist/{chunk-N4VN2B5S.mjs → chunk-L3I57GMV.mjs} +4 -4
  16. package/dist/{chunk-2MGJO3FY.mjs → chunk-MY2BUA6F.mjs} +6 -6
  17. package/dist/{chunk-EBSAU46C.mjs → chunk-NALRM7KT.mjs} +5 -5
  18. package/dist/components/copilot-provider/copilot-messages.mjs +3 -3
  19. package/dist/components/copilot-provider/copilotkit.js +63 -2
  20. package/dist/components/copilot-provider/copilotkit.js.map +1 -1
  21. package/dist/components/copilot-provider/copilotkit.mjs +10 -10
  22. package/dist/components/copilot-provider/index.js +63 -2
  23. package/dist/components/copilot-provider/index.js.map +1 -1
  24. package/dist/components/copilot-provider/index.mjs +10 -10
  25. package/dist/components/dev-console/console-trigger.js +63 -2
  26. package/dist/components/dev-console/console-trigger.js.map +1 -1
  27. package/dist/components/dev-console/console-trigger.mjs +3 -3
  28. package/dist/components/dev-console/developer-console-modal.mjs +2 -2
  29. package/dist/components/error-boundary/error-boundary.mjs +2 -2
  30. package/dist/components/index.js +63 -2
  31. package/dist/components/index.js.map +1 -1
  32. package/dist/components/index.mjs +10 -10
  33. package/dist/context/index.mjs +4 -4
  34. package/dist/hooks/index.mjs +31 -31
  35. package/dist/hooks/use-chat.mjs +4 -4
  36. package/dist/hooks/use-coagent-state-render.mjs +2 -2
  37. package/dist/hooks/use-coagent.mjs +15 -15
  38. package/dist/hooks/use-copilot-action.mjs +2 -2
  39. package/dist/hooks/use-copilot-authenticated-action.mjs +3 -3
  40. package/dist/hooks/use-copilot-chat-headless_c.mjs +15 -15
  41. package/dist/hooks/use-copilot-chat.mjs +15 -15
  42. package/dist/hooks/use-copilot-chat_internal.mjs +14 -14
  43. package/dist/hooks/use-langgraph-interrupt-render.mjs +1 -1
  44. package/dist/hooks/use-langgraph-interrupt.mjs +15 -15
  45. package/dist/index.js +63 -2
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +35 -35
  48. package/dist/lib/copilot-task.mjs +12 -12
  49. package/dist/lib/index.mjs +12 -12
  50. package/dist/utils/extract.mjs +10 -10
  51. package/dist/utils/index.mjs +10 -10
  52. package/dist/utils/suggestions.mjs +10 -10
  53. package/package.json +3 -3
  54. package/src/components/dev-console/console-trigger.tsx +66 -2
  55. package/dist/chunk-AALETENN.mjs.map +0 -1
  56. /package/dist/{chunk-DSDAZA3B.mjs.map → chunk-23SOG4FI.mjs.map} +0 -0
  57. /package/dist/{chunk-KWS75AOU.mjs.map → chunk-4JBVPOHK.mjs.map} +0 -0
  58. /package/dist/{chunk-LLLCUHOO.mjs.map → chunk-6INCKUL6.mjs.map} +0 -0
  59. /package/dist/{chunk-5KVEE73R.mjs.map → chunk-7D4OASUM.mjs.map} +0 -0
  60. /package/dist/{chunk-6WTWBXEJ.mjs.map → chunk-7LZXD5RJ.mjs.map} +0 -0
  61. /package/dist/{chunk-QNJNOZH3.mjs.map → chunk-AGP7SAEE.mjs.map} +0 -0
  62. /package/dist/{chunk-JEMBA7PE.mjs.map → chunk-AR7HJPGU.mjs.map} +0 -0
  63. /package/dist/{chunk-2QZSAQTX.mjs.map → chunk-CLQLVMW4.mjs.map} +0 -0
  64. /package/dist/{chunk-CLAHAV6J.mjs.map → chunk-FCRODLLL.mjs.map} +0 -0
  65. /package/dist/{chunk-ID5JRMGN.mjs.map → chunk-HHLBUGRA.mjs.map} +0 -0
  66. /package/dist/{chunk-HWM2Z3J3.mjs.map → chunk-KA3NCZEJ.mjs.map} +0 -0
  67. /package/dist/{chunk-N4VN2B5S.mjs.map → chunk-L3I57GMV.mjs.map} +0 -0
  68. /package/dist/{chunk-2MGJO3FY.mjs.map → chunk-MY2BUA6F.mjs.map} +0 -0
  69. /package/dist/{chunk-EBSAU46C.mjs.map → chunk-NALRM7KT.mjs.map} +0 -0
@@ -2,24 +2,24 @@ import {
2
2
  CopilotKit,
3
3
  CopilotKitInternal,
4
4
  defaultCopilotContextCategories
5
- } from "../../chunk-6WTWBXEJ.mjs";
6
- import "../../chunk-N4VN2B5S.mjs";
7
- import "../../chunk-2MGJO3FY.mjs";
8
- import "../../chunk-AALETENN.mjs";
9
- import "../../chunk-DSDAZA3B.mjs";
5
+ } from "../../chunk-7LZXD5RJ.mjs";
6
+ import "../../chunk-L3I57GMV.mjs";
7
+ import "../../chunk-MY2BUA6F.mjs";
8
+ import "../../chunk-G2GQX4FI.mjs";
9
+ import "../../chunk-23SOG4FI.mjs";
10
10
  import "../../chunk-PIF5KJYI.mjs";
11
11
  import "../../chunk-2IDV5OHF.mjs";
12
12
  import "../../chunk-PMAFHQ7P.mjs";
13
13
  import "../../chunk-5FHSUKQL.mjs";
14
14
  import "../../chunk-RKTVJRK7.mjs";
15
- import "../../chunk-Q3MCVRO3.mjs";
16
- import "../../chunk-ICIK2BSB.mjs";
15
+ import "../../chunk-ZLQVRPDS.mjs";
16
+ import "../../chunk-6ZLPNY7X.mjs";
17
17
  import "../../chunk-N4WEHORG.mjs";
18
18
  import "../../chunk-O7ARI5CV.mjs";
19
- import "../../chunk-EFL5OBKN.mjs";
20
- import "../../chunk-6ZLPNY7X.mjs";
19
+ import "../../chunk-Q3MCVRO3.mjs";
20
+ import "../../chunk-ICIK2BSB.mjs";
21
21
  import "../../chunk-YHT6CWIY.mjs";
22
- import "../../chunk-ZLQVRPDS.mjs";
22
+ import "../../chunk-EFL5OBKN.mjs";
23
23
  import "../../chunk-SKC7AJIV.mjs";
24
24
  export {
25
25
  CopilotKit,
@@ -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
  {