mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
16 lines
369 B
TypeScript
16 lines
369 B
TypeScript
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;
|
|
}
|