refactoring / new history/open conversation logic