MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / render_agents

Function render_agents

atomic-cli/src/commands/diagnostics/render.rs:273–301  ·  view source on GitHub ↗
(o: &mut String, agents: &[AgentState])

Source from the content-addressed store, hash-verified

271}
272
273fn render_agents(o: &mut String, agents: &[AgentState]) {
274 section(o, "Enabled agents (Atomic hooks active)");
275 let mut not_enabled = Vec::new();
276 for agent in agents {
277 let answer = match agent.enabled {
278 Enabled::Yes => "yes",
279 Enabled::Unknown => "unknown",
280 Enabled::No if agent.evidence.is_empty() => {
281 not_enabled.push(agent.name.as_str());
282 continue;
283 }
284 Enabled::No => "no",
285 };
286 line(
287 o,
288 &format!(" {} ({}): {answer}", agent.display_name, agent.name),
289 );
290 for evidence in &agent.evidence {
291 line(o, &format!(" - {evidence}"));
292 }
293 }
294 if agents.iter().all(|agent| agent.enabled == Enabled::No) {
295 line(o, " No agent has Atomic hooks enabled.");
296 }
297 if !not_enabled.is_empty() {
298 field(o, "Not enabled", &not_enabled.join(", "));
299 }
300 blank(o);
301}
302
303fn render_shim(o: &mut String, report: &Report) {
304 section(o, "Git shim");

Callers 1

render_textFunction · 0.85

Calls 9

lineFunction · 0.85
blankFunction · 0.85
sectionFunction · 0.70
fieldFunction · 0.70
is_emptyMethod · 0.45
pushMethod · 0.45
as_strMethod · 0.45
allMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected