import { useUserAgent } from "moonpeak/chatgpt";
useUserAgent(): unknownChatGPT's user agent info (device type, capabilities). undefined outside ChatGPT.
Example
const ua = useUserAgent();Works in
ChatGPT. Safe to call anywhere: elsewhere it returns an empty value or does nothing.
See all hooks in Runtime APIs.