MCPcopy Create free account
hub / github.com/AIScientists-Dev/Flowtrace / cmd_show

Function cmd_show

crates/flowtrace-cli/src/main.rs:379–399  ·  view source on GitHub ↗
(fmt: &str, downstream: Option<&str>)

Source from the content-addressed store, hash-verified

377}
378
379fn cmd_show(fmt: &str, downstream: Option<&str>) -> Result<()> {
380 let root = trace_root_or_bail()?;
381 let r = load_trace(&root)?;
382 if let Some(step_id) = downstream {
383 if !r.steps.contains_key(step_id) {
384 anyhow::bail!("unknown step `{}`", step_id);
385 }
386 for s in r.downstream_of(step_id) {
387 println!("{}", s);
388 }
389 return Ok(());
390 }
391 match fmt {
392 "json" => println!("{}", serde_json::to_string_pretty(&r)?),
393 "ascii" => print!("{}", format_dag::ascii(&r)),
394 "mermaid" => print!("{}", format_dag::mermaid(&r)),
395 "dot" => print!("{}", format_dag::dot(&r)),
396 other => anyhow::bail!("unknown format: {}", other),
397 }
398 Ok(())
399}
400
401fn cmd_reply(run: Option<String>) -> Result<()> {
402 let root = trace_root_or_bail()?;

Callers 1

mainFunction · 0.85

Calls 3

trace_root_or_bailFunction · 0.85
load_traceFunction · 0.85
downstream_ofMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…