(value)
| 4290 | } |
| 4291 | |
| 4292 | function formatChatTime(value) { |
| 4293 | const text = String(value || ""); |
| 4294 | const match = text.match(/(\d{2}):(\d{2})/); |
| 4295 | return match ? `${match[1]}:${match[2]}` : ""; |
| 4296 | } |
| 4297 | |
| 4298 | function renderChatHistory(data = {}) { |
| 4299 | const sessions = Array.isArray(data.sessions) ? data.sessions : state.chatHistory; |