updateContext<T> method
void
updateContext<
T>( - String key,
- T value
)
override
Implementation
@override
void updateContext<T>(String key, T value) {
// Update parent context first
super.updateContext(key, value);
// Send updated user context to QA Assistant
try {
final messageService = getQAMessageService();
// Get the complete context after update
final completeContext = visitor.getContext();
print('📤 Broadcasting updated user context to QA Assistant');
print(' Updated key: $key = $value');
print(' Complete context: $completeContext');
// Broadcast the complete context
messageService.broadcastUserContextUpdate(completeContext);
print('✅ User context broadcasted successfully');
} catch (e) {
print('⚠️ Error sending updated user context to QA Assistant: $e');
}
}