@copilotkit/react-ui 1.8.0-next.6 → 1.8.0-next.8

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 (121) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/{chunk-FBYETUFL.mjs → chunk-5M7ODWKH.mjs} +6 -12
  3. package/dist/chunk-5M7ODWKH.mjs.map +1 -0
  4. package/dist/{chunk-GBXUOB6L.mjs → chunk-7BXD65QV.mjs} +3 -3
  5. package/dist/{chunk-6H7IQRIU.mjs → chunk-DKYAA4DM.mjs} +2 -2
  6. package/dist/{chunk-DFHFPZQD.mjs → chunk-FGVMRZ5D.mjs} +9 -16
  7. package/dist/chunk-FGVMRZ5D.mjs.map +1 -0
  8. package/dist/{chunk-Z6YOBQUJ.mjs → chunk-HGA4N4ME.mjs} +8 -13
  9. package/dist/chunk-HGA4N4ME.mjs.map +1 -0
  10. package/dist/{chunk-FFNESJSG.mjs → chunk-N5QWMFFT.mjs} +2 -2
  11. package/dist/{chunk-YC4NBUGE.mjs → chunk-NRA3CFEE.mjs} +3 -3
  12. package/dist/chunk-NRA3CFEE.mjs.map +1 -0
  13. package/dist/{chunk-CGVOCLHN.mjs → chunk-P7S3E5UW.mjs} +2 -2
  14. package/dist/{chunk-OTPAZXVR.mjs → chunk-Q5V6S67N.mjs} +17 -6
  15. package/dist/chunk-Q5V6S67N.mjs.map +1 -0
  16. package/dist/{chunk-LYHZXHTJ.mjs → chunk-SNLHKLW3.mjs} +2 -2
  17. package/dist/{chunk-5JY5QJ2W.mjs → chunk-UN2E3HCK.mjs} +9 -3
  18. package/dist/chunk-UN2E3HCK.mjs.map +1 -0
  19. package/dist/{chunk-QS7UFQFD.mjs → chunk-Y5RNSFAD.mjs} +3 -3
  20. package/dist/{chunk-VC4NO5QZ.mjs → chunk-YOEL33HG.mjs} +2 -2
  21. package/dist/{chunk-GJME6MK4.mjs → chunk-ZY25LVYR.mjs} +2 -2
  22. package/dist/components/chat/Button.js.map +1 -1
  23. package/dist/components/chat/Button.mjs +2 -2
  24. package/dist/components/chat/Chat.d.ts +2 -11
  25. package/dist/components/chat/Chat.js +67 -76
  26. package/dist/components/chat/Chat.js.map +1 -1
  27. package/dist/components/chat/Chat.mjs +6 -7
  28. package/dist/components/chat/ChatContext.d.ts +15 -0
  29. package/dist/components/chat/ChatContext.js +67 -1
  30. package/dist/components/chat/ChatContext.js.map +1 -1
  31. package/dist/components/chat/ChatContext.mjs +1 -1
  32. package/dist/components/chat/Header.js +18 -7
  33. package/dist/components/chat/Header.js.map +1 -1
  34. package/dist/components/chat/Header.mjs +5 -5
  35. package/dist/components/chat/Input.js.map +1 -1
  36. package/dist/components/chat/Input.mjs +2 -2
  37. package/dist/components/chat/Messages.js.map +1 -1
  38. package/dist/components/chat/Messages.mjs +2 -2
  39. package/dist/components/chat/Modal.d.ts +1 -1
  40. package/dist/components/chat/Modal.js +92 -94
  41. package/dist/components/chat/Modal.js.map +1 -1
  42. package/dist/components/chat/Modal.mjs +13 -14
  43. package/dist/components/chat/Popup.js +94 -96
  44. package/dist/components/chat/Popup.js.map +1 -1
  45. package/dist/components/chat/Popup.mjs +14 -15
  46. package/dist/components/chat/Sidebar.js +94 -96
  47. package/dist/components/chat/Sidebar.js.map +1 -1
  48. package/dist/components/chat/Sidebar.mjs +14 -15
  49. package/dist/components/chat/Window.js.map +1 -1
  50. package/dist/components/chat/Window.mjs +2 -2
  51. package/dist/components/chat/index.d.ts +1 -1
  52. package/dist/components/chat/index.js +96 -98
  53. package/dist/components/chat/index.js.map +1 -1
  54. package/dist/components/chat/index.mjs +17 -18
  55. package/dist/components/chat/messages/AssistantMessage.js +4 -67
  56. package/dist/components/chat/messages/AssistantMessage.js.map +1 -1
  57. package/dist/components/chat/messages/AssistantMessage.mjs +2 -2
  58. package/dist/components/chat/props.d.ts +1 -5
  59. package/dist/components/chat/props.js.map +1 -1
  60. package/dist/components/dev-console/console.js +18 -7
  61. package/dist/components/dev-console/console.js.map +1 -1
  62. package/dist/components/dev-console/console.mjs +3 -3
  63. package/dist/components/dev-console/icons.js +16 -5
  64. package/dist/components/dev-console/icons.js.map +1 -1
  65. package/dist/components/dev-console/icons.mjs +1 -1
  66. package/dist/components/dev-console/index.js +18 -7
  67. package/dist/components/dev-console/index.js.map +1 -1
  68. package/dist/components/dev-console/index.mjs +3 -3
  69. package/dist/components/help-modal/index.js +2 -2
  70. package/dist/components/help-modal/index.js.map +1 -1
  71. package/dist/components/help-modal/index.mjs +1 -1
  72. package/dist/components/help-modal/modal.js +2 -2
  73. package/dist/components/help-modal/modal.js.map +1 -1
  74. package/dist/components/help-modal/modal.mjs +1 -1
  75. package/dist/components/index.d.ts +1 -1
  76. package/dist/components/index.js +96 -98
  77. package/dist/components/index.js.map +1 -1
  78. package/dist/components/index.mjs +17 -18
  79. package/dist/index.css +39 -34
  80. package/dist/index.css.map +1 -1
  81. package/dist/index.d.ts +1 -1
  82. package/dist/index.js +96 -98
  83. package/dist/index.js.map +1 -1
  84. package/dist/index.mjs +18 -19
  85. package/dist/types/css.d.ts +2 -0
  86. package/dist/types/css.js.map +1 -1
  87. package/package.json +4 -4
  88. package/src/components/chat/Chat.tsx +0 -16
  89. package/src/components/chat/ChatContext.tsx +25 -0
  90. package/src/components/chat/Modal.tsx +0 -6
  91. package/src/components/chat/messages/AssistantMessage.tsx +4 -5
  92. package/src/components/chat/props.ts +0 -5
  93. package/src/components/dev-console/icons.tsx +9 -2
  94. package/src/components/help-modal/modal.tsx +2 -2
  95. package/src/css/colors.css +3 -0
  96. package/src/css/console.css +44 -9
  97. package/src/styles.css +0 -1
  98. package/src/types/css.ts +2 -0
  99. package/dist/chunk-5JY5QJ2W.mjs.map +0 -1
  100. package/dist/chunk-DFHFPZQD.mjs.map +0 -1
  101. package/dist/chunk-FBYETUFL.mjs.map +0 -1
  102. package/dist/chunk-OTPAZXVR.mjs.map +0 -1
  103. package/dist/chunk-UZTZXMYS.mjs +0 -18
  104. package/dist/chunk-UZTZXMYS.mjs.map +0 -1
  105. package/dist/chunk-YC4NBUGE.mjs.map +0 -1
  106. package/dist/chunk-Z6YOBQUJ.mjs.map +0 -1
  107. package/dist/components/chat/Response.d.ts +0 -7
  108. package/dist/components/chat/Response.js +0 -64
  109. package/dist/components/chat/Response.js.map +0 -1
  110. package/dist/components/chat/Response.mjs +0 -10
  111. package/dist/components/chat/Response.mjs.map +0 -1
  112. package/src/components/chat/Response.tsx +0 -12
  113. package/src/css/response.css +0 -26
  114. /package/dist/{chunk-GBXUOB6L.mjs.map → chunk-7BXD65QV.mjs.map} +0 -0
  115. /package/dist/{chunk-6H7IQRIU.mjs.map → chunk-DKYAA4DM.mjs.map} +0 -0
  116. /package/dist/{chunk-FFNESJSG.mjs.map → chunk-N5QWMFFT.mjs.map} +0 -0
  117. /package/dist/{chunk-CGVOCLHN.mjs.map → chunk-P7S3E5UW.mjs.map} +0 -0
  118. /package/dist/{chunk-LYHZXHTJ.mjs.map → chunk-SNLHKLW3.mjs.map} +0 -0
  119. /package/dist/{chunk-QS7UFQFD.mjs.map → chunk-Y5RNSFAD.mjs.map} +0 -0
  120. /package/dist/{chunk-VC4NO5QZ.mjs.map → chunk-YOEL33HG.mjs.map} +0 -0
  121. /package/dist/{chunk-GJME6MK4.mjs.map → chunk-ZY25LVYR.mjs.map} +0 -0
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  useChatContext
3
- } from "./chunk-5JY5QJ2W.mjs";
3
+ } from "./chunk-UN2E3HCK.mjs";
4
4
 
