In this document I will try to give some guidelines on ways that students can work together.
I encourage students to help one another understand problems. But if you feel like a request for help has become a request to simply do all or part of an assignment for another student, then you have not only a right to say no but at least a soft obligation to say no.
There is nothing wrong with pointing at a word and saying "there is a typo here: it's spelled function, not funktion." That kind of thing is fine. But if a student asks for help, and you say "the solution is to create a function that returns the result of adding its two parameters" and they look at you blankly, clearly at a loss, then that might be a warning sign. If you find the only solution is to say something like "write the word function, now write the word add, now write an open parenthesis, etc..." then that is going too far. If you are clearly doing their work for them rather than helping them to understand a concept, then it is time to end the session. Don't do the assignment for them, just explain what needs to be done, and let them do it.
Here is another way to look at it. All is well if a student says something like this after you explain something to them: "Oh gosh, now I see. I can finish this." And all is certainly well if they say: "Oh silly me, how could I have missed that? Thanks for the help. I've got it from here." But if you find yourself becoming a verbal typewriter, telling them exactly what to type and where to type it, then something is wrong. They are asking you to cross a line. They want you not just to help them to understand a problem, but to do their homework for them.
I want to add a note saying that these are gentle recommendations. When one student is willing to help another, that is a commendable act. I don't want to put pressure on good people who are helping others and in doing so frequently increasing their own understanding. All that is good and something that I encourage. But sometimes it is hard for a student to say "No, this has gone far enough. I don't feel comfortable giving you that kind of help." So now you have an "official document" explaining that your teacher has defined when giving help to another student crosses a line into doing their homework for them.
If you can give tips and then watch the other student fill in the details, then that is good. But if you are simply a verbal typewriter dictating what they should type, then that is nearly always a sign that you are being asked to do too much.