@copilotkit/react-core 1.50.0-beta.9 → 1.50.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 +180 -0
- package/dist/{chunk-YJGPIN3R.mjs → chunk-5J7RRLRO.mjs} +2 -2
- package/dist/{chunk-FYMZKPOL.mjs → chunk-CO6V4G7P.mjs} +15 -7
- package/dist/chunk-CO6V4G7P.mjs.map +1 -0
- package/dist/{chunk-B5ELMVT7.mjs → chunk-HQTDDA6V.mjs} +2 -2
- package/dist/{chunk-3775VM7Y.mjs → chunk-LDEWO5XH.mjs} +5 -411
- package/dist/chunk-LDEWO5XH.mjs.map +1 -0
- package/dist/{chunk-7SHWECGN.mjs → chunk-ZE4JVTEP.mjs} +2 -2
- package/dist/components/copilot-provider/copilotkit-props.d.ts +6 -0
- package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.js +127 -1150
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +3 -6
- package/dist/components/copilot-provider/index.js +127 -1150
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +3 -6
- package/dist/components/dev-console/console-trigger.mjs +225 -5
- package/dist/components/dev-console/console-trigger.mjs.map +1 -1
- package/dist/components/index.js +127 -1150
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +3 -6
- package/dist/hooks/index.js +3 -405
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +28 -28
- package/dist/hooks/use-copilot-chat-headless_c.js +3 -405
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +3 -3
- package/dist/hooks/use-copilot-chat.js +3 -405
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +3 -3
- package/dist/hooks/use-copilot-chat_internal.js +3 -405
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +2 -2
- package/dist/index.js +276 -1694
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +34 -37
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +4 -7
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +4 -7
- package/dist/utils/index.mjs +3 -3
- package/package.json +6 -6
- package/src/components/copilot-provider/copilotkit-props.tsx +7 -0
- package/src/components/copilot-provider/copilotkit.tsx +13 -5
- package/dist/chunk-3775VM7Y.mjs.map +0 -1
- package/dist/chunk-FYMZKPOL.mjs.map +0 -1
- package/dist/chunk-PMWUKW3Z.mjs +0 -231
- package/dist/chunk-PMWUKW3Z.mjs.map +0 -1
- /package/dist/{chunk-YJGPIN3R.mjs.map → chunk-5J7RRLRO.mjs.map} +0 -0
- /package/dist/{chunk-B5ELMVT7.mjs.map → chunk-HQTDDA6V.mjs.map} +0 -0
- /package/dist/{chunk-7SHWECGN.mjs.map → chunk-ZE4JVTEP.mjs.map} +0 -0
|
@@ -2,18 +2,15 @@ import "../../chunk-SPCZTZCY.mjs";
|
|
|
2
2
|
import {
|
|
3
3
|
CopilotKit,
|
|
4
4
|
defaultCopilotContextCategories
|
|
5
|
-
} from "../../chunk-
|
|
5
|
+
} from "../../chunk-CO6V4G7P.mjs";
|
|
6
6
|
import "../../chunk-LHERIF3L.mjs";
|
|
7
7
|
import "../../chunk-HE22TZMF.mjs";
|
|
8
|
-
import "../../chunk-PMWUKW3Z.mjs";
|
|
9
|
-
import "../../chunk-YCG6SNAU.mjs";
|
|
10
|
-
import "../../chunk-PIF5KJYI.mjs";
|
|
11
8
|
import "../../chunk-RKTVJRK7.mjs";
|
|
9
|
+
import "../../chunk-PMAFHQ7P.mjs";
|
|
12
10
|
import "../../chunk-CYDWEPFL.mjs";
|
|
13
|
-
import "../../chunk-ICIK2BSB.mjs";
|
|
14
11
|
import "../../chunk-2IDV5OHF.mjs";
|
|
12
|
+
import "../../chunk-ICIK2BSB.mjs";
|
|
15
13
|
import "../../chunk-YYN33GSG.mjs";
|
|
16
|
-
import "../../chunk-PMAFHQ7P.mjs";
|
|
17
14
|
import "../../chunk-6PUNP7CD.mjs";
|
|
18
15
|
import "../../chunk-O7ARI5CV.mjs";
|
|
19
16
|
import "../../chunk-QNUAXSDP.mjs";
|
|
@@ -1,12 +1,232 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "../../chunk-
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
DeveloperConsoleModal
|
|
4
|
+
} from "../../chunk-YCG6SNAU.mjs";
|
|
5
|
+
import {
|
|
6
|
+
CopilotKitIcon
|
|
7
|
+
} from "../../chunk-PIF5KJYI.mjs";
|
|
8
|
+
import {
|
|
9
|
+
useCopilotContext
|
|
10
|
+
} from "../../chunk-AFNWX62Q.mjs";
|
|
8
11
|
import "../../chunk-DMLQZG75.mjs";
|
|
9
12
|
import "../../chunk-SKC7AJIV.mjs";
|
|
13
|
+
|
|
14
|
+
// src/components/dev-console/console-trigger.tsx
|
|
15
|
+
import { useState, useEffect, useRef } from "react";
|
|
16
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
17
|
+
var INSPECTOR_HIDE_KEY = "cpk:inspector:hidden";
|
|
18
|
+
function ConsoleTrigger({ position = "bottom-right" }) {
|
|
19
|
+
const context = useCopilotContext();
|
|
20
|
+
const hasApiKey = Boolean(context.copilotApiConfig.publicApiKey);
|
|
21
|
+
const [isModalOpen, setIsModalOpen] = useState(false);
|
|
22
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
23
|
+
const [isDragging, setIsDragging] = useState(false);
|
|
24
|
+
const [buttonPosition, setButtonPosition] = useState(null);
|
|
25
|
+
const [mounted, setMounted] = useState(false);
|
|
26
|
+
const [isHidden, setIsHidden] = useState(false);
|
|
27
|
+
const dragRef = useRef(null);
|
|
28
|
+
const buttonRef = useRef(null);
|
|
29
|
+
useEffect(() => {
|
|
30
|
+
setMounted(true);
|
|
31
|
+
try {
|
|
32
|
+
const hidden = typeof window !== "undefined" ? localStorage.getItem(INSPECTOR_HIDE_KEY) : null;
|
|
33
|
+
if (hidden === "1" || hidden === "true") {
|
|
34
|
+
setIsHidden(true);
|
|
35
|
+
}
|
|
36
|
+
} catch (e) {
|
|
37
|
+
}
|
|
38
|
+
if (typeof window !== "undefined" && !buttonPosition) {
|
|
39
|
+
const buttonSize = 60;
|
|
40
|
+
const margin = 24;
|
|
41
|
+
const initialPosition = {
|
|
42
|
+
x: margin,
|
|
43
|
+
y: window.innerHeight - buttonSize - margin
|
|
44
|
+
};
|
|
45
|
+
setButtonPosition(initialPosition);
|
|
46
|
+
}
|
|
47
|
+
}, [position]);
|
|
48
|
+
const handleMouseDown = (e) => {
|
|
49
|
+
e.preventDefault();
|
|
50
|
+
if (!buttonPosition)
|
|
51
|
+
return;
|
|
52
|
+
dragRef.current = {
|
|
53
|
+
startX: e.clientX,
|
|
54
|
+
startY: e.clientY,
|
|
55
|
+
buttonX: buttonPosition.x,
|
|
56
|
+
buttonY: buttonPosition.y
|
|
57
|
+
};
|
|
58
|
+
setIsDragging(true);
|
|
59
|
+
};
|
|
60
|
+
useEffect(() => {
|
|
61
|
+
if (!isDragging)
|
|
62
|
+
return;
|
|
63
|
+
const handleMouseMove = (e) => {
|
|
64
|
+
e.preventDefault();
|
|
65
|
+
e.stopPropagation();
|
|
66
|
+
if (!dragRef.current)
|
|
67
|
+
return;
|
|
68
|
+
const deltaX = e.clientX - dragRef.current.startX;
|
|
69
|
+
const deltaY = e.clientY - dragRef.current.startY;
|
|
70
|
+
let newX = dragRef.current.buttonX + deltaX;
|
|
71
|
+
let newY = dragRef.current.buttonY + deltaY;
|
|
72
|
+
newX = Math.max(0, Math.min(newX, window.innerWidth - 60));
|
|
73
|
+
newY = Math.max(0, Math.min(newY, window.innerHeight - 60));
|
|
74
|
+
setButtonPosition({ x: newX, y: newY });
|
|
75
|
+
};
|
|
76
|
+
const handleMouseUp = (e) => {
|
|
77
|
+
e.preventDefault();
|
|
78
|
+
e.stopPropagation();
|
|
79
|
+
setIsDragging(false);
|
|
80
|
+
dragRef.current = null;
|
|
81
|
+
};
|
|
82
|
+
document.addEventListener("mousemove", handleMouseMove, { capture: true, passive: false });
|
|
83
|
+
document.addEventListener("mouseup", handleMouseUp, { capture: true, passive: false });
|
|
84
|
+
return () => {
|
|
85
|
+
document.removeEventListener("mousemove", handleMouseMove, { capture: true });
|
|
86
|
+
document.removeEventListener("mouseup", handleMouseUp, { capture: true });
|
|
87
|
+
};
|
|
88
|
+
}, [isDragging]);
|
|
89
|
+
if (!mounted || !buttonPosition || isHidden) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
93
|
+
/* @__PURE__ */ jsxs(
|
|
94
|
+
"button",
|
|
95
|
+
{
|
|
96
|
+
ref: buttonRef,
|
|
97
|
+
onClick: (e) => {
|
|
98
|
+
if (!isDragging) {
|
|
99
|
+
if (e.metaKey || e.altKey) {
|
|
100
|
+
try {
|
|
101
|
+
localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
|
|
102
|
+
} catch (e2) {
|
|
103
|
+
}
|
|
104
|
+
setIsHidden(true);
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
setIsModalOpen(true);
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
onContextMenu: (e) => {
|
|
111
|
+
e.preventDefault();
|
|
112
|
+
try {
|
|
113
|
+
localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
|
|
114
|
+
} catch (e2) {
|
|
115
|
+
}
|
|
116
|
+
setIsHidden(true);
|
|
117
|
+
},
|
|
118
|
+
onMouseDown: handleMouseDown,
|
|
119
|
+
onMouseEnter: () => setIsHovered(true),
|
|
120
|
+
onMouseLeave: () => setIsHovered(false),
|
|
121
|
+
style: {
|
|
122
|
+
position: "fixed",
|
|
123
|
+
left: `${buttonPosition.x}px`,
|
|
124
|
+
top: `${buttonPosition.y}px`,
|
|
125
|
+
zIndex: 2147483647,
|
|
126
|
+
width: "60px",
|
|
127
|
+
height: "60px",
|
|
128
|
+
background: isDragging ? "#000000" : isHovered ? "#111111" : "#000000",
|
|
129
|
+
color: "white",
|
|
130
|
+
borderRadius: "50%",
|
|
131
|
+
boxShadow: isDragging ? "0 8px 32px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4)" : isHovered ? "0 12px 40px rgba(0, 0, 0, 0.7), 0 6px 20px rgba(0, 0, 0, 0.5)" : "0 6px 20px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.3)",
|
|
132
|
+
transition: isDragging ? "none" : "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
133
|
+
display: "flex",
|
|
134
|
+
alignItems: "center",
|
|
135
|
+
justifyContent: "center",
|
|
136
|
+
border: "none",
|
|
137
|
+
cursor: isDragging ? "grabbing" : "grab",
|
|
138
|
+
opacity: 1,
|
|
139
|
+
userSelect: "none",
|
|
140
|
+
transform: isDragging ? "scale(1.05)" : isHovered ? "scale(1.1)" : "scale(1)",
|
|
141
|
+
backdropFilter: "blur(10px)",
|
|
142
|
+
pointerEvents: "auto",
|
|
143
|
+
isolation: "isolate"
|
|
144
|
+
},
|
|
145
|
+
title: hasApiKey ? "Open Inspector (Drag to move)" : "Inspector (License Key Required, Drag to move)",
|
|
146
|
+
children: [
|
|
147
|
+
/* @__PURE__ */ jsx(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
onClick: (e) => {
|
|
151
|
+
e.preventDefault();
|
|
152
|
+
e.stopPropagation();
|
|
153
|
+
try {
|
|
154
|
+
localStorage.setItem(INSPECTOR_HIDE_KEY, "1");
|
|
155
|
+
} catch (e2) {
|
|
156
|
+
}
|
|
157
|
+
setIsHidden(true);
|
|
158
|
+
},
|
|
159
|
+
style: {
|
|
160
|
+
position: "absolute",
|
|
161
|
+
bottom: "2px",
|
|
162
|
+
right: "2px",
|
|
163
|
+
width: "20px",
|
|
164
|
+
height: "20px",
|
|
165
|
+
borderRadius: "50%",
|
|
166
|
+
background: "#ffffff",
|
|
167
|
+
color: "#ef4444",
|
|
168
|
+
fontSize: "14px",
|
|
169
|
+
lineHeight: "18px",
|
|
170
|
+
textAlign: "center",
|
|
171
|
+
boxShadow: "0 2px 6px rgba(0,0,0,0.35)",
|
|
172
|
+
cursor: "pointer",
|
|
173
|
+
border: "1px solid #e5e7eb",
|
|
174
|
+
display: "flex",
|
|
175
|
+
alignItems: "center",
|
|
176
|
+
justifyContent: "center",
|
|
177
|
+
zIndex: 1
|
|
178
|
+
},
|
|
179
|
+
title: "Hide Inspector",
|
|
180
|
+
children: "\xD7"
|
|
181
|
+
}
|
|
182
|
+
),
|
|
183
|
+
/* @__PURE__ */ jsx(
|
|
184
|
+
"div",
|
|
185
|
+
{
|
|
186
|
+
style: {
|
|
187
|
+
width: "28px",
|
|
188
|
+
height: "28px",
|
|
189
|
+
display: "flex",
|
|
190
|
+
alignItems: "center",
|
|
191
|
+
justifyContent: "center",
|
|
192
|
+
filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"
|
|
193
|
+
},
|
|
194
|
+
children: /* @__PURE__ */ jsx(CopilotKitIcon, {})
|
|
195
|
+
}
|
|
196
|
+
),
|
|
197
|
+
!hasApiKey && /* @__PURE__ */ jsx(
|
|
198
|
+
"div",
|
|
199
|
+
{
|
|
200
|
+
style: {
|
|
201
|
+
position: "absolute",
|
|
202
|
+
top: "-2px",
|
|
203
|
+
right: "-2px",
|
|
204
|
+
width: "18px",
|
|
205
|
+
height: "18px",
|
|
206
|
+
background: "linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%)",
|
|
207
|
+
borderRadius: "50%",
|
|
208
|
+
display: "flex",
|
|
209
|
+
alignItems: "center",
|
|
210
|
+
justifyContent: "center",
|
|
211
|
+
boxShadow: "0 2px 8px rgba(255, 107, 107, 0.4)",
|
|
212
|
+
border: "2px solid white"
|
|
213
|
+
},
|
|
214
|
+
children: /* @__PURE__ */ jsx("span", { style: { fontSize: "10px", color: "white", fontWeight: "bold" }, children: "!" })
|
|
215
|
+
}
|
|
216
|
+
)
|
|
217
|
+
]
|
|
218
|
+
}
|
|
219
|
+
),
|
|
220
|
+
/* @__PURE__ */ jsx(
|
|
221
|
+
DeveloperConsoleModal,
|
|
222
|
+
{
|
|
223
|
+
isOpen: isModalOpen,
|
|
224
|
+
onClose: () => setIsModalOpen(false),
|
|
225
|
+
hasApiKey
|
|
226
|
+
}
|
|
227
|
+
)
|
|
228
|
+
] });
|
|
229
|
+
}
|
|
10
230
|
export {
|
|
11
231
|
ConsoleTrigger
|
|
12
232
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
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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