@copilotkit/react-core 1.10.0-next.11 → 1.10.0-next.13
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 +15 -0
- package/dist/{chunk-ADZDXHVC.mjs → chunk-2GRWTU7W.mjs} +4 -4
- package/dist/chunk-3BASANUO.mjs +170 -0
- package/dist/chunk-3BASANUO.mjs.map +1 -0
- package/dist/{chunk-LVWV62JZ.mjs → chunk-5P46WS5M.mjs} +32 -26
- package/dist/chunk-5P46WS5M.mjs.map +1 -0
- package/dist/{chunk-OKRZF3DD.mjs → chunk-6ZLPNY7X.mjs} +2 -2
- package/dist/{chunk-OKRZF3DD.mjs.map → chunk-6ZLPNY7X.mjs.map} +1 -1
- package/dist/{chunk-COEUPDRL.mjs → chunk-BEFEBKKI.mjs} +8 -8
- package/dist/{chunk-QGE7U4NV.mjs → chunk-F26O2HTO.mjs} +3 -3
- package/dist/chunk-F26O2HTO.mjs.map +1 -0
- package/dist/{chunk-DLEXVOQE.mjs → chunk-GEKWHETN.mjs} +4 -4
- package/dist/{chunk-L6HQIJ74.mjs → chunk-JY3STRON.mjs} +8 -8
- package/dist/{chunk-JJDXTTEN.mjs → chunk-K4HXT453.mjs} +2 -2
- package/dist/{chunk-JBLMXZ3O.mjs → chunk-KH27ZS4Y.mjs} +6 -6
- package/dist/{chunk-TWYUYC4F.mjs → chunk-MUDXTKXE.mjs} +6 -6
- package/dist/{chunk-Q42NJFXR.mjs → chunk-N4VN2B5S.mjs} +5 -5
- package/dist/{chunk-2TSNHEIS.mjs → chunk-NTH42BY5.mjs} +5 -5
- package/dist/{chunk-X2DNXTME.mjs → chunk-OPRDTF4S.mjs} +4 -4
- package/dist/chunk-PIF5KJYI.mjs +103 -0
- package/dist/chunk-PIF5KJYI.mjs.map +1 -0
- package/dist/chunk-WSXTUD36.mjs +759 -0
- package/dist/chunk-WSXTUD36.mjs.map +1 -0
- package/dist/{chunk-IHAZJF3V.mjs → chunk-YIBUNEBN.mjs} +2 -2
- package/dist/chunk-YIBUNEBN.mjs.map +1 -0
- package/dist/components/copilot-provider/copilot-messages.mjs +3 -3
- package/dist/components/copilot-provider/copilotkit-props.d.ts +9 -1
- package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.js +1047 -71
- package/dist/components/copilot-provider/copilotkit.js.map +1 -1
- package/dist/components/copilot-provider/copilotkit.mjs +11 -8
- package/dist/components/copilot-provider/index.js +1047 -71
- package/dist/components/copilot-provider/index.js.map +1 -1
- package/dist/components/copilot-provider/index.mjs +11 -8
- package/dist/components/dev-console/console-trigger.d.ts +8 -0
- package/dist/components/dev-console/console-trigger.js +1131 -0
- package/dist/components/dev-console/console-trigger.js.map +1 -0
- package/dist/components/dev-console/console-trigger.mjs +13 -0
- package/dist/components/dev-console/console-trigger.mjs.map +1 -0
- package/dist/components/dev-console/developer-console-modal.d.ts +10 -0
- package/dist/components/dev-console/developer-console-modal.js +977 -0
- package/dist/components/dev-console/developer-console-modal.js.map +1 -0
- package/dist/components/dev-console/developer-console-modal.mjs +12 -0
- package/dist/components/dev-console/developer-console-modal.mjs.map +1 -0
- package/dist/components/dev-console/icons.d.ts +9 -0
- package/dist/components/dev-console/icons.js +131 -0
- package/dist/components/dev-console/icons.js.map +1 -0
- package/dist/components/dev-console/icons.mjs +16 -0
- package/dist/components/dev-console/icons.mjs.map +1 -0
- package/dist/components/error-boundary/error-boundary.js +1 -1
- package/dist/components/error-boundary/error-boundary.js.map +1 -1
- package/dist/components/error-boundary/error-boundary.mjs +2 -2
- package/dist/components/index.js +1047 -71
- package/dist/components/index.js.map +1 -1
- package/dist/components/index.mjs +11 -8
- package/dist/components/usage-banner.js +1 -1
- package/dist/components/usage-banner.js.map +1 -1
- package/dist/components/usage-banner.mjs +1 -1
- package/dist/context/index.mjs +4 -4
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/index.mjs +32 -29
- package/dist/hooks/use-chat.mjs +4 -4
- package/dist/hooks/use-coagent-state-render.mjs +2 -2
- package/dist/hooks/use-coagent.js.map +1 -1
- package/dist/hooks/use-coagent.mjs +16 -13
- package/dist/hooks/use-copilot-action.mjs +2 -2
- package/dist/hooks/use-copilot-authenticated-action.mjs +3 -3
- package/dist/hooks/use-copilot-chat-headless_c.js +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
- package/dist/hooks/use-copilot-chat-headless_c.mjs +16 -13
- package/dist/hooks/use-copilot-chat.d.ts +42 -3
- package/dist/hooks/use-copilot-chat.js.map +1 -1
- package/dist/hooks/use-copilot-chat.mjs +16 -13
- package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
- package/dist/hooks/use-copilot-chat_internal.mjs +15 -12
- package/dist/hooks/use-langgraph-interrupt-render.mjs +1 -1
- package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
- package/dist/hooks/use-langgraph-interrupt.mjs +16 -13
- package/dist/index.js +1145 -178
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +36 -33
- package/dist/lib/copilot-task.js.map +1 -1
- package/dist/lib/copilot-task.mjs +13 -10
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/index.mjs +13 -10
- package/dist/utils/extract.js.map +1 -1
- package/dist/utils/extract.mjs +11 -8
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/index.mjs +11 -8
- package/dist/utils/suggestions.js.map +1 -1
- package/dist/utils/suggestions.mjs +11 -8
- package/package.json +3 -3
- package/src/components/copilot-provider/copilotkit-props.tsx +10 -1
- package/src/components/copilot-provider/copilotkit.tsx +25 -16
- package/src/components/dev-console/console-trigger.tsx +190 -0
- package/src/components/dev-console/developer-console-modal.tsx +866 -0
- package/src/components/dev-console/icons.tsx +101 -0
- package/src/components/usage-banner.tsx +1 -1
- package/src/hooks/use-copilot-chat-headless_c.ts +79 -9
- package/src/hooks/use-copilot-chat.ts +42 -3
- package/dist/chunk-IHAZJF3V.mjs.map +0 -1
- package/dist/chunk-LVWV62JZ.mjs.map +0 -1
- package/dist/chunk-QGE7U4NV.mjs.map +0 -1
- /package/dist/{chunk-ADZDXHVC.mjs.map → chunk-2GRWTU7W.mjs.map} +0 -0
- /package/dist/{chunk-COEUPDRL.mjs.map → chunk-BEFEBKKI.mjs.map} +0 -0
- /package/dist/{chunk-DLEXVOQE.mjs.map → chunk-GEKWHETN.mjs.map} +0 -0
- /package/dist/{chunk-L6HQIJ74.mjs.map → chunk-JY3STRON.mjs.map} +0 -0
- /package/dist/{chunk-JJDXTTEN.mjs.map → chunk-K4HXT453.mjs.map} +0 -0
- /package/dist/{chunk-JBLMXZ3O.mjs.map → chunk-KH27ZS4Y.mjs.map} +0 -0
- /package/dist/{chunk-TWYUYC4F.mjs.map → chunk-MUDXTKXE.mjs.map} +0 -0
- /package/dist/{chunk-Q42NJFXR.mjs.map → chunk-N4VN2B5S.mjs.map} +0 -0
- /package/dist/{chunk-2TSNHEIS.mjs.map → chunk-NTH42BY5.mjs.map} +0 -0
- /package/dist/{chunk-X2DNXTME.mjs.map → chunk-OPRDTF4S.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -112,7 +112,7 @@ __export(src_exports, {
|
|
|
112
112
|
module.exports = __toCommonJS(src_exports);
|
|
113
113
|
|
|
114
114
|
// src/components/copilot-provider/copilotkit.tsx
|
|
115
|
-
var
|
|
115
|
+
var import_react12 = require("react");
|
|
116
116
|
|
|
117
117
|
// src/context/copilot-context.tsx
|
|
118
118
|
var import_react = __toESM(require("react"));
|
|
@@ -341,7 +341,7 @@ function setsHaveIntersection(setA, setB) {
|
|
|
341
341
|
|
|
342
342
|
// src/components/copilot-provider/copilotkit.tsx
|
|
343
343
|
var import_react_dom = require("react-dom");
|
|
344
|
-
var
|
|
344
|
+
var import_shared12 = require("@copilotkit/shared");
|
|
345
345
|
|
|
346
346
|
// src/hooks/use-flat-category-store.ts
|
|
347
347
|
var import_react3 = require("react");
|
|
@@ -1112,7 +1112,7 @@ var getErrorActions = (error) => {
|
|
|
1112
1112
|
primary: {
|
|
1113
1113
|
label: "Show me how",
|
|
1114
1114
|
onClick: () => window.open(
|
|
1115
|
-
"https://docs.copilotkit.ai/
|
|
1115
|
+
"https://docs.copilotkit.ai/premium#how-do-i-get-access-to-premium-features",
|
|
1116
1116
|
"_blank",
|
|
1117
1117
|
"noopener,noreferrer"
|
|
1118
1118
|
)
|
|
@@ -1754,69 +1754,1030 @@ var CopilotErrorBoundary = class extends import_react9.default.Component {
|
|
|
1754
1754
|
}
|
|
1755
1755
|
};
|
|
1756
1756
|
|
|
1757
|
-
// src/components/
|
|
1757
|
+
// src/components/dev-console/console-trigger.tsx
|
|
1758
|
+
var import_react11 = require("react");
|
|
1759
|
+
|
|
1760
|
+
// src/components/dev-console/icons.tsx
|
|
1758
1761
|
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1762
|
+
var ExclamationMarkTriangleIcon = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1763
|
+
"svg",
|
|
1764
|
+
{
|
|
1765
|
+
width: "13.3967723px",
|
|
1766
|
+
height: "12px",
|
|
1767
|
+
viewBox: "0 0 13.3967723 12",
|
|
1768
|
+
version: "1.1",
|
|
1769
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1770
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("g", { id: "exclamation-triangle", fill: "#CD2121", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1771
|
+
"path",
|
|
1772
|
+
{
|
|
1773
|
+
d: "M5.39935802,0.75 C5.97670802,-0.25 7.42007802,-0.25 7.99742802,0.75 L13.193588,9.75 C13.770888,10.75 13.049288,12 11.894588,12 L1.50223802,12 C0.34753802,12 -0.37414898,10.75 0.20319802,9.75 L5.39935802,0.75 Z M6.69838802,2.5 C7.11260802,2.5 7.44838802,2.83579 7.44838802,3.25 L7.44838802,6.25 C7.44838802,6.66421 7.11260802,7 6.69838802,7 C6.28417802,7 5.94838802,6.66421 5.94838802,6.25 L5.94838802,3.25 C5.94838802,2.83579 6.28417802,2.5 6.69838802,2.5 Z M6.69838802,10.5 C7.25067802,10.5 7.69838802,10.0523 7.69838802,9.5 C7.69838802,8.9477 7.25067802,8.5 6.69838802,8.5 C6.14610802,8.5 5.69838802,8.9477 5.69838802,9.5 C5.69838802,10.0523 6.14610802,10.5 6.69838802,10.5 Z",
|
|
1774
|
+
id: "Shape"
|
|
1775
|
+
}
|
|
1776
|
+
) }) })
|
|
1777
|
+
}
|
|
1778
|
+
);
|
|
1779
|
+
var CheckIcon = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1780
|
+
"svg",
|
|
1781
|
+
{
|
|
1782
|
+
width: "14px",
|
|
1783
|
+
height: "14px",
|
|
1784
|
+
viewBox: "0 0 14 14",
|
|
1785
|
+
version: "1.1",
|
|
1786
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1787
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("g", { id: "Group-2", transform: "translate(-118, 0)", fill: "#1BC030", fillRule: "nonzero", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("g", { id: "Group", transform: "translate(118, 0)", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1788
|
+
"path",
|
|
1789
|
+
{
|
|
1790
|
+
d: "M0,7 C0,3.13384615 3.13384615,0 7,0 C10.8661538,0 14,3.13384615 14,7 C14,10.8661538 10.8661538,14 7,14 C3.13384615,14 0,10.8661538 0,7 Z M9.59179487,5.69764103 C9.70905818,5.54139023 9.73249341,5.33388318 9.65303227,5.15541491 C9.57357113,4.97694665 9.40367989,4.85551619 9.20909814,4.83811118 C9.01451638,4.82070616 8.82577109,4.91005717 8.71589744,5.07158974 L6.39261538,8.32389744 L5.22666667,7.15794872 C5.01450582,6.96025518 4.68389046,6.9660885 4.47883563,7.17114332 C4.27378081,7.37619815 4.26794748,7.70681351 4.46564103,7.91897436 L6.08102564,9.53435897 C6.19289944,9.64614839 6.3482622,9.70310251 6.50588106,9.69010587 C6.66349993,9.67710922 6.80743532,9.59547613 6.89948718,9.46687179 L9.59179487,5.69764103 L9.59179487,5.69764103 Z",
|
|
1791
|
+
id: "Shape"
|
|
1792
|
+
}
|
|
1793
|
+
) }) }) })
|
|
1794
|
+
}
|
|
1795
|
+
);
|
|
1796
|
+
var CopilotKitIcon = () => /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1797
|
+
"svg",
|
|
1798
|
+
{
|
|
1799
|
+
width: "33px",
|
|
1800
|
+
height: "35px",
|
|
1801
|
+
viewBox: "0 0 33 35",
|
|
1802
|
+
version: "1.1",
|
|
1803
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1804
|
+
children: [
|
|
1805
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("title", { children: "bd5c9079-929b-4d55-bdc9-16d1c8181b71" }),
|
|
1806
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("g", { id: "Page-1", stroke: "none", strokeWidth: "1", fill: "none", fillRule: "evenodd", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1807
|
+
"image",
|
|
1808
|
+
{
|
|
1809
|
+
x: "0",
|
|
1810
|
+
y: "0",
|
|
1811
|
+
width: "33",
|
|
1812
|
+
height: "35",
|
|
1813
|
+
xlinkHref: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAI0AAACXCAYAAAAoE9hYAAAAAXNSR0IArs4c6QAAAERlWElmTU0AKgAAAAgAAYdpAAQAAAABAAAAGgAAAAAAA6ABAAMAAAABAAEAAKACAAQAAAABAAAAjaADAAQAAAABAAAAlwAAAACI8Oz3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YpS/TScsRW9opg5YYlO5fYKX0ByjzgwBEanUSOTEui2MDjf0vlrLr7VvvmRUBcac7mLNeBxqNlADJmTzlPwMYzXlcgv8yttBufdaeXBynhsIt8OEK3qupVyOcpnr9Dhruh1EOKnjztT2Ds1ja+q0yPm5fOp2uCwD1MKzesLnTyv6plHUuwDiH8FAu0CIoC6SFvZH837ar3ill4+5BV6/4ecfOLeBAw/HyryLiMwDmFdg3Min5aTS+Tz9zvXNps+H/s18fwQ7FcwDOayDosXAHWLIH54l0Nlrn4oRkLR1g9BX4t8I81iAbPW5VvgE5NbyMyf8zzKsySnL5NXMspd0w9v3cIvM+CMSr39s3G7d7MJbhwWUWIrt8hYeXAu9ndFGfZ2j9C8Lizv/Zb5ce5qEm7j2cibbT6cN/i+7qOMAxDzejA38hdiu6CKYDYBLVWolRQh9bMzZYOcdHtQqHErYEQHEmqgMWk3TeFgDzU5jKf9v3znv02X+guVVjEsFXH+A6kcdaD1Aub29v//VzChi1b49X4vdRhLr11vsHN1pz7Qj8bDKrLULpdyJzKocw1OwCKBm2zYKPCh1PiQ87sujILdnw1gKQrQiMDNmTj5nP0P2F714fHlStCp43M2kBT2t9EXjfBlBydEu37Pfn+J7/zXkIt50IxO3oK1rgKgEaU5YYAJhaUOCLawjufOW8i0Pnlm1/bo/7mAll9uO8/x9teQya14m6TgAAAABJRU5ErkJggg=="
|
|
1814
|
+
}
|
|
1815
|
+
) })
|
|
1816
|
+
]
|
|
1817
|
+
}
|
|
1818
|
+
);
|
|
1819
|
+
|
|
1820
|
+
// src/components/dev-console/developer-console-modal.tsx
|
|
1821
|
+
var import_shared11 = require("@copilotkit/shared");
|
|
1822
|
+
var import_react10 = require("react");
|
|
1823
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1824
|
+
function DeveloperConsoleModal({ isOpen, onClose, hasApiKey }) {
|
|
1825
|
+
const context = useCopilotContext();
|
|
1826
|
+
const messagesContext = useCopilotMessagesContext();
|
|
1827
|
+
const [activeTab, setActiveTab] = (0, import_react10.useState)("actions");
|
|
1828
|
+
(0, import_react10.useEffect)(() => {
|
|
1829
|
+
const handleEscape = (e) => {
|
|
1830
|
+
if (e.key === "Escape") {
|
|
1831
|
+
onClose();
|
|
1832
|
+
}
|
|
1833
|
+
};
|
|
1834
|
+
if (isOpen) {
|
|
1835
|
+
document.addEventListener("keydown", handleEscape);
|
|
1836
|
+
document.body.style.overflow = "hidden";
|
|
1837
|
+
}
|
|
1838
|
+
return () => {
|
|
1839
|
+
document.removeEventListener("keydown", handleEscape);
|
|
1840
|
+
document.body.style.overflow = "unset";
|
|
1841
|
+
};
|
|
1842
|
+
}, [isOpen, onClose]);
|
|
1843
|
+
if (!isOpen)
|
|
1844
|
+
return null;
|
|
1845
|
+
const displayContext = hasApiKey ? context : {
|
|
1846
|
+
actions: {
|
|
1847
|
+
search_web: { name: "search_web", description: "Search the web for information" },
|
|
1848
|
+
send_email: { name: "send_email", description: "Send an email to a contact" },
|
|
1849
|
+
create_document: { name: "create_document", description: "Create a new document" },
|
|
1850
|
+
analyze_code: {
|
|
1851
|
+
name: "analyze_code",
|
|
1852
|
+
description: "Analyze code for issues and improvements"
|
|
1853
|
+
},
|
|
1854
|
+
generate_tests: {
|
|
1855
|
+
name: "generate_tests",
|
|
1856
|
+
description: "Generate unit tests for functions"
|
|
1857
|
+
}
|
|
1858
|
+
},
|
|
1859
|
+
getAllContext: () => [
|
|
1860
|
+
{
|
|
1861
|
+
content: "User preferences: dark mode enabled, TypeScript preferred",
|
|
1862
|
+
metadata: { source: "settings" }
|
|
1863
|
+
},
|
|
1864
|
+
{
|
|
1865
|
+
content: "Current project: Building a React application with CopilotKit",
|
|
1866
|
+
metadata: { source: "project" }
|
|
1867
|
+
},
|
|
1868
|
+
{
|
|
1869
|
+
content: "Recent activity: Implemented authentication system",
|
|
1870
|
+
metadata: { source: "activity" }
|
|
1871
|
+
},
|
|
1872
|
+
{
|
|
1873
|
+
content: "Development environment: VS Code, Node.js 18, React 18",
|
|
1874
|
+
metadata: { source: "environment" }
|
|
1875
|
+
}
|
|
1876
|
+
],
|
|
1877
|
+
coagentStates: {
|
|
1878
|
+
"main-agent": { status: "active", lastUpdate: Date.now() },
|
|
1879
|
+
"code-assistant": { status: "active", lastUpdate: Date.now() - 15e3 },
|
|
1880
|
+
"search-agent": { status: "idle", lastUpdate: Date.now() - 6e4 }
|
|
1881
|
+
},
|
|
1882
|
+
getDocumentsContext: () => [
|
|
1883
|
+
{
|
|
1884
|
+
content: "README.md: Project setup and installation instructions",
|
|
1885
|
+
metadata: { type: "documentation" }
|
|
1886
|
+
},
|
|
1887
|
+
{
|
|
1888
|
+
content: "API Documentation: CopilotKit integration guide",
|
|
1889
|
+
metadata: { type: "documentation" }
|
|
1890
|
+
},
|
|
1891
|
+
{
|
|
1892
|
+
content: "package.json: Project dependencies and scripts",
|
|
1893
|
+
metadata: { type: "configuration" }
|
|
1894
|
+
}
|
|
1895
|
+
]
|
|
1896
|
+
};
|
|
1897
|
+
const displayMessagesContext = hasApiKey ? messagesContext : {
|
|
1898
|
+
messages: [
|
|
1899
|
+
{
|
|
1900
|
+
id: "1",
|
|
1901
|
+
role: "user",
|
|
1902
|
+
content: "Help me implement a todo list with drag and drop functionality"
|
|
1903
|
+
},
|
|
1904
|
+
{
|
|
1905
|
+
id: "2",
|
|
1906
|
+
role: "assistant",
|
|
1907
|
+
content: "I'll help you create a todo list with drag and drop. Let me start by setting up the basic components and then add the drag and drop functionality using React DnD."
|
|
1908
|
+
},
|
|
1909
|
+
{ id: "3", role: "user", content: "Can you also add priority levels and due dates?" },
|
|
1910
|
+
{
|
|
1911
|
+
id: "4",
|
|
1912
|
+
role: "assistant",
|
|
1913
|
+
content: "Absolutely! I'll enhance the todo items with priority levels (high, medium, low) and due date functionality. This will make your todo list much more powerful for task management."
|
|
1914
|
+
},
|
|
1915
|
+
{ id: "5", role: "user", content: "Perfect! How about adding categories or tags?" }
|
|
1916
|
+
]
|
|
1917
|
+
};
|
|
1918
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1919
|
+
"div",
|
|
1920
|
+
{
|
|
1921
|
+
style: {
|
|
1922
|
+
position: "fixed",
|
|
1923
|
+
top: 0,
|
|
1924
|
+
left: 0,
|
|
1925
|
+
right: 0,
|
|
1926
|
+
bottom: 0,
|
|
1927
|
+
zIndex: 9999,
|
|
1928
|
+
backgroundColor: "rgba(0, 0, 0, 0.3)",
|
|
1929
|
+
display: "flex",
|
|
1930
|
+
alignItems: "center",
|
|
1931
|
+
justifyContent: "center",
|
|
1932
|
+
padding: "16px"
|
|
1933
|
+
},
|
|
1934
|
+
onClick: onClose,
|
|
1935
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1936
|
+
"div",
|
|
1937
|
+
{
|
|
1938
|
+
style: {
|
|
1939
|
+
width: "1152px",
|
|
1940
|
+
maxWidth: "95vw",
|
|
1941
|
+
height: "80vh",
|
|
1942
|
+
backgroundColor: "white",
|
|
1943
|
+
borderRadius: "12px",
|
|
1944
|
+
boxShadow: "0 25px 50px -12px rgba(0, 0, 0, 0.25)",
|
|
1945
|
+
display: "flex",
|
|
1946
|
+
flexDirection: "column",
|
|
1947
|
+
overflow: "hidden",
|
|
1948
|
+
position: "relative"
|
|
1949
|
+
},
|
|
1950
|
+
onClick: (e) => e.stopPropagation(),
|
|
1951
|
+
children: [
|
|
1952
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1953
|
+
"div",
|
|
1954
|
+
{
|
|
1955
|
+
style: {
|
|
1956
|
+
display: "flex",
|
|
1957
|
+
alignItems: "center",
|
|
1958
|
+
justifyContent: "space-between",
|
|
1959
|
+
padding: "24px",
|
|
1960
|
+
borderBottom: "1px solid #e5e7eb",
|
|
1961
|
+
minHeight: "73px",
|
|
1962
|
+
flexShrink: 0,
|
|
1963
|
+
filter: !hasApiKey ? "blur(0.3px)" : "none",
|
|
1964
|
+
opacity: !hasApiKey ? 0.95 : 1
|
|
1965
|
+
},
|
|
1966
|
+
children: [
|
|
1967
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { display: "flex", alignItems: "center", gap: "12px" }, children: [
|
|
1968
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CopilotKitIcon, {}),
|
|
1969
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1970
|
+
"h1",
|
|
1971
|
+
{
|
|
1972
|
+
style: {
|
|
1973
|
+
fontWeight: "bold",
|
|
1974
|
+
fontSize: "20px",
|
|
1975
|
+
color: "#1f2937",
|
|
1976
|
+
margin: 0
|
|
1977
|
+
},
|
|
1978
|
+
children: "Developer Console"
|
|
1979
|
+
}
|
|
1980
|
+
),
|
|
1981
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1982
|
+
"span",
|
|
1983
|
+
{
|
|
1984
|
+
style: {
|
|
1985
|
+
fontSize: "14px",
|
|
1986
|
+
color: "#6b7280",
|
|
1987
|
+
backgroundColor: "#f3f4f6",
|
|
1988
|
+
padding: "4px 8px",
|
|
1989
|
+
borderRadius: "4px"
|
|
1990
|
+
},
|
|
1991
|
+
children: [
|
|
1992
|
+
"v",
|
|
1993
|
+
import_shared11.COPILOTKIT_VERSION
|
|
1994
|
+
]
|
|
1995
|
+
}
|
|
1996
|
+
)
|
|
1997
|
+
] }),
|
|
1998
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
1999
|
+
"button",
|
|
2000
|
+
{
|
|
2001
|
+
onClick: onClose,
|
|
2002
|
+
style: {
|
|
2003
|
+
color: "#9ca3af",
|
|
2004
|
+
fontSize: "24px",
|
|
2005
|
+
fontWeight: "300",
|
|
2006
|
+
border: "none",
|
|
2007
|
+
background: "none",
|
|
2008
|
+
cursor: "pointer",
|
|
2009
|
+
padding: "4px"
|
|
2010
|
+
},
|
|
2011
|
+
onMouseEnter: (e) => e.currentTarget.style.color = "#4b5563",
|
|
2012
|
+
onMouseLeave: (e) => e.currentTarget.style.color = "#9ca3af",
|
|
2013
|
+
children: "\xD7"
|
|
2014
|
+
}
|
|
2015
|
+
)
|
|
2016
|
+
]
|
|
2017
|
+
}
|
|
2018
|
+
),
|
|
2019
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2020
|
+
"div",
|
|
2021
|
+
{
|
|
2022
|
+
style: {
|
|
2023
|
+
display: "flex",
|
|
2024
|
+
borderBottom: "1px solid #e5e7eb",
|
|
2025
|
+
backgroundColor: "#f9fafb",
|
|
2026
|
+
minHeight: "50px",
|
|
2027
|
+
flexShrink: 0,
|
|
2028
|
+
filter: !hasApiKey ? "blur(0.3px)" : "none",
|
|
2029
|
+
opacity: !hasApiKey ? 0.9 : 1
|
|
2030
|
+
},
|
|
2031
|
+
children: [
|
|
2032
|
+
{ id: "actions", label: "Actions", count: Object.keys(displayContext.actions).length },
|
|
2033
|
+
{ id: "readables", label: "Readables", count: displayContext.getAllContext().length },
|
|
2034
|
+
{
|
|
2035
|
+
id: "agent",
|
|
2036
|
+
label: "Agent Status",
|
|
2037
|
+
count: Object.keys(displayContext.coagentStates).length
|
|
2038
|
+
},
|
|
2039
|
+
{ id: "messages", label: "Messages", count: displayMessagesContext.messages.length },
|
|
2040
|
+
{
|
|
2041
|
+
id: "context",
|
|
2042
|
+
label: "Context",
|
|
2043
|
+
count: displayContext.getDocumentsContext([]).length
|
|
2044
|
+
}
|
|
2045
|
+
].map((tab) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2046
|
+
"button",
|
|
2047
|
+
{
|
|
2048
|
+
onClick: () => setActiveTab(tab.id),
|
|
2049
|
+
style: {
|
|
2050
|
+
padding: "12px 24px",
|
|
2051
|
+
fontSize: "14px",
|
|
2052
|
+
fontWeight: "500",
|
|
2053
|
+
border: "none",
|
|
2054
|
+
cursor: "pointer",
|
|
2055
|
+
backgroundColor: activeTab === tab.id ? "white" : "transparent",
|
|
2056
|
+
color: activeTab === tab.id ? "#2563eb" : "#6b7280",
|
|
2057
|
+
borderBottom: activeTab === tab.id ? "2px solid #2563eb" : "none",
|
|
2058
|
+
transition: "all 0.2s"
|
|
2059
|
+
},
|
|
2060
|
+
onMouseEnter: (e) => {
|
|
2061
|
+
if (activeTab !== tab.id) {
|
|
2062
|
+
e.currentTarget.style.color = "#1f2937";
|
|
2063
|
+
e.currentTarget.style.backgroundColor = "#f3f4f6";
|
|
2064
|
+
}
|
|
2065
|
+
},
|
|
2066
|
+
onMouseLeave: (e) => {
|
|
2067
|
+
if (activeTab !== tab.id) {
|
|
2068
|
+
e.currentTarget.style.color = "#6b7280";
|
|
2069
|
+
e.currentTarget.style.backgroundColor = "transparent";
|
|
2070
|
+
}
|
|
2071
|
+
},
|
|
2072
|
+
children: [
|
|
2073
|
+
tab.label,
|
|
2074
|
+
tab.count > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2075
|
+
"span",
|
|
2076
|
+
{
|
|
2077
|
+
style: {
|
|
2078
|
+
marginLeft: "8px",
|
|
2079
|
+
backgroundColor: "#e5e7eb",
|
|
2080
|
+
color: "#374151",
|
|
2081
|
+
padding: "2px 8px",
|
|
2082
|
+
borderRadius: "9999px",
|
|
2083
|
+
fontSize: "12px"
|
|
2084
|
+
},
|
|
2085
|
+
children: tab.count
|
|
2086
|
+
}
|
|
2087
|
+
)
|
|
2088
|
+
]
|
|
2089
|
+
},
|
|
2090
|
+
tab.id
|
|
2091
|
+
))
|
|
2092
|
+
}
|
|
2093
|
+
),
|
|
2094
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2095
|
+
"div",
|
|
2096
|
+
{
|
|
2097
|
+
style: {
|
|
2098
|
+
height: "calc(100% - 142px)",
|
|
2099
|
+
overflow: "auto",
|
|
2100
|
+
padding: "24px",
|
|
2101
|
+
backgroundColor: "#f9fafb",
|
|
2102
|
+
filter: !hasApiKey ? "blur(0.3px)" : "none",
|
|
2103
|
+
opacity: !hasApiKey ? 0.85 : 1
|
|
2104
|
+
},
|
|
2105
|
+
children: [
|
|
2106
|
+
activeTab === "actions" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ActionsTab, { context: displayContext }),
|
|
2107
|
+
activeTab === "readables" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ReadablesTab, { context: displayContext }),
|
|
2108
|
+
activeTab === "agent" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(AgentStatusTab, { context: displayContext }),
|
|
2109
|
+
activeTab === "messages" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(MessagesTab, { messagesContext: displayMessagesContext }),
|
|
2110
|
+
activeTab === "context" && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ContextTab, { context: displayContext })
|
|
2111
|
+
]
|
|
2112
|
+
}
|
|
2113
|
+
),
|
|
2114
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2115
|
+
"div",
|
|
2116
|
+
{
|
|
2117
|
+
style: {
|
|
2118
|
+
padding: "16px 24px",
|
|
2119
|
+
borderTop: "1px solid #e5e7eb",
|
|
2120
|
+
backgroundColor: "white",
|
|
2121
|
+
display: "flex",
|
|
2122
|
+
justifyContent: "space-between",
|
|
2123
|
+
alignItems: "center",
|
|
2124
|
+
minHeight: "57px",
|
|
2125
|
+
flexShrink: 0,
|
|
2126
|
+
filter: !hasApiKey ? "blur(0.3px)" : "none",
|
|
2127
|
+
opacity: !hasApiKey ? 0.9 : 1
|
|
2128
|
+
},
|
|
2129
|
+
children: [
|
|
2130
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { fontSize: "14px", color: "#6b7280" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2131
|
+
"a",
|
|
2132
|
+
{
|
|
2133
|
+
href: "https://github.com/CopilotKit/CopilotKit/issues",
|
|
2134
|
+
target: "_blank",
|
|
2135
|
+
rel: "noopener noreferrer",
|
|
2136
|
+
style: { color: "#2563eb", textDecoration: "none" },
|
|
2137
|
+
onMouseEnter: (e) => e.currentTarget.style.textDecoration = "underline",
|
|
2138
|
+
onMouseLeave: (e) => e.currentTarget.style.textDecoration = "none",
|
|
2139
|
+
children: "Report an issue"
|
|
2140
|
+
}
|
|
2141
|
+
) }),
|
|
2142
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { fontSize: "14px", color: "#6b7280" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2143
|
+
"a",
|
|
2144
|
+
{
|
|
2145
|
+
href: "https://mcp.copilotkit.ai/",
|
|
2146
|
+
target: "_blank",
|
|
2147
|
+
rel: "noopener noreferrer",
|
|
2148
|
+
style: { color: "#2563eb", textDecoration: "none" },
|
|
2149
|
+
onMouseEnter: (e) => e.currentTarget.style.textDecoration = "underline",
|
|
2150
|
+
onMouseLeave: (e) => e.currentTarget.style.textDecoration = "none",
|
|
2151
|
+
children: "Add MCP Server \u2192"
|
|
2152
|
+
}
|
|
2153
|
+
) })
|
|
2154
|
+
]
|
|
2155
|
+
}
|
|
2156
|
+
),
|
|
2157
|
+
!hasApiKey && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2158
|
+
"div",
|
|
2159
|
+
{
|
|
2160
|
+
style: {
|
|
2161
|
+
position: "absolute",
|
|
2162
|
+
top: 0,
|
|
2163
|
+
left: 0,
|
|
2164
|
+
right: 0,
|
|
2165
|
+
bottom: 0,
|
|
2166
|
+
backgroundColor: "rgba(255, 255, 255, 0.2)",
|
|
2167
|
+
backdropFilter: "blur(2px)",
|
|
2168
|
+
WebkitBackdropFilter: "blur(2px)",
|
|
2169
|
+
display: "flex",
|
|
2170
|
+
alignItems: "center",
|
|
2171
|
+
justifyContent: "center",
|
|
2172
|
+
borderRadius: "12px",
|
|
2173
|
+
zIndex: 10
|
|
2174
|
+
},
|
|
2175
|
+
onClick: (e) => e.stopPropagation(),
|
|
2176
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2177
|
+
"button",
|
|
2178
|
+
{
|
|
2179
|
+
onClick: () => window.open("https://cloud.copilotkit.ai/sign-in", "_blank"),
|
|
2180
|
+
style: {
|
|
2181
|
+
// Following button system specifications
|
|
2182
|
+
height: "48px",
|
|
2183
|
+
padding: "12px 24px",
|
|
2184
|
+
backgroundColor: "#030507",
|
|
2185
|
+
// textPrimary token
|
|
2186
|
+
color: "#FFFFFF",
|
|
2187
|
+
borderRadius: "12px",
|
|
2188
|
+
// Medium radius token
|
|
2189
|
+
border: "none",
|
|
2190
|
+
cursor: "pointer",
|
|
2191
|
+
fontSize: "14px",
|
|
2192
|
+
// Medium Semi Bold typography
|
|
2193
|
+
fontWeight: "600",
|
|
2194
|
+
fontFamily: "'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif",
|
|
2195
|
+
lineHeight: "22px",
|
|
2196
|
+
boxShadow: "0 4px 16px rgba(3, 5, 7, 0.2), 0 1px 3px rgba(3, 5, 7, 0.1)",
|
|
2197
|
+
transition: "all 200ms ease",
|
|
2198
|
+
// 200ms ease as per specs
|
|
2199
|
+
display: "inline-flex",
|
|
2200
|
+
alignItems: "center",
|
|
2201
|
+
gap: "8px",
|
|
2202
|
+
textTransform: "uppercase",
|
|
2203
|
+
letterSpacing: "0.5px"
|
|
2204
|
+
},
|
|
2205
|
+
onMouseEnter: (e) => {
|
|
2206
|
+
e.currentTarget.style.backgroundColor = "#575758";
|
|
2207
|
+
e.currentTarget.style.transform = "translateY(-1px)";
|
|
2208
|
+
e.currentTarget.style.boxShadow = "0 6px 20px rgba(3, 5, 7, 0.25), 0 2px 4px rgba(3, 5, 7, 0.15)";
|
|
2209
|
+
},
|
|
2210
|
+
onMouseLeave: (e) => {
|
|
2211
|
+
e.currentTarget.style.backgroundColor = "#030507";
|
|
2212
|
+
e.currentTarget.style.transform = "translateY(0)";
|
|
2213
|
+
e.currentTarget.style.boxShadow = "0 4px 16px rgba(3, 5, 7, 0.2), 0 1px 3px rgba(3, 5, 7, 0.1)";
|
|
2214
|
+
},
|
|
2215
|
+
onMouseDown: (e) => {
|
|
2216
|
+
e.currentTarget.style.backgroundColor = "#858589";
|
|
2217
|
+
e.currentTarget.style.transform = "translateY(0)";
|
|
2218
|
+
},
|
|
2219
|
+
onMouseUp: (e) => {
|
|
2220
|
+
e.currentTarget.style.backgroundColor = "#575758";
|
|
2221
|
+
e.currentTarget.style.transform = "translateY(-1px)";
|
|
2222
|
+
},
|
|
2223
|
+
onFocus: (e) => {
|
|
2224
|
+
e.currentTarget.style.outline = "2px solid #BEC9FF";
|
|
2225
|
+
e.currentTarget.style.outlineOffset = "2px";
|
|
2226
|
+
},
|
|
2227
|
+
onBlur: (e) => {
|
|
2228
|
+
e.currentTarget.style.outline = "none";
|
|
2229
|
+
},
|
|
2230
|
+
children: [
|
|
2231
|
+
"Get API Key",
|
|
2232
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { fontSize: "16px", marginLeft: "-4px" }, children: "\u2192" })
|
|
2233
|
+
]
|
|
2234
|
+
}
|
|
2235
|
+
)
|
|
2236
|
+
}
|
|
2237
|
+
)
|
|
2238
|
+
]
|
|
2239
|
+
}
|
|
2240
|
+
)
|
|
2241
|
+
}
|
|
2242
|
+
);
|
|
2243
|
+
}
|
|
2244
|
+
function ActionsTab({ context }) {
|
|
2245
|
+
const actions = Object.values(context.actions);
|
|
2246
|
+
if (actions.length === 0) {
|
|
2247
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
|
|
2248
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "18px", margin: "0 0 8px 0" }, children: "No actions available" }),
|
|
2249
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "14px", margin: 0 }, children: "Actions will appear here when registered" })
|
|
2250
|
+
] });
|
|
2251
|
+
}
|
|
2252
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: actions.map((action, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2253
|
+
"div",
|
|
2254
|
+
{
|
|
2255
|
+
style: {
|
|
2256
|
+
backgroundColor: "white",
|
|
2257
|
+
padding: "16px",
|
|
2258
|
+
borderRadius: "8px",
|
|
2259
|
+
boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
|
|
2260
|
+
border: "1px solid #e5e7eb"
|
|
2261
|
+
},
|
|
2262
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2263
|
+
"div",
|
|
2264
|
+
{
|
|
2265
|
+
style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" },
|
|
2266
|
+
children: [
|
|
2267
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { flex: 1 }, children: [
|
|
2268
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { style: { fontWeight: "600", color: "#1f2937", margin: "0 0 4px 0" }, children: action.name }),
|
|
2269
|
+
action.description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "14px", color: "#4b5563", margin: "0 0 12px 0" }, children: action.description }),
|
|
2270
|
+
action.parameters && action.parameters.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { marginTop: "12px" }, children: [
|
|
2271
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2272
|
+
"p",
|
|
2273
|
+
{
|
|
2274
|
+
style: {
|
|
2275
|
+
fontSize: "12px",
|
|
2276
|
+
fontWeight: "500",
|
|
2277
|
+
color: "#6b7280",
|
|
2278
|
+
textTransform: "uppercase",
|
|
2279
|
+
margin: "0 0 4px 0"
|
|
2280
|
+
},
|
|
2281
|
+
children: "Parameters:"
|
|
2282
|
+
}
|
|
2283
|
+
),
|
|
2284
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "4px" }, children: action.parameters.map((param, pIndex) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { fontSize: "14px" }, children: [
|
|
2285
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { fontFamily: "monospace", color: "#374151" }, children: param.name }),
|
|
2286
|
+
param.required && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { marginLeft: "4px", fontSize: "12px", color: "#ef4444" }, children: "*required" }),
|
|
2287
|
+
param.type && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("span", { style: { marginLeft: "8px", fontSize: "12px", color: "#6b7280" }, children: [
|
|
2288
|
+
"(",
|
|
2289
|
+
param.type,
|
|
2290
|
+
")"
|
|
2291
|
+
] })
|
|
2292
|
+
] }, pIndex)) })
|
|
2293
|
+
] })
|
|
2294
|
+
] }),
|
|
2295
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginLeft: "16px" }, children: action.status === "available" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(CheckIcon, {}) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(ExclamationMarkTriangleIcon, {}) })
|
|
2296
|
+
]
|
|
2297
|
+
}
|
|
2298
|
+
)
|
|
2299
|
+
},
|
|
2300
|
+
index
|
|
2301
|
+
)) });
|
|
2302
|
+
}
|
|
2303
|
+
function ReadablesTab({ context }) {
|
|
2304
|
+
const readables = context.getAllContext();
|
|
2305
|
+
if (readables.length === 0) {
|
|
2306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
|
|
2307
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "18px", margin: "0 0 8px 0" }, children: "No readable context available" }),
|
|
2308
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "14px", margin: 0 }, children: "Readable context will appear here when provided" })
|
|
2309
|
+
] });
|
|
2310
|
+
}
|
|
2311
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: readables.map((readable, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2312
|
+
"div",
|
|
2313
|
+
{
|
|
2314
|
+
style: {
|
|
2315
|
+
backgroundColor: "white",
|
|
2316
|
+
padding: "16px",
|
|
2317
|
+
borderRadius: "8px",
|
|
2318
|
+
boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
|
|
2319
|
+
border: "1px solid #e5e7eb"
|
|
2320
|
+
},
|
|
2321
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2322
|
+
"div",
|
|
2323
|
+
{
|
|
2324
|
+
style: { display: "flex", alignItems: "flex-start", justifyContent: "space-between" },
|
|
2325
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { flex: 1 }, children: [
|
|
2326
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { style: { fontWeight: "600", color: "#1f2937", margin: "0 0 4px 0" }, children: readable.name || `Readable ${index + 1}` }),
|
|
2327
|
+
readable.description && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "14px", color: "#4b5563", margin: "0 0 12px 0" }, children: readable.description }),
|
|
2328
|
+
readable.value && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2329
|
+
"pre",
|
|
2330
|
+
{
|
|
2331
|
+
style: {
|
|
2332
|
+
marginTop: "12px",
|
|
2333
|
+
padding: "8px",
|
|
2334
|
+
backgroundColor: "#f9fafb",
|
|
2335
|
+
borderRadius: "4px",
|
|
2336
|
+
fontSize: "12px",
|
|
2337
|
+
overflowX: "auto",
|
|
2338
|
+
margin: "12px 0 0 0"
|
|
2339
|
+
},
|
|
2340
|
+
children: JSON.stringify(readable.value, null, 2)
|
|
2341
|
+
}
|
|
2342
|
+
)
|
|
2343
|
+
] })
|
|
2344
|
+
}
|
|
2345
|
+
)
|
|
2346
|
+
},
|
|
2347
|
+
index
|
|
2348
|
+
)) });
|
|
2349
|
+
}
|
|
2350
|
+
function AgentStatusTab({ context }) {
|
|
2351
|
+
const agentStates = context.coagentStates || {};
|
|
2352
|
+
const agentStateEntries = Object.entries(agentStates);
|
|
2353
|
+
if (agentStateEntries.length === 0) {
|
|
2354
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
|
|
2355
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "18px", margin: "0 0 8px 0" }, children: "No agent states available" }),
|
|
2356
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "14px", margin: 0 }, children: "Agent states will appear here when agents are active" })
|
|
2357
|
+
] });
|
|
2358
|
+
}
|
|
2359
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "24px" }, children: agentStateEntries.map(([agentName, state]) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2360
|
+
"div",
|
|
2361
|
+
{
|
|
2362
|
+
style: {
|
|
2363
|
+
backgroundColor: "white",
|
|
2364
|
+
padding: "24px",
|
|
2365
|
+
borderRadius: "8px",
|
|
2366
|
+
boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
|
|
2367
|
+
border: "1px solid #e5e7eb"
|
|
2368
|
+
},
|
|
2369
|
+
children: [
|
|
2370
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2371
|
+
"div",
|
|
2372
|
+
{
|
|
2373
|
+
style: {
|
|
2374
|
+
display: "flex",
|
|
2375
|
+
alignItems: "center",
|
|
2376
|
+
justifyContent: "space-between",
|
|
2377
|
+
marginBottom: "16px"
|
|
2378
|
+
},
|
|
2379
|
+
children: [
|
|
2380
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { style: { fontWeight: "600", fontSize: "18px", color: "#1f2937", margin: 0 }, children: agentName }),
|
|
2381
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2382
|
+
"span",
|
|
2383
|
+
{
|
|
2384
|
+
style: {
|
|
2385
|
+
padding: "4px 12px",
|
|
2386
|
+
borderRadius: "9999px",
|
|
2387
|
+
fontSize: "12px",
|
|
2388
|
+
fontWeight: "500",
|
|
2389
|
+
backgroundColor: state.status === "running" ? "#dcfce7" : state.status === "complete" ? "#dbeafe" : "#f3f4f6",
|
|
2390
|
+
color: state.status === "running" ? "#166534" : state.status === "complete" ? "#1e40af" : "#1f2937"
|
|
2391
|
+
},
|
|
2392
|
+
children: state.status || "idle"
|
|
2393
|
+
}
|
|
2394
|
+
)
|
|
2395
|
+
]
|
|
2396
|
+
}
|
|
2397
|
+
),
|
|
2398
|
+
state.state && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { marginBottom: "12px" }, children: [
|
|
2399
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2400
|
+
"p",
|
|
2401
|
+
{
|
|
2402
|
+
style: {
|
|
2403
|
+
fontSize: "12px",
|
|
2404
|
+
fontWeight: "500",
|
|
2405
|
+
color: "#6b7280",
|
|
2406
|
+
textTransform: "uppercase",
|
|
2407
|
+
margin: "0 0 4px 0"
|
|
2408
|
+
},
|
|
2409
|
+
children: "Current State:"
|
|
2410
|
+
}
|
|
2411
|
+
),
|
|
2412
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2413
|
+
"pre",
|
|
2414
|
+
{
|
|
2415
|
+
style: {
|
|
2416
|
+
padding: "12px",
|
|
2417
|
+
backgroundColor: "#f9fafb",
|
|
2418
|
+
borderRadius: "4px",
|
|
2419
|
+
fontSize: "12px",
|
|
2420
|
+
overflowX: "auto",
|
|
2421
|
+
margin: 0
|
|
2422
|
+
},
|
|
2423
|
+
children: JSON.stringify(state.state, null, 2)
|
|
2424
|
+
}
|
|
2425
|
+
)
|
|
2426
|
+
] }),
|
|
2427
|
+
state.running && /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2428
|
+
"div",
|
|
2429
|
+
{
|
|
2430
|
+
style: {
|
|
2431
|
+
marginTop: "16px",
|
|
2432
|
+
display: "flex",
|
|
2433
|
+
alignItems: "center",
|
|
2434
|
+
fontSize: "14px",
|
|
2435
|
+
color: "#4b5563"
|
|
2436
|
+
},
|
|
2437
|
+
children: [
|
|
2438
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { marginRight: "8px" }, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2439
|
+
"svg",
|
|
2440
|
+
{
|
|
2441
|
+
width: "16",
|
|
2442
|
+
height: "16",
|
|
2443
|
+
viewBox: "0 0 16 16",
|
|
2444
|
+
style: { animation: "spin 1s linear infinite" },
|
|
2445
|
+
children: [
|
|
2446
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("style", { children: `@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }` }),
|
|
2447
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2448
|
+
"circle",
|
|
2449
|
+
{
|
|
2450
|
+
cx: "8",
|
|
2451
|
+
cy: "8",
|
|
2452
|
+
r: "6",
|
|
2453
|
+
fill: "none",
|
|
2454
|
+
stroke: "#4b5563",
|
|
2455
|
+
strokeWidth: "2",
|
|
2456
|
+
strokeDasharray: "9 3"
|
|
2457
|
+
}
|
|
2458
|
+
)
|
|
2459
|
+
]
|
|
2460
|
+
}
|
|
2461
|
+
) }),
|
|
2462
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { children: "Agent is currently running..." })
|
|
2463
|
+
]
|
|
2464
|
+
}
|
|
2465
|
+
)
|
|
2466
|
+
]
|
|
2467
|
+
},
|
|
2468
|
+
agentName
|
|
2469
|
+
)) });
|
|
2470
|
+
}
|
|
2471
|
+
function MessagesTab({ messagesContext }) {
|
|
2472
|
+
const messages = messagesContext.messages || [];
|
|
2473
|
+
if (messages.length === 0) {
|
|
2474
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
|
|
2475
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "18px", margin: "0 0 8px 0" }, children: "No messages yet" }),
|
|
2476
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "14px", margin: 0 }, children: "Messages will appear here as the conversation progresses" })
|
|
2477
|
+
] });
|
|
2478
|
+
}
|
|
2479
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: messages.map((message, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2480
|
+
"div",
|
|
2481
|
+
{
|
|
2482
|
+
style: {
|
|
2483
|
+
padding: "16px",
|
|
2484
|
+
borderRadius: "8px",
|
|
2485
|
+
backgroundColor: message.role === "user" ? "#eff6ff" : message.role === "assistant" ? "#f9fafb" : "#fefce8",
|
|
2486
|
+
border: `1px solid ${message.role === "user" ? "#c7d2fe" : message.role === "assistant" ? "#e5e7eb" : "#fde047"}`,
|
|
2487
|
+
marginLeft: message.role === "user" ? "48px" : "0",
|
|
2488
|
+
marginRight: message.role === "assistant" ? "48px" : "0"
|
|
2489
|
+
},
|
|
2490
|
+
children: [
|
|
2491
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2492
|
+
"div",
|
|
2493
|
+
{
|
|
2494
|
+
style: {
|
|
2495
|
+
display: "flex",
|
|
2496
|
+
alignItems: "flex-start",
|
|
2497
|
+
justifyContent: "space-between",
|
|
2498
|
+
marginBottom: "8px"
|
|
2499
|
+
},
|
|
2500
|
+
children: [
|
|
2501
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2502
|
+
"span",
|
|
2503
|
+
{
|
|
2504
|
+
style: {
|
|
2505
|
+
fontWeight: "500",
|
|
2506
|
+
fontSize: "14px",
|
|
2507
|
+
color: "#374151",
|
|
2508
|
+
textTransform: "capitalize"
|
|
2509
|
+
},
|
|
2510
|
+
children: message.role || "system"
|
|
2511
|
+
}
|
|
2512
|
+
),
|
|
2513
|
+
message.timestamp && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("span", { style: { fontSize: "12px", color: "#6b7280" }, children: new Date(message.timestamp).toLocaleTimeString() })
|
|
2514
|
+
]
|
|
2515
|
+
}
|
|
2516
|
+
),
|
|
2517
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { fontSize: "14px", color: "#1f2937", whiteSpace: "pre-wrap" }, children: message.content || "" })
|
|
2518
|
+
]
|
|
2519
|
+
},
|
|
2520
|
+
index
|
|
2521
|
+
)) });
|
|
2522
|
+
}
|
|
2523
|
+
function ContextTab({ context }) {
|
|
2524
|
+
const documents = context.getDocumentsContext([]);
|
|
2525
|
+
if (documents.length === 0) {
|
|
2526
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { style: { textAlign: "center", padding: "48px 0", color: "#6b7280" }, children: [
|
|
2527
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "18px", margin: "0 0 8px 0" }, children: "No document context available" }),
|
|
2528
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { style: { fontSize: "14px", margin: 0 }, children: "Document context will appear here when provided" })
|
|
2529
|
+
] });
|
|
2530
|
+
}
|
|
2531
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "16px" }, children: documents.map((doc, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
2532
|
+
"div",
|
|
2533
|
+
{
|
|
2534
|
+
style: {
|
|
2535
|
+
backgroundColor: "white",
|
|
2536
|
+
padding: "16px",
|
|
2537
|
+
borderRadius: "8px",
|
|
2538
|
+
boxShadow: "0 1px 3px 0 rgba(0, 0, 0, 0.1)",
|
|
2539
|
+
border: "1px solid #e5e7eb"
|
|
2540
|
+
},
|
|
2541
|
+
children: [
|
|
2542
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h3", { style: { fontWeight: "600", color: "#1f2937", margin: "0 0 8px 0" }, children: doc.name || `Document ${index + 1}` }),
|
|
2543
|
+
doc.content && /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
2544
|
+
"pre",
|
|
2545
|
+
{
|
|
2546
|
+
style: {
|
|
2547
|
+
padding: "12px",
|
|
2548
|
+
backgroundColor: "#f9fafb",
|
|
2549
|
+
borderRadius: "4px",
|
|
2550
|
+
fontSize: "12px",
|
|
2551
|
+
overflowX: "auto",
|
|
2552
|
+
margin: 0
|
|
2553
|
+
},
|
|
2554
|
+
children: doc.content
|
|
2555
|
+
}
|
|
2556
|
+
)
|
|
2557
|
+
]
|
|
2558
|
+
},
|
|
2559
|
+
index
|
|
2560
|
+
)) });
|
|
2561
|
+
}
|
|
2562
|
+
|
|
2563
|
+
// src/components/dev-console/console-trigger.tsx
|
|
2564
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
2565
|
+
function ConsoleTrigger({ position = "bottom-right" }) {
|
|
2566
|
+
const context = useCopilotContext();
|
|
2567
|
+
const hasApiKey = Boolean(context.copilotApiConfig.publicApiKey);
|
|
2568
|
+
const [isModalOpen, setIsModalOpen] = (0, import_react11.useState)(false);
|
|
2569
|
+
const [isHovered, setIsHovered] = (0, import_react11.useState)(false);
|
|
2570
|
+
const [isDragging, setIsDragging] = (0, import_react11.useState)(false);
|
|
2571
|
+
const [buttonPosition, setButtonPosition] = (0, import_react11.useState)(null);
|
|
2572
|
+
const [mounted, setMounted] = (0, import_react11.useState)(false);
|
|
2573
|
+
const dragRef = (0, import_react11.useRef)(null);
|
|
2574
|
+
const buttonRef = (0, import_react11.useRef)(null);
|
|
2575
|
+
(0, import_react11.useEffect)(() => {
|
|
2576
|
+
setMounted(true);
|
|
2577
|
+
if (typeof window !== "undefined" && !buttonPosition) {
|
|
2578
|
+
const buttonSize = 60;
|
|
2579
|
+
const margin = 24;
|
|
2580
|
+
const initialPosition = {
|
|
2581
|
+
x: margin,
|
|
2582
|
+
y: window.innerHeight - buttonSize - margin
|
|
2583
|
+
};
|
|
2584
|
+
setButtonPosition(initialPosition);
|
|
2585
|
+
}
|
|
2586
|
+
}, [position]);
|
|
2587
|
+
const handleMouseDown = (e) => {
|
|
2588
|
+
e.preventDefault();
|
|
2589
|
+
if (!buttonPosition)
|
|
2590
|
+
return;
|
|
2591
|
+
dragRef.current = {
|
|
2592
|
+
startX: e.clientX,
|
|
2593
|
+
startY: e.clientY,
|
|
2594
|
+
buttonX: buttonPosition.x,
|
|
2595
|
+
buttonY: buttonPosition.y
|
|
2596
|
+
};
|
|
2597
|
+
setIsDragging(true);
|
|
2598
|
+
};
|
|
2599
|
+
(0, import_react11.useEffect)(() => {
|
|
2600
|
+
if (!isDragging)
|
|
2601
|
+
return;
|
|
2602
|
+
const handleMouseMove = (e) => {
|
|
2603
|
+
e.preventDefault();
|
|
2604
|
+
e.stopPropagation();
|
|
2605
|
+
if (!dragRef.current)
|
|
2606
|
+
return;
|
|
2607
|
+
const deltaX = e.clientX - dragRef.current.startX;
|
|
2608
|
+
const deltaY = e.clientY - dragRef.current.startY;
|
|
2609
|
+
let newX = dragRef.current.buttonX + deltaX;
|
|
2610
|
+
let newY = dragRef.current.buttonY + deltaY;
|
|
2611
|
+
newX = Math.max(0, Math.min(newX, window.innerWidth - 60));
|
|
2612
|
+
newY = Math.max(0, Math.min(newY, window.innerHeight - 60));
|
|
2613
|
+
setButtonPosition({ x: newX, y: newY });
|
|
2614
|
+
};
|
|
2615
|
+
const handleMouseUp = (e) => {
|
|
2616
|
+
e.preventDefault();
|
|
2617
|
+
e.stopPropagation();
|
|
2618
|
+
setIsDragging(false);
|
|
2619
|
+
dragRef.current = null;
|
|
2620
|
+
};
|
|
2621
|
+
document.addEventListener("mousemove", handleMouseMove, { capture: true, passive: false });
|
|
2622
|
+
document.addEventListener("mouseup", handleMouseUp, { capture: true, passive: false });
|
|
2623
|
+
return () => {
|
|
2624
|
+
document.removeEventListener("mousemove", handleMouseMove, { capture: true });
|
|
2625
|
+
document.removeEventListener("mouseup", handleMouseUp, { capture: true });
|
|
2626
|
+
};
|
|
2627
|
+
}, [isDragging]);
|
|
2628
|
+
if (!mounted || !buttonPosition) {
|
|
2629
|
+
return null;
|
|
2630
|
+
}
|
|
2631
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_jsx_runtime9.Fragment, { children: [
|
|
2632
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
2633
|
+
"button",
|
|
2634
|
+
{
|
|
2635
|
+
ref: buttonRef,
|
|
2636
|
+
onClick: () => {
|
|
2637
|
+
if (!isDragging) {
|
|
2638
|
+
setIsModalOpen(true);
|
|
2639
|
+
}
|
|
2640
|
+
},
|
|
2641
|
+
onMouseDown: handleMouseDown,
|
|
2642
|
+
onMouseEnter: () => setIsHovered(true),
|
|
2643
|
+
onMouseLeave: () => setIsHovered(false),
|
|
2644
|
+
style: {
|
|
2645
|
+
position: "fixed",
|
|
2646
|
+
left: `${buttonPosition.x}px`,
|
|
2647
|
+
top: `${buttonPosition.y}px`,
|
|
2648
|
+
zIndex: 2147483647,
|
|
2649
|
+
width: "60px",
|
|
2650
|
+
height: "60px",
|
|
2651
|
+
background: isDragging ? "#000000" : isHovered ? "#111111" : "#000000",
|
|
2652
|
+
color: "white",
|
|
2653
|
+
borderRadius: "50%",
|
|
2654
|
+
boxShadow: isDragging ? "0 8px 32px rgba(0, 0, 0, 0.6), 0 4px 16px rgba(0, 0, 0, 0.4)" : isHovered ? "0 12px 40px rgba(0, 0, 0, 0.7), 0 6px 20px rgba(0, 0, 0, 0.5)" : "0 6px 20px rgba(0, 0, 0, 0.5), 0 3px 10px rgba(0, 0, 0, 0.3)",
|
|
2655
|
+
transition: isDragging ? "none" : "all 0.3s cubic-bezier(0.4, 0, 0.2, 1)",
|
|
2656
|
+
display: "flex",
|
|
2657
|
+
alignItems: "center",
|
|
2658
|
+
justifyContent: "center",
|
|
2659
|
+
border: "none",
|
|
2660
|
+
cursor: isDragging ? "grabbing" : "grab",
|
|
2661
|
+
opacity: 1,
|
|
2662
|
+
userSelect: "none",
|
|
2663
|
+
transform: isDragging ? "scale(1.05)" : isHovered ? "scale(1.1)" : "scale(1)",
|
|
2664
|
+
backdropFilter: "blur(10px)",
|
|
2665
|
+
pointerEvents: "auto",
|
|
2666
|
+
isolation: "isolate"
|
|
2667
|
+
},
|
|
2668
|
+
title: hasApiKey ? "Open Developer Console (Drag to move)" : "Developer Console (API Key Required, Drag to move)",
|
|
2669
|
+
children: [
|
|
2670
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2671
|
+
"div",
|
|
2672
|
+
{
|
|
2673
|
+
style: {
|
|
2674
|
+
width: "28px",
|
|
2675
|
+
height: "28px",
|
|
2676
|
+
display: "flex",
|
|
2677
|
+
alignItems: "center",
|
|
2678
|
+
justifyContent: "center",
|
|
2679
|
+
filter: "drop-shadow(0 2px 4px rgba(0,0,0,0.2))"
|
|
2680
|
+
},
|
|
2681
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(CopilotKitIcon, {})
|
|
2682
|
+
}
|
|
2683
|
+
),
|
|
2684
|
+
!hasApiKey && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2685
|
+
"div",
|
|
2686
|
+
{
|
|
2687
|
+
style: {
|
|
2688
|
+
position: "absolute",
|
|
2689
|
+
top: "-2px",
|
|
2690
|
+
right: "-2px",
|
|
2691
|
+
width: "18px",
|
|
2692
|
+
height: "18px",
|
|
2693
|
+
background: "linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%)",
|
|
2694
|
+
borderRadius: "50%",
|
|
2695
|
+
display: "flex",
|
|
2696
|
+
alignItems: "center",
|
|
2697
|
+
justifyContent: "center",
|
|
2698
|
+
boxShadow: "0 2px 8px rgba(255, 107, 107, 0.4)",
|
|
2699
|
+
border: "2px solid white"
|
|
2700
|
+
},
|
|
2701
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)("span", { style: { fontSize: "10px", color: "white", fontWeight: "bold" }, children: "!" })
|
|
2702
|
+
}
|
|
2703
|
+
)
|
|
2704
|
+
]
|
|
2705
|
+
}
|
|
2706
|
+
),
|
|
2707
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
2708
|
+
DeveloperConsoleModal,
|
|
2709
|
+
{
|
|
2710
|
+
isOpen: isModalOpen,
|
|
2711
|
+
onClose: () => setIsModalOpen(false),
|
|
2712
|
+
hasApiKey
|
|
2713
|
+
}
|
|
2714
|
+
)
|
|
2715
|
+
] });
|
|
2716
|
+
}
|
|
2717
|
+
|
|
2718
|
+
// src/components/copilot-provider/copilotkit.tsx
|
|
2719
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
1759
2720
|
function CopilotKit(_a) {
|
|
1760
2721
|
var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
|
|
1761
2722
|
const enabled = shouldShowDevConsole(props.showDevConsole);
|
|
1762
|
-
|
|
2723
|
+
const publicApiKey = props.publicApiKey || props.publicLicenseKey;
|
|
2724
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ToastProvider, { enabled, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CopilotErrorBoundary, { publicApiKey, showUsageBanner: enabled, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(CopilotKitInternal, __spreadProps(__spreadValues({}, props), { children })) }) });
|
|
1763
2725
|
}
|
|
1764
2726
|
function CopilotKitInternal(cpkProps) {
|
|
1765
2727
|
const _a = cpkProps, { children } = _a, props = __objRest(_a, ["children"]);
|
|
1766
2728
|
validateProps(cpkProps);
|
|
1767
|
-
const
|
|
1768
|
-
const
|
|
1769
|
-
const [
|
|
1770
|
-
const
|
|
2729
|
+
const publicApiKey = props.publicLicenseKey || props.publicApiKey;
|
|
2730
|
+
const chatApiEndpoint = props.runtimeUrl || import_shared12.COPILOT_CLOUD_CHAT_URL;
|
|
2731
|
+
const [actions, setActions] = (0, import_react12.useState)({});
|
|
2732
|
+
const [coAgentStateRenders, setCoAgentStateRenders] = (0, import_react12.useState)({});
|
|
2733
|
+
const chatComponentsCache = (0, import_react12.useRef)({
|
|
1771
2734
|
actions: {},
|
|
1772
2735
|
coAgentStateRenders: {}
|
|
1773
2736
|
});
|
|
1774
2737
|
const { addElement, removeElement, printTree, getAllElements } = use_tree_default();
|
|
1775
|
-
const [isLoading, setIsLoading] = (0,
|
|
1776
|
-
const [chatInstructions, setChatInstructions] = (0,
|
|
1777
|
-
const [authStates, setAuthStates] = (0,
|
|
1778
|
-
const [extensions, setExtensions] = (0,
|
|
1779
|
-
const [additionalInstructions, setAdditionalInstructions] = (0,
|
|
2738
|
+
const [isLoading, setIsLoading] = (0, import_react12.useState)(false);
|
|
2739
|
+
const [chatInstructions, setChatInstructions] = (0, import_react12.useState)("");
|
|
2740
|
+
const [authStates, setAuthStates] = (0, import_react12.useState)({});
|
|
2741
|
+
const [extensions, setExtensions] = (0, import_react12.useState)({});
|
|
2742
|
+
const [additionalInstructions, setAdditionalInstructions] = (0, import_react12.useState)([]);
|
|
1780
2743
|
const {
|
|
1781
2744
|
addElement: addDocument,
|
|
1782
2745
|
removeElement: removeDocument,
|
|
1783
2746
|
allElements: allDocuments
|
|
1784
2747
|
} = use_flat_category_store_default();
|
|
1785
|
-
const
|
|
1786
|
-
const [usageBannerStatus, setUsageBannerStatus] = (0, import_react10.useState)(null);
|
|
1787
|
-
const setAction = (0, import_react10.useCallback)((id, action) => {
|
|
2748
|
+
const setAction = (0, import_react12.useCallback)((id, action) => {
|
|
1788
2749
|
setActions((prevPoints) => {
|
|
1789
2750
|
return __spreadProps(__spreadValues({}, prevPoints), {
|
|
1790
2751
|
[id]: action
|
|
1791
2752
|
});
|
|
1792
2753
|
});
|
|
1793
2754
|
}, []);
|
|
1794
|
-
const removeAction = (0,
|
|
2755
|
+
const removeAction = (0, import_react12.useCallback)((id) => {
|
|
1795
2756
|
setActions((prevPoints) => {
|
|
1796
2757
|
const newPoints = __spreadValues({}, prevPoints);
|
|
1797
2758
|
delete newPoints[id];
|
|
1798
2759
|
return newPoints;
|
|
1799
2760
|
});
|
|
1800
2761
|
}, []);
|
|
1801
|
-
const setCoAgentStateRender = (0,
|
|
2762
|
+
const setCoAgentStateRender = (0, import_react12.useCallback)((id, stateRender) => {
|
|
1802
2763
|
setCoAgentStateRenders((prevPoints) => {
|
|
1803
2764
|
return __spreadProps(__spreadValues({}, prevPoints), {
|
|
1804
2765
|
[id]: stateRender
|
|
1805
2766
|
});
|
|
1806
2767
|
});
|
|
1807
2768
|
}, []);
|
|
1808
|
-
const removeCoAgentStateRender = (0,
|
|
2769
|
+
const removeCoAgentStateRender = (0, import_react12.useCallback)((id) => {
|
|
1809
2770
|
setCoAgentStateRenders((prevPoints) => {
|
|
1810
2771
|
const newPoints = __spreadValues({}, prevPoints);
|
|
1811
2772
|
delete newPoints[id];
|
|
1812
2773
|
return newPoints;
|
|
1813
2774
|
});
|
|
1814
2775
|
}, []);
|
|
1815
|
-
const getContextString = (0,
|
|
2776
|
+
const getContextString = (0, import_react12.useCallback)(
|
|
1816
2777
|
(documents, categories) => {
|
|
1817
|
-
const documentsString = documents.map((
|
|
1818
|
-
return `${
|
|
1819
|
-
${
|
|
2778
|
+
const documentsString = documents.map((document2) => {
|
|
2779
|
+
return `${document2.name} (${document2.sourceApplication}):
|
|
2780
|
+
${document2.getContents()}`;
|
|
1820
2781
|
}).join("\n\n");
|
|
1821
2782
|
const nonDocumentStrings = printTree(categories);
|
|
1822
2783
|
return `${documentsString}
|
|
@@ -1825,49 +2786,49 @@ ${nonDocumentStrings}`;
|
|
|
1825
2786
|
},
|
|
1826
2787
|
[printTree]
|
|
1827
2788
|
);
|
|
1828
|
-
const addContext = (0,
|
|
2789
|
+
const addContext = (0, import_react12.useCallback)(
|
|
1829
2790
|
(context, parentId, categories = defaultCopilotContextCategories) => {
|
|
1830
2791
|
return addElement(context, categories, parentId);
|
|
1831
2792
|
},
|
|
1832
2793
|
[addElement]
|
|
1833
2794
|
);
|
|
1834
|
-
const removeContext = (0,
|
|
2795
|
+
const removeContext = (0, import_react12.useCallback)(
|
|
1835
2796
|
(id) => {
|
|
1836
2797
|
removeElement(id);
|
|
1837
2798
|
},
|
|
1838
2799
|
[removeElement]
|
|
1839
2800
|
);
|
|
1840
|
-
const getAllContext = (0,
|
|
2801
|
+
const getAllContext = (0, import_react12.useCallback)(() => {
|
|
1841
2802
|
return getAllElements();
|
|
1842
2803
|
}, [getAllElements]);
|
|
1843
|
-
const getFunctionCallHandler = (0,
|
|
2804
|
+
const getFunctionCallHandler = (0, import_react12.useCallback)(
|
|
1844
2805
|
(customEntryPoints) => {
|
|
1845
2806
|
return entryPointsToFunctionCallHandler(Object.values(customEntryPoints || actions));
|
|
1846
2807
|
},
|
|
1847
2808
|
[actions]
|
|
1848
2809
|
);
|
|
1849
|
-
const getDocumentsContext = (0,
|
|
2810
|
+
const getDocumentsContext = (0, import_react12.useCallback)(
|
|
1850
2811
|
(categories) => {
|
|
1851
2812
|
return allDocuments(categories);
|
|
1852
2813
|
},
|
|
1853
2814
|
[allDocuments]
|
|
1854
2815
|
);
|
|
1855
|
-
const addDocumentContext = (0,
|
|
2816
|
+
const addDocumentContext = (0, import_react12.useCallback)(
|
|
1856
2817
|
(documentPointer, categories = defaultCopilotContextCategories) => {
|
|
1857
2818
|
return addDocument(documentPointer, categories);
|
|
1858
2819
|
},
|
|
1859
2820
|
[addDocument]
|
|
1860
2821
|
);
|
|
1861
|
-
const removeDocumentContext = (0,
|
|
2822
|
+
const removeDocumentContext = (0, import_react12.useCallback)(
|
|
1862
2823
|
(documentId) => {
|
|
1863
2824
|
removeDocument(documentId);
|
|
1864
2825
|
},
|
|
1865
2826
|
[removeDocument]
|
|
1866
2827
|
);
|
|
1867
|
-
const copilotApiConfig = (0,
|
|
2828
|
+
const copilotApiConfig = (0, import_react12.useMemo)(() => {
|
|
1868
2829
|
var _a2, _b;
|
|
1869
2830
|
let cloud = void 0;
|
|
1870
|
-
if (
|
|
2831
|
+
if (publicApiKey) {
|
|
1871
2832
|
cloud = {
|
|
1872
2833
|
guardrails: {
|
|
1873
2834
|
input: {
|
|
@@ -1881,7 +2842,7 @@ ${nonDocumentStrings}`;
|
|
|
1881
2842
|
};
|
|
1882
2843
|
}
|
|
1883
2844
|
return __spreadProps(__spreadValues({
|
|
1884
|
-
publicApiKey
|
|
2845
|
+
publicApiKey
|
|
1885
2846
|
}, cloud ? { cloud } : {}), {
|
|
1886
2847
|
chatApiEndpoint,
|
|
1887
2848
|
headers: props.headers || {},
|
|
@@ -1891,7 +2852,7 @@ ${nonDocumentStrings}`;
|
|
|
1891
2852
|
credentials: props.credentials
|
|
1892
2853
|
});
|
|
1893
2854
|
}, [
|
|
1894
|
-
|
|
2855
|
+
publicApiKey,
|
|
1895
2856
|
props.headers,
|
|
1896
2857
|
props.properties,
|
|
1897
2858
|
props.transcribeAudioUrl,
|
|
@@ -1900,7 +2861,7 @@ ${nonDocumentStrings}`;
|
|
|
1900
2861
|
props.cloudRestrictToTopic,
|
|
1901
2862
|
props.guardrails_c
|
|
1902
2863
|
]);
|
|
1903
|
-
const headers = (0,
|
|
2864
|
+
const headers = (0, import_react12.useMemo)(() => {
|
|
1904
2865
|
const authHeaders = Object.values(authStates || {}).reduce((acc, state) => {
|
|
1905
2866
|
if (state.status === "authenticated" && state.authHeaders) {
|
|
1906
2867
|
return __spreadValues(__spreadValues({}, acc), Object.entries(state.authHeaders).reduce(
|
|
@@ -1912,24 +2873,24 @@ ${nonDocumentStrings}`;
|
|
|
1912
2873
|
}
|
|
1913
2874
|
return acc;
|
|
1914
2875
|
}, {});
|
|
1915
|
-
return __spreadValues(__spreadValues(__spreadValues({}, copilotApiConfig.headers || {}), copilotApiConfig.publicApiKey ? { [
|
|
2876
|
+
return __spreadValues(__spreadValues(__spreadValues({}, copilotApiConfig.headers || {}), copilotApiConfig.publicApiKey ? { [import_shared12.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey } : {}), authHeaders);
|
|
1916
2877
|
}, [copilotApiConfig.headers, copilotApiConfig.publicApiKey, authStates]);
|
|
1917
2878
|
const runtimeClient = useCopilotRuntimeClient({
|
|
1918
2879
|
url: copilotApiConfig.chatApiEndpoint,
|
|
1919
|
-
publicApiKey
|
|
2880
|
+
publicApiKey,
|
|
1920
2881
|
headers,
|
|
1921
2882
|
credentials: copilotApiConfig.credentials,
|
|
1922
2883
|
showDevConsole: shouldShowDevConsole(props.showDevConsole),
|
|
1923
2884
|
onError: props.onError
|
|
1924
2885
|
});
|
|
1925
|
-
const [chatSuggestionConfiguration, setChatSuggestionConfiguration] = (0,
|
|
1926
|
-
const addChatSuggestionConfiguration = (0,
|
|
2886
|
+
const [chatSuggestionConfiguration, setChatSuggestionConfiguration] = (0, import_react12.useState)({});
|
|
2887
|
+
const addChatSuggestionConfiguration = (0, import_react12.useCallback)(
|
|
1927
2888
|
(id, suggestion) => {
|
|
1928
2889
|
setChatSuggestionConfiguration((prev) => __spreadProps(__spreadValues({}, prev), { [id]: suggestion }));
|
|
1929
2890
|
},
|
|
1930
2891
|
[setChatSuggestionConfiguration]
|
|
1931
2892
|
);
|
|
1932
|
-
const removeChatSuggestionConfiguration = (0,
|
|
2893
|
+
const removeChatSuggestionConfiguration = (0, import_react12.useCallback)(
|
|
1933
2894
|
(id) => {
|
|
1934
2895
|
setChatSuggestionConfiguration((prev) => {
|
|
1935
2896
|
const _a2 = prev, { [id]: _ } = _a2, rest = __objRest(_a2, [__restKey(id)]);
|
|
@@ -1938,10 +2899,10 @@ ${nonDocumentStrings}`;
|
|
|
1938
2899
|
},
|
|
1939
2900
|
[setChatSuggestionConfiguration]
|
|
1940
2901
|
);
|
|
1941
|
-
const [availableAgents, setAvailableAgents] = (0,
|
|
1942
|
-
const [coagentStates, setCoagentStates] = (0,
|
|
1943
|
-
const coagentStatesRef = (0,
|
|
1944
|
-
const setCoagentStatesWithRef = (0,
|
|
2902
|
+
const [availableAgents, setAvailableAgents] = (0, import_react12.useState)([]);
|
|
2903
|
+
const [coagentStates, setCoagentStates] = (0, import_react12.useState)({});
|
|
2904
|
+
const coagentStatesRef = (0, import_react12.useRef)({});
|
|
2905
|
+
const setCoagentStatesWithRef = (0, import_react12.useCallback)(
|
|
1945
2906
|
(value) => {
|
|
1946
2907
|
const newValue = typeof value === "function" ? value(coagentStatesRef.current) : value;
|
|
1947
2908
|
coagentStatesRef.current = newValue;
|
|
@@ -1951,8 +2912,8 @@ ${nonDocumentStrings}`;
|
|
|
1951
2912
|
},
|
|
1952
2913
|
[]
|
|
1953
2914
|
);
|
|
1954
|
-
const hasLoadedAgents = (0,
|
|
1955
|
-
(0,
|
|
2915
|
+
const hasLoadedAgents = (0, import_react12.useRef)(false);
|
|
2916
|
+
(0, import_react12.useEffect)(() => {
|
|
1956
2917
|
if (hasLoadedAgents.current)
|
|
1957
2918
|
return;
|
|
1958
2919
|
const fetchData = () => __async(this, null, function* () {
|
|
@@ -1971,8 +2932,8 @@ ${nonDocumentStrings}`;
|
|
|
1971
2932
|
agentName: props.agent
|
|
1972
2933
|
};
|
|
1973
2934
|
}
|
|
1974
|
-
const [agentSession, setAgentSession] = (0,
|
|
1975
|
-
(0,
|
|
2935
|
+
const [agentSession, setAgentSession] = (0, import_react12.useState)(initialAgentSession);
|
|
2936
|
+
(0, import_react12.useEffect)(() => {
|
|
1976
2937
|
if (props.agent) {
|
|
1977
2938
|
setAgentSession({
|
|
1978
2939
|
agentName: props.agent
|
|
@@ -1981,8 +2942,8 @@ ${nonDocumentStrings}`;
|
|
|
1981
2942
|
setAgentSession(null);
|
|
1982
2943
|
}
|
|
1983
2944
|
}, [props.agent]);
|
|
1984
|
-
const [internalThreadId, setInternalThreadId] = (0,
|
|
1985
|
-
const setThreadId = (0,
|
|
2945
|
+
const [internalThreadId, setInternalThreadId] = (0, import_react12.useState)(props.threadId || (0, import_shared12.randomUUID)());
|
|
2946
|
+
const setThreadId = (0, import_react12.useCallback)(
|
|
1986
2947
|
(value) => {
|
|
1987
2948
|
if (props.threadId) {
|
|
1988
2949
|
throw new Error("Cannot call setThreadId() when threadId is provided via props.");
|
|
@@ -1991,16 +2952,16 @@ ${nonDocumentStrings}`;
|
|
|
1991
2952
|
},
|
|
1992
2953
|
[props.threadId]
|
|
1993
2954
|
);
|
|
1994
|
-
(0,
|
|
2955
|
+
(0, import_react12.useEffect)(() => {
|
|
1995
2956
|
if (props.threadId !== void 0) {
|
|
1996
2957
|
setInternalThreadId(props.threadId);
|
|
1997
2958
|
}
|
|
1998
2959
|
}, [props.threadId]);
|
|
1999
|
-
const [runId, setRunId] = (0,
|
|
2000
|
-
const chatAbortControllerRef = (0,
|
|
2960
|
+
const [runId, setRunId] = (0, import_react12.useState)(null);
|
|
2961
|
+
const chatAbortControllerRef = (0, import_react12.useRef)(null);
|
|
2001
2962
|
const showDevConsole = shouldShowDevConsole(props.showDevConsole);
|
|
2002
|
-
const [langGraphInterruptAction, _setLangGraphInterruptAction] = (0,
|
|
2003
|
-
const setLangGraphInterruptAction = (0,
|
|
2963
|
+
const [langGraphInterruptAction, _setLangGraphInterruptAction] = (0, import_react12.useState)(null);
|
|
2964
|
+
const setLangGraphInterruptAction = (0, import_react12.useCallback)((action) => {
|
|
2004
2965
|
_setLangGraphInterruptAction((prev) => {
|
|
2005
2966
|
if (prev == null)
|
|
2006
2967
|
return action;
|
|
@@ -2013,23 +2974,23 @@ ${nonDocumentStrings}`;
|
|
|
2013
2974
|
return __spreadProps(__spreadValues(__spreadValues({}, prev), action), { event });
|
|
2014
2975
|
});
|
|
2015
2976
|
}, []);
|
|
2016
|
-
const removeLangGraphInterruptAction = (0,
|
|
2977
|
+
const removeLangGraphInterruptAction = (0, import_react12.useCallback)(() => {
|
|
2017
2978
|
setLangGraphInterruptAction(null);
|
|
2018
2979
|
}, []);
|
|
2019
|
-
const memoizedChildren = (0,
|
|
2020
|
-
const [bannerError, setBannerError] = (0,
|
|
2021
|
-
const agentLock = (0,
|
|
2980
|
+
const memoizedChildren = (0, import_react12.useMemo)(() => children, [children]);
|
|
2981
|
+
const [bannerError, setBannerError] = (0, import_react12.useState)(null);
|
|
2982
|
+
const agentLock = (0, import_react12.useMemo)(() => {
|
|
2022
2983
|
var _a2;
|
|
2023
2984
|
return (_a2 = props.agent) != null ? _a2 : null;
|
|
2024
2985
|
}, [props.agent]);
|
|
2025
|
-
const forwardedParameters = (0,
|
|
2986
|
+
const forwardedParameters = (0, import_react12.useMemo)(
|
|
2026
2987
|
() => {
|
|
2027
2988
|
var _a2;
|
|
2028
2989
|
return (_a2 = props.forwardedParameters) != null ? _a2 : {};
|
|
2029
2990
|
},
|
|
2030
2991
|
[props.forwardedParameters]
|
|
2031
2992
|
);
|
|
2032
|
-
const updateExtensions = (0,
|
|
2993
|
+
const updateExtensions = (0, import_react12.useCallback)(
|
|
2033
2994
|
(newExtensions) => {
|
|
2034
2995
|
setExtensions((prev) => {
|
|
2035
2996
|
const resolved = typeof newExtensions === "function" ? newExtensions(prev) : newExtensions;
|
|
@@ -2041,7 +3002,7 @@ ${nonDocumentStrings}`;
|
|
|
2041
3002
|
},
|
|
2042
3003
|
[setExtensions]
|
|
2043
3004
|
);
|
|
2044
|
-
const updateAuthStates = (0,
|
|
3005
|
+
const updateAuthStates = (0, import_react12.useCallback)(
|
|
2045
3006
|
(newAuthStates) => {
|
|
2046
3007
|
setAuthStates((prev) => {
|
|
2047
3008
|
const resolved = typeof newAuthStates === "function" ? newAuthStates(prev) : newAuthStates;
|
|
@@ -2053,7 +3014,7 @@ ${nonDocumentStrings}`;
|
|
|
2053
3014
|
},
|
|
2054
3015
|
[setAuthStates]
|
|
2055
3016
|
);
|
|
2056
|
-
return /* @__PURE__ */ (0,
|
|
3017
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
2057
3018
|
CopilotContext.Provider,
|
|
2058
3019
|
{
|
|
2059
3020
|
value: {
|
|
@@ -2111,8 +3072,11 @@ ${nonDocumentStrings}`;
|
|
|
2111
3072
|
setBannerError
|
|
2112
3073
|
},
|
|
2113
3074
|
children: [
|
|
2114
|
-
/* @__PURE__ */ (0,
|
|
2115
|
-
|
|
3075
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(MessagesTapProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(CopilotMessages, { children: [
|
|
3076
|
+
memoizedChildren,
|
|
3077
|
+
showDevConsole && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(ConsoleTrigger, {})
|
|
3078
|
+
] }) }),
|
|
3079
|
+
bannerError && showDevConsole && /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
2116
3080
|
UsageBanner,
|
|
2117
3081
|
{
|
|
2118
3082
|
severity: bannerError.severity,
|
|
@@ -2156,28 +3120,31 @@ function formatFeatureName(featureName) {
|
|
|
2156
3120
|
}
|
|
2157
3121
|
function validateProps(props) {
|
|
2158
3122
|
const cloudFeatures = Object.keys(props).filter((key) => key.endsWith("_c"));
|
|
2159
|
-
|
|
2160
|
-
|
|
3123
|
+
const hasApiKey = props.publicApiKey || props.publicLicenseKey;
|
|
3124
|
+
if (!props.runtimeUrl && !hasApiKey) {
|
|
3125
|
+
throw new import_shared12.ConfigurationError(
|
|
3126
|
+
"Missing required prop: 'runtimeUrl' or 'publicApiKey' or 'publicLicenseKey'"
|
|
3127
|
+
);
|
|
2161
3128
|
}
|
|
2162
|
-
if (cloudFeatures.length > 0 && !
|
|
2163
|
-
throw new
|
|
2164
|
-
`Missing required prop: 'publicApiKey' to use cloud features: ${cloudFeatures.map(formatFeatureName).join(", ")}`
|
|
3129
|
+
if (cloudFeatures.length > 0 && !hasApiKey) {
|
|
3130
|
+
throw new import_shared12.MissingPublicApiKeyError(
|
|
3131
|
+
`Missing required prop: 'publicApiKey' or 'publicLicenseKey' to use cloud features: ${cloudFeatures.map(formatFeatureName).join(", ")}`
|
|
2165
3132
|
);
|
|
2166
3133
|
}
|
|
2167
3134
|
}
|
|
2168
3135
|
|
|
2169
3136
|
// src/hooks/use-copilot-chat_internal.ts
|
|
2170
|
-
var
|
|
3137
|
+
var import_react15 = require("react");
|
|
2171
3138
|
|
|
2172
3139
|
// src/hooks/use-chat.ts
|
|
2173
|
-
var
|
|
3140
|
+
var import_react13 = require("react");
|
|
2174
3141
|
var import_react_dom2 = require("react-dom");
|
|
2175
|
-
var
|
|
3142
|
+
var import_shared14 = require("@copilotkit/shared");
|
|
2176
3143
|
var import_runtime_client_gql7 = require("@copilotkit/runtime-client-gql");
|
|
2177
3144
|
|
|
2178
3145
|
// src/types/frontend-action.ts
|
|
2179
3146
|
var import_runtime_client_gql6 = require("@copilotkit/runtime-client-gql");
|
|
2180
|
-
var
|
|
3147
|
+
var import_shared13 = require("@copilotkit/shared");
|
|
2181
3148
|
function processActionsForRuntimeRequest(actions) {
|
|
2182
3149
|
const filteredActions = actions.filter(
|
|
2183
3150
|
(action) => action.available !== import_runtime_client_gql6.ActionInputAvailability.Disabled && action.disabled !== true && action.name !== "*" && action.available != "frontend" && !action.pairedAction
|
|
@@ -2193,7 +3160,7 @@ function processActionsForRuntimeRequest(actions) {
|
|
|
2193
3160
|
return {
|
|
2194
3161
|
name: action.name,
|
|
2195
3162
|
description: action.description || "",
|
|
2196
|
-
jsonSchema: JSON.stringify((0,
|
|
3163
|
+
jsonSchema: JSON.stringify((0, import_shared13.actionParametersToJsonSchema)(action.parameters || [])),
|
|
2197
3164
|
available
|
|
2198
3165
|
};
|
|
2199
3166
|
});
|
|
@@ -2228,7 +3195,7 @@ function useChat(options) {
|
|
|
2228
3195
|
langGraphInterruptAction,
|
|
2229
3196
|
setLangGraphInterruptAction
|
|
2230
3197
|
} = options;
|
|
2231
|
-
const runChatCompletionRef = (0,
|
|
3198
|
+
const runChatCompletionRef = (0, import_react13.useRef)();
|
|
2232
3199
|
const addErrorToast = useErrorToast();
|
|
2233
3200
|
const { setBannerError } = useToast();
|
|
2234
3201
|
const { onError } = useCopilotContext();
|
|
@@ -2259,14 +3226,14 @@ function useChat(options) {
|
|
|
2259
3226
|
console.error("Error in use-chat onError handler:", traceError);
|
|
2260
3227
|
}
|
|
2261
3228
|
});
|
|
2262
|
-
const agentSessionRef = (0,
|
|
3229
|
+
const agentSessionRef = (0, import_react13.useRef)(agentSession);
|
|
2263
3230
|
agentSessionRef.current = agentSession;
|
|
2264
|
-
const runIdRef = (0,
|
|
3231
|
+
const runIdRef = (0, import_react13.useRef)(runId);
|
|
2265
3232
|
runIdRef.current = runId;
|
|
2266
|
-
const extensionsRef = (0,
|
|
3233
|
+
const extensionsRef = (0, import_react13.useRef)(extensions);
|
|
2267
3234
|
extensionsRef.current = extensions;
|
|
2268
3235
|
const publicApiKey = copilotConfig.publicApiKey;
|
|
2269
|
-
const headers = __spreadValues(__spreadValues({}, copilotConfig.headers || {}), publicApiKey ? { [
|
|
3236
|
+
const headers = __spreadValues(__spreadValues({}, copilotConfig.headers || {}), publicApiKey ? { [import_shared14.COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: publicApiKey } : {});
|
|
2270
3237
|
const { showDevConsole } = useCopilotContext();
|
|
2271
3238
|
const runtimeClient = useCopilotRuntimeClient({
|
|
2272
3239
|
url: copilotConfig.chatApiEndpoint,
|
|
@@ -2275,7 +3242,7 @@ function useChat(options) {
|
|
|
2275
3242
|
credentials: copilotConfig.credentials,
|
|
2276
3243
|
showDevConsole
|
|
2277
3244
|
});
|
|
2278
|
-
const pendingAppendsRef = (0,
|
|
3245
|
+
const pendingAppendsRef = (0, import_react13.useRef)([]);
|
|
2279
3246
|
const runChatCompletion = useAsyncCallback(
|
|
2280
3247
|
(previousMessages) => __async(this, null, function* () {
|
|
2281
3248
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o, _p, _q, _r, _s, _t;
|
|
@@ -2391,7 +3358,7 @@ function useChat(options) {
|
|
|
2391
3358
|
(metaEvents != null ? metaEvents : []).forEach((ev) => {
|
|
2392
3359
|
if (ev.name === import_runtime_client_gql7.MetaEventName.LangGraphInterruptEvent) {
|
|
2393
3360
|
let eventValue = (0, import_runtime_client_gql7.langGraphInterruptEvent)(ev).value;
|
|
2394
|
-
eventValue = (0,
|
|
3361
|
+
eventValue = (0, import_shared14.parseJson)(eventValue, eventValue);
|
|
2395
3362
|
setLangGraphInterruptAction({
|
|
2396
3363
|
event: __spreadProps(__spreadValues({}, (0, import_runtime_client_gql7.langGraphInterruptEvent)(ev)), {
|
|
2397
3364
|
value: eventValue
|
|
@@ -2419,9 +3386,9 @@ function useChat(options) {
|
|
|
2419
3386
|
content: guardrailsReason
|
|
2420
3387
|
})
|
|
2421
3388
|
];
|
|
2422
|
-
const guardrailsError = new
|
|
3389
|
+
const guardrailsError = new import_shared14.CopilotKitError({
|
|
2423
3390
|
message: `Guardrails validation failed: ${guardrailsReason}`,
|
|
2424
|
-
code:
|
|
3391
|
+
code: import_shared14.CopilotKitErrorCode.MISUSE
|
|
2425
3392
|
});
|
|
2426
3393
|
yield traceUIError(guardrailsError, {
|
|
2427
3394
|
statusReason: value.generateCopilotResponse.status.reason,
|
|
@@ -2437,11 +3404,11 @@ function useChat(options) {
|
|
|
2437
3404
|
const originalCode = (originalError == null ? void 0 : originalError.code) || ((_o = originalError == null ? void 0 : originalError.extensions) == null ? void 0 : _o.code);
|
|
2438
3405
|
const originalSeverity = (originalError == null ? void 0 : originalError.severity) || ((_p = originalError == null ? void 0 : originalError.extensions) == null ? void 0 : _p.severity);
|
|
2439
3406
|
const originalVisibility = (originalError == null ? void 0 : originalError.visibility) || ((_q = originalError == null ? void 0 : originalError.extensions) == null ? void 0 : _q.visibility);
|
|
2440
|
-
let errorCode =
|
|
2441
|
-
if (originalCode && Object.values(
|
|
3407
|
+
let errorCode = import_shared14.CopilotKitErrorCode.NETWORK_ERROR;
|
|
3408
|
+
if (originalCode && Object.values(import_shared14.CopilotKitErrorCode).includes(originalCode)) {
|
|
2442
3409
|
errorCode = originalCode;
|
|
2443
3410
|
}
|
|
2444
|
-
const structuredError = new
|
|
3411
|
+
const structuredError = new import_shared14.CopilotKitError({
|
|
2445
3412
|
message: errorMessage,
|
|
2446
3413
|
code: errorCode,
|
|
2447
3414
|
severity: originalSeverity,
|
|
@@ -2503,7 +3470,7 @@ function useChat(options) {
|
|
|
2503
3470
|
} else {
|
|
2504
3471
|
if (agentLock) {
|
|
2505
3472
|
setAgentSession({
|
|
2506
|
-
threadId: (0,
|
|
3473
|
+
threadId: (0, import_shared14.randomId)(),
|
|
2507
3474
|
agentName: agentLock,
|
|
2508
3475
|
nodeName: void 0
|
|
2509
3476
|
});
|
|
@@ -2590,7 +3557,7 @@ function useChat(options) {
|
|
|
2590
3557
|
if (pairedFeAction) {
|
|
2591
3558
|
const newExecutionMessage = new import_runtime_client_gql7.ActionExecutionMessage({
|
|
2592
3559
|
name: pairedFeAction.name,
|
|
2593
|
-
arguments: (0,
|
|
3560
|
+
arguments: (0, import_shared14.parseJson)(resultMessage.result, resultMessage.result),
|
|
2594
3561
|
status: message.status,
|
|
2595
3562
|
createdAt: message.createdAt,
|
|
2596
3563
|
parentMessageId: message.parentMessageId
|
|
@@ -2601,7 +3568,7 @@ function useChat(options) {
|
|
|
2601
3568
|
} else if (message.isResultMessage() && currentResultMessagePairedFeAction) {
|
|
2602
3569
|
const newExecutionMessage = new import_runtime_client_gql7.ActionExecutionMessage({
|
|
2603
3570
|
name: currentResultMessagePairedFeAction.name,
|
|
2604
|
-
arguments: (0,
|
|
3571
|
+
arguments: (0, import_shared14.parseJson)(message.result, message.result),
|
|
2605
3572
|
status: message.status,
|
|
2606
3573
|
createdAt: message.createdAt
|
|
2607
3574
|
});
|
|
@@ -2669,7 +3636,7 @@ function useChat(options) {
|
|
|
2669
3636
|
}),
|
|
2670
3637
|
[messages]
|
|
2671
3638
|
);
|
|
2672
|
-
(0,
|
|
3639
|
+
(0, import_react13.useEffect)(() => {
|
|
2673
3640
|
if (!isLoading && pendingAppendsRef.current.length > 0) {
|
|
2674
3641
|
const pending = pendingAppendsRef.current.splice(0);
|
|
2675
3642
|
const followUp = pending.some((p) => p.followUp);
|
|
@@ -2680,7 +3647,7 @@ function useChat(options) {
|
|
|
2680
3647
|
}
|
|
2681
3648
|
}
|
|
2682
3649
|
}, [isLoading, messages, setMessages, runChatCompletionAndHandleFunctionCall]);
|
|
2683
|
-
const composeAndFlushMetaEventsInput = (0,
|
|
3650
|
+
const composeAndFlushMetaEventsInput = (0, import_react13.useCallback)(
|
|
2684
3651
|
(metaEvents) => {
|
|
2685
3652
|
return metaEvents.reduce((acc, event) => {
|
|
2686
3653
|
if (!event)
|
|
@@ -2861,14 +3828,14 @@ function getPairedFeAction(actions, message) {
|
|
|
2861
3828
|
var import_runtime_client_gql8 = require("@copilotkit/runtime-client-gql");
|
|
2862
3829
|
|
|
2863
3830
|
// src/hooks/use-langgraph-interrupt-render.ts
|
|
2864
|
-
var
|
|
3831
|
+
var import_react14 = __toESM(require("react"));
|
|
2865
3832
|
var InterruptRenderer = ({ event, result, render, resolve }) => {
|
|
2866
3833
|
return render({ event, result, resolve });
|
|
2867
3834
|
};
|
|
2868
3835
|
function useLangGraphInterruptRender() {
|
|
2869
3836
|
const { langGraphInterruptAction, setLangGraphInterruptAction, agentSession } = useCopilotContext();
|
|
2870
|
-
const responseRef =
|
|
2871
|
-
const resolveInterrupt = (0,
|
|
3837
|
+
const responseRef = import_react14.default.useRef();
|
|
3838
|
+
const resolveInterrupt = (0, import_react14.useCallback)(
|
|
2872
3839
|
(response) => {
|
|
2873
3840
|
responseRef.current = response;
|
|
2874
3841
|
setTimeout(() => {
|
|
@@ -2891,7 +3858,7 @@ function useLangGraphInterruptRender() {
|
|
|
2891
3858
|
resolve: resolveInterrupt
|
|
2892
3859
|
});
|
|
2893
3860
|
}
|
|
2894
|
-
return
|
|
3861
|
+
return import_react14.default.createElement(InterruptRenderer, {
|
|
2895
3862
|
event,
|
|
2896
3863
|
result,
|
|
2897
3864
|
render,
|
|
@@ -2932,10 +3899,10 @@ function useCopilotChat(options = {}) {
|
|
|
2932
3899
|
runtimeClient
|
|
2933
3900
|
} = useCopilotContext();
|
|
2934
3901
|
const { messages, setMessages, suggestions, setSuggestions } = useCopilotMessagesContext();
|
|
2935
|
-
const [mcpServers, setLocalMcpServers] = (0,
|
|
2936
|
-
const suggestionsAbortControllerRef = (0,
|
|
2937
|
-
const isLoadingSuggestionsRef = (0,
|
|
2938
|
-
const abortSuggestions = (0,
|
|
3902
|
+
const [mcpServers, setLocalMcpServers] = (0, import_react15.useState)([]);
|
|
3903
|
+
const suggestionsAbortControllerRef = (0, import_react15.useRef)(null);
|
|
3904
|
+
const isLoadingSuggestionsRef = (0, import_react15.useRef)(false);
|
|
3905
|
+
const abortSuggestions = (0, import_react15.useCallback)(
|
|
2939
3906
|
(clear = true) => {
|
|
2940
3907
|
var _a2;
|
|
2941
3908
|
(_a2 = suggestionsAbortControllerRef.current) == null ? void 0 : _a2.abort("suggestions aborted by user");
|
|
@@ -2946,7 +3913,7 @@ function useCopilotChat(options = {}) {
|
|
|
2946
3913
|
},
|
|
2947
3914
|
[setSuggestions]
|
|
2948
3915
|
);
|
|
2949
|
-
const stableContext = (0,
|
|
3916
|
+
const stableContext = (0, import_react15.useMemo)(() => {
|
|
2950
3917
|
return {
|
|
2951
3918
|
actions,
|
|
2952
3919
|
copilotApiConfig,
|
|
@@ -2962,7 +3929,7 @@ function useCopilotChat(options = {}) {
|
|
|
2962
3929
|
messages.length,
|
|
2963
3930
|
Object.keys(chatSuggestionConfiguration).length
|
|
2964
3931
|
]);
|
|
2965
|
-
const generateSuggestionsFunc = (0,
|
|
3932
|
+
const generateSuggestionsFunc = (0, import_react15.useCallback)(() => __async(this, null, function* () {
|
|
2966
3933
|
if (globalSuggestionPromise) {
|
|
2967
3934
|
return globalSuggestionPromise;
|
|
2968
3935
|
}
|
|
@@ -2987,10 +3954,10 @@ function useCopilotChat(options = {}) {
|
|
|
2987
3954
|
}))();
|
|
2988
3955
|
return globalSuggestionPromise;
|
|
2989
3956
|
}), [stableContext, chatSuggestionConfiguration, setSuggestions, abortSuggestions]);
|
|
2990
|
-
const resetSuggestions = (0,
|
|
3957
|
+
const resetSuggestions = (0, import_react15.useCallback)(() => {
|
|
2991
3958
|
setSuggestions([]);
|
|
2992
3959
|
}, [setSuggestions]);
|
|
2993
|
-
(0,
|
|
3960
|
+
(0, import_react15.useEffect)(() => {
|
|
2994
3961
|
if (mcpServers.length > 0) {
|
|
2995
3962
|
const serversCopy = [...mcpServers];
|
|
2996
3963
|
copilotApiConfig.mcpServers = serversCopy;
|
|
@@ -3000,7 +3967,7 @@ function useCopilotChat(options = {}) {
|
|
|
3000
3967
|
copilotApiConfig.properties.mcpServers = serversCopy;
|
|
3001
3968
|
}
|
|
3002
3969
|
}, [mcpServers, copilotApiConfig]);
|
|
3003
|
-
const setMcpServers = (0,
|
|
3970
|
+
const setMcpServers = (0, import_react15.useCallback)((servers) => {
|
|
3004
3971
|
setLocalMcpServers(servers);
|
|
3005
3972
|
}, []);
|
|
3006
3973
|
const onCoAgentStateRender = useAsyncCallback(
|
|
@@ -3021,7 +3988,7 @@ function useCopilotChat(options = {}) {
|
|
|
3021
3988
|
}),
|
|
3022
3989
|
[coAgentStateRenders]
|
|
3023
3990
|
);
|
|
3024
|
-
const makeSystemMessageCallback = (0,
|
|
3991
|
+
const makeSystemMessageCallback = (0, import_react15.useCallback)(() => {
|
|
3025
3992
|
const systemMessageMaker = makeSystemMessage2 || defaultSystemMessage;
|
|
3026
3993
|
const contextString = getContextString([], defaultCopilotContextCategories);
|
|
3027
3994
|
return new import_runtime_client_gql8.TextMessage({
|
|
@@ -3029,7 +3996,7 @@ function useCopilotChat(options = {}) {
|
|
|
3029
3996
|
role: import_runtime_client_gql8.Role.System
|
|
3030
3997
|
});
|
|
3031
3998
|
}, [getContextString, makeSystemMessage2, chatInstructions]);
|
|
3032
|
-
const deleteMessage = (0,
|
|
3999
|
+
const deleteMessage = (0, import_react15.useCallback)(
|
|
3033
4000
|
(messageId) => {
|
|
3034
4001
|
setMessages((prev) => prev.filter((message) => message.id !== messageId));
|
|
3035
4002
|
},
|
|
@@ -3085,18 +4052,18 @@ function useCopilotChat(options = {}) {
|
|
|
3085
4052
|
[latestReload]
|
|
3086
4053
|
);
|
|
3087
4054
|
const latestStop = useUpdatedRef(stop);
|
|
3088
|
-
const latestStopFunc = (0,
|
|
4055
|
+
const latestStopFunc = (0, import_react15.useCallback)(() => {
|
|
3089
4056
|
return latestStop.current();
|
|
3090
4057
|
}, [latestStop]);
|
|
3091
4058
|
const latestDelete = useUpdatedRef(deleteMessage);
|
|
3092
|
-
const latestDeleteFunc = (0,
|
|
4059
|
+
const latestDeleteFunc = (0, import_react15.useCallback)(
|
|
3093
4060
|
(messageId) => {
|
|
3094
4061
|
return latestDelete.current(messageId);
|
|
3095
4062
|
},
|
|
3096
4063
|
[latestDelete]
|
|
3097
4064
|
);
|
|
3098
4065
|
const latestSetMessages = useUpdatedRef(setMessages);
|
|
3099
|
-
const latestSetMessagesFunc = (0,
|
|
4066
|
+
const latestSetMessagesFunc = (0, import_react15.useCallback)(
|
|
3100
4067
|
(messages2) => {
|
|
3101
4068
|
if (messages2.every((message) => message instanceof import_runtime_client_gql8.Message)) {
|
|
3102
4069
|
return latestSetMessages.current(messages2);
|
|
@@ -3109,7 +4076,7 @@ function useCopilotChat(options = {}) {
|
|
|
3109
4076
|
const latestRunChatCompletionFunc = useAsyncCallback(() => __async(this, null, function* () {
|
|
3110
4077
|
return yield latestRunChatCompletion.current();
|
|
3111
4078
|
}), [latestRunChatCompletion]);
|
|
3112
|
-
const reset = (0,
|
|
4079
|
+
const reset = (0, import_react15.useCallback)(() => {
|
|
3113
4080
|
latestStopFunc();
|
|
3114
4081
|
setMessages([]);
|
|
3115
4082
|
setRunId(null);
|
|
@@ -3132,7 +4099,7 @@ function useCopilotChat(options = {}) {
|
|
|
3132
4099
|
resetSuggestions
|
|
3133
4100
|
]);
|
|
3134
4101
|
const latestReset = useUpdatedRef(reset);
|
|
3135
|
-
const latestResetFunc = (0,
|
|
4102
|
+
const latestResetFunc = (0, import_react15.useCallback)(() => {
|
|
3136
4103
|
return latestReset.current();
|
|
3137
4104
|
}, [latestReset]);
|
|
3138
4105
|
const interrupt = useLangGraphInterruptRender();
|
|
@@ -3159,8 +4126,8 @@ function useCopilotChat(options = {}) {
|
|
|
3159
4126
|
};
|
|
3160
4127
|
}
|
|
3161
4128
|
function useUpdatedRef(value) {
|
|
3162
|
-
const ref = (0,
|
|
3163
|
-
(0,
|
|
4129
|
+
const ref = (0, import_react15.useRef)(value);
|
|
4130
|
+
(0, import_react15.useEffect)(() => {
|
|
3164
4131
|
ref.current = value;
|
|
3165
4132
|
}, [value]);
|
|
3166
4133
|
return ref;
|
|
@@ -3219,8 +4186,8 @@ function useCopilotChat2(options = {}) {
|
|
|
3219
4186
|
}
|
|
3220
4187
|
|
|
3221
4188
|
// src/hooks/use-copilot-chat-headless_c.ts
|
|
3222
|
-
var
|
|
3223
|
-
var
|
|
4189
|
+
var import_react16 = require("react");
|
|
4190
|
+
var import_shared15 = require("@copilotkit/shared");
|
|
3224
4191
|
var createNonFunctionalReturn = () => ({
|
|
3225
4192
|
visibleMessages: [],
|
|
3226
4193
|
messages: [],
|
|
@@ -3259,20 +4226,20 @@ function useCopilotChatHeadless_c(options = {}) {
|
|
|
3259
4226
|
const { copilotApiConfig, setBannerError } = useCopilotContext();
|
|
3260
4227
|
const hasPublicApiKey = Boolean(copilotApiConfig.publicApiKey);
|
|
3261
4228
|
const internalResult = useCopilotChat(options);
|
|
3262
|
-
(0,
|
|
4229
|
+
(0, import_react16.useEffect)(() => {
|
|
3263
4230
|
if (!hasPublicApiKey) {
|
|
3264
4231
|
setBannerError(
|
|
3265
|
-
new
|
|
4232
|
+
new import_shared15.CopilotKitError({
|
|
3266
4233
|
message: (
|
|
3267
4234
|
// add link to documentation here
|
|
3268
|
-
"You're using useCopilotChatHeadless_c, a
|
|
4235
|
+
"You're using useCopilotChatHeadless_c, a premium-only feature, which offers extensive headless chat capabilities. To continue, you'll need to provide a free public license key."
|
|
3269
4236
|
),
|
|
3270
|
-
code:
|
|
3271
|
-
severity:
|
|
3272
|
-
visibility:
|
|
4237
|
+
code: import_shared15.CopilotKitErrorCode.MISSING_PUBLIC_API_KEY_ERROR,
|
|
4238
|
+
severity: import_shared15.Severity.WARNING,
|
|
4239
|
+
visibility: import_shared15.ErrorVisibility.BANNER
|
|
3273
4240
|
})
|
|
3274
4241
|
);
|
|
3275
|
-
|
|
4242
|
+
import_shared15.styledConsole.logCopilotKitPlatformMessage();
|
|
3276
4243
|
} else {
|
|
3277
4244
|
setBannerError(null);
|
|
3278
4245
|
}
|
|
@@ -3284,13 +4251,13 @@ function useCopilotChatHeadless_c(options = {}) {
|
|
|
3284
4251
|
}
|
|
3285
4252
|
|
|
3286
4253
|
// src/hooks/use-copilot-action.ts
|
|
3287
|
-
var
|
|
3288
|
-
var
|
|
4254
|
+
var import_shared16 = require("@copilotkit/shared");
|
|
4255
|
+
var import_react17 = require("react");
|
|
3289
4256
|
function useCopilotAction(action, dependencies) {
|
|
3290
4257
|
const { setAction, removeAction, actions, chatComponentsCache } = useCopilotContext();
|
|
3291
|
-
const idRef = (0,
|
|
3292
|
-
const renderAndWaitRef = (0,
|
|
3293
|
-
const activatingMessageIdRef = (0,
|
|
4258
|
+
const idRef = (0, import_react17.useRef)((0, import_shared16.randomId)());
|
|
4259
|
+
const renderAndWaitRef = (0, import_react17.useRef)(null);
|
|
4260
|
+
const activatingMessageIdRef = (0, import_react17.useRef)(null);
|
|
3294
4261
|
const { addToast } = useToast();
|
|
3295
4262
|
action = __spreadValues({}, action);
|
|
3296
4263
|
if (
|
|
@@ -3352,7 +4319,7 @@ function useCopilotAction(action, dependencies) {
|
|
|
3352
4319
|
return renderAndWait(waitProps);
|
|
3353
4320
|
}
|
|
3354
4321
|
}
|
|
3355
|
-
return (0,
|
|
4322
|
+
return (0, import_react17.createElement)(import_react17.Fragment);
|
|
3356
4323
|
};
|
|
3357
4324
|
}
|
|
3358
4325
|
if (dependencies === void 0) {
|
|
@@ -3367,7 +4334,7 @@ function useCopilotAction(action, dependencies) {
|
|
|
3367
4334
|
}
|
|
3368
4335
|
}
|
|
3369
4336
|
}
|
|
3370
|
-
(0,
|
|
4337
|
+
(0, import_react17.useEffect)(() => {
|
|
3371
4338
|
const hasDuplicate = Object.values(actions).some(
|
|
3372
4339
|
(otherAction) => otherAction.name === action.name && otherAction !== actions[idRef.current]
|
|
3373
4340
|
);
|
|
@@ -3379,7 +4346,7 @@ function useCopilotAction(action, dependencies) {
|
|
|
3379
4346
|
});
|
|
3380
4347
|
}
|
|
3381
4348
|
}, [actions]);
|
|
3382
|
-
(0,
|
|
4349
|
+
(0, import_react17.useEffect)(() => {
|
|
3383
4350
|
setAction(idRef.current, action);
|
|
3384
4351
|
if (chatComponentsCache.current !== null && action.render !== void 0) {
|
|
3385
4352
|
chatComponentsCache.current.actions[action.name] = action.render;
|
|
@@ -3408,8 +4375,8 @@ function isFrontendAction(action) {
|
|
|
3408
4375
|
}
|
|
3409
4376
|
|
|
3410
4377
|
// src/hooks/use-coagent-state-render.ts
|
|
3411
|
-
var
|
|
3412
|
-
var
|
|
4378
|
+
var import_react18 = require("react");
|
|
4379
|
+
var import_shared17 = require("@copilotkit/shared");
|
|
3413
4380
|
function useCoAgentStateRender(action, dependencies) {
|
|
3414
4381
|
const {
|
|
3415
4382
|
setCoAgentStateRender,
|
|
@@ -3417,13 +4384,13 @@ function useCoAgentStateRender(action, dependencies) {
|
|
|
3417
4384
|
coAgentStateRenders,
|
|
3418
4385
|
chatComponentsCache,
|
|
3419
4386
|
availableAgents
|
|
3420
|
-
} = (0,
|
|
3421
|
-
const idRef = (0,
|
|
4387
|
+
} = (0, import_react18.useContext)(CopilotContext);
|
|
4388
|
+
const idRef = (0, import_react18.useRef)((0, import_shared17.randomId)());
|
|
3422
4389
|
const { setBannerError, addToast } = useToast();
|
|
3423
|
-
(0,
|
|
4390
|
+
(0, import_react18.useEffect)(() => {
|
|
3424
4391
|
if ((availableAgents == null ? void 0 : availableAgents.length) && !availableAgents.some((a) => a.name === action.name)) {
|
|
3425
4392
|
const message = `(useCoAgentStateRender): Agent "${action.name}" not found. Make sure the agent exists and is properly configured.`;
|
|
3426
|
-
const agentError = new
|
|
4393
|
+
const agentError = new import_shared17.CopilotKitAgentDiscoveryError({
|
|
3427
4394
|
agentName: action.name,
|
|
3428
4395
|
availableAgents: availableAgents.map((a) => ({ name: a.name, id: a.id }))
|
|
3429
4396
|
});
|
|
@@ -3441,7 +4408,7 @@ function useCoAgentStateRender(action, dependencies) {
|
|
|
3441
4408
|
}
|
|
3442
4409
|
}
|
|
3443
4410
|
}
|
|
3444
|
-
(0,
|
|
4411
|
+
(0, import_react18.useEffect)(() => {
|
|
3445
4412
|
const currentId = idRef.current;
|
|
3446
4413
|
const hasDuplicate = Object.entries(coAgentStateRenders).some(([id, otherAction]) => {
|
|
3447
4414
|
if (id === currentId)
|
|
@@ -3465,7 +4432,7 @@ function useCoAgentStateRender(action, dependencies) {
|
|
|
3465
4432
|
});
|
|
3466
4433
|
}
|
|
3467
4434
|
}, [coAgentStateRenders]);
|
|
3468
|
-
(0,
|
|
4435
|
+
(0, import_react18.useEffect)(() => {
|
|
3469
4436
|
setCoAgentStateRender(idRef.current, action);
|
|
3470
4437
|
if (chatComponentsCache.current !== null && action.render !== void 0) {
|
|
3471
4438
|
chatComponentsCache.current.coAgentStateRenders[key] = action.render;
|
|
@@ -3485,12 +4452,12 @@ function useCoAgentStateRender(action, dependencies) {
|
|
|
3485
4452
|
}
|
|
3486
4453
|
|
|
3487
4454
|
// src/hooks/use-make-copilot-document-readable.ts
|
|
3488
|
-
var
|
|
3489
|
-
function useMakeCopilotDocumentReadable(
|
|
4455
|
+
var import_react19 = require("react");
|
|
4456
|
+
function useMakeCopilotDocumentReadable(document2, categories, dependencies = []) {
|
|
3490
4457
|
const { addDocumentContext, removeDocumentContext } = useCopilotContext();
|
|
3491
|
-
const idRef = (0,
|
|
3492
|
-
(0,
|
|
3493
|
-
const id = addDocumentContext(
|
|
4458
|
+
const idRef = (0, import_react19.useRef)();
|
|
4459
|
+
(0, import_react19.useEffect)(() => {
|
|
4460
|
+
const id = addDocumentContext(document2, categories);
|
|
3494
4461
|
idRef.current = id;
|
|
3495
4462
|
return () => {
|
|
3496
4463
|
removeDocumentContext(id);
|
|
@@ -3500,7 +4467,7 @@ function useMakeCopilotDocumentReadable(document, categories, dependencies = [])
|
|
|
3500
4467
|
}
|
|
3501
4468
|
|
|
3502
4469
|
// src/hooks/use-copilot-readable.ts
|
|
3503
|
-
var
|
|
4470
|
+
var import_react20 = require("react");
|
|
3504
4471
|
function convertToJSON(description, value) {
|
|
3505
4472
|
return `${description}: ${typeof value === "string" ? value : JSON.stringify(value)}`;
|
|
3506
4473
|
}
|
|
@@ -3513,10 +4480,10 @@ function useCopilotReadable({
|
|
|
3513
4480
|
available = "enabled"
|
|
3514
4481
|
}, dependencies) {
|
|
3515
4482
|
const { addContext, removeContext } = useCopilotContext();
|
|
3516
|
-
const idRef = (0,
|
|
4483
|
+
const idRef = (0, import_react20.useRef)();
|
|
3517
4484
|
convert = convert || convertToJSON;
|
|
3518
4485
|
const information = convert(description, value);
|
|
3519
|
-
(0,
|
|
4486
|
+
(0, import_react20.useEffect)(() => {
|
|
3520
4487
|
if (available === "disabled")
|
|
3521
4488
|
return;
|
|
3522
4489
|
const id = addContext(information, parentId, categories);
|
|
@@ -3529,20 +4496,20 @@ function useCopilotReadable({
|
|
|
3529
4496
|
}
|
|
3530
4497
|
|
|
3531
4498
|
// src/hooks/use-coagent.ts
|
|
3532
|
-
var
|
|
3533
|
-
var
|
|
4499
|
+
var import_react21 = require("react");
|
|
4500
|
+
var import_shared18 = require("@copilotkit/shared");
|
|
3534
4501
|
function useCoAgent(options) {
|
|
3535
4502
|
const context = useCopilotContext();
|
|
3536
4503
|
const { availableAgents } = context;
|
|
3537
4504
|
const { setBannerError } = useToast();
|
|
3538
|
-
const lastLoadedThreadId = (0,
|
|
3539
|
-
const lastLoadedState = (0,
|
|
4505
|
+
const lastLoadedThreadId = (0, import_react21.useRef)();
|
|
4506
|
+
const lastLoadedState = (0, import_react21.useRef)();
|
|
3540
4507
|
const { name } = options;
|
|
3541
|
-
(0,
|
|
4508
|
+
(0, import_react21.useEffect)(() => {
|
|
3542
4509
|
if ((availableAgents == null ? void 0 : availableAgents.length) && !availableAgents.some((a) => a.name === name)) {
|
|
3543
4510
|
const message = `(useCoAgent): Agent "${name}" not found. Make sure the agent exists and is properly configured.`;
|
|
3544
4511
|
console.warn(message);
|
|
3545
|
-
const agentError = new
|
|
4512
|
+
const agentError = new import_shared18.CopilotKitAgentDiscoveryError({
|
|
3546
4513
|
agentName: name,
|
|
3547
4514
|
availableAgents: availableAgents.map((a) => ({ name: a.name, id: a.id }))
|
|
3548
4515
|
});
|
|
@@ -3560,7 +4527,7 @@ function useCoAgent(options) {
|
|
|
3560
4527
|
credentials: copilotApiConfig.credentials,
|
|
3561
4528
|
showDevConsole: context.showDevConsole
|
|
3562
4529
|
});
|
|
3563
|
-
const setState = (0,
|
|
4530
|
+
const setState = (0, import_react21.useCallback)(
|
|
3564
4531
|
(newState) => {
|
|
3565
4532
|
let coagentState = getCoagentState({ coagentStates, name, options });
|
|
3566
4533
|
const updatedState = typeof newState === "function" ? newState(coagentState.state) : newState;
|
|
@@ -3572,7 +4539,7 @@ function useCoAgent(options) {
|
|
|
3572
4539
|
},
|
|
3573
4540
|
[coagentStates, name]
|
|
3574
4541
|
);
|
|
3575
|
-
(0,
|
|
4542
|
+
(0, import_react21.useEffect)(() => {
|
|
3576
4543
|
const fetchAgentState = () => __async(this, null, function* () {
|
|
3577
4544
|
var _a, _b, _c, _d;
|
|
3578
4545
|
if (!threadId || threadId === lastLoadedThreadId.current)
|
|
@@ -3590,13 +4557,13 @@ function useCoAgent(options) {
|
|
|
3590
4557
|
if (((_d = (_c = result.data) == null ? void 0 : _c.loadAgentState) == null ? void 0 : _d.threadExists) && newState && newState != "{}") {
|
|
3591
4558
|
lastLoadedState.current = newState;
|
|
3592
4559
|
lastLoadedThreadId.current = threadId;
|
|
3593
|
-
const fetchedState = (0,
|
|
4560
|
+
const fetchedState = (0, import_shared18.parseJson)(newState, {});
|
|
3594
4561
|
isExternalStateManagement(options) ? options.setState(fetchedState) : setState(fetchedState);
|
|
3595
4562
|
}
|
|
3596
4563
|
});
|
|
3597
4564
|
void fetchAgentState();
|
|
3598
4565
|
}, [threadId]);
|
|
3599
|
-
(0,
|
|
4566
|
+
(0, import_react21.useEffect)(() => {
|
|
3600
4567
|
if (isExternalStateManagement(options)) {
|
|
3601
4568
|
setState(options.state);
|
|
3602
4569
|
} else if (coagentStates[name] === void 0) {
|
|
@@ -3607,7 +4574,7 @@ function useCoAgent(options) {
|
|
|
3607
4574
|
// reset initialstate on reset
|
|
3608
4575
|
coagentStates[name] === void 0
|
|
3609
4576
|
]);
|
|
3610
|
-
(0,
|
|
4577
|
+
(0, import_react21.useEffect)(() => {
|
|
3611
4578
|
const newConfig = options.config ? options.config : options.configurable ? { configurable: options.configurable } : void 0;
|
|
3612
4579
|
if (newConfig === void 0)
|
|
3613
4580
|
return;
|
|
@@ -3639,7 +4606,7 @@ function useCoAgent(options) {
|
|
|
3639
4606
|
}),
|
|
3640
4607
|
[name, context, sendMessage, runChatCompletion]
|
|
3641
4608
|
);
|
|
3642
|
-
return (0,
|
|
4609
|
+
return (0, import_react21.useMemo)(() => {
|
|
3643
4610
|
const coagentState = getCoagentState({ coagentStates, name, options });
|
|
3644
4611
|
return {
|
|
3645
4612
|
name,
|
|
@@ -3736,28 +4703,28 @@ var getCoagentState = ({
|
|
|
3736
4703
|
};
|
|
3737
4704
|
|
|
3738
4705
|
// src/hooks/use-copilot-authenticated-action.ts
|
|
3739
|
-
var
|
|
3740
|
-
var
|
|
4706
|
+
var import_react22 = require("react");
|
|
4707
|
+
var import_react23 = __toESM(require("react"));
|
|
3741
4708
|
function useCopilotAuthenticatedAction_c(action, dependencies) {
|
|
3742
4709
|
const { authConfig_c, authStates_c, setAuthStates_c } = useCopilotContext();
|
|
3743
|
-
const pendingActionRef = (0,
|
|
3744
|
-
const executeAction2 = (0,
|
|
4710
|
+
const pendingActionRef = (0, import_react22.useRef)(null);
|
|
4711
|
+
const executeAction2 = (0, import_react22.useCallback)(
|
|
3745
4712
|
(props) => {
|
|
3746
4713
|
if (typeof action.render === "function") {
|
|
3747
4714
|
return action.render(props);
|
|
3748
4715
|
}
|
|
3749
|
-
return action.render ||
|
|
4716
|
+
return action.render || import_react23.default.createElement(import_react22.Fragment);
|
|
3750
4717
|
},
|
|
3751
4718
|
[action]
|
|
3752
4719
|
);
|
|
3753
|
-
const wrappedRender = (0,
|
|
4720
|
+
const wrappedRender = (0, import_react22.useCallback)(
|
|
3754
4721
|
(props) => {
|
|
3755
4722
|
const isAuthenticated = Object.values(authStates_c || {}).some(
|
|
3756
4723
|
(state) => state.status === "authenticated"
|
|
3757
4724
|
);
|
|
3758
4725
|
if (!isAuthenticated) {
|
|
3759
4726
|
pendingActionRef.current = props;
|
|
3760
|
-
return (authConfig_c == null ? void 0 : authConfig_c.SignInComponent) ?
|
|
4727
|
+
return (authConfig_c == null ? void 0 : authConfig_c.SignInComponent) ? import_react23.default.createElement(authConfig_c.SignInComponent, {
|
|
3761
4728
|
onSignInComplete: (authState) => {
|
|
3762
4729
|
setAuthStates_c == null ? void 0 : setAuthStates_c((prev) => __spreadProps(__spreadValues({}, prev), { [action.name]: authState }));
|
|
3763
4730
|
if (pendingActionRef.current) {
|
|
@@ -3765,7 +4732,7 @@ function useCopilotAuthenticatedAction_c(action, dependencies) {
|
|
|
3765
4732
|
pendingActionRef.current = null;
|
|
3766
4733
|
}
|
|
3767
4734
|
}
|
|
3768
|
-
}) :
|
|
4735
|
+
}) : import_react23.default.createElement(import_react22.Fragment);
|
|
3769
4736
|
}
|
|
3770
4737
|
return executeAction2(props);
|
|
3771
4738
|
},
|
|
@@ -3780,29 +4747,29 @@ function useCopilotAuthenticatedAction_c(action, dependencies) {
|
|
|
3780
4747
|
}
|
|
3781
4748
|
|
|
3782
4749
|
// src/hooks/use-langgraph-interrupt.ts
|
|
3783
|
-
var
|
|
3784
|
-
var
|
|
4750
|
+
var import_react24 = require("react");
|
|
4751
|
+
var import_shared19 = require("@copilotkit/shared");
|
|
3785
4752
|
function useLangGraphInterrupt(action, dependencies) {
|
|
3786
4753
|
var _a;
|
|
3787
|
-
const { setLangGraphInterruptAction, removeLangGraphInterruptAction, langGraphInterruptAction } = (0,
|
|
4754
|
+
const { setLangGraphInterruptAction, removeLangGraphInterruptAction, langGraphInterruptAction } = (0, import_react24.useContext)(CopilotContext);
|
|
3788
4755
|
const { runChatCompletion } = useCopilotChat();
|
|
3789
4756
|
const { addToast } = useToast();
|
|
3790
|
-
const actionId = (0,
|
|
3791
|
-
const hasAction = (0,
|
|
4757
|
+
const actionId = (0, import_shared19.dataToUUID)(JSON.stringify(action), "lgAction");
|
|
4758
|
+
const hasAction = (0, import_react24.useMemo)(
|
|
3792
4759
|
() => Boolean(langGraphInterruptAction == null ? void 0 : langGraphInterruptAction.id),
|
|
3793
4760
|
[langGraphInterruptAction]
|
|
3794
4761
|
);
|
|
3795
|
-
const isCurrentAction = (0,
|
|
4762
|
+
const isCurrentAction = (0, import_react24.useMemo)(
|
|
3796
4763
|
() => (langGraphInterruptAction == null ? void 0 : langGraphInterruptAction.id) && (langGraphInterruptAction == null ? void 0 : langGraphInterruptAction.id) === actionId,
|
|
3797
4764
|
[langGraphInterruptAction]
|
|
3798
4765
|
);
|
|
3799
|
-
(0,
|
|
4766
|
+
(0, import_react24.useEffect)(() => {
|
|
3800
4767
|
var _a2;
|
|
3801
4768
|
if (hasAction && isCurrentAction && ((_a2 = langGraphInterruptAction == null ? void 0 : langGraphInterruptAction.event) == null ? void 0 : _a2.response)) {
|
|
3802
4769
|
runChatCompletion();
|
|
3803
4770
|
}
|
|
3804
4771
|
}, [(_a = langGraphInterruptAction == null ? void 0 : langGraphInterruptAction.event) == null ? void 0 : _a.response, runChatCompletion, hasAction, isCurrentAction]);
|
|
3805
|
-
(0,
|
|
4772
|
+
(0, import_react24.useEffect)(() => {
|
|
3806
4773
|
if (!action)
|
|
3807
4774
|
return;
|
|
3808
4775
|
if (hasAction && !isCurrentAction && !action.enabled) {
|
|
@@ -3827,10 +4794,10 @@ function useLangGraphInterrupt(action, dependencies) {
|
|
|
3827
4794
|
}
|
|
3828
4795
|
|
|
3829
4796
|
// src/hooks/use-copilot-additional-instructions.ts
|
|
3830
|
-
var
|
|
4797
|
+
var import_react25 = require("react");
|
|
3831
4798
|
function useCopilotAdditionalInstructions({ instructions, available = "enabled" }, dependencies) {
|
|
3832
4799
|
const { setAdditionalInstructions } = useCopilotContext();
|
|
3833
|
-
(0,
|
|
4800
|
+
(0, import_react25.useEffect)(() => {
|
|
3834
4801
|
if (available === "disabled")
|
|
3835
4802
|
return;
|
|
3836
4803
|
setAdditionalInstructions((prevInstructions) => [...prevInstructions || [], instructions]);
|