Are contributions (or basis) from a TSP Roth Account considered as contributions (or basis) after it was transferred to a Fidelity Roth IRA?

I made a contribution to a TSP Roth Account many years ago (after 1998).  I transferred this TSP account to a Fidelity Roth IRA ~4 years ago.  Two years ago I made a $6500 contribution to the Fidelity Roth.  I'd like to withdraw some of the money but stay at or below the basis to avoid the tax/penalty.  Am I limited to the $6500 or is the original TSP Roth contribution considered part of the total basis?