(id: string | null)
| 45 | |
| 46 | const localRecentId = WorkspaceRecencyStorage.getMostRecent() |
| 47 | const findWorkspace = (id: string | null) => |
| 48 | id ? workspaces.find((w) => w.id === id) : undefined |
| 49 | |
| 50 | const targetWorkspace = |
| 51 | findWorkspace(localRecentId) ?? findWorkspace(lastActiveWorkspaceId) ?? workspaces[0] |