mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
Co-authored-by: Hiep Le <69354317+hieptl@users.noreply.github.com> Co-authored-by: Tim O'Farrell <tofarr@gmail.com>
11 lines
319 B
TypeScript
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 };
|
|
};
|