@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.
Files changed (114) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{chunk-ADZDXHVC.mjs → chunk-2GRWTU7W.mjs} +4 -4
  3. package/dist/chunk-3BASANUO.mjs +170 -0
  4. package/dist/chunk-3BASANUO.mjs.map +1 -0
  5. package/dist/{chunk-LVWV62JZ.mjs → chunk-5P46WS5M.mjs} +32 -26
  6. package/dist/chunk-5P46WS5M.mjs.map +1 -0
  7. package/dist/{chunk-OKRZF3DD.mjs → chunk-6ZLPNY7X.mjs} +2 -2
  8. package/dist/{chunk-OKRZF3DD.mjs.map → chunk-6ZLPNY7X.mjs.map} +1 -1
  9. package/dist/{chunk-COEUPDRL.mjs → chunk-BEFEBKKI.mjs} +8 -8
  10. package/dist/{chunk-QGE7U4NV.mjs → chunk-F26O2HTO.mjs} +3 -3
  11. package/dist/chunk-F26O2HTO.mjs.map +1 -0
  12. package/dist/{chunk-DLEXVOQE.mjs → chunk-GEKWHETN.mjs} +4 -4
  13. package/dist/{chunk-L6HQIJ74.mjs → chunk-JY3STRON.mjs} +8 -8
  14. package/dist/{chunk-JJDXTTEN.mjs → chunk-K4HXT453.mjs} +2 -2
  15. package/dist/{chunk-JBLMXZ3O.mjs → chunk-KH27ZS4Y.mjs} +6 -6
  16. package/dist/{chunk-TWYUYC4F.mjs → chunk-MUDXTKXE.mjs} +6 -6
  17. package/dist/{chunk-Q42NJFXR.mjs → chunk-N4VN2B5S.mjs} +5 -5
  18. package/dist/{chunk-2TSNHEIS.mjs → chunk-NTH42BY5.mjs} +5 -5
  19. package/dist/{chunk-X2DNXTME.mjs → chunk-OPRDTF4S.mjs} +4 -4
  20. package/dist/chunk-PIF5KJYI.mjs +103 -0
  21. package/dist/chunk-PIF5KJYI.mjs.map +1 -0
  22. package/dist/chunk-WSXTUD36.mjs +759 -0
  23. package/dist/chunk-WSXTUD36.mjs.map +1 -0
  24. package/dist/{chunk-IHAZJF3V.mjs → chunk-YIBUNEBN.mjs} +2 -2
  25. package/dist/chunk-YIBUNEBN.mjs.map +1 -0
  26. package/dist/components/copilot-provider/copilot-messages.mjs +3 -3
  27. package/dist/components/copilot-provider/copilotkit-props.d.ts +9 -1
  28. package/dist/components/copilot-provider/copilotkit-props.js.map +1 -1
  29. package/dist/components/copilot-provider/copilotkit.js +1047 -71
  30. package/dist/components/copilot-provider/copilotkit.js.map +1 -1
  31. package/dist/components/copilot-provider/copilotkit.mjs +11 -8
  32. package/dist/components/copilot-provider/index.js +1047 -71
  33. package/dist/components/copilot-provider/index.js.map +1 -1
  34. package/dist/components/copilot-provider/index.mjs +11 -8
  35. package/dist/components/dev-console/console-trigger.d.ts +8 -0
  36. package/dist/components/dev-console/console-trigger.js +1131 -0
  37. package/dist/components/dev-console/console-trigger.js.map +1 -0
  38. package/dist/components/dev-console/console-trigger.mjs +13 -0
  39. package/dist/components/dev-console/console-trigger.mjs.map +1 -0
  40. package/dist/components/dev-console/developer-console-modal.d.ts +10 -0
  41. package/dist/components/dev-console/developer-console-modal.js +977 -0
  42. package/dist/components/dev-console/developer-console-modal.js.map +1 -0
  43. package/dist/components/dev-console/developer-console-modal.mjs +12 -0
  44. package/dist/components/dev-console/developer-console-modal.mjs.map +1 -0
  45. package/dist/components/dev-console/icons.d.ts +9 -0
  46. package/dist/components/dev-console/icons.js +131 -0
  47. package/dist/components/dev-console/icons.js.map +1 -0
  48. package/dist/components/dev-console/icons.mjs +16 -0
  49. package/dist/components/dev-console/icons.mjs.map +1 -0
  50. package/dist/components/error-boundary/error-boundary.js +1 -1
  51. package/dist/components/error-boundary/error-boundary.js.map +1 -1
  52. package/dist/components/error-boundary/error-boundary.mjs +2 -2
  53. package/dist/components/index.js +1047 -71
  54. package/dist/components/index.js.map +1 -1
  55. package/dist/components/index.mjs +11 -8
  56. package/dist/components/usage-banner.js +1 -1
  57. package/dist/components/usage-banner.js.map +1 -1
  58. package/dist/components/usage-banner.mjs +1 -1
  59. package/dist/context/index.mjs +4 -4
  60. package/dist/hooks/index.js +1 -1
  61. package/dist/hooks/index.js.map +1 -1
  62. package/dist/hooks/index.mjs +32 -29
  63. package/dist/hooks/use-chat.mjs +4 -4
  64. package/dist/hooks/use-coagent-state-render.mjs +2 -2
  65. package/dist/hooks/use-coagent.js.map +1 -1
  66. package/dist/hooks/use-coagent.mjs +16 -13
  67. package/dist/hooks/use-copilot-action.mjs +2 -2
  68. package/dist/hooks/use-copilot-authenticated-action.mjs +3 -3
  69. package/dist/hooks/use-copilot-chat-headless_c.js +1 -1
  70. package/dist/hooks/use-copilot-chat-headless_c.js.map +1 -1
  71. package/dist/hooks/use-copilot-chat-headless_c.mjs +16 -13
  72. package/dist/hooks/use-copilot-chat.d.ts +42 -3
  73. package/dist/hooks/use-copilot-chat.js.map +1 -1
  74. package/dist/hooks/use-copilot-chat.mjs +16 -13
  75. package/dist/hooks/use-copilot-chat_internal.js.map +1 -1
  76. package/dist/hooks/use-copilot-chat_internal.mjs +15 -12
  77. package/dist/hooks/use-langgraph-interrupt-render.mjs +1 -1
  78. package/dist/hooks/use-langgraph-interrupt.js.map +1 -1
  79. package/dist/hooks/use-langgraph-interrupt.mjs +16 -13
  80. package/dist/index.js +1145 -178
  81. package/dist/index.js.map +1 -1
  82. package/dist/index.mjs +36 -33
  83. package/dist/lib/copilot-task.js.map +1 -1
  84. package/dist/lib/copilot-task.mjs +13 -10
  85. package/dist/lib/index.js.map +1 -1
  86. package/dist/lib/index.mjs +13 -10
  87. package/dist/utils/extract.js.map +1 -1
  88. package/dist/utils/extract.mjs +11 -8
  89. package/dist/utils/index.js.map +1 -1
  90. package/dist/utils/index.mjs +11 -8
  91. package/dist/utils/suggestions.js.map +1 -1
  92. package/dist/utils/suggestions.mjs +11 -8
  93. package/package.json +3 -3
  94. package/src/components/copilot-provider/copilotkit-props.tsx +10 -1
  95. package/src/components/copilot-provider/copilotkit.tsx +25 -16
  96. package/src/components/dev-console/console-trigger.tsx +190 -0
  97. package/src/components/dev-console/developer-console-modal.tsx +866 -0
  98. package/src/components/dev-console/icons.tsx +101 -0
  99. package/src/components/usage-banner.tsx +1 -1
  100. package/src/hooks/use-copilot-chat-headless_c.ts +79 -9
  101. package/src/hooks/use-copilot-chat.ts +42 -3
  102. package/dist/chunk-IHAZJF3V.mjs.map +0 -1
  103. package/dist/chunk-LVWV62JZ.mjs.map +0 -1
  104. package/dist/chunk-QGE7U4NV.mjs.map +0 -1
  105. /package/dist/{chunk-ADZDXHVC.mjs.map → chunk-2GRWTU7W.mjs.map} +0 -0
  106. /package/dist/{chunk-COEUPDRL.mjs.map → chunk-BEFEBKKI.mjs.map} +0 -0
  107. /package/dist/{chunk-DLEXVOQE.mjs.map → chunk-GEKWHETN.mjs.map} +0 -0
  108. /package/dist/{chunk-L6HQIJ74.mjs.map → chunk-JY3STRON.mjs.map} +0 -0
  109. /package/dist/{chunk-JJDXTTEN.mjs.map → chunk-K4HXT453.mjs.map} +0 -0
  110. /package/dist/{chunk-JBLMXZ3O.mjs.map → chunk-KH27ZS4Y.mjs.map} +0 -0
  111. /package/dist/{chunk-TWYUYC4F.mjs.map → chunk-MUDXTKXE.mjs.map} +0 -0
  112. /package/dist/{chunk-Q42NJFXR.mjs.map → chunk-N4VN2B5S.mjs.map} +0 -0
  113. /package/dist/{chunk-2TSNHEIS.mjs.map → chunk-NTH42BY5.mjs.map} +0 -0
  114. /package/dist/{chunk-X2DNXTME.mjs.map → chunk-OPRDTF4S.mjs.map} +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/dev-console/developer-console-modal.tsx"],"sourcesContent":["\"use client\";\n\nimport { useCopilotContext } from \"../../context/copilot-context\";\nimport { useCopilotMessagesContext } from \"../../context/copilot-messages-context\";\nimport { COPILOTKIT_VERSION } from \"@copilotkit/shared\";\nimport { useEffect, useState } from \"react\";\nimport { CheckIcon, CopilotKitIcon, ExclamationMarkTriangleIcon } from \"./icons\";\n\n// Type definitions for the developer console\ninterface ActionParameter {\n name: string;\n required?: boolean;\n type?: string;\n}\n\ninterface Action {\n name: string;\n description?: string;\n parameters?: ActionParameter[];\n status?: string;\n}\n\ninterface Readable {\n name?: string;\n description?: string;\n value?: any;\n content?: string;\n metadata?: Record<string, any>;\n}\n\ninterface AgentState {\n status?: string;\n state?: any;\n running?: boolean;\n lastUpdate?: number;\n}\n\ninterface Message {\n id?: string;\n role?: \"user\" | \"assistant\" | \"system\";\n content?: string;\n timestamp?: number;\n [key: string]: any; // Allow additional properties from CopilotKit\n}\n\ninterface Document {\n name?: string;\n content?: string;\n metadata?: Record<string, any>;\n}\n\ninterface DisplayContext {\n actions: Record<string, Action>;\n getAllContext: () => Readable[];\n coagentStates: Record<string, AgentState>;\n getDocumentsContext: (args?: any[]) => Document[];\n}\n\ninterface MessagesContext {\n messages: Message[];\n}\n\ninterface DeveloperConsoleModalProps {\n isOpen: boolean;\n onClose: () => void;\n hasApiKey: boolean;\n}\n\nexport function DeveloperConsoleModal({ isOpen, onClose, hasApiKey }: DeveloperConsoleModalProps) {\n const context = useCopilotContext();\n const messagesContext = useCopilotMessagesContext();\n const [activeTab, setActiveTab] = useState(\"actions\");\n\n // Handle escape key\n useEffect(() => {\n const handleEscape = (e: KeyboardEvent) => {\n if (e.key === \"Escape\") {\n onClose();\n }\n };\n\n if (isOpen) {\n document.addEventListener(\"keydown\", handleEscape);\n document.body.style.overflow = \"hidden\";\n }\n\n return () => {\n document.removeEventListener(\"keydown\", handleEscape);\n document.body.style.overflow = \"unset\";\n };\n }, [isOpen, onClose]);\n\n if (!isOpen) return null;\n\n // Create mock data for preview when no API key\n const displayContext: DisplayContext = hasApiKey\n ? (context as DisplayContext)\n : {\n actions: {\n search_web: { name: \"search_web\", description: \"Search the web for information\" },\n send_email: { name: \"send_email\", description: \"Send an email to a contact\" },\n create_document: { name: \"create_document\", description: \"Create a new document\" },\n analyze_code: {\n name: \"analyze_code\",\n description: \"Analyze code for issues and improvements\",\n },\n generate_tests: {\n name: \"generate_tests\",\n description: \"Generate unit tests for functions\",\n },\n },\n getAllContext: () => [\n {\n content: \"User preferences: dark mode enabled, TypeScript preferred\",\n metadata: { source: \"settings\" },\n },\n {\n content: \"Current project: Building a React application with CopilotKit\",\n metadata: { source: \"project\" },\n },\n {\n content: \"Recent activity: Implemented authentication system\",\n metadata: { source: \"activity\" },\n },\n {\n content: \"Development environment: VS Code, Node.js 18, React 18\",\n metadata: { source: \"environment\" },\n },\n ],\n coagentStates: {\n \"main-agent\": { status: \"active\", lastUpdate: Date.now() },\n \"code-assistant\": { status: \"active\", lastUpdate: Date.now() - 15000 },\n \"search-agent\": { status: \"idle\", lastUpdate: Date.now() - 60000 },\n },\n getDocumentsContext: () => [\n {\n content: \"README.md: Project setup and installation instructions\",\n metadata: { type: \"documentation\" },\n },\n {\n content: \"API Documentation: CopilotKit integration guide\",\n metadata: { type: \"documentation\" },\n },\n {\n content: \"package.json: Project dependencies and scripts\",\n metadata: { type: \"configuration\" },\n },\n ],\n };\n\n const displayMessagesContext: MessagesContext = hasApiKey\n ? (messagesContext as MessagesContext)\n : {\n messages: [\n {\n id: \"1\",\n role: \"user\",\n content: \"Help me implement a todo list with drag and drop functionality\",\n },\n {\n id: \"2\",\n role: \"assistant\",\n content:\n \"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.\",\n },\n { id: \"3\", role: \"user\", content: \"Can you also add priority levels and due dates?\" },\n {\n id: \"4\",\n role: \"assistant\",\n content:\n \"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.\",\n },\n { id: \"5\", role: \"user\", content: \"Perfect! How about adding categories or tags?\" },\n ],\n };\n\n return (\n <div\n style={{\n position: \"fixed\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n zIndex: 9999,\n backgroundColor: \"rgba(0, 0, 0, 0.3)\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n padding: \"16px\",\n }}\n onClick={onClose}\n >\n <div\n style={{\n width: \"1152px\",\n maxWidth: \"95vw\",\n height: \"80vh\",\n backgroundColor: \"white\",\n borderRadius: \"12px\",\n boxShadow: \"0 25px 50px -12px rgba(0, 0, 0, 0.25)\",\n display: \"flex\",\n flexDirection: \"column\",\n overflow: \"hidden\",\n position: \"relative\",\n }}\n onClick={(e) => e.stopPropagation()}\n >\n {/* Header */}\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n padding: \"24px\",\n borderBottom: \"1px solid #e5e7eb\",\n minHeight: \"73px\",\n flexShrink: 0,\n filter: !hasApiKey ? \"blur(0.3px)\" : \"none\",\n opacity: !hasApiKey ? 0.95 : 1,\n }}\n >\n <div style={{ display: \"flex\", alignItems: \"center\", gap: \"12px\" }}>\n <CopilotKitIcon />\n <h1\n style={{\n fontWeight: \"bold\",\n fontSize: \"20px\",\n color: \"#1f2937\",\n margin: 0,\n }}\n >\n Developer Console\n </h1>\n <span\n style={{\n fontSize: \"14px\",\n color: \"#6b7280\",\n backgroundColor: \"#f3f4f6\",\n padding: \"4px 8px\",\n borderRadius: \"4px\",\n }}\n >\n v{COPILOTKIT_VERSION}\n </span>\n </div>\n <button\n onClick={onClose}\n style={{\n color: \"#9ca3af\",\n fontSize: \"24px\",\n fontWeight: \"300\",\n border: \"none\",\n background: \"none\",\n cursor: \"pointer\",\n padding: \"4px\",\n }}\n onMouseEnter={(e) => (e.currentTarget.style.color = \"#4b5563\")}\n onMouseLeave={(e) => (e.currentTarget.style.color = \"#9ca3af\")}\n >\n ×\n </button>\n </div>\n\n {/* Tab Navigation */}\n <div\n style={{\n display: \"flex\",\n borderBottom: \"1px solid #e5e7eb\",\n backgroundColor: \"#f9fafb\",\n minHeight: \"50px\",\n flexShrink: 0,\n filter: !hasApiKey ? \"blur(0.3px)\" : \"none\",\n opacity: !hasApiKey ? 0.9 : 1,\n }}\n >\n {[\n { id: \"actions\", label: \"Actions\", count: Object.keys(displayContext.actions).length },\n { id: \"readables\", label: \"Readables\", count: displayContext.getAllContext().length },\n {\n id: \"agent\",\n label: \"Agent Status\",\n count: Object.keys(displayContext.coagentStates).length,\n },\n { id: \"messages\", label: \"Messages\", count: displayMessagesContext.messages.length },\n {\n id: \"context\",\n label: \"Context\",\n count: displayContext.getDocumentsContext([]).length,\n },\n ].map((tab) => (\n <button\n key={tab.id}\n onClick={() => setActiveTab(tab.id)}\n style={{\n padding: \"12px 24px\",\n fontSize: \"14px\",\n fontWeight: \"500\",\n border: \"none\",\n cursor: \"pointer\",\n backgroundColor: activeTab === tab.id ? \"white\" : \"transparent\",\n color: activeTab === tab.id ? \"#2563eb\" : \"#6b7280\",\n borderBottom: activeTab === tab.id ? \"2px solid #2563eb\" : \"none\",\n transition: \"all 0.2s\",\n }}\n onMouseEnter={(e) => {\n if (activeTab !== tab.id) {\n e.currentTarget.style.color = \"#1f2937\";\n e.currentTarget.style.backgroundColor = \"#f3f4f6\";\n }\n }}\n onMouseLeave={(e) => {\n if (activeTab !== tab.id) {\n e.currentTarget.style.color = \"#6b7280\";\n e.currentTarget.style.backgroundColor = \"transparent\";\n }\n }}\n >\n {tab.label}\n {tab.count > 0 && (\n <span\n style={{\n marginLeft: \"8px\",\n backgroundColor: \"#e5e7eb\",\n color: \"#374151\",\n padding: \"2px 8px\",\n borderRadius: \"9999px\",\n fontSize: \"12px\",\n }}\n >\n {tab.count}\n </span>\n )}\n </button>\n ))}\n </div>\n\n {/* Content */}\n <div\n style={{\n height: \"calc(100% - 142px)\",\n overflow: \"auto\",\n padding: \"24px\",\n backgroundColor: \"#f9fafb\",\n filter: !hasApiKey ? \"blur(0.3px)\" : \"none\",\n opacity: !hasApiKey ? 0.85 : 1,\n }}\n >\n {activeTab === \"actions\" && <ActionsTab context={displayContext} />}\n {activeTab === \"readables\" && <ReadablesTab context={displayContext} />}\n {activeTab === \"agent\" && <AgentStatusTab context={displayContext} />}\n {activeTab === \"messages\" && <MessagesTab messagesContext={displayMessagesContext} />}\n {activeTab === \"context\" && <ContextTab context={displayContext} />}\n </div>\n\n {/* Footer */}\n <div\n style={{\n padding: \"16px 24px\",\n borderTop: \"1px solid #e5e7eb\",\n backgroundColor: \"white\",\n display: \"flex\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n minHeight: \"57px\",\n flexShrink: 0,\n filter: !hasApiKey ? \"blur(0.3px)\" : \"none\",\n opacity: !hasApiKey ? 0.9 : 1,\n }}\n >\n <div style={{ fontSize: \"14px\", color: \"#6b7280\" }}>\n <a\n href=\"https://github.com/CopilotKit/CopilotKit/issues\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n style={{ color: \"#2563eb\", textDecoration: \"none\" }}\n onMouseEnter={(e) => (e.currentTarget.style.textDecoration = \"underline\")}\n onMouseLeave={(e) => (e.currentTarget.style.textDecoration = \"none\")}\n >\n Report an issue\n </a>\n </div>\n <div style={{ fontSize: \"14px\", color: \"#6b7280\" }}>\n <a\n href=\"https://mcp.copilotkit.ai/\"\n target=\"_blank\"\n rel=\"noopener noreferrer\"\n style={{ color: \"#2563eb\", textDecoration: \"none\" }}\n onMouseEnter={(e) => (e.currentTarget.style.textDecoration = \"underline\")}\n onMouseLeave={(e) => (e.currentTarget.style.textDecoration = \"none\")}\n >\n Add MCP Server →\n </a>\n </div>\n </div>\n\n {/* Enhanced CTA Overlay */}\n {!hasApiKey && (\n <div\n style={{\n position: \"absolute\",\n top: 0,\n left: 0,\n right: 0,\n bottom: 0,\n backgroundColor: \"rgba(255, 255, 255, 0.2)\",\n backdropFilter: \"blur(2px)\",\n WebkitBackdropFilter: \"blur(2px)\",\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"center\",\n borderRadius: \"12px\",\n zIndex: 10,\n }}\n onClick={(e) => e.stopPropagation()}\n >\n <button\n onClick={() => window.open(\"https://cloud.copilotkit.ai/sign-in\", \"_blank\")}\n style={{\n // Following button system specifications\n height: \"48px\",\n padding: \"12px 24px\",\n backgroundColor: \"#030507\", // textPrimary token\n color: \"#FFFFFF\",\n borderRadius: \"12px\", // Medium radius token\n border: \"none\",\n cursor: \"pointer\",\n fontSize: \"14px\", // Medium Semi Bold typography\n fontWeight: \"600\",\n fontFamily: \"'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif\",\n lineHeight: \"22px\",\n boxShadow: \"0 4px 16px rgba(3, 5, 7, 0.2), 0 1px 3px rgba(3, 5, 7, 0.1)\",\n transition: \"all 200ms ease\", // 200ms ease as per specs\n display: \"inline-flex\",\n alignItems: \"center\",\n gap: \"8px\",\n textTransform: \"uppercase\",\n letterSpacing: \"0.5px\",\n }}\n onMouseEnter={(e) => {\n e.currentTarget.style.backgroundColor = \"#575758\"; // textSecondary token for hover\n e.currentTarget.style.transform = \"translateY(-1px)\";\n e.currentTarget.style.boxShadow =\n \"0 6px 20px rgba(3, 5, 7, 0.25), 0 2px 4px rgba(3, 5, 7, 0.15)\";\n }}\n onMouseLeave={(e) => {\n e.currentTarget.style.backgroundColor = \"#030507\";\n e.currentTarget.style.transform = \"translateY(0)\";\n e.currentTarget.style.boxShadow =\n \"0 4px 16px rgba(3, 5, 7, 0.2), 0 1px 3px rgba(3, 5, 7, 0.1)\";\n }}\n onMouseDown={(e) => {\n e.currentTarget.style.backgroundColor = \"#858589\"; // textDisabled token for pressed\n e.currentTarget.style.transform = \"translateY(0)\";\n }}\n onMouseUp={(e) => {\n e.currentTarget.style.backgroundColor = \"#575758\";\n e.currentTarget.style.transform = \"translateY(-1px)\";\n }}\n onFocus={(e) => {\n e.currentTarget.style.outline = \"2px solid #BEC9FF\";\n e.currentTarget.style.outlineOffset = \"2px\";\n }}\n onBlur={(e) => {\n e.currentTarget.style.outline = \"none\";\n }}\n >\n Get API Key\n <span style={{ fontSize: \"16px\", marginLeft: \"-4px\" }}>→</span>\n </button>\n </div>\n )}\n </div>\n </div>\n );\n}\n\n// Tab Components\nfunction ActionsTab({ context }: { context: DisplayContext }) {\n const actions = Object.values(context.actions);\n\n if (actions.length === 0) {\n return (\n <div style={{ textAlign: \"center\", padding: \"48px 0\", color: \"#6b7280\" }}>\n <p style={{ fontSize: \"18px\", margin: \"0 0 8px 0\" }}>No actions available</p>\n <p style={{ fontSize: \"14px\", margin: 0 }}>Actions will appear here when registered</p>\n </div>\n );\n }\n\n return (\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: \"16px\" }}>\n {actions.map((action: Action, index: number) => (\n <div\n key={index}\n style={{\n backgroundColor: \"white\",\n padding: \"16px\",\n borderRadius: \"8px\",\n boxShadow: \"0 1px 3px 0 rgba(0, 0, 0, 0.1)\",\n border: \"1px solid #e5e7eb\",\n }}\n >\n <div\n style={{ display: \"flex\", alignItems: \"flex-start\", justifyContent: \"space-between\" }}\n >\n <div style={{ flex: 1 }}>\n <h3 style={{ fontWeight: \"600\", color: \"#1f2937\", margin: \"0 0 4px 0\" }}>\n {action.name}\n </h3>\n {action.description && (\n <p style={{ fontSize: \"14px\", color: \"#4b5563\", margin: \"0 0 12px 0\" }}>\n {action.description}\n </p>\n )}\n {action.parameters && action.parameters.length > 0 && (\n <div style={{ marginTop: \"12px\" }}>\n <p\n style={{\n fontSize: \"12px\",\n fontWeight: \"500\",\n color: \"#6b7280\",\n textTransform: \"uppercase\",\n margin: \"0 0 4px 0\",\n }}\n >\n Parameters:\n </p>\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: \"4px\" }}>\n {action.parameters.map((param: ActionParameter, pIndex: number) => (\n <div key={pIndex} style={{ fontSize: \"14px\" }}>\n <span style={{ fontFamily: \"monospace\", color: \"#374151\" }}>\n {param.name}\n </span>\n {param.required && (\n <span style={{ marginLeft: \"4px\", fontSize: \"12px\", color: \"#ef4444\" }}>\n *required\n </span>\n )}\n {param.type && (\n <span style={{ marginLeft: \"8px\", fontSize: \"12px\", color: \"#6b7280\" }}>\n ({param.type})\n </span>\n )}\n </div>\n ))}\n </div>\n </div>\n )}\n </div>\n <div style={{ marginLeft: \"16px\" }}>\n {action.status === \"available\" ? <CheckIcon /> : <ExclamationMarkTriangleIcon />}\n </div>\n </div>\n </div>\n ))}\n </div>\n );\n}\n\nfunction ReadablesTab({ context }: { context: DisplayContext }) {\n const readables = context.getAllContext();\n\n if (readables.length === 0) {\n return (\n <div style={{ textAlign: \"center\", padding: \"48px 0\", color: \"#6b7280\" }}>\n <p style={{ fontSize: \"18px\", margin: \"0 0 8px 0\" }}>No readable context available</p>\n <p style={{ fontSize: \"14px\", margin: 0 }}>\n Readable context will appear here when provided\n </p>\n </div>\n );\n }\n\n return (\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: \"16px\" }}>\n {readables.map((readable: Readable, index: number) => (\n <div\n key={index}\n style={{\n backgroundColor: \"white\",\n padding: \"16px\",\n borderRadius: \"8px\",\n boxShadow: \"0 1px 3px 0 rgba(0, 0, 0, 0.1)\",\n border: \"1px solid #e5e7eb\",\n }}\n >\n <div\n style={{ display: \"flex\", alignItems: \"flex-start\", justifyContent: \"space-between\" }}\n >\n <div style={{ flex: 1 }}>\n <h3 style={{ fontWeight: \"600\", color: \"#1f2937\", margin: \"0 0 4px 0\" }}>\n {readable.name || `Readable ${index + 1}`}\n </h3>\n {readable.description && (\n <p style={{ fontSize: \"14px\", color: \"#4b5563\", margin: \"0 0 12px 0\" }}>\n {readable.description}\n </p>\n )}\n {readable.value && (\n <pre\n style={{\n marginTop: \"12px\",\n padding: \"8px\",\n backgroundColor: \"#f9fafb\",\n borderRadius: \"4px\",\n fontSize: \"12px\",\n overflowX: \"auto\",\n margin: \"12px 0 0 0\",\n }}\n >\n {JSON.stringify(readable.value, null, 2)}\n </pre>\n )}\n </div>\n </div>\n </div>\n ))}\n </div>\n );\n}\n\nfunction AgentStatusTab({ context }: { context: DisplayContext }) {\n const agentStates = context.coagentStates || {};\n const agentStateEntries = Object.entries(agentStates);\n\n if (agentStateEntries.length === 0) {\n return (\n <div style={{ textAlign: \"center\", padding: \"48px 0\", color: \"#6b7280\" }}>\n <p style={{ fontSize: \"18px\", margin: \"0 0 8px 0\" }}>No agent states available</p>\n <p style={{ fontSize: \"14px\", margin: 0 }}>\n Agent states will appear here when agents are active\n </p>\n </div>\n );\n }\n\n return (\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: \"24px\" }}>\n {agentStateEntries.map(([agentName, state]: [string, AgentState]) => (\n <div\n key={agentName}\n style={{\n backgroundColor: \"white\",\n padding: \"24px\",\n borderRadius: \"8px\",\n boxShadow: \"0 1px 3px 0 rgba(0, 0, 0, 0.1)\",\n border: \"1px solid #e5e7eb\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"center\",\n justifyContent: \"space-between\",\n marginBottom: \"16px\",\n }}\n >\n <h3 style={{ fontWeight: \"600\", fontSize: \"18px\", color: \"#1f2937\", margin: 0 }}>\n {agentName}\n </h3>\n <span\n style={{\n padding: \"4px 12px\",\n borderRadius: \"9999px\",\n fontSize: \"12px\",\n fontWeight: \"500\",\n backgroundColor:\n state.status === \"running\"\n ? \"#dcfce7\"\n : state.status === \"complete\"\n ? \"#dbeafe\"\n : \"#f3f4f6\",\n color:\n state.status === \"running\"\n ? \"#166534\"\n : state.status === \"complete\"\n ? \"#1e40af\"\n : \"#1f2937\",\n }}\n >\n {state.status || \"idle\"}\n </span>\n </div>\n\n {state.state && (\n <div style={{ marginBottom: \"12px\" }}>\n <p\n style={{\n fontSize: \"12px\",\n fontWeight: \"500\",\n color: \"#6b7280\",\n textTransform: \"uppercase\",\n margin: \"0 0 4px 0\",\n }}\n >\n Current State:\n </p>\n <pre\n style={{\n padding: \"12px\",\n backgroundColor: \"#f9fafb\",\n borderRadius: \"4px\",\n fontSize: \"12px\",\n overflowX: \"auto\",\n margin: 0,\n }}\n >\n {JSON.stringify(state.state, null, 2)}\n </pre>\n </div>\n )}\n\n {state.running && (\n <div\n style={{\n marginTop: \"16px\",\n display: \"flex\",\n alignItems: \"center\",\n fontSize: \"14px\",\n color: \"#4b5563\",\n }}\n >\n <div style={{ marginRight: \"8px\" }}>\n <svg\n width=\"16\"\n height=\"16\"\n viewBox=\"0 0 16 16\"\n style={{ animation: \"spin 1s linear infinite\" }}\n >\n <style>{`@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }`}</style>\n <circle\n cx=\"8\"\n cy=\"8\"\n r=\"6\"\n fill=\"none\"\n stroke=\"#4b5563\"\n strokeWidth=\"2\"\n strokeDasharray=\"9 3\"\n />\n </svg>\n </div>\n <span>Agent is currently running...</span>\n </div>\n )}\n </div>\n ))}\n </div>\n );\n}\n\nfunction MessagesTab({ messagesContext }: { messagesContext: MessagesContext }) {\n const messages = messagesContext.messages || [];\n\n if (messages.length === 0) {\n return (\n <div style={{ textAlign: \"center\", padding: \"48px 0\", color: \"#6b7280\" }}>\n <p style={{ fontSize: \"18px\", margin: \"0 0 8px 0\" }}>No messages yet</p>\n <p style={{ fontSize: \"14px\", margin: 0 }}>\n Messages will appear here as the conversation progresses\n </p>\n </div>\n );\n }\n\n return (\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: \"16px\" }}>\n {messages.map((message: Message, index: number) => (\n <div\n key={index}\n style={{\n padding: \"16px\",\n borderRadius: \"8px\",\n backgroundColor:\n message.role === \"user\"\n ? \"#eff6ff\"\n : message.role === \"assistant\"\n ? \"#f9fafb\"\n : \"#fefce8\",\n border: `1px solid ${message.role === \"user\" ? \"#c7d2fe\" : message.role === \"assistant\" ? \"#e5e7eb\" : \"#fde047\"}`,\n marginLeft: message.role === \"user\" ? \"48px\" : \"0\",\n marginRight: message.role === \"assistant\" ? \"48px\" : \"0\",\n }}\n >\n <div\n style={{\n display: \"flex\",\n alignItems: \"flex-start\",\n justifyContent: \"space-between\",\n marginBottom: \"8px\",\n }}\n >\n <span\n style={{\n fontWeight: \"500\",\n fontSize: \"14px\",\n color: \"#374151\",\n textTransform: \"capitalize\",\n }}\n >\n {message.role || \"system\"}\n </span>\n {message.timestamp && (\n <span style={{ fontSize: \"12px\", color: \"#6b7280\" }}>\n {new Date(message.timestamp).toLocaleTimeString()}\n </span>\n )}\n </div>\n <div style={{ fontSize: \"14px\", color: \"#1f2937\", whiteSpace: \"pre-wrap\" }}>\n {message.content || \"\"}\n </div>\n </div>\n ))}\n </div>\n );\n}\n\nfunction ContextTab({ context }: { context: DisplayContext }) {\n const documents = context.getDocumentsContext([]);\n\n if (documents.length === 0) {\n return (\n <div style={{ textAlign: \"center\", padding: \"48px 0\", color: \"#6b7280\" }}>\n <p style={{ fontSize: \"18px\", margin: \"0 0 8px 0\" }}>No document context available</p>\n <p style={{ fontSize: \"14px\", margin: 0 }}>\n Document context will appear here when provided\n </p>\n </div>\n );\n }\n\n return (\n <div style={{ display: \"flex\", flexDirection: \"column\", gap: \"16px\" }}>\n {documents.map((doc: Document, index: number) => (\n <div\n key={index}\n style={{\n backgroundColor: \"white\",\n padding: \"16px\",\n borderRadius: \"8px\",\n boxShadow: \"0 1px 3px 0 rgba(0, 0, 0, 0.1)\",\n border: \"1px solid #e5e7eb\",\n }}\n >\n <h3 style={{ fontWeight: \"600\", color: \"#1f2937\", margin: \"0 0 8px 0\" }}>\n {doc.name || `Document ${index + 1}`}\n </h3>\n {doc.content && (\n <pre\n style={{\n padding: \"12px\",\n backgroundColor: \"#f9fafb\",\n borderRadius: \"4px\",\n fontSize: \"12px\",\n overflowX: \"auto\",\n margin: 0,\n }}\n >\n {doc.content}\n </pre>\n )}\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAIA,SAAS,0BAA0B;AACnC,SAAS,WAAW,gBAAgB;AA0NxB,cAWA,YAXA;AA3JL,SAAS,sBAAsB,EAAE,QAAQ,SAAS,UAAU,GAA+B;AAChG,QAAM,UAAU,kBAAkB;AAClC,QAAM,kBAAkB,0BAA0B;AAClD,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,SAAS;AAGpD,YAAU,MAAM;AACd,UAAM,eAAe,CAAC,MAAqB;AACzC,UAAI,EAAE,QAAQ,UAAU;AACtB,gBAAQ;AAAA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AEJ;AAEA,SACE,oBAAC,SAAI,OAAO,EAAE,SAAS,QAAQ,eAAe,UAAU,KAAK,OAAO,GACjE,oBAAU,IAAI,CAAC,KAAe,UAC7B;AAAA,IAAC;AAAA;AAAA,MAEC,OAAO;AAAA,QACL,iBAAiB;AAAA,QACjB,SAAS;AAAA,QACT,cAAc;AAAA,QACd,WAAW;AAAA,QACX,QAAQ;AAAA,MACV;AAAA,MAEA;AAAA,4BAAC,QAAG,OAAO,EAAE,YAAY,OAAO,OAAO,WAAW,QAAQ,YAAY,GACnE,cAAI,QAAQ,YAAY,QAAQ,KACnC;AAAA,QACC,IAAI,WACH;AAAA,UAAC;AAAA;AAAA,YACC,OAAO;AAAA,cACL,SAAS;AAAA,cACT,iBAAiB;AAAA,cACjB,cAAc;AAAA,cACd,UAAU;AAAA,cACV,WAAW;AAAA,cACX,QAAQ;AAAA,YACV;AAAA,YAEC,cAAI;AAAA;AAAA,QACP;AAAA;AAAA;AAAA,IAxBG;AAAA,EA0BP,CACD,GACH;AAEJ;","names":[]}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useCopilotChat
