Buckets:
| import { useOpenAiGlobal } from './useOpenAiGlobal'; | |
| export function useWidgetProps<T extends Record<string, unknown>>( | |
| defaultState?: T | (() => T) | |
| ): T { | |
| const props = useOpenAiGlobal('toolOutput') as T; | |
| const fallback = | |
| typeof defaultState === 'function' | |
| ? (defaultState as () => T | null)() | |
| : defaultState ?? null; | |
| return props ?? fallback; | |
| } | |
Xet Storage Details
- Size:
- 362 Bytes
- Xet hash:
- e134af627b29c21551bc42bc65925a659f7c3a4ae476a5aa949d033abe245e2f
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.