Download web/src/contexts/useSystemActions.ts from SaylorTwift/hermes-agent: direct link, hf CLI and curl.
- Browser
- Download file 369 Bytes
-
https://huggingface.co/SaylorTwift/hermes-agent/resolve/main/web/src/contexts/useSystemActions.ts
- Command line
-
hf download hf://SaylorTwift/hermes-agent/web/src/contexts/useSystemActions.ts
-
curl -L -o useSystemActions.ts https://huggingface.co/SaylorTwift/hermes-agent/resolve/main/web/src/contexts/useSystemActions.ts
369 Bytes
| import { useContext } from "react"; | |
| import { | |
| SystemActionsContext, | |
| type SystemActionsState, | |
| } from "./system-actions-context"; | |
| export function useSystemActions(): SystemActionsState { | |
| const ctx = useContext(SystemActionsContext); | |
| if (!ctx) { | |
| throw new Error( | |
| "useSystemActions must be used within a SystemActionsProvider", | |
| ); | |
| } | |
| return ctx; | |
| } | |