get_config_dir

Function get_config_dir 

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

Get the XDG-compliant configuration directory for vtcode.

Follows the Ratatui recipe pattern for config directories:

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

Returns None if no suitable directory can be determined.