MCPcopy Create free account
hub / github.com/AI45Lab/Code / real_session

Function real_session

core/tests/test_workflow_facade_real_llm.rs:53–65  ·  view source on GitHub ↗

A real-LLM session built from the repo config, over a throwaway workspace.

()

Source from the content-addressed store, hash-verified

51
52/// A real-LLM session built from the repo config, over a throwaway workspace.
53async fn real_session() -> (AgentSession, tempfile::TempDir) {
54 let path = repo_config_path();
55 let config = CodeConfig::from_file(&path)
56 .unwrap_or_else(|e| panic!("failed to load {}: {e}", path.display()));
57 let agent = Agent::from_config(config)
58 .await
59 .expect("build agent from real config");
60 let workspace = tempfile::tempdir().expect("temp workspace");
61 let session = agent
62 .session(workspace.path().to_string_lossy().to_string(), None)
63 .expect("create session");
64 (session, workspace)
65}
66
67/// The facade's `phase` runs a real fan-out and emits PhaseStart/PhaseEnd
68/// milestones on the WorkflowEvent stream.

Calls 4

expectMethod · 0.80
pathMethod · 0.80
repo_config_pathFunction · 0.70
sessionMethod · 0.45

Tested by

no test coverage detected