hermes-agent / web /src /contexts /useSystemActions.ts
SaylorTwift's picture
SaylorTwift HF Staff
Add files using upload-large-folder tool
674d56a verified
Raw History Blame Contribute Delete
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;
}