Function getInitialHistoryContext