lean-ctx 3.7.3

Context Runtime for AI Agents with CCP. 68 MCP tools, 10 read modes, 60+ compression patterns, cross-session memory (CCP), persistent AI knowledge with temporal facts + contradiction detection, multi-agent context sharing, LITM-aware positioning, AAAK compact format, adaptive compression with Thompson Sampling bandits. Supports 24+ AI tools. Reduces LLM token consumption by up to 99%.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Frame selection for the animated mascot. The actual sprite art lives in
//! [`super::mascot_art`]; this module only picks which pre-rendered frame to
//! show for a given animation tick.

use super::types::BuddyState;

/// Return the sprite lines to render for the given animation tick. When frames
/// are available and a tick is provided, cycle through them; otherwise fall
/// back to the static base sprite.
pub(super) fn sprite_lines_for_tick(state: &BuddyState, tick: Option<u64>) -> &[String] {
    if let Some(t) = tick {
        if !state.ascii_frames.is_empty() {
            let idx = (t as usize) % state.ascii_frames.len();
            return &state.ascii_frames[idx];
        }
    }
    &state.ascii_art
}