3
- } from "./chunk-L6HQIJ74.mjs";
3
+ } from "./chunk-JY3STRON.mjs";
4
4
 
5
5
  // src/hooks/use-copilot-chat.ts
6
6
  function useCopilotChat2(options = {}) {
@@ -31,4 +31,4 @@ function useCopilotChat2(options = {}) {
31
31
  export {
32
32
  useCopilotChat2 as useCopilotChat
33
33
  };
34
- //# sourceMappingURL=chunk-IHAZJF3V.mjs.map
34
+ //# sourceMappingURL=chunk-YIBUNEBN.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/hooks/use-copilot-chat.ts"],"sourcesContent":["/**\n * `useCopilotChat` is a lightweight React hook for headless chat interactions.\n * Perfect for controlling the prebuilt chat components programmatically.\n *\n * **Open Source Friendly** - Works without requiring a free public license key.\n *\n * <Callout title=\"Looking for fully headless UI?\">\n * Get started with [useCopilotChatHeadless_c](https://docs.copilotkit.ai/reference/hooks/useCopilotChatHeadless_c).\n * </Callout>\n *\n * ## Use Cases\n *\n * - **Programmatic Messaging**: Send messages without displaying chat UI\n * - **Programmatic control**: Control prebuilt component programmatically\n * - **Background Operations**: Trigger AI interactions in the background\n * - **Fire-and-Forget**: Send messages without needing to read responses\n *\n * ## Usage\n *\n * ```tsx\n * import { TextMessage, MessageRole } from \"@copilotkit/runtime-client-gql\";\n *\n * const { appendMessage } = useCopilotChat();\n *\n * // Example usage without naming conflicts\n * const handleSendMessage = async (content: string) => {\n * await appendMessage(\n * new TextMessage({\n * role: MessageRole.User,\n * content,\n * })\n * );\n * };\n * ```\n *\n * ## Return Values\n * The following properties are returned from the hook:\n *\n * <PropertyReference name=\"visibleMessages\" type=\"DeprecatedGqlMessage[]\" deprecated>\n * Array of messages in old non-AG-UI format, use for compatibility only\n * </PropertyReference>\n *\n * <PropertyReference name=\"appendMessage\" type=\"(message: DeprecatedGqlMessage, options?) => Promise<void>\" deprecated>\n * Append message using old format, use `sendMessage` instead\n * </PropertyReference>\n *\n * <PropertyReference name=\"reloadMessages\" type=\"(messageId: string) => Promise<void>\">\n * Regenerate the response for a specific message by ID\n * </PropertyReference>\n *\n * <PropertyReference name=\"stopGeneration\" type=\"() => void\">\n * Stop the current message generation process\n * </PropertyReference>\n *\n * <PropertyReference name=\"reset\" type=\"() => void\">\n * Clear all messages and reset chat state completely\n * </PropertyReference>\n *\n * <PropertyReference name=\"isLoading\" type=\"boolean\">\n * Whether the chat is currently generating a response\n * </PropertyReference>\n *\n * <PropertyReference name=\"runChatCompletion\" type=\"() => Promise<Message[]>\">\n * Manually trigger chat completion for advanced usage\n * </PropertyReference>\n *\n * <PropertyReference name=\"mcpServers\" type=\"MCPServerConfig[]\">\n * Array of Model Context Protocol server configurations\n * </PropertyReference>\n *\n * <PropertyReference name=\"setMcpServers\" type=\"(servers: MCPServerConfig[]) => void\">\n * Update MCP server configurations for enhanced context\n * </PropertyReference>\n */\n\nimport {\n UseCopilotChatOptions,\n useCopilotChat as useCopilotChatInternal,\n UseCopilotChatReturn as UseCopilotChatReturnInternal,\n} from \"./use-copilot-chat_internal\";\n\n// Create a type that excludes message-related properties from the internal type\nexport type UseCopilotChatReturn = Omit<\n UseCopilotChatReturnInternal,\n | \"messages\"\n | \"sendMessage\"\n | \"suggestions\"\n | \"setSuggestions\"\n | \"generateSuggestions\"\n | \"isLoadingSuggestions\"\n | \"resetSuggestions\"\n | \"interrupt\"\n | \"setMessages\"\n | \"deleteMessage\"\n>;\n\n/**\n * A lightweight React hook for headless chat interactions.\n * Perfect for programmatic messaging, background operations, and custom UI implementations.\n *\n * **Open Source Friendly** - Works without requiring a `publicApiKey`.\n */\nexport function useCopilotChat(options: UseCopilotChatOptions = {}): UseCopilotChatReturn {\n const {\n visibleMessages,\n appendMessage,\n reloadMessages,\n stopGeneration,\n reset,\n isLoading,\n runChatCompletion,\n mcpServers,\n setMcpServers,\n } = useCopilotChatInternal(options);\n\n return {\n visibleMessages,\n appendMessage,\n reloadMessages,\n stopGeneration,\n reset,\n isLoading,\n runChatCompletion,\n mcpServers,\n setMcpServers,\n };\n}\n"],"mappings":";;;;;AAsGO,SAASA,gBAAe,UAAiC,CAAC,GAAyB;AACxF,QAAM;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI,eAAuB,OAAO;AAElC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;","names":["useCopilotChat"]}
@@ -2,11 +2,11 @@ import {
2
2
  CopilotMessages,
3
3
  MessagesTapProvider,
4
4
  useMessagesTap
5
- } from "../../chunk-TWYUYC4F.mjs";
6
- import "../../chunk-ZLQVRPDS.mjs";
5
+ } from "../../chunk-MUDXTKXE.mjs";
7
6
  import "../../chunk-ICIK2BSB.mjs";
8
- import "../../chunk-TEMLWRRT.mjs";
9
7
  import "../../chunk-EFL5OBKN.mjs";
8
+ import "../../chunk-TEMLWRRT.mjs";
9
+ import "../../chunk-ZLQVRPDS.mjs";
10
10
  import "../../chunk-SKC7AJIV.mjs";
11
11
  export {
12
12
  CopilotMessages,
@@ -14,9 +14,17 @@ import '../../types/coagent-state.js';
14
14
  */
15
15
  interface CopilotKitProps {
16
16
  /**
17
- * Your Copilot Cloud API key. Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.
17
+ * Your Copilot Cloud API key.
18
+ *
19
+ * Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.
18
20
  */
19
21
  publicApiKey?: string;
22
+ /**
23
+ * Your public license key for accessing premium CopilotKit features.
24
+ *
25
+ * Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.
26
+ */
27
+ publicLicenseKey?: string;
20
28
  /**
21
29
  * Restrict input to a specific topic.
22
30
  * @deprecated Use `guardrails_c` instead to control input restrictions
@@ -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\";\n/**\n * Props for CopilotKit.\n */\n\nexport interface CopilotKitProps {\n /**\n * Your Copilot Cloud API key. Don't have it yet? Go to https://cloud.copilotkit.ai and get one for free.\n */\n publicApiKey?: 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 CopilotKit 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\";\n/**\n * Props for CopilotKit.\n */\n\nexport interface CopilotKitProps {\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 CopilotKit 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":[]}