@copilotkit/react-core 1.50.0-beta.11 → 1.50.0-beta.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.
Files changed (58) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/{chunk-7SHWECGN.mjs → chunk-6MMP5LPV.mjs} +2 -2
  3. package/dist/{chunk-U2ZRVVKT.mjs → chunk-7VKOBXCY.mjs} +2 -2
  4. package/dist/{chunk-LHERIF3L.mjs → chunk-7X3E6GHT.mjs} +5 -5
  5. package/dist/{chunk-YJGPIN3R.mjs → chunk-EV2FIZFH.mjs} +2 -2
  6. package/dist/{chunk-4HRUQH6U.mjs → chunk-NX57QKMK.mjs} +2 -2
  7. package/dist/{chunk-B5ELMVT7.mjs → chunk-OJVWPLC4.mjs} +2 -2
  8. package/dist/{chunk-EG56H77V.mjs → chunk-PLXQ2PM6.mjs} +4 -4
  9. package/dist/{chunk-3775VM7Y.mjs → chunk-QHAYENR3.mjs} +5 -5
  10. package/dist/{chunk-FYMZKPOL.mjs → chunk-UUMLIYAK.mjs} +28 -20
  11. package/dist/chunk-UUMLIYAK.mjs.map +1 -0
  12. package/dist/components/copilot-provider/copilotkit-props.d.ts +6 -0
  13. package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
  14. package/dist/components/copilot-provider/copilotkit.js +127 -1150
  15. package/dist/components/copilot-provider/copilotkit.js.map +1 -1
  16. package/dist/components/copilot-provider/copilotkit.mjs +9 -12
  17. package/dist/components/copilot-provider/index.js +127 -1150
  18. package/dist/components/copilot-provider/index.js.map +1 -1
  19. package/dist/components/copilot-provider/index.mjs +9 -12
  20. package/dist/components/dev-console/console-trigger.mjs +225 -5
  21. package/dist/components/dev-console/console-trigger.mjs.map +1 -1
  22. package/dist/components/error-boundary/error-boundary.mjs +2 -2
  23. package/dist/components/index.js +127 -1150
  24. package/dist/components/index.js.map +1 -1
  25. package/dist/components/index.mjs +9 -12
  26. package/dist/context/index.mjs +5 -5
  27. package/dist/hooks/index.mjs +22 -22
  28. package/dist/hooks/use-coagent-state-render-bridge.mjs +1 -1
  29. package/dist/hooks/use-copilot-action.mjs +2 -2
  30. package/dist/hooks/use-copilot-authenticated-action.mjs +3 -3
  31. package/dist/hooks/use-copilot-chat-headless_c.mjs +7 -7
  32. package/dist/hooks/use-copilot-chat.mjs +7 -7
  33. package/dist/hooks/use-copilot-chat_internal.mjs +6 -6
  34. package/dist/hooks/use-default-tool.mjs +3 -3
  35. package/dist/hooks/use-langgraph-interrupt-render.mjs +1 -1
  36. package/dist/index.js +274 -1288
  37. package/dist/index.js.map +1 -1
  38. package/dist/index.mjs +47 -50
  39. package/dist/lib/copilot-task.js.map +1 -1
  40. package/dist/lib/copilot-task.mjs +10 -13
  41. package/dist/lib/index.js.map +1 -1
  42. package/dist/lib/index.mjs +10 -13
  43. package/dist/types/index.mjs +1 -1
  44. package/dist/utils/index.mjs +3 -3
  45. package/package.json +5 -5
  46. package/src/components/copilot-provider/copilotkit-props.tsx +7 -0
  47. package/src/components/copilot-provider/copilotkit.tsx +13 -5
  48. package/dist/chunk-FYMZKPOL.mjs.map +0 -1
  49. package/dist/chunk-PMWUKW3Z.mjs +0 -231
  50. package/dist/chunk-PMWUKW3Z.mjs.map +0 -1
  51. /package/dist/{chunk-7SHWECGN.mjs.map → chunk-6MMP5LPV.mjs.map} +0 -0
  52. /package/dist/{chunk-U2ZRVVKT.mjs.map → chunk-7VKOBXCY.mjs.map} +0 -0
  53. /package/dist/{chunk-LHERIF3L.mjs.map → chunk-7X3E6GHT.mjs.map} +0 -0
  54. /package/dist/{chunk-YJGPIN3R.mjs.map → chunk-EV2FIZFH.mjs.map} +0 -0
  55. /package/dist/{chunk-4HRUQH6U.mjs.map → chunk-NX57QKMK.mjs.map} +0 -0
  56. /package/dist/{chunk-B5ELMVT7.mjs.map → chunk-OJVWPLC4.mjs.map} +0 -0
  57. /package/dist/{chunk-EG56H77V.mjs.map → chunk-PLXQ2PM6.mjs.map} +0 -0
  58. /package/dist/{chunk-3775VM7Y.mjs.map → chunk-QHAYENR3.mjs.map} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,29 @@
1
1
  # ui
2
2
 
3
+ ## 1.50.0-beta.13
4
+
5
+ ### Minor Changes
6
+
7
+ - Updating to the latest version of vnext
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @copilotkit/runtime-client-gql@1.50.0-beta.13
13
+ - @copilotkit/shared@1.50.0-beta.13
14
+
15
+ ## 1.50.0-beta.12
16
+
17
+ ### Minor Changes
18
+
19
+ - eab69a2: Enabling the new inspector
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies [eab69a2]
24
+ - @copilotkit/runtime-client-gql@1.50.0-beta.12
25
+ - @copilotkit/shared@1.50.0-beta.12
26
+
3
27
  ## 1.50.0-beta.11
4
28
 
5
29
  ### Minor Changes
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotChatInternal
3
- } from "./chunk-3775VM7Y.mjs";
3
+ } from "./chunk-QHAYENR3.mjs";
4
4
 
5
5
  // src/hooks/use-copilot-chat.ts
