MCPcopy Index your code
hub / github.com/microsoft/data-formulator / listWorkspaces

Function listWorkspaces

src/app/workspaceService.ts:59–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57
58/** List all workspaces (newest first). */
59export async function listWorkspaces(): Promise<WorkspaceSummary[]> {
60 const backend = await _getBackend();
61 if (backend === 'ephemeral') {
62 const entries = await workspaceDB.list();
63 return entries.map(e => ({
64 id: e.id,
65 display_name: e.displayName,
66 created_at: e.createdAt,
67 saved_at: e.updatedAt,
68 }));
69 }
70 const { data } = await apiRequest(getUrls().SESSION_LIST);
71 return data.sessions ?? [];
72}
73
74/** Load a workspace's saved state. Returns null if not found. */
75export async function loadWorkspace(id: string): Promise<{ state: Record<string, any>; displayName: string } | null> {

Callers 3

DataSourceSidebarPanelFunction · 0.90
DataFormulatorFCFunction · 0.90
WorkspacePickerDialogFunction · 0.90

Calls 3

apiRequestFunction · 0.90
getUrlsFunction · 0.90
_getBackendFunction · 0.85

Tested by

no test coverage detected