@copilotkit/react-core 1.10.4-next.3 → 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 (46) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/{chunk-52UQCG24.mjs → chunk-7D4OASUM.mjs} +2 -2
  3. package/dist/{chunk-T6ACM7RS.mjs → chunk-7LZXD5RJ.mjs} +2 -2
  4. package/dist/{chunk-UZ62I7O3.mjs → chunk-AGP7SAEE.mjs} +2 -2
  5. package/dist/{chunk-3ST7A2EK.mjs → chunk-FCRODLLL.mjs} +2 -2
  6. package/dist/{chunk-TWVUO4RV.mjs → chunk-G2GQX4FI.mjs} +64 -3
  7. package/dist/chunk-G2GQX4FI.mjs.map +1 -0
  8. package/dist/{chunk-3HV6BY52.mjs → chunk-HHLBUGRA.mjs} +2 -2
  9. package/dist/{chunk-LPSDRNU4.mjs → chunk-KA3NCZEJ.mjs} +2 -2
  10. package/dist/{chunk-XVFOGJIP.mjs → chunk-NALRM7KT.mjs} +2 -2
  11. package/dist/components/copilot-provider/copilotkit.js +63 -2
  12. package/dist/components/copilot-provider/copilotkit.js.map +1 -1
  13. package/dist/components/copilot-provider/copilotkit.mjs +2 -2
  14. package/dist/components/copilot-provider/index.js +63 -2
  15. package/dist/components/copilot-provider/index.js.map +1 -1
  16. package/dist/components/copilot-provider/index.mjs +2 -2
  17. package/dist/components/dev-console/console-trigger.js +63 -2
  18. package/dist/components/dev-console/console-trigger.js.map +1 -1
  19. package/dist/components/dev-console/console-trigger.mjs +1 -1
  20. package/dist/components/index.js +63 -2
  21. package/dist/components/index.js.map +1 -1
  22. package/dist/components/index.mjs +2 -2
  23. package/dist/hooks/index.mjs +7 -7
  24. package/dist/hooks/use-coagent.mjs +4 -4
  25. package/dist/hooks/use-copilot-chat-headless_c.mjs +4 -4
  26. package/dist/hooks/use-copilot-chat.mjs +4 -4
  27. package/dist/hooks/use-copilot-chat_internal.mjs +3 -3
  28. package/dist/hooks/use-langgraph-interrupt.mjs +4 -4
  29. package/dist/index.js +63 -2
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +8 -8
  32. package/dist/lib/copilot-task.mjs +3 -3
  33. package/dist/lib/index.mjs +3 -3
  34. package/dist/utils/extract.mjs +2 -2
  35. package/dist/utils/index.mjs +2 -2
  36. package/dist/utils/suggestions.mjs +2 -2
  37. package/package.json +3 -3
  38. package/src/components/dev-console/console-trigger.tsx +66 -2
  39. package/dist/chunk-TWVUO4RV.mjs.map +0 -1
  40. /package/dist/{chunk-52UQCG24.mjs.map → chunk-7D4OASUM.mjs.map} +0 -0
  41. /package/dist/{chunk-T6ACM7RS.mjs.map → chunk-7LZXD5RJ.mjs.map} +0 -0
  42. /package/dist/{chunk-UZ62I7O3.mjs.map → chunk-AGP7SAEE.mjs.map} +0 -0
  43. /package/dist/{chunk-3ST7A2EK.mjs.map → chunk-FCRODLLL.mjs.map} +0 -0
  44. /package/dist/{chunk-3HV6BY52.mjs.map → chunk-HHLBUGRA.mjs.map} +0 -0
  45. /package/dist/{chunk-LPSDRNU4.mjs.map → chunk-KA3NCZEJ.mjs.map} +0 -0
  46. /package/dist/{chunk-XVFOGJIP.mjs.map → chunk-NALRM7KT.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # ui
2
2
 
3
+ ## 1.10.5-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 32c163e: - inspector visibility toggle in ConsoleTrigger component
8
+ - @copilotkit/runtime-client-gql@1.10.5-next.0
9
+ - @copilotkit/shared@1.10.5-next.0
10
+
11
+ ## 1.10.4
12
+
13
+ ### Patch Changes
14
+
15
+ - ef98963: - feat: add platform-wide error surfacing for custom error rendering
16
+ - feat: add error as a message option and a component level onError
17
+ - 052d54d: - fix: enable erasing chat state on new thread creation
18
+ - Updated dependencies [a640d8e]
19
+ - @copilotkit/shared@1.10.4
20
+ - @copilotkit/runtime-client-gql@1.10.4
21
+
3
22
  ## 1.10.4-next.3
4
23
 
5
24
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  defaultCopilotContextCategories
3
- } from "./chunk-T6ACM7RS.mjs";
3
+ } from "./chunk-7LZXD5RJ.mjs";
4
4
  import {
5
5
  processActionsForRuntimeRequest
6
6
  } from "./chunk-4CEQJ2X6.mjs";
