get_data_dir

Function get_data_dir 

Source
pub fn get_data_dir() -> Option<PathBuf>
Expand description

Get the XDG-compliant data directory for vtcode.

Follows the Ratatui recipe pattern for data directories:

  1. Check environment variable VTCODE_DATA for custom location
  2. Use XDG Base Directory Specification via ProjectDirs
  3. Fallback to legacy ~/.vtcode/cache for backwards compatibility

Returns None if no suitable directory can be determined.