Download desktop/src/api/agents.ts from chenbhao/codev: direct link, hf CLI and curl.
- Browser
- Download file 745 Bytes
-
https://huggingface.co/chenbhao/codev/resolve/e40073cc959cd4729bf4009662bca374c5c4e266/desktop/src/api/agents.ts
- Command line
-
hf download hf://chenbhao/codev@e40073cc959cd4729bf4009662bca374c5c4e266/desktop/src/api/agents.ts
-
curl -L -o agents.ts https://huggingface.co/chenbhao/codev/resolve/e40073cc959cd4729bf4009662bca374c5c4e266/desktop/src/api/agents.ts
745 Bytes
| import { api } from './client' | |
| export type AgentSource = | |
| | 'built-in' | |
| | 'plugin' | |
| | 'userSettings' | |
| | 'projectSettings' | |
| | 'localSettings' | |
| | 'flagSettings' | |
| | 'policySettings' | |
| export type AgentDefinition = { | |
| agentType: string | |
| description?: string | |
| model?: string | |
| modelDisplay?: string | |
| tools?: string[] | |
| systemPrompt?: string | |
| color?: string | |
| source: AgentSource | |
| baseDir?: string | |
| overriddenBy?: AgentSource | |
| isActive: boolean | |
| } | |
| export type AgentListResponse = { | |
| activeAgents: AgentDefinition[] | |
| allAgents: AgentDefinition[] | |
| } | |
| export const agentsApi = { | |
| list: (cwd?: string) => { | |
| const query = cwd ? `?cwd=${encodeURIComponent(cwd)}` : '' | |
| return api.get<AgentListResponse>(`/api/agents${query}`) | |
| }, | |
| } | |