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

Function setIssueDefaultAgent

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

Source from the content-addressed store, hash-verified

224}
225
226export async function setIssueDefaultAgent(agent: string | null): Promise<string | null> {
227 const res = await fetch('/api/config/issue-default-agent', {
228 method: 'PUT',
229 headers: { 'content-type': 'application/json' },
230 body: JSON.stringify({ agent }),
231 });
232 if (!res.ok) {
233 const msg = await res.text().catch(() => '');
234 throw new Error(`set issue default agent failed: ${res.status} ${msg}`);
235 }
236 const body = (await res.json()) as { agent?: string | null };
237 return body.agent ?? null;
238}
239
240// ── sessions ─────────────────────────────────────────────────────────────────
241//

Callers 1

saveFunction · 0.85

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected