Download src/hooks/use-handle-runtime-active.ts from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 319 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/hooks/use-handle-runtime-active.ts
- Command line
-
hf download hf://SaylorTwift/openhands/src/hooks/use-handle-runtime-active.ts
-
curl -L -o use-handle-runtime-active.ts https://huggingface.co/SaylorTwift/openhands/resolve/main/src/hooks/use-handle-runtime-active.ts
319 Bytes
| 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 }; | |
| }; | |