Generate a position table for MLLM analysis
(self, positions: List[GridPosition])
| 736 | return positions |
| 737 | |
| 738 | def generate_position_table(self, positions: List[GridPosition]) -> str: |
| 739 | """Generate a position table for MLLM analysis""" |
| 740 | if not positions: |
| 741 | return "No grid positions found in the code." |
| 742 | |
| 743 | table = "Current Grid Layout Positions:\n" |
| 744 | table += "|Object|Method|Position|Scale|Line|\n" |
| 745 | |
| 746 | for pos in positions: |
| 747 | scale_str = str(pos.scale_factor) if pos.scale_factor else "default" |
| 748 | table += f"|{pos.object_name}|{pos.method}|{pos.position}|{scale_str}|{pos.line_number}|\n" |
| 749 | |
| 750 | return table |
| 751 | |
| 752 | |
| 753 | class GridCodeModifier: |