Bruce Cameron over at consortiumnews.com has an interesting piece that makes a fairly decent case that the conventional wisdom -- the U.S. losing interest in Afghanistan after the Soviets left was responsible for the Taliban coming to power (with the implication being that we can't afford to "bug out" again) -- is not quite right -- thought the presentation is a little convoluted for my taste.
Cameron does point out that far from losing interest, the U.S., thought the CIA, pursued an active intervention in Afghanistan after the Soviets left, operating mainly through the Pakistani ISI, figuring the Soviet-backed Najibullah government would fall quickly. But Najubullah held on until 1992. He was replaced by a moderate Islamist, Ahmad Shah Massoud, but Pakistan's ISI, and therefore the U.S., kept funding other contendors, notably Gulbuddin Hekmatyar. The scramble for power, aggravated by CIA-ISI funding for anti-government forces, paved the way for the ISI to groom the Taliban to take power in 1996. The U.S., far from being inattentive, worked with the ISI, hoping the Taliban would at least bring stability (and cement Pakistani influence, not necessarily the U.S. goal).
There's more to what is really a convoluted history, but in essence a case can be made that U.S. attention rather than inattention contributed to the rise of the Taliban -- which didn't come until seven years after the Soviets left.
If there's a lesson for now it is that the U.S. doesn't have a history of diagnosing Afghani politics accurately and influencing them in a democratic or even a modestly tolerant direction. Hamid Karzai, our chosen vessel (or the one we're stuck with) may have less legitimacy now than Najibullah did then, and certainly less than Massoud. Without a respected central government to defend -- which may never be in the cards for Afghanistan, which might not be a tragedy -- the kind of counterinsurgency program McChrystal is proposing has precious little chance of success.