// Created by Vinh Nguyen on 2026-04-26
// Copyright © 2024 Cho Tot. All rights reserved.
//! Shared helpers for loading workspace configuration with consistent error context.
//!
//! Every call to [`vtcode_config::loader::manager::ConfigManager::load_from_workspace`]
//! across the codebase produced a slightly different `.with_context(…)` string, making
//! log searches unreliable and hiding the workspace path in some variants. This module
//! centralises all loading paths behind a single function so the error message is
//! consistent and always includes the workspace path.
use Path;
use ;
use ConfigManager;
/// Load the workspace configuration with a consistent, path-inclusive error context.
///
/// This is the single canonical wrapper around `ConfigManager::load_from_workspace`.
/// All call sites in `src/` should use this function instead of calling the manager
/// directly with an ad-hoc `.with_context(…)`.
///
/// # Errors
///
/// Returns an error if the configuration file cannot be read or parsed, with a
/// message in the form:
/// `"Failed to load VT Code configuration for workspace '<path>'"`
pub