mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
a9b2dbff75
Full RN 0.85.2 demo showing chat with useAgent, frontend tools (theme toggle, app mode), generative UI (pie chart), HITL (meeting scheduler), shared state (task manager), and thread management. Points to langgraph-py example runtime.
23 lines
655 B
TypeScript
23 lines
655 B
TypeScript
import { StatusBar, useColorScheme } from "react-native";
|
|
import { SafeAreaProvider } from "react-native-safe-area-context";
|
|
import { CopilotKitProvider } from "@copilotkit/react-native";
|
|
import { ChatScreen } from "./src/ChatScreen";
|
|
|
|
const RUNTIME_URL =
|
|
"https://langgraph-py.examples.copilotkit.ai/api/copilotkit";
|
|
|
|
function App() {
|
|
const isDarkMode = useColorScheme() === "dark";
|
|
|
|
return (
|
|
<SafeAreaProvider>
|
|
<StatusBar barStyle={isDarkMode ? "light-content" : "dark-content"} />
|
|
<CopilotKitProvider runtimeUrl={RUNTIME_URL}>
|
|
<ChatScreen />
|
|
</CopilotKitProvider>
|
|
</SafeAreaProvider>
|
|
);
|
|
}
|
|
|
|
export default App;
|