Add search feature to view chat history functionality.