I too have a terminally ill dear and beloved friend and I have come to gage that there are days she just wants me to talk and make her smile and others when she craves talking about missing her grown children and worrying about them when she will be gone. She also gets very depressed and sometimes feels comfortable and comforted by talking about what a burden she feels to her husband. Your friend is the same person she was before she became ill. Trust the relationship you had then and continue it. Whatever you do, eternal cheerfulness, tends to drive a dying person away and give them a sense that you can't take what is happening.
Friendship is forever.
Be her friend in the same loving and respectful way you always have been. She should value that and you.