vibe-action 0.1.4

Command router — execute shell commands and LLM prompts via simple YAML actions.
//! System provider for `{system_pwd}` — current working directory.

use crate::models::context::ContextModel;
use crate::system::system::{SystemKey, SystemProvider};
use anyhow::Result;

pub struct SystemDirPwdProvider;

impl SystemProvider for SystemDirPwdProvider {
    fn key(&self) -> SystemKey {
        SystemKey::DirPwd
    }

    fn resolve(&self) -> Result<ContextModel> {
        let pwd = std::env::current_dir()
            .map(|p| p.display().to_string())
            .unwrap_or_default();
        Ok(ContextModel::String(pwd))
    }
}