MCPcopy Create free account
hub / github.com/TraderAlice/OpenAlice / setWorkspaceDefaultAgent

Function setWorkspaceDefaultAgent

ui/src/components/workspace/api.ts:205–217  ·  view source on GitHub ↗
(agent: string | null)

Source from the content-addressed store, hash-verified

203}
204
205export async function setWorkspaceDefaultAgent(agent: string | null): Promise<string | null> {
206 const res = await fetch('/api/config/workspace-default-agent', {
207 method: 'PUT',
208 headers: { 'content-type': 'application/json' },
209 body: JSON.stringify({ agent }),
210 });
211 if (!res.ok) {
212 const msg = await res.text().catch(() => '');
213 throw new Error(`set workspace default agent failed: ${res.status} ${msg}`);
214 }
215 const body = (await res.json()) as { agent?: string | null };
216 return body.agent ?? null;
217}
218
219export async function getIssueDefaultAgent(): Promise<string | null> {
220 const res = await fetch('/api/config/issue-default-agent');

Callers

nothing calls this directly

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected