pub fn normalize_path(workspace_root: &PathBuf, path: &str) -> PathBufExpand description
Normalize a path relative to the workspace root.
Handles the double-prefix bug where the model passes an absolute path like “/opt/pawan/grind/opt/pawan/grind/foo.rs” — it joined the workspace root with an absolute path instead of a relative one. We detect the workspace root appearing twice and collapse to the second occurrence.
§Parameters
workspace_root: The root directory of the workspacepath: The path to normalize (can be relative or absolute)
§Returns
The normalized path as a PathBuf