(content)
| 343 | |
| 344 | // 格式化消息内容 |
| 345 | formatMessage(content) { |
| 346 | // 简单的文本格式化,支持换行 |
| 347 | return content |
| 348 | .replace(/\n/g, '<br>') |
| 349 | .replace(/\*\*(.*?)\*\*/g, '<strong>$1</strong>') |
| 350 | .replace(/\*(.*?)\*/g, '<em>$1</em>'); |
| 351 | } |
| 352 | |
| 353 | // 显示打字指示器 |
| 354 | showTypingIndicator() { |