@copilotkit/react-ui 1.69.0 → 1.69.2
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/dist/index.cjs +30 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +408 -3
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +408 -3
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +32 -2
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +30 -0
- package/dist/index.umd.js.map +1 -1
- package/package.json +5 -5
- package/src/components/chat/Chat.tsx +38 -0
- package/src/components/chat/ChatContext.tsx +19 -0
- package/src/components/chat/Markdown.tsx +19 -0
- package/src/components/chat/Modal.tsx +30 -3
- package/src/components/chat/Popup.tsx +19 -0
- package/src/components/chat/Sidebar.tsx +27 -0
- package/src/components/chat/Suggestion.tsx +19 -0
- package/src/components/chat/Suggestions.tsx +20 -1
- package/src/components/chat/attachment-utils.ts +18 -0
- package/src/components/chat/feedback.test.ts +2 -5
- package/src/components/chat/messages/AssistantMessage.tsx +20 -0
- package/src/components/chat/messages/ImageRenderer.tsx +20 -1
- package/src/components/chat/messages/UserMessage.tsx +21 -1
- package/src/components/chat/props.ts +124 -0
- package/src/components/dev-console/console.tsx +18 -0
- package/src/hooks/use-copilot-chat-suggestions.tsx +47 -4
- package/src/index.tsx +491 -0
- package/src/types/css.ts +20 -1
- package/src/types/suggestions.ts +19 -0
package/dist/index.umd.js
CHANGED
|
@@ -2251,6 +2251,19 @@ rehype_sanitize = __toESM(rehype_sanitize);
|
|
|
2251
2251
|
|
|
2252
2252
|
//#endregion
|
|
2253
2253
|
//#region src/components/chat/Chat.tsx
|
|
2254
|
+
/**
|
|
2255
|
+
* @deprecated The v1 SDK is deprecated. Use v2 instead. Use `CopilotChat` from `@copilotkit/react-core/v2` instead.
|
|
2256
|
+
*
|
|
2257
|
+
* ```tsx
|
|
2258
|
+
* import { CopilotChat } from "@copilotkit/react-core/v2";
|
|
2259
|
+
* import "@copilotkit/react-core/v2/styles.css";
|
|
2260
|
+
*
|
|
2261
|
+
* function App() {
|
|
2262
|
+
* return <CopilotChat agentId="my-agent" />;
|
|
2263
|
+
* }
|
|
2264
|
+
* ```
|
|
2265
|
+
* See https://docs.copilotkit.ai/reference/v2/components/CopilotChat
|
|
2266
|
+
*/
|
|
2254
2267
|
function CopilotChat({ instructions, suggestions = "auto", onSubmitMessage, makeSystemMessage, disableSystemMessage, onInProgress, onStopGeneration, onReloadMessages, onRegenerate, onCopy, onThumbsUp, onThumbsDown, markdownTagRenderers, Messages: Messages$2 = Messages, RenderMessage: RenderMessage$1 = RenderMessage, RenderSuggestionsList = Suggestions, Input: Input$2 = Input, className, icons, labels, AssistantMessage: AssistantMessage$2 = AssistantMessage, UserMessage: UserMessage$2 = UserMessage, ImageRenderer: ImageRenderer$1 = ImageRenderer, ErrorMessage, imageUploadsEnabled, inputFileAccept = "image/*", attachments, hideStopButton, observabilityHooks, renderError, onError, RenderTextMessage, RenderActionExecutionMessage, RenderAgentStateMessage, RenderResultMessage, RenderImageMessage }) {
|
|
2255
2268
|
var _resolvedAttachments$, _resolvedAttachments$2, _resolvedAttachments$3;
|
|
2256
2269
|
const { additionalInstructions, setChatInstructions, copilotApiConfig, setBannerError, setInternalErrorHandler, removeInternalErrorHandler } = (0, _copilotkit_react_core.useCopilotContext)();
|
|
@@ -2911,6 +2924,23 @@ rehype_sanitize = __toESM(rehype_sanitize);
|
|
|
2911
2924
|
* The hook registers the configuration with the chat context upon component mount and
|
|
2912
2925
|
* removes it on unmount, ensuring a clean and efficient lifecycle management.
|
|
2913
2926
|
*/
|
|
2927
|
+
/**
|
|
2928
|
+
* @deprecated The v1 SDK is deprecated. Use v2 instead. Use `useConfigureSuggestions` from `@copilotkit/react-core/v2` instead.
|
|
2929
|
+
*
|
|
2930
|
+
* ```tsx
|
|
2931
|
+
* import { useConfigureSuggestions } from "@copilotkit/react-core/v2";
|
|
2932
|
+
*
|
|
2933
|
+
* function Suggestions() {
|
|
2934
|
+
* useConfigureSuggestions({
|
|
2935
|
+
* suggestions: [
|
|
2936
|
+
* { title: "Help", message: "Help me get started" },
|
|
2937
|
+
* ],
|
|
2938
|
+
* });
|
|
2939
|
+
* return null;
|
|
2940
|
+
* }
|
|
2941
|
+
* ```
|
|
2942
|
+
* See https://docs.copilotkit.ai/reference/v2/hooks/useConfigureSuggestions
|
|
2943
|
+
*/
|
|
2914
2944
|
function useCopilotChatSuggestions(config, dependencies = []) {
|
|
2915
2945
|
(0, _copilotkit_react_core.useCopilotChatSuggestions)(config, dependencies);
|
|
2916
2946
|
}
|