()
| 54 | const fileData = part?.file?.file_data || ''; |
| 55 | return part?.type === 'file' && ( |
| 56 | /\.pdf$/i.test(filename) || |
| 57 | (typeof fileData === 'string' && fileData.startsWith('data:application/pdf')) |
| 58 | ); |
| 59 | }); |
| 60 | }); |
| 61 | } |
| 62 | |
| 63 | function applyPdfFileParserPlugin(body, messages = []) { |
| 64 | if (!hasPdfContent(messages)) return; |
no test coverage detected