刷新 Memory Graph 可视化
(placeholder, nodes=None, edges=None, height=500)
| 658 | |
| 659 | |
| 660 | def refresh_graph(placeholder, nodes=None, edges=None, height=500): |
| 661 | """刷新 Memory Graph 可视化""" |
| 662 | nodes = nodes if nodes is not None else st.session_state.vis_nodes |
| 663 | edges = edges if edges is not None else st.session_state.vis_edges |
| 664 | if nodes: |
| 665 | html_content = render_graph_html(nodes, edges) |
| 666 | with placeholder: |
| 667 | components.html(html_content, height=height) |
| 668 | |
| 669 | |
| 670 | def auto_scroll_to_bottom(): |
no test coverage detected