(entry: InboxEntry)
| 55 | * flat list used. |
| 56 | */ |
| 57 | export function previewForEntry(entry: InboxEntry): string { |
| 58 | const c = (entry.comments ?? '').trim() |
| 59 | if (c) { |
| 60 | const firstLine = c.split('\n').find((l) => l.trim().length > 0) ?? '' |
| 61 | return firstLine.replace(/^[#>*\-]+\s*/, '').trim() |
| 62 | } |
| 63 | if (entry.docs && entry.docs.length > 0) { |
| 64 | const d = entry.docs[0] |
| 65 | if (d) { |
| 66 | const suffix = entry.docs.length > 1 ? ` · +${entry.docs.length - 1} more` : '' |
| 67 | return `📄 ${d.path}${suffix}` |
| 68 | } |
| 69 | } |
| 70 | return '' |
| 71 | } |
no outgoing calls
no test coverage detected