mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-05 04:19:02 +08:00
fix(useAgents): use right agents data
This commit is contained in:
parent
136d343c18
commit
64ee5c528b
@ -5,10 +5,10 @@ import { useAgentClient } from './useAgentClient'
|
||||
export const useAgents = () => {
|
||||
const client = useAgentClient()
|
||||
const key = client.agentPaths.base
|
||||
const { data: agents, error, isLoading } = useSWR(key, () => client.listAgents())
|
||||
const { data, error, isLoading } = useSWR(key, () => client.listAgents())
|
||||
|
||||
return {
|
||||
agents,
|
||||
agents: data?.agents ?? [],
|
||||
error,
|
||||
isLoading
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user