6
6
  function useCopilotChat(options = {}) {
@@ -33,4 +33,4 @@ function useCopilotChat(options = {}) {
33
33
  export {
34
34
  useCopilotChat
35
35
  };
36
- //# sourceMappingURL=chunk-7SHWECGN.mjs.map
36
+ //# sourceMappingURL=chunk-6MMP5LPV.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotAction
3
- } from "./chunk-EG56H77V.mjs";
3
+ } from "./chunk-PLXQ2PM6.mjs";
4
4
  import {
5
5
  __spreadProps,
6
6
  __spreadValues
@@ -14,4 +14,4 @@ function useDefaultTool(tool, dependencies) {
14
14
  export {
15
15
  useDefaultTool
16
16
  };
17
- //# sourceMappingURL=chunk-U2ZRVVKT.mjs.map
17
+ //# sourceMappingURL=chunk-7VKOBXCY.mjs.map
@@ -1,13 +1,13 @@
1
+ import {
2
+ UsageBanner,
3
+ getErrorActions
4
+ } from "./chunk-6ZLPNY7X.mjs";
1
5
  import {
2
6
  StatusChecker
3
7
  } from "./chunk-PMAFHQ7P.mjs";
4
8
  import {
5
9
  useErrorToast
6
10
  } from "./chunk-6PUNP7CD.mjs";
7
- import {
8
- UsageBanner,
9
- getErrorActions
10
- } from "./chunk-6ZLPNY7X.mjs";
11
11
 
12
12
  // src/components/error-boundary/error-boundary.tsx
13
13
  import React, { useEffect } from "react";
@@ -80,4 +80,4 @@ export {
80
80
  CopilotErrorBoundary,
81
81
  ErrorToast
82
82
  };
83
- //# sourceMappingURL=chunk-LHERIF3L.mjs.map
83
+ //# sourceMappingURL=chunk-7X3E6GHT.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotChatInternal
3
- } from "./chunk-3775VM7Y.mjs";
3
+ } from "./chunk-QHAYENR3.mjs";
4
4
  import {
5
5
  useCopilotContext
6
6
  } from "./chunk-AFNWX62Q.mjs";
@@ -83,4 +83,4 @@ function useCopilotChatHeadless_c(options = {}) {
83
83
  export {
84
84
  useCopilotChatHeadless_c
85
85
  };
86
- //# sourceMappingURL=chunk-YJGPIN3R.mjs.map
86
+ //# sourceMappingURL=chunk-EV2FIZFH.mjs.map
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotAction
3
- } from "./chunk-EG56H77V.mjs";
3
+ } from "./chunk-PLXQ2PM6.mjs";
4
4
  import {
5
5
  useCopilotContext
6
6
  } from "./chunk-AFNWX62Q.mjs";
@@ -56,4 +56,4 @@ function useCopilotAuthenticatedAction_c(action, dependencies) {
56
56
  export {
57
57
  useCopilotAuthenticatedAction_c
58
58
  };
59
- //# sourceMappingURL=chunk-4HRUQH6U.mjs.map
59
+ //# sourceMappingURL=chunk-NX57QKMK.mjs.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-4CEQJ2X6.mjs";
4
4
  import {
5
5
  defaultCopilotContextCategories
6
- } from "./chunk-FYMZKPOL.mjs";
6
+ } from "./chunk-UUMLIYAK.mjs";
7
7
  import {
8
8
  __async,
9
9
  __spreadValues
@@ -117,4 +117,4 @@ ${instructions}
117
117
  export {
118
118
  CopilotTask
119
119
  };
120
- //# sourceMappingURL=chunk-B5ELMVT7.mjs.map
120
+ //# sourceMappingURL=chunk-OJVWPLC4.mjs.map
@@ -1,12 +1,12 @@
1
+ import {
2
+ useHumanInTheLoop
3
+ } from "./chunk-7DTB7S5V.mjs";
1
4
  import {
2
5
  useRenderToolCall
3
6
  } from "./chunk-NBK4KBLX.mjs";
4
7
  import {
5
8
  useFrontendTool
6
9
  } from "./chunk-T2VBHAAP.mjs";
7
- import {
8
- useHumanInTheLoop
9
- } from "./chunk-7DTB7S5V.mjs";
10
10
  import {
11
11
  __spreadProps,
12
12
  __spreadValues
@@ -77,4 +77,4 @@ function useCopilotAction(action, dependencies) {
77
77
  export {
78
78
  useCopilotAction
79
79
  };
80
- //# sourceMappingURL=chunk-EG56H77V.mjs.map
80
+ //# sourceMappingURL=chunk-PLXQ2PM6.mjs.map
@@ -1,12 +1,12 @@
1
1
  import {
2
- useLazyToolRenderer
3
- } from "./chunk-ZVF5Q6IH.mjs";
2
+ useAsyncCallback
3
+ } from "./chunk-6PUNP7CD.mjs";
4
4
  import {
5
5
  useLangGraphInterruptRender
6
6
  } from "./chunk-VV56AVPB.mjs";
7
7
  import {
8
- useAsyncCallback
9
- } from "./chunk-6PUNP7CD.mjs";
8
+ useLazyToolRenderer
9
+ } from "./chunk-ZVF5Q6IH.mjs";
10
10
  import {
11
11
  CoAgentStateRenderBridge
12
12
  } from "./chunk-QNUAXSDP.mjs";
@@ -731,4 +731,4 @@ export {
731
731
  useCopilotChatInternal,
732
732
  defaultSystemMessage
733
733
  };
734
- //# sourceMappingURL=chunk-3775VM7Y.mjs.map
734
+ //# sourceMappingURL=chunk-QHAYENR3.mjs.map
@@ -1,45 +1,42 @@
1
1
  import {
2
2
  CopilotErrorBoundary
3
- } from "./chunk-LHERIF3L.mjs";
3
+ } from "./chunk-7X3E6GHT.mjs";
4
4
  import {
5
5
  CopilotMessages,
6
6
  MessagesTapProvider
7
7
  } from "./chunk-HE22TZMF.mjs";
8
8
  import {
9
- ConsoleTrigger
10
- } from "./chunk-PMWUKW3Z.mjs";
9
+ shouldShowDevConsole
10
+ } from "./chunk-ICIK2BSB.mjs";
11
+ import {
12
+ UsageBanner,
13
+ getErrorActions
14
+ } from "./chunk-6ZLPNY7X.mjs";
11
15
  import {
12
16
  use_tree_default
13
17
  } from "./chunk-RKTVJRK7.mjs";
14
18
  import {
15
- shouldShowDevConsole
16
- } from "./chunk-ICIK2BSB.mjs";
19
+ CopilotListeners
20
+ } from "./chunk-WF65O6HX.mjs";
17
21
  import {
18
22
  use_flat_category_store_default
19
23
  } from "./chunk-YYN33GSG.mjs";
