(id: string)
| 91 | |
| 92 | /** Delete a workspace. */ |
| 93 | export async function deleteWorkspace(id: string): Promise<void> { |
| 94 | const backend = await _getBackend(); |
| 95 | if (backend === 'ephemeral') { |
| 96 | await workspaceDB.delete(id); |
| 97 | _notifyListChanged(); |
| 98 | return; |
| 99 | } |
| 100 | await apiRequest(getUrls().SESSION_DELETE, { |
| 101 | method: 'POST', |
| 102 | headers: { 'Content-Type': 'application/json' }, |
| 103 | body: JSON.stringify({ id }), |
| 104 | }); |
| 105 | _notifyListChanged(); |
| 106 | } |
| 107 | |
| 108 | /** Update only the display name in workspace_meta.json (lightweight, no full state). */ |
| 109 | export async function updateWorkspaceMeta(id: string, displayName: string): Promise<void> { |
no test coverage detected