Skip to content

Commit 61a776f

Browse files
committed
chore: resolve unambiguous instrument agent and remove dead helper
1 parent d5790ec commit 61a776f

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/setup/mod.rs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1240,6 +1240,8 @@ async fn run_instrument_setup(
12401240
let runnable_agents = detect_runnable_agents();
12411241
let mut selected = if let Some(agent_arg) = args.agent {
12421242
map_instrument_agent_arg(agent_arg)
1243+
} else if let Some(agent) = resolve_unambiguous_instrument_agent(&runnable_agents, &detected) {
1244+
agent
12431245
} else {
12441246
let candidate_agents: Vec<Agent> = if runnable_agents.is_empty() {
12451247
ALL_AGENTS.to_vec()
@@ -2571,15 +2573,6 @@ fn map_instrument_agent_arg(agent: InstrumentAgentArg) -> Agent {
25712573
}
25722574
}
25732575

2574-
fn map_instrument_agent_arg_to_agent_arg(agent: InstrumentAgentArg) -> AgentArg {
2575-
match agent {
2576-
InstrumentAgentArg::Claude => AgentArg::Claude,
2577-
InstrumentAgentArg::Codex => AgentArg::Codex,
2578-
InstrumentAgentArg::Cursor => AgentArg::Cursor,
2579-
InstrumentAgentArg::Opencode => AgentArg::Opencode,
2580-
}
2581-
}
2582-
25832576
fn map_agent_arg(agent: AgentArg) -> Agent {
25842577
match agent {
25852578
AgentArg::Claude => Agent::Claude,

0 commit comments

Comments
 (0)