20
24
  import {
21
25
  CoAgentStateRenderBridge
22
26
  } from "./chunk-QNUAXSDP.mjs";
23
- import {
24
- ThreadsProvider,
25
- useThreads
26
- } from "./chunk-F555TVE4.mjs";
27
- import {
28
- CopilotListeners
29
- } from "./chunk-WF65O6HX.mjs";
30
27
  import {
31
28
  ToastProvider
32
29
  } from "./chunk-EFL5OBKN.mjs";
33
- import {
34
- UsageBanner,
35
- getErrorActions
36
- } from "./chunk-6ZLPNY7X.mjs";
37
30
  import {
38
31
  CoAgentStateRendersProvider
39
32
  } from "./chunk-FDOMAPJY.mjs";
40
33
  import {
41
34
  CopilotContext
42
35
  } from "./chunk-AFNWX62Q.mjs";
36
+ import {
37
+ ThreadsProvider,
38
+ useThreads
39
+ } from "./chunk-F555TVE4.mjs";
43
40
  import {
44
41
  __async,
45
42
  __objRest,
@@ -50,7 +47,10 @@ import {
50
47
 
51
48
  // src/components/copilot-provider/copilotkit.tsx
52
49
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
53
- import { CopilotChatConfigurationProvider, CopilotKitProvider } from "@copilotkitnext/react";
50
+ import {
51
+ CopilotChatConfigurationProvider,
52
+ CopilotKitProvider as CopilotKitNextProvider
53
+ } from "@copilotkitnext/react";
54
54
  import { flushSync } from "react-dom";
55
55
  import {
56
56
  COPILOT_CLOUD_CHAT_URL,
@@ -63,9 +63,18 @@ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
63
63
  function CopilotKit(_a) {
64
64
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
65
65
  const enabled = shouldShowDevConsole(props.showDevConsole);
66
+ const showInspector = shouldShowDevConsole(props.enableInspector);
66
67
  const publicApiKey = props.publicApiKey || props.publicLicenseKey;
67
68
  const renderArr = useMemo(() => [{ render: CoAgentStateRenderBridge }], []);
68
- return /* @__PURE__ */ jsx(ToastProvider, { enabled, children: /* @__PURE__ */ jsx(CopilotErrorBoundary, { publicApiKey, showUsageBanner: enabled, children: /* @__PURE__ */ jsx(ThreadsProvider, { threadId: props.threadId, children: /* @__PURE__ */ jsx(CopilotKitProvider, __spreadProps(__spreadValues({}, props), { renderCustomMessages: renderArr, useSingleEndpoint: true, children: /* @__PURE__ */ jsx(CopilotKitInternal, __spreadProps(__spreadValues({}, props), { children })) })) }) }) });
69
+ return /* @__PURE__ */ jsx(ToastProvider, { enabled, children: /* @__PURE__ */ jsx(CopilotErrorBoundary, { publicApiKey, showUsageBanner: enabled, children: /* @__PURE__ */ jsx(ThreadsProvider, { threadId: props.threadId, children: /* @__PURE__ */ jsx(
70
+ CopilotKitNextProvider,
71
+ __spreadProps(__spreadValues({}, props), {
72
+ showDevConsole: showInspector,
73
+ renderCustomMessages: renderArr,
74
+ useSingleEndpoint: true,
75
+ children: /* @__PURE__ */ jsx(CopilotKitInternal, __spreadProps(__spreadValues({}, props), { children }))
76
+ })
77
+ ) }) }) });
69
78
  }
70
79
  function CopilotKitInternal(cpkProps) {
71
80
  var _b;
@@ -472,7 +481,6 @@ ${nonDocumentStrings}`;
472
481
  /* @__PURE__ */ jsxs(CoAgentStateRendersProvider, { children: [
473
482
  /* @__PURE__ */ jsx(MessagesTapProvider, { children: /* @__PURE__ */ jsxs(CopilotMessages, { children: [
474
483
  memoizedChildren,
475
- showDevConsole && /* @__PURE__ */ jsx(ConsoleTrigger, {}),
476
484
  /* @__PURE__ */ jsx(RegisteredActionsRenderer, {})
477
485
  ] }) }),
478
486
  bannerError && showDevConsole && /* @__PURE__ */ jsx(
@@ -540,4 +548,4 @@ export {
540
548
  CopilotKitInternal,
541
549
  defaultCopilotContextCategories
542
550
  };
543
- //# sourceMappingURL=chunk-FYMZKPOL.mjs.map
551
+ //# sourceMappingURL=chunk-UUMLIYAK.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/copilot-provider/copilotkit.tsx"],"sourcesContent":["/**\n * This component will typically wrap your entire application (or a sub-tree of your application where you want to have a copilot). It provides the copilot context to all other components and hooks.\n *\n * ## Example\n *\n * You can find more information about self-hosting CopilotKit [here](/guides/self-hosting).\n *\n * ```tsx\n * import { CopilotKit } from \"@copilotkit/react-core\";\n *\n * <CopilotKit runtimeUrl=\"<your-runtime-url>\">\n * // ... your app ...\n * </CopilotKit>\n * ```\n */\n\nimport { useCallback, useEffect, useMemo, useRef, useState, SetStateAction } from \"react\";\nimport {\n CopilotChatConfigurationProvider,\n CopilotKitInspector,\n CopilotKitProvider as CopilotKitNextProvider,\n} from \"@copilotkitnext/react\";\nimport {\n CopilotContext,\n CopilotApiConfig,\n ChatComponentsCache,\n AgentSession,\n AuthState,\n} from \"../../context/copilot-context\";\nimport useTree from \"../../hooks/use-tree\";\nimport { CopilotChatSuggestionConfiguration, DocumentPointer } from \"../../types\";\nimport { flushSync } from \"react-dom\";\nimport {\n COPILOT_CLOUD_CHAT_URL,\n CopilotCloudConfig,\n FunctionCallHandler,\n COPILOT_CLOUD_PUBLIC_API_KEY_HEADER,\n randomUUID,\n ConfigurationError,\n MissingPublicApiKeyError,\n CopilotKitError,\n CopilotErrorEvent,\n CopilotErrorHandler,\n} from \"@copilotkit/shared\";\nimport { FrontendAction } from \"../../types/frontend-action\";\nimport useFlatCategoryStore from \"../../hooks/use-flat-category-store\";\nimport { CopilotKitProps } from \"./copilotkit-props\";\nimport { CoagentState } from \"../../types/coagent-state\";\nimport { CopilotMessages, MessagesTapProvider } from \"./copilot-messages\";\nimport { ToastProvider } from \"../toast/toast-provider\";\nimport { getErrorActions, UsageBanner } from \"../usage-banner\";\nimport { shouldShowDevConsole } from \"../../utils\";\nimport { CopilotErrorBoundary } from \"../error-boundary/error-boundary\";\nimport { Agent, ExtensionsInput } from \"@copilotkit/runtime-client-gql\";\nimport {\n LangGraphInterruptRender,\n LangGraphInterruptActionSetterArgs,\n QueuedInterruptEvent,\n} from \"../../types/interrupt-action\";\nimport { CoAgentStateRendersProvider } from \"../../context/coagent-state-renders-context\";\nimport { CoAgentStateRenderBridge } from \"../../hooks/use-coagent-state-render-bridge\";\nimport { ThreadsProvider, useThreads } from \"../../context/threads-context\";\nimport { CopilotListeners } from \"../CopilotListeners\";\n\nexport function CopilotKit({ children, ...props }: CopilotKitProps) {\n const enabled = shouldShowDevConsole(props.showDevConsole);\n const showInspector = shouldShowDevConsole(props.enableInspector);\n\n // Use API key if provided, otherwise use the license key\n const publicApiKey = props.publicApiKey || props.publicLicenseKey;\n\n const renderArr = useMemo(() => [{ render: CoAgentStateRenderBridge }], []);\n\n return (\n <ToastProvider enabled={enabled}>\n <CopilotErrorBoundary publicApiKey={publicApiKey} showUsageBanner={enabled}>\n <ThreadsProvider threadId={props.threadId}>\n <CopilotKitNextProvider\n {...props}\n showDevConsole={showInspector}\n renderCustomMessages={renderArr}\n useSingleEndpoint={true}\n >\n <CopilotKitInternal {...props}>{children}</CopilotKitInternal>\n </CopilotKitNextProvider>\n </ThreadsProvider>\n </CopilotErrorBoundary>\n </ToastProvider>\n );\n}\n\nexport function CopilotKitInternal(cpkProps: CopilotKitProps) {\n const { children, ...props } = cpkProps;\n\n /**\n * This will throw an error if the props are invalid.\n */\n validateProps(cpkProps);\n\n // Use license key as API key if provided, otherwise use the API key\n const publicApiKey = props.publicLicenseKey || props.publicApiKey;\n\n const chatApiEndpoint = props.runtimeUrl || COPILOT_CLOUD_CHAT_URL;\n\n const [actions, setActions] = useState<Record<string, FrontendAction<any>>>({});\n\n // State for registered actions from useCopilotAction\n const [registeredActionConfigs, setRegisteredActionConfigs] = useState<\n Map<string, { type: string; action: any; component: any }>\n >(new Map());\n\n const chatComponentsCache = useRef<ChatComponentsCache>({\n actions: {},\n coAgentStateRenders: {},\n });\n\n const { addElement, removeElement, printTree, getAllElements } = useTree();\n const [isLoading, setIsLoading] = useState(false);\n const [chatInstructions, setChatInstructions] = useState(\"\");\n const [authStates, setAuthStates] = useState<Record<string, AuthState>>({});\n const [extensions, setExtensions] = useState<ExtensionsInput>({});\n const [additionalInstructions, setAdditionalInstructions] = useState<string[]>([]);\n\n const {\n addElement: addDocument,\n removeElement: removeDocument,\n allElements: allDocuments,\n } = useFlatCategoryStore<DocumentPointer>();\n\n // Compute all the functions and properties that we need to pass\n const setAction = useCallback((id: string, action: FrontendAction<any>) => {\n setActions((prevPoints) => {\n return {\n ...prevPoints,\n [id]: action,\n };\n });\n }, []);\n\n const removeAction = useCallback((id: string) => {\n setActions((prevPoints) => {\n const newPoints = { ...prevPoints };\n delete newPoints[id];\n return newPoints;\n });\n }, []);\n\n const getContextString = useCallback(\n (documents: DocumentPointer[], categories: string[]) => {\n const documentsString = documents\n .map((document) => {\n return `${document.name} (${document.sourceApplication}):\\n${document.getContents()}`;\n })\n .join(\"\\n\\n\");\n\n const nonDocumentStrings = printTree(categories);\n\n return `${documentsString}\\n\\n${nonDocumentStrings}`;\n },\n [printTree],\n );\n\n const addContext = useCallback(\n (\n context: string,\n parentId?: string,\n categories: string[] = defaultCopilotContextCategories,\n ) => {\n return addElement(context, categories, parentId);\n },\n [addElement],\n );\n\n const removeContext = useCallback(\n (id: string) => {\n removeElement(id);\n },\n [removeElement],\n );\n\n const getAllContext = useCallback(() => {\n return getAllElements();\n }, [getAllElements]);\n\n const getFunctionCallHandler = useCallback(\n (customEntryPoints?: Record<string, FrontendAction<any>>) => {\n return entryPointsToFunctionCallHandler(Object.values(customEntryPoints || actions));\n },\n [actions],\n );\n\n const getDocumentsContext = useCallback(\n (categories: string[]) => {\n return allDocuments(categories);\n },\n [allDocuments],\n );\n\n const addDocumentContext = useCallback(\n (documentPointer: DocumentPointer, categories: string[] = defaultCopilotContextCategories) => {\n return addDocument(documentPointer, categories);\n },\n [addDocument],\n );\n\n const removeDocumentContext = useCallback(\n (documentId: string) => {\n removeDocument(documentId);\n },\n [removeDocument],\n );\n\n // get the appropriate CopilotApiConfig from the props\n const copilotApiConfig: CopilotApiConfig = useMemo(() => {\n let cloud: CopilotCloudConfig | undefined = undefined;\n if (publicApiKey) {\n cloud = {\n guardrails: {\n input: {\n restrictToTopic: {\n enabled: Boolean(props.guardrails_c),\n validTopics: props.guardrails_c?.validTopics || [],\n invalidTopics: props.guardrails_c?.invalidTopics || [],\n },\n },\n },\n };\n }\n\n return {\n publicApiKey: publicApiKey,\n ...(cloud ? { cloud } : {}),\n chatApiEndpoint: chatApiEndpoint,\n headers: props.headers || {},\n properties: props.properties || {},\n transcribeAudioUrl: props.transcribeAudioUrl,\n textToSpeechUrl: props.textToSpeechUrl,\n credentials: props.credentials,\n };\n }, [\n publicApiKey,\n props.headers,\n props.properties,\n props.transcribeAudioUrl,\n props.textToSpeechUrl,\n props.credentials,\n props.cloudRestrictToTopic,\n props.guardrails_c,\n ]);\n\n const headers = useMemo(() => {\n const authHeaders = Object.values(authStates || {}).reduce((acc, state) => {\n if (state.status === \"authenticated\" && state.authHeaders) {\n return {\n ...acc,\n ...Object.entries(state.authHeaders).reduce(\n (headers, [key, value]) => ({\n ...headers,\n [key.startsWith(\"X-Custom-\") ? key : `X-Custom-${key}`]: value,\n }),\n {},\n ),\n };\n }\n return acc;\n }, {});\n\n return {\n ...(copilotApiConfig.headers || {}),\n ...(copilotApiConfig.publicApiKey\n ? { [COPILOT_CLOUD_PUBLIC_API_KEY_HEADER]: copilotApiConfig.publicApiKey }\n : {}),\n ...authHeaders,\n };\n }, [copilotApiConfig.headers, copilotApiConfig.publicApiKey, authStates]);\n\n const [internalErrorHandlers, _setInternalErrorHandler] = useState<\n Record<string, CopilotErrorHandler>\n >({});\n const setInternalErrorHandler = useCallback((handler: Record<string, CopilotErrorHandler>) => {\n _setInternalErrorHandler((prev: Record<string, CopilotErrorHandler>) => ({\n ...prev,\n ...handler,\n }));\n }, []);\n const removeInternalErrorHandler = useCallback((key: string) => {\n _setInternalErrorHandler((prev) => {\n const { [key]: _removed, ...rest } = prev;\n return rest;\n });\n }, []);\n\n // Keep latest values in refs\n const onErrorRef = useRef<CopilotErrorHandler | undefined>(props.onError);\n useEffect(() => {\n onErrorRef.current = props.onError;\n }, [props.onError]);\n\n const internalHandlersRef = useRef<Record<string, CopilotErrorHandler>>({});\n useEffect(() => {\n internalHandlersRef.current = internalErrorHandlers;\n }, [internalErrorHandlers]);\n\n const handleErrors = useCallback(\n async (error: CopilotErrorEvent) => {\n if (copilotApiConfig.publicApiKey && onErrorRef.current) {\n try {\n await onErrorRef.current(error);\n } catch (e) {\n console.error(\"Error in public onError handler:\", e);\n }\n }\n const handlers = Object.values(internalHandlersRef.current);\n await Promise.all(\n handlers.map((h) =>\n Promise.resolve(h(error)).catch((e) =>\n console.error(\"Error in internal error handler:\", e),\n ),\n ),\n );\n },\n [copilotApiConfig.publicApiKey],\n );\n\n const [chatSuggestionConfiguration, setChatSuggestionConfiguration] = useState<{\n [key: string]: CopilotChatSuggestionConfiguration;\n }>({});\n\n const addChatSuggestionConfiguration = useCallback(\n (id: string, suggestion: CopilotChatSuggestionConfiguration) => {\n setChatSuggestionConfiguration((prev) => ({ ...prev, [id]: suggestion }));\n },\n [setChatSuggestionConfiguration],\n );\n\n const removeChatSuggestionConfiguration = useCallback(\n (id: string) => {\n setChatSuggestionConfiguration((prev) => {\n const { [id]: _, ...rest } = prev;\n return rest;\n });\n },\n [setChatSuggestionConfiguration],\n );\n\n const [availableAgents, setAvailableAgents] = useState<Agent[]>([]);\n const [coagentStates, setCoagentStates] = useState<Record<string, CoagentState>>({});\n const coagentStatesRef = useRef<Record<string, CoagentState>>({});\n const setCoagentStatesWithRef = useCallback(\n (\n value:\n | Record<string, CoagentState>\n | ((prev: Record<string, CoagentState>) => Record<string, CoagentState>),\n ) => {\n const newValue = typeof value === \"function\" ? value(coagentStatesRef.current) : value;\n coagentStatesRef.current = newValue;\n setCoagentStates((prev) => {\n return newValue;\n });\n },\n [],\n );\n\n let initialAgentSession: AgentSession | null = null;\n if (props.agent) {\n initialAgentSession = {\n agentName: props.agent,\n };\n }\n\n const [agentSession, setAgentSession] = useState<AgentSession | null>(initialAgentSession);\n\n // Update agentSession when props.agent changes\n useEffect(() => {\n if (props.agent) {\n setAgentSession({\n agentName: props.agent,\n });\n } else {\n setAgentSession(null);\n }\n }, [props.agent]);\n\n const { threadId, setThreadId: setInternalThreadId } = useThreads();\n\n const setThreadId = useCallback(\n (value: SetStateAction<string>) => {\n if (props.threadId) {\n throw new Error(\"Cannot call setThreadId() when threadId is provided via props.\");\n }\n setInternalThreadId(value);\n },\n [props.threadId],\n );\n\n const [runId, setRunId] = useState<string | null>(null);\n\n const chatAbortControllerRef = useRef<AbortController | null>(null);\n\n const showDevConsole = shouldShowDevConsole(props.showDevConsole);\n\n const [interruptActions, _setInterruptActions] = useState<\n Record<string, LangGraphInterruptRender>\n >({});\n const setInterruptAction = useCallback((action: LangGraphInterruptActionSetterArgs) => {\n _setInterruptActions((prev) => {\n if (action == null || !action.id) {\n // Cannot set action without id\n return prev;\n }\n return {\n ...prev,\n [action.id]: { ...(prev[action.id] ?? {}), ...action } as LangGraphInterruptRender,\n };\n });\n }, []);\n const removeInterruptAction = useCallback((actionId: string): void => {\n _setInterruptActions((prev) => {\n const { [actionId]: _, ...rest } = prev;\n return rest;\n });\n }, []);\n\n const [interruptEventQueue, setInterruptEventQueue] = useState<\n Record<string, QueuedInterruptEvent[]>\n >({});\n\n const addInterruptEvent = useCallback((queuedEvent: QueuedInterruptEvent) => {\n setInterruptEventQueue((prev) => {\n const threadQueue = prev[queuedEvent.threadId] || [];\n return {\n ...prev,\n [queuedEvent.threadId]: [...threadQueue, queuedEvent],\n };\n });\n }, []);\n\n const resolveInterruptEvent = useCallback(\n (threadId: string, eventId: string, response: string) => {\n setInterruptEventQueue((prev) => {\n const threadQueue = prev[threadId] || [];\n return {\n ...prev,\n [threadId]: threadQueue.map((queuedEvent) =>\n queuedEvent.eventId === eventId\n ? { ...queuedEvent, event: { ...queuedEvent.event, response } }\n : queuedEvent,\n ),\n };\n });\n },\n [],\n );\n\n const memoizedChildren = useMemo(() => children, [children]);\n const [bannerError, setBannerError] = useState<CopilotKitError | null>(null);\n\n const agentLock = useMemo(() => props.agent ?? null, [props.agent]);\n\n const forwardedParameters = useMemo(\n () => props.forwardedParameters ?? {},\n [props.forwardedParameters],\n );\n\n const updateExtensions = useCallback(\n (newExtensions: SetStateAction<ExtensionsInput>) => {\n setExtensions((prev: ExtensionsInput) => {\n const resolved = typeof newExtensions === \"function\" ? newExtensions(prev) : newExtensions;\n const isSameLength = Object.keys(resolved).length === Object.keys(prev).length;\n const isEqual =\n isSameLength &&\n // @ts-ignore\n Object.entries(resolved).every(([key, value]) => prev[key] === value);\n\n return isEqual ? prev : resolved;\n });\n },\n [setExtensions],\n );\n\n const updateAuthStates = useCallback(\n (newAuthStates: SetStateAction<Record<string, AuthState>>) => {\n setAuthStates((prev) => {\n const resolved = typeof newAuthStates === \"function\" ? newAuthStates(prev) : newAuthStates;\n const isSameLength = Object.keys(resolved).length === Object.keys(prev).length;\n const isEqual =\n isSameLength &&\n // @ts-ignore\n Object.entries(resolved).every(([key, value]) => prev[key] === value);\n\n return isEqual ? prev : resolved;\n });\n },\n [setAuthStates],\n );\n\n const handleSetRegisteredActions = useCallback((actionConfig: any): string => {\n const key = actionConfig.action.name || randomUUID();\n setRegisteredActionConfigs((prev) => {\n const newMap = new Map(prev);\n newMap.set(key, actionConfig);\n return newMap;\n });\n return key;\n }, []);\n\n const handleRemoveRegisteredAction = useCallback((actionKey: string) => {\n setRegisteredActionConfigs((prev) => {\n const newMap = new Map(prev);\n newMap.delete(actionKey);\n return newMap;\n });\n }, []);\n\n // Component to render all registered actions\n const RegisteredActionsRenderer = useMemo(() => {\n return () => (\n <>\n {Array.from(registeredActionConfigs.entries()).map(([key, config]) => {\n const Component = config.component;\n return <Component key={key} action={config.action} />;\n })}\n </>\n );\n }, [registeredActionConfigs]);\n\n return (\n <CopilotChatConfigurationProvider\n // labels={labels}\n // isModalDefaultOpen={isModalDefaultOpen}\n agentId={props.agent ?? \"default\"}\n threadId={threadId}\n >\n <CopilotContext.Provider\n value={{\n actions,\n chatComponentsCache,\n getFunctionCallHandler,\n setAction,\n removeAction,\n setRegisteredActions: handleSetRegisteredActions,\n removeRegisteredAction: handleRemoveRegisteredAction,\n getContextString,\n addContext,\n removeContext,\n getAllContext,\n getDocumentsContext,\n addDocumentContext,\n removeDocumentContext,\n copilotApiConfig: copilotApiConfig,\n isLoading,\n setIsLoading,\n chatSuggestionConfiguration,\n addChatSuggestionConfiguration,\n removeChatSuggestionConfiguration,\n chatInstructions,\n setChatInstructions,\n additionalInstructions,\n setAdditionalInstructions,\n showDevConsole,\n coagentStates,\n setCoagentStates,\n coagentStatesRef,\n setCoagentStatesWithRef,\n agentSession,\n setAgentSession,\n forwardedParameters,\n agentLock,\n threadId,\n setThreadId,\n runId,\n setRunId,\n chatAbortControllerRef,\n availableAgents,\n authConfig_c: props.authConfig_c,\n authStates_c: authStates,\n setAuthStates_c: updateAuthStates,\n extensions,\n setExtensions: updateExtensions,\n interruptActions,\n setInterruptAction,\n removeInterruptAction,\n interruptEventQueue,\n addInterruptEvent,\n resolveInterruptEvent,\n bannerError,\n setBannerError,\n onError: handleErrors,\n internalErrorHandlers,\n setInternalErrorHandler,\n removeInternalErrorHandler,\n }}\n >\n <CopilotListeners />\n <CoAgentStateRendersProvider>\n <MessagesTapProvider>\n <CopilotMessages>\n {memoizedChildren}\n <RegisteredActionsRenderer />\n </CopilotMessages>\n </MessagesTapProvider>\n {bannerError && showDevConsole && (\n <UsageBanner\n severity={bannerError.severity}\n message={bannerError.message}\n onClose={() => setBannerError(null)}\n actions={getErrorActions(bannerError)}\n />\n )}\n </CoAgentStateRendersProvider>\n </CopilotContext.Provider>\n </CopilotChatConfigurationProvider>\n );\n}\n\nexport const defaultCopilotContextCategories = [\"global\"];\n\nfunction entryPointsToFunctionCallHandler(actions: FrontendAction<any>[]): FunctionCallHandler {\n return async ({ name, args }: { name: string; args: Record<string, any> }) => {\n let actionsByFunctionName: Record<string, FrontendAction<any>> = {};\n for (let action of actions) {\n actionsByFunctionName[action.name] = action;\n }\n\n const action = actionsByFunctionName[name];\n let result: any = undefined;\n if (action) {\n await new Promise<void>((resolve, reject) => {\n flushSync(async () => {\n try {\n result = await action.handler?.(args);\n resolve();\n } catch (error) {\n reject(error);\n }\n });\n });\n await new Promise((resolve) => setTimeout(resolve, 20));\n }\n return result;\n };\n}\n\nfunction formatFeatureName(featureName: string): string {\n return featureName\n .replace(/_c$/, \"\")\n .split(\"_\")\n .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())\n .join(\" \");\n}\n\nfunction validateProps(props: CopilotKitProps): never | void {\n const cloudFeatures = Object.keys(props).filter((key) => key.endsWith(\"_c\"));\n\n // Check if we have either a runtimeUrl or one of the API keys\n const hasApiKey = props.publicApiKey || props.publicLicenseKey;\n\n if (!props.runtimeUrl && !hasApiKey) {\n throw new ConfigurationError(\n \"Missing required prop: 'runtimeUrl' or 'publicApiKey' or 'publicLicenseKey'\",\n );\n }\n\n if (cloudFeatures.length > 0 && !hasApiKey) {\n throw new MissingPublicApiKeyError(\n `Missing required prop: 'publicApiKey' or 'publicLicenseKey' to use cloud features: ${cloudFeatures\n .map(formatFeatureName)\n .join(\", \")}`,\n );\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAgBA,SAAS,aAAa,WAAW,SAAS,QAAQ,gBAAgC;AAClF;AAAA,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AAE,EACjB,MAAM,GAAG,EACT,IAAI,CAAC,SAAS,KAAK,OAAO,CAAC,EAAE,YAAY,IAAI,KAAK,MAAM,CAAC,EAAE,YAAY,CAAC,EACxE,KAAK,GAAG;AACb;AAEA,SAAS,cAAc,OAAsC;AAC3D,QAAM,gBAAgB,OAAO,KAAK,KAAK,EAAE,OAAO,CAAC,QAAQ,IAAI,SAAS,IAAI,CAAC;AAG3E,QAAM,YAAY,MAAM,gBAAgB,MAAM;AAE9C,MAAI,CAAC,MAAM,cAAc,CAAC,WAAW;AACnC,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,MAAI,cAAc,SAAS,KAAK,CAAC,WAAW;AAC1C,UAAM,IAAI;AAAA,MACR,sFAAsF,cACnF,IAAI,iBAAiB,EACrB,KAAK,IAAI;AAAA,IACd;AAAA,EACF;AACF;","names":["_a","_b","headers","threadId","action"]}
@@ -149,6 +149,12 @@ interface CopilotKitProps extends Omit<CopilotKitProviderProps, "children"> {
149
149
  * ```
150
150
  */
151
151
  onError?: CopilotErrorHandler;
152
+ /**
153
+ * Enable or disable the CopilotKit Inspector, letting you inspect AG-UI events,
154
+ * view agent messages, check agent state, and visualize agent context. Defaults
155
+ * to enabled.
156
+ */
157
+ enableInspector?: boolean;
152
158
  }
153
159
 
154
160
  export { CopilotKitProps };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/copilot-provider/copilotkit-props.tsx"],"sourcesContent":["import { ForwardedParametersInput } from \"@copilotkit/runtime-client-gql\";\nimport { ReactNode } from \"react\";\nimport { AuthState } from \"../../context/copilot-context\";\nimport { CopilotErrorHandler } from \"@copilotkit/shared\";\nimport { CopilotKitProviderProps } from \"@copilotkitnext/react\";\n/**\n * Props for CopilotKit.\n */\n\n/**\n * We shouldn't need this `Omit` here, but using it because `CopilotKitProps`\n * and `CopilotKitProviderProps` have non-identical `children` types\n *\n * TODO: Remove this `Omit` once this is resolved.\n */\nexport interface CopilotKitProps extends Omit<CopilotKitProviderProps, \"children\"> {\n /**\n * Your Copilot Cloud API key.\n *\n * Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.\n */\n publicApiKey?: string;\n\n /**\n * Your public license key for accessing premium CopilotKit features.\n *\n * Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.\n */\n publicLicenseKey?: string;\n\n /**\n * Restrict input to a specific topic.\n * @deprecated Use `guardrails_c` instead to control input restrictions\n */\n cloudRestrictToTopic?: {\n validTopics?: string[];\n invalidTopics?: string[];\n };\n\n /**\n * Restrict input to specific topics using guardrails.\n * @remarks\n *\n * This feature is only available when using CopilotKit's hosted cloud service. To use this feature, sign up at https://cloud.copilotkit.ai to get your publicApiKey. The feature allows restricting chat conversations to specific topics.\n */\n guardrails_c?: {\n validTopics?: string[];\n invalidTopics?: string[];\n };\n\n /**\n * The endpoint for the Copilot Runtime instance. [Click here for more information](/concepts/copilot-runtime).\n */\n runtimeUrl?: string;\n\n /**\n * The endpoint for the Copilot transcribe audio service.\n */\n transcribeAudioUrl?: string;\n\n /**\n * The endpoint for the Copilot text to speech service.\n */\n textToSpeechUrl?: string;\n\n /**\n * Additional headers to be sent with the request.\n *\n * For example:\n * ```json\n * {\n * \"Authorization\": \"Bearer X\"\n * }\n * ```\n */\n headers?: Record<string, string>;\n\n /**\n * The children to be rendered within the CopilotKit.\n */\n children: ReactNode;\n\n /**\n * Custom properties to be sent with the request.\n * Can include threadMetadata for thread creation and authorization for LangGraph Platform authentication.\n * For example:\n * ```js\n * {\n * 'user_id': 'users_id',\n * 'authorization': 'your-auth-token', // For LangGraph Platform authentication\n * threadMetadata: {\n * 'account_id': '123',\n * 'user_type': 'premium'\n * }\n * }\n * ```\n *\n * **Note**: The `authorization` property is automatically forwarded to LangGraph agents. See the [LangGraph Agent Authentication Guide](/coagents/shared/guides/langgraph-platform-authentication) for details.\n */\n properties?: Record<string, any>;\n\n /**\n * Indicates whether the user agent should send or receive cookies from the other domain\n * in the case of cross-origin requests.\n */\n credentials?: RequestCredentials;\n\n /**\n * Whether to show the dev console.\n *\n * Set to `true` to show error banners and toasts, `false` to hide all error UI.\n * Defaults to `false` for production safety.\n */\n showDevConsole?: boolean;\n\n /**\n * The name of the agent to use.\n */\n agent?: string;\n\n /**\n * The forwarded parameters to use for the task.\n */\n forwardedParameters?: Pick<ForwardedParametersInput, \"temperature\">;\n\n /**\n * The auth config to use for the CopilotKit.\n * @remarks\n *\n * This feature is only available when using CopilotKit's hosted cloud service. To use this feature, sign up at https://cloud.copilotkit.ai to get your publicApiKey. The feature allows restricting chat conversations to specific topics.\n */\n authConfig_c?: {\n SignInComponent: React.ComponentType<{\n onSignInComplete: (authState: AuthState) => void;\n }>;\n };\n\n /**\n * The thread id to use for the CopilotKit.\n */\n threadId?: string;\n\n /**\n * Optional error handler for comprehensive debugging and observability.\n *\n * **Requires publicApiKey**: Error handling only works when publicApiKey is provided.\n * This is a premium Copilot Cloud feature.\n *\n * @param errorEvent - Structured error event with rich debugging context\n *\n * @example\n * ```typescript\n * <CopilotKit\n * publicApiKey=\"ck_pub_your_key\"\n * onError={(errorEvent) => {\n * debugDashboard.capture(errorEvent);\n * }}\n * >\n * ```\n */\n onError?: CopilotErrorHandler;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/copilot-provider/copilotkit-props.tsx"],"sourcesContent":["import { ForwardedParametersInput } from \"@copilotkit/runtime-client-gql\";\nimport { ReactNode } from \"react\";\nimport { AuthState } from \"../../context/copilot-context\";\nimport { CopilotErrorHandler } from \"@copilotkit/shared\";\nimport { CopilotKitProviderProps } from \"@copilotkitnext/react\";\n/**\n * Props for CopilotKit.\n */\n\n/**\n * We shouldn't need this `Omit` here, but using it because `CopilotKitProps`\n * and `CopilotKitProviderProps` have non-identical `children` types\n *\n * TODO: Remove this `Omit` once this is resolved.\n */\nexport interface CopilotKitProps extends Omit<CopilotKitProviderProps, \"children\"> {\n /**\n * Your Copilot Cloud API key.\n *\n * Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.\n */\n publicApiKey?: string;\n\n /**\n * Your public license key for accessing premium CopilotKit features.\n *\n * Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.\n */\n publicLicenseKey?: string;\n\n /**\n * Restrict input to a specific topic.\n * @deprecated Use `guardrails_c` instead to control input restrictions\n */\n cloudRestrictToTopic?: {\n validTopics?: string[];\n invalidTopics?: string[];\n };\n\n /**\n * Restrict input to specific topics using guardrails.\n * @remarks\n *\n * This feature is only available when using CopilotKit's hosted cloud service. To use this feature, sign up at https://cloud.copilotkit.ai to get your publicApiKey. The feature allows restricting chat conversations to specific topics.\n */\n guardrails_c?: {\n validTopics?: string[];\n invalidTopics?: string[];\n };\n\n /**\n * The endpoint for the Copilot Runtime instance. [Click here for more information](/concepts/copilot-runtime).\n */\n runtimeUrl?: string;\n\n /**\n * The endpoint for the Copilot transcribe audio service.\n */\n transcribeAudioUrl?: string;\n\n /**\n * The endpoint for the Copilot text to speech service.\n */\n textToSpeechUrl?: string;\n\n /**\n * Additional headers to be sent with the request.\n *\n * For example:\n * ```json\n * {\n * \"Authorization\": \"Bearer X\"\n * }\n * ```\n */\n headers?: Record<string, string>;\n\n /**\n * The children to be rendered within the CopilotKit.\n */\n children: ReactNode;\n\n /**\n * Custom properties to be sent with the request.\n * Can include threadMetadata for thread creation and authorization for LangGraph Platform authentication.\n * For example:\n * ```js\n * {\n * 'user_id': 'users_id',\n * 'authorization': 'your-auth-token', // For LangGraph Platform authentication\n * threadMetadata: {\n * 'account_id': '123',\n * 'user_type': 'premium'\n * }\n * }\n * ```\n *\n * **Note**: The `authorization` property is automatically forwarded to LangGraph agents. See the [LangGraph Agent Authentication Guide](/coagents/shared/guides/langgraph-platform-authentication) for details.\n */\n properties?: Record<string, any>;\n\n /**\n * Indicates whether the user agent should send or receive cookies from the other domain\n * in the case of cross-origin requests.\n */\n credentials?: RequestCredentials;\n\n /**\n * Whether to show the dev console.\n *\n * Set to `true` to show error banners and toasts, `false` to hide all error UI.\n * Defaults to `false` for production safety.\n */\n showDevConsole?: boolean;\n\n /**\n * The name of the agent to use.\n */\n agent?: string;\n\n /**\n * The forwarded parameters to use for the task.\n */\n forwardedParameters?: Pick<ForwardedParametersInput, \"temperature\">;\n\n /**\n * The auth config to use for the CopilotKit.\n * @remarks\n *\n * This feature is only available when using CopilotKit's hosted cloud service. To use this feature, sign up at https://cloud.copilotkit.ai to get your publicApiKey. The feature allows restricting chat conversations to specific topics.\n */\n authConfig_c?: {\n SignInComponent: React.ComponentType<{\n onSignInComplete: (authState: AuthState) => void;\n }>;\n };\n\n /**\n * The thread id to use for the CopilotKit.\n */\n threadId?: string;\n\n /**\n * Optional error handler for comprehensive debugging and observability.\n *\n * **Requires publicApiKey**: Error handling only works when publicApiKey is provided.\n * This is a premium Copilot Cloud feature.\n *\n * @param errorEvent - Structured error event with rich debugging context\n *\n * @example\n * ```typescript\n * <CopilotKit\n * publicApiKey=\"ck_pub_your_key\"\n * onError={(errorEvent) => {\n * debugDashboard.capture(errorEvent);\n * }}\n * >\n * ```\n */\n onError?: CopilotErrorHandler;\n\n /**\n * Enable or disable the CopilotKit Inspector, letting you inspect AG-UI events,\n * view agent messages, check agent state, and visualize agent context. Defaults\n * to enabled.\n */\n enableInspector?: boolean;\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAAA;AAAA;","names":[]}