refactored currentWorkspaceAction