5
5
  // src/components/chat/Messages.tsx
6
6
  import { useEffect, useMemo, useRef } from "react";
@@ -190,4 +190,4 @@ export {
190
190
  Messages,
191
191
  useScrollToBottom
192
192
  };
193
- //# sourceMappingURL=chunk-GJME6MK4.mjs.map
193
+ //# sourceMappingURL=chunk-ZY25LVYR.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/chat/Button.tsx","../../../src/components/chat/ChatContext.tsx"],"sourcesContent":["import { ButtonProps } from \"./props\";\nimport { useChatContext } from \"./ChatContext\";\n\nexport const Button = ({}: ButtonProps) => {\n const { open, setOpen, icons } = useChatContext();\n\n return (\n <div onClick={() => setOpen(!open)}>\n <button\n className={`copilotKitButton ${open ? \"open\" : \"\"}`}\n aria-label={open ? \"Close Chat\" : \"Open Chat\"}\n >\n <div className=\"copilotKitButtonIcon copilotKitButtonIconOpen\">{icons.openIcon}</div>\n <div className=\"copilotKitButtonIcon copilotKitButtonIconClose\">{icons.closeIcon}</div>\n </button>\n </div>\n );\n};\n","import React, { useMemo, useState } from \"react\";\nimport * as DefaultIcons from \"./Icons\";\n\n/**\n * Icons for CopilotChat component.\n */\nexport interface CopilotChatIcons {\n /**\n * The icon to use for the open chat button.\n * @default <OpenIcon />\n */\n openIcon?: React.ReactNode;\n\n /**\n * The icon to use for the close chat button.\n * @default <CloseIcon />\n */\n closeIcon?: React.ReactNode;\n\n /**\n * The icon to use for the close chat button in the header.\n * @default <HeaderCloseIcon />\n */\n headerCloseIcon?: React.ReactNode;\n\n /**\n * The icon to use for the send button.\n * @default <SendIcon />\n */\n sendIcon?: React.ReactNode;\n\n /**\n * The icon to use for the activity indicator.\n * @default <ActivityIcon />\n */\n activityIcon?: React.ReactNode;\n\n /**\n * The icon to use for the spinner.\n * @default <SpinnerIcon />\n */\n spinnerIcon?: React.ReactNode;\n\n /**\n * The icon to use for the stop button.\n * @default <StopIcon />\n */\n stopIcon?: React.ReactNode;\n\n /**\n * The icon to use for the regenerate button.\n * @default <RegenerateIcon />\n */\n regenerateIcon?: React.ReactNode;\n\n /**\n * The icons to use for push to talk.\n * @default <PushToTalkIcon />\n */\n\n pushToTalkIcon?: React.ReactNode;\n}\n\n/**\n * Labels for CopilotChat component.\n */\nexport interface CopilotChatLabels {\n /**\n * The initial message(s) to display in the chat window.\n */\n initial?: string | string[];\n\n /**\n * The title to display in the header.\n * @default \"CopilotKit\"\n */\n title?: string;\n\n /**\n * The placeholder to display in the input.\n * @default \"Type a message...\"\n */\n placeholder?: string;\n\n /**\n * The message to display when an error occurs.\n * @default \"❌ An error occurred. Please try again.\"\n */\n error?: string;\n\n /**\n * The label to display on the stop button.\n * @default \"Stop generating\"\n */\n stopGenerating?: string;\n\n /**\n * The label to display on the regenerate button.\n * @default \"Regenerate response\"\n */\n regenerateResponse?: string;\n\n /**\n * The label for the copy button.\n * @default \"Copy to clipboard\"\n */\n copyToClipboard?: string;\n\n /**\n * The label for the thumbs up button.\n * @default \"Thumbs up\"\n */\n thumbsUp?: string;\n\n /**\n * The label for the thumbs down button.\n * @default \"Thumbs down\"\n */\n thumbsDown?: string;\n\n /**\n * The text to display when content is copied.\n * @default \"Copied!\"\n */\n copied?: string;\n}\n\ninterface ChatContext {\n labels: Required<CopilotChatLabels>;\n icons: Required<CopilotChatIcons>;\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nexport const ChatContext = React.createContext<ChatContext | undefined>(undefined);\n\nexport function useChatContext(): ChatContext {\n const context = React.useContext(ChatContext);\n if (context === undefined) {\n throw new Error(\n \"Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?\",\n );\n }\n return context;\n}\n\ninterface ChatContextProps {\n // temperature?: number;\n // instructions?: string;\n // maxFeedback?: number;\n labels?: CopilotChatLabels;\n icons?: CopilotChatIcons;\n children?: React.ReactNode;\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nexport const ChatContextProvider = ({\n // temperature,\n // instructions,\n // maxFeedback,\n labels,\n icons,\n children,\n open,\n setOpen,\n}: ChatContextProps) => {\n const memoizedLabels = useMemo(\n () => ({\n ...{\n initial: \"\",\n title: \"CopilotKit\",\n placeholder: \"Type a message...\",\n error: \"❌ An error occurred. Please try again.\",\n stopGenerating: \"Stop generating\",\n regenerateResponse: \"Regenerate response\",\n copyToClipboard: \"Copy to clipboard\",\n thumbsUp: \"Thumbs up\",\n thumbsDown: \"Thumbs down\",\n copied: \"Copied!\",\n },\n ...labels,\n }),\n [labels],\n );\n\n const memoizedIcons = useMemo(\n () => ({\n ...{\n openIcon: DefaultIcons.OpenIcon,\n closeIcon: DefaultIcons.CloseIcon,\n headerCloseIcon: DefaultIcons.HeaderCloseIcon,\n sendIcon: DefaultIcons.SendIcon,\n activityIcon: DefaultIcons.ActivityIcon,\n spinnerIcon: DefaultIcons.SpinnerIcon,\n stopIcon: DefaultIcons.StopIcon,\n regenerateIcon: DefaultIcons.RegenerateIcon,\n pushToTalkIcon: DefaultIcons.MicrophoneIcon,\n },\n ...icons,\n }),\n [icons],\n );\n\n const context = useMemo(\n () => ({\n labels: memoizedLabels,\n icons: memoizedIcons,\n open,\n setOpen,\n }),\n [memoizedLabels, memoizedIcons, open, setOpen],\n );\n\n return <ChatContext.Provider value={context}>{children}</ChatContext.Provider>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAyC;AAsNhC;AAhFF,IAAM,cAAc,aAAAA,QAAM,cAAuC,MAAS;AAE1E,SAAS,iBAA8B;AAC5C,QAAM,UAAU,aAAAA,QAAM,WAAW,WAAW;AAC5C,MAAI,YAAY,QAAW;AACzB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;;;ADxIM,IAAAC,sBAAA;AALC,IAAM,SAAS,CAAC,CAAC,MAAmB;AACzC,QAAM,EAAE,MAAM,SAAS,MAAM,IAAI,eAAe;AAEhD,SACE,6CAAC,SAAI,SAAS,MAAM,QAAQ,CAAC,IAAI,GAC/B;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,oBAAoB,OAAO,SAAS;AAAA,MAC/C,cAAY,OAAO,eAAe;AAAA,MAElC;AAAA,qDAAC,SAAI,WAAU,iDAAiD,gBAAM,UAAS;AAAA,QAC/E,6CAAC,SAAI,WAAU,kDAAkD,gBAAM,WAAU;AAAA;AAAA;AAAA,EACnF,GACF;AAEJ;","names":["React","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/components/chat/Button.tsx","../../../src/components/chat/ChatContext.tsx"],"sourcesContent":["import { ButtonProps } from \"./props\";\nimport { useChatContext } from \"./ChatContext\";\n\nexport const Button = ({}: ButtonProps) => {\n const { open, setOpen, icons } = useChatContext();\n\n return (\n <div onClick={() => setOpen(!open)}>\n <button\n className={`copilotKitButton ${open ? \"open\" : \"\"}`}\n aria-label={open ? \"Close Chat\" : \"Open Chat\"}\n >\n <div className=\"copilotKitButtonIcon copilotKitButtonIconOpen\">{icons.openIcon}</div>\n <div className=\"copilotKitButtonIcon copilotKitButtonIconClose\">{icons.closeIcon}</div>\n </button>\n </div>\n );\n};\n","import React, { useMemo, useState } from \"react\";\nimport * as DefaultIcons from \"./Icons\";\nimport { ThumbsDownIcon, ThumbsUpIcon } from \"./Icons\";\n\n/**\n * Icons for CopilotChat component.\n */\nexport interface CopilotChatIcons {\n /**\n * The icon to use for the open chat button.\n * @default <OpenIcon />\n */\n openIcon?: React.ReactNode;\n\n /**\n * The icon to use for the close chat button.\n * @default <CloseIcon />\n */\n closeIcon?: React.ReactNode;\n\n /**\n * The icon to use for the close chat button in the header.\n * @default <HeaderCloseIcon />\n */\n headerCloseIcon?: React.ReactNode;\n\n /**\n * The icon to use for the send button.\n * @default <SendIcon />\n */\n sendIcon?: React.ReactNode;\n\n /**\n * The icon to use for the activity indicator.\n * @default <ActivityIcon />\n */\n activityIcon?: React.ReactNode;\n\n /**\n * The icon to use for the spinner.\n * @default <SpinnerIcon />\n */\n spinnerIcon?: React.ReactNode;\n\n /**\n * The icon to use for the stop button.\n * @default <StopIcon />\n */\n stopIcon?: React.ReactNode;\n\n /**\n * The icon to use for the regenerate button.\n * @default <RegenerateIcon />\n */\n regenerateIcon?: React.ReactNode;\n\n /**\n * The icons to use for push to talk.\n * @default <PushToTalkIcon />\n */\n\n pushToTalkIcon?: React.ReactNode;\n\n /**\n * The icons to use for copy assistant response\n * @default <CopyIcon />\n */\n\n copyIcon?: React.ReactNode;\n\n /**\n * The icon to use for thumbs up/response approval.\n * @default <ThumbsUpIcon />\n */\n\n thumbsUpIcon?: React.ReactNode;\n\n /**\n * The icon to use for thumbs down/response rejection.\n * @default <ThumbsDownIcon />\n */\n\n thumbsDownIcon?: React.ReactNode;\n}\n\n/**\n * Labels for CopilotChat component.\n */\nexport interface CopilotChatLabels {\n /**\n * The initial message(s) to display in the chat window.\n */\n initial?: string | string[];\n\n /**\n * The title to display in the header.\n * @default \"CopilotKit\"\n */\n title?: string;\n\n /**\n * The placeholder to display in the input.\n * @default \"Type a message...\"\n */\n placeholder?: string;\n\n /**\n * The message to display when an error occurs.\n * @default \"❌ An error occurred. Please try again.\"\n */\n error?: string;\n\n /**\n * The label to display on the stop button.\n * @default \"Stop generating\"\n */\n stopGenerating?: string;\n\n /**\n * The label to display on the regenerate button.\n * @default \"Regenerate response\"\n */\n regenerateResponse?: string;\n\n /**\n * The label for the copy button.\n * @default \"Copy to clipboard\"\n */\n copyToClipboard?: string;\n\n /**\n * The label for the thumbs up button.\n * @default \"Thumbs up\"\n */\n thumbsUp?: string;\n\n /**\n * The label for the thumbs down button.\n * @default \"Thumbs down\"\n */\n thumbsDown?: string;\n\n /**\n * The text to display when content is copied.\n * @default \"Copied!\"\n */\n copied?: string;\n}\n\ninterface ChatContext {\n labels: Required<CopilotChatLabels>;\n icons: Required<CopilotChatIcons>;\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nexport const ChatContext = React.createContext<ChatContext | undefined>(undefined);\n\nexport function useChatContext(): ChatContext {\n const context = React.useContext(ChatContext);\n if (context === undefined) {\n throw new Error(\n \"Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?\",\n );\n }\n return context;\n}\n\ninterface ChatContextProps {\n // temperature?: number;\n // instructions?: string;\n // maxFeedback?: number;\n labels?: CopilotChatLabels;\n icons?: CopilotChatIcons;\n children?: React.ReactNode;\n open: boolean;\n setOpen: (open: boolean) => void;\n}\n\nexport const ChatContextProvider = ({\n // temperature,\n // instructions,\n // maxFeedback,\n labels,\n icons,\n children,\n open,\n setOpen,\n}: ChatContextProps) => {\n const memoizedLabels = useMemo(\n () => ({\n ...{\n initial: \"\",\n title: \"CopilotKit\",\n placeholder: \"Type a message...\",\n error: \"❌ An error occurred. Please try again.\",\n stopGenerating: \"Stop generating\",\n regenerateResponse: \"Regenerate response\",\n copyToClipboard: \"Copy to clipboard\",\n thumbsUp: \"Thumbs up\",\n thumbsDown: \"Thumbs down\",\n copied: \"Copied!\",\n },\n ...labels,\n }),\n [labels],\n );\n\n const memoizedIcons = useMemo(\n () => ({\n ...{\n openIcon: DefaultIcons.OpenIcon,\n closeIcon: DefaultIcons.CloseIcon,\n headerCloseIcon: DefaultIcons.HeaderCloseIcon,\n sendIcon: DefaultIcons.SendIcon,\n activityIcon: DefaultIcons.ActivityIcon,\n spinnerIcon: DefaultIcons.SpinnerIcon,\n stopIcon: DefaultIcons.StopIcon,\n regenerateIcon: DefaultIcons.RegenerateIcon,\n pushToTalkIcon: DefaultIcons.MicrophoneIcon,\n copyIcon: DefaultIcons.CopyIcon,\n thumbsUpIcon: DefaultIcons.ThumbsUpIcon,\n thumbsDownIcon: DefaultIcons.ThumbsDownIcon,\n },\n ...icons,\n }),\n [icons],\n );\n\n const context = useMemo(\n () => ({\n labels: memoizedLabels,\n icons: memoizedIcons,\n open,\n setOpen,\n }),\n [memoizedLabels, memoizedIcons, open, setOpen],\n );\n\n return <ChatContext.Provider value={context}>{children}</ChatContext.Provider>;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,mBAAyC;AA+OhC;AAnFF,IAAM,cAAc,aAAAA,QAAM,cAAuC,MAAS;AAE1E,SAAS,iBAA8B;AAC5C,QAAM,UAAU,aAAAA,QAAM,WAAW,WAAW;AAC5C,MAAI,YAAY,QAAW;AACzB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACT;;;AD9JM,IAAAC,sBAAA;AALC,IAAM,SAAS,CAAC,CAAC,MAAmB;AACzC,QAAM,EAAE,MAAM,SAAS,MAAM,IAAI,eAAe;AAEhD,SACE,6CAAC,SAAI,SAAS,MAAM,QAAQ,CAAC,IAAI,GAC/B;AAAA,IAAC;AAAA;AAAA,MACC,WAAW,oBAAoB,OAAO,SAAS;AAAA,MAC/C,cAAY,OAAO,eAAe;AAAA,MAElC;AAAA,qDAAC,SAAI,WAAU,iDAAiD,gBAAM,UAAS;AAAA,QAC/E,6CAAC,SAAI,WAAU,kDAAkD,gBAAM,WAAU;AAAA;AAAA;AAAA,EACnF,GACF;AAEJ;","names":["React","import_jsx_runtime"]}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Button
3
- } from "../../chunk-VC4NO5QZ.mjs";
4
- import "../../chunk-5JY5QJ2W.mjs";
3
+ } from "../../chunk-YOEL33HG.mjs";
4
+ import "../../chunk-UN2E3HCK.mjs";
5
5
  import "../../chunk-ORSMX3SE.mjs";
