Diedrich Coffee Inc. is planning to sell some of its assets, including some company-operated coffeehouses outside of Southern California, as part of an amended credit agreement with a lender, the Irvine company disclosed Wednesday in its annual report. The coffeehouse chain said last month that it was in technical violation of its lending arrangement. Under the new arrangement, Diedrich said its lender, Fleet National Bank, will receive 50% of the proceeds from the assets sale. The chain also disclosed that it lost $22.4 million, or $1.80 a share, in the fiscal year ended June 28, compared with a loss of $2.6 million, or 43 cents a share, the previous year. Revenue climbed to $74.5 million from $24.2 million. Diedrich had warned of heavy losses from closing 39 poorly performing Gloria Jean's coffee shops. The quarterly report was filed with the Securities and Exchange Commission.