(
extraction: ReturnType<typeof extractMediaAttachments>,
)
| 1093 | } |
| 1094 | |
| 1095 | private validateMediaCapabilities( |
| 1096 | extraction: ReturnType<typeof extractMediaAttachments>, |
| 1097 | ): boolean { |
| 1098 | if (!extraction.hasMedia) return true; |
| 1099 | if ( |
| 1100 | extraction.imageAttachmentIds.length > 0 && |
| 1101 | !this.supportsCurrentModelCapability('image_in') |
| 1102 | ) { |
| 1103 | this.showError('Current model does not support image input.'); |
| 1104 | return false; |
| 1105 | } |
| 1106 | if ( |
| 1107 | extraction.videoAttachmentIds.length > 0 && |
| 1108 | !this.supportsCurrentModelCapability('video_in') |
| 1109 | ) { |
| 1110 | this.showError('Current model does not support video input.'); |
| 1111 | return false; |
| 1112 | } |
| 1113 | return true; |
| 1114 | } |
| 1115 | |
| 1116 | private supportsCurrentModelCapability(capability: string): boolean { |
| 1117 | const capabilities = |
no test coverage detected