pub fn config_dir() -> Result<PathBuf, AgentConfigError>Expand description
Returns $XDG_CONFIG_HOME (or its platform default) — used by OpenCode.
On macOS this is ~/Library/Application Support. OpenCode, however, uses
~/.config/opencode even on macOS, so callers that need OpenCode’s path
should prefer opencode_plugins_dir which encodes that quirk.
§Errors
Returns AgentConfigError::PathResolution when neither
$XDG_CONFIG_HOME (%APPDATA% on Windows) nor dirs::config_dir
yields a value.