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

Method new

atomic-agent/src/transcript/storage.rs:81–106  ·  view source on GitHub ↗

Create a minimal unhashed data struct (no reasoning).

(
        session_id: impl Into<String>,
        turn_number: u32,
        format: impl Into<String>,
        entries: Vec<CondensedEntry>,
        files: &[String],
    )

Source from the content-addressed store, hash-verified

79impl UnhashedTurnData {
80 /// Create a minimal unhashed data struct (no reasoning).
81 pub fn new(
82 session_id: impl Into<String>,
83 turn_number: u32,
84 format: impl Into<String>,
85 entries: Vec<CondensedEntry>,
86 files: &[String],
87 ) -> Self {
88 let condensed_text = format_condensed(&entries, files);
89 let prompts = extract_prompts(&entries);
90 let tools_used = aggregate_tool_usage(&entries);
91
92 Self {
93 session_id: session_id.into(),
94 turn_number,
95 transcript_format: format.into(),
96 condensed_transcript: entries,
97 condensed_text,
98 prompts,
99 tools_used,
100 reasoning: None,
101 redacted: false,
102 input_tokens: None,
103 output_tokens: None,
104 step_count: None,
105 }
106 }
107
108 /// Attach the turn's LLM usage, as the agent's turn-end hook reported
109 /// it: the turn's token cost and its step count.

Callers

nothing calls this directly

Calls 3

format_condensedFunction · 0.85
extract_promptsFunction · 0.85
aggregate_tool_usageFunction · 0.85

Tested by

no test coverage detected