(raw: string)
| 7 | import './diagnostics.css'; |
| 8 | |
| 9 | function readableMessage(raw: string): string { |
| 10 | try { |
| 11 | const record: unknown = JSON.parse(raw); |
| 12 | if (record && typeof record === 'object' && !Array.isArray(record) && 'message' in record && typeof record.message === 'string') return record.message; |
| 13 | } catch { /* Plain daemon log lines already are the display message. */ } |
| 14 | return raw; |
| 15 | } |
| 16 | |
| 17 | export interface DaemonAlertsProps { |
| 18 | project?: string; |