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

Function resolve_auto_delegation_config

core/src/agent_api/session_config.rs:8–29  ·  view source on GitHub ↗
(
    code_config: &CodeConfig,
    opts: &SessionOptions,
)

Source from the content-addressed store, hash-verified

6use std::sync::Arc;
7
8pub(super) fn resolve_auto_delegation_config(
9 code_config: &CodeConfig,
10 opts: &SessionOptions,
11) -> crate::config::AutoDelegationConfig {
12 let mut auto_delegation = if let Some(config) = opts.auto_delegation.clone() {
13 config
14 } else {
15 let mut config = code_config.auto_delegation.clone();
16 if let Some(auto_parallel) = code_config.auto_parallel {
17 config.auto_parallel = auto_parallel;
18 }
19 config
20 };
21 if let Some(enabled) = opts.manual_delegation_enabled {
22 auto_delegation.allow_manual_delegation = enabled;
23 }
24 if let Some(auto_parallel) = opts.auto_parallel_delegation {
25 auto_delegation.auto_parallel = auto_parallel;
26 }
27
28 auto_delegation
29}
30
31pub(super) fn resolve_session_llm_client(
32 code_config: &CodeConfig,

Callers 2

register_task_capabilityFunction · 0.85
build_agent_sessionFunction · 0.85

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected