(message: string)
| 149 | * @returns Sanitized message suitable for display |
| 150 | */ |
| 151 | export const cleanMessage = (message: string): string => |
| 152 | message |
| 153 | .replace(/\n+/g, ' ') |
| 154 | .replace(/\s+/g, ' ') |
| 155 | .replace(/[^\x20-\x7E]+/g, '') // Non-printable. |
| 156 | .trim(); |
| 157 | |
| 158 | /** |
| 159 | * Extracts the first meaningful user message from conversation messages. |
no outgoing calls
no test coverage detected