(&self, name: &str, args: &serde_json::Value, result: &mut ToolResult)
| 492 | } |
| 493 | |
| 494 | fn attach_diff_metadata(&self, name: &str, args: &serde_json::Value, result: &mut ToolResult) { |
| 495 | if !file_history::is_file_modifying_tool(name) { |
| 496 | return; |
| 497 | } |
| 498 | let Some(file_path) = file_history::extract_file_path(name, args) else { |
| 499 | return; |
| 500 | }; |
| 501 | // Only store file_path in metadata, let translate_event read the actual content |
| 502 | // using the session's correct workspace |
| 503 | let meta = result.metadata.get_or_insert_with(|| serde_json::json!({})); |
| 504 | meta["file_path"] = serde_json::Value::String(file_path); |
| 505 | } |
| 506 | |
| 507 | pub fn definitions(&self) -> Vec<ToolDefinition> { |
| 508 | self.registry.definitions() |
no test coverage detected