def get_context_messages(self, session_id: str) -> list:
        """Get context messages for a session.

        :param str session_id: Unique session ID.
        :return: List of context messages.
        :rtype: list
        """
        self.cursor.execute(
            "SELECT context_data FROM context_messages WHERE session_id = ?",
            (session_id,),
        )
        result = self.cursor.fetchone()
        return json.loads(result[0]) if result else {}
Get context messages for a session.

        :param str session_id: Unique session ID.
        :return: List of context messages.
        :rtype: list
        
backend/director/db/sqlite/db.py