Update an existing tool in current_flow_items via tool_index. No-op if the tool_id is not found (defensive).
(&mut self, tool_id: &str, update_fn: impl FnOnce(&mut ToolDisplayState))
| 927 | /// Update an existing tool in current_flow_items via tool_index. |
| 928 | /// No-op if the tool_id is not found (defensive). |
| 929 | fn update_tool(&mut self, tool_id: &str, update_fn: impl FnOnce(&mut ToolDisplayState)) { |
| 930 | if let Some(&idx) = self.tool_index.get(tool_id) { |
| 931 | if let Some(FlowItem::Tool { tool_state }) = self.current_flow_items.get_mut(idx) { |
| 932 | update_fn(tool_state); |
| 933 | } |
| 934 | } |
| 935 | } |
| 936 | } |
| 937 | |
| 938 | /// Extract a human-readable summary from a tool result JSON Value. |
no test coverage detected