Download apps/vis/web/src/hooks/useWire.ts from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vis/web/src/hooks/useWire.ts
- Command line
-
hf download hf://SaylorTwift/kimi-code/apps/vis/web/src/hooks/useWire.ts
-
curl -L -o useWire.ts https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vis/web/src/hooks/useWire.ts
388 Bytes
| import { useQuery } from '@tanstack/react-query'; | |
| import { api } from '../api'; | |
| export function useWire( | |
| sessionId: string | undefined, | |
| agentId: string | undefined, | |
| enabled = true, | |
| ) { | |
| return useQuery({ | |
| queryKey: ['session', sessionId, 'wire', agentId] as const, | |
| queryFn: () => api.getWire(sessionId!, agentId!), | |
| enabled: !!sessionId && !!agentId && enabled, | |
| }); | |
| } | |