From what I understand of your question, the add button is tied to the current content of the list on the right. So what about putting it in or right next to the list? Perhaps like the following screenshot:

![Accounts and Repositories Screenshot][1]

You don't have to put the Add button inside the list. It could be something like this:

![enter image description here][2]

This should clearly indicate to the user that it interacts with the current contents of the list, and also doesn't give the impression that it might close the dialog since it isn't in the footer of the dialog.


  [1]: https://i.sstatic.net/oXFlJ.png
  [2]: https://i.sstatic.net/ZhFDq.png