IS THERE WHAT Valery Giscard d'Esting calls, in a Newsweek interview, a "code of conduct of detente," which dictates no interference in another state's internal affairs, and a strictly limited approach to arms control? The French president thinks so. He says Leonid Brezhnev thinks so. He suggests that they agree that Jimmy Carter, by his human rights and arms-control policies, had broken the code and that this is what's undermining detente.

Let us quickly pass by the spectale of the leader of a friendly nation joining, so publicly and uncritically, what is in part a Soviet propaganda campaign meant to make Mr. Darter stand down. The explanation for that is presumably to be sought in Mr. Giscard d'Estaing's political distress. We will try to deal here with the merits.

Mr. Brezhnev rejects "ideological dentente" - when the Soviet Union is on the giving end. But when its on the receiving end, that't another story: He perceives the Carter human-rights drive as "means of pressue of get them to abandontheir system," his French interlocutor reports. Well, hehas a point. Mr. Carter's denial, in his Charleston speech yesterday, that his rights campaign "attacks their [the Soviets] vital interest" may accurately reflect the president's personal views. But to anyone who knows anything about the Russians, it is perfectly obvious that a campaign reaching out to dissidents, religious communities, would-be emigrants and ethnics (the Soviet "peoples" to which the President mischievously referred yesterday) is bound to be taken by the Kremlin as a provocation and a threat.

The question is not whether Mr. Carter has a right to apply such ideological pressure, which is what it is, plainly, he does. The question is whether he is wise to do so, for the risk is that he will thereby spoil the Kremlin's political capacity for cooperation in other fields.

Nothing in the Charleston speech suggested that Mr. Carter has yet learned this lesson. He dismissed Moscow's warnings on the score as "negative comments . . . merely designed as propaganda to put pressre on us." He appealed anew for American (and European) support for his hard line on rights, But never mind that Mr. Carter may deny it, or that he may not understand it: His line is too hard, and it's costing him - and the country.

The complaint that his SALT proposals also violate the "code" is separate. One can argue about the timing and manner of presentation of his original proposals. But they represent, in our judgement, the serious and substantial initiative that Mr. Carter insisted again yesterday that they were. If they do not suit Moscow, then Moscow is not without recourse. It can offer its own proposals; this is called negotiating. It can try to put the onus of stalemate on Washington; this is called stalling. Mr. Brezhnev must be laughing up his sleeve at Mr. Giscard d'Estaing for enwoing an old bargaining tactics with the dignity of a "code."

We make bold to say that we're coming nearer an understanding of Mr. Carter's foreigh policy. When he deals in the solid coin of arms and other more or less tangible considerations, he's capable of perceiving the United States' interest and the other fellow's interest and balancing them off. But when he enters the realm of ideology - we might even say theology - he yields up some part of his judgement to his personal moralism. We do not argue for an amoral policy. We argue for good sense. This has nothing to do with a "code." It is a matter of discretion in one's own interest.