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

Method add

atomic-agent/src/provenance/detail.rs:92–96  ·  view source on GitHub ↗

Add another `PhaseTokens` into `self` (used for running totals).

(&mut self, other: &PhaseTokens)

Source from the content-addressed store, hash-verified

90
91 /// Add another `PhaseTokens` into `self` (used for running totals).
92 pub fn add(&mut self, other: &PhaseTokens) {
93 self.input += other.input;
94 self.output += other.output;
95 self.cost_usd = compute_cost(self.input, self.output);
96 }
97}
98
99/// Aggregate token counts across all phases in a turn.

Calls 1

compute_costFunction · 0.85