forked from CopilotKit/CopilotKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.ts
More file actions
44 lines (40 loc) · 1.18 KB
/
Copy pathindex.ts
File metadata and controls
44 lines (40 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
* @copilotkit/react-native
*
* React Native bindings for CopilotKit. Provides a lightweight provider
* and re-exports platform-agnostic hooks from @copilotkit/react-core.
*
* Quick start:
* ```tsx
* import { CopilotKitProvider, useAgent, useCopilotKit } from "@copilotkit/react-native";
* ```
*/
// React Native provider (no web dependencies)
export { CopilotKitProvider } from "./CopilotKitProvider";
export type { CopilotKitNativeProviderProps } from "./CopilotKitProvider";
// Re-export context and hooks from react-core (platform-agnostic)
export {
useCopilotKit,
useLicenseContext,
CopilotKitContext,
type CopilotKitContextValue,
} from "@copilotkit/react-core/v2/context";
// Re-export hooks that work without web deps
// These consume the CopilotKitContext which our provider sets
export {
useAgent,
useFrontendTool,
useComponent,
useHumanInTheLoop,
useInterrupt,
useSuggestions,
useConfigureSuggestions,
useAgentContext,
useThreads,
type UseAgentUpdate,
} from "@copilotkit/react-core/v2/headless";
// Re-export core types commonly needed
export {
type CopilotKitCoreRuntimeConnectionStatus,
type CopilotKitCoreErrorCode,
} from "@copilotkit/core";