def update_from(self, locations: list[Path | URL]) -> None:
        """Update the history from the given list of locations.

        Args:
            locations: A list of locations to update the history with.

        This call removes any existing history and sets it to the given
        value.
        """
        option_list = self.query_one(OptionList).clear_options()
        for history_id, location in reversed(list(enumerate(locations))):
            option_list.add_option(Entry(history_id, location))
Update the history from the given list of locations.

        Args:
            locations: A list of locations to update the history with.

        This call removes any existing history and sets it to the given
        value.
        
frogmouth/widgets/navigation_panes/history.py