A bare real-LLM executor over a throwaway workspace. Keep the returned guard in scope so the temp dir is cleaned up (no stray temp files).
()
| 35 | /// A bare real-LLM executor over a throwaway workspace. Keep the returned guard |
| 36 | /// in scope so the temp dir is cleaned up (no stray temp files). |
| 37 | fn real_executor() -> (Arc<dyn AgentExecutor>, tempfile::TempDir) { |
| 38 | let path = repo_config_path(); |
| 39 | let config = CodeConfig::from_file(&path) |
| 40 | .unwrap_or_else(|e| panic!("failed to load {}: {e}", path.display())); |
| 41 | let llm_client = |
| 42 | create_client_with_config(config.default_llm_config().expect("default llm config")); |
| 43 | let workspace = tempfile::tempdir().expect("temp workspace"); |
| 44 | let executor = TaskExecutor::new( |
| 45 | Arc::new(AgentRegistry::new()), |
| 46 | llm_client, |
| 47 | workspace.path().to_string_lossy().to_string(), |
| 48 | ); |
| 49 | (Arc::new(executor), workspace) |
| 50 | } |
| 51 | |
| 52 | /// A real-LLM session built from the repo config, over a throwaway workspace. |
| 53 | async fn real_session() -> (AgentSession, tempfile::TempDir) { |
no test coverage detected