Skip to content

Commit a333ce4

Browse files
authored
Merge pull request #74 from PathOnAI/lats-page-v2
Lats page v2
2 parents b86e28d + 31fd2c9 commit a333ce4

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

visual-tree-search-app/components/LATSVisual.tsx

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ const LATSVisual: React.FC<SimpleSearchVisualProps> = ({ messages }) => {
9595
}
9696

9797
// Handle tree structure updates
98-
if ((data.type === 'tree_update_node_expansion' || data.type === 'tree_update_node_children_evaluation')
98+
if ((data.type === 'tree_update_node_expansion' || data.type === 'tree_update_node_children_evaluation' || data.typ === 'tree_update_node_backpropagation')
9999
&& Array.isArray(data.tree)) {
100100
// Preserve simulation flags when updating from tree
101101
if (updatedTreeNodes.some(node => node.isSimulated)) {
@@ -151,11 +151,8 @@ const LATSVisual: React.FC<SimpleSearchVisualProps> = ({ messages }) => {
151151

152152
// Handle simulation removal
153153
if (data.type === 'removed_simulation') {
154-
// Remove simulation flags instead of removing nodes
155-
updatedTreeNodes = updatedTreeNodes.map(node => ({
156-
...node,
157-
isSimulated: false // Remove simulation flag
158-
}));
154+
// Remove all simulated nodes from the tree
155+
updatedTreeNodes = updatedTreeNodes.filter(node => !node.isSimulated);
159156

160157
newSimulatedNodes = []; // Clear simulated nodes list
161158
newSimulationStartNodeId = null; // Clear simulation start node

visual-tree-search-backend/app/api/lwats/agents_async/SearchAgents/base_agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ async def remove_simulated_trajectory(self, starting_node, terminal_node: LATSNo
137137
}
138138
trajectory_data.append(node_data)
139139

140-
await self.websocket_simulation_removed(trajectory_data, websocket=None)
140+
await self.websocket_simulation_removed(trajectory_data, websocket=websocket)
141141
pass
142142

143143
def _get_trajectory_data(self, terminal_node: LATSNode):

0 commit comments

Comments
 (0)