@copilotkit/react-ui 1.7.2-next.2 → 1.8.0-next.4
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 +21 -0
- package/dist/{chunk-CBBFRI3Q.mjs → chunk-5JY5QJ2W.mjs} +9 -5
- package/dist/chunk-5JY5QJ2W.mjs.map +1 -0
- package/dist/{chunk-OFYI4UU4.mjs → chunk-7RIBDD4K.mjs} +19 -3
- package/dist/chunk-7RIBDD4K.mjs.map +1 -0
- package/dist/{chunk-AELKLZSG.mjs → chunk-AIR3MXUU.mjs} +12 -12
- package/dist/{chunk-YAGE7RCE.mjs → chunk-CGVOCLHN.mjs} +2 -2
- package/dist/{chunk-DLG7BZTA.mjs → chunk-CZUP2N4J.mjs} +2 -2
- package/dist/chunk-FBYETUFL.mjs +118 -0
- package/dist/chunk-FBYETUFL.mjs.map +1 -0
- package/dist/chunk-GIPO7UB2.mjs +24 -0
- package/dist/chunk-GIPO7UB2.mjs.map +1 -0
- package/dist/{chunk-6FTRYYR5.mjs → chunk-GJME6MK4.mjs} +72 -62
- package/dist/chunk-GJME6MK4.mjs.map +1 -0
- package/dist/{chunk-QXQDIFOC.mjs → chunk-H24B7QWO.mjs} +49 -38
- package/dist/chunk-H24B7QWO.mjs.map +1 -0
- package/dist/{chunk-QXTRFMPM.mjs → chunk-LYHZXHTJ.mjs} +15 -12
- package/dist/chunk-LYHZXHTJ.mjs.map +1 -0
- package/dist/chunk-ORSMX3SE.mjs +244 -0
- package/dist/chunk-ORSMX3SE.mjs.map +1 -0
- package/dist/{chunk-UPTB2MVO.mjs → chunk-PCTCOQK2.mjs} +4 -10
- package/dist/chunk-PCTCOQK2.mjs.map +1 -0
- package/dist/{chunk-ZIF5JJCH.mjs → chunk-QQ4FBIGN.mjs} +30 -59
- package/dist/chunk-QQ4FBIGN.mjs.map +1 -0
- package/dist/{chunk-R2O33F44.mjs → chunk-TFIQA2P5.mjs} +2 -2
- package/dist/{chunk-WGAZXTUA.mjs → chunk-TOQ7P4DO.mjs} +6 -9
- package/dist/chunk-TOQ7P4DO.mjs.map +1 -0
- package/dist/{chunk-3XAXY2Z3.mjs → chunk-UZTZXMYS.mjs} +2 -2
- package/dist/{chunk-RQNJNK2W.mjs → chunk-VC4NO5QZ.mjs} +2 -2
- package/dist/{chunk-YQ3D5IQV.mjs → chunk-XNQO5AZZ.mjs} +2 -5
- package/dist/chunk-XNQO5AZZ.mjs.map +1 -0
- package/dist/chunk-YC4NBUGE.mjs +97 -0
- package/dist/chunk-YC4NBUGE.mjs.map +1 -0
- package/dist/components/chat/Button.js.map +1 -1
- package/dist/components/chat/Button.mjs +3 -3
- package/dist/components/chat/Chat.d.ts +17 -1
- package/dist/components/chat/Chat.js +380 -906
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +11 -18
- package/dist/components/chat/ChatContext.d.ts +20 -0
- package/dist/components/chat/ChatContext.js +44 -74
- package/dist/components/chat/ChatContext.js.map +1 -1
- package/dist/components/chat/ChatContext.mjs +2 -2
- package/dist/components/chat/CodeBlock.js +58 -82
- package/dist/components/chat/CodeBlock.js.map +1 -1
- package/dist/components/chat/CodeBlock.mjs +2 -2
- package/dist/components/chat/Header.js +516 -4
- package/dist/components/chat/Header.js.map +1 -1
- package/dist/components/chat/Header.mjs +10 -3
- package/dist/components/chat/Icons.d.ts +10 -9
- package/dist/components/chat/Icons.js +125 -164
- package/dist/components/chat/Icons.js.map +1 -1
- package/dist/components/chat/Icons.mjs +9 -5
- package/dist/components/chat/Input.d.ts +1 -1
- package/dist/components/chat/Input.js +13 -10
- package/dist/components/chat/Input.js.map +1 -1
- package/dist/components/chat/Input.mjs +3 -3
- package/dist/components/chat/Markdown.js +58 -56
- package/dist/components/chat/Markdown.js.map +1 -1
- package/dist/components/chat/Markdown.mjs +3 -3
- package/dist/components/chat/Messages.d.ts +1 -1
- package/dist/components/chat/Messages.js +70 -60
- package/dist/components/chat/Messages.js.map +1 -1
- package/dist/components/chat/Messages.mjs +3 -3
- package/dist/components/chat/Modal.js +1709 -1749
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +20 -20
- package/dist/components/chat/Popup.js +1709 -1749
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +21 -21
- package/dist/components/chat/Response.js.map +1 -1
- package/dist/components/chat/Response.mjs +3 -3
- package/dist/components/chat/Sidebar.js +1711 -1751
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +21 -21
- package/dist/components/chat/Suggestion.js +4 -40
- package/dist/components/chat/Suggestion.js.map +1 -1
- package/dist/components/chat/Suggestion.mjs +2 -2
- package/dist/components/chat/Window.js.map +1 -1
- package/dist/components/chat/Window.mjs +3 -3
- package/dist/components/chat/index.js +1711 -1751
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +24 -24
- package/dist/components/chat/messages/AssistantMessage.js +211 -59
- package/dist/components/chat/messages/AssistantMessage.js.map +1 -1
- package/dist/components/chat/messages/AssistantMessage.mjs +5 -5
- package/dist/components/chat/messages/RenderTextMessage.js +18 -2
- package/dist/components/chat/messages/RenderTextMessage.js.map +1 -1
- package/dist/components/chat/messages/RenderTextMessage.mjs +1 -1
- package/dist/components/chat/props.d.ts +53 -0
- package/dist/components/chat/props.js.map +1 -1
- package/dist/components/crew/index.mjs +1 -1
- package/dist/components/dev-console/console.js +51 -233
- package/dist/components/dev-console/console.js.map +1 -1
- package/dist/components/dev-console/console.mjs +5 -5
- package/dist/components/dev-console/index.js +51 -233
- package/dist/components/dev-console/index.js.map +1 -1
- package/dist/components/dev-console/index.mjs +5 -5
- package/dist/components/help-modal/index.js +29 -147
- package/dist/components/help-modal/index.js.map +1 -1
- package/dist/components/help-modal/index.mjs +1 -1
- package/dist/components/help-modal/modal.js +29 -147
- package/dist/components/help-modal/modal.js.map +1 -1
- package/dist/components/help-modal/modal.mjs +1 -1
- package/dist/components/index.js +1685 -1725
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +30 -30
- package/dist/index.css +266 -98
- package/dist/index.css.map +1 -1
- package/dist/index.js +1694 -1734
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +30 -30
- package/dist/types/css.d.ts +6 -5
- package/dist/types/css.js.map +1 -1
- package/package.json +4 -4
- package/src/components/chat/Chat.tsx +59 -22
- package/src/components/chat/ChatContext.tsx +29 -1
- package/src/components/chat/CodeBlock.tsx +2 -4
- package/src/components/chat/Header.tsx +8 -3
- package/src/components/chat/Icons.tsx +108 -108
- package/src/components/chat/Input.tsx +47 -38
- package/src/components/chat/Markdown.tsx +0 -3
- package/src/components/chat/Messages.tsx +68 -56
- package/src/components/chat/Suggestion.tsx +2 -3
- package/src/components/chat/messages/AssistantMessage.tsx +95 -3
- package/src/components/chat/messages/RenderTextMessage.tsx +17 -1
- package/src/components/chat/props.ts +66 -0
- package/src/components/dev-console/console.tsx +16 -54
- package/src/components/help-modal/modal.tsx +38 -101
- package/src/css/button.css +15 -4
- package/src/css/colors.css +56 -10
- package/src/css/console.css +46 -39
- package/src/css/header.css +23 -6
- package/src/css/input.css +35 -19
- package/src/css/markdown.css +2 -1
- package/src/css/messages.css +126 -16
- package/src/css/panel.css +1 -0
- package/src/css/suggestions.css +14 -6
- package/src/types/css.ts +6 -5
- package/dist/chunk-3VNMQWGT.mjs +0 -25
- package/dist/chunk-3VNMQWGT.mjs.map +0 -1
- package/dist/chunk-6FTRYYR5.mjs.map +0 -1
- package/dist/chunk-CBBFRI3Q.mjs.map +0 -1
- package/dist/chunk-FZC7X5PK.mjs +0 -262
- package/dist/chunk-FZC7X5PK.mjs.map +0 -1
- package/dist/chunk-OFYI4UU4.mjs.map +0 -1
- package/dist/chunk-QXQDIFOC.mjs.map +0 -1
- package/dist/chunk-QXTRFMPM.mjs.map +0 -1
- package/dist/chunk-TI7SY2RI.mjs +0 -164
- package/dist/chunk-TI7SY2RI.mjs.map +0 -1
- package/dist/chunk-UPTB2MVO.mjs.map +0 -1
- package/dist/chunk-VEC45H6Q.mjs +0 -18
- package/dist/chunk-VEC45H6Q.mjs.map +0 -1
- package/dist/chunk-WGAZXTUA.mjs.map +0 -1
- package/dist/chunk-YQ3D5IQV.mjs.map +0 -1
- package/dist/chunk-ZIF5JJCH.mjs.map +0 -1
- /package/dist/{chunk-AELKLZSG.mjs.map → chunk-AIR3MXUU.mjs.map} +0 -0
- /package/dist/{chunk-YAGE7RCE.mjs.map → chunk-CGVOCLHN.mjs.map} +0 -0
- /package/dist/{chunk-DLG7BZTA.mjs.map → chunk-CZUP2N4J.mjs.map} +0 -0
- /package/dist/{chunk-R2O33F44.mjs.map → chunk-TFIQA2P5.mjs.map} +0 -0
- /package/dist/{chunk-3XAXY2Z3.mjs.map → chunk-UZTZXMYS.mjs.map} +0 -0
- /package/dist/{chunk-RQNJNK2W.mjs.map → chunk-VC4NO5QZ.mjs.map} +0 -0
|
@@ -1,73 +1,58 @@
|
|
|
1
|
-
import React, { useMemo, useState } from "react";
|
|
2
|
-
import { CloseIcon
|
|
1
|
+
import React, { useMemo, useState, useRef, useEffect } from "react";
|
|
2
|
+
import { CloseIcon } from "./icons";
|
|
3
3
|
|
|
4
4
|
export function CopilotKitHelpModal() {
|
|
5
5
|
const [showHelpModal, setShowHelpModal] = useState(false);
|
|
6
|
-
const
|
|
7
|
-
const
|
|
8
|
-
const [emailError, setEmailError] = useState("");
|
|
9
|
-
const [submitting, setSubmitting] = useState(false);
|
|
6
|
+
const buttonRef = useRef<HTMLButtonElement>(null);
|
|
7
|
+
const popoverRef = useRef<HTMLDivElement>(null);
|
|
10
8
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
9
|
+
// Close popover when clicking outside
|
|
10
|
+
useEffect(() => {
|
|
11
|
+
const handleClickOutside = (event: MouseEvent) => {
|
|
12
|
+
if (
|
|
13
|
+
popoverRef.current &&
|
|
14
|
+
!popoverRef.current.contains(event.target as Node) &&
|
|
15
|
+
buttonRef.current &&
|
|
16
|
+
!buttonRef.current.contains(event.target as Node)
|
|
17
|
+
) {
|
|
18
|
+
setShowHelpModal(false);
|
|
19
|
+
}
|
|
20
|
+
};
|
|
15
21
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
if (email?.length > 0 && !validateEmail(email)) {
|
|
20
|
-
setEmailError("Please enter a valid email address");
|
|
21
|
-
return;
|
|
22
|
+
if (showHelpModal) {
|
|
23
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
22
24
|
}
|
|
23
|
-
setSubmitting(true);
|
|
24
|
-
|
|
25
|
-
await fetch("https://api.segment.io/v1/track", {
|
|
26
|
-
method: "POST",
|
|
27
|
-
headers: {
|
|
28
|
-
"Content-Type": "application/json",
|
|
29
|
-
},
|
|
30
|
-
body: JSON.stringify({
|
|
31
|
-
event: "oss.dev-console.help",
|
|
32
|
-
anonymousId: window.crypto.randomUUID(),
|
|
33
|
-
properties: { email, text: issueDescription },
|
|
34
|
-
writeKey: "q0gQqvGYyw9pNyhIocNzefSYKGO1aiwW",
|
|
35
|
-
}),
|
|
36
|
-
});
|
|
37
25
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
setSubmitting(false);
|
|
43
|
-
setShowHelpModal(false);
|
|
44
|
-
};
|
|
26
|
+
return () => {
|
|
27
|
+
document.removeEventListener("mousedown", handleClickOutside);
|
|
28
|
+
};
|
|
29
|
+
}, [showHelpModal]);
|
|
45
30
|
|
|
46
31
|
const HelpButton = () => (
|
|
47
32
|
<button
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
className="
|
|
33
|
+
ref={buttonRef}
|
|
34
|
+
onClick={() => setShowHelpModal(!showHelpModal)}
|
|
35
|
+
className="copilotKitDebugMenuTriggerButton relative"
|
|
51
36
|
aria-label="Open Help"
|
|
52
37
|
>
|
|
53
38
|
Help
|
|
54
39
|
</button>
|
|
55
40
|
);
|
|
56
41
|
|
|
57
|
-
const submitButtonDisabled = useMemo(
|
|
58
|
-
() => submitting || !!emailError || issueDescription == null || issueDescription?.length == 0,
|
|
59
|
-
[submitting, emailError, issueDescription],
|
|
60
|
-
);
|
|
61
|
-
|
|
62
42
|
return (
|
|
63
|
-
|
|
43
|
+
<div className="relative">
|
|
64
44
|
<HelpButton />
|
|
65
45
|
{showHelpModal && (
|
|
66
46
|
<div
|
|
67
|
-
|
|
68
|
-
|
|
47
|
+
ref={popoverRef}
|
|
48
|
+
className="absolute mt-2 z-50"
|
|
49
|
+
style={{
|
|
50
|
+
top: "100%",
|
|
51
|
+
right: "-120px",
|
|
52
|
+
width: "380px",
|
|
53
|
+
}}
|
|
69
54
|
>
|
|
70
|
-
<div className="bg-white rounded-lg shadow-xl
|
|
55
|
+
<div className="bg-white rounded-lg shadow-xl w-full p-4 flex-col relative">
|
|
71
56
|
<button
|
|
72
57
|
className="absolute text-gray-400 hover:text-gray-600 focus:outline-none"
|
|
73
58
|
style={{ top: "10px", right: "10px" }}
|
|
@@ -80,7 +65,7 @@ export function CopilotKitHelpModal() {
|
|
|
80
65
|
<h2 className="text-2xl font-bold">Help Options</h2>
|
|
81
66
|
</div>
|
|
82
67
|
<div className="space-y-4 mb-4">
|
|
83
|
-
<div className="
|
|
68
|
+
<div className="copilotKitHelpItemButton">
|
|
84
69
|
<a
|
|
85
70
|
href="https://docs.copilotkit.ai/coagents/troubleshooting/common-issues"
|
|
86
71
|
target="_blank"
|
|
@@ -89,7 +74,7 @@ export function CopilotKitHelpModal() {
|
|
|
89
74
|
Visit the Troubleshooting and FAQ section in the docs
|
|
90
75
|
</a>
|
|
91
76
|
</div>
|
|
92
|
-
<div className="
|
|
77
|
+
<div className="copilotKitHelpItemButton">
|
|
93
78
|
<a
|
|
94
79
|
href="https://go.copilotkit.ai/dev-console-support-discord"
|
|
95
80
|
target="_blank"
|
|
@@ -98,7 +83,7 @@ export function CopilotKitHelpModal() {
|
|
|
98
83
|
Go to Discord Support Channel (Community Support)
|
|
99
84
|
</a>
|
|
100
85
|
</div>
|
|
101
|
-
<div className="
|
|
86
|
+
<div className="copilotKitHelpItemButton">
|
|
102
87
|
<a
|
|
103
88
|
href="https://go.copilotkit.ai/dev-console-support-slack"
|
|
104
89
|
target="_blank"
|
|
@@ -108,57 +93,9 @@ export function CopilotKitHelpModal() {
|
|
|
108
93
|
</a>
|
|
109
94
|
</div>
|
|
110
95
|
</div>
|
|
111
|
-
<form onSubmit={handleSubmit} className="flex flex-col space-y-2">
|
|
112
|
-
<div>
|
|
113
|
-
<label htmlFor="feedback" className="block text-sm font-medium text-gray-700 mb-1">
|
|
114
|
-
Let us know what your issue is:
|
|
115
|
-
</label>
|
|
116
|
-
<textarea
|
|
117
|
-
id="feedback"
|
|
118
|
-
rows={4}
|
|
119
|
-
className="w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500"
|
|
120
|
-
placeholder="A Loom link / screen recording is always great!"
|
|
121
|
-
onChange={(e) => setIssueDescription(e.target.value)}
|
|
122
|
-
value={issueDescription}
|
|
123
|
-
required
|
|
124
|
-
></textarea>
|
|
125
|
-
</div>
|
|
126
|
-
<div>
|
|
127
|
-
<label htmlFor="email" className="block text-sm font-medium text-gray-700 mb-1">
|
|
128
|
-
Email (optional):
|
|
129
|
-
</label>
|
|
130
|
-
<input
|
|
131
|
-
type="email"
|
|
132
|
-
id="email"
|
|
133
|
-
className={`w-full px-3 py-2 text-gray-700 border rounded-lg focus:outline-none focus:border-blue-500 ${emailError ? "border-red-500" : ""}`}
|
|
134
|
-
placeholder="Enter your email for follow-up"
|
|
135
|
-
onChange={(e) => {
|
|
136
|
-
setEmail(e.target.value);
|
|
137
|
-
setEmailError("");
|
|
138
|
-
}}
|
|
139
|
-
value={email}
|
|
140
|
-
/>
|
|
141
|
-
{emailError && <p className="text-red-500 text-sm mt-1">{emailError}</p>}
|
|
142
|
-
</div>
|
|
143
|
-
<div className="bg-gray-50 px-4 py-4 sm:px-6 sm:flex sm:flex-row-reverse rounded-b-lg">
|
|
144
|
-
<button
|
|
145
|
-
type="submit"
|
|
146
|
-
onClick={handleSubmit}
|
|
147
|
-
disabled={submitButtonDisabled}
|
|
148
|
-
style={
|
|
149
|
-
submitButtonDisabled
|
|
150
|
-
? { backgroundColor: "rgb(216, 216, 216)", color: "rgb(129, 129, 129)" }
|
|
151
|
-
: undefined
|
|
152
|
-
}
|
|
153
|
-
className="w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-blue-500 text-base font-medium text-white hover:bg-blue-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500 sm:ml-3 sm:w-auto sm:text-sm disabled:shadow-none"
|
|
154
|
-
>
|
|
155
|
-
{submitting ? <LoadingSpinnerIcon color="white" /> : "Submit"}
|
|
156
|
-
</button>
|
|
157
|
-
</div>
|
|
158
|
-
</form>
|
|
159
96
|
</div>
|
|
160
97
|
</div>
|
|
161
98
|
)}
|
|
162
|
-
|
|
99
|
+
</div>
|
|
163
100
|
);
|
|
164
101
|
}
|
package/src/css/button.css
CHANGED
|
@@ -5,22 +5,25 @@
|
|
|
5
5
|
align-items: center;
|
|
6
6
|
justify-content: center;
|
|
7
7
|
border-radius: 50%;
|
|
8
|
-
border: 1px solid
|
|
8
|
+
border: 1px solid var(--copilot-kit-primary-color);
|
|
9
9
|
outline: none;
|
|
10
10
|
position: relative;
|
|
11
11
|
transform: scale(1);
|
|
12
|
-
transition:
|
|
12
|
+
transition: all 0.2s ease;
|
|
13
13
|
background-color: var(--copilot-kit-primary-color);
|
|
14
14
|
color: var(--copilot-kit-contrast-color);
|
|
15
15
|
cursor: pointer;
|
|
16
|
+
box-shadow: var(--copilot-kit-shadow-sm);
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
.copilotKitButton:hover {
|
|
19
|
-
transform: scale(1.
|
|
20
|
+
transform: scale(1.05);
|
|
21
|
+
box-shadow: var(--copilot-kit-shadow-md);
|
|
20
22
|
}
|
|
21
23
|
|
|
22
24
|
.copilotKitButton:active {
|
|
23
|
-
transform: scale(0.
|
|
25
|
+
transform: scale(0.95);
|
|
26
|
+
box-shadow: var(--copilot-kit-shadow-sm);
|
|
24
27
|
}
|
|
25
28
|
|
|
26
29
|
.copilotKitButtonIcon {
|
|
@@ -31,6 +34,14 @@
|
|
|
31
34
|
top: 50%;
|
|
32
35
|
left: 50%;
|
|
33
36
|
transform: translate(-50%, -50%);
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.copilotKitButtonIcon svg {
|
|
43
|
+
width: 1.5rem;
|
|
44
|
+
height: 1.5rem;
|
|
34
45
|
}
|
|
35
46
|
|
|
36
47
|
/* State when the chat is open */
|
package/src/css/colors.css
CHANGED
|
@@ -1,12 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
--copilot-kit-
|
|
1
|
+
/* Base theme variables (light mode) */
|
|
2
|
+
:root {
|
|
3
|
+
/* Semantic color tokens */
|
|
4
|
+
/* Main brand/action color - used for buttons, interactive elements */
|
|
5
|
+
--copilot-kit-primary-color: rgb(28, 28, 28);
|
|
6
|
+
/* Color that contrasts with primary - used for text on primary elements */
|
|
7
|
+
--copilot-kit-contrast-color: rgb(255, 255, 255);
|
|
8
|
+
/* Main page/container background color */
|
|
6
9
|
--copilot-kit-background-color: rgb(255 255 255);
|
|
7
|
-
|
|
8
|
-
--copilot-kit-
|
|
9
|
-
|
|
10
|
-
--copilot-kit-
|
|
11
|
-
|
|
10
|
+
/* Input box background color */
|
|
11
|
+
--copilot-kit-input-background-color: #fbfbfb;
|
|
12
|
+
/* Secondary background - used for cards, panels, elevated surfaces */
|
|
13
|
+
--copilot-kit-secondary-color: rgb(255 255 255);
|
|
14
|
+
/* Primary text color for main content */
|
|
15
|
+
--copilot-kit-secondary-contrast-color: rgb(28, 28, 28);
|
|
16
|
+
/* Border color for dividers and containers */
|
|
17
|
+
--copilot-kit-separator-color: rgb(200 200 200);
|
|
18
|
+
/* Muted color for disabled/inactive states */
|
|
19
|
+
--copilot-kit-muted-color: rgb(200 200 200);
|
|
20
|
+
|
|
21
|
+
/* Shadow tokens */
|
|
22
|
+
/* Small shadow for subtle elevation */
|
|
23
|
+
--copilot-kit-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
|
|
24
|
+
/* Medium shadow for cards */
|
|
25
|
+
--copilot-kit-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
|
|
26
|
+
/* Large shadow for modals */
|
|
27
|
+
--copilot-kit-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
12
28
|
}
|
|
29
|
+
|
|
30
|
+
/* Dark theme - based on system preference */
|
|
31
|
+
@media (prefers-color-scheme: dark) {
|
|
32
|
+
:root {
|
|
33
|
+
/* Main brand/action color - used for buttons, interactive elements */
|
|
34
|
+
--copilot-kit-primary-color: rgb(255, 255, 255);
|
|
35
|
+
/* Color that contrasts with primary - used for text on primary elements */
|
|
36
|
+
--copilot-kit-contrast-color: rgb(28, 28, 28);
|
|
37
|
+
/* Main page/container background color */
|
|
38
|
+
--copilot-kit-background-color: rgb(17, 17, 17);
|
|
39
|
+
/* Input box background color */
|
|
40
|
+
--copilot-kit-input-background-color: #2c2c2c;
|
|
41
|
+
/* Secondary background - used for cards, panels, elevated surfaces */
|
|
42
|
+
--copilot-kit-secondary-color: rgb(28, 28, 28);
|
|
43
|
+
/* Primary text color for main content */
|
|
44
|
+
--copilot-kit-secondary-contrast-color: rgb(255, 255, 255);
|
|
45
|
+
/* Border color for dividers and containers */
|
|
46
|
+
--copilot-kit-separator-color: rgb(45, 45, 45);
|
|
47
|
+
/* Muted color for disabled/inactive states */
|
|
48
|
+
--copilot-kit-muted-color: rgb(45, 45, 45);
|
|
49
|
+
|
|
50
|
+
/* Small shadow for subtle elevation */
|
|
51
|
+
--copilot-kit-shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
|
|
52
|
+
/* Medium shadow for cards */
|
|
53
|
+
--copilot-kit-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
|
|
54
|
+
/* Large shadow for modals */
|
|
55
|
+
--copilot-kit-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
package/src/css/console.css
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
.copilotKitDevConsole {
|
|
2
|
-
background-color: #f3f4f6;
|
|
3
|
-
padding-left: 10px;
|
|
4
|
-
padding-right: 10px;
|
|
5
2
|
display: flex;
|
|
6
3
|
align-items: center;
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
padding-bottom: 10px;
|
|
4
|
+
gap: 5px;
|
|
5
|
+
margin: 0 15px;
|
|
10
6
|
}
|
|
11
7
|
|
|
12
8
|
.copilotKitDevConsole.copilotKitDevConsoleWarnOutdated {
|
|
@@ -14,23 +10,20 @@
|
|
|
14
10
|
}
|
|
15
11
|
|
|
16
12
|
.copilotKitDevConsole .copilotKitVersionInfo {
|
|
17
|
-
flex: 1;
|
|
18
|
-
margin-left: 18px;
|
|
19
13
|
display: flex;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
margin-top: 10px;
|
|
14
|
+
position: absolute;
|
|
15
|
+
bottom: -25px;
|
|
16
|
+
padding: 3px 5px;
|
|
17
|
+
left: 0;
|
|
18
|
+
width: 100%;
|
|
19
|
+
justify-content: center;
|
|
20
|
+
gap: 10px;
|
|
21
|
+
font-size: 0.8rem;
|
|
22
|
+
align-items: center;
|
|
23
|
+
background: #ebb305;
|
|
31
24
|
}
|
|
32
25
|
|
|
33
|
-
.copilotKitDevConsole .copilotKitVersionInfo
|
|
26
|
+
.copilotKitDevConsole .copilotKitVersionInfo button {
|
|
34
27
|
font-size: 11px;
|
|
35
28
|
font-weight: normal;
|
|
36
29
|
font-family: monospace;
|
|
@@ -47,37 +40,33 @@
|
|
|
47
40
|
text-overflow: ellipsis;
|
|
48
41
|
}
|
|
49
42
|
|
|
50
|
-
.copilotKitDevConsole .copilotKitVersionInfo
|
|
43
|
+
.copilotKitDevConsole .copilotKitVersionInfo aside {
|
|
51
44
|
display: inline;
|
|
52
45
|
font-weight: normal;
|
|
53
46
|
color: #7f7a7a;
|
|
54
47
|
margin-left: 5px;
|
|
55
48
|
}
|
|
56
49
|
|
|
57
|
-
.copilotKitDevConsole .copilotKitVersionInfo
|
|
58
|
-
font-size: 11px;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
.copilotKitDevConsole .copilotKitVersionInfo section svg {
|
|
50
|
+
.copilotKitDevConsole .copilotKitVersionInfo svg {
|
|
62
51
|
margin-left: 3px;
|
|
63
52
|
margin-top: -3px;
|
|
64
53
|
}
|
|
65
54
|
|
|
66
|
-
.copilotKitDevConsole .
|
|
55
|
+
.copilotKitDevConsole .copilotKitDebugMenuTriggerButton {
|
|
67
56
|
font-size: 11px;
|
|
68
57
|
font-weight: bold;
|
|
69
58
|
display: flex;
|
|
70
|
-
|
|
59
|
+
padding: 0 10px;
|
|
71
60
|
height: 30px;
|
|
72
|
-
background-color:
|
|
73
|
-
border: 1px solid
|
|
74
|
-
border-radius:
|
|
61
|
+
background-color: transparent;
|
|
62
|
+
border: 1px solid var(--copilot-kit-muted-color);
|
|
63
|
+
border-radius: 20px;
|
|
75
64
|
align-items: center;
|
|
76
65
|
justify-content: center;
|
|
77
66
|
outline: none;
|
|
78
67
|
}
|
|
79
68
|
|
|
80
|
-
.
|
|
69
|
+
.copilotKitDebugMenuTriggerButton.compact {
|
|
81
70
|
width: 35px;
|
|
82
71
|
color: black;
|
|
83
72
|
justify-content: center;
|
|
@@ -85,19 +74,21 @@
|
|
|
85
74
|
font-size: 8px;
|
|
86
75
|
}
|
|
87
76
|
|
|
88
|
-
.copilotKitDevConsole .
|
|
89
|
-
background-color:
|
|
77
|
+
.copilotKitDevConsole .copilotKitDebugMenuTriggerButton:hover {
|
|
78
|
+
background-color: color-mix(in srgb, var(--copilot-kit-dev-console-bg) 95%, black);
|
|
90
79
|
}
|
|
91
80
|
|
|
92
|
-
.copilotKitDevConsole .
|
|
81
|
+
.copilotKitDevConsole .copilotKitDebugMenuTriggerButton > svg {
|
|
93
82
|
margin-left: 10px;
|
|
94
83
|
}
|
|
95
84
|
|
|
96
85
|
.copilotKitDebugMenu {
|
|
97
|
-
|
|
86
|
+
--copilot-kit-dev-console-bg: #f8f8fa;
|
|
87
|
+
--copilot-kit-dev-console-border: color-mix(in srgb, var(--copilot-kit-dev-console-bg) 80%, black);
|
|
98
88
|
margin-top: 2px;
|
|
99
89
|
border-radius: 6px;
|
|
100
|
-
|
|
90
|
+
background-color: var(--copilot-kit-dev-console-bg);
|
|
91
|
+
border: 1px solid var(--copilot-kit-dev-console-border);
|
|
101
92
|
padding: 0.25rem;
|
|
102
93
|
outline: none;
|
|
103
94
|
font-size: 13px;
|
|
@@ -117,7 +108,7 @@
|
|
|
117
108
|
}
|
|
118
109
|
|
|
119
110
|
.copilotKitDebugMenuItem:hover {
|
|
120
|
-
background-color:
|
|
111
|
+
background-color: color-mix(in srgb, var(--copilot-kit-dev-console-bg) 92%, black);
|
|
121
112
|
border-radius: 4px;
|
|
122
113
|
}
|
|
123
114
|
|
|
@@ -129,6 +120,22 @@
|
|
|
129
120
|
.copilotKitDebugMenu hr {
|
|
130
121
|
height: 1px;
|
|
131
122
|
border: none; /* Remove 3D look */
|
|
132
|
-
background-color:
|
|
123
|
+
background-color: var(--copilot-kit-dev-console-border);
|
|
133
124
|
margin: 0.25rem;
|
|
134
125
|
}
|
|
126
|
+
|
|
127
|
+
.copilotKitHelpItemButton {
|
|
128
|
+
display: block;
|
|
129
|
+
text-align: center;
|
|
130
|
+
width: 100%;
|
|
131
|
+
padding: 4px 6px;
|
|
132
|
+
border-radius: 15px;
|
|
133
|
+
font-size: 0.8rem;
|
|
134
|
+
border: 1px solid var(--copilot-kit-muted-color);
|
|
135
|
+
color: var(--copilot-kit-secondary-contrast-color);
|
|
136
|
+
box-shadow: 0 5px 5px 0px rgba(0,0,0,.01),0 2px 3px 0px rgba(0,0,0,.02);
|
|
137
|
+
background-color: var(--copilot-kit-dev-console-bg);
|
|
138
|
+
}
|
|
139
|
+
.copilotKitHelpItemButton:hover {
|
|
140
|
+
background-color: #f9f9f9;
|
|
141
|
+
}
|
package/src/css/header.css
CHANGED
|
@@ -2,23 +2,29 @@
|
|
|
2
2
|
height: 56px;
|
|
3
3
|
font-weight: 500;
|
|
4
4
|
display: flex;
|
|
5
|
-
justify-content: center;
|
|
6
5
|
align-items: center;
|
|
7
6
|
position: relative;
|
|
8
|
-
|
|
9
|
-
color: var(--copilot-kit-contrast-color);
|
|
7
|
+
color: var(--copilot-kit-primary-color);
|
|
10
8
|
border-top-left-radius: 0;
|
|
11
9
|
border-top-right-radius: 0;
|
|
12
10
|
border-bottom: 1px solid var(--copilot-kit-separator-color);
|
|
11
|
+
padding-left: 1.5rem;
|
|
12
|
+
background-color: var(--copilot-kit-contrast-color);
|
|
13
|
+
justify-content: space-between;
|
|
14
|
+
z-index: 2;
|
|
13
15
|
}
|
|
14
16
|
|
|
15
17
|
.copilotKitSidebar .copilotKitHeader {
|
|
16
18
|
border-radius: 0;
|
|
17
19
|
}
|
|
18
20
|
|
|
21
|
+
.copilotKitHeaderControls {
|
|
22
|
+
display: flex;
|
|
23
|
+
}
|
|
24
|
+
|
|
19
25
|
@media (min-width: 640px) {
|
|
20
26
|
.copilotKitHeader {
|
|
21
|
-
padding-left:
|
|
27
|
+
padding-left: 1.5rem;
|
|
22
28
|
padding-right: 24px;
|
|
23
29
|
border-top-left-radius: 8px;
|
|
24
30
|
border-top-right-radius: 8px;
|
|
@@ -27,15 +33,26 @@
|
|
|
27
33
|
|
|
28
34
|
.copilotKitHeader > button {
|
|
29
35
|
border: 0;
|
|
30
|
-
padding:
|
|
36
|
+
padding: 8px;
|
|
31
37
|
position: absolute;
|
|
32
38
|
top: 50%;
|
|
33
39
|
right: 16px;
|
|
34
40
|
transform: translateY(-50%);
|
|
35
41
|
outline: none;
|
|
36
|
-
color: var(--copilot-kit-
|
|
42
|
+
color: var(--copilot-kit-muted-color);
|
|
37
43
|
background-color: transparent;
|
|
38
44
|
cursor: pointer;
|
|
45
|
+
border-radius: 50%;
|
|
46
|
+
display: flex;
|
|
47
|
+
align-items: center;
|
|
48
|
+
justify-content: center;
|
|
49
|
+
transition: background-color 0.2s ease;
|
|
50
|
+
width: 35px;
|
|
51
|
+
height: 35px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.copilotKitHeader > button:hover {
|
|
55
|
+
color: color-mix(in srgb, var(--copilot-kit-muted-color) 80%, black);
|
|
39
56
|
}
|
|
40
57
|
|
|
41
58
|
.copilotKitHeader > button:focus {
|
package/src/css/input.css
CHANGED
|
@@ -1,20 +1,32 @@
|
|
|
1
1
|
.copilotKitInput {
|
|
2
|
-
border-top: 1px solid var(--copilot-kit-separator-color);
|
|
3
|
-
padding-left: 2rem;
|
|
4
|
-
padding-right: 1rem;
|
|
5
|
-
padding-top: 1rem;
|
|
6
|
-
padding-bottom: 1rem;
|
|
7
2
|
display: flex;
|
|
8
|
-
|
|
3
|
+
flex-direction: column;
|
|
9
4
|
cursor: text;
|
|
10
5
|
position: relative;
|
|
6
|
+
background-color: var(--copilot-kit-input-background-color);
|
|
7
|
+
border-radius: 20px;
|
|
8
|
+
border: 1px solid var(--copilot-kit-separator-color);
|
|
9
|
+
padding: 12px 14px;
|
|
10
|
+
height: 75px;
|
|
11
|
+
margin: 0 auto;
|
|
12
|
+
width: 95%;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.copilotKitInputContainer {
|
|
16
|
+
width: 100%;
|
|
17
|
+
padding: 0 0 15px 0;
|
|
18
|
+
background: var(--copilot-kit-background-color);
|
|
11
19
|
border-bottom-left-radius: 0.75rem;
|
|
12
20
|
border-bottom-right-radius: 0.75rem;
|
|
13
|
-
background-color: var(--copilot-kit-background-color);
|
|
14
21
|
}
|
|
15
22
|
|
|
16
|
-
.
|
|
17
|
-
|
|
23
|
+
.copilotKitSidebar .copilotKitInputContainer {
|
|
24
|
+
border-bottom-left-radius: 0;
|
|
25
|
+
border-bottom-right-radius: 0;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.copilotKitInputControlButton {
|
|
29
|
+
padding: 0;
|
|
18
30
|
cursor: pointer;
|
|
19
31
|
transition-property: transform;
|
|
20
32
|
transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
|
|
@@ -36,23 +48,27 @@
|
|
|
36
48
|
text-shadow: none;
|
|
37
49
|
display: inline-block;
|
|
38
50
|
text-align: center;
|
|
39
|
-
|
|
51
|
+
width: 24px;
|
|
52
|
+
height: 24px;
|
|
40
53
|
}
|
|
41
54
|
|
|
42
|
-
.
|
|
55
|
+
.copilotKitInputControlButton:not([disabled]) {
|
|
43
56
|
color: var(--copilot-kit-primary-color);
|
|
44
57
|
}
|
|
45
58
|
|
|
46
|
-
.
|
|
47
|
-
|
|
59
|
+
.copilotKitInputControlButton:not([disabled]):hover {
|
|
60
|
+
color: color-mix(in srgb, var(--copilot-kit-primary-color) 80%, black);
|
|
61
|
+
transform: scale(1.05);
|
|
48
62
|
}
|
|
49
63
|
|
|
50
|
-
.
|
|
64
|
+
.copilotKitInputControlButton[disabled] {
|
|
51
65
|
color: var(--copilot-kit-muted-color);
|
|
66
|
+
cursor: default;
|
|
52
67
|
}
|
|
53
68
|
|
|
54
69
|
.copilotKitInputControls {
|
|
55
70
|
display: flex;
|
|
71
|
+
gap: 3px;
|
|
56
72
|
}
|
|
57
73
|
|
|
58
74
|
.copilotKitInput > textarea {
|
|
@@ -66,23 +82,23 @@
|
|
|
66
82
|
-moz-osx-font-smoothing: grayscale;
|
|
67
83
|
cursor: text;
|
|
68
84
|
font-size: 0.875rem;
|
|
69
|
-
line-height: 1.
|
|
85
|
+
line-height: 1.5rem;
|
|
70
86
|
margin: 0;
|
|
71
87
|
padding: 0;
|
|
72
88
|
font-family: inherit;
|
|
73
89
|
font-weight: inherit;
|
|
74
90
|
color: var(--copilot-kit-secondary-contrast-color);
|
|
75
91
|
border: 0px;
|
|
76
|
-
background-color: var(--copilot-kit-background-color);
|
|
92
|
+
background-color: var(--copilot-kit-input-background-color);
|
|
77
93
|
}
|
|
78
94
|
|
|
79
95
|
.copilotKitInput > textarea::placeholder {
|
|
80
|
-
color:
|
|
96
|
+
color: #808080;
|
|
81
97
|
opacity: 1;
|
|
82
98
|
}
|
|
83
99
|
|
|
84
|
-
.
|
|
85
|
-
background-color:
|
|
100
|
+
.copilotKitInputControlButton.copilotKitPushToTalkRecording {
|
|
101
|
+
background-color: #ec0000;
|
|
86
102
|
color: white;
|
|
87
103
|
border-radius: 50%;
|
|
88
104
|
animation: copilotKitPulseAnimation 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
|
package/src/css/markdown.css
CHANGED
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
.copilotKitMarkdown p {
|
|
46
46
|
padding: 0px;
|
|
47
47
|
margin: 0px;
|
|
48
|
+
line-height: 1.75;
|
|
49
|
+
font-size: 1rem;
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
.copilotKitMarkdown p:not(:last-child),
|
|
@@ -126,7 +128,6 @@
|
|
|
126
128
|
line-height: 1.25rem;
|
|
127
129
|
font-weight: 500;
|
|
128
130
|
height: 2.5rem;
|
|
129
|
-
width: 2.5rem;
|
|
130
131
|
padding: 3px;
|
|
131
132
|
margin: 2px;
|
|
132
133
|
}
|