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

Function listWorkspaces

ui/src/components/workspace/api.ts:81–86  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 | { readonly ok: false; readonly status: number; readonly error: CreateError };
80
81export async function listWorkspaces(): Promise<Workspace[]> {
82 const res = await fetch('/api/workspaces');
83 if (!res.ok) throw new Error(`list failed: ${res.status}`);
84 const body = (await res.json()) as { workspaces: Workspace[] };
85 return body.workspaces;
86}
87
88/**
89 * Create a workspace. `agents` is optional and normally omitted — the backend

Callers 1

WorkspacesProviderFunction · 0.90

Calls 1

fetchFunction · 0.50

Tested by

no test coverage detected