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

Function worker_agent_spec_maps_to_rust_session_options

sdk/node/src/lib.rs:6104–6128  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6102
6103 #[test]
6104 fn worker_agent_spec_maps_to_rust_session_options() {
6105 let opts = js_session_options_to_rust(Some(SessionOptions {
6106 worker_agents: Some(vec![WorkerAgentSpec {
6107 name: "frontend-cow".to_string(),
6108 description: "Fix frontend bugs".to_string(),
6109 kind: Some("implementer".to_string()),
6110 model: Some("openai/gpt-4o".to_string()),
6111 max_steps: Some(8),
6112 ..Default::default()
6113 }]),
6114 ..Default::default()
6115 }))
6116 .unwrap();
6117
6118 assert_eq!(opts.worker_agents.len(), 1);
6119 assert_eq!(opts.worker_agents[0].name, "frontend-cow");
6120 assert_eq!(opts.worker_agents[0].kind.as_str(), "implementer");
6121 assert_eq!(
6122 opts.worker_agents[0]
6123 .model
6124 .as_ref()
6125 .map(|model| model.model_ref()),
6126 Some("openai/gpt-4o".to_string())
6127 );
6128 }
6129
6130 #[test]
6131 fn local_workspace_backend_maps_to_rust_session_options() {

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected