OpenHands/frontend/src/hooks/use-handle-runtime-active.ts
sp.wack 531683abae
feat(frontend): V1 conversation API (PARTIAL) (#11336)
Co-authored-by: Hiep Le <69354317+hieptl@users.noreply.github.com>
Co-authored-by: Tim O'Farrell <tofarr@gmail.com>
2025-10-20 20:57:40 +04:00

11 lines
319 B
TypeScript

import { RUNTIME_INACTIVE_STATES } from "#/types/agent-state";
import { useAgentState } from "#/hooks/use-agent-state";
export const useHandleRuntimeActive = () => {
const { curAgentState } = useAgentState();
const runtimeActive = !RUNTIME_INACTIVE_STATES.includes(curAgentState);
return { runtimeActive };
};