Complete chat_ui.js