| 56 | // If images are excluded, strip base64 data but keep metadata |
| 57 | if (!options.includeImages) { |
| 58 | const processIterations = (iterations: IterationData[]) => { |
| 59 | return iterations.map(iteration => ({ |
| 60 | ...iteration, |
| 61 | modelImages: iteration.modelImages?.map(() => '[Image data excluded]'), |
| 62 | sensors: iteration.sensors.map(sensor => ({ |
| 63 | ...sensor, |
| 64 | content: (sensor.type === 'screenshot' || sensor.type === 'camera') |
| 65 | ? { size: sensor.content?.size, excluded: true } |
| 66 | : sensor.content |
| 67 | })) |
| 68 | })); |
| 69 | }; |
| 70 | |
| 71 | if (exportObject.currentSession) { |
| 72 | exportObject.currentSession = processIterations(exportObject.currentSession); |