OpenHands / frontend /src /hooks /use-handle-runtime-active.ts
Backup-bdg's picture
Upload 565 files
b59aa07 verified
raw
history blame
374 Bytes
import { useSelector } from "react-redux";
import { RootState } from "#/store";
import { RUNTIME_INACTIVE_STATES } from "#/types/agent-state";
export const useHandleRuntimeActive = () => {
const { curAgentState } = useSelector((state: RootState) => state.agent);
const runtimeActive = !RUNTIME_INACTIVE_STATES.includes(curAgentState);
return { runtimeActive };
};