I don't quite have the answer to that question, but I would argue that the question itself reflects some common confusion.
If all exchange rates are free to adjust to market forces, they would tend to produce a balance between each country's trade with the rest of the world. Strictly speaking, that assumes no unruly capital flows to complicate matters. But while market forces tend to promote trade balance with all other countries combined, there is no reason to expect the market to balance trade on a bilateral, country-by-country, basis.
However, since China has a large trade surplus and the U.S. has a large trade deficit, chances are we will have a large trade deficit with China. China has allowed the yuan to appreciate in recent years, but not to the extent that market forces alone would have likely produced. To hold the yuan down relative to the dollar China buys dollars, which, conversely, holds the dollar up relative to the yuan.
What do I mean by "buying dollars"? In the first instance, the dollars purchased are probably claims on U.S. banks (deposits). Those are then used to purchase U.S. Treasury securities to have claims totally safe from credit risk and in a very liquid market. China could, and is, diversifying by purchasing claims denominated in other currencies, but as long as it is running trade surpluses it has to hold some countries' assets, and as long as the U.S. is running trade deficits someone must accumulate its assets. The quantity of assets to be held is determined, not separately, but as part of the process of incurring the deficit. It is not a separate and independent decision.
Looking at it from another perspective, China is a huge saver with a current account surplus, and, as long as we have low savings and a large current account deficit, China will continue accumulating dollars.
To repeat, my point is that the decision to buy or hold U.S. Treasuries really isn't a separate, independent decision. China's accumulation of dollar assets is part of the same arithmetic as the size of its surplus. They are mutually determined rather than independently determined.
One way to think of it is that we are buying more from the rest of the world (mainly China) in the form of imports of goods and services than we are selling to the rest of the world in the form of exports. If we aren't fully paying for our imports with exports of goods and services, we must make up the difference by selling assets (in the form of debt or equities or direct investment) or incurring new foreign debt. To the extent that China doesn't import goods and services to the extent that they are exporting goods and services, they have to take the difference in increased foreign assets or reduced foreign debt.
This may be harder to follow, but, in effect, the capital account counterpart to our deficit with China- the capital inflow- fills the gap in U.S. saving. Our business sector saves some, but our personal saving rate has been near zero and our government saving (budget surplus) has been negative. Since our investment is positive and much greater than our aggregate domestic saving, the difference is made up by the capital inflow that finances our external deficit. From China's viewpoint, they are investing their excess saving in U.S. assets.
A technical point: In the previous post, where the focus was on the impact of trade on our GDP, I used trade in goods and services. When we export goods and services, income is generated at home. When we import goods and services, income is generated abroad. In this piece, however, the focus is on trade's impact on exchange rates and total saving. For that purpose, we need to include some international transactions in addition to trade in goods and services. We need the "current account" concept, which includes trade, but also unilateral transfers, income on investments in the other countries, etc. The distinction isn't important for must purposes, but I don't want to imagine my international trade professors rolling over.
In case I've totally lost you, the short answer to the question posed by the title is that it's not a separate, independent decision. It's mutually determined by the size of China's trade surplus and our deficit.