@copilotkit/react-core 1.55.0-next.8 → 1.55.0
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 +48 -5
- package/dist/{copilotkit-DNYSFuz5.mjs → copilotkit-BY5S1-0P.mjs} +2772 -858
- package/dist/copilotkit-BY5S1-0P.mjs.map +1 -0
- package/dist/{copilotkit-Dy5w3qEV.d.mts → copilotkit-BuhSUZHb.d.mts} +230 -17
- package/dist/copilotkit-BuhSUZHb.d.mts.map +1 -0
- package/dist/{copilotkit-B3Mb1yVE.cjs → copilotkit-Bz5-ImDl.cjs} +2776 -832
- package/dist/copilotkit-Bz5-ImDl.cjs.map +1 -0
- package/dist/{copilotkit-DBzgOMby.d.cts → copilotkit-dwDWYpya.d.cts} +230 -17
- package/dist/copilotkit-dwDWYpya.d.cts.map +1 -0
- package/dist/index.cjs +9 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +9 -4
- package/dist/index.mjs.map +1 -1
- package/dist/index.umd.js +1624 -396
- package/dist/index.umd.js.map +1 -1
- package/dist/v2/index.cjs +13 -1
- package/dist/v2/index.css +1 -1
- package/dist/v2/index.d.cts +3 -3
- package/dist/v2/index.d.mts +3 -3
- package/dist/v2/index.mjs +3 -2
- package/dist/v2/index.umd.js +2746 -790
- package/dist/v2/index.umd.js.map +1 -1
- package/package.json +62 -54
- package/scripts/scope-preflight.mjs +1 -2
- package/src/components/CopilotListeners.tsx +41 -8
- package/src/components/copilot-provider/__tests__/copilot-messages-key.test.tsx +92 -0
- package/src/components/copilot-provider/copilotkit-props.tsx +4 -2
- package/src/components/copilot-provider/copilotkit.tsx +3 -3
- package/src/components/toast/toast-provider.tsx +269 -194
- package/src/hooks/__tests__/use-copilot-chat-internal-connect.test.tsx +27 -16
- package/src/hooks/use-copilot-chat_internal.ts +15 -4
- package/src/v2/__tests__/A2UIMessageRenderer.test.tsx +86 -22
- package/src/v2/__tests__/utils/test-helpers.tsx +107 -7
- package/src/v2/a2ui/A2UICatalogContext.tsx +79 -0
- package/src/v2/a2ui/A2UIMessageRenderer.tsx +125 -37
- package/src/v2/a2ui/A2UIToolCallRenderer.tsx +290 -0
- package/src/v2/components/CopilotKitInspector.tsx +2 -0
- package/src/v2/components/OpenGenerativeUIRenderer.tsx +598 -0
- package/src/v2/components/__tests__/OpenGenerativeUIRenderer.test.tsx +665 -0
- package/src/v2/components/chat/CopilotChat.tsx +197 -52
- package/src/v2/components/chat/CopilotChatAssistantMessage.tsx +17 -2
- package/src/v2/components/chat/CopilotChatAttachmentQueue.tsx +481 -0
- package/src/v2/components/chat/CopilotChatAttachmentRenderer.tsx +139 -0
- package/src/v2/components/chat/CopilotChatInput.tsx +146 -77
- package/src/v2/components/chat/CopilotChatMessageView.tsx +260 -151
- package/src/v2/components/chat/CopilotChatSuggestionView.tsx +1 -0
- package/src/v2/components/chat/CopilotChatUserMessage.tsx +54 -0
- package/src/v2/components/chat/CopilotChatView.tsx +179 -66
- package/src/v2/components/chat/__tests__/CopilotChat.attachments.test.tsx +168 -0
- package/src/v2/components/chat/__tests__/CopilotChatActivityRendering.e2e.test.tsx +63 -2
- package/src/v2/components/chat/__tests__/CopilotChatInput.test.tsx +544 -1
- package/src/v2/components/chat/__tests__/CopilotChatPerf.e2e.test.tsx +268 -0
- package/src/v2/components/chat/__tests__/CopilotChatPropsRerender.e2e.test.tsx +249 -0
- package/src/v2/components/chat/__tests__/CopilotChatToolRendering.e2e.test.tsx +5 -2
- package/src/v2/components/chat/__tests__/CopilotChatToolRerenders.e2e.test.tsx +5 -2
- package/src/v2/components/chat/__tests__/MCPAppsActivityRenderer.e2e.test.tsx +60 -3
- package/src/v2/components/chat/__tests__/copilot-chat-throttle.test.tsx +138 -0
- package/src/v2/components/chat/index.ts +9 -0
- package/src/v2/components/chat/scroll-element-context.ts +13 -0
- package/src/v2/hooks/__tests__/use-agent-context-timing.e2e.test.tsx +8 -0
- package/src/v2/hooks/__tests__/use-agent-thread-isolation.test.tsx +327 -0
- package/src/v2/hooks/__tests__/use-agent-throttle.test.tsx +1003 -0
- package/src/v2/hooks/__tests__/use-agent.e2e.test.tsx +13 -2
- package/src/v2/hooks/__tests__/use-attachments.test.tsx +169 -0
- package/src/v2/hooks/__tests__/use-frontend-tool.e2e.test.tsx +23 -4
- package/src/v2/hooks/__tests__/use-threads.test.tsx +54 -0
- package/src/v2/hooks/index.ts +5 -0
- package/src/v2/hooks/use-agent.tsx +220 -15
- package/src/v2/hooks/use-attachments.tsx +269 -0
- package/src/v2/hooks/use-frontend-tool.tsx +5 -2
- package/src/v2/hooks/use-render-activity-message.tsx +9 -2
- package/src/v2/hooks/use-render-custom-messages.tsx +6 -1
- package/src/v2/hooks/use-threads.tsx +35 -15
- package/src/v2/index.ts +5 -1
- package/src/v2/lib/__tests__/processPartialHtml.test.ts +112 -0
- package/src/v2/lib/__tests__/slots.test.ts +56 -0
- package/src/v2/lib/processPartialHtml.ts +45 -0
- package/src/v2/lib/slots.tsx +42 -1
- package/src/v2/providers/CopilotChatConfigurationProvider.tsx +9 -3
- package/src/v2/providers/CopilotKitProvider.tsx +268 -32
- package/src/v2/providers/SandboxFunctionsContext.ts +10 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.sandboxFunctions.test.tsx +198 -0
- package/src/v2/providers/__tests__/CopilotKitProvider.test.tsx +71 -0
- package/src/v2/providers/index.ts +7 -0
- package/src/v2/styles/globals.css +2 -1
- package/src/v2/types/index.ts +1 -0
- package/src/v2/types/sandbox-function.ts +11 -0
- package/dist/copilotkit-B3Mb1yVE.cjs.map +0 -1
- package/dist/copilotkit-DBzgOMby.d.cts.map +0 -1
- package/dist/copilotkit-DNYSFuz5.mjs.map +0 -1
- package/dist/copilotkit-Dy5w3qEV.d.mts.map +0 -1
- package/src/v2/components/__tests__/license-warning-banner.test.tsx +0 -46
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,57 @@
|
|
|
1
1
|
# ui
|
|
2
2
|
|
|
3
|
+
## 1.55.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1ceb963: refactor: consolidate V1/V2 packages into flat @copilotkit/\* structure
|
|
8
|
+
- 5289791: feat: add multimodal attachment support to the builtin agent
|
|
9
|
+
- 434ccd8: A2UI v0.9 + Open Generative UI: BYOC catalogs, dark mode, sandboxed UI generation
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- b4a8b7a: Add auto-detection of runtime transport (REST vs single-endpoint)
|
|
14
|
+
- 0f6a61c: fix: add React keys to CopilotMessages children to suppress "unique key prop" warning
|
|
15
|
+
- 1ceb963: fix: respect defaultOpen={false} in CopilotSidebar and CopilotPopup
|
|
16
|
+
- 1a61be4: fix: stabilize messageView and labels props to prevent message list re-renders on every keystroke
|
|
17
|
+
|
|
18
|
+
Passing `messageView` or `labels` as inline object props to `<CopilotChat />` previously caused all completed assistant messages to re-render on every keystroke due to reference instability. This was especially severe with large message histories (DocuSign: 100+ messages reported 2s→16s send time degradation).
|
|
19
|
+
|
|
20
|
+
Root causes fixed:
|
|
21
|
+
- `ts-deepmerge.merge()` deep-cloned plain objects even from a single source, creating a new reference every render that defeated `MemoizedSlotWrapper`'s shallow equality check. Replaced with shallow spread + `useShallowStableRef`.
|
|
22
|
+
- Inline `labels` objects created a new `mergedLabels` context value every render, causing all `useCopilotChatConfiguration()` consumers across every message to re-render. Fixed by stabilizing with `useShallowStableRef` in `CopilotChatConfigurationProvider`.
|
|
23
|
+
|
|
24
|
+
The `useShallowStableRef` hook (added to `slots.tsx`) is now the single stabilization primitive: it returns the same reference as long as the value is shallowly equal, with an `isPlainObject` guard to avoid incorrect equality for arrays, Dates, and class instances.
|
|
25
|
+
|
|
26
|
+
- 1ceb963: fix: race condition in RunHandler.runAgent() causes dropped runs
|
|
27
|
+
- 1ceb963: fix: address scroll bar styling when using mouse-wheel
|
|
28
|
+
- 53e5669: Fix multiple CopilotChat components with different threadIds sharing message state. The useAgent hook now creates per-thread agent clones when threadId is provided, ensuring each chat instance maintains isolated messages and state.
|
|
29
|
+
- 52a9322: Fixing license warnings, barrel export and typing
|
|
30
|
+
- c341ed2: chore: kick CI to verify publish pipeline
|
|
31
|
+
- Updated dependencies [1ceb963]
|
|
32
|
+
- Updated dependencies [b4a8b7a]
|
|
33
|
+
- Updated dependencies [1ceb963]
|
|
34
|
+
- Updated dependencies [52a9322]
|
|
35
|
+
- Updated dependencies [1ceb963]
|
|
36
|
+
- Updated dependencies [5289791]
|
|
37
|
+
- Updated dependencies [434ccd8]
|
|
38
|
+
- @copilotkit/a2ui-renderer@1.55.0
|
|
39
|
+
- @copilotkit/core@1.55.0
|
|
40
|
+
- @copilotkit/runtime-client-gql@1.55.0
|
|
41
|
+
- @copilotkit/shared@1.55.0
|
|
42
|
+
- @copilotkit/web-inspector@1.55.0
|
|
43
|
+
|
|
3
44
|
## 1.55.0-next.8
|
|
4
45
|
|
|
5
46
|
### Patch Changes
|
|
6
47
|
|
|
7
|
-
-
|
|
8
|
-
-
|
|
9
|
-
- @copilotkit/
|
|
10
|
-
- @copilotkit/
|
|
11
|
-
- @copilotkit/
|
|
48
|
+
- 0f6a61c: fix: add React keys to CopilotMessages children to suppress "unique key prop" warning
|
|
49
|
+
- 53e5669: Fix multiple CopilotChat components with different threadIds sharing message state. The useAgent hook now creates per-thread agent clones when threadId is provided, ensuring each chat instance maintains isolated messages and state.
|
|
50
|
+
- @copilotkit/a2ui-renderer@1.55.0-next.8
|
|
51
|
+
- @copilotkit/core@1.55.0-next.8
|
|
52
|
+
- @copilotkit/runtime-client-gql@1.55.0-next.8
|
|
53
|
+
- @copilotkit/shared@1.55.0-next.8
|
|
54
|
+
- @copilotkit/web-inspector@1.55.0-next.8
|
|
12
55
|
|
|
13
56
|
## 1.55.0-next.7
|
|
14
57
|
|