Files
hermes-agent/web/src/contexts/useSystemActions.ts

16 lines
369 B
TypeScript
Raw Normal View History

2026-04-22 23:25:17 -04:00
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;
}