Call this hook in a component that has access to both mood analysis state and the cloud provider. It:
import { useMoodCloudSync } from '@hiyve/react-intelligence';
import { useMoodAnalysisSafe } from '@hiyve/react-intelligence';
import { useTranscription, useRecording } from '@hiyve/react';
function AIPanel({ userId, roomName }) {
const { responseId } = useRecording();
const { transcriptions, enrichTranscription } = useTranscription();
const moodAnalysis = useMoodAnalysisSafe();
useMoodCloudSync({
roomName,
userId,
responseId,
moodStates: moodAnalysis?.moodStates ?? null,
moodEnabled: !!moodAnalysis?.enabled && !!moodAnalysis?.ready,
transcriptionCount: transcriptions?.length ?? 0,
enrichTranscription,
});
}
Syncs mood analysis data to the cloud AI context.