This function mutates the agent to a state that is writable. Practically this means reverting some fields back to their original values as they were written in the config.
(&mut self)
| 214 | /// Practically this means reverting some fields back to their original values as they were |
| 215 | /// written in the config. |
| 216 | fn freeze(&mut self) { |
| 217 | let Self { mcp_servers, .. } = self; |
| 218 | |
| 219 | mcp_servers |
| 220 | .mcp_servers |
| 221 | .retain(|_name, config| !config.is_from_legacy_mcp_json); |
| 222 | } |
| 223 | |
| 224 | /// This function mutates the agent to a state that is usable for runtime. |
| 225 | /// Practically this means to convert some of the fields value to their usable counterpart. |