Create a collapsible section. Args: section_id: Unique ID for the section label: Label to display content: Content to show when expanded Returns: HTML string for the collapsible section
(
self, section_id: str, label: str, content: str
)
| 730 | return system_content |
| 731 | |
| 732 | def _create_collapsible_section( |
| 733 | self, section_id: str, label: str, content: str |
| 734 | ) -> str: |
| 735 | """Create a collapsible section. |
| 736 | |
| 737 | Args: |
| 738 | section_id: Unique ID for the section |
| 739 | label: Label to display |
| 740 | content: Content to show when expanded |
| 741 | |
| 742 | Returns: |
| 743 | HTML string for the collapsible section |
| 744 | """ |
| 745 | return f""" |
| 746 | <div class="collapsible collapsed" id="{section_id}"> |
| 747 | <span class="toggle" onclick="toggle('{section_id}')">[+]</span> {label} |
| 748 | <div class="content">{html.escape(content)}</div> |
| 749 | </div>""" |
| 750 | |
| 751 | def _format_tool_section(self, fields: BaseModel, entry_id: str) -> str: |
| 752 | """Format tool-related information. |