@copilotkit/react-ui 0.0.0-0.0.0-max-changeset-10101010101010-20260109191632
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17415 -0
- package/LICENSE +21 -0
- package/README.md +141 -0
- package/dist/chunk-3W6J75HS.mjs +126 -0
- package/dist/chunk-3W6J75HS.mjs.map +1 -0
- package/dist/chunk-54JAUBUJ.mjs +26 -0
- package/dist/chunk-54JAUBUJ.mjs.map +1 -0
- package/dist/chunk-7OURDQZJ.mjs +133 -0
- package/dist/chunk-7OURDQZJ.mjs.map +1 -0
- package/dist/chunk-7PR2KJDO.mjs +222 -0
- package/dist/chunk-7PR2KJDO.mjs.map +1 -0
- package/dist/chunk-BH6PCAAL.mjs +81 -0
- package/dist/chunk-BH6PCAAL.mjs.map +1 -0
- package/dist/chunk-C3GSYRC3.mjs +118 -0
- package/dist/chunk-C3GSYRC3.mjs.map +1 -0
- package/dist/chunk-DBKRAOH7.mjs +34 -0
- package/dist/chunk-DBKRAOH7.mjs.map +1 -0
- package/dist/chunk-EFZPSZWO.mjs +1 -0
- package/dist/chunk-EFZPSZWO.mjs.map +1 -0
- package/dist/chunk-ELGRNEAO.mjs +32 -0
- package/dist/chunk-ELGRNEAO.mjs.map +1 -0
- package/dist/chunk-ELUJRANC.mjs +21 -0
- package/dist/chunk-ELUJRANC.mjs.map +1 -0
- package/dist/chunk-FFJHOZX6.mjs +202 -0
- package/dist/chunk-FFJHOZX6.mjs.map +1 -0
- package/dist/chunk-GDSZGYCE.mjs +32 -0
- package/dist/chunk-GDSZGYCE.mjs.map +1 -0
- package/dist/chunk-HIW7RXCD.mjs +184 -0
- package/dist/chunk-HIW7RXCD.mjs.map +1 -0
- package/dist/chunk-IEMQ2SQW.mjs +93 -0
- package/dist/chunk-IEMQ2SQW.mjs.map +1 -0
- package/dist/chunk-IHFR6PYG.mjs +116 -0
- package/dist/chunk-IHFR6PYG.mjs.map +1 -0
- package/dist/chunk-IK2BPURM.mjs +400 -0
- package/dist/chunk-IK2BPURM.mjs.map +1 -0
- package/dist/chunk-IU3WTXLQ.mjs +1 -0
- package/dist/chunk-IU3WTXLQ.mjs.map +1 -0
- package/dist/chunk-JGMFJZMG.mjs +11 -0
- package/dist/chunk-JGMFJZMG.mjs.map +1 -0
- package/dist/chunk-JY2CSDKN.mjs +135 -0
- package/dist/chunk-JY2CSDKN.mjs.map +1 -0
- package/dist/chunk-JZ3RFQQ6.mjs +128 -0
- package/dist/chunk-JZ3RFQQ6.mjs.map +1 -0
- package/dist/chunk-KXE2JCUH.mjs +1 -0
- package/dist/chunk-KXE2JCUH.mjs.map +1 -0
- package/dist/chunk-LQEFRHRT.mjs +30 -0
- package/dist/chunk-LQEFRHRT.mjs.map +1 -0
- package/dist/chunk-MMVDU6DF.mjs +1 -0
- package/dist/chunk-MMVDU6DF.mjs.map +1 -0
- package/dist/chunk-MRXNTQOX.mjs +59 -0
- package/dist/chunk-MRXNTQOX.mjs.map +1 -0
- package/dist/chunk-NCIAFFQ2.mjs +82 -0
- package/dist/chunk-NCIAFFQ2.mjs.map +1 -0
- package/dist/chunk-NGJ32FAP.mjs +30 -0
- package/dist/chunk-NGJ32FAP.mjs.map +1 -0
- package/dist/chunk-NRA3CFEE.mjs +97 -0
- package/dist/chunk-NRA3CFEE.mjs.map +1 -0
- package/dist/chunk-O72ZB5V3.mjs +140 -0
- package/dist/chunk-O72ZB5V3.mjs.map +1 -0
- package/dist/chunk-PLHTVHUW.mjs +82 -0
- package/dist/chunk-PLHTVHUW.mjs.map +1 -0
- package/dist/chunk-Q5V6S67N.mjs +103 -0
- package/dist/chunk-Q5V6S67N.mjs.map +1 -0
- package/dist/chunk-QB3GUN2N.mjs +31 -0
- package/dist/chunk-QB3GUN2N.mjs.map +1 -0
- package/dist/chunk-QIOJXTIQ.mjs +64 -0
- package/dist/chunk-QIOJXTIQ.mjs.map +1 -0
- package/dist/chunk-QPQRLXN3.mjs +435 -0
- package/dist/chunk-QPQRLXN3.mjs.map +1 -0
- package/dist/chunk-RYUCX3ZK.mjs +32 -0
- package/dist/chunk-RYUCX3ZK.mjs.map +1 -0
- package/dist/chunk-SC6JRFAJ.mjs +1 -0
- package/dist/chunk-SC6JRFAJ.mjs.map +1 -0
- package/dist/chunk-T26KLXLH.mjs +1 -0
- package/dist/chunk-T26KLXLH.mjs.map +1 -0
- package/dist/chunk-UFN2VWSR.mjs +25 -0
- package/dist/chunk-UFN2VWSR.mjs.map +1 -0
- package/dist/chunk-V7W6IM2V.mjs +1 -0
- package/dist/chunk-V7W6IM2V.mjs.map +1 -0
- package/dist/chunk-WB3YULQ4.mjs +1 -0
- package/dist/chunk-WB3YULQ4.mjs.map +1 -0
- package/dist/chunk-XWG3L6QC.mjs +258 -0
- package/dist/chunk-XWG3L6QC.mjs.map +1 -0
- package/dist/chunk-Y4FKRAKJ.mjs +12 -0
- package/dist/chunk-Y4FKRAKJ.mjs.map +1 -0
- package/dist/components/chat/Button.d.ts +9 -0
- package/dist/components/chat/Button.js +71 -0
- package/dist/components/chat/Button.js.map +1 -0
- package/dist/components/chat/Button.mjs +10 -0
- package/dist/components/chat/Button.mjs.map +1 -0
- package/dist/components/chat/Chat.d.ts +204 -0
- package/dist/components/chat/Chat.js +2270 -0
- package/dist/components/chat/Chat.js.map +1 -0
- package/dist/components/chat/Chat.mjs +29 -0
- package/dist/components/chat/Chat.mjs.map +1 -0
- package/dist/components/chat/ChatContext.d.ts +145 -0
- package/dist/components/chat/ChatContext.js +329 -0
- package/dist/components/chat/ChatContext.js.map +1 -0
- package/dist/components/chat/ChatContext.mjs +13 -0
- package/dist/components/chat/ChatContext.mjs.map +1 -0
- package/dist/components/chat/CodeBlock.d.ts +14 -0
- package/dist/components/chat/CodeBlock.js +510 -0
- package/dist/components/chat/CodeBlock.js.map +1 -0
- package/dist/components/chat/CodeBlock.mjs +14 -0
- package/dist/components/chat/CodeBlock.mjs.map +1 -0
- package/dist/components/chat/Header.d.ts +9 -0
- package/dist/components/chat/Header.js +582 -0
- package/dist/components/chat/Header.js.map +1 -0
- package/dist/components/chat/Header.mjs +17 -0
- package/dist/components/chat/Header.mjs.map +1 -0
- package/dist/components/chat/Icons.d.ts +20 -0
- package/dist/components/chat/Icons.js +297 -0
- package/dist/components/chat/Icons.js.map +1 -0
- package/dist/components/chat/Icons.mjs +38 -0
- package/dist/components/chat/Icons.mjs.map +1 -0
- package/dist/components/chat/ImageUploadQueue.d.ts +13 -0
- package/dist/components/chat/ImageUploadQueue.js +106 -0
- package/dist/components/chat/ImageUploadQueue.js.map +1 -0
- package/dist/components/chat/ImageUploadQueue.mjs +8 -0
- package/dist/components/chat/ImageUploadQueue.mjs.map +1 -0
- package/dist/components/chat/Input.d.ts +9 -0
- package/dist/components/chat/Input.js +396 -0
- package/dist/components/chat/Input.js.map +1 -0
- package/dist/components/chat/Input.mjs +14 -0
- package/dist/components/chat/Input.mjs.map +1 -0
- package/dist/components/chat/Markdown.d.ts +10 -0
- package/dist/components/chat/Markdown.js +652 -0
- package/dist/components/chat/Markdown.js.map +1 -0
- package/dist/components/chat/Markdown.mjs +11 -0
- package/dist/components/chat/Markdown.mjs.map +1 -0
- package/dist/components/chat/Messages.d.ts +13 -0
- package/dist/components/chat/Messages.js +1195 -0
- package/dist/components/chat/Messages.js.map +1 -0
- package/dist/components/chat/Messages.mjs +20 -0
- package/dist/components/chat/Messages.mjs.map +1 -0
- package/dist/components/chat/Modal.d.ts +51 -0
- package/dist/components/chat/Modal.js +3075 -0
- package/dist/components/chat/Modal.js.map +1 -0
- package/dist/components/chat/Modal.mjs +38 -0
- package/dist/components/chat/Modal.mjs.map +1 -0
- package/dist/components/chat/Popup.d.ts +13 -0
- package/dist/components/chat/Popup.js +3086 -0
- package/dist/components/chat/Popup.js.map +1 -0
- package/dist/components/chat/Popup.mjs +39 -0
- package/dist/components/chat/Popup.mjs.map +1 -0
- package/dist/components/chat/PoweredByTag.d.ts +7 -0
- package/dist/components/chat/PoweredByTag.js +61 -0
- package/dist/components/chat/PoweredByTag.js.map +1 -0
- package/dist/components/chat/PoweredByTag.mjs +9 -0
- package/dist/components/chat/PoweredByTag.mjs.map +1 -0
- package/dist/components/chat/Sidebar.d.ts +13 -0
- package/dist/components/chat/Sidebar.js +3095 -0
- package/dist/components/chat/Sidebar.js.map +1 -0
- package/dist/components/chat/Sidebar.mjs +39 -0
- package/dist/components/chat/Sidebar.mjs.map +1 -0
- package/dist/components/chat/Suggestion.d.ts +12 -0
- package/dist/components/chat/Suggestion.js +56 -0
- package/dist/components/chat/Suggestion.js.map +1 -0
- package/dist/components/chat/Suggestion.mjs +9 -0
- package/dist/components/chat/Suggestion.mjs.map +1 -0
- package/dist/components/chat/Suggestions.d.ts +9 -0
- package/dist/components/chat/Suggestions.js +81 -0
- package/dist/components/chat/Suggestions.js.map +1 -0
- package/dist/components/chat/Suggestions.mjs +10 -0
- package/dist/components/chat/Suggestions.mjs.map +1 -0
- package/dist/components/chat/Textarea.d.ts +15 -0
- package/dist/components/chat/Textarea.js +84 -0
- package/dist/components/chat/Textarea.js.map +1 -0
- package/dist/components/chat/Textarea.mjs +8 -0
- package/dist/components/chat/Textarea.mjs.map +1 -0
- package/dist/components/chat/Window.d.ts +9 -0
- package/dist/components/chat/Window.js +164 -0
- package/dist/components/chat/Window.js.map +1 -0
- package/dist/components/chat/Window.mjs +10 -0
- package/dist/components/chat/Window.mjs.map +1 -0
- package/dist/components/chat/index.d.ts +18 -0
- package/dist/components/chat/index.js +3122 -0
- package/dist/components/chat/index.js.map +1 -0
- package/dist/components/chat/index.mjs +69 -0
- package/dist/components/chat/index.mjs.map +1 -0
- package/dist/components/chat/messages/AssistantMessage.d.ts +9 -0
- package/dist/components/chat/messages/AssistantMessage.js +775 -0
- package/dist/components/chat/messages/AssistantMessage.js.map +1 -0
- package/dist/components/chat/messages/AssistantMessage.mjs +13 -0
- package/dist/components/chat/messages/AssistantMessage.mjs.map +1 -0
- package/dist/components/chat/messages/ErrorMessage.d.ts +9 -0
- package/dist/components/chat/messages/ErrorMessage.js +722 -0
- package/dist/components/chat/messages/ErrorMessage.js.map +1 -0
- package/dist/components/chat/messages/ErrorMessage.mjs +66 -0
- package/dist/components/chat/messages/ErrorMessage.mjs.map +1 -0
- package/dist/components/chat/messages/ImageRenderer.d.ts +12 -0
- package/dist/components/chat/messages/ImageRenderer.js +58 -0
- package/dist/components/chat/messages/ImageRenderer.js.map +1 -0
- package/dist/components/chat/messages/ImageRenderer.mjs +8 -0
- package/dist/components/chat/messages/ImageRenderer.mjs.map +1 -0
- package/dist/components/chat/messages/LegacyRenderMessage.d.ts +28 -0
- package/dist/components/chat/messages/LegacyRenderMessage.js +1023 -0
- package/dist/components/chat/messages/LegacyRenderMessage.js.map +1 -0
- package/dist/components/chat/messages/LegacyRenderMessage.mjs +17 -0
- package/dist/components/chat/messages/LegacyRenderMessage.mjs.map +1 -0
- package/dist/components/chat/messages/RenderMessage.d.ts +9 -0
- package/dist/components/chat/messages/RenderMessage.js +898 -0
- package/dist/components/chat/messages/RenderMessage.js.map +1 -0
- package/dist/components/chat/messages/RenderMessage.mjs +16 -0
- package/dist/components/chat/messages/RenderMessage.mjs.map +1 -0
- package/dist/components/chat/messages/UserMessage.d.ts +9 -0
- package/dist/components/chat/messages/UserMessage.js +56 -0
- package/dist/components/chat/messages/UserMessage.js.map +1 -0
- package/dist/components/chat/messages/UserMessage.mjs +8 -0
- package/dist/components/chat/messages/UserMessage.mjs.map +1 -0
- package/dist/components/chat/props.d.ts +298 -0
- package/dist/components/chat/props.js +19 -0
- package/dist/components/chat/props.js.map +1 -0
- package/dist/components/chat/props.mjs +2 -0
- package/dist/components/chat/props.mjs.map +1 -0
- package/dist/components/dev-console/console.d.ts +11 -0
- package/dist/components/dev-console/console.js +537 -0
- package/dist/components/dev-console/console.js.map +1 -0
- package/dist/components/dev-console/console.mjs +17 -0
- package/dist/components/dev-console/console.mjs.map +1 -0
- package/dist/components/dev-console/icons.d.ts +9 -0
- package/dist/components/dev-console/icons.js +131 -0
- package/dist/components/dev-console/icons.js.map +1 -0
- package/dist/components/dev-console/icons.mjs +16 -0
- package/dist/components/dev-console/icons.mjs.map +1 -0
- package/dist/components/dev-console/index.d.ts +3 -0
- package/dist/components/dev-console/index.js +537 -0
- package/dist/components/dev-console/index.js.map +1 -0
- package/dist/components/dev-console/index.mjs +18 -0
- package/dist/components/dev-console/index.mjs.map +1 -0
- package/dist/components/dev-console/types.d.ts +9 -0
- package/dist/components/dev-console/types.js +19 -0
- package/dist/components/dev-console/types.js.map +1 -0
- package/dist/components/dev-console/types.mjs +1 -0
- package/dist/components/dev-console/types.mjs.map +1 -0
- package/dist/components/dev-console/utils.d.ts +10 -0
- package/dist/components/dev-console/utils.js +177 -0
- package/dist/components/dev-console/utils.js.map +1 -0
- package/dist/components/dev-console/utils.mjs +16 -0
- package/dist/components/dev-console/utils.mjs.map +1 -0
- package/dist/components/help-modal/icons.d.ts +9 -0
- package/dist/components/help-modal/icons.js +107 -0
- package/dist/components/help-modal/icons.js.map +1 -0
- package/dist/components/help-modal/icons.mjs +12 -0
- package/dist/components/help-modal/icons.mjs.map +1 -0
- package/dist/components/help-modal/index.d.ts +2 -0
- package/dist/components/help-modal/index.js +137 -0
- package/dist/components/help-modal/index.js.map +1 -0
- package/dist/components/help-modal/index.mjs +10 -0
- package/dist/components/help-modal/index.mjs.map +1 -0
- package/dist/components/help-modal/modal.d.ts +5 -0
- package/dist/components/help-modal/modal.js +135 -0
- package/dist/components/help-modal/modal.js.map +1 -0
- package/dist/components/help-modal/modal.mjs +9 -0
- package/dist/components/help-modal/modal.mjs.map +1 -0
- package/dist/components/index.d.ts +19 -0
- package/dist/components/index.js +3126 -0
- package/dist/components/index.js.map +1 -0
- package/dist/components/index.mjs +76 -0
- package/dist/components/index.mjs.map +1 -0
- package/dist/context/index.d.ts +2 -0
- package/dist/context/index.js +19 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/index.mjs +2 -0
- package/dist/context/index.mjs.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +36 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.mjs +9 -0
- package/dist/hooks/index.mjs.map +1 -0
- package/dist/hooks/use-copilot-chat-suggestions.d.ts +66 -0
- package/dist/hooks/use-copilot-chat-suggestions.js +34 -0
- package/dist/hooks/use-copilot-chat-suggestions.js.map +1 -0
- package/dist/hooks/use-copilot-chat-suggestions.mjs +8 -0
- package/dist/hooks/use-copilot-chat-suggestions.mjs.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +9 -0
- package/dist/hooks/use-copy-to-clipboard.js +60 -0
- package/dist/hooks/use-copy-to-clipboard.js.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.mjs +8 -0
- package/dist/hooks/use-copy-to-clipboard.mjs.map +1 -0
- package/dist/hooks/use-dark-mode.d.ts +3 -0
- package/dist/hooks/use-dark-mode.js +35 -0
- package/dist/hooks/use-dark-mode.js.map +1 -0
- package/dist/hooks/use-dark-mode.mjs +8 -0
- package/dist/hooks/use-dark-mode.mjs.map +1 -0
- package/dist/hooks/use-push-to-talk.d.ts +19 -0
- package/dist/hooks/use-push-to-talk.js +195 -0
- package/dist/hooks/use-push-to-talk.js.map +1 -0
- package/dist/hooks/use-push-to-talk.mjs +12 -0
- package/dist/hooks/use-push-to-talk.mjs.map +1 -0
- package/dist/index.css +1258 -0
- package/dist/index.css.map +1 -0
- package/dist/index.d.ts +21 -0
- package/dist/index.js +3135 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +84 -0
- package/dist/index.mjs.map +1 -0
- package/dist/lib/utils.d.ts +4 -0
- package/dist/lib/utils.js +76 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/lib/utils.mjs +34 -0
- package/dist/lib/utils.mjs.map +1 -0
- package/dist/types/css.d.ts +22 -0
- package/dist/types/css.js +19 -0
- package/dist/types/css.js.map +1 -0
- package/dist/types/css.mjs +1 -0
- package/dist/types/css.mjs.map +1 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +19 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/index.mjs +2 -0
- package/dist/types/index.mjs.map +1 -0
- package/dist/types/suggestions.d.ts +9 -0
- package/dist/types/suggestions.js +19 -0
- package/dist/types/suggestions.js.map +1 -0
- package/dist/types/suggestions.mjs +1 -0
- package/dist/types/suggestions.mjs.map +1 -0
- package/dist/v2/index.css +4 -0
- package/dist/v2/index.css.map +1 -0
- package/dist/v2/index.d.ts +2 -0
- package/dist/v2/index.js +2 -0
- package/dist/v2/index.js.map +1 -0
- package/dist/v2/index.mjs +2 -0
- package/dist/v2/index.mjs.map +1 -0
- package/jest.config.js +5 -0
- package/package.json +83 -0
- package/postcss.config.js +60 -0
- package/src/components/chat/Button.tsx +18 -0
- package/src/components/chat/Chat.tsx +795 -0
- package/src/components/chat/ChatContext.tsx +248 -0
- package/src/components/chat/CodeBlock.tsx +418 -0
- package/src/components/chat/Header.tsx +24 -0
- package/src/components/chat/Icons.tsx +237 -0
- package/src/components/chat/ImageUploadQueue.tsx +77 -0
- package/src/components/chat/Input.tsx +156 -0
- package/src/components/chat/Markdown.tsx +144 -0
- package/src/components/chat/Messages.tsx +206 -0
- package/src/components/chat/Modal.tsx +220 -0
- package/src/components/chat/Popup.tsx +77 -0
- package/src/components/chat/PoweredByTag.tsx +42 -0
- package/src/components/chat/Sidebar.tsx +96 -0
- package/src/components/chat/Suggestion.tsx +29 -0
- package/src/components/chat/Suggestions.tsx +23 -0
- package/src/components/chat/Textarea.tsx +77 -0
- package/src/components/chat/Window.tsx +152 -0
- package/src/components/chat/index.tsx +11 -0
- package/src/components/chat/messages/AssistantMessage.tsx +118 -0
- package/src/components/chat/messages/ErrorMessage.tsx +59 -0
- package/src/components/chat/messages/ImageRenderer.tsx +37 -0
- package/src/components/chat/messages/LegacyRenderMessage.tsx +150 -0
- package/src/components/chat/messages/RenderMessage.tsx +61 -0
- package/src/components/chat/messages/UserMessage.tsx +46 -0
- package/src/components/chat/props.ts +353 -0
- package/src/components/dev-console/console.tsx +242 -0
- package/src/components/dev-console/icons.tsx +99 -0
- package/src/components/dev-console/index.tsx +2 -0
- package/src/components/dev-console/types.ts +7 -0
- package/src/components/dev-console/utils.ts +142 -0
- package/src/components/help-modal/icons.tsx +68 -0
- package/src/components/help-modal/index.tsx +1 -0
- package/src/components/help-modal/modal.tsx +101 -0
- package/src/components/index.ts +2 -0
- package/src/context/index.ts +1 -0
- package/src/css/animations.css +35 -0
- package/src/css/button.css +67 -0
- package/src/css/colors.css +78 -0
- package/src/css/console.css +166 -0
- package/src/css/crew.css +277 -0
- package/src/css/header.css +65 -0
- package/src/css/input.css +152 -0
- package/src/css/markdown.css +150 -0
- package/src/css/messages.css +244 -0
- package/src/css/panel.css +39 -0
- package/src/css/popup.css +22 -0
- package/src/css/sidebar.css +34 -0
- package/src/css/suggestions.css +43 -0
- package/src/css/window.css +60 -0
- package/src/hooks/index.ts +1 -0
- package/src/hooks/use-copilot-chat-suggestions.tsx +71 -0
- package/src/hooks/use-copy-to-clipboard.tsx +29 -0
- package/src/hooks/use-dark-mode.ts +10 -0
- package/src/hooks/use-push-to-talk.tsx +167 -0
- package/src/index.tsx +7 -0
- package/src/lib/utils.test.ts +7 -0
- package/src/lib/utils.ts +27 -0
- package/src/styles.css +14 -0
- package/src/types/css.ts +21 -0
- package/src/types/index.ts +2 -0
- package/src/types/suggestions.ts +7 -0
- package/src/v2/index.ts +1 -0
- package/src/v2/styles.css +1 -0
- package/tailwind.config.js +7 -0
- package/tsconfig.json +12 -0
- package/tsup.config.ts +11 -0
- package/typedoc.json +4 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
// src/components/chat/Icons.tsx
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
var OpenIcon = /* @__PURE__ */ jsx(
|
|
4
|
+
"svg",
|
|
5
|
+
{
|
|
6
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
7
|
+
viewBox: "0 0 24 24",
|
|
8
|
+
fill: "currentColor",
|
|
9
|
+
width: "24",
|
|
10
|
+
height: "24",
|
|
11
|
+
children: /* @__PURE__ */ jsx("g", { transform: "translate(24, 0) scale(-1, 1)", children: /* @__PURE__ */ jsx(
|
|
12
|
+
"path",
|
|
13
|
+
{
|
|
14
|
+
fillRule: "evenodd",
|
|
15
|
+
d: "M5.337 21.718a6.707 6.707 0 01-.533-.074.75.75 0 01-.44-1.223 3.73 3.73 0 00.814-1.686c.023-.115-.022-.317-.254-.543C3.274 16.587 2.25 14.41 2.25 12c0-5.03 4.428-9 9.75-9s9.75 3.97 9.75 9c0 5.03-4.428 9-9.75 9-.833 0-1.643-.097-2.417-.279a6.721 6.721 0 01-4.246.997z",
|
|
16
|
+
clipRule: "evenodd"
|
|
17
|
+
}
|
|
18
|
+
) })
|
|
19
|
+
}
|
|
20
|
+
);
|
|
21
|
+
var CloseIcon = /* @__PURE__ */ jsx(
|
|
22
|
+
"svg",
|
|
23
|
+
{
|
|
24
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
25
|
+
fill: "none",
|
|
26
|
+
viewBox: "0 0 24 24",
|
|
27
|
+
strokeWidth: "1.5",
|
|
28
|
+
stroke: "currentColor",
|
|
29
|
+
width: "24",
|
|
30
|
+
height: "24",
|
|
31
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M19.5 8.25l-7.5 7.5-7.5-7.5" })
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
var HeaderCloseIcon = /* @__PURE__ */ jsx(
|
|
35
|
+
"svg",
|
|
36
|
+
{
|
|
37
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
38
|
+
fill: "none",
|
|
39
|
+
viewBox: "0 0 24 24",
|
|
40
|
+
strokeWidth: "1.5",
|
|
41
|
+
stroke: "currentColor",
|
|
42
|
+
width: "24",
|
|
43
|
+
height: "24",
|
|
44
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M6 18L18 6M6 6l12 12" })
|
|
45
|
+
}
|
|
46
|
+
);
|
|
47
|
+
var SendIcon = /* @__PURE__ */ jsx(
|
|
48
|
+
"svg",
|
|
49
|
+
{
|
|
50
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
51
|
+
fill: "none",
|
|
52
|
+
viewBox: "0 0 24 24",
|
|
53
|
+
strokeWidth: "1.5",
|
|
54
|
+
stroke: "currentColor",
|
|
55
|
+
width: "24",
|
|
56
|
+
height: "24",
|
|
57
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 19V5m0 0l-7 7m7-7l7 7" })
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
var MicrophoneIcon = /* @__PURE__ */ jsx(
|
|
61
|
+
"svg",
|
|
62
|
+
{
|
|
63
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
64
|
+
fill: "none",
|
|
65
|
+
viewBox: "0 0 24 24",
|
|
66
|
+
strokeWidth: "1.5",
|
|
67
|
+
stroke: "currentColor",
|
|
68
|
+
width: "24",
|
|
69
|
+
height: "24",
|
|
70
|
+
children: /* @__PURE__ */ jsx(
|
|
71
|
+
"path",
|
|
72
|
+
{
|
|
73
|
+
strokeLinecap: "round",
|
|
74
|
+
strokeLinejoin: "round",
|
|
75
|
+
d: "M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z"
|
|
76
|
+
}
|
|
77
|
+
)
|
|
78
|
+
}
|
|
79
|
+
);
|
|
80
|
+
var StopIcon = /* @__PURE__ */ jsx(
|
|
81
|
+
"svg",
|
|
82
|
+
{
|
|
83
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
84
|
+
fill: "none",
|
|
85
|
+
viewBox: "0 0 24 24",
|
|
86
|
+
strokeWidth: "1.5",
|
|
87
|
+
stroke: "currentColor",
|
|
88
|
+
width: "24",
|
|
89
|
+
height: "24",
|
|
90
|
+
children: /* @__PURE__ */ jsx(
|
|
91
|
+
"path",
|
|
92
|
+
{
|
|
93
|
+
strokeLinecap: "round",
|
|
94
|
+
strokeLinejoin: "round",
|
|
95
|
+
d: "M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z"
|
|
96
|
+
}
|
|
97
|
+
)
|
|
98
|
+
}
|
|
99
|
+
);
|
|
100
|
+
var RegenerateIcon = /* @__PURE__ */ jsx(
|
|
101
|
+
"svg",
|
|
102
|
+
{
|
|
103
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
104
|
+
fill: "none",
|
|
105
|
+
viewBox: "0 0 24 24",
|
|
106
|
+
strokeWidth: "2",
|
|
107
|
+
stroke: "currentColor",
|
|
108
|
+
width: "16",
|
|
109
|
+
height: "16",
|
|
110
|
+
style: { minWidth: "16px", minHeight: "16px" },
|
|
111
|
+
children: /* @__PURE__ */ jsx(
|
|
112
|
+
"path",
|
|
113
|
+
{
|
|
114
|
+
strokeLinecap: "round",
|
|
115
|
+
strokeLinejoin: "round",
|
|
116
|
+
d: "M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99"
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
);
|
|
121
|
+
var CopyIcon = /* @__PURE__ */ jsx(
|
|
122
|
+
"svg",
|
|
123
|
+
{
|
|
124
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
125
|
+
fill: "none",
|
|
126
|
+
viewBox: "0 0 24 24",
|
|
127
|
+
strokeWidth: "2",
|
|
128
|
+
stroke: "currentColor",
|
|
129
|
+
width: "16",
|
|
130
|
+
height: "16",
|
|
131
|
+
style: { minWidth: "16px", minHeight: "16px" },
|
|
132
|
+
children: /* @__PURE__ */ jsx(
|
|
133
|
+
"path",
|
|
134
|
+
{
|
|
135
|
+
strokeLinecap: "round",
|
|
136
|
+
strokeLinejoin: "round",
|
|
137
|
+
d: "M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5a3.375 3.375 0 00-3.375-3.375H9.75"
|
|
138
|
+
}
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
);
|
|
142
|
+
var SmallSpinnerIcon = /* @__PURE__ */ jsx("span", { className: "copilotKitSpinner", style: { width: "13px", height: "13px" } });
|
|
143
|
+
var SpinnerIcon = /* @__PURE__ */ jsx("span", { className: "copilotKitSpinner", style: { width: "24px", height: "24px" } });
|
|
144
|
+
var ActivityIcon = /* @__PURE__ */ jsxs("div", { style: { display: "flex", alignItems: "center", gap: "4px" }, children: [
|
|
145
|
+
/* @__PURE__ */ jsx("span", { className: "copilotKitActivityDot", style: { animationDelay: "0s" } }),
|
|
146
|
+
/* @__PURE__ */ jsx("span", { className: "copilotKitActivityDot", style: { animationDelay: "0.2s" } }),
|
|
147
|
+
/* @__PURE__ */ jsx("span", { className: "copilotKitActivityDot", style: { animationDelay: "0.4s" } })
|
|
148
|
+
] });
|
|
149
|
+
var ThumbsUpIcon = /* @__PURE__ */ jsx(
|
|
150
|
+
"svg",
|
|
151
|
+
{
|
|
152
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
153
|
+
fill: "none",
|
|
154
|
+
viewBox: "0 0 24 24",
|
|
155
|
+
strokeWidth: "2",
|
|
156
|
+
stroke: "currentColor",
|
|
157
|
+
width: "16",
|
|
158
|
+
height: "16",
|
|
159
|
+
style: { minWidth: "16px", minHeight: "16px" },
|
|
160
|
+
children: /* @__PURE__ */ jsx(
|
|
161
|
+
"path",
|
|
162
|
+
{
|
|
163
|
+
strokeLinecap: "round",
|
|
164
|
+
strokeLinejoin: "round",
|
|
165
|
+
d: "M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z"
|
|
166
|
+
}
|
|
167
|
+
)
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
var ThumbsDownIcon = /* @__PURE__ */ jsx(
|
|
171
|
+
"svg",
|
|
172
|
+
{
|
|
173
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
174
|
+
fill: "none",
|
|
175
|
+
viewBox: "0 0 24 24",
|
|
176
|
+
strokeWidth: "2",
|
|
177
|
+
stroke: "currentColor",
|
|
178
|
+
width: "16",
|
|
179
|
+
height: "16",
|
|
180
|
+
style: { minWidth: "16px", minHeight: "16px" },
|
|
181
|
+
children: /* @__PURE__ */ jsx(
|
|
182
|
+
"path",
|
|
183
|
+
{
|
|
184
|
+
strokeLinecap: "round",
|
|
185
|
+
strokeLinejoin: "round",
|
|
186
|
+
d: "M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384"
|
|
187
|
+
}
|
|
188
|
+
)
|
|
189
|
+
}
|
|
190
|
+
);
|
|
191
|
+
var DownloadIcon = /* @__PURE__ */ jsx(
|
|
192
|
+
"svg",
|
|
193
|
+
{
|
|
194
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
195
|
+
fill: "none",
|
|
196
|
+
viewBox: "0 0 24 24",
|
|
197
|
+
strokeWidth: "2",
|
|
198
|
+
stroke: "currentColor",
|
|
199
|
+
width: "16",
|
|
200
|
+
height: "16",
|
|
201
|
+
style: { minWidth: "16px", minHeight: "16px" },
|
|
202
|
+
children: /* @__PURE__ */ jsx(
|
|
203
|
+
"path",
|
|
204
|
+
{
|
|
205
|
+
strokeLinecap: "round",
|
|
206
|
+
strokeLinejoin: "round",
|
|
207
|
+
d: "M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3"
|
|
208
|
+
}
|
|
209
|
+
)
|
|
210
|
+
}
|
|
211
|
+
);
|
|
212
|
+
var UploadIcon = /* @__PURE__ */ jsx(
|
|
213
|
+
"svg",
|
|
214
|
+
{
|
|
215
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
216
|
+
fill: "none",
|
|
217
|
+
viewBox: "0 0 24 24",
|
|
218
|
+
strokeWidth: "1.5",
|
|
219
|
+
stroke: "currentColor",
|
|
220
|
+
width: "24",
|
|
221
|
+
height: "24",
|
|
222
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M12 4.5v15m7.5-7.5h-15" })
|
|
223
|
+
}
|
|
224
|
+
);
|
|
225
|
+
var CheckIcon = /* @__PURE__ */ jsx(
|
|
226
|
+
"svg",
|
|
227
|
+
{
|
|
228
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
229
|
+
fill: "none",
|
|
230
|
+
viewBox: "0 0 24 24",
|
|
231
|
+
strokeWidth: "2",
|
|
232
|
+
stroke: "currentColor",
|
|
233
|
+
width: "16",
|
|
234
|
+
height: "16",
|
|
235
|
+
style: { minWidth: "16px", minHeight: "16px" },
|
|
236
|
+
children: /* @__PURE__ */ jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", d: "M4.5 12.75l6 6 9-13.5" })
|
|
237
|
+
}
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
export {
|
|
241
|
+
OpenIcon,
|
|
242
|
+
CloseIcon,
|
|
243
|
+
HeaderCloseIcon,
|
|
244
|
+
SendIcon,
|
|
245
|
+
MicrophoneIcon,
|
|
246
|
+
StopIcon,
|
|
247
|
+
RegenerateIcon,
|
|
248
|
+
CopyIcon,
|
|
249
|
+
SmallSpinnerIcon,
|
|
250
|
+
SpinnerIcon,
|
|
251
|
+
ActivityIcon,
|
|
252
|
+
ThumbsUpIcon,
|
|
253
|
+
ThumbsDownIcon,
|
|
254
|
+
DownloadIcon,
|
|
255
|
+
UploadIcon,
|
|
256
|
+
CheckIcon
|
|
257
|
+
};
|
|
258
|
+
//# sourceMappingURL=chunk-XWG3L6QC.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/chat/Icons.tsx"],"sourcesContent":["import React from \"react\";\n\nexport const OpenIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n width=\"24\"\n height=\"24\"\n >\n <g transform=\"translate(24, 0) scale(-1, 1)\">\n <path\n fillRule=\"evenodd\"\n d=\"M5.337 21.718a6.707 6.707 0 01-.533-.074.75.75 0 01-.44-1.223 3.73 3.73 0 00.814-1.686c.023-.115-.022-.317-.254-.543C3.274 16.587 2.25 14.41 2.25 12c0-5.03 4.428-9 9.75-9s9.75 3.97 9.75 9c0 5.03-4.428 9-9.75 9-.833 0-1.643-.097-2.417-.279a6.721 6.721 0 01-4.246.997z\"\n clipRule=\"evenodd\"\n />\n </g>\n </svg>\n);\n\nexport const CloseIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"24\"\n height=\"24\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M19.5 8.25l-7.5 7.5-7.5-7.5\" />\n </svg>\n);\n\nexport const HeaderCloseIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"24\"\n height=\"24\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n);\n\nexport const SendIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"24\"\n height=\"24\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 19V5m0 0l-7 7m7-7l7 7\" />\n </svg>\n);\n\nexport const MicrophoneIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"24\"\n height=\"24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M12 18.75a6 6 0 006-6v-1.5m-6 7.5a6 6 0 01-6-6v-1.5m6 7.5v3.75m-3.75 0h7.5M12 15.75a3 3 0 01-3-3V4.5a3 3 0 116 0v8.25a3 3 0 01-3 3z\"\n />\n </svg>\n);\n\nexport const StopIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"24\"\n height=\"24\"\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M5.25 7.5A2.25 2.25 0 017.5 5.25h9a2.25 2.25 0 012.25 2.25v9a2.25 2.25 0 01-2.25 2.25h-9a2.25 2.25 0 01-2.25-2.25v-9z\"\n />\n </svg>\n);\n\nexport const RegenerateIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n width=\"16\"\n height=\"16\"\n style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M16.023 9.348h4.992v-.001M2.985 19.644v-4.992m0 0h4.992m-4.993 0l3.181 3.183a8.25 8.25 0 0013.803-3.7M4.031 9.865a8.25 8.25 0 0113.803-3.7l3.181 3.182m0-4.991v4.99\"\n />\n </svg>\n);\n\nexport const CopyIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n width=\"16\"\n height=\"16\"\n style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M15.75 17.25v3.375c0 .621-.504 1.125-1.125 1.125h-9.75a1.125 1.125 0 01-1.125-1.125V7.875c0-.621.504-1.125 1.125-1.125H6.75a9.06 9.06 0 011.5.124m7.5 10.376h3.375c.621 0 1.125-.504 1.125-1.125V11.25c0-4.46-3.243-8.161-7.5-8.876a9.06 9.06 0 00-1.5-.124H9.375c-.621 0-1.125.504-1.125 1.125v3.5m7.5 10.375H9.375a1.125 1.125 0 01-1.125-1.125v-9.25m12 6.625v-1.875a3.375 3.375 0 00-3.375-3.375h-1.5a1.125 1.125 0 01-1.125-1.125v-1.5a3.375 3.375 0 00-3.375-3.375H9.75\"\n />\n </svg>\n);\n\nexport const SmallSpinnerIcon = (\n <span className=\"copilotKitSpinner\" style={{ width: \"13px\", height: \"13px\" }}></span>\n);\n\nexport const SpinnerIcon = (\n <span className=\"copilotKitSpinner\" style={{ width: \"24px\", height: \"24px\" }}></span>\n);\n\nexport const ActivityIcon = (\n <div style={{ display: \"flex\", alignItems: \"center\", gap: \"4px\" }}>\n <span className=\"copilotKitActivityDot\" style={{ animationDelay: \"0s\" }}></span>\n <span className=\"copilotKitActivityDot\" style={{ animationDelay: \"0.2s\" }}></span>\n <span className=\"copilotKitActivityDot\" style={{ animationDelay: \"0.4s\" }}></span>\n </div>\n);\n\nexport const ThumbsUpIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n width=\"16\"\n height=\"16\"\n style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M6.633 10.5c.806 0 1.533-.446 2.031-1.08a9.041 9.041 0 012.861-2.4c.723-.384 1.35-.956 1.653-1.715a4.498 4.498 0 00.322-1.672V3a.75.75 0 01.75-.75A2.25 2.25 0 0116.5 4.5c0 1.152-.26 2.243-.723 3.218-.266.558.107 1.282.725 1.282h3.126c1.026 0 1.945.694 2.054 1.715.045.422.068.85.068 1.285a11.95 11.95 0 01-2.649 7.521c-.388.482-.987.729-1.605.729H13.48c-.483 0-.964-.078-1.423-.23l-3.114-1.04a4.501 4.501 0 00-1.423-.23H5.904M14.25 9h2.25M5.904 18.75c.083.205.173.405.27.602.197.4-.078.898-.523.898h-.908c-.889 0-1.713-.518-1.972-1.368a12 12 0 01-.521-3.507c0-1.553.295-3.036.831-4.398C3.387 10.203 4.167 9.75 5 9.75h1.053c.472 0 .745.556.5.96a8.958 8.958 0 00-1.302 4.665c0 1.194.232 2.333.654 3.375z\"\n />\n </svg>\n);\n\nexport const ThumbsDownIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n width=\"16\"\n height=\"16\"\n style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M7.5 15h2.25m8.024-9.75c.011.05.028.1.052.148.591 1.2.924 2.55.924 3.977a8.96 8.96 0 01-.999 4.125m.023-8.25c-.076-.365.183-.75.575-.75h.908c.889 0 1.713.518 1.972 1.368.339 1.11.521 2.287.521 3.507 0 1.553-.295 3.036-.831 4.398C20.613 14.547 19.833 15 19 15h-1.053c-.472 0-.745-.556-.5-.96a8.95 8.95 0 00.303-.54m.023-8.25H16.48a4.5 4.5 0 01-1.423-.23l-3.114-1.04a4.5 4.5 0 00-1.423-.23H6.504c-.618 0-1.217.247-1.605.729A11.95 11.95 0 002.25 12c0 .434.023.863.068 1.285C2.427 14.306 3.346 15 4.372 15h3.126c.618 0 .991.724.725 1.282A7.471 7.471 0 007.5 19.5a2.25 2.25 0 002.25 2.25.75.75 0 00.75-.75v-.633c0-.573.11-1.14.322-1.672.304-.76.93-1.33 1.653-1.715a9.04 9.04 0 002.86-2.4c.498-.634 1.226-1.08 2.032-1.08h.384\"\n />\n </svg>\n);\n\nexport const DownloadIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n width=\"16\"\n height=\"16\"\n style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n >\n <path\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n d=\"M3 16.5v2.25A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75V16.5M16.5 12L12 16.5m0 0L7.5 12m4.5 4.5V3\"\n />\n </svg>\n);\n\nexport const UploadIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"1.5\"\n stroke=\"currentColor\"\n width=\"24\"\n height=\"24\"\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M12 4.5v15m7.5-7.5h-15\" />\n </svg>\n);\n\nexport const CheckIcon = (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n fill=\"none\"\n viewBox=\"0 0 24 24\"\n strokeWidth=\"2\"\n stroke=\"currentColor\"\n width=\"16\"\n height=\"16\"\n style={{ minWidth: \"16px\", minHeight: \"16px\" }}\n >\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\" />\n </svg>\n);\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
// src/hooks/use-copilot-chat-suggestions.tsx
|
|
2
|
+
import {
|
|
3
|
+
useCopilotChatSuggestions as useCoreCopilotChatSuggestions
|
|
4
|
+
} from "@copilotkit/react-core";
|
|
5
|
+
function useCopilotChatSuggestions(config, dependencies = []) {
|
|
6
|
+
useCoreCopilotChatSuggestions(config, dependencies);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export {
|
|
10
|
+
useCopilotChatSuggestions
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=chunk-Y4FKRAKJ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/hooks/use-copilot-chat-suggestions.tsx"],"sourcesContent":["/**\n * <Callout type=\"warning\">\n * useCopilotChatSuggestions is experimental. The interface is not final and\n * can change without notice.\n * </Callout>\n *\n * `useCopilotReadable` is a React hook that provides app-state and other information\n * to the Copilot. Optionally, the hook can also handle hierarchical state within your\n * application, passing these parent-child relationships to the Copilot.\n *\n * <br/>\n * <img src=\"https://cdn.copilotkit.ai/docs/copilotkit/images/use-copilot-chat-suggestions/use-copilot-chat-suggestions.gif\" width=\"500\" />\n *\n * ## Usage\n *\n * ### Install Dependencies\n *\n * This component is part of the [@copilotkit/react-ui](https://npmjs.com/package/@copilotkit/react-ui) package.\n *\n * ```shell npm2yarn \\\"@copilotkit/react-ui\"\\\n * npm install @copilotkit/react-core @copilotkit/react-ui\n * ```\n *\n * ### Simple Usage\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * const [employees, setEmployees] = useState([]);\n *\n * useCopilotChatSuggestions({\n * instructions: `The following employees are on duty: ${JSON.stringify(employees)}`,\n * });\n * }\n * ```\n *\n * ### Dependency Management\n *\n * ```tsx\n * import { useCopilotChatSuggestions } from \"@copilotkit/react-ui\";\n *\n * export function MyComponent() {\n * useCopilotChatSuggestions(\n * {\n * instructions: \"Suggest the most relevant next actions.\",\n * },\n * [appState],\n * );\n * }\n * ```\n *\n * In the example above, the suggestions are generated based on the given instructions.\n * The hook monitors `appState`, and updates suggestions accordingly whenever it changes.\n *\n * ### Behavior and Lifecycle\n *\n * The hook registers the configuration with the chat context upon component mount and\n * removes it on unmount, ensuring a clean and efficient lifecycle management.\n */\nimport {\n useCopilotChatSuggestions as useCoreCopilotChatSuggestions,\n type UseCopilotChatSuggestionsConfiguration,\n} from \"@copilotkit/react-core\";\n\nexport function useCopilotChatSuggestions(\n config: UseCopilotChatSuggestionsConfiguration,\n dependencies: any[] = [],\n) {\n useCoreCopilotChatSuggestions(config, dependencies);\n}\n"],"mappings":";AA4DA;AAAA,EACE,6BAA6B;AAAA,OAExB;AAEA,SAAS,0BACd,QACA,eAAsB,CAAC,GACvB;AACA,gCAA8B,QAAQ,YAAY;AACpD;","names":[]}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { ButtonProps } from './props.js';
|
|
3
|
+
import '@copilotkit/shared';
|
|
4
|
+
import '../../types/suggestions.js';
|
|
5
|
+
import 'react';
|
|
6
|
+
|
|
7
|
+
declare const Button: ({}: ButtonProps) => react_jsx_runtime.JSX.Element;
|
|
8
|
+
|
|
9
|
+
export { Button };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __export = (target, all) => {
|
|
9
|
+
for (var name in all)
|
|
10
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
11
|
+
};
|
|
12
|
+
var __copyProps = (to, from, except, desc) => {
|
|
13
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
14
|
+
for (let key of __getOwnPropNames(from))
|
|
15
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
16
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
17
|
+
}
|
|
18
|
+
return to;
|
|
19
|
+
};
|
|
20
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
21
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
22
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
23
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
24
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
25
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
26
|
+
mod
|
|
27
|
+
));
|
|
28
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
+
|
|
30
|
+
// src/components/chat/Button.tsx
|
|
31
|
+
var Button_exports = {};
|
|
32
|
+
__export(Button_exports, {
|
|
33
|
+
Button: () => Button
|
|
34
|
+
});
|
|
35
|
+
module.exports = __toCommonJS(Button_exports);
|
|
36
|
+
|
|
37
|
+
// src/components/chat/ChatContext.tsx
|
|
38
|
+
var import_react = __toESM(require("react"));
|
|
39
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
40
|
+
var ChatContext = import_react.default.createContext(void 0);
|
|
41
|
+
function useChatContext() {
|
|
42
|
+
const context = import_react.default.useContext(ChatContext);
|
|
43
|
+
if (context === void 0) {
|
|
44
|
+
throw new Error(
|
|
45
|
+
"Context not found. Did you forget to wrap your app in a <ChatContextProvider> component?"
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
return context;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// src/components/chat/Button.tsx
|
|
52
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
53
|
+
var Button = ({}) => {
|
|
54
|
+
const { open, setOpen, icons } = useChatContext();
|
|
55
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { onClick: () => setOpen(!open), children: /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
56
|
+
"button",
|
|
57
|
+
{
|
|
58
|
+
className: `copilotKitButton ${open ? "open" : ""}`,
|
|
59
|
+
"aria-label": open ? "Close Chat" : "Open Chat",
|
|
60
|
+
children: [
|
|
61
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "copilotKitButtonIcon copilotKitButtonIconOpen", children: icons.openIcon }),
|
|
62
|
+
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("div", { className: "copilotKitButtonIcon copilotKitButtonIconClose", children: icons.closeIcon })
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
) });
|
|
66
|
+
};
|
|
67
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
68
|
+
0 && (module.exports = {
|
|
69
|
+
Button
|
|
70
|
+
});
|
|
71
|
+
//# sourceMappingURL=Button.js.map
|
|
@@ -0,0 +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\";\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 * The icon to use for the upload button.\n * @default <UploadIcon />\n */\n uploadIcon?: 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 uploadIcon: DefaultIcons.UploadIcon,\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;AAsPhC;AApFF,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;;;ADpKM,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"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { CopilotChatIcons, CopilotChatLabels } from './ChatContext.js';
|
|
3
|
+
import React__default from 'react';
|
|
4
|
+
import { ChatSuggestions, OnStopGeneration, OnReloadMessages, SystemMessageFunction } from '@copilotkit/react-core';
|
|
5
|
+
import { Message, CopilotErrorHandler } from '@copilotkit/shared';
|
|
6
|
+
import { ComponentsMap, AssistantMessageProps, UserMessageProps, ErrorMessageProps, MessagesProps, RenderMessageProps, RenderSuggestionsListProps, InputProps, ImageRendererProps, CopilotObservabilityHooks } from './props.js';
|
|
7
|
+
import '../../types/suggestions.js';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Props for CopilotChat component.
|
|
11
|
+
*/
|
|
12
|
+
interface CopilotChatProps {
|
|
13
|
+
/**
|
|
14
|
+
* Custom instructions to be added to the system message. Use this property to
|
|
15
|
+
* provide additional context or guidance to the language model, influencing
|
|
16
|
+
* its responses. These instructions can include specific directions,
|
|
17
|
+
* preferences, or criteria that the model should consider when generating
|
|
18
|
+
* its output, thereby tailoring the conversation more precisely to the
|
|
19
|
+
* user's needs or the application's requirements.
|
|
20
|
+
*/
|
|
21
|
+
instructions?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Controls the behavior of suggestions in the chat interface.
|
|
24
|
+
*
|
|
25
|
+
* `auto` (default) - Suggestions are generated automatically:
|
|
26
|
+
* - When the chat is first opened (empty state)
|
|
27
|
+
* - After each message exchange completes
|
|
28
|
+
* - Uses configuration from `useCopilotChatSuggestions` hooks
|
|
29
|
+
*
|
|
30
|
+
* `manual` - Suggestions are controlled programmatically:
|
|
31
|
+
* - Use `setSuggestions()` to set custom suggestions
|
|
32
|
+
* - Use `generateSuggestions()` to trigger AI generation
|
|
33
|
+
* - Access via `useCopilotChat` hook
|
|
34
|
+
*
|
|
35
|
+
* `SuggestionItem[]` - Static suggestions array:
|
|
36
|
+
* - Always shows the same suggestions
|
|
37
|
+
* - No AI generation involved
|
|
38
|
+
*/
|
|
39
|
+
suggestions?: ChatSuggestions;
|
|
40
|
+
/**
|
|
41
|
+
* A callback that gets called when the in progress state changes.
|
|
42
|
+
*/
|
|
43
|
+
onInProgress?: (inProgress: boolean) => void;
|
|
44
|
+
/**
|
|
45
|
+
* A callback that gets called when a new message it submitted.
|
|
46
|
+
*/
|
|
47
|
+
onSubmitMessage?: (message: string) => void | Promise<void>;
|
|
48
|
+
/**
|
|
49
|
+
* A custom stop generation function.
|
|
50
|
+
*/
|
|
51
|
+
onStopGeneration?: OnStopGeneration;
|
|
52
|
+
/**
|
|
53
|
+
* A custom reload messages function.
|
|
54
|
+
*/
|
|
55
|
+
onReloadMessages?: OnReloadMessages;
|
|
56
|
+
/**
|
|
57
|
+
* A callback function to regenerate the assistant's response
|
|
58
|
+
*/
|
|
59
|
+
onRegenerate?: (messageId: string) => void;
|
|
60
|
+
/**
|
|
61
|
+
* A callback function when the message is copied
|
|
62
|
+
*/
|
|
63
|
+
onCopy?: (message: string) => void;
|
|
64
|
+
/**
|
|
65
|
+
* A callback function for thumbs up feedback
|
|
66
|
+
*/
|
|
67
|
+
onThumbsUp?: (message: Message) => void;
|
|
68
|
+
/**
|
|
69
|
+
* A callback function for thumbs down feedback
|
|
70
|
+
*/
|
|
71
|
+
onThumbsDown?: (message: Message) => void;
|
|
72
|
+
/**
|
|
73
|
+
* A list of markdown components to render in assistant message.
|
|
74
|
+
* Useful when you want to render custom elements in the message (e.g a reference tag element)
|
|
75
|
+
*/
|
|
76
|
+
markdownTagRenderers?: ComponentsMap;
|
|
77
|
+
/**
|
|
78
|
+
* Icons can be used to set custom icons for the chat window.
|
|
79
|
+
*/
|
|
80
|
+
icons?: CopilotChatIcons;
|
|
81
|
+
/**
|
|
82
|
+
* Labels can be used to set custom labels for the chat window.
|
|
83
|
+
*/
|
|
84
|
+
labels?: CopilotChatLabels;
|
|
85
|
+
/**
|
|
86
|
+
* Enable image upload button (image inputs only supported on some models)
|
|
87
|
+
*/
|
|
88
|
+
imageUploadsEnabled?: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* The 'accept' attribute for the file input used for image uploads.
|
|
91
|
+
* Defaults to "image/*".
|
|
92
|
+
*/
|
|
93
|
+
inputFileAccept?: string;
|
|
94
|
+
/**
|
|
95
|
+
* A function that takes in context string and instructions and returns
|
|
96
|
+
* the system message to include in the chat request.
|
|
97
|
+
* Use this to completely override the system message, when providing
|
|
98
|
+
* instructions is not enough.
|
|
99
|
+
*/
|
|
100
|
+
makeSystemMessage?: SystemMessageFunction;
|
|
101
|
+
/**
|
|
102
|
+
* Disables inclusion of CopilotKit’s default system message. When true, no system message is sent (this also suppresses any custom message from <code>makeSystemMessage</code>).
|
|
103
|
+
*/
|
|
104
|
+
disableSystemMessage?: boolean;
|
|
105
|
+
/**
|
|
106
|
+
* A custom assistant message component to use instead of the default.
|
|
107
|
+
*/
|
|
108
|
+
AssistantMessage?: React__default.ComponentType<AssistantMessageProps>;
|
|
109
|
+
/**
|
|
110
|
+
* A custom user message component to use instead of the default.
|
|
111
|
+
*/
|
|
112
|
+
UserMessage?: React__default.ComponentType<UserMessageProps>;
|
|
113
|
+
/**
|
|
114
|
+
* A custom error message component to use instead of the default.
|
|
115
|
+
*/
|
|
116
|
+
ErrorMessage?: React__default.ComponentType<ErrorMessageProps>;
|
|
117
|
+
/**
|
|
118
|
+
* A custom Messages component to use instead of the default.
|
|
119
|
+
*/
|
|
120
|
+
Messages?: React__default.ComponentType<MessagesProps>;
|
|
121
|
+
/**
|
|
122
|
+
* @deprecated - use RenderMessage instead
|
|
123
|
+
*/
|
|
124
|
+
RenderTextMessage?: React__default.ComponentType<RenderMessageProps>;
|
|
125
|
+
/**
|
|
126
|
+
* @deprecated - use RenderMessage instead
|
|
127
|
+
*/
|
|
128
|
+
RenderActionExecutionMessage?: React__default.ComponentType<RenderMessageProps>;
|
|
129
|
+
/**
|
|
130
|
+
* @deprecated - use RenderMessage instead
|
|
131
|
+
*/
|
|
132
|
+
RenderAgentStateMessage?: React__default.ComponentType<RenderMessageProps>;
|
|
133
|
+
/**
|
|
134
|
+
* @deprecated - use RenderMessage instead
|
|
135
|
+
*/
|
|
136
|
+
RenderResultMessage?: React__default.ComponentType<RenderMessageProps>;
|
|
137
|
+
/**
|
|
138
|
+
* @deprecated - use RenderMessage instead
|
|
139
|
+
*/
|
|
140
|
+
RenderImageMessage?: React__default.ComponentType<RenderMessageProps>;
|
|
141
|
+
/**
|
|
142
|
+
* A custom RenderMessage component to use instead of the default.
|
|
143
|
+
*
|
|
144
|
+
* **Warning**: This is a break-glass solution to allow for custom
|
|
145
|
+
* rendering of messages. You are most likely looking to swap out
|
|
146
|
+
* the AssistantMessage and UserMessage components instead which
|
|
147
|
+
* are also props.
|
|
148
|
+
*/
|
|
149
|
+
RenderMessage?: React__default.ComponentType<RenderMessageProps>;
|
|
150
|
+
/**
|
|
151
|
+
* A custom suggestions list component to use instead of the default.
|
|
152
|
+
*/
|
|
153
|
+
RenderSuggestionsList?: React__default.ComponentType<RenderSuggestionsListProps>;
|
|
154
|
+
/**
|
|
155
|
+
* A custom Input component to use instead of the default.
|
|
156
|
+
*/
|
|
157
|
+
Input?: React__default.ComponentType<InputProps>;
|
|
158
|
+
/**
|
|
159
|
+
* A custom image rendering component to use instead of the default.
|
|
160
|
+
*/
|
|
161
|
+
ImageRenderer?: React__default.ComponentType<ImageRendererProps>;
|
|
162
|
+
/**
|
|
163
|
+
* A class name to apply to the root element.
|
|
164
|
+
*/
|
|
165
|
+
className?: string;
|
|
166
|
+
/**
|
|
167
|
+
* Children to render.
|
|
168
|
+
*/
|
|
169
|
+
children?: React__default.ReactNode;
|
|
170
|
+
hideStopButton?: boolean;
|
|
171
|
+
/**
|
|
172
|
+
* Event hooks for CopilotKit chat events.
|
|
173
|
+
* These hooks only work when publicApiKey is provided.
|
|
174
|
+
*/
|
|
175
|
+
observabilityHooks?: CopilotObservabilityHooks;
|
|
176
|
+
/**
|
|
177
|
+
* Custom error renderer for chat-specific errors.
|
|
178
|
+
* When provided, errors will be displayed inline within the chat interface.
|
|
179
|
+
*/
|
|
180
|
+
renderError?: (error: {
|
|
181
|
+
message: string;
|
|
182
|
+
operation?: string;
|
|
183
|
+
timestamp: number;
|
|
184
|
+
onDismiss: () => void;
|
|
185
|
+
onRetry?: () => void;
|
|
186
|
+
}) => React__default.ReactNode;
|
|
187
|
+
/**
|
|
188
|
+
* Optional handler for comprehensive debugging and observability.
|
|
189
|
+
*/
|
|
190
|
+
onError?: CopilotErrorHandler;
|
|
191
|
+
}
|
|
192
|
+
type ImageUpload = {
|
|
193
|
+
contentType: string;
|
|
194
|
+
bytes: string;
|
|
195
|
+
};
|
|
196
|
+
declare function CopilotChat({ instructions, suggestions, onSubmitMessage, makeSystemMessage, disableSystemMessage, onInProgress, onStopGeneration, onReloadMessages, onRegenerate, onCopy, onThumbsUp, onThumbsDown, markdownTagRenderers, Messages, RenderMessage, RenderSuggestionsList, Input, className, icons, labels, AssistantMessage, UserMessage, ImageRenderer, ErrorMessage, imageUploadsEnabled, inputFileAccept, hideStopButton, observabilityHooks, renderError, onError, RenderTextMessage, RenderActionExecutionMessage, RenderAgentStateMessage, RenderResultMessage, RenderImageMessage, }: CopilotChatProps): react_jsx_runtime.JSX.Element;
|
|
197
|
+
declare function WrappedCopilotChat({ children, icons, labels, className, }: {
|
|
198
|
+
children: React__default.ReactNode;
|
|
199
|
+
icons?: CopilotChatIcons;
|
|
200
|
+
labels?: CopilotChatLabels;
|
|
201
|
+
className?: string;
|
|
202
|
+
}): react_jsx_runtime.JSX.Element;
|
|
203
|
+
|
|
204
|
+
export { CopilotChat, CopilotChatProps, ImageUpload, WrappedCopilotChat };
|