pub struct MemoryPrefix {
pub global: Option<TierFile>,
pub project: Option<TierFile>,
pub project_tier: Option<ProjectTier>,
pub auto: Option<TierFile>,
pub estimated_tokens: usize,
pub truncated: bool,
}Expand description
Assembled memory prefix.
Tiers are present when the corresponding file existed and read successfully.
estimated_tokens is the combined token estimate across all present tiers.
Fields§
§global: Option<TierFile>Operator-global CLAUDE.md, if any.
project: Option<TierFile>Workspace CLAUDE.md, if any. This is the flattened view of
Self::project_tier used by splice_into for backward compat; the
rich view is in project_tier.
project_tier: Option<ProjectTier>Rich project-tier collections (walk + imports + rules + nested).
auto: Option<TierFile>Per-workspace auto-memory MEMORY.md, if any.
estimated_tokens: usizeSum of estimated_tokens across present tiers.
truncated: booltrue if any tier was truncated by budget enforcement.
Implementations§
Source§impl MemoryPrefix
impl MemoryPrefix
Sourcepub fn splice_into(&self, default_body: &str) -> String
pub fn splice_into(&self, default_body: &str) -> String
Render the memory prefix and append the operator’s default-body system
prompt. Tier order is global → project → auto; missing tiers contribute
zero bytes. When all tiers are missing, returns default_body as-is.
Sourcepub fn summary_lines(&self) -> Vec<String>
pub fn summary_lines(&self) -> Vec<String>
Human-readable summary lines for the /memory slash command.
Trait Implementations§
Source§impl Clone for MemoryPrefix
impl Clone for MemoryPrefix
Source§fn clone(&self) -> MemoryPrefix
fn clone(&self) -> MemoryPrefix
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more