6
6
  import "../../chunk-MRXNTQOX.mjs";
7
7
  export {
@@ -4,7 +4,7 @@ import React__default from 'react';
4
4
  import { SystemMessageFunction, HintFunction } from '@copilotkit/react-core';
5
5
  import { CopilotChatSuggestion } from '../../types/suggestions.js';
6
6
  import { Message } from '@copilotkit/runtime-client-gql';
7
- import { AssistantMessageProps, UserMessageProps, MessagesProps, RenderMessageProps, InputProps, ResponseButtonProps } from './props.js';
7
+ import { AssistantMessageProps, UserMessageProps, MessagesProps, RenderMessageProps, InputProps } from './props.js';
8
8
 
9
9
  /**
10
10
  * Props for CopilotChat component.
@@ -66,11 +66,6 @@ interface CopilotChatProps {
66
66
  * instructions is not enough.
67
67
  */
68
68
  makeSystemMessage?: SystemMessageFunction;
69
- /**
70
- * Whether to show the response button.
71
- * @default true
72
- */
73
- showResponseButton?: boolean;
74
69
  /**
75
70
  * A custom assistant message component to use instead of the default.
76
71
  */
@@ -103,10 +98,6 @@ interface CopilotChatProps {
103
98
  * A custom Input component to use instead of the default.
104
99
  */
105
100
  Input?: React__default.ComponentType<InputProps>;
106
- /**
107
- * A custom ResponseButton component to use instead of the default.
108
- */
109
- ResponseButton?: React__default.ComponentType<ResponseButtonProps>;
110
101
  /**
111
102
  * A class name to apply to the root element.
112
103
  */
@@ -153,7 +144,7 @@ interface OnStopGenerationArguments {
153
144
  type OnReloadMessagesArguments = OnStopGenerationArguments;
154
145
  type OnStopGeneration = (args: OnStopGenerationArguments) => void;
155
146
  type OnReloadMessages = (args: OnReloadMessagesArguments) => void;
156
- declare function CopilotChat({ instructions, onSubmitMessage, makeSystemMessage, showResponseButton, onInProgress, onStopGeneration, onReloadMessages, onRegenerate, onCopy, onThumbsUp, onThumbsDown, Messages, RenderTextMessage, RenderActionExecutionMessage, RenderAgentStateMessage, RenderResultMessage, Input, ResponseButton, className, icons, labels, AssistantMessage, UserMessage, }: CopilotChatProps): react_jsx_runtime.JSX.Element;
147
+ declare function CopilotChat({ instructions, onSubmitMessage, makeSystemMessage, onInProgress, onStopGeneration, onReloadMessages, onRegenerate, onCopy, onThumbsUp, onThumbsDown, Messages, RenderTextMessage, RenderActionExecutionMessage, RenderAgentStateMessage, RenderResultMessage, Input, className, icons, labels, AssistantMessage, UserMessage, }: CopilotChatProps): react_jsx_runtime.JSX.Element;
157
148
  declare function WrappedCopilotChat({ children, icons, labels, className, }: {
158
149
  children: React__default.ReactNode;
159
150
  icons?: CopilotChatIcons;
@@ -361,7 +361,10 @@ var ChatContextProvider = ({
361
361
  spinnerIcon: SpinnerIcon,
362
362
  stopIcon: StopIcon,
363
363
  regenerateIcon: RegenerateIcon,
364
- pushToTalkIcon: MicrophoneIcon
364
+ pushToTalkIcon: MicrophoneIcon,
365
+ copyIcon: CopyIcon,
366
+ thumbsUpIcon: ThumbsUpIcon,
367
+ thumbsDownIcon: ThumbsDownIcon
365
368
  }), icons),
366
369
  [icons]
367
370
  );
@@ -805,18 +808,8 @@ var Input = ({ inProgress, onSend, isVisible = false, onStop }) => {
805
808
  ] }) });