@@ -117,4 +117,4 @@ ${instructions}
117
117
  export {
118
118
  CopilotTask
119
119
  };
120
- //# sourceMappingURL=chunk-52UQCG24.mjs.map
120
+ //# sourceMappingURL=chunk-7D4OASUM.mjs.map
@@ -7,7 +7,7 @@ import {
7
7
  } from "./chunk-MY2BUA6F.mjs";
8
8
  import {
9
9
  ConsoleTrigger
10
- } from "./chunk-TWVUO4RV.mjs";
10
+ } from "./chunk-G2GQX4FI.mjs";
11
11
  import {
12
12
  use_flat_category_store_default
13
13
  } from "./chunk-5FHSUKQL.mjs";
@@ -794,4 +794,4 @@ export {
794
794
  CopilotKitInternal,
795
795
  defaultCopilotContextCategories
796
796
  };
797
- //# sourceMappingURL=chunk-T6ACM7RS.mjs.map
797
+ //# sourceMappingURL=chunk-7LZXD5RJ.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotChat
3
- } from "./chunk-3ST7A2EK.mjs";
3
+ } from "./chunk-FCRODLLL.mjs";
4
4
  import {
5
5
  useMessagesTap
6
6
  } from "./chunk-MY2BUA6F.mjs";
@@ -236,4 +236,4 @@ export {
236
236
  stopAgent,
237
237
  runAgent
238
238
  };
239
- //# sourceMappingURL=chunk-UZ62I7O3.mjs.map
239
+ //# sourceMappingURL=chunk-AGP7SAEE.mjs.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  defaultCopilotContextCategories,
6
6
  reloadSuggestions
7
- } from "./chunk-T6ACM7RS.mjs";
7
+ } from "./chunk-7LZXD5RJ.mjs";
8
8
  import {
9
9
  useCopilotMessagesContext
10
10
  } from "./chunk-ZLQVRPDS.mjs";
@@ -329,4 +329,4 @@ export {
329
329
  useCopilotChat,
330
330
  defaultSystemMessage
331
331
  };
332
- //# sourceMappingURL=chunk-3ST7A2EK.mjs.map
332
+ //# sourceMappingURL=chunk-FCRODLLL.mjs.map
@@ -11,6 +11,7 @@ import {
11
11
  // src/components/dev-console/console-trigger.tsx
12
12
  import { useState, useEffect, useRef } from "react";
13
13
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
14
+ var INSPECTOR_HIDE_KEY = "cpk:inspector:hidden";
14
15
  function ConsoleTrigger({ position = "bottom-right" }) {
15
16
  const context = useCopilotContext();
16
17
  const hasApiKey = Boolean(context.copilotApiConfig.publicApiKey);
@@ -19,10 +20,18 @@ function ConsoleTrigger({ position = "bottom-right" }) {
19
20
  const [isDragging, setIsDragging] = useState(false);
20
21
  const [buttonPosition, setButtonPosition] = useState(null);
21
22
  const [mounted, setMounted] = useState(false);
23
+ const [isHidden, setIsHidden] = useState(false);
22
24
  const dragRef = useRef(null);
23
25
  const buttonRef = useRef(null);
24
26
  useEffect(() => {
25
27
  setMounted(true);
28
+ try {
29
+ const hidden = typeof window !== "undefined" ? localStorage.getItem(INSPECTOR_HIDE_KEY) : null;
30
+ if (hidden === "1" || hidden === "true") {
31
+ setIsHidden(true);
32
+ }
33
+ } catch (e) {
34
+ }
26
35
  if (typeof window !== "undefined" && !buttonPosition) {
27
36
  const buttonSize = 60;
28
37
  const margin = 24;
@@ -74,7 +83,7 @@ function ConsoleTrigger({ position = "bottom-right" }) {
74
83
  document.removeEventListener("mouseup", handleMouseUp, { capture: true });
75
84
  };
76
85
  }, [isDragging]);
77
- if (!mounted || !buttonPosition) {
86
+ if (!mounted || !buttonPosition || isHidden) {
78
87
  return null;
79
88
  }
80
89
  return /* @__PURE__ */ jsxs(Fragment, { children: [
@@ -82,11 +91,27 @@ function ConsoleTrigger({ position = "bottom-right" }) {
82
91
  "button",
83
92
  {
84
93
  ref: buttonRef,
85
- onClick: () => {
94
+ onClick: (e) => {
86
95
  if (!isDragging) {
96
+ if (e.metaKey || e.altKey) {
97
+ try {
98
+ localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
99
+ } catch (e2) {
100
+ }
101
+ setIsHidden(true);
102
+ return;
103
+ }
87
104
  setIsModalOpen(true);
88
105
  }
89
106
  },
107
+ onContextMenu: (e) => {
108
+ e.preventDefault();
109
+ try {
110
+ localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
111
+ } catch (e2) {
112
+ }
113
+ setIsHidden(true);
114
+ },
90
115
  onMouseDown: handleMouseDown,
91
116
  onMouseEnter: () => setIsHovered(true),
92
117
  onMouseLeave: () => setIsHovered(false),
@@ -116,6 +141,42 @@ function ConsoleTrigger({ position = "bottom-right" }) {
116
141
  },
117
142
  title: hasApiKey ? "Open Inspector (Drag to move)" : "Inspector (License Key Required, Drag to move)",
118
143
  children: [
144
+ /* @__PURE__ */ jsx(
145
+ "div",
146
+ {
147
+ onClick: (e) => {
148
+ e.preventDefault();
149
+ e.stopPropagation();
150
+ try {
151
+ localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
152
+ } catch (e2) {
153
+ }
154
+ setIsHidden(true);
155
+ },
156
+ style: {
157
+ position: "absolute",
158
+ bottom: "2px",
159
+ right: "2px",
160
+ width: "20px",
161
+ height: "20px",
162
+ borderRadius: "50%",
163
+ background: "#ffffff",
164
+ color: "#ef4444",
165
+ fontSize: "14px",
166
+ lineHeight: "18px",
167
+ textAlign: "center",
168
+ boxShadow: "0 2px 6px rgba(0,0,0,0.35)",
169
+ cursor: "pointer",
170
+ border: "1px solid #e5e7eb",
171
+ display: "flex",
172
+ alignItems: "center",
173
+ justifyContent: "center",
174
+ zIndex: 1
175
+ },
176
+ title: "Hide Inspector",
177
+ children: "\xD7"
178
+ }
179
+ ),
119
180
  /* @__PURE__ */ jsx(
120
181
  "div",
121
182
  {
@@ -167,4 +228,4 @@ function ConsoleTrigger({ position = "bottom-right" }) {
167
228
  export {
168
229
  ConsoleTrigger
169
230
  };
170
- //# sourceMappingURL=chunk-TWVUO4RV.mjs.map
231
+ //# sourceMappingURL=chunk-G2GQX4FI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/dev-console/console-trigger.tsx"],"sourcesContent":["\"use client\";\n\nimport React, { useState, useEffect, useRef } from \"react\";\nimport { useCopilotContext } from \"../../context/copilot-context\";\nimport { CopilotKitIcon } from \"./icons\";\nimport { DeveloperConsoleModal } from \"./developer-console-modal\";\n\n// Storage key for hiding the Inspector trigger/modal\nconst INSPECTOR_HIDE_KEY = \"cpk:inspector:hidden\";\n\ninterface ConsoleTriggerProps {\n position?: \"bottom-left\" | \"bottom-right\";\n}\n\nexport function ConsoleTrigger({ position = \"bottom-right\" }: ConsoleTriggerProps) {\n const context = useCopilotContext();\n const hasApiKey = Boolean(context.copilotApiConfig.publicApiKey);\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [isHovered, setIsHovered] = useState(false);\n const [isDragging, setIsDragging] = useState(false);\n const [buttonPosition, setButtonPosition] = useState<{ x: number; y: number } | null>(null);\n const [mounted, setMounted] = useState(false);\n const [isHidden, setIsHidden] = useState(false);\n\n const dragRef = useRef<{\n startX: number;\n startY: number;\n buttonX: number;\n buttonY: number;\n } | null>(null);\n const buttonRef = useRef<HTMLButtonElement>(null);\n\n // Initialize on client side only\n useEffect(() => {\n setMounted(true);\n try {\n const hidden =\n typeof window !== \"undefined\" ? localStorage.getItem(INSPECTOR_HIDE_KEY) : null;\n if (hidden === \"1\" || hidden === \"true\") {\n setIsHidden(true);\n }\n } catch {\n // ignore\n }\n if (typeof window !== \"undefined\" && !buttonPosition) {\n const buttonSize = 60;\n const margin = 24;\n\n const initialPosition = {\n x: margin,\n y: window.innerHeight - buttonSize - margin,\n };\n\n setButtonPosition(initialPosition);\n }\n }, [position]);\n\n const handleMouseDown = (e: React.MouseEvent) => {\n e.preventDefault();\n if (!buttonPosition) return;\n\n dragRef.current = {\n startX: e.clientX,\n startY: e.clientY,\n buttonX: buttonPosition.x,\n buttonY: buttonPosition.y,\n };\n setIsDragging(true);\n };\n\n useEffect(() => {\n if (!isDragging) return;\n\n const handleMouseMove = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n\n if (!dragRef.current) return;\n\n const deltaX = e.clientX - dragRef.current.startX;\n const deltaY = e.clientY - dragRef.current.startY;\n\n // Calculate new position\n let newX = dragRef.current.buttonX + deltaX;\n let newY = dragRef.current.buttonY + deltaY;\n\n // Keep button within viewport bounds\n newX = Math.max(0, Math.min(newX, window.innerWidth - 60));\n newY = Math.max(0, Math.min(newY, window.innerHeight - 60));\n\n setButtonPosition({ x: newX, y: newY });\n };\n\n const handleMouseUp = (e: MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setIsDragging(false);\n dragRef.current = null;\n };\n\n // Use capture phase to intercept events before they reach other handlers\n document.addEventListener(\"mousemove\", handleMouseMove, { capture: true, passive: false });\n document.addEventListener(\"mouseup\", handleMouseUp, { capture: true, passive: false });\n\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove, { capture: true });\n document.removeEventListener(\"mouseup\", handleMouseUp, { capture: true });\n };\n }, [isDragging]);\n\n // Don't render until mounted and position is initialized\n if (!mounted || !buttonPosition || isHidden) {\n return null;\n }\n\n return (\n <>\n <button\n ref={buttonRef}\n onClick={(e) => {\n if (!isDragging) {\n // Modifier-click hides\n if (e.metaKey || e.altKey) {\n try {\n localStorage.setItem(INSPECTOR_HIDE_KEY, \"1\");\n } catch {}\n setIsHidden(true);\n return;\n }\n setIsModalOpen(true);\n }\n }}\n onContextMenu={(e) => {\n e.preventDefault();\n try {\n localStorage.setItem(INSPECTOR_HIDE_KEY, \"1\");\n } catch {}\n setIsHidden(true);\n }}\n onMouseDown={handleMouseDown}\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n style={{\n position: \"fixed\",\n left: `${buttonPosition.x}px`,\n top: `${buttonPosition.y}px`,\n zIndex: 2147483647,\n width: \"60px\",\n height: \"60px\",\n background: isDragging ? \"#000000\" : isHovered ? \"#111111\" : \"#000000\",\n color: \"white\",\n borderRadius: \"50%\",\n boxShadow: isDragging\n ? \"0 8px 32px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4)\"\n : isHovered\n ? \"0 12px 40px rgba(0, 0, 0, 0.7), 0 6px 20px rgba(0, 0, 0, 0.5)\"\n : \"0 6px 20px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.3)\",\n transition: isDragging ? \"none\" : \"all 0.3s cubic-bezier(0.4, 0, 0.2, 1)\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n border: \"none\",\n cursor: isDragging ? \"grabbing\" : \"grab\",\n opacity: 1,\n userSelect: \"none\",\n transform: isDragging ? \"scale(1.05)\" : isHovered ? \"scale(1.1)\" : \"scale(1)\",\n backdropFilter: \"blur(10px)\",\n pointerEvents: \"auto\",\n isolation: \"isolate\",\n }}\n title={\n hasApiKey\n ? \"Open Inspector (Drag to move)\"\n : \"Inspector (License Key Required, Drag to move)\"\n }\n >\n {/* Close (hide) control */}\n <div\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n try {\n localStorage.setItem(INSPECTOR_HIDE_KEY, \"1\");\n } catch {\n // ignore\n }\n setIsHidden(true);\n }}\n style={{\n position: \"absolute\",\n bottom: \"2px\",\n right: \"2px\",\n width: \"20px\",\n height: \"20px\",\n borderRadius: \"50%\",\n background: \"#ffffff\",\n color: \"#ef4444\",\n fontSize: \"14px\",\n lineHeight: \"18px\",\n textAlign: \"center\",\n boxShadow: \"0 2px 6px rgba(0,0,0,0.35)\",\n cursor: \"pointer\",\n border: \"1px solid #e5e7eb\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n zIndex: 1,\n }}\n title=\"Hide Inspector\"\n >\n ×\n </div>\n <div\n style={{\n width: \"28px\",\n height: \"28px\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n filter: \"drop-shadow(0 2px 4px rgba(0,0,0,0.2))\",\n }}\n >\n <CopilotKitIcon />\n </div>\n {!hasApiKey && (\n <div\n style={{\n position: \"absolute\",\n top: \"-2px\",\n right: \"-2px\",\n width: \"18px\",\n height: \"18px\",\n background: \"linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%)\",\n borderRadius: \"50%\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n boxShadow: \"0 2px 8px rgba(255, 107, 107, 0.4)\",\n border: \"2px solid white\",\n }}\n >\n <span style={{ fontSize: \"10px\", color: \"white\", fontWeight: \"bold\" }}>!</span>\n </div>\n )}\n </button>\n\n <DeveloperConsoleModal\n isOpen={isModalOpen}\n onClose={() => setIsModalOpen(false)}\n hasApiKey={hasApiKey}\n />\n </>\n );\n}\n"],"mappings":";;;;;;;;;;;AAEA,SAAgB,UAAU,WAAW,cAAc;AAkH/C,mBA6DI,KA5DF,YADF;AA5GJ,IAAM,qBAAqB;AAMpB,SAAS,eAAe,EAAE,WAAW,eAAe,GAAwB;AACjF,QAAM,UAAU,kBAAkB;AAClC,QAAM,YAAY,QAAQ,QAAQ,iBAAiB,YAAY;AAC/D,QAAM,CAAC,aAAa,cAAc,IAAI,SAAS,KAAK;AACpD,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAChD,QAAM,CAAC,YAAY,aAAa,IAAI,SAAS,KAAK;AAClD,QAAM,CAAC,gBAAgB,iBAAiB,IAAI,SAA0C,IAAI;AAC1F,QAAM,CAAC,SAAS,UAAU,IAAI,SAAS,KAAK;AAC5C,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,KAAK;AAE9C,QAAM,UAAU,OAKN,IAAI;AACd,QAAM,YAAY,OAA0B,IAAI;AAGhD,YAAU,MAAM;AACd,eAAW,IAAI;AACf,QAAI;AACF,YAAM,SACJ,OAAO,WAAW,cAAc,aAAa,QAAQ,kBAAkB,IAAI;AAC7E,UAAI,WAAW,OAAO,WAAW,QAAQ;AACvC,oBAAY,IA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YAAY;AAAA,gBACZ,cAAc;AAAA,gBACd,SAAS;AAAA,gBACT,YAAY;AAAA,gBACZ,gBAAgB;AAAA,gBAChB,WAAW;AAAA,gBACX,QAAQ;AAAA,cACV;AAAA,cAEA,8BAAC,UAAK,OAAO,EAAE,UAAU,QAAQ,OAAO,SAAS,YAAY,OAAO,GAAG,eAAC;AAAA;AAAA,UAC1E;AAAA;AAAA;AAAA,IAEJ;AAAA,IAEA;AAAA,MAAC;AAAA;AAAA,QACC,QAAQ;AAAA,QACR,SAAS,MAAM,eAAe,KAAK;AAAA,QACnC;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;","names":["e"]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotChat
3
- } from "./chunk-3ST7A2EK.mjs";
3
+ } from "./chunk-FCRODLLL.mjs";
4
4
  import {
5
5
  useCopilotContext
6
6
  } from "./chunk-YHT6CWIY.mjs";
@@ -82,4 +82,4 @@ function useCopilotChatHeadless_c(options = {}) {
82
82
  export {
83
83
  useCopilotChatHeadless_c
84
84
  };
85
- //# sourceMappingURL=chunk-3HV6BY52.mjs.map
85
+ //# sourceMappingURL=chunk-HHLBUGRA.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotChat
3
- } from "./chunk-3ST7A2EK.mjs";
3
+ } from "./chunk-FCRODLLL.mjs";
4
4
 
5
5
  // src/hooks/use-copilot-chat.ts
6
6
  function useCopilotChat2(options = {}) {
@@ -31,4 +31,4 @@ function useCopilotChat2(options = {}) {
31
31
  export {
32
32
  useCopilotChat2 as useCopilotChat
33
33
  };
34
- //# sourceMappingURL=chunk-LPSDRNU4.mjs.map
34
+ //# sourceMappingURL=chunk-KA3NCZEJ.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotChat
3
- } from "./chunk-3ST7A2EK.mjs";
3
+ } from "./chunk-FCRODLLL.mjs";
4
4
  import {
5
5
  CopilotContext
6
6
  } from "./chunk-YHT6CWIY.mjs";
@@ -62,4 +62,4 @@ function useLangGraphInterrupt(action, dependencies) {
62
62
  export {
63
63
  useLangGraphInterrupt
64
64
  };
65
- //# sourceMappingURL=chunk-XVFOGJIP.mjs.map
65
+ //# sourceMappingURL=chunk-NALRM7KT.mjs.map
@@ -2150,6 +2150,7 @@ function ContextTab({ context }) {
2150
2150
 
2151
2151
  // src/components/dev-console/console-trigger.tsx
2152
2152
  var import_jsx_runtime7 = require("react/jsx-runtime");
2153
+ var INSPECTOR_HIDE_KEY = "cpk:inspector:hidden";
2153
2154
  function ConsoleTrigger({ position = "bottom-right" }) {
2154
2155
  const context = useCopilotContext();
2155
2156
  const hasApiKey = Boolean(context.copilotApiConfig.publicApiKey);
@@ -2158,10 +2159,18 @@ function ConsoleTrigger({ position = "bottom-right" }) {
2158
2159
  const [isDragging, setIsDragging] = (0, import_react10.useState)(false);
2159
2160
  const [buttonPosition, setButtonPosition] = (0, import_react10.useState)(null);
2160
2161
  const [mounted, setMounted] = (0, import_react10.useState)(false);
2162
+ const [isHidden, setIsHidden] = (0, import_react10.useState)(false);
2161
2163
  const dragRef = (0, import_react10.useRef)(null);
2162
2164
  const buttonRef = (0, import_react10.useRef)(null);
2163
2165
  (0, import_react10.useEffect)(() => {
2164
2166
  setMounted(true);
2167
+ try {
2168
+ const hidden = typeof window !== "undefined" ? localStorage.getItem(INSPECTOR_HIDE_KEY) : null;
2169
+ if (hidden === "1" || hidden === "true") {
2170
+ setIsHidden(true);
2171
+ }
2172
+ } catch (e) {
2173
+ }
2165
2174
  if (typeof window !== "undefined" && !buttonPosition) {
2166
2175
  const buttonSize = 60;
2167
2176
  const margin = 24;
@@ -2213,7 +2222,7 @@ function ConsoleTrigger({ position = "bottom-right" }) {
2213
2222
  document.removeEventListener("mouseup", handleMouseUp, { capture: true });
2214
2223
  };
2215
2224
  }, [isDragging]);
2216
- if (!mounted || !buttonPosition) {
2225
+ if (!mounted || !buttonPosition || isHidden) {
2217
2226
  return null;
2218
2227
  }
2219
2228
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_jsx_runtime7.Fragment, { children: [
@@ -2221,11 +2230,27 @@ function ConsoleTrigger({ position = "bottom-right" }) {
2221
2230
  "button",
2222
2231
  {
2223
2232
  ref: buttonRef,
2224
- onClick: () => {
2233
+ onClick: (e) => {
2225
2234
  if (!isDragging) {
2235
+ if (e.metaKey || e.altKey) {
2236
+ try {
2237
+ localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
2238
+ } catch (e2) {
2239
+ }
2240
+ setIsHidden(true);
2241
+ return;
2242
+ }
2226
2243
  setIsModalOpen(true);
2227
2244
  }
2228
2245
  },
2246
+ onContextMenu: (e) => {
2247
+ e.preventDefault();
2248
+ try {
2249
+ localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
2250
+ } catch (e2) {
2251
+ }
2252
+ setIsHidden(true);
2253
+ },
2229
2254
  onMouseDown: handleMouseDown,
2230
2255
  onMouseEnter: () => setIsHovered(true),
2231
2256
  onMouseLeave: () => setIsHovered(false),
@@ -2255,6 +2280,42 @@ function ConsoleTrigger({ position = "bottom-right" }) {
2255
2280
  },
2256
2281
  title: hasApiKey ? "Open Inspector (Drag to move)" : "Inspector (License Key Required, Drag to move)",
2257
2282
  children: [
2283
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2284
+ "div",
2285
+ {
2286
+ onClick: (e) => {
2287
+ e.preventDefault();
2288
+ e.stopPropagation();
2289
+ try {
2290
+ localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
2291
+ } catch (e2) {
2292
+ }
2293
+ setIsHidden(true);
2294
+ },
2295
+ style: {
2296
+ position: "absolute",
2297
+ bottom: "2px",
2298
+ right: "2px",
2299
+ width: "20px",
2300
+ height: "20px",
2301
+ borderRadius: "50%",
2302
+ background: "#ffffff",
2303
+ color: "#ef4444",
2304
+ fontSize: "14px",
2305
+ lineHeight: "18px",
2306
+ textAlign: "center",
2307
+ boxShadow: "0 2px 6px rgba(0,0,0,0.35)",
2308
+ cursor: "pointer",
2309
+ border: "1px solid #e5e7eb",
2310
+ display: "flex",
2311
+ alignItems: "center",
2312
+ justifyContent: "center",
2313
+ zIndex: 1
2314
+ },
2315
+ title: "Hide Inspector",
2316
+ children: "\xD7"
2317
+ }
2318
+ ),
2258
2319
  /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
2259
2320
  "div",
2260
2321
  {