merge method
Merge another context into this one, preferring the other's topic/language.
Implementation
ConversationContext merge(ConversationContext other) {
return ConversationContext(
mentionedFiles: {...mentionedFiles, ...other.mentionedFiles},
mentionedUrls: {...mentionedUrls, ...other.mentionedUrls},
mentionedCommands: {...mentionedCommands, ...other.mentionedCommands},
currentTopic: other.currentTopic ?? currentTopic,
currentLanguage: other.currentLanguage ?? currentLanguage,
);
}