806
809
  };
807
810
 
808
- // src/components/chat/Response.tsx
809
- var import_jsx_runtime6 = require("react/jsx-runtime");
810
- var ResponseButton = ({ onClick, inProgress }) => {
811
- const context = useChatContext();
812
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("button", { onClick, className: "copilotKitResponseButton", children: [
813
- /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("span", { children: inProgress ? context.icons.stopIcon : context.icons.regenerateIcon }),
814
- inProgress ? context.labels.stopGenerating : context.labels.regenerateResponse
815
- ] });
816
- };
817
-
818
811
  // src/components/chat/messages/RenderTextMessage.tsx
819
- var import_jsx_runtime7 = require("react/jsx-runtime");
812
+ var import_jsx_runtime6 = require("react/jsx-runtime");
820
813
  function RenderTextMessage(props) {
821
814
  const {
822
815
  message,
@@ -832,7 +825,7 @@ function RenderTextMessage(props) {
832
825
  } = props;
833
826
  if (message.isTextMessage()) {
834
827
  if (message.role === "user") {
835
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
828
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
836
829
  UserMessage2,
837
830
  {
838
831
  "data-message-role": "user",
@@ -842,7 +835,7 @@ function RenderTextMessage(props) {
842
835
  index
843
836
  );
844
837
  } else if (message.role == "assistant") {
845
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
838
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
846
839
  AssistantMessage2,
847
840
  {
848
841
  "data-message-role": "assistant",
@@ -865,7 +858,7 @@ function RenderTextMessage(props) {
865
858
  // src/components/chat/messages/RenderActionExecutionMessage.tsx
866
859
  var import_runtime_client_gql2 = require("@copilotkit/runtime-client-gql");
867
860
  var import_react_core4 = require("@copilotkit/react-core");
868
- var import_jsx_runtime8 = require("react/jsx-runtime");
861
+ var import_jsx_runtime7 = require("react/jsx-runtime");
869
862
  function RenderActionExecutionMessage(props) {
870
863
  const { chatComponentsCache } = (0, import_react_core4.useCopilotContext)();
871
864
  const { message, inProgress, index, isCurrentMessage, actionResult, AssistantMessage: AssistantMessage2 } = props;
@@ -874,7 +867,7 @@ function RenderActionExecutionMessage(props) {
874
867
  const render = chatComponentsCache.current.actions[message.name] || chatComponentsCache.current.actions["*"];
875
868
  if (typeof render === "string") {
876
869
  if (isCurrentMessage && inProgress) {
877
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
870
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
878
871
  AssistantMessage2,
879
872
  {
880
873
  rawData: message,
@@ -907,7 +900,7 @@ function RenderActionExecutionMessage(props) {
907
900
  return null;
908
901
  }
909
902
  if (typeof toRender === "string") {
910
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
903
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
911
904
  AssistantMessage2,
912
905
  {
913
906
  rawData: message,
@@ -919,7 +912,7 @@ function RenderActionExecutionMessage(props) {
919
912
  index
920
913
  );
921
914
  } else {
922
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
915
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
923
916
  AssistantMessage2,
924
917
  {
925
918
  rawData: message,
@@ -933,20 +926,20 @@ function RenderActionExecutionMessage(props) {
933
926
  }
934
927
  } catch (e) {
935
928
  console.error(`Error executing render function for action ${message.name}: ${e}`);
936
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
929
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
937
930
  AssistantMessage2,
938
931
  {
939
932
  rawData: message,
940
933
  "data-message-role": "assistant",
941
934
  isLoading: false,
942
935
  isGenerating: false,
943
- subComponent: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "copilotKitMessage copilotKitAssistantMessage", children: [
944
- /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("b", { children: [
936
+ subComponent: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("div", { className: "copilotKitMessage copilotKitAssistantMessage", children: [
937
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)("b", { children: [
945
938
  "\u274C Error executing render function for action ",
946
939
  message.name,
947
940
  ":"
948
941
  ] }),
949
- /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("pre", { children: e instanceof Error ? e.message : String(e) })
942
+ /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("pre", { children: e instanceof Error ? e.message : String(e) })
950
943
  ] })
951
944
  },
952
945
  index
@@ -956,7 +949,7 @@ function RenderActionExecutionMessage(props) {
956
949
  } else if (!inProgress || !isCurrentMessage) {
957
950
  return null;
958
951
  } else {
959
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
952
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
960
953
  AssistantMessage2,
961
954
  {
962
955
  rawData: message,
@@ -971,11 +964,11 @@ function RenderActionExecutionMessage(props) {
971
964
  }
972
965
 
973
966
  // src/components/chat/messages/RenderResultMessage.tsx
974
- var import_jsx_runtime9 = require("react/jsx-runtime");
967
+ var import_jsx_runtime8 = require("react/jsx-runtime");
975
968
  function RenderResultMessage(props) {
976
969
  const { message, inProgress, index, isCurrentMessage, AssistantMessage: AssistantMessage2 } = props;
977
970
  if (message.isResultMessage() && inProgress && isCurrentMessage) {
978
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
971
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
979
972
  AssistantMessage2,
980
973
  {
981
974
  "data-message-role": "assistant",
@@ -992,7 +985,7 @@ function RenderResultMessage(props) {
992
985
 
993
986
  // src/components/chat/messages/RenderAgentStateMessage.tsx
994
987
  var import_react_core5 = require("@copilotkit/react-core");
995
- var import_jsx_runtime10 = require("react/jsx-runtime");
988
+ var import_jsx_runtime9 = require("react/jsx-runtime");
996
989
  function RenderAgentStateMessage(props) {
997
990
  const { chatComponentsCache } = (0, import_react_core5.useCopilotContext)();
998
991
  const { message, inProgress, index, isCurrentMessage, AssistantMessage: AssistantMessage2 } = props;
@@ -1004,7 +997,7 @@ function RenderAgentStateMessage(props) {
1004
997
  if (render) {
1005
998
  if (typeof render === "string") {
1006
999
  if (isCurrentMessage && inProgress) {
1007
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1000
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1008
1001
  AssistantMessage2,
1009
1002
  {
1010
1003
  rawData: message,
@@ -1030,7 +1023,7 @@ function RenderAgentStateMessage(props) {
1030
1023
  return null;
1031
1024
  }
1032
1025
  if (!toRender && isCurrentMessage && inProgress) {
1033
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1026
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1034
1027
  AssistantMessage2,
1035
1028
  {
1036
1029
  "data-message-role": "assistant",
@@ -1044,7 +1037,7 @@ function RenderAgentStateMessage(props) {
1044
1037
  return null;
1045
1038
  }
1046
1039
  if (typeof toRender === "string") {
1047
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1040
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1048
1041
  AssistantMessage2,
1049
1042
  {
1050
1043
  rawData: message,
@@ -1056,7 +1049,7 @@ function RenderAgentStateMessage(props) {
1056
1049
  index
1057
1050
  );
1058
1051
  } else {
1059
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1052
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1060
1053
  AssistantMessage2,
1061
1054
  {
1062
1055
  rawData: message,
@@ -1072,7 +1065,7 @@ function RenderAgentStateMessage(props) {
1072
1065
  } else if (!inProgress || !isCurrentMessage) {
1073
1066
  return null;
1074
1067
  } else {
1075
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1068
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
1076
1069
  AssistantMessage2,
1077
1070
  {
1078
1071
  rawData: message,
@@ -1117,7 +1110,7 @@ function useCopyToClipboard({ timeout = 2e3 }) {
1117
1110
  }
1118
1111
 
1119
1112
  // src/components/chat/CodeBlock.tsx
1120
- var import_jsx_runtime11 = require("react/jsx-runtime");
1113
+ var import_jsx_runtime10 = require("react/jsx-runtime");
1121
1114
  var programmingLanguages = {
1122
1115
  javascript: ".js",
1123
1116
  python: ".py",
@@ -1180,15 +1173,15 @@ var CodeBlock = (0, import_react6.memo)(({ language, value }) => {
1180
1173
  return;
1181
1174
  copyToClipboard(value);
1182
1175
  };
1183
- return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "copilotKitCodeBlock", children: [
1184
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "copilotKitCodeBlockToolbar", children: [
1185
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "copilotKitCodeBlockToolbarLanguage", children: language }),
1186
- /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("div", { className: "copilotKitCodeBlockToolbarButtons", children: [
1187
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "copilotKitCodeBlockToolbarButton", onClick: downloadAsFile, children: DownloadIcon }),
1188
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("button", { className: "copilotKitCodeBlockToolbarButton", onClick: onCopy, children: isCopied ? CheckIcon : CopyIcon })
1176
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "copilotKitCodeBlock", children: [
1177
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "copilotKitCodeBlockToolbar", children: [
1178
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("span", { className: "copilotKitCodeBlockToolbarLanguage", children: language }),
1179
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)("div", { className: "copilotKitCodeBlockToolbarButtons", children: [
1180
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "copilotKitCodeBlockToolbarButton", onClick: downloadAsFile, children: DownloadIcon }),
1181
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)("button", { className: "copilotKitCodeBlockToolbarButton", onClick: onCopy, children: isCopied ? CheckIcon : CopyIcon })
1189
1182
  ] })
1190
1183
  ] }),
1191
- /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1184
+ /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
1192
1185
  import_react_syntax_highlighter.Prism,
1193
1186
  {
1194
1187
  language,
@@ -1491,18 +1484,18 @@ var highlightStyle = {
1491
1484
  // src/components/chat/Markdown.tsx
1492
1485
  var import_remark_gfm = __toESM(require("remark-gfm"));
1493
1486
  var import_remark_math = __toESM(require("remark-math"));
1494
- var import_jsx_runtime12 = require("react/jsx-runtime");
1487
+ var import_jsx_runtime11 = require("react/jsx-runtime");
1495
1488
  var MemoizedReactMarkdown = (0, import_react7.memo)(
1496
1489
  import_react_markdown.default,
1497
1490
  (prevProps, nextProps) => prevProps.children === nextProps.children && prevProps.className === nextProps.className
1498
1491
  );
1499
1492
  var Markdown = ({ content }) => {
1500
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { className: "copilotKitMarkdown", children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(MemoizedReactMarkdown, { components, remarkPlugins: [import_remark_gfm.default, import_remark_math.default], children: content }) });
1493
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("div", { className: "copilotKitMarkdown", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(MemoizedReactMarkdown, { components, remarkPlugins: [import_remark_gfm.default, import_remark_math.default], children: content }) });
1501
1494
  };
1502
1495
  var components = {
1503
1496
  a(_a) {
1504
1497
  var _b = _a, { children } = _b, props = __objRest(_b, ["children"]);
1505
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1498
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1506
1499
  "a",
1507
1500
  __spreadProps(__spreadValues({
1508
1501
  style: { color: "blue", textDecoration: "underline" }
@@ -1517,7 +1510,7 @@ var components = {
1517
1510
  var _d = _c, { children, className, inline } = _d, props = __objRest(_d, ["children", "className", "inline"]);
1518
1511
  if (children.length) {
1519
1512
  if (children[0] == "\u258D") {
1520
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1513
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1521
1514
  "span",
1522
1515
  {
1523
1516
  style: {
@@ -1532,9 +1525,9 @@ var components = {
1532
1525
  }
1533
1526
  const match = /language-(\w+)/.exec(className || "");
1534
1527
  if (inline) {
1535
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("code", __spreadProps(__spreadValues({ className }, props), { children }));
1528
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("code", __spreadProps(__spreadValues({ className }, props), { children }));
1536
1529
  }
1537
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1530
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
1538
1531
  CodeBlock,
1539
1532
  __spreadValues({
1540
1533
  language: match && match[1] || "",
@@ -1547,7 +1540,7 @@ var components = {
1547
1540
 
1548
1541
  // src/components/chat/messages/AssistantMessage.tsx
1549
1542
  var import_react8 = require("react");
1550
- var import_jsx_runtime13 = require("react/jsx-runtime");
1543
+ var import_jsx_runtime12 = require("react/jsx-runtime");
1551
1544
  var AssistantMessage = (props) => {
1552
1545
  const { icons, labels } = useChatContext();
1553
1546
  const {
@@ -1588,77 +1581,77 @@ var AssistantMessage = (props) => {
1588
1581
  onThumbsDown(message);
1589
1582
  }
1590
1583
  };
1591
- const LoadingIcon = () => /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { children: icons.activityIcon });
1592
- return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_jsx_runtime13.Fragment, { children: [
1593
- (message || isLoading) && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)("div", { className: "copilotKitMessage copilotKitAssistantMessage", children: [
1594
- message && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(Markdown, { content: message || "" }),
1595
- isLoading && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(LoadingIcon, {}),
1596
- message && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
1584
+ const LoadingIcon = () => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { children: icons.activityIcon });
1585
+ return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
1586
+ (message || isLoading) && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { className: "copilotKitMessage copilotKitAssistantMessage", children: [
1587
+ message && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Markdown, { content: message || "" }),
1588
+ isLoading && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LoadingIcon, {}),
1589
+ message && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
1597
1590
  "div",
1598
1591
  {
1599
1592
  className: `copilotKitMessageControls ${isCurrentMessage ? "currentMessage" : ""}`,
1600
1593
  children: [
1601
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1594
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1602
1595
  "button",
1603
1596
  {
1604
1597
  className: "copilotKitMessageControlButton",
1605
1598
  onClick: handleRegenerate,
1606
1599
  "aria-label": labels.regenerateResponse,
1607
1600
  title: labels.regenerateResponse,
1608
- children: RegenerateIcon
1601
+ children: icons.regenerateIcon
1609
1602
  }
1610
1603
  ),
1611
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1604
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1612
1605
  "button",
1613
1606
  {
1614
1607
  className: "copilotKitMessageControlButton",
1615
1608
  onClick: handleCopy,
1616
1609
  "aria-label": labels.copyToClipboard,
1617
1610
  title: labels.copyToClipboard,
1618
- children: copied ? /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("span", { style: { fontSize: "10px", fontWeight: "bold" }, children: "\u2713" }) : CopyIcon
1611
+ children: copied ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { style: { fontSize: "10px", fontWeight: "bold" }, children: "\u2713" }) : icons.copyIcon
1619
1612
  }
1620
1613
  ),
1621
- onThumbsUp && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1614
+ onThumbsUp && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1622
1615
  "button",
1623
1616
  {
1624
1617
  className: "copilotKitMessageControlButton",
1625
1618
  onClick: handleThumbsUp,
1626
1619
  "aria-label": labels.thumbsUp,
1627
1620
  title: labels.thumbsUp,
1628
- children: ThumbsUpIcon
1621
+ children: icons.thumbsUpIcon
1629
1622
  }
1630
1623
  ),
1631
- onThumbsDown && /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
1624
+ onThumbsDown && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
1632
1625
  "button",
1633
1626
  {
1634
1627
  className: "copilotKitMessageControlButton",
1635
1628
  onClick: handleThumbsDown,
1636
1629
  "aria-label": labels.thumbsDown,
1637
1630
  title: labels.thumbsDown,
1638
- children: ThumbsDownIcon
1631
+ children: icons.thumbsDownIcon
1639
1632
  }
1640
1633
  )
1641
1634
  ]
1642
1635
  }
1643
1636
  )
1644
1637
  ] }),
1645
- /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { style: { marginBottom: "0.5rem" }, children: subComponent })
1638
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("div", { style: { marginBottom: "0.5rem" }, children: subComponent })
1646
1639
  ] });
1647
1640
  };
1648
1641
 
1649
1642
  // src/components/chat/messages/UserMessage.tsx
1650
- var import_jsx_runtime14 = require("react/jsx-runtime");
1643
+ var import_jsx_runtime13 = require("react/jsx-runtime");
1651
1644
  var UserMessage = (props) => {
1652
- return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("div", { className: "copilotKitMessage copilotKitUserMessage", children: props.message });
1645
+ return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)("div", { className: "copilotKitMessage copilotKitUserMessage", children: props.message });
1653
1646
  };
1654
1647
 
1655
1648
  // src/components/chat/Suggestion.tsx
1656
1649
  var import_react_core6 = require("@copilotkit/react-core");
1657
1650
  var import_shared = require("@copilotkit/shared");
1658
1651
  var import_runtime_client_gql3 = require("@copilotkit/runtime-client-gql");
1659
- var import_jsx_runtime15 = require("react/jsx-runtime");
1652
+ var import_jsx_runtime14 = require("react/jsx-runtime");
1660
1653
  function Suggestion({ title, message, onClick, partial, className }) {
1661
- return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1654
+ return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
1662
1655
  "button",
1663
1656
  {
1664
1657
  disabled: partial,
@@ -1668,7 +1661,7 @@ function Suggestion({ title, message, onClick, partial, className }) {
1668
1661
  },
1669
1662
  className: className || (partial ? "suggestion loading" : "suggestion"),
1670
1663
  "data-test-id": "suggestion",
1671
- children: partial ? SmallSpinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("span", { children: title })
1664
+ children: partial ? SmallSpinnerIcon : /* @__PURE__ */ (0, import_jsx_runtime14.jsx)("span", { children: title })
1672
1665
  }
1673
1666
  );
1674
1667
  }
@@ -1748,12 +1741,11 @@ var import_react_core7 = require("@copilotkit/react-core");
1748
1741
  var import_runtime_client_gql4 = require("@copilotkit/runtime-client-gql");
1749
1742
  var import_shared2 = require("@copilotkit/shared");
1750
1743
  var import_react_core8 = require("@copilotkit/react-core");
1751
- var import_jsx_runtime16 = require("react/jsx-runtime");
1744
+ var import_jsx_runtime15 = require("react/jsx-runtime");
1752
1745
  function CopilotChat({
1753
1746
  instructions,
1754
1747
  onSubmitMessage,
1755
1748
  makeSystemMessage,
1756
- showResponseButton = true,
1757
1749
  onInProgress,
1758
1750
  onStopGeneration,
1759
1751
  onReloadMessages,
@@ -1767,7 +1759,6 @@ function CopilotChat({
1767
1759
  RenderAgentStateMessage: RenderAgentStateMessage2 = RenderAgentStateMessage,
1768
1760
  RenderResultMessage: RenderResultMessage2 = RenderResultMessage,
1769
1761
  Input: Input2 = Input,
1770
- ResponseButton: ResponseButton2 = ResponseButton,
1771
1762
  className,
1772
1763
  icons,
1773
1764
  labels,
@@ -1815,8 +1806,8 @@ function CopilotChat({
1815
1806
  onCopy(message);
1816
1807
  }
1817
1808
  };
1818
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(WrappedCopilotChat, { icons, labels, className, children: [
1819
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1809
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(WrappedCopilotChat, { icons, labels, className, children: [
1810
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1820
1811
  Messages2,
1821
1812
  {
1822
1813
  AssistantMessage: AssistantMessage2,
@@ -1831,7 +1822,7 @@ function CopilotChat({
1831
1822
  onCopy: handleCopy,
1832
1823
  onThumbsUp,
1833
1824
  onThumbsDown,
1834
- children: currentSuggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: "suggestions", children: currentSuggestions.map((suggestion, index) => /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1825
+ children: currentSuggestions.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: "suggestions", children: currentSuggestions.map((suggestion, index) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1835
1826
  Suggestion,
1836
1827
  {
1837
1828
  title: suggestion.title,
@@ -1844,7 +1835,7 @@ function CopilotChat({
1844
1835
  )) })
1845
1836
  }
1846
1837
  ),
1847
- /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
1838
+ /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
1848
1839
  Input2,
1849
1840
  {
1850
1841
  inProgress: isLoading,
@@ -1863,10 +1854,10 @@ function WrappedCopilotChat({
1863
1854
  }) {
1864
1855
  const chatContext = import_react9.default.useContext(ChatContext);
1865
1856
  if (!chatContext) {
1866
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(ChatContextProvider, { icons, labels, open: true, setOpen: () => {
1867
- }, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)("div", { className: `copilotKitChat ${className}`, children }) });
1857
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(ChatContextProvider, { icons, labels, open: true, setOpen: () => {
1858
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)("div", { className: `copilotKitChat ${className}`, children }) });
1868
1859
  }
1869
- return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_jsx_runtime16.Fragment, { children });
1860
+ return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_jsx_runtime15.Fragment, { children });
1870
1861
  }
1871
1862
  var SUGGESTIONS_DEBOUNCE_TIMEOUT = 1e3;
1872
1863
  var useCopilotChatLogic = (makeSystemMessage, onInProgress, onSubmitMessage, onStopGeneration, onReloadMessages) => {