@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.cjs
CHANGED
|
@@ -2240,6 +2240,19 @@ function Suggestions({ suggestions, onSuggestionClick, isLoading }) {
|
|
|
2240
2240
|
|
|
2241
2241
|
//#endregion
|
|
2242
2242
|
//#region src/components/chat/Chat.tsx
|
|
2243
|
+
/**
|
|
2244
|
+
* @deprecated The v1 SDK is deprecated. Use v2 instead. Use `CopilotChat` from `@copilotkit/react-core/v2` instead.
|
|
2245
|
+
*
|
|
2246
|
+
* ```tsx
|
|
2247
|
+
* import { CopilotChat } from "@copilotkit/react-core/v2";
|
|
2248
|
+
* import "@copilotkit/react-core/v2/styles.css";
|
|
2249
|
+
*
|
|
2250
|
+
* function App() {
|
|
2251
|
+
* return <CopilotChat agentId="my-agent" />;
|
|
2252
|
+
* }
|
|
2253
|
+
* ```
|
|
2254
|
+
* See https://docs.copilotkit.ai/reference/v2/components/CopilotChat
|
|
2255
|
+
*/
|
|
2243
2256
|
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 }) {
|
|
2244
2257
|
const { additionalInstructions, setChatInstructions, copilotApiConfig, setBannerError, setInternalErrorHandler, removeInternalErrorHandler } = (0, _copilotkit_react_core.useCopilotContext)();
|
|
2245
2258
|
const { publicApiKey, chatApiEndpoint } = copilotApiConfig;
|
|
@@ -2891,6 +2904,23 @@ function CopilotSidebar({ fullHeightChildren = false, ...props }) {
|
|
|
2891
2904
|
* The hook registers the configuration with the chat context upon component mount and
|
|
2892
2905
|
* removes it on unmount, ensuring a clean and efficient lifecycle management.
|
|
2893
2906
|
*/
|
|
2907
|
+
/**
|
|
2908
|
+
* @deprecated The v1 SDK is deprecated. Use v2 instead. Use `useConfigureSuggestions` from `@copilotkit/react-core/v2` instead.
|
|
2909
|
+
*
|
|
2910
|
+
* ```tsx
|
|
2911
|
+
* import { useConfigureSuggestions } from "@copilotkit/react-core/v2";
|
|
2912
|
+
*
|
|
2913
|
+
* function Suggestions() {
|
|
2914
|
+
* useConfigureSuggestions({
|
|
2915
|
+
* suggestions: [
|
|
2916
|
+
* { title: "Help", message: "Help me get started" },
|
|
2917
|
+
* ],
|
|
2918
|
+
* });
|
|
2919
|
+
* return null;
|
|
2920
|
+
* }
|
|
2921
|
+
* ```
|
|
2922
|
+
* See https://docs.copilotkit.ai/reference/v2/hooks/useConfigureSuggestions
|
|
2923
|
+
*/
|
|
2894
2924
|
function useCopilotChatSuggestions(config, dependencies = []) {
|
|
2895
2925
|
(0, _copilotkit_react_core.useCopilotChatSuggestions)(config, dependencies);
|
|
2896
2926
|
}
|