hermes-2 / web /src /contexts /useSystemActions.ts
Wellz1000's picture
Initial upload: Hermes 2 Agent (part 10)
be22d4d verified
Raw History Blame Contribute Delete
384 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;
}