vtcode 0.98.6

A Rust-based terminal coding agent with modular architecture supporting multiple LLM providers
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use anyhow::{Context, Result};
use vtcode_core::config::types::AgentConfig as CoreAgentConfig;
use vtcode_core::core::agent::snapshots::{SnapshotConfig, SnapshotManager};

pub(super) fn snapshot_config(config: &CoreAgentConfig) -> SnapshotConfig {
    let mut snapshot_cfg = SnapshotConfig::new(config.workspace.clone());
    snapshot_cfg.enabled = true;
    snapshot_cfg.storage_dir = config.checkpointing_storage_dir.clone();
    snapshot_cfg.max_snapshots = config.checkpointing_max_snapshots;
    snapshot_cfg.max_age_days = config.checkpointing_max_age_days;
    snapshot_cfg
}

pub(super) fn snapshot_manager(snapshot_cfg: SnapshotConfig) -> Result<SnapshotManager> {
    SnapshotManager::new(snapshot_cfg).context("failed to initialize checkpoint manager")
}