Spaces:
Configuration error
Configuration error
Download frontend/src/hooks/query/use-user-conversation.ts from flyingdarkdev/README: direct link, hf CLI and curl.
- Browser
- Download file 391 Bytes
-
https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/hooks/query/use-user-conversation.ts
- Command line
-
hf download hf://spaces/flyingdarkdev/README/frontend/src/hooks/query/use-user-conversation.ts
-
curl -L -o use-user-conversation.ts https://huggingface.co/spaces/flyingdarkdev/README/resolve/main/frontend/src/hooks/query/use-user-conversation.ts
391 Bytes
| import { useQuery } from "@tanstack/react-query"; | |
| import OpenHands from "#/api/open-hands"; | |
| export const useUserConversation = (cid: string | null) => | |
| useQuery({ | |
| queryKey: ["user", "conversation", cid], | |
| queryFn: () => OpenHands.getConversation(cid!), | |
| enabled: !!cid, | |
| retry: false, | |
| staleTime: 1000 * 60 * 5, // 5 minutes | |
| gcTime: 1000 * 60 * 15, // 15 minutes | |
| }); | |