@copilotkit/react-ui 1.1.2 → 1.1.3-feat-runtime-remote-actions.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 +16 -0
- package/README.md +32 -37
- package/dist/{chunk-UJHTRHS4.mjs → chunk-36OL6SEM.mjs} +3 -2
- package/dist/chunk-36OL6SEM.mjs.map +1 -0
- package/dist/{chunk-EJ4SJ2HU.mjs → chunk-AFD5I7MW.mjs} +2 -2
- package/dist/chunk-AFD5I7MW.mjs.map +1 -0
- package/dist/{chunk-WOPUCUQK.mjs → chunk-C534T3DM.mjs} +10 -11
- package/dist/{chunk-WOPUCUQK.mjs.map → chunk-C534T3DM.mjs.map} +1 -1
- package/dist/{chunk-SE6DAYSX.mjs → chunk-FLV3J3VX.mjs} +5 -5
- package/dist/chunk-FLV3J3VX.mjs.map +1 -0
- package/dist/{chunk-LLOSOTAT.mjs → chunk-FO7Z5LAL.mjs} +6 -3
- package/dist/chunk-FO7Z5LAL.mjs.map +1 -0
- package/dist/{chunk-4Z2WDXSK.mjs → chunk-FOZVHL73.mjs} +49 -4
- package/dist/chunk-FOZVHL73.mjs.map +1 -0
- package/dist/{chunk-PF5HUDUP.mjs → chunk-H7TM5JE6.mjs} +54 -2
- package/dist/chunk-H7TM5JE6.mjs.map +1 -0
- package/dist/{chunk-SWWFXRFF.mjs → chunk-HR36Y2FQ.mjs} +4 -4
- package/dist/chunk-HR36Y2FQ.mjs.map +1 -0
- package/dist/{chunk-D6QNFZXK.mjs → chunk-I4QG2ZZU.mjs} +4 -2
- package/dist/chunk-I4QG2ZZU.mjs.map +1 -0
- package/dist/{chunk-KSCXPA74.mjs → chunk-WCPLXRZX.mjs} +1 -1
- package/dist/chunk-WCPLXRZX.mjs.map +1 -0
- package/dist/{chunk-UC3Y7MWX.mjs → chunk-YOH25I6N.mjs} +5 -5
- package/dist/chunk-YOH25I6N.mjs.map +1 -0
- package/dist/components/chat/Button.d.ts +2 -1
- package/dist/components/chat/Button.js +4 -4
- package/dist/components/chat/Button.js.map +1 -1
- package/dist/components/chat/Button.mjs +1 -1
- package/dist/components/chat/Chat.d.ts +4 -49
- package/dist/components/chat/Chat.js +101 -5
- package/dist/components/chat/Chat.js.map +1 -1
- package/dist/components/chat/Chat.mjs +5 -5
- package/dist/components/chat/ChatContext.d.ts +2 -1
- package/dist/components/chat/Header.d.ts +2 -1
- package/dist/components/chat/Header.js +4 -4
- package/dist/components/chat/Header.js.map +1 -1
- package/dist/components/chat/Header.mjs +1 -1
- package/dist/components/chat/Icons.d.ts +14 -13
- package/dist/components/chat/Input.d.ts +2 -1
- package/dist/components/chat/Markdown.d.ts +3 -1
- package/dist/components/chat/Messages.d.ts +2 -1
- package/dist/components/chat/Messages.js +46 -2
- package/dist/components/chat/Messages.js.map +1 -1
- package/dist/components/chat/Messages.mjs +1 -1
- package/dist/components/chat/Modal.d.ts +2 -1
- package/dist/components/chat/Modal.js +114 -20
- package/dist/components/chat/Modal.js.map +1 -1
- package/dist/components/chat/Modal.mjs +9 -9
- package/dist/components/chat/Popup.d.ts +2 -48
- package/dist/components/chat/Popup.js +114 -20
- package/dist/components/chat/Popup.js.map +1 -1
- package/dist/components/chat/Popup.mjs +10 -10
- package/dist/components/chat/Response.d.ts +2 -1
- package/dist/components/chat/Sidebar.d.ts +2 -1
- package/dist/components/chat/Sidebar.js +115 -20
- package/dist/components/chat/Sidebar.js.map +1 -1
- package/dist/components/chat/Sidebar.mjs +10 -10
- package/dist/components/chat/Suggestion.d.ts +2 -1
- package/dist/components/chat/Suggestion.js.map +1 -1
- package/dist/components/chat/Suggestion.mjs +1 -1
- package/dist/components/chat/Window.d.ts +2 -1
- package/dist/components/chat/Window.js +23 -8
- package/dist/components/chat/Window.js.map +1 -1
- package/dist/components/chat/Window.mjs +3 -1
- package/dist/components/chat/index.d.ts +1 -0
- package/dist/components/chat/index.js +115 -20
- package/dist/components/chat/index.js.map +1 -1
- package/dist/components/chat/index.mjs +11 -11
- package/dist/components/chat/props.d.ts +0 -6
- package/dist/components/chat/props.js.map +1 -1
- package/dist/components/dev-console/console.d.ts +4 -2
- package/dist/components/dev-console/console.js +52 -0
- package/dist/components/dev-console/console.js.map +1 -1
- package/dist/components/dev-console/console.mjs +2 -2
- package/dist/components/dev-console/icons.d.ts +7 -5
- package/dist/components/dev-console/index.d.ts +1 -0
- package/dist/components/dev-console/index.js +52 -0
- package/dist/components/dev-console/index.js.map +1 -1
- package/dist/components/dev-console/index.mjs +2 -2
- package/dist/components/dev-console/utils.d.ts +2 -1
- package/dist/components/dev-console/utils.js +53 -0
- package/dist/components/dev-console/utils.js.map +1 -1
- package/dist/components/dev-console/utils.mjs +3 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +115 -20
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +11 -11
- package/dist/index.css +5 -4
- package/dist/index.css.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +115 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +11 -11
- package/package.json +8 -8
- package/src/components/chat/Button.tsx +4 -8
- package/src/components/chat/Chat.tsx +2 -1
- package/src/components/chat/Header.tsx +4 -4
- package/src/components/chat/Messages.tsx +83 -2
- package/src/components/chat/Modal.tsx +4 -5
- package/src/components/chat/Popup.tsx +1 -0
- package/src/components/chat/Sidebar.tsx +2 -0
- package/src/components/chat/Suggestion.tsx +2 -0
- package/src/components/chat/Window.tsx +3 -2
- package/src/components/chat/props.ts +2 -10
- package/src/components/dev-console/console.tsx +6 -0
- package/src/components/dev-console/utils.ts +56 -0
- package/src/css/markdown.css +5 -5
- package/dist/chunk-4Z2WDXSK.mjs.map +0 -1
- package/dist/chunk-D6QNFZXK.mjs.map +0 -1
- package/dist/chunk-EJ4SJ2HU.mjs.map +0 -1
- package/dist/chunk-KSCXPA74.mjs.map +0 -1
- package/dist/chunk-LLOSOTAT.mjs.map +0 -1
- package/dist/chunk-PF5HUDUP.mjs.map +0 -1
- package/dist/chunk-SE6DAYSX.mjs.map +0 -1
- package/dist/chunk-SWWFXRFF.mjs.map +0 -1
- package/dist/chunk-UC3Y7MWX.mjs.map +0 -1
- package/dist/chunk-UJHTRHS4.mjs.map +0 -1
|
@@ -2,26 +2,26 @@ import "../chunk-JD7BAH7U.mjs";
|
|
|
2
2
|
import "../chunk-MRFF7GSQ.mjs";
|
|
3
3
|
import {
|
|
4
4
|
CopilotSidebar
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-36OL6SEM.mjs";
|
|
6
6
|
import "../chunk-WB3YULQ4.mjs";
|
|
7
7
|
import {
|
|
8
8
|
CopilotPopup
|
|
9
|
-
} from "../chunk-
|
|
10
|
-
import "../chunk-
|
|
11
|
-
import "../chunk-
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
9
|
+
} from "../chunk-AFD5I7MW.mjs";
|
|
10
|
+
import "../chunk-C534T3DM.mjs";
|
|
11
|
+
import "../chunk-FO7Z5LAL.mjs";
|
|
12
|
+
import "../chunk-FLV3J3VX.mjs";
|
|
13
|
+
import "../chunk-YOH25I6N.mjs";
|
|
14
14
|
import {
|
|
15
15
|
CopilotChat
|
|
16
|
-
} from "../chunk-
|
|
16
|
+
} from "../chunk-HR36Y2FQ.mjs";
|
|
17
17
|
import "../chunk-V7W6IM2V.mjs";
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
18
|
+
import "../chunk-WCPLXRZX.mjs";
|
|
19
|
+
import "../chunk-I4QG2ZZU.mjs";
|
|
20
|
+
import "../chunk-H7TM5JE6.mjs";
|
|
21
21
|
import "../chunk-OTPAZXVR.mjs";
|
|
22
22
|
import "../chunk-U6J5DGOE.mjs";
|
|
23
23
|
import "../chunk-YQFVRDNC.mjs";
|
|
24
|
-
import "../chunk-
|
|
24
|
+
import "../chunk-FOZVHL73.mjs";
|
|
25
25
|
import "../chunk-YQ3D5IQV.mjs";
|
|
26
26
|
import "../chunk-XSUSSWDS.mjs";
|
|
27
27
|
import {
|
package/dist/index.css
CHANGED
|
@@ -478,10 +478,11 @@ html {
|
|
|
478
478
|
.copilotKitMarkdown h6 {
|
|
479
479
|
font-size: 0.8em;
|
|
480
480
|
}
|
|
481
|
-
.copilotKitMarkdown p:not(:last-child)
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
.copilotKitMarkdown
|
|
481
|
+
.copilotKitMarkdown p:not(:last-child),
|
|
482
|
+
.copilotKitMarkdown pre:not(:last-child),
|
|
483
|
+
.copilotKitMarkdown ol:not(:last-child),
|
|
484
|
+
.copilotKitMarkdown ul:not(:last-child),
|
|
485
|
+
.copilotKitMarkdown blockquote:not(:last-child) {
|
|
485
486
|
margin-bottom: 1.25em;
|
|
486
487
|
}
|
|
487
488
|
.copilotKitMarkdown blockquote {
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/css/colors.css","../src/css/popup.css","../src/css/sidebar.css","../src/css/button.css","../src/css/header.css","../src/css/input.css","../src/css/messages.css","../src/css/window.css","../src/css/animations.css","../src/css/response.css","../src/css/markdown.css","../src/css/suggestions.css","../src/css/panel.css","../src/css/console.css"],"sourcesContent":["html {\n --copilot-kit-primary-color: rgb(59 130 246);\n --copilot-kit-contrast-color: rgb(255 255 255);\n --copilot-kit-secondary-color: rgb(243 244 246);\n --copilot-kit-secondary-contrast-color: rgb(0 0 0);\n --copilot-kit-background-color: rgb(255 255 255);\n --copilot-kit-muted-color: rgb(106 106 106);\n --copilot-kit-separator-color: rgba(0, 0, 0, 0.08);\n --copilot-kit-scrollbar-color: rgba(0, 0, 0, 0.2);\n --copilot-kit-response-button-color: #333;\n --copilot-kit-response-button-background-color: #fff;\n}\n",".copilotKitPopup {\n position: fixed;\n bottom: 1rem;\n right: 1rem;\n z-index: 30;\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto,\n \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\",\n \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-feature-settings: normal;\n font-variation-settings: normal;\n touch-action: manipulation;\n}\n\n.copilotKitPopup svg {\n display: inline-block;\n vertical-align: middle;\n}\n",".copilotKitSidebar {\n position: fixed;\n bottom: 1rem;\n right: 1rem;\n z-index: 30;\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto,\n \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\",\n \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-feature-settings: normal;\n font-variation-settings: normal;\n touch-action: manipulation;\n}\n\n.copilotKitSidebar svg {\n display: inline-block;\n vertical-align: middle;\n}\n\n.copilotKitSidebarContentWrapper {\n overflow: visible;\n margin-right: 0px;\n transition: margin-right 0.3s ease;\n}\n\n@media (min-width: 640px) {\n .copilotKitSidebarContentWrapper.sidebarExpanded {\n margin-right: 28rem;\n }\n}\n",".copilotKitButton {\n width: 3.5rem;\n height: 3.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n border: 1px solid rgba(255, 255, 255, 0.2);\n outline: none;\n position: relative;\n transform: scale(1);\n transition: transform 200ms;\n background-color: var(--copilot-kit-primary-color);\n color: var(--copilot-kit-contrast-color);\n cursor: pointer;\n}\n\n.copilotKitButton:hover {\n transform: scale(1.1);\n}\n\n.copilotKitButton:active {\n transform: scale(0.75);\n}\n\n.copilotKitButtonIcon {\n transition:\n opacity 100ms,\n transform 300ms;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n/* State when the chat is open */\n.copilotKitButton.open .copilotKitButtonIconOpen {\n transform: translate(-50%, -50%) scale(0) rotate(90deg);\n opacity: 0;\n}\n\n.copilotKitButton.open .copilotKitButtonIconClose {\n transform: translate(-50%, -50%) scale(1) rotate(0deg);\n opacity: 1;\n}\n\n/* State when the chat is closed */\n.copilotKitButton:not(.open) .copilotKitButtonIconOpen {\n transform: translate(-50%, -50%) scale(1) rotate(0deg);\n opacity: 1;\n}\n\n.copilotKitButton:not(.open) .copilotKitButtonIconClose {\n transform: translate(-50%, -50%) scale(0) rotate(-90deg);\n opacity: 0;\n}\n",".copilotKitHeader {\n height: 56px;\n font-weight: 500;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n background-color: var(--copilot-kit-primary-color);\n color: var(--copilot-kit-contrast-color);\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom: 1px solid var(--copilot-kit-separator-color);\n}\n\n.copilotKitSidebar .copilotKitHeader {\n border-radius: 0;\n}\n\n@media (min-width: 640px) {\n .copilotKitHeader {\n padding-left: 24px;\n padding-right: 24px;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n }\n}\n\n.copilotKitHeader > button {\n border: 0;\n padding: 0px;\n position: absolute;\n top: 50%;\n right: 16px;\n transform: translateY(-50%);\n outline: none;\n color: var(--copilot-kit-contrast-color);\n background-color: transparent;\n cursor: pointer;\n}\n\n.copilotKitHeader > button:focus {\n outline: none;\n}\n",".copilotKitInput {\n border-top: 1px solid var(--copilot-kit-separator-color);\n padding-left: 2rem;\n padding-right: 1rem;\n padding-top: 1rem;\n padding-bottom: 1rem;\n display: flex;\n align-items: center;\n cursor: text;\n position: relative;\n border-bottom-left-radius: 0.75rem;\n border-bottom-right-radius: 0.75rem;\n background-color: var(--copilot-kit-background-color);\n}\n\n.copilotKitInput > .copilotKitInputControls > button {\n padding: 0.25rem;\n cursor: pointer;\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 200ms;\n transform: scale(1);\n color: rgba(0, 0, 0, 0.25);\n -webkit-appearance: button;\n appearance: button;\n background-color: transparent;\n background-image: none;\n text-transform: none;\n font-family: inherit;\n font-size: 100%;\n font-weight: inherit;\n line-height: inherit;\n border: 0;\n margin: 0;\n text-indent: 0px;\n text-shadow: none;\n display: inline-block;\n text-align: center;\n margin-left: 0.5rem; /* Add margin to separate button from textarea */\n}\n\n.copilotKitInput > .copilotKitInputControls > button:not([disabled]) {\n color: var(--copilot-kit-primary-color);\n}\n\n.copilotKitInput > .copilotKitInputControls > button:not([disabled]):hover {\n transform: scale(1.1);\n}\n\n.copilotKitInput > .copilotKitInputControls > button[disabled] {\n color: var(--copilot-kit-muted-color);\n}\n\n.copilotKitInputControls {\n display: flex;\n}\n\n.copilotKitInput > textarea {\n flex: 1; /* Allow textarea to take up remaining space */\n outline: 2px solid transparent;\n outline-offset: 2px;\n resize: none;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n cursor: text;\n font-size: 0.875rem;\n line-height: 1.25rem;\n margin: 0;\n padding: 0;\n font-family: inherit;\n font-weight: inherit;\n color: var(--copilot-kit-secondary-contrast-color);\n border: 0px;\n background-color: var(--copilot-kit-background-color);\n}\n\n.copilotKitInput > textarea::placeholder {\n color: var(--copilot-kit-muted-color);\n opacity: 1;\n}\n\n.copilotKitInput > .copilotKitInputControls > button.copilotKitPushToTalkRecording {\n background-color: red;\n color: white;\n border-radius: 50%;\n animation: copilotKitPulseAnimation 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n",".copilotKitMessages {\n overflow-y: scroll;\n flex: 1;\n padding: 1rem 2rem;\n display: flex;\n flex-direction: column;\n background-color: var(--copilot-kit-background-color);\n}\n\n.copilotKitMessages::-webkit-scrollbar {\n width: 9px;\n}\n\n.copilotKitMessages::-webkit-scrollbar-thumb {\n background-color: var(--copilot-kit-scrollbar-color);\n border-radius: 10rem;\n border: 2px solid var(--copilot-kit-background-color);\n}\n\n.copilotKitMessages::-webkit-scrollbar-track-piece:start {\n background: transparent;\n}\n\n.copilotKitMessages::-webkit-scrollbar-track-piece:end {\n background: transparent;\n}\n\n.copilotKitMessage {\n border-radius: 0.5rem;\n padding: 1rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n overflow-wrap: break-word;\n max-width: 80%;\n margin-bottom: 0.5rem;\n}\n\n.copilotKitMessage.copilotKitUserMessage {\n background: var(--copilot-kit-primary-color);\n color: var(--copilot-kit-contrast-color);\n margin-left: auto;\n white-space: pre-wrap;\n}\n\n.copilotKitMessage.copilotKitAssistantMessage {\n background: var(--copilot-kit-secondary-color);\n color: var(--copilot-kit-secondary-contrast-color);\n margin-right: auto;\n}\n\n.copilotKitMessage.copilotKitUserMessage + .copilotKitMessage.copilotKitAssistantMessage {\n margin-top: 1.5rem;\n}\n\n.copilotKitMessage.copilotKitAssistantMessage + .copilotKitMessage.copilotKitUserMessage {\n margin-top: 1.5rem;\n}\n\n.copilotKitCustomAssistantMessage {\n margin-top: 1.5rem;\n margin-bottom: 1.5rem;\n}\n\n.copilotKitMessage .inProgressLabel {\n margin-left: 10px;\n}\n\n.copilotKitMessages footer {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n}\n",".copilotKitWindow {\n position: fixed;\n inset: 0px;\n transform-origin: bottom;\n border-color: rgb(229 231 235);\n background-color: rgb(255 255 255);\n border-radius: 0.75rem;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;\n flex-direction: column;\n transition:\n opacity 100ms ease-out,\n transform 200ms ease-out;\n opacity: 0;\n transform: scale(0.95) translateY(20px);\n display: flex;\n pointer-events: none;\n}\n\n.copilotKitSidebar .copilotKitWindow {\n border-radius: 0;\n opacity: 1;\n transform: translateX(100%);\n}\n\n.copilotKitWindow.open {\n opacity: 1;\n transform: scale(1) translateY(0);\n pointer-events: auto;\n}\n\n.copilotKitSidebar .copilotKitWindow.open {\n transform: translateX(0);\n}\n\n@media (min-width: 640px) {\n .copilotKitWindow {\n transform-origin: bottom right;\n bottom: 5rem;\n right: 1rem;\n top: auto;\n left: auto;\n border-width: 0px;\n margin-bottom: 1rem;\n width: 24rem;\n height: 600px;\n min-height: 200px;\n max-height: calc(100% - 6rem);\n }\n\n .copilotKitSidebar .copilotKitWindow {\n bottom: 0;\n right: 0;\n top: auto;\n left: auto;\n width: 28rem;\n min-height: 100%;\n margin-bottom: 0;\n max-height: none;\n }\n}\n",".copilotKitActivityDot1 {\n animation: copilotKitActivityDotsAnimation 1.05s infinite;\n}\n.copilotKitActivityDot2 {\n animation-delay: 0.1s;\n}\n.copilotKitActivityDot3 {\n animation-delay: 0.2s;\n}\n@keyframes copilotKitActivityDotsAnimation {\n 0%,\n 57.14% {\n animation-timing-function: cubic-bezier(0.33, 0.66, 0.66, 1);\n transform: translate(0);\n }\n 28.57% {\n animation-timing-function: cubic-bezier(0.33, 0, 0.66, 0.33);\n transform: translateY(-6px);\n }\n 100% {\n transform: translate(0);\n }\n}\n\n@keyframes copilotKitSpinAnimation {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes copilotKitPulseAnimation {\n 50% {\n opacity: 0.5;\n }\n}\n",".copilotKitResponseButton {\n background-color: var(--copilot-kit-response-button-background-color);\n border: 1px solid var(--copilot-kit-separator-color);\n border-radius: 4px;\n color: var(--copilot-kit-response-button-color);\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n height: 32px;\n line-height: 30px;\n margin: 0;\n padding: 0 16px;\n text-align: center;\n text-decoration: none;\n text-transform: none;\n white-space: nowrap;\n margin-top: 15px;\n}\n\n.copilotKitResponseButton:hover {\n filter: brightness(95%);\n}\n\n.copilotKitResponseButton > span {\n margin-right: 0.5rem;\n}\n",".copilotKitMarkdown h1,\n.copilotKitMarkdown h2,\n.copilotKitMarkdown h3,\n.copilotKitMarkdown h4,\n.copilotKitMarkdown h5,\n.copilotKitMarkdown h6 {\n font-weight: bold;\n line-height: 1.2;\n}\n\n.copilotKitMarkdown h1:not(:last-child),\n.copilotKitMarkdown h2:not(:last-child),\n.copilotKitMarkdown h3:not(:last-child),\n.copilotKitMarkdown h4:not(:last-child),\n.copilotKitMarkdown h5:not(:last-child),\n.copilotKitMarkdown h6:not(:last-child) {\n margin-bottom: 1rem;\n}\n\n.copilotKitMarkdown h1 {\n font-size: 1.5em;\n}\n\n.copilotKitMarkdown h2 {\n font-size: 1.25em;\n font-weight: 600;\n}\n\n.copilotKitMarkdown h3 {\n font-size: 1.1em;\n}\n\n.copilotKitMarkdown h4 {\n font-size: 1em;\n}\n\n.copilotKitMarkdown h5 {\n font-size: 0.9em;\n}\n\n.copilotKitMarkdown h6 {\n font-size: 0.8em;\n}\n\n.copilotKitMarkdown p:not(:last-child) {\n margin-bottom: 1.25em;\n}\n\n.copilotKitMarkdown pre:not(:last-child) {\n margin-bottom: 1.25em;\n}\n\n.copilotKitMarkdown blockquote {\n border-color: rgb(142, 142, 160);\n border-left-width: 2px;\n border-left-style: solid;\n line-height: 1.2;\n padding-left: 10px;\n}\n\n.copilotKitMarkdown blockquote p {\n padding: 0.7em 0;\n}\n\n.copilotKitMarkdown ul {\n list-style-type: disc;\n padding-left: 20px;\n overflow: visible;\n}\n\n.copilotKitMarkdown li {\n list-style-type: inherit;\n list-style-position: outside;\n margin-left: 0;\n padding-left: 0;\n position: relative;\n overflow: visible;\n}\n\n.copilotKitCodeBlock {\n position: relative;\n width: 100%;\n background-color: rgb(9 9 11);\n border-radius: 0.375rem;\n}\n\n.copilotKitCodeBlockToolbar {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n background-color: rgb(39 39 42);\n padding-left: 1rem;\n padding-top: 0.09rem;\n padding-bottom: 0.09rem;\n color: rgb(228, 228, 228);\n border-top-left-radius: 0.375rem;\n border-top-right-radius: 0.375rem;\n font-family: sans-serif;\n}\n\n.copilotKitCodeBlockToolbarLanguage {\n font-size: 0.75rem;\n line-height: 1rem;\n text-transform: lowercase;\n}\n\n.copilotKitCodeBlockToolbarButtons {\n display: flex;\n align-items: center;\n margin-right: 0.25rem;\n margin-left: 0.25rem;\n}\n\n.copilotKitCodeBlockToolbarButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 0.375rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n height: 2.5rem;\n width: 2.5rem;\n padding: 3px;\n margin: 2px;\n}\n\n.copilotKitCodeBlockToolbarButton:hover {\n background-color: rgb(55, 55, 58);\n}\n",".copilotKitMessages footer .suggestions {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.copilotKitMessages footer h6 {\n font-weight: 500;\n font-size: 0.7rem;\n margin-bottom: 8px;\n}\n\n.copilotKitMessages footer .suggestions .suggestion {\n padding: 8px 12px;\n font-size: 0.7rem;\n border-radius: 0.5rem;\n background: var(--copilot-kit-primary-color);\n color: var(--copilot-kit-contrast-color);\n}\n\n.copilotKitMessages footer .suggestions button {\n transition: transform 0.3s ease;\n}\n\n.copilotKitMessages footer .suggestions button:not(:disabled):hover {\n transform: scale(1.05);\n}\n\n.copilotKitMessages footer .suggestions button:disabled {\n cursor: wait;\n}\n\n.copilotKitMessages footer .suggestions button svg {\n margin-right: 6px;\n}\n",".copilotKitChat {\n z-index: 30;\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n font-family:\n ui-sans-serif,\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n \"Segoe UI\",\n Roboto,\n \"Helvetica Neue\",\n Arial,\n \"Noto Sans\",\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\";\n font-feature-settings: normal;\n font-variation-settings: normal;\n touch-action: manipulation;\n display: flex;\n flex-direction: column;\n /* height: 100%; */\n}\n\n.copilotKitChat svg {\n display: inline-block;\n vertical-align: middle;\n}\n\n.copilotKitChat .copilotKitMessages {\n flex-grow: 1;\n}\n",".copilotKitDevConsole {\n background-color: #f3f4f6;\n padding-left: 10px;\n padding-right: 10px;\n display: flex;\n align-items: center;\n border-bottom: 1px solid #cecece;\n padding-top: 10px;\n padding-bottom: 10px;\n}\n\n.copilotKitDevConsole.copilotKitDevConsoleWarnOutdated {\n background-color: #f9caca;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo {\n flex: 1;\n margin-left: 18px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo header {\n font-size: 11px;\n font-weight: bold;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo footer {\n margin-top: 10px;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo footer button {\n font-size: 11px;\n font-weight: normal;\n font-family: monospace;\n background-color: white;\n border: 1px solid #979797;\n padding: 1px 12px;\n padding-left: 5px;\n border-radius: 4px;\n display: inline-block;\n text-align: left;\n overflow: hidden;\n white-space: nowrap;\n width: 260px;\n text-overflow: ellipsis;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo header aside {\n display: inline;\n font-weight: normal;\n color: #7f7a7a;\n margin-left: 5px;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo section {\n font-size: 11px;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo section svg {\n margin-left: 3px;\n margin-top: -3px;\n}\n\n.copilotKitDevConsole .copilotKitDebugMenuButton {\n font-size: 11px;\n font-weight: bold;\n display: flex;\n width: 90px;\n height: 30px;\n background-color: #d8d8d8;\n border: 1px solid #979797;\n border-radius: 6px;\n align-items: center;\n justify-content: center;\n outline: none;\n}\n\n.copilotKitDebugMenuButton.compact {\n width: 35px;\n color: black;\n justify-content: center;\n outline: none;\n font-size: 8px;\n}\n\n.copilotKitDevConsole .copilotKitDebugMenuButton:hover {\n background-color: #c7c7c7;\n}\n\n.copilotKitDevConsole .copilotKitDebugMenuButton > svg {\n margin-left: 10px;\n}\n\n.copilotKitDebugMenu {\n background-color: #d8d8d8;\n margin-top: 2px;\n border-radius: 6px;\n border: 1px solid #979797;\n padding: 0.25rem;\n outline: none;\n font-size: 13px;\n}\n\n.copilotKitDebugMenuItem {\n padding-top: 3px;\n padding-bottom: 3px;\n padding-left: 10px;\n padding-right: 10px;\n display: block;\n width: 100%;\n text-align: left;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.copilotKitDebugMenuItem:hover {\n background-color: #c7c7c7;\n border-radius: 4px;\n}\n\n.copilotKitDebugMenu[data-closed] {\n transform: scale(0.95); /* data-[closed]:scale-95 */\n opacity: 0; /* data-[closed]:opacity-0 */\n}\n\n.copilotKitDebugMenu hr {\n height: 1px;\n border: none; /* Remove 3D look */\n background-color: #979797; /* Set color */\n margin: 0.25rem;\n}\n"],"mappings":";AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;ACVF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;;;ACpBF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACE;AAAA;AAAA;;;AC/BJ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAGA;AACA;AACA;AACA;AAAA;AAIF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAIF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;;;ACtDF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACE;AACA;AACA;AACA;AAAA;AAAA;AAIJ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;;;ACzCF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;;;ACvFF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;;;ACvEF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;;;ACzDJ;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AAAA;AAGI;AACA;AAAA;AAAA;AAGA;AACA;AAAA;AAAA;AAGA;AAAA;AAAA;AAIJ;AAAA;AAEI;AAAA;AAAA;AAIJ;AAAA;AAEI;AAAA;AAAA;;;AChCJ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;;;ACxBF;AAAA;AAAA;AAAA;AAAA;AAAA;AAME;AACA;AAAA;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAME;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;;;ACjIF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;;;ACjCF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AACA;AACA;AACA;AACA;AAAA;AAIF;AACE;AACA;AAAA;AAGF;AACE;AAAA;;;ACpCF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;","names":[]}
|
|
1
|
+
{"version":3,"sources":["../src/css/colors.css","../src/css/popup.css","../src/css/sidebar.css","../src/css/button.css","../src/css/header.css","../src/css/input.css","../src/css/messages.css","../src/css/window.css","../src/css/animations.css","../src/css/response.css","../src/css/markdown.css","../src/css/suggestions.css","../src/css/panel.css","../src/css/console.css"],"sourcesContent":["html {\n --copilot-kit-primary-color: rgb(59 130 246);\n --copilot-kit-contrast-color: rgb(255 255 255);\n --copilot-kit-secondary-color: rgb(243 244 246);\n --copilot-kit-secondary-contrast-color: rgb(0 0 0);\n --copilot-kit-background-color: rgb(255 255 255);\n --copilot-kit-muted-color: rgb(106 106 106);\n --copilot-kit-separator-color: rgba(0, 0, 0, 0.08);\n --copilot-kit-scrollbar-color: rgba(0, 0, 0, 0.2);\n --copilot-kit-response-button-color: #333;\n --copilot-kit-response-button-background-color: #fff;\n}\n",".copilotKitPopup {\n position: fixed;\n bottom: 1rem;\n right: 1rem;\n z-index: 30;\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto,\n \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\",\n \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-feature-settings: normal;\n font-variation-settings: normal;\n touch-action: manipulation;\n}\n\n.copilotKitPopup svg {\n display: inline-block;\n vertical-align: middle;\n}\n",".copilotKitSidebar {\n position: fixed;\n bottom: 1rem;\n right: 1rem;\n z-index: 30;\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto,\n \"Helvetica Neue\", Arial, \"Noto Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\",\n \"Segoe UI Symbol\", \"Noto Color Emoji\";\n font-feature-settings: normal;\n font-variation-settings: normal;\n touch-action: manipulation;\n}\n\n.copilotKitSidebar svg {\n display: inline-block;\n vertical-align: middle;\n}\n\n.copilotKitSidebarContentWrapper {\n overflow: visible;\n margin-right: 0px;\n transition: margin-right 0.3s ease;\n}\n\n@media (min-width: 640px) {\n .copilotKitSidebarContentWrapper.sidebarExpanded {\n margin-right: 28rem;\n }\n}\n",".copilotKitButton {\n width: 3.5rem;\n height: 3.5rem;\n display: flex;\n align-items: center;\n justify-content: center;\n border-radius: 50%;\n border: 1px solid rgba(255, 255, 255, 0.2);\n outline: none;\n position: relative;\n transform: scale(1);\n transition: transform 200ms;\n background-color: var(--copilot-kit-primary-color);\n color: var(--copilot-kit-contrast-color);\n cursor: pointer;\n}\n\n.copilotKitButton:hover {\n transform: scale(1.1);\n}\n\n.copilotKitButton:active {\n transform: scale(0.75);\n}\n\n.copilotKitButtonIcon {\n transition:\n opacity 100ms,\n transform 300ms;\n position: absolute;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n\n/* State when the chat is open */\n.copilotKitButton.open .copilotKitButtonIconOpen {\n transform: translate(-50%, -50%) scale(0) rotate(90deg);\n opacity: 0;\n}\n\n.copilotKitButton.open .copilotKitButtonIconClose {\n transform: translate(-50%, -50%) scale(1) rotate(0deg);\n opacity: 1;\n}\n\n/* State when the chat is closed */\n.copilotKitButton:not(.open) .copilotKitButtonIconOpen {\n transform: translate(-50%, -50%) scale(1) rotate(0deg);\n opacity: 1;\n}\n\n.copilotKitButton:not(.open) .copilotKitButtonIconClose {\n transform: translate(-50%, -50%) scale(0) rotate(-90deg);\n opacity: 0;\n}\n",".copilotKitHeader {\n height: 56px;\n font-weight: 500;\n display: flex;\n justify-content: center;\n align-items: center;\n position: relative;\n background-color: var(--copilot-kit-primary-color);\n color: var(--copilot-kit-contrast-color);\n border-top-left-radius: 0;\n border-top-right-radius: 0;\n border-bottom: 1px solid var(--copilot-kit-separator-color);\n}\n\n.copilotKitSidebar .copilotKitHeader {\n border-radius: 0;\n}\n\n@media (min-width: 640px) {\n .copilotKitHeader {\n padding-left: 24px;\n padding-right: 24px;\n border-top-left-radius: 8px;\n border-top-right-radius: 8px;\n }\n}\n\n.copilotKitHeader > button {\n border: 0;\n padding: 0px;\n position: absolute;\n top: 50%;\n right: 16px;\n transform: translateY(-50%);\n outline: none;\n color: var(--copilot-kit-contrast-color);\n background-color: transparent;\n cursor: pointer;\n}\n\n.copilotKitHeader > button:focus {\n outline: none;\n}\n",".copilotKitInput {\n border-top: 1px solid var(--copilot-kit-separator-color);\n padding-left: 2rem;\n padding-right: 1rem;\n padding-top: 1rem;\n padding-bottom: 1rem;\n display: flex;\n align-items: center;\n cursor: text;\n position: relative;\n border-bottom-left-radius: 0.75rem;\n border-bottom-right-radius: 0.75rem;\n background-color: var(--copilot-kit-background-color);\n}\n\n.copilotKitInput > .copilotKitInputControls > button {\n padding: 0.25rem;\n cursor: pointer;\n transition-property: transform;\n transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);\n transition-duration: 200ms;\n transform: scale(1);\n color: rgba(0, 0, 0, 0.25);\n -webkit-appearance: button;\n appearance: button;\n background-color: transparent;\n background-image: none;\n text-transform: none;\n font-family: inherit;\n font-size: 100%;\n font-weight: inherit;\n line-height: inherit;\n border: 0;\n margin: 0;\n text-indent: 0px;\n text-shadow: none;\n display: inline-block;\n text-align: center;\n margin-left: 0.5rem; /* Add margin to separate button from textarea */\n}\n\n.copilotKitInput > .copilotKitInputControls > button:not([disabled]) {\n color: var(--copilot-kit-primary-color);\n}\n\n.copilotKitInput > .copilotKitInputControls > button:not([disabled]):hover {\n transform: scale(1.1);\n}\n\n.copilotKitInput > .copilotKitInputControls > button[disabled] {\n color: var(--copilot-kit-muted-color);\n}\n\n.copilotKitInputControls {\n display: flex;\n}\n\n.copilotKitInput > textarea {\n flex: 1; /* Allow textarea to take up remaining space */\n outline: 2px solid transparent;\n outline-offset: 2px;\n resize: none;\n white-space: pre-wrap;\n overflow-wrap: break-word;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n cursor: text;\n font-size: 0.875rem;\n line-height: 1.25rem;\n margin: 0;\n padding: 0;\n font-family: inherit;\n font-weight: inherit;\n color: var(--copilot-kit-secondary-contrast-color);\n border: 0px;\n background-color: var(--copilot-kit-background-color);\n}\n\n.copilotKitInput > textarea::placeholder {\n color: var(--copilot-kit-muted-color);\n opacity: 1;\n}\n\n.copilotKitInput > .copilotKitInputControls > button.copilotKitPushToTalkRecording {\n background-color: red;\n color: white;\n border-radius: 50%;\n animation: copilotKitPulseAnimation 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n",".copilotKitMessages {\n overflow-y: scroll;\n flex: 1;\n padding: 1rem 2rem;\n display: flex;\n flex-direction: column;\n background-color: var(--copilot-kit-background-color);\n}\n\n.copilotKitMessages::-webkit-scrollbar {\n width: 9px;\n}\n\n.copilotKitMessages::-webkit-scrollbar-thumb {\n background-color: var(--copilot-kit-scrollbar-color);\n border-radius: 10rem;\n border: 2px solid var(--copilot-kit-background-color);\n}\n\n.copilotKitMessages::-webkit-scrollbar-track-piece:start {\n background: transparent;\n}\n\n.copilotKitMessages::-webkit-scrollbar-track-piece:end {\n background: transparent;\n}\n\n.copilotKitMessage {\n border-radius: 0.5rem;\n padding: 1rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n overflow-wrap: break-word;\n max-width: 80%;\n margin-bottom: 0.5rem;\n}\n\n.copilotKitMessage.copilotKitUserMessage {\n background: var(--copilot-kit-primary-color);\n color: var(--copilot-kit-contrast-color);\n margin-left: auto;\n white-space: pre-wrap;\n}\n\n.copilotKitMessage.copilotKitAssistantMessage {\n background: var(--copilot-kit-secondary-color);\n color: var(--copilot-kit-secondary-contrast-color);\n margin-right: auto;\n}\n\n.copilotKitMessage.copilotKitUserMessage + .copilotKitMessage.copilotKitAssistantMessage {\n margin-top: 1.5rem;\n}\n\n.copilotKitMessage.copilotKitAssistantMessage + .copilotKitMessage.copilotKitUserMessage {\n margin-top: 1.5rem;\n}\n\n.copilotKitCustomAssistantMessage {\n margin-top: 1.5rem;\n margin-bottom: 1.5rem;\n}\n\n.copilotKitMessage .inProgressLabel {\n margin-left: 10px;\n}\n\n.copilotKitMessages footer {\n flex-grow: 1;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n}\n",".copilotKitWindow {\n position: fixed;\n inset: 0px;\n transform-origin: bottom;\n border-color: rgb(229 231 235);\n background-color: rgb(255 255 255);\n border-radius: 0.75rem;\n box-shadow: rgba(0, 0, 0, 0.16) 0px 5px 40px;\n flex-direction: column;\n transition:\n opacity 100ms ease-out,\n transform 200ms ease-out;\n opacity: 0;\n transform: scale(0.95) translateY(20px);\n display: flex;\n pointer-events: none;\n}\n\n.copilotKitSidebar .copilotKitWindow {\n border-radius: 0;\n opacity: 1;\n transform: translateX(100%);\n}\n\n.copilotKitWindow.open {\n opacity: 1;\n transform: scale(1) translateY(0);\n pointer-events: auto;\n}\n\n.copilotKitSidebar .copilotKitWindow.open {\n transform: translateX(0);\n}\n\n@media (min-width: 640px) {\n .copilotKitWindow {\n transform-origin: bottom right;\n bottom: 5rem;\n right: 1rem;\n top: auto;\n left: auto;\n border-width: 0px;\n margin-bottom: 1rem;\n width: 24rem;\n height: 600px;\n min-height: 200px;\n max-height: calc(100% - 6rem);\n }\n\n .copilotKitSidebar .copilotKitWindow {\n bottom: 0;\n right: 0;\n top: auto;\n left: auto;\n width: 28rem;\n min-height: 100%;\n margin-bottom: 0;\n max-height: none;\n }\n}\n",".copilotKitActivityDot1 {\n animation: copilotKitActivityDotsAnimation 1.05s infinite;\n}\n.copilotKitActivityDot2 {\n animation-delay: 0.1s;\n}\n.copilotKitActivityDot3 {\n animation-delay: 0.2s;\n}\n@keyframes copilotKitActivityDotsAnimation {\n 0%,\n 57.14% {\n animation-timing-function: cubic-bezier(0.33, 0.66, 0.66, 1);\n transform: translate(0);\n }\n 28.57% {\n animation-timing-function: cubic-bezier(0.33, 0, 0.66, 0.33);\n transform: translateY(-6px);\n }\n 100% {\n transform: translate(0);\n }\n}\n\n@keyframes copilotKitSpinAnimation {\n to {\n transform: rotate(360deg);\n }\n}\n\n@keyframes copilotKitPulseAnimation {\n 50% {\n opacity: 0.5;\n }\n}\n",".copilotKitResponseButton {\n background-color: var(--copilot-kit-response-button-background-color);\n border: 1px solid var(--copilot-kit-separator-color);\n border-radius: 4px;\n color: var(--copilot-kit-response-button-color);\n cursor: pointer;\n font-size: 14px;\n font-weight: 500;\n height: 32px;\n line-height: 30px;\n margin: 0;\n padding: 0 16px;\n text-align: center;\n text-decoration: none;\n text-transform: none;\n white-space: nowrap;\n margin-top: 15px;\n}\n\n.copilotKitResponseButton:hover {\n filter: brightness(95%);\n}\n\n.copilotKitResponseButton > span {\n margin-right: 0.5rem;\n}\n",".copilotKitMarkdown h1,\n.copilotKitMarkdown h2,\n.copilotKitMarkdown h3,\n.copilotKitMarkdown h4,\n.copilotKitMarkdown h5,\n.copilotKitMarkdown h6 {\n font-weight: bold;\n line-height: 1.2;\n}\n\n.copilotKitMarkdown h1:not(:last-child),\n.copilotKitMarkdown h2:not(:last-child),\n.copilotKitMarkdown h3:not(:last-child),\n.copilotKitMarkdown h4:not(:last-child),\n.copilotKitMarkdown h5:not(:last-child),\n.copilotKitMarkdown h6:not(:last-child) {\n margin-bottom: 1rem;\n}\n\n.copilotKitMarkdown h1 {\n font-size: 1.5em;\n}\n\n.copilotKitMarkdown h2 {\n font-size: 1.25em;\n font-weight: 600;\n}\n\n.copilotKitMarkdown h3 {\n font-size: 1.1em;\n}\n\n.copilotKitMarkdown h4 {\n font-size: 1em;\n}\n\n.copilotKitMarkdown h5 {\n font-size: 0.9em;\n}\n\n.copilotKitMarkdown h6 {\n font-size: 0.8em;\n}\n\n.copilotKitMarkdown p:not(:last-child),\n.copilotKitMarkdown pre:not(:last-child),\n.copilotKitMarkdown ol:not(:last-child),\n.copilotKitMarkdown ul:not(:last-child),\n.copilotKitMarkdown blockquote:not(:last-child) {\n margin-bottom: 1.25em;\n}\n\n.copilotKitMarkdown blockquote {\n border-color: rgb(142, 142, 160);\n border-left-width: 2px;\n border-left-style: solid;\n line-height: 1.2;\n padding-left: 10px;\n}\n\n.copilotKitMarkdown blockquote p {\n padding: 0.7em 0;\n}\n\n.copilotKitMarkdown ul {\n list-style-type: disc;\n padding-left: 20px;\n overflow: visible;\n}\n\n.copilotKitMarkdown li {\n list-style-type: inherit;\n list-style-position: outside;\n margin-left: 0;\n padding-left: 0;\n position: relative;\n overflow: visible;\n}\n\n.copilotKitCodeBlock {\n position: relative;\n width: 100%;\n background-color: rgb(9 9 11);\n border-radius: 0.375rem;\n}\n\n.copilotKitCodeBlockToolbar {\n display: flex;\n width: 100%;\n align-items: center;\n justify-content: space-between;\n background-color: rgb(39 39 42);\n padding-left: 1rem;\n padding-top: 0.09rem;\n padding-bottom: 0.09rem;\n color: rgb(228, 228, 228);\n border-top-left-radius: 0.375rem;\n border-top-right-radius: 0.375rem;\n font-family: sans-serif;\n}\n\n.copilotKitCodeBlockToolbarLanguage {\n font-size: 0.75rem;\n line-height: 1rem;\n text-transform: lowercase;\n}\n\n.copilotKitCodeBlockToolbarButtons {\n display: flex;\n align-items: center;\n margin-right: 0.25rem;\n margin-left: 0.25rem;\n}\n\n.copilotKitCodeBlockToolbarButton {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n border-radius: 0.375rem;\n font-size: 0.875rem;\n line-height: 1.25rem;\n font-weight: 500;\n height: 2.5rem;\n width: 2.5rem;\n padding: 3px;\n margin: 2px;\n}\n\n.copilotKitCodeBlockToolbarButton:hover {\n background-color: rgb(55, 55, 58);\n}\n",".copilotKitMessages footer .suggestions {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.copilotKitMessages footer h6 {\n font-weight: 500;\n font-size: 0.7rem;\n margin-bottom: 8px;\n}\n\n.copilotKitMessages footer .suggestions .suggestion {\n padding: 8px 12px;\n font-size: 0.7rem;\n border-radius: 0.5rem;\n background: var(--copilot-kit-primary-color);\n color: var(--copilot-kit-contrast-color);\n}\n\n.copilotKitMessages footer .suggestions button {\n transition: transform 0.3s ease;\n}\n\n.copilotKitMessages footer .suggestions button:not(:disabled):hover {\n transform: scale(1.05);\n}\n\n.copilotKitMessages footer .suggestions button:disabled {\n cursor: wait;\n}\n\n.copilotKitMessages footer .suggestions button svg {\n margin-right: 6px;\n}\n",".copilotKitChat {\n z-index: 30;\n line-height: 1.5;\n -webkit-text-size-adjust: 100%;\n -moz-tab-size: 4;\n -o-tab-size: 4;\n tab-size: 4;\n font-family:\n ui-sans-serif,\n system-ui,\n -apple-system,\n BlinkMacSystemFont,\n \"Segoe UI\",\n Roboto,\n \"Helvetica Neue\",\n Arial,\n \"Noto Sans\",\n sans-serif,\n \"Apple Color Emoji\",\n \"Segoe UI Emoji\",\n \"Segoe UI Symbol\",\n \"Noto Color Emoji\";\n font-feature-settings: normal;\n font-variation-settings: normal;\n touch-action: manipulation;\n display: flex;\n flex-direction: column;\n /* height: 100%; */\n}\n\n.copilotKitChat svg {\n display: inline-block;\n vertical-align: middle;\n}\n\n.copilotKitChat .copilotKitMessages {\n flex-grow: 1;\n}\n",".copilotKitDevConsole {\n background-color: #f3f4f6;\n padding-left: 10px;\n padding-right: 10px;\n display: flex;\n align-items: center;\n border-bottom: 1px solid #cecece;\n padding-top: 10px;\n padding-bottom: 10px;\n}\n\n.copilotKitDevConsole.copilotKitDevConsoleWarnOutdated {\n background-color: #f9caca;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo {\n flex: 1;\n margin-left: 18px;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo header {\n font-size: 11px;\n font-weight: bold;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo footer {\n margin-top: 10px;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo footer button {\n font-size: 11px;\n font-weight: normal;\n font-family: monospace;\n background-color: white;\n border: 1px solid #979797;\n padding: 1px 12px;\n padding-left: 5px;\n border-radius: 4px;\n display: inline-block;\n text-align: left;\n overflow: hidden;\n white-space: nowrap;\n width: 260px;\n text-overflow: ellipsis;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo header aside {\n display: inline;\n font-weight: normal;\n color: #7f7a7a;\n margin-left: 5px;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo section {\n font-size: 11px;\n}\n\n.copilotKitDevConsole .copilotKitVersionInfo section svg {\n margin-left: 3px;\n margin-top: -3px;\n}\n\n.copilotKitDevConsole .copilotKitDebugMenuButton {\n font-size: 11px;\n font-weight: bold;\n display: flex;\n width: 90px;\n height: 30px;\n background-color: #d8d8d8;\n border: 1px solid #979797;\n border-radius: 6px;\n align-items: center;\n justify-content: center;\n outline: none;\n}\n\n.copilotKitDebugMenuButton.compact {\n width: 35px;\n color: black;\n justify-content: center;\n outline: none;\n font-size: 8px;\n}\n\n.copilotKitDevConsole .copilotKitDebugMenuButton:hover {\n background-color: #c7c7c7;\n}\n\n.copilotKitDevConsole .copilotKitDebugMenuButton > svg {\n margin-left: 10px;\n}\n\n.copilotKitDebugMenu {\n background-color: #d8d8d8;\n margin-top: 2px;\n border-radius: 6px;\n border: 1px solid #979797;\n padding: 0.25rem;\n outline: none;\n font-size: 13px;\n}\n\n.copilotKitDebugMenuItem {\n padding-top: 3px;\n padding-bottom: 3px;\n padding-left: 10px;\n padding-right: 10px;\n display: block;\n width: 100%;\n text-align: left;\n background: none;\n border: none;\n cursor: pointer;\n}\n\n.copilotKitDebugMenuItem:hover {\n background-color: #c7c7c7;\n border-radius: 4px;\n}\n\n.copilotKitDebugMenu[data-closed] {\n transform: scale(0.95); /* data-[closed]:scale-95 */\n opacity: 0; /* data-[closed]:opacity-0 */\n}\n\n.copilotKitDebugMenu hr {\n height: 1px;\n border: none; /* Remove 3D look */\n background-color: #979797; /* Set color */\n margin: 0.25rem;\n}\n"],"mappings":";AAAA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;;;ACVF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;;;ACpBF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAGA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACE;AAAA;AAAA;;;AC/BJ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAGA;AACA;AACA;AACA;AAAA;AAIF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAIF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;;;ACtDF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACE;AACA;AACA;AACA;AAAA;AAAA;AAIJ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;;;ACzCF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;;;ACvFF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;;;ACvEF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAGA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;;;ACzDJ;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AACE;AAAA;AAEF;AAAA;AAGI;AACA;AAAA;AAAA;AAGA;AACA;AAAA;AAAA;AAGA;AAAA;AAAA;AAIJ;AAAA;AAEI;AAAA;AAAA;AAIJ;AAAA;AAEI;AAAA;AAAA;;;AChCJ;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;;;ACxBF;AAAA;AAAA;AAAA;AAAA;AAAA;AAME;AACA;AAAA;AAGF;AAAA;AAAA;AAAA;AAAA;AAAA;AAME;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AAAA;AAAA;AAAA;AAAA;AAKE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;;;ACjIF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;;;ACjCF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAeA;AACA;AACA;AACA;AACA;AAAA;AAIF;AACE;AACA;AAAA;AAGF;AACE;AAAA;;;ACpCF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AAAA;AAGF;AACE;AACA;AACA;AACA;AAAA;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export { useChatContext } from './components/chat/ChatContext.js';
|
|
|
6
6
|
export { useCopilotChatSuggestions } from './hooks/use-copilot-chat-suggestions.js';
|
|
7
7
|
export { CopilotKitCSSProperties } from './types/css.js';
|
|
8
8
|
import '@copilotkit/runtime-client-gql';
|
|
9
|
+
import 'react/jsx-runtime';
|
|
9
10
|
import './components/chat/Modal.js';
|
|
10
11
|
import 'react';
|
|
11
12
|
import '@copilotkit/react-core';
|
package/dist/index.js
CHANGED
|
@@ -386,14 +386,13 @@ var ChatContextProvider = ({
|
|
|
386
386
|
var import_react2 = __toESM(require("react"));
|
|
387
387
|
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
388
388
|
var Window = ({
|
|
389
|
-
open,
|
|
390
|
-
setOpen,
|
|
391
389
|
children,
|
|
392
390
|
clickOutsideToClose,
|
|
393
391
|
shortcut,
|
|
394
392
|
hitEscapeToClose
|
|
395
393
|
}) => {
|
|
396
394
|
const windowRef = import_react2.default.useRef(null);
|
|
395
|
+
const { open, setOpen } = useChatContext();
|
|
397
396
|
const handleClickOutside = (0, import_react2.useCallback)(
|
|
398
397
|
(event) => {
|
|
399
398
|
var _a;
|
|
@@ -495,16 +494,16 @@ function isMacOS() {
|
|
|
495
494
|
|
|
496
495
|
// src/components/chat/Button.tsx
|
|
497
496
|
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
498
|
-
var Button = ({
|
|
499
|
-
const
|
|
497
|
+
var Button = ({}) => {
|
|
498
|
+
const { open, setOpen, icons } = useChatContext();
|
|
500
499
|
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { onClick: () => setOpen(!open), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
501
500
|
"button",
|
|
502
501
|
{
|
|
503
502
|
className: `copilotKitButton ${open ? "open" : ""}`,
|
|
504
503
|
"aria-label": open ? "Close Chat" : "Open Chat",
|
|
505
504
|
children: [
|
|
506
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "copilotKitButtonIcon copilotKitButtonIconOpen", children:
|
|
507
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "copilotKitButtonIcon copilotKitButtonIconClose", children:
|
|
505
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "copilotKitButtonIcon copilotKitButtonIconOpen", children: icons.openIcon }),
|
|
506
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "copilotKitButtonIcon copilotKitButtonIconClose", children: icons.closeIcon })
|
|
508
507
|
]
|
|
509
508
|
}
|
|
510
509
|
) });
|
|
@@ -512,11 +511,11 @@ var Button = ({ open, setOpen }) => {
|
|
|
512
511
|
|
|
513
512
|
// src/components/chat/Header.tsx
|
|
514
513
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
515
|
-
var Header = ({
|
|
516
|
-
const
|
|
514
|
+
var Header = ({}) => {
|
|
515
|
+
const { setOpen, icons, labels } = useChatContext();
|
|
517
516
|
return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("div", { className: "copilotKitHeader", children: [
|
|
518
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children:
|
|
519
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { onClick: () => setOpen(false), "aria-label": "Close", children:
|
|
517
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { children: labels.title }),
|
|
518
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("button", { onClick: () => setOpen(false), "aria-label": "Close", children: icons.headerCloseIcon })
|
|
520
519
|
] });
|
|
521
520
|
};
|
|
522
521
|
|
|
@@ -1034,8 +1033,8 @@ var Messages = ({ messages, inProgress, children }) => {
|
|
|
1034
1033
|
} else if (message instanceof import_runtime_client_gql.TextMessage && message.role == "assistant") {
|
|
1035
1034
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: isCurrentMessage && inProgress && !message.content ? context.icons.spinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(Markdown, { content: message.content }) }, index);
|
|
1036
1035
|
} else if (message instanceof import_runtime_client_gql.ActionExecutionMessage) {
|
|
1037
|
-
if (chatComponentsCache.current !== null && chatComponentsCache.current[message.name]) {
|
|
1038
|
-
const render = chatComponentsCache.current[message.name];
|
|
1036
|
+
if (chatComponentsCache.current !== null && chatComponentsCache.current.actions[message.name]) {
|
|
1037
|
+
const render = chatComponentsCache.current.actions[message.name];
|
|
1039
1038
|
if (typeof render === "string") {
|
|
1040
1039
|
if (isCurrentMessage && inProgress) {
|
|
1041
1040
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: [
|
|
@@ -1077,6 +1076,50 @@ var Messages = ({ messages, inProgress, children }) => {
|
|
|
1077
1076
|
} else {
|
|
1078
1077
|
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: context.icons.spinnerIcon }, index);
|
|
1079
1078
|
}
|
|
1079
|
+
} else if (message instanceof import_runtime_client_gql.AgentStateMessage) {
|
|
1080
|
+
let render;
|
|
1081
|
+
if (chatComponentsCache.current !== null) {
|
|
1082
|
+
render = chatComponentsCache.current.coagentActions[`${message.agentName}-${message.nodeName}`] || chatComponentsCache.current.coagentActions[`${message.agentName}-global`];
|
|
1083
|
+
}
|
|
1084
|
+
if (render) {
|
|
1085
|
+
if (typeof render === "string") {
|
|
1086
|
+
if (isCurrentMessage && inProgress) {
|
|
1087
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: [
|
|
1088
|
+
context.icons.spinnerIcon,
|
|
1089
|
+
" ",
|
|
1090
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { className: "inProgressLabel", children: render })
|
|
1091
|
+
] }, index);
|
|
1092
|
+
} else {
|
|
1093
|
+
return null;
|
|
1094
|
+
}
|
|
1095
|
+
} else {
|
|
1096
|
+
const state = message.state;
|
|
1097
|
+
let status = message.active ? "inProgress" : "complete";
|
|
1098
|
+
const toRender = render({
|
|
1099
|
+
status,
|
|
1100
|
+
state,
|
|
1101
|
+
nodeName: message.nodeName
|
|
1102
|
+
});
|
|
1103
|
+
if (!toRender && status === "complete") {
|
|
1104
|
+
return null;
|
|
1105
|
+
}
|
|
1106
|
+
if (typeof toRender === "string") {
|
|
1107
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: [
|
|
1108
|
+
isCurrentMessage && inProgress && context.icons.spinnerIcon,
|
|
1109
|
+
" ",
|
|
1110
|
+
toRender
|
|
1111
|
+
] }, index);
|
|
1112
|
+
} else {
|
|
1113
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "copilotKitCustomAssistantMessage", children: toRender }, index);
|
|
1114
|
+
}
|
|
1115
|
+
}
|
|
1116
|
+
} else if (!inProgress || !isCurrentMessage) {
|
|
1117
|
+
return null;
|
|
1118
|
+
} else {
|
|
1119
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: context.icons.spinnerIcon }, index);
|
|
1120
|
+
}
|
|
1121
|
+
} else if (message instanceof import_runtime_client_gql.ResultMessage && inProgress && isCurrentMessage) {
|
|
1122
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: `copilotKitMessage copilotKitAssistantMessage`, children: context.icons.spinnerIcon }, index);
|
|
1080
1123
|
}
|
|
1081
1124
|
}),
|
|
1082
1125
|
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("footer", { ref: messagesEndRef, children })
|
|
@@ -1427,11 +1470,13 @@ var reloadSuggestions = (context, chatSuggestionConfiguration, setCurrentSuggest
|
|
|
1427
1470
|
// src/components/chat/Chat.tsx
|
|
1428
1471
|
var import_react11 = __toESM(require("react"));
|
|
1429
1472
|
var import_react_core7 = require("@copilotkit/react-core");
|
|
1430
|
-
var
|
|
1473
|
+
var import_runtime_client_gql6 = require("@copilotkit/runtime-client-gql");
|
|
1431
1474
|
var import_shared3 = require("@copilotkit/shared");
|
|
1432
1475
|
|
|
1433
1476
|
// src/components/dev-console/utils.ts
|
|
1434
1477
|
var import_react_core5 = require("@copilotkit/react-core");
|
|
1478
|
+
var import_runtime_client_gql4 = require("@copilotkit/runtime-client-gql");
|
|
1479
|
+
var import_runtime_client_gql5 = require("@copilotkit/runtime-client-gql");
|
|
1435
1480
|
function shouldShowDevConsole(showDevConsole) {
|
|
1436
1481
|
if (typeof showDevConsole === "boolean") {
|
|
1437
1482
|
return showDevConsole;
|
|
@@ -1492,6 +1537,7 @@ function getPublishedCopilotKitVersion(current, forceCheck = false) {
|
|
|
1492
1537
|
});
|
|
1493
1538
|
}
|
|
1494
1539
|
function logReadables(context) {
|
|
1540
|
+
console.log("%cCurrent Readables:", "font-size: 16px; font-weight: bold;");
|
|
1495
1541
|
const readables = context.getContextString([], import_react_core5.defaultCopilotContextCategories).trim();
|
|
1496
1542
|
if (readables.length === 0) {
|
|
1497
1543
|
console.log("No readables found");
|
|
@@ -1500,6 +1546,7 @@ function logReadables(context) {
|
|
|
1500
1546
|
console.log(readables);
|
|
1501
1547
|
}
|
|
1502
1548
|
function logActions(context) {
|
|
1549
|
+
console.log("%cCurrent Actions:", "font-size: 16px; font-weight: bold;");
|
|
1503
1550
|
if (Object.values(context.actions).length === 0) {
|
|
1504
1551
|
console.log("No actions found");
|
|
1505
1552
|
return;
|
|
@@ -1512,6 +1559,53 @@ function logActions(context) {
|
|
|
1512
1559
|
console.groupEnd();
|
|
1513
1560
|
}
|
|
1514
1561
|
}
|
|
1562
|
+
function logMessages(context) {
|
|
1563
|
+
console.log("%cCurrent Messages:", "font-size: 16px; font-weight: bold;");
|
|
1564
|
+
if (context.messages.length === 0) {
|
|
1565
|
+
console.log("No messages found");
|
|
1566
|
+
return;
|
|
1567
|
+
}
|
|
1568
|
+
const tableData = context.messages.map((message) => {
|
|
1569
|
+
if (message instanceof import_runtime_client_gql4.TextMessage) {
|
|
1570
|
+
return {
|
|
1571
|
+
id: message.id,
|
|
1572
|
+
type: "TextMessage",
|
|
1573
|
+
role: message.role,
|
|
1574
|
+
name: void 0,
|
|
1575
|
+
scope: void 0,
|
|
1576
|
+
content: message.content
|
|
1577
|
+
};
|
|
1578
|
+
} else if (message instanceof import_runtime_client_gql4.ActionExecutionMessage) {
|
|
1579
|
+
return {
|
|
1580
|
+
id: message.id,
|
|
1581
|
+
type: "ActionExecutionMessage",
|
|
1582
|
+
role: void 0,
|
|
1583
|
+
name: message.name,
|
|
1584
|
+
scope: message.scope,
|
|
1585
|
+
content: message.arguments
|
|
1586
|
+
};
|
|
1587
|
+
} else if (message instanceof import_runtime_client_gql4.ResultMessage) {
|
|
1588
|
+
return {
|
|
1589
|
+
id: message.id,
|
|
1590
|
+
type: "ResultMessage",
|
|
1591
|
+
role: void 0,
|
|
1592
|
+
name: message.actionName,
|
|
1593
|
+
scope: message.actionExecutionId,
|
|
1594
|
+
content: message.result
|
|
1595
|
+
};
|
|
1596
|
+
} else if (message instanceof import_runtime_client_gql5.AgentStateMessage) {
|
|
1597
|
+
return {
|
|
1598
|
+
id: message.id,
|
|
1599
|
+
type: `AgentStateMessage (running: ${message.running})`,
|
|
1600
|
+
role: message.role,
|
|
1601
|
+
name: void 0,
|
|
1602
|
+
scope: message.threadId,
|
|
1603
|
+
content: message.state
|
|
1604
|
+
};
|
|
1605
|
+
}
|
|
1606
|
+
});
|
|
1607
|
+
console.table(tableData);
|
|
1608
|
+
}
|
|
1515
1609
|
|
|
1516
1610
|
// src/components/dev-console/console.tsx
|
|
1517
1611
|
var import_react_core6 = require("@copilotkit/react-core");
|
|
@@ -1786,6 +1880,7 @@ function DebugMenuButton({
|
|
|
1786
1880
|
children: [
|
|
1787
1881
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => logReadables(context), children: "Log Readables" }) }),
|
|
1788
1882
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => logActions(context), children: "Log Actions" }) }),
|
|
1883
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => logMessages(context), children: "Log Messages" }) }),
|
|
1789
1884
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => checkForUpdates(true), children: "Check for Updates" }) }),
|
|
1790
1885
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)("hr", {}),
|
|
1791
1886
|
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react10.MenuItem, { children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("button", { className: "copilotKitDebugMenuItem", onClick: () => setShowDevConsole(false), children: "Hide Dev Console" }) })
|
|
@@ -1904,9 +1999,9 @@ var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage) =>
|
|
|
1904
1999
|
const sendMessage = (messageContent) => __async(void 0, null, function* () {
|
|
1905
2000
|
abortSuggestions();
|
|
1906
2001
|
setCurrentSuggestions([]);
|
|
1907
|
-
const message = new
|
|
2002
|
+
const message = new import_runtime_client_gql6.TextMessage({
|
|
1908
2003
|
content: messageContent,
|
|
1909
|
-
role:
|
|
2004
|
+
role: import_runtime_client_gql6.Role.User
|
|
1910
2005
|
});
|
|
1911
2006
|
appendMessage(message);
|
|
1912
2007
|
if (onSubmitMessage) {
|
|
@@ -1954,23 +2049,22 @@ var CopilotModal = ({
|
|
|
1954
2049
|
}) => {
|
|
1955
2050
|
const [openState, setOpenState] = import_react12.default.useState(defaultOpen);
|
|
1956
2051
|
const setOpen = (open) => {
|
|
2052
|
+
console.log("setOpen!!", open);
|
|
1957
2053
|
onSetOpen == null ? void 0 : onSetOpen(open);
|
|
1958
2054
|
setOpenState(open);
|
|
1959
2055
|
};
|
|
1960
|
-
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ChatContextProvider, { icons, labels, open: openState, setOpen
|
|
2056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(ChatContextProvider, { icons, labels, open: openState, setOpen, children: [
|
|
1961
2057
|
children,
|
|
1962
2058
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)("div", { className, children: [
|
|
1963
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button2, {
|
|
2059
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Button2, {}),
|
|
1964
2060
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
1965
2061
|
Window2,
|
|
1966
2062
|
{
|
|
1967
|
-
open: openState,
|
|
1968
|
-
setOpen,
|
|
1969
2063
|
clickOutsideToClose,
|
|
1970
2064
|
shortcut,
|
|
1971
2065
|
hitEscapeToClose,
|
|
1972
2066
|
children: [
|
|
1973
|
-
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Header2, {
|
|
2067
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(Header2, {}),
|
|
1974
2068
|
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
1975
2069
|
CopilotChat,
|
|
1976
2070
|
{
|
|
@@ -2012,6 +2106,7 @@ function CopilotSidebar(props) {
|
|
|
2012
2106
|
);
|
|
2013
2107
|
const onSetOpen = (open) => {
|
|
2014
2108
|
var _a;
|
|
2109
|
+
console.log("onSetOpen", open);
|
|
2015
2110
|
(_a = props.onSetOpen) == null ? void 0 : _a.call(props, open);
|
|
2016
2111
|
setExpandedClassName(open ? "sidebarExpanded" : "");
|
|
2017
2112
|
};
|