MCPcopy Index your code
hub / github.com/AI45Lab/Code / session_options_map_parallel_delegation_controls

Function session_options_map_parallel_delegation_controls

sdk/python/src/lib.rs:7014–7028  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7012
7013 #[test]
7014 fn session_options_map_parallel_delegation_controls() {
7015 let mut session_options = PySessionOptions::new();
7016 session_options.max_parallel_tasks = Some(3);
7017 session_options.auto_delegation = Some(PyAutoDelegationConfig::new(true, true, 0.8, 2));
7018 session_options.auto_parallel = Some(false);
7019
7020 let opts = build_rust_session_options(session_options).unwrap();
7021 assert_eq!(opts.max_parallel_tasks, Some(3));
7022 assert_eq!(opts.auto_parallel_delegation, Some(false));
7023 let auto = opts.auto_delegation.expect("auto delegation config");
7024 assert!(auto.enabled);
7025 assert!(!auto.auto_parallel);
7026 assert!((auto.min_confidence - 0.8).abs() < f32::EPSILON);
7027 assert_eq!(auto.max_tasks, 2);
7028 }
7029
7030 #[test]
7031 fn session_options_map_active_skill_tool_restriction_control() {

Callers

nothing calls this directly

Calls 2

expectMethod · 0.80

Tested by

no test coverage detected