How to open the sidebar when right clicking on a file?

I am trying to add feature which will open right sidebar on file right click. But I can’t understand how I can do that.

Tried to find where sidebar opening action executes to copy this function and add some event listener on file to call this function. But I can’t find function. The closest I got is _onClickAction in fileactionsmenu.js but I don’t understand where is that function which opens sidebar.