(
code_config: &CodeConfig,
_workspace: &Path,
opts: &SessionOptions,
tool_executor: Arc<ToolExecutor>,
agent_event_tx: broadcast::Sender<AgentEvent>,
)
| 104 | } |
| 105 | |
| 106 | fn build_tool_context( |
| 107 | code_config: &CodeConfig, |
| 108 | _workspace: &Path, |
| 109 | opts: &SessionOptions, |
| 110 | tool_executor: Arc<ToolExecutor>, |
| 111 | agent_event_tx: broadcast::Sender<AgentEvent>, |
| 112 | ) -> ToolContext { |
| 113 | let mut tool_context = tool_executor.registry().context(); |
| 114 | if let Some(ref search_config) = code_config.search { |
| 115 | tool_context = tool_context.with_search_config(search_config.clone()); |
| 116 | } |
| 117 | tool_context = tool_context.with_agent_event_tx(agent_event_tx); |
| 118 | |
| 119 | if let Some(handle) = opts.sandbox_handle.clone() { |
| 120 | tool_executor.registry().set_sandbox(Arc::clone(&handle)); |
| 121 | tool_context = tool_context.with_sandbox(handle); |
| 122 | } |
| 123 | |
| 124 | tool_context |
| 125 | } |
no test coverage detected