""" Custom web interface for Wildfire Environment. This module provides a wildfire-specific web interface with visual grid display and wildfire-specific features, without modifying the base web_interface.py. """ from typing import Optional from dataclasses import asdict from core.env_server.types import EnvironmentMetadata from ..models import WildfireAction def get_wildfire_web_interface_html(metadata: Optional[EnvironmentMetadata] = None) -> str: """Generate custom HTML for the wildfire environment web interface.""" # Convert markdown to HTML for instructions instructions_html = "" if metadata and metadata.readme_content: instructions_html = _markdown_to_html_simple(metadata.readme_content) return f"""
Click on a cell to set coordinates for water/break actions
\2', html_content, flags=re.DOTALL)
html_content = re.sub(r'`([^`]+)`', r'\1', html_content)
# Convert bold and italic
html_content = re.sub(r'\*\*(.*?)\*\*', r'\1', html_content)
html_content = re.sub(r'\*(.*?)\*', r'\1', html_content)
# Convert lists
html_content = re.sub(r'^- (.*?)$', r'