fn get_config_dir(state: &Arc<AppState>) -> Result<String, String>
Helper to extract the version-specific config dir from AppState.