MCPcopy Create free account
hub / github.com/microsoft/data-formulator / updateWorkspaceMeta

Function updateWorkspaceMeta

src/app/workspaceService.ts:109–122  ·  view source on GitHub ↗
(id: string, displayName: string)

Source from the content-addressed store, hash-verified

107
108/** Update only the display name in workspace_meta.json (lightweight, no full state). */
109export async function updateWorkspaceMeta(id: string, displayName: string): Promise<void> {
110 const backend = await _getBackend();
111 if (backend === 'ephemeral') {
112 await workspaceDB.updateDisplayName(id, displayName);
113 _notifyListChanged();
114 return;
115 }
116 await apiRequest(getUrls().SESSION_UPDATE_META, {
117 method: 'POST',
118 headers: { 'Content-Type': 'application/json' },
119 body: JSON.stringify({ id, display_name: displayName }),
120 });
121 _notifyListChanged();
122}
123
124/** Save current workspace state (called by auto-save). */
125export async function saveWorkspaceState(state: Record<string, unknown>): Promise<void> {

Callers 3

DataSourceSidebarPanelFunction · 0.90
DataFormulatorFCFunction · 0.90
useWorkspaceAutoNameFunction · 0.90

Calls 4

apiRequestFunction · 0.90
getUrlsFunction · 0.90
_getBackendFunction · 0.85
_notifyListChangedFunction · 0.85

Tested by

no test coverage detected