From 71891461e5f5f3cb8bf3b8d06beda1db662af7b7 Mon Sep 17 00:00:00 2001 From: openhands Date: Wed, 8 Jan 2025 20:23:01 +0000 Subject: [PATCH] Fix lint issues in use-handle-runtime-active.ts --- .../_oh.app/hooks/use-handle-runtime-active.ts | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/frontend/src/routes/_oh.app/hooks/use-handle-runtime-active.ts b/frontend/src/routes/_oh.app/hooks/use-handle-runtime-active.ts index 4134e64986fd..f789791e68ca 100644 --- a/frontend/src/routes/_oh.app/hooks/use-handle-runtime-active.ts +++ b/frontend/src/routes/_oh.app/hooks/use-handle-runtime-active.ts @@ -8,16 +8,16 @@ import { RootState } from "#/store"; import { base64ToBlob } from "#/utils/base64-to-blob"; import { useUploadFiles } from "../../../hooks/mutation/use-upload-files"; import { useGitHubUser } from "../../../hooks/query/use-github-user"; -import { isGitHubErrorReponse } from "#/api/github-axios-instance"; + import { RUNTIME_INACTIVE_STATES } from "#/types/agent-state"; export const useHandleRuntimeActive = () => { - const { gitHubToken } = useAuth(); - const { send } = useWsClient(); + useAuth(); + useWsClient(); const dispatch = useDispatch(); - const { data: user } = useGitHubUser(); + useGitHubUser(); const { mutate: uploadFiles } = useUploadFiles(); const { curAgentState } = useSelector((state: RootState) => state.agent); @@ -27,11 +27,6 @@ export const useHandleRuntimeActive = () => { (state: RootState) => state.initialQuery, ); - const userId = React.useMemo(() => { - if (user && !isGitHubErrorReponse(user)) return user.id; - return null; - }, [user]); - const handleUploadFiles = (zip: string) => { const blob = base64ToBlob(zip); const file = new File([blob], "imported-project.zip", {