Mr. Trump remains the most potent proponent of a Republican health bill that Ms. Pelosi recently appraised as “doo-doo on their shoe, tattooed on their forehead.”

Yet for Ms. Pelosi, recent negotiations over government funding have delivered the first meaningful bipartisan exchanges of this Congress — arriving at a moment when some Democrats have chafed at her continued grip on power, expressing a desire to elevate new voices. (A newly agreed upon budget deal, announced on Sunday night, requires Democratic votes in both chambers to pass.)

There have been occasional gestures toward collaboration. In a phone conversation the day after the election, Ms. Pelosi suggested that Mr. Trump meet with a bipartisan congressional caucus on women’s issues. Mr. Trump said his daughter Ivanka should go instead, handing her the phone. A person close to Ms. Trump said she would be happy to attend.

Mr. Trump has in many ways made Ms. Pelosi’s job easier by declining to bother much with Democrats so far, binding the minority caucus in opposition. She has called Mr. Trump “one of the best organizers the Democratic Party has ever had” — a boon of sorts but also a testament, critics say, to an absence of inspiring affirmative leadership from top Democrats in Washington.

The president has elevated other Democrats with characteristic name-calling: Senator Chuck Schumer of New York (“head clown”), Senator Bernie Sanders of Vermont (“crazy Bernie”), Senator Elizabeth Warren of Massachusetts (“Pocahontas”).

Ms. Pelosi has avoided this fate, mostly. “When he lost the health care bill, he called us losers,” she said in the interview. “All right, way to go!”

It is not clear if this more gentle treatment reflects Mr. Trump’s assessment of Ms. Pelosi’s importance or a signal of respect for a woman he used to describe privately as a tenacious negotiator, the kind he championed at times in his business life.