(filename: string)
| 620 | } |
| 621 | |
| 622 | function sanitizeBedrockName(filename: string): string { |
| 623 | const baseName = filename.replace(/\.[^/.]+$/, '').replace(/[^a-zA-Z0-9\s()[\]-]/g, ' ') |
| 624 | const compacted = baseName.replace(/\s+/g, ' ').trim() |
| 625 | return compacted || 'Document' |
| 626 | } |
| 627 | |
| 628 | function getBedrockDocumentFormat(attachment: PreparedProviderAttachment): string { |
| 629 | if (attachment.extension === 'md' || attachment.mimeType === 'text/markdown') return 'md' |
no test coverage detected