|
|
@@ -35,6 +35,8 @@ interface VisionStreamPayload {
|
|
|
frame: string;
|
|
|
/** Optional: lets the UI tag which camera source the frame came from */
|
|
|
sourceLabel?: string;
|
|
|
+ /** UUID shared across all frames in a batch session — links DB rows for Vault grouping */
|
|
|
+ batchId?: string;
|
|
|
}
|
|
|
|
|
|
// ─── Payload shape Angular sends on chat:send ─────────────────────────────────
|
|
|
@@ -123,7 +125,7 @@ export class VisionGateway
|
|
|
// to complete first. This is the intentional I/O bottleneck.
|
|
|
let result: AnalysisResponse;
|
|
|
try {
|
|
|
- result = await this.palmOilService.analyzeImage(imageBuffer, sourceLabel);
|
|
|
+ result = await this.palmOilService.analyzeImage(imageBuffer, sourceLabel, payload.batchId);
|
|
|
} catch (err: any) {
|
|
|
this.logger.error(`❌ Inference failed for ${client.id}: ${err.message}`);
|
|
|
client.emit('vision:error', { message: err.message });
|