High memory usage leading to UI freezing/hanging

Well, I clean the chat history via the button of “show chat history” at upper right, now the IDE is smooth again.

.
One more question, if I clean all chat history, which leads to the missing context, so if I start a new chat for the current project, what kind of prompt should I write to the agent for keeping the performance of the agent?