Download frontend/src/core/memory/hooks.ts from yonagush/deerflow: direct link, hf CLI and curl.
- Browser
- Download file 286 Bytes
-
https://huggingface.co/spaces/yonagush/deerflow/resolve/main/frontend/src/core/memory/hooks.ts
- Command line
-
hf download hf://spaces/yonagush/deerflow/frontend/src/core/memory/hooks.ts
-
curl -L -o hooks.ts https://huggingface.co/spaces/yonagush/deerflow/resolve/main/frontend/src/core/memory/hooks.ts
286 Bytes
| import { useQuery } from "@tanstack/react-query"; | |
| import { loadMemory } from "./api"; | |
| export function useMemory() { | |
| const { data, isLoading, error } = useQuery({ | |
| queryKey: ["memory"], | |
| queryFn: () => loadMemory(), | |
| }); | |
| return { memory: data ?? null, isLoading, error }; | |
| } | |