()
| 196 | } |
| 197 | |
| 198 | export async function getWorkspaceDefaultAgent(): Promise<string | null> { |
| 199 | const res = await fetch('/api/config/workspace-default-agent'); |
| 200 | if (!res.ok) return null; |
| 201 | const body = (await res.json()) as { agent?: string | null }; |
| 202 | return body.agent ?? null; |
| 203 | } |
| 204 | |
| 205 | export async function setWorkspaceDefaultAgent(agent: string | null): Promise<string | null> { |
| 206 | const res = await fetch('/api/config/workspace-default-agent', { |
no test coverage detected