#1 advice get the truck out of the dealer. Why is it there for an A/C problem? If you're not versed in A/C I fully understand not DIY'ing it, but get away from the dealer as you will pay full price plus.
The compressor used on your '97 is the HT6 otherwise known as the "belly leaker" and they are prone to leaking at the seal in the case. If you notice oily residue all over the compressor body and around it, this is the issue.
You could replace with another, or upgrade. Sanden is the popular go-to here and they have replacements for the HT6 that will bolt in. Do beware of Chinesium copies; some of them are probably acceptable but there's risk you'll get junk. When they start talking about "Sanden style" you know it's a knockoff. #6511340 should be the Sanden that fits your truck but do some research before buying.
Also do expect to spend some amount of money on parts and labor. Although your compressor may just be leaking, not grenaded, if you want the new compressor to live (and be warrantied in case of issue) you'll need to flush the system, replace the orifice tube, and accumulator. Then, have it vacuumed down, filled with oil and charged to specification.
Richard