@copilotkit/react-native 1.57.1-canary.1778272612 → 1.57.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/README.md +11 -1
- package/dist/index.cjs +752 -9
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +394 -6
- package/dist/index.d.mts +394 -6
- package/dist/index.mjs +725 -14
- package/dist/index.mjs.map +1 -1
- package/dist/polyfills.cjs +86 -73
- package/dist/polyfills.cjs.map +1 -1
- package/dist/polyfills.mjs +86 -73
- package/dist/polyfills.mjs.map +1 -1
- package/package.json +21 -5
- package/src/CopilotChat.tsx +293 -0
- package/src/CopilotKitProvider.tsx +55 -13
- package/src/CopilotModal.tsx +32 -0
- package/src/CopilotPopup.tsx +359 -0
- package/src/CopilotSidebar.tsx +357 -0
- package/src/__tests__/__mocks__/expo-document-picker.ts +13 -0
- package/src/__tests__/__mocks__/expo-file-system.ts +12 -0
- package/src/__tests__/attachments-integration.test.tsx +336 -0
- package/src/__tests__/copilot-chat-agentid.test.tsx +305 -0
- package/src/__tests__/copilot-chat-attachments.test.tsx +259 -0
- package/src/__tests__/copilot-popup.test.tsx +558 -0
- package/src/__tests__/copilot-sidebar.test.tsx +500 -0
- package/src/__tests__/copilotkit-provider.test.tsx +3 -0
- package/src/__tests__/headless-integration.test.tsx +55 -1
- package/src/__tests__/streaming-fetch.test.ts +84 -44
- package/src/__tests__/use-attachments.test.ts +410 -0
- package/src/hooks/use-attachments.ts +274 -0
- package/src/index.ts +77 -3
- package/src/polyfills.ts +3 -2
- package/src/streaming-fetch.ts +135 -104
- package/tsdown.config.ts +1 -0
- package/vitest.config.mjs +19 -0
package/README.md
CHANGED
|
@@ -36,7 +36,11 @@ import "@copilotkit/react-native/polyfills/location";
|
|
|
36
36
|
## Quick start
|
|
37
37
|
|
|
38
38
|
```tsx
|
|
39
|
-
import {
|
|
39
|
+
import {
|
|
40
|
+
CopilotKitProvider,
|
|
41
|
+
useAgent,
|
|
42
|
+
useCopilotKit,
|
|
43
|
+
} from "@copilotkit/react-native";
|
|
40
44
|
|
|
41
45
|
export default function App() {
|
|
42
46
|
return (
|
|
@@ -49,6 +53,12 @@ export default function App() {
|
|
|
49
53
|
|
|
50
54
|
Re-exports hooks from `@copilotkit/react-core`: `useAgent`, `useFrontendTool`, `useComponent`, `useHumanInTheLoop`, `useInterrupt`, `useSuggestions`, `useConfigureSuggestions`, `useAgentContext`, `useThreads`, and `useCopilotKit`.
|
|
51
55
|
|
|
56
|
+
## API Surface
|
|
57
|
+
|
|
58
|
+
The root import (`@copilotkit/react-native`) IS the v2 API.
|
|
59
|
+
Unlike the web SDK which has `/v2` subpath, React Native exports
|
|
60
|
+
the v2 API directly from the package root.
|
|
61
|
+
|
|
52
62
|
## Documentation
|
|
53
63
|
|
|
54
64
|
For full setup instructions, usage examples, and troubleshooting, see the [React Native docs](https://docs.copilotkit.ai/react-native).
|