1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//! A run drawn as connected steps on a canvas.
//!
//! This is the shape an agent's work takes when it stops being a list: steps
//! as cards, connections as paths, and the failures that sent work back drawn
//! as the loops they are rather than flattened into the forward order.
//!
//! The division of labour is the same one the rest of the library keeps. The
//! caller owns the run, the positions and the actions; the canvas owns the
//! backdrop, the card, the path geometry and the states. There is no layout
//! algorithm here on purpose: where a step belongs is a claim about the run,
//! and a component that placed steps itself would be making that claim on
//! every host's behalf.
//!
//! ```no_run
//! use gpui_kit::prelude::*;
//!
//! let graph = NodeGraph::new("run.12")
//! .node(
//! GraphNode::new("run.12.plan", "Plan")
//! .state(NodeState::Succeeded)
//! .metric("tokens", "4.1k")
//! .metric("took", "2.4s"),
//! 0.0,
//! 0.0,
//! )
//! .node(
//! GraphNode::new("run.12.apply", "Apply")
//! .state(NodeState::Failed)
//! .action("write src/main.rs")
//! .diff(Diff::new(24, 3)),
//! 280.0,
//! 0.0,
//! )
//! .edge(GraphEdge::new("run.12.plan", "run.12.apply"))
//! .edge(GraphEdge::new("run.12.apply", "run.12.plan").feedback());
//! ```
pub use ;
pub use ;